@napi-rs/cli 3.8.3 → 3.8.5
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/README.md +7 -4
- package/dist/cli.js +611 -71
- package/dist/index.cjs +612 -72
- package/dist/index.d.cts +34 -3
- package/dist/index.d.ts +34 -3
- package/dist/index.js +611 -71
- package/docs/pre-publish.md +14 -13
- package/package.json +1 -1
- package/src/api/__tests__/__snapshots__/templates.spec.ts.md +768 -9
- package/src/api/__tests__/__snapshots__/templates.spec.ts.snap +0 -0
- package/src/api/__tests__/pre-publish.spec.ts +419 -0
- package/src/api/__tests__/templates.spec.ts +85 -1
- package/src/api/pre-publish.ts +135 -11
- package/src/api/templates/load-wasi-template.ts +499 -13
- package/src/def/pre-publish.ts +13 -0
- package/src/utils/config.ts +34 -1
package/docs/pre-publish.md
CHANGED
|
@@ -22,16 +22,17 @@ new NapiCli().prePublish({
|
|
|
22
22
|
|
|
23
23
|
## Options
|
|
24
24
|
|
|
25
|
-
| Options | CLI Options | type
|
|
26
|
-
| ------------------- | ------------------------- |
|
|
27
|
-
| | --help,-h |
|
|
28
|
-
| cwd | --cwd | string
|
|
29
|
-
| configPath | --config-path,-c | string
|
|
30
|
-
| packageJsonPath | --package-json-path | string
|
|
31
|
-
| npmDir | --npm-dir,-p | string
|
|
32
|
-
| tagStyle | --tag-style,--tagstyle,-t | 'npm' \| 'lerna'
|
|
33
|
-
| ghRelease | --gh-release | boolean
|
|
34
|
-
| ghReleaseName | --gh-release-name | string
|
|
35
|
-
| ghReleaseId | --gh-release-id | string
|
|
36
|
-
| skipOptionalPublish | --skip-optional-publish | boolean
|
|
37
|
-
|
|
|
25
|
+
| Options | CLI Options | type | required | default | description |
|
|
26
|
+
| ------------------- | ------------------------- | ------------------------------------------- | -------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
27
|
+
| | --help,-h | | | | get help |
|
|
28
|
+
| cwd | --cwd | string | false | process.cwd() | The working directory of where napi command will be executed in, all other paths options are relative to this path |
|
|
29
|
+
| configPath | --config-path,-c | string | false | | Path to `napi` config json file |
|
|
30
|
+
| packageJsonPath | --package-json-path | string | false | 'package.json' | Path to `package.json` |
|
|
31
|
+
| npmDir | --npm-dir,-p | string | false | 'npm' | Path to the folder where the npm packages put |
|
|
32
|
+
| tagStyle | --tag-style,--tagstyle,-t | 'npm' \| 'lerna' | false | 'lerna' | git tag style, `npm` or `lerna` |
|
|
33
|
+
| ghRelease | --gh-release | boolean | false | true | Whether create GitHub release |
|
|
34
|
+
| ghReleaseName | --gh-release-name | string | false | | GitHub release name |
|
|
35
|
+
| ghReleaseId | --gh-release-id | string | false | | Existing GitHub release id |
|
|
36
|
+
| skipOptionalPublish | --skip-optional-publish | boolean | false | false | Whether skip optionalDependencies packages publish |
|
|
37
|
+
| rootPublisher | --root-publisher | 'npm' \| 'pnpm' \| 'yarn' \| 'yarn-classic' | false | | The package manager that publishes the root package. pnpm and yarn berry replace `exports` with `publishConfig.exports` while packing, so for them the root package validation targets the publish-effective export map. Defaults to the `napi.rootPublisher` config field, and validates both export maps when neither is set |
|
|
38
|
+
| dryRun | --dry-run | boolean | false | false | Dry run without touching file system |
|