packtory 0.0.96 → 0.0.97
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.d.ts +28 -0
- package/artifacts/artifacts-builder.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/bundle-emitter/emitter.d.ts.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.d.ts +2 -0
- package/bundle-emitter/fetch-published-artifacts.d.ts.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.d.ts +3 -0
- package/bundle-emitter/publication-outcome.d.ts.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.d.ts +14 -0
- package/bundle-emitter/registry/package-metadata-fetcher.d.ts.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.d.ts +17 -0
- package/bundle-emitter/registry/registry-auth-config.d.ts.map +1 -0
- 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.d.ts +13 -1
- package/bundle-emitter/registry/registry-client.d.ts.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.d.ts +1 -0
- package/bundle-emitter/registry/tarball-integrity.d.ts.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.d.ts +18 -0
- package/checks/check-runner.d.ts.map +1 -0
- package/checks/check-runner.js +8 -0
- package/checks/check-runner.js.map +1 -1
- package/checks/rule.d.ts +42 -0
- package/checks/rule.d.ts.map +1 -0
- 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.d.ts +13 -0
- package/checks/rules/max-bundle-size.d.ts.map +1 -0
- 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.d.ts +11 -0
- package/checks/rules/no-dev-dependency-imports.d.ts.map +1 -0
- 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.d.ts +11 -0
- package/checks/rules/no-duplicated-files.d.ts.map +1 -0
- 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.d.ts +15 -0
- package/checks/rules/no-side-effects.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/checks/rules/no-unexposed-executables.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/checks/rules/no-unused-bundle-dependencies.d.ts.map +1 -0
- 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.d.ts +23 -0
- package/checks/rules/registry.d.ts.map +1 -0
- package/checks/rules/registry.js +22 -9
- package/checks/rules/registry.js.map +1 -1
- package/checks/rules/required-files.d.ts +15 -0
- package/checks/rules/required-files.d.ts.map +1 -0
- package/checks/rules/required-files.js +41 -3
- package/checks/rules/required-files.js.map +1 -1
- package/checks/rules/type-script-declaration-integrity.d.ts +9 -0
- package/checks/rules/type-script-declaration-integrity.d.ts.map +1 -0
- 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.d.ts +29 -0
- package/checks/rules/type-script-declaration-project.d.ts.map +1 -0
- 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.d.ts +24 -0
- package/checks/rules/type-script-integrity.d.ts.map +1 -0
- 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.d.ts +29 -0
- package/checks/rules/type-script-package-resolution.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/checks/rules/unique-target-paths.d.ts.map +1 -0
- 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.d.ts +44 -0
- package/config/changelog-settings.d.ts.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.d.ts +6 -1
- package/config/config.d.ts.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.d.ts +1 -0
- package/config/dead-code-elimination-settings.d.ts.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 +13 -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.d.ts +4 -0
- package/config/package-config.d.ts.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 +2 -0
- 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.d.ts +3 -0
- package/config/publish-settings.d.ts.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.d.ts +41 -0
- package/config/registry-settings.d.ts.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.d.ts +18 -1
- package/config/versioning-settings.d.ts.map +1 -1
- package/config/versioning-settings.js +10 -3
- package/config/versioning-settings.js.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.d.ts +11 -0
- package/dead-code-eliminator/analyzed-bundle.d.ts.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/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-module-resolution.js +172 -2
- package/dead-code-eliminator/liveness/external-module-resolution.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity-summary.js +294 -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 +65 -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.d.ts +8 -0
- package/dead-code-eliminator/transform/atom-translator.d.ts.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.d.ts +7 -0
- package/dead-code-eliminator/transform/line-index.d.ts.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.d.ts +41 -0
- package/dependency-scanner/dependency-graph.d.ts.map +1 -0
- package/dependency-scanner/dependency-graph.js +77 -3
- package/dependency-scanner/dependency-graph.js.map +1 -1
- package/dependency-scanner/external-dependencies.d.ts +9 -0
- package/dependency-scanner/external-dependencies.d.ts.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.d.ts +20 -0
- package/dependency-scanner/scanner.d.ts.map +1 -0
- package/dependency-scanner/scanner.js +109 -4
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.d.ts +37 -0
- package/dependency-scanner/source-file-references.d.ts.map +1 -0
- package/dependency-scanner/source-file-references.js +181 -6
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/source-map-file-locator.d.ts +10 -0
- package/dependency-scanner/source-map-file-locator.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/dependency-scanner/typescript-compiler-options.d.ts.map +1 -0
- 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.d.ts +12 -0
- package/dependency-scanner/typescript-file-host.d.ts.map +1 -0
- package/dependency-scanner/typescript-file-host.js +49 -5
- package/dependency-scanner/typescript-file-host.js.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.d.ts +19 -0
- package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -0
- package/dependency-scanner/typescript-project-analyzer.js +35 -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.d.ts +1 -0
- package/directed-graph/graph.d.ts.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.d.ts +1 -0
- package/file-manager/file-description.d.ts.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.d.ts +12 -0
- package/git/current-git-head.d.ts.map +1 -0
- 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.d.ts +8 -0
- package/linker/linked-bundle.d.ts.map +1 -1
- package/linker/linked-bundle.js +5 -0
- package/linker/linked-bundle.js.map +1 -1
- package/linker/linker.d.ts +13 -0
- package/linker/linker.d.ts.map +1 -0
- 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 +76 -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.d.ts +20 -0
- package/pack-emitter/pack-emitter.d.ts.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.d.ts +2 -0
- package/package-surface/surface.d.ts.map +1 -1
- package/package-surface/surface.js +12 -0
- package/package-surface/surface.js.map +1 -1
- package/package.json +1 -1
- package/packages/package-processor.composition.d.ts +22 -0
- package/packages/package-processor.composition.d.ts.map +1 -1
- package/packages/package-processor.composition.js +161 -34
- package/packages/package-processor.composition.js.map +1 -1
- package/packtory/map-config.d.ts +11 -1
- package/packtory/map-config.d.ts.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.d.ts +13 -1
- package/packtory/options/prepare-package-options.d.ts.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.d.ts +17 -1
- package/packtory/options/setting-resolvers.d.ts.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-result.d.ts +3 -0
- package/packtory/package-processor-publish-result.d.ts.map +1 -1
- package/packtory/package-processor-publish.d.ts +2 -0
- package/packtory/package-processor-publish.d.ts.map +1 -1
- package/packtory/package-processor-publish.js +297 -6
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/package-processor.d.ts +34 -0
- package/packtory/package-processor.d.ts.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.d.ts +28 -1
- package/packtory/packtory.d.ts.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.d.ts +19 -0
- package/packtory/published-release-state.d.ts.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.d.ts +11 -0
- package/packtory/resolved-package.d.ts.map +1 -1
- package/packtory/resolved-package.js +97 -3
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.d.ts +47 -0
- package/packtory/scheduler.d.ts.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.d.ts +1 -0
- package/progress/progress-broadcaster.d.ts.map +1 -1
- package/progress/progress-broadcaster.js +45 -0
- package/progress/progress-broadcaster.js.map +1 -1
- package/published-package/published-package.d.ts +2 -0
- package/published-package/published-package.d.ts.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.d.ts +21 -0
- package/report/aggregator/report-types.d.ts.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.d.ts +17 -0
- package/resource-resolver/resolved-bundle.d.ts.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.d.ts +5 -0
- package/resource-resolver/resource-resolve-options.d.ts.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.d.ts +15 -0
- package/resource-resolver/resource-resolver.d.ts.map +1 -0
- 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.d.ts +14 -0
- package/sbom/license-resolver.d.ts.map +1 -0
- 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.d.ts +10 -0
- package/sbom/sbom-file.d.ts.map +1 -1
- package/sbom/sbom-file.js +54 -5
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.d.ts +8 -0
- package/sbom/sbom-serializer.d.ts.map +1 -0
- 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 +5 -5
- 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.d.ts +14 -0
- package/tar/tarball-builder.d.ts.map +1 -0
- package/tar/tarball-builder.js +44 -4
- package/tar/tarball-builder.js.map +1 -1
- package/vendor-materializer/vendor-entry.d.ts +12 -0
- package/vendor-materializer/vendor-entry.d.ts.map +1 -0
- package/vendor-materializer/vendor-entry.js +20 -1
- package/vendor-materializer/vendor-entry.js.map +1 -1
- package/vendor-materializer/vendor-materializer.d.ts +55 -0
- package/vendor-materializer/vendor-materializer.d.ts.map +1 -0
- 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.d.ts +5 -0
- package/version-manager/manager.d.ts.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.d.ts +3 -1
- package/version-manager/versioned-bundle.d.ts.map +1 -1
- package/version-manager/versioned-bundle.js +31 -6
- package/version-manager/versioned-bundle.js.map +1 -1
- package/zip/zip-builder.d.ts +22 -0
- package/zip/zip-builder.d.ts.map +1 -0
- package/zip/zip-builder.js +81 -2
- package/zip/zip-builder.js.map +1 -1
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
import 'remeda';
|
|
1
|
+
import { isDefined, pickBy } from 'remeda';
|
|
2
|
+
function redactProvenance(provenance) {
|
|
3
|
+
if (provenance.type === 'file') {
|
|
4
|
+
return { type: 'file', path: provenance.path, inlined: false };
|
|
5
|
+
}
|
|
6
|
+
return { type: 'auto' };
|
|
7
|
+
}
|
|
8
|
+
export function redactPublishSettings(settings) {
|
|
9
|
+
return pickBy({
|
|
10
|
+
access: settings.access,
|
|
11
|
+
allowScripts: settings.allowScripts,
|
|
12
|
+
sbom: settings.sbom,
|
|
13
|
+
provenance: settings.access === 'public' && settings.provenance !== undefined
|
|
14
|
+
? redactProvenance(settings.provenance)
|
|
15
|
+
: undefined
|
|
16
|
+
}, isDefined);
|
|
17
|
+
}
|
|
2
18
|
//# sourceMappingURL=publish-settings.report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-settings.report.js","sourceRoot":"","sources":["../../../../source/config/publish-settings.report.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"publish-settings.report.js","sourceRoot":"","sources":["../../../../source/config/publish-settings.report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAc3C,SAAS,gBAAgB,CAAC,UAA4D;IAClF,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,QAAyB;IAC3D,OAAO,MAAM,CACT;QACI,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,UAAU,EAAE,QAAQ,CAAC,MAAM,KAAK,QAAQ,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS;YACzE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC;YACvC,CAAC,CAAC,SAAS;KAClB,EACD,SAAS,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,39 @@
|
|
|
1
1
|
import { z } from 'zod/mini';
|
|
2
|
+
declare const publishAuthStrategySchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
3
|
+
type: z.ZodMiniLiteral<"bearer-token">;
|
|
4
|
+
token: z.ZodMiniString<string>;
|
|
5
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
6
|
+
type: z.ZodMiniLiteral<"basic">;
|
|
7
|
+
username: z.ZodMiniString<string>;
|
|
8
|
+
password: z.ZodMiniString<string>;
|
|
9
|
+
email: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
10
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
11
|
+
type: z.ZodMiniLiteral<"npm-oidc">;
|
|
12
|
+
provider: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
13
|
+
auto: "auto";
|
|
14
|
+
"github-actions": "github-actions";
|
|
15
|
+
env: "env";
|
|
16
|
+
}>>;
|
|
17
|
+
idTokenEnvVar: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
18
|
+
}, z.core.$strict>>], "type">;
|
|
19
|
+
declare const metadataAuthStrategySchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
20
|
+
type: z.ZodMiniLiteral<"bearer-token">;
|
|
21
|
+
token: z.ZodMiniString<string>;
|
|
22
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
23
|
+
type: z.ZodMiniLiteral<"basic">;
|
|
24
|
+
username: z.ZodMiniString<string>;
|
|
25
|
+
password: z.ZodMiniString<string>;
|
|
26
|
+
email: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
}, z.core.$strict>>], "type">;
|
|
28
|
+
declare const metadataAuthModeSchema: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"auto">, z.ZodMiniLiteral<"anonymous">, z.ZodMiniLiteral<"inherit-publish-auth">, z.ZodMiniDiscriminatedUnion<[z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
29
|
+
type: z.ZodMiniLiteral<"bearer-token">;
|
|
30
|
+
token: z.ZodMiniString<string>;
|
|
31
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
32
|
+
type: z.ZodMiniLiteral<"basic">;
|
|
33
|
+
username: z.ZodMiniString<string>;
|
|
34
|
+
password: z.ZodMiniString<string>;
|
|
35
|
+
email: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
}, z.core.$strict>>], "type">]>;
|
|
2
37
|
export declare const registrySettingsSchema: z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
3
38
|
registryUrl: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4
39
|
auth: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniReadonly<z.ZodMiniDiscriminatedUnion<[z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
@@ -46,6 +81,12 @@ export declare const registrySettingsSchema: z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
|
46
81
|
}, z.core.$strict>>], "type">]>>;
|
|
47
82
|
}, z.core.$strict>>]>>;
|
|
48
83
|
}, z.core.$strict>>;
|
|
84
|
+
export type PublishAuthStrategy = z.infer<typeof publishAuthStrategySchema>;
|
|
85
|
+
export type NpmOidcPublishAuth = Extract<PublishAuthStrategy, {
|
|
86
|
+
readonly type: 'npm-oidc';
|
|
87
|
+
}>;
|
|
88
|
+
export type MetadataAuthStrategy = z.infer<typeof metadataAuthStrategySchema>;
|
|
89
|
+
export type MetadataAuthMode = z.infer<typeof metadataAuthModeSchema>;
|
|
49
90
|
export type RegistrySettings = z.infer<typeof registrySettingsSchema>;
|
|
50
91
|
export {};
|
|
51
92
|
//# sourceMappingURL=registry-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-settings.d.ts","sourceRoot":"","sources":["../../../../source/config/registry-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"registry-settings.d.ts","sourceRoot":"","sources":["../../../../source/config/registry-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AA2B7B,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;6BAI7B,CAAC;AAEH,QAAA,MAAM,0BAA0B;;;;;;;;6BAA2E,CAAC;AAE5G,QAAA,MAAM,sBAAsB;;;;;;;;+BAK1B,CAAC;AAYH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKlC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAAE,CAAC,CAAC;AAC9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./base-validations.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
const bearerTokenAuthSchema = z.readonly(z.strictObject({
|
|
4
|
+
type: z.literal('bearer-token'),
|
|
5
|
+
token: nonEmptyStringSchema
|
|
6
|
+
}));
|
|
7
|
+
const basicAuthSchema = z.readonly(z.strictObject({
|
|
8
|
+
type: z.literal('basic'),
|
|
9
|
+
username: nonEmptyStringSchema,
|
|
10
|
+
password: nonEmptyStringSchema,
|
|
11
|
+
email: z.optional(nonEmptyStringSchema)
|
|
12
|
+
}));
|
|
13
|
+
const npmOidcAuthSchema = z.readonly(z.strictObject({
|
|
14
|
+
type: z.literal('npm-oidc'),
|
|
15
|
+
provider: z.optional(z.enum(['auto', 'github-actions', 'env'])),
|
|
16
|
+
idTokenEnvVar: z.optional(nonEmptyStringSchema)
|
|
17
|
+
}));
|
|
18
|
+
const publishAuthStrategySchema = z.discriminatedUnion('type', [
|
|
19
|
+
bearerTokenAuthSchema,
|
|
20
|
+
basicAuthSchema,
|
|
21
|
+
npmOidcAuthSchema
|
|
22
|
+
]);
|
|
23
|
+
const metadataAuthStrategySchema = z.discriminatedUnion('type', [bearerTokenAuthSchema, basicAuthSchema]);
|
|
24
|
+
const metadataAuthModeSchema = z.union([
|
|
25
|
+
z.literal('auto'),
|
|
26
|
+
z.literal('anonymous'),
|
|
27
|
+
z.literal('inherit-publish-auth'),
|
|
28
|
+
metadataAuthStrategySchema
|
|
29
|
+
]);
|
|
30
|
+
const authConfigSchema = z.union([
|
|
31
|
+
z.readonly(publishAuthStrategySchema),
|
|
32
|
+
z.readonly(z.strictObject({
|
|
33
|
+
publish: publishAuthStrategySchema,
|
|
34
|
+
metadata: z.optional(metadataAuthModeSchema)
|
|
35
|
+
}))
|
|
36
|
+
]);
|
|
37
|
+
export const registrySettingsSchema = z.readonly(z.strictObject({
|
|
38
|
+
registryUrl: z.optional(nonEmptyStringSchema),
|
|
39
|
+
auth: z.optional(authConfigSchema)
|
|
40
|
+
}));
|
|
3
41
|
//# sourceMappingURL=registry-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-settings.js","sourceRoot":"","sources":["../../../../source/config/registry-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"registry-settings.js","sourceRoot":"","sources":["../../../../source/config/registry-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,qBAAqB,GAAG,CAAC,CAAC,QAAQ,CACpC,CAAC,CAAC,YAAY,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cA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,CACN,CAAC,CAAC,YAAY,CAAC;QACX,OAAO,EAAE,yBAAyB;QAClC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KAC/C,CAAC,CACL;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,QAAQ,CAC5C,CAAC,CAAC,YAAY,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CACrC,CAAC,CACL,CAAC"}
|
|
@@ -1 +1,47 @@
|
|
|
1
|
+
const redactedValue = '[redacted]';
|
|
2
|
+
function redactPublishAuth(auth) {
|
|
3
|
+
if (auth.type === 'bearer-token') {
|
|
4
|
+
return { type: 'bearer-token', token: redactedValue };
|
|
5
|
+
}
|
|
6
|
+
if (auth.type === 'basic') {
|
|
7
|
+
return {
|
|
8
|
+
type: 'basic',
|
|
9
|
+
username: auth.username,
|
|
10
|
+
password: redactedValue,
|
|
11
|
+
...auth.email === undefined ? {} : { email: auth.email }
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
type: 'npm-oidc',
|
|
16
|
+
...auth.provider === undefined ? {} : { provider: auth.provider },
|
|
17
|
+
...auth.idTokenEnvVar === undefined ? {} : { idTokenEnvVar: auth.idTokenEnvVar }
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function isMetadataAuthStrategy(metadata) {
|
|
21
|
+
return typeof metadata !== 'string';
|
|
22
|
+
}
|
|
23
|
+
function isExpandedRegistryAuth(auth) {
|
|
24
|
+
return Object.hasOwn(auth, 'publish');
|
|
25
|
+
}
|
|
26
|
+
function redactMetadata(metadata) {
|
|
27
|
+
if (isMetadataAuthStrategy(metadata)) {
|
|
28
|
+
return { strategy: redactPublishAuth(metadata) };
|
|
29
|
+
}
|
|
30
|
+
return { mode: metadata };
|
|
31
|
+
}
|
|
32
|
+
function redactAuth(auth) {
|
|
33
|
+
if (isExpandedRegistryAuth(auth)) {
|
|
34
|
+
return {
|
|
35
|
+
publish: redactPublishAuth(auth.publish),
|
|
36
|
+
...auth.metadata === undefined ? {} : { metadata: redactMetadata(auth.metadata) }
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return redactPublishAuth(auth);
|
|
40
|
+
}
|
|
41
|
+
export function redactRegistrySettings(settings) {
|
|
42
|
+
return {
|
|
43
|
+
...settings.registryUrl === undefined ? {} : { registryUrl: settings.registryUrl },
|
|
44
|
+
...settings.auth === undefined ? {} : { auth: redactAuth(settings.auth) }
|
|
45
|
+
};
|
|
46
|
+
}
|
|
1
47
|
//# sourceMappingURL=registry-settings.report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-settings.report.js","sourceRoot":"","sources":["../../../../source/config/registry-settings.report.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"registry-settings.report.js","sourceRoot":"","sources":["../../../../source/config/registry-settings.report.ts"],"names":[],"mappings":"AAOA,MAAM,aAAa,GAAG,YAAY,CAAC;AAYnC,SAAS,iBAAiB,CAAC,IAAyB;IAChD,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO;YACH,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,aAAa;YACvB,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SAC3D,CAAC;IACN,CAAC;IACD,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI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AAC,WAAW,EAAE;QAClF,GAAG,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;KAC5E,CAAC;AACN,CAAC"}
|
|
@@ -1 +1,142 @@
|
|
|
1
|
+
function unknownRootIssue(packageConfig, referenceName, rootId) {
|
|
2
|
+
if (packageConfig.roots[rootId] === undefined) {
|
|
3
|
+
return `Package "${packageConfig.name}" ${referenceName} references unknown root "${rootId}"`;
|
|
4
|
+
}
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
function duplicateEntryIssue(packageConfig, seenValues, value, label) {
|
|
8
|
+
if (seenValues.has(value)) {
|
|
9
|
+
return `Package "${packageConfig.name}" declares duplicate ${label} "${value}"`;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
function definedIssues(...issues) {
|
|
14
|
+
return issues.filter(function (issue) {
|
|
15
|
+
return issue !== undefined;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function validateExplicitRootEntries(packageConfig, validation) {
|
|
19
|
+
const issues = [];
|
|
20
|
+
const seenValues = new Set();
|
|
21
|
+
const rootIds = new Set();
|
|
22
|
+
for (const entry of validation.entries) {
|
|
23
|
+
const entryName = validation.entryNameFor(entry);
|
|
24
|
+
issues.push(...definedIssues(unknownRootIssue(packageConfig, `${validation.referenceLabel} "${entryName}"`, entry.root), duplicateEntryIssue(packageConfig, seenValues, entryName, validation.duplicateLabel)));
|
|
25
|
+
seenValues.add(entryName);
|
|
26
|
+
rootIds.add(entry.root);
|
|
27
|
+
}
|
|
28
|
+
return { issues, rootIds };
|
|
29
|
+
}
|
|
30
|
+
function validateExplicitPublicEntries(packageConfig) {
|
|
31
|
+
const modules = validateExplicitRootEntries(packageConfig, {
|
|
32
|
+
duplicateLabel: 'export key',
|
|
33
|
+
entries: packageConfig.packageInterface.modules ?? [],
|
|
34
|
+
entryNameFor(entry) {
|
|
35
|
+
return entry.export;
|
|
36
|
+
},
|
|
37
|
+
referenceLabel: 'module export'
|
|
38
|
+
});
|
|
39
|
+
const bins = validateExplicitRootEntries(packageConfig, {
|
|
40
|
+
duplicateLabel: 'bin name',
|
|
41
|
+
entries: packageConfig.packageInterface.bins ?? [],
|
|
42
|
+
entryNameFor(entry) {
|
|
43
|
+
return entry.name;
|
|
44
|
+
},
|
|
45
|
+
referenceLabel: 'bin'
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
issues: [...modules.issues, ...bins.issues],
|
|
49
|
+
rootIds: new Set([...modules.rootIds, ...bins.rootIds])
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function validateExplicitPrivateRoots(packageConfig, publicRootIds) {
|
|
53
|
+
const issues = [];
|
|
54
|
+
const seenRootIds = new Set();
|
|
55
|
+
const rootIds = new Set();
|
|
56
|
+
const privateRoots = packageConfig.packageInterface.privateRoots ?? [];
|
|
57
|
+
for (const rootId of privateRoots) {
|
|
58
|
+
issues.push(...definedIssues(unknownRootIssue(packageConfig, `private root "${rootId}"`, rootId), duplicateEntryIssue(packageConfig, seenRootIds, rootId, 'private root'), publicRootIds.has(rootId)
|
|
59
|
+
? `Package "${packageConfig.name}" root "${rootId}" cannot be both public and private`
|
|
60
|
+
: undefined));
|
|
61
|
+
seenRootIds.add(rootId);
|
|
62
|
+
rootIds.add(rootId);
|
|
63
|
+
}
|
|
64
|
+
return { issues, rootIds };
|
|
65
|
+
}
|
|
66
|
+
function collectExplicitUnusedRootIssues(packageConfig, usedRootIds) {
|
|
67
|
+
const issues = [];
|
|
68
|
+
for (const rootId of Object.keys(packageConfig.roots)) {
|
|
69
|
+
if (!usedRootIds.has(rootId)) {
|
|
70
|
+
issues.push(`Package "${packageConfig.name}" defines unused root "${rootId}" in explicit mode`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return issues;
|
|
74
|
+
}
|
|
75
|
+
function validateExplicitRootConfiguration(packageConfig) {
|
|
76
|
+
const publicEntries = validateExplicitPublicEntries(packageConfig);
|
|
77
|
+
const privateRoots = validateExplicitPrivateRoots(packageConfig, publicEntries.rootIds);
|
|
78
|
+
const usedRootIds = new Set([...publicEntries.rootIds, ...privateRoots.rootIds]);
|
|
79
|
+
return [
|
|
80
|
+
...publicEntries.issues,
|
|
81
|
+
...privateRoots.issues,
|
|
82
|
+
...collectExplicitUnusedRootIssues(packageConfig, usedRootIds)
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
function validateDuplicateRootJavaScriptTargets(packageConfig) {
|
|
86
|
+
const issues = [];
|
|
87
|
+
const jsPaths = new Map();
|
|
88
|
+
for (const [rootId, root] of Object.entries(packageConfig.roots)) {
|
|
89
|
+
const previous = jsPaths.get(root.js);
|
|
90
|
+
if (previous === undefined) {
|
|
91
|
+
jsPaths.set(root.js, rootId);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
issues.push(`Package "${packageConfig.name}" maps both root "${previous}" and "${rootId}" to "${root.js}"`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return issues;
|
|
98
|
+
}
|
|
99
|
+
function validateImplicitRootConfiguration(packageConfig) {
|
|
100
|
+
const { defaultModuleRoot } = packageConfig;
|
|
101
|
+
const issues = [];
|
|
102
|
+
if (defaultModuleRoot === undefined && Object.keys(packageConfig.roots).length > 1) {
|
|
103
|
+
issues.push(`Package "${packageConfig.name}" must define defaultModuleRoot when multiple roots exist`);
|
|
104
|
+
}
|
|
105
|
+
if (defaultModuleRoot !== undefined && packageConfig.roots[defaultModuleRoot] === undefined) {
|
|
106
|
+
issues.push(`Package "${packageConfig.name}" references unknown defaultModuleRoot "${defaultModuleRoot}"`);
|
|
107
|
+
}
|
|
108
|
+
return issues;
|
|
109
|
+
}
|
|
110
|
+
function hasInvalidExplicitDefaultModuleRoot(packageConfig) {
|
|
111
|
+
const packageRecord = packageConfig;
|
|
112
|
+
const { defaultModuleRoot } = packageRecord;
|
|
113
|
+
return typeof defaultModuleRoot === 'string';
|
|
114
|
+
}
|
|
115
|
+
function validateExplicitModeConfiguration(packageConfig) {
|
|
116
|
+
const issues = validateExplicitRootConfiguration(packageConfig);
|
|
117
|
+
if (hasInvalidExplicitDefaultModuleRoot(packageConfig)) {
|
|
118
|
+
const message = [
|
|
119
|
+
`Package "${packageConfig.name}" cannot combine defaultModuleRoot with packageInterface;`,
|
|
120
|
+
'remove defaultModuleRoot in explicit mode'
|
|
121
|
+
]
|
|
122
|
+
.join(' ');
|
|
123
|
+
return [message, ...issues];
|
|
124
|
+
}
|
|
125
|
+
return issues;
|
|
126
|
+
}
|
|
127
|
+
function validateRootConfiguration(packageConfig) {
|
|
128
|
+
const duplicateRootIssues = validateDuplicateRootJavaScriptTargets(packageConfig);
|
|
129
|
+
if (packageConfig.packageInterface === undefined) {
|
|
130
|
+
return [...duplicateRootIssues, ...validateImplicitRootConfiguration(packageConfig)];
|
|
131
|
+
}
|
|
132
|
+
return [...duplicateRootIssues, ...validateExplicitModeConfiguration(packageConfig)];
|
|
133
|
+
}
|
|
134
|
+
export function validatePackageSurfaceRules(packageConfigs) {
|
|
135
|
+
const issues = [];
|
|
136
|
+
const packageList = Object.values(packageConfigs);
|
|
137
|
+
for (const packageConfig of packageList) {
|
|
138
|
+
issues.push(...validateRootConfiguration(packageConfig));
|
|
139
|
+
}
|
|
140
|
+
return issues;
|
|
141
|
+
}
|
|
1
142
|
//# sourceMappingURL=root-config-validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-config-validation.js","sourceRoot":"","sources":["../../../../source/config/root-config-validation.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"root-config-validation.js","sourceRoot":"","sources":["../../../../source/config/root-config-validation.ts"],"names":[],"mappings":"AAoBA,SAAS,gBAAgB,CAAC,aAA4B,EAAE,aAAqB,EAAE,MAAc;IACzF,IAAI,aAAa,CAAC,KAAK,CA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|
|
2
|
-
import "./base-validations.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
export const rootSchema = z.readonly(z.strictObject({
|
|
4
|
+
js: nonEmptyStringSchema,
|
|
5
|
+
declarationFile: z.optional(nonEmptyStringSchema)
|
|
6
|
+
}));
|
|
3
7
|
//# sourceMappingURL=root.js.map
|
package/config/root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../../source/config/root.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../../source/config/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,QAAQ,CAChC,CAAC,CAAC,YAAY,CAAC;IACX,EAAE,EAAE,oBAAoB;IACxB,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CACpD,CAAC,CACL,CAAC"}
|
package/config/sbom-settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sbom-settings.js","sourceRoot":"","sources":["../../../../source/config/sbom-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sbom-settings.js","sourceRoot":"","sources":["../../../../source/config/sbom-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,QAAQ,CACxC,CAAC,CAAC,YAAY,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CACnC,CAAC,CACL,CAAC"}
|
|
@@ -1 +1,29 @@
|
|
|
1
|
+
export function validatePublishSettingsArePlaced(packtoryConfig) {
|
|
2
|
+
if (packtoryConfig.commonPackageSettings?.publishSettings !== undefined) {
|
|
3
|
+
return [];
|
|
4
|
+
}
|
|
5
|
+
const everyPackageHasIt = packtoryConfig.packages.every(function (packageConfig) {
|
|
6
|
+
return packageConfig.publishSettings !== undefined;
|
|
7
|
+
});
|
|
8
|
+
if (everyPackageHasIt) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return ['publishSettings must be set in commonPackageSettings or in every package'];
|
|
12
|
+
}
|
|
13
|
+
export function validateAllowScriptsConsistency(packtoryConfig) {
|
|
14
|
+
const commonAttributes = packtoryConfig.commonPackageSettings?.additionalPackageJsonAttributes;
|
|
15
|
+
const commonPublishSettings = packtoryConfig.commonPackageSettings?.publishSettings;
|
|
16
|
+
return packtoryConfig.packages.flatMap(function (packageConfig) {
|
|
17
|
+
const mergedAttributes = { ...commonAttributes, ...packageConfig.additionalPackageJsonAttributes };
|
|
18
|
+
const resolvedPublishSettings = packageConfig.publishSettings ?? commonPublishSettings;
|
|
19
|
+
if (!Object.hasOwn(mergedAttributes, 'scripts')) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
if (resolvedPublishSettings?.allowScripts === true) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
const prefix = `Package "${packageConfig.name}": "scripts" in additionalPackageJsonAttributes`;
|
|
26
|
+
return [`${prefix} requires "publishSettings.allowScripts: true"`];
|
|
27
|
+
});
|
|
28
|
+
}
|
|
1
29
|
//# sourceMappingURL=settings-validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-validation.js","sourceRoot":"","sources":["../../../../source/config/settings-validation.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"settings-validation.js","sourceRoot":"","sources":["../../../../source/config/settings-validation.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gCAAgC,CAC5C,cAAuD;IAEv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
|
-
import { type ManualVersioningSettings } from './manual-versioning-settings.ts';
|
|
3
|
+
import { type ManualVersioningSettings, type SourceManualVersioningSettings } from './manual-versioning-settings.ts';
|
|
4
|
+
export declare const versioningSettingsSchema: z.ZodMiniReadonly<z.ZodMiniUnion<readonly [z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
5
|
+
automatic: z.ZodMiniLiteral<true>;
|
|
6
|
+
minimumVersion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
7
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniUnion<readonly [z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
8
|
+
automatic: z.ZodMiniLiteral<false>;
|
|
9
|
+
version: z.ZodMiniString<string>;
|
|
10
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
11
|
+
automatic: z.ZodMiniLiteral<false>;
|
|
12
|
+
provideVersion: z.ZodMiniCustom<import("./manual-versioning-settings.ts").VersionProvider, import("./manual-versioning-settings.ts").VersionProvider>;
|
|
13
|
+
}, z.core.$strict>>, z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
14
|
+
automatic: z.ZodMiniLiteral<false>;
|
|
15
|
+
source: z.ZodMiniLiteral<"pull-request-labels">;
|
|
16
|
+
}, z.core.$strict>>]>>]>>;
|
|
4
17
|
type AutomaticVersioningSettings = z.infer<typeof automaticVersioningSettingsSchema>;
|
|
5
18
|
export type VersioningSettings = AutomaticVersioningSettings | ManualVersioningSettings;
|
|
19
|
+
export declare function hasVersionProvider(versioning: VersioningSettings): versioning is Extract<VersioningSettings, {
|
|
20
|
+
readonly provideVersion: unknown;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function hasVersionSource(versioning: VersioningSettings): versioning is SourceManualVersioningSettings;
|
|
6
23
|
export {};
|
|
7
24
|
//# sourceMappingURL=versioning-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versioning-settings.d.ts","sourceRoot":"","sources":["../../../../source/config/versioning-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAEH,KAAK,
|
|
1
|
+
{"version":3,"file":"versioning-settings.d.ts","sourceRoot":"","sources":["../../../../source/config/versioning-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACtC,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;yBAEpC,CAAC;AAEF,KAAK,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,GAAG,wBAAwB,CAAC;AAExF,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,kBAAkB,GAC/B,UAAU,IAAI,OAAO,CAAC,kBAAkB,EAAE;IAAE,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAAE,CAAC,CAElF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,IAAI,8BAA8B,CAE7G"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./automatic-versioning-settings.js";
|
|
3
|
-
import "./manual-versioning-settings.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { automaticVersioningSettingsSchema } from "./automatic-versioning-settings.js";
|
|
3
|
+
import { manualVersioningSettingsSchema } from "./manual-versioning-settings.js";
|
|
4
|
+
export const versioningSettingsSchema = z.readonly(z.union([automaticVersioningSettingsSchema, manualVersioningSettingsSchema]));
|
|
5
|
+
export function hasVersionProvider(versioning) {
|
|
6
|
+
return Object.hasOwn(versioning, 'provideVersion');
|
|
7
|
+
}
|
|
8
|
+
export function hasVersionSource(versioning) {
|
|
9
|
+
return Object.hasOwn(versioning, 'source');
|
|
10
|
+
}
|
|
4
11
|
//# sourceMappingURL=versioning-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versioning-settings.js","sourceRoot":"","sources":["../../../../source/config/versioning-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"versioning-settings.js","sourceRoot":"","sources":["../../../../source/config/versioning-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EACH,8BAA8B,EAGjC,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,QAAQ,CAC9C,CAAC,CAAC,KAAK,CAAC,CAAE,iCAAiC,EAAE,8BAA8B,CAAE,CAAC,CACjF,CAAC;AAMF,MAAM,UAAU,kBAAkB,CAC9B,UAA8B;IAE9B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,UAA8B;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Except } from 'type-fest';
|
|
2
|
+
import type { DeadCodeEliminationSettings } from '../config/dead-code-elimination-settings.ts';
|
|
2
3
|
import type { LinkedBundle, LinkedBundleResource } from '../linker/linked-bundle.ts';
|
|
3
4
|
export type SideEffectStatement = {
|
|
4
5
|
readonly line: number;
|
|
@@ -16,4 +17,14 @@ export type AnalyzedBundle = Except<LinkedBundle, 'contents'> & {
|
|
|
16
17
|
readonly contents: readonly AnalyzedBundleResource[];
|
|
17
18
|
readonly sideEffectsField: readonly string[] | false | undefined;
|
|
18
19
|
};
|
|
20
|
+
export type EliminationInput = {
|
|
21
|
+
readonly bundle: LinkedBundle;
|
|
22
|
+
readonly transformationsEnabled: boolean;
|
|
23
|
+
readonly substitutionPublicModuleInputFilePaths: ReadonlySet<string>;
|
|
24
|
+
readonly deadCodeElimination?: DeadCodeEliminationSettings | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type DeadCodeEliminator = {
|
|
27
|
+
eliminate: (inputs: readonly EliminationInput[]) => Promise<readonly AnalyzedBundle[]>;
|
|
28
|
+
};
|
|
29
|
+
export declare function createEmptyFileAnalysis(): FileAnalysis;
|
|
19
30
|
//# sourceMappingURL=analyzed-bundle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzed-bundle.d.ts","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/analyzed-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"analyzed-bundle.d.ts","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/analyzed-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAErF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACvB,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,oBAAoB,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC9D,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IACxD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG;IAC5D,QAAQ,CAAC,QAAQ,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACrD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,GAAG,SAAS,CAAC;CACpE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,sCAAsC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;CAC1E,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,KAAK,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;CAC1F,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,YAAY,CAMtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzed-bundle.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/analyzed-bundle.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"analyzed-bundle.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/analyzed-bundle.ts"],"names":[],"mappings":"AAmCA,MAAM,UAAU,uBAAuB;IACnC,OAAO;QACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;QACpC,oBAAoB,EAAE,EAAE;QACxB,iBAAiB,EAAE,IAAI,GAAG,EAAU;KACvC,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,39 @@
|
|
|
1
|
-
import "./code-file-analyzer.js";
|
|
2
|
-
import "./dependency-metadata.js";
|
|
3
|
-
import "./liveness/resource-retention.js";
|
|
4
|
-
import "./source-map-recomposition.js";
|
|
5
|
-
import "./side-effects-field.js";
|
|
1
|
+
import { buildAnalyzedResource } from "./code-file-analyzer.js";
|
|
2
|
+
import { indexSourceFiles, recomputeDependencyMetadata } from "./dependency-metadata.js";
|
|
3
|
+
import { pruneContents } from "./liveness/resource-retention.js";
|
|
4
|
+
import { buildMapPathTransformIndex, recomposePairedSourceMaps } from "./source-map-recomposition.js";
|
|
5
|
+
import { computeSideEffectsField } from "./side-effects-field.js";
|
|
6
|
+
export function crossBundleInputFrom(loaded) {
|
|
7
|
+
return {
|
|
8
|
+
bundle: loaded.input.bundle,
|
|
9
|
+
fileBindings: loaded.fileBindings,
|
|
10
|
+
localReachable: loaded.reachability.localReachable
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function analyzeBundleWithSeeds(loaded, externalSeeds, trace) {
|
|
14
|
+
const context = {
|
|
15
|
+
bundleName: loaded.input.bundle.name,
|
|
16
|
+
reachable: loaded.reachability.expandWith(externalSeeds),
|
|
17
|
+
transformationsEnabled: loaded.input.transformationsEnabled,
|
|
18
|
+
deadCodeElimination: loaded.input.deadCodeElimination,
|
|
19
|
+
trace
|
|
20
|
+
};
|
|
21
|
+
const outputs = loaded.loaded.map(function (entry) {
|
|
22
|
+
return buildAnalyzedResource(entry, context);
|
|
23
|
+
});
|
|
24
|
+
const transformsByMapPath = buildMapPathTransformIndex(outputs, loaded.input.bundle.sourceMapTransformsByTargetPath);
|
|
25
|
+
const contents = outputs.map(function (output) {
|
|
26
|
+
return output.resource;
|
|
27
|
+
});
|
|
28
|
+
const finalContents = recomposePairedSourceMaps(contents, transformsByMapPath);
|
|
29
|
+
const sourceFileIndex = indexSourceFiles(loaded);
|
|
30
|
+
const prePruneMetadata = recomputeDependencyMetadata(loaded.input.bundle, finalContents, sourceFileIndex);
|
|
31
|
+
const prunedContents = pruneContents(loaded.input.bundle, prePruneMetadata.contents, loaded.input.transformationsEnabled, trace);
|
|
32
|
+
const dependencyMetadata = recomputeDependencyMetadata(loaded.input.bundle, prunedContents, sourceFileIndex);
|
|
33
|
+
return {
|
|
34
|
+
...loaded.input.bundle,
|
|
35
|
+
...dependencyMetadata,
|
|
36
|
+
sideEffectsField: computeSideEffectsField(dependencyMetadata.contents)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
6
39
|
//# sourceMappingURL=bundle-analysis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-analysis.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/bundle-analysis.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"bundle-analysis.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/bundle-analysis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEzF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,MAAM,UAAU,oBAAoB,CAAC,MAAoB;IACrD,OAAO;QACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;QAC3B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,cAAc;KACrD,CAAC;AACN,CAAC;AAED,MAAM,UAAU,sBAAsB,CAClC,MAAoB,EACpB,aAA8C,EAC9C,KAA+B;IAE/B,MAAM,OAAO,GAAoB;QAC7B,UAAU,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kB,CAAC,QAAQ,CAAC;KACzE,CAAC;AACN,CAAC"}
|
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
import 'ts-morph';
|
|
2
|
-
import "./pure-expression.js";
|
|
1
|
+
import { Node as TsMorphNode } from 'ts-morph';
|
|
2
|
+
import { isPureExpression } from "./pure-expression.js";
|
|
3
|
+
function memberHasDecorators(member) {
|
|
4
|
+
if (TsMorphNode.isMethodDeclaration(member) ||
|
|
5
|
+
TsMorphNode.isPropertyDeclaration(member) ||
|
|
6
|
+
TsMorphNode.isGetAccessorDeclaration(member) ||
|
|
7
|
+
TsMorphNode.isSetAccessorDeclaration(member)) {
|
|
8
|
+
return member.getDecorators().length > 0;
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
function memberHasImpureStaticInit(member, settings) {
|
|
13
|
+
if (!TsMorphNode.isPropertyDeclaration(member) || !member.isStatic()) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const initializer = member.getInitializer();
|
|
17
|
+
return initializer !== undefined && !isPureExpression(initializer, settings);
|
|
18
|
+
}
|
|
19
|
+
function memberHasImpureComputedName(member, settings) {
|
|
20
|
+
if (!TsMorphNode.isMethodDeclaration(member) &&
|
|
21
|
+
!TsMorphNode.isPropertyDeclaration(member) &&
|
|
22
|
+
!TsMorphNode.isGetAccessorDeclaration(member) &&
|
|
23
|
+
!TsMorphNode.isSetAccessorDeclaration(member)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const name = member.getNameNode();
|
|
27
|
+
return TsMorphNode.isComputedPropertyName(name) && !isPureExpression(name.getExpression(), settings);
|
|
28
|
+
}
|
|
29
|
+
function classMemberIsImpure(member, settings) {
|
|
30
|
+
if (TsMorphNode.isClassStaticBlockDeclaration(member)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return memberHasDecorators(member) ||
|
|
34
|
+
memberHasImpureComputedName(member, settings) ||
|
|
35
|
+
memberHasImpureStaticInit(member, settings);
|
|
36
|
+
}
|
|
37
|
+
export function hasClassImpurity(classDeclaration, settings) {
|
|
38
|
+
if (classDeclaration.getDecorators().length > 0) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
const extendsExpression = classDeclaration.getExtends()?.getExpression();
|
|
42
|
+
if (extendsExpression !== undefined && !isPureExpression(extendsExpression, settings)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
return classDeclaration.getMembers().some(function (member) {
|
|
46
|
+
return classMemberIsImpure(member, settings);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
3
49
|
//# sourceMappingURL=class-purity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-purity.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/class-purity.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"class-purity.js","sourceRoot":"","sources":["../../../../source/dead-code-eliminator/class-purity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,SAAS,mBAAmB,CAAC,MAAmB;IAC5C,IACI,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC;QACvC,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC;QACzC,WAAW,CAAC,wBAAwB,CAAC,MAAM,CAAC;QAC5C,WAAW,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAC9C,CAAC;QACC,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAmB,EAAE,QAAiD;IACrG,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACn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