packtory 0.0.91 → 0.0.92
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 +4 -37
- package/artifacts/artifacts-builder.js.map +1 -1
- package/artifacts/content-collection.js +2 -59
- package/artifacts/content-collection.js.map +1 -1
- package/artifacts/folder-writer.js +2 -25
- package/artifacts/folder-writer.js.map +1 -1
- package/bundle-emitter/emitter.d.ts +0 -8
- package/bundle-emitter/emitter.d.ts.map +1 -1
- package/bundle-emitter/emitter.js +6 -106
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/extract-package-tarball.js +2 -13
- package/bundle-emitter/extract-package-tarball.js.map +1 -1
- package/bundle-emitter/fetch-published-artifacts.js +2 -16
- package/bundle-emitter/fetch-published-artifacts.js.map +1 -1
- package/bundle-emitter/publication-outcome.d.ts +0 -3
- package/bundle-emitter/publication-outcome.d.ts.map +1 -1
- package/bundle-emitter/publication-outcome.js +0 -5
- package/bundle-emitter/publication-outcome.js.map +1 -1
- package/bundle-emitter/publish-error/auto-mode-error-matching.js +2 -28
- package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/error-shape-helpers.js +0 -9
- package/bundle-emitter/publish-error/error-shape-helpers.js.map +1 -1
- package/bundle-emitter/publish-error/file-mode-error-matching.js +2 -33
- package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/publish-error-messages.js +0 -24
- package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
- package/bundle-emitter/registry/metadata-auth-retry.js +1 -24
- package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
- package/bundle-emitter/registry/oidc-token-exchange.js +3 -68
- package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.d.ts +0 -13
- package/bundle-emitter/registry/package-metadata-fetcher.d.ts.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.js +7 -186
- package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
- package/bundle-emitter/registry/publish-settings-bridge.js +3 -34
- package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
- package/bundle-emitter/registry/registry-auth-config.js +0 -106
- package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
- package/bundle-emitter/registry/registry-client.d.ts +1 -13
- package/bundle-emitter/registry/registry-client.d.ts.map +1 -1
- package/bundle-emitter/registry/registry-client.js +4 -71
- package/bundle-emitter/registry/registry-client.js.map +1 -1
- package/bundle-emitter/registry/registry-package-path.js +0 -3
- package/bundle-emitter/registry/registry-package-path.js.map +1 -1
- package/bundle-emitter/registry/registry-response-schemas.js +2 -50
- package/bundle-emitter/registry/registry-response-schemas.js.map +1 -1
- package/bundle-emitter/registry/tarball-integrity.d.ts +0 -1
- package/bundle-emitter/registry/tarball-integrity.d.ts.map +1 -1
- package/bundle-emitter/registry/tarball-integrity.js +1 -31
- package/bundle-emitter/registry/tarball-integrity.js.map +1 -1
- package/bundle-emitter/registry/validate-tarball-host.js +1 -26
- package/bundle-emitter/registry/validate-tarball-host.js.map +1 -1
- package/bundle-emitter/release-artifact-canonicalizer.js +5 -31
- package/bundle-emitter/release-artifact-canonicalizer.js.map +1 -1
- package/checks/check-runner.js +0 -8
- package/checks/check-runner.js.map +1 -1
- package/checks/rule.js +2 -12
- package/checks/rule.js.map +1 -1
- package/checks/rules/duplicate-detection.js +1 -23
- package/checks/rules/duplicate-detection.js.map +1 -1
- package/checks/rules/duplicate-messages.js +0 -22
- package/checks/rules/duplicate-messages.js.map +1 -1
- package/checks/rules/file-ownership.js +0 -15
- package/checks/rules/file-ownership.js.map +1 -1
- package/checks/rules/max-bundle-size.js +1 -55
- package/checks/rules/max-bundle-size.js.map +1 -1
- package/checks/rules/no-dev-dependency-imports.js +1 -51
- package/checks/rules/no-dev-dependency-imports.js.map +1 -1
- package/checks/rules/no-duplicated-files.js +3 -53
- package/checks/rules/no-duplicated-files.js.map +1 -1
- package/checks/rules/no-side-effects.js +1 -50
- package/checks/rules/no-side-effects.js.map +1 -1
- package/checks/rules/no-unexposed-executables.js +2 -43
- package/checks/rules/no-unexposed-executables.js.map +1 -1
- package/checks/rules/no-unused-bundle-dependencies.js +2 -30
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
- package/checks/rules/registry.js +9 -22
- package/checks/rules/registry.js.map +1 -1
- package/checks/rules/required-files.js +3 -41
- package/checks/rules/required-files.js.map +1 -1
- package/checks/rules/type-script-declaration-integrity.js +3 -81
- package/checks/rules/type-script-declaration-integrity.js.map +1 -1
- package/checks/rules/type-script-declaration-paths.js +1 -55
- package/checks/rules/type-script-declaration-paths.js.map +1 -1
- package/checks/rules/type-script-declaration-project.js +3 -202
- package/checks/rules/type-script-declaration-project.js.map +1 -1
- package/checks/rules/type-script-declaration-reachability.js +2 -38
- package/checks/rules/type-script-declaration-reachability.js.map +1 -1
- package/checks/rules/type-script-declaration-roots.js +0 -29
- package/checks/rules/type-script-declaration-roots.js.map +1 -1
- package/checks/rules/type-script-integrity.js +2 -72
- package/checks/rules/type-script-integrity.js.map +1 -1
- package/checks/rules/type-script-package-resolution.js +1 -42
- package/checks/rules/type-script-package-resolution.js.map +1 -1
- package/checks/rules/type-script-resolution-summary.js +0 -53
- package/checks/rules/type-script-resolution-summary.js.map +1 -1
- package/checks/rules/unique-target-paths.js +2 -34
- package/checks/rules/unique-target-paths.js.map +1 -1
- package/common/bundled-dependency-groups.js +0 -27
- package/common/bundled-dependency-groups.js.map +1 -1
- package/common/code-files.js +0 -28
- package/common/code-files.js.map +1 -1
- package/common/declaration-companion-paths.js +0 -24
- package/common/declaration-companion-paths.js.map +1 -1
- package/common/package-name-map.js +0 -7
- package/common/package-name-map.js.map +1 -1
- package/common/stable-json.js +2 -42
- package/common/stable-json.js.map +1 -1
- package/common/worklist.js +0 -22
- package/common/worklist.js.map +1 -1
- package/config/additional-files.js +2 -6
- package/config/additional-files.js.map +1 -1
- package/config/additional-package-json-attributes-schema.js +2 -6
- package/config/additional-package-json-attributes-schema.js.map +1 -1
- package/config/automatic-versioning-settings.js +2 -6
- package/config/automatic-versioning-settings.js.map +1 -1
- package/config/changelog-settings.d.ts +0 -44
- package/config/changelog-settings.d.ts.map +1 -1
- package/config/changelog-settings.js +3 -120
- package/config/changelog-settings.js.map +1 -1
- package/config/common-package-settings-schemas.js +3 -19
- package/config/common-package-settings-schemas.js.map +1 -1
- package/config/config.d.ts +1 -6
- package/config/config.d.ts.map +1 -1
- package/config/config.js +1 -3
- package/config/config.js.map +1 -1
- package/config/cross-package-validation.js +0 -17
- package/config/cross-package-validation.js.map +1 -1
- package/config/dead-code-elimination-settings.d.ts +0 -1
- package/config/dead-code-elimination-settings.d.ts.map +1 -1
- package/config/dead-code-elimination-settings.js +2 -36
- package/config/dead-code-elimination-settings.js.map +1 -1
- package/config/dependency-existence-validation.js +1 -19
- package/config/dependency-existence-validation.js.map +1 -1
- package/config/dependency-policy.js +2 -5
- package/config/dependency-policy.js.map +1 -1
- package/config/main-package-json-schema.js +2 -13
- package/config/main-package-json-schema.js.map +1 -1
- package/config/manual-versioning-settings.d.ts +0 -12
- package/config/manual-versioning-settings.d.ts.map +1 -1
- package/config/manual-versioning-settings.js +2 -29
- package/config/manual-versioning-settings.js.map +1 -1
- package/config/optional-package-settings-schema.js +7 -16
- package/config/optional-package-settings-schema.js.map +1 -1
- package/config/package-config.d.ts +0 -4
- package/config/package-config.d.ts.map +1 -1
- package/config/package-config.js +1 -2
- package/config/package-config.js.map +1 -1
- package/config/package-graph-builder.js +2 -14
- package/config/package-graph-builder.js.map +1 -1
- package/config/package-interface.js +2 -25
- package/config/package-interface.js.map +1 -1
- package/config/package-json.d.ts +0 -2
- package/config/package-json.d.ts.map +1 -1
- package/config/package-json.js +0 -16
- package/config/package-json.js.map +1 -1
- package/config/packtory-config-without-registry-schema.js +0 -6
- package/config/packtory-config-without-registry-schema.js.map +1 -1
- package/config/per-package-settings-schema.js +6 -22
- package/config/per-package-settings-schema.js.map +1 -1
- package/config/pre-graph-validation.js +5 -20
- package/config/pre-graph-validation.js.map +1 -1
- package/config/publish-settings.d.ts +0 -3
- package/config/publish-settings.d.ts.map +1 -1
- package/config/publish-settings.js +3 -25
- package/config/publish-settings.js.map +1 -1
- package/config/publish-settings.report.js +1 -17
- package/config/publish-settings.report.js.map +1 -1
- package/config/registry-settings.d.ts +0 -41
- package/config/registry-settings.d.ts.map +1 -1
- package/config/registry-settings.js +2 -40
- package/config/registry-settings.js.map +1 -1
- package/config/registry-settings.report.js +0 -46
- package/config/registry-settings.report.js.map +1 -1
- package/config/root-config-validation.js +0 -141
- package/config/root-config-validation.js.map +1 -1
- package/config/root.js +2 -6
- package/config/root.js.map +1 -1
- package/config/sbom-settings.js +1 -4
- package/config/sbom-settings.js.map +1 -1
- package/config/settings-validation.js +0 -28
- package/config/settings-validation.js.map +1 -1
- package/config/versioning-settings.d.ts +1 -18
- package/config/versioning-settings.d.ts.map +1 -1
- package/config/versioning-settings.js +3 -10
- package/config/versioning-settings.js.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.d.ts +0 -11
- package/dead-code-eliminator/analyzed-bundle.d.ts.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.js +0 -7
- package/dead-code-eliminator/analyzed-bundle.js.map +1 -1
- package/dead-code-eliminator/class-purity.js +2 -48
- package/dead-code-eliminator/class-purity.js.map +1 -1
- package/dead-code-eliminator/code-file-analyzer.js +4 -62
- package/dead-code-eliminator/code-file-analyzer.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/bundle-index.js +1 -27
- package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js +3 -18
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/import-export-walker.js +4 -75
- package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/seed-store.js +1 -22
- package/dead-code-eliminator/cross-bundle/seed-store.js.map +1 -1
- package/dead-code-eliminator/dependency-metadata.js +3 -205
- package/dead-code-eliminator/dependency-metadata.js.map +1 -1
- package/dead-code-eliminator/elimination-emitter.js +0 -52
- package/dead-code-eliminator/elimination-emitter.js.map +1 -1
- package/dead-code-eliminator/eliminator.js +8 -64
- package/dead-code-eliminator/eliminator.js.map +1 -1
- package/dead-code-eliminator/expression-unwrapping.js +1 -16
- package/dead-code-eliminator/expression-unwrapping.js.map +1 -1
- package/dead-code-eliminator/imported-expression-origin.js +2 -101
- package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
- package/dead-code-eliminator/liveness/asset-side-effects.js +1 -9
- package/dead-code-eliminator/liveness/asset-side-effects.js.map +1 -1
- package/dead-code-eliminator/liveness/boolean-facts.js +2 -98
- package/dead-code-eliminator/liveness/boolean-facts.js.map +1 -1
- package/dead-code-eliminator/liveness/external-module-resolution.js +2 -172
- package/dead-code-eliminator/liveness/external-module-resolution.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity-summary.js +3 -294
- package/dead-code-eliminator/liveness/external-purity-summary.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity.js +3 -39
- package/dead-code-eliminator/liveness/external-purity.js.map +1 -1
- package/dead-code-eliminator/liveness/module-analysis.js +2 -27
- package/dead-code-eliminator/liveness/module-analysis.js.map +1 -1
- package/dead-code-eliminator/liveness/resource-retention.js +1 -78
- package/dead-code-eliminator/liveness/resource-retention.js.map +1 -1
- package/dead-code-eliminator/liveness/runtime-code.js +1 -15
- package/dead-code-eliminator/liveness/runtime-code.js.map +1 -1
- package/dead-code-eliminator/load-bundle.js +5 -70
- package/dead-code-eliminator/load-bundle.js.map +1 -1
- package/dead-code-eliminator/pure-expression.js +5 -178
- package/dead-code-eliminator/pure-expression.js.map +1 -1
- package/dead-code-eliminator/reachability/bfs-closure.js +0 -50
- package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-extractor.js +2 -100
- package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-id.js +0 -32
- package/dead-code-eliminator/reachability/binding-id.js.map +1 -1
- package/dead-code-eliminator/reachability/identifier-target-collector.js +1 -39
- package/dead-code-eliminator/reachability/identifier-target-collector.js.map +1 -1
- package/dead-code-eliminator/reachability/impure-statements.js +2 -11
- package/dead-code-eliminator/reachability/impure-statements.js.map +1 -1
- package/dead-code-eliminator/reachability/local-seed-gathering.js +4 -43
- package/dead-code-eliminator/reachability/local-seed-gathering.js.map +1 -1
- package/dead-code-eliminator/reachability/reachability.js +4 -38
- package/dead-code-eliminator/reachability/reachability.js.map +1 -1
- package/dead-code-eliminator/side-effect-classifier.js +4 -39
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
- package/dead-code-eliminator/side-effects-field.js +1 -23
- package/dead-code-eliminator/side-effects-field.js.map +1 -1
- package/dead-code-eliminator/source-map-recomposition.js +2 -29
- package/dead-code-eliminator/source-map-recomposition.js.map +1 -1
- package/dead-code-eliminator/statement-classifiers.js +4 -94
- package/dead-code-eliminator/statement-classifiers.js.map +1 -1
- package/dead-code-eliminator/syntax-kind-sets.js +0 -16
- package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
- package/dead-code-eliminator/transform/atom-translator.d.ts +0 -8
- package/dead-code-eliminator/transform/atom-translator.d.ts.map +1 -1
- package/dead-code-eliminator/transform/atom-translator.js +2 -57
- package/dead-code-eliminator/transform/atom-translator.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-removal.js +4 -135
- package/dead-code-eliminator/transform/declaration-removal.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-remover.js +2 -17
- package/dead-code-eliminator/transform/declaration-remover.js.map +1 -1
- package/dead-code-eliminator/transform/line-index.d.ts +0 -7
- package/dead-code-eliminator/transform/line-index.d.ts.map +1 -1
- package/dead-code-eliminator/transform/line-index.js +0 -20
- package/dead-code-eliminator/transform/line-index.js.map +1 -1
- package/dead-code-eliminator/transform/named-declaration-kinds.js +0 -3
- package/dead-code-eliminator/transform/named-declaration-kinds.js.map +1 -1
- package/dead-code-eliminator/transform/source-map-composer.js +3 -84
- package/dead-code-eliminator/transform/source-map-composer.js.map +1 -1
- package/dead-code-eliminator/variable-declaration-bindings.js +1 -25
- package/dead-code-eliminator/variable-declaration-bindings.js.map +1 -1
- package/dependency-scanner/dependency-graph.js +3 -74
- package/dependency-scanner/dependency-graph.js.map +1 -1
- package/dependency-scanner/external-dependencies.d.ts +0 -9
- package/dependency-scanner/external-dependencies.d.ts.map +1 -1
- package/dependency-scanner/external-dependencies.js +1 -55
- package/dependency-scanner/external-dependencies.js.map +1 -1
- package/dependency-scanner/file-host-predicates.js +0 -9
- package/dependency-scanner/file-host-predicates.js.map +1 -1
- package/dependency-scanner/host-method-binding.js +0 -18
- package/dependency-scanner/host-method-binding.js.map +1 -1
- package/dependency-scanner/injected-dynamic-imports.js +1 -232
- package/dependency-scanner/injected-dynamic-imports.js.map +1 -1
- package/dependency-scanner/node-modules-manifest-synthesizer.js +4 -52
- package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
- package/dependency-scanner/package-owned-asset-file-path.js +1 -9
- package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
- package/dependency-scanner/scanner.js +4 -102
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.js +6 -174
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/source-map-file-locator.js +2 -66
- package/dependency-scanner/source-map-file-locator.js.map +1 -1
- package/dependency-scanner/typescript-compiler-options.js +1 -21
- package/dependency-scanner/typescript-compiler-options.js.map +1 -1
- package/dependency-scanner/typescript-file-host.js +5 -49
- package/dependency-scanner/typescript-file-host.js.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.js +3 -35
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/dependency-scanner/virtual-package-json-host.js +4 -45
- package/dependency-scanner/virtual-package-json-host.js.map +1 -1
- package/directed-graph/graph.d.ts +0 -1
- package/directed-graph/graph.d.ts.map +1 -1
- package/directed-graph/graph.js +1 -240
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +2 -23
- package/file-manager/compare.js.map +1 -1
- package/file-manager/equal.js +0 -5
- package/file-manager/equal.js.map +1 -1
- package/file-manager/file-description.d.ts +0 -1
- package/file-manager/file-description.d.ts.map +1 -1
- package/file-manager/file-description.js +0 -3
- package/file-manager/file-description.js.map +1 -1
- package/file-manager/permissions.js +1 -28
- package/file-manager/permissions.js.map +1 -1
- package/git/current-git-head.js +0 -24
- package/git/current-git-head.js.map +1 -1
- package/git/git-command.js +1 -49
- package/git/git-command.js.map +1 -1
- package/linker/linked-bundle.d.ts +0 -8
- package/linker/linked-bundle.d.ts.map +1 -1
- package/linker/linked-bundle.js +0 -5
- package/linker/linked-bundle.js.map +1 -1
- package/linker/linker.js +5 -51
- package/linker/linker.js.map +1 -1
- package/linker/replacement-lookup.js +8 -295
- package/linker/replacement-lookup.js.map +1 -1
- package/linker/resource-graph.js +2 -44
- package/linker/resource-graph.js.map +1 -1
- package/linker/source-modifier/import-paths.js +3 -76
- package/linker/source-modifier/import-paths.js.map +1 -1
- package/linker/substitute-bundles.js +3 -140
- package/linker/substitute-bundles.js.map +1 -1
- package/linker/substituted-resource-graph.js +2 -99
- package/linker/substituted-resource-graph.js.map +1 -1
- package/npm-oidc-id-token-resolver.js +0 -82
- package/npm-oidc-id-token-resolver.js.map +1 -1
- package/pack-emitter/pack-emitter.d.ts +0 -20
- package/pack-emitter/pack-emitter.d.ts.map +1 -1
- package/pack-emitter/pack-emitter.js +0 -27
- package/pack-emitter/pack-emitter.js.map +1 -1
- package/package-surface/bin-field.js +2 -8
- package/package-surface/bin-field.js.map +1 -1
- package/package-surface/explicit-bin.js +2 -24
- package/package-surface/explicit-bin.js.map +1 -1
- package/package-surface/explicit-exports.js +3 -26
- package/package-surface/explicit-exports.js.map +1 -1
- package/package-surface/export-map.js +2 -9
- package/package-surface/export-map.js.map +1 -1
- package/package-surface/implicit-bin.js +1 -25
- package/package-surface/implicit-bin.js.map +1 -1
- package/package-surface/implicit-exports.js +3 -10
- package/package-surface/implicit-exports.js.map +1 -1
- package/package-surface/implicit-root-exports.js +2 -13
- package/package-surface/implicit-root-exports.js.map +1 -1
- package/package-surface/package-json-export.js +0 -9
- package/package-surface/package-json-export.js.map +1 -1
- package/package-surface/package-shape.js +1 -10
- package/package-surface/package-shape.js.map +1 -1
- package/package-surface/package-surface-index.js +3 -165
- package/package-surface/package-surface-index.js.map +1 -1
- package/package-surface/public-module-usage.js +3 -46
- package/package-surface/public-module-usage.js.map +1 -1
- package/package-surface/public-specifiers.js +1 -7
- package/package-surface/public-specifiers.js.map +1 -1
- package/package-surface/root-registry.js +0 -26
- package/package-surface/root-registry.js.map +1 -1
- package/package-surface/specifier-syntax.js +0 -4
- package/package-surface/specifier-syntax.js.map +1 -1
- package/package-surface/substitution-exports.js +3 -101
- package/package-surface/substitution-exports.js.map +1 -1
- package/package-surface/surface.d.ts +0 -2
- package/package-surface/surface.d.ts.map +1 -1
- package/package-surface/surface.js +0 -12
- package/package-surface/surface.js.map +1 -1
- package/package.json +1 -1
- package/packages/package-processor.composition.d.ts +0 -22
- package/packages/package-processor.composition.d.ts.map +1 -1
- package/packages/package-processor.composition.js +34 -160
- package/packages/package-processor.composition.js.map +1 -1
- package/packtory/map-config.d.ts +3 -22
- package/packtory/map-config.d.ts.map +1 -1
- package/packtory/map-config.js +4 -35
- package/packtory/map-config.js.map +1 -1
- package/packtory/normalize-paths.js +1 -25
- package/packtory/normalize-paths.js.map +1 -1
- package/packtory/options/bundle-dependency-resolution.js +1 -17
- package/packtory/options/bundle-dependency-resolution.js.map +1 -1
- package/packtory/options/dead-code-elimination-resolution.js +1 -10
- package/packtory/options/dead-code-elimination-resolution.js.map +1 -1
- package/packtory/options/prepare-package-options.d.ts +0 -14
- package/packtory/options/prepare-package-options.d.ts.map +1 -1
- package/packtory/options/prepare-package-options.js +5 -46
- package/packtory/options/prepare-package-options.js.map +1 -1
- package/packtory/options/required-value-helpers.js +0 -17
- package/packtory/options/required-value-helpers.js.map +1 -1
- package/packtory/options/setting-resolvers.d.ts +0 -18
- package/packtory/options/setting-resolvers.d.ts.map +1 -1
- package/packtory/options/setting-resolvers.js +3 -47
- package/packtory/options/setting-resolvers.js.map +1 -1
- package/packtory/options/surface-resolution.js +2 -15
- package/packtory/options/surface-resolution.js.map +1 -1
- package/packtory/options/version-provider-context.js +2 -24
- package/packtory/options/version-provider-context.js.map +1 -1
- package/packtory/options/version-trigger.js +2 -39
- package/packtory/options/version-trigger.js.map +1 -1
- package/packtory/pack-output-preflight.js +3 -60
- package/packtory/pack-output-preflight.js.map +1 -1
- package/packtory/package-processor-build.js +3 -97
- package/packtory/package-processor-build.js.map +1 -1
- package/packtory/package-processor-publish.d.ts +0 -13
- package/packtory/package-processor-publish.d.ts.map +1 -1
- package/packtory/package-processor-publish.js +5 -293
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/package-processor.d.ts +1 -34
- package/packtory/package-processor.d.ts.map +1 -1
- package/packtory/package-processor.js +2 -10
- package/packtory/package-processor.js.map +1 -1
- package/packtory/packtory-pack.js +10 -298
- package/packtory/packtory-pack.js.map +1 -1
- package/packtory/packtory-package-dependencies.js +7 -135
- package/packtory/packtory-package-dependencies.js.map +1 -1
- package/packtory/packtory-package-tree.js +4 -43
- package/packtory/packtory-package-tree.js.map +1 -1
- package/packtory/packtory-publish.js +4 -17
- package/packtory/packtory-publish.js.map +1 -1
- package/packtory/packtory-release-analysis.js +6 -64
- package/packtory/packtory-release-analysis.js.map +1 -1
- package/packtory/packtory-release-diff.js +5 -48
- package/packtory/packtory-release-diff.js.map +1 -1
- package/packtory/packtory-release-plan.js +6 -87
- package/packtory/packtory-release-plan.js.map +1 -1
- package/packtory/packtory-resolve.js +5 -16
- package/packtory/packtory-resolve.js.map +1 -1
- package/packtory/packtory.d.ts +1 -28
- package/packtory/packtory.d.ts.map +1 -1
- package/packtory/packtory.js +12 -225
- package/packtory/packtory.js.map +1 -1
- package/packtory/publish-failure-mapping.js +0 -6
- package/packtory/publish-failure-mapping.js.map +1 -1
- package/packtory/published-release-state.d.ts +0 -19
- package/packtory/published-release-state.d.ts.map +1 -1
- package/packtory/published-release-state.js +0 -11
- package/packtory/published-release-state.js.map +1 -1
- package/packtory/release-analysis.js +5 -153
- package/packtory/release-analysis.js.map +1 -1
- package/packtory/release-diff-failure-mapping.js +0 -6
- package/packtory/release-diff-failure-mapping.js.map +1 -1
- package/packtory/release-plan.js +7 -135
- package/packtory/release-plan.js.map +1 -1
- package/packtory/report-attachment.js +2 -35
- package/packtory/report-attachment.js.map +1 -1
- package/packtory/resolved-package.d.ts +0 -11
- package/packtory/resolved-package.d.ts.map +1 -1
- package/packtory/resolved-package.js +3 -97
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.d.ts +0 -47
- package/packtory/scheduler.d.ts.map +1 -1
- package/packtory/scheduler.js +1 -99
- package/packtory/scheduler.js.map +1 -1
- package/packtory/stages/package-analysis-stage.js +2 -50
- package/packtory/stages/package-analysis-stage.js.map +1 -1
- package/packtory/stages/package-resolution-stage.js +5 -80
- package/packtory/stages/package-resolution-stage.js.map +1 -1
- package/packtory/stages/publish-stage.js +3 -54
- package/packtory/stages/publish-stage.js.map +1 -1
- package/packtory/stages/release-diff-stage.js +5 -84
- package/packtory/stages/release-diff-stage.js.map +1 -1
- package/progress/progress-broadcaster.d.ts +0 -1
- package/progress/progress-broadcaster.d.ts.map +1 -1
- package/progress/progress-broadcaster.js +0 -45
- package/progress/progress-broadcaster.js.map +1 -1
- package/published-package/published-package.d.ts +0 -2
- package/published-package/published-package.d.ts.map +1 -1
- package/published-package/published-package.js +1 -12
- package/published-package/published-package.js.map +1 -1
- package/report/aggregator/artifact-entry-merger.js +0 -20
- package/report/aggregator/artifact-entry-merger.js.map +1 -1
- package/report/aggregator/package-report-materialization.js +2 -75
- package/report/aggregator/package-report-materialization.js.map +1 -1
- package/report/aggregator/report-aggregator.js +2 -37
- package/report/aggregator/report-aggregator.js.map +1 -1
- package/report/aggregator/report-event-handlers.js +2 -141
- package/report/aggregator/report-event-handlers.js.map +1 -1
- package/report/aggregator/report-types.d.ts +0 -21
- package/report/aggregator/report-types.d.ts.map +1 -1
- package/report/aggregator/report-types.js +0 -3
- package/report/aggregator/report-types.js.map +1 -1
- package/report/config-redactor.js +3 -29
- package/report/config-redactor.js.map +1 -1
- package/report/decorators.js +0 -76
- package/report/decorators.js.map +1 -1
- package/report/inspectors/inspect-artifact-sizes.js +1 -34
- package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
- package/report/inspectors/inspect-linker-rewrites.js +1 -14
- package/report/inspectors/inspect-linker-rewrites.js.map +1 -1
- package/report/inspectors/inspect-package-json-provenance.js +0 -15
- package/report/inspectors/inspect-package-json-provenance.js.map +1 -1
- package/report/inspectors/inspect-scan-results.js +0 -15
- package/report/inspectors/inspect-scan-results.js.map +1 -1
- package/report/release-diff/release-version-transition.js +0 -18
- package/report/release-diff/release-version-transition.js.map +1 -1
- package/resource-resolver/bundle-resource-lookup.js +0 -25
- package/resource-resolver/bundle-resource-lookup.js.map +1 -1
- package/resource-resolver/content.js +3 -81
- package/resource-resolver/content.js.map +1 -1
- package/resource-resolver/dependency-resolution-walker.js +2 -73
- package/resource-resolver/dependency-resolution-walker.js.map +1 -1
- package/resource-resolver/resolved-bundle.d.ts +0 -17
- package/resource-resolver/resolved-bundle.d.ts.map +1 -1
- package/resource-resolver/resolved-bundle.js +0 -3
- package/resource-resolver/resolved-bundle.js.map +1 -1
- package/resource-resolver/resource-resolve-options.d.ts +0 -5
- package/resource-resolver/resource-resolve-options.d.ts.map +1 -1
- package/resource-resolver/resource-resolve-options.js +1 -13
- package/resource-resolver/resource-resolve-options.js.map +1 -1
- package/resource-resolver/resource-resolver.js +5 -83
- package/resource-resolver/resource-resolver.js.map +1 -1
- package/sbom/extract-license.js +1 -11
- package/sbom/extract-license.js.map +1 -1
- package/sbom/license-resolver.js +2 -23
- package/sbom/license-resolver.js.map +1 -1
- package/sbom/sbom-builder.js +2 -57
- package/sbom/sbom-builder.js.map +1 -1
- package/sbom/sbom-canonicalizer.js +3 -45
- package/sbom/sbom-canonicalizer.js.map +1 -1
- package/sbom/sbom-file.d.ts +0 -10
- package/sbom/sbom-file.d.ts.map +1 -1
- package/sbom/sbom-file.js +5 -54
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.js +1 -14
- package/sbom/sbom-serializer.js.map +1 -1
- package/sbom/tool-version.js +1 -49
- package/sbom/tool-version.js.map +1 -1
- package/sbom.cdx.json +5 -5
- package/tar/extract-tar.js +3 -83
- package/tar/extract-tar.js.map +1 -1
- package/tar/gzipped-pack.js +0 -20
- package/tar/gzipped-pack.js.map +1 -1
- package/tar/tarball-builder.js +4 -44
- package/tar/tarball-builder.js.map +1 -1
- package/vendor-materializer/vendor-entry.js +1 -20
- package/vendor-materializer/vendor-entry.js.map +1 -1
- package/vendor-materializer/vendor-materializer.js +8 -240
- package/vendor-materializer/vendor-materializer.js.map +1 -1
- package/version-manager/dependencies/bundle-dependency-grouping.js +2 -32
- package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
- package/version-manager/dependencies/dependency-groups.js +1 -11
- package/version-manager/dependencies/dependency-groups.js.map +1 -1
- package/version-manager/dependencies/external-dependency-classification.js +3 -82
- package/version-manager/dependencies/external-dependency-classification.js.map +1 -1
- package/version-manager/dependencies/versioned-bundle-dependencies.js +3 -8
- package/version-manager/dependencies/versioned-bundle-dependencies.js.map +1 -1
- package/version-manager/imports/hash-import-scanner.js +2 -20
- package/version-manager/imports/hash-import-scanner.js.map +1 -1
- package/version-manager/imports/imports-key-matcher.js +0 -22
- package/version-manager/imports/imports-key-matcher.js.map +1 -1
- package/version-manager/imports/versioned-bundle-imports.js +2 -44
- package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
- package/version-manager/manager.d.ts +0 -5
- package/version-manager/manager.d.ts.map +1 -1
- package/version-manager/manager.js +6 -46
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +1 -51
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/manifest/serialize.js +1 -8
- package/version-manager/manifest/serialize.js.map +1 -1
- package/version-manager/optional-bundle-fields.js +1 -5
- package/version-manager/optional-bundle-fields.js.map +1 -1
- package/version-manager/representative-root.js +1 -9
- package/version-manager/representative-root.js.map +1 -1
- package/version-manager/specifier-classifier.js +2 -42
- package/version-manager/specifier-classifier.js.map +1 -1
- package/version-manager/specifier-errors.js +0 -58
- package/version-manager/specifier-errors.js.map +1 -1
- package/version-manager/versioned-bundle.d.ts +1 -3
- package/version-manager/versioned-bundle.d.ts.map +1 -1
- package/version-manager/versioned-bundle.js +6 -31
- package/version-manager/versioned-bundle.js.map +1 -1
- package/zip/zip-builder.js +2 -81
- package/zip/zip-builder.js.map +1 -1
- package/artifacts/artifacts-builder.d.ts +0 -28
- package/artifacts/artifacts-builder.d.ts.map +0 -1
- package/bundle-emitter/registry/registry-auth-config.d.ts +0 -17
- package/bundle-emitter/registry/registry-auth-config.d.ts.map +0 -1
- package/checks/check-runner.d.ts +0 -18
- package/checks/check-runner.d.ts.map +0 -1
- package/checks/rule.d.ts +0 -42
- package/checks/rule.d.ts.map +0 -1
- package/checks/rules/max-bundle-size.d.ts +0 -13
- package/checks/rules/max-bundle-size.d.ts.map +0 -1
- package/checks/rules/no-dev-dependency-imports.d.ts +0 -11
- package/checks/rules/no-dev-dependency-imports.d.ts.map +0 -1
- package/checks/rules/no-duplicated-files.d.ts +0 -11
- package/checks/rules/no-duplicated-files.d.ts.map +0 -1
- package/checks/rules/no-side-effects.d.ts +0 -15
- package/checks/rules/no-side-effects.d.ts.map +0 -1
- package/checks/rules/no-unexposed-executables.d.ts +0 -8
- package/checks/rules/no-unexposed-executables.d.ts.map +0 -1
- package/checks/rules/no-unused-bundle-dependencies.d.ts +0 -8
- package/checks/rules/no-unused-bundle-dependencies.d.ts.map +0 -1
- package/checks/rules/registry.d.ts +0 -23
- package/checks/rules/registry.d.ts.map +0 -1
- package/checks/rules/required-files.d.ts +0 -15
- package/checks/rules/required-files.d.ts.map +0 -1
- package/checks/rules/type-script-declaration-integrity.d.ts +0 -9
- package/checks/rules/type-script-declaration-integrity.d.ts.map +0 -1
- package/checks/rules/type-script-declaration-project.d.ts +0 -29
- package/checks/rules/type-script-declaration-project.d.ts.map +0 -1
- package/checks/rules/type-script-integrity.d.ts +0 -24
- package/checks/rules/type-script-integrity.d.ts.map +0 -1
- package/checks/rules/type-script-package-resolution.d.ts +0 -29
- package/checks/rules/type-script-package-resolution.d.ts.map +0 -1
- package/checks/rules/unique-target-paths.d.ts +0 -8
- package/checks/rules/unique-target-paths.d.ts.map +0 -1
- package/dependency-scanner/dependency-graph.d.ts +0 -38
- package/dependency-scanner/dependency-graph.d.ts.map +0 -1
- package/dependency-scanner/scanner.d.ts +0 -20
- package/dependency-scanner/scanner.d.ts.map +0 -1
- package/dependency-scanner/source-file-references.d.ts +0 -30
- package/dependency-scanner/source-file-references.d.ts.map +0 -1
- package/dependency-scanner/source-map-file-locator.d.ts +0 -10
- package/dependency-scanner/source-map-file-locator.d.ts.map +0 -1
- package/dependency-scanner/typescript-compiler-options.d.ts +0 -8
- package/dependency-scanner/typescript-compiler-options.d.ts.map +0 -1
- package/dependency-scanner/typescript-file-host.d.ts +0 -12
- package/dependency-scanner/typescript-file-host.d.ts.map +0 -1
- package/dependency-scanner/typescript-project-analyzer.d.ts +0 -19
- package/dependency-scanner/typescript-project-analyzer.d.ts.map +0 -1
- package/git/current-git-head.d.ts +0 -12
- package/git/current-git-head.d.ts.map +0 -1
- package/linker/linker.d.ts +0 -13
- package/linker/linker.d.ts.map +0 -1
- package/resource-resolver/resource-resolver.d.ts +0 -15
- package/resource-resolver/resource-resolver.d.ts.map +0 -1
- package/sbom/license-resolver.d.ts +0 -14
- package/sbom/license-resolver.d.ts.map +0 -1
- package/sbom/sbom-serializer.d.ts +0 -8
- package/sbom/sbom-serializer.d.ts.map +0 -1
- package/tar/tarball-builder.d.ts +0 -14
- package/tar/tarball-builder.d.ts.map +0 -1
- package/vendor-materializer/vendor-entry.d.ts +0 -12
- package/vendor-materializer/vendor-entry.d.ts.map +0 -1
- package/vendor-materializer/vendor-materializer.d.ts +0 -55
- package/vendor-materializer/vendor-materializer.d.ts.map +0 -1
- package/zip/zip-builder.d.ts +0 -22
- package/zip/zip-builder.d.ts.map +0 -1
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
export function createArtifactsBuilder(dependencies) {
|
|
6
|
-
const { fileManager, tarballBuilder, zipBuilder, progressBroadcaster } = dependencies;
|
|
7
|
-
function collectContents(bundle, prefix, extraFiles = []) {
|
|
8
|
-
const artifactContents = collectArtifactContents(bundle, prefix, extraFiles);
|
|
9
|
-
if (progressBroadcaster.hasSubscribers('artifactsCollected')) {
|
|
10
|
-
progressBroadcaster.emit('artifactsCollected', {
|
|
11
|
-
packageName: bundle.name,
|
|
12
|
-
entries: inspectArtifactSizes(describeArtifactsForReport(bundle, prefix, extraFiles))
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return artifactContents;
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
collectContents,
|
|
19
|
-
async buildTarball(bundle, extraFiles, vendorEntries = []) {
|
|
20
|
-
const contents = collectContents(bundle, 'package', extraFiles);
|
|
21
|
-
const prefixedVendor = vendorEntries.map(function (entry) {
|
|
22
|
-
return applyPrefixToVendorEntry('package', entry);
|
|
23
|
-
});
|
|
24
|
-
const tarData = await tarballBuilder.build(contents, prefixedVendor);
|
|
25
|
-
return { tarData };
|
|
26
|
-
},
|
|
27
|
-
async buildZip(bundle, extraFiles, vendorEntries = []) {
|
|
28
|
-
const contents = collectContents(bundle, undefined, extraFiles);
|
|
29
|
-
const zipData = await zipBuilder.build(contents, vendorEntries);
|
|
30
|
-
return { zipData };
|
|
31
|
-
},
|
|
32
|
-
async buildFolder(bundle, targetFolder, extraFiles, vendorEntries = []) {
|
|
33
|
-
const contents = collectContents(bundle, undefined, extraFiles);
|
|
34
|
-
await writeArtifactsToFolder(fileManager, targetFolder, contents, vendorEntries);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
1
|
+
import "../report/inspectors/inspect-artifact-sizes.js";
|
|
2
|
+
import "../vendor-materializer/vendor-entry.js";
|
|
3
|
+
import "./content-collection.js";
|
|
4
|
+
import "./folder-writer.js";
|
|
38
5
|
//# sourceMappingURL=artifacts-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts-builder.js","sourceRoot":"","sources":["../../../../source/artifacts/artifacts-builder.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"artifacts-builder.js","sourceRoot":"","sources":["../../../../source/artifacts/artifacts-builder.ts"],"names":[],"mappings":"AAIA,OAAqC,gDAAgD,CAAC;AAEtF,OAA2D,wCAAwC,CAAC;AAEpG,OAAoE,yBAAyB,CAAC;AAC9F,OAAuC,oBAAoB,CAAC"}
|
|
@@ -1,60 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function applyPrefix(filePath, prefix) {
|
|
4
|
-
return prefix === undefined ? filePath : path.join(prefix, filePath);
|
|
5
|
-
}
|
|
6
|
-
export function collectArtifactContents(bundle, prefix, extraFiles) {
|
|
7
|
-
const binTargets = explicitBinTargetPaths(bundle);
|
|
8
|
-
const artifactContents = [
|
|
9
|
-
{
|
|
10
|
-
...bundle.manifestFile,
|
|
11
|
-
filePath: applyPrefix(bundle.manifestFile.filePath, prefix)
|
|
12
|
-
}
|
|
13
|
-
];
|
|
14
|
-
for (const entry of bundle.contents) {
|
|
15
|
-
if (!entry.isGeneratedManifest) {
|
|
16
|
-
artifactContents.push({
|
|
17
|
-
filePath: applyPrefix(entry.fileDescription.targetFilePath, prefix),
|
|
18
|
-
content: entry.fileDescription.content,
|
|
19
|
-
isExecutable: entry.fileDescription.isExecutable || binTargets.has(entry.fileDescription.targetFilePath)
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
for (const extraFile of extraFiles) {
|
|
24
|
-
artifactContents.push({
|
|
25
|
-
filePath: applyPrefix(extraFile.filePath, prefix),
|
|
26
|
-
content: extraFile.content,
|
|
27
|
-
isExecutable: extraFile.isExecutable
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return artifactContents;
|
|
31
|
-
}
|
|
32
|
-
export function describeArtifactsForReport(bundle, prefix, extraFiles) {
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
...bundle.manifestFile,
|
|
36
|
-
filePath: applyPrefix(bundle.manifestFile.filePath, prefix)
|
|
37
|
-
},
|
|
38
|
-
...bundle.contents.flatMap(function (entry) {
|
|
39
|
-
if (entry.isGeneratedManifest) {
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
42
|
-
return [
|
|
43
|
-
{
|
|
44
|
-
filePath: applyPrefix(entry.fileDescription.targetFilePath, prefix),
|
|
45
|
-
content: entry.fileDescription.content,
|
|
46
|
-
isExecutable: entry.fileDescription.isExecutable,
|
|
47
|
-
sourceFilePath: entry.fileDescription.sourceFilePath,
|
|
48
|
-
isSubstituted: entry.isSubstituted
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
}),
|
|
52
|
-
...extraFiles.map(function (entry) {
|
|
53
|
-
return {
|
|
54
|
-
...entry,
|
|
55
|
-
filePath: applyPrefix(entry.filePath, prefix)
|
|
56
|
-
};
|
|
57
|
-
})
|
|
58
|
-
];
|
|
59
|
-
}
|
|
1
|
+
import 'node:path';
|
|
2
|
+
import "../published-package/published-package.js";
|
|
60
3
|
//# sourceMappingURL=content-collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-collection.js","sourceRoot":"","sources":["../../../../source/artifacts/content-collection.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"content-collection.js","sourceRoot":"","sources":["../../../../source/artifacts/content-collection.ts"],"names":[],"mappings":"AAAA,OAAiB,WAAW,CAAC;AAE7B,OAAmE,2CAA2C,CAAC"}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
async function writeFileDescriptions(fileManager, targetFolder, contents) {
|
|
4
|
-
for (const entry of contents) {
|
|
5
|
-
const targetFilePath = path.join(targetFolder, entry.filePath);
|
|
6
|
-
await fileManager.writeFile(targetFilePath, entry.content);
|
|
7
|
-
await fileManager.setExecutable(targetFilePath, entry.isExecutable);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
async function copyVendorEntries(fileManager, targetFolder, vendorEntries) {
|
|
11
|
-
for (const vendorEntry of vendorEntries) {
|
|
12
|
-
const targetFilePath = path.join(targetFolder, vendorEntry.targetRelativePath);
|
|
13
|
-
await validateVendorEntrySource(fileManager, vendorEntry);
|
|
14
|
-
await fileManager.copyFileBytes(vendorEntry.sourceAbsolutePath, targetFilePath);
|
|
15
|
-
await fileManager.setExecutable(targetFilePath, vendorEntry.isExecutable);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export async function writeArtifactsToFolder(fileManager, targetFolder, contents, vendorEntries = []) {
|
|
19
|
-
const readability = await fileManager.checkReadability(targetFolder);
|
|
20
|
-
if (readability.isReadable) {
|
|
21
|
-
throw new Error(`Folder ${targetFolder} already exists`);
|
|
22
|
-
}
|
|
23
|
-
await writeFileDescriptions(fileManager, targetFolder, contents);
|
|
24
|
-
await copyVendorEntries(fileManager, targetFolder, vendorEntries);
|
|
25
|
-
}
|
|
1
|
+
import 'node:path';
|
|
2
|
+
import "../vendor-materializer/vendor-entry.js";
|
|
26
3
|
//# sourceMappingURL=folder-writer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-writer.js","sourceRoot":"","sources":["../../../../source/artifacts/folder-writer.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"folder-writer.js","sourceRoot":"","sources":["../../../../source/artifacts/folder-writer.ts"],"names":[],"mappings":"AAAA,OAAiB,WAAW,CAAC;AAG7B,OAA4D,wCAAwC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Maybe } from 'true-myth';
|
|
2
|
-
import type { ArtifactsBuilder } from '../artifacts/artifacts-builder.ts';
|
|
3
2
|
import type { FileDescription } from '../file-manager/file-description.ts';
|
|
4
3
|
import type { ArtifactPublishPackage } from '../published-package/published-package.ts';
|
|
5
4
|
import { fetchPublishedArtifacts } from './fetch-published-artifacts.ts';
|
|
@@ -34,12 +33,6 @@ type AutomaticVersioningSettings = {
|
|
|
34
33
|
};
|
|
35
34
|
type VersioningSettings = AutomaticVersioningSettings | FixedVersioningSettings | ProvidedVersioningSettings;
|
|
36
35
|
type PreviousReleaseArtifacts = Awaited<ReturnType<typeof fetchPublishedArtifacts>>;
|
|
37
|
-
export type BundleEmitterDependencies = {
|
|
38
|
-
readonly artifactsBuilder: ArtifactsBuilder;
|
|
39
|
-
readonly registryClient: RegistryClient;
|
|
40
|
-
readonly ciRepositoryUrl: string | undefined;
|
|
41
|
-
readonly readCurrentGitHead: () => Promise<string | undefined>;
|
|
42
|
-
};
|
|
43
36
|
type PublishOptions = {
|
|
44
37
|
readonly bundle: ArtifactPublishPackage;
|
|
45
38
|
readonly registrySettings: RegistrySettings;
|
|
@@ -76,6 +69,5 @@ export type BundleEmitter = {
|
|
|
76
69
|
findCurrentHeadPublishedVersion: (options: CurrentHeadPublishedVersionLookupOptions) => Promise<CurrentHeadPublishedVersion | undefined>;
|
|
77
70
|
checkBundleAlreadyPublished: (options: AlreadyPublishedCheckOptions) => Promise<BundlePublishedCheckResult>;
|
|
78
71
|
};
|
|
79
|
-
export declare function createBundleEmitter(dependencies: BundleEmitterDependencies): BundleEmitter;
|
|
80
72
|
export {};
|
|
81
73
|
//# sourceMappingURL=emitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../../../source/bundle-emitter/emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../../../source/bundle-emitter/emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAEE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,KAAK,MAAM,CAAC,OAAO,SAAS,SAAS,OAAO,EAAE,IAAI,OAAO,SAAS,SAAS;IACvE,OAAO;IACP,MAAM,MAAM;IACZ,GAAG,CAAC,SAAS,OAAO,EAAE,CAAC;CAC1B,GAAG,MAAM,GACJ,KAAK,CAAC;AACZ,KAAK,MAAM,CAAC,OAAO,SAAS,SAAS,OAAO,EAAE,IAAI,OAAO,SAAS,SAAS;IACvE,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM,MAAM;IACZ,GAAG,CAAC,SAAS,OAAO,EAAE,CAAC;CAC1B,GAAG,MAAM,GACJ,KAAK,CAAC;AACZ,KAAK,8BAA8B,GAAG,UAAU,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACnF,KAAK,UAAU,GAAG,SAAS,eAAe,EAAE,CAAC;AAC7C,KAAK,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAChF,KAAK,eAAe,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAC9D,KAAK,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACjF,KAAK,0BAA0B,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAAE,CAAC;AACnG,KAAK,uBAAuB,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC;AACxF,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAAE,CAAC;AACjE,KAAK,kBAAkB,GAAG,2BAA2B,GAAG,uBAAuB,GAAG,0BAA0B,CAAC;AAC7G,KAAK,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;KAM7C,CAAiB,aAGrC,GAAG;IAClB,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CACpC,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAChC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CACpC,CAAC;AAEF,KAAK,2BAA2B,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;CAC3C,CAAC;AAEF,KAAK,wCAAwC,GAAG;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC/C,CAAC;AAEF,KAAK,2BAA2B,GAAG;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B,CAAC;AAQF,KAAK,0BAA0B,GAAG;IAC9B,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAClE,uBAAuB,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1F,+BAA+B,EAAE,CAC7B,OAAO,EAAE,wCAAwC,KAChD,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;IACtD,2BAA2B,EAAE,CAAC,OAAO,EAAE,4BAA4B,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC/G,CAAC;AA8CF"}
|
|
@@ -1,107 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const stageRegistryUnsupportedMessage = 'npm staged publishing is only supported with the npmjs.org registry';
|
|
8
|
-
const stageFirstPublishUnsupportedMessage = 'npm staged publishing requires the package to already exist on the npm registry';
|
|
9
|
-
const npmRegistryUrl = 'https://registry.npmjs.org/';
|
|
10
|
-
function isNpmRegistry(registryUrl) {
|
|
11
|
-
const resolvedRegistryUrl = new URL(registryUrl ?? npmRegistryUrl);
|
|
12
|
-
return resolvedRegistryUrl.href === npmRegistryUrl;
|
|
13
|
-
}
|
|
14
|
-
function validateVersion(version) {
|
|
15
|
-
const normalized = semver.valid(version);
|
|
16
|
-
if (normalized === null) {
|
|
17
|
-
throw new Error(`Registry returned an invalid version "${version}" for staged publishing`);
|
|
18
|
-
}
|
|
19
|
-
return normalized;
|
|
20
|
-
}
|
|
21
|
-
function highestVersion(firstVersion, laterVersions) {
|
|
22
|
-
let highest = validateVersion(firstVersion);
|
|
23
|
-
for (const version of laterVersions) {
|
|
24
|
-
const candidate = validateVersion(version);
|
|
25
|
-
if (semver.gt(candidate, highest)) {
|
|
26
|
-
highest = candidate;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return highest;
|
|
30
|
-
}
|
|
31
|
-
function hasVersionProvider(versioning) {
|
|
32
|
-
return Object.hasOwn(versioning, 'provideVersion');
|
|
33
|
-
}
|
|
34
|
-
function isCurrentHeadPackageVersion(versionDetails, currentGitHead) {
|
|
35
|
-
return versionDetails.gitHead === currentGitHead;
|
|
36
|
-
}
|
|
37
|
-
export function createBundleEmitter(dependencies) {
|
|
38
|
-
const { artifactsBuilder, registryClient, ciRepositoryUrl, readCurrentGitHead } = dependencies;
|
|
39
|
-
async function determineCurrentVersionForStageMode(name, registrySettings, versioning) {
|
|
40
|
-
if (!isNpmRegistry(registrySettings.registryUrl)) {
|
|
41
|
-
throw new Error(stageRegistryUnsupportedMessage);
|
|
42
|
-
}
|
|
43
|
-
const latestVersion = await registryClient.fetchLatestVersion(name, registrySettings);
|
|
44
|
-
if (latestVersion.isNothing) {
|
|
45
|
-
throw new Error(stageFirstPublishUnsupportedMessage);
|
|
46
|
-
}
|
|
47
|
-
if (!versioning.automatic && !hasVersionProvider(versioning)) {
|
|
48
|
-
return Maybe.just(versioning.version);
|
|
49
|
-
}
|
|
50
|
-
const stagedVersions = await registryClient.fetchStagedVersions(name, registrySettings);
|
|
51
|
-
return Maybe.just(highestVersion(latestVersion.value.version, stagedVersions));
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
async determineCurrentVersion(options) {
|
|
55
|
-
const { versioning, registrySettings, name, stage } = options;
|
|
56
|
-
if (stage) {
|
|
57
|
-
return determineCurrentVersionForStageMode(name, registrySettings, versioning);
|
|
58
|
-
}
|
|
59
|
-
if (versioning.automatic || hasVersionProvider(versioning)) {
|
|
60
|
-
const latestVersion = await registryClient.fetchLatestVersion(name, registrySettings);
|
|
61
|
-
return latestVersion.map(function (version) {
|
|
62
|
-
return version.version;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return Maybe.just(versioning.version);
|
|
66
|
-
},
|
|
67
|
-
async findCurrentHeadPublishedVersion(options) {
|
|
68
|
-
const currentGitHead = await readCurrentGitHead();
|
|
69
|
-
if (currentGitHead === undefined) {
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
const latestVersion = await registryClient.fetchLatestVersion(options.name, options.registrySettings);
|
|
73
|
-
if (latestVersion.isNothing || !isCurrentHeadPackageVersion(latestVersion.value, currentGitHead)) {
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
version: latestVersion.value.version,
|
|
78
|
-
gitHead: latestVersion.value.gitHead
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
async checkBundleAlreadyPublished(options) {
|
|
82
|
-
const { bundle, registrySettings, extraFiles } = options;
|
|
83
|
-
const previous = await fetchPublishedArtifacts(registryClient, bundle.name, registrySettings);
|
|
84
|
-
if (previous.isNothing) {
|
|
85
|
-
return { alreadyPublishedAsLatest: false, previousReleaseArtifacts: Maybe.nothing() };
|
|
86
|
-
}
|
|
87
|
-
const artifactContents = artifactsBuilder.collectContents(bundle, 'package', extraFiles);
|
|
88
|
-
const comparison = compareFileDescriptions(canonicalizeReleaseArtifactFiles(artifactContents), canonicalizeReleaseArtifactFiles(previous.value.files));
|
|
89
|
-
return {
|
|
90
|
-
alreadyPublishedAsLatest: comparison.status === fileDescriptionComparisonStatus.equal,
|
|
91
|
-
previousReleaseArtifacts: previous
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
async publish(options) {
|
|
95
|
-
if (options.publishSettings.access === 'public' && options.publishSettings.provenance?.type === 'auto') {
|
|
96
|
-
assertRepositoryCoherence(options.bundle.packageJson, ciRepositoryUrl);
|
|
97
|
-
}
|
|
98
|
-
const tarball = await artifactsBuilder.buildTarball(options.bundle, options.extraFiles);
|
|
99
|
-
const currentGitHead = await readCurrentGitHead();
|
|
100
|
-
const publishManifest = currentGitHead === undefined
|
|
101
|
-
? options.bundle.packageJson
|
|
102
|
-
: { ...options.bundle.packageJson, gitHead: currentGitHead };
|
|
103
|
-
return registryClient.publishPackage(publishManifest, tarball.tarData, options.registrySettings, options.publishSettings, options.stage);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
}
|
|
1
|
+
import 'semver';
|
|
2
|
+
import 'true-myth';
|
|
3
|
+
import "../file-manager/compare.js";
|
|
4
|
+
import "./fetch-published-artifacts.js";
|
|
5
|
+
import "./release-artifact-canonicalizer.js";
|
|
6
|
+
import "./repository-coherence.js";
|
|
107
7
|
//# sourceMappingURL=emitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/emitter.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/emitter.ts"],"names":[],"mappings":"AAAA,OAAmB,QAAQ,CAAC;AAC5B,OAAsB,WAAW,CAAC;AAElC,OAAyE,4BAA4B,CAAC;AAGtG,OAAwC,gCAAgC,CAAC;AACzE,OAAiD,qCAAqC,CAAC;AAEvF,OAA0C,2BAA2B,CAAC"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function tarEntryToFileDescription(tarEntry) {
|
|
4
|
-
return {
|
|
5
|
-
filePath: tarEntry.header.name,
|
|
6
|
-
content: tarEntry.content,
|
|
7
|
-
isExecutable: isExecutableFileMode(Number(tarEntry.header.mode))
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export async function extractPackageTarball(tarball) {
|
|
11
|
-
const tarEntries = await extractTarEntries(tarball);
|
|
12
|
-
return tarEntries.map(tarEntryToFileDescription);
|
|
13
|
-
}
|
|
1
|
+
import "../file-manager/permissions.js";
|
|
2
|
+
import "../tar/extract-tar.js";
|
|
14
3
|
//# sourceMappingURL=extract-package-tarball.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-package-tarball.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/extract-package-tarball.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"extract-package-tarball.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/extract-package-tarball.ts"],"names":[],"mappings":"AACA,OAAqC,gCAAgC,CAAC;AACtE,OAAiD,uBAAuB,CAAC"}
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export async function fetchPublishedArtifacts(registryClient, name, registrySettings) {
|
|
4
|
-
const latestVersion = await registryClient.fetchLatestReleaseMetadata(name, registrySettings);
|
|
5
|
-
if (latestVersion.isNothing) {
|
|
6
|
-
return Maybe.nothing();
|
|
7
|
-
}
|
|
8
|
-
const tarball = await registryClient.fetchTarball(latestVersion.value.tarballUrl, latestVersion.value.tarballIntegrity, registrySettings);
|
|
9
|
-
const files = await extractPackageTarball(tarball);
|
|
10
|
-
return Maybe.just({
|
|
11
|
-
version: latestVersion.value.version,
|
|
12
|
-
files,
|
|
13
|
-
publishedAt: latestVersion.value.publishedAt,
|
|
14
|
-
gitHead: latestVersion.value.gitHead
|
|
15
|
-
});
|
|
16
|
-
}
|
|
1
|
+
import 'true-myth';
|
|
2
|
+
import "./extract-package-tarball.js";
|
|
17
3
|
//# sourceMappingURL=fetch-published-artifacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-published-artifacts.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/fetch-published-artifacts.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"fetch-published-artifacts.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/fetch-published-artifacts.ts"],"names":[],"mappings":"AAAA,OAAsB,WAAW,CAAC;AAGlC,OAAsC,8BAA8B,CAAC"}
|
|
@@ -9,8 +9,5 @@ type StagedForApproval = {
|
|
|
9
9
|
readonly stageId: string;
|
|
10
10
|
};
|
|
11
11
|
export type PublicationOutcome = NoPublication | PublishedToRegistry | StagedForApproval;
|
|
12
|
-
export declare const noPublication: PublicationOutcome;
|
|
13
|
-
export declare const publishedToRegistry: PublicationOutcome;
|
|
14
|
-
export declare function stagedForApproval(stageId: string): PublicationOutcome;
|
|
15
12
|
export {};
|
|
16
13
|
//# sourceMappingURL=publication-outcome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publication-outcome.d.ts","sourceRoot":"","sources":["../../../../source/bundle-emitter/publication-outcome.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CAAE,CAAC;AAChD,KAAK,mBAAmB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAAE,CAAC;AAC3D,KAAK,iBAAiB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC;AAEhF,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEzF
|
|
1
|
+
{"version":3,"file":"publication-outcome.d.ts","sourceRoot":"","sources":["../../../../source/bundle-emitter/publication-outcome.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CAAE,CAAC;AAChD,KAAK,mBAAmB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAAE,CAAC;AAC3D,KAAK,iBAAiB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAAE,CAAC;AAEhF,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publication-outcome.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/publication-outcome.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publication-outcome.js","sourceRoot":"","sources":["../../../../source/bundle-emitter/publication-outcome.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function getCiName(message) {
|
|
4
|
-
const providerSection = message
|
|
5
|
-
.slice(message.indexOf(unsupportedProviderMarker) + unsupportedProviderMarker.length)
|
|
6
|
-
.trimStart();
|
|
7
|
-
if (providerSection === '') {
|
|
8
|
-
return 'unknown';
|
|
9
|
-
}
|
|
10
|
-
const providerEnd = providerSection.search(/\s/u);
|
|
11
|
-
return providerEnd === -1 ? providerSection : providerSection.slice(0, providerEnd);
|
|
12
|
-
}
|
|
13
|
-
export function matchAutoModeError(error) {
|
|
14
|
-
if (!isErrorLike(error)) {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
const { message } = error;
|
|
18
|
-
if (message.includes(unsupportedProviderMarker)) {
|
|
19
|
-
return new Error(buildUnsupportedProviderMessage(getCiName(message)), { cause: error });
|
|
20
|
-
}
|
|
21
|
-
if (message.includes('"write" access to the "id-token" permission')) {
|
|
22
|
-
return new Error(githubActionsIdTokenMessage, { cause: error });
|
|
23
|
-
}
|
|
24
|
-
if (message.includes('SIGSTORE_ID_TOKEN')) {
|
|
25
|
-
return new Error(gitlabSigstoreIdTokenMessage, { cause: error });
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
1
|
+
import "./error-shape-helpers.js";
|
|
2
|
+
import "./publish-error-messages.js";
|
|
29
3
|
//# sourceMappingURL=auto-mode-error-matching.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-mode-error-matching.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/auto-mode-error-matching.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"auto-mode-error-matching.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/auto-mode-error-matching.ts"],"names":[],"mappings":"AAAA,OAA4B,0BAA0B,CAAC;AACvD,OAKO,6BAA6B,CAAC;AAUU"}
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export function isRecord(value) {
|
|
2
|
-
return value instanceof Object;
|
|
3
|
-
}
|
|
4
|
-
export function isErrorLike(error) {
|
|
5
|
-
return isRecord(error) && typeof error.message === 'string';
|
|
6
|
-
}
|
|
7
|
-
export function ensureError(error) {
|
|
8
|
-
return error instanceof Error ? error : new Error(String(error));
|
|
9
|
-
}
|
|
10
1
|
//# sourceMappingURL=error-shape-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-shape-helpers.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/error-shape-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-shape-helpers.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/error-shape-helpers.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const provenanceBundleMarkers = [
|
|
4
|
-
'Bundle is invalid',
|
|
5
|
-
'Unsupported bundle format',
|
|
6
|
-
'Invalid bundle',
|
|
7
|
-
'subject does not match'
|
|
8
|
-
];
|
|
9
|
-
const provenanceDigestMismatchMarkers = ['subject', 'digest'];
|
|
10
|
-
function includesOneOf(message, markers) {
|
|
11
|
-
for (const marker of markers) {
|
|
12
|
-
if (message.includes(marker)) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
export function matchFileModeError(error, filePath) {
|
|
19
|
-
if (isRecord(error) && error.code === 'ENOENT') {
|
|
20
|
-
return new Error(buildMissingProvenanceFileMessage(filePath), { cause: error });
|
|
21
|
-
}
|
|
22
|
-
if (!isErrorLike(error)) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
const { message } = error;
|
|
26
|
-
if (!includesOneOf(message, provenanceBundleMarkers)) {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
if (includesOneOf(message, provenanceDigestMismatchMarkers)) {
|
|
30
|
-
return new Error(buildProvenanceDigestMismatchMessage(filePath), { cause: error });
|
|
31
|
-
}
|
|
32
|
-
return new Error(buildInvalidProvenanceFileMessage(filePath), { cause: error });
|
|
33
|
-
}
|
|
1
|
+
import "./error-shape-helpers.js";
|
|
2
|
+
import "./publish-error-messages.js";
|
|
34
3
|
//# sourceMappingURL=file-mode-error-matching.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-mode-error-matching.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/file-mode-error-matching.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"file-mode-error-matching.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/file-mode-error-matching.ts"],"names":[],"mappings":"AAAA,OAAsC,0BAA0B,CAAC;AACjE,OAIO,6BAA6B,CAAC"}
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
export const unsupportedProviderMarker = 'not supported for provider:';
|
|
2
|
-
export const githubActionsIdTokenMessage = 'GitHub Actions provenance needs "permissions: id-token: write" on the workflow job. ' +
|
|
3
|
-
'See the packtory readme for the workflow snippet.';
|
|
4
|
-
export const gitlabSigstoreIdTokenMessage = 'GitLab CI provenance needs an "id_tokens" entry with audience "sigstore" ' +
|
|
5
|
-
'exposed as SIGSTORE_ID_TOKEN. See the packtory readme for the workflow snippet.';
|
|
6
|
-
export function buildUnsupportedProviderMessage(ciName) {
|
|
7
|
-
return ('Provenance auto mode requires GitHub Actions or GitLab CI. ' +
|
|
8
|
-
`Detected CI: ${ciName}. ` +
|
|
9
|
-
"Use provenance: { type: 'file' } for other environments.");
|
|
10
|
-
}
|
|
11
|
-
export function buildMissingProvenanceFileMessage(filePath) {
|
|
12
|
-
return (`Provenance bundle file "${filePath}" does not exist. ` +
|
|
13
|
-
"Generate it with your CI's attestation tool (e.g. actions/attest-build-provenance) " +
|
|
14
|
-
'before running packtory.');
|
|
15
|
-
}
|
|
16
|
-
export function buildInvalidProvenanceFileMessage(filePath) {
|
|
17
|
-
return (`Provenance bundle file "${filePath}" is not a valid sigstore bundle. ` +
|
|
18
|
-
'Re-generate it from the current build.');
|
|
19
|
-
}
|
|
20
|
-
export function buildProvenanceDigestMismatchMessage(filePath) {
|
|
21
|
-
return (`Provenance bundle at "${filePath}" was signed against a different tarball ` +
|
|
22
|
-
'than the one packtory built. Re-generate the bundle from the current source: ' +
|
|
23
|
-
'shipping a mismatched attestation would defeat the purpose of provenance.');
|
|
24
|
-
}
|
|
25
1
|
//# sourceMappingURL=publish-error-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-error-messages.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/publish-error-messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publish-error-messages.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/publish-error/publish-error-messages.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
const unauthorizedStatusCode = 401;
|
|
3
|
-
const forbiddenStatusCode = 403;
|
|
4
|
-
function isAuthFailure(error) {
|
|
5
|
-
const statusCode = error instanceof Object && Object.hasOwn(error, 'statusCode')
|
|
6
|
-
? error.statusCode
|
|
7
|
-
: undefined;
|
|
8
|
-
return statusCode === forbiddenStatusCode || statusCode === unauthorizedStatusCode;
|
|
9
|
-
}
|
|
10
|
-
export async function retryWithFallbackAuth(registrySettings, auth, run) {
|
|
11
|
-
try {
|
|
12
|
-
return await run(auth.options);
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
if (!auth.allowsAutomaticRetry || !isAuthFailure(error)) {
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
const publishAuth = resolvePublishAuth(registrySettings);
|
|
19
|
-
if (publishAuth.type === 'npm-oidc') {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
return run(buildAuthOptions(publishAuth, registrySettings).options);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import "./registry-auth-config.js";
|
|
25
2
|
//# sourceMappingURL=metadata-auth-retry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-auth-retry.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/registry/metadata-auth-retry.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"metadata-auth-retry.js","sourceRoot":"","sources":["../../../../../source/bundle-emitter/registry/metadata-auth-retry.ts"],"names":[],"mappings":"AACA,OAKO,2BAA2B,CAAC"}
|