@napi-rs/cli 3.2.0 → 3.3.1

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 (36) hide show
  1. package/cli.mjs +3 -3
  2. package/dist/cli.js +793 -864
  3. package/dist/index.cjs +920 -754
  4. package/dist/index.d.cts +31 -2
  5. package/dist/index.d.ts +30 -3
  6. package/dist/index.js +891 -751
  7. package/package.json +7 -7
  8. package/src/api/artifacts.ts +1 -1
  9. package/src/api/build.ts +175 -108
  10. package/src/api/create-npm-dirs.ts +2 -2
  11. package/src/api/new.ts +4 -3
  12. package/src/api/pre-publish.ts +1 -1
  13. package/src/api/rename.ts +3 -4
  14. package/src/api/templates/js-binding.ts +5 -1
  15. package/src/api/universalize.ts +1 -1
  16. package/src/api/version.ts +4 -1
  17. package/src/cli.ts +1 -27
  18. package/src/commands/new.ts +1 -1
  19. package/src/index.ts +33 -0
  20. package/src/utils/config.ts +1 -1
  21. package/src/utils/target.ts +1 -0
  22. package/src/api/__tests__/create-npm-dirs.spec.ts +0 -210
  23. package/src/api/__tests__/new.spec.ts +0 -429
  24. package/src/utils/__tests__/__fixtures__/napi_type_def +0 -201
  25. package/src/utils/__tests__/__snapshots__/config.spec.ts.md +0 -97
  26. package/src/utils/__tests__/__snapshots__/config.spec.ts.snap +0 -0
  27. package/src/utils/__tests__/__snapshots__/target.spec.ts.md +0 -173
  28. package/src/utils/__tests__/__snapshots__/target.spec.ts.snap +0 -0
  29. package/src/utils/__tests__/__snapshots__/typegen.spec.ts.md +0 -1157
  30. package/src/utils/__tests__/__snapshots__/typegen.spec.ts.snap +0 -0
  31. package/src/utils/__tests__/__snapshots__/version.spec.ts.md +0 -21
  32. package/src/utils/__tests__/__snapshots__/version.spec.ts.snap +0 -0
  33. package/src/utils/__tests__/config.spec.ts +0 -81
  34. package/src/utils/__tests__/target.spec.ts +0 -19
  35. package/src/utils/__tests__/typegen.spec.ts +0 -64
  36. package/src/utils/__tests__/version.spec.ts +0 -13
package/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { execSync } from 'child_process'
4
- import { resolve } from 'path'
5
- import { fileURLToPath } from 'url'
3
+ import { execSync } from 'node:child_process'
4
+ import { resolve } from 'node:path'
5
+ import { fileURLToPath } from 'node:url'
6
6
 
7
7
  execSync(
8
8
  `node --import @oxc-node/core/register ${resolve(