@storm-software/workspace-tools 1.269.1 → 1.270.0
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/CHANGELOG.md +37 -0
- package/README.md +1 -1
- package/dist/chunk-A7JGVU4P.js +468 -0
- package/dist/chunk-SRN4D7WO.mjs +468 -0
- package/dist/executors.js +2 -2
- package/dist/executors.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/src/executors/npm-publish/executor.js +2 -2
- package/dist/src/executors/npm-publish/executor.mjs +1 -1
- package/docs/executors/rollup.md +88 -0
- package/executors.ts +23 -0
- package/generators.ts +14 -0
- package/index.ts +5 -0
- package/package.json +4 -4
- package/project.json +58 -0
- package/src/base/base-executor.ts +200 -0
- package/src/base/base-executor.untyped.ts +18 -0
- package/src/base/base-generator.ts +130 -0
- package/src/base/base-generator.untyped.ts +16 -0
- package/src/base/cargo-base-executor.untyped.ts +73 -0
- package/src/base/index.ts +8 -0
- package/src/base/typescript-build-executor.untyped.ts +153 -0
- package/src/base/typescript-library-generator.ts +415 -0
- package/src/base/typescript-library-generator.untyped.ts +106 -0
- package/src/executors/cargo-build/executor.spec.ts +18 -0
- package/src/executors/cargo-build/executor.ts +28 -0
- package/src/executors/cargo-build/untyped.ts +18 -0
- package/src/executors/cargo-check/executor.spec.ts +18 -0
- package/src/executors/cargo-check/executor.ts +27 -0
- package/src/executors/cargo-check/untyped.ts +11 -0
- package/src/executors/cargo-clippy/executor.spec.ts +18 -0
- package/src/executors/cargo-clippy/executor.ts +28 -0
- package/src/executors/cargo-clippy/untyped.ts +18 -0
- package/src/executors/cargo-doc/executor.spec.ts +18 -0
- package/src/executors/cargo-doc/executor.ts +39 -0
- package/src/executors/cargo-doc/untyped.ts +44 -0
- package/src/executors/cargo-format/executor.spec.ts +18 -0
- package/src/executors/cargo-format/executor.ts +28 -0
- package/src/executors/cargo-format/untyped.ts +11 -0
- package/src/executors/cargo-publish/executor.spec.ts +11 -0
- package/src/executors/cargo-publish/executor.ts +139 -0
- package/src/executors/cargo-publish/untyped.ts +33 -0
- package/src/executors/clean-package/constants.ts +99 -0
- package/src/executors/clean-package/executor.spec.ts +18 -0
- package/src/executors/clean-package/executor.ts +214 -0
- package/src/executors/clean-package/types.ts +6 -0
- package/src/executors/clean-package/untyped.ts +60 -0
- package/src/executors/clean-package/utils.ts +85 -0
- package/src/executors/esbuild/executor.spec.ts +11 -0
- package/src/executors/esbuild/executor.ts +67 -0
- package/src/executors/esbuild/untyped.ts +20 -0
- package/src/executors/npm-publish/executor.spec.ts +11 -0
- package/src/executors/npm-publish/executor.ts +681 -0
- package/src/executors/npm-publish/untyped.ts +56 -0
- package/src/executors/size-limit/executor.spec.ts +18 -0
- package/src/executors/size-limit/executor.ts +88 -0
- package/src/executors/size-limit/untyped.ts +22 -0
- package/src/executors/typia/executor.ts +54 -0
- package/src/executors/typia/untyped.ts +48 -0
- package/src/executors/unbuild/executor.spec.ts +11 -0
- package/src/executors/unbuild/executor.ts +136 -0
- package/src/executors/unbuild/untyped.ts +152 -0
- package/src/generators/browser-library/generator.spec.ts +20 -0
- package/src/generators/browser-library/generator.ts +109 -0
- package/src/generators/browser-library/untyped.ts +29 -0
- package/src/generators/config-schema/generator.spec.ts +20 -0
- package/src/generators/config-schema/generator.ts +90 -0
- package/src/generators/config-schema/untyped.ts +19 -0
- package/src/generators/init/init.ts +32 -0
- package/src/generators/init/untyped.ts +16 -0
- package/src/generators/neutral-library/generator.spec.ts +20 -0
- package/src/generators/neutral-library/generator.ts +81 -0
- package/src/generators/neutral-library/untyped.ts +29 -0
- package/src/generators/node-library/generator.spec.ts +20 -0
- package/src/generators/node-library/generator.ts +84 -0
- package/src/generators/node-library/untyped.ts +29 -0
- package/src/generators/preset/files/.all-contributorsrc.template +48 -0
- package/src/generators/preset/files/.editorconfig +454 -0
- package/src/generators/preset/files/.env.template +38 -0
- package/src/generators/preset/files/.gitattributes +52 -0
- package/src/generators/preset/files/.github/.nvmrc +1 -0
- package/src/generators/preset/files/.github/CODEOWNERS +3 -0
- package/src/generators/preset/files/.github/CODE_OF_CONDUCT.md +125 -0
- package/src/generators/preset/files/.github/CONTRIBUTING.md.template +15 -0
- package/src/generators/preset/files/.github/FUNDING.yml +3 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +102 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +56 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +60 -0
- package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +39 -0
- package/src/generators/preset/files/.github/SECURITY.md +9 -0
- package/src/generators/preset/files/.github/codecov.yml +29 -0
- package/src/generators/preset/files/.github/dependabot.yml +64 -0
- package/src/generators/preset/files/.github/labels.yml +84 -0
- package/src/generators/preset/files/.github/renovate.json +4 -0
- package/src/generators/preset/files/.github/renovate.json.template +63 -0
- package/src/generators/preset/files/.github/stale.yml +55 -0
- package/src/generators/preset/files/.github/workflows/build-release.yml.template +25 -0
- package/src/generators/preset/files/.github/workflows/code-review.yml +18 -0
- package/src/generators/preset/files/.github/workflows/codeql.yml +84 -0
- package/src/generators/preset/files/.github/workflows/dependabot-update.yml +32 -0
- package/src/generators/preset/files/.github/workflows/git-guardian.yml +23 -0
- package/src/generators/preset/files/.github/workflows/greetings.yml +31 -0
- package/src/generators/preset/files/.github/workflows/labels.yml +31 -0
- package/src/generators/preset/files/.github/workflows/lock.yml +26 -0
- package/src/generators/preset/files/.log4brains.yml.template +5 -0
- package/src/generators/preset/files/.markdownlint.json +155 -0
- package/src/generators/preset/files/.verdaccio/config.yml.template +40 -0
- package/src/generators/preset/files/.vscode/README.md +32 -0
- package/src/generators/preset/files/.vscode/cspell.json +3 -0
- package/src/generators/preset/files/.vscode/extensions.json +14 -0
- package/src/generators/preset/files/.vscode/launch.json +37 -0
- package/src/generators/preset/files/.vscode/settings.json +401 -0
- package/src/generators/preset/files/.vscode/tasks.json +4 -0
- package/src/generators/preset/files/.whitesource +14 -0
- package/src/generators/preset/files/assets/diagrams/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/dark/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/light/.gitkeep +0 -0
- package/src/generators/preset/files/assets/logos/.gitkeep +0 -0
- package/src/generators/preset/files/docs/api-reference/.gitkeep +0 -0
- package/src/generators/preset/generator.spec.ts +20 -0
- package/src/generators/preset/generator.ts +315 -0
- package/src/generators/preset/untyped.ts +88 -0
- package/src/generators/release-version/generator.spec.ts +20 -0
- package/src/generators/release-version/generator.ts +920 -0
- package/src/generators/release-version/untyped.ts +156 -0
- package/src/plugins/rust/cargo-toml.ts +434 -0
- package/src/plugins/rust/index.ts +1 -0
- package/src/plugins/typescript/index.ts +1 -0
- package/src/plugins/typescript/project-config.ts +564 -0
- package/src/plugins/typescript/tsup.ts +198 -0
- package/src/types.ts +130 -0
- package/src/utils/apply-workspace-tokens.ts +73 -0
- package/src/utils/cargo.ts +219 -0
- package/src/utils/create-cli-options.ts +23 -0
- package/src/utils/get-project-configurations.ts +27 -0
- package/src/utils/index.ts +12 -0
- package/src/utils/lock-file.ts +159 -0
- package/src/utils/package-helpers.ts +54 -0
- package/src/utils/plugin-helpers.ts +112 -0
- package/src/utils/pnpm-deps-update.ts +111 -0
- package/src/utils/project-tags.ts +162 -0
- package/src/utils/toml.ts +204 -0
- package/src/utils/typia-transform.ts +8 -0
- package/src/utils/versions.ts +19 -0
- package/tsconfig.json +30 -0
- package/tsup.config.ts +36 -0
- package/dist/chunk-FT3ZTDTT.js +0 -282
- package/dist/chunk-ZC6J6IDE.mjs +0 -282
- package/dist/src/generators/preset/files/LICENSE +0 -201
- package/docs/api/base/base-executor.schema.md +0 -16
- package/docs/api/base/base-generator.schema.md +0 -15
- package/docs/api/base/cargo-base-executor.schema.md +0 -90
- package/docs/api/base/typescript-build-executor.schema.md +0 -126
- package/docs/api/base/typescript-library-generator.schema.md +0 -129
- package/docs/api/executors/cargo-build/schema.md +0 -89
- package/docs/api/executors/cargo-check/schema.md +0 -90
- package/docs/api/executors/cargo-clippy/schema.md +0 -99
- package/docs/api/executors/cargo-doc/schema.md +0 -130
- package/docs/api/executors/cargo-format/schema.md +0 -90
- package/docs/api/executors/cargo-publish/schema.md +0 -117
- package/docs/api/executors/clean-package/schema.md +0 -65
- package/docs/api/executors/esbuild/schema.md +0 -126
- package/docs/api/executors/npm-publish/schema.md +0 -64
- package/docs/api/executors/size-limit/schema.md +0 -25
- package/docs/api/executors/typia/schema.md +0 -46
- package/docs/api/executors/unbuild/schema.md +0 -222
- package/docs/api/generators/browser-library/files/README.md +0 -58
- package/docs/api/generators/browser-library/schema.md +0 -129
- package/docs/api/generators/config-schema/schema.md +0 -25
- package/docs/api/generators/init/schema.md +0 -15
- package/docs/api/generators/neutral-library/files/README.md +0 -58
- package/docs/api/generators/neutral-library/schema.md +0 -129
- package/docs/api/generators/node-library/files/README.md +0 -63
- package/docs/api/generators/node-library/schema.md +0 -129
- package/docs/api/generators/preset/schema.md +0 -110
- package/docs/api/generators/release-version/schema.md +0 -160
- /package/{dist/src → src}/base/base-executor.schema.d.ts +0 -0
- /package/{dist/src → src}/base/base-executor.schema.json +0 -0
- /package/{dist/src → src}/base/base-executor.schema.md +0 -0
- /package/{dist/src → src}/base/base-generator.schema.d.ts +0 -0
- /package/{dist/src → src}/base/base-generator.schema.json +0 -0
- /package/{dist/src → src}/base/base-generator.schema.md +0 -0
- /package/{dist/src → src}/base/cargo-base-executor.schema.d.ts +0 -0
- /package/{dist/src → src}/base/cargo-base-executor.schema.json +0 -0
- /package/{dist/src → src}/base/cargo-base-executor.schema.md +0 -0
- /package/{dist/src → src}/base/typescript-build-executor.schema.d.ts +0 -0
- /package/{dist/src → src}/base/typescript-build-executor.schema.json +0 -0
- /package/{dist/src → src}/base/typescript-build-executor.schema.md +0 -0
- /package/{dist/src → src}/base/typescript-library-generator.schema.d.ts +0 -0
- /package/{dist/src → src}/base/typescript-library-generator.schema.json +0 -0
- /package/{dist/src → src}/base/typescript-library-generator.schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-build/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-build/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-build/schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-check/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-check/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-check/schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-clippy/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-clippy/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-clippy/schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-doc/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-doc/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-doc/schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-format/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-format/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-format/schema.md +0 -0
- /package/{dist/src → src}/executors/cargo-publish/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/cargo-publish/schema.json +0 -0
- /package/{dist/src → src}/executors/cargo-publish/schema.md +0 -0
- /package/{dist/src → src}/executors/clean-package/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/clean-package/schema.json +0 -0
- /package/{dist/src → src}/executors/clean-package/schema.md +0 -0
- /package/{dist/src → src}/executors/esbuild/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/esbuild/schema.json +0 -0
- /package/{dist/src → src}/executors/esbuild/schema.md +0 -0
- /package/{dist/src → src}/executors/npm-publish/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/npm-publish/schema.json +0 -0
- /package/{dist/src → src}/executors/npm-publish/schema.md +0 -0
- /package/{dist/src → src}/executors/size-limit/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/size-limit/schema.json +0 -0
- /package/{dist/src → src}/executors/size-limit/schema.md +0 -0
- /package/{dist/src → src}/executors/typia/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/typia/schema.json +0 -0
- /package/{dist/src → src}/executors/typia/schema.md +0 -0
- /package/{dist/src → src}/executors/unbuild/schema.d.ts +0 -0
- /package/{dist/src → src}/executors/unbuild/schema.json +0 -0
- /package/{dist/src → src}/executors/unbuild/schema.md +0 -0
- /package/{dist/src → src}/generators/browser-library/files/README.md +0 -0
- /package/{dist/src → src}/generators/browser-library/files/jest.config.ts +0 -0
- /package/{dist/src → src}/generators/browser-library/files/src/index.ts.template +0 -0
- /package/{dist/src → src}/generators/browser-library/files/tsconfig.spec.json +0 -0
- /package/{dist/src → src}/generators/browser-library/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/browser-library/schema.json +0 -0
- /package/{dist/src → src}/generators/browser-library/schema.md +0 -0
- /package/{dist/src → src}/generators/config-schema/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/config-schema/schema.json +0 -0
- /package/{dist/src → src}/generators/config-schema/schema.md +0 -0
- /package/{dist/src → src}/generators/init/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/init/schema.json +0 -0
- /package/{dist/src → src}/generators/init/schema.md +0 -0
- /package/{dist/src → src}/generators/neutral-library/files/README.md +0 -0
- /package/{dist/src → src}/generators/neutral-library/files/jest.config.ts +0 -0
- /package/{dist/src → src}/generators/neutral-library/files/src/index.ts.template +0 -0
- /package/{dist/src → src}/generators/neutral-library/files/tsconfig.spec.json +0 -0
- /package/{dist/src → src}/generators/neutral-library/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/neutral-library/schema.json +0 -0
- /package/{dist/src → src}/generators/neutral-library/schema.md +0 -0
- /package/{dist/src → src}/generators/node-library/files/README.md +0 -0
- /package/{dist/src → src}/generators/node-library/files/jest.config.ts +0 -0
- /package/{dist/src → src}/generators/node-library/files/src/index.ts.template +0 -0
- /package/{dist/src → src}/generators/node-library/files/tsconfig.spec.json +0 -0
- /package/{dist/src → src}/generators/node-library/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/node-library/schema.json +0 -0
- /package/{dist/src → src}/generators/node-library/schema.md +0 -0
- /package/{LICENSE → src/generators/preset/files/LICENSE} +0 -0
- /package/{dist/src → src}/generators/preset/files/README.md.template +0 -0
- /package/{dist/src → src}/generators/preset/files/docs/readme-templates/README.footer.md.template +0 -0
- /package/{dist/src → src}/generators/preset/files/docs/readme-templates/README.header.md.template +0 -0
- /package/{dist/src → src}/generators/preset/files/eslint.config.js.template +0 -0
- /package/{dist/src → src}/generators/preset/files/knip.json +0 -0
- /package/{dist/src → src}/generators/preset/files/lefthook.json +0 -0
- /package/{dist/src → src}/generators/preset/files/nx.json +0 -0
- /package/{dist/src → src}/generators/preset/files/pnpm-workspace.yaml +0 -0
- /package/{dist/src → src}/generators/preset/files/socket.yaml +0 -0
- /package/{dist/src → src}/generators/preset/files/storm.json.template +0 -0
- /package/{dist/src → src}/generators/preset/files/tsconfig.base.json.template +0 -0
- /package/{dist/src → src}/generators/preset/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/preset/schema.json +0 -0
- /package/{dist/src → src}/generators/preset/schema.md +0 -0
- /package/{dist/src → src}/generators/release-version/schema.d.ts +0 -0
- /package/{dist/src → src}/generators/release-version/schema.json +0 -0
- /package/{dist/src → src}/generators/release-version/schema.md +0 -0
- /package/{dist/src → src}/plugins/typescript/untyped-schema.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Workspace Tools
|
|
4
4
|
|
|
5
|
+
## [1.270.0](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.270.0) (2025-05-06)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **workspace-tools:** Update the publish executor source code
|
|
10
|
+
([527dcfe84](https://github.com/storm-software/storm-ops/commit/527dcfe84))
|
|
11
|
+
|
|
12
|
+
### Miscellaneous
|
|
13
|
+
|
|
14
|
+
- **monorepo:** Regenerate README markdown files
|
|
15
|
+
([d58a4014e](https://github.com/storm-software/storm-ops/commit/d58a4014e))
|
|
16
|
+
|
|
17
|
+
### Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated prettier to 0.48.0
|
|
20
|
+
- Updated esbuild to 0.38.0
|
|
21
|
+
- Updated esbuild to 0.38.0
|
|
22
|
+
- Updated unbuild to 0.44.0
|
|
23
|
+
- Updated unbuild to 0.44.0
|
|
24
|
+
|
|
25
|
+
## [1.269.2](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.269.2) (2025-05-05)
|
|
26
|
+
|
|
27
|
+
### Miscellaneous
|
|
28
|
+
|
|
29
|
+
- **workspace-tools:** Skip git checks during publish
|
|
30
|
+
([7fdcbfc9a](https://github.com/storm-software/storm-ops/commit/7fdcbfc9a))
|
|
31
|
+
- **monorepo:** Regenerate README markdown files
|
|
32
|
+
([fb8ab0609](https://github.com/storm-software/storm-ops/commit/fb8ab0609))
|
|
33
|
+
|
|
34
|
+
### Updated Dependencies
|
|
35
|
+
|
|
36
|
+
- Updated prettier to 0.47.2
|
|
37
|
+
- Updated esbuild to 0.37.2
|
|
38
|
+
- Updated esbuild to 0.37.2
|
|
39
|
+
- Updated unbuild to 0.43.2
|
|
40
|
+
- Updated unbuild to 0.43.2
|
|
41
|
+
|
|
5
42
|
## [1.269.1](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.269.1) (2025-05-05)
|
|
6
43
|
|
|
7
44
|
### Miscellaneous
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkZP76EMBEjs = require('./chunk-ZP76EMBE.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk53DNHF7Bjs = require('./chunk-53DNHF7B.js');
|
|
7
|
+
|
|
8
|
+
// src/executors/npm-publish/executor.ts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _devkit = require('@nx/devkit');
|
|
13
|
+
var _child_process = require('child_process');
|
|
14
|
+
var _columnify = require('columnify'); var columnify = _interopRequireWildcard(_columnify);
|
|
15
|
+
var _fs = require('fs');
|
|
16
|
+
|
|
17
|
+
var _npmrunpath = require('npm-run-path');
|
|
18
|
+
var _path = require('path');
|
|
19
|
+
var LARGE_BUFFER = 1024 * 1e6;
|
|
20
|
+
function processEnv(color) {
|
|
21
|
+
const env = {
|
|
22
|
+
...process.env,
|
|
23
|
+
..._npmrunpath.env.call(void 0, )
|
|
24
|
+
};
|
|
25
|
+
if (color) {
|
|
26
|
+
env.FORCE_COLOR = `${color}`;
|
|
27
|
+
}
|
|
28
|
+
return env;
|
|
29
|
+
}
|
|
30
|
+
async function npmPublishExecutorFn(options, context) {
|
|
31
|
+
const pm = _devkit.detectPackageManager.call(void 0, );
|
|
32
|
+
const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
|
|
33
|
+
const projectConfig = context.projectsConfigurations.projects[context.projectName];
|
|
34
|
+
const packageRoot = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
35
|
+
context.root,
|
|
36
|
+
_nullishCoalesce(options.packageRoot, () => ( projectConfig.root))
|
|
37
|
+
);
|
|
38
|
+
const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0, packageRoot, "package.json");
|
|
39
|
+
const packageJson = _devkit.readJsonFile.call(void 0, packageJsonPath);
|
|
40
|
+
const packageName = packageJson.name;
|
|
41
|
+
await _chunkZP76EMBEjs.pnpmCatalogUpdate.call(void 0, packageRoot, context.root);
|
|
42
|
+
const packageTxt = packageName === context.projectName ? `package "${packageName}"` : `package "${packageName}" from project "${context.projectName}"`;
|
|
43
|
+
if (packageJson.private === true) {
|
|
44
|
+
console.warn(
|
|
45
|
+
`Skipped ${packageTxt}, because it has \`"private": true\` in ${packageJsonPath}`
|
|
46
|
+
);
|
|
47
|
+
return {
|
|
48
|
+
success: true
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const warnFn = (message) => {
|
|
52
|
+
console.log(message);
|
|
53
|
+
};
|
|
54
|
+
const { registry, tag, registryConfigKey } = await parseRegistryOptions(
|
|
55
|
+
context.root,
|
|
56
|
+
{
|
|
57
|
+
packageRoot,
|
|
58
|
+
packageJson
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
registry: options.registry,
|
|
62
|
+
tag: options.tag
|
|
63
|
+
},
|
|
64
|
+
warnFn
|
|
65
|
+
);
|
|
66
|
+
const npmViewCommandSegments = [
|
|
67
|
+
`npm view ${packageName} versions dist-tags --json --"${registryConfigKey}=${registry}"`
|
|
68
|
+
];
|
|
69
|
+
const npmDistTagAddCommandSegments = [
|
|
70
|
+
`npm dist-tag add ${packageName}@${packageJson.version} ${tag} --"${registryConfigKey}=${registry}"`
|
|
71
|
+
];
|
|
72
|
+
if (!isDryRun && !options.firstRelease) {
|
|
73
|
+
const currentVersion = packageJson.version;
|
|
74
|
+
try {
|
|
75
|
+
const result = _child_process.execSync.call(void 0, npmViewCommandSegments.join(" "), {
|
|
76
|
+
env: processEnv(true),
|
|
77
|
+
cwd: context.root,
|
|
78
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
79
|
+
windowsHide: false
|
|
80
|
+
});
|
|
81
|
+
const resultJson = JSON.parse(result.toString());
|
|
82
|
+
const distTags = resultJson["dist-tags"] || {};
|
|
83
|
+
if (distTags[tag] === currentVersion) {
|
|
84
|
+
console.warn(
|
|
85
|
+
`Skipped ${packageTxt} because v${currentVersion} already exists in ${registry} with tag "${tag}"`
|
|
86
|
+
);
|
|
87
|
+
return {
|
|
88
|
+
success: true
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const versions = Array.isArray(resultJson.versions) ? resultJson.versions : [resultJson.versions];
|
|
92
|
+
if (versions.includes(currentVersion)) {
|
|
93
|
+
try {
|
|
94
|
+
if (!isDryRun) {
|
|
95
|
+
_child_process.execSync.call(void 0, npmDistTagAddCommandSegments.join(" "), {
|
|
96
|
+
env: processEnv(true),
|
|
97
|
+
cwd: context.root,
|
|
98
|
+
stdio: "ignore",
|
|
99
|
+
windowsHide: false
|
|
100
|
+
});
|
|
101
|
+
console.log(
|
|
102
|
+
`Added the dist-tag ${tag} to v${currentVersion} for registry ${registry}.
|
|
103
|
+
`
|
|
104
|
+
);
|
|
105
|
+
} else {
|
|
106
|
+
console.log(
|
|
107
|
+
`Would add the dist-tag ${tag} to v${currentVersion} for registry ${registry}, but "[dry-run]" was set.
|
|
108
|
+
`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
success: true
|
|
113
|
+
};
|
|
114
|
+
} catch (err) {
|
|
115
|
+
try {
|
|
116
|
+
const stdoutData = JSON.parse(_optionalChain([err, 'access', _2 => _2.stdout, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]) || "{}");
|
|
117
|
+
if (!(_optionalChain([stdoutData, 'access', _5 => _5.error, 'optionalAccess', _6 => _6.code, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8("E404")]) && _optionalChain([stdoutData, 'access', _9 => _9.error, 'optionalAccess', _10 => _10.summary, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12("no such package available")])) && !(_optionalChain([err, 'access', _13 => _13.stderr, 'optionalAccess', _14 => _14.toString, 'call', _15 => _15(), 'access', _16 => _16.includes, 'call', _17 => _17("E404")]) && _optionalChain([err, 'access', _18 => _18.stderr, 'optionalAccess', _19 => _19.toString, 'call', _20 => _20(), 'access', _21 => _21.includes, 'call', _22 => _22("no such package available")]))) {
|
|
118
|
+
console.error("npm dist-tag add error:");
|
|
119
|
+
if (stdoutData.error.summary) {
|
|
120
|
+
console.error(stdoutData.error.summary);
|
|
121
|
+
}
|
|
122
|
+
if (stdoutData.error.detail) {
|
|
123
|
+
console.error(stdoutData.error.detail);
|
|
124
|
+
}
|
|
125
|
+
if (context.isVerbose) {
|
|
126
|
+
console.error("npm dist-tag add stdout:");
|
|
127
|
+
console.error(JSON.stringify(stdoutData, null, 2));
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
success: false
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
} catch (err2) {
|
|
134
|
+
console.error(
|
|
135
|
+
"Something unexpected went wrong when processing the npm dist-tag add output\n",
|
|
136
|
+
err2
|
|
137
|
+
);
|
|
138
|
+
return {
|
|
139
|
+
success: false
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} catch (err) {
|
|
145
|
+
const stdoutData = JSON.parse(_optionalChain([err, 'access', _23 => _23.stdout, 'optionalAccess', _24 => _24.toString, 'call', _25 => _25()]) || "{}");
|
|
146
|
+
if (!(_optionalChain([stdoutData, 'access', _26 => _26.error, 'optionalAccess', _27 => _27.code, 'optionalAccess', _28 => _28.includes, 'call', _29 => _29("E404")]) && _optionalChain([stdoutData, 'access', _30 => _30.error, 'optionalAccess', _31 => _31.summary, 'optionalAccess', _32 => _32.toLowerCase, 'call', _33 => _33(), 'access', _34 => _34.includes, 'call', _35 => _35("not found")])) && !(_optionalChain([err, 'access', _36 => _36.stderr, 'optionalAccess', _37 => _37.toString, 'call', _38 => _38(), 'access', _39 => _39.includes, 'call', _40 => _40("E404")]) && _optionalChain([err, 'access', _41 => _41.stderr, 'optionalAccess', _42 => _42.toString, 'call', _43 => _43(), 'access', _44 => _44.toLowerCase, 'call', _45 => _45(), 'access', _46 => _46.includes, 'call', _47 => _47("not found")]))) {
|
|
147
|
+
console.error(
|
|
148
|
+
`Something unexpected went wrong when checking for existing dist-tags.
|
|
149
|
+
`,
|
|
150
|
+
err
|
|
151
|
+
);
|
|
152
|
+
return {
|
|
153
|
+
success: false
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (options.firstRelease && context.isVerbose) {
|
|
159
|
+
console.log("Skipped npm view because --first-release was set");
|
|
160
|
+
}
|
|
161
|
+
const publishCommandSegments = [
|
|
162
|
+
pm === "bun" ? (
|
|
163
|
+
// Unlike npm, bun publish does not support a custom registryConfigKey option
|
|
164
|
+
`bun publish --cwd="${packageRoot}" --json --registry="${registry}" --tag=${tag}`
|
|
165
|
+
) : pm === "pnpm" ? (
|
|
166
|
+
// Unlike npm, pnpm publish does not support a custom registryConfigKey option, and will error on uncommitted changes by default if --no-git-checks is not set
|
|
167
|
+
`pnpm publish "${packageRoot}" --json --registry="${registry}" --tag=${tag} --no-git-checks`
|
|
168
|
+
) : `npm publish "${packageRoot}" --json --"${registryConfigKey}=${registry}" --tag=${tag}`
|
|
169
|
+
];
|
|
170
|
+
if (options.otp) {
|
|
171
|
+
publishCommandSegments.push(`--otp=${options.otp}`);
|
|
172
|
+
}
|
|
173
|
+
publishCommandSegments.push(`--access=public`);
|
|
174
|
+
if (isDryRun) {
|
|
175
|
+
publishCommandSegments.push(`--dry-run`);
|
|
176
|
+
}
|
|
177
|
+
try {
|
|
178
|
+
const output = _child_process.execSync.call(void 0, publishCommandSegments.join(" "), {
|
|
179
|
+
maxBuffer: LARGE_BUFFER,
|
|
180
|
+
env: processEnv(true),
|
|
181
|
+
cwd: context.root,
|
|
182
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
183
|
+
windowsHide: false
|
|
184
|
+
});
|
|
185
|
+
const dryRunVersionPlaceholder = "X.X.X-dry-run";
|
|
186
|
+
const publishSummaryMessage = isDryRun ? `Would publish to ${registry} with tag "${tag}", but "[dry-run]" was set` : `Published to ${registry} with tag "${tag}"`;
|
|
187
|
+
if (pm === "bun") {
|
|
188
|
+
let outputStr = output.toString();
|
|
189
|
+
if (isDryRun) {
|
|
190
|
+
outputStr = outputStr.replace(
|
|
191
|
+
new RegExp(`${packageJson.name}@${packageJson.version}`, "g"),
|
|
192
|
+
`${packageJson.name}@${dryRunVersionPlaceholder}`
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
console.log(outputStr);
|
|
196
|
+
console.log(publishSummaryMessage);
|
|
197
|
+
return {
|
|
198
|
+
success: true
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
const { beforeJsonData, jsonData, afterJsonData } = extractNpmPublishJsonData(output.toString());
|
|
202
|
+
if (!jsonData) {
|
|
203
|
+
console.error(
|
|
204
|
+
`The ${pm} publish output data could not be extracted. Please report this issue on https://github.com/nrwl/nx`
|
|
205
|
+
);
|
|
206
|
+
return {
|
|
207
|
+
success: false
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (isDryRun) {
|
|
211
|
+
for (const [key, val] of Object.entries(jsonData)) {
|
|
212
|
+
if (typeof val !== "string") {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
jsonData[key] = val.replace(
|
|
216
|
+
new RegExp(packageJson.version, "g"),
|
|
217
|
+
dryRunVersionPlaceholder
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (typeof beforeJsonData === "string" && beforeJsonData.trim().length > 0) {
|
|
222
|
+
console.log(beforeJsonData);
|
|
223
|
+
}
|
|
224
|
+
logTar(jsonData);
|
|
225
|
+
if (typeof afterJsonData === "string" && afterJsonData.trim().length > 0) {
|
|
226
|
+
console.log(afterJsonData);
|
|
227
|
+
}
|
|
228
|
+
console.log(publishSummaryMessage);
|
|
229
|
+
return {
|
|
230
|
+
success: true
|
|
231
|
+
};
|
|
232
|
+
} catch (err) {
|
|
233
|
+
try {
|
|
234
|
+
if (pm === "bun") {
|
|
235
|
+
console.error(`bun publish error:`);
|
|
236
|
+
console.error(_optionalChain([err, 'access', _48 => _48.stderr, 'optionalAccess', _49 => _49.toString, 'call', _50 => _50()]) || "");
|
|
237
|
+
console.error(_optionalChain([err, 'access', _51 => _51.stdout, 'optionalAccess', _52 => _52.toString, 'call', _53 => _53()]) || "");
|
|
238
|
+
return {
|
|
239
|
+
success: false
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
const stdoutData = JSON.parse(_optionalChain([err, 'access', _54 => _54.stdout, 'optionalAccess', _55 => _55.toString, 'call', _56 => _56()]) || "{}");
|
|
243
|
+
console.error(`${pm} publish error:`);
|
|
244
|
+
if (_optionalChain([stdoutData, 'access', _57 => _57.error, 'optionalAccess', _58 => _58.summary])) {
|
|
245
|
+
console.error(stdoutData.error.summary);
|
|
246
|
+
}
|
|
247
|
+
if (_optionalChain([stdoutData, 'access', _59 => _59.error, 'optionalAccess', _60 => _60.detail])) {
|
|
248
|
+
console.error(stdoutData.error.detail);
|
|
249
|
+
}
|
|
250
|
+
if (context.isVerbose) {
|
|
251
|
+
console.error(`${pm} publish stdout:`);
|
|
252
|
+
console.error(JSON.stringify(stdoutData, null, 2));
|
|
253
|
+
}
|
|
254
|
+
if (!stdoutData.error) {
|
|
255
|
+
throw err;
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
success: false
|
|
259
|
+
};
|
|
260
|
+
} catch (err2) {
|
|
261
|
+
console.error(
|
|
262
|
+
`Something unexpected went wrong when processing the ${pm} publish output
|
|
263
|
+
`,
|
|
264
|
+
err2
|
|
265
|
+
);
|
|
266
|
+
return {
|
|
267
|
+
success: false
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
async function parseRegistryOptions(cwd, pkg, options, logWarnFn = console.warn) {
|
|
273
|
+
const npmRcPath = _path.join.call(void 0, pkg.packageRoot, ".npmrc");
|
|
274
|
+
if (_fs.existsSync.call(void 0, npmRcPath)) {
|
|
275
|
+
const relativeNpmRcPath = _path.relative.call(void 0, cwd, npmRcPath);
|
|
276
|
+
logWarnFn(
|
|
277
|
+
`
|
|
278
|
+
Ignoring .npmrc file detected in the package root: ${relativeNpmRcPath}. Nested .npmrc files are not supported by npm. Only the .npmrc file at the root of the workspace will be used. To customize the registry or tag for specific packages, see https://nx.dev/recipes/nx-release/configure-custom-registries
|
|
279
|
+
`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
const scope = pkg.packageJson.name.startsWith("@") ? pkg.packageJson.name.split("/")[0] : "";
|
|
283
|
+
const registryConfigKey = scope ? `${scope}:registry` : "registry";
|
|
284
|
+
const publishConfigRegistry = _optionalChain([pkg, 'access', _61 => _61.packageJson, 'access', _62 => _62.publishConfig, 'optionalAccess', _63 => _63[registryConfigKey]]);
|
|
285
|
+
if (publishConfigRegistry || _optionalChain([pkg, 'access', _64 => _64.packageJson, 'access', _65 => _65.publishConfig, 'optionalAccess', _66 => _66.registry])) {
|
|
286
|
+
const relativePackageJsonPath = _path.relative.call(void 0,
|
|
287
|
+
cwd,
|
|
288
|
+
_path.join.call(void 0, pkg.packageRoot, "package.json")
|
|
289
|
+
);
|
|
290
|
+
if (options.registry) {
|
|
291
|
+
logWarnFn(
|
|
292
|
+
`
|
|
293
|
+
Registry detected in the 'publishConfig' of the package manifest: ${relativePackageJsonPath}. This will override your registry option set in the project configuration or passed via the --registry argument, which is why configuring the registry with 'publishConfig' is not recommended. For details, see https://nx.dev/recipes/nx-release/configure-custom-registries
|
|
294
|
+
`
|
|
295
|
+
);
|
|
296
|
+
} else {
|
|
297
|
+
logWarnFn(
|
|
298
|
+
`
|
|
299
|
+
Registry detected in the 'publishConfig' of the package manifest: ${relativePackageJsonPath}. Configuring the registry in this way is not recommended because it prevents the registry from being overridden in project configuration or via the --registry argument. To customize the registry for specific packages, see https://nx.dev/recipes/nx-release/configure-custom-registries
|
|
300
|
+
`
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
const registry = (
|
|
305
|
+
// `npm publish` will always use the publishConfig registry if it exists, even over the --registry arg
|
|
306
|
+
publishConfigRegistry || options.registry || await getNpmRegistry(cwd, scope)
|
|
307
|
+
);
|
|
308
|
+
const tag = options.tag || await getNpmTag(cwd);
|
|
309
|
+
if (!registry || !tag) {
|
|
310
|
+
throw new Error(
|
|
311
|
+
`The registry and tag options are required. Please provide them in the project configuration or via the --registry and --tag arguments.`
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
return { registry, tag, registryConfigKey };
|
|
315
|
+
}
|
|
316
|
+
async function getNpmRegistry(cwd, scope) {
|
|
317
|
+
let registry;
|
|
318
|
+
if (scope) {
|
|
319
|
+
registry = await getNpmConfigValue(`${scope}:registry`, cwd);
|
|
320
|
+
}
|
|
321
|
+
if (!registry) {
|
|
322
|
+
registry = await getNpmConfigValue("registry", cwd);
|
|
323
|
+
}
|
|
324
|
+
return registry;
|
|
325
|
+
}
|
|
326
|
+
async function getNpmTag(cwd) {
|
|
327
|
+
return getNpmConfigValue("tag", cwd);
|
|
328
|
+
}
|
|
329
|
+
async function getNpmConfigValue(key, cwd) {
|
|
330
|
+
try {
|
|
331
|
+
const result = await execAsync(`npm config get ${key}`, cwd);
|
|
332
|
+
return result === "undefined" ? void 0 : result;
|
|
333
|
+
} catch (_) {
|
|
334
|
+
return Promise.resolve(void 0);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
async function execAsync(command, cwd) {
|
|
338
|
+
return new Promise((resolve, reject) => {
|
|
339
|
+
_child_process.exec.call(void 0, command, { cwd, windowsHide: false }, (error, stdout, stderr) => {
|
|
340
|
+
if (error) {
|
|
341
|
+
return reject((stderr ? `${stderr}
|
|
342
|
+
` : "") + error);
|
|
343
|
+
}
|
|
344
|
+
return resolve(stdout.trim());
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
var expectedNpmPublishJsonKeys = [
|
|
349
|
+
"id",
|
|
350
|
+
"name",
|
|
351
|
+
"version",
|
|
352
|
+
"size",
|
|
353
|
+
"filename"
|
|
354
|
+
];
|
|
355
|
+
function extractNpmPublishJsonData(str) {
|
|
356
|
+
const jsonMatches = str.match(/{(?:[^{}]|{[^{}]*})*}/g);
|
|
357
|
+
if (jsonMatches) {
|
|
358
|
+
for (const match of jsonMatches) {
|
|
359
|
+
if (!expectedNpmPublishJsonKeys.every((key) => str.includes(key))) {
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
try {
|
|
363
|
+
const parsedJson = JSON.parse(match);
|
|
364
|
+
if (!expectedNpmPublishJsonKeys.every(
|
|
365
|
+
(key) => parsedJson[key] !== void 0
|
|
366
|
+
)) {
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
const jsonStartIndex = str.indexOf(match);
|
|
370
|
+
return {
|
|
371
|
+
beforeJsonData: str.slice(0, jsonStartIndex),
|
|
372
|
+
jsonData: parsedJson,
|
|
373
|
+
afterJsonData: str.slice(jsonStartIndex + match.length)
|
|
374
|
+
};
|
|
375
|
+
} catch (e) {
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
beforeJsonData: str,
|
|
381
|
+
jsonData: null,
|
|
382
|
+
afterJsonData: ""
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
var formatBytes = (bytes, space = true) => {
|
|
386
|
+
let spacer = "";
|
|
387
|
+
if (space) {
|
|
388
|
+
spacer = " ";
|
|
389
|
+
}
|
|
390
|
+
if (bytes < 1e3) {
|
|
391
|
+
return `${bytes}${spacer}B`;
|
|
392
|
+
}
|
|
393
|
+
if (bytes < 1e6) {
|
|
394
|
+
return `${(bytes / 1e3).toFixed(1)}${spacer}kB`;
|
|
395
|
+
}
|
|
396
|
+
if (bytes < 1e9) {
|
|
397
|
+
return `${(bytes / 1e6).toFixed(1)}${spacer}MB`;
|
|
398
|
+
}
|
|
399
|
+
return `${(bytes / 1e9).toFixed(1)}${spacer}GB`;
|
|
400
|
+
};
|
|
401
|
+
var logTar = (tarball, opts = {}) => {
|
|
402
|
+
const { unicode = true } = opts;
|
|
403
|
+
console.log("");
|
|
404
|
+
console.log(
|
|
405
|
+
`${unicode ? "\u{1F4E6} " : "package:"} ${tarball.name}@${tarball.version}`
|
|
406
|
+
);
|
|
407
|
+
console.log("=== Tarball Contents ===");
|
|
408
|
+
if (tarball.files.length) {
|
|
409
|
+
console.log("");
|
|
410
|
+
const columnData = columnify(
|
|
411
|
+
tarball.files.map((f) => {
|
|
412
|
+
const bytes = formatBytes(f.size, false);
|
|
413
|
+
return /^node_modules\//.test(f.path) ? null : { path: f.path, size: `${bytes}` };
|
|
414
|
+
}).filter((f) => f),
|
|
415
|
+
{
|
|
416
|
+
include: ["size", "path"],
|
|
417
|
+
showHeaders: false
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
columnData.split("\n").forEach((line) => {
|
|
421
|
+
console.log(line);
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
if (tarball.bundled.length) {
|
|
425
|
+
console.log("=== Bundled Dependencies ===");
|
|
426
|
+
tarball.bundled.forEach((name) => console.log("", name));
|
|
427
|
+
}
|
|
428
|
+
console.log("=== Tarball Details ===");
|
|
429
|
+
console.log(
|
|
430
|
+
columnify(
|
|
431
|
+
[
|
|
432
|
+
{ name: "name:", value: tarball.name },
|
|
433
|
+
{ name: "version:", value: tarball.version },
|
|
434
|
+
tarball.filename && { name: "filename:", value: tarball.filename },
|
|
435
|
+
{ name: "package size:", value: formatBytes(tarball.size) },
|
|
436
|
+
{ name: "unpacked size:", value: formatBytes(tarball.unpackedSize) },
|
|
437
|
+
{ name: "shasum:", value: tarball.shasum },
|
|
438
|
+
{
|
|
439
|
+
name: "integrity:",
|
|
440
|
+
value: tarball.integrity.toString().slice(0, 20) + "[...]" + tarball.integrity.toString().slice(80)
|
|
441
|
+
},
|
|
442
|
+
tarball.bundled.length && {
|
|
443
|
+
name: "bundled deps:",
|
|
444
|
+
value: tarball.bundled.length
|
|
445
|
+
},
|
|
446
|
+
tarball.bundled.length && {
|
|
447
|
+
name: "bundled files:",
|
|
448
|
+
value: tarball.entryCount - tarball.files.length
|
|
449
|
+
},
|
|
450
|
+
tarball.bundled.length && {
|
|
451
|
+
name: "own files:",
|
|
452
|
+
value: tarball.files.length
|
|
453
|
+
},
|
|
454
|
+
{ name: "total files:", value: tarball.entryCount }
|
|
455
|
+
].filter((x) => x),
|
|
456
|
+
{
|
|
457
|
+
include: ["name", "value"],
|
|
458
|
+
showHeaders: false
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
);
|
|
462
|
+
console.log("", "");
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
exports.LARGE_BUFFER = LARGE_BUFFER; exports.npmPublishExecutorFn = npmPublishExecutorFn;
|