From 17c7bde4554e884747289b9db2acc12cdb6fab28 Mon Sep 17 00:00:00 2001 From: iosh Date: Fri, 27 Sep 2024 22:59:13 +0800 Subject: [PATCH 1/4] chore: init next --- .cargo/config.toml | 5 + .github/workflows/CI.yml | 234 +++ .gitignore | 209 ++- .gitmodules | 3 - Cargo.toml | 21 + README.md | 267 +++- build.rs | 5 + {packages/node/data => configs}/log.yaml | 0 .../data => configs}/pos_config/genesis_file | Bin .../pos_config/initial_nodes.json | 0 .../pos_config/pos_config.yaml | 0 .../data => configs}/pos_config/public_key | 0 .../pos_config/waypoint_config | 0 conflux-rust | 1 - npm/darwin-arm64/README.md | 3 + npm/darwin-arm64/package.json | 28 + npm/darwin-x64/README.md | 3 + npm/darwin-x64/package.json | 28 + npm/linux-arm64-gnu/README.md | 3 + npm/linux-arm64-gnu/package.json | 31 + npm/linux-x64-gnu/README.md | 3 + npm/linux-x64-gnu/package.json | 31 + npm/win32-arm64-msvc/README.md | 3 + npm/win32-arm64-msvc/package.json | 28 + npm/win32-x64-msvc/README.md | 3 + npm/win32-x64-msvc/package.json | 28 + package.json | 71 +- packages/node-darwin-arm64/CHANGELOG.md | 7 - packages/node-darwin-arm64/LICENSE | 21 - packages/node-darwin-arm64/README.md | 3 - packages/node-darwin-arm64/package.json | 17 - packages/node-jsonrpc/LICENSE | 21 - packages/node-jsonrpc/package.json | 13 - packages/node-linux-x64/CHANGELOG.md | 7 - packages/node-linux-x64/LICENSE | 21 - packages/node-linux-x64/README.md | 3 - packages/node-linux-x64/package.json | 17 - packages/node/CHANGELOG.md | 24 - packages/node/LICENSE | 21 - packages/node/README.md | 266 ---- packages/node/package.json | 42 - packages/node/scripts/postinstall.js | 37 - packages/node/src/createConfigFile.ts | 104 -- packages/node/src/createServer.ts | 87 -- packages/node/src/helper.ts | 187 --- packages/node/src/index.ts | 5 - packages/node/src/server.ts | 86 -- packages/node/src/types.ts | 202 --- packages/node/tsconfig.build.json | 11 - packages/node/tsconfig.json | 3 - pnpm-lock.yaml | 1264 ++++++++++++++--- pnpm-workspace.yaml | 2 +- rustfmt.toml | 1 + simple-test.js | 5 + src/lib.rs | 8 + tsconfig.json | 14 + 56 files changed, 2067 insertions(+), 1440 deletions(-) create mode 100644 .cargo/config.toml create mode 100644 .github/workflows/CI.yml delete mode 100644 .gitmodules create mode 100644 Cargo.toml create mode 100644 build.rs rename {packages/node/data => configs}/log.yaml (100%) rename {packages/node/data => configs}/pos_config/genesis_file (100%) rename {packages/node/data => configs}/pos_config/initial_nodes.json (100%) rename {packages/node/data => configs}/pos_config/pos_config.yaml (100%) rename {packages/node/data => configs}/pos_config/public_key (100%) rename {packages/node/data => configs}/pos_config/waypoint_config (100%) delete mode 160000 conflux-rust create mode 100644 npm/darwin-arm64/README.md create mode 100644 npm/darwin-arm64/package.json create mode 100644 npm/darwin-x64/README.md create mode 100644 npm/darwin-x64/package.json create mode 100644 npm/linux-arm64-gnu/README.md create mode 100644 npm/linux-arm64-gnu/package.json create mode 100644 npm/linux-x64-gnu/README.md create mode 100644 npm/linux-x64-gnu/package.json create mode 100644 npm/win32-arm64-msvc/README.md create mode 100644 npm/win32-arm64-msvc/package.json create mode 100644 npm/win32-x64-msvc/README.md create mode 100644 npm/win32-x64-msvc/package.json delete mode 100644 packages/node-darwin-arm64/CHANGELOG.md delete mode 100644 packages/node-darwin-arm64/LICENSE delete mode 100644 packages/node-darwin-arm64/README.md delete mode 100644 packages/node-darwin-arm64/package.json delete mode 100644 packages/node-jsonrpc/LICENSE delete mode 100644 packages/node-jsonrpc/package.json delete mode 100644 packages/node-linux-x64/CHANGELOG.md delete mode 100644 packages/node-linux-x64/LICENSE delete mode 100644 packages/node-linux-x64/README.md delete mode 100644 packages/node-linux-x64/package.json delete mode 100644 packages/node/CHANGELOG.md delete mode 100644 packages/node/LICENSE delete mode 100644 packages/node/README.md delete mode 100644 packages/node/package.json delete mode 100644 packages/node/scripts/postinstall.js delete mode 100644 packages/node/src/createConfigFile.ts delete mode 100644 packages/node/src/createServer.ts delete mode 100644 packages/node/src/helper.ts delete mode 100644 packages/node/src/index.ts delete mode 100644 packages/node/src/server.ts delete mode 100644 packages/node/src/types.ts delete mode 100644 packages/node/tsconfig.build.json delete mode 100644 packages/node/tsconfig.json create mode 100644 rustfmt.toml create mode 100644 simple-test.js create mode 100644 src/lib.rs create mode 100644 tsconfig.json diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..658b10e --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] + +[target.i686-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..25c261e --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,234 @@ +name: CI +env: + DEBUG: napi:* + APP_NAME: node + MACOSX_DEPLOYMENT_TARGET: '10.13' + CARGO_INCREMENTAL: '1' +permissions: + contents: write + id-token: write +'on': + push: + branches: + - main + tags-ignore: + - '**' + paths-ignore: + - '**/*.md' + - LICENSE + - '**/*.gitignore' + - .editorconfig + - docs/** + pull_request: null + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + build: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: pnpm build --target x86_64-apple-darwin + - host: windows-latest + build: pnpm build --target x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + build: pnpm build --target x86_64-unknown-linux-gnu --use-napi-cross + - host: macos-latest + target: aarch64-apple-darwin + build: pnpm build --target aarch64-apple-darwin + - host: ubuntu-latest + target: aarch64-unknown-linux-gnu + build: pnpm build --target aarch64-unknown-linux-gnu --use-napi-cross + - host: windows-latest + target: aarch64-pc-windows-msvc + build: pnpm build --target aarch64-pc-windows-msvc + name: stable - ${{ matrix.settings.target }} - node@20 + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v4 + - name: setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + - name: Install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: ${{ matrix.settings.target }} + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ~/.napi-rs + .cargo-cache + target/ + key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} + - name: Setup toolchain + run: ${{ matrix.settings.setup }} + if: ${{ matrix.settings.setup }} + shell: bash + - name: Install dependencies + run: pnpm install + - name: Build + run: ${{ matrix.settings.build }} + shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bindings-${{ matrix.settings.target }} + path: '*.node' + if-no-files-found: error + test-macOS-windows-binding: + name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + settings: + - host: windows-latest + target: x86_64-pc-windows-msvc + architecture: x64 + - host: macos-latest + target: x86_64-apple-darwin + architecture: x64 + - host: macos-latest + target: aarch64-apple-darwin + architecture: arm64 + node: + - '18' + - '20' + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v4 + - name: setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: pnpm + architecture: ${{ matrix.settings.architecture }} + - name: Install dependencies + run: pnpm install + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-${{ matrix.settings.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: pnpm test + test-linux-binding: + name: Test ${{ matrix.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + target: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + node: + - '18' + - '20' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: pnpm + - name: Output docker params + id: docker + run: | + node -e " + if ('${{ matrix.target }}'.startsWith('aarch64')) { + console.log('PLATFORM=linux/arm64') + } else if ('${{ matrix.target }}'.startsWith('armv7')) { + console.log('PLATFORM=linux/arm/v7') + } else { + console.log('PLATFORM=linux/amd64') + } + " >> $GITHUB_OUTPUT + node -e " + if ('${{ matrix.target }}'.endsWith('-musl')) { + console.log('IMAGE=node:${{ matrix.node }}-alpine') + } else { + console.log('IMAGE=node:${{ matrix.node }}-slim') + } + " >> $GITHUB_OUTPUT + echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + - name: Install dependencies + run: pnpm install --force + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-${{ matrix.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: all + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Test bindings + uses: addnab/docker-run-action@v3 + with: + image: ${{ steps.docker.outputs.IMAGE }} + options: '-v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}' + run: npm run test + publish: + name: Publish + runs-on: ubuntu-latest + needs: + - test-macOS-windows-binding + - test-linux-binding + steps: + - uses: actions/checkout@v4 + - name: setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + - name: Install dependencies + run: pnpm install + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + - name: Move artifacts + run: pnpm artifacts + - name: List packages + run: ls -R ./npm + shell: bash + # - name: Publish to NPM + # uses: changesets/action@v1 + # with: + # createGithubReleases: ${{ github.ref == 'refs/heads/main' }} + # publish: pnpm changeset:publish + # version: pnpm changeset:version + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 4d3d3a3..ede1b13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,199 @@ -*.local -.DS_Store -.attest -node_modules -tsconfig*.tsbuildinfo -.idea +### Created by https://www.gitignore.io +### Rust ### +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +### Created by https://www.gitignore.io +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity -/node_modules +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt dist -packages/node/**/*.js -!packages/node/scripts/postinstall.js -packages/node/data/config.toml +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +*.node +*.wasm + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache +.stylelintcache + +# SvelteKit build / generate output +.svelte-kit + +### Created by https://www.gitignore.io +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud -conflux -conflux.exe -pos-genesis-tool -pos-genesis-tool.exe \ No newline at end of file +### generated by napi ## +conflux.d.ts +conflux.js \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 30445ad..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "conflux-rust"] - path = conflux-rust - url = https://github.com/Conflux-Chain/conflux-rust.git diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0ee9023 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,21 @@ +[package] +authors = ["LongYinan "] +edition = "2021" +name = "xcfx_node" +version = "0.1.0" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib"] + +[dependencies] +napi = "2" +napi-derive = "2" + +[build-dependencies] +napi-build = "2" + +[profile.release] +lto = true +codegen-units = 1 diff --git a/README.md b/README.md index 5d2c4ce..5b056fb 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,269 @@ If you want to run other platform or architecture, you can open an [issue](https If you want to run a mainnet or testnet node, please refer to the [Conflux documentation](https://www.confluxdocs.com/docs/category/run-a-node) -# How to use +# xcfx-node + +Run the Conflux-Rust node in Node.js. This is used for developing on the Conflux network, such as testing RPC dApps or contracts. + +# Supported platforms + +By now xcfx-node supports the following platforms: + +- Linux (x86_64-unknown-linux-gnu) +- macOS (aarch64-apple-darwin) + +If you want to run other platform or architecture, you can open an [issue](https://github.com/iosh/xcfx-node/issues/new) on GitHub + +# Quick start + +## Install + +```bash +npm install @xcfx/node +``` + +## Usage + +```ts +import { createServer } from "@xcfx/node"; + +async function main() { + const server = await createServer(); + + await server.start(); + + const options = { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: '{"jsonrpc":"2.0","method":"cfx_getStatus","id":1}', + }; + + const response = await fetch("http://localhost:12537", options); + const data = await response.json(); + + // safe to stop the server + await server.stop(); +} +await main(); +``` + +## Configuration + +```ts +import { createServer } from "@xcfx/node"; + +async function main() { + const server = await createServer({ ...serverConfig, ...ConfluxConfig }); +} +``` + +### serverConfig + +```ts +export interface ServerConfig { + /** + * wait until the conflux node is ready + * @default true + */ + waitUntilReady?: true; + + /** + * Print the conflux node output to the console.log + * @default true + */ + silent?: boolean; + + /** + * Persist the conflux node data, if not set, the data will be deleted when the conflux node is stopped + * @default false + */ + persistNodeData?: boolean; +} +``` + +### confluxConfig + +```ts +export interface ConfluxConfig { + /**Set the node type to Full node, Archive node, or Light node. + * Possible values are "full", "archive",or"light". + * @default "full" + */ + node_type?: "full" | "archive" | "light"; + + /** + * `dev` mode is for users to run a single node that automatically + * @default "dev" + */ + mode?: "dev"; + + /** + * If it's not set, blocks will only be generated after receiving a transaction.Otherwise, + * the blocks are automatically generated every + */ + dev_block_interval_ms?: number; + + /** + * `mining_author` is the address to receive mining rewards. + */ + mining_author?: string; + + /** + * Listen address for stratum + * @default "127.0.0.1" + */ + stratum_listen_address?: string; + + /** + * Port for stratum. + * @default 32525 + */ + + stratum_port?: number; + + /** + * `log_conf` the path of the log4rs configuration file. The configuration in the file will overwrite the value set by `log_level`. + */ + log_conf?: string; + /** + *`log_file` is the path of the log file" + * If not set, the log will only be printed to stdout, and not persisted to files. + */ + log_file?: string; + + /** + * log_level` is the printed log level. + */ + + log_level?: "error" | "warn" | "info" | "debug" | "trace" | "off"; + + /** + * The port of the websocket JSON-RPC server. + * @default 12535 + */ + jsonrpc_ws_port?: number; + + /** + * The port of the HTTP JSON-RPC server. + * @default 12537 + */ + jsonrpc_http_port?: number; + /** + * Possible Core space names are: all, safe, cfx, pos, debug, pubsub, test, trace, txpool. + * `safe` only includes `cfx` and `pubsub`, `txpool`. + * @default "all" + */ + public_rpc_apis?: + | "all" + | "safe" + | "cfx" + | "pos" + | "debug" + | "pubsub" + | "test" + | "trace" + | "txpool"; + + /** + * The chain ID of the network.(core space) + * @default 1234 + */ + chain_id?: number; + + /** + * The chain ID of the network.( eSpace) + * @default 1235 + */ + evm_chain_id?: number; + + /** + * The password used to encrypt the private key of the pos_private_key. + * @default "123456" + */ + dev_pos_private_key_encryption_password?: string; + + /** + * The private key of the genesis, every account will be receive 1000 CFX + */ + genesis_secrets?: string[]; + + /** + * To open filter related methods + */ + poll_lifetime_in_seconds?: number; + + /** + * @default 0 + */ + pos_reference_enable_height?: number; + + /** + * @default 1 + */ + dao_vote_transition_number?: number; + + /** + * @default 1 + */ + dao_vote_transition_height?: number; + + /** + * @default 1 + */ + cip43_init_end_number?: number; + /** + * @default 1 + */ + cip71_patch_transition_number?: number; + /** + * @default 1 + */ + cip90_transition_height?: number; + /** + * @default 1 + */ + cip90_transition_number?: number; + + /** + * @default 1 + */ + cip105_transition_number?: number; + /** + * @default 1 + */ + cip107_transition_number?: number; + /** + * @default 1 + */ + cip112_transition_height?: number; + /** + * @default 1 + */ + cip118_transition_number?: number; + /** + * @default 1 + */ + cip119_transition_number?: number; -Read the document in [@xcfx/node package](https://github.com/iosh/xcfx-node/tree/main/packages/node) + /** + * @default 1 + */ + next_hardfork_transition_number?: number; + /** + * @default 1 + */ + next_hardfork_transition_height?: number; + /** + * @default 1 + */ + cip1559_transition_height?: number; + /** + * @default 1 + */ + cancun_opcodes_transition_number?: number; + /** + * @default 1 + */ + cip113_transition_height?: number; +} +``` diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..1f866b6 --- /dev/null +++ b/build.rs @@ -0,0 +1,5 @@ +extern crate napi_build; + +fn main() { + napi_build::setup(); +} diff --git a/packages/node/data/log.yaml b/configs/log.yaml similarity index 100% rename from packages/node/data/log.yaml rename to configs/log.yaml diff --git a/packages/node/data/pos_config/genesis_file b/configs/pos_config/genesis_file similarity index 100% rename from packages/node/data/pos_config/genesis_file rename to configs/pos_config/genesis_file diff --git a/packages/node/data/pos_config/initial_nodes.json b/configs/pos_config/initial_nodes.json similarity index 100% rename from packages/node/data/pos_config/initial_nodes.json rename to configs/pos_config/initial_nodes.json diff --git a/packages/node/data/pos_config/pos_config.yaml b/configs/pos_config/pos_config.yaml similarity index 100% rename from packages/node/data/pos_config/pos_config.yaml rename to configs/pos_config/pos_config.yaml diff --git a/packages/node/data/pos_config/public_key b/configs/pos_config/public_key similarity index 100% rename from packages/node/data/pos_config/public_key rename to configs/pos_config/public_key diff --git a/packages/node/data/pos_config/waypoint_config b/configs/pos_config/waypoint_config similarity index 100% rename from packages/node/data/pos_config/waypoint_config rename to configs/pos_config/waypoint_config diff --git a/conflux-rust b/conflux-rust deleted file mode 160000 index 205095d..0000000 --- a/conflux-rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 205095d8d39d8410636c5898f9ebf666c364aa33 diff --git a/npm/darwin-arm64/README.md b/npm/darwin-arm64/README.md new file mode 100644 index 0000000..13bf806 --- /dev/null +++ b/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `@xcfx/node` diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json new file mode 100644 index 0000000..44f4d27 --- /dev/null +++ b/npm/darwin-arm64/package.json @@ -0,0 +1,28 @@ +{ + "name": "@xcfx/node-darwin-arm64", + "version": "0.0.7", + "cpu": [ + "arm64" + ], + "main": "@xcfx/node.darwin-arm64.node", + "files": [ + "@xcfx/node.darwin-arm64.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "darwin" + ] +} \ No newline at end of file diff --git a/npm/darwin-x64/README.md b/npm/darwin-x64/README.md new file mode 100644 index 0000000..0254cc2 --- /dev/null +++ b/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `@xcfx/node` diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json new file mode 100644 index 0000000..b70d280 --- /dev/null +++ b/npm/darwin-x64/package.json @@ -0,0 +1,28 @@ +{ + "name": "@xcfx/node-darwin-x64", + "version": "0.0.7", + "cpu": [ + "x64" + ], + "main": "@xcfx/node.darwin-x64.node", + "files": [ + "@xcfx/node.darwin-x64.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "darwin" + ] +} \ No newline at end of file diff --git a/npm/linux-arm64-gnu/README.md b/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000..dc66b5d --- /dev/null +++ b/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@xcfx/node` diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000..78c04e2 --- /dev/null +++ b/npm/linux-arm64-gnu/package.json @@ -0,0 +1,31 @@ +{ + "name": "@xcfx/node-linux-arm64-gnu", + "version": "0.0.7", + "cpu": [ + "arm64" + ], + "main": "@xcfx/node.linux-arm64-gnu.node", + "files": [ + "@xcfx/node.linux-arm64-gnu.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "linux" + ], + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/npm/linux-x64-gnu/README.md b/npm/linux-x64-gnu/README.md new file mode 100644 index 0000000..5ba6113 --- /dev/null +++ b/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `@xcfx/node` diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json new file mode 100644 index 0000000..4bb0021 --- /dev/null +++ b/npm/linux-x64-gnu/package.json @@ -0,0 +1,31 @@ +{ + "name": "@xcfx/node-linux-x64-gnu", + "version": "0.0.7", + "cpu": [ + "x64" + ], + "main": "@xcfx/node.linux-x64-gnu.node", + "files": [ + "@xcfx/node.linux-x64-gnu.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "linux" + ], + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/npm/win32-arm64-msvc/README.md b/npm/win32-arm64-msvc/README.md new file mode 100644 index 0000000..4ee462d --- /dev/null +++ b/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-win32-arm64-msvc` + +This is the **aarch64-pc-windows-msvc** binary for `@xcfx/node` diff --git a/npm/win32-arm64-msvc/package.json b/npm/win32-arm64-msvc/package.json new file mode 100644 index 0000000..79792cf --- /dev/null +++ b/npm/win32-arm64-msvc/package.json @@ -0,0 +1,28 @@ +{ + "name": "@xcfx/node-win32-arm64-msvc", + "version": "0.0.7", + "cpu": [ + "arm64" + ], + "main": "@xcfx/node.win32-arm64-msvc.node", + "files": [ + "@xcfx/node.win32-arm64-msvc.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "win32" + ] +} \ No newline at end of file diff --git a/npm/win32-x64-msvc/README.md b/npm/win32-x64-msvc/README.md new file mode 100644 index 0000000..1c14428 --- /dev/null +++ b/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@xcfx/node-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@xcfx/node` diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json new file mode 100644 index 0000000..3b1245e --- /dev/null +++ b/npm/win32-x64-msvc/package.json @@ -0,0 +1,28 @@ +{ + "name": "@xcfx/node-win32-x64-msvc", + "version": "0.0.7", + "cpu": [ + "x64" + ], + "main": "@xcfx/node.win32-x64-msvc.node", + "files": [ + "@xcfx/node.win32-x64-msvc.node" + ], + "description": "", + "keywords": [ + "conflux", + "conflux-client" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": "https://github.com/iosh/xcfx-node", + "os": [ + "win32" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index dadb188..d346cc9 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,61 @@ { - "private": true, + "name": "@xcfx/node", + "version": "0.1.0", + "description": "", + "main": "index.js", + "types": "index.d.ts", + "browser": "browser.js", + "repository": "https://github.com/iosh/xcfx-node", + "license": "MIT", + "keywords": [ + "conflux", + "conflux-client" + ], + "files": [ + "index.d.ts", + "index.js" + ], + "napi": { + "binaryName": "node", + "targets": [ + "x86_64-apple-darwin", + "aarch64-apple-darwin", + "x86_64-unknown-linux-gnu", + "x86_64-pc-windows-msvc", + "aarch64-unknown-linux-gnu", + "aarch64-pc-windows-msvc" + ] + }, + "engines": { + "node": ">= 10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "scripts": { - "format": "biome format ./packages --write", - "lint": "biome check --fix", - "changeset:version": "changeset version && pnpm install --lockfile-only && pnpm format", - "changeset:prepublish": "pnpm build", - "changeset:publish": "pnpm changeset:prepublish && changeset publish", - "clean": "pnpm run -r clean", - "build": "pnpm run -r build" + "artifacts": "napi artifacts", + "build": "napi build --dts conflux.d.ts --js conflux.js --platform --release", + "build:debug": "napi build --dts conflux.d.ts --js conflux.js --platform ", + "format:toml": "taplo format", + "format:rs": "cargo fmt", + "prepublishOnly": "napi prepublish -t npm", + "version": "napi version" }, - "conflux-rust": "2.4.0", - "keywords": [], - "author": "", - "license": "MIT", "devDependencies": { + "@napi-rs/cli": "3.0.0-alpha.62", + "typescript": "^5.5.3", + "@changesets/cli": "^2.27.8", "@biomejs/biome": "1.8.3", - "@types/node": "^22.5.2", - "typescript": "^5.5.4" + "@types/node": "^22.5.2" + }, + "optionalDependencies": { + "@xcfx/node-darwin-arm64": "workspace:*", + "@xcfx/node-darwin-x64": "workspace:*", + "@xcfx/node-linux-arm64-gnu": "workspace:*", + "@xcfx/node-linux-x64-gnu": "workspace:*", + "@xcfx/node-win32-arm64-msvc": "workspace:*", + "@xcfx/node-win32-x64-msvc": "workspace:*" }, - "dependencies": { - "@changesets/cli": "^2.27.8" - } + "packageManager": "pnpm@9.11.0" } diff --git a/packages/node-darwin-arm64/CHANGELOG.md b/packages/node-darwin-arm64/CHANGELOG.md deleted file mode 100644 index 2ae4458..0000000 --- a/packages/node-darwin-arm64/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# @xcfx/node-darwin-arm64 - -## 0.0.7 - -### Patch Changes - -- b149521: Publish first version diff --git a/packages/node-darwin-arm64/LICENSE b/packages/node-darwin-arm64/LICENSE deleted file mode 100644 index 93061e5..0000000 --- a/packages/node-darwin-arm64/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 iosh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/node-darwin-arm64/README.md b/packages/node-darwin-arm64/README.md deleted file mode 100644 index d2c6ed1..0000000 --- a/packages/node-darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# conflux-rust (aarch64-apple-darwin) - -This is the conflux-rust binary for macos. \ No newline at end of file diff --git a/packages/node-darwin-arm64/package.json b/packages/node-darwin-arm64/package.json deleted file mode 100644 index 2c92384..0000000 --- a/packages/node-darwin-arm64/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@xcfx/node-darwin-arm64", - "version": "0.0.7", - "license": "MIT", - "repository": "iosh/xcfx-node", - "homepage": "https://github.com/iosh/xcfx-node", - "engines": { - "node": ">=18" - }, - "os": ["darwin"], - "cpu": ["arm64"], - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/", - "executableFiles": ["conflux"] - } -} diff --git a/packages/node-jsonrpc/LICENSE b/packages/node-jsonrpc/LICENSE deleted file mode 100644 index 93061e5..0000000 --- a/packages/node-jsonrpc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 iosh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/node-jsonrpc/package.json b/packages/node-jsonrpc/package.json deleted file mode 100644 index e3b7a6d..0000000 --- a/packages/node-jsonrpc/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@xcfx/node-jsonrpc", - "version": "1.0.0", - "description": "", - "main": "index.js", - "private": true, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} diff --git a/packages/node-linux-x64/CHANGELOG.md b/packages/node-linux-x64/CHANGELOG.md deleted file mode 100644 index d256ab7..0000000 --- a/packages/node-linux-x64/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# @xcfx/node-linux-x64 - -## 0.0.7 - -### Patch Changes - -- b149521: Publish first version diff --git a/packages/node-linux-x64/LICENSE b/packages/node-linux-x64/LICENSE deleted file mode 100644 index 93061e5..0000000 --- a/packages/node-linux-x64/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 iosh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/node-linux-x64/README.md b/packages/node-linux-x64/README.md deleted file mode 100644 index 03a5bf8..0000000 --- a/packages/node-linux-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# conflux-rust (x86_64-unknown-linux-gnu) - -This is the conflux-rust binary for Linux x86_64. \ No newline at end of file diff --git a/packages/node-linux-x64/package.json b/packages/node-linux-x64/package.json deleted file mode 100644 index 607d838..0000000 --- a/packages/node-linux-x64/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@xcfx/node-linux-x64", - "version": "0.0.7", - "repository": "iosh/xcfx-node", - "homepage": "https://github.com/iosh/xcfx-node", - "engines": { - "node": ">=18" - }, - "os": ["linux"], - "cpu": ["x64"], - "libc": ["glibc"], - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/", - "executableFiles": ["conflux"] - } -} diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md deleted file mode 100644 index 884919e..0000000 --- a/packages/node/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# @xcfx/node - -## 0.1.0 - -### Minor Changes - -- f4cf061: Enhance check node is ready - -### Patch Changes - -- fce4f61: Added port check - -## 0.0.8 - -### Patch Changes - -- b65219e: Updated stop and clean function -- 34c73d6: Added a default value to mode in config argument - -## 0.0.7 - -### Patch Changes - -- b149521: Publish first version diff --git a/packages/node/LICENSE b/packages/node/LICENSE deleted file mode 100644 index 93061e5..0000000 --- a/packages/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 iosh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/node/README.md b/packages/node/README.md deleted file mode 100644 index 2e71b7e..0000000 --- a/packages/node/README.md +++ /dev/null @@ -1,266 +0,0 @@ -# xcfx-node - -Run the Conflux-Rust node in Node.js. This is used for developing on the Conflux network, such as testing RPC dApps or contracts. - -# Supported platforms - -By now xcfx-node supports the following platforms: - -- Linux (x86_64-unknown-linux-gnu) -- macOS (aarch64-apple-darwin) - -If you want to run other platform or architecture, you can open an [issue](https://github.com/iosh/xcfx-node/issues/new) on GitHub - -# Quick start - -## Install - -```bash -npm install @xcfx/node -``` - -## Usage - -```ts -import { createServer } from "@xcfx/node"; - -async function main() { - const server = await createServer(); - - await server.start(); - - const options = { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: '{"jsonrpc":"2.0","method":"cfx_getStatus","id":1}', - }; - - const response = await fetch("http://localhost:12537", options); - const data = await response.json(); - - // safe to stop the server - await server.stop(); -} -await main(); -``` - -## Configuration - -```ts -import { createServer } from "@xcfx/node"; - -async function main() { - const server = await createServer({ ...serverConfig, ...ConfluxConfig }); -} -``` - -### serverConfig - -```ts -export interface ServerConfig { - /** - * wait until the conflux node is ready - * @default true - */ - waitUntilReady?: true; - - /** - * Print the conflux node output to the console.log - * @default true - */ - silent?: boolean; - - /** - * Persist the conflux node data, if not set, the data will be deleted when the conflux node is stopped - * @default false - */ - persistNodeData?: boolean; -} -``` - -### confluxConfig - -```ts -export interface ConfluxConfig { - /**Set the node type to Full node, Archive node, or Light node. - * Possible values are "full", "archive",or"light". - * @default "full" - */ - node_type?: "full" | "archive" | "light"; - - /** - * `dev` mode is for users to run a single node that automatically - * @default "dev" - */ - mode?: "dev"; - - /** - * If it's not set, blocks will only be generated after receiving a transaction.Otherwise, - * the blocks are automatically generated every - */ - dev_block_interval_ms?: number; - - /** - * `mining_author` is the address to receive mining rewards. - */ - mining_author?: string; - - /** - * Listen address for stratum - * @default "127.0.0.1" - */ - stratum_listen_address?: string; - - /** - * Port for stratum. - * @default 32525 - */ - - stratum_port?: number; - - /** - * `log_conf` the path of the log4rs configuration file. The configuration in the file will overwrite the value set by `log_level`. - */ - log_conf?: string; - /** - *`log_file` is the path of the log file" - * If not set, the log will only be printed to stdout, and not persisted to files. - */ - log_file?: string; - - /** - * log_level` is the printed log level. - */ - - log_level?: "error" | "warn" | "info" | "debug" | "trace" | "off"; - - /** - * The port of the websocket JSON-RPC server. - * @default 12535 - */ - jsonrpc_ws_port?: number; - - /** - * The port of the HTTP JSON-RPC server. - * @default 12537 - */ - jsonrpc_http_port?: number; - /** - * Possible Core space names are: all, safe, cfx, pos, debug, pubsub, test, trace, txpool. - * `safe` only includes `cfx` and `pubsub`, `txpool`. - * @default "all" - */ - public_rpc_apis?: - | "all" - | "safe" - | "cfx" - | "pos" - | "debug" - | "pubsub" - | "test" - | "trace" - | "txpool"; - - /** - * The chain ID of the network.(core space) - * @default 1234 - */ - chain_id?: number; - - /** - * The chain ID of the network.( eSpace) - * @default 1235 - */ - evm_chain_id?: number; - - /** - * The password used to encrypt the private key of the pos_private_key. - * @default "123456" - */ - dev_pos_private_key_encryption_password?: string; - - /** - * The private key of the genesis, every account will be receive 1000 CFX - */ - genesis_secrets?: string[]; - - /** - * To open filter related methods - */ - poll_lifetime_in_seconds?: number; - - /** - * @default 0 - */ - pos_reference_enable_height?: number; - - /** - * @default 1 - */ - dao_vote_transition_number?: number; - - /** - * @default 1 - */ - dao_vote_transition_height?: number; - - /** - * @default 1 - */ - cip43_init_end_number?: number; - /** - * @default 1 - */ - cip71_patch_transition_number?: number; - /** - * @default 1 - */ - cip90_transition_height?: number; - /** - * @default 1 - */ - cip90_transition_number?: number; - - /** - * @default 1 - */ - cip105_transition_number?: number; - /** - * @default 1 - */ - cip107_transition_number?: number; - /** - * @default 1 - */ - cip112_transition_height?: number; - /** - * @default 1 - */ - cip118_transition_number?: number; - /** - * @default 1 - */ - cip119_transition_number?: number; - - /** - * @default 1 - */ - next_hardfork_transition_number?: number; - /** - * @default 1 - */ - next_hardfork_transition_height?: number; - /** - * @default 1 - */ - cip1559_transition_height?: number; - /** - * @default 1 - */ - cancun_opcodes_transition_number?: number; - /** - * @default 1 - */ - cip113_transition_height?: number; -} -``` diff --git a/packages/node/package.json b/packages/node/package.json deleted file mode 100644 index 3bad8d2..0000000 --- a/packages/node/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@xcfx/node", - "version": "0.1.0", - "description": "", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "scripts": { - "postinstall": "node scripts/postinstall.js", - "build": "tsc --project ./tsconfig.build.json", - "clean": "rm -rf dist" - }, - "keywords": ["conflux", "conflux rust"], - "files": [ - "dist", - "data", - "scripts", - "src", - "LICENSE", - "README.md", - "!**/*.tsbuildinfo" - ], - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "author": "", - "license": "MIT", - "repository": "iosh/xcfx-node", - "homepage": "https://github.com/iosh/xcfx-node", - "optionalDependencies": { - "@xcfx/node-darwin-arm64": "workspace:*", - "@xcfx/node-linux-x64": "workspace:*" - }, - "dependencies": { - "cive": "^0.4.0", - "detect-port": "^1.6.1", - "signal-exit": "^4.1.0" - }, - "devDependencies": { - "@types/detect-port": "^1.3.5" - } -} diff --git a/packages/node/scripts/postinstall.js b/packages/node/scripts/postinstall.js deleted file mode 100644 index 399df81..0000000 --- a/packages/node/scripts/postinstall.js +++ /dev/null @@ -1,37 +0,0 @@ -// get the current platform and architecture -const { platform, arch } = process; - -// Currently only limited platforms are supported. -const ALL_SUPPORT_PLATFORMS = { - linux: { - x64: "@xcfx/node-linux-x64", - }, - darwin: { - arm64: "@xcfx/node-darwin-arm64", - }, -}; - -function main() { - if (!ALL_SUPPORT_PLATFORMS[platform]) { - return console.warn( - `@xcfx/node is not supported the current platform: ${platform} yet. You can submit an issue: https://github.com/iosh/xcfx-node/issues/new` - ); - } - - if (!ALL_SUPPORT_PLATFORMS[platform][arch]) { - return console.warn( - `@xcfx/node is not supported the current architecture: ${arch} yet. You can submit an issue: https://github.com/iosh/xcfx-node/issues/new` - ); - } - - const BIN_NAME = `${ALL_SUPPORT_PLATFORMS[platform][arch]}/conflux`; - try { - require.resolve(BIN_NAME); - } catch (e) { - return console.warn( - `@xcfx/node postinstall script is failed to resolve the binary conflux rust package: ${BIN_NAME}` - ); - } -} - -main(); diff --git a/packages/node/src/createConfigFile.ts b/packages/node/src/createConfigFile.ts deleted file mode 100644 index 8e0457d..0000000 --- a/packages/node/src/createConfigFile.ts +++ /dev/null @@ -1,104 +0,0 @@ -import fs from "node:fs/promises"; -import path from "node:path"; -import type { ConfluxConfig } from "./types"; - -export const CONFIG_FILE_NAME = "config.toml"; - -export type FinalConfigs = Required< - Omit< - ConfluxConfig, - | "genesis_secrets" - | "dev_block_interval_ms" - | "mining_author" - | "stratum_listen_address" - | "stratum_port" - | "log_conf" - | "log_file" - | "log_level" - | "poll_lifetime_in_seconds" - > -> & { - genesis_secrets?: string; - dev_block_interval_ms?: number; - mining_author?: string; - stratum_listen_address?: string; - stratum_port?: number; - log_conf?: string; - log_file?: string; - log_level?: string; - poll_lifetime_in_seconds?: number; -}; - -export async function createConfigFile({ - genesis_secrets, - ...config -}: ConfluxConfig) { - const newConfig: FinalConfigs = { - ...config, - mode: config.mode || "dev", - node_type: config.node_type || "full", - jsonrpc_ws_port: config.jsonrpc_ws_port || 12535, - jsonrpc_http_port: config.jsonrpc_http_port || 12537, - public_rpc_apis: config.public_rpc_apis || "all", - chain_id: config.chain_id || 1234, - evm_chain_id: config.evm_chain_id || 1235, - dev_pos_private_key_encryption_password: - config.dev_pos_private_key_encryption_password || "123456", - - pos_reference_enable_height: config.pos_reference_enable_height || 0, - dao_vote_transition_number: config.dao_vote_transition_number || 1, - dao_vote_transition_height: config.dao_vote_transition_height || 1, - cip43_init_end_number: config.cip43_init_end_number || 1, - cip71_patch_transition_number: config.cip71_patch_transition_number || 1, - - cip90_transition_height: config.cip90_transition_height || 1, - cip90_transition_number: config.cip90_transition_number || 1, - - cip105_transition_number: config.cip105_transition_number || 1, - cip107_transition_number: config.cip107_transition_number || 1, - cip112_transition_height: config.cip112_transition_height || 1, - cip118_transition_number: config.cip118_transition_number || 1, - cip119_transition_number: config.cip119_transition_number || 1, - - next_hardfork_transition_number: - config.next_hardfork_transition_number || 1, - next_hardfork_transition_height: - config.next_hardfork_transition_height || 1, - - cip1559_transition_height: config.cip1559_transition_height || 1, - cancun_opcodes_transition_number: - config.cancun_opcodes_transition_number || 1, - - cip113_transition_height: config.cip113_transition_height || 1, - }; - if (genesis_secrets && Array.isArray(genesis_secrets)) { - // has the genesis_secrets we need create the genesis_secrets.txt - - const genesisStr = genesis_secrets - .map((pk) => { - if (pk.startsWith("0x")) { - return pk.slice(2); - } - return pk; - }) - .join("\n"); - - const genesisPath = path.join(__dirname, "../data/genesis_secrets.txt"); - await fs.writeFile(genesisPath, genesisStr); - - newConfig.genesis_secrets = genesisPath; - } - - const configStr = Object.entries(newConfig) - .map( - ([key, value]) => - `${key} = ${typeof value === "string" ? `"${value}"` : value}`, - ) - .join("\n"); - await fs.writeFile( - path.join(__dirname, `../data/${CONFIG_FILE_NAME}`), - configStr, - ); - - return newConfig; -} diff --git a/packages/node/src/createServer.ts b/packages/node/src/createServer.ts deleted file mode 100644 index bfbfe71..0000000 --- a/packages/node/src/createServer.ts +++ /dev/null @@ -1,87 +0,0 @@ -import path from "node:path"; -import { createConfigFile } from "./createConfigFile"; -import { - checkIsConfluxNodeRunning, - checkPort, - cleanup, - getBinPath, -} from "./helper"; -import { ConfluxServer } from "./server"; -import type { ConfluxConfig, ServerConfig } from "./types"; - -export type createServerReturnType = { - start: () => Promise; - stop: () => Promise; -}; - -async function createServer( - config: ConfluxConfig & ServerConfig = {}, -): Promise { - const configWithDefault = { - ...config, - mode: config.mode || "dev", - waitUntilReady: config.waitUntilReady || true, - silent: config.silent || true, - persistNodeData: config.persistNodeData || false, - - // default port - jsonrpc_http_port: config.jsonrpc_http_port || 12537, - jsonrpc_ws_port: config.jsonrpc_ws_port || 12535, - chain_id: config.chain_id || 1234, - evm_chain_id: config.evm_chain_id || 1235, - }; - - if (await checkPort(configWithDefault.jsonrpc_http_port)) { - // check it is conflux node - if ( - await checkIsConfluxNodeRunning({ - chainId: configWithDefault.chain_id, - httpPort: configWithDefault.jsonrpc_http_port, - }) - ) { - throw new Error( - `The Conflux node is already running on the port ${configWithDefault.jsonrpc_http_port}.`, - ); - } - - throw new Error( - `The jsonrpc_http_port port ${configWithDefault.jsonrpc_http_port} is already in use.`, - ); - } - - if (await checkPort(configWithDefault.jsonrpc_ws_port)) { - if ( - await checkIsConfluxNodeRunning({ - chainId: configWithDefault.chain_id, - wsPort: configWithDefault.jsonrpc_ws_port, - }) - ) { - throw new Error( - `The Conflux node is already running on the port ${configWithDefault.jsonrpc_ws_port}.`, - ); - } - - throw new Error( - `The jsonrpc_ws_port port ${configWithDefault.jsonrpc_ws_port} is already in use.`, - ); - } - - const BinPathResult = getBinPath(); - - if ("errorMessage" in BinPathResult) { - throw new Error(BinPathResult.errorMessage); - } - const workDir = path.join(__dirname, "../data"); - // try to cleanup the data dir - if (!configWithDefault.persistNodeData) { - cleanup(workDir); - } - - const finalConfig = await createConfigFile(configWithDefault); - - const server = new ConfluxServer(finalConfig); - - return server; -} - -export default createServer; diff --git a/packages/node/src/helper.ts b/packages/node/src/helper.ts deleted file mode 100644 index 3acffa3..0000000 --- a/packages/node/src/helper.ts +++ /dev/null @@ -1,187 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import { - http, - type Chain, - type PublicClient, - type Transport, - createPublicClient, - webSocket, -} from "cive"; -import { defineChain } from "cive/utils"; -import detectPort from "detect-port"; - -type CheckEnvironmentReturnType = - | { - binPath: string; - } - | { - errorMessage: string; - }; - -/** - * Check the current platform and architecture is supported - * @returns { CheckEnvironmentReturnType } - */ -export function getBinPath(): CheckEnvironmentReturnType { - const { platform, arch } = process; - - // Currently only limited platforms are supported. - const ALL_SUPPORT_PLATFORMS: Partial< - Record>> - > = { - linux: { - x64: "@xcfx/node-linux-x64", - }, - darwin: { - arm64: "@xcfx/node-darwin-arm64", - }, - }; - - if (!ALL_SUPPORT_PLATFORMS[platform]) { - return { - errorMessage: `@xcfx/node is not supported the current platform: ${platform} yet. You can submit an issue: https://github.com/iosh/xcfx-node/issues/new`, - }; - } - - if (!ALL_SUPPORT_PLATFORMS[platform][arch]) { - return { - errorMessage: `@xcfx/node is not supported the current architecture: ${arch} yet. You can submit an issue: https://github.com/iosh/xcfx-node/issues/new`, - }; - } - - const BIN_NAME = `${ALL_SUPPORT_PLATFORMS[platform][arch]}/conflux`; - - return { - binPath: require.resolve(BIN_NAME), - }; -} - -const rmsyncOptions = { - force: true, - recursive: true, -}; - -export function cleanup(workDir: string) { - // remove conflux data - fs.rmSync(path.join(workDir, "blockchain_data"), rmsyncOptions); - // remove conflux db - fs.rmSync(path.join(workDir, "db"), rmsyncOptions); - // remove conflux log - fs.rmSync(path.join(workDir, "log"), rmsyncOptions); - // remove conflux pos_db - fs.rmSync(path.join(workDir, "pos_db"), rmsyncOptions); -} - -/** - * Check the port is in used or not - * @param port the port to check - * @returns - */ -export async function checkPort(port: number) { - const p = await detectPort(port); - if (p === port) { - return false; - } - - return true; -} - -type createChainParamsType = { - chainId: number; - url?: string | undefined; - wsUrl?: string | undefined; -}; - -function createChain({ chainId, url, wsUrl }: createChainParamsType) { - return defineChain({ - id: chainId, - name: "Localhost", - nativeCurrency: { - decimals: 18, - name: "CFX", - symbol: "CFX", - }, - rpcUrls: { - default: { - http: url ? [url] : [], - webSocket: wsUrl ? [wsUrl] : [], - }, - }, - }); -} - -export type checkIsConfluxNodeRunningParamsType = { - chainId: number; -} & ( - | { - wsPort?: undefined; - httpPort: number; - } - | { - httpPort?: undefined; - wsPort: number; - } -); - -export async function checkIsConfluxNodeRunning( - args: checkIsConfluxNodeRunningParamsType, -) { - const chain = createChain({ - chainId: args.chainId, - url: args.httpPort ? `http://127.0.0.1:${args.httpPort}` : undefined, - wsUrl: args.wsPort ? `ws://127.0.0.1:${args.wsPort}` : undefined, - }); - let client: PublicClient; - - if (args.httpPort) { - client = createPublicClient({ - chain, - transport: http(), - }); - } else { - client = createPublicClient({ - chain, - transport: webSocket(), - }); - } - - try { - const data = await client.getClientVersion(); - if (data) { - return true; - } - return false; - } catch (error) { - return false; - } -} - -type WaitConfluxNodeReadyParamsType = { - chainId: number; - httpPort: number; -}; - -export async function waitConfluxNodeReady({ - chainId, - httpPort, -}: WaitConfluxNodeReadyParamsType) { - const chain = createChain({ - chainId, - url: `http://127.0.0.1:${httpPort}`, - }); - const client = createPublicClient({ - chain, - transport: http(), - }); - - await client.request( - { - method: "cfx_getStatus", - }, - { - retryCount: 50, - retryDelay: 500, - }, - ); -} diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts deleted file mode 100644 index 42d60b3..0000000 --- a/packages/node/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import createServer from "./createServer"; -import type { ConfluxConfig, ServerConfig } from "./types"; - -export { createServer }; -export type { ConfluxConfig, ServerConfig }; diff --git a/packages/node/src/server.ts b/packages/node/src/server.ts deleted file mode 100644 index 5bcbcef..0000000 --- a/packages/node/src/server.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { type ChildProcessWithoutNullStreams, spawn } from "node:child_process"; -import path from "node:path"; -import { onExit } from "signal-exit"; -import { CONFIG_FILE_NAME, type FinalConfigs } from "./createConfigFile"; -import { cleanup, getBinPath, waitConfluxNodeReady } from "./helper"; -import type { ServerConfig } from "./types"; - -export class ConfluxServer { - config: FinalConfigs & ServerConfig; - conflux: ChildProcessWithoutNullStreams | null = null; - workDir: string; - - constructor(config: FinalConfigs & ServerConfig) { - this.config = config; - - this.workDir = path.join(__dirname, "../data"); - - onExit(this.syncStop.bind(this)); - } - - /** - * Start the conflux node - * @returns {Promise} - */ - async start() { - const binPathResult = getBinPath(); - - if ("errorMessage" in binPathResult) { - throw new Error(binPathResult.errorMessage); - } - - this.conflux = spawn( - binPathResult.binPath, - [ - "--config", - path.join(this.workDir, CONFIG_FILE_NAME), - "--block-db-dir", - path.join(this.workDir, "db"), - ], - { - cwd: this.workDir, - }, - ); - - this.conflux.stderr.on("data", this.onListenError); - - if (!this.config.silent) { - this.conflux.stdout.on("data", this.onListenData); - } - - if (this.config.waitUntilReady) { - await waitConfluxNodeReady({ - chainId: this.config.chain_id, - httpPort: this.config.jsonrpc_http_port, - }); - } - } - - syncStop() { - if (!this.conflux) return; - if (this.conflux) { - this.conflux.stdout.destroy(); - this.conflux = null; - } - if (!this.config.persistNodeData) { - cleanup(this.workDir); - } - } - - /** - * Stop the conflux server - */ - async stop() { - this.syncStop(); - } - - onListenError = (chunk: any) => { - const msg = chunk.toString(); - console.error(`Conflux node error: ${msg.toString()}`); - }; - - onListenData = (chunk: any) => { - const msg = chunk.toString(); - console.log(msg.toString()); - }; -} diff --git a/packages/node/src/types.ts b/packages/node/src/types.ts deleted file mode 100644 index 25e2eb8..0000000 --- a/packages/node/src/types.ts +++ /dev/null @@ -1,202 +0,0 @@ -export interface ConfluxConfig { - /**Set the node type to Full node, Archive node, or Light node. - * Possible values are "full", "archive",or"light". - * @default "full" - */ - node_type?: "full" | "archive" | "light"; - - /** - * `dev` mode is for users to run a single node that automatically - * @default "dev" - */ - mode?: "dev"; - - /** - * If it's not set, blocks will only be generated after receiving a transaction.Otherwise, - * the blocks are automatically generated every - */ - dev_block_interval_ms?: number; - - /** - * `mining_author` is the address to receive mining rewards. - */ - mining_author?: string; - - /** - * Listen address for stratum - * @default "127.0.0.1" - */ - stratum_listen_address?: string; - - /** - * Port for stratum. - * @default 32525 - */ - - stratum_port?: number; - - /** - * `log_conf` the path of the log4rs configuration file. The configuration in the file will overwrite the value set by `log_level`. - */ - log_conf?: string; - /** - *`log_file` is the path of the log file" - * If not set, the log will only be printed to stdout, and not persisted to files. - */ - log_file?: string; - - /** - * log_level` is the printed log level. - */ - - log_level?: "error" | "warn" | "info" | "debug" | "trace" | "off"; - - /** - * The port of the websocket JSON-RPC server. - * @default 12535 - */ - jsonrpc_ws_port?: number; - - /** - * The port of the HTTP JSON-RPC server. - * @default 12537 - */ - jsonrpc_http_port?: number; - /** - * Possible Core space names are: all, safe, cfx, pos, debug, pubsub, test, trace, txpool. - * `safe` only includes `cfx` and `pubsub`, `txpool`. - * @default "all" - */ - public_rpc_apis?: - | "all" - | "safe" - | "cfx" - | "pos" - | "debug" - | "pubsub" - | "test" - | "trace" - | "txpool"; - - /** - * The chain ID of the network.(core space) - * @default 1234 - */ - chain_id?: number; - - /** - * The chain ID of the network.( eSpace) - * @default 1235 - */ - evm_chain_id?: number; - - /** - * The password used to encrypt the private key of the pos_private_key. - * @default "123456" - */ - dev_pos_private_key_encryption_password?: string; - - /** - * The private key of the genesis, every account will be receive 1000 CFX - */ - genesis_secrets?: string[]; - - /** - * To open filter related methods - */ - poll_lifetime_in_seconds?: number; - - /** - * @default 0 - */ - pos_reference_enable_height?: number; - - /** - * @default 1 - */ - dao_vote_transition_number?: number; - - /** - * @default 1 - */ - dao_vote_transition_height?: number; - - /** - * @default 1 - */ - cip43_init_end_number?: number; - /** - * @default 1 - */ - cip71_patch_transition_number?: number; - /** - * @default 1 - */ - cip90_transition_height?: number; - /** - * @default 1 - */ - cip90_transition_number?: number; - - /** - * @default 1 - */ - cip105_transition_number?: number; - /** - * @default 1 - */ - cip107_transition_number?: number; - /** - * @default 1 - */ - cip112_transition_height?: number; - /** - * @default 1 - */ - cip118_transition_number?: number; - /** - * @default 1 - */ - cip119_transition_number?: number; - - /** - * @default 1 - */ - next_hardfork_transition_number?: number; - /** - * @default 1 - */ - next_hardfork_transition_height?: number; - /** - * @default 1 - */ - cip1559_transition_height?: number; - /** - * @default 1 - */ - cancun_opcodes_transition_number?: number; - /** - * @default 1 - */ - cip113_transition_height?: number; -} - -export interface ServerConfig { - /** - * wait until the conflux node is ready - * @default true - */ - waitUntilReady?: true; - - /** - * Print the conflux node output to the console.log - * @default true - */ - silent?: boolean; - - /** - * Persist the conflux node data, if not set, the data will be deleted when the conflux node is stopped - * @default false - */ - persistNodeData?: boolean; -} diff --git a/packages/node/tsconfig.build.json b/packages/node/tsconfig.build.json deleted file mode 100644 index a5326a7..0000000 --- a/packages/node/tsconfig.build.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src"], - "exclude": ["src/**/*.test.ts"], - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", - "declaration": true, - "declarationMap": true - } -} diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json deleted file mode 100644 index 9536a0f..0000000 --- a/packages/node/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.base.json" -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6697179..0c4116e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,54 +7,55 @@ settings: importers: .: - dependencies: - '@changesets/cli': - specifier: ^2.27.8 - version: 2.27.8 + optionalDependencies: + '@xcfx/node-darwin-arm64': + specifier: workspace:* + version: link:npm/darwin-arm64 + '@xcfx/node-darwin-x64': + specifier: workspace:* + version: link:npm/darwin-x64 + '@xcfx/node-linux-arm64-gnu': + specifier: workspace:* + version: link:npm/linux-arm64-gnu + '@xcfx/node-linux-x64-gnu': + specifier: workspace:* + version: link:npm/linux-x64-gnu + '@xcfx/node-win32-arm64-msvc': + specifier: workspace:* + version: link:npm/win32-arm64-msvc + '@xcfx/node-win32-x64-msvc': + specifier: workspace:* + version: link:npm/win32-x64-msvc devDependencies: '@biomejs/biome': specifier: 1.8.3 version: 1.8.3 + '@changesets/cli': + specifier: ^2.27.8 + version: 2.27.8 + '@napi-rs/cli': + specifier: 3.0.0-alpha.62 + version: 3.0.0-alpha.62(@emnapi/runtime@1.2.0) '@types/node': specifier: ^22.5.2 - version: 22.5.2 + version: 22.7.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 - - packages/node: - dependencies: - cive: - specifier: ^0.4.0 - version: 0.4.0(typescript@5.5.4) - detect-port: - specifier: ^1.6.1 - version: 1.6.1 - signal-exit: - specifier: ^4.1.0 - version: 4.1.0 - optionalDependencies: - '@xcfx/node-darwin-arm64': - specifier: workspace:* - version: link:../node-darwin-arm64 - '@xcfx/node-linux-x64': - specifier: workspace:* - version: link:../node-linux-x64 - devDependencies: - '@types/detect-port': - specifier: ^1.3.5 - version: 1.3.5 + specifier: ^5.5.3 + version: 5.6.2 - packages/node-darwin-arm64: {} + npm/darwin-arm64: {} - packages/node-jsonrpc: {} + npm/darwin-x64: {} - packages/node-linux-x64: {} + npm/linux-arm64-gnu: {} -packages: + npm/linux-x64-gnu: {} + + npm/win32-arm64-msvc: {} - '@adraffy/ens-normalize@1.10.0': - resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + npm/win32-x64-msvc: {} + +packages: '@babel/runtime@7.25.6': resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} @@ -168,26 +169,404 @@ packages: '@changesets/write@0.3.2': resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@emnapi/core@1.2.0': + resolution: {integrity: sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w==} + + '@emnapi/runtime@1.2.0': + resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==} + + '@emnapi/wasi-threads@1.0.1': + resolution: {integrity: sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==} + + '@inquirer/checkbox@2.5.0': + resolution: {integrity: sha512-sMgdETOfi2dUHT8r7TT1BTKOwNvdDGFDXYWtQ2J69SvlYNntk9I/gJe7r5yvMwwsuKnYbuRs3pNhx4tgNck5aA==} + engines: {node: '>=18'} + + '@inquirer/confirm@3.2.0': + resolution: {integrity: sha512-oOIwPs0Dvq5220Z8lGL/6LHRTEr9TgLHmiI99Rj1PJ1p1czTys+olrgBqZk4E2qC0YTzeHprxSQmoHioVdJ7Lw==} + engines: {node: '>=18'} + + '@inquirer/core@9.2.1': + resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==} + engines: {node: '>=18'} + + '@inquirer/editor@2.2.0': + resolution: {integrity: sha512-9KHOpJ+dIL5SZli8lJ6xdaYLPPzB8xB9GZItg39MBybzhxA16vxmszmQFrRwbOA918WA2rvu8xhDEg/p6LXKbw==} + engines: {node: '>=18'} + + '@inquirer/expand@2.3.0': + resolution: {integrity: sha512-qnJsUcOGCSG1e5DTOErmv2BPQqrtT6uzqn1vI/aYGiPKq+FgslGZmtdnXbhuI7IlT7OByDoEEqdnhUnVR2hhLw==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.6': + resolution: {integrity: sha512-yfZzps3Cso2UbM7WlxKwZQh2Hs6plrbjs1QnzQDZhK2DgyCo6D8AaHps9olkNcUFlcYERMqU3uJSp1gmy3s/qQ==} + engines: {node: '>=18'} + + '@inquirer/input@2.3.0': + resolution: {integrity: sha512-XfnpCStx2xgh1LIRqPXrTNEEByqQWoxsWYzNRSEUxJ5c6EQlhMogJ3vHKu8aXuTacebtaZzMAHwEL0kAflKOBw==} + engines: {node: '>=18'} + + '@inquirer/number@1.1.0': + resolution: {integrity: sha512-ilUnia/GZUtfSZy3YEErXLJ2Sljo/mf9fiKc08n18DdwdmDbOzRcTv65H1jjDvlsAuvdFXf4Sa/aL7iw/NanVA==} + engines: {node: '>=18'} + + '@inquirer/password@2.2.0': + resolution: {integrity: sha512-5otqIpgsPYIshqhgtEwSspBQE40etouR8VIxzpJkv9i0dVHIpyhiivbkH9/dGiMLdyamT54YRdGJLfl8TFnLHg==} + engines: {node: '>=18'} + + '@inquirer/prompts@5.5.0': + resolution: {integrity: sha512-BHDeL0catgHdcHbSFFUddNzvx/imzJMft+tWDPwTm3hfu8/tApk1HrooNngB2Mb4qY+KaRWF+iZqoVUPeslEog==} + engines: {node: '>=18'} + + '@inquirer/rawlist@2.3.0': + resolution: {integrity: sha512-zzfNuINhFF7OLAtGHfhwOW2TlYJyli7lOUoJUXw/uyklcwalV6WRXBXtFIicN8rTRK1XTiPWB4UY+YuW8dsnLQ==} + engines: {node: '>=18'} + + '@inquirer/search@1.1.0': + resolution: {integrity: sha512-h+/5LSj51dx7hp5xOn4QFnUaKeARwUCLs6mIhtkJ0JYPBLmEYjdHSYh7I6GrLg9LwpJ3xeX0FZgAG1q0QdCpVQ==} + engines: {node: '>=18'} + + '@inquirer/select@2.5.0': + resolution: {integrity: sha512-YmDobTItPP3WcEI86GvPo+T2sRHkxxOq/kXmsBjHS5BVXUgvgZ5AfJjkvQvZr03T81NnI3KrrRuMzeuYUQRFOA==} + engines: {node: '>=18'} + + '@inquirer/type@1.5.5': + resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==} + engines: {node: '>=18'} + + '@inquirer/type@2.0.0': + resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==} + engines: {node: '>=18'} + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@noble/curves@1.4.0': - resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} + '@napi-rs/cli@3.0.0-alpha.62': + resolution: {integrity: sha512-IDUwHAEJZ9ad/s5oyhznrz5ZDcU+SJ6GdP5nb++Wx5MkS4FD9MeS3HfNZdsxkf10pOUPnmvCVFuG4xnLBQYmjw==} + engines: {node: '>= 16'} + hasBin: true + peerDependencies: + '@emnapi/runtime': ^1.1.0 + emnapi: ^1.1.0 + peerDependenciesMeta: + '@emnapi/runtime': + optional: true + emnapi: + optional: true - '@noble/curves@1.6.0': - resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} - engines: {node: ^14.21.3 || >=16} + '@napi-rs/cross-toolchain@0.0.16': + resolution: {integrity: sha512-jwdjHT5L0m9MH0CmzDwPp0ckn/UO7afHCsPeo7NugHUvYgvlgS7SWhdMVgIgJW2HHqhcW/2nhaLLGpAU1c7QRQ==} + peerDependencies: + '@napi-rs/cross-toolchain-arm64-target-aarch64': ^0.0.16 + '@napi-rs/cross-toolchain-arm64-target-armv7': ^0.0.16 + '@napi-rs/cross-toolchain-arm64-target-x86_64': ^0.0.16 + '@napi-rs/cross-toolchain-x64-target-aarch64': ^0.0.16 + '@napi-rs/cross-toolchain-x64-target-armv7': ^0.0.16 + '@napi-rs/cross-toolchain-x64-target-x86_64': ^0.0.16 + peerDependenciesMeta: + '@napi-rs/cross-toolchain-arm64-target-aarch64': + optional: true + '@napi-rs/cross-toolchain-arm64-target-armv7': + optional: true + '@napi-rs/cross-toolchain-arm64-target-x86_64': + optional: true + '@napi-rs/cross-toolchain-x64-target-aarch64': + optional: true + '@napi-rs/cross-toolchain-x64-target-armv7': + optional: true + '@napi-rs/cross-toolchain-x64-target-x86_64': + optional: true - '@noble/hashes@1.4.0': - resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} - engines: {node: '>= 16'} + '@napi-rs/lzma-android-arm-eabi@1.4.1': + resolution: {integrity: sha512-yenreSpZ9IrqppJOiWDqWMmja7XtSgio9LhtxYwgdILmy/OJTe/mlTYv+FhJBf7hIV9Razu5eBuEa3zKri81IA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@napi-rs/lzma-android-arm64@1.4.1': + resolution: {integrity: sha512-piutVBz5B1TNxXeEjub0n/IKI6dMaXPPRbVSXuc4gnZgzcihNDUh68vcLZgYd+IMiACZvBxvx2O3t5nthtph3A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@napi-rs/lzma-darwin-arm64@1.4.1': + resolution: {integrity: sha512-sDfOhQQFqV8lGbpgJN9DqNLBPR7QOfYjcWUv8FOGPaVP1LPJDnrc5uCpRWWEa2zIKmTiO8P9xzIl0TDzrYmghg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/lzma-darwin-x64@1.4.1': + resolution: {integrity: sha512-S5/RbC6EP4QkYy2xhxbfm48ZD9FkysfpWY4Slve0nj5RGGsHvcJBg2Pi69jrTPB/zLKz2SUa0i+RfUt9zvZNaw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/lzma-freebsd-x64@1.4.1': + resolution: {integrity: sha512-4AFnq6aZnclwameSBkDWu5Ftb8y4GwvVXeQXJKbN7hf7O5GG/8QpQB1R1NJw2QORUhpKwjAQUpbkTyhL2GFWWw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.1': + resolution: {integrity: sha512-j5rL1YRIm6rWmmGAvN6DPX6QuRjvFGB93xJ7DTRB47GXW4zHekXae6ivowjJ95vT4Iz4hSWkZbuwAy95eFrWRA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@napi-rs/lzma-linux-arm64-gnu@1.4.1': + resolution: {integrity: sha512-1XdFGKyTS9m+VrRQYs9uz+ToHf4Jwm0ejHU48k9lT9MPl8jSqzKdVtFzZBPzronHteSynBfKmUq0+HeWmjrsOQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/lzma-linux-arm64-musl@1.4.1': + resolution: {integrity: sha512-9d09tYS0/rBwIk1QTcO2hMZEB/ZpsG2+uFW5am1RHElSWMclObirB1An7b6AMDJcRvcomkOg2GZ9COzrvHKwEA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/lzma-linux-ppc64-gnu@1.4.1': + resolution: {integrity: sha512-UzEkmsgoJ3IOGIRb6kBzNiw+ThUpiighop7dVYfSqlF5juGzwf7YewC57RGn4FoJCvadOCrSm5VikAcgrwVgAw==} + engines: {node: '>= 10'} + cpu: [ppc64] + os: [linux] + + '@napi-rs/lzma-linux-riscv64-gnu@1.4.1': + resolution: {integrity: sha512-9dUKlZ1PdwxTaFF+j3oc+xjlk9nqFwo1NWWOH30uwjl4Rm5Gkv+Fx0pHrzu4kR/iVA+oyQqa9/2uDYnGSTijBA==} + engines: {node: '>= 10'} + cpu: [riscv64] + os: [linux] + + '@napi-rs/lzma-linux-s390x-gnu@1.4.1': + resolution: {integrity: sha512-MOVXUWJSLLCJDCCAlGa39sh7nv9XjvXzCf7QJus7rD8Ciz0mpXNXF9mg0ji7/MZ7pZlKPlXjXDnpVCfFdSEaFQ==} + engines: {node: '>= 10'} + cpu: [s390x] + os: [linux] + + '@napi-rs/lzma-linux-x64-gnu@1.4.1': + resolution: {integrity: sha512-Sxu7aJxU1sDbUTqjqLVDV3DCOAlbsFKvmuCN/S5uXBJd1IF2wJ9jK3NbFzfqTAo5Hudx8Y7kOb6+3K+fYPI1KQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/lzma-linux-x64-musl@1.4.1': + resolution: {integrity: sha512-4I3BeKBQJSE5gF2/VTEv7wCLLjhapeutbCGpZPmDiLHZ74rm9edmNXAlKpdjADQ4YDLJ2GIBzttvwLXkJ9U+cw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/lzma-wasm32-wasi@1.4.1': + resolution: {integrity: sha512-s32HdKqQWbohf6DGWpG9YMODaBdbKJ++JpNr6Ii7821sKf4h/o+p8IRFTOaWdmdJdllEWlRirnd5crA29VivJQ==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@napi-rs/lzma-win32-arm64-msvc@1.4.1': + resolution: {integrity: sha512-ISz+v7ML5mKnjEZ7Kk4Z1BIn411r/fz3tDy9j5yDnwQI0MgTsUQFrIQElGUpULWYs2aYc6EZ9PhECbLBfSjh7A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@napi-rs/lzma-win32-ia32-msvc@1.4.1': + resolution: {integrity: sha512-3WKuCpZBrd7Jrw+h1jSu5XAsRWepMJu0sYuRoA4Y4Cwfu9gI7p5Z5Bc510nfjg7M7xvdpkI4UoW2WY7kBFRYrQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/lzma-win32-x64-msvc@1.4.1': + resolution: {integrity: sha512-0ixRo5z1zFXdh62hlrTV+QCTKHK0te5NHKaExOluhtcc6AdpMmpslvM9JhUxNHI+zM46w/DmmcvcOtqsaTmHgg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/lzma@1.4.1': + resolution: {integrity: sha512-5f8K9NHjwHjZKGm3SS+7CFxXQhz8rbg2umBm/9g0xQRXBdYEI31N5z1ACuk9bmBQOusXAq9CArGfs/ZQso2rUA==} + engines: {node: '>= 10'} + + '@napi-rs/tar-android-arm-eabi@0.1.4': + resolution: {integrity: sha512-LMSysWp5AmZj1NOCB2jshc9KCvp4gm7vm0Cra5U2crMvlj/fwGrvv6+EzSw49y8wCkNEcQ8QaGq5NBQKiLogSg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@napi-rs/tar-android-arm64@0.1.4': + resolution: {integrity: sha512-A/2rl8xr7F5yOtHVARROoSwjRRDNL1RlXCsg/K+RE5/V9iPBojsJsLpFPilp7InF6bi+z7aYn+yWCD6wSwfF4A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@napi-rs/tar-darwin-arm64@0.1.4': + resolution: {integrity: sha512-mnGBswBRtxDqUwXUZx+f9Uuy2uPssxuvcWFTYgUSZqlS2pg/XIWZdHZhbqWqKGpjpZrYcr+42roytbWlZ+epMA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/tar-darwin-x64@0.1.4': + resolution: {integrity: sha512-I81Fvl/cfnFVBET49xywNd57dXLJPO7jqrjD9Z2bKeXA0v0Zt1cwV1IOOTihFZXJv7kgu6EfNB7oumoLOTqq5A==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/tar-freebsd-x64@0.1.4': + resolution: {integrity: sha512-p5OFr3MqidZHkt9bHV2FgeS6k06g+s0GR2kvj/wm2mIxr7u3/sj3+RTr7GHz5DQq08T7uH85HhsrGYWN3vxmSg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/tar-linux-arm-gnueabihf@0.1.4': + resolution: {integrity: sha512-POp2zb/Yuw6taEmrTlEoQI5S+2HmgfV1VtqGQZgRmCa85NlWLDsR6vbW9euu/6NbLj3ld15cCeJC2oJkv9k/xg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@napi-rs/tar-linux-arm64-gnu@0.1.4': + resolution: {integrity: sha512-TV+2AppSgJx5U9nk1C9bh1afWcBVnnANJ4SmtqUF6ediHcDS2rLebeI8BGljfnX9F149qbT9gOGN+R8tofpCsg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/tar-linux-arm64-musl@0.1.4': + resolution: {integrity: sha512-UFBvKpYmuQRbgmXuSSPb8mRjq4JRZLYJhqwrWWnlfQP13xK2WB7mL2GhewBgynSH4YKDm6biKhK6U5RrSWEDgw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/tar-linux-ppc64-gnu@0.1.4': + resolution: {integrity: sha512-HT+h6Wv51SKXqks8UBF+KVuNJ09fM1GyO+SvCnDB5MF66tGiI2C6/MSX69zf1ZeqjACds1K/UwKiZCmE76/j9A==} + engines: {node: '>= 10'} + cpu: [ppc64] + os: [linux] - '@noble/hashes@1.5.0': - resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} - engines: {node: ^14.21.3 || >=16} + '@napi-rs/tar-linux-s390x-gnu@0.1.4': + resolution: {integrity: sha512-SJ+HSr281Y6cgJrQ4nkYbXaTHAmTLv/FZm5k9ZRA6Khml//ZoWi7CiT8dnPeD4QxYwCzAFA4aYMUOQJM/mk2/w==} + engines: {node: '>= 10'} + cpu: [s390x] + os: [linux] + + '@napi-rs/tar-linux-x64-gnu@0.1.4': + resolution: {integrity: sha512-LrF0lRFiFOkO40jfgTdF8dRTvYOLV52fdZ/YnJuBodNcxqEl9rChO3v5Uag//sy0me85FjqtobQNRQP8Nd80dA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/tar-linux-x64-musl@0.1.4': + resolution: {integrity: sha512-etGUWbs+Tk1PtzgyWrVzXa2fQrHNKSc/whHm+4x1Num8Oz+wGdjCDTUktYxAVy33PKZhdblVxxE83QXxkgjneQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/tar-wasm32-wasi@0.1.4': + resolution: {integrity: sha512-mANkm93AKy+OspkOBAC5WI64SopXT0VawdTjpeGW1OgyUSJWdUB5rhs3I7B/HW1bi5tsUoZOZQe3rVgYdfzA6g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@napi-rs/tar-win32-arm64-msvc@0.1.4': + resolution: {integrity: sha512-/5/gp6WR9b36CysJDe8AdyjNeje+NqCniYJz/AZc+UvpKwG8MG9nS6TMpJ9IgrQacJXvc4lWXxYyn6uuPQVvaQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@napi-rs/tar-win32-ia32-msvc@0.1.4': + resolution: {integrity: sha512-HnQi0op9BqJqPekKXhEAI1TWkLtavxKDBDGXNhUSm2//jriMeRykahUcKoUUxr1UGrmtxpc5dx0cThBt13paEw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/tar-win32-x64-msvc@0.1.4': + resolution: {integrity: sha512-vy2ebEXerblni6XOgi3a27+CnI6PdQ9Phy/ru5HM4bVd/oulAJohmynAmBAB1AmXg1NLbAEWu43nATEDp5O2hA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/tar@0.1.4': + resolution: {integrity: sha512-hDsvmMZY8tl2CcLfjnTeE1o5W1eGTSL+ZIX8YEybtcJwA+Cc8SNHb7l6JqMnGcjOrWBZbHt8tzTN+W7qHS5Wmg==} + engines: {node: '>= 10'} + + '@napi-rs/wasm-runtime@0.2.4': + resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} + + '@napi-rs/wasm-tools-android-arm-eabi@0.0.2': + resolution: {integrity: sha512-/b+UU3suXjW4P0DzHRNdrnebQtFKcQf/YMeZJH+xUlKgvwli5kbmWjx8Wqqz0VETVkUTuPqJMBDIVLyc+14FGw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@napi-rs/wasm-tools-android-arm64@0.0.2': + resolution: {integrity: sha512-j57GbDflwJdZtT8pZj5fOV4JAP+LdKN+wzsUYs+QRUoBqpWbbUANudolqfw63bkS9sD4z7fbCuz8iwtJqzxTVA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@napi-rs/wasm-tools-darwin-arm64@0.0.2': + resolution: {integrity: sha512-P2ChgWgVuv9GwmbxN89R84KzIImoTqXINteEixUvmkdnhyFiR+I8deNs89Yed+5w8QLC6MEfrtRqLP9YI+NoQA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/wasm-tools-darwin-x64@0.0.2': + resolution: {integrity: sha512-T/kQQ0gt8+wau1Z821PKVAD76QhmwVoLs2CT7Z9tTBs2pJvwSCP0C/kQiQAHcJIMi7A2E9Ab/Mez0BERy50EFA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/wasm-tools-freebsd-x64@0.0.2': + resolution: {integrity: sha512-GnnHu+r5sfzuxC/1J5UMF/h3BOZnHb3NQZ5hmbCfZYCKzpzRxrAJhzRunlbRN+v0x8M/49dztVTYR3s7K4ooAw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.2': + resolution: {integrity: sha512-KnZdLT0OnKb1CG2kdt3/WvM43vr9i+FEwXCvSOVC/6Tsifz7ynhMg7LAVESILd03HubzQJfg9nbRsk0bQ+IOwg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/wasm-tools-linux-arm64-musl@0.0.2': + resolution: {integrity: sha512-HkpZOID2U8P6pWqK3mqZ8bxU5xcuT3iA2fO+jrxn78h006iYgfNmdc5JaVhHnHazMmk32xKhSV4iV0VUh8UWDg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@napi-rs/wasm-tools-linux-x64-gnu@0.0.2': + resolution: {integrity: sha512-YksJWBCyOalB9ogtP9+/dZKP+vR6+h7BmzMXaXMT71WW/GvIsifMVgv+DY/FRSNJQupp5Y+ugjqVAOUOc/G65g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/wasm-tools-linux-x64-musl@0.0.2': + resolution: {integrity: sha512-sPtRxPMdw05KdTcxgSPMmSXG2+PiK3vJ/l2+g9hvjnnKtvslJN2Hr7j8zgzuoKRAUFPaJVe6+D2xVh5cpdqhww==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@napi-rs/wasm-tools-wasm32-wasi@0.0.2': + resolution: {integrity: sha512-muRvZK7AIuo88G2AxYx3gA59rHMQgoN004saQkBvXnz3K/DVHKfTZ6TtUebss8zI3dURU6xExL8drxFWYxjEbQ==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.2': + resolution: {integrity: sha512-Cn13WQ+tpFqdVwx0DIWKbsI9auFyzVZV4F5UNOUeDt6GgOL+NndgJul0Pc9bSU6fi03AylMPfF/nTCaDWO2Wgw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.2': + resolution: {integrity: sha512-xsg5DkIQi82a8rcx6246Y3XC8TIqHamY+/C6sIlPLaZEuHctDkMECAw0AANwRf5vN//D2oo2oljOuoYtB1GOKw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/wasm-tools-win32-x64-msvc@0.0.2': + resolution: {integrity: sha512-yHigltEt33eq8bappvKsIliz4MxfMPn1M+NWbIFRWN+IS1Z57mhmc1osuk+IRXrSlq0Tom0R6MYN1jpkZKz81Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/wasm-tools@0.0.2': + resolution: {integrity: sha512-kBvDQCP5BLw2TxTENXLp3Of7vVEx0uyIye824JHE4dduzzOHVgSoOFVhVqAT3Fx/hLV445RVWfEqQbXMg4w/Mw==} + engines: {node: '>= 10'} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -201,71 +580,105 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@scure/base@1.1.8': - resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} + '@octokit/auth-token@5.1.1': + resolution: {integrity: sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==} + engines: {node: '>= 18'} + + '@octokit/core@6.1.2': + resolution: {integrity: sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==} + engines: {node: '>= 18'} + + '@octokit/endpoint@10.1.1': + resolution: {integrity: sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==} + engines: {node: '>= 18'} - '@scure/bip32@1.4.0': - resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + '@octokit/graphql@8.1.1': + resolution: {integrity: sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==} + engines: {node: '>= 18'} - '@scure/bip32@1.5.0': - resolution: {integrity: sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==} + '@octokit/openapi-types@22.2.0': + resolution: {integrity: sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==} - '@scure/bip39@1.4.0': - resolution: {integrity: sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==} + '@octokit/plugin-paginate-rest@11.3.3': + resolution: {integrity: sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/plugin-request-log@5.3.1': + resolution: {integrity: sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/plugin-rest-endpoint-methods@13.2.4': + resolution: {integrity: sha512-gusyAVgTrPiuXOdfqOySMDztQHv6928PQ3E4dqVGEtOvRXAKRbJR4b1zQyniIT9waqaWk/UDaoJ2dyPr7Bk7Iw==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '>=6' + + '@octokit/request-error@6.1.5': + resolution: {integrity: sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==} + engines: {node: '>= 18'} + + '@octokit/request@9.1.3': + resolution: {integrity: sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==} + engines: {node: '>= 18'} + + '@octokit/rest@21.0.2': + resolution: {integrity: sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==} + engines: {node: '>= 18'} - '@types/detect-port@1.3.5': - resolution: {integrity: sha512-Rf3/lB9WkDfIL9eEKaSYKc+1L/rNVYBjThk22JTqQw0YozXarX8YljFAz+HCoC6h4B4KwCMsBPZHaFezwT4BNA==} + '@octokit/types@13.5.1': + resolution: {integrity: sha512-F41lGiWBKPIWPBgjSvaDXTTQptBujnozENAK3S//nj7xsFdYdirImKlBB/hTjr+Vii68SM+8jG3UJWRa6DMuDA==} + + '@tybys/wasm-util@0.9.0': + resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.5.2': - resolution: {integrity: sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==} + '@types/node@22.7.3': + resolution: {integrity: sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - abitype@0.0.0-canary-20240628164201: - resolution: {integrity: sha512-nF6VuB7Ps43OSvVuT+1zHGkYBRet+jyBp20Qdixl3qO3ae6HbkGOLiuVXm20vmkICzIwqrmZ9uVBWF9/1LqgeA==} - peerDependencies: - typescript: '>=5.0.4' - zod: ^3 >=3.22.0 - peerDependenciesMeta: - typescript: - optional: true - zod: - optional: true - - abitype@1.0.5: - resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} - peerDependencies: - typescript: '>=5.0.4' - zod: ^3 >=3.22.0 - peerDependenciesMeta: - typescript: - optional: true - zod: - optional: true - - address@1.2.2: - resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} - engines: {node: '>= 10.0.0'} + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + before-after-hook@3.0.2: + resolution: {integrity: sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -281,8 +694,24 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cive@0.4.0: - resolution: {integrity: sha512-3h+ru+NAVuz0jQbG2PspJo90dIjcJ6uuKf0phvZ6om+EDisYSZs5oPPWpt8F+1Yh8XnGAmkMIo/HnIZzy3YYnw==} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + clipanion@3.2.1: + resolution: {integrity: sha512-dYFdjLb7y1ajfxQopN05mylEpK9ZX0sO1/RfMXdfmwjlIsPkbh4p7A682x++zFPLDCo1x3p82dtljHf5cW2LKA==} + peerDependencies: + typanion: '*' + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -300,15 +729,13 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} - detect-port@1.6.1: - resolution: {integrity: sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==} - engines: {node: '>= 4.0.0'} - hasBin: true - dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -370,10 +797,18 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} + inquirer@10.2.2: + resolution: {integrity: sha512-tyao/4Vo36XnUItZ7DnUXX4f1jVao2mSrleV/5IPtW/XAEA26hRVsbc68nuTEKWcr5vMP/1mVoT2O7u8H4v1Vg==} + engines: {node: '>=18'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -393,15 +828,14 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isows@1.0.4: - resolution: {integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==} - peerDependencies: - ws: '*' - js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -409,6 +843,9 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} @@ -430,6 +867,10 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -505,9 +946,16 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -541,6 +989,10 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -561,51 +1013,53 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + toml@3.0.0: + resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} + + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + typanion@3.14.0: + resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + universal-user-agent@7.0.2: + resolution: {integrity: sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - viem@2.21.8: - resolution: {integrity: sha512-j85Z8pfgcAA7HLtLOd7k7mdyw1ogUjyCxrmwyxzlcAPE8+u8O8GySUMgOxNW/n9mazO2R8XpZ+9nUoXgesAn/g==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - - webauthn-p256@0.0.5: - resolution: {integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==} + wasm-sjlj@1.0.5: + resolution: {integrity: sha512-Z/MHJeOkAvJJVWnGX3/YZGYldGaawZbYHX4ldYG9kLhcdB8H31F5x66M7Zc4BP/7pg0aLsusQj1629m2B3Rilg==} which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} -snapshots: + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} - '@adraffy/ens-normalize@1.10.0': {} +snapshots: '@babel/runtime@7.25.6': dependencies: @@ -790,6 +1244,122 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 + '@emnapi/core@1.2.0': + dependencies: + '@emnapi/wasi-threads': 1.0.1 + tslib: 2.7.0 + optional: true + + '@emnapi/runtime@1.2.0': + dependencies: + tslib: 2.7.0 + optional: true + + '@emnapi/wasi-threads@1.0.1': + dependencies: + tslib: 2.7.0 + optional: true + + '@inquirer/checkbox@2.5.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.6 + '@inquirer/type': 1.5.5 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/confirm@3.2.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + + '@inquirer/core@9.2.1': + dependencies: + '@inquirer/figures': 1.0.6 + '@inquirer/type': 2.0.0 + '@types/mute-stream': 0.0.4 + '@types/node': 22.7.3 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 1.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + + '@inquirer/editor@2.2.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + external-editor: 3.1.0 + + '@inquirer/expand@2.3.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + yoctocolors-cjs: 2.1.2 + + '@inquirer/figures@1.0.6': {} + + '@inquirer/input@2.3.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + + '@inquirer/number@1.1.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + + '@inquirer/password@2.2.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + ansi-escapes: 4.3.2 + + '@inquirer/prompts@5.5.0': + dependencies: + '@inquirer/checkbox': 2.5.0 + '@inquirer/confirm': 3.2.0 + '@inquirer/editor': 2.2.0 + '@inquirer/expand': 2.3.0 + '@inquirer/input': 2.3.0 + '@inquirer/number': 1.1.0 + '@inquirer/password': 2.2.0 + '@inquirer/rawlist': 2.3.0 + '@inquirer/search': 1.1.0 + '@inquirer/select': 2.5.0 + + '@inquirer/rawlist@2.3.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 + yoctocolors-cjs: 2.1.2 + + '@inquirer/search@1.1.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.6 + '@inquirer/type': 1.5.5 + yoctocolors-cjs: 2.1.2 + + '@inquirer/select@2.5.0': + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/figures': 1.0.6 + '@inquirer/type': 1.5.5 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/type@1.5.5': + dependencies: + mute-stream: 1.0.0 + + '@inquirer/type@2.0.0': + dependencies: + mute-stream: 1.0.0 + '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.25.6 @@ -806,17 +1376,245 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 - '@noble/curves@1.4.0': + '@napi-rs/cli@3.0.0-alpha.62(@emnapi/runtime@1.2.0)': + dependencies: + '@napi-rs/cross-toolchain': 0.0.16 + '@napi-rs/wasm-tools': 0.0.2 + '@octokit/rest': 21.0.2 + clipanion: 3.2.1(typanion@3.14.0) + colorette: 2.0.20 + debug: 4.3.7 + inquirer: 10.2.2 + js-yaml: 4.1.0 + lodash-es: 4.17.21 + semver: 7.6.3 + toml: 3.0.0 + typanion: 3.14.0 + wasm-sjlj: 1.0.5 + optionalDependencies: + '@emnapi/runtime': 1.2.0 + transitivePeerDependencies: + - '@napi-rs/cross-toolchain-arm64-target-aarch64' + - '@napi-rs/cross-toolchain-arm64-target-armv7' + - '@napi-rs/cross-toolchain-arm64-target-x86_64' + - '@napi-rs/cross-toolchain-x64-target-aarch64' + - '@napi-rs/cross-toolchain-x64-target-armv7' + - '@napi-rs/cross-toolchain-x64-target-x86_64' + - supports-color + + '@napi-rs/cross-toolchain@0.0.16': dependencies: - '@noble/hashes': 1.4.0 + '@napi-rs/lzma': 1.4.1 + '@napi-rs/tar': 0.1.4 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + '@napi-rs/lzma-android-arm-eabi@1.4.1': + optional: true + + '@napi-rs/lzma-android-arm64@1.4.1': + optional: true + + '@napi-rs/lzma-darwin-arm64@1.4.1': + optional: true + + '@napi-rs/lzma-darwin-x64@1.4.1': + optional: true + + '@napi-rs/lzma-freebsd-x64@1.4.1': + optional: true + + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.1': + optional: true + + '@napi-rs/lzma-linux-arm64-gnu@1.4.1': + optional: true + + '@napi-rs/lzma-linux-arm64-musl@1.4.1': + optional: true + + '@napi-rs/lzma-linux-ppc64-gnu@1.4.1': + optional: true + + '@napi-rs/lzma-linux-riscv64-gnu@1.4.1': + optional: true + + '@napi-rs/lzma-linux-s390x-gnu@1.4.1': + optional: true + + '@napi-rs/lzma-linux-x64-gnu@1.4.1': + optional: true - '@noble/curves@1.6.0': + '@napi-rs/lzma-linux-x64-musl@1.4.1': + optional: true + + '@napi-rs/lzma-wasm32-wasi@1.4.1': dependencies: - '@noble/hashes': 1.5.0 + '@napi-rs/wasm-runtime': 0.2.4 + optional: true + + '@napi-rs/lzma-win32-arm64-msvc@1.4.1': + optional: true + + '@napi-rs/lzma-win32-ia32-msvc@1.4.1': + optional: true + + '@napi-rs/lzma-win32-x64-msvc@1.4.1': + optional: true + + '@napi-rs/lzma@1.4.1': + optionalDependencies: + '@napi-rs/lzma-android-arm-eabi': 1.4.1 + '@napi-rs/lzma-android-arm64': 1.4.1 + '@napi-rs/lzma-darwin-arm64': 1.4.1 + '@napi-rs/lzma-darwin-x64': 1.4.1 + '@napi-rs/lzma-freebsd-x64': 1.4.1 + '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.1 + '@napi-rs/lzma-linux-arm64-gnu': 1.4.1 + '@napi-rs/lzma-linux-arm64-musl': 1.4.1 + '@napi-rs/lzma-linux-ppc64-gnu': 1.4.1 + '@napi-rs/lzma-linux-riscv64-gnu': 1.4.1 + '@napi-rs/lzma-linux-s390x-gnu': 1.4.1 + '@napi-rs/lzma-linux-x64-gnu': 1.4.1 + '@napi-rs/lzma-linux-x64-musl': 1.4.1 + '@napi-rs/lzma-wasm32-wasi': 1.4.1 + '@napi-rs/lzma-win32-arm64-msvc': 1.4.1 + '@napi-rs/lzma-win32-ia32-msvc': 1.4.1 + '@napi-rs/lzma-win32-x64-msvc': 1.4.1 + + '@napi-rs/tar-android-arm-eabi@0.1.4': + optional: true + + '@napi-rs/tar-android-arm64@0.1.4': + optional: true - '@noble/hashes@1.4.0': {} + '@napi-rs/tar-darwin-arm64@0.1.4': + optional: true + + '@napi-rs/tar-darwin-x64@0.1.4': + optional: true + + '@napi-rs/tar-freebsd-x64@0.1.4': + optional: true + + '@napi-rs/tar-linux-arm-gnueabihf@0.1.4': + optional: true - '@noble/hashes@1.5.0': {} + '@napi-rs/tar-linux-arm64-gnu@0.1.4': + optional: true + + '@napi-rs/tar-linux-arm64-musl@0.1.4': + optional: true + + '@napi-rs/tar-linux-ppc64-gnu@0.1.4': + optional: true + + '@napi-rs/tar-linux-s390x-gnu@0.1.4': + optional: true + + '@napi-rs/tar-linux-x64-gnu@0.1.4': + optional: true + + '@napi-rs/tar-linux-x64-musl@0.1.4': + optional: true + + '@napi-rs/tar-wasm32-wasi@0.1.4': + dependencies: + '@napi-rs/wasm-runtime': 0.2.4 + optional: true + + '@napi-rs/tar-win32-arm64-msvc@0.1.4': + optional: true + + '@napi-rs/tar-win32-ia32-msvc@0.1.4': + optional: true + + '@napi-rs/tar-win32-x64-msvc@0.1.4': + optional: true + + '@napi-rs/tar@0.1.4': + optionalDependencies: + '@napi-rs/tar-android-arm-eabi': 0.1.4 + '@napi-rs/tar-android-arm64': 0.1.4 + '@napi-rs/tar-darwin-arm64': 0.1.4 + '@napi-rs/tar-darwin-x64': 0.1.4 + '@napi-rs/tar-freebsd-x64': 0.1.4 + '@napi-rs/tar-linux-arm-gnueabihf': 0.1.4 + '@napi-rs/tar-linux-arm64-gnu': 0.1.4 + '@napi-rs/tar-linux-arm64-musl': 0.1.4 + '@napi-rs/tar-linux-ppc64-gnu': 0.1.4 + '@napi-rs/tar-linux-s390x-gnu': 0.1.4 + '@napi-rs/tar-linux-x64-gnu': 0.1.4 + '@napi-rs/tar-linux-x64-musl': 0.1.4 + '@napi-rs/tar-wasm32-wasi': 0.1.4 + '@napi-rs/tar-win32-arm64-msvc': 0.1.4 + '@napi-rs/tar-win32-ia32-msvc': 0.1.4 + '@napi-rs/tar-win32-x64-msvc': 0.1.4 + + '@napi-rs/wasm-runtime@0.2.4': + dependencies: + '@emnapi/core': 1.2.0 + '@emnapi/runtime': 1.2.0 + '@tybys/wasm-util': 0.9.0 + optional: true + + '@napi-rs/wasm-tools-android-arm-eabi@0.0.2': + optional: true + + '@napi-rs/wasm-tools-android-arm64@0.0.2': + optional: true + + '@napi-rs/wasm-tools-darwin-arm64@0.0.2': + optional: true + + '@napi-rs/wasm-tools-darwin-x64@0.0.2': + optional: true + + '@napi-rs/wasm-tools-freebsd-x64@0.0.2': + optional: true + + '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.2': + optional: true + + '@napi-rs/wasm-tools-linux-arm64-musl@0.0.2': + optional: true + + '@napi-rs/wasm-tools-linux-x64-gnu@0.0.2': + optional: true + + '@napi-rs/wasm-tools-linux-x64-musl@0.0.2': + optional: true + + '@napi-rs/wasm-tools-wasm32-wasi@0.0.2': + dependencies: + '@napi-rs/wasm-runtime': 0.2.4 + optional: true + + '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.2': + optional: true + + '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.2': + optional: true + + '@napi-rs/wasm-tools-win32-x64-msvc@0.0.2': + optional: true + + '@napi-rs/wasm-tools@0.0.2': + optionalDependencies: + '@napi-rs/wasm-tools-android-arm-eabi': 0.0.2 + '@napi-rs/wasm-tools-android-arm64': 0.0.2 + '@napi-rs/wasm-tools-darwin-arm64': 0.0.2 + '@napi-rs/wasm-tools-darwin-x64': 0.0.2 + '@napi-rs/wasm-tools-freebsd-x64': 0.0.2 + '@napi-rs/wasm-tools-linux-arm64-gnu': 0.0.2 + '@napi-rs/wasm-tools-linux-arm64-musl': 0.0.2 + '@napi-rs/wasm-tools-linux-x64-gnu': 0.0.2 + '@napi-rs/wasm-tools-linux-x64-musl': 0.0.2 + '@napi-rs/wasm-tools-wasm32-wasi': 0.0.2 + '@napi-rs/wasm-tools-win32-arm64-msvc': 0.0.2 + '@napi-rs/wasm-tools-win32-ia32-msvc': 0.0.2 + '@napi-rs/wasm-tools-win32-x64-msvc': 0.0.2 '@nodelib/fs.scandir@2.1.5': dependencies: @@ -830,55 +1628,108 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@scure/base@1.1.8': {} + '@octokit/auth-token@5.1.1': {} + + '@octokit/core@6.1.2': + dependencies: + '@octokit/auth-token': 5.1.1 + '@octokit/graphql': 8.1.1 + '@octokit/request': 9.1.3 + '@octokit/request-error': 6.1.5 + '@octokit/types': 13.5.1 + before-after-hook: 3.0.2 + universal-user-agent: 7.0.2 + + '@octokit/endpoint@10.1.1': + dependencies: + '@octokit/types': 13.5.1 + universal-user-agent: 7.0.2 + + '@octokit/graphql@8.1.1': + dependencies: + '@octokit/request': 9.1.3 + '@octokit/types': 13.5.1 + universal-user-agent: 7.0.2 + + '@octokit/openapi-types@22.2.0': {} + + '@octokit/plugin-paginate-rest@11.3.3(@octokit/core@6.1.2)': + dependencies: + '@octokit/core': 6.1.2 + '@octokit/types': 13.5.1 - '@scure/bip32@1.4.0': + '@octokit/plugin-request-log@5.3.1(@octokit/core@6.1.2)': dependencies: - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@octokit/core': 6.1.2 - '@scure/bip32@1.5.0': + '@octokit/plugin-rest-endpoint-methods@13.2.4(@octokit/core@6.1.2)': dependencies: - '@noble/curves': 1.6.0 - '@noble/hashes': 1.5.0 - '@scure/base': 1.1.8 + '@octokit/core': 6.1.2 + '@octokit/types': 13.5.1 - '@scure/bip39@1.4.0': + '@octokit/request-error@6.1.5': dependencies: - '@noble/hashes': 1.5.0 - '@scure/base': 1.1.8 + '@octokit/types': 13.5.1 - '@types/detect-port@1.3.5': {} + '@octokit/request@9.1.3': + dependencies: + '@octokit/endpoint': 10.1.1 + '@octokit/request-error': 6.1.5 + '@octokit/types': 13.5.1 + universal-user-agent: 7.0.2 + + '@octokit/rest@21.0.2': + dependencies: + '@octokit/core': 6.1.2 + '@octokit/plugin-paginate-rest': 11.3.3(@octokit/core@6.1.2) + '@octokit/plugin-request-log': 5.3.1(@octokit/core@6.1.2) + '@octokit/plugin-rest-endpoint-methods': 13.2.4(@octokit/core@6.1.2) + + '@octokit/types@13.5.1': + dependencies: + '@octokit/openapi-types': 22.2.0 + + '@tybys/wasm-util@0.9.0': + dependencies: + tslib: 2.7.0 + optional: true + + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 22.7.3 '@types/node@12.20.55': {} - '@types/node@22.5.2': + '@types/node@22.7.3': dependencies: undici-types: 6.19.8 '@types/semver@7.5.8': {} - abitype@0.0.0-canary-20240628164201(typescript@5.5.4): - optionalDependencies: - typescript: 5.5.4 - - abitype@1.0.5(typescript@5.5.4): - optionalDependencies: - typescript: 5.5.4 - - address@1.2.2: {} + '@types/wrap-ansi@3.0.0': {} ansi-colors@4.1.3: {} + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + ansi-regex@5.0.1: {} + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 + argparse@2.0.1: {} + array-union@2.1.0: {} + before-after-hook@3.0.2: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -891,19 +1742,19 @@ snapshots: ci-info@3.9.0: {} - cive@0.4.0(typescript@5.5.4): + cli-width@4.1.0: {} + + clipanion@3.2.1(typanion@3.14.0): dependencies: - '@noble/curves': 1.6.0 - '@noble/hashes': 1.5.0 - '@scure/bip32': 1.5.0 - '@scure/bip39': 1.4.0 - abitype: 0.0.0-canary-20240628164201(typescript@5.5.4) - viem: 2.21.8(typescript@5.5.4) - transitivePeerDependencies: - - bufferutil - - typescript - - utf-8-validate - - zod + typanion: 3.14.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + colorette@2.0.20: {} cross-spawn@5.1.0: dependencies: @@ -917,17 +1768,12 @@ snapshots: detect-indent@6.1.0: {} - detect-port@1.6.1: - dependencies: - address: 1.2.2 - debug: 4.3.7 - transitivePeerDependencies: - - supports-color - dir-glob@3.0.1: dependencies: path-type: 4.0.0 + emoji-regex@8.0.0: {} + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -999,8 +1845,21 @@ snapshots: ignore@5.3.2: {} + inquirer@10.2.2: + dependencies: + '@inquirer/core': 9.2.1 + '@inquirer/prompts': 5.5.0 + '@inquirer/type': 1.5.5 + '@types/mute-stream': 0.0.4 + ansi-escapes: 4.3.2 + mute-stream: 1.0.0 + run-async: 3.0.0 + rxjs: 7.8.1 + is-extglob@2.1.1: {} + is-fullwidth-code-point@3.0.0: {} + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -1015,15 +1874,15 @@ snapshots: isexe@2.0.0: {} - isows@1.0.4(ws@8.17.1): - dependencies: - ws: 8.17.1 - js-yaml@3.14.1: dependencies: argparse: 1.0.10 esprima: 4.0.1 + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -1032,6 +1891,8 @@ snapshots: dependencies: p-locate: 4.1.0 + lodash-es@4.17.21: {} + lodash.startcase@4.4.0: {} lru-cache@4.1.5: @@ -1050,6 +1911,8 @@ snapshots: ms@2.1.3: {} + mute-stream@1.0.0: {} + os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -1101,10 +1964,16 @@ snapshots: reusify@1.0.4: {} + run-async@3.0.0: {} + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 + rxjs@7.8.1: + dependencies: + tslib: 2.7.0 + safer-buffer@2.1.2: {} semver@7.6.3: {} @@ -1128,6 +1997,12 @@ snapshots: sprintf-js@1.0.3: {} + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -1144,39 +2019,34 @@ snapshots: dependencies: is-number: 7.0.0 - typescript@5.5.4: {} + toml@3.0.0: {} + + tslib@2.7.0: {} + + typanion@3.14.0: {} + + type-fest@0.21.3: {} + + typescript@5.6.2: {} undici-types@6.19.8: {} - universalify@0.1.2: {} + universal-user-agent@7.0.2: {} - viem@2.21.8(typescript@5.5.4): - dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 - '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.5.4) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod + universalify@0.1.2: {} - webauthn-p256@0.0.5: - dependencies: - '@noble/curves': 1.6.0 - '@noble/hashes': 1.5.0 + wasm-sjlj@1.0.5: {} which@1.3.1: dependencies: isexe: 2.0.0 - ws@8.17.1: {} + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 yallist@2.1.2: {} + + yoctocolors-cjs@2.1.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ccdc80c..304f6db 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ packages: - - "packages/*" \ No newline at end of file + - "npm/*" \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..b196eaa --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +tab_spaces = 2 diff --git a/simple-test.js b/simple-test.js new file mode 100644 index 0000000..fb76fb9 --- /dev/null +++ b/simple-test.js @@ -0,0 +1,5 @@ +const { plus100 } = require('./index') + +console.assert(plus100(0) === 100, 'Simple test failed') + +console.info('Simple test passed') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..c01cf9e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,8 @@ +#![deny(clippy::all)] + +use napi_derive::napi; + +#[napi] +pub fn plus_100(input: u32) -> u32 { + input + 100 +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..550951b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ESNext", + "strict": true, + "moduleResolution": "node", + "module": "CommonJS", + "noUnusedLocals": true, + "noUnusedParameters": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + }, + "include": ["."], + "exclude": ["node_modules", "benchmark", "__test__"] +} From 110aa25a58badd42f2ca1ee9c51748e9cc0b418b Mon Sep 17 00:00:00 2001 From: iosh Date: Sat, 28 Sep 2024 14:42:10 +0800 Subject: [PATCH 2/4] chore: up --- Cargo.toml | 6 +++++- src/lib.rs | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0ee9023..7299826 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,13 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] +cfxcore = { git = "https://github.com/Conflux-Chain/conflux-rust.git" } napi = "2" napi-derive = "2" - +client = { git = "https://github.com/Conflux-Chain/conflux-rust.git", package = "client" } +chrono = "0.4.38" +parking_lot = "0.11" +log = "0.4" [build-dependencies] napi-build = "2" diff --git a/src/lib.rs b/src/lib.rs index c01cf9e..9293415 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,58 @@ #![deny(clippy::all)] +use napi::Error; use napi_derive::napi; +use cfxcore::NodeType; +use client::{ + archive::ArchiveClient, + common::{shutdown_handler, ClientTrait}, + configuration::{Configuration, RawConfiguration}, + full::FullClient, + light::LightClient, +}; +use log::{info, LevelFilter}; +use parking_lot::{Condvar, Mutex}; +use std::sync::Arc; + #[napi] -pub fn plus_100(input: u32) -> u32 { - input + 100 +pub fn run_node() -> Result<(), napi::Error> { + let mut conf = Configuration::default(); + let exit = Arc::new((Mutex::new(false), Condvar::new())); + + let client_handle: Box; + client_handle = match conf.node_type() { + NodeType::Archive => { + info!("Starting archive client..."); + ArchiveClient::start(conf, exit.clone()).map_err(|e| { + Error::new( + napi::Status::Unknown, + format!("failed to start archive client: {}", e), + ) + })? + } + NodeType::Full => { + info!("Starting full client..."); + FullClient::start(conf, exit.clone()).map_err(|e| { + Error::new( + napi::Status::Unknown, + format!("failed to start full client: {}", e), + ) + })? + } + NodeType::Light => { + info!("Starting light client..."); + LightClient::start(conf, exit.clone()).map_err(|e| { + Error::new( + napi::Status::Unknown, + format!("failed to start light client: {}", e), + ) + })? + } + NodeType::Unknown => return Err(Error::new(napi::Status::InvalidArg, "Unknown node type")), + }; + info!("Conflux client started"); + shutdown_handler::run(client_handle, exit); + + Ok(()) } From 2ef0268b3bc2d2f8cf67c7022b7e21c9933cc54b Mon Sep 17 00:00:00 2001 From: iosh Date: Sat, 28 Sep 2024 22:30:15 +0800 Subject: [PATCH 3/4] chore: uo --- .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .gitignore | 5 ++++- Cargo.toml | 2 +- src/lib.rs | 26 ++++++++++++++++++-------- 4 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7cb0576 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "features": { + "ghcr.io/devcontainers/features/rust:1": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "pnpm install && sudo apt update &&sudo apt install clang libsqlite3-dev pkg-config libssl-dev cmake -y" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.gitignore b/.gitignore index ede1b13..7564bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -196,4 +196,7 @@ Temporary Items ### generated by napi ## conflux.d.ts -conflux.js \ No newline at end of file +conflux.js + +## pnpm ## +.pnpm-store \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 7299826..6d5a0ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["cdylib"] cfxcore = { git = "https://github.com/Conflux-Chain/conflux-rust.git" } napi = "2" napi-derive = "2" -client = { git = "https://github.com/Conflux-Chain/conflux-rust.git", package = "client" } +client = { git = "https://github.com/Conflux-Chain/conflux-rust.git" } chrono = "0.4.38" parking_lot = "0.11" log = "0.4" diff --git a/src/lib.rs b/src/lib.rs index 9293415..aa6587a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,24 +7,28 @@ use cfxcore::NodeType; use client::{ archive::ArchiveClient, common::{shutdown_handler, ClientTrait}, - configuration::{Configuration, RawConfiguration}, + configuration::Configuration, full::FullClient, light::LightClient, }; -use log::{info, LevelFilter}; +use log::info; use parking_lot::{Condvar, Mutex}; -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; + +static EXIT_SIGN: LazyLock, Condvar)>> = + LazyLock::new(|| Arc::new((Mutex::new(false), Condvar::new()))); #[napi] pub fn run_node() -> Result<(), napi::Error> { let mut conf = Configuration::default(); - let exit = Arc::new((Mutex::new(false), Condvar::new())); + conf.raw_conf.node_type = Some(NodeType::Full); + conf.raw_conf.mode = Some("dev".to_string()); let client_handle: Box; client_handle = match conf.node_type() { NodeType::Archive => { info!("Starting archive client..."); - ArchiveClient::start(conf, exit.clone()).map_err(|e| { + ArchiveClient::start(conf, EXIT_SIGN.clone()).map_err(|e| { Error::new( napi::Status::Unknown, format!("failed to start archive client: {}", e), @@ -33,7 +37,7 @@ pub fn run_node() -> Result<(), napi::Error> { } NodeType::Full => { info!("Starting full client..."); - FullClient::start(conf, exit.clone()).map_err(|e| { + FullClient::start(conf, EXIT_SIGN.clone()).map_err(|e| { Error::new( napi::Status::Unknown, format!("failed to start full client: {}", e), @@ -42,7 +46,7 @@ pub fn run_node() -> Result<(), napi::Error> { } NodeType::Light => { info!("Starting light client..."); - LightClient::start(conf, exit.clone()).map_err(|e| { + LightClient::start(conf, EXIT_SIGN.clone()).map_err(|e| { Error::new( napi::Status::Unknown, format!("failed to start light client: {}", e), @@ -52,7 +56,13 @@ pub fn run_node() -> Result<(), napi::Error> { NodeType::Unknown => return Err(Error::new(napi::Status::InvalidArg, "Unknown node type")), }; info!("Conflux client started"); - shutdown_handler::run(client_handle, exit); + shutdown_handler::run(client_handle, EXIT_SIGN.clone()); Ok(()) } + +#[napi] +pub fn stop_node() { + *EXIT_SIGN.0.lock() = true; + EXIT_SIGN.1.notify_all(); +} From 312d64d0e71a5b88581664f852ab72db629c6bf7 Mon Sep 17 00:00:00 2001 From: iosh Date: Sun, 29 Sep 2024 10:46:06 +0800 Subject: [PATCH 4/4] chore: up --- .devcontainer/devcontainer.json | 25 ------------------------- .github/workflows/CI.yml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 7cb0576..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node -{ - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", - "features": { - "ghcr.io/devcontainers/features/rust:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pnpm install && sudo apt update &&sudo apt install clang libsqlite3-dev pkg-config libssl-dev cmake -y" - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 25c261e..a4acf45 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -79,6 +79,20 @@ jobs: run: ${{ matrix.settings.setup }} if: ${{ matrix.settings.setup }} shell: bash + - name: Install Linux dependencies + if : ${{matrix.settings.host == 'ubuntu-latest'}} + run: | + sudo apt-get update + sudo apt-get install -y clang libsqlite3-dev pkg-config libssl-dev cmake + - name: Install macos dependencies + if: ${{matrix.settings.host == 'macos-latest'}} + run: | + brew update + brew install llvm openssl pkg-config cmake + - name: Install windows dependencies + if: ${{matrix.settings.host == 'windows-latest'}} + run: | + choco install -y llvm - name: Install dependencies run: pnpm install - name: Build