From c386a0c3cdf115582fa8cb6ddbe838f9259d6954 Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 15:01:30 -0300 Subject: [PATCH 1/8] added initial changes --- .gitignore | 2 + apps/test-app/App.tsx | 16 +- apps/test-app/babel.config.js | 4 +- apps/test-app/react-native.config.js | 3 +- biome.json | 38 + eslint.config.js | 49 - package-lock.json | 2668 ++++++++++------- package.json | 10 +- packages/cmake-rn/src/cli.ts | 71 +- packages/cmake-rn/src/headers.ts | 12 +- packages/cmake-rn/src/platforms.test.ts | 7 +- packages/cmake-rn/src/platforms.ts | 6 +- packages/cmake-rn/src/platforms/android.ts | 33 +- packages/cmake-rn/src/platforms/apple.ts | 28 +- packages/cmake-rn/src/platforms/types.ts | 10 +- packages/cmake-rn/src/run.ts | 1 + packages/cmake-rn/src/weak-node-api.ts | 15 +- packages/ferric-example/.gitignore | 10 - packages/ferric-example/Cargo.toml | 25 - packages/ferric-example/build.rs | 3 - packages/ferric-example/package.json | 21 - packages/ferric-example/src/lib.rs | 6 - packages/ferric/README.md | 16 +- packages/ferric/__tests__/build.test.ts | 7 + packages/ferric/__tests__/generate.test.ts | 7 + packages/ferric/package.json | 18 +- packages/ferric/src/banner.ts | 2 +- packages/ferric/src/build.ts | 96 +- packages/ferric/src/cargo.ts | 37 +- packages/ferric/src/errors.ts | 4 +- packages/ferric/src/generate.ts | 0 packages/ferric/src/napi-rs.ts | 8 +- packages/ferric/src/rustup.ts | 6 +- packages/ferric/src/targets.ts | 12 +- packages/ferric/src/templates.ts | 58 + packages/gyp-to-cmake/src/cli.ts | 11 +- packages/gyp-to-cmake/src/gyp.test.ts | 4 +- packages/gyp-to-cmake/src/gyp.ts | 14 +- packages/gyp-to-cmake/src/run.ts | 1 + packages/gyp-to-cmake/src/transformer.test.ts | 8 +- packages/gyp-to-cmake/src/transformer.ts | 4 +- .../generate-weak-node-api-injector.ts | 6 +- .../host/scripts/generate-weak-node-api.ts | 6 +- packages/host/scripts/node-api-functions.ts | 22 +- .../host/src/node/babel-plugin/plugin.test.ts | 17 +- packages/host/src/node/babel-plugin/plugin.ts | 18 +- packages/host/src/node/cli/android.ts | 4 +- packages/host/src/node/cli/apple.ts | 31 +- packages/host/src/node/cli/hermes.ts | 22 +- packages/host/src/node/cli/link-modules.ts | 28 +- packages/host/src/node/cli/options.ts | 2 +- packages/host/src/node/cli/program.ts | 47 +- packages/host/src/node/cli/run.ts | 1 + packages/host/src/node/index.ts | 29 +- packages/host/src/node/path-utils.test.ts | 54 +- packages/host/src/node/path-utils.ts | 76 +- packages/host/src/node/prebuilds/android.ts | 7 +- packages/host/src/node/prebuilds/apple.ts | 21 +- packages/host/src/node/prebuilds/triplets.ts | 6 +- packages/host/src/node/test-utils.ts | 6 +- packages/host/src/node/weak-node-api.ts | 2 +- .../scripts/build-examples.mts | 2 +- .../scripts/copy-examples.mts | 8 +- .../scripts/verify-prebuilds.mts | 20 +- packages/node-addon-examples/src/index.ts | 27 +- .../node-addon-examples/tests/async/addon.js | 4 +- .../tests/buffers/addon.js | 7 +- 67 files changed, 2112 insertions(+), 1712 deletions(-) create mode 100644 biome.json delete mode 100644 eslint.config.js delete mode 100644 packages/ferric-example/.gitignore delete mode 100644 packages/ferric-example/Cargo.toml delete mode 100644 packages/ferric-example/build.rs delete mode 100644 packages/ferric-example/package.json delete mode 100644 packages/ferric-example/src/lib.rs create mode 100644 packages/ferric/__tests__/build.test.ts create mode 100644 packages/ferric/__tests__/generate.test.ts create mode 100644 packages/ferric/src/generate.ts create mode 100644 packages/ferric/src/templates.ts diff --git a/.gitignore b/.gitignore index 42f6c1a8..a3325135 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ node_modules/ dist/ *.tsbuildinfo + +TODO.md diff --git a/apps/test-app/App.tsx b/apps/test-app/App.tsx index 27fca38e..77fc5513 100644 --- a/apps/test-app/App.tsx +++ b/apps/test-app/App.tsx @@ -1,19 +1,18 @@ -import React from "react"; -import { StyleSheet, View, SafeAreaView } from "react-native"; - +import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples"; import { - MochaRemoteProvider, ConnectionText, + MochaRemoteProvider, StatusEmoji, StatusText, } from "mocha-remote-react-native"; - -import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples"; +// biome-ignore lint/correctness/noUnusedImports: Keep React +import React from "react"; +import { SafeAreaView, StyleSheet, View } from "react-native"; function describeIf( condition: boolean, title: string, - fn: (this: Mocha.Suite) => void + fn: (this: Mocha.Suite) => void, ) { return condition ? describe(title, fn) : describe.skip(title, fn); } @@ -31,7 +30,7 @@ function loadTests({ }: Context) { describeIf(nodeAddonExamples, "Node Addon Examples", () => { for (const [suiteName, examples] of Object.entries( - nodeAddonExamplesSuites + nodeAddonExamplesSuites, )) { describe(suiteName, () => { for (const [exampleName, requireExample] of Object.entries(examples)) { @@ -48,7 +47,6 @@ function loadTests({ describeIf(ferricExample, "ferric-example", () => { it("exports a callable sum function", () => { - /* eslint-disable-next-line @typescript-eslint/no-require-imports -- TODO: Determine why a dynamic import doesn't work on Android */ const exampleAddon = require("ferric-example"); const result = exampleAddon.sum(1, 3); if (result !== 4) { diff --git a/apps/test-app/babel.config.js b/apps/test-app/babel.config.js index 175e8359..8ea846e2 100644 --- a/apps/test-app/babel.config.js +++ b/apps/test-app/babel.config.js @@ -1,5 +1,5 @@ module.exports = { - presets: ['module:@react-native/babel-preset'], + presets: ["module:@react-native/babel-preset"], // plugins: [['module:react-native-node-api/babel-plugin', { stripPathSuffix: true }]], - plugins: ['module:react-native-node-api/babel-plugin'], + plugins: ["module:react-native-node-api/babel-plugin"], }; diff --git a/apps/test-app/react-native.config.js b/apps/test-app/react-native.config.js index e15e25b5..dab1d107 100644 --- a/apps/test-app/react-native.config.js +++ b/apps/test-app/react-native.config.js @@ -1,4 +1,3 @@ - const project = (() => { try { const { configureProjects } = require("react-native-test-app"); @@ -25,4 +24,4 @@ const project = (() => { module.exports = { ...(project ? { project } : undefined), -}; \ No newline at end of file +}; diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..8e3f3c2c --- /dev/null +++ b/biome.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.1.2/schema.json", + "assist": { + "actions": { + "source": { + "organizeImports": "on" + } + }, + "enabled": true + }, + "files": { + "ignoreUnknown": false, + "includes": [ + "**", + "!node_modules", + "!.nx/**", + "!**/dist/**", + "!apps/test-app/ios/**", + "!packages/host/hermes/**", + "!packages/node-addon-examples/examples/**" + ] + }, + "formatter": { + "enabled": true, + "indentStyle": "space" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "vcs": { + "clientKind": "git", + "enabled": false, + "useIgnoreFile": false + } +} diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 360cbeaf..00000000 --- a/eslint.config.js +++ /dev/null @@ -1,49 +0,0 @@ -// @ts-check - -import { globalIgnores } from "eslint/config"; -import globals from "globals"; -import eslint from '@eslint/js'; -import tseslint from 'typescript-eslint'; - -export default tseslint.config( - globalIgnores([".nx/**"]), - globalIgnores(["**/dist/**"]), - globalIgnores(["apps/test-app/ios/**"]), - globalIgnores(["packages/host/hermes/**"]), - globalIgnores(["packages/node-addon-examples/examples/**"]), - globalIgnores(["packages/ferric-example/ferric_example.d.ts"]), - eslint.configs.recommended, - tseslint.configs.recommended, - { - files: [ - "apps/test-app/*.js", - "packages/node-addon-examples/*.js", - "packages/host/babel-plugin.js", - "packages/host/react-native.config.js" - ], - languageOptions: { - parserOptions: { - sourceType: "commonjs", - }, - globals: { - ...globals.commonjs, - }, - }, - rules: { - // We're using CommonJS here for Node.js backwards compatibility - "@typescript-eslint/no-require-imports": "off", - }, - }, - { - files: [ - "packages/gyp-to-cmake/bin/*.js", - "packages/host/bin/*.mjs", - "packages/host/scripts/*.mjs" - ], - languageOptions: { - globals: { - ...globals.node, - }, - }, - }, -); diff --git a/package-lock.json b/package-lock.json index 2a680b79..e656a64a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,18 +16,16 @@ "packages/ferric-example" ], "devDependencies": { + "@biomejs/biome": "^2.1.2", "@changesets/cli": "^2.29.5", - "@eslint/js": "^9.19.0", "@reporters/github": "^1.7.2", "@tsconfig/node22": "^22.0.0", "@tsconfig/react-native": "3.0.5", "@types/node": "^22.13.0", - "eslint": "^9.19.0", "globals": "^16.0.0", "react-native": "0.79.5", "tsx": "^4.19.3", - "typescript": "^5.7.3", - "typescript-eslint": "^8.22.0" + "typescript": "^5.7.3" } }, "apps/test-app": { @@ -2080,6 +2078,169 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.2.tgz", + "integrity": "sha512-yq8ZZuKuBVDgAS76LWCfFKHSYIAgqkxVB3mGVVpOe2vSkUTs7xG46zXZeNPRNVjiJuw0SZ3+J2rXiYx0RUpfGg==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.1.2", + "@biomejs/cli-darwin-x64": "2.1.2", + "@biomejs/cli-linux-arm64": "2.1.2", + "@biomejs/cli-linux-arm64-musl": "2.1.2", + "@biomejs/cli-linux-x64": "2.1.2", + "@biomejs/cli-linux-x64-musl": "2.1.2", + "@biomejs/cli-win32-arm64": "2.1.2", + "@biomejs/cli-win32-x64": "2.1.2" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.2.tgz", + "integrity": "sha512-leFAks64PEIjc7MY/cLjE8u5OcfBKkcDB0szxsWUB4aDfemBep1WVKt0qrEyqZBOW8LPHzrFMyDl3FhuuA0E7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.2.tgz", + "integrity": "sha512-Nmmv7wRX5Nj7lGmz0FjnWdflJg4zii8Ivruas6PBKzw5SJX/q+Zh2RfnO+bBnuKLXpj8kiI2x2X12otpH6a32A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.2.tgz", + "integrity": "sha512-NWNy2Diocav61HZiv2enTQykbPP/KrA/baS7JsLSojC7Xxh2nl9IczuvE5UID7+ksRy2e7yH7klm/WkA72G1dw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.2.tgz", + "integrity": "sha512-qgHvafhjH7Oca114FdOScmIKf1DlXT1LqbOrrbR30kQDLFPEOpBG0uzx6MhmsrmhGiCFCr2obDamu+czk+X0HQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.2.tgz", + "integrity": "sha512-Km/UYeVowygTjpX6sGBzlizjakLoMQkxWbruVZSNE6osuSI63i4uCeIL+6q2AJlD3dxoiBJX70dn1enjQnQqwA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.2.tgz", + "integrity": "sha512-xlB3mU14ZUa3wzLtXfmk2IMOGL+S0aHFhSix/nssWS/2XlD27q+S6f0dlQ8WOCbYoXcuz8BCM7rCn2lxdTrlQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.2.tgz", + "integrity": "sha512-G8KWZli5ASOXA3yUQgx+M4pZRv3ND16h77UsdunUL17uYpcL/UC7RkWTdkfvMQvogVsAuz5JUcBDjgZHXxlKoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.2.tgz", + "integrity": "sha512-9zajnk59PMpjBkty3bK2IrjUsUHvqe9HWwyAWQBjGLE7MIBjbX2vwv1XPEhmO2RRuGoTkVx3WCanHrjAytICLA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@changesets/apply-release-plan": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.12.tgz", @@ -2474,20 +2635,20 @@ } }, "node_modules/@emnapi/core": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz", - "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.5.tgz", + "integrity": "sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==", "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.0.2", + "@emnapi/wasi-threads": "1.0.4", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", - "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.5.tgz", + "integrity": "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==", "license": "MIT", "optional": true, "dependencies": { @@ -2495,9 +2656,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.2.tgz", - "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.4.tgz", + "integrity": "sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==", "license": "MIT", "optional": true, "dependencies": { @@ -2929,157 +3090,6 @@ "node": ">=18" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", - "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", - "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.25.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.0.tgz", - "integrity": "sha512-iWhsUS8Wgxz9AXNfvfOPFSW4VfMXdVhp1hjkZVhXCrpgh/aLcc45rX6MPu+tIVUWDw0HfNwth7O28M1xDxNf9w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.13.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@fastify/busboy": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", @@ -3105,72 +3115,6 @@ "@hapi/hoek": "^9.0.0" } }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@inquirer/checkbox": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.7.tgz", @@ -4020,25 +3964,24 @@ } }, "node_modules/@napi-rs/cli": { - "version": "3.0.0-alpha.89", - "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-3.0.0-alpha.89.tgz", - "integrity": "sha512-Xi/B/unPVZJx12Qmj9+Z3+vfgmGdhp2tjtvH1VFjC6VrToh/i1fOBSv77j9WhYYWayFGhIit7nLcxQWxigXr8A==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-3.0.4.tgz", + "integrity": "sha512-ilbCI69DVDQcIUSUB504LM1+Nhvo0jKycWAzzPJ22YwUoWrru/w0+V5sfjPINgkshQ4Ykv+oZOJXk9Kg1ZBUvg==", "license": "MIT", "dependencies": { "@inquirer/prompts": "^7.4.0", - "@napi-rs/cross-toolchain": "^0.0.19", - "@napi-rs/wasm-tools": "^0.0.3", + "@napi-rs/cross-toolchain": "^1.0.0", + "@napi-rs/wasm-tools": "^1.0.0", "@octokit/rest": "^22.0.0", "clipanion": "^4.0.0-rc.4", "colorette": "^2.0.20", "debug": "^4.4.0", "emnapi": "^1.4.0", + "find-up": "^7.0.0", "js-yaml": "^4.1.0", "lodash-es": "^4.17.21", "semver": "^7.7.1", - "toml": "^3.0.0", - "typanion": "^3.14.0", - "wasm-sjlj": "^1.0.6" + "typanion": "^3.14.0" }, "bin": { "napi": "dist/cli.js", @@ -4070,28 +4013,111 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/@napi-rs/cross-toolchain": { - "version": "0.0.19", - "resolved": "https://registry.npmjs.org/@napi-rs/cross-toolchain/-/cross-toolchain-0.0.19.tgz", - "integrity": "sha512-StHXqYANdTaMFqJJ3JXHqKQMylOzOJPcrOCd9Nt2NIGfvfaXK3SzpmNfkJimkOAYfTsfpfuRERsML0bUZCpHBQ==", + "node_modules/@napi-rs/cli/node_modules/find-up": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", + "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", "license": "MIT", - "workspaces": [ - ".", - "arm64/*", - "x64/*" - ], "dependencies": { - "@napi-rs/lzma": "^1.4.1", - "@napi-rs/tar": "^0.1.4", - "debug": "^4.4.0" + "locate-path": "^7.2.0", + "path-exists": "^5.0.0", + "unicorn-magic": "^0.1.0" }, - "peerDependencies": { - "@napi-rs/cross-toolchain-arm64-target-aarch64": "^0.0.19", - "@napi-rs/cross-toolchain-arm64-target-armv7": "^0.0.19", - "@napi-rs/cross-toolchain-arm64-target-x86_64": "^0.0.19", - "@napi-rs/cross-toolchain-x64-target-aarch64": "^0.0.19", - "@napi-rs/cross-toolchain-x64-target-armv7": "^0.0.19", - "@napi-rs/cross-toolchain-x64-target-x86_64": "^0.0.19" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@napi-rs/cli/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@napi-rs/cli/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@napi-rs/cli/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@napi-rs/cli/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/@napi-rs/cli/node_modules/yocto-queue": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", + "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@napi-rs/cross-toolchain": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/cross-toolchain/-/cross-toolchain-1.0.0.tgz", + "integrity": "sha512-5Ha9SkZC8NjLB4Xe6C9v+3c+Oraz9FdbuN2L4d/mh1kTK8Y/zGt5geM/U+sboAP3HoK2aRWRnx4GK0eV3oPoUQ==", + "license": "MIT", + "workspaces": [ + ".", + "arm64/*", + "x64/*" + ], + "dependencies": { + "@napi-rs/lzma": "^1.4.3", + "@napi-rs/tar": "^1.0.0", + "debug": "^4.4.1" + }, + "peerDependencies": { + "@napi-rs/cross-toolchain-arm64-target-aarch64": "^1.0.0", + "@napi-rs/cross-toolchain-arm64-target-armv7": "^1.0.0", + "@napi-rs/cross-toolchain-arm64-target-x86_64": "^1.0.0", + "@napi-rs/cross-toolchain-x64-target-aarch64": "^1.0.0", + "@napi-rs/cross-toolchain-x64-target-armv7": "^1.0.0", + "@napi-rs/cross-toolchain-x64-target-x86_64": "^1.0.0" }, "peerDependenciesMeta": { "@napi-rs/cross-toolchain-arm64-target-aarch64": { @@ -4115,9 +4141,9 @@ } }, "node_modules/@napi-rs/lzma": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma/-/lzma-1.4.3.tgz", - "integrity": "sha512-uBjLLoUM9ll03jL/bP7XjyPg0vTU0vQ35N1vVqQHbzlK/fVZyuF2B1p/A6kqPsFFhaoBKgO6oaxsuerv091RtQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma/-/lzma-1.4.4.tgz", + "integrity": "sha512-C53oqFQESm5XkjFKJpXtBXYm2ZiwvrQrsgM1K+/itmSXyQYa4NpB7m0W/peF8riXpxHUt6ycOeMK9rp2enTchQ==", "license": "MIT", "engines": { "node": ">= 10" @@ -4127,29 +4153,29 @@ "url": "https://github.com/sponsors/Brooooooklyn" }, "optionalDependencies": { - "@napi-rs/lzma-android-arm-eabi": "1.4.3", - "@napi-rs/lzma-android-arm64": "1.4.3", - "@napi-rs/lzma-darwin-arm64": "1.4.3", - "@napi-rs/lzma-darwin-x64": "1.4.3", - "@napi-rs/lzma-freebsd-x64": "1.4.3", - "@napi-rs/lzma-linux-arm-gnueabihf": "1.4.3", - "@napi-rs/lzma-linux-arm64-gnu": "1.4.3", - "@napi-rs/lzma-linux-arm64-musl": "1.4.3", - "@napi-rs/lzma-linux-ppc64-gnu": "1.4.3", - "@napi-rs/lzma-linux-riscv64-gnu": "1.4.3", - "@napi-rs/lzma-linux-s390x-gnu": "1.4.3", - "@napi-rs/lzma-linux-x64-gnu": "1.4.3", - "@napi-rs/lzma-linux-x64-musl": "1.4.3", - "@napi-rs/lzma-wasm32-wasi": "1.4.3", - "@napi-rs/lzma-win32-arm64-msvc": "1.4.3", - "@napi-rs/lzma-win32-ia32-msvc": "1.4.3", - "@napi-rs/lzma-win32-x64-msvc": "1.4.3" + "@napi-rs/lzma-android-arm-eabi": "1.4.4", + "@napi-rs/lzma-android-arm64": "1.4.4", + "@napi-rs/lzma-darwin-arm64": "1.4.4", + "@napi-rs/lzma-darwin-x64": "1.4.4", + "@napi-rs/lzma-freebsd-x64": "1.4.4", + "@napi-rs/lzma-linux-arm-gnueabihf": "1.4.4", + "@napi-rs/lzma-linux-arm64-gnu": "1.4.4", + "@napi-rs/lzma-linux-arm64-musl": "1.4.4", + "@napi-rs/lzma-linux-ppc64-gnu": "1.4.4", + "@napi-rs/lzma-linux-riscv64-gnu": "1.4.4", + "@napi-rs/lzma-linux-s390x-gnu": "1.4.4", + "@napi-rs/lzma-linux-x64-gnu": "1.4.4", + "@napi-rs/lzma-linux-x64-musl": "1.4.4", + "@napi-rs/lzma-wasm32-wasi": "1.4.4", + "@napi-rs/lzma-win32-arm64-msvc": "1.4.4", + "@napi-rs/lzma-win32-ia32-msvc": "1.4.4", + "@napi-rs/lzma-win32-x64-msvc": "1.4.4" } }, "node_modules/@napi-rs/lzma-android-arm-eabi": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm-eabi/-/lzma-android-arm-eabi-1.4.3.tgz", - "integrity": "sha512-XpjRUZ/EbWtVbMvW+ucon5Ykz7PjMoX65mIlUdAiVnaPGykzFAUrl8dl6Br5bfqnhQQfDjjUIgTAwWl3G++n1g==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm-eabi/-/lzma-android-arm-eabi-1.4.4.tgz", + "integrity": "sha512-smZtN41ebtYw+vxn1q3IXhns1hUzFNUcgHxknZKFQSKaybYZ4KxMiiBIw5UqJ9rw1dkaHqokcC1YeAfu8vfG2A==", "cpu": [ "arm" ], @@ -4163,9 +4189,9 @@ } }, "node_modules/@napi-rs/lzma-android-arm64": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm64/-/lzma-android-arm64-1.4.3.tgz", - "integrity": "sha512-Bve6BF/4pnlO6HotIgRWgmUT3rbbW/QH471RF/GBA29GfEeUOPEdfQWC7tlzrLYsVFNX2KCWKd+XlxQNz9sRaA==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm64/-/lzma-android-arm64-1.4.4.tgz", + "integrity": "sha512-s+h9bM3Z31FL0IPfWF4kBCebWxJBtpFvje6ikzmeUg1/jjWAP81IJC5j75zz5TEWt+Zf3Bip0uVlQhCZmqlpKA==", "cpu": [ "arm64" ], @@ -4179,9 +4205,9 @@ } }, "node_modules/@napi-rs/lzma-darwin-arm64": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-arm64/-/lzma-darwin-arm64-1.4.3.tgz", - "integrity": "sha512-UxTb56kL6pSVTsZ1ShibnqLSwJZLTWtPU5TNYuyIjVNQYAIG8JQ5Yxz35azjwBCK7AjD8pBdpWLYUSyJRGAVAw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-arm64/-/lzma-darwin-arm64-1.4.4.tgz", + "integrity": "sha512-aF5wxA0SFlRalxeyz7TpmFuztHlG9D0qew+1gz0tiRs4gituT3CCsR0PSBZ2LbalTY/7RqmYP4ssLQus+p8tqg==", "cpu": [ "arm64" ], @@ -4195,9 +4221,9 @@ } }, "node_modules/@napi-rs/lzma-darwin-x64": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-x64/-/lzma-darwin-x64-1.4.3.tgz", - "integrity": "sha512-ps6HiwGKS1P4ottyV2/hVboZ0ugdM1Z1qO9YFpcuKweORfxAkxwJ6S8jOt7G27LQiWiiQHVwsUCODTHDFhOUPQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-x64/-/lzma-darwin-x64-1.4.4.tgz", + "integrity": "sha512-80gD9kvXPPBz6V4C7SXcPo0o7ySlneDVRpebAHN1DubIEwhdrMFuqmtaATwT5MTraZSrQ4CHF275MQuwiHtlGw==", "cpu": [ "x64" ], @@ -4211,9 +4237,9 @@ } }, "node_modules/@napi-rs/lzma-freebsd-x64": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-freebsd-x64/-/lzma-freebsd-x64-1.4.3.tgz", - "integrity": "sha512-W49h41U3+vLnbthbPzvJX1fQtTG+1jyUlfB+wX3oxILvIur06PjJRdMXrFtOZpWkFsihK9gO2DRkQYQJIIgTZw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-freebsd-x64/-/lzma-freebsd-x64-1.4.4.tgz", + "integrity": "sha512-wd+jwYQRIzkGtUvInYLWSrqRtDatIvwNm/w9k43f+oABBsnP4veJkyKGGm4SQQa35Ki8IXVzYdGTa4eSTi+Org==", "cpu": [ "x64" ], @@ -4227,9 +4253,9 @@ } }, "node_modules/@napi-rs/lzma-linux-arm-gnueabihf": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm-gnueabihf/-/lzma-linux-arm-gnueabihf-1.4.3.tgz", - "integrity": "sha512-11PNPiMGuwwxIxd9yPZY3Ek6RFGFRFQb/AtMStJIwlmJ6sM/djEknClLJVbVXbC/nqm7htVZEr+qmYgoDy0fAw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm-gnueabihf/-/lzma-linux-arm-gnueabihf-1.4.4.tgz", + "integrity": "sha512-KiMgBugjFQfgeZTebuBVHL8ta/nZ2cfzd0Jge0e0y/WX/p7ZkVyCox/TTu9EU2H9OeBAFKTRmIDoqhHlBbkqyA==", "cpu": [ "arm" ], @@ -4243,9 +4269,9 @@ } }, "node_modules/@napi-rs/lzma-linux-arm64-gnu": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-gnu/-/lzma-linux-arm64-gnu-1.4.3.tgz", - "integrity": "sha512-XzlxZjSXTcrWFHbvvv2xbV5+bSV5IJqCJ8CCksc7xV3uWEAso9yBPJ8VSRD3GPc7ZoBDRqJmgCb/HQzHpLBekw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-gnu/-/lzma-linux-arm64-gnu-1.4.4.tgz", + "integrity": "sha512-l0T2fKeDqnczeNFqFsE8W2+J7386BGaHCbD409sDGOUW3Fhn9FlHkkC4qAnWhieaLqCdnorj+LQAzYM371IXrQ==", "cpu": [ "arm64" ], @@ -4259,9 +4285,9 @@ } }, "node_modules/@napi-rs/lzma-linux-arm64-musl": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-musl/-/lzma-linux-arm64-musl-1.4.3.tgz", - "integrity": "sha512-k4fWiI4Pm61Esj8hnm7NWIbpZueTtP2jlJqmMhTqJyjqW3NUxbTHjSErZOZKIFRF1B3if4v5Tyzo7JL2X+BaSQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-musl/-/lzma-linux-arm64-musl-1.4.4.tgz", + "integrity": "sha512-rm43dqf5pw5HV3EineWl4IBbzg3Iwuiucl614AyhLHmSHTf6/AJJID7rqwM8Qbhe2abM+9NT+2WI9HRM1ZtkJA==", "cpu": [ "arm64" ], @@ -4275,9 +4301,9 @@ } }, "node_modules/@napi-rs/lzma-linux-ppc64-gnu": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-ppc64-gnu/-/lzma-linux-ppc64-gnu-1.4.3.tgz", - "integrity": "sha512-tTIfk+TYZYbFySxaCMuzp4Zz1T3I6OYVYNAm+IrCSkZDLmUKUzBK3+Su+mT+PjcTNsAiHBa5NVjARXC7b7jmgQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-ppc64-gnu/-/lzma-linux-ppc64-gnu-1.4.4.tgz", + "integrity": "sha512-QzNVcCdq6j4LYOtLUDEyE9wg8tY8kmbQ6TZrqjYQUD2nebTW24lmzFhdeI3xzUzVN5rRt4js1UnL1cPCT5HrSw==", "cpu": [ "ppc64" ], @@ -4291,9 +4317,9 @@ } }, "node_modules/@napi-rs/lzma-linux-riscv64-gnu": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-riscv64-gnu/-/lzma-linux-riscv64-gnu-1.4.3.tgz", - "integrity": "sha512-HPyLYOYhkN7QYaWiKWhSnsLmx/l0pqgiiyaYeycgxCm9dwL8ummFWxveZqYjqdbUUvG7Mgi1jqgRe+55MVdyZQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-riscv64-gnu/-/lzma-linux-riscv64-gnu-1.4.4.tgz", + "integrity": "sha512-7jpyKpBX0LpklkmGBzz1cQJ/QRN+E6h1xSZVeN6KCtLBrCd6LCX3owZMRzSYmdpI6Zr30DrWo0HOUZiKMzgzBg==", "cpu": [ "riscv64" ], @@ -4307,9 +4333,9 @@ } }, "node_modules/@napi-rs/lzma-linux-s390x-gnu": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-s390x-gnu/-/lzma-linux-s390x-gnu-1.4.3.tgz", - "integrity": "sha512-YkcV+RSZZIMM3D5sPZqvo2Q7/tHXBhgJWBi+6ceo46pTlqgn/nH+pVz+CzsDmLWz5hqNSXyv5IAhOcg2CH6rAg==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-s390x-gnu/-/lzma-linux-s390x-gnu-1.4.4.tgz", + "integrity": "sha512-ngUxVZIytn2UHY92RnijtT11VhWO32mfa1LFX03GWMWdQl50bV/IqcZR0WYRWlBCd7DZrOf16AY2IR/lwovE7A==", "cpu": [ "s390x" ], @@ -4323,9 +4349,9 @@ } }, "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.4.3.tgz", - "integrity": "sha512-ep6PLjN1+g4P12Hc7sLRmVpXXaHX22ykqxnOzjXUoj1KTph5XgM4+fUCyE5dsYI+lB4/tXqFuf9ZeFgHk5f00A==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.4.4.tgz", + "integrity": "sha512-mUGH8hpWJU4FXhn61cD7sHTUEBiWU5JYOhh6ErCIZ0BOoBH/0kYPptfqvJA6G9EfVIcfbtYKxJYYtFC5sbf+eA==", "cpu": [ "x64" ], @@ -4339,9 +4365,9 @@ } }, "node_modules/@napi-rs/lzma-linux-x64-musl": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-musl/-/lzma-linux-x64-musl-1.4.3.tgz", - "integrity": "sha512-QkCO6rVw0Z7eY0ziVc4aCFplbOTMpt0UBLPXWxsPd2lXtkAlRChzqaHOxdcL/HoLmBsqdCxmG0EZuHuAP/vKZQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-musl/-/lzma-linux-x64-musl-1.4.4.tgz", + "integrity": "sha512-ysM4mYSfWGO2h8YZVn0GH7zMZX42hU0h7IomC4/oBJmAk5BIlOGnRB8XQmyz1A7neSi6aByjAlZmW4CrZlI9Uw==", "cpu": [ "x64" ], @@ -4355,25 +4381,25 @@ } }, "node_modules/@napi-rs/lzma-wasm32-wasi": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-wasm32-wasi/-/lzma-wasm32-wasi-1.4.3.tgz", - "integrity": "sha512-+rMamB0xaeDyVt4OP4cV888cnmso+m78iUebNhGcrL/WXIziwql50KQrmj7PBdBCza/W7XEcraZT8pO8gSDGcg==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-wasm32-wasi/-/lzma-wasm32-wasi-1.4.4.tgz", + "integrity": "sha512-MyDIU8a6jJqhK4L1ISFrb9OeKaGlI3FptCo2JFoEWYaenWHRwEepFqkyuECeIe34xtU2jtJcpXhEtpnCxuAE1Q==", "cpu": [ "wasm32" ], "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.10" + "@napi-rs/wasm-runtime": "^1.0.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@napi-rs/lzma-win32-arm64-msvc": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-arm64-msvc/-/lzma-win32-arm64-msvc-1.4.3.tgz", - "integrity": "sha512-6gQ+R6ztw11hswdsEu0jsOOXXnJPwhOA1yHRjqfuFemhf6esMd8l9b0uh3BfLBNe7qumtrH4KLrHu8yC9pSY3g==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-arm64-msvc/-/lzma-win32-arm64-msvc-1.4.4.tgz", + "integrity": "sha512-GqoJu7iL7OTqkBQGLps7rXQHZ5sdcZF7tOY06rlYO03ZNkUCjhNpmkuUsPXVnGstqgoGwzMNW6TcSsO/YWotEw==", "cpu": [ "arm64" ], @@ -4387,9 +4413,9 @@ } }, "node_modules/@napi-rs/lzma-win32-ia32-msvc": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-ia32-msvc/-/lzma-win32-ia32-msvc-1.4.3.tgz", - "integrity": "sha512-+AJeJQoGE+QtZKlwM4VzDkfLmUa+6DsGOO5zdbIPlRCB6PEstRCXxp8lkMiQBNgk9f/IO0UEkRcJSZ+Hhqd8zw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-ia32-msvc/-/lzma-win32-ia32-msvc-1.4.4.tgz", + "integrity": "sha512-cnExNqWKl0JkLcKlFVuqUrTuQsYP8nstWGT3fz7mPhgqHFOgGmd1l9tDFhqgul7Kt0QTddZRbKl6jlkV7DjSQw==", "cpu": [ "ia32" ], @@ -4403,9 +4429,9 @@ } }, "node_modules/@napi-rs/lzma-win32-x64-msvc": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-x64-msvc/-/lzma-win32-x64-msvc-1.4.3.tgz", - "integrity": "sha512-66dFCX9ACpVUyTTom89nxhllc88yJyjxGFHO0M2olFcrSJArulfbE9kNIATgh04NDAe/l8VsDhnAxWuvJY1GuA==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-x64-msvc/-/lzma-win32-x64-msvc-1.4.4.tgz", + "integrity": "sha512-15SoQgMgktF73ZnLQPkzCwtxyQ+4VuD8n5Puis1H48QRjUNnXXpqTGFyWdLPdd14vcxbndgcYvJtSjOXTfNHiw==", "cpu": [ "x64" ], @@ -4419,36 +4445,36 @@ } }, "node_modules/@napi-rs/tar": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar/-/tar-0.1.5.tgz", - "integrity": "sha512-skgWKcpjtUqJUk1jwhVl8vXYCXQlFC532KiryU3hQBr6ZIJk0E0qD9FG99hUqtPko8mIMS5HDPO+uSnvHfgRVg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar/-/tar-1.0.0.tgz", + "integrity": "sha512-4sE8bFyOQFKcjWwBoBMtB+YIgKTqQFOFQZWKJP54jENpFulw8cieBaYoA3bbKCCFxXl2jCFulFKDtDErPWULTg==", "license": "MIT", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@napi-rs/tar-android-arm-eabi": "0.1.5", - "@napi-rs/tar-android-arm64": "0.1.5", - "@napi-rs/tar-darwin-arm64": "0.1.5", - "@napi-rs/tar-darwin-x64": "0.1.5", - "@napi-rs/tar-freebsd-x64": "0.1.5", - "@napi-rs/tar-linux-arm-gnueabihf": "0.1.5", - "@napi-rs/tar-linux-arm64-gnu": "0.1.5", - "@napi-rs/tar-linux-arm64-musl": "0.1.5", - "@napi-rs/tar-linux-ppc64-gnu": "0.1.5", - "@napi-rs/tar-linux-s390x-gnu": "0.1.5", - "@napi-rs/tar-linux-x64-gnu": "0.1.5", - "@napi-rs/tar-linux-x64-musl": "0.1.5", - "@napi-rs/tar-wasm32-wasi": "0.1.5", - "@napi-rs/tar-win32-arm64-msvc": "0.1.5", - "@napi-rs/tar-win32-ia32-msvc": "0.1.5", - "@napi-rs/tar-win32-x64-msvc": "0.1.5" + "@napi-rs/tar-android-arm-eabi": "1.0.0", + "@napi-rs/tar-android-arm64": "1.0.0", + "@napi-rs/tar-darwin-arm64": "1.0.0", + "@napi-rs/tar-darwin-x64": "1.0.0", + "@napi-rs/tar-freebsd-x64": "1.0.0", + "@napi-rs/tar-linux-arm-gnueabihf": "1.0.0", + "@napi-rs/tar-linux-arm64-gnu": "1.0.0", + "@napi-rs/tar-linux-arm64-musl": "1.0.0", + "@napi-rs/tar-linux-ppc64-gnu": "1.0.0", + "@napi-rs/tar-linux-s390x-gnu": "1.0.0", + "@napi-rs/tar-linux-x64-gnu": "1.0.0", + "@napi-rs/tar-linux-x64-musl": "1.0.0", + "@napi-rs/tar-wasm32-wasi": "1.0.0", + "@napi-rs/tar-win32-arm64-msvc": "1.0.0", + "@napi-rs/tar-win32-ia32-msvc": "1.0.0", + "@napi-rs/tar-win32-x64-msvc": "1.0.0" } }, "node_modules/@napi-rs/tar-android-arm-eabi": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm-eabi/-/tar-android-arm-eabi-0.1.5.tgz", - "integrity": "sha512-FM2qNG3ELeYibnZC8dfsCV4i/pql1nlLKVINfRC7TSwqFfgj5gbezZ0rT8gRPHbLyslVt6m4MPZfRE8Uj/MuCA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm-eabi/-/tar-android-arm-eabi-1.0.0.tgz", + "integrity": "sha512-oEntU16IkWykPJnSwv/VIICzIt2SwEsz45z2Ab+EXOas10EB+pu0z31AiSNI5pr1CaJcadbf1JGMI9aOtbAuRQ==", "cpu": [ "arm" ], @@ -4462,9 +4488,9 @@ } }, "node_modules/@napi-rs/tar-android-arm64": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm64/-/tar-android-arm64-0.1.5.tgz", - "integrity": "sha512-OpP0QyD+K0a68nqyko793lLWiC2BN1wWF/Doatus1OCKxgj61vtrUPVO2cQGQS5i07I/+YGRF8lD0tQDrk4JDQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-android-arm64/-/tar-android-arm64-1.0.0.tgz", + "integrity": "sha512-b2X7nQ/wH2VGzzl4KhVOR/gHqxIuqrUjMY8VKJYxAGdCrmUPRfc47kersiu6DG706kSv9T+BxeeUQvwqnXZRXQ==", "cpu": [ "arm64" ], @@ -4478,9 +4504,9 @@ } }, "node_modules/@napi-rs/tar-darwin-arm64": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-arm64/-/tar-darwin-arm64-0.1.5.tgz", - "integrity": "sha512-sfyM/9gxFabdMTFt4quvLJuKbXS6StGIUf7Cp3l8aV2WqCURJevdpN6wW8XtGBo/iSnAP52ERwMRdyIavPYruw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-arm64/-/tar-darwin-arm64-1.0.0.tgz", + "integrity": "sha512-m1Ug1452/DOUbJGSuJuHRTUCBQOXY0arGqXCHuSiaQhBQQjgBhlbHWCv291gV8CytFYd5lvSyiG2gFUU26Qd7A==", "cpu": [ "arm64" ], @@ -4494,9 +4520,9 @@ } }, "node_modules/@napi-rs/tar-darwin-x64": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-x64/-/tar-darwin-x64-0.1.5.tgz", - "integrity": "sha512-NtY8bADKE/3ODBM3hW/RgPeeERJpI6/jgipT3eLJ/CQWY1VJ6t9GHR7anJKhx1oxVdmSfqfCGMolM8WPV9x9bw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-darwin-x64/-/tar-darwin-x64-1.0.0.tgz", + "integrity": "sha512-1RiC53g1y4pxX7P2L9sbZcqsw6dfXvGnTNwXHDjg4ATZncZa7uoPUWa7aHAGcQm8ZBO4P0ICt2SHOepstDWWTg==", "cpu": [ "x64" ], @@ -4510,9 +4536,9 @@ } }, "node_modules/@napi-rs/tar-freebsd-x64": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-freebsd-x64/-/tar-freebsd-x64-0.1.5.tgz", - "integrity": "sha512-azl0nWrDJAGg25cGVKEY7UtU5ABGz4sQASKvemDLwGbzMDtkJgCoPb+OunI1pezijRAyhiuZEQ4jK8S1qNAWCg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-freebsd-x64/-/tar-freebsd-x64-1.0.0.tgz", + "integrity": "sha512-uLaYn+eO3ZY2ojbohdlRFcuqYP+j2alovtuLdFvCzzsArg4DSnmcJvEQ+I4l99lfyThYB1c8GA64oxSOfmn/UA==", "cpu": [ "x64" ], @@ -4526,9 +4552,9 @@ } }, "node_modules/@napi-rs/tar-linux-arm-gnueabihf": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm-gnueabihf/-/tar-linux-arm-gnueabihf-0.1.5.tgz", - "integrity": "sha512-OjGdKjaW7b0m96rAvsLthMBhwYSSgpTM/WkHqRJo91HCYQ6tHXDBnq4VIQx2FpwT1PoetvRsbSgy0tOc95iYjA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm-gnueabihf/-/tar-linux-arm-gnueabihf-1.0.0.tgz", + "integrity": "sha512-PhGIaT45i1Fj5iY6NiWYTLPUOHb7rXiwnqKhco+IXOeIclaGcEVoAbhrLiLGQrfv9viLdyhzAxECoOr+zKnApw==", "cpu": [ "arm" ], @@ -4542,9 +4568,9 @@ } }, "node_modules/@napi-rs/tar-linux-arm64-gnu": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-gnu/-/tar-linux-arm64-gnu-0.1.5.tgz", - "integrity": "sha512-o3b2VE5c7+NFb6XRcXrdXgur1yhpx+XNItFoeJUMBE8z0AGAISf2DJSbcJawmefUvrGtr+iLr61hsr6f2hw+5Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-gnu/-/tar-linux-arm64-gnu-1.0.0.tgz", + "integrity": "sha512-syDburynsi2WxhD0hVUfNDpRowG+3Luiv2BKiYOUEwMZy6E/By1vQCn2NbLAqoPxaE9N/4Cp3xcW+Hn+CZ2EFA==", "cpu": [ "arm64" ], @@ -4558,9 +4584,9 @@ } }, "node_modules/@napi-rs/tar-linux-arm64-musl": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-musl/-/tar-linux-arm64-musl-0.1.5.tgz", - "integrity": "sha512-5xTxsoPVqovnZ197CqTc+q3psRM4i+ErdiyfDgkG4nP045jh50gp22WKZuE24dc7/iS+IyUrM3+PRbmj2mzR8g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-arm64-musl/-/tar-linux-arm64-musl-1.0.0.tgz", + "integrity": "sha512-KlrlAxNaZbWvGKgr4g4Cm5dRdwlogBaF3fvysaqR0kT8pA4ODBHtjsbx+ErhrQNDfg6QZIEfmFn3lrsTG/lqUA==", "cpu": [ "arm64" ], @@ -4574,9 +4600,9 @@ } }, "node_modules/@napi-rs/tar-linux-ppc64-gnu": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-ppc64-gnu/-/tar-linux-ppc64-gnu-0.1.5.tgz", - "integrity": "sha512-7FF1u8EkDpCEPCgU0/kvuzsO+opB7eIbsGfKRIbOqrDT7c1DYxDetNTtukPvNoT2kvwfxxThgTfcPADPxdOE/w==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-ppc64-gnu/-/tar-linux-ppc64-gnu-1.0.0.tgz", + "integrity": "sha512-IbB4I8RFcvKI/zGsboUQPmlKoXfXgNOMiJw7Cbe7T1OBeYzDy6n/yEUEaG4zIbocxqjRVsF4ElrW1V/0Ihlqzg==", "cpu": [ "ppc64" ], @@ -4590,9 +4616,9 @@ } }, "node_modules/@napi-rs/tar-linux-s390x-gnu": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-s390x-gnu/-/tar-linux-s390x-gnu-0.1.5.tgz", - "integrity": "sha512-uyIZ7OLCLHtVBpogoJUD0GSAF1IUa3d5c5AVUemTLIwYkVgzdEB+khh3i2+/oKObf79ZKfQ8mYxOryHqfx+ulw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-s390x-gnu/-/tar-linux-s390x-gnu-1.0.0.tgz", + "integrity": "sha512-Tl4HSo07u3TLsNQ4KEVfYKdHVNfF/k0o5KQlyGnePiO34Kb+NfaqSKMspjSkrmXKEc0PjB+u9af3BZdTUwml4Q==", "cpu": [ "s390x" ], @@ -4606,9 +4632,9 @@ } }, "node_modules/@napi-rs/tar-linux-x64-gnu": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-gnu/-/tar-linux-x64-gnu-0.1.5.tgz", - "integrity": "sha512-y8pFyVTU6lSYiW2lse6i1Ns9yt9mBkAqPbcJnIjqC7ZqRd61T6g3XZDSrKmsM6ycTfsAqoE5WyyFxBjQN29AOA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-gnu/-/tar-linux-x64-gnu-1.0.0.tgz", + "integrity": "sha512-Xe57Yz4MKSeG6HGECiIHuBKFwAuqs2fzwblTdMd1CoSgaaUc/K/dKTDWZwPtjC0Hh5pM86K0WZuwggbsjmFGNg==", "cpu": [ "x64" ], @@ -4622,9 +4648,9 @@ } }, "node_modules/@napi-rs/tar-linux-x64-musl": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-musl/-/tar-linux-x64-musl-0.1.5.tgz", - "integrity": "sha512-8phLYc0QX+tqvp34PQHUulZUi4sy/fdg1KgFHiyYExTRRleBB01vM7KSn7Bk9dwH7lannO5D7j4O8OY46Xcr/A==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-linux-x64-musl/-/tar-linux-x64-musl-1.0.0.tgz", + "integrity": "sha512-VA4RXspXyelNAtaFEf2ZLnTYXRILVlH20OGV0oqzuUcQzpwEwK2cJbYtYHK+yCYpxrNbEGsAwN+12LYJMW+NlA==", "cpu": [ "x64" ], @@ -4638,25 +4664,25 @@ } }, "node_modules/@napi-rs/tar-wasm32-wasi": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-wasm32-wasi/-/tar-wasm32-wasi-0.1.5.tgz", - "integrity": "sha512-OpVWC/bwY0zb6nbQDg6koxeZGb441gXwPkaYVjaK4O0TJjNpRKbokLAMlGFtcc/sVSPjghFL0+enfnLDt/P7og==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-wasm32-wasi/-/tar-wasm32-wasi-1.0.0.tgz", + "integrity": "sha512-yPMq3jMldKOi6rbbhKp+7zfaRsA2toIfRV7TbqSzwz64S5euiMrsZQcrq3F9oTtFu4wCSLo83IsNdgoVuiy44g==", "cpu": [ "wasm32" ], "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.9" + "@napi-rs/wasm-runtime": "^1.0.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@napi-rs/tar-win32-arm64-msvc": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-arm64-msvc/-/tar-win32-arm64-msvc-0.1.5.tgz", - "integrity": "sha512-FXwQA2Ib55q98szshvDsitgo2iLW2lTD1Q53e8dPMGobPa2yL5e8IjJDCcMI7XJwBZPl9YjJk7nAb8y20DXF+Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-arm64-msvc/-/tar-win32-arm64-msvc-1.0.0.tgz", + "integrity": "sha512-VdUjZK8jh6mvGRiurK3ms6Yt2hbBbtYjzKCn78Mnme2KGC585Kx1jXl7HShvreCgqh3r0162OSygoE7d/I0Jlw==", "cpu": [ "arm64" ], @@ -4670,9 +4696,9 @@ } }, "node_modules/@napi-rs/tar-win32-ia32-msvc": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-ia32-msvc/-/tar-win32-ia32-msvc-0.1.5.tgz", - "integrity": "sha512-XEt58yFslNkwf2yJ+uX5nDNmPAk15Metkx2hVPeH29mOpuG2H8nuS8/42hZ+dQfZf3xABRjyurVMMH9JcgLZIQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-ia32-msvc/-/tar-win32-ia32-msvc-1.0.0.tgz", + "integrity": "sha512-8d/4iRXROPXLoe+4FEqXkpgP2KD9A45VUf76WfT6nXZwzQuoh+9WCJNRPVs5vfXV1SMnG9Z32WNc2ivCq0+HZw==", "cpu": [ "ia32" ], @@ -4686,9 +4712,9 @@ } }, "node_modules/@napi-rs/tar-win32-x64-msvc": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-x64-msvc/-/tar-win32-x64-msvc-0.1.5.tgz", - "integrity": "sha512-9Rq0Ob4S5NGFwNL3kGQkgrYlObqQgw19QMSZdVuhzZ9sSxn9OSF5cWgZ/n1oMEPWK+u6n9GSN2XbPn4DI7pm7Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/tar-win32-x64-msvc/-/tar-win32-x64-msvc-1.0.0.tgz", + "integrity": "sha512-HHtL1g0niVa4xDvyfi9wQtCTDDKkhDlaOb3bmayTqWs29mk+pcVHBST3OdXaaViSaduqdG9meosU5sOj5iKQAQ==", "cpu": [ "x64" ], @@ -4702,45 +4728,45 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.10.tgz", - "integrity": "sha512-bCsCyeZEwVErsGmyPNSzwfwFn4OdxBj0mmv6hOFucB/k81Ojdu68RbZdxYsRQUPc9l6SU5F/cG+bXgWs3oUgsQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.1.tgz", + "integrity": "sha512-KVlQ/jgywZpixGCKMNwxStmmbYEMyokZpCf2YuIChhfJA2uqfAKNEM8INz7zzTo55iEXfBhIIs3VqYyqzDLj8g==", "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.9.0" + "@emnapi/core": "^1.4.5", + "@emnapi/runtime": "^1.4.5", + "@tybys/wasm-util": "^0.10.0" } }, "node_modules/@napi-rs/wasm-tools": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools/-/wasm-tools-0.0.3.tgz", - "integrity": "sha512-p7NT5wnOIwmP0f3KbXlMabeld5dPFsADpHMWJaBodTSmnPE8P4msguxKJLKWquqAS1FY2dsjBZ62K0/hfiqAUg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools/-/wasm-tools-1.0.0.tgz", + "integrity": "sha512-GL43zmDN6AFmomd7eTJOdZkXDvocucjqJcBs/IY51ZTxHvBeb1SXTM0/rI2VJ7C3FTiyATTt2D8chonCi0UTgw==", "license": "MIT", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@napi-rs/wasm-tools-android-arm-eabi": "0.0.3", - "@napi-rs/wasm-tools-android-arm64": "0.0.3", - "@napi-rs/wasm-tools-darwin-arm64": "0.0.3", - "@napi-rs/wasm-tools-darwin-x64": "0.0.3", - "@napi-rs/wasm-tools-freebsd-x64": "0.0.3", - "@napi-rs/wasm-tools-linux-arm64-gnu": "0.0.3", - "@napi-rs/wasm-tools-linux-arm64-musl": "0.0.3", - "@napi-rs/wasm-tools-linux-x64-gnu": "0.0.3", - "@napi-rs/wasm-tools-linux-x64-musl": "0.0.3", - "@napi-rs/wasm-tools-wasm32-wasi": "0.0.3", - "@napi-rs/wasm-tools-win32-arm64-msvc": "0.0.3", - "@napi-rs/wasm-tools-win32-ia32-msvc": "0.0.3", - "@napi-rs/wasm-tools-win32-x64-msvc": "0.0.3" + "@napi-rs/wasm-tools-android-arm-eabi": "1.0.0", + "@napi-rs/wasm-tools-android-arm64": "1.0.0", + "@napi-rs/wasm-tools-darwin-arm64": "1.0.0", + "@napi-rs/wasm-tools-darwin-x64": "1.0.0", + "@napi-rs/wasm-tools-freebsd-x64": "1.0.0", + "@napi-rs/wasm-tools-linux-arm64-gnu": "1.0.0", + "@napi-rs/wasm-tools-linux-arm64-musl": "1.0.0", + "@napi-rs/wasm-tools-linux-x64-gnu": "1.0.0", + "@napi-rs/wasm-tools-linux-x64-musl": "1.0.0", + "@napi-rs/wasm-tools-wasm32-wasi": "1.0.0", + "@napi-rs/wasm-tools-win32-arm64-msvc": "1.0.0", + "@napi-rs/wasm-tools-win32-ia32-msvc": "1.0.0", + "@napi-rs/wasm-tools-win32-x64-msvc": "1.0.0" } }, "node_modules/@napi-rs/wasm-tools-android-arm-eabi": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm-eabi/-/wasm-tools-android-arm-eabi-0.0.3.tgz", - "integrity": "sha512-T2tme8w5jZ/ZCjJurqNtKCxYtGoDjW9v2rn1bfI60ewCfkYXNpxrTURdkOib85sz+BcwmOfXn0enbg5W9KohoQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm-eabi/-/wasm-tools-android-arm-eabi-1.0.0.tgz", + "integrity": "sha512-Ks0hplmrYatIjSi8XeTObCi0x13AOQD41IQXpBjrz+UK71gDkbxyLWO7B/ckuels3mC1DW3OCQCv+q0lPnaG/A==", "cpu": [ "arm" ], @@ -4754,9 +4780,9 @@ } }, "node_modules/@napi-rs/wasm-tools-android-arm64": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm64/-/wasm-tools-android-arm64-0.0.3.tgz", - "integrity": "sha512-siHTjrxxBrvsVty5X2jI5waAyzJpr756GqGVUqxqS2eoTuqYRfgaFNvX8asp9LAagFtOojfD0fZfuvxK7dc4Rw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-android-arm64/-/wasm-tools-android-arm64-1.0.0.tgz", + "integrity": "sha512-Ppu1/YGLSC/ohkOA8R5YfDh1dCuCHWJObu/BTorAY55YDXIiWy400CoungbYwoRT53K+ixNrg8/zRHnpuqwkRg==", "cpu": [ "arm64" ], @@ -4770,9 +4796,9 @@ } }, "node_modules/@napi-rs/wasm-tools-darwin-arm64": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-arm64/-/wasm-tools-darwin-arm64-0.0.3.tgz", - "integrity": "sha512-0MqsSOYJ4jXcLv/nAInS8nwU+/hL0rSEJo7JXKj3dhkT9UNSj4zfidcOaIb05O9VskJBPmV040+edtWPHXNt2Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-arm64/-/wasm-tools-darwin-arm64-1.0.0.tgz", + "integrity": "sha512-EUU7NvmmKASMLecu7hUHhv9XN2Thf8j+2/zCCMuFuAAlY+eZiOVfrajbZ/RE8CZ4oyfkb0bWFg/CQcmcXAatTw==", "cpu": [ "arm64" ], @@ -4786,9 +4812,9 @@ } }, "node_modules/@napi-rs/wasm-tools-darwin-x64": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-x64/-/wasm-tools-darwin-x64-0.0.3.tgz", - "integrity": "sha512-yXAK2mrlBMZZYK/59JRHZu/c683HFpr5ork1cn++fy8gqUBRLbjuq47VDjA7oyLW5SmWqNDhmhjFTDGvfIvcUg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-darwin-x64/-/wasm-tools-darwin-x64-1.0.0.tgz", + "integrity": "sha512-hlX21sqy0AEnmn2abarmCXV3fpyIQN+fKqeHNuawti9ZpaJCL6gZCtUGqpUxURjXNjXSI8rywInJE2YmeVQSJQ==", "cpu": [ "x64" ], @@ -4802,9 +4828,9 @@ } }, "node_modules/@napi-rs/wasm-tools-freebsd-x64": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-freebsd-x64/-/wasm-tools-freebsd-x64-0.0.3.tgz", - "integrity": "sha512-K1rne814utBd9Zo9LCggQ5h0TSnzGPzA+sG78Qr7KfFz8XQxEGDRH5wpzXyF1KaKav2RmO6wGMXlasDgIcq7GA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-freebsd-x64/-/wasm-tools-freebsd-x64-1.0.0.tgz", + "integrity": "sha512-T9SOSfIgrdEGQzzquKMOfD3PF6TxG5hL2o5voZtLUALA0yjO+GnpFyv8tAcxKYd7ngWzzK5Uwk7e1z9PcsQZMg==", "cpu": [ "x64" ], @@ -4818,9 +4844,9 @@ } }, "node_modules/@napi-rs/wasm-tools-linux-arm64-gnu": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-gnu/-/wasm-tools-linux-arm64-gnu-0.0.3.tgz", - "integrity": "sha512-Yu3gtpvGc2+hcay3SU5MK7EMrGPBq/V4i8mpw/MEYUCzOb7Vd9aL8CryElzlk0SIbktG08VYMdhFFFoJAjlYtg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-gnu/-/wasm-tools-linux-arm64-gnu-1.0.0.tgz", + "integrity": "sha512-qHNLY0GLTZK8M/cQOy2OAaRDfk3YOlWAwlAO4KSIAseuXHAaGya3Ay//kbmwzzs8h6TKf/eAeXDwcGxze5ecxw==", "cpu": [ "arm64" ], @@ -4834,9 +4860,9 @@ } }, "node_modules/@napi-rs/wasm-tools-linux-arm64-musl": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-musl/-/wasm-tools-linux-arm64-musl-0.0.3.tgz", - "integrity": "sha512-XN+sPgEwFw3P47wDvtcQyOoZNghIL8gaiRjEGzprB+kE9N21GkuMbk3kdjiBBJkjqKF25f4fbOvNAY0jQEAO3A==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-arm64-musl/-/wasm-tools-linux-arm64-musl-1.0.0.tgz", + "integrity": "sha512-54BWWTg5I9n77PRUKErBe3BKqkmbjm0GRpUKJgGdlcessC9Oxa/yVDy2BPtmJP1pQR3VabkXR63H+ZGaH5qKxw==", "cpu": [ "arm64" ], @@ -4850,9 +4876,9 @@ } }, "node_modules/@napi-rs/wasm-tools-linux-x64-gnu": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-gnu/-/wasm-tools-linux-x64-gnu-0.0.3.tgz", - "integrity": "sha512-mfMvMEqn33YtEjIyLPguZ6yDsNtF5zV7mqc99620YDyj2SLa0aI35TNTc7Dm+/hlgqHRKhdudsWGfYc4dBND2Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-gnu/-/wasm-tools-linux-x64-gnu-1.0.0.tgz", + "integrity": "sha512-wpRkiy0QBM/zpaGAn5I1HfddQul0vGrdlindT2UHtOYK1zvam524M6LJXBtmhBkXS5a4F2HZiZXns8Wuc7dq4w==", "cpu": [ "x64" ], @@ -4866,9 +4892,9 @@ } }, "node_modules/@napi-rs/wasm-tools-linux-x64-musl": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-musl/-/wasm-tools-linux-x64-musl-0.0.3.tgz", - "integrity": "sha512-KXMsXWGELoN5xgPCoRHbgt5TScSx8BK2GcCHKJ9OPZ2HMfsXbLgS/SNi6vz1CbLMZMLPBY2G6HAk0gzLGyS0mQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-linux-x64-musl/-/wasm-tools-linux-x64-musl-1.0.0.tgz", + "integrity": "sha512-Ua94ruWB18uKyIz/nj+by2ZxfBbFzbqiiD564ocBHGbrUffpR6Us74uVwxO7rImc/WvCfJqap9ezqmaTvmK7SA==", "cpu": [ "x64" ], @@ -4882,25 +4908,25 @@ } }, "node_modules/@napi-rs/wasm-tools-wasm32-wasi": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-wasm32-wasi/-/wasm-tools-wasm32-wasi-0.0.3.tgz", - "integrity": "sha512-v3iMHnAfMteogpbqHTFeLXPeAzL5AhpDJLvZvLXbuRiMsMRL0dn8CbcEnYja2P/Ui6Xlyky6PcaUsepOUTNb7A==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-wasm32-wasi/-/wasm-tools-wasm32-wasi-1.0.0.tgz", + "integrity": "sha512-gWVdt1UK575VKTnFRcYTe0qMZA5bFV2w69qDAhX8hG6tajjxbVyvu4jgsYvv/bJrBrxFsNbXMlEU1d0X7iWziA==", "cpu": [ "wasm32" ], "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.7" + "@napi-rs/wasm-runtime": "^1.0.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@napi-rs/wasm-tools-win32-arm64-msvc": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-arm64-msvc/-/wasm-tools-win32-arm64-msvc-0.0.3.tgz", - "integrity": "sha512-HWrg9cW+u+rQKL9XCQILaGGs6mDYdwX9nwcTIvJAjrpGWu8Dp4wz6i66w6YKHqVng1suGYjjr+LH4/1e0tDaAg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-arm64-msvc/-/wasm-tools-win32-arm64-msvc-1.0.0.tgz", + "integrity": "sha512-1kv+DM7z6c9OLcjMtO1/kfdxS5hwXtW1OLIHBU41dtKz5jD3quapYrCjB7AVEZh/JVM765UaLOl31huVucJjRw==", "cpu": [ "arm64" ], @@ -4914,9 +4940,9 @@ } }, "node_modules/@napi-rs/wasm-tools-win32-ia32-msvc": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-ia32-msvc/-/wasm-tools-win32-ia32-msvc-0.0.3.tgz", - "integrity": "sha512-h99hAWvQKhcloyPfPi0IjrvKRToTE9Z4UVXoXZhcjpCGmr3o1qW+1FAupRy/TcVdMjUJNLE/aenml3UPqzQEQw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-ia32-msvc/-/wasm-tools-win32-ia32-msvc-1.0.0.tgz", + "integrity": "sha512-OwcyXtU2Zi3YVHYjmomM3u7jRNPY1j+IPehqCVEqd60jOTOXRZNPGoAvOC7Lw6HX/RGzOJnIcJZbVfKrz5WN1g==", "cpu": [ "ia32" ], @@ -4930,9 +4956,9 @@ } }, "node_modules/@napi-rs/wasm-tools-win32-x64-msvc": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-x64-msvc/-/wasm-tools-win32-x64-msvc-0.0.3.tgz", - "integrity": "sha512-7/6IpzMi9VGYxLcc9SJyu9ZIdbDwyyb09glVF/2SFEgke9F5H46XzRrAdSoRnjfcq/tdLyHKJbnpCIB257qVYg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-tools-win32-x64-msvc/-/wasm-tools-win32-x64-msvc-1.0.0.tgz", + "integrity": "sha512-xat6gnp/G/WCe6U6HKzawotz9zpqsM5a+Dx+S0MPX4AKP7+oztC2/6tkp8KtOPT2bMRMekNntXadHKk0XqW61Q==", "cpu": [ "x64" ], @@ -5805,123 +5831,420 @@ "node": ">=16.17" } }, - "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "license": "BSD-3-Clause" - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@tsconfig/node22": { - "version": "22.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.1.tgz", - "integrity": "sha512-VkgOa3n6jvs1p+r3DiwBqeEwGAwEvnVCg/hIjiANl5IEcqP3G0u5m8cBJspe1t9qjZRlZ7WFgqq5bJrGdgAKMg==", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.45.1.tgz", + "integrity": "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@tsconfig/react-native": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@tsconfig/react-native/-/react-native-3.0.5.tgz", - "integrity": "sha512-0+pmYzHccvwWpFz2Tv5AJxp6UroLALmAy+SX34tKlwaCie1mNbtCv6uOJp7x8pKchgNA9/n6BGrx7uLQvw8p9A==", + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.45.1.tgz", + "integrity": "sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" - }, - "node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", "license": "MIT", "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } + "os": [ + "android" + ] }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.45.1.tgz", + "integrity": "sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.45.1.tgz", + "integrity": "sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.45.1.tgz", + "integrity": "sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.45.1.tgz", + "integrity": "sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.45.1.tgz", + "integrity": "sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.45.1.tgz", + "integrity": "sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.45.1.tgz", + "integrity": "sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.45.1.tgz", + "integrity": "sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.45.1.tgz", + "integrity": "sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.45.1.tgz", + "integrity": "sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.45.1.tgz", + "integrity": "sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.45.1.tgz", + "integrity": "sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.45.1.tgz", + "integrity": "sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.45.1.tgz", + "integrity": "sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.45.1.tgz", + "integrity": "sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.45.1.tgz", + "integrity": "sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.45.1.tgz", + "integrity": "sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.45.1.tgz", + "integrity": "sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sideway/address": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tsconfig/node22": { + "version": "22.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.1.tgz", + "integrity": "sha512-VkgOa3n6jvs1p+r3DiwBqeEwGAwEvnVCg/hIjiANl5IEcqP3G0u5m8cBJspe1t9qjZRlZ7WFgqq5bJrGdgAKMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/react-native": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@tsconfig/react-native/-/react-native-3.0.5.tgz", + "integrity": "sha512-0+pmYzHccvwWpFz2Tv5AJxp6UroLALmAy+SX34tKlwaCie1mNbtCv6uOJp7x8pKchgNA9/n6BGrx7uLQvw8p9A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz", + "integrity": "sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -5955,13 +6278,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mocha": { "version": "10.0.10", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", @@ -6013,210 +6329,119 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "license": "MIT" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.30.1.tgz", - "integrity": "sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==", + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/type-utils": "8.30.1", - "@typescript-eslint/utils": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/parser": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.30.1.tgz", - "integrity": "sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==", + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/typescript-estree": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.30.1.tgz", - "integrity": "sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.30.1.tgz", - "integrity": "sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==", + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.30.1", - "@typescript-eslint/utils": "8.30.1", - "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.30.1.tgz", - "integrity": "sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "tinyrainbow": "^2.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.30.1.tgz", - "integrity": "sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==", + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/visitor-keys": "8.30.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/utils": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.30.1.tgz", - "integrity": "sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==", + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.30.1", - "@typescript-eslint/types": "8.30.1", - "@typescript-eslint/typescript-estree": "8.30.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "tinyspy": "^4.0.3" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.30.1.tgz", - "integrity": "sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==", + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.30.1", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/vitest" } }, "node_modules/@vscode/sudo-prompt": { @@ -6262,33 +6487,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/anser": { "version": "1.4.10", "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.10.tgz", @@ -6462,6 +6660,16 @@ "util": "^0.12.5" } }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -6883,9 +7091,9 @@ "license": "MIT" }, "node_modules/bufout": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/bufout/-/bufout-0.3.2.tgz", - "integrity": "sha512-8C3TSxBG6jbr0L/PvDo90z5lsc+mpebbV2ZeRlg7f/4Lda/88mb8A4sOngfBj5y1V3I7yRrCuMBPpg5T5tGkcg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/bufout/-/bufout-0.3.4.tgz", + "integrity": "sha512-m8iGxYUvWLdQ9CQ9Sjnmr8hJHlpXfRQn2CV3eI5b107MWQqAe/K/pqsCGmczkSy3r7E1HW5u5z86z2aBYbwwxQ==", "license": "ISC" }, "node_modules/bytes": { @@ -6897,6 +7105,16 @@ "node": ">= 0.8" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -7015,6 +7233,23 @@ ], "license": "CC-BY-4.0" }, + "node_modules/chai": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.1.tgz", + "integrity": "sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7037,6 +7272,16 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "license": "MIT" }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -7596,6 +7841,16 @@ "node": ">=0.10.0" } }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -7605,13 +7860,6 @@ "node": ">=4.0.0" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -7878,6 +8126,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -7973,115 +8228,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint": { - "version": "9.25.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.0.tgz", - "integrity": "sha512-MsBdObhM4cEwkzCiraDv7A6txFXEqtNXOb877TsSp2FCkBNl8JfVQrmiuDqC1IkejT6JLPzYBXx/xAiYhyzgGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", - "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.0", - "@eslint/plugin-kit": "^0.2.8", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8095,40 +8241,14 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" + "@types/estree": "^1.0.0" } }, "node_modules/esutils": { @@ -8181,6 +8301,16 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/exponential-backoff": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", @@ -8273,13 +8403,6 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "license": "MIT" }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, "node_modules/fast-uri": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", @@ -8340,19 +8463,6 @@ "resolved": "packages/ferric-example", "link": true }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -8435,20 +8545,6 @@ "flat": "cli.js" } }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/flatted": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", @@ -8773,19 +8869,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/globals": { "version": "16.3.0", "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", @@ -8838,13 +8921,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, "node_modules/gyp-parser": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/gyp-parser/-/gyp-parser-1.0.4.tgz", @@ -9663,13 +9739,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -9682,20 +9751,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "license": "MIT" }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -9717,16 +9772,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -9755,20 +9800,6 @@ "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lighthouse-logger": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", @@ -9833,13 +9864,6 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "license": "MIT" }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.startcase": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", @@ -10013,6 +10037,13 @@ "loose-envify": "cli.js" } }, + "node_modules/loupe": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", + "integrity": "sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10022,6 +10053,16 @@ "yallist": "^3.0.2" } }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -10765,12 +10806,24 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, - "license": "MIT" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } }, "node_modules/negotiator": { "version": "0.6.3", @@ -11043,24 +11096,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -11277,6 +11312,23 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -11338,14 +11390,33 @@ "node": ">= 0.4" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, "engines": { - "node": ">= 0.8.0" + "node": "^10 || ^12 || >=14" } }, "node_modules/prettier": { @@ -11418,16 +11489,6 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -11977,6 +12038,46 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "4.45.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.45.1.tgz", + "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.45.1", + "@rollup/rollup-android-arm64": "4.45.1", + "@rollup/rollup-darwin-arm64": "4.45.1", + "@rollup/rollup-darwin-x64": "4.45.1", + "@rollup/rollup-freebsd-arm64": "4.45.1", + "@rollup/rollup-freebsd-x64": "4.45.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.45.1", + "@rollup/rollup-linux-arm-musleabihf": "4.45.1", + "@rollup/rollup-linux-arm64-gnu": "4.45.1", + "@rollup/rollup-linux-arm64-musl": "4.45.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.45.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.45.1", + "@rollup/rollup-linux-riscv64-gnu": "4.45.1", + "@rollup/rollup-linux-riscv64-musl": "4.45.1", + "@rollup/rollup-linux-s390x-gnu": "4.45.1", + "@rollup/rollup-linux-x64-gnu": "4.45.1", + "@rollup/rollup-linux-x64-musl": "4.45.1", + "@rollup/rollup-win32-arm64-msvc": "4.45.1", + "@rollup/rollup-win32-ia32-msvc": "4.45.1", + "@rollup/rollup-win32-x64-msvc": "4.45.1", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -12306,6 +12407,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -12386,6 +12494,16 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -12488,6 +12606,13 @@ "node": ">=8" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, "node_modules/stackframe": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", @@ -12515,6 +12640,13 @@ "node": ">= 0.6" } }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, "node_modules/stdin-discarder": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", @@ -12620,6 +12752,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/strnum": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", @@ -12736,6 +12888,95 @@ "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", "license": "MIT" }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -12775,12 +13016,6 @@ "node": ">=0.6" } }, - "node_modules/toml": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", - "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", - "license": "MIT" - }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -12790,19 +13025,6 @@ "tree-kill": "cli.js" } }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -12848,19 +13070,6 @@ "website" ] }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -12906,29 +13115,6 @@ "node": ">=14.17" } }, - "node_modules/typescript-eslint": { - "version": "8.30.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.30.1.tgz", - "integrity": "sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.30.1", - "@typescript-eslint/parser": "8.30.1", - "@typescript-eslint/utils": "8.30.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, "node_modules/undici": { "version": "5.29.0", "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", @@ -13054,16 +13240,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -13130,6 +13306,218 @@ "node": ">= 0.8" } }, + "node_modules/vite": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz", + "integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.6", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.40.0", + "tinyglobby": "^0.2.14" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/vlq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz", @@ -13145,12 +13533,6 @@ "makeerror": "1.0.12" } }, - "node_modules/wasm-sjlj": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/wasm-sjlj/-/wasm-sjlj-1.0.6.tgz", - "integrity": "sha512-pjaKtLJejlWm6+okPV2X1A6nIsRDD4qeK97eCh8DP8KXi3Nzn/HY01vpHhZHlhDri12eZqipjm8HhdTVw+ATxw==", - "license": "MIT" - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -13208,6 +13590,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -13217,16 +13616,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/workerpool": { "version": "9.3.2", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.2.tgz", @@ -13659,16 +14048,19 @@ "name": "ferric-cli", "version": "0.2.3", "dependencies": { - "@commander-js/extra-typings": "^13.1.0", - "@napi-rs/cli": "3.0.0-alpha.89", - "bufout": "^0.3.2", + "@commander-js/extra-typings": "14.0.0", + "@napi-rs/cli": "3.0.4", + "bufout": "0.3.4", "chalk": "^5.4.1", - "commander": "^13.1.0", + "commander": "14.0.0", "ora": "^8.2.0", "react-native-node-api": "0.3.2" }, "bin": { "ferric": "bin/ferric.js" + }, + "devDependencies": { + "vitest": "^3.2.4" } }, "packages/ferric-example": { @@ -13679,12 +14071,12 @@ } }, "packages/ferric/node_modules/@commander-js/extra-typings": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-13.1.0.tgz", - "integrity": "sha512-q5P52BYb1hwVWE6dtID7VvuJWrlfbCv4klj7BjUUOqMz4jbSZD4C9fJ9lRjL2jnBGTg+gDDlaXN51rkWcLk4fg==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-14.0.0.tgz", + "integrity": "sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg==", "license": "MIT", "peerDependencies": { - "commander": "~13.1.0" + "commander": "~14.0.0" } }, "packages/ferric/node_modules/ansi-regex": { @@ -13727,12 +14119,12 @@ } }, "packages/ferric/node_modules/commander": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", - "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.0.tgz", + "integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "packages/ferric/node_modules/emoji-regex": { diff --git a/package.json b/package.json index 1216fa69..1c735e95 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build": "tsc --build", "clean": "tsc --build --clean", "dev": "tsc --build --watch", - "lint": "eslint .", + "lint": "biome check --write", "test": "npm run test --workspace react-native-node-api --workspace cmake-rn --workspace gyp-to-cmake --workspace node-addon-examples", "bootstrap": "npm run build && npm run bootstrap --workspaces --if-present", "prerelease": "npm run build && npm run prerelease --workspaces --if-present", @@ -39,17 +39,15 @@ ], "license": "MIT", "devDependencies": { + "@biomejs/biome": "^2.1.2", "@changesets/cli": "^2.29.5", - "@eslint/js": "^9.19.0", "@reporters/github": "^1.7.2", "@tsconfig/node22": "^22.0.0", "@tsconfig/react-native": "3.0.5", "@types/node": "^22.13.0", - "eslint": "^9.19.0", "globals": "^16.0.0", "react-native": "0.79.5", - "typescript": "^5.7.3", - "typescript-eslint": "^8.22.0", - "tsx": "^4.19.3" + "tsx": "^4.19.3", + "typescript": "^5.7.3" } } diff --git a/packages/cmake-rn/src/cli.ts b/packages/cmake-rn/src/cli.ts index 56c8dac9..307d90d4 100644 --- a/packages/cmake-rn/src/cli.ts +++ b/packages/cmake-rn/src/cli.ts @@ -1,22 +1,21 @@ import assert from "node:assert/strict"; -import path from "node:path"; -import fs from "node:fs"; import { EventEmitter } from "node:events"; +import fs from "node:fs"; +import path from "node:path"; import { Command, Option } from "@commander-js/extra-typings"; -import { spawn, SpawnFailure } from "bufout"; -import { oraPromise } from "ora"; +import { SpawnFailure, spawn } from "bufout"; import chalk from "chalk"; - -import { getWeakNodeApiVariables } from "./weak-node-api.js"; +import { oraPromise } from "ora"; +import { isSupportedTriplet } from "react-native-node-api"; +import type { BaseOpts, Platform, TargetContext } from "./platforms/types.js"; import { - platforms, allTargets, findPlatformForTarget, platformHasTarget, + platforms, } from "./platforms.js"; -import { BaseOpts, TargetContext, Platform } from "./platforms/types.js"; -import { isSupportedTriplet } from "react-native-node-api"; +import { getWeakNodeApiVariables } from "./weak-node-api.js"; // We're attaching a lot of listeners when spawning in parallel EventEmitter.defaultMaxListeners = 100; @@ -25,12 +24,12 @@ EventEmitter.defaultMaxListeners = 100; const verboseOption = new Option( "--verbose", - "Print more output during the build" + "Print more output during the build", ).default(process.env.CI === "true"); const sourcePathOption = new Option( "--source ", - "Specify the source directory containing a CMakeLists.txt file" + "Specify the source directory containing a CMakeLists.txt file", ).default(process.cwd()); // TODO: Add "MinSizeRel" and "RelWithDebInfo" @@ -48,7 +47,7 @@ const defaultTargets = CMAKE_RN_TARGETS ? CMAKE_RN_TARGETS.split(",") : []; for (const target of defaultTargets) { assert( (allTargets as string[]).includes(target), - `Unexpected target in CMAKE_RN_TARGETS: ${target}` + `Unexpected target in CMAKE_RN_TARGETS: ${target}`, ); } @@ -56,32 +55,32 @@ const targetOption = new Option("--target ", "Targets to build for") .choices(allTargets) .default( defaultTargets, - "CMAKE_RN_TARGETS environment variable split by ','" + "CMAKE_RN_TARGETS environment variable split by ','", ); const buildPathOption = new Option( "--build ", - "Specify the build directory to store the configured CMake project" + "Specify the build directory to store the configured CMake project", ); const cleanOption = new Option( "--clean", - "Delete the build directory before configuring the project" + "Delete the build directory before configuring the project", ); const outPathOption = new Option( "--out ", - "Specify the output directory to store the final build artifacts" + "Specify the output directory to store the final build artifacts", ).default(false, "./{build}/{configuration}"); const noAutoLinkOption = new Option( "--no-auto-link", - "Don't mark the output as auto-linkable by react-native-node-api" + "Don't mark the output as auto-linkable by react-native-node-api", ); const noWeakNodeApiLinkageOption = new Option( "--no-weak-node-api-linkage", - "Don't pass the path of the weak-node-api library from react-native-node-api" + "Don't pass the path of the weak-node-api library from react-native-node-api", ); let program = new Command("cmake-rn") @@ -99,7 +98,7 @@ let program = new Command("cmake-rn") for (const platform of platforms) { const allOption = new Option( `--${platform.id}`, - `Enable all ${platform.name} triplets` + `Enable all ${platform.name} triplets`, ); program = program.addOption(allOption); program = platform.amendCommand(program); @@ -133,13 +132,13 @@ program = program.action( } if (targets.size === 0) { throw new Error( - "Found no default targets: Install some platform specific build tools" + "Found no default targets: Install some platform specific build tools", ); } else { console.error( chalk.yellowBright("β„Ή"), "Using default targets", - chalk.dim("(" + [...targets].join(", ") + ")") + chalk.dim(`(${[...targets].join(", ")})`), ); } } @@ -162,20 +161,20 @@ program = program.action( // Configure every triplet project const targetsSummary = chalk.dim( - `(${getTargetsSummary(targetContexts)})` + `(${getTargetsSummary(targetContexts)})`, ); await oraPromise( Promise.all( targetContexts.map(({ platform, ...context }) => - configureProject(platform, context, baseOptions) - ) + configureProject(platform, context, baseOptions), + ), ), { text: `Configuring projects ${targetsSummary}`, isSilent: baseOptions.verbose, successText: `Configured projects ${targetsSummary}`, failText: ({ message }) => `Failed to configure projects: ${message}`, - } + }, ); // Build every triplet project @@ -189,22 +188,22 @@ program = program.action( force: true, }); await buildProject(platform, context, baseOptions); - }) + }), ), { text: "Building projects", isSilent: baseOptions.verbose, successText: "Built projects", failText: ({ message }) => `Failed to build projects: ${message}`, - } + }, ); // Perform post-build steps for each platform in sequence for (const platform of platforms) { const relevantTargets = targetContexts.filter(({ target }) => - platformHasTarget(platform, target) + platformHasTarget(platform, target), ); - if (relevantTargets.length == 0) { + if (relevantTargets.length === 0) { continue; } await platform.postBuild( @@ -212,7 +211,7 @@ program = program.action( outputPath: baseOptions.out || baseOptions.source, targets: relevantTargets, }, - baseOptions + baseOptions, ); } } catch (error) { @@ -221,11 +220,11 @@ program = program.action( } throw error; } - } + }, ); function getTargetsSummary( - targetContexts: { target: string; platform: Platform }[] + targetContexts: { target: string; platform: Platform }[], ) { const targetsPerPlatform: Record = {}; for (const { target, platform } of targetContexts) { @@ -257,7 +256,7 @@ function getTargetBuildPath(buildPath: string, target: unknown) { async function configureProject( platform: Platform>, context: TargetContext, - options: BaseOpts + options: BaseOpts, ) { const { target, buildPath, outputPath } = context; const { verbose, source, weakNodeApiLinkage } = options; @@ -286,14 +285,14 @@ async function configureProject( { outputMode: verbose ? "inherit" : "buffered", outputPrefix: verbose ? chalk.dim(`[${target}] `) : undefined, - } + }, ); } async function buildProject( platform: Platform>, context: TargetContext, - options: BaseOpts + options: BaseOpts, ) { const { target, buildPath } = context; const { verbose, configuration } = options; @@ -310,7 +309,7 @@ async function buildProject( { outputMode: verbose ? "inherit" : "buffered", outputPrefix: verbose ? chalk.dim(`[${target}] `) : undefined, - } + }, ); } diff --git a/packages/cmake-rn/src/headers.ts b/packages/cmake-rn/src/headers.ts index 61510846..aefd1464 100644 --- a/packages/cmake-rn/src/headers.ts +++ b/packages/cmake-rn/src/headers.ts @@ -1,7 +1,7 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; import { createRequire } from "node:module"; import path from "node:path"; -import fs from "node:fs"; -import assert from "node:assert/strict"; const require = createRequire(import.meta.url); @@ -11,7 +11,7 @@ const require = createRequire(import.meta.url); export function getNodeApiHeadersPath(): string { try { const packagePath = path.dirname( - require.resolve("node-api-headers/package.json") + require.resolve("node-api-headers/package.json"), ); const result = path.join(packagePath, "include"); const stat = fs.statSync(packagePath); @@ -22,7 +22,7 @@ export function getNodeApiHeadersPath(): string { `Failed resolve Node-API headers: Did you install the 'node-api-headers' package?`, { cause: error, - } + }, ); } } @@ -33,7 +33,7 @@ export function getNodeApiHeadersPath(): string { export function getNodeAddonHeadersPath(): string { try { const packagePath = path.dirname( - require.resolve("node-addon-api/package.json") + require.resolve("node-addon-api/package.json"), ); return packagePath; } catch (error) { @@ -41,7 +41,7 @@ export function getNodeAddonHeadersPath(): string { `Failed resolve Node-API addon headers: Did you install the 'node-addon-api' package?`, { cause: error, - } + }, ); } } diff --git a/packages/cmake-rn/src/platforms.test.ts b/packages/cmake-rn/src/platforms.test.ts index 2f8c95f7..77dee711 100644 --- a/packages/cmake-rn/src/platforms.test.ts +++ b/packages/cmake-rn/src/platforms.test.ts @@ -1,12 +1,11 @@ import assert from "node:assert/strict"; import { describe, it } from "node:test"; - +import type { Platform } from "./platforms/types.js"; import { - platforms, - platformHasTarget, findPlatformForTarget, + platformHasTarget, + platforms, } from "./platforms.js"; -import { Platform } from "./platforms/types.js"; const mockPlatform = { targets: ["target1", "target2"] } as unknown as Platform; diff --git a/packages/cmake-rn/src/platforms.ts b/packages/cmake-rn/src/platforms.ts index 0692a3a4..2a298328 100644 --- a/packages/cmake-rn/src/platforms.ts +++ b/packages/cmake-rn/src/platforms.ts @@ -2,21 +2,21 @@ import assert from "node:assert/strict"; import { platform as android } from "./platforms/android.js"; import { platform as apple } from "./platforms/apple.js"; -import { Platform } from "./platforms/types.js"; +import type { Platform } from "./platforms/types.js"; export const platforms: Platform[] = [android, apple] as const; export const allTargets = [...android.targets, ...apple.targets] as const; export function platformHasTarget

( platform: P, - target: unknown + target: unknown, ): target is P["targets"][number] { return (platform.targets as unknown[]).includes(target); } export function findPlatformForTarget(target: unknown) { const platform = Object.values(platforms).find((platform) => - platformHasTarget(platform, target) + platformHasTarget(platform, target), ); assert(platform, `Unable to determine platform from target: ${target}`); return platform; diff --git a/packages/cmake-rn/src/platforms/android.ts b/packages/cmake-rn/src/platforms/android.ts index 51e2ab76..d61d3e8d 100644 --- a/packages/cmake-rn/src/platforms/android.ts +++ b/packages/cmake-rn/src/platforms/android.ts @@ -3,15 +3,14 @@ import fs from "node:fs"; import path from "node:path"; import { Option } from "@commander-js/extra-typings"; +import chalk from "chalk"; +import { oraPromise } from "ora"; import { createAndroidLibsDirectory, determineAndroidLibsFilename, - AndroidTriplet as Target, + type AndroidTriplet as Target, } from "react-native-node-api"; - import type { Platform } from "./types.js"; -import { oraPromise } from "ora"; -import chalk from "chalk"; // This should match https://github.com/react-native-community/template/blob/main/template/android/build.gradle#L7 const DEFAULT_NDK_VERSION = "27.1.12297006"; @@ -28,12 +27,12 @@ export const ANDROID_ARCHITECTURES = { const ndkVersionOption = new Option( "--ndk-version ", - "The NDK version to use for Android builds" + "The NDK version to use for Android builds", ).default(DEFAULT_NDK_VERSION); const androidSdkVersionOption = new Option( "--android-sdk-version ", - "The Android SDK version to use for Android builds" + "The Android SDK version to use for Android builds", ).default(DEFAULT_ANDROID_SDK_VERSION); type AndroidOpts = { ndkVersion: string; androidSdkVersion: string }; @@ -65,22 +64,22 @@ export const platform: Platform = { const { ANDROID_HOME } = process.env; assert( typeof ANDROID_HOME === "string", - "Missing env variable ANDROID_HOME" + "Missing env variable ANDROID_HOME", ); assert( fs.existsSync(ANDROID_HOME), - `Expected the Android SDK at ${ANDROID_HOME}` + `Expected the Android SDK at ${ANDROID_HOME}`, ); const installNdkCommand = `sdkmanager --install "ndk;${ndkVersion}"`; const ndkPath = path.resolve(ANDROID_HOME, "ndk", ndkVersion); assert( fs.existsSync(ndkPath), - `Missing Android NDK v${ndkVersion} (at ${ndkPath}) - run: ${installNdkCommand}` + `Missing Android NDK v${ndkVersion} (at ${ndkPath}) - run: ${installNdkCommand}`, ); const toolchainPath = path.join( ndkPath, - "build/cmake/android.toolchain.cmake" + "build/cmake/android.toolchain.cmake", ); const architecture = ANDROID_ARCHITECTURES[target]; @@ -130,7 +129,7 @@ export const platform: Platform = { targets.map(async ({ target, outputPath }) => { assert( fs.existsSync(outputPath), - `Expected a directory at ${outputPath}` + `Expected a directory at ${outputPath}`, ); // Expect binary file(s), either .node or .so const dirents = await fs.promises.readdir(outputPath, { @@ -140,16 +139,16 @@ export const platform: Platform = { .filter( (dirent) => dirent.isFile() && - (dirent.name.endsWith(".so") || dirent.name.endsWith(".node")) + (dirent.name.endsWith(".so") || dirent.name.endsWith(".node")), ) .map((dirent) => path.join(dirent.parentPath, dirent.name)); assert.equal(result.length, 1, "Expected exactly one library file"); return [target, result[0]] as const; - }) - ) + }), + ), ) as Record; const androidLibsFilename = determineAndroidLibsFilename( - Object.values(libraryPathByTriplet) + Object.values(libraryPathByTriplet), ); const androidLibsOutputPath = path.resolve(outputPath, androidLibsFilename); @@ -162,11 +161,11 @@ export const platform: Platform = { { text: "Assembling Android libs directory", successText: `Android libs directory assembled into ${chalk.dim( - path.relative(process.cwd(), androidLibsOutputPath) + path.relative(process.cwd(), androidLibsOutputPath), )}`, failText: ({ message }) => `Failed to assemble Android libs directory: ${message}`, - } + }, ); }, }; diff --git a/packages/cmake-rn/src/platforms/apple.ts b/packages/cmake-rn/src/platforms/apple.ts index b5ad0b1c..b65a0fed 100644 --- a/packages/cmake-rn/src/platforms/apple.ts +++ b/packages/cmake-rn/src/platforms/apple.ts @@ -1,18 +1,17 @@ import assert from "node:assert/strict"; -import path from "node:path"; import fs from "node:fs"; +import path from "node:path"; import { Option } from "@commander-js/extra-typings"; +import chalk from "chalk"; import { oraPromise } from "ora"; import { - AppleTriplet as Target, createAppleFramework, createXCframework, determineXCFrameworkFilename, + type AppleTriplet as Target, } from "react-native-node-api"; - import type { Platform } from "./types.js"; -import chalk from "chalk"; type XcodeSDKName = | "iphoneos" @@ -89,7 +88,7 @@ export function getAppleBuildArgs() { const xcframeworkExtensionOption = new Option( "--xcframework-extension", - "Don't rename the xcframework to .apple.node" + "Don't rename the xcframework to .apple.node", ).default(false); type AppleOpts = { @@ -130,19 +129,18 @@ export const platform: Platform = { // We expect the final application to sign these binaries return ["CODE_SIGNING_ALLOWED=NO"]; }, - isSupportedByHost: function (): boolean | Promise { - return process.platform === "darwin"; - }, + isSupportedByHost: (): boolean | Promise => + process.platform === "darwin", async postBuild( { outputPath, targets }, - { configuration, autoLink, xcframeworkExtension } + { configuration, autoLink, xcframeworkExtension }, ) { const libraryPaths = await Promise.all( targets.map(async ({ outputPath }) => { const configSpecificPath = path.join(outputPath, configuration); assert( fs.existsSync(configSpecificPath), - `Expected a directory at ${configSpecificPath}` + `Expected a directory at ${configSpecificPath}`, ); // Expect binary file(s), either .node or .dylib const files = await fs.promises.readdir(configSpecificPath); @@ -157,18 +155,18 @@ export const platform: Platform = { return newFilePath; } else { throw new Error( - `Expected a .node or .dylib file, but found ${file}` + `Expected a .node or .dylib file, but found ${file}`, ); } }); assert.equal(result.length, 1, "Expected exactly one library file"); return await result[0]; - }) + }), ); const frameworkPaths = libraryPaths.map(createAppleFramework); const xcframeworkFilename = determineXCFrameworkFilename( frameworkPaths, - xcframeworkExtension ? ".xcframework" : ".apple.node" + xcframeworkExtension ? ".xcframework" : ".apple.node", ); // Create the xcframework @@ -183,10 +181,10 @@ export const platform: Platform = { { text: "Assembling XCFramework", successText: `XCFramework assembled into ${chalk.dim( - path.relative(process.cwd(), xcframeworkOutputPath) + path.relative(process.cwd(), xcframeworkOutputPath), )}`, failText: ({ message }) => `Failed to assemble XCFramework: ${message}`, - } + }, ); }, }; diff --git a/packages/cmake-rn/src/platforms/types.ts b/packages/cmake-rn/src/platforms/types.ts index 5406cc48..f191408e 100644 --- a/packages/cmake-rn/src/platforms/types.ts +++ b/packages/cmake-rn/src/platforms/types.ts @@ -1,4 +1,4 @@ -import * as commander from "@commander-js/extra-typings"; +import type * as commander from "@commander-js/extra-typings"; import type { program } from "../cli.js"; type InferOptionValues = ReturnType< @@ -23,7 +23,7 @@ export type TargetContext = { export type Platform< Targets extends string[] = string[], Opts extends commander.OptionValues = Record, - Command = ExtendedCommand + Command = ExtendedCommand, > = { /** * Used to identify the platform in the CLI. @@ -54,14 +54,14 @@ export type Platform< */ configureArgs( context: TargetContext, - options: BaseOpts & Opts + options: BaseOpts & Opts, ): string[]; /** * Platform specific arguments passed to CMake to build a target project. */ buildArgs( context: TargetContext, - options: BaseOpts & Opts + options: BaseOpts & Opts, ): string[]; /** * Called to combine multiple targets into a single prebuilt artefact. @@ -74,6 +74,6 @@ export type Platform< outputPath: string; targets: TargetContext[]; }, - options: BaseOpts & Opts + options: BaseOpts & Opts, ): Promise; }; diff --git a/packages/cmake-rn/src/run.ts b/packages/cmake-rn/src/run.ts index c64a70b0..f4f89314 100644 --- a/packages/cmake-rn/src/run.ts +++ b/packages/cmake-rn/src/run.ts @@ -1,2 +1,3 @@ import { program } from "./cli.js"; + program.parse(process.argv); diff --git a/packages/cmake-rn/src/weak-node-api.ts b/packages/cmake-rn/src/weak-node-api.ts index 4db8d667..a7c3071d 100644 --- a/packages/cmake-rn/src/weak-node-api.ts +++ b/packages/cmake-rn/src/weak-node-api.ts @@ -1,16 +1,15 @@ -import fs from "node:fs"; import assert from "node:assert/strict"; +import fs from "node:fs"; import path from "node:path"; import { isAndroidTriplet, isAppleTriplet, - SupportedTriplet, + type SupportedTriplet, weakNodeApiPath, } from "react-native-node-api"; - -import { ANDROID_ARCHITECTURES } from "./platforms/android.js"; import { getNodeAddonHeadersPath, getNodeApiHeadersPath } from "./headers.js"; +import { ANDROID_ARCHITECTURES } from "./platforms/android.js"; export function toCmakePath(input: string) { return input.split(path.win32.sep).join(path.posix.sep); @@ -20,11 +19,11 @@ export function getWeakNodeApiPath(triplet: SupportedTriplet): string { if (isAppleTriplet(triplet)) { const xcframeworkPath = path.join( weakNodeApiPath, - "weak-node-api.xcframework" + "weak-node-api.xcframework", ); assert( fs.existsSync(xcframeworkPath), - `Expected an XCFramework at ${xcframeworkPath}` + `Expected an XCFramework at ${xcframeworkPath}`, ); return xcframeworkPath; } else if (isAndroidTriplet(triplet)) { @@ -32,7 +31,7 @@ export function getWeakNodeApiPath(triplet: SupportedTriplet): string { weakNodeApiPath, "weak-node-api.android.node", ANDROID_ARCHITECTURES[triplet], - "libweak-node-api.so" + "libweak-node-api.so", ); assert(fs.existsSync(libraryPath), `Expected library at ${libraryPath}`); return libraryPath; @@ -46,7 +45,7 @@ export function getWeakNodeApiVariables(triplet: SupportedTriplet) { for (const includePath of includePaths) { assert( !includePath.includes(";"), - `Include path with a ';' is not supported: ${includePath}` + `Include path with a ';' is not supported: ${includePath}`, ); } return { diff --git a/packages/ferric-example/.gitignore b/packages/ferric-example/.gitignore deleted file mode 100644 index 31c8570c..00000000 --- a/packages/ferric-example/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/target -Cargo.lock - -/*.xcframework/ -/*.apple.node/ -/*.android.node/ - -# Generated files -/ferric_example.d.ts -/ferric_example.js diff --git a/packages/ferric-example/Cargo.toml b/packages/ferric-example/Cargo.toml deleted file mode 100644 index 27c34877..00000000 --- a/packages/ferric-example/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "ferric-example" -version = "1.0.0" -edition = "2021" -license = "MIT" - -[lib] -crate-type = ["cdylib"] - -[dependencies.napi] -version = "3.0.0-alpha" -default-features = false -# see https://nodejs.org/api/n-api.html#node-api-version-matrix -features = ["napi3"] - -[dependencies.napi-derive] -version = "3.0.0-alpha" -features = ["type-def"] - -[build-dependencies] -napi-build = "2" - -[profile.release] -lto = true -codegen-units = 1 diff --git a/packages/ferric-example/build.rs b/packages/ferric-example/build.rs deleted file mode 100644 index bbfc9e4b..00000000 --- a/packages/ferric-example/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - napi_build::setup(); -} diff --git a/packages/ferric-example/package.json b/packages/ferric-example/package.json deleted file mode 100644 index 0e747326..00000000 --- a/packages/ferric-example/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@react-native-node-api/ferric-example", - "private": true, - "type": "commonjs", - "version": "0.1.0", - "homepage": "https://github.com/callstackincubator/react-native-node-api", - "repository": { - "type": "git", - "url": "git+https://github.com/callstackincubator/react-native-node-api.git", - "directory": "packages/ferric-example" - }, - "main": "ferric_example.js", - "types": "ferric_example.d.ts", - "scripts": { - "build": "ferric build", - "bootstrap": "npm run build" - }, - "devDependencies": { - "ferric-cli": "^0.2.0" - } -} diff --git a/packages/ferric-example/src/lib.rs b/packages/ferric-example/src/lib.rs deleted file mode 100644 index ecfd7ab1..00000000 --- a/packages/ferric-example/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -use napi_derive::napi; - -#[napi] -pub fn sum(a: i32, b: i32) -> i32 { - a + b -} diff --git a/packages/ferric/README.md b/packages/ferric/README.md index c61bdb9a..90cfac1c 100644 --- a/packages/ferric/README.md +++ b/packages/ferric/README.md @@ -1,3 +1,17 @@ -# `ferric` +# `ferric` (ESM Module) A wrapper around Cargo making it easier to produce prebuilt binaries targeting iOS and Android matching the [the prebuilt binary specification](https://github.com/callstackincubator/react-native-node-api/blob/main/docs/PREBUILDS.md) as well as [napi.rs](https://napi.rs/) to generate bindings from annotated Rust code. + +## Install the project + +`npm install --save-dev ferric-cli` + +## Add scripts + +```json +"scripts": { + "generate:proj": "ferric generate folder_name", + "debug": "ferric build folder_name", + "release": "npm run debug --configuration release", +}, +``` diff --git a/packages/ferric/__tests__/build.test.ts b/packages/ferric/__tests__/build.test.ts new file mode 100644 index 00000000..956dc74e --- /dev/null +++ b/packages/ferric/__tests__/build.test.ts @@ -0,0 +1,7 @@ +import { assert, describe, it } from "vitest"; + +describe("", () => { + it("", () => { + assert.equal(1, 1); + }); +}); diff --git a/packages/ferric/__tests__/generate.test.ts b/packages/ferric/__tests__/generate.test.ts new file mode 100644 index 00000000..956dc74e --- /dev/null +++ b/packages/ferric/__tests__/generate.test.ts @@ -0,0 +1,7 @@ +import { assert, describe, it } from "vitest"; + +describe("", () => { + it("", () => { + assert.equal(1, 1); + }); +}); diff --git a/packages/ferric/package.json b/packages/ferric/package.json index 2fb66222..614a55d1 100644 --- a/packages/ferric/package.json +++ b/packages/ferric/package.json @@ -13,15 +13,19 @@ "ferric": "./bin/ferric.js" }, "scripts": { - "start": "tsx src/run.ts" + "start": "tsx src/run.ts", + "test": "vitest" }, "dependencies": { - "@napi-rs/cli": "3.0.0-alpha.89", - "@commander-js/extra-typings": "^13.1.0", - "bufout": "^0.3.2", + "@commander-js/extra-typings": "14.0.0", + "@napi-rs/cli": "3.0.4", + "bufout": "0.3.4", "chalk": "^5.4.1", - "commander": "^13.1.0", - "react-native-node-api": "0.3.2", - "ora": "^8.2.0" + "commander": "14.0.0", + "ora": "^8.2.0", + "react-native-node-api": "0.3.2" + }, + "devDependencies": { + "vitest": "^3.2.4" } } diff --git a/packages/ferric/src/banner.ts b/packages/ferric/src/banner.ts index c9c136f3..820b681d 100644 --- a/packages/ferric/src/banner.ts +++ b/packages/ferric/src/banner.ts @@ -25,6 +25,6 @@ export function printBanner() { LINES.map((line, lineNumber, lines) => { const ratio = lineNumber / lines.length; return chalk.rgb(Math.round(250 - 100 * ratio), 0, 0)(line); - }).join("\n") + }).join("\n"), ); } diff --git a/packages/ferric/src/build.ts b/packages/ferric/src/build.ts index 48c10d8b..109a13a7 100644 --- a/packages/ferric/src/build.ts +++ b/packages/ferric/src/build.ts @@ -1,36 +1,35 @@ -import path from "node:path"; import fs from "node:fs"; +import path from "node:path"; import { Command, Option } from "@commander-js/extra-typings"; -import chalk from "chalk"; import { SpawnFailure } from "bufout"; +import chalk from "chalk"; import { oraPromise } from "ora"; import { - determineAndroidLibsFilename, + type AndroidTriplet, createAndroidLibsDirectory, - AndroidTriplet, createAppleFramework, - determineXCFrameworkFilename, - createXCframework, createUniversalAppleLibrary, + createXCframework, + determineAndroidLibsFilename, determineLibraryBasename, + determineXCFrameworkFilename, prettyPath, } from "react-native-node-api"; - -import { UsageError, assertFixable } from "./errors.js"; -import { ensureCargo, build } from "./cargo.js"; +import { getBlockComment } from "./banner.js"; +import { build, ensureCargo } from "./cargo.js"; +import { assertFixable, UsageError } from "./errors.js"; +import { generateTypeScriptDeclarations } from "./napi-rs.js"; import { ALL_TARGETS, ANDROID_TARGETS, - AndroidTargetName, + type AndroidTargetName, APPLE_TARGETS, - AppleTargetName, + type AppleTargetName, ensureInstalledTargets, filterTargetsByPlatform, } from "./targets.js"; -import { generateTypeScriptDeclarations } from "./napi-rs.js"; -import { getBlockComment } from "./banner.js"; type EntrypointOptions = { outputPath: string; @@ -42,12 +41,11 @@ async function generateEntrypoint({ }: EntrypointOptions) { await fs.promises.writeFile( outputPath, - [ - "/* eslint-disable */", + `${[ getBlockComment(), `module.exports = require('./${libraryName}.node');`, - ].join("\n\n") + "\n", - "utf8" + ].join("\n\n")}\n`, + "utf8", ); } @@ -73,7 +71,7 @@ function getDefaultTargets() { { instructions: "Pass only valid targets via FERRIC_TARGETS (or remove them)", - } + }, ); } return result as (typeof ALL_TARGETS)[number][]; @@ -86,20 +84,20 @@ const appleTarget = new Option("--apple", "Use all Apple targets"); const androidTarget = new Option("--android", "Use all Android targets"); const ndkVersionOption = new Option( "--ndk-version ", - "The NDK version to use for Android builds" + "The NDK version to use for Android builds", ).default(DEFAULT_NDK_VERSION); const xcframeworkExtensionOption = new Option( "--xcframework-extension", - "Don't rename the xcframework to .apple.node" + "Don't rename the xcframework to .apple.node", ).default(false); const outputPathOption = new Option( "--output ", - "Writing outputs to this directory" + "Writing outputs to this directory", ).default(process.cwd()); const configurationOption = new Option( "--configuration ", - "Build configuration" + "Build configuration", ) .choices(["debug", "release"]) .default("debug"); @@ -153,11 +151,11 @@ export const buildCommand = new Command("build") chalk.yellowBright("β„Ή"), chalk.dim( `Using default targets, pass ${chalk.italic( - "--android" + "--android", )}, ${chalk.italic("--apple")} or individual ${chalk.italic( - "--target" - )} options, to avoid this.` - ) + "--target", + )} options, to avoid this.`, + ), ); } ensureCargo(); @@ -169,14 +167,14 @@ export const buildCommand = new Command("build") const targetsDescription = targets.size + (targets.size === 1 ? " target" : " targets") + - chalk.dim(" (" + [...targets].join(", ") + ")"); + chalk.dim(` (${[...targets].join(", ")})`); const [appleLibraries, androidLibraries] = await oraPromise( Promise.all([ Promise.all( appleTargets.map( async (target) => - [target, await build({ configuration, target })] as const - ) + [target, await build({ configuration, target })] as const, + ), ), Promise.all( androidTargets.map( @@ -189,15 +187,15 @@ export const buildCommand = new Command("build") ndkVersion, androidApiLevel: ANDROID_API_LEVEL, }), - ] as const - ) + ] as const, + ), ), ]), { text: `Building ${targetsDescription}`, successText: `Built ${targetsDescription}`, failText: (error: Error) => `Failed to build: ${error.message}`, - } + }, ); if (androidLibraries.length > 0) { @@ -205,15 +203,15 @@ export const buildCommand = new Command("build") androidLibraries.map(([target, outputPath]) => [ ANDROID_TRIPLET_PER_TARGET[target], outputPath, - ]) + ]), ) as Record; const androidLibsFilename = determineAndroidLibsFilename( - Object.values(libraryPathByTriplet) + Object.values(libraryPathByTriplet), ); const androidLibsOutputPath = path.resolve( outputPath, - androidLibsFilename + androidLibsFilename, ); await oraPromise( @@ -225,11 +223,11 @@ export const buildCommand = new Command("build") { text: "Assembling Android libs directory", successText: `Android libs directory assembled into ${prettyPath( - androidLibsOutputPath + androidLibsOutputPath, )}`, failText: ({ message }) => `Failed to assemble Android libs directory: ${message}`, - } + }, ); } @@ -238,13 +236,13 @@ export const buildCommand = new Command("build") const frameworkPaths = libraryPaths.map(createAppleFramework); const xcframeworkFilename = determineXCFrameworkFilename( frameworkPaths, - xcframeworkExtension ? ".xcframework" : ".apple.node" + xcframeworkExtension ? ".xcframework" : ".apple.node", ); // Create the xcframework const xcframeworkOutputPath = path.resolve( outputPath, - xcframeworkFilename + xcframeworkFilename, ); await oraPromise( @@ -256,11 +254,11 @@ export const buildCommand = new Command("build") { text: "Assembling XCFramework", successText: `XCFramework assembled into ${chalk.dim( - path.relative(process.cwd(), xcframeworkOutputPath) + path.relative(process.cwd(), xcframeworkOutputPath), )}`, failText: ({ message }) => `Failed to assemble XCFramework: ${message}`, - } + }, ); } @@ -280,11 +278,11 @@ export const buildCommand = new Command("build") { text: "Generating TypeScript declarations", successText: `Generated TypeScript declarations ${prettyPath( - declarationsPath + declarationsPath, )}`, failText: (error) => `Failed to generate TypeScript declarations: ${error.message}`, - } + }, ); const entrypointPath = path.join(outputPath, `${libraryName}.js`); @@ -297,11 +295,11 @@ export const buildCommand = new Command("build") { text: `Generating entrypoint`, successText: `Generated entrypoint into ${prettyPath( - entrypointPath + entrypointPath, )}`, failText: (error) => `Failed to generate entrypoint: ${error.message}`, - } + }, ); } catch (error) { process.exitCode = 1; @@ -318,18 +316,18 @@ export const buildCommand = new Command("build") chalk.green("FIX"), error.fix.command ? chalk.dim("Run: ") + error.fix.command - : error.fix.instructions + : error.fix.instructions, ); } } else { throw error; } } - } + }, ); async function combineLibraries( - libraries: Readonly<[AppleTargetName, string]>[] + libraries: Readonly<[AppleTargetName, string]>[], ): Promise { const result = []; const darwinLibraries = []; @@ -352,7 +350,7 @@ async function combineLibraries( successText: "Combined Darwin libraries into a universal library", failText: (error) => `Failed to combine Darwin libraries: ${error.message}`, - } + }, ); return [...result, universalPath]; } diff --git a/packages/ferric/src/cargo.ts b/packages/ferric/src/cargo.ts index 16d2f38e..903b7794 100644 --- a/packages/ferric/src/cargo.ts +++ b/packages/ferric/src/cargo.ts @@ -5,17 +5,16 @@ import path from "node:path"; import { spawn } from "bufout"; import chalk from "chalk"; +import { weakNodeApiPath } from "react-native-node-api"; import { assertFixable, UsageError } from "./errors.js"; import { - AndroidTargetName, - AppleTargetName, + type AndroidTargetName, + type AppleTargetName, isAndroidTarget, isAppleTarget, } from "./targets.js"; -import { weakNodeApiPath } from "react-native-node-api"; - const APPLE_XCFRAMEWORK_CHILDS_PER_TARGET: Record = { "aarch64-apple-darwin": "macos-arm64_x86_64", // Universal "x86_64-apple-darwin": "macos-arm64_x86_64", // Universal @@ -54,7 +53,7 @@ export function ensureCargo() { } catch (error) { throw new UsageError( "You need a Rust toolchain: https://doc.rust-lang.org/cargo/getting-started/installation.html#install-rust-and-cargo", - { cause: error } + { cause: error }, ); } } @@ -83,18 +82,20 @@ export async function build(options: BuildOptions) { ...getTargetEnvironmentVariables(options), }, }); + const modeConfig = + configuration.toLowerCase() === "release" ? "--release" : ""; const targetOutputPath = joinPathAndAssertExistence( process.cwd(), "target", target, - configuration + modeConfig, ); const dynamicLibraryFile = fs .readdirSync(targetOutputPath) .filter((file) => file.endsWith(".so") || file.endsWith(".dylib")); assert( dynamicLibraryFile.length === 1, - `Expected a single shared object file in ${targetOutputPath}` + `Expected a single shared object file in ${targetOutputPath}`, ); return joinPathAndAssertExistence(targetOutputPath, dynamicLibraryFile[0]); } @@ -126,7 +127,7 @@ export function getWeakNodeApiFrameworkPath(target: AppleTargetName) { return joinPathAndAssertExistence( weakNodeApiPath, "weak-node-api.xcframework", - APPLE_XCFRAMEWORK_CHILDS_PER_TARGET[target] + APPLE_XCFRAMEWORK_CHILDS_PER_TARGET[target], ); } @@ -134,7 +135,7 @@ export function getWeakNodeApiAndroidLibraryPath(target: AndroidTargetName) { return joinPathAndAssertExistence( weakNodeApiPath, "weak-node-api.android.node", - ANDROID_ARCH_PR_TARGET[target] + ANDROID_ARCH_PR_TARGET[target], ); } @@ -152,7 +153,7 @@ export function getTargetEnvironmentVariables({ `Missing ANDROID_HOME environment variable`, { instructions: "Set ANDROID_HOME to the Android SDK directory", - } + }, ); const ndkPath = path.join(ANDROID_HOME, "ndk", ndkVersion); assertFixable(fs.existsSync(ndkPath), `Expected NDK at ${ndkPath}`, { @@ -175,35 +176,35 @@ export function getTargetEnvironmentVariables({ ].join(String.fromCharCode(0x1f)), CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER: joinPathAndAssertExistence( toolchainBinPath, - `aarch64-linux-android${androidApiLevel}-clang${cmdMaybe}` + `aarch64-linux-android${androidApiLevel}-clang${cmdMaybe}`, ), CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER: joinPathAndAssertExistence( toolchainBinPath, - `armv7a-linux-androideabi${androidApiLevel}-clang${cmdMaybe}` + `armv7a-linux-androideabi${androidApiLevel}-clang${cmdMaybe}`, ), CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER: joinPathAndAssertExistence( toolchainBinPath, - `x86_64-linux-android${androidApiLevel}-clang${cmdMaybe}` + `x86_64-linux-android${androidApiLevel}-clang${cmdMaybe}`, ), CARGO_TARGET_I686_LINUX_ANDROID_LINKER: joinPathAndAssertExistence( toolchainBinPath, - `i686-linux-android${androidApiLevel}-clang${cmdMaybe}` + `i686-linux-android${androidApiLevel}-clang${cmdMaybe}`, ), TARGET_CC: joinPathAndAssertExistence( toolchainBinPath, - `${targetArch}-linux-${targetPlatform}-clang${cmdMaybe}` + `${targetArch}-linux-${targetPlatform}-clang${cmdMaybe}`, ), TARGET_CXX: joinPathAndAssertExistence( toolchainBinPath, - `${targetArch}-linux-${targetPlatform}-clang++${cmdMaybe}` + `${targetArch}-linux-${targetPlatform}-clang++${cmdMaybe}`, ), TARGET_AR: joinPathAndAssertExistence( toolchainBinPath, - `llvm-ar${exeMaybe}` + `llvm-ar${exeMaybe}`, ), TARGET_RANLIB: joinPathAndAssertExistence( toolchainBinPath, - `llvm-ranlib${exeMaybe}` + `llvm-ranlib${exeMaybe}`, ), ANDROID_NDK: ndkPath, PATH: `${toolchainBinPath}:${process.env.PATH}`, diff --git a/packages/ferric/src/errors.ts b/packages/ferric/src/errors.ts index b27489b9..fbdc8480 100644 --- a/packages/ferric/src/errors.ts +++ b/packages/ferric/src/errors.ts @@ -15,7 +15,7 @@ export class UsageError extends Error { constructor( message: string, - { fix, cause }: { cause?: unknown; fix?: Fix } = {} + { fix, cause }: { cause?: unknown; fix?: Fix } = {}, ) { super(message, { cause }); this.fix = fix; @@ -25,7 +25,7 @@ export class UsageError extends Error { export function assertFixable( value: unknown, message: string, - fix: Fix + fix: Fix, ): asserts value { try { assert(value, message); diff --git a/packages/ferric/src/generate.ts b/packages/ferric/src/generate.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/ferric/src/napi-rs.ts b/packages/ferric/src/napi-rs.ts index 95330b39..fbba24e3 100644 --- a/packages/ferric/src/napi-rs.ts +++ b/packages/ferric/src/napi-rs.ts @@ -32,7 +32,7 @@ export async function generateTypeScriptDeclarations({ }: TypeScriptDeclarationsOptions) { // Using a temporary directory to avoid polluting crate with any other side-effects for generating TypeScript declarations const tempPath = fs.realpathSync( - fs.mkdtempSync(path.join(PACKAGE_ROOT, "dts-tmp-")) + fs.mkdtempSync(path.join(PACKAGE_ROOT, "dts-tmp-")), ); const finalOutputPath = path.join(outputPath, outputFilename); try { @@ -40,7 +40,7 @@ export async function generateTypeScriptDeclarations({ await fs.promises.writeFile( path.join(tempPath, "package.json"), "{}", - "utf8" + "utf8", ); const tempOutputPath = path.join(tempPath, outputFilename); // Call into napi.rs to generate TypeScript declarations @@ -55,12 +55,12 @@ export async function generateTypeScriptDeclarations({ // Override the banner assert( fs.existsSync(tempOutputPath), - `Expected napi.rs to emit ${tempOutputPath}` + `Expected napi.rs to emit ${tempOutputPath}`, ); const contents = await fs.promises.readFile(tempOutputPath, "utf8"); const patchedContents = contents.replace( "/* auto-generated by NAPI-RS */", - getBlockComment() + getBlockComment(), ); // Copy out the generated TypeScript declarations await fs.promises.writeFile(finalOutputPath, patchedContents, { diff --git a/packages/ferric/src/rustup.ts b/packages/ferric/src/rustup.ts index c4b101a6..36d11159 100644 --- a/packages/ferric/src/rustup.ts +++ b/packages/ferric/src/rustup.ts @@ -1,4 +1,4 @@ -import cp from "child_process"; +import cp from "node:child_process"; import { UsageError } from "./errors.js"; @@ -9,12 +9,12 @@ export function getInstalledTargets() { .execFileSync("rustup", ["target", "list", "--installed"], { encoding: "utf-8", }) - .split("\n") + .split("\n"), ); } catch (error) { throw new UsageError( "You need a Rust toolchain: https://doc.rust-lang.org/cargo/getting-started/installation.html#install-rust-and-cargo", - { cause: error } + { cause: error }, ); } } diff --git a/packages/ferric/src/targets.ts b/packages/ferric/src/targets.ts index 0ad090a4..c1990d16 100644 --- a/packages/ferric/src/targets.ts +++ b/packages/ferric/src/targets.ts @@ -66,14 +66,14 @@ export function ensureInstalledTargets(expectedTargets: Set) { `You're missing ${ missingTargets.size } targets - to fix this, run:\n\n${chalk.italic( - `rustup target add ${[...missingTargets].join(" ")}` - )}` + `rustup target add ${[...missingTargets].join(" ")}`, + )}`, ); } } export function isAndroidTarget( - target: TargetName + target: TargetName, ): target is AndroidTargetName { return ANDROID_TARGETS.includes(target as (typeof ANDROID_TARGETS)[number]); } @@ -84,15 +84,15 @@ export function isAppleTarget(target: TargetName): target is AppleTargetName { export function filterTargetsByPlatform( targets: Set, - platform: "android" + platform: "android", ): AndroidTargetName[]; export function filterTargetsByPlatform( targets: Set, - platform: "apple" + platform: "apple", ): AppleTargetName[]; export function filterTargetsByPlatform( targets: Set, - platform: "apple" | "android" + platform: "apple" | "android", ) { if (platform === "android") { return [...targets].filter(isAndroidTarget); diff --git a/packages/ferric/src/templates.ts b/packages/ferric/src/templates.ts new file mode 100644 index 00000000..2800ab51 --- /dev/null +++ b/packages/ferric/src/templates.ts @@ -0,0 +1,58 @@ +export function cargoTomlTemplate(projectName: string) { + return ` +[package] +name = ${projectName} +version = "1.0.0" +edition = "2021" +license = "MIT" + +[lib] +crate-type = ["cdylib"] + +[dependencies.napi] +version = "3.1" +default-features = false +# see https://nodejs.org/api/n-api.html#node-api-version-matrix +features = ["napi4"] + +[dependencies.napi-derive] +version = "3.1" +features = ["type-def"] + +[build-dependencies] +napi-build = "2" + +[profile.release] +lto = true +codegen-units = 1 +strip = "symbols" +opt-level = "z" +panic = "abort" +`; +} + +export const GIT_IGNORE_TEMPLATE = ` +target +Cargo.lock + +*.xcframework/ +*.apple.node/ +*.android.node/ + +dist +`; + +export const BUILD_RS_TEMPLATE = ` +fn main() { + napi_build::setup(); +} +`; + +export const LIB_RS_TEMPLATE = ` +use napi_derive::napi; + +#[napi] +pub fn sum(a: i32, b: i32) -> i32 { + a + b +} +`; diff --git a/packages/gyp-to-cmake/src/cli.ts b/packages/gyp-to-cmake/src/cli.ts index 77a4f92d..91b64b9c 100644 --- a/packages/gyp-to-cmake/src/cli.ts +++ b/packages/gyp-to-cmake/src/cli.ts @@ -26,7 +26,7 @@ export function transformBindingGypFile( disallowUnknownProperties, projectName = generateProjectName(gypPath), ...restOfOptions - }: TransformOptions + }: TransformOptions, ) { console.log("Transforming", gypPath); const gyp = readBindingFile(gypPath, disallowUnknownProperties); @@ -42,7 +42,7 @@ export function transformBindingGypFile( export function transformBindingGypsRecursively( directoryPath: string, - options: TransformOptions + options: TransformOptions, ) { const entries = fs.readdirSync(directoryPath, { withFileTypes: true }); for (const entry of entries) { @@ -57,11 +57,14 @@ export function transformBindingGypsRecursively( export const program = new Command("gyp-to-cmake") .description("Transform binding.gyp to CMakeLists.txt") - .option("--no-path-transforms", "Don't transform output from command expansions (replacing '\\' with '/')") + .option( + "--no-path-transforms", + "Don't transform output from command expansions (replacing '\\' with '/')", + ) .argument( "[path]", "Path to the binding.gyp file or directory to traverse recursively", - process.cwd() + process.cwd(), ) .action((targetPath: string, { pathTransforms }) => { const options: TransformOptions = { diff --git a/packages/gyp-to-cmake/src/gyp.test.ts b/packages/gyp-to-cmake/src/gyp.test.ts index 5528bff8..7c4e7b47 100644 --- a/packages/gyp-to-cmake/src/gyp.test.ts +++ b/packages/gyp-to-cmake/src/gyp.test.ts @@ -1,5 +1,5 @@ -import { describe, it } from "node:test"; import assert from "node:assert/strict"; +import { describe, it } from "node:test"; import { assertBinding } from "./gyp.js"; @@ -28,7 +28,7 @@ describe("gyp.assertRoot", () => { { targets: [{ target_name: "", sources: [], extra: "not allowed" }], }, - true + true, ); }, /Unexpected property: extra/); }); diff --git a/packages/gyp-to-cmake/src/gyp.ts b/packages/gyp-to-cmake/src/gyp.ts index fdd209ef..c1d17341 100644 --- a/packages/gyp-to-cmake/src/gyp.ts +++ b/packages/gyp-to-cmake/src/gyp.ts @@ -16,7 +16,7 @@ export type GypBinding = { function assertNoExtraProperties( input: T, - expectedKeys: string[] + expectedKeys: string[], ) { for (const key of Object.keys(input)) { if (!expectedKeys.includes(key)) { @@ -27,7 +27,7 @@ function assertNoExtraProperties( export function assertTarget( target: unknown, - disallowUnknownProperties = false + disallowUnknownProperties = false, ): asserts target is GypTarget { assert(typeof target === "object" && target !== null, "Expected an object"); assert("target_name" in target, "Expected a 'target_name' property"); @@ -36,17 +36,17 @@ export function assertTarget( assert(Array.isArray(sources), "Expected a 'sources' array"); assert( sources.every((source) => typeof source === "string"), - "Expected all sources to be strings" + "Expected all sources to be strings", ); if ("include_dirs" in target) { const { include_dirs } = target; assert( Array.isArray(include_dirs), - "Expected 'include_dirs' to be an array" + "Expected 'include_dirs' to be an array", ); assert( include_dirs.every((dir) => typeof dir === "string"), - "Expected all include_dirs to be strings" + "Expected all include_dirs to be strings", ); } if (disallowUnknownProperties) { @@ -56,7 +56,7 @@ export function assertTarget( export function assertBinding( json: unknown, - disallowUnknownProperties = false + disallowUnknownProperties = false, ): asserts json is GypBinding { assert(typeof json === "object" && json !== null, "Expected an object"); assert("targets" in json, "Expected a 'targets' property"); @@ -72,7 +72,7 @@ export function assertBinding( export function readBindingFile( path: string, - disallowUnknownProperties = false + disallowUnknownProperties = false, ): GypBinding { try { const contents = fs.readFileSync(path, "utf-8"); diff --git a/packages/gyp-to-cmake/src/run.ts b/packages/gyp-to-cmake/src/run.ts index c64a70b0..f4f89314 100644 --- a/packages/gyp-to-cmake/src/run.ts +++ b/packages/gyp-to-cmake/src/run.ts @@ -1,2 +1,3 @@ import { program } from "./cli.js"; + program.parse(process.argv); diff --git a/packages/gyp-to-cmake/src/transformer.test.ts b/packages/gyp-to-cmake/src/transformer.test.ts index cfea9e14..06d62f8f 100644 --- a/packages/gyp-to-cmake/src/transformer.test.ts +++ b/packages/gyp-to-cmake/src/transformer.test.ts @@ -46,7 +46,9 @@ describe("bindingGypToCmakeLists", () => { }, }); - assert(output.includes("add_library(foo SHARED file/with/win32/separator.cc")); + assert( + output.includes("add_library(foo SHARED file/with/win32/separator.cc"), + ); }); it("escapes spaces in source filenames", () => { @@ -117,9 +119,9 @@ describe("bindingGypToCmakeLists", () => { assert( output.includes( - "target_compile_definitions(foo PRIVATE FOO BAR=value)" + "target_compile_definitions(foo PRIVATE FOO BAR=value)", ), - `Expected output to include target_compile_definitions:\n${output}` + `Expected output to include target_compile_definitions:\n${output}`, ); }); }); diff --git a/packages/gyp-to-cmake/src/transformer.ts b/packages/gyp-to-cmake/src/transformer.ts index d6fbeb65..01096501 100644 --- a/packages/gyp-to-cmake/src/transformer.ts +++ b/packages/gyp-to-cmake/src/transformer.ts @@ -105,7 +105,7 @@ export function bindingGypToCmakeLists({ ? [ `target_compile_definitions(${targetName} PRIVATE ${escapedJoinedDefines})`, ] - : []) + : []), // or // `set_target_properties(${targetName} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO)`, ); @@ -117,7 +117,7 @@ export function bindingGypToCmakeLists({ "if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)", " # Generate node.lib", " execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})", - "endif()" + "endif()", ); return lines.join("\n"); diff --git a/packages/host/scripts/generate-weak-node-api-injector.ts b/packages/host/scripts/generate-weak-node-api-injector.ts index 129d2fc0..df1d4536 100644 --- a/packages/host/scripts/generate-weak-node-api-injector.ts +++ b/packages/host/scripts/generate-weak-node-api-injector.ts @@ -1,8 +1,8 @@ +import cp from "node:child_process"; import fs from "node:fs"; import path from "node:path"; -import cp from "node:child_process"; -import { FunctionDecl, getNodeApiFunctions } from "./node-api-functions"; +import { type FunctionDecl, getNodeApiFunctions } from "./node-api-functions"; export const CPP_SOURCE_PATH = path.join(__dirname, "../cpp"); @@ -60,7 +60,7 @@ export function generateSource(functions: FunctionDecl[]) { ${functions .filter( ({ kind, name }) => - kind === "engine" || IMPLEMENTED_RUNTIME_FUNCTIONS.includes(name) + kind === "engine" || IMPLEMENTED_RUNTIME_FUNCTIONS.includes(name), ) .flatMap(({ name }) => `.${name} = ${name},`) .join("\n")} diff --git a/packages/host/scripts/generate-weak-node-api.ts b/packages/host/scripts/generate-weak-node-api.ts index 23a3c89d..8177cb18 100644 --- a/packages/host/scripts/generate-weak-node-api.ts +++ b/packages/host/scripts/generate-weak-node-api.ts @@ -1,8 +1,8 @@ +import cp from "node:child_process"; import fs from "node:fs"; import path from "node:path"; -import cp from "node:child_process"; -import { FunctionDecl, getNodeApiFunctions } from "./node-api-functions"; +import { type FunctionDecl, getNodeApiFunctions } from "./node-api-functions"; export const WEAK_NODE_API_PATH = path.join(__dirname, "../weak-node-api"); @@ -21,7 +21,7 @@ export function generateHeader(functions: FunctionDecl[]) { ({ returnType, noReturn, name, argumentTypes }) => `${returnType} ${ noReturn ? " __attribute__((noreturn))" : "" - }(*${name})(${argumentTypes.join(", ")});` + }(*${name})(${argumentTypes.join(", ")});`, ), "};", "typedef void(*InjectHostFunction)(const WeakNodeApiHost&);", diff --git a/packages/host/scripts/node-api-functions.ts b/packages/host/scripts/node-api-functions.ts index ad532ae1..c2f2ee90 100644 --- a/packages/host/scripts/node-api-functions.ts +++ b/packages/host/scripts/node-api-functions.ts @@ -1,11 +1,11 @@ import assert from "node:assert/strict"; -import path from "node:path"; import cp from "node:child_process"; +import path from "node:path"; import { type NodeApiVersion, - symbols, include_dir as nodeApiIncludePath, + symbols, } from "node-api-headers"; import { z } from "zod"; @@ -20,7 +20,7 @@ const clangAstDump = z.object({ qualType: z.string(), }) .optional(), - }) + }), ), }); @@ -49,7 +49,7 @@ export function getNodeApiHeaderAST(version: NodeApiVersion) { encoding: "utf-8", // Emitting the AST can produce a lot of output maxBuffer: 1024 * 1024 * 10, - } + }, ); const parsed = JSON.parse(output); return clangAstDump.parse(parsed); @@ -86,24 +86,24 @@ export function getNodeApiFunctions(version: NodeApiVersion = "v8") { assert(node.type, `Expected type for ${node.name}`); const match = node.type.qualType.match( - /^(?[^(]+) \((?[^)]+)\)/ + /^(?[^(]+) \((?[^)]+)\)/, ); assert( - match && match.groups, - `Failed to parse function type: ${node.type.qualType}` + match?.groups, + `Failed to parse function type: ${node.type.qualType}`, ); const { returnType, argumentTypes } = match.groups; assert( returnType, - `Failed to get return type from ${node.type.qualType}` + `Failed to get return type from ${node.type.qualType}`, ); assert( argumentTypes, - `Failed to get argument types from ${argumentTypes}` + `Failed to get argument types from ${argumentTypes}`, ); assert( returnType === "napi_status" || returnType === "void", - `Expected return type to be napi_status, got ${returnType}` + `Expected return type to be napi_status, got ${returnType}`, ); nodeApiFunctions.push({ @@ -128,7 +128,7 @@ export function getNodeApiFunctions(version: NodeApiVersion = "v8") { for (const knownSymbol of allSymbols) { if (!foundSymbols.has(knownSymbol)) { throw new Error( - `Missing symbol '${knownSymbol}' in the AST for Node API ${version}` + `Missing symbol '${knownSymbol}' in the AST for Node API ${version}`, ); } } diff --git a/packages/host/src/node/babel-plugin/plugin.test.ts b/packages/host/src/node/babel-plugin/plugin.test.ts index 349864b9..a40fe195 100644 --- a/packages/host/src/node/babel-plugin/plugin.test.ts +++ b/packages/host/src/node/babel-plugin/plugin.test.ts @@ -1,11 +1,10 @@ import assert from "node:assert/strict"; -import { describe, it, TestContext } from "node:test"; import path from "node:path"; +import { describe, it, type TestContext } from "node:test"; import { transformFileSync } from "@babel/core"; - -import { plugin, PluginOptions } from "./plugin.js"; import { setupTempDirectory } from "../test-utils.js"; +import { type PluginOptions, plugin } from "./plugin.js"; type TestTransformationOptions = { files: Record; @@ -16,13 +15,13 @@ type TestTransformationOptions = { function itTransforms( title: string, - { files, inputFilePath, assertion, options = {} }: TestTransformationOptions + { files, inputFilePath, assertion, options = {} }: TestTransformationOptions, ) { it(`transforms ${title}`, (context: TestContext) => { const tempDirectoryPath = setupTempDirectory(context, files); const result = transformFileSync( path.join(tempDirectoryPath, inputFilePath), - { plugins: [[plugin, options]] } + { plugins: [[plugin, options]] }, ); assert(result, "Expected transformation to produce a result"); const { code } = result; @@ -36,12 +35,12 @@ function assertIncludes(needle: string, { reverse = false } = {}) { if (reverse) { assert( !code.includes(needle), - `Expected code to not include: ${needle}, got ${code}` + `Expected code to not include: ${needle}, got ${code}`, ); } else { assert( code.includes(needle), - `Expected code to include: ${needle}, got ${code}` + `Expected code to include: ${needle}, got ${code}`, ); } }; @@ -91,7 +90,7 @@ describe("plugin", () => { inputFilePath: "index.js", options: { pathSuffix: "keep" }, assertion: assertIncludes( - `requireNodeAddon("my-package--sub-dir-my-addon")` + `requireNodeAddon("my-package--sub-dir-my-addon")`, ), }); @@ -170,7 +169,7 @@ describe("plugin", () => { inputFilePath: "index.js", options: { pathSuffix: "keep" }, assertion: assertIncludes( - `requireNodeAddon("my-package--build-Release-my-addon")` + `requireNodeAddon("my-package--build-Release-my-addon")`, ), }); diff --git a/packages/host/src/node/babel-plugin/plugin.ts b/packages/host/src/node/babel-plugin/plugin.ts index 92792910..5db5eb3d 100644 --- a/packages/host/src/node/babel-plugin/plugin.ts +++ b/packages/host/src/node/babel-plugin/plugin.ts @@ -1,16 +1,16 @@ import assert from "node:assert/strict"; import path from "node:path"; -import type { PluginObj, NodePath } from "@babel/core"; +import type { NodePath, PluginObj } from "@babel/core"; import * as t from "@babel/types"; import { + assertPathSuffix, + findNodeAddonForBindings, getLibraryName, isNodeApiModule, - findNodeAddonForBindings, - NamingStrategy, - PathSuffixChoice, - assertPathSuffix, + type NamingStrategy, + type PathSuffixChoice, } from "../path-utils"; export type PluginOptions = { @@ -36,7 +36,7 @@ function assertOptions(opts: unknown): asserts opts is PluginOptions { export function replaceWithRequireNodeAddon( p: NodePath, modulePath: string, - naming: NamingStrategy + naming: NamingStrategy, ) { const requireCallArgument = getLibraryName(modulePath, naming); p.replaceWith( @@ -45,10 +45,10 @@ export function replaceWithRequireNodeAddon( t.callExpression(t.identifier("require"), [ t.stringLiteral("react-native-node-api"), ]), - t.identifier("requireNodeAddon") + t.identifier("requireNodeAddon"), ), - [t.stringLiteral(requireCallArgument)] - ) + [t.stringLiteral(requireCallArgument)], + ), ); } diff --git a/packages/host/src/node/cli/android.ts b/packages/host/src/node/cli/android.ts index 4acae601..a48cc36e 100644 --- a/packages/host/src/node/cli/android.ts +++ b/packages/host/src/node/cli/android.ts @@ -5,8 +5,8 @@ import path from "node:path"; import { getLatestMtime, getLibraryName, MAGIC_FILENAME } from "../path-utils"; import { getLinkedModuleOutputPath, - LinkModuleResult, type LinkModuleOptions, + type LinkModuleResult, } from "./link-modules"; const ANDROID_ARCHITECTURES = [ @@ -55,7 +55,7 @@ export async function linkAndroidDir({ const libraryPath = path.join(libraryDirent.parentPath, libraryDirent.name); await fs.promises.rename( libraryPath, - path.join(archPath, `lib${libraryName}.so`) + path.join(archPath, `lib${libraryName}.so`), ); } await fs.promises.rm(path.join(outputPath, MAGIC_FILENAME), { diff --git a/packages/host/src/node/cli/apple.ts b/packages/host/src/node/cli/apple.ts index 47be74d1..fb344caf 100644 --- a/packages/host/src/node/cli/apple.ts +++ b/packages/host/src/node/cli/apple.ts @@ -1,15 +1,15 @@ import assert from "node:assert/strict"; -import path from "node:path"; import fs from "node:fs"; import os from "node:os"; +import path from "node:path"; import { spawn } from "bufout"; import { getLatestMtime, getLibraryName } from "../path-utils.js"; import { getLinkedModuleOutputPath, - LinkModuleOptions, - LinkModuleResult, + type LinkModuleOptions, + type LinkModuleResult, } from "./link-modules.js"; type UpdateInfoPlistOptions = { @@ -30,7 +30,7 @@ export async function updateInfoPlist({ // TODO: Use a proper plist parser const updatedContents = infoPlistContents.replaceAll( oldLibraryName, - newLibraryName + newLibraryName, ); await fs.promises.writeFile(filePath, updatedContents, "utf-8"); } @@ -45,7 +45,7 @@ export async function linkXcframework({ const newLibraryName = getLibraryName(modulePath, naming); const outputPath = getLinkedModuleOutputPath(platform, modulePath, naming); const tempPath = await fs.promises.mkdtemp( - path.join(os.tmpdir(), `react-native-node-api-${newLibraryName}-`) + path.join(os.tmpdir(), `react-native-node-api-${newLibraryName}-`), ); try { if (incremental && fs.existsSync(outputPath)) { @@ -67,7 +67,7 @@ export async function linkXcframework({ // Following extracted function mimics `glob("*/*.framework/")` function globFrameworkDirs( startPath: string, - fn: (parentPath: string, name: string) => Promise + fn: (parentPath: string, name: string) => Promise, ) { return fs .readdirSync(startPath, { withFileTypes: true }) @@ -79,10 +79,11 @@ export async function linkXcframework({ .filter( (frameworkEntry) => frameworkEntry.isDirectory() && - path.extname(frameworkEntry.name) === ".framework" + path.extname(frameworkEntry.name) === ".framework", ) - .flatMap(async (frameworkEntry) => - await fn(tripletPath, frameworkEntry.name) + .flatMap( + async (frameworkEntry) => + await fn(tripletPath, frameworkEntry.name), ); }); } @@ -94,18 +95,18 @@ export async function linkXcframework({ const oldLibraryPath = path.join(frameworkPath, oldLibraryName); const newFrameworkPath = path.join( tripletPath, - `${newLibraryName}.framework` + `${newLibraryName}.framework`, ); const newLibraryPath = path.join(newFrameworkPath, newLibraryName); assert( fs.existsSync(oldLibraryPath), - `Expected a library at '${oldLibraryPath}'` + `Expected a library at '${oldLibraryPath}'`, ); // Rename the library await fs.promises.rename( oldLibraryPath, // Cannot use newLibraryPath here, because the framework isn't renamed yet - path.join(frameworkPath, newLibraryName) + path.join(frameworkPath, newLibraryName), ); // Rename the framework await fs.promises.rename(frameworkPath, newFrameworkPath); @@ -121,7 +122,7 @@ export async function linkXcframework({ ], { outputMode: "buffered", - } + }, ); // Update the Info.plist file for the framework await updateInfoPlist({ @@ -130,7 +131,7 @@ export async function linkXcframework({ newLibraryName, }); return newFrameworkPath; - }) + }), ); // Create a new xcframework from the renamed frameworks @@ -147,7 +148,7 @@ export async function linkXcframework({ ], { outputMode: "buffered", - } + }, ); return { diff --git a/packages/host/src/node/cli/hermes.ts b/packages/host/src/node/cli/hermes.ts index a7c875a5..d37872ad 100644 --- a/packages/host/src/node/cli/hermes.ts +++ b/packages/host/src/node/cli/hermes.ts @@ -3,7 +3,7 @@ import fs from "node:fs"; import path from "node:path"; import { Command } from "@commander-js/extra-typings"; -import { spawn, SpawnFailure } from "bufout"; +import { SpawnFailure, spawn } from "bufout"; import { oraPromise } from "ora"; import { packageDirectorySync } from "pkg-dir"; @@ -19,7 +19,7 @@ export const command = new Command("vendor-hermes") .option( "--force", "Don't check timestamps of input files to skip unnecessary rebuilds", - false + false, ) .action(async (from, { force, silent }) => { try { @@ -29,12 +29,12 @@ export const command = new Command("vendor-hermes") require.resolve("react-native/package.json", { // Ensures we'll be patching the React Native package actually used by the app paths: [appPackageRoot], - }) + }), ); const hermesVersionPath = path.join( reactNativePath, "sdks", - ".hermesversion" + ".hermesversion", ); const hermesVersion = fs.readFileSync(hermesVersionPath, "utf8").trim(); if (!silent) { @@ -43,7 +43,7 @@ export const command = new Command("vendor-hermes") const reactNativeJsiPath = path.join( reactNativePath, - "ReactCommon/jsi/jsi/" + "ReactCommon/jsi/jsi/", ); const hermesPath = path.join(HOST_PACKAGE_ROOT, "hermes"); @@ -56,7 +56,7 @@ export const command = new Command("vendor-hermes") failText: (error) => `Failed to remove existing Hermes clone: ${error.message}`, isEnabled: !silent, - } + }, ); } if (!fs.existsSync(hermesPath)) { @@ -77,7 +77,7 @@ export const command = new Command("vendor-hermes") ], { outputMode: "buffered", - } + }, ), { text: `Cloning custom Hermes into ${prettyPath(hermesPath)}`, @@ -85,14 +85,14 @@ export const command = new Command("vendor-hermes") failText: (err) => `Failed to clone custom Hermes: ${err.message}`, isEnabled: !silent, - } + }, ); } catch (error) { if (error instanceof SpawnFailure) { error.flushOutput("both"); console.error( `\nπŸ›‘ React Native uses the ${hermesVersion} tag and cloning our fork failed.`, - `Please see the Node-API package's peer dependency on "react-native" for supported versions.` + `Please see the Node-API package's peer dependency on "react-native" for supported versions.`, ); process.exitCode = 1; return; @@ -105,7 +105,7 @@ export const command = new Command("vendor-hermes") assert( fs.existsSync(hermesJsiPath), - `Hermes JSI path does not exist: ${hermesJsiPath}` + `Hermes JSI path does not exist: ${hermesJsiPath}`, ); await oraPromise( @@ -118,7 +118,7 @@ export const command = new Command("vendor-hermes") failText: (err) => `Failed to copy JSI from Hermes to React Native: ${err.message}`, isEnabled: !silent, - } + }, ); console.log(hermesPath); } catch (error) { diff --git a/packages/host/src/node/cli/link-modules.ts b/packages/host/src/node/cli/link-modules.ts index 5bb18d80..d6caeca1 100644 --- a/packages/host/src/node/cli/link-modules.ts +++ b/packages/host/src/node/cli/link-modules.ts @@ -1,20 +1,20 @@ -import path from "node:path"; import fs from "node:fs"; +import path from "node:path"; import { SpawnFailure } from "bufout"; +import chalk from "chalk"; import { findNodeApiModulePathsByDependency, getAutolinkPath, getLibraryName, logModulePaths, - NamingStrategy, - PlatformName, + type NamingStrategy, + type PlatformName, prettyPath, } from "../path-utils"; -import chalk from "chalk"; export type ModuleLinker = ( - options: LinkModuleOptions + options: LinkModuleOptions, ) => Promise; export type LinkModulesOptions = { @@ -71,8 +71,8 @@ export async function linkModules({ const absoluteModulePaths = Object.values(dependenciesByName).flatMap( (dependency) => dependency.modulePaths.map((modulePath) => - path.join(dependency.path, modulePath) - ) + path.join(dependency.path, modulePath), + ), ); if (hasDuplicateLibraryNames(absoluteModulePaths, naming)) { @@ -100,13 +100,13 @@ export async function linkModules({ throw error; } } - }) + }), ); } export async function pruneLinkedModules( platform: PlatformName, - linkedModules: ModuleOutput[] + linkedModules: ModuleOutput[], ) { if (linkedModules.some(({ failure }) => failure)) { // Don't prune if any of the modules failed to copy @@ -122,17 +122,17 @@ export async function pruneLinkedModules( console.log( "🧹Deleting", prettyPath(candidatePath), - chalk.dim("(no longer linked)") + chalk.dim("(no longer linked)"), ); await fs.promises.rm(candidatePath, { recursive: true, force: true }); } - }) + }), ); } export function hasDuplicateLibraryNames( modulePaths: string[], - naming: NamingStrategy + naming: NamingStrategy, ): boolean { const libraryNames = modulePaths.map((modulePath) => { return getLibraryName(modulePath, naming); @@ -144,13 +144,13 @@ export function hasDuplicateLibraryNames( export function getLinkedModuleOutputPath( platform: PlatformName, modulePath: string, - naming: NamingStrategy + naming: NamingStrategy, ): string { const libraryName = getLibraryName(modulePath, naming); if (platform === "android") { return path.join(getAutolinkPath(platform), libraryName); } else if (platform === "apple") { - return path.join(getAutolinkPath(platform), libraryName + ".xcframework"); + return path.join(getAutolinkPath(platform), `${libraryName}.xcframework`); } else { throw new Error(`Unsupported platform: ${platform}`); } diff --git a/packages/host/src/node/cli/options.ts b/packages/host/src/node/cli/options.ts index 3e8b512b..1f81f306 100644 --- a/packages/host/src/node/cli/options.ts +++ b/packages/host/src/node/cli/options.ts @@ -9,7 +9,7 @@ if (typeof NODE_API_PATH_SUFFIX === "string") { export const pathSuffixOption = new Option( "--path-suffix ", - "Controls how the path of the addon inside a package is transformed into a library name" + "Controls how the path of the addon inside a package is transformed into a library name", ) .choices(PATH_SUFFIX_CHOICES) .default(NODE_API_PATH_SUFFIX || "strip"); diff --git a/packages/host/src/node/cli/program.ts b/packages/host/src/node/cli/program.ts index 0b629245..11ace89a 100644 --- a/packages/host/src/node/cli/program.ts +++ b/packages/host/src/node/cli/program.ts @@ -14,22 +14,25 @@ import { getLibraryName, logModulePaths, normalizeModulePath, - PlatformName, PLATFORMS, + type PlatformName, prettyPath, } from "../path-utils"; - +import { linkAndroidDir } from "./android"; +import { linkXcframework } from "./apple"; import { command as vendorHermes } from "./hermes"; +import { + linkModules, + type ModuleLinker, + pruneLinkedModules, +} from "./link-modules"; import { pathSuffixOption } from "./options"; -import { linkModules, pruneLinkedModules, ModuleLinker } from "./link-modules"; -import { linkXcframework } from "./apple"; -import { linkAndroidDir } from "./android"; // We're attaching a lot of listeners when spawning in parallel EventEmitter.defaultMaxListeners = 100; export const program = new Command("react-native-node-api").addCommand( - vendorHermes + vendorHermes, ); function getLinker(platform: PlatformName): ModuleLinker { @@ -58,12 +61,12 @@ program .option( "--force", "Don't check timestamps of input files to skip unnecessary rebuilds", - false + false, ) .option( "--prune", "Delete vendored modules that are no longer auto-linked", - true + true, ) .option("--android", "Link Android modules") .option("--apple", "Link Apple modules") @@ -81,7 +84,7 @@ program if (platforms.length === 0) { console.error( `No platform specified, pass one or more of:`, - ...PLATFORMS.map((platform) => chalk.bold(`\n --${platform}`)) + ...PLATFORMS.map((platform) => chalk.bold(`\n --${platform}`)), ); process.exitCode = 1; return; @@ -101,16 +104,16 @@ program }), { text: `Linking ${platformDisplayName} Node-API modules into ${prettyPath( - platformOutputPath + platformOutputPath, )}`, successText: `Linked ${platformDisplayName} Node-API modules into ${prettyPath( - platformOutputPath + platformOutputPath, )}`, failText: (error) => `Failed to link ${platformDisplayName} Node-API modules into ${prettyPath( - platformOutputPath + platformOutputPath, )}: ${error.message}`, - } + }, ); if (modules.length === 0) { @@ -122,7 +125,7 @@ program for (const { originalPath, outputPath, skipped } of linked) { const prettyOutputPath = outputPath - ? "β†’ " + prettyPath(path.basename(outputPath)) + ? `β†’ ${prettyPath(path.basename(outputPath))}` : ""; if (skipped) { console.log( @@ -130,14 +133,14 @@ program "Skipped", prettyPath(originalPath), prettyOutputPath, - "(up to date)" + "(up to date)", ); } else { console.log( chalk.greenBright("⚭"), "Linked", prettyPath(originalPath), - prettyOutputPath + prettyOutputPath, ); } } @@ -148,7 +151,7 @@ program "\n", chalk.redBright("βœ–"), "Failed to copy", - prettyPath(originalPath) + prettyPath(originalPath), ); console.error(failure.message); failure.flushOutput("both"); @@ -181,7 +184,7 @@ program const dependencyCount = Object.keys(dependencies).length; const xframeworkCount = Object.values(dependencies).reduce( (acc, { modulePaths }) => acc + modulePaths.length, - 0 + 0, ); console.log( "Found", @@ -190,17 +193,17 @@ program chalk.greenBright(dependencyCount), dependencyCount === 1 ? "package" : "packages", "from", - prettyPath(rootPath) + prettyPath(rootPath), ); for (const [dependencyName, dependency] of Object.entries(dependencies)) { console.log( chalk.blueBright(dependencyName), "β†’", - prettyPath(dependency.path) + prettyPath(dependency.path), ); logModulePaths( dependency.modulePaths.map((p) => path.join(dependency.path, p)), - { pathSuffix } + { pathSuffix }, ); } } @@ -209,7 +212,7 @@ program program .command("info ") .description( - "Utility to print, module path, the hash of a single Android library" + "Utility to print, module path, the hash of a single Android library", ) .addOption(pathSuffixOption) .action((pathInput, { pathSuffix }) => { diff --git a/packages/host/src/node/cli/run.ts b/packages/host/src/node/cli/run.ts index ee4c5620..da5566fe 100644 --- a/packages/host/src/node/cli/run.ts +++ b/packages/host/src/node/cli/run.ts @@ -1,2 +1,3 @@ import { program } from "./program"; + program.parseAsync(process.argv).catch(console.error); diff --git a/packages/host/src/node/index.ts b/packages/host/src/node/index.ts index 878eeb01..bd2320a2 100644 --- a/packages/host/src/node/index.ts +++ b/packages/host/src/node/index.ts @@ -1,27 +1,26 @@ -export { - SUPPORTED_TRIPLETS, - ANDROID_TRIPLETS, - APPLE_TRIPLETS, - type SupportedTriplet, - type AndroidTriplet, - type AppleTriplet, - isSupportedTriplet, - isAppleTriplet, - isAndroidTriplet, -} from "./prebuilds/triplets.js"; +export { determineLibraryBasename, prettyPath } from "./path-utils.js"; export { - determineAndroidLibsFilename, createAndroidLibsDirectory, + determineAndroidLibsFilename, } from "./prebuilds/android.js"; export { createAppleFramework, - createXCframework, createUniversalAppleLibrary, + createXCframework, determineXCFrameworkFilename, } from "./prebuilds/apple.js"; - -export { determineLibraryBasename, prettyPath } from "./path-utils.js"; +export { + ANDROID_TRIPLETS, + type AndroidTriplet, + APPLE_TRIPLETS, + type AppleTriplet, + isAndroidTriplet, + isAppleTriplet, + isSupportedTriplet, + SUPPORTED_TRIPLETS, + type SupportedTriplet, +} from "./prebuilds/triplets.js"; export { weakNodeApiPath } from "./weak-node-api.js"; diff --git a/packages/host/src/node/path-utils.test.ts b/packages/host/src/node/path-utils.test.ts index 3b1fafba..f7cde5d3 100644 --- a/packages/host/src/node/path-utils.test.ts +++ b/packages/host/src/node/path-utils.test.ts @@ -1,18 +1,18 @@ import assert from "node:assert/strict"; -import { describe, it } from "node:test"; -import path from "node:path"; import fs from "node:fs"; +import path from "node:path"; +import { describe, it } from "node:test"; import fswin from "fswin"; import { determineModuleContext, - findNodeApiModulePaths, findNodeAddonForBindings, + findNodeApiModulePaths, + findNodeApiModulePathsByDependency, findPackageDependencyPaths, getLibraryName, isNodeApiModule, stripExtension, - findNodeApiModulePathsByDependency, } from "./path-utils.js"; import { setupTempDirectory } from "./test-utils.js"; @@ -75,12 +75,12 @@ describe("isNodeApiModule", () => { try { assert.equal( isNodeApiModule(path.join(tempDirectoryPath, "addon")), - false + false, ); } finally { restoreReadPermissions(tempDirectoryPath); } - } + }, ); it("throws when module file exists but is not readable", (context) => { @@ -92,7 +92,7 @@ describe("isNodeApiModule", () => { try { assert.throws( () => isNodeApiModule(path.join(tempDirectoryPath, "addon")), - /Found an unreadable module addon\.android\.node/ + /Found an unreadable module addon\.android\.node/, ); } finally { restoreReadPermissions(candidate); @@ -112,7 +112,7 @@ describe("isNodeApiModule", () => { assert.equal(isNodeApiModule(path.join(tempDirectoryPath, "addon")), true); assert.equal( isNodeApiModule(path.join(tempDirectoryPath, "addon.node")), - true + true, ); assert.equal(isNodeApiModule(path.join(tempDirectoryPath, "nope")), false); }); @@ -127,7 +127,7 @@ describe("isNodeApiModule", () => { removeReadPermissions(unreadable); assert.throws( () => isNodeApiModule(path.join(tempDirectoryPath, "addon")), - /Found an unreadable module addon\.android\.node/ + /Found an unreadable module addon\.android\.node/, ); restoreReadPermissions(unreadable); }); @@ -151,7 +151,7 @@ describe("determineModuleContext", () => { { const { packageName, relativePath } = determineModuleContext( - path.join(tempDirectoryPath, "some-dir/some-file.node") + path.join(tempDirectoryPath, "some-dir/some-file.node"), ); assert.equal(packageName, "my-package"); assert.equal(relativePath, "some-dir/some-file"); @@ -165,7 +165,7 @@ describe("determineModuleContext", () => { { const { packageName, relativePath } = determineModuleContext( - path.join(tempDirectoryPath, "some-dir/libsome-file.node") + path.join(tempDirectoryPath, "some-dir/libsome-file.node"), ); assert.equal(packageName, "my-package"); assert.equal(relativePath, "some-dir/some-file"); @@ -182,7 +182,7 @@ describe("determineModuleContext", () => { { const { packageName, relativePath } = determineModuleContext( - path.join(tempDirectoryPath, "sub-package-a/some-file.node") + path.join(tempDirectoryPath, "sub-package-a/some-file.node"), ); assert.equal(packageName, "my-sub-package-a"); assert.equal(relativePath, "some-file"); @@ -190,7 +190,7 @@ describe("determineModuleContext", () => { { const { packageName, relativePath } = determineModuleContext( - path.join(tempDirectoryPath, "sub-package-b/some-file.node") + path.join(tempDirectoryPath, "sub-package-b/some-file.node"), ); assert.equal(packageName, "my-sub-package-b"); assert.equal(relativePath, "some-file"); @@ -210,14 +210,14 @@ describe("getLibraryName", () => { getLibraryName(path.join(tempDirectoryPath, "addon"), { pathSuffix: "keep", }), - "my-package--addon" + "my-package--addon", ); assert.equal( getLibraryName(path.join(tempDirectoryPath, "sub-directory/addon"), { pathSuffix: "keep", }), - "my-package--sub-directory-addon" + "my-package--sub-directory-addon", ); }); @@ -232,14 +232,14 @@ describe("getLibraryName", () => { getLibraryName(path.join(tempDirectoryPath, "addon"), { pathSuffix: "strip", }), - "my-package--addon" + "my-package--addon", ); assert.equal( getLibraryName(path.join(tempDirectoryPath, "sub-directory", "addon"), { pathSuffix: "strip", }), - "my-package--addon" + "my-package--addon", ); }); @@ -254,14 +254,14 @@ describe("getLibraryName", () => { getLibraryName(path.join(tempDirectoryPath, "addon"), { pathSuffix: "omit", }), - "my-package" + "my-package", ); assert.equal( getLibraryName(path.join(tempDirectoryPath, "sub-directory", "addon"), { pathSuffix: "omit", }), - "my-package" + "my-package", ); }); }); @@ -296,7 +296,7 @@ describe("findPackageDependencyPaths", () => { }); const result = findPackageDependencyPaths( - path.join(tempDir, "test-package/src/index.js") + path.join(tempDir, "test-package/src/index.js"), ); assert.deepEqual(result, { @@ -394,7 +394,7 @@ describe("findNodeApiModulePaths", () => { } finally { restoreReadPermissions(tempDir); } - } + }, ); }); @@ -405,7 +405,7 @@ describe("findNodeApiModulePathsByDependency", () => { "app/package.json": JSON.stringify({ name: "app", dependencies: Object.fromEntries( - packagesNames.map((packageName) => [packageName, "^1.0.0"]) + packagesNames.map((packageName) => [packageName, "^1.0.0"]), ), }), ...Object.fromEntries( @@ -419,7 +419,7 @@ describe("findNodeApiModulePathsByDependency", () => { "index.js": "", "addon.apple.node/react-native-node-api-module": "", }, - ]) + ]), ), }); @@ -461,14 +461,14 @@ describe("determineModuleContext", () => { readCount++; } return orig(...args); - } + }, ); const ctx1 = determineModuleContext( - path.join(tempDir, "subdir1/file1.node") + path.join(tempDir, "subdir1/file1.node"), ); const ctx2 = determineModuleContext( - path.join(tempDir, "subdir2/file2.node") + path.join(tempDir, "subdir2/file2.node"), ); assert.equal(ctx1.packageName, "cached-pkg"); assert.equal(ctx2.packageName, "cached-pkg"); @@ -497,7 +497,7 @@ describe("findNodeAddonForBindings()", () => { // Act const actualPath = await findNodeAddonForBindings( name, - tempDirectoryPath + tempDirectoryPath, ); // Assert const expectedAbsPath = path.join(tempDirectoryPath, relPath); diff --git a/packages/host/src/node/path-utils.ts b/packages/host/src/node/path-utils.ts index c92115cc..60a06a4d 100644 --- a/packages/host/src/node/path-utils.ts +++ b/packages/host/src/node/path-utils.ts @@ -1,11 +1,11 @@ import assert from "node:assert/strict"; -import path from "node:path"; import fs from "node:fs"; -import { findDuplicates } from "./duplicates"; +import { createRequire } from "node:module"; +import path from "node:path"; import chalk from "chalk"; import { packageDirectorySync } from "pkg-dir"; import { readPackageSync } from "read-pkg"; -import { createRequire } from "node:module"; +import { findDuplicates } from "./duplicates"; // TODO: Change to .apple.node export const PLATFORMS = ["android", "apple"] as const; @@ -22,15 +22,15 @@ export const PATH_SUFFIX_CHOICES = ["strip", "keep", "omit"] as const; export type PathSuffixChoice = (typeof PATH_SUFFIX_CHOICES)[number]; export function assertPathSuffix( - value: unknown + value: unknown, ): asserts value is PathSuffixChoice { assert( typeof value === "string", - `Expected a string, got ${typeof value} (${value})` + `Expected a string, got ${typeof value} (${value})`, ); assert( (PATH_SUFFIX_CHOICES as readonly string[]).includes(value), - `Expected one of ${PATH_SUFFIX_CHOICES.join(", ")}` + `Expected one of ${PATH_SUFFIX_CHOICES.join(", ")}`, ); } @@ -57,16 +57,14 @@ const packageNameCache = new Map(); * TODO: Consider checking for a specific platform extension. */ export function isNodeApiModule(modulePath: string): boolean { - { - // HACK: Take a shortcut (if applicable): existing `.node` files are addons - try { - fs.accessSync( - modulePath.endsWith(".node") ? modulePath : `${modulePath}.node` - ); - return true; - } catch { - // intentionally left empty - } + // HACK: Take a shortcut (if applicable): existing `.node` files are addons + try { + fs.accessSync( + modulePath.endsWith(".node") ? modulePath : `${modulePath}.node`, + ); + return true; + } catch { + // intentionally left empty } const dir = path.dirname(modulePath); const baseName = path.basename(modulePath, ".node"); @@ -131,7 +129,7 @@ export function stripExtension(modulePath: string) { return modulePath; } }, - modulePath + modulePath, ); } @@ -145,7 +143,7 @@ export type ModuleContext = { */ export function determineModuleContext( modulePath: string, - originalPath = modulePath + originalPath = modulePath, ): ModuleContext { // Locate nearest package directory const pkgDir = packageDirectorySync({ cwd: modulePath }); @@ -158,7 +156,7 @@ export function determineModuleContext( const pkg = readPackageSync({ cwd: pkgDir }); assert( typeof pkg.name === "string", - "Expected package.json to have a name" + "Expected package.json to have a name", ); pkgName = pkg.name; packageNameCache.set(pkgDir, pkgName); @@ -191,19 +189,19 @@ export function getLibraryName(modulePath: string, naming: NamingStrategy) { : `${escapedPackageName}--${escapePath( naming.pathSuffix === "strip" ? path.basename(relativePath) - : relativePath + : relativePath, )}`; } export function prettyPath(p: string) { return chalk.dim( - path.relative(process.cwd(), p) || chalk.italic("current directory") + path.relative(process.cwd(), p) || chalk.italic("current directory"), ); } export function resolvePackageRoot( requireFromPackageRoot: NodeJS.Require, - packageName: string + packageName: string, ): string | undefined { try { const resolvedPath = requireFromPackageRoot.resolve(packageName); @@ -217,7 +215,7 @@ export function resolvePackageRoot( export function logModulePaths( modulePaths: string[], // TODO: Default to iterating and printing for all supported naming strategies - naming: NamingStrategy + naming: NamingStrategy, ) { const pathsPerName = new Map(); for (const modulePath of modulePaths) { @@ -237,7 +235,7 @@ export function logModulePaths( ? chalk.redBright(prettyPath(modulePath)) : prettyPath(modulePath); return `\n ↳ ${line}`; - }) + }), ); } } @@ -247,13 +245,13 @@ export function logModulePaths( * return a record mapping from each dependencies of that package to their path on disk. */ export function findPackageDependencyPaths( - fromPath: string + fromPath: string, ): Record { const packageRoot = packageDirectorySync({ cwd: fromPath }); assert(packageRoot, `Could not find package root from ${fromPath}`); const requireFromPackageRoot = createRequire( - path.join(packageRoot, "noop.js") + path.join(packageRoot, "noop.js"), ); const { dependencies = {} } = readPackageSync({ cwd: packageRoot }); @@ -263,13 +261,13 @@ export function findPackageDependencyPaths( .map((dependencyName) => { const resolvedDependencyRoot = resolvePackageRoot( requireFromPackageRoot, - dependencyName + dependencyName, ); return resolvedDependencyRoot ? [dependencyName, resolvedDependencyRoot] : undefined; }) - .filter((item) => typeof item !== "undefined") + .filter((item) => typeof item !== "undefined"), ); } @@ -285,7 +283,7 @@ export const DEFAULT_EXCLUDE_PATTERNS = [ export function hasPlatformExtension( platform: PlatformName | Readonly, - fileName: string + fileName: string, ): boolean { if (typeof platform === "string") { return fileName.endsWith(PLATFORM_EXTENSIONS[platform]); @@ -305,7 +303,7 @@ export type FindNodeApiModuleOptions = { */ export async function findNodeApiModulePaths( options: FindNodeApiModuleOptions, - suffix = "" + suffix = "", ): Promise { const { fromPath, @@ -338,7 +336,7 @@ export async function findNodeApiModulePaths( // Traverse into the child directory // Pushing result into a list instead of awaiting immediately to parallelize the search pendingResults.push( - findNodeApiModulePaths(options, path.join(suffix, dirent.name)) + findNodeApiModulePaths(options, path.join(suffix, dirent.name)), ); } } @@ -354,7 +352,7 @@ export async function findNodeApiModulePaths( throw error; } const childResults = await Promise.all(pendingResults); - result.push(...childResults.flatMap((filePath) => filePath)); + result.push(...childResults.flat()); return result; } @@ -402,16 +400,16 @@ export async function findNodeApiModulePathsByDependency({ { path: dependencyPath, modulePaths: absoluteModulePaths.map((p) => - path.relative(dependencyPath, p) + path.relative(dependencyPath, p), ), }, ] as const; - }) + }), ); // Return an object by dependency name return Object.fromEntries( // Remove any dependencies without Node-API module paths - resultEntries.filter(([, { modulePaths }]) => modulePaths.length > 0) + resultEntries.filter(([, { modulePaths }]) => modulePaths.length > 0), ); } @@ -422,16 +420,18 @@ export async function findNodeApiModulePathsByDependency({ export function determineLibraryBasename(libraryPaths: string[]) { assert( libraryPaths.length > 0, - "Expected at least one library path to determine its basename" + "Expected at least one library path to determine its basename", ); const libraryNames = libraryPaths.map((p) => // Strip the "lib" prefix and any file extension - path.basename(p, path.extname(p)).replace(/^lib/, "") + path + .basename(p, path.extname(p)) + .replace(/^lib/, ""), ); const candidates = new Set(libraryNames); assert( candidates.size === 1, - `Expected all libraries to share name, got: ${[...candidates].join(", ")}` + `Expected all libraries to share name, got: ${[...candidates].join(", ")}`, ); const [name] = candidates; return name; diff --git a/packages/host/src/node/prebuilds/android.ts b/packages/host/src/node/prebuilds/android.ts index b999d8e3..9c750059 100644 --- a/packages/host/src/node/prebuilds/android.ts +++ b/packages/host/src/node/prebuilds/android.ts @@ -1,9 +1,8 @@ import assert from "node:assert/strict"; import fs from "node:fs"; import path from "node:path"; - -import { AndroidTriplet } from "./triplets.js"; import { determineLibraryBasename } from "../path-utils.js"; +import type { AndroidTriplet } from "./triplets.js"; export const DEFAULT_ANDROID_TRIPLETS = [ "aarch64-linux-android", @@ -47,7 +46,7 @@ export async function createAndroidLibsDirectory({ for (const [triplet, libraryPath] of Object.entries(libraryPathByTriplet)) { assert( fs.existsSync(libraryPath), - `Library not found: ${libraryPath} for triplet ${triplet}` + `Library not found: ${libraryPath} for triplet ${triplet}`, ); const arch = ANDROID_ARCHITECTURES[triplet as AndroidTriplet]; const archOutputPath = path.join(outputPath, arch); @@ -68,7 +67,7 @@ export async function createAndroidLibsDirectory({ await fs.promises.writeFile( path.join(outputPath, "react-native-node-api-module"), "", - "utf8" + "utf8", ); } return outputPath; diff --git a/packages/host/src/node/prebuilds/apple.ts b/packages/host/src/node/prebuilds/apple.ts index 769f7857..e727ec27 100644 --- a/packages/host/src/node/prebuilds/apple.ts +++ b/packages/host/src/node/prebuilds/apple.ts @@ -1,13 +1,12 @@ import assert from "node:assert/strict"; +import cp from "node:child_process"; import fs from "node:fs"; -import path from "node:path"; import os from "node:os"; -import cp from "node:child_process"; +import path from "node:path"; import { spawn } from "bufout"; - -import { AppleTriplet } from "./triplets.js"; import { determineLibraryBasename } from "../path-utils.js"; +import type { AppleTriplet } from "./triplets.js"; type AppleArchitecture = "arm64" | "x86_64" | "arm64;x86_64"; @@ -51,7 +50,7 @@ export function createAppleFramework(libraryPath: string) { const libraryName = path.basename(libraryPath, path.extname(libraryPath)); const frameworkPath = path.join( path.dirname(libraryPath), - `${libraryName}.framework` + `${libraryName}.framework`, ); // Create the framework from scratch fs.rmSync(frameworkPath, { recursive: true, force: true }); @@ -71,7 +70,7 @@ export function createAppleFramework(libraryPath: string) { CFBundleVersion: "1", NSPrincipalClass: "", }), - "utf8" + "utf8", ); const newLibraryPath = path.join(frameworkPath, libraryName); // TODO: Consider copying the library instead of renaming it @@ -111,7 +110,7 @@ export async function createXCframework({ ], { outputMode: "buffered", - } + }, ); if (xcodeOutputPath !== outputPath) { // Rename the xcframework to the original output path @@ -123,7 +122,7 @@ export async function createXCframework({ fs.writeFileSync( path.join(outputPath, "react-native-node-api-module"), "", - "utf8" + "utf8", ); } } @@ -134,7 +133,7 @@ export async function createXCframework({ */ export function determineXCFrameworkFilename( frameworkPaths: string[], - extension: ".xcframework" | ".apple.node" = ".xcframework" + extension: ".xcframework" | ".apple.node" = ".xcframework", ) { const name = determineLibraryBasename(frameworkPaths); return `${name}${extension}`; @@ -145,11 +144,11 @@ export async function createUniversalAppleLibrary(libraryPaths: string[]) { const filenames = new Set(libraryPaths.map((p) => path.basename(p))); assert( filenames.size === 1, - "Expected all darwin libraries to have the same name" + "Expected all darwin libraries to have the same name", ); const [filename] = filenames; const lipoParentPath = fs.realpathSync( - fs.mkdtempSync(path.join(os.tmpdir(), "ferric-lipo-output-")) + fs.mkdtempSync(path.join(os.tmpdir(), "ferric-lipo-output-")), ); const outputPath = path.join(lipoParentPath, filename); await spawn("lipo", ["-create", "-output", outputPath, ...libraryPaths], { diff --git a/packages/host/src/node/prebuilds/triplets.ts b/packages/host/src/node/prebuilds/triplets.ts index 60bff46f..7471b15b 100644 --- a/packages/host/src/node/prebuilds/triplets.ts +++ b/packages/host/src/node/prebuilds/triplets.ts @@ -33,19 +33,19 @@ export const SUPPORTED_TRIPLETS = [ export type SupportedTriplet = (typeof SUPPORTED_TRIPLETS)[number]; export function isSupportedTriplet( - triplet: unknown + triplet: unknown, ): triplet is SupportedTriplet { return (SUPPORTED_TRIPLETS as readonly unknown[]).includes(triplet); } export function isAndroidTriplet( - triplet: SupportedTriplet + triplet: SupportedTriplet, ): triplet is AndroidTriplet { return (ANDROID_TRIPLETS as readonly unknown[]).includes(triplet); } export function isAppleTriplet( - triplet: SupportedTriplet + triplet: SupportedTriplet, ): triplet is AppleTriplet { return (APPLE_TRIPLETS as readonly unknown[]).includes(triplet); } diff --git a/packages/host/src/node/test-utils.ts b/packages/host/src/node/test-utils.ts index 3fd67386..a1791502 100644 --- a/packages/host/src/node/test-utils.ts +++ b/packages/host/src/node/test-utils.ts @@ -1,7 +1,7 @@ -import { TestContext } from "node:test"; -import os from "node:os"; import fs from "node:fs"; +import os from "node:os"; import path from "node:path"; +import type { TestContext } from "node:test"; export interface FileMap { [key: string]: string | FileMap; @@ -21,7 +21,7 @@ function writeFiles(fromPath: string, files: FileMap) { export function setupTempDirectory(context: TestContext, files: FileMap) { const tempDirectoryPath = fs.realpathSync( - fs.mkdtempSync(path.join(os.tmpdir(), "react-native-node-api-test-")) + fs.mkdtempSync(path.join(os.tmpdir(), "react-native-node-api-test-")), ); context.after(() => { diff --git a/packages/host/src/node/weak-node-api.ts b/packages/host/src/node/weak-node-api.ts index df29834f..02e3befe 100644 --- a/packages/host/src/node/weak-node-api.ts +++ b/packages/host/src/node/weak-node-api.ts @@ -6,5 +6,5 @@ export const weakNodeApiPath = path.resolve(__dirname, "../../weak-node-api"); assert( fs.existsSync(weakNodeApiPath), - `Expected Weak Node API path to exist: ${weakNodeApiPath}` + `Expected Weak Node API path to exist: ${weakNodeApiPath}`, ); diff --git a/packages/node-addon-examples/scripts/build-examples.mts b/packages/node-addon-examples/scripts/build-examples.mts index a8d587e9..fd590eb6 100644 --- a/packages/node-addon-examples/scripts/build-examples.mts +++ b/packages/node-addon-examples/scripts/build-examples.mts @@ -13,7 +13,7 @@ for (const projectDirectory of projectDirectories) { { cwd: projectDirectory, stdio: "inherit", - } + }, ); console.log(); } diff --git a/packages/node-addon-examples/scripts/copy-examples.mts b/packages/node-addon-examples/scripts/copy-examples.mts index 426f07dd..1c8eb845 100644 --- a/packages/node-addon-examples/scripts/copy-examples.mts +++ b/packages/node-addon-examples/scripts/copy-examples.mts @@ -1,5 +1,5 @@ -import { createRequire } from "node:module"; import fs from "node:fs"; +import { createRequire } from "node:module"; import path from "node:path"; import { readPackageSync } from "read-pkg"; @@ -58,7 +58,7 @@ console.log("Copying files to", EXAMPLES_DIR); const require = createRequire(import.meta.url); const EXAMPLES_PACKAGE_PATH = require.resolve( - "node-addon-examples/package.json" + "node-addon-examples/package.json", ); const SRC_DIR = path.join(path.dirname(EXAMPLES_PACKAGE_PATH), "src"); console.log("Copying files from", SRC_DIR); @@ -73,7 +73,7 @@ for (const src of ALLOW_LIST) { if (fs.existsSync(destPath)) { console.warn( - `Destination path ${destPath} already exists - skipping copy of ${src}.` + `Destination path ${destPath} already exists - skipping copy of ${src}.`, ); continue; } @@ -93,7 +93,7 @@ for (const src of ALLOW_LIST) { fs.writeFileSync( path.join(entry.parentPath, entry.name), JSON.stringify(packageJson, null, 2), - "utf-8" + "utf-8", ); } } diff --git a/packages/node-addon-examples/scripts/verify-prebuilds.mts b/packages/node-addon-examples/scripts/verify-prebuilds.mts index 666eeba3..498b9e73 100644 --- a/packages/node-addon-examples/scripts/verify-prebuilds.mts +++ b/packages/node-addon-examples/scripts/verify-prebuilds.mts @@ -1,5 +1,5 @@ -import fs from "node:fs"; import assert from "node:assert/strict"; +import fs from "node:fs"; import path from "node:path"; import { EXAMPLES_DIR } from "./cmake-projects.mjs"; @@ -21,7 +21,7 @@ async function verifyAndroidPrebuild(dirent: fs.Dirent) { "Verifying Android prebuild", dirent.name, "in", - dirent.parentPath + dirent.parentPath, ); for (const arch of EXPECTED_ANDROID_ARCHS) { const archDir = path.join(dirent.parentPath, dirent.name, arch); @@ -31,7 +31,7 @@ async function verifyAndroidPrebuild(dirent: fs.Dirent) { assert(file.isFile()); assert( !file.name.endsWith(".node"), - `Unexpected .node file: ${path.join(file.parentPath, file.name)}` + `Unexpected .node file: ${path.join(file.parentPath, file.name)}`, ); } } @@ -46,7 +46,7 @@ async function verifyApplePrebuild(dirent: fs.Dirent) { })) { assert( file.isDirectory(), - "Expected only directories in xcframework arch directory" + "Expected only directories in xcframework arch directory", ); assert(file.name.endsWith(".framework"), "Expected framework directory"); const frameworkDir = path.join(file.parentPath, file.name); @@ -57,23 +57,21 @@ async function verifyApplePrebuild(dirent: fs.Dirent) { assert.equal( file.name, "Headers", - "Unexpected directory in xcframework" + "Unexpected directory in xcframework", ); } else { assert( file.isFile(), - "Expected only directory and files in framework" + "Expected only directory and files in framework", ); if (file.name === "Info.plist") { - // TODO: Verify the contents of the Info.plist file - continue; } else { assert( !file.name.endsWith(".node"), `Didn't expected a .node file in xcframework: ${path.join( frameworkDir, - file.name - )}` + file.name, + )}`, ); } } @@ -92,7 +90,7 @@ for await (const dirent of fs.promises.glob("**/*.*.node", { await verifyApplePrebuild(dirent); } else { throw new Error( - `Unexpected prebuild file: ${dirent.name} in ${dirent.parentPath}` + `Unexpected prebuild file: ${dirent.name} in ${dirent.parentPath}`, ); } } diff --git a/packages/node-addon-examples/src/index.ts b/packages/node-addon-examples/src/index.ts index d2228f84..a311bbc1 100644 --- a/packages/node-addon-examples/src/index.ts +++ b/packages/node-addon-examples/src/index.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ - function assertLogs(cb: () => void, expectedMessages: string[]) { const errors: Error[] = []; // Spying on the console.log function, as the examples don't assert anything themselves @@ -15,7 +13,9 @@ function assertLogs(cb: () => void, expectedMessages: string[]) { cb(); if (expectedMessages.length > 0) { errors.push( - new Error(`Missing expected message(s): ${expectedMessages.join(", ")}`) + new Error( + `Missing expected message(s): ${expectedMessages.join(", ")}`, + ), ); } } finally { @@ -30,6 +30,7 @@ function assertLogs(cb: () => void, expectedMessages: string[]) { export const suites: Record< string, + // biome-ignore lint/suspicious/noConfusingVoidType: Keep as is Record void | (() => void)> > = { "1-getting-started": { @@ -37,61 +38,61 @@ export const suites: Record< assertLogs( () => require("../examples/1-getting-started/1_hello_world/napi/hello.js"), - ["world"] + ["world"], ), "1_hello_world/node-addon-api": () => assertLogs( () => require("../examples/1-getting-started/1_hello_world/node-addon-api/hello.js"), - ["world"] + ["world"], ), "1_hello_world/node-addon-api-addon-class": () => assertLogs( () => require("../examples/1-getting-started/1_hello_world/node-addon-api-addon-class/hello.js"), - ["world"] + ["world"], ), "2_function_arguments/napi": () => assertLogs( () => require("../examples/1-getting-started/2_function_arguments/napi/addon.js"), - ["This should be eight: 8"] + ["This should be eight: 8"], ), "2_function_arguments/node-addon-api": () => assertLogs( () => require("../examples/1-getting-started/2_function_arguments/node-addon-api/addon.js"), - ["This should be eight: 8"] + ["This should be eight: 8"], ), "3_callbacks/napi": () => assertLogs( () => require("../examples/1-getting-started/3_callbacks/napi/addon.js"), - ["hello world"] + ["hello world"], ), "3_callbacks/node-addon-api": () => assertLogs( () => require("../examples/1-getting-started/3_callbacks/node-addon-api/addon.js"), - ["hello world"] + ["hello world"], ), "4_object_factory/napi": () => assertLogs( () => require("../examples/1-getting-started/4_object_factory/napi/addon.js"), - ["hello world"] + ["hello world"], ), "4_object_factory/node-addon-api": () => assertLogs( () => require("../examples/1-getting-started/4_object_factory/node-addon-api/addon.js"), - ["hello world"] + ["hello world"], ), "5_function_factory": () => assertLogs( () => require("../examples/1-getting-started/5_function_factory/napi/addon.js"), - ["hello world"] + ["hello world"], ), }, "5-async-work": { diff --git a/packages/node-addon-examples/tests/async/addon.js b/packages/node-addon-examples/tests/async/addon.js index f30d87d2..10fad839 100644 --- a/packages/node-addon-examples/tests/async/addon.js +++ b/packages/node-addon-examples/tests/async/addon.js @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ -/* eslint-disable no-undef */ -const assert = require("assert"); +const assert = require("node:assert"); const test_async = require("bindings")("addon.node"); const test = () => diff --git a/packages/node-addon-examples/tests/buffers/addon.js b/packages/node-addon-examples/tests/buffers/addon.js index a5ccd75f..3e9919f8 100644 --- a/packages/node-addon-examples/tests/buffers/addon.js +++ b/packages/node-addon-examples/tests/buffers/addon.js @@ -1,8 +1,7 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ -/* eslint-disable no-undef */ -const assert = require("assert"); +const assert = require("node:assert"); const addon = require("bindings")("addon.node"); +// biome-ignore lint/suspicious/noShadowRestrictedNames: Unknown const toLocaleString = (text) => { return text .toString() @@ -15,7 +14,7 @@ module.exports = () => { assert.strictEqual(toLocaleString(addon.newBuffer()), addon.theText); assert.strictEqual(toLocaleString(addon.newExternalBuffer()), addon.theText); assert.strictEqual(toLocaleString(addon.copyBuffer()), addon.theText); - let buffer = addon.staticBuffer(); + const buffer = addon.staticBuffer(); assert.strictEqual(addon.bufferHasInstance(buffer), true); assert.strictEqual(addon.bufferInfo(buffer), true); addon.invalidObjectAsBuffer({}); From 203ed4c9c039a4eed07102e83496b0c243a7b244 Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 15:12:24 -0300 Subject: [PATCH 2/8] added changeset --- .changeset/curly-tigers-send.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changeset/curly-tigers-send.md diff --git a/.changeset/curly-tigers-send.md b/.changeset/curly-tigers-send.md new file mode 100644 index 00000000..d4ea17fe --- /dev/null +++ b/.changeset/curly-tigers-send.md @@ -0,0 +1,12 @@ +--- +"ferric-cli": minor +--- + +- Created generate command to generate scaffold project. Replacing ferric-example. +- Add path as arg to build project. +- Fixed cargo build command with correct --release flag. +- Added Cargo.toml optmizations for size. +- Added tests ferric-cli, to build and generate commands. +- Added debug flag as commands logging. +- Replaced eslint since the project lacks formatter and sort organizer, biome is faster and has all three. +- Changed build output to send to dist folder. From 0766371d70d921ec35381aff063cd88ec79b97f6 Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 15:18:52 -0300 Subject: [PATCH 3/8] changed CI check to not build on draft --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bd394095..831b8c5a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,7 +9,7 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened] + types: [opened, ready_for_review, reopened] concurrency: group: ${{ github.workflow }}-${{ github.ref }} From e84738f87b76674f85eed8e3d947b7fec7703202 Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 15:41:26 -0300 Subject: [PATCH 4/8] changed output to dist folder by default --- packages/cmake-rn/src/cli.ts | 2 +- packages/ferric/src/templates.ts | 2 +- packages/ferric/tsconfig.tests.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cmake-rn/src/cli.ts b/packages/cmake-rn/src/cli.ts index 307d90d4..580ed01c 100644 --- a/packages/cmake-rn/src/cli.ts +++ b/packages/cmake-rn/src/cli.ts @@ -30,7 +30,7 @@ const verboseOption = new Option( const sourcePathOption = new Option( "--source ", "Specify the source directory containing a CMakeLists.txt file", -).default(process.cwd()); +).default(`${process.cwd()}/dist`); // TODO: Add "MinSizeRel" and "RelWithDebInfo" const configurationOption = new Option("--configuration ") diff --git a/packages/ferric/src/templates.ts b/packages/ferric/src/templates.ts index 2800ab51..26f77c42 100644 --- a/packages/ferric/src/templates.ts +++ b/packages/ferric/src/templates.ts @@ -1,5 +1,5 @@ export function cargoTomlTemplate(projectName: string) { - return ` + return ` [package] name = ${projectName} version = "1.0.0" diff --git a/packages/ferric/tsconfig.tests.json b/packages/ferric/tsconfig.tests.json index 17ee7c84..4a97de52 100644 --- a/packages/ferric/tsconfig.tests.json +++ b/packages/ferric/tsconfig.tests.json @@ -4,7 +4,7 @@ "composite": true, "emitDeclarationOnly": true }, - "include": ["src/**/*.test.ts"], + "include": ["__tests__/*.test.ts"], "exclude": [], "references": [ { From 03b163095a303426ad307542165b565ee08a8f6e Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 17:05:02 -0300 Subject: [PATCH 5/8] add progress --- packages/ferric/README.md | 6 +++--- packages/ferric/src/build.ts | 16 +++++++++++++--- packages/ferric/src/cargo.ts | 31 +++++++++++++++++++++++-------- packages/ferric/src/generate.ts | 5 +++++ packages/ferric/src/program.ts | 4 +++- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/packages/ferric/README.md b/packages/ferric/README.md index 90cfac1c..e5c66847 100644 --- a/packages/ferric/README.md +++ b/packages/ferric/README.md @@ -10,8 +10,8 @@ A wrapper around Cargo making it easier to produce prebuilt binaries targeting i ```json "scripts": { - "generate:proj": "ferric generate folder_name", - "debug": "ferric build folder_name", - "release": "npm run debug --configuration release", + "generate": "ferric generate folder_name", + "build": "ferric build --path folder_path", + "build:release": "npm run build --configuration release", }, ``` diff --git a/packages/ferric/src/build.ts b/packages/ferric/src/build.ts index 109a13a7..eeedc37e 100644 --- a/packages/ferric/src/build.ts +++ b/packages/ferric/src/build.ts @@ -95,6 +95,10 @@ const outputPathOption = new Option( "--output ", "Writing outputs to this directory", ).default(process.cwd()); +const buildPathOption = new Option( + "--path ", + "Specify project path", +).default(process.cwd()); const configurationOption = new Option( "--configuration ", "Build configuration", @@ -109,6 +113,7 @@ export const buildCommand = new Command("build") .addOption(androidTarget) .addOption(ndkVersionOption) .addOption(outputPathOption) + .addOption(buildPathOption) .addOption(configurationOption) .addOption(xcframeworkExtensionOption) .action( @@ -118,6 +123,7 @@ export const buildCommand = new Command("build") android, ndkVersion, output: outputPath, + path: buildPath, configuration, xcframeworkExtension, }) => { @@ -173,7 +179,10 @@ export const buildCommand = new Command("build") Promise.all( appleTargets.map( async (target) => - [target, await build({ configuration, target })] as const, + [ + target, + await build({ configuration, buildPath, target }), + ] as const, ), ), Promise.all( @@ -183,6 +192,7 @@ export const buildCommand = new Command("build") target, await build({ configuration, + buildPath, target, ndkVersion, androidApiLevel: ANDROID_API_LEVEL, @@ -272,7 +282,7 @@ export const buildCommand = new Command("build") await oraPromise( generateTypeScriptDeclarations({ outputFilename: declarationsFilename, - createPath: process.cwd(), + createPath: buildPath, outputPath, }), { @@ -352,7 +362,7 @@ async function combineLibraries( `Failed to combine Darwin libraries: ${error.message}`, }, ); - return [...result, universalPath]; + return [...result, universalPath as string]; } } diff --git a/packages/ferric/src/cargo.ts b/packages/ferric/src/cargo.ts index 903b7794..022b2a7e 100644 --- a/packages/ferric/src/cargo.ts +++ b/packages/ferric/src/cargo.ts @@ -60,6 +60,7 @@ export function ensureCargo() { type BuildOptions = { configuration: "debug" | "release"; + buildPath: string; } & ( | { target: AndroidTargetName; @@ -74,21 +75,35 @@ type BuildOptions = { ); export async function build(options: BuildOptions) { - const { target, configuration } = options; - await spawn("cargo", ["build", "--target", target], { - outputMode: "buffered", - env: { - ...process.env, - ...getTargetEnvironmentVariables(options), - }, - }); + const { target, configuration, buildPath } = options; const modeConfig = configuration.toLowerCase() === "release" ? "--release" : ""; + const manifestBuildPath = `${buildPath}/Cargo.toml`; + await spawn( + "cargo", + [ + "build", + "--target", + target, + modeConfig, + "--manifest-path", + manifestBuildPath, + ], + { + outputMode: "buffered", + env: { + ...process.env, + ...getTargetEnvironmentVariables(options), + }, + }, + ); const targetOutputPath = joinPathAndAssertExistence( process.cwd(), "target", target, modeConfig, + "manifest-path", + manifestBuildPath, ); const dynamicLibraryFile = fs .readdirSync(targetOutputPath) diff --git a/packages/ferric/src/generate.ts b/packages/ferric/src/generate.ts index e69de29b..aa6cbe74 100644 --- a/packages/ferric/src/generate.ts +++ b/packages/ferric/src/generate.ts @@ -0,0 +1,5 @@ +import { Command } from "@commander-js/extra-typings"; + +export const generateCommand = new Command("generate") + .description("Generate the projct scaffold") + .argument("", "Type project name"); diff --git a/packages/ferric/src/program.ts b/packages/ferric/src/program.ts index f8059c48..08d29c10 100644 --- a/packages/ferric/src/program.ts +++ b/packages/ferric/src/program.ts @@ -2,8 +2,10 @@ import { Command } from "@commander-js/extra-typings"; import { printBanner } from "./banner.js"; import { buildCommand } from "./build.js"; +import { generateCommand } from "./generate.js"; export const program = new Command("ferric") .hook("preAction", () => printBanner()) .description("Rust Node-API Modules for React Native") - .addCommand(buildCommand); + .addCommand(buildCommand) + .addCommand(generateCommand); From 4d5da4925fe882dcc0e9a7d831e2aa82d64878eb Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 17:22:50 -0300 Subject: [PATCH 6/8] added synchronize back --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 831b8c5a..2dee08d2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,7 +9,7 @@ on: branches: - main pull_request: - types: [opened, ready_for_review, reopened] + types: [opened, ready_for_review, synchronize, reopened] concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 138fd49cbc31a82fdb7f58d83ee11ae21b510531 Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 17:30:50 -0300 Subject: [PATCH 7/8] updated readme with file structure --- packages/ferric/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/ferric/README.md b/packages/ferric/README.md index e5c66847..c7cd4c3c 100644 --- a/packages/ferric/README.md +++ b/packages/ferric/README.md @@ -11,7 +11,20 @@ A wrapper around Cargo making it easier to produce prebuilt binaries targeting i ```json "scripts": { "generate": "ferric generate folder_name", - "build": "ferric build --path folder_path", + "build": "ferric build --path folder_name_path", "build:release": "npm run build --configuration release", }, ``` + +### Project Structure + +After generating the project, a folder would be created with the following file structure for the lib. + +```markdown +lib_name +β”‚ Cargo.toml +β”‚ build.rs +β”‚ .gitignore +└───src +β”‚ β”‚ lib.rs +``` From 1bf14eed05da72d03287244acca350c8924b138b Mon Sep 17 00:00:00 2001 From: Douglas Galdino Date: Thu, 24 Jul 2025 17:53:14 -0300 Subject: [PATCH 8/8] updated readme --- packages/ferric/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/ferric/README.md b/packages/ferric/README.md index c7cd4c3c..acf8f3cc 100644 --- a/packages/ferric/README.md +++ b/packages/ferric/README.md @@ -27,4 +27,9 @@ lib_name β”‚ .gitignore └───src β”‚ β”‚ lib.rs +└───dist (after build) +β”‚ β”‚ index.js +β”‚ β”‚ index.d.ts +β”‚ β”‚ native_android_folder +β”‚ β”‚ native_ios_folder ```