packtory 0.0.96 → 0.0.98
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/artifacts/artifacts-builder.js +37 -4
- package/artifacts/artifacts-builder.js.map +1 -1
- package/artifacts/content-collection.js +59 -2
- package/artifacts/content-collection.js.map +1 -1
- package/artifacts/folder-writer.js +25 -2
- package/artifacts/folder-writer.js.map +1 -1
- package/bundle-emitter/emitter.js +137 -6
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/extract-package-tarball.js +13 -2
- package/bundle-emitter/extract-package-tarball.js.map +1 -1
- package/bundle-emitter/fetch-published-artifacts.js +19 -2
- package/bundle-emitter/fetch-published-artifacts.js.map +1 -1
- package/bundle-emitter/publication-outcome.js +5 -0
- package/bundle-emitter/publication-outcome.js.map +1 -1
- package/bundle-emitter/publish-error/auto-mode-error-matching.js +28 -2
- package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/error-shape-helpers.js +9 -0
- package/bundle-emitter/publish-error/error-shape-helpers.js.map +1 -1
- package/bundle-emitter/publish-error/file-mode-error-matching.js +33 -2
- package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/publish-error-messages.js +24 -0
- package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
- package/bundle-emitter/registry/metadata-auth-retry.js +24 -1
- package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
- package/bundle-emitter/registry/oidc-token-exchange.js +68 -3
- package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.js +210 -7
- package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
- package/bundle-emitter/registry/publish-settings-bridge.js +34 -3
- package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
- package/bundle-emitter/registry/registry-auth-config.js +106 -0
- package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
- package/bundle-emitter/registry/registry-client.js +74 -4
- package/bundle-emitter/registry/registry-client.js.map +1 -1
- package/bundle-emitter/registry/registry-package-path.js +3 -0
- package/bundle-emitter/registry/registry-package-path.js.map +1 -1
- package/bundle-emitter/registry/registry-response-schemas.js +50 -2
- package/bundle-emitter/registry/registry-response-schemas.js.map +1 -1
- package/bundle-emitter/registry/tarball-integrity.js +31 -1
- package/bundle-emitter/registry/tarball-integrity.js.map +1 -1
- package/bundle-emitter/registry/validate-tarball-host.js +26 -1
- package/bundle-emitter/registry/validate-tarball-host.js.map +1 -1
- package/bundle-emitter/release-artifact-canonicalizer.js +31 -5
- package/bundle-emitter/release-artifact-canonicalizer.js.map +1 -1
- package/checks/check-runner.js +8 -0
- package/checks/check-runner.js.map +1 -1
- package/checks/rule.js +12 -2
- package/checks/rule.js.map +1 -1
- package/checks/rules/duplicate-detection.js +23 -1
- package/checks/rules/duplicate-detection.js.map +1 -1
- package/checks/rules/duplicate-messages.js +22 -0
- package/checks/rules/duplicate-messages.js.map +1 -1
- package/checks/rules/file-ownership.js +15 -0
- package/checks/rules/file-ownership.js.map +1 -1
- package/checks/rules/max-bundle-size.js +55 -1
- package/checks/rules/max-bundle-size.js.map +1 -1
- package/checks/rules/no-dev-dependency-imports.js +51 -1
- package/checks/rules/no-dev-dependency-imports.js.map +1 -1
- package/checks/rules/no-duplicated-files.js +53 -3
- package/checks/rules/no-duplicated-files.js.map +1 -1
- package/checks/rules/no-side-effects.js +50 -1
- package/checks/rules/no-side-effects.js.map +1 -1
- package/checks/rules/no-unexposed-executables.js +43 -2
- package/checks/rules/no-unexposed-executables.js.map +1 -1
- package/checks/rules/no-unused-bundle-dependencies.js +30 -2
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
- package/checks/rules/registry.js +22 -9
- package/checks/rules/registry.js.map +1 -1
- package/checks/rules/required-files.js +41 -3
- package/checks/rules/required-files.js.map +1 -1
- package/checks/rules/type-script-declaration-integrity.js +81 -3
- package/checks/rules/type-script-declaration-integrity.js.map +1 -1
- package/checks/rules/type-script-declaration-paths.js +55 -1
- package/checks/rules/type-script-declaration-paths.js.map +1 -1
- package/checks/rules/type-script-declaration-project.js +202 -3
- package/checks/rules/type-script-declaration-project.js.map +1 -1
- package/checks/rules/type-script-declaration-reachability.js +38 -2
- package/checks/rules/type-script-declaration-reachability.js.map +1 -1
- package/checks/rules/type-script-declaration-roots.js +29 -0
- package/checks/rules/type-script-declaration-roots.js.map +1 -1
- package/checks/rules/type-script-integrity.js +72 -2
- package/checks/rules/type-script-integrity.js.map +1 -1
- package/checks/rules/type-script-package-resolution.js +42 -1
- package/checks/rules/type-script-package-resolution.js.map +1 -1
- package/checks/rules/type-script-resolution-summary.js +53 -0
- package/checks/rules/type-script-resolution-summary.js.map +1 -1
- package/checks/rules/unique-target-paths.js +34 -2
- package/checks/rules/unique-target-paths.js.map +1 -1
- package/common/bundled-dependency-groups.js +27 -0
- package/common/bundled-dependency-groups.js.map +1 -1
- package/common/code-files.js +28 -0
- package/common/code-files.js.map +1 -1
- package/common/declaration-companion-paths.js +24 -0
- package/common/declaration-companion-paths.js.map +1 -1
- package/common/package-name-map.js +7 -0
- package/common/package-name-map.js.map +1 -1
- package/common/stable-json.js +42 -2
- package/common/stable-json.js.map +1 -1
- package/common/worklist.js +22 -0
- package/common/worklist.js.map +1 -1
- package/config/additional-files.js +6 -2
- package/config/additional-files.js.map +1 -1
- package/config/additional-package-json-attributes-schema.js +6 -2
- package/config/additional-package-json-attributes-schema.js.map +1 -1
- package/config/automatic-versioning-settings.js +6 -2
- package/config/automatic-versioning-settings.js.map +1 -1
- package/config/changelog-settings.js +120 -3
- package/config/changelog-settings.js.map +1 -1
- package/config/common-package-settings-schemas.js +19 -3
- package/config/common-package-settings-schemas.js.map +1 -1
- package/config/config.js +3 -1
- package/config/config.js.map +1 -1
- package/config/cross-package-validation.js +17 -0
- package/config/cross-package-validation.js.map +1 -1
- package/config/dead-code-elimination-settings.js +36 -2
- package/config/dead-code-elimination-settings.js.map +1 -1
- package/config/dependency-existence-validation.js +19 -1
- package/config/dependency-existence-validation.js.map +1 -1
- package/config/dependency-policy.js +5 -2
- package/config/dependency-policy.js.map +1 -1
- package/config/main-package-json-schema.js +11 -2
- package/config/main-package-json-schema.js.map +1 -1
- package/config/manual-versioning-settings.d.ts +12 -0
- package/config/manual-versioning-settings.d.ts.map +1 -1
- package/config/manual-versioning-settings.js +29 -2
- package/config/manual-versioning-settings.js.map +1 -1
- package/config/optional-package-settings-schema.js +16 -7
- package/config/optional-package-settings-schema.js.map +1 -1
- package/config/package-config.js +2 -1
- package/config/package-config.js.map +1 -1
- package/config/package-graph-builder.js +14 -2
- package/config/package-graph-builder.js.map +1 -1
- package/config/package-interface.js +25 -2
- package/config/package-interface.js.map +1 -1
- package/config/package-json.d.ts.map +1 -1
- package/config/package-json.js +16 -0
- package/config/package-json.js.map +1 -1
- package/config/packtory-config-without-registry-schema.js +6 -0
- package/config/packtory-config-without-registry-schema.js.map +1 -1
- package/config/per-package-settings-schema.js +22 -6
- package/config/per-package-settings-schema.js.map +1 -1
- package/config/pre-graph-validation.js +20 -5
- package/config/pre-graph-validation.js.map +1 -1
- package/config/publish-settings.js +25 -3
- package/config/publish-settings.js.map +1 -1
- package/config/publish-settings.report.js +17 -1
- package/config/publish-settings.report.js.map +1 -1
- package/config/registry-settings.js +40 -2
- package/config/registry-settings.js.map +1 -1
- package/config/registry-settings.report.js +46 -0
- package/config/registry-settings.report.js.map +1 -1
- package/config/root-config-validation.js +141 -0
- package/config/root-config-validation.js.map +1 -1
- package/config/root.js +6 -2
- package/config/root.js.map +1 -1
- package/config/sbom-settings.js +4 -1
- package/config/sbom-settings.js.map +1 -1
- package/config/settings-validation.js +28 -0
- package/config/settings-validation.js.map +1 -1
- package/config/versioning-settings.js +10 -3
- package/config/versioning-settings.js.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.js +7 -0
- package/dead-code-eliminator/analyzed-bundle.js.map +1 -1
- package/dead-code-eliminator/artifact-module-reference-contract.js +27 -0
- package/dead-code-eliminator/artifact-module-reference-contract.js.map +1 -0
- package/dead-code-eliminator/bundle-analysis.js +38 -5
- package/dead-code-eliminator/bundle-analysis.js.map +1 -1
- package/dead-code-eliminator/class-purity.js +48 -2
- package/dead-code-eliminator/class-purity.js.map +1 -1
- package/dead-code-eliminator/code-file-analyzer.js +68 -4
- package/dead-code-eliminator/code-file-analyzer.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/bundle-index.js +10 -0
- package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js +22 -3
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/import-export-walker.js +164 -3
- package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/seed-store.js +10 -0
- package/dead-code-eliminator/cross-bundle/seed-store.js.map +1 -1
- package/dead-code-eliminator/dependency-metadata.js +172 -2
- package/dead-code-eliminator/dependency-metadata.js.map +1 -1
- package/dead-code-eliminator/elimination-emitter.js +52 -0
- package/dead-code-eliminator/elimination-emitter.js.map +1 -1
- package/dead-code-eliminator/eliminator.js +22 -4
- package/dead-code-eliminator/eliminator.js.map +1 -1
- package/dead-code-eliminator/expression-unwrapping.js +16 -1
- package/dead-code-eliminator/expression-unwrapping.js.map +1 -1
- package/dead-code-eliminator/imported-expression-origin.js +101 -2
- package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
- package/dead-code-eliminator/liveness/asset-side-effects.js +9 -1
- package/dead-code-eliminator/liveness/asset-side-effects.js.map +1 -1
- package/dead-code-eliminator/liveness/boolean-facts.js +98 -2
- package/dead-code-eliminator/liveness/boolean-facts.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity-summary.js +314 -3
- package/dead-code-eliminator/liveness/external-purity-summary.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity.js +39 -3
- package/dead-code-eliminator/liveness/external-purity.js.map +1 -1
- package/dead-code-eliminator/liveness/module-analysis.js +27 -2
- package/dead-code-eliminator/liveness/module-analysis.js.map +1 -1
- package/dead-code-eliminator/liveness/resource-retention.js +91 -1
- package/dead-code-eliminator/liveness/resource-retention.js.map +1 -1
- package/dead-code-eliminator/liveness/runtime-code.js +15 -1
- package/dead-code-eliminator/liveness/runtime-code.js.map +1 -1
- package/dead-code-eliminator/load-bundle.js +86 -5
- package/dead-code-eliminator/load-bundle.js.map +1 -1
- package/dead-code-eliminator/pure-expression.js +178 -5
- package/dead-code-eliminator/pure-expression.js.map +1 -1
- package/dead-code-eliminator/reachability/bfs-closure.js +53 -0
- package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-extractor.js +100 -2
- package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-id.js +106 -1
- package/dead-code-eliminator/reachability/binding-id.js.map +1 -1
- package/dead-code-eliminator/reachability/identifier-target-collector.js +96 -1
- package/dead-code-eliminator/reachability/identifier-target-collector.js.map +1 -1
- package/dead-code-eliminator/reachability/impure-statements.js +11 -2
- package/dead-code-eliminator/reachability/impure-statements.js.map +1 -1
- package/dead-code-eliminator/reachability/local-seed-gathering.js +91 -4
- package/dead-code-eliminator/reachability/local-seed-gathering.js.map +1 -1
- package/dead-code-eliminator/reachability/reachability.js +70 -4
- package/dead-code-eliminator/reachability/reachability.js.map +1 -1
- package/dead-code-eliminator/side-effect-classifier.js +39 -4
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
- package/dead-code-eliminator/side-effects-field.js +23 -1
- package/dead-code-eliminator/side-effects-field.js.map +1 -1
- package/dead-code-eliminator/source-map-recomposition.js +29 -2
- package/dead-code-eliminator/source-map-recomposition.js.map +1 -1
- package/dead-code-eliminator/statement-classifiers.js +94 -4
- package/dead-code-eliminator/statement-classifiers.js.map +1 -1
- package/dead-code-eliminator/syntax-kind-sets.js +16 -0
- package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
- package/dead-code-eliminator/transform/atom-translator.js +57 -2
- package/dead-code-eliminator/transform/atom-translator.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-removal.js +183 -5
- package/dead-code-eliminator/transform/declaration-removal.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-remover.js +17 -2
- package/dead-code-eliminator/transform/declaration-remover.js.map +1 -1
- package/dead-code-eliminator/transform/line-index.js +20 -0
- package/dead-code-eliminator/transform/line-index.js.map +1 -1
- package/dead-code-eliminator/transform/named-declaration-kinds.js +3 -0
- package/dead-code-eliminator/transform/named-declaration-kinds.js.map +1 -1
- package/dead-code-eliminator/transform/source-map-composer.js +84 -3
- package/dead-code-eliminator/transform/source-map-composer.js.map +1 -1
- package/dead-code-eliminator/variable-declaration-bindings.js +25 -1
- package/dead-code-eliminator/variable-declaration-bindings.js.map +1 -1
- package/dependency-scanner/dependency-graph.js +77 -3
- package/dependency-scanner/dependency-graph.js.map +1 -1
- package/dependency-scanner/external-dependencies.js +55 -1
- package/dependency-scanner/external-dependencies.js.map +1 -1
- package/dependency-scanner/file-host-predicates.js +9 -0
- package/dependency-scanner/file-host-predicates.js.map +1 -1
- package/dependency-scanner/host-method-binding.js +18 -0
- package/dependency-scanner/host-method-binding.js.map +1 -1
- package/dependency-scanner/injected-dynamic-imports.js +232 -1
- package/dependency-scanner/injected-dynamic-imports.js.map +1 -1
- package/dependency-scanner/node-modules-manifest-synthesizer.js +52 -4
- package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
- package/dependency-scanner/package-owned-asset-file-path.js +9 -1
- package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
- package/dependency-scanner/scanner.js +109 -4
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.js +171 -6
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/source-map-file-locator.js +66 -2
- package/dependency-scanner/source-map-file-locator.js.map +1 -1
- package/dependency-scanner/typescript-compiler-options.js +21 -1
- package/dependency-scanner/typescript-compiler-options.js.map +1 -1
- package/dependency-scanner/typescript-file-host.js +49 -5
- package/dependency-scanner/typescript-file-host.js.map +1 -1
- package/dependency-scanner/typescript-module-resolution.js +214 -0
- package/dependency-scanner/typescript-module-resolution.js.map +1 -0
- package/dependency-scanner/typescript-project-analyzer.js +32 -3
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/dependency-scanner/virtual-package-json-host.js +45 -4
- package/dependency-scanner/virtual-package-json-host.js.map +1 -1
- package/directed-graph/graph.js +240 -1
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +23 -2
- package/file-manager/compare.js.map +1 -1
- package/file-manager/equal.js +5 -0
- package/file-manager/equal.js.map +1 -1
- package/file-manager/file-description.js +3 -0
- package/file-manager/file-description.js.map +1 -1
- package/file-manager/permissions.js +28 -1
- package/file-manager/permissions.js.map +1 -1
- package/git/current-git-head.js +24 -0
- package/git/current-git-head.js.map +1 -1
- package/git/git-command.js +49 -1
- package/git/git-command.js.map +1 -1
- package/linker/linked-bundle.js +5 -0
- package/linker/linked-bundle.js.map +1 -1
- package/linker/linker.js +51 -5
- package/linker/linker.js.map +1 -1
- package/linker/replacement-lookup.js +297 -8
- package/linker/replacement-lookup.js.map +1 -1
- package/linker/resource-graph.js +65 -2
- package/linker/resource-graph.js.map +1 -1
- package/linker/source-modifier/import-paths.js +80 -3
- package/linker/source-modifier/import-paths.js.map +1 -1
- package/linker/substitute-bundles.js +166 -3
- package/linker/substitute-bundles.js.map +1 -1
- package/linker/substituted-resource-graph.js +111 -2
- package/linker/substituted-resource-graph.js.map +1 -1
- package/npm-oidc-id-token-resolver.js +82 -0
- package/npm-oidc-id-token-resolver.js.map +1 -1
- package/pack-emitter/pack-emitter.js +27 -0
- package/pack-emitter/pack-emitter.js.map +1 -1
- package/package-surface/bin-field.js +8 -2
- package/package-surface/bin-field.js.map +1 -1
- package/package-surface/explicit-bin.js +24 -2
- package/package-surface/explicit-bin.js.map +1 -1
- package/package-surface/explicit-exports.js +26 -3
- package/package-surface/explicit-exports.js.map +1 -1
- package/package-surface/export-map.js +9 -2
- package/package-surface/export-map.js.map +1 -1
- package/package-surface/implicit-bin.js +25 -1
- package/package-surface/implicit-bin.js.map +1 -1
- package/package-surface/implicit-exports.js +10 -3
- package/package-surface/implicit-exports.js.map +1 -1
- package/package-surface/implicit-root-exports.js +13 -2
- package/package-surface/implicit-root-exports.js.map +1 -1
- package/package-surface/package-json-export.js +9 -0
- package/package-surface/package-json-export.js.map +1 -1
- package/package-surface/package-shape.js +10 -1
- package/package-surface/package-shape.js.map +1 -1
- package/package-surface/package-surface-index.js +165 -3
- package/package-surface/package-surface-index.js.map +1 -1
- package/package-surface/public-module-usage.js +46 -3
- package/package-surface/public-module-usage.js.map +1 -1
- package/package-surface/public-specifiers.js +7 -1
- package/package-surface/public-specifiers.js.map +1 -1
- package/package-surface/root-registry.js +26 -0
- package/package-surface/root-registry.js.map +1 -1
- package/package-surface/specifier-syntax.js +4 -0
- package/package-surface/specifier-syntax.js.map +1 -1
- package/package-surface/substitution-exports.js +101 -3
- package/package-surface/substitution-exports.js.map +1 -1
- package/package-surface/surface.js +12 -0
- package/package-surface/surface.js.map +1 -1
- package/package.json +2 -2
- package/packages/package-processor.composition.js +161 -34
- package/packages/package-processor.composition.js.map +1 -1
- package/packtory/map-config.js +35 -4
- package/packtory/map-config.js.map +1 -1
- package/packtory/normalize-paths.js +25 -1
- package/packtory/normalize-paths.js.map +1 -1
- package/packtory/options/bundle-dependency-resolution.js +17 -1
- package/packtory/options/bundle-dependency-resolution.js.map +1 -1
- package/packtory/options/dead-code-elimination-resolution.js +10 -1
- package/packtory/options/dead-code-elimination-resolution.js.map +1 -1
- package/packtory/options/prepare-package-options.js +46 -5
- package/packtory/options/prepare-package-options.js.map +1 -1
- package/packtory/options/required-value-helpers.js +17 -0
- package/packtory/options/required-value-helpers.js.map +1 -1
- package/packtory/options/setting-resolvers.js +47 -3
- package/packtory/options/setting-resolvers.js.map +1 -1
- package/packtory/options/surface-resolution.js +15 -2
- package/packtory/options/surface-resolution.js.map +1 -1
- package/packtory/options/version-provider-context.js +24 -2
- package/packtory/options/version-provider-context.js.map +1 -1
- package/packtory/options/version-trigger.js +39 -2
- package/packtory/options/version-trigger.js.map +1 -1
- package/packtory/pack-output-preflight.js +60 -3
- package/packtory/pack-output-preflight.js.map +1 -1
- package/packtory/package-processor-build.js +97 -3
- package/packtory/package-processor-build.js.map +1 -1
- package/packtory/package-processor-publish.js +297 -6
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/package-processor.js +10 -2
- package/packtory/package-processor.js.map +1 -1
- package/packtory/packtory-pack.js +298 -10
- package/packtory/packtory-pack.js.map +1 -1
- package/packtory/packtory-package-dependencies.js +116 -2
- package/packtory/packtory-package-dependencies.js.map +1 -1
- package/packtory/packtory-package-inspection.js +26 -5
- package/packtory/packtory-package-inspection.js.map +1 -1
- package/packtory/packtory-package-side-effects.js +64 -3
- package/packtory/packtory-package-side-effects.js.map +1 -1
- package/packtory/packtory-package-tree.js +43 -4
- package/packtory/packtory-package-tree.js.map +1 -1
- package/packtory/packtory-publish.js +17 -4
- package/packtory/packtory-publish.js.map +1 -1
- package/packtory/packtory-release-analysis.js +64 -6
- package/packtory/packtory-release-analysis.js.map +1 -1
- package/packtory/packtory-release-diff.js +48 -5
- package/packtory/packtory-release-diff.js.map +1 -1
- package/packtory/packtory-release-plan.js +87 -6
- package/packtory/packtory-release-plan.js.map +1 -1
- package/packtory/packtory-resolve.js +16 -5
- package/packtory/packtory-resolve.js.map +1 -1
- package/packtory/packtory.js +242 -13
- package/packtory/packtory.js.map +1 -1
- package/packtory/publish-failure-mapping.js +6 -0
- package/packtory/publish-failure-mapping.js.map +1 -1
- package/packtory/publish-target-preflight.js +25 -3
- package/packtory/publish-target-preflight.js.map +1 -1
- package/packtory/published-release-state.js +11 -0
- package/packtory/published-release-state.js.map +1 -1
- package/packtory/release-analysis.js +153 -5
- package/packtory/release-analysis.js.map +1 -1
- package/packtory/release-diff-failure-mapping.js +6 -0
- package/packtory/release-diff-failure-mapping.js.map +1 -1
- package/packtory/release-plan.js +135 -7
- package/packtory/release-plan.js.map +1 -1
- package/packtory/report-attachment.js +35 -2
- package/packtory/report-attachment.js.map +1 -1
- package/packtory/resolved-package.js +97 -3
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.js +99 -1
- package/packtory/scheduler.js.map +1 -1
- package/packtory/stages/package-analysis-stage.js +50 -2
- package/packtory/stages/package-analysis-stage.js.map +1 -1
- package/packtory/stages/package-resolution-stage.js +80 -5
- package/packtory/stages/package-resolution-stage.js.map +1 -1
- package/packtory/stages/publish-stage.js +125 -4
- package/packtory/stages/publish-stage.js.map +1 -1
- package/packtory/stages/release-diff-stage.js +84 -5
- package/packtory/stages/release-diff-stage.js.map +1 -1
- package/progress/progress-broadcaster.js +45 -0
- package/progress/progress-broadcaster.js.map +1 -1
- package/published-package/published-package.js +12 -1
- package/published-package/published-package.js.map +1 -1
- package/report/aggregator/artifact-entry-merger.js +20 -0
- package/report/aggregator/artifact-entry-merger.js.map +1 -1
- package/report/aggregator/package-report-materialization.js +75 -2
- package/report/aggregator/package-report-materialization.js.map +1 -1
- package/report/aggregator/report-aggregator.js +37 -2
- package/report/aggregator/report-aggregator.js.map +1 -1
- package/report/aggregator/report-event-handlers.js +141 -2
- package/report/aggregator/report-event-handlers.js.map +1 -1
- package/report/aggregator/report-types.js +3 -0
- package/report/aggregator/report-types.js.map +1 -1
- package/report/config-redactor.js +29 -3
- package/report/config-redactor.js.map +1 -1
- package/report/decorators.js +85 -0
- package/report/decorators.js.map +1 -1
- package/report/inspectors/inspect-artifact-sizes.js +34 -1
- package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
- package/report/inspectors/inspect-linker-rewrites.js +14 -1
- package/report/inspectors/inspect-linker-rewrites.js.map +1 -1
- package/report/inspectors/inspect-package-json-provenance.js +15 -0
- package/report/inspectors/inspect-package-json-provenance.js.map +1 -1
- package/report/inspectors/inspect-scan-results.js +15 -0
- package/report/inspectors/inspect-scan-results.js.map +1 -1
- package/report/release-diff/release-version-transition.js +18 -0
- package/report/release-diff/release-version-transition.js.map +1 -1
- package/resource-resolver/bundle-resource-lookup.js +25 -0
- package/resource-resolver/bundle-resource-lookup.js.map +1 -1
- package/resource-resolver/content.js +136 -4
- package/resource-resolver/content.js.map +1 -1
- package/resource-resolver/dependency-resolution-walker.js +73 -2
- package/resource-resolver/dependency-resolution-walker.js.map +1 -1
- package/resource-resolver/resolved-bundle.js +3 -0
- package/resource-resolver/resolved-bundle.js.map +1 -1
- package/resource-resolver/resource-resolve-options.js +13 -1
- package/resource-resolver/resource-resolve-options.js.map +1 -1
- package/resource-resolver/resource-resolver.js +128 -6
- package/resource-resolver/resource-resolver.js.map +1 -1
- package/sbom/extract-license.js +11 -1
- package/sbom/extract-license.js.map +1 -1
- package/sbom/license-resolver.js +23 -2
- package/sbom/license-resolver.js.map +1 -1
- package/sbom/sbom-builder.js +57 -2
- package/sbom/sbom-builder.js.map +1 -1
- package/sbom/sbom-canonicalizer.js +45 -3
- package/sbom/sbom-canonicalizer.js.map +1 -1
- package/sbom/sbom-file.js +54 -5
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.js +14 -1
- package/sbom/sbom-serializer.js.map +1 -1
- package/sbom/tool-version.js +49 -1
- package/sbom/tool-version.js.map +1 -1
- package/sbom.cdx.json +10 -10
- package/tar/extract-tar.js +83 -3
- package/tar/extract-tar.js.map +1 -1
- package/tar/gzipped-pack.js +20 -0
- package/tar/gzipped-pack.js.map +1 -1
- package/tar/tarball-builder.js +44 -4
- package/tar/tarball-builder.js.map +1 -1
- package/vendor-materializer/vendor-entry.js +20 -1
- package/vendor-materializer/vendor-entry.js.map +1 -1
- package/vendor-materializer/vendor-materializer.js +240 -8
- package/vendor-materializer/vendor-materializer.js.map +1 -1
- package/version-manager/dependencies/bundle-dependency-grouping.js +32 -2
- package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
- package/version-manager/dependencies/dependency-groups.js +11 -1
- package/version-manager/dependencies/dependency-groups.js.map +1 -1
- package/version-manager/dependencies/external-dependency-classification.js +82 -3
- package/version-manager/dependencies/external-dependency-classification.js.map +1 -1
- package/version-manager/dependencies/versioned-bundle-dependencies.js +8 -3
- package/version-manager/dependencies/versioned-bundle-dependencies.js.map +1 -1
- package/version-manager/imports/hash-import-scanner.js +20 -2
- package/version-manager/imports/hash-import-scanner.js.map +1 -1
- package/version-manager/imports/imports-key-matcher.js +22 -0
- package/version-manager/imports/imports-key-matcher.js.map +1 -1
- package/version-manager/imports/versioned-bundle-imports.js +44 -2
- package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
- package/version-manager/manager.js +46 -6
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +51 -1
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/manifest/serialize.js +8 -1
- package/version-manager/manifest/serialize.js.map +1 -1
- package/version-manager/optional-bundle-fields.js +5 -1
- package/version-manager/optional-bundle-fields.js.map +1 -1
- package/version-manager/representative-root.js +9 -1
- package/version-manager/representative-root.js.map +1 -1
- package/version-manager/specifier-classifier.js +42 -2
- package/version-manager/specifier-classifier.js.map +1 -1
- package/version-manager/specifier-errors.js +58 -0
- package/version-manager/specifier-errors.js.map +1 -1
- package/version-manager/versioned-bundle.js +31 -6
- package/version-manager/versioned-bundle.js.map +1 -1
- package/zip/zip-builder.js +81 -2
- package/zip/zip-builder.js.map +1 -1
- package/dead-code-eliminator/liveness/external-module-resolution.js +0 -3
- package/dead-code-eliminator/liveness/external-module-resolution.js.map +0 -1
|
@@ -1,4 +1,61 @@
|
|
|
1
|
-
import 'node:path';
|
|
2
|
-
import 'true-myth';
|
|
3
|
-
import "./packtory-results.js";
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { Result } from 'true-myth';
|
|
3
|
+
import { packPackageFailureType } from "./packtory-results.js";
|
|
4
|
+
function isSafeOutputSegment(segment) {
|
|
5
|
+
return segment.length > 0 && segment !== '.' && segment !== '..' && !segment.includes('\\');
|
|
6
|
+
}
|
|
7
|
+
function batchOutputTarget(outputRoot, packageName) {
|
|
8
|
+
const segments = packageName.split('/');
|
|
9
|
+
const outputPath = path.join(outputRoot, ...segments);
|
|
10
|
+
if (!segments.every(isSafeOutputSegment)) {
|
|
11
|
+
return Result.err({ type: packPackageFailureType.unsafeOutputFolder, packageName, outputPath });
|
|
12
|
+
}
|
|
13
|
+
return Result.ok({ packageName, outputPath });
|
|
14
|
+
}
|
|
15
|
+
async function preflightFolderOutput(dependencies, packageName, outputPath) {
|
|
16
|
+
const readability = await dependencies.fileManager.checkReadability(outputPath);
|
|
17
|
+
if (readability.isReadable) {
|
|
18
|
+
return Result.err({ type: packPackageFailureType.outputFolderExists, packageName, outputPath });
|
|
19
|
+
}
|
|
20
|
+
return Result.ok(undefined);
|
|
21
|
+
}
|
|
22
|
+
async function preflightBatchRoot(dependencies, outputPath) {
|
|
23
|
+
const directory = await dependencies.fileManager.checkDirectory(outputPath);
|
|
24
|
+
if (directory.exists && !directory.isDirectory) {
|
|
25
|
+
return Result.err({ type: packPackageFailureType.outputRootNotDirectory, outputPath });
|
|
26
|
+
}
|
|
27
|
+
return Result.ok(undefined);
|
|
28
|
+
}
|
|
29
|
+
export async function preflightSingleOutput(dependencies, target, options) {
|
|
30
|
+
if (options.format !== 'folder') {
|
|
31
|
+
return Result.ok(undefined);
|
|
32
|
+
}
|
|
33
|
+
return preflightFolderOutput(dependencies, target.name, options.outputPath);
|
|
34
|
+
}
|
|
35
|
+
async function preflightBatchOutputTarget(dependencies, outputRoot, packageName) {
|
|
36
|
+
const targetResult = batchOutputTarget(outputRoot, packageName);
|
|
37
|
+
if (targetResult.isErr) {
|
|
38
|
+
return Result.err(targetResult.error);
|
|
39
|
+
}
|
|
40
|
+
const outputPreflight = await preflightFolderOutput(dependencies, packageName, targetResult.value.outputPath);
|
|
41
|
+
if (outputPreflight.isErr) {
|
|
42
|
+
return Result.err(outputPreflight.error);
|
|
43
|
+
}
|
|
44
|
+
return Result.ok(targetResult.value);
|
|
45
|
+
}
|
|
46
|
+
export async function preflightBatchOutputs(dependencies, validated, options) {
|
|
47
|
+
const rootPreflight = await preflightBatchRoot(dependencies, options.outputPath);
|
|
48
|
+
if (rootPreflight.isErr) {
|
|
49
|
+
return Result.err(rootPreflight.error);
|
|
50
|
+
}
|
|
51
|
+
const targets = [];
|
|
52
|
+
for (const packageConfig of validated.packtoryConfig.packages) {
|
|
53
|
+
const targetResult = await preflightBatchOutputTarget(dependencies, options.outputPath, packageConfig.name);
|
|
54
|
+
if (targetResult.isErr) {
|
|
55
|
+
return Result.err(targetResult.error);
|
|
56
|
+
}
|
|
57
|
+
targets.push(targetResult.value);
|
|
58
|
+
}
|
|
59
|
+
return Result.ok(targets);
|
|
60
|
+
}
|
|
4
61
|
//# sourceMappingURL=pack-output-preflight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-output-preflight.js","sourceRoot":"","sources":["../../../../source/packtory/pack-output-preflight.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"pack-output-preflight.js","sourceRoot":"","sources":["../../../../source/packtory/pack-output-preflight.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC,OAAO,EAAE,sBAAsB,EAA2B,MAAM,uBAAuB,CAAC;AAoBxF,SAAS,mBAAmB,CAAC,OAAe;IACxC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAChG,CAAC;AAED,SAAS,iBAAiB,CACtB,UAAkB,EAClB,WAAmB;IAEnB,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,G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,GAAG,MAAM,0BAA0B,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAC5G,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,4 +1,98 @@
|
|
|
1
|
-
import "../resource-resolver/resource-resolve-options.js";
|
|
2
|
-
import "../report/inspectors/inspect-linker-rewrites.js";
|
|
3
|
-
import "../report/inspectors/inspect-scan-results.js";
|
|
1
|
+
import { resolveRootsAndSurface } from "../resource-resolver/resource-resolve-options.js";
|
|
2
|
+
import { inspectLinkerRewrites } from "../report/inspectors/inspect-linker-rewrites.js";
|
|
3
|
+
import { inspectScanResults } from "../report/inspectors/inspect-scan-results.js";
|
|
4
|
+
function assertEsmMainPackageJson(mainPackageJson) {
|
|
5
|
+
if (mainPackageJson.type !== 'module') {
|
|
6
|
+
throw new Error('mainPackageJson.type must be "module"');
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function maybeEmitScanCompleted(dependencies, packageName, resolved) {
|
|
10
|
+
if (dependencies.progressBroadcaster.hasSubscribers('scanCompleted')) {
|
|
11
|
+
dependencies.progressBroadcaster.emit('scanCompleted', { packageName, ...inspectScanResults(resolved) });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function maybeEmitLinkingCompleted(dependencies, packageName, linked) {
|
|
15
|
+
if (dependencies.progressBroadcaster.hasSubscribers('linkingCompleted')) {
|
|
16
|
+
dependencies.progressBroadcaster.emit('linkingCompleted', {
|
|
17
|
+
packageName,
|
|
18
|
+
rewrites: inspectLinkerRewrites(linked)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function analyzeOne(dependencies, linkedBundle, transformationsEnabled, deadCodeElimination) {
|
|
23
|
+
const [analyzedBundle] = await dependencies.deadCodeEliminator.eliminate([
|
|
24
|
+
{
|
|
25
|
+
bundle: linkedBundle,
|
|
26
|
+
transformationsEnabled,
|
|
27
|
+
substitutionPublicModuleInputFilePaths: new Set(),
|
|
28
|
+
deadCodeElimination
|
|
29
|
+
}
|
|
30
|
+
]);
|
|
31
|
+
if (analyzedBundle === undefined) {
|
|
32
|
+
throw new Error(`Dead code eliminator returned no bundle for "${linkedBundle.name}"`);
|
|
33
|
+
}
|
|
34
|
+
return analyzedBundle;
|
|
35
|
+
}
|
|
36
|
+
export function createResolveAndBuildOperations(dependencies) {
|
|
37
|
+
async function linkResolvedBundle(options, resolvedBundle) {
|
|
38
|
+
maybeEmitScanCompleted(dependencies, options.name, resolvedBundle);
|
|
39
|
+
dependencies.progressBroadcaster.emit('linking', { packageName: options.name });
|
|
40
|
+
const linkedBundle = await dependencies.linker.linkBundle({
|
|
41
|
+
bundle: resolvedBundle,
|
|
42
|
+
bundleDependencies: options.bundleDependencies,
|
|
43
|
+
bundlePeerDependencies: options.bundlePeerDependencies
|
|
44
|
+
});
|
|
45
|
+
maybeEmitLinkingCompleted(dependencies, options.name, linkedBundle);
|
|
46
|
+
return linkedBundle;
|
|
47
|
+
}
|
|
48
|
+
async function resolveAndLinkResolvedBundle(options, resolveBundle) {
|
|
49
|
+
assertEsmMainPackageJson(options.mainPackageJson);
|
|
50
|
+
dependencies.progressBroadcaster.emit('resolving', { packageName: options.name });
|
|
51
|
+
return await linkResolvedBundle(options, await resolveBundle());
|
|
52
|
+
}
|
|
53
|
+
async function resolveAndLinkWithPromotedDeclarations(options, promotedDeclarationEntryFiles) {
|
|
54
|
+
return await resolveAndLinkResolvedBundle(options, async function () {
|
|
55
|
+
return await dependencies.resourceResolver.resolveWithPromotedDeclarations(options, promotedDeclarationEntryFiles);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async function resolveAndLink(options) {
|
|
59
|
+
return await resolveAndLinkWithPromotedDeclarations(options, []);
|
|
60
|
+
}
|
|
61
|
+
async function resolveAndLinkWithPromotedDeclarationCompanions(options, substitutedInputFilePaths) {
|
|
62
|
+
return await resolveAndLinkResolvedBundle(options, async function () {
|
|
63
|
+
return await dependencies.resourceResolver.resolveWithPromotedDeclarationCompanions(options, substitutedInputFilePaths);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function build(options) {
|
|
67
|
+
assertEsmMainPackageJson(options.mainPackageJson);
|
|
68
|
+
const { additionalFiles, bundleDependencies, bundlePeerDependencies, includeSourceMapFiles, name, sourcesFolder } = options;
|
|
69
|
+
const normalizedResolveInputs = resolveRootsAndSurface(options);
|
|
70
|
+
const linkedBundle = await resolveAndLink({
|
|
71
|
+
name,
|
|
72
|
+
sourcesFolder,
|
|
73
|
+
roots: normalizedResolveInputs.roots,
|
|
74
|
+
surface: normalizedResolveInputs.surface,
|
|
75
|
+
includeSourceMapFiles,
|
|
76
|
+
additionalFiles,
|
|
77
|
+
mainPackageJson: options.mainPackageJson,
|
|
78
|
+
additionalChangelogSourceFiles: { packageFiles: [], sharedFiles: [] },
|
|
79
|
+
additionalPackageJsonAttributes: options.additionalPackageJsonAttributes,
|
|
80
|
+
allowMutableSpecifiers: options.allowMutableSpecifiers,
|
|
81
|
+
bundleDependencies,
|
|
82
|
+
bundlePeerDependencies
|
|
83
|
+
});
|
|
84
|
+
const transformationsEnabled = options.deadCodeElimination?.enabled ?? true;
|
|
85
|
+
const analyzedBundle = await analyzeOne(dependencies, linkedBundle, transformationsEnabled, options.deadCodeElimination);
|
|
86
|
+
return dependencies.versionManager.addVersion({
|
|
87
|
+
bundle: analyzedBundle,
|
|
88
|
+
version: options.version,
|
|
89
|
+
mainPackageJson: options.mainPackageJson,
|
|
90
|
+
bundleDependencies: options.bundleDependencies,
|
|
91
|
+
bundlePeerDependencies: options.bundlePeerDependencies,
|
|
92
|
+
additionalPackageJsonAttributes: options.additionalPackageJsonAttributes,
|
|
93
|
+
allowMutableSpecifiers: options.allowMutableSpecifiers
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return { build, resolveAndLink, resolveAndLinkWithPromotedDeclarationCompanions };
|
|
97
|
+
}
|
|
4
98
|
//# sourceMappingURL=package-processor-build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-processor-build.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor-build.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"package-processor-build.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor-build.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAA4B,MAAM,8CAA8C,CAAC;AAgB5G,SAAS,wBAAwB,CAAC,eAAqC;IACnE,IAAI,eAAe,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC7D,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAC3B,YAAsE,EACtE,WAAmB,EACnB,QAA6B;IAE7B,IAAI,YAAY,CAAC,mBAAmB,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,CAAC;QACnE,YAAY,CAAC,mBAAmB,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,WAAW,EAAE,GAAG,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7G,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB,CAC9B,YAAsE,EACtE,WAAmB,EACnB,MAAoB;IAEpB,IAAI,YAAY,CAAC,mBAAmB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtE,YAAY,CAAC,mBAAmB,CAAC,IAAI,C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AE,OAAO,CAAC,eAAe;YACxC,8BAA8B,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;YACrE,+BAA+B,EAAE,OAAO,CAAC,+BAA+B;YACxE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;YACtD,kBAAkB;YAClB,sBAAsB;SACzB,CAAC,CAAC;QAEH,MAAM,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,EAAE,OAAO,IAAI,IAAI,CAAC;QAC5E,MAAM,cAAc,GAAG,MAAM,UAAU,CACnC,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,OAAO,CAAC,mBAAmB,CAC9B,CAAC;QACF,OAAO,YAAY,CAAC,cAAc,CAAC,UAAU,CAAC;YAC1C,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;YACtD,+BAA+B,EAAE,OAAO,CAAC,+BAA+B;YACxE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;SACzD,CAAC,CAAC;IACP,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,+CAA+C,EAAE,CAAC;AACtF,CAAC"}
|
|
@@ -1,7 +1,298 @@
|
|
|
1
|
-
import 'remeda';
|
|
2
|
-
import "../bundle-emitter/publication-outcome.js";
|
|
3
|
-
import "./options/version-provider-context.js";
|
|
4
|
-
import "./options/version-trigger.js";
|
|
5
|
-
import "./publish-target-preflight.js";
|
|
6
|
-
import "./published-release-state.js";
|
|
1
|
+
import { isDefined, pickBy } from 'remeda';
|
|
2
|
+
import { noPublication, publishedToRegistry } from "../bundle-emitter/publication-outcome.js";
|
|
3
|
+
import { createVersionProviderContext } from "./options/version-provider-context.js";
|
|
4
|
+
import { determineBuildVersion, inferVersionTrigger, shouldIncreaseVersion } from "./options/version-trigger.js";
|
|
5
|
+
import { verifyPublishTarget } from "./publish-target-preflight.js";
|
|
6
|
+
import { publishedReleaseStatus, wasAlreadyPublished } from "./published-release-state.js";
|
|
7
|
+
const unconfirmedPublishRecovery = Symbol('unconfirmedPublishRecovery');
|
|
8
|
+
function assertEsmMainPackageJson(mainPackageJson) {
|
|
9
|
+
if (mainPackageJson.type !== 'module') {
|
|
10
|
+
throw new Error('mainPackageJson.type must be "module"');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function siblingsFromOptions(buildOptions) {
|
|
14
|
+
return [...buildOptions.bundleDependencies, ...buildOptions.bundlePeerDependencies];
|
|
15
|
+
}
|
|
16
|
+
function usesVersionProvider(versioning) {
|
|
17
|
+
return Object.hasOwn(versioning, 'provideVersion');
|
|
18
|
+
}
|
|
19
|
+
function buildVersionedBundleForVersion(input) {
|
|
20
|
+
const { dependencies, analyzedBundle, options, version, substitutionPublicModuleSourcePaths } = input;
|
|
21
|
+
dependencies.progressBroadcaster.emit('building', { packageName: options.name, version });
|
|
22
|
+
return dependencies.versionManager.addVersion({
|
|
23
|
+
bundle: analyzedBundle,
|
|
24
|
+
...options,
|
|
25
|
+
version,
|
|
26
|
+
substitutionPublicModuleSourcePaths
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function emitVersionDetermined(dependencies, input) {
|
|
30
|
+
if (!dependencies.progressBroadcaster.hasSubscribers('versionDetermined')) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
dependencies.progressBroadcaster.emit('versionDetermined', {
|
|
34
|
+
packageName: input.options.name,
|
|
35
|
+
previousVersion: input.currentVersion.isJust ? input.currentVersion.value : undefined,
|
|
36
|
+
chosenVersion: input.chosenVersion,
|
|
37
|
+
trigger: inferVersionTrigger(input.currentVersion, input.options, input.didBump)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async function generateExtraFiles(dependencies, versionedBundle, buildOptions) {
|
|
41
|
+
const result = await dependencies.sbomFileBuilder.generate(versionedBundle, siblingsFromOptions(buildOptions), buildOptions.publishSettings);
|
|
42
|
+
return result ?? [];
|
|
43
|
+
}
|
|
44
|
+
function checkAlreadyPublishedOptions(versionedBundle, buildOptions, extraFiles) {
|
|
45
|
+
return pickBy({
|
|
46
|
+
bundle: versionedBundle,
|
|
47
|
+
registrySettings: buildOptions.registrySettings,
|
|
48
|
+
extraFiles: extraFiles.length === 0 ? undefined : extraFiles
|
|
49
|
+
}, isDefined);
|
|
50
|
+
}
|
|
51
|
+
async function checkBundleAlreadyPublished(dependencies, versionedBundle, buildOptions, extraFiles) {
|
|
52
|
+
return dependencies.bundleEmitter.checkBundleAlreadyPublished(checkAlreadyPublishedOptions(versionedBundle, buildOptions, extraFiles));
|
|
53
|
+
}
|
|
54
|
+
function isVerifiedFinalizedPublish(candidate, result) {
|
|
55
|
+
if (!result.alreadyPublishedAsLatest || result.previousReleaseArtifacts.isNothing) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
return (result.previousReleaseArtifacts.value.version === candidate.version &&
|
|
59
|
+
result.previousReleaseArtifacts.value.gitHead === candidate.gitHead);
|
|
60
|
+
}
|
|
61
|
+
function hasRecoveredPublishedVersion(candidate, result) {
|
|
62
|
+
if (candidate === undefined) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return candidate.version === result.bundle.version;
|
|
66
|
+
}
|
|
67
|
+
function publishRequest(options, result) {
|
|
68
|
+
return pickBy({
|
|
69
|
+
bundle: result.bundle,
|
|
70
|
+
registrySettings: options.buildOptions.registrySettings,
|
|
71
|
+
publishSettings: options.buildOptions.publishSettings,
|
|
72
|
+
stage: options.stage,
|
|
73
|
+
extraFiles: result.extraFiles.length === 0 ? undefined : result.extraFiles
|
|
74
|
+
}, isDefined);
|
|
75
|
+
}
|
|
76
|
+
async function findRecoveryCandidate(input) {
|
|
77
|
+
const { dependencies, options } = input;
|
|
78
|
+
const lookup = {
|
|
79
|
+
name: options.buildOptions.name,
|
|
80
|
+
registrySettings: options.buildOptions.registrySettings
|
|
81
|
+
};
|
|
82
|
+
return dependencies.bundleEmitter.findCurrentHeadPublishedVersion(lookup);
|
|
83
|
+
}
|
|
84
|
+
function confirmPublishedPackage(input) {
|
|
85
|
+
const { candidate, published, result } = input;
|
|
86
|
+
if (!isVerifiedFinalizedPublish(candidate, published)) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...result,
|
|
91
|
+
publication: publishedToRegistry,
|
|
92
|
+
previousReleaseArtifacts: published.previousReleaseArtifacts
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async function confirmPublishedPackageAfterFailure(input) {
|
|
96
|
+
const candidate = await findRecoveryCandidate(input);
|
|
97
|
+
if (!hasRecoveredPublishedVersion(candidate, input.result)) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const published = await checkBundleAlreadyPublished(input.dependencies, input.result.bundle, input.options.buildOptions, input.result.extraFiles);
|
|
101
|
+
return confirmPublishedPackage({ ...input, candidate, published });
|
|
102
|
+
}
|
|
103
|
+
async function recoverPublishedPackageAfterFailure(input) {
|
|
104
|
+
if (input.options.stage) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
return confirmPublishedPackageAfterFailure(input);
|
|
108
|
+
}
|
|
109
|
+
function publishRecoveryAttempt(result) {
|
|
110
|
+
return result ?? unconfirmedPublishRecovery;
|
|
111
|
+
}
|
|
112
|
+
async function attemptPublishRecovery(input) {
|
|
113
|
+
return publishRecoveryAttempt(await recoverPublishedPackageAfterFailure(input));
|
|
114
|
+
}
|
|
115
|
+
async function publishPreparedResult(dependencies, options, result) {
|
|
116
|
+
const publication = await dependencies.bundleEmitter.publish(publishRequest(options, result));
|
|
117
|
+
return { ...result, publication };
|
|
118
|
+
}
|
|
119
|
+
async function publishPreparedResultOrRecover(dependencies, options, result) {
|
|
120
|
+
try {
|
|
121
|
+
return await publishPreparedResult(dependencies, options, result);
|
|
122
|
+
}
|
|
123
|
+
catch (publishError) {
|
|
124
|
+
const recovery = await attemptPublishRecovery({ dependencies, options, result });
|
|
125
|
+
if (recovery !== unconfirmedPublishRecovery) {
|
|
126
|
+
return recovery;
|
|
127
|
+
}
|
|
128
|
+
throw publishError;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
async function tryFinalizePublishedCurrentHead(dependencies, options) {
|
|
132
|
+
const candidate = options.stage
|
|
133
|
+
? undefined
|
|
134
|
+
: await dependencies.bundleEmitter.findCurrentHeadPublishedVersion({
|
|
135
|
+
name: options.buildOptions.name,
|
|
136
|
+
registrySettings: options.buildOptions.registrySettings
|
|
137
|
+
});
|
|
138
|
+
if (candidate === undefined) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const versionedBundle = buildVersionedBundleForVersion({
|
|
142
|
+
dependencies,
|
|
143
|
+
analyzedBundle: options.analyzedBundle,
|
|
144
|
+
options: options.buildOptions,
|
|
145
|
+
version: candidate.version,
|
|
146
|
+
substitutionPublicModuleSourcePaths: options.substitutionPublicModuleSourcePaths
|
|
147
|
+
});
|
|
148
|
+
const extraFiles = await generateExtraFiles(dependencies, versionedBundle, options.buildOptions);
|
|
149
|
+
const alreadyPublished = await checkBundleAlreadyPublished(dependencies, versionedBundle, options.buildOptions, extraFiles);
|
|
150
|
+
if (!isVerifiedFinalizedPublish(candidate, alreadyPublished)) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
bundle: versionedBundle,
|
|
155
|
+
status: publishedReleaseStatus.alreadyPublished,
|
|
156
|
+
publication: noPublication,
|
|
157
|
+
extraFiles,
|
|
158
|
+
previousReleaseArtifacts: alreadyPublished.previousReleaseArtifacts
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export function createPublishOperations(dependencies) {
|
|
162
|
+
async function buildVersionedBundle(analyzedBundle, options, stage, substitutionPublicModuleSourcePaths) {
|
|
163
|
+
assertEsmMainPackageJson(options.mainPackageJson);
|
|
164
|
+
const currentVersion = await dependencies.bundleEmitter.determineCurrentVersion({
|
|
165
|
+
name: analyzedBundle.name,
|
|
166
|
+
registrySettings: options.registrySettings,
|
|
167
|
+
stage,
|
|
168
|
+
versioning: options.versioning
|
|
169
|
+
});
|
|
170
|
+
const version = await determineBuildVersion(currentVersion, options, await createVersionProviderContext(dependencies, analyzedBundle, options, stage));
|
|
171
|
+
const versionedBundle = buildVersionedBundleForVersion({
|
|
172
|
+
dependencies,
|
|
173
|
+
analyzedBundle,
|
|
174
|
+
options,
|
|
175
|
+
version,
|
|
176
|
+
substitutionPublicModuleSourcePaths
|
|
177
|
+
});
|
|
178
|
+
return { versionedBundle, currentVersion, version };
|
|
179
|
+
}
|
|
180
|
+
function finalizeWithoutBump(buildContext, options, status, extras) {
|
|
181
|
+
emitVersionDetermined(dependencies, {
|
|
182
|
+
options,
|
|
183
|
+
currentVersion: buildContext.currentVersion,
|
|
184
|
+
chosenVersion: buildContext.versionedBundle.version,
|
|
185
|
+
didBump: false
|
|
186
|
+
});
|
|
187
|
+
return {
|
|
188
|
+
bundle: buildContext.versionedBundle,
|
|
189
|
+
status,
|
|
190
|
+
publication: noPublication,
|
|
191
|
+
extraFiles: extras.extraFiles,
|
|
192
|
+
previousReleaseArtifacts: extras.previousReleaseArtifacts
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
async function bumpVersion(buildContext, options) {
|
|
196
|
+
dependencies.progressBroadcaster.emit('rebuilding', {
|
|
197
|
+
packageName: options.name,
|
|
198
|
+
version: buildContext.version
|
|
199
|
+
});
|
|
200
|
+
const newVersionedBundle = dependencies.versionManager.increaseVersion(buildContext.versionedBundle);
|
|
201
|
+
emitVersionDetermined(dependencies, {
|
|
202
|
+
options,
|
|
203
|
+
currentVersion: buildContext.currentVersion,
|
|
204
|
+
chosenVersion: newVersionedBundle.version,
|
|
205
|
+
didBump: true
|
|
206
|
+
});
|
|
207
|
+
return newVersionedBundle;
|
|
208
|
+
}
|
|
209
|
+
function tryFinalizeWithoutBump(buildContext, options, alreadyPublished, extraFiles) {
|
|
210
|
+
const extras = { extraFiles, previousReleaseArtifacts: alreadyPublished.previousReleaseArtifacts };
|
|
211
|
+
if (alreadyPublished.alreadyPublishedAsLatest) {
|
|
212
|
+
return finalizeWithoutBump(buildContext, options, publishedReleaseStatus.alreadyPublished, extras);
|
|
213
|
+
}
|
|
214
|
+
if (!shouldIncreaseVersion(buildContext.currentVersion, options)) {
|
|
215
|
+
return finalizeWithoutBump(buildContext, options, buildContext.currentVersion.isJust
|
|
216
|
+
? publishedReleaseStatus.newVersion
|
|
217
|
+
: publishedReleaseStatus.initialVersion, extras);
|
|
218
|
+
}
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
async function tryFinalizeCurrentProviderVersion(options) {
|
|
222
|
+
const currentVersion = await dependencies.bundleEmitter.determineCurrentVersion({
|
|
223
|
+
name: options.analyzedBundle.name,
|
|
224
|
+
registrySettings: options.buildOptions.registrySettings,
|
|
225
|
+
stage: options.stage,
|
|
226
|
+
versioning: options.buildOptions.versioning
|
|
227
|
+
});
|
|
228
|
+
if (!usesVersionProvider(options.buildOptions.versioning) || currentVersion.isNothing) {
|
|
229
|
+
return undefined;
|
|
230
|
+
}
|
|
231
|
+
const versionedBundle = buildVersionedBundleForVersion({
|
|
232
|
+
dependencies,
|
|
233
|
+
analyzedBundle: options.analyzedBundle,
|
|
234
|
+
options: options.buildOptions,
|
|
235
|
+
version: currentVersion.value,
|
|
236
|
+
substitutionPublicModuleSourcePaths: options.substitutionPublicModuleSourcePaths
|
|
237
|
+
});
|
|
238
|
+
const extraFiles = await generateExtraFiles(dependencies, versionedBundle, options.buildOptions);
|
|
239
|
+
const alreadyPublished = await checkBundleAlreadyPublished(dependencies, versionedBundle, options.buildOptions, extraFiles);
|
|
240
|
+
return alreadyPublished.alreadyPublishedAsLatest
|
|
241
|
+
? {
|
|
242
|
+
bundle: versionedBundle,
|
|
243
|
+
status: publishedReleaseStatus.alreadyPublished,
|
|
244
|
+
publication: noPublication,
|
|
245
|
+
extraFiles,
|
|
246
|
+
previousReleaseArtifacts: alreadyPublished.previousReleaseArtifacts
|
|
247
|
+
}
|
|
248
|
+
: undefined;
|
|
249
|
+
}
|
|
250
|
+
async function buildPendingPublish(options) {
|
|
251
|
+
const buildContext = await buildVersionedBundle(options.analyzedBundle, options.buildOptions, options.stage, options.substitutionPublicModuleSourcePaths);
|
|
252
|
+
const preBumpExtraFiles = await generateExtraFiles(dependencies, buildContext.versionedBundle, options.buildOptions);
|
|
253
|
+
const alreadyPublished = await checkBundleAlreadyPublished(dependencies, buildContext.versionedBundle, options.buildOptions, preBumpExtraFiles);
|
|
254
|
+
const finalizedWithoutBump = tryFinalizeWithoutBump(buildContext, options.buildOptions, alreadyPublished, preBumpExtraFiles);
|
|
255
|
+
if (finalizedWithoutBump !== undefined) {
|
|
256
|
+
return finalizedWithoutBump;
|
|
257
|
+
}
|
|
258
|
+
const newVersionedBundle = usesVersionProvider(options.buildOptions.versioning)
|
|
259
|
+
? buildContext.versionedBundle
|
|
260
|
+
: await bumpVersion(buildContext, options.buildOptions);
|
|
261
|
+
const extraFiles = await generateExtraFiles(dependencies, newVersionedBundle, options.buildOptions);
|
|
262
|
+
return {
|
|
263
|
+
bundle: newVersionedBundle,
|
|
264
|
+
status: buildContext.currentVersion.isJust
|
|
265
|
+
? publishedReleaseStatus.newVersion
|
|
266
|
+
: publishedReleaseStatus.initialVersion,
|
|
267
|
+
publication: noPublication,
|
|
268
|
+
extraFiles,
|
|
269
|
+
previousReleaseArtifacts: alreadyPublished.previousReleaseArtifacts
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
async function tryBuildAndPublish(options) {
|
|
273
|
+
assertEsmMainPackageJson(options.buildOptions.mainPackageJson);
|
|
274
|
+
const currentHeadPublishAttempt = await tryFinalizePublishedCurrentHead(dependencies, options);
|
|
275
|
+
if (currentHeadPublishAttempt === false) {
|
|
276
|
+
return verifyPublishTarget(dependencies, options, await buildPendingPublish(options));
|
|
277
|
+
}
|
|
278
|
+
const result = currentHeadPublishAttempt ??
|
|
279
|
+
await tryFinalizeCurrentProviderVersion(options) ??
|
|
280
|
+
await buildPendingPublish(options);
|
|
281
|
+
return verifyPublishTarget(dependencies, options, result);
|
|
282
|
+
}
|
|
283
|
+
async function publishPreparedPackage(options, result) {
|
|
284
|
+
if (wasAlreadyPublished(result)) {
|
|
285
|
+
return result;
|
|
286
|
+
}
|
|
287
|
+
dependencies.progressBroadcaster.emit('publishing', {
|
|
288
|
+
packageName: options.buildOptions.name,
|
|
289
|
+
version: result.bundle.version
|
|
290
|
+
});
|
|
291
|
+
return publishPreparedResultOrRecover(dependencies, options, result);
|
|
292
|
+
}
|
|
293
|
+
async function buildAndPublish(options) {
|
|
294
|
+
return publishPreparedPackage(options, await tryBuildAndPublish(options));
|
|
295
|
+
}
|
|
296
|
+
return { buildAndPublish, publishPreparedPackage, tryBuildAndPublish };
|
|
297
|
+
}
|
|
7
298
|
//# sourceMappingURL=package-processor-publish.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-processor-publish.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor-publish.ts"],"names":[],"mappings":"AAAA,OAAkC,QAAQ,CAAC;AAC3C,OAAmD,0CAA0C,CAAC;AAE9F,OAA6C,uCAAuC,CAAC;AACrF,OAAkF,8BAA8B,CAAC;AAajH,OAAoC,+BAA+B,CAAC;AACpE,OAA4D,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"package-processor-publish.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor-publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,qBA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sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import "./package-processor-build.js";
|
|
2
|
-
import "./package-processor-publish.js";
|
|
1
|
+
import { createResolveAndBuildOperations } from "./package-processor-build.js";
|
|
2
|
+
import { createPublishOperations } from "./package-processor-publish.js";
|
|
3
|
+
export function createPackageProcessor(dependencies) {
|
|
4
|
+
const resolveAndBuildOperations = createResolveAndBuildOperations(dependencies);
|
|
5
|
+
const publishOperations = createPublishOperations(dependencies);
|
|
6
|
+
return {
|
|
7
|
+
...resolveAndBuildOperations,
|
|
8
|
+
...publishOperations
|
|
9
|
+
};
|
|
10
|
+
}
|
|
3
11
|
//# sourceMappingURL=package-processor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-processor.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor.ts"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"package-processor.js","sourceRoot":"","sources":["../../../../source/packtory/package-processor.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAA0B,MAAM,gCAAgC,CAAC;AAmCjG,MAAM,UAAU,sBAAsB,CAAC,YAA0C;IAC7E,MAAM,yBAAyB,GAAG,+BAA+B,CAAC,YAAY,CAAC,CAAC;IAChF,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,YAAY,CAAC,CAAC;IAEhE,OAAO;QACH,GAAG,yBAAyB;QAC5B,GAAG,iBAAiB;KACvB,CAAC;AACN,CAAC"}
|