@napi-rs/cli 3.0.0-alpha.57 → 3.0.0-alpha.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/cli",
3
- "version": "3.0.0-alpha.57",
3
+ "version": "3.0.0-alpha.59",
4
4
  "description": "Cli tools for napi-rs",
5
5
  "author": "LongYinan <lynweklm@gmail.com>",
6
6
  "homepage": "https://github.com/napi-rs/napi-rs",
@@ -73,8 +73,8 @@
73
73
  "clipanion": "^3.2.1",
74
74
  "colorette": "^2.0.20",
75
75
  "debug": "^4.3.4",
76
- "emnapi": "1.2.0",
77
- "inquirer": "^9.2.13",
76
+ "emnapi": "^1.2.0",
77
+ "inquirer": "^10.0.0",
78
78
  "js-yaml": "^4.1.0",
79
79
  "lodash-es": "^4.17.21",
80
80
  "semver": "^7.5.4",
@@ -129,5 +129,5 @@
129
129
  "**/__tests__/**/*.spec.ts"
130
130
  ]
131
131
  },
132
- "gitHead": "488762791dc31a3a9b156fb214ab3a6af9b4aa6a"
132
+ "gitHead": "68f63882a9f55839b12da957efb671e1de395790"
133
133
  }
package/src/api/build.ts CHANGED
@@ -779,7 +779,7 @@ class Builder {
779
779
  kind: dest.endsWith('.node') ? 'node' : isWasm ? 'wasm' : 'exe',
780
780
  path: dest,
781
781
  })
782
- return wasmBinaryName
782
+ return wasmBinaryName ? join(this.outputDir, wasmBinaryName) : null
783
783
  } catch (e) {
784
784
  throw new Error('Failed to copy artifact', {
785
785
  cause: e,
@@ -23,7 +23,7 @@ const __wasi = new __WASI({
23
23
  })`
24
24
 
25
25
  const workerFsHandler = fs
26
- ? `\n worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))\n`
26
+ ? `worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))\n`
27
27
  : ''
28
28
 
29
29
  return `import {
@@ -107,8 +107,12 @@ export class NewCommand extends BaseNewCommand {
107
107
  type: 'checkbox',
108
108
  loop: false,
109
109
  message: 'Choose target(s) your crate will be compiled to',
110
- default: this.enableDefaultTargets ? DEFAULT_TARGETS : [],
111
- choices: AVAILABLE_TARGETS,
110
+ choices: AVAILABLE_TARGETS.map((target) => ({
111
+ name: target,
112
+ value: target,
113
+ // @ts-expect-error
114
+ checked: DEFAULT_TARGETS.includes(target),
115
+ })),
112
116
  })
113
117
 
114
118
  return targets