@napi-rs/cli 3.0.0-alpha.4 → 3.0.0-alpha.41

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.
Files changed (177) hide show
  1. package/cli.mjs +0 -0
  2. package/dist/api/artifacts.js +32 -8
  3. package/dist/api/artifacts.js.map +1 -0
  4. package/dist/api/build.d.ts +1 -1
  5. package/dist/api/build.js +231 -30
  6. package/dist/api/build.js.map +1 -0
  7. package/dist/api/create-npm-dirs.js +46 -8
  8. package/dist/api/create-npm-dirs.js.map +1 -0
  9. package/dist/api/new.js +47 -20
  10. package/dist/api/new.js.map +1 -0
  11. package/dist/api/pre-publish.js +10 -7
  12. package/dist/api/pre-publish.js.map +1 -0
  13. package/dist/api/rename.js +10 -1
  14. package/dist/api/rename.js.map +1 -0
  15. package/dist/api/templates/.gitignore.d.ts +1 -1
  16. package/dist/api/templates/.gitignore.js +2 -0
  17. package/dist/api/templates/.gitignore.js.map +1 -0
  18. package/dist/api/templates/.npmignore.js +1 -0
  19. package/dist/api/templates/.npmignore.js.map +1 -0
  20. package/dist/api/templates/build.rs.js +1 -0
  21. package/dist/api/templates/build.rs.js.map +1 -0
  22. package/dist/api/templates/cargo.toml.js +1 -0
  23. package/dist/api/templates/cargo.toml.js.map +1 -0
  24. package/dist/api/templates/ci-template.d.ts +2 -1
  25. package/dist/api/templates/ci-template.js +150 -152
  26. package/dist/api/templates/ci-template.js.map +1 -0
  27. package/dist/api/templates/ci.yml.d.ts +2 -1
  28. package/dist/api/templates/ci.yml.js +19 -4
  29. package/dist/api/templates/ci.yml.js.map +1 -0
  30. package/dist/api/templates/index.js +1 -0
  31. package/dist/api/templates/index.js.map +1 -0
  32. package/dist/api/templates/js-binding.d.ts +1 -1
  33. package/dist/api/templates/js-binding.js +143 -30
  34. package/dist/api/templates/js-binding.js.map +1 -0
  35. package/dist/api/templates/lib.rs.js +2 -4
  36. package/dist/api/templates/lib.rs.js.map +1 -0
  37. package/dist/api/templates/load-wasi-template.d.ts +2 -0
  38. package/dist/api/templates/load-wasi-template.js +143 -0
  39. package/dist/api/templates/load-wasi-template.js.map +1 -0
  40. package/dist/api/templates/package.json.d.ts +9 -2
  41. package/dist/api/templates/package.json.js +53 -28
  42. package/dist/api/templates/package.json.js.map +1 -0
  43. package/dist/api/templates/wasi-worker-template.d.ts +2 -0
  44. package/dist/api/templates/wasi-worker-template.js +93 -0
  45. package/dist/api/templates/wasi-worker-template.js.map +1 -0
  46. package/dist/api/universalize.js +6 -5
  47. package/dist/api/universalize.js.map +1 -0
  48. package/dist/api/version.js +3 -2
  49. package/dist/api/version.js.map +1 -0
  50. package/dist/cli.js +1 -0
  51. package/dist/cli.js.map +1 -0
  52. package/dist/commands/artifacts.js +4 -4
  53. package/dist/commands/artifacts.js.map +1 -0
  54. package/dist/commands/build.js +2 -1
  55. package/dist/commands/build.js.map +1 -0
  56. package/dist/commands/create-npm-dirs.js +1 -0
  57. package/dist/commands/create-npm-dirs.js.map +1 -0
  58. package/dist/commands/help.js +2 -2
  59. package/dist/commands/help.js.map +1 -0
  60. package/dist/commands/new.js +15 -7
  61. package/dist/commands/new.js.map +1 -0
  62. package/dist/commands/pre-publish.js +1 -0
  63. package/dist/commands/pre-publish.js.map +1 -0
  64. package/dist/commands/rename.js +1 -0
  65. package/dist/commands/rename.js.map +1 -0
  66. package/dist/commands/universalize.js +1 -0
  67. package/dist/commands/universalize.js.map +1 -0
  68. package/dist/commands/version.js +1 -0
  69. package/dist/commands/version.js.map +1 -0
  70. package/dist/def/artifacts.d.ts +21 -1
  71. package/dist/def/artifacts.js +12 -4
  72. package/dist/def/artifacts.js.map +1 -0
  73. package/dist/def/build.d.ts +20 -2
  74. package/dist/def/build.js +16 -4
  75. package/dist/def/build.js.map +1 -0
  76. package/dist/def/create-npm-dirs.d.ts +10 -0
  77. package/dist/def/create-npm-dirs.js +6 -2
  78. package/dist/def/create-npm-dirs.js.map +1 -0
  79. package/dist/def/new.d.ts +24 -6
  80. package/dist/def/new.js +13 -3
  81. package/dist/def/new.js.map +1 -0
  82. package/dist/def/pre-publish.d.ts +10 -0
  83. package/dist/def/pre-publish.js +9 -5
  84. package/dist/def/pre-publish.js.map +1 -0
  85. package/dist/def/rename.d.ts +11 -1
  86. package/dist/def/rename.js +7 -3
  87. package/dist/def/rename.js.map +1 -0
  88. package/dist/def/universalize.d.ts +10 -0
  89. package/dist/def/universalize.js +6 -2
  90. package/dist/def/universalize.js.map +1 -0
  91. package/dist/def/version.d.ts +10 -0
  92. package/dist/def/version.js +6 -2
  93. package/dist/def/version.js.map +1 -0
  94. package/dist/index.cjs +6022 -8033
  95. package/dist/index.d.ts +1 -0
  96. package/dist/index.js +2 -0
  97. package/dist/index.js.map +1 -0
  98. package/dist/utils/__tests__/config.spec.d.ts +1 -0
  99. package/dist/utils/__tests__/config.spec.js +63 -0
  100. package/dist/utils/__tests__/config.spec.js.map +1 -0
  101. package/dist/utils/__tests__/target.spec.js +1 -0
  102. package/dist/utils/__tests__/target.spec.js.map +1 -0
  103. package/dist/utils/__tests__/typegen.spec.js +9 -4
  104. package/dist/utils/__tests__/typegen.spec.js.map +1 -0
  105. package/dist/utils/__tests__/version.spec.js +1 -0
  106. package/dist/utils/__tests__/version.spec.js.map +1 -0
  107. package/dist/utils/cargo.js +2 -1
  108. package/dist/utils/cargo.js.map +1 -0
  109. package/dist/utils/ci.js +1 -0
  110. package/dist/utils/ci.js.map +1 -0
  111. package/dist/utils/config.d.ts +25 -5
  112. package/dist/utils/config.js +39 -6
  113. package/dist/utils/config.js.map +1 -0
  114. package/dist/utils/index.js +1 -0
  115. package/dist/utils/index.js.map +1 -0
  116. package/dist/utils/log.js +1 -0
  117. package/dist/utils/log.js.map +1 -0
  118. package/dist/utils/metadata.js +3 -2
  119. package/dist/utils/metadata.js.map +1 -0
  120. package/dist/utils/misc.d.ts +1 -1
  121. package/dist/utils/misc.js +4 -3
  122. package/dist/utils/misc.js.map +1 -0
  123. package/dist/utils/target.d.ts +9 -5
  124. package/dist/utils/target.js +16 -1
  125. package/dist/utils/target.js.map +1 -0
  126. package/dist/utils/typegen.d.ts +4 -1
  127. package/dist/utils/typegen.js +27 -6
  128. package/dist/utils/typegen.js.map +1 -0
  129. package/dist/utils/version.d.ts +2 -1
  130. package/dist/utils/version.js +13 -10
  131. package/dist/utils/version.js.map +1 -0
  132. package/package.json +50 -16
  133. package/src/api/artifacts.ts +85 -10
  134. package/src/api/build.ts +381 -32
  135. package/src/api/create-npm-dirs.ts +56 -8
  136. package/src/api/new.ts +69 -33
  137. package/src/api/pre-publish.ts +21 -12
  138. package/src/api/rename.ts +10 -1
  139. package/src/api/templates/.gitignore.ts +1 -0
  140. package/src/api/templates/ci-template.ts +151 -152
  141. package/src/api/templates/ci.yml.ts +19 -4
  142. package/src/api/templates/js-binding.ts +146 -30
  143. package/src/api/templates/lib.rs.ts +1 -4
  144. package/src/api/templates/load-wasi-template.ts +150 -0
  145. package/src/api/templates/package.json.ts +74 -27
  146. package/src/api/templates/wasi-worker-template.ts +93 -0
  147. package/src/api/universalize.ts +8 -5
  148. package/src/api/version.ts +5 -2
  149. package/src/commands/artifacts.ts +2 -2
  150. package/src/commands/build.ts +1 -1
  151. package/src/commands/new.ts +14 -8
  152. package/src/def/artifacts.ts +22 -3
  153. package/src/def/build.ts +32 -4
  154. package/src/def/create-npm-dirs.ts +9 -0
  155. package/src/def/new.ts +28 -3
  156. package/src/def/pre-publish.ts +12 -3
  157. package/src/def/rename.ts +11 -2
  158. package/src/def/universalize.ts +9 -0
  159. package/src/def/version.ts +9 -0
  160. package/src/index.ts +2 -0
  161. package/src/utils/__tests__/__snapshots__/config.spec.ts.md +97 -0
  162. package/src/utils/__tests__/__snapshots__/config.spec.ts.snap +0 -0
  163. package/src/utils/__tests__/__snapshots__/target.spec.ts.md +7 -0
  164. package/src/utils/__tests__/__snapshots__/target.spec.ts.snap +0 -0
  165. package/src/utils/__tests__/__snapshots__/typegen.spec.ts.md +555 -0
  166. package/src/utils/__tests__/__snapshots__/typegen.spec.ts.snap +0 -0
  167. package/src/utils/__tests__/__snapshots__/version.spec.ts.md +9 -8
  168. package/src/utils/__tests__/__snapshots__/version.spec.ts.snap +0 -0
  169. package/src/utils/__tests__/config.spec.ts +81 -0
  170. package/src/utils/__tests__/typegen.spec.ts +19 -4
  171. package/src/utils/cargo.ts +1 -1
  172. package/src/utils/config.ts +85 -9
  173. package/src/utils/metadata.ts +2 -2
  174. package/src/utils/misc.ts +11 -3
  175. package/src/utils/target.ts +23 -7
  176. package/src/utils/typegen.ts +30 -5
  177. package/src/utils/version.ts +11 -9
@@ -0,0 +1,93 @@
1
+ export const WASI_WORKER_TEMPLATE = `import fs from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import { parentPort, Worker } from "node:worker_threads";
4
+
5
+ import { instantiateNapiModuleSync, MessageHandler, WASI } from "@napi-rs/wasm-runtime";
6
+
7
+ const require = createRequire(import.meta.url);
8
+
9
+ if (parentPort) {
10
+ parentPort.on("message", (data) => {
11
+ globalThis.onmessage({ data });
12
+ });
13
+ }
14
+
15
+ Object.assign(globalThis, {
16
+ self: globalThis,
17
+ require,
18
+ Worker,
19
+ importScripts: function (f) {
20
+ ;(0, eval)(fs.readFileSync(f, "utf8") + "//# sourceURL=" + f);
21
+ },
22
+ postMessage: function (msg) {
23
+ if (parentPort) {
24
+ parentPort.postMessage(msg);
25
+ }
26
+ },
27
+ });
28
+
29
+ const handler = new MessageHandler({
30
+ onLoad({ wasmModule, wasmMemory }) {
31
+ const wasi = new WASI({ fs });
32
+
33
+ return instantiateNapiModuleSync(wasmModule, {
34
+ childThread: true,
35
+ wasi,
36
+ overwriteImports(importObject) {
37
+ importObject.env = {
38
+ ...importObject.env,
39
+ ...importObject.napi,
40
+ ...importObject.emnapi,
41
+ memory: wasmMemory
42
+ };
43
+ },
44
+ });
45
+ },
46
+ });
47
+
48
+ globalThis.onmessage = function (e) {
49
+ handler.handle(e);
50
+ };
51
+ `;
52
+ export const WASI_WORKER_BROWSER_TEMPLATE = `import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
53
+ import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'
54
+
55
+ const fs = createFsFromVolume(
56
+ Volume.fromJSON({
57
+ '/': null,
58
+ }),
59
+ )
60
+
61
+ const handler = new MessageHandler({
62
+ onLoad({ wasmModule, wasmMemory }) {
63
+ const wasi = new WASI({
64
+ fs,
65
+ print: function () {
66
+ // eslint-disable-next-line no-console
67
+ console.log.apply(console, arguments)
68
+ },
69
+ printErr: function() {
70
+ // eslint-disable-next-line no-console
71
+ console.error.apply(console, arguments)
72
+ },
73
+ })
74
+ return instantiateNapiModuleSync(wasmModule, {
75
+ childThread: true,
76
+ wasi,
77
+ overwriteImports(importObject) {
78
+ importObject.env = {
79
+ ...importObject.env,
80
+ ...importObject.napi,
81
+ ...importObject.emnapi,
82
+ memory: wasmMemory,
83
+ }
84
+ },
85
+ })
86
+ },
87
+ })
88
+
89
+ globalThis.onmessage = function (e) {
90
+ handler.handle(e)
91
+ }
92
+ `;
93
+ //# sourceMappingURL=wasi-worker-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wasi-worker-template.js","sourceRoot":"","sources":["../../../src/api/templates/wasi-worker-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDnC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC3C,CAAA"}
@@ -1,5 +1,5 @@
1
- import { spawnSync } from 'child_process';
2
- import { join, resolve } from 'path';
1
+ import { spawnSync } from 'node:child_process';
2
+ import { join, resolve } from 'node:path';
3
3
  import { applyDefaultUniversalizeOptions, } from '../def/universalize.js';
4
4
  import { readNapiConfig } from '../utils/config.js';
5
5
  import { debugFactory } from '../utils/log.js';
@@ -16,18 +16,18 @@ const universalizers = {
16
16
  export async function universalizeBinaries(userOptions) {
17
17
  const options = applyDefaultUniversalizeOptions(userOptions);
18
18
  const packageJsonPath = join(options.cwd, options.packageJsonPath);
19
- const config = await readNapiConfig(packageJsonPath);
19
+ const config = await readNapiConfig(packageJsonPath, options.configPath ? resolve(options.cwd, options.configPath) : undefined);
20
20
  const target = config.targets.find((t) => t.platform === process.platform && t.arch === 'universal');
21
21
  if (!target) {
22
22
  throw new Error(`'universal' arch for platform '${process.platform}' not found in config!`);
23
23
  }
24
- const srcFiles = UniArchsByPlatform[process.platform]?.map((arch) => `${config.binaryName}.${process.platform}-${arch}.node`);
24
+ const srcFiles = UniArchsByPlatform[process.platform]?.map((arch) => resolve(options.cwd, options.outputDir, `${config.binaryName}.${process.platform}-${arch}.node`));
25
25
  if (!srcFiles || !universalizers[process.platform]) {
26
26
  throw new Error(`'universal' arch for platform '${process.platform}' not supported.`);
27
27
  }
28
28
  debug(`Looking up source binaries to combine: `);
29
29
  debug(' %O', srcFiles);
30
- const srcFileLookup = await Promise.all(srcFiles.map((f) => fileExists(resolve(options.cwd, options.outputDir, f))));
30
+ const srcFileLookup = await Promise.all(srcFiles.map((f) => fileExists(f)));
31
31
  const notFoundFiles = srcFiles.filter((_, i) => !srcFileLookup[i]);
32
32
  if (notFoundFiles.length) {
33
33
  throw new Error(`Some binary files were not found: ${JSON.stringify(notFoundFiles)}`);
@@ -36,3 +36,4 @@ export async function universalizeBinaries(userOptions) {
36
36
  universalizers[process.platform]?.(srcFiles, output);
37
37
  debug(`Produced universal binary: ${output}`);
38
38
  }
39
+ //# sourceMappingURL=universalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"universalize.js","sourceRoot":"","sources":["../../src/api/universalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAC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C,CAAA;AAC/C,CAAC"}
@@ -1,11 +1,11 @@
1
- import { join, resolve } from 'path';
1
+ import { join, resolve } from 'node:path';
2
2
  import { applyDefaultVersionOptions } from '../def/version.js';
3
3
  import { readNapiConfig, debugFactory, updatePackageJson, } from '../utils/index.js';
4
4
  const debug = debugFactory('version');
5
5
  export async function version(userOptions) {
6
6
  const options = applyDefaultVersionOptions(userOptions);
7
7
  const packageJsonPath = resolve(options.cwd, options.packageJsonPath);
8
- const config = await readNapiConfig(packageJsonPath);
8
+ const config = await readNapiConfig(packageJsonPath, options.configPath ? resolve(options.cwd, options.configPath) : undefined);
9
9
  for (const target of config.targets) {
10
10
  const pkgDir = resolve(options.cwd, options.npmDir, target.platformArchABI);
11
11
  debug(`Update version to %i in [%i]`, config.packageJson.version, pkgDir);
@@ -14,3 +14,4 @@ export async function version(userOptions) {
14
14
  });
15
15
  }
16
16
  }
17
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/api/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,0BAA0B,EAAkB,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,KAAK,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;AAErC,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,WAA2B;IACvD,MAAM,OAAO,GAAG,0BAA0B,CAAC,WAAW,CAAC,CAAA;IACvD,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAErE,MAAM,MAAM,GAAG,MAAM,cAAc,CACjC,eAAe,EACf,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAC1E,CAAA;IAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC,CAAA;QAE3E,KAAK,CAAC,8BAA8B,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACzE,MAAM,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE;YACpD,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO;SACpC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
package/dist/cli.js CHANGED
@@ -24,3 +24,4 @@ cli.register(PrePublishCommand);
24
24
  cli.register(VersionCommand);
25
25
  cli.register(HelpCommand);
26
26
  void cli.runExit(process.argv.slice(2));
27
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;IAClB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,WAAW;CAC3B,CAAC,CAAA;AAEF,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AACxB,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AAC1B,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA;AAClC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAA;AAC9B,GAAG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAA;AACjC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;AAC3B,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;AAC/B,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;AAC5B,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;AAEzB,KAAK,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -1,14 +1,14 @@
1
1
  import { Command } from 'clipanion';
2
2
  import { collectArtifacts } from '../api/artifacts.js';
3
3
  import { BaseArtifactsCommand } from '../def/artifacts.js';
4
- class ArtifactsCommand extends BaseArtifactsCommand {
4
+ export class ArtifactsCommand extends BaseArtifactsCommand {
5
5
  static usage = Command.Usage({
6
6
  description: 'Copy artifacts from Github Actions into specified dir',
7
7
  examples: [
8
8
  [
9
- '$0 artifacts --dir . --dist ./npm',
9
+ '$0 artifacts --output-dir ./artifacts --dist ./npm',
10
10
  `Copy [binaryName].[platform].node under current dir(.) into packages under npm dir.
11
- e.g: index.linux-x64-gnu.node --> ./npm/linux-x64-gnu/index.node`,
11
+ e.g: index.linux-x64-gnu.node --> ./npm/linux-x64-gnu/index.linux-x64-gnu.node`,
12
12
  ],
13
13
  ],
14
14
  });
@@ -17,4 +17,4 @@ e.g: index.linux-x64-gnu.node --> ./npm/linux-x64-gnu/index.node`,
17
17
  await collectArtifacts(this.getOptions());
18
18
  }
19
19
  }
20
- export { ArtifactsCommand };
20
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../src/commands/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE1D,MAAM,OAAO,gBAAiB,SAAQ,oBAAoB;IACxD,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,WAAW,EAAE,uDAAuD;QACpE,QAAQ,EAAE;YACR;gBACE,oDAAoD;gBACpD;+EACuE;aACxE;SACF;KACF,CAAC,CAAA;IAEF,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;IAE9B,KAAK,CAAC,OAAO;QACX,MAAM,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAC3C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { execSync } from 'child_process';
1
+ import { execSync } from 'node:child_process';
2
2
  import { Option } from 'clipanion';
3
3
  import { buildProject } from '../api/build.js';
4
4
  import { BaseBuildCommand } from '../def/build.js';
@@ -32,3 +32,4 @@ export class BuildCommand extends BaseBuildCommand {
32
32
  }
33
33
  }
34
34
  }
35
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,YAAY,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
  }
7
7
  }
8
+ //# sourceMappingURL=create-npm-dirs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-npm-dirs.js","sourceRoot":"","sources":["../../src/commands/create-npm-dirs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEpE,MAAM,OAAO,oBAAqB,SAAQ,wBAAwB;IAChE,KAAK,CAAC,OAAO;QACX,MAAM,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IACxC,CAAC;CACF"}
@@ -4,10 +4,10 @@ import { Command } from 'clipanion';
4
4
  *
5
5
  * Paths: `-h`, `--help`
6
6
  */
7
- class HelpCommand extends Command {
7
+ export class HelpCommand extends Command {
8
8
  static paths = [[`-h`], [`--help`]];
9
9
  async execute() {
10
10
  await this.context.stdout.write(this.cli.usage());
11
11
  }
12
12
  }
13
- export { HelpCommand };
13
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAY;IAC3C,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IACnC,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;IACnD,CAAC"}
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'node:path';
2
2
  import { Option } from 'clipanion';
3
3
  import inquirer from 'inquirer';
4
4
  import { newProject } from '../api/new.js';
@@ -7,7 +7,7 @@ import { AVAILABLE_TARGETS, debugFactory, DEFAULT_TARGETS, } from '../utils/inde
7
7
  import { napiEngineRequirement } from '../utils/version.js';
8
8
  const debug = debugFactory('new');
9
9
  export class NewCommand extends BaseNewCommand {
10
- interactive = Option.Boolean('--interactive,-i', false, {
10
+ interactive = Option.Boolean('--interactive,-i', true, {
11
11
  description: 'Ask project basic information interactively without just using the default.',
12
12
  });
13
13
  async execute() {
@@ -25,9 +25,19 @@ export class NewCommand extends BaseNewCommand {
25
25
  async fetchOptions() {
26
26
  const cmdOptions = super.getOptions();
27
27
  if (this.interactive) {
28
+ const targetPath = cmdOptions.path
29
+ ? cmdOptions.path
30
+ : await inquirer
31
+ .prompt({
32
+ type: 'input',
33
+ name: 'path',
34
+ message: 'Target path to create the project, relative to cwd',
35
+ })
36
+ .then(({ path }) => path);
37
+ cmdOptions.path = targetPath;
28
38
  return {
29
39
  ...cmdOptions,
30
- name: await this.fetchName(path.parse(cmdOptions.path).base),
40
+ name: await this.fetchName(path.parse(targetPath).base),
31
41
  minNodeApiVersion: await this.fetchNapiVersion(),
32
42
  targets: await this.fetchTargets(),
33
43
  license: await this.fetchLicense(),
@@ -75,9 +85,6 @@ export class NewCommand extends BaseNewCommand {
75
85
  .then(({ minNodeApiVersion }) => minNodeApiVersion);
76
86
  }
77
87
  async fetchTargets() {
78
- if (this.enableDefaultTargets) {
79
- return DEFAULT_TARGETS.concat();
80
- }
81
88
  if (this.enableAllTargets) {
82
89
  return AVAILABLE_TARGETS.concat();
83
90
  }
@@ -86,7 +93,7 @@ export class NewCommand extends BaseNewCommand {
86
93
  type: 'checkbox',
87
94
  loop: false,
88
95
  message: 'Choose target(s) your crate will be compiled to',
89
- default: DEFAULT_TARGETS,
96
+ default: this.enableDefaultTargets ? DEFAULT_TARGETS : [],
90
97
  choices: AVAILABLE_TARGETS,
91
98
  });
92
99
  return targets;
@@ -110,3 +117,4 @@ export class NewCommand extends BaseNewCommand {
110
117
  return enableGithubActions;
111
118
  }
112
119
  }
120
+ //# sourceMappingURL=new.js.map
@@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AI,EAAE,SAAS;YACf,OAAO,EAAE,wCAAwC;YACjD,OAAO,EAAE,IAAI,CAAC,aAAa;SAC5B,CAAC,CAAA;QAEF,OAAO,aAAa,CAAA;IACtB,CAAC;IAEO,KAAK,CAAC,kBAAkB;QAC9B,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YACpD,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,0BAA0B;YACnC,OAAO,EAAE,IAAI,CAAC,mBAAmB;SAClC,CAAC,CAAA;QAEF,OAAO,mBAAmB,CAAA;IAC5B,CAAC;CACF"}
@@ -6,3 +6,4 @@ export class PrePublishCommand extends BasePrePublishCommand {
6
6
  await prePublish(this.getOptions());
7
7
  }
8
8
  }
9
+ //# sourceMappingURL=pre-publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pre-publish.js","sourceRoot":"","sources":["../../src/commands/pre-publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,OAAO,iBAAkB,SAAQ,qBAAqB;IAC1D,KAAK,CAAC,OAAO;QACX,mDAAmD;QACnD,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IACrC,CAAC;CACF"}
@@ -5,3 +5,4 @@ export class RenameCommand extends BaseRenameCommand {
5
5
  await renameProject(this.getOptions());
6
6
  }
7
7
  }
8
+ //# sourceMappingURL=rename.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rename.js","sourceRoot":"","sources":["../../src/commands/rename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,MAAM,OAAO,aAAc,SAAQ,iBAAiB;IAClD,KAAK,CAAC,OAAO;QACX,MAAM,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IACxC,CAAC;CACF"}
@@ -5,3 +5,4 @@ export class UniversalizeCommand extends BaseUniversalizeCommand {
5
5
  await universalizeBinaries(this.getOptions());
6
6
  }
7
7
  }
8
+ //# sourceMappingURL=universalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"universalize.js","sourceRoot":"","sources":["../../src/commands/universalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,OAAO,mBAAoB,SAAQ,uBAAuB;IAC9D,KAAK,CAAC,OAAO;QACX,MAAM,oBAAoB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAC/C,CAAC;CACF"}
@@ -5,3 +5,4 @@ export class VersionCommand extends BaseVersionCommand {
5
5
  await version(this.getOptions());
6
6
  }
7
7
  }
8
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IACpD,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAClC,CAAC;CACF"}
@@ -3,14 +3,18 @@ export declare abstract class BaseArtifactsCommand extends Command {
3
3
  static paths: string[][];
4
4
  static usage: import("clipanion").Usage;
5
5
  cwd: string;
6
+ configPath?: string;
6
7
  packageJsonPath: string;
7
8
  outputDir: string;
8
9
  npmDir: string;
10
+ buildOutputDir?: string;
9
11
  getOptions(): {
10
12
  cwd: string;
13
+ configPath: string | undefined;
11
14
  packageJsonPath: string;
12
15
  outputDir: string;
13
16
  npmDir: string;
17
+ buildOutputDir: string | undefined;
14
18
  };
15
19
  }
16
20
  /**
@@ -23,6 +27,10 @@ export interface ArtifactsOptions {
23
27
  * @default process.cwd()
24
28
  */
25
29
  cwd?: string;
30
+ /**
31
+ * Path to `napi` config json file
32
+ */
33
+ configPath?: string;
26
34
  /**
27
35
  * Path to `package.json`
28
36
  *
@@ -32,7 +40,7 @@ export interface ArtifactsOptions {
32
40
  /**
33
41
  * Path to the folder where all built `.node` files put, same as `--output-dir` of build command
34
42
  *
35
- * @default './'
43
+ * @default './artifacts'
36
44
  */
37
45
  outputDir?: string;
38
46
  /**
@@ -41,10 +49,22 @@ export interface ArtifactsOptions {
41
49
  * @default 'npm'
42
50
  */
43
51
  npmDir?: string;
52
+ /**
53
+ * Path to the build output dir, only needed when targets contains `wasm32-wasi-*`
54
+ */
55
+ buildOutputDir?: string;
44
56
  }
45
57
  export declare function applyDefaultArtifactsOptions(options: ArtifactsOptions): {
46
58
  cwd: string;
59
+ /**
60
+ * Path to `napi` config json file
61
+ */
62
+ configPath?: string | undefined;
47
63
  packageJsonPath: string;
48
64
  outputDir: string;
49
65
  npmDir: string;
66
+ /**
67
+ * Path to the build output dir, only needed when targets contains `wasm32-wasi-*`
68
+ */
69
+ buildOutputDir?: string | undefined;
50
70
  };
@@ -1,7 +1,7 @@
1
1
  // This file is generated by codegen/index.ts
2
2
  // Do not edit this file manually
3
3
  import { Command, Option } from 'clipanion';
4
- class BaseArtifactsCommand extends Command {
4
+ export class BaseArtifactsCommand extends Command {
5
5
  static paths = [['artifacts']];
6
6
  static usage = Command.Usage({
7
7
  description: 'Copy artifacts from Github Actions into npm packages and ready to publish',
@@ -9,31 +9,39 @@ class BaseArtifactsCommand extends Command {
9
9
  cwd = Option.String('--cwd', process.cwd(), {
10
10
  description: 'The working directory of where napi command will be executed in, all other paths options are relative to this path',
11
11
  });
12
+ configPath = Option.String('--config-path,-c', {
13
+ description: 'Path to `napi` config json file',
14
+ });
12
15
  packageJsonPath = Option.String('--package-json-path', 'package.json', {
13
16
  description: 'Path to `package.json`',
14
17
  });
15
- outputDir = Option.String('--output-dir,-o', './', {
18
+ outputDir = Option.String('--output-dir,-o,-d', './artifacts', {
16
19
  description: 'Path to the folder where all built `.node` files put, same as `--output-dir` of build command',
17
20
  });
18
21
  npmDir = Option.String('--npm-dir', 'npm', {
19
22
  description: 'Path to the folder where the npm packages put',
20
23
  });
24
+ buildOutputDir = Option.String('--build-output-dir', {
25
+ description: 'Path to the build output dir, only needed when targets contains `wasm32-wasi-*`',
26
+ });
21
27
  getOptions() {
22
28
  return {
23
29
  cwd: this.cwd,
30
+ configPath: this.configPath,
24
31
  packageJsonPath: this.packageJsonPath,
25
32
  outputDir: this.outputDir,
26
33
  npmDir: this.npmDir,
34
+ buildOutputDir: this.buildOutputDir,
27
35
  };
28
36
  }
29
37
  }
30
- export { BaseArtifactsCommand };
31
38
  export function applyDefaultArtifactsOptions(options) {
32
39
  return {
33
40
  cwd: process.cwd(),
34
41
  packageJsonPath: 'package.json',
35
- outputDir: './',
42
+ outputDir: './artifacts',
36
43
  npmDir: 'npm',
37
44
  ...options,
38
45
  };
39
46
  }
47
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../src/def/artifacts.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,iCAAiC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAgB,oBAAqB,SAAQ,OAAO;IACxD,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;IAE9B,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,WAAW,EACT,2EAA2E;KAC9E,CAAC,CAAA;IAEF,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;QAC1C,WAAW,EACT,oHAAoH;KACvH,CAAC,CAAA;IAEF,UAAU,GAAY,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;QACtD,WAAW,EAAE,iCAAiC;KAC/C,CAAC,CAAA;IAEF,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,cAAc,EAAE;QACrE,WAAW,EAAE,wBAAwB;KACtC,CAAC,CAAA;IAEF,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,aAAa,EAAE;QAC7D,WAAW,EACT,+FAA+F;KAClG,CAAC,CAAA;IAEF,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE;QACzC,WAAW,EAAE,+CAA+C;KAC7D,CAAC,CAAA;IAEF,cAAc,GAAY,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE;QAC5D,WAAW,EACT,iFAAiF;KACpF,CAAC,CAAA;IAEF,UAAU;QACR,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAA;IACH,CAAC;;AAyCH,MAAM,UAAU,4BAA4B,CAAC,OAAyB;IACpE,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,eAAe,EAAE,cAAc;QAC/B,SAAS,EAAE,aAAa;QACxB,MAAM,EAAE,KAAK;QACb,GAAG,OAAO;KACX,CAAA;AACH,CAAC"}
@@ -5,11 +5,13 @@ export declare abstract class BaseBuildCommand extends Command {
5
5
  target?: string;
6
6
  cwd?: string;
7
7
  manifestPath?: string;
8
+ configPath?: string;
8
9
  packageJsonPath?: string;
9
10
  targetDir?: string;
10
11
  outputDir?: string;
11
12
  platform?: boolean;
12
13
  jsPackageName?: string;
14
+ constEnum?: boolean;
13
15
  jsBinding?: string;
14
16
  noJsBinding?: boolean;
15
17
  dts?: string;
@@ -23,6 +25,7 @@ export declare abstract class BaseBuildCommand extends Command {
23
25
  profile?: string;
24
26
  crossCompile?: boolean;
25
27
  useCross?: boolean;
28
+ useNapiCross?: boolean;
26
29
  watch?: boolean;
27
30
  features?: string[];
28
31
  allFeatures?: boolean;
@@ -31,11 +34,13 @@ export declare abstract class BaseBuildCommand extends Command {
31
34
  target: string | undefined;
32
35
  cwd: string | undefined;
33
36
  manifestPath: string | undefined;
37
+ configPath: string | undefined;
34
38
  packageJsonPath: string | undefined;
35
39
  targetDir: string | undefined;
36
40
  outputDir: string | undefined;
37
41
  platform: boolean | undefined;
38
42
  jsPackageName: string | undefined;
43
+ constEnum: boolean | undefined;
39
44
  jsBinding: string | undefined;
40
45
  noJsBinding: boolean | undefined;
41
46
  dts: string | undefined;
@@ -49,6 +54,7 @@ export declare abstract class BaseBuildCommand extends Command {
49
54
  profile: string | undefined;
50
55
  crossCompile: boolean | undefined;
51
56
  useCross: boolean | undefined;
57
+ useNapiCross: boolean | undefined;
52
58
  watch: boolean | undefined;
53
59
  features: string[] | undefined;
54
60
  allFeatures: boolean | undefined;
@@ -56,7 +62,7 @@ export declare abstract class BaseBuildCommand extends Command {
56
62
  };
57
63
  }
58
64
  /**
59
- * Build the napi-rs project
65
+ * Build the NAPI-RS project
60
66
  */
61
67
  export interface BuildOptions {
62
68
  /**
@@ -71,6 +77,10 @@ export interface BuildOptions {
71
77
  * Path to `Cargo.toml`
72
78
  */
73
79
  manifestPath?: string;
80
+ /**
81
+ * Path to `napi` config json file
82
+ */
83
+ configPath?: string;
74
84
  /**
75
85
  * Path to `package.json`
76
86
  */
@@ -91,6 +101,10 @@ export interface BuildOptions {
91
101
  * Package name in generated js binding file. Only works with `--platform` flag
92
102
  */
93
103
  jsPackageName?: string;
104
+ /**
105
+ * Whether generate const enum for typescript bindings
106
+ */
107
+ constEnum?: boolean;
94
108
  /**
95
109
  * Path and filename of generated JS binding file. Only works with `--platform` flag. Relative to `--output_dir`.
96
110
  */
@@ -144,7 +158,11 @@ export interface BuildOptions {
144
158
  */
145
159
  useCross?: boolean;
146
160
  /**
147
- * watch the crate changes and build continiously with `cargo-watch` crates
161
+ * [experimental] use @napi-rs/cross-toolchain to cross-compile Linux arm/arm64/x64 gnu targets.
162
+ */
163
+ useNapiCross?: boolean;
164
+ /**
165
+ * watch the crate changes and build continuously with `cargo-watch` crates
148
166
  */
149
167
  watch?: boolean;
150
168
  /**
package/dist/def/build.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // This file is generated by codegen/index.ts
2
2
  // Do not edit this file manually
3
3
  import { Command, Option } from 'clipanion';
4
- class BaseBuildCommand extends Command {
4
+ export class BaseBuildCommand extends Command {
5
5
  static paths = [['build']];
6
6
  static usage = Command.Usage({
7
- description: 'Build the napi-rs project',
7
+ description: 'Build the NAPI-RS project',
8
8
  });
9
9
  target = Option.String('--target,-t', {
10
10
  description: 'Build for the target triple, bypassed to `cargo build --target`',
@@ -15,6 +15,9 @@ class BaseBuildCommand extends Command {
15
15
  manifestPath = Option.String('--manifest-path', {
16
16
  description: 'Path to `Cargo.toml`',
17
17
  });
18
+ configPath = Option.String('--config-path,-c', {
19
+ description: 'Path to `napi` config json file',
20
+ });
18
21
  packageJsonPath = Option.String('--package-json-path', {
19
22
  description: 'Path to `package.json`',
20
23
  });
@@ -30,6 +33,9 @@ class BaseBuildCommand extends Command {
30
33
  jsPackageName = Option.String('--js-package-name', {
31
34
  description: 'Package name in generated js binding file. Only works with `--platform` flag',
32
35
  });
36
+ constEnum = Option.Boolean('--const-enum', {
37
+ description: 'Whether generate const enum for typescript bindings',
38
+ });
33
39
  jsBinding = Option.String('--js', {
34
40
  description: 'Path and filename of generated JS binding file. Only works with `--platform` flag. Relative to `--output_dir`.',
35
41
  });
@@ -69,8 +75,11 @@ class BaseBuildCommand extends Command {
69
75
  useCross = Option.Boolean('--use-cross', {
70
76
  description: '[experimental] use [cross](https://github.com/cross-rs/cross) instead of `cargo`',
71
77
  });
78
+ useNapiCross = Option.Boolean('--use-napi-cross', {
79
+ description: '[experimental] use @napi-rs/cross-toolchain to cross-compile Linux arm/arm64/x64 gnu targets.',
80
+ });
72
81
  watch = Option.Boolean('--watch,-w', {
73
- description: 'watch the crate changes and build continiously with `cargo-watch` crates',
82
+ description: 'watch the crate changes and build continuously with `cargo-watch` crates',
74
83
  });
75
84
  features = Option.Array('--features,-F', {
76
85
  description: 'Space-separated list of features to activate',
@@ -86,11 +95,13 @@ class BaseBuildCommand extends Command {
86
95
  target: this.target,
87
96
  cwd: this.cwd,
88
97
  manifestPath: this.manifestPath,
98
+ configPath: this.configPath,
89
99
  packageJsonPath: this.packageJsonPath,
90
100
  targetDir: this.targetDir,
91
101
  outputDir: this.outputDir,
92
102
  platform: this.platform,
93
103
  jsPackageName: this.jsPackageName,
104
+ constEnum: this.constEnum,
94
105
  jsBinding: this.jsBinding,
95
106
  noJsBinding: this.noJsBinding,
96
107
  dts: this.dts,
@@ -104,6 +115,7 @@ class BaseBuildCommand extends Command {
104
115
  profile: this.profile,
105
116
  crossCompile: this.crossCompile,
106
117
  useCross: this.useCross,
118
+ useNapiCross: this.useNapiCross,
107
119
  watch: this.watch,
108
120
  features: this.features,
109
121
  allFeatures: this.allFeatures,
@@ -111,4 +123,4 @@ class BaseBuildCommand extends Command {
111
123
  };
112
124
  }
113
125
  }
114
- export { BaseBuildCommand };
126
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/def/build.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,iCAAiC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAgB,gBAAiB,SAAQ,OAAO;IACpD,MAAM,CAAC,KAAK,GAAG,CA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