@powerlines/plugin-napi-rs 0.2.80 → 0.2.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"format-path.d.cts","names":[],"sources":["../../src/helpers/format-path.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAgB,UAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}
1
+ {"version":3,"file":"format-path.d.cts","names":[],"sources":["../../src/helpers/format-path.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAgB,UAAA,CACd,OAAA,EAAS,iBAAiB,EAC1B,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"format-path.d.mts","names":[],"sources":["../../src/helpers/format-path.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAgB,UAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}
1
+ {"version":3,"file":"format-path.d.mts","names":[],"sources":["../../src/helpers/format-path.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAgB,UAAA,CACd,OAAA,EAAS,iBAAiB,EAC1B,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"format-path.mjs","names":[],"sources":["../../src/helpers/format-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport { NapiPluginContext } from \"../types\";\n\n/**\n * Format the given path by replacing tokens and making it relative to the project root.\n *\n * @remarks\n * This function is used to format paths in the plugin's configuration, such as the path to the crate or the output directory. It replaces tokens in the path (e.g. `{crate}`) with their corresponding values from the plugin context, and then makes the path relative to the project root.\n *\n * @param context - The plugin context, which contains the configuration and other information about the plugin's execution environment.\n * @param path - The path to format or undefined, which may contain tokens to be replaced. This can be a path to a file or directory, and can include tokens such as `{crate}` that will be replaced with their corresponding values from the plugin context.\n * @returns The formatted path, which has had tokens replaced and is relative to the project root. If the input path is undefined, this function will return undefined.\n */\nexport function formatPath(\n context: NapiPluginContext,\n path?: string\n): string | undefined {\n const cwd = appendPath(context.config.root, context.config.cwd);\n\n return path\n ? relativePath(\n cwd,\n appendPath(\n appendPath(replacePathTokens(context, path), context.config.root),\n context.config.cwd\n )\n )\n : undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAgB,WAAU,SAAA,MAAA;CACxB,MAAA,MAAS,WAAA,QAAiB,OAAA,MAAA,QAAA,OAAA,IAAA;AAC1B,QAAO,OAAA,aAAA,KAAA,WAAA,WAAA,kBAAA,SAAA,KAAA,EAAA,QAAA,OAAA,KAAA,EAAA,QAAA,OAAA,IAAA,CAAA,GAAA"}
1
+ {"version":3,"file":"format-path.mjs","names":[],"sources":["../../src/helpers/format-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport { NapiPluginContext } from \"../types\";\n\n/**\n * Format the given path by replacing tokens and making it relative to the project root.\n *\n * @remarks\n * This function is used to format paths in the plugin's configuration, such as the path to the crate or the output directory. It replaces tokens in the path (e.g. `{crate}`) with their corresponding values from the plugin context, and then makes the path relative to the project root.\n *\n * @param context - The plugin context, which contains the configuration and other information about the plugin's execution environment.\n * @param path - The path to format or undefined, which may contain tokens to be replaced. This can be a path to a file or directory, and can include tokens such as `{crate}` that will be replaced with their corresponding values from the plugin context.\n * @returns The formatted path, which has had tokens replaced and is relative to the project root. If the input path is undefined, this function will return undefined.\n */\nexport function formatPath(\n context: NapiPluginContext,\n path?: string\n): string | undefined {\n const cwd = appendPath(context.config.root, context.config.cwd);\n\n return path\n ? relativePath(\n cwd,\n appendPath(\n appendPath(replacePathTokens(context, path), context.config.root),\n context.config.cwd\n )\n )\n : undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAgB,WAAU,SAAA,MAAA;CACxB,MAAA,MAAS,WAAA,QAAiB,OAAA,MAAA,QAAA,OAAA,GAAA;CAC1B,OAAO,OAAA,aAAA,KAAA,WAAA,WAAA,kBAAA,SAAA,IAAA,GAAA,QAAA,OAAA,IAAA,GAAA,QAAA,OAAA,GAAA,CAAA,IAAA;AACT"}
package/dist/index.d.cts CHANGED
@@ -16,5 +16,5 @@ declare module "powerlines" {
16
16
  */
17
17
  declare const plugin: <TContext extends NapiPluginContext = NapiPluginContext>(options?: NapiPluginOptions) => Plugin<TContext>[];
18
18
  //#endregion
19
- export { AVAILABLE_TARGETS, DEFAULT_TARGETS, NapiPluginContext, NapiPluginOptions, NapiPluginResolvedConfig, NapiPluginUserConfig, NapiResolvedPluginOptions, Platform, Target, TargetTriple, WasmBrowserOptions, WasmOptions, plugin as default, plugin };
19
+ export { type AVAILABLE_TARGETS, type DEFAULT_TARGETS, type NapiPluginContext, type NapiPluginOptions, type NapiPluginResolvedConfig, type NapiPluginUserConfig, type NapiResolvedPluginOptions, type Platform, type Target, type TargetTriple, type WasmBrowserOptions, type WasmOptions, plugin as default, plugin };
20
20
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;;;;;;cASE,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KA2OJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAiB;EAAA;AAAA;;;;;;cASf,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KA2OJ,MAAA,CAAO,QAAA"}
package/dist/index.d.mts CHANGED
@@ -16,5 +16,5 @@ declare module "powerlines" {
16
16
  */
17
17
  declare const plugin: <TContext extends NapiPluginContext = NapiPluginContext>(options?: NapiPluginOptions) => Plugin<TContext>[];
18
18
  //#endregion
19
- export { AVAILABLE_TARGETS, DEFAULT_TARGETS, NapiPluginContext, NapiPluginOptions, NapiPluginResolvedConfig, NapiPluginUserConfig, NapiResolvedPluginOptions, Platform, Target, TargetTriple, WasmBrowserOptions, WasmOptions, plugin as default, plugin };
19
+ export { type AVAILABLE_TARGETS, type DEFAULT_TARGETS, type NapiPluginContext, type NapiPluginOptions, type NapiPluginResolvedConfig, type NapiPluginUserConfig, type NapiResolvedPluginOptions, type Platform, type Target, type TargetTriple, type WasmBrowserOptions, type WasmOptions, plugin as default, plugin };
20
20
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;;;;;;cASE,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KA2OJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAiB;EAAA;AAAA;;;;;;cASf,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KA2OJ,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NapiCli, parseTriple } from \"@napi-rs/cli\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { defu } from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { isVerbose } from \"powerlines/plugin-utils\";\nimport { formatPath } from \"./helpers/format-path\";\nimport { DEFAULT_TARGETS } from \"./types\";\nimport type { NapiPluginContext, NapiPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n napi?: NapiPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin for integrating with N-API Rust modules, providing features such as automatic generation of bindings and runtime integration with N-API Rust modules.\n *\n * @see https://napi.rs/docs\n */\nexport const plugin = <TContext extends NapiPluginContext = NapiPluginContext>(\n options: NapiPluginOptions = {}\n) => {\n return [\n {\n name: \"napi-rs\",\n config() {\n return {\n napi: {\n dts: \"binding.d.ts\",\n jsBinding: \"binding.js\",\n outputDir: this.config.root,\n platform: true,\n strip: false,\n ...options\n }\n };\n },\n async configResolved() {\n if (\n !this.config.napi.target &&\n this.additionalArgs.target &&\n (isString(this.additionalArgs.target) ||\n (Array.isArray(this.additionalArgs.target) &&\n this.additionalArgs.target.length > 0))\n ) {\n this.config.napi.target = parseTriple(\n (Array.isArray(this.additionalArgs.target) &&\n this.additionalArgs.target.length > 0\n ? this.additionalArgs.target[0]\n : String(this.additionalArgs.target))!\n );\n } else {\n this.config.napi.target = isString(this.config.napi.target)\n ? parseTriple(this.config.napi.target)\n : this.config.napi.target;\n }\n\n if (!this.config.napi.targets) {\n if (\n this.additionalArgs.targets &&\n (isString(this.additionalArgs.targets) ||\n (Array.isArray(this.additionalArgs.targets) &&\n this.additionalArgs.targets.length > 0))\n ) {\n this.config.napi.targets = toArray(this.additionalArgs.targets).map(\n (target: string) => parseTriple(target)\n );\n } else {\n this.config.napi.targets = DEFAULT_TARGETS.map(target =>\n parseTriple(target)\n );\n }\n }\n\n if (\n !this.config.napi.profile &&\n this.additionalArgs.profile &&\n (isString(this.additionalArgs.profile) ||\n (Array.isArray(this.additionalArgs.profile) &&\n this.additionalArgs.profile.length > 0))\n ) {\n this.config.napi.profile = (\n Array.isArray(this.additionalArgs.profile) &&\n this.additionalArgs.profile.length > 0\n ? this.additionalArgs.profile[0]\n : String(this.additionalArgs.profile)\n )!;\n }\n\n if (!this.config.napi.release && this.additionalArgs.release) {\n this.config.napi.release = Boolean(this.additionalArgs.release);\n }\n\n if (\n !this.config.napi.configPath &&\n this.additionalArgs.configPath &&\n (isString(this.additionalArgs.configPath) ||\n (Array.isArray(this.additionalArgs.configPath) &&\n this.additionalArgs.configPath.length > 0))\n ) {\n this.config.napi.configPath = (\n Array.isArray(this.additionalArgs.configPath) &&\n this.additionalArgs.configPath.length > 0\n ? this.additionalArgs.configPath[0]\n : String(this.additionalArgs.configPath)\n )!;\n }\n\n if (\n !this.config.napi.manifestPath &&\n this.additionalArgs.manifestPath &&\n (isString(this.additionalArgs.manifestPath) ||\n (Array.isArray(this.additionalArgs.manifestPath) &&\n this.additionalArgs.manifestPath.length > 0))\n ) {\n this.config.napi.manifestPath = (\n Array.isArray(this.additionalArgs.manifestPath) &&\n this.additionalArgs.manifestPath.length > 0\n ? this.additionalArgs.manifestPath[0]\n : String(this.additionalArgs.manifestPath)\n )!;\n }\n\n if (\n !this.config.napi.npmDir &&\n this.additionalArgs.npmDir &&\n (isString(this.additionalArgs.npmDir) ||\n (Array.isArray(this.additionalArgs.npmDir) &&\n this.additionalArgs.npmDir.length > 0))\n ) {\n this.config.napi.npmDir = (\n Array.isArray(this.additionalArgs.npmDir) &&\n this.additionalArgs.npmDir.length > 0\n ? this.additionalArgs.npmDir[0]\n : String(this.additionalArgs.npmDir)\n )!;\n }\n\n if (!this.config.napi.packageJsonPath) {\n if (\n this.additionalArgs.packageJsonPath &&\n (isString(this.additionalArgs.packageJsonPath) ||\n (Array.isArray(this.additionalArgs.packageJsonPath) &&\n this.additionalArgs.packageJsonPath.length > 0))\n ) {\n this.config.napi.packageJsonPath = (\n Array.isArray(this.additionalArgs.packageJsonPath) &&\n this.additionalArgs.packageJsonPath.length > 0\n ? this.additionalArgs.packageJsonPath[0]\n : String(this.additionalArgs.packageJsonPath)\n )!;\n }\n\n if (!this.config.napi.packageJsonPath) {\n this.config.napi.packageJsonPath = appendPath(\n this.config.root,\n \"package.json\"\n );\n }\n }\n\n if (this.config.napi.target?.platform === \"wasm\") {\n this.dependencies[\"@napi-rs/wasm-runtime\"] = \"^1.1.4\";\n }\n\n let packageJson = {} as Record<string, any>;\n let originalPackageJson = {} as Record<string, any>;\n\n if (this.fs.existsSync(this.config.napi.packageJsonPath)) {\n packageJson = JSON.parse(\n (await this.fs.read(this.config.napi.packageJsonPath)) || \"{}\"\n );\n }\n\n originalPackageJson = { ...packageJson };\n packageJson.napi = {\n binaryName: this.config.napi.binaryName,\n packageName: this.config.napi.packageName,\n targets: this.config.napi.targets?.map(target => target.triple),\n npmClient: this.config.napi.npmClient,\n constEnum: this.config.napi.constEnum,\n dtsHeader: this.config.napi.dtsHeader,\n dtsHeaderFile: this.config.napi.dtsHeaderFile,\n ...packageJson.napi,\n wasm:\n this.config.napi.target?.platform === \"wasm\"\n ? defu(\n packageJson.napi?.wasm ?? {},\n this.config.napi.wasm ?? {},\n { initialMemory: 16384 }\n )\n : undefined\n };\n\n if (\n JSON.stringify(packageJson) !== JSON.stringify(originalPackageJson)\n ) {\n await this.fs.write(\n this.config.napi.packageJsonPath,\n JSON.stringify(packageJson, null, 2)\n );\n }\n },\n async prepare() {\n this.debug(\n `Preparing the N-API Rust runtime artifacts for the Powerlines project.`\n );\n\n this.napi = new NapiCli();\n\n if (this.config.napi.npmDir) {\n await this.napi.createNpmDirs({\n cwd: appendPath(this.config.root, this.config.cwd),\n npmDir: formatPath(this, this.config.napi.npmDir),\n configPath: formatPath(this, this.config.napi.configPath),\n packageJsonPath: formatPath(this, this.config.napi.packageJsonPath)\n });\n }\n },\n async build() {\n this.debug(\n `Building the N-API Rust runtime artifacts for the Powerlines project.`\n );\n\n const { task } = await this.napi.build({\n cwd: appendPath(this.config.root, this.config.cwd),\n package: this.config.napi.packageName,\n outputDir: formatPath(this, this.config.napi.outputDir),\n configPath: formatPath(this, this.config.napi.configPath),\n manifestPath: formatPath(this, this.config.napi.manifestPath),\n packageJsonPath: formatPath(this, this.config.napi.packageJsonPath),\n target: this.config.napi.target?.triple,\n profile: this.config.napi.profile,\n release:\n this.config.napi.release ?? this.config.mode === \"production\",\n features: this.config.napi.features,\n noDefaultFeatures: this.config.napi.noDefaultFeatures,\n strip: this.config.napi.strip,\n platform: this.config.napi.platform,\n noDtsHeader: this.config.napi.noDtsHeader,\n jsBinding: this.config.napi.jsBinding,\n dts: this.config.napi.dts,\n dtsCache: this.config.napi.dtsCache ?? !this.config.skipCache,\n verbose: isVerbose(this)\n });\n\n const outputs = await task;\n for (const output of outputs) {\n const code = await this.fs.read(output.path);\n if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A,MAAA,KAAA,OAAA,IAAA;IACD,QAAM,WAAY,MAAA,KAAY,OAAA,KAAA,OAAA;IAC9B,YAAK,WAAe,MAAA,KAAY,OAAA,KAAA,WAAA;IAChC,iBAAe,WAAA,MAAe,KAAA,OAAa,KAAA,gBAAA;IAC5C,CAAC;;EAGN,MAAM,QAAK;AACT,QAAK,MAAM,wEAA0C;GACrD,MAAM,EACJ,SACE,MAAM,KAAA,KAAO,MAAK;IACpB,KAAI,WAAA,KAAA,OAAA,MAAA,KAAA,OAAA,IAAA;IACJ,SAAA,KAAA,OAAA,KAAA;;IAEA,YAAG,WAAA,MAAA,KAAA,OAAA,KAAA,WAAA;IACH,cAAc,WAAM,MAAA,KAAc,OAAA,KAAA,aAAA;IAClC,iBAAO,WAAe,MAAY,KAAE,OAAA,KAAA,gBAAA;IACpC,QAAG,KAAS,OAAK,KAAA,QAAe;IAChC,SAAK,KAAM,OAAQ,KAAK;IACxB,SAAM,KAAK,OAAA,KAAe,WAAA,KAAa,OAAU,SAAC;IAClD,UAAE,KAAA,OAAA,KAAA;IACF,mBAAmB,KAAA,OAAY,KAAG;IAClC,OAAI,KAAM,OAAQ,KAAK;IACvB,UAAS,KAAA,OAAA,KAAe;IACxB,aAAa,KAAA,OAAA,KAAe;IAC5B,WAAQ,KAAO,OAAK,KAAA;IACpB,KAAI,KAAA,OAAA,KAAA;IACJ,UAAA,KAAA,OAAA,KAAA,YAAA,CAAA,KAAA,OAAA;;IAED,CAAC;GACF,MAAK,UAAW,MAAM;AACtB,QAAI,MAAK,UAAA,SAAqB;IAC5B,MAAG,OAAS,MAAK,KAAA,GAAA,KAAe,OAAO,KAAE;AACzC,QAAI,KACF,OAAI,KAAK,GAAA,MAAA,OAAe,MAAO,KAAO;;;EAI7C,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NapiCli, parseTriple } from \"@napi-rs/cli\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { defu } from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { isVerbose } from \"powerlines/plugin-utils\";\nimport { formatPath } from \"./helpers/format-path\";\nimport { DEFAULT_TARGETS } from \"./types\";\nimport type { NapiPluginContext, NapiPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n napi?: NapiPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin for integrating with N-API Rust modules, providing features such as automatic generation of bindings and runtime integration with N-API Rust modules.\n *\n * @see https://napi.rs/docs\n */\nexport const plugin = <TContext extends NapiPluginContext = NapiPluginContext>(\n options: NapiPluginOptions = {}\n) => {\n return [\n {\n name: \"napi-rs\",\n config() {\n return {\n napi: {\n dts: \"binding.d.ts\",\n jsBinding: \"binding.js\",\n outputDir: this.config.root,\n platform: true,\n strip: false,\n ...options\n }\n };\n },\n async configResolved() {\n if (\n !this.config.napi.target &&\n this.additionalArgs.target &&\n (isString(this.additionalArgs.target) ||\n (Array.isArray(this.additionalArgs.target) &&\n this.additionalArgs.target.length > 0))\n ) {\n this.config.napi.target = parseTriple(\n (Array.isArray(this.additionalArgs.target) &&\n this.additionalArgs.target.length > 0\n ? this.additionalArgs.target[0]\n : String(this.additionalArgs.target))!\n );\n } else {\n this.config.napi.target = isString(this.config.napi.target)\n ? parseTriple(this.config.napi.target)\n : this.config.napi.target;\n }\n\n if (!this.config.napi.targets) {\n if (\n this.additionalArgs.targets &&\n (isString(this.additionalArgs.targets) ||\n (Array.isArray(this.additionalArgs.targets) &&\n this.additionalArgs.targets.length > 0))\n ) {\n this.config.napi.targets = toArray(this.additionalArgs.targets).map(\n (target: string) => parseTriple(target)\n );\n } else {\n this.config.napi.targets = DEFAULT_TARGETS.map(target =>\n parseTriple(target)\n );\n }\n }\n\n if (\n !this.config.napi.profile &&\n this.additionalArgs.profile &&\n (isString(this.additionalArgs.profile) ||\n (Array.isArray(this.additionalArgs.profile) &&\n this.additionalArgs.profile.length > 0))\n ) {\n this.config.napi.profile = (\n Array.isArray(this.additionalArgs.profile) &&\n this.additionalArgs.profile.length > 0\n ? this.additionalArgs.profile[0]\n : String(this.additionalArgs.profile)\n )!;\n }\n\n if (!this.config.napi.release && this.additionalArgs.release) {\n this.config.napi.release = Boolean(this.additionalArgs.release);\n }\n\n if (\n !this.config.napi.configPath &&\n this.additionalArgs.configPath &&\n (isString(this.additionalArgs.configPath) ||\n (Array.isArray(this.additionalArgs.configPath) &&\n this.additionalArgs.configPath.length > 0))\n ) {\n this.config.napi.configPath = (\n Array.isArray(this.additionalArgs.configPath) &&\n this.additionalArgs.configPath.length > 0\n ? this.additionalArgs.configPath[0]\n : String(this.additionalArgs.configPath)\n )!;\n }\n\n if (\n !this.config.napi.manifestPath &&\n this.additionalArgs.manifestPath &&\n (isString(this.additionalArgs.manifestPath) ||\n (Array.isArray(this.additionalArgs.manifestPath) &&\n this.additionalArgs.manifestPath.length > 0))\n ) {\n this.config.napi.manifestPath = (\n Array.isArray(this.additionalArgs.manifestPath) &&\n this.additionalArgs.manifestPath.length > 0\n ? this.additionalArgs.manifestPath[0]\n : String(this.additionalArgs.manifestPath)\n )!;\n }\n\n if (\n !this.config.napi.npmDir &&\n this.additionalArgs.npmDir &&\n (isString(this.additionalArgs.npmDir) ||\n (Array.isArray(this.additionalArgs.npmDir) &&\n this.additionalArgs.npmDir.length > 0))\n ) {\n this.config.napi.npmDir = (\n Array.isArray(this.additionalArgs.npmDir) &&\n this.additionalArgs.npmDir.length > 0\n ? this.additionalArgs.npmDir[0]\n : String(this.additionalArgs.npmDir)\n )!;\n }\n\n if (!this.config.napi.packageJsonPath) {\n if (\n this.additionalArgs.packageJsonPath &&\n (isString(this.additionalArgs.packageJsonPath) ||\n (Array.isArray(this.additionalArgs.packageJsonPath) &&\n this.additionalArgs.packageJsonPath.length > 0))\n ) {\n this.config.napi.packageJsonPath = (\n Array.isArray(this.additionalArgs.packageJsonPath) &&\n this.additionalArgs.packageJsonPath.length > 0\n ? this.additionalArgs.packageJsonPath[0]\n : String(this.additionalArgs.packageJsonPath)\n )!;\n }\n\n if (!this.config.napi.packageJsonPath) {\n this.config.napi.packageJsonPath = appendPath(\n this.config.root,\n \"package.json\"\n );\n }\n }\n\n if (this.config.napi.target?.platform === \"wasm\") {\n this.dependencies[\"@napi-rs/wasm-runtime\"] = \"^1.1.4\";\n }\n\n let packageJson = {} as Record<string, any>;\n let originalPackageJson = {} as Record<string, any>;\n\n if (this.fs.existsSync(this.config.napi.packageJsonPath)) {\n packageJson = JSON.parse(\n (await this.fs.read(this.config.napi.packageJsonPath)) || \"{}\"\n );\n }\n\n originalPackageJson = { ...packageJson };\n packageJson.napi = {\n binaryName: this.config.napi.binaryName,\n packageName: this.config.napi.packageName,\n targets: this.config.napi.targets?.map(target => target.triple),\n npmClient: this.config.napi.npmClient,\n constEnum: this.config.napi.constEnum,\n dtsHeader: this.config.napi.dtsHeader,\n dtsHeaderFile: this.config.napi.dtsHeaderFile,\n ...packageJson.napi,\n wasm:\n this.config.napi.target?.platform === \"wasm\"\n ? defu(\n packageJson.napi?.wasm ?? {},\n this.config.napi.wasm ?? {},\n { initialMemory: 16384 }\n )\n : undefined\n };\n\n if (\n JSON.stringify(packageJson) !== JSON.stringify(originalPackageJson)\n ) {\n await this.fs.write(\n this.config.napi.packageJsonPath,\n JSON.stringify(packageJson, null, 2)\n );\n }\n },\n async prepare() {\n this.debug(\n `Preparing the N-API Rust runtime artifacts for the Powerlines project.`\n );\n\n this.napi = new NapiCli();\n\n if (this.config.napi.npmDir) {\n await this.napi.createNpmDirs({\n cwd: appendPath(this.config.root, this.config.cwd),\n npmDir: formatPath(this, this.config.napi.npmDir),\n configPath: formatPath(this, this.config.napi.configPath),\n packageJsonPath: formatPath(this, this.config.napi.packageJsonPath)\n });\n }\n },\n async build() {\n this.debug(\n `Building the N-API Rust runtime artifacts for the Powerlines project.`\n );\n\n const { task } = await this.napi.build({\n cwd: appendPath(this.config.root, this.config.cwd),\n package: this.config.napi.packageName,\n outputDir: formatPath(this, this.config.napi.outputDir),\n configPath: formatPath(this, this.config.napi.configPath),\n manifestPath: formatPath(this, this.config.napi.manifestPath),\n packageJsonPath: formatPath(this, this.config.napi.packageJsonPath),\n target: this.config.napi.target?.triple,\n profile: this.config.napi.profile,\n release:\n this.config.napi.release ?? this.config.mode === \"production\",\n features: this.config.napi.features,\n noDefaultFeatures: this.config.napi.noDefaultFeatures,\n strip: this.config.napi.strip,\n platform: this.config.napi.platform,\n noDtsHeader: this.config.napi.noDtsHeader,\n jsBinding: this.config.napi.jsBinding,\n dts: this.config.napi.dts,\n dtsCache: this.config.napi.dtsCache ?? !this.config.skipCache,\n verbose: isVerbose(this)\n });\n\n const outputs = await task;\n for (const output of outputs) {\n const code = await this.fs.read(output.path);\n if (code) {\n await this.fs.write(output.path, code);\n }\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAY,UAAO,UAAA,CAAA,MAAA;CACjB,OAAO,CAAC;EACR,MAAA;EACF,SAAA;YAEE,MAAA;IACG,KAAU;IACd,WAAA;IACO,WAAa,KAAG,OAAA;IACtB,UAAA;IACK,OAAM;IACH,GAAC;GACN,EACH;EACE;EACA,MAAM,iBAAW;GACf,IAAA,CAAA,KAAS,OAAA,KAAA,UAAA,KAAA,eAAA,WAAA,SAAA,KAAA,eAAA,MAAA,KAA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UAAA;AAAA,UAiBY,MAAA;EACf,MAAA;EACA,eAAA;EACA,QAAA,EAAU,QAAA;EACV,IAAA,EAAM,UAAA;EACN,GAAA;AAAA"}
1
+ {"version":3,"file":"targets.d.cts","names":[],"sources":["../../src/types/targets.ts"],"mappings":";cAkBa,iBAAA;AAAA,KA2BD,YAAA,WAAuB,iBAAiB;AAAA,cAEvC,eAAA;AAAA,KAOD,QAAA,GAAW,MAAA,CAAO,QAAQ;AAAA,KAGjC,UAAA;AAAA,UAiBY,MAAA;EACf,MAAA;EACA,eAAA;EACA,QAAA,EAAU,QAAA;EACV,IAAA,EAAM,UAAU;EAChB,GAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"targets.d.mts","names":[],"sources":["../../src/types/targets.ts"],"mappings":";cAkBa,iBAAA;AAAA,KA2BD,YAAA,WAAuB,iBAAA;AAAA,cAEtB,eAAA;AAAA,KAOD,QAAA,GAAW,MAAA,CAAO,QAAA;AAAA,KAGzB,UAAA;AAAA,UAiBY,MAAA;EACf,MAAA;EACA,eAAA;EACA,QAAA,EAAU,QAAA;EACV,IAAA,EAAM,UAAA;EACN,GAAA;AAAA"}
1
+ {"version":3,"file":"targets.d.mts","names":[],"sources":["../../src/types/targets.ts"],"mappings":";cAkBa,iBAAA;AAAA,KA2BD,YAAA,WAAuB,iBAAiB;AAAA,cAEvC,eAAA;AAAA,KAOD,QAAA,GAAW,MAAA,CAAO,QAAQ;AAAA,KAGjC,UAAA;AAAA,UAiBY,MAAA;EACf,MAAA;EACA,eAAA;EACA,QAAA,EAAU,QAAA;EACV,IAAA,EAAM,UAAU;EAChB,GAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"targets.mjs","names":[],"sources":["../../src/types/targets.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const AVAILABLE_TARGETS = [\n \"aarch64-apple-darwin\",\n \"aarch64-linux-android\",\n \"aarch64-unknown-linux-gnu\",\n \"aarch64-unknown-linux-musl\",\n \"aarch64-unknown-linux-ohos\",\n \"aarch64-pc-windows-msvc\",\n \"x86_64-apple-darwin\",\n \"x86_64-pc-windows-msvc\",\n \"x86_64-pc-windows-gnu\",\n \"x86_64-unknown-linux-gnu\",\n \"x86_64-unknown-linux-musl\",\n \"x86_64-unknown-linux-ohos\",\n \"x86_64-unknown-freebsd\",\n \"i686-pc-windows-msvc\",\n \"armv7-unknown-linux-gnueabihf\",\n \"armv7-unknown-linux-musleabihf\",\n \"armv7-linux-androideabi\",\n \"universal-apple-darwin\",\n \"loongarch64-unknown-linux-gnu\",\n \"riscv64gc-unknown-linux-gnu\",\n \"powerpc64le-unknown-linux-gnu\",\n \"s390x-unknown-linux-gnu\",\n \"wasm32-wasi-preview1-threads\",\n \"wasm32-wasip1-threads\"\n] as const;\n\nexport type TargetTriple = (typeof AVAILABLE_TARGETS)[number];\n\nexport const DEFAULT_TARGETS = [\n \"x86_64-apple-darwin\",\n \"aarch64-apple-darwin\",\n \"x86_64-pc-windows-msvc\",\n \"x86_64-unknown-linux-gnu\"\n] as const;\n\nexport type Platform = NodeJS.Platform | \"wasm\" | \"wasi\" | \"openharmony\";\n\n// https://nodejs.org/api/process.html#process_process_arch\ntype NodeJSArch =\n | \"arm\"\n | \"arm64\"\n | \"ia32\"\n | \"loong64\"\n | \"mips\"\n | \"mipsel\"\n | \"ppc\"\n | \"ppc64\"\n | \"riscv64\"\n | \"s390\"\n | \"s390x\"\n | \"x32\"\n | \"x64\"\n | \"universal\"\n | \"wasm32\";\n\nexport interface Target {\n triple: string;\n platformArchABI: string;\n platform: Platform;\n arch: NodeJSArch;\n abi: string | null;\n}\n"],"mappings":";AAkBA,MAAa,oBAAoB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AACjC,MAAW,kBAAa;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"targets.mjs","names":[],"sources":["../../src/types/targets.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const AVAILABLE_TARGETS = [\n \"aarch64-apple-darwin\",\n \"aarch64-linux-android\",\n \"aarch64-unknown-linux-gnu\",\n \"aarch64-unknown-linux-musl\",\n \"aarch64-unknown-linux-ohos\",\n \"aarch64-pc-windows-msvc\",\n \"x86_64-apple-darwin\",\n \"x86_64-pc-windows-msvc\",\n \"x86_64-pc-windows-gnu\",\n \"x86_64-unknown-linux-gnu\",\n \"x86_64-unknown-linux-musl\",\n \"x86_64-unknown-linux-ohos\",\n \"x86_64-unknown-freebsd\",\n \"i686-pc-windows-msvc\",\n \"armv7-unknown-linux-gnueabihf\",\n \"armv7-unknown-linux-musleabihf\",\n \"armv7-linux-androideabi\",\n \"universal-apple-darwin\",\n \"loongarch64-unknown-linux-gnu\",\n \"riscv64gc-unknown-linux-gnu\",\n \"powerpc64le-unknown-linux-gnu\",\n \"s390x-unknown-linux-gnu\",\n \"wasm32-wasi-preview1-threads\",\n \"wasm32-wasip1-threads\"\n] as const;\n\nexport type TargetTriple = (typeof AVAILABLE_TARGETS)[number];\n\nexport const DEFAULT_TARGETS = [\n \"x86_64-apple-darwin\",\n \"aarch64-apple-darwin\",\n \"x86_64-pc-windows-msvc\",\n \"x86_64-unknown-linux-gnu\"\n] as const;\n\nexport type Platform = NodeJS.Platform | \"wasm\" | \"wasi\" | \"openharmony\";\n\n// https://nodejs.org/api/process.html#process_process_arch\ntype NodeJSArch =\n | \"arm\"\n | \"arm64\"\n | \"ia32\"\n | \"loong64\"\n | \"mips\"\n | \"mipsel\"\n | \"ppc\"\n | \"ppc64\"\n | \"riscv64\"\n | \"s390\"\n | \"s390x\"\n | \"x32\"\n | \"x64\"\n | \"universal\"\n | \"wasm32\";\n\nexport interface Target {\n triple: string;\n platformArchABI: string;\n platform: Platform;\n arch: NodeJSArch;\n abi: string | null;\n}\n"],"mappings":";AAkBA,MAAa,oBAAoB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA;AACjC,MAAW,kBAAa;CAAA;CAAA;CAAA;CAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"wasm.d.cts","names":[],"sources":["../../src/types/wasm.ts"],"mappings":";;AAqBA;;UAAiB,kBAAA;EAAkB;;;EAIjC,EAAA;EAeA;;;EAVA,SAAA;EAgB0B;;;EAX1B,MAAA;EAsBA;;;EAjBA,UAAA;AAAA;;;;UAMe,WAAA;;;;;;EAMf,aAAA;;;;EAKA,aAAA;;;;EAKA,OAAA,EAAS,kBAAA;AAAA"}
1
+ {"version":3,"file":"wasm.d.cts","names":[],"sources":["../../src/types/wasm.ts"],"mappings":";;AAqBA;;UAAiB,kBAAA;EAAkB;;;EAIjC,EAAA;EAeA;;AAAU;EAVV,SAAA;EAgB0B;;;EAX1B,MAAA;EAsBA;;;EAjBA,UAAA;AAAA;;;;UAMe,WAAA;;;;;;EAMf,aAAA;;;;EAKA,aAAA;;;;EAKA,OAAA,EAAS,kBAAkB;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"wasm.d.mts","names":[],"sources":["../../src/types/wasm.ts"],"mappings":";;AAqBA;;UAAiB,kBAAA;EAAkB;;;EAIjC,EAAA;EAeA;;;EAVA,SAAA;EAgB0B;;;EAX1B,MAAA;EAsBA;;;EAjBA,UAAA;AAAA;;;;UAMe,WAAA;;;;;;EAMf,aAAA;;;;EAKA,aAAA;;;;EAKA,OAAA,EAAS,kBAAA;AAAA"}
1
+ {"version":3,"file":"wasm.d.mts","names":[],"sources":["../../src/types/wasm.ts"],"mappings":";;AAqBA;;UAAiB,kBAAA;EAAkB;;;EAIjC,EAAA;EAeA;;AAAU;EAVV,SAAA;EAgB0B;;;EAX1B,MAAA;EAsBA;;;EAjBA,UAAA;AAAA;;;;UAMe,WAAA;;;;;;EAMf,aAAA;;;;EAKA,aAAA;;;;EAKA,OAAA,EAAS,kBAAkB;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-napi-rs",
3
- "version": "0.2.80",
3
+ "version": "0.2.82",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin for integrating with N-API Rust modules.",
6
6
  "keywords": ["napi-rs", "powerlines", "storm-software", "powerlines-plugin"],
@@ -74,9 +74,9 @@
74
74
  "@alloy-js/markdown": "^0.23.0",
75
75
  "@alloy-js/typescript": "^0.23.0",
76
76
  "@napi-rs/cli": "^3.6.2",
77
- "@powerlines/plugin-alloy": "^0.26.123",
78
- "@powerlines/plugin-automd": "^0.1.501",
79
- "@powerlines/plugin-plugin": "^0.12.452",
77
+ "@powerlines/plugin-alloy": "^0.26.125",
78
+ "@powerlines/plugin-automd": "^0.1.503",
79
+ "@powerlines/plugin-plugin": "^0.12.454",
80
80
  "@stryke/convert": "^0.7.7",
81
81
  "@stryke/fs": "^0.33.76",
82
82
  "@stryke/path": "^0.29.3",
@@ -85,11 +85,11 @@
85
85
  "@stryke/types": "^0.12.4",
86
86
  "automd": "^0.4.3",
87
87
  "defu": "^6.1.7",
88
- "powerlines": "^0.47.40"
88
+ "powerlines": "^0.47.42"
89
89
  },
90
- "devDependencies": { "@types/node": "^25.8.0" },
90
+ "devDependencies": { "@types/node": "^25.9.0" },
91
91
  "peerDependencies": { "@napi-rs/wasm-runtime": ">=1.1.4" },
92
92
  "peerDependenciesMeta": { "@napi-rs/wasm-runtime": { "optional": true } },
93
93
  "publishConfig": { "access": "public" },
94
- "gitHead": "c5c293e753d59ab690265988c77bd535680ac71b"
94
+ "gitHead": "2dbbdb2f6fde8f0f49208757c7c1b18deb96ff97"
95
95
  }