@xemahq/xema 0.59.1 → 0.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/appliance-owner.d.ts.map +1 -1
- package/dist/appliance-owner.js +6 -6
- package/dist/appliance-owner.js.map +1 -1
- package/dist/assets/appliance-base/authorization.lock.json +5186 -0
- package/dist/assets/appliance-base/distribution.lock.json +760 -279
- package/dist/assets/appliance-base/images.lock.json +576 -513
- package/dist/assets/appliance-lean/authorization.lock.json +4648 -0
- package/dist/assets/appliance-lean/distribution.lock.json +641 -186
- package/dist/assets/appliance-lean/images.lock.json +574 -512
- package/dist/assets/boot-graph.json +33 -14
- package/dist/assets/distribution-assets.manifest.json +23 -20
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -9
- package/dist/cli.js.map +1 -1
- package/dist/commands/biome-dev.d.ts.map +1 -1
- package/dist/commands/biome-dev.js +41 -137
- package/dist/commands/biome-dev.js.map +1 -1
- package/dist/commands/biome-lifecycle.d.ts +24 -0
- package/dist/commands/biome-lifecycle.d.ts.map +1 -0
- package/dist/commands/biome-lifecycle.js +253 -0
- package/dist/commands/biome-lifecycle.js.map +1 -0
- package/dist/commands/biome.d.ts +2 -4
- package/dist/commands/biome.d.ts.map +1 -1
- package/dist/commands/biome.js +61 -46
- package/dist/commands/biome.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +96 -8
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +13 -20
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +14 -21
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/installation-tenancy.d.ts +11 -0
- package/dist/commands/installation-tenancy.d.ts.map +1 -0
- package/dist/commands/installation-tenancy.js +308 -0
- package/dist/commands/installation-tenancy.js.map +1 -0
- package/dist/commands/installation.d.ts.map +1 -1
- package/dist/commands/installation.js +19 -5
- package/dist/commands/installation.js.map +1 -1
- package/dist/commands/logs.d.ts +2 -0
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +41 -8
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/{dev.d.ts → mirror.d.ts} +1 -1
- package/dist/commands/mirror.d.ts.map +1 -0
- package/dist/commands/mirror.js +132 -0
- package/dist/commands/mirror.js.map +1 -0
- package/dist/commands/source.d.ts.map +1 -1
- package/dist/commands/source.js +3 -2
- package/dist/commands/source.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +40 -21
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +36 -4
- package/dist/commands/up.js.map +1 -1
- package/dist/dev/infra-preflight.d.ts.map +1 -1
- package/dist/dev/infra-preflight.js +0 -4
- package/dist/dev/infra-preflight.js.map +1 -1
- package/dist/lib/confirm.d.ts +3 -0
- package/dist/lib/confirm.d.ts.map +1 -0
- package/dist/lib/confirm.js +19 -0
- package/dist/lib/confirm.js.map +1 -0
- package/dist/lib/output-format.d.ts +6 -0
- package/dist/lib/output-format.d.ts.map +1 -0
- package/dist/lib/output-format.js +20 -0
- package/dist/lib/output-format.js.map +1 -0
- package/dist/mirror/config/mirror-config-document.d.ts +18 -0
- package/dist/mirror/config/mirror-config-document.d.ts.map +1 -0
- package/dist/mirror/config/mirror-config-document.js +57 -0
- package/dist/mirror/config/mirror-config-document.js.map +1 -0
- package/dist/mirror/config/mirror-config-schema.d.ts +54 -0
- package/dist/mirror/config/mirror-config-schema.d.ts.map +1 -0
- package/dist/mirror/config/mirror-config-schema.js +80 -0
- package/dist/mirror/config/mirror-config-schema.js.map +1 -0
- package/dist/mirror/kit/delta.d.ts +4 -0
- package/dist/mirror/kit/delta.d.ts.map +1 -0
- package/dist/mirror/kit/delta.js +41 -0
- package/dist/mirror/kit/delta.js.map +1 -0
- package/dist/mirror/kit/export-kit.d.ts +16 -0
- package/dist/mirror/kit/export-kit.d.ts.map +1 -0
- package/dist/mirror/kit/export-kit.js +112 -0
- package/dist/mirror/kit/export-kit.js.map +1 -0
- package/dist/mirror/kit/import-kit.d.ts +9 -0
- package/dist/mirror/kit/import-kit.d.ts.map +1 -0
- package/dist/mirror/kit/import-kit.js +166 -0
- package/dist/mirror/kit/import-kit.js.map +1 -0
- package/dist/mirror/kit/kit-archive.d.ts +4 -0
- package/dist/mirror/kit/kit-archive.d.ts.map +1 -0
- package/dist/mirror/kit/kit-archive.js +38 -0
- package/dist/mirror/kit/kit-archive.js.map +1 -0
- package/dist/mirror/kit/kit-layout.d.ts +10 -0
- package/dist/mirror/kit/kit-layout.d.ts.map +1 -0
- package/dist/mirror/kit/kit-layout.js +19 -0
- package/dist/mirror/kit/kit-layout.js.map +1 -0
- package/dist/mirror/kit/kit-sums.d.ts +5 -0
- package/dist/mirror/kit/kit-sums.d.ts.map +1 -0
- package/dist/mirror/kit/kit-sums.js +63 -0
- package/dist/mirror/kit/kit-sums.js.map +1 -0
- package/dist/mirror/kit/layout-sync.d.ts +8 -0
- package/dist/mirror/kit/layout-sync.d.ts.map +1 -0
- package/dist/mirror/kit/layout-sync.js +58 -0
- package/dist/mirror/kit/layout-sync.js.map +1 -0
- package/dist/mirror/plan/bundle-content.d.ts +10 -0
- package/dist/mirror/plan/bundle-content.d.ts.map +1 -0
- package/dist/mirror/plan/bundle-content.js +61 -0
- package/dist/mirror/plan/bundle-content.js.map +1 -0
- package/dist/mirror/plan/declaration-file.d.ts +9 -0
- package/dist/mirror/plan/declaration-file.d.ts.map +1 -0
- package/dist/mirror/plan/declaration-file.js +27 -0
- package/dist/mirror/plan/declaration-file.js.map +1 -0
- package/dist/mirror/plan/edition-inputs.d.ts +57 -0
- package/dist/mirror/plan/edition-inputs.d.ts.map +1 -0
- package/dist/mirror/plan/edition-inputs.js +44 -0
- package/dist/mirror/plan/edition-inputs.js.map +1 -0
- package/dist/mirror/plan/edition-reader.d.ts +9 -0
- package/dist/mirror/plan/edition-reader.d.ts.map +1 -0
- package/dist/mirror/plan/edition-reader.js +47 -0
- package/dist/mirror/plan/edition-reader.js.map +1 -0
- package/dist/mirror/plan/image-content.d.ts +30 -0
- package/dist/mirror/plan/image-content.d.ts.map +1 -0
- package/dist/mirror/plan/image-content.js +120 -0
- package/dist/mirror/plan/image-content.js.map +1 -0
- package/dist/mirror/plan/npm-lockfile.d.ts +12 -0
- package/dist/mirror/plan/npm-lockfile.d.ts.map +1 -0
- package/dist/mirror/plan/npm-lockfile.js +106 -0
- package/dist/mirror/plan/npm-lockfile.js.map +1 -0
- package/dist/mirror/plan/oci-reads.d.ts +22 -0
- package/dist/mirror/plan/oci-reads.d.ts.map +1 -0
- package/dist/mirror/plan/oci-reads.js +43 -0
- package/dist/mirror/plan/oci-reads.js.map +1 -0
- package/dist/mirror/plan/plan-command.d.ts +22 -0
- package/dist/mirror/plan/plan-command.d.ts.map +1 -0
- package/dist/mirror/plan/plan-command.js +81 -0
- package/dist/mirror/plan/plan-command.js.map +1 -0
- package/dist/mirror/plan/plan-file.d.ts +13 -0
- package/dist/mirror/plan/plan-file.d.ts.map +1 -0
- package/dist/mirror/plan/plan-file.js +63 -0
- package/dist/mirror/plan/plan-file.js.map +1 -0
- package/dist/mirror/plan/resolve-content-set.d.ts +16 -0
- package/dist/mirror/plan/resolve-content-set.d.ts.map +1 -0
- package/dist/mirror/plan/resolve-content-set.js +90 -0
- package/dist/mirror/plan/resolve-content-set.js.map +1 -0
- package/dist/mirror/preflight/glob.d.ts +2 -0
- package/dist/mirror/preflight/glob.d.ts.map +1 -0
- package/dist/mirror/preflight/glob.js +59 -0
- package/dist/mirror/preflight/glob.js.map +1 -0
- package/dist/mirror/preflight/harbor-api.d.ts +27 -0
- package/dist/mirror/preflight/harbor-api.d.ts.map +1 -0
- package/dist/mirror/preflight/harbor-api.js +39 -0
- package/dist/mirror/preflight/harbor-api.js.map +1 -0
- package/dist/mirror/preflight/preflight.d.ts +18 -0
- package/dist/mirror/preflight/preflight.d.ts.map +1 -0
- package/dist/mirror/preflight/preflight.js +41 -0
- package/dist/mirror/preflight/preflight.js.map +1 -0
- package/dist/mirror/preflight/tag-moves.d.ts +16 -0
- package/dist/mirror/preflight/tag-moves.d.ts.map +1 -0
- package/dist/mirror/preflight/tag-moves.js +28 -0
- package/dist/mirror/preflight/tag-moves.js.map +1 -0
- package/dist/mirror/preflight/write-probe.d.ts +10 -0
- package/dist/mirror/preflight/write-probe.d.ts.map +1 -0
- package/dist/mirror/preflight/write-probe.js +36 -0
- package/dist/mirror/preflight/write-probe.js.map +1 -0
- package/dist/mirror/target/extras.d.ts +16 -0
- package/dist/mirror/target/extras.d.ts.map +1 -0
- package/dist/mirror/target/extras.js +47 -0
- package/dist/mirror/target/extras.js.map +1 -0
- package/dist/mirror/target/npm-registry.d.ts +20 -0
- package/dist/mirror/target/npm-registry.d.ts.map +1 -0
- package/dist/mirror/target/npm-registry.js +67 -0
- package/dist/mirror/target/npm-registry.js.map +1 -0
- package/dist/mirror/target/npm-sync.d.ts +15 -0
- package/dist/mirror/target/npm-sync.d.ts.map +1 -0
- package/dist/mirror/target/npm-sync.js +44 -0
- package/dist/mirror/target/npm-sync.js.map +1 -0
- package/dist/mirror/target/oci-items.d.ts +27 -0
- package/dist/mirror/target/oci-items.d.ts.map +1 -0
- package/dist/mirror/target/oci-items.js +79 -0
- package/dist/mirror/target/oci-items.js.map +1 -0
- package/dist/mirror/target/oci-sync.d.ts +20 -0
- package/dist/mirror/target/oci-sync.d.ts.map +1 -0
- package/dist/mirror/target/oci-sync.js +93 -0
- package/dist/mirror/target/oci-sync.js.map +1 -0
- package/dist/mirror/target/receipt-store.d.ts +13 -0
- package/dist/mirror/target/receipt-store.d.ts.map +1 -0
- package/dist/mirror/target/receipt-store.js +61 -0
- package/dist/mirror/target/receipt-store.js.map +1 -0
- package/dist/mirror/target/receipt.d.ts +13 -0
- package/dist/mirror/target/receipt.d.ts.map +1 -0
- package/dist/mirror/target/receipt.js +25 -0
- package/dist/mirror/target/receipt.js.map +1 -0
- package/dist/mirror/target/seed-push.d.ts +15 -0
- package/dist/mirror/target/seed-push.d.ts.map +1 -0
- package/dist/mirror/target/seed-push.js +20 -0
- package/dist/mirror/target/seed-push.js.map +1 -0
- package/dist/mirror/target/target-access.d.ts +7 -0
- package/dist/mirror/target/target-access.d.ts.map +1 -0
- package/dist/mirror/target/target-access.js +17 -0
- package/dist/mirror/target/target-access.js.map +1 -0
- package/dist/mirror/target/target-commands.d.ts +21 -0
- package/dist/mirror/target/target-commands.d.ts.map +1 -0
- package/dist/mirror/target/target-commands.js +134 -0
- package/dist/mirror/target/target-commands.js.map +1 -0
- package/dist/mirror/target/target-context.d.ts +11 -0
- package/dist/mirror/target/target-context.d.ts.map +1 -0
- package/dist/mirror/target/target-context.js +31 -0
- package/dist/mirror/target/target-context.js.map +1 -0
- package/dist/mirror/target/target-ports.d.ts +18 -0
- package/dist/mirror/target/target-ports.d.ts.map +1 -0
- package/dist/mirror/target/target-ports.js +49 -0
- package/dist/mirror/target/target-ports.js.map +1 -0
- package/dist/mirror/target/target-state.d.ts +22 -0
- package/dist/mirror/target/target-state.d.ts.map +1 -0
- package/dist/mirror/target/target-state.js +41 -0
- package/dist/mirror/target/target-state.js.map +1 -0
- package/dist/runtime/biome-dev.d.ts +0 -16
- package/dist/runtime/biome-dev.d.ts.map +1 -1
- package/dist/runtime/biome-dev.js +0 -53
- package/dist/runtime/biome-dev.js.map +1 -1
- package/dist/runtime/biome-host/biome-directory-packer.d.ts +3 -0
- package/dist/runtime/biome-host/biome-directory-packer.d.ts.map +1 -0
- package/dist/runtime/biome-host/biome-directory-packer.js +12 -0
- package/dist/runtime/biome-host/biome-directory-packer.js.map +1 -0
- package/dist/runtime/biome-host/bundle-packer.d.ts +8 -0
- package/dist/runtime/biome-host/bundle-packer.d.ts.map +1 -0
- package/dist/runtime/biome-host/bundle-packer.js +3 -0
- package/dist/runtime/biome-host/bundle-packer.js.map +1 -0
- package/dist/runtime/biome-host/from-spec.d.ts +33 -0
- package/dist/runtime/biome-host/from-spec.d.ts.map +1 -0
- package/dist/runtime/biome-host/from-spec.js +70 -0
- package/dist/runtime/biome-host/from-spec.js.map +1 -0
- package/dist/runtime/biome-host/lifecycle-client.d.ts +20 -0
- package/dist/runtime/biome-host/lifecycle-client.d.ts.map +1 -0
- package/dist/runtime/biome-host/lifecycle-client.js +197 -0
- package/dist/runtime/biome-host/lifecycle-client.js.map +1 -0
- package/dist/runtime/biome-host/lifecycle-contract.d.ts +95 -0
- package/dist/runtime/biome-host/lifecycle-contract.d.ts.map +1 -0
- package/dist/runtime/biome-host/lifecycle-contract.js +61 -0
- package/dist/runtime/biome-host/lifecycle-contract.js.map +1 -0
- package/dist/runtime/biome-host/lifecycle-flow.d.ts +29 -0
- package/dist/runtime/biome-host/lifecycle-flow.d.ts.map +1 -0
- package/dist/runtime/biome-host/lifecycle-flow.js +106 -0
- package/dist/runtime/biome-host/lifecycle-flow.js.map +1 -0
- package/dist/runtime/biome-host/plan-sources.d.ts +4 -0
- package/dist/runtime/biome-host/plan-sources.d.ts.map +1 -0
- package/dist/runtime/biome-host/plan-sources.js +26 -0
- package/dist/runtime/biome-host/plan-sources.js.map +1 -0
- package/dist/runtime/biome-host/relay/bundle-fetch.d.ts +12 -0
- package/dist/runtime/biome-host/relay/bundle-fetch.d.ts.map +1 -0
- package/dist/runtime/biome-host/relay/bundle-fetch.js +76 -0
- package/dist/runtime/biome-host/relay/bundle-fetch.js.map +1 -0
- package/dist/runtime/biome-host/relay/declared-scheme.d.ts +3 -0
- package/dist/runtime/biome-host/relay/declared-scheme.d.ts.map +1 -0
- package/dist/runtime/biome-host/relay/declared-scheme.js +14 -0
- package/dist/runtime/biome-host/relay/declared-scheme.js.map +1 -0
- package/dist/runtime/biome-host/relay/npm-token.d.ts +4 -0
- package/dist/runtime/biome-host/relay/npm-token.d.ts.map +1 -0
- package/dist/runtime/biome-host/relay/npm-token.js +16 -0
- package/dist/runtime/biome-host/relay/npm-token.js.map +1 -0
- package/dist/runtime/biome-host/relay/relay-flow.d.ts +16 -0
- package/dist/runtime/biome-host/relay/relay-flow.d.ts.map +1 -0
- package/dist/runtime/biome-host/relay/relay-flow.js +48 -0
- package/dist/runtime/biome-host/relay/relay-flow.js.map +1 -0
- package/dist/runtime/biome-host/source-staging.d.ts +17 -0
- package/dist/runtime/biome-host/source-staging.d.ts.map +1 -0
- package/dist/runtime/biome-host/source-staging.js +80 -0
- package/dist/runtime/biome-host/source-staging.js.map +1 -0
- package/dist/runtime/biome-host/sse.d.ts +2 -0
- package/dist/runtime/biome-host/sse.d.ts.map +1 -0
- package/dist/runtime/biome-host/sse.js +33 -0
- package/dist/runtime/biome-host/sse.js.map +1 -0
- package/dist/runtime/biome-local-install.js +1 -1
- package/dist/runtime/biome-local-install.js.map +1 -1
- package/dist/runtime/browser-origins.d.ts +9 -0
- package/dist/runtime/browser-origins.d.ts.map +1 -1
- package/dist/runtime/browser-origins.js +10 -0
- package/dist/runtime/browser-origins.js.map +1 -1
- package/dist/runtime/config/config-document.d.ts +10 -0
- package/dist/runtime/config/config-document.d.ts.map +1 -0
- package/dist/runtime/config/config-document.js +56 -0
- package/dist/runtime/config/config-document.js.map +1 -0
- package/dist/runtime/config/config-migrations.d.ts +21 -0
- package/dist/runtime/config/config-migrations.d.ts.map +1 -0
- package/dist/runtime/config/config-migrations.js +102 -0
- package/dist/runtime/config/config-migrations.js.map +1 -0
- package/dist/runtime/config/config-paths.d.ts +3 -0
- package/dist/runtime/config/config-paths.d.ts.map +1 -0
- package/dist/runtime/config/config-paths.js +9 -0
- package/dist/runtime/config/config-paths.js.map +1 -0
- package/dist/runtime/config/dev-mode.d.ts +0 -1
- package/dist/runtime/config/dev-mode.d.ts.map +1 -1
- package/dist/runtime/config/dev-mode.js +11 -27
- package/dist/runtime/config/dev-mode.js.map +1 -1
- package/dist/runtime/config/init-presets.js +5 -9
- package/dist/runtime/config/init-presets.js.map +1 -1
- package/dist/runtime/config/launch-config-help.d.ts +4 -0
- package/dist/runtime/config/launch-config-help.d.ts.map +1 -0
- package/dist/runtime/config/launch-config-help.js +42 -0
- package/dist/runtime/config/launch-config-help.js.map +1 -0
- package/dist/runtime/config/launch-config.d.ts +60 -0
- package/dist/runtime/config/launch-config.d.ts.map +1 -0
- package/dist/runtime/config/launch-config.js +123 -0
- package/dist/runtime/config/launch-config.js.map +1 -0
- package/dist/runtime/config/launch-schema.d.ts +18 -0
- package/dist/runtime/config/launch-schema.d.ts.map +1 -0
- package/dist/runtime/config/launch-schema.js +31 -0
- package/dist/runtime/config/launch-schema.js.map +1 -0
- package/dist/runtime/config/loader.d.ts.map +1 -1
- package/dist/runtime/config/loader.js +4 -14
- package/dist/runtime/config/loader.js.map +1 -1
- package/dist/runtime/config/schema.d.ts +43 -38
- package/dist/runtime/config/schema.d.ts.map +1 -1
- package/dist/runtime/config/schema.js +17 -46
- package/dist/runtime/config/schema.js.map +1 -1
- package/dist/runtime/config/sources-config.d.ts +0 -2
- package/dist/runtime/config/sources-config.d.ts.map +1 -1
- package/dist/runtime/config/sources-config.js +10 -29
- package/dist/runtime/config/sources-config.js.map +1 -1
- package/dist/runtime/config/versioned-document.d.ts +26 -0
- package/dist/runtime/config/versioned-document.d.ts.map +1 -0
- package/dist/runtime/config/versioned-document.js +87 -0
- package/dist/runtime/config/versioned-document.js.map +1 -0
- package/dist/runtime/directory-changes.d.ts +12 -0
- package/dist/runtime/directory-changes.d.ts.map +1 -0
- package/dist/runtime/directory-changes.js +62 -0
- package/dist/runtime/directory-changes.js.map +1 -0
- package/dist/runtime/foreground.d.ts +2 -0
- package/dist/runtime/foreground.d.ts.map +1 -1
- package/dist/runtime/foreground.js +5 -20
- package/dist/runtime/foreground.js.map +1 -1
- package/dist/runtime/infra/infra-runner.js +5 -5
- package/dist/runtime/infra/infra-runner.js.map +1 -1
- package/dist/runtime/infra/keycloak-realm.d.ts +3 -19
- package/dist/runtime/infra/keycloak-realm.d.ts.map +1 -1
- package/dist/runtime/infra/keycloak-realm.js +12 -133
- package/dist/runtime/infra/keycloak-realm.js.map +1 -1
- package/dist/runtime/installation/current-launcher-renderer.js.map +1 -1
- package/dist/runtime/installation/from-current-config.d.ts.map +1 -1
- package/dist/runtime/installation/from-current-config.js +24 -47
- package/dist/runtime/installation/from-current-config.js.map +1 -1
- package/dist/runtime/installation/index.d.ts +1 -0
- package/dist/runtime/installation/index.d.ts.map +1 -1
- package/dist/runtime/installation/index.js +1 -0
- package/dist/runtime/installation/index.js.map +1 -1
- package/dist/runtime/installation/installation-file.d.ts +3 -0
- package/dist/runtime/installation/installation-file.d.ts.map +1 -0
- package/dist/runtime/installation/installation-file.js +9 -0
- package/dist/runtime/installation/installation-file.js.map +1 -0
- package/dist/runtime/installation/readiness.d.ts +6 -7
- package/dist/runtime/installation/readiness.d.ts.map +1 -1
- package/dist/runtime/installation/readiness.js +82 -132
- package/dist/runtime/installation/readiness.js.map +1 -1
- package/dist/runtime/installation/state-store.d.ts +4 -0
- package/dist/runtime/installation/state-store.d.ts.map +1 -1
- package/dist/runtime/installation/state-store.js +22 -1
- package/dist/runtime/installation/state-store.js.map +1 -1
- package/dist/runtime/installation/to-current-config.d.ts +4 -1
- package/dist/runtime/installation/to-current-config.d.ts.map +1 -1
- package/dist/runtime/installation/to-current-config.js +10 -36
- package/dist/runtime/installation/to-current-config.js.map +1 -1
- package/dist/runtime/launch-plan-format.d.ts.map +1 -1
- package/dist/runtime/launch-plan-format.js +31 -6
- package/dist/runtime/launch-plan-format.js.map +1 -1
- package/dist/runtime/launch-result.d.ts +15 -0
- package/dist/runtime/launch-result.d.ts.map +1 -0
- package/dist/runtime/launch-result.js +3 -0
- package/dist/runtime/launch-result.js.map +1 -0
- package/dist/runtime/launch.d.ts +16 -5
- package/dist/runtime/launch.d.ts.map +1 -1
- package/dist/runtime/launch.js +151 -315
- package/dist/runtime/launch.js.map +1 -1
- package/dist/runtime/license/helm-pull-secret.d.ts +1 -1
- package/dist/runtime/license/helm-pull-secret.d.ts.map +1 -1
- package/dist/runtime/license/helm-pull-secret.js +2 -2
- package/dist/runtime/license/helm-pull-secret.js.map +1 -1
- package/dist/runtime/lifecycle-progress/index.d.ts +9 -0
- package/dist/runtime/lifecycle-progress/index.d.ts.map +1 -0
- package/dist/runtime/lifecycle-progress/index.js +30 -0
- package/dist/runtime/lifecycle-progress/index.js.map +1 -0
- package/dist/runtime/lifecycle-progress/json-renderer.d.ts +3 -0
- package/dist/runtime/lifecycle-progress/json-renderer.d.ts.map +1 -0
- package/dist/runtime/lifecycle-progress/json-renderer.js +27 -0
- package/dist/runtime/lifecycle-progress/json-renderer.js.map +1 -0
- package/dist/runtime/lifecycle-progress/text-renderer.d.ts +5 -0
- package/dist/runtime/lifecycle-progress/text-renderer.d.ts.map +1 -0
- package/dist/runtime/lifecycle-progress/text-renderer.js +83 -0
- package/dist/runtime/lifecycle-progress/text-renderer.js.map +1 -0
- package/dist/runtime/lifecycle-progress/types.d.ts +79 -0
- package/dist/runtime/lifecycle-progress/types.d.ts.map +1 -0
- package/dist/runtime/lifecycle-progress/types.js +32 -0
- package/dist/runtime/lifecycle-progress/types.js.map +1 -0
- package/dist/runtime/lock-loader.d.ts +13 -3
- package/dist/runtime/lock-loader.d.ts.map +1 -1
- package/dist/runtime/lock-loader.js +28 -8
- package/dist/runtime/lock-loader.js.map +1 -1
- package/dist/runtime/paths.d.ts +2 -0
- package/dist/runtime/paths.d.ts.map +1 -1
- package/dist/runtime/paths.js +17 -4
- package/dist/runtime/paths.js.map +1 -1
- package/dist/runtime/roster.d.ts +6 -5
- package/dist/runtime/roster.d.ts.map +1 -1
- package/dist/runtime/roster.js +0 -21
- package/dist/runtime/roster.js.map +1 -1
- package/dist/runtime/runner/container-preflight.d.ts +3 -2
- package/dist/runtime/runner/container-preflight.d.ts.map +1 -1
- package/dist/runtime/runner/container-preflight.js +5 -5
- package/dist/runtime/runner/container-preflight.js.map +1 -1
- package/dist/runtime/runner/container-runner.d.ts +0 -22
- package/dist/runtime/runner/container-runner.d.ts.map +1 -1
- package/dist/runtime/runner/container-runner.js +0 -112
- package/dist/runtime/runner/container-runner.js.map +1 -1
- package/dist/runtime/runner/docker-cli.d.ts +1 -0
- package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
- package/dist/runtime/runner/docker-cli.js +19 -0
- package/dist/runtime/runner/docker-cli.js.map +1 -1
- package/dist/runtime/runner/helm-cli.d.ts +1 -0
- package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
- package/dist/runtime/runner/helm-cli.js +5 -1
- package/dist/runtime/runner/helm-cli.js.map +1 -1
- package/dist/runtime/runner/helm-pre-install.d.ts +3 -2
- package/dist/runtime/runner/helm-pre-install.d.ts.map +1 -1
- package/dist/runtime/runner/helm-pre-install.js +3 -3
- package/dist/runtime/runner/helm-pre-install.js.map +1 -1
- package/dist/runtime/runner/helm-runner.d.ts +29 -4
- package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
- package/dist/runtime/runner/helm-runner.js +44 -14
- package/dist/runtime/runner/helm-runner.js.map +1 -1
- package/dist/runtime/runner/kube-cli.d.ts +1 -0
- package/dist/runtime/runner/kube-cli.d.ts.map +1 -1
- package/dist/runtime/runner/kube-cli.js +24 -2
- package/dist/runtime/runner/kube-cli.js.map +1 -1
- package/dist/runtime/secrets/managed-local-key-provider.d.ts +2 -0
- package/dist/runtime/secrets/managed-local-key-provider.d.ts.map +1 -1
- package/dist/runtime/secrets/managed-local-key-provider.js +17 -8
- package/dist/runtime/secrets/managed-local-key-provider.js.map +1 -1
- package/dist/runtime/seed/closure-container.d.ts +8 -0
- package/dist/runtime/seed/closure-container.d.ts.map +1 -0
- package/dist/runtime/seed/closure-container.js +23 -0
- package/dist/runtime/seed/closure-container.js.map +1 -0
- package/dist/runtime/seed/closure-helm.d.ts +9 -0
- package/dist/runtime/seed/closure-helm.d.ts.map +1 -0
- package/dist/runtime/seed/closure-helm.js +16 -0
- package/dist/runtime/seed/closure-helm.js.map +1 -0
- package/dist/runtime/seed/closure-names.d.ts +4 -0
- package/dist/runtime/seed/closure-names.d.ts.map +1 -0
- package/dist/runtime/seed/closure-names.js +29 -0
- package/dist/runtime/seed/closure-names.js.map +1 -0
- package/dist/runtime/seed/closure-native.d.ts +3 -0
- package/dist/runtime/seed/closure-native.d.ts.map +1 -0
- package/dist/runtime/seed/closure-native.js +18 -0
- package/dist/runtime/seed/closure-native.js.map +1 -0
- package/dist/runtime/seed/installation-tar.d.ts +5 -0
- package/dist/runtime/seed/installation-tar.d.ts.map +1 -0
- package/dist/runtime/seed/installation-tar.js +30 -0
- package/dist/runtime/seed/installation-tar.js.map +1 -0
- package/dist/runtime/seed/launch-env.d.ts +42 -0
- package/dist/runtime/seed/launch-env.d.ts.map +1 -0
- package/dist/runtime/seed/launch-env.js +150 -0
- package/dist/runtime/seed/launch-env.js.map +1 -0
- package/dist/runtime/seed/seed-container.d.ts +13 -0
- package/dist/runtime/seed/seed-container.d.ts.map +1 -0
- package/dist/runtime/seed/seed-container.js +175 -0
- package/dist/runtime/seed/seed-container.js.map +1 -0
- package/dist/runtime/seed/seed-delivery-env.d.ts +39 -0
- package/dist/runtime/seed/seed-delivery-env.d.ts.map +1 -0
- package/dist/runtime/seed/seed-delivery-env.js +47 -0
- package/dist/runtime/seed/seed-delivery-env.js.map +1 -0
- package/dist/runtime/seed/seed-down.d.ts +2 -0
- package/dist/runtime/seed/seed-down.d.ts.map +1 -0
- package/dist/runtime/seed/seed-down.js +52 -0
- package/dist/runtime/seed/seed-down.js.map +1 -0
- package/dist/runtime/seed/seed-env-file.d.ts +3 -0
- package/dist/runtime/seed/seed-env-file.d.ts.map +1 -0
- package/dist/runtime/seed/seed-env-file.js +24 -0
- package/dist/runtime/seed/seed-env-file.js.map +1 -0
- package/dist/runtime/seed/seed-env-secret.d.ts +18 -0
- package/dist/runtime/seed/seed-env-secret.d.ts.map +1 -0
- package/dist/runtime/seed/seed-env-secret.js +62 -0
- package/dist/runtime/seed/seed-env-secret.js.map +1 -0
- package/dist/runtime/seed/seed-environment.d.ts +12 -0
- package/dist/runtime/seed/seed-environment.d.ts.map +1 -0
- package/dist/runtime/seed/seed-environment.js +66 -0
- package/dist/runtime/seed/seed-environment.js.map +1 -0
- package/dist/runtime/seed/seed-facts.d.ts +22 -0
- package/dist/runtime/seed/seed-facts.d.ts.map +1 -0
- package/dist/runtime/seed/seed-facts.js +40 -0
- package/dist/runtime/seed/seed-facts.js.map +1 -0
- package/dist/runtime/seed/seed-helm.d.ts +10 -0
- package/dist/runtime/seed/seed-helm.d.ts.map +1 -0
- package/dist/runtime/seed/seed-helm.js +74 -0
- package/dist/runtime/seed/seed-helm.js.map +1 -0
- package/dist/runtime/seed/seed-image-user.d.ts +6 -0
- package/dist/runtime/seed/seed-image-user.d.ts.map +1 -0
- package/dist/runtime/seed/seed-image-user.js +14 -0
- package/dist/runtime/seed/seed-image-user.js.map +1 -0
- package/dist/runtime/seed/seed-installation-files.d.ts +23 -0
- package/dist/runtime/seed/seed-installation-files.d.ts.map +1 -0
- package/dist/runtime/seed/seed-installation-files.js +51 -0
- package/dist/runtime/seed/seed-installation-files.js.map +1 -0
- package/dist/runtime/seed/seed-installation.d.ts +20 -0
- package/dist/runtime/seed/seed-installation.d.ts.map +1 -0
- package/dist/runtime/seed/seed-installation.js +36 -0
- package/dist/runtime/seed/seed-installation.js.map +1 -0
- package/dist/runtime/seed/seed-launcher.d.ts +14 -0
- package/dist/runtime/seed/seed-launcher.d.ts.map +1 -0
- package/dist/runtime/seed/seed-launcher.js +155 -0
- package/dist/runtime/seed/seed-launcher.js.map +1 -0
- package/dist/runtime/seed/seed-options.d.ts +22 -0
- package/dist/runtime/seed/seed-options.d.ts.map +1 -0
- package/dist/runtime/seed/seed-options.js +57 -0
- package/dist/runtime/seed/seed-options.js.map +1 -0
- package/dist/runtime/seed/seed-platform-endpoints.d.ts +8 -0
- package/dist/runtime/seed/seed-platform-endpoints.d.ts.map +1 -0
- package/dist/runtime/seed/seed-platform-endpoints.js +55 -0
- package/dist/runtime/seed/seed-platform-endpoints.js.map +1 -0
- package/dist/runtime/seed/seed-process.d.ts +22 -0
- package/dist/runtime/seed/seed-process.d.ts.map +1 -0
- package/dist/runtime/seed/seed-process.js +79 -0
- package/dist/runtime/seed/seed-process.js.map +1 -0
- package/dist/runtime/seed/seed-record.d.ts +101 -0
- package/dist/runtime/seed/seed-record.d.ts.map +1 -0
- package/dist/runtime/seed/seed-record.js +141 -0
- package/dist/runtime/seed/seed-record.js.map +1 -0
- package/dist/runtime/seed/seed-resolved-deployment.d.ts +14 -0
- package/dist/runtime/seed/seed-resolved-deployment.d.ts.map +1 -0
- package/dist/runtime/seed/seed-resolved-deployment.js +52 -0
- package/dist/runtime/seed/seed-resolved-deployment.js.map +1 -0
- package/dist/runtime/seed/substrate-facts.d.ts +52 -0
- package/dist/runtime/seed/substrate-facts.d.ts.map +1 -0
- package/dist/runtime/seed/substrate-facts.js +92 -0
- package/dist/runtime/seed/substrate-facts.js.map +1 -0
- package/dist/runtime/seed/supervisor-contract.d.ts +9 -0
- package/dist/runtime/seed/supervisor-contract.d.ts.map +1 -0
- package/dist/runtime/seed/supervisor-contract.js +68 -0
- package/dist/runtime/seed/supervisor-contract.js.map +1 -0
- package/dist/runtime/seed/workload-identity-facts.d.ts +17 -0
- package/dist/runtime/seed/workload-identity-facts.d.ts.map +1 -0
- package/dist/runtime/seed/workload-identity-facts.js +53 -0
- package/dist/runtime/seed/workload-identity-facts.js.map +1 -0
- package/dist/runtime/sources/schema.d.ts +2 -0
- package/dist/runtime/sources/schema.d.ts.map +1 -1
- package/dist/runtime/sources/schema.js +10 -9
- package/dist/runtime/sources/schema.js.map +1 -1
- package/dist/runtime/store-client.d.ts +0 -10
- package/dist/runtime/store-client.d.ts.map +1 -1
- package/dist/runtime/store-client.js +0 -5
- package/dist/runtime/store-client.js.map +1 -1
- package/dist/runtime/tenancy/identity-installer.d.ts +11 -0
- package/dist/runtime/tenancy/identity-installer.d.ts.map +1 -0
- package/dist/runtime/tenancy/identity-installer.js +39 -0
- package/dist/runtime/tenancy/identity-installer.js.map +1 -0
- package/dist/runtime/tenancy/import-cache.d.ts +5 -0
- package/dist/runtime/tenancy/import-cache.d.ts.map +1 -0
- package/dist/runtime/tenancy/import-cache.js +27 -0
- package/dist/runtime/tenancy/import-cache.js.map +1 -0
- package/dist/runtime/tenancy/openfga.d.ts +4 -0
- package/dist/runtime/tenancy/openfga.d.ts.map +1 -0
- package/dist/runtime/tenancy/openfga.js +29 -0
- package/dist/runtime/tenancy/openfga.js.map +1 -0
- package/dist/runtime/tenancy/servers.d.ts +18 -0
- package/dist/runtime/tenancy/servers.d.ts.map +1 -0
- package/dist/runtime/tenancy/servers.js +102 -0
- package/dist/runtime/tenancy/servers.js.map +1 -0
- package/dist/runtime/tenancy/session.d.ts +19 -0
- package/dist/runtime/tenancy/session.d.ts.map +1 -0
- package/dist/runtime/tenancy/session.js +79 -0
- package/dist/runtime/tenancy/session.js.map +1 -0
- package/dist/runtime/tenancy/specs.d.ts +27 -0
- package/dist/runtime/tenancy/specs.d.ts.map +1 -0
- package/dist/runtime/tenancy/specs.js +129 -0
- package/dist/runtime/tenancy/specs.js.map +1 -0
- package/examples/01-local-native.yaml +1 -3
- package/examples/02-local-container-full.yaml +0 -2
- package/examples/03-byo-infra.yaml +1 -5
- package/examples/06-biome-sources.yaml +1 -3
- package/package.json +32 -37
- package/xema.config.example.yaml +1 -10
- package/dist/assets/keycloak/realm-xema.json +0 -397
- package/dist/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev.js +0 -196
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/edition.d.ts +0 -3
- package/dist/commands/edition.d.ts.map +0 -1
- package/dist/commands/edition.js +0 -54
- package/dist/commands/edition.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -3
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -114
- package/dist/commands/serve.js.map +0 -1
- package/dist/dev/carved-installs.d.ts +0 -3
- package/dist/dev/carved-installs.d.ts.map +0 -1
- package/dist/dev/carved-installs.js +0 -63
- package/dist/dev/carved-installs.js.map +0 -1
- package/dist/dev/env-defaults.d.ts +0 -15
- package/dist/dev/env-defaults.d.ts.map +0 -1
- package/dist/dev/env-defaults.js +0 -178
- package/dist/dev/env-defaults.js.map +0 -1
- package/dist/dev/forked-worker-bootstrap-protocol.d.ts +0 -17
- package/dist/dev/forked-worker-bootstrap-protocol.d.ts.map +0 -1
- package/dist/dev/forked-worker-bootstrap-protocol.js +0 -35
- package/dist/dev/forked-worker-bootstrap-protocol.js.map +0 -1
- package/dist/dev/forked-worker-bootstrap.d.ts +0 -18
- package/dist/dev/forked-worker-bootstrap.d.ts.map +0 -1
- package/dist/dev/forked-worker-bootstrap.js +0 -84
- package/dist/dev/forked-worker-bootstrap.js.map +0 -1
- package/dist/dev/forked-worker.d.ts +0 -43
- package/dist/dev/forked-worker.d.ts.map +0 -1
- package/dist/dev/forked-worker.js +0 -358
- package/dist/dev/forked-worker.js.map +0 -1
- package/dist/edition/verify-image-evidence.bundle.mjs +0 -70456
- package/dist/edition/verify-image-evidence.bundle.provenance.json +0 -3957
- package/dist/runtime/backing-registration.d.ts +0 -11
- package/dist/runtime/backing-registration.d.ts.map +0 -1
- package/dist/runtime/backing-registration.js +0 -94
- package/dist/runtime/backing-registration.js.map +0 -1
- package/dist/runtime/edition/run-entry.d.ts +0 -9
- package/dist/runtime/edition/run-entry.d.ts.map +0 -1
- package/dist/runtime/edition/run-entry.js +0 -36
- package/dist/runtime/edition/run-entry.js.map +0 -1
- package/dist/runtime/edition/verb-map.d.ts +0 -70
- package/dist/runtime/edition/verb-map.d.ts.map +0 -1
- package/dist/runtime/edition/verb-map.js +0 -166
- package/dist/runtime/edition/verb-map.js.map +0 -1
- package/dist/runtime/env-seeder.d.ts +0 -26
- package/dist/runtime/env-seeder.d.ts.map +0 -1
- package/dist/runtime/env-seeder.js +0 -340
- package/dist/runtime/env-seeder.js.map +0 -1
- package/dist/runtime/port-map.d.ts +0 -3
- package/dist/runtime/port-map.d.ts.map +0 -1
- package/dist/runtime/port-map.js +0 -25
- package/dist/runtime/port-map.js.map +0 -1
- package/dist/runtime/run-manifest.d.ts +0 -52
- package/dist/runtime/run-manifest.d.ts.map +0 -1
- package/dist/runtime/run-manifest.js +0 -585
- package/dist/runtime/run-manifest.js.map +0 -1
- package/dist/runtime/runner/native-runner.d.ts +0 -13
- package/dist/runtime/runner/native-runner.d.ts.map +0 -1
- package/dist/runtime/runner/native-runner.js +0 -94
- package/dist/runtime/runner/native-runner.js.map +0 -1
- package/dist/runtime/runner/service-runner.d.ts +0 -28
- package/dist/runtime/runner/service-runner.d.ts.map +0 -1
- package/dist/runtime/runner/service-runner.js +0 -10
- package/dist/runtime/runner/service-runner.js.map +0 -1
- package/dist/runtime/secrets/generated-platform-secrets.d.ts +0 -16
- package/dist/runtime/secrets/generated-platform-secrets.d.ts.map +0 -1
- package/dist/runtime/secrets/generated-platform-secrets.js +0 -115
- package/dist/runtime/secrets/generated-platform-secrets.js.map +0 -1
- package/dist/runtime/secrets/resolver.d.ts +0 -23
- package/dist/runtime/secrets/resolver.d.ts.map +0 -1
- package/dist/runtime/secrets/resolver.js +0 -266
- package/dist/runtime/secrets/resolver.js.map +0 -1
- package/dist/runtime/supervisor.d.ts +0 -67
- package/dist/runtime/supervisor.d.ts.map +0 -1
- package/dist/runtime/supervisor.js +0 -227
- package/dist/runtime/supervisor.js.map +0 -1
- package/edition/README.md +0 -293
- package/edition/adapter-bundled-versions.mjs +0 -108
- package/edition/adapter-host-versions.mjs +0 -41
- package/edition/assemble-producer-input.mjs +0 -1423
- package/edition/assemble-third-party-input.mjs +0 -336
- package/edition/authored-source-check.mjs +0 -135
- package/edition/authorization-base.mjs +0 -357
- package/edition/biome-content.mjs +0 -327
- package/edition/build-biome-index.mjs +0 -180
- package/edition/build-ledger-completeness.mjs +0 -67
- package/edition/build-ledger.mjs +0 -107
- package/edition/build-platform-service-index.mjs +0 -292
- package/edition/build-runtime-image-source-index.mjs +0 -1187
- package/edition/built-verifier.mjs +0 -55
- package/edition/candidate-edition.mjs +0 -697
- package/edition/canonical-evidence-json.mjs +0 -82
- package/edition/canonical-repository-url.mjs +0 -47
- package/edition/catalogue-edition.mjs +0 -49
- package/edition/catalogue-evidence.mjs +0 -228
- package/edition/catalogue-fetch.mjs +0 -124
- package/edition/catalogue-lock-field.mjs +0 -41
- package/edition/catalogue-pin.mjs +0 -71
- package/edition/catalogue.mjs +0 -223
- package/edition/chart-set-source-commit.mjs +0 -97
- package/edition/check-committed-image-evidence.mjs +0 -412
- package/edition/checkout-indexed-source-repositories.mjs +0 -283
- package/edition/collected-refusals.mjs +0 -59
- package/edition/comment-blanker.mjs +0 -75
- package/edition/connector-source-authority.mjs +0 -60
- package/edition/contract-authority.mjs +0 -122
- package/edition/cosign-certificate-constraints.mjs +0 -50
- package/edition/cross-repo-build-inputs.mjs +0 -158
- package/edition/customer-definition.mjs +0 -174
- package/edition/customer-edition-verbs.mjs +0 -617
- package/edition/customer-flags.mjs +0 -15
- package/edition/develop-catalogue-free-resolve.mjs +0 -280
- package/edition/develop-chart-roster.mjs +0 -96
- package/edition/develop-chart-set.mjs +0 -147
- package/edition/develop-coverage-readers.mjs +0 -217
- package/edition/develop-coverage-run.mjs +0 -50
- package/edition/develop-coverage-verdict.mjs +0 -153
- package/edition/develop-coverage.mjs +0 -131
- package/edition/develop-current-resolution.mjs +0 -29
- package/edition/develop-edition-invariants.mjs +0 -142
- package/edition/develop-edition-resolve.mjs +0 -211
- package/edition/develop-edition.mjs +0 -379
- package/edition/develop-engine-image.mjs +0 -95
- package/edition/develop-follow.mjs +0 -491
- package/edition/develop-freeze.mjs +0 -289
- package/edition/develop-git-bundles.mjs +0 -255
- package/edition/develop-graph.mjs +0 -28
- package/edition/develop-image-coordinate.mjs +0 -54
- package/edition/develop-image-probe.mjs +0 -120
- package/edition/develop-image-record.mjs +0 -194
- package/edition/develop-record-ancestry.mjs +0 -144
- package/edition/develop-record-verify.mjs +0 -216
- package/edition/develop-resolve-report.mjs +0 -159
- package/edition/develop-select-records.mjs +0 -172
- package/edition/develop-selection-line.mjs +0 -30
- package/edition/develop-selection-pins.mjs +0 -36
- package/edition/develop-snapshot-inputs.mjs +0 -93
- package/edition/develop-verify-image-record.mjs +0 -109
- package/edition/dispatched-runtime-components.mjs +0 -172
- package/edition/dist-check.mjs +0 -1137
- package/edition/distribution-evidence-set.mjs +0 -1064
- package/edition/distribution-paths.mjs +0 -191
- package/edition/edition-artifact.mjs +0 -529
- package/edition/edition-biome-manifests.mjs +0 -85
- package/edition/edition-ceiling.mjs +0 -180
- package/edition/edition-channel.mjs +0 -20
- package/edition/edition-chart-set.mjs +0 -104
- package/edition/edition-config.mjs +0 -374
- package/edition/edition-constants.mjs +0 -110
- package/edition/edition-contract-parse.mjs +0 -179
- package/edition/edition-contract.json +0 -100
- package/edition/edition-image-seal.mjs +0 -110
- package/edition/edition-kind.mjs +0 -10
- package/edition/edition-list.mjs +0 -35
- package/edition/edition-locks.mjs +0 -79
- package/edition/edition-pin-verbs.mjs +0 -183
- package/edition/edition-pin.mjs +0 -17
- package/edition/edition-pinned-inputs.mjs +0 -116
- package/edition/edition-protocol.mjs +0 -277
- package/edition/edition-publisher.mjs +0 -21
- package/edition/edition-seal.mjs +0 -257
- package/edition/edition-source-pins.mjs +0 -211
- package/edition/edition-unpin.mjs +0 -16
- package/edition/edition-workspace.mjs +0 -204
- package/edition/evidence-checkout.mjs +0 -439
- package/edition/evidence-grammars.mjs +0 -18
- package/edition/evidence-input-mode.mjs +0 -136
- package/edition/evidence-trust-pin.mjs +0 -380
- package/edition/evidence-trust-policy.mjs +0 -374
- package/edition/external-source-walk.mjs +0 -485
- package/edition/first-party-source-ids.mjs +0 -62
- package/edition/fleet-coordinate-finality.mjs +0 -363
- package/edition/fulcio-certificate-extensions.mjs +0 -231
- package/edition/git-json.mjs +0 -54
- package/edition/git-source-auth.mjs +0 -131
- package/edition/image-delivery-entitlement-descriptor.mjs +0 -106
- package/edition/image-evidence-replay-state.mjs +0 -242
- package/edition/image-evidence.mjs +0 -1404
- package/edition/image-lock-service-rows.mjs +0 -26
- package/edition/image-subject-identity.mjs +0 -24
- package/edition/images-from-record.mjs +0 -298
- package/edition/indexes-at-pins.mjs +0 -13
- package/edition/kernel-capability-domain.mjs +0 -30
- package/edition/kernel-contract-authority.mjs +0 -517
- package/edition/kernel-contract-source-path-set.mjs +0 -94
- package/edition/kernel-package.mjs +0 -206
- package/edition/kernel-protocol-choice.mjs +0 -239
- package/edition/kernel-signer-kind.mjs +0 -23
- package/edition/lib.mjs +0 -3303
- package/edition/locked-bundle-signer.mjs +0 -297
- package/edition/map-with-concurrency.mjs +0 -19
- package/edition/no-follow-file.mjs +0 -94
- package/edition/oci-evidence-verbs.mjs +0 -419
- package/edition/oci-image-source-evidence.mjs +0 -364
- package/edition/operation-grant-admission.mjs +0 -285
- package/edition/operation-requirements.mjs +0 -282
- package/edition/oras-process.mjs +0 -35
- package/edition/oras.mjs +0 -742
- package/edition/pin-source.mjs +0 -242
- package/edition/pinned-cosign.mjs +0 -70
- package/edition/plan-image-evidence-refresh.mjs +0 -427
- package/edition/platform-lock-readability.mjs +0 -901
- package/edition/platform-service-class.mjs +0 -85
- package/edition/platform-service-ownership.mjs +0 -88
- package/edition/platform-service-source-authority.mjs +0 -105
- package/edition/positive-closure.mjs +0 -162
- package/edition/previous-seal-registry.mjs +0 -149
- package/edition/produce-distribution-completeness-evidence.mjs +0 -318
- package/edition/produce-edition-catalogue-evidence.mjs +0 -252
- package/edition/produce-image-delivery-entitlement-evidence.mjs +0 -304
- package/edition/produce-image-source-evidence.mjs +0 -788
- package/edition/producer-evidence-bundle.mjs +0 -201
- package/edition/producer-evidence-index-file.mjs +0 -4
- package/edition/record-refused.mjs +0 -12
- package/edition/registry-credentials.mjs +0 -225
- package/edition/release-catalogue.mjs +0 -47
- package/edition/release-channel-guard.mjs +0 -108
- package/edition/release-edition-artifact.mjs +0 -152
- package/edition/release-edition.mjs +0 -54
- package/edition/remedy-command.mjs +0 -89
- package/edition/repin-evidence-trust.mjs +0 -109
- package/edition/required-resource-provider.mjs +0 -58
- package/edition/resolve-chart-set.mjs +0 -376
- package/edition/resolve-customer-edition.mjs +0 -374
- package/edition/resolve-distribution.mjs +0 -2639
- package/edition/resolve-edition.mjs +0 -192
- package/edition/resolve-images.mjs +0 -2351
- package/edition/seal-image-digests.mjs +0 -954
- package/edition/sealed-distribution-lock.mjs +0 -22
- package/edition/sealed-evidence-accept.mjs +0 -82
- package/edition/shallow-checkout.mjs +0 -18
- package/edition/sigstore-bundle-media-type.mjs +0 -4
- package/edition/source-authority.mjs +0 -713
- package/edition/source-closure.mjs +0 -115
- package/edition/store-publisher-trust.mjs +0 -40
- package/edition/strict-json.mjs +0 -121
- package/edition/string-order.mjs +0 -5
- package/edition/third-party-admission.mjs +0 -91
- package/edition/third-party-bundle-registry.mjs +0 -242
- package/edition/third-party-certificate-extensions.mjs +0 -21
- package/edition/third-party-image-pins.mjs +0 -41
- package/edition/third-party-pins-trusted.mjs +0 -24
- package/edition/third-party-producer-evidence.mjs +0 -76
- package/edition/third-party-source-check.mjs +0 -28
- package/edition/third-party-source-context.mjs +0 -41
- package/edition/third-party-source-evidence.mjs +0 -287
- package/edition/third-party-source-flags.mjs +0 -134
- package/edition/third-party-source-pins.mjs +0 -259
- package/edition/third-party-source-uniqueness.mjs +0 -54
- package/edition/third-party-source-walk.mjs +0 -115
- package/edition/third-party-source-writer.mjs +0 -213
- package/edition/third-party-subjects.mjs +0 -128
- package/edition/trust-policy-arming-verb.mjs +0 -60
- package/edition/trust-policy-arming.mjs +0 -144
- package/edition/trust-policy-image-ownership.mjs +0 -85
- package/edition/trusted-executable.mjs +0 -166
- package/edition/verifier-binding.mjs +0 -45
- package/edition/verifier-files.mjs +0 -8
- package/edition/verifier-kernel-schemas.mjs +0 -22
- package/edition/verifier-provenance.mjs +0 -64
- package/edition/verify-catalogue-evidence.mjs +0 -247
- package/edition/verify-image-evidence.mjs +0 -475
- package/edition/verify-image-platforms.mjs +0 -523
- package/edition/why.mjs +0 -56
- package/edition/workspace-sections.mjs +0 -276
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.preflightRepository = exports.PREFLIGHT_TAG = exports.PREFLIGHT_ARTIFACT_TYPE = void 0;
|
|
4
|
+
exports.probeWrite = probeWrite;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
6
|
+
const node_os_1 = require("node:os");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const target_access_1 = require("../target/target-access");
|
|
9
|
+
exports.PREFLIGHT_ARTIFACT_TYPE = 'application/vnd.xema.mirror-preflight.v1';
|
|
10
|
+
exports.PREFLIGHT_TAG = 'probe';
|
|
11
|
+
const preflightRepository = (target) => `${target.registry}/${target.project}/xema-mirror/preflight`;
|
|
12
|
+
exports.preflightRepository = preflightRepository;
|
|
13
|
+
function probeWrite(oras, access, repository) {
|
|
14
|
+
const directory = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'xema-mirror-probe-'));
|
|
15
|
+
try {
|
|
16
|
+
const file = (0, node_path_1.join)(directory, 'probe.json');
|
|
17
|
+
(0, node_fs_1.writeFileSync)(file, '{"xema":"mirror-preflight"}\n');
|
|
18
|
+
oras([
|
|
19
|
+
'push',
|
|
20
|
+
...(0, target_access_1.targetFlags)(access),
|
|
21
|
+
'--artifact-type',
|
|
22
|
+
exports.PREFLIGHT_ARTIFACT_TYPE,
|
|
23
|
+
'--disable-path-validation',
|
|
24
|
+
`${repository}:${exports.PREFLIGHT_TAG}`,
|
|
25
|
+
`${file}:application/json`,
|
|
26
|
+
]);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
return `the target registry refused a write to ${repository}: ${error instanceof Error ? error.message : String(error)}; check the robot's push right and expiry, that the project exists, and the network`;
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
(0, node_fs_1.rmSync)(directory, { recursive: true, force: true });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=write-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-probe.js","sourceRoot":"","sources":["../../../src/mirror/preflight/write-probe.ts"],"names":[],"mappings":";;;AAqBA,gCAoBC;AAzCD,qCAA6D;AAC7D,qCAAiC;AACjC,yCAAiC;AAEjC,2DAAyE;AAI5D,QAAA,uBAAuB,GAAG,0CAA0C,CAAC;AACrE,QAAA,aAAa,GAAG,OAAO,CAAC;AAG9B,MAAM,mBAAmB,GAAG,CAAC,MAA6C,EAAU,EAAE,CAC3F,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,wBAAwB,CAAC;AADlD,QAAA,mBAAmB,uBAC+B;AAQ/D,SAAgB,UAAU,CAAC,IAAU,EAAE,MAAoB,EAAE,UAAkB;IAC7E,MAAM,SAAS,GAAG,IAAA,qBAAW,EAAC,IAAA,gBAAI,EAAC,IAAA,gBAAM,GAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC3C,IAAA,uBAAa,EAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;QACrD,IAAI,CAAC;YACH,MAAM;YACN,GAAG,IAAA,2BAAW,EAAC,MAAM,CAAC;YACtB,iBAAiB;YACjB,+BAAuB;YACvB,2BAA2B;YAC3B,GAAG,UAAU,IAAI,qBAAa,EAAE;YAChC,GAAG,IAAI,mBAAmB;SAC3B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,0CAA0C,UAAU,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,qFAAqF,CAAC;IAC9M,CAAC;YAAS,CAAC;QACT,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Oras } from '@xemahq/oci-closure';
|
|
2
|
+
import { type OciItem } from './oci-items';
|
|
3
|
+
import { type TargetAccess } from './target-access';
|
|
4
|
+
export interface Extras {
|
|
5
|
+
readonly repositories: readonly string[];
|
|
6
|
+
readonly tags: readonly {
|
|
7
|
+
readonly repository: string;
|
|
8
|
+
readonly tag: string;
|
|
9
|
+
}[];
|
|
10
|
+
readonly repositoriesListed: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function findExtras(oras: Oras, access: TargetAccess, target: {
|
|
13
|
+
readonly registry: string;
|
|
14
|
+
readonly project: string;
|
|
15
|
+
}, items: readonly OciItem[], receiptRepository: string): Extras;
|
|
16
|
+
//# sourceMappingURL=extras.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extras.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/extras.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIjE,MAAM,WAAW,MAAM;IAErB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAEhF,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACtC;AAqBD,wBAAgB,UAAU,CACxB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAC/D,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,iBAAiB,EAAE,MAAM,GACxB,MAAM,CAuBR"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findExtras = findExtras;
|
|
4
|
+
const oci_closure_1 = require("@xemahq/oci-closure");
|
|
5
|
+
const target_access_1 = require("./target-access");
|
|
6
|
+
const write_probe_1 = require("../preflight/write-probe");
|
|
7
|
+
function referrerTags(item) {
|
|
8
|
+
const subjects = [item.digest, ...item.referrers];
|
|
9
|
+
return subjects.flatMap((digest) => [
|
|
10
|
+
digest.replace(':', '-'),
|
|
11
|
+
(0, oci_closure_1.cosignTag)(digest, oci_closure_1.ReferrerKind.CosignSignature),
|
|
12
|
+
(0, oci_closure_1.cosignTag)(digest, oci_closure_1.ReferrerKind.CosignAttestation),
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
function tagsOf(oras, access, repository) {
|
|
16
|
+
try {
|
|
17
|
+
return oras(['repo', 'tags', ...(0, target_access_1.targetFlags)(access), repository]);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function findExtras(oras, access, target, items, receiptRepository) {
|
|
24
|
+
const home = `${target.registry}/${target.project}`;
|
|
25
|
+
const known = new Set([...items.map((item) => item.target), receiptRepository, (0, write_probe_1.preflightRepository)(target)]);
|
|
26
|
+
let repositories = [];
|
|
27
|
+
let repositoriesListed = true;
|
|
28
|
+
try {
|
|
29
|
+
repositories = oras(['repo', 'ls', ...(0, target_access_1.targetFlags)(access), home])
|
|
30
|
+
.split('\n')
|
|
31
|
+
.map((line) => line.trim())
|
|
32
|
+
.filter((line) => line.length > 0 && !known.has(`${home}/${line}`));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
repositoriesListed = false;
|
|
36
|
+
}
|
|
37
|
+
const tags = items.flatMap((item) => {
|
|
38
|
+
const allowed = new Set([...item.tags, ...referrerTags(item)]);
|
|
39
|
+
return tagsOf(oras, access, item.target)
|
|
40
|
+
.split('\n')
|
|
41
|
+
.map((line) => line.trim())
|
|
42
|
+
.filter((tag) => tag.length > 0 && !allowed.has(tag))
|
|
43
|
+
.map((tag) => ({ repository: item.target, tag }));
|
|
44
|
+
});
|
|
45
|
+
return { repositories, tags, repositoriesListed };
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=extras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extras.js","sourceRoot":"","sources":["../../../src/mirror/target/extras.ts"],"names":[],"mappings":";;AAkCA,gCA6BC;AA/DD,qDAAyE;AAGzE,mDAAiE;AACjE,0DAA+D;AAY/D,SAAS,YAAY,CAAC,IAAa;IACjC,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;IAClD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;QACxB,IAAA,uBAAS,EAAC,MAAM,EAAE,0BAAY,CAAC,eAAe,CAAC;QAC/C,IAAA,uBAAS,EAAC,MAAM,EAAE,0BAAY,CAAC,iBAAiB,CAAC;KAClD,CAAC,CAAC;AACL,CAAC;AAGD,SAAS,MAAM,CAAC,IAAU,EA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I,EAAE,EAAE;QAClC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;aACrC,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aAC1B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aACpD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NpmTarget, TarballSource } from './npm-sync';
|
|
2
|
+
export declare const MIRROR_DIST_TAG = "xema-mirror";
|
|
3
|
+
export type NpmRunner = (args: readonly string[], env: Readonly<Record<string, string>>, cwd: string) => void;
|
|
4
|
+
export declare function createNpmRunner(baseEnv: NodeJS.ProcessEnv): NpmRunner;
|
|
5
|
+
export type FetchLike = (url: string, init?: {
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
readonly ok: boolean;
|
|
9
|
+
readonly status: number;
|
|
10
|
+
json(): Promise<unknown>;
|
|
11
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function createNpmTarget(input: {
|
|
14
|
+
readonly registry: string;
|
|
15
|
+
readonly token: string;
|
|
16
|
+
readonly fetch: FetchLike;
|
|
17
|
+
readonly runNpm: NpmRunner;
|
|
18
|
+
}): NpmTarget;
|
|
19
|
+
export declare function createTarballSource(fetchFn: FetchLike): TarballSource;
|
|
20
|
+
//# sourceMappingURL=npm-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/npm-registry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3D,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAG7C,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAG9G,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAIrE;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KAAK,OAAO,CAAC;IAC5F,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACrC,CAAC,CAAC;AAeH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B,GAAG,SAAS,CA0CZ;AAGD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,GAAG,aAAa,CAQrE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MIRROR_DIST_TAG = void 0;
|
|
4
|
+
exports.createNpmRunner = createNpmRunner;
|
|
5
|
+
exports.createNpmTarget = createNpmTarget;
|
|
6
|
+
exports.createTarballSource = createTarballSource;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_os_1 = require("node:os");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
exports.MIRROR_DIST_TAG = 'xema-mirror';
|
|
12
|
+
function createNpmRunner(baseEnv) {
|
|
13
|
+
return (args, env, cwd) => {
|
|
14
|
+
(0, node_child_process_1.execFileSync)('npm', [...args], { cwd, env: { PATH: baseEnv['PATH'] ?? '', ...env }, stdio: ['ignore', 'inherit', 'inherit'] });
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const registryUrl = (registry, name) => `${registry.replace(/\/+$/u, '')}/${name.replace('/', '%2F')}`;
|
|
18
|
+
function createNpmTarget(input) {
|
|
19
|
+
const { runNpm } = input;
|
|
20
|
+
const authority = new URL(input.registry).host;
|
|
21
|
+
const readPackument = async (name) => {
|
|
22
|
+
const response = await input.fetch(registryUrl(input.registry, name), {
|
|
23
|
+
headers: { authorization: `Bearer ${input.token}`, accept: 'application/json' },
|
|
24
|
+
});
|
|
25
|
+
if (response.status === 404) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
throw new Error(`${registryUrl(input.registry, name)} answered ${String(response.status)}`);
|
|
30
|
+
}
|
|
31
|
+
return (await response.json());
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
async heldIntegrity(name, version) {
|
|
35
|
+
const packument = await readPackument(name);
|
|
36
|
+
return packument?.versions?.[version]?.dist?.integrity ?? null;
|
|
37
|
+
},
|
|
38
|
+
async removeDistTag(name, distTag) {
|
|
39
|
+
const packument = await readPackument(name);
|
|
40
|
+
if (packument === null || packument['dist-tags']?.[distTag] === undefined) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
runNpm(['dist-tag', 'rm', name, distTag, '--registry', input.registry], { [`npm_config_//${authority}/:_authToken`]: input.token }, (0, node_os_1.tmpdir)());
|
|
44
|
+
},
|
|
45
|
+
publish(_pkg, tarball, distTag) {
|
|
46
|
+
const directory = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'xema-mirror-npm-'));
|
|
47
|
+
try {
|
|
48
|
+
const file = (0, node_path_1.join)(directory, 'package.tgz');
|
|
49
|
+
(0, node_fs_1.writeFileSync)(file, tarball);
|
|
50
|
+
runNpm(['publish', file, '--registry', input.registry, '--tag', distTag, '--ignore-scripts'], { [`npm_config_//${authority}/:_authToken`]: input.token }, directory);
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
(0, node_fs_1.rmSync)(directory, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function createTarballSource(fetchFn) {
|
|
59
|
+
return async (url) => {
|
|
60
|
+
const response = await fetchFn(url);
|
|
61
|
+
if (!response.ok) {
|
|
62
|
+
throw new Error(`${url} answered ${String(response.status)}`);
|
|
63
|
+
}
|
|
64
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=npm-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.js","sourceRoot":"","sources":["../../../src/mirror/target/npm-registry.ts"],"names":[],"mappings":";;;AAeA,0CAIC;AAsBD,0CA+CC;AAGD,kDAQC;AAnGD,2DAAkD;AAClD,qCAA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AAE,OAAO,CAAC,CAAC;gBAC7B,MAAM,CACJ,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,EACrF,EAAE,CAAC,gBAAgB,SAAS,cAAc,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,EAC1D,SAAS,CACV,CAAC;YACJ,CAAC;oBAAS,CAAC;gBACT,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACtD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAGD,SAAgB,mBAAmB,CAAC,OAAkB;IACpD,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,aAAa,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,IAAI,UAAU,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MirrorNpmPackage } from '@xemahq/contracts/mirror';
|
|
2
|
+
export interface NpmTarget {
|
|
3
|
+
heldIntegrity(name: string, version: string): Promise<string | null>;
|
|
4
|
+
publish(pkg: MirrorNpmPackage, tarball: Uint8Array, distTag: string): void;
|
|
5
|
+
removeDistTag(name: string, distTag: string): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export type TarballSource = (url: string) => Promise<Uint8Array>;
|
|
8
|
+
export declare const integrityOf: (bytes: Uint8Array) => string;
|
|
9
|
+
export interface NpmGap {
|
|
10
|
+
readonly pkg: MirrorNpmPackage;
|
|
11
|
+
readonly what: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function npmGaps(target: NpmTarget, packages: readonly MirrorNpmPackage[]): Promise<readonly NpmGap[]>;
|
|
14
|
+
export declare function pushNpm(target: NpmTarget, fetchTarball: TarballSource, packages: readonly MirrorNpmPackage[], distTag: string, onPublished: (pkg: MirrorNpmPackage, bytes: number) => void): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=npm-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-sync.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/npm-sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,WAAW,SAAS;IAExB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAErE,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3E,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;AAGD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAEjE,eAAO,MAAM,WAAW,GAAI,OAAO,UAAU,KAAG,MAAyE,CAAC;AAE1H,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAsB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAWlH;AAOD,wBAAsB,OAAO,CAC3B,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,aAAa,EAC3B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,CAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAC1D,OAAO,CAAC,IAAI,CAAC,CAqBf"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.integrityOf = void 0;
|
|
4
|
+
exports.npmGaps = npmGaps;
|
|
5
|
+
exports.pushNpm = pushNpm;
|
|
6
|
+
const node_crypto_1 = require("node:crypto");
|
|
7
|
+
const integrityOf = (bytes) => `sha512-${(0, node_crypto_1.createHash)('sha512').update(bytes).digest('base64')}`;
|
|
8
|
+
exports.integrityOf = integrityOf;
|
|
9
|
+
async function npmGaps(target, packages) {
|
|
10
|
+
const gaps = [];
|
|
11
|
+
for (const pkg of packages) {
|
|
12
|
+
const held = await target.heldIntegrity(pkg.name, pkg.version);
|
|
13
|
+
if (held === null) {
|
|
14
|
+
gaps.push({ pkg, what: 'is not published' });
|
|
15
|
+
}
|
|
16
|
+
else if (held !== pkg.integrity) {
|
|
17
|
+
gaps.push({ pkg, what: `is published with integrity ${held}, not ${pkg.integrity}` });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return gaps;
|
|
21
|
+
}
|
|
22
|
+
async function pushNpm(target, fetchTarball, packages, distTag, onPublished) {
|
|
23
|
+
for (const pkg of packages) {
|
|
24
|
+
const held = await target.heldIntegrity(pkg.name, pkg.version);
|
|
25
|
+
if (held === pkg.integrity) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (held !== null) {
|
|
29
|
+
throw new Error(`${pkg.name}@${pkg.version} is on the target with integrity ${held}, not ${pkg.integrity}; it is never overwritten`);
|
|
30
|
+
}
|
|
31
|
+
const bytes = await fetchTarball(pkg.tarball);
|
|
32
|
+
const actual = (0, exports.integrityOf)(bytes);
|
|
33
|
+
if (actual !== pkg.integrity) {
|
|
34
|
+
throw new Error(`${pkg.tarball} has integrity ${actual}, not the locked ${pkg.integrity}`);
|
|
35
|
+
}
|
|
36
|
+
target.publish(pkg, bytes, distTag);
|
|
37
|
+
const after = await target.heldIntegrity(pkg.name, pkg.version);
|
|
38
|
+
if (after !== pkg.integrity) {
|
|
39
|
+
throw new Error(`${pkg.name}@${pkg.version} reads back from the target as ${JSON.stringify(after)} after publishing`);
|
|
40
|
+
}
|
|
41
|
+
onPublished(pkg, bytes.byteLength);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=npm-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-sync.js","sourceRoot":"","sources":["../../../src/mirror/target/npm-sync.ts"],"names":[],"mappings":";;;AAyBA,0BAWC;AAOD,0BA2BC;AAtED,6CAAyC;AAiBlC,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAU,EAAE,CAAC,UAAU,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;AAA7G,QAAA,WAAW,eAAkG;AAQnH,KAAK,UAAU,OAAO,CAAC,MAAiB,EAAE,QAAqC;IACpF,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,IAAI,KAAK,GAAG,CAAC,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AK,GAAG,CAAC,SAAS,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,kCAAkC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACxH,CAAC;QACD,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ImageRegistryMirror, type MirrorContentSet, type MirrorSubject } from '@xemahq/contracts/mirror';
|
|
2
|
+
export declare enum OciSection {
|
|
3
|
+
Edition = "edition",
|
|
4
|
+
Image = "image",
|
|
5
|
+
InfraImage = "infra-image",
|
|
6
|
+
Bundle = "bundle",
|
|
7
|
+
Chart = "chart"
|
|
8
|
+
}
|
|
9
|
+
export interface OciItem {
|
|
10
|
+
readonly section: OciSection;
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly source: string;
|
|
13
|
+
readonly target: string;
|
|
14
|
+
readonly digest: string;
|
|
15
|
+
readonly referrers: readonly string[];
|
|
16
|
+
readonly tags: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const archiveTag: (archiveDigest: string) => string;
|
|
19
|
+
export declare function ociItems(set: Pick<MirrorContentSet, 'images' | 'bundles' | 'charts'> & {
|
|
20
|
+
readonly editionArtifact: MirrorSubject | null;
|
|
21
|
+
}, mirror: ImageRegistryMirror): readonly OciItem[];
|
|
22
|
+
export declare function seedItem(seed: {
|
|
23
|
+
readonly source: string;
|
|
24
|
+
readonly digest: string;
|
|
25
|
+
readonly tags: readonly string[];
|
|
26
|
+
}, referrers: readonly string[], mirror: ImageRegistryMirror): OciItem;
|
|
27
|
+
//# sourceMappingURL=oci-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oci-items.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/oci-items.ts"],"names":[],"mappings":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});
|
|
3
|
+
exports.archiveTag = exports.OciSection = void 0;
|
|
4
|
+
exports.ociItems = ociItems;
|
|
5
|
+
exports.seedItem = seedItem;
|
|
6
|
+
const mirror_1 = require("@xemahq/contracts/mirror");
|
|
7
|
+
var OciSection;
|
|
8
|
+
(function (OciSection) {
|
|
9
|
+
OciSection["Edition"] = "edition";
|
|
10
|
+
OciSection["Image"] = "image";
|
|
11
|
+
OciSection["InfraImage"] = "infra-image";
|
|
12
|
+
OciSection["Bundle"] = "bundle";
|
|
13
|
+
OciSection["Chart"] = "chart";
|
|
14
|
+
})(OciSection || (exports.OciSection = OciSection = {}));
|
|
15
|
+
const SUBJECT_SECTIONS = {
|
|
16
|
+
[mirror_1.MirrorSubjectKind.Edition]: OciSection.Edition,
|
|
17
|
+
[mirror_1.MirrorSubjectKind.Image]: OciSection.Image,
|
|
18
|
+
[mirror_1.MirrorSubjectKind.InfraImage]: OciSection.InfraImage,
|
|
19
|
+
};
|
|
20
|
+
const OCI_SCHEME = 'oci://';
|
|
21
|
+
const archiveTag = (archiveDigest) => archiveDigest.replace(':', '-');
|
|
22
|
+
exports.archiveTag = archiveTag;
|
|
23
|
+
function targetRepository(source, mirror) {
|
|
24
|
+
const mapped = (0, mirror_1.mirrorImageRef)(source, mirror);
|
|
25
|
+
if (!mapped.covered) {
|
|
26
|
+
throw new Error(`target.images.mirror has no entry covering ${source}: the target's naming is the map, so every source must be covered`);
|
|
27
|
+
}
|
|
28
|
+
return mapped.imageRef;
|
|
29
|
+
}
|
|
30
|
+
function subjectItem(subject, mirror) {
|
|
31
|
+
return {
|
|
32
|
+
section: SUBJECT_SECTIONS[subject.kind],
|
|
33
|
+
label: `${subject.source}`,
|
|
34
|
+
source: subject.source,
|
|
35
|
+
target: targetRepository(subject.source, mirror),
|
|
36
|
+
digest: subject.digest,
|
|
37
|
+
referrers: subject.referrers,
|
|
38
|
+
tags: subject.tags,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ociItems(set, mirror) {
|
|
42
|
+
return [
|
|
43
|
+
...(set.editionArtifact === null ? [] : [subjectItem(set.editionArtifact, mirror)]),
|
|
44
|
+
...set.images.map((image) => subjectItem(image, mirror)),
|
|
45
|
+
...set.bundles.map((bundle) => ({
|
|
46
|
+
section: OciSection.Bundle,
|
|
47
|
+
label: `${bundle.biome}${bundle.channel === undefined ? '' : `:${bundle.channel}`}`,
|
|
48
|
+
source: bundle.source,
|
|
49
|
+
target: targetRepository(bundle.source, mirror),
|
|
50
|
+
digest: bundle.digest,
|
|
51
|
+
referrers: bundle.referrers,
|
|
52
|
+
tags: [(0, exports.archiveTag)(bundle.archiveDigest), ...(bundle.channel === undefined ? [] : [bundle.channel])].sort(),
|
|
53
|
+
})),
|
|
54
|
+
...set.charts.map((chart) => {
|
|
55
|
+
const source = chart.source.slice(OCI_SCHEME.length);
|
|
56
|
+
return {
|
|
57
|
+
section: OciSection.Chart,
|
|
58
|
+
label: `${chart.name} ${chart.version}`,
|
|
59
|
+
source,
|
|
60
|
+
target: targetRepository(source, mirror),
|
|
61
|
+
digest: chart.digest,
|
|
62
|
+
referrers: [],
|
|
63
|
+
tags: [chart.version],
|
|
64
|
+
};
|
|
65
|
+
}),
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
function seedItem(seed, referrers, mirror) {
|
|
69
|
+
return {
|
|
70
|
+
section: OciSection.Image,
|
|
71
|
+
label: seed.source,
|
|
72
|
+
source: seed.source,
|
|
73
|
+
target: targetRepository(seed.source, mirror),
|
|
74
|
+
digest: seed.digest,
|
|
75
|
+
referrers,
|
|
76
|
+
tags: [...seed.tags].sort(),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=oci-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oci-items.js","sourceRoot":"","sources":["../../../src/mirror/target/oci-items.ts"],"names":[],"mappings":";;;AAgEA,4BA6BC;AAGD,4BAcC;AA9GD,qDAMkC;AAGlC,IAAY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O;gBACL,OAAO,EAAE,UAAU,CAAC,KAAK;gBACzB,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE;gBACvC,MAAM;gBACN,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC;gBACxC,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,SAAS,EAAE,EAAE;gBACb,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;aACtB,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC;AAGD,SAAgB,QAAQ,CACtB,IAA4F,EAC5F,SAA4B,EAC5B,MAA2B;IAE3B,OAAO;QACL,OAAO,EAAE,UAAU,CAAC,KAAK;QACzB,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;QAC7C,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,SAAS;QACT,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Oras } from '@xemahq/oci-closure';
|
|
2
|
+
import { type TargetAccess } from './target-access';
|
|
3
|
+
import type { OciItem } from './oci-items';
|
|
4
|
+
export interface Gap {
|
|
5
|
+
readonly item: OciItem;
|
|
6
|
+
readonly what: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function itemGaps(oras: Oras, access: TargetAccess, item: OciItem): readonly Gap[];
|
|
9
|
+
export declare function cosignTagsToRestore(item: OciItem, resolveTag: (tag: string) => string | null): readonly {
|
|
10
|
+
tag: string;
|
|
11
|
+
digest: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function tryResolve(oras: Oras, args: readonly string[]): string | null;
|
|
14
|
+
export declare function pushItem(oras: Oras, access: TargetAccess, item: OciItem): void;
|
|
15
|
+
export declare function applyTags(oras: Oras, access: TargetAccess, item: OciItem, tags: readonly {
|
|
16
|
+
tag: string;
|
|
17
|
+
digest: string;
|
|
18
|
+
}[]): void;
|
|
19
|
+
export declare function targetHolds(oras: Oras, access: TargetAccess, item: OciItem, digest: string): boolean;
|
|
20
|
+
//# sourceMappingURL=oci-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oci-sync.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/oci-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEtG,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAaD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,EAAE,CAiBxF;AAaD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACzC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,CAU5C;AAGD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAO7E;AAOD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAa9E;AAGD,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAC/C,IAAI,CAWN;AAGD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpG"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.itemGaps = itemGaps;
|
|
4
|
+
exports.cosignTagsToRestore = cosignTagsToRestore;
|
|
5
|
+
exports.tryResolve = tryResolve;
|
|
6
|
+
exports.pushItem = pushItem;
|
|
7
|
+
exports.applyTags = applyTags;
|
|
8
|
+
exports.targetHolds = targetHolds;
|
|
9
|
+
const oci_closure_1 = require("@xemahq/oci-closure");
|
|
10
|
+
const target_access_1 = require("./target-access");
|
|
11
|
+
function resolveOnTarget(oras, access, reference) {
|
|
12
|
+
try {
|
|
13
|
+
return oras(['resolve', ...(0, target_access_1.targetFlags)(access), reference]).trim();
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function itemGaps(oras, access, item) {
|
|
20
|
+
const gaps = [];
|
|
21
|
+
if (resolveOnTarget(oras, access, `${item.target}@${item.digest}`) !== item.digest) {
|
|
22
|
+
return [{ item, what: `${item.target}@${item.digest} is not resolvable` }];
|
|
23
|
+
}
|
|
24
|
+
for (const referrer of item.referrers) {
|
|
25
|
+
if (resolveOnTarget(oras, access, `${item.target}@${referrer}`) !== referrer) {
|
|
26
|
+
gaps.push({ item, what: `referrer ${referrer} is not resolvable` });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
for (const tag of item.tags) {
|
|
30
|
+
const named = resolveOnTarget(oras, access, `${item.target}:${tag}`);
|
|
31
|
+
if (named !== item.digest) {
|
|
32
|
+
gaps.push({ item, what: named === null ? `tag ${tag} is absent` : `tag ${tag} names ${named}` });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return gaps;
|
|
36
|
+
}
|
|
37
|
+
const COPY_SPECS = ['--from-distribution-spec', oci_closure_1.REFERRERS_DISTRIBUTION_SPEC, '--to-distribution-spec', oci_closure_1.REFERRERS_DISTRIBUTION_SPEC];
|
|
38
|
+
function copyDigest(oras, access, item, digest) {
|
|
39
|
+
oras(['cp', ...COPY_SPECS, ...(0, target_access_1.copyToTargetFlags)(access), `${item.source}@${digest}`, item.target]);
|
|
40
|
+
const landed = resolveOnTarget(oras, access, `${item.target}@${digest}`);
|
|
41
|
+
if (landed !== digest) {
|
|
42
|
+
throw new Error(`${item.target}@${digest} resolves to ${JSON.stringify(landed)} after the copy`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function cosignTagsToRestore(item, resolveTag) {
|
|
46
|
+
const out = [];
|
|
47
|
+
for (const kind of [oci_closure_1.ReferrerKind.CosignSignature, oci_closure_1.ReferrerKind.CosignAttestation]) {
|
|
48
|
+
const tag = (0, oci_closure_1.cosignTag)(item.digest, kind);
|
|
49
|
+
const named = resolveTag(tag);
|
|
50
|
+
if (named !== null && item.referrers.includes(named)) {
|
|
51
|
+
out.push({ tag, digest: named });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
function tryResolve(oras, args) {
|
|
57
|
+
try {
|
|
58
|
+
return oras(['resolve', ...args]).trim();
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function pushItem(oras, access, item) {
|
|
65
|
+
if (resolveOnTarget(oras, access, `${item.target}@${item.digest}`) !== item.digest) {
|
|
66
|
+
copyDigest(oras, access, item, item.digest);
|
|
67
|
+
}
|
|
68
|
+
for (const referrer of item.referrers) {
|
|
69
|
+
if (resolveOnTarget(oras, access, `${item.target}@${referrer}`) !== referrer) {
|
|
70
|
+
copyDigest(oras, access, item, referrer);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
applyTags(oras, access, item, [
|
|
74
|
+
...cosignTagsToRestore(item, (tag) => tryResolve(oras, [`${item.source}:${tag}`])),
|
|
75
|
+
...item.tags.map((tag) => ({ tag, digest: item.digest })),
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
function applyTags(oras, access, item, tags) {
|
|
79
|
+
for (const { tag, digest } of tags) {
|
|
80
|
+
if (resolveOnTarget(oras, access, `${item.target}:${tag}`) === digest) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
oras(['tag', ...(0, target_access_1.targetFlags)(access), `${item.target}@${digest}`, tag]);
|
|
84
|
+
const named = resolveOnTarget(oras, access, `${item.target}:${tag}`);
|
|
85
|
+
if (named !== digest) {
|
|
86
|
+
throw new Error(`${item.target}:${tag} names ${JSON.stringify(named)}, not ${digest}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function targetHolds(oras, access, item, digest) {
|
|
91
|
+
return resolveOnTarget(oras, access, `${item.target}@${digest}`) === digest;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=oci-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oci-sync.js","sourceRoot":"","sources":["../../../src/mirror/target/oci-sync.ts"],"names":[],"mappings":";;AAuBA,4BAiBC;AAaD,kDAaC;AAGD,gCAOC;AAOD,4BAaC;AAGD,8BAgBC;AAGD,kCAEC;AAxHD,qDAAsG;AAEtG,mDAAoF;AAWpF,SAAS,eAAe,CAAC,IAAU,EAAE,MAAoB,EAAE,SAAiB;IAC1E,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,CAAC,SAAS,EAAE,GAAG,IAAA,2BAAW,EAAC,MA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L,CAAC;AAGD,SAAgB,SAAS,CACvB,IAAU,EACV,MAAoB,EACpB,IAAa,EACb,IAAgD;IAEhD,KAAK,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACnC,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,MAAM,EAAE,CAAC;YACtE,SAAS;QACX,CAAC;QACD,IAAI,CAAC,CAAC,KAAK,EAAE,GAAG,IAAA,2BAAW,EAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;QACvE,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QACrE,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,UAAU,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;AACH,CAAC;AAGD,SAAgB,WAAW,CAAC,IAAU,EAAE,MAAoB,EAAE,IAAa,EAAE,MAAc;IACzF,OAAO,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type MirrorReceipt } from '@xemahq/contracts/mirror';
|
|
2
|
+
import { type TargetAccess } from './target-access';
|
|
3
|
+
import type { Oras } from '@xemahq/oci-closure';
|
|
4
|
+
export declare const RECEIPT_ARTIFACT_TYPE = "application/vnd.xema.mirror-receipt.v1+json";
|
|
5
|
+
export declare const RECEIPT_CURRENT_TAG = "current";
|
|
6
|
+
export declare const receiptRepository: (target: {
|
|
7
|
+
registry: string;
|
|
8
|
+
project: string;
|
|
9
|
+
}) => string;
|
|
10
|
+
export declare function readCurrentReceipt(oras: Oras, access: TargetAccess, repository: string): MirrorReceipt | null;
|
|
11
|
+
export declare const serializeReceipt: (receipt: MirrorReceipt) => string;
|
|
12
|
+
export declare function publishReceipt(oras: Oras, access: TargetAccess, repository: string, receipt: MirrorReceipt, tagOverride?: string | null): string;
|
|
13
|
+
//# sourceMappingURL=receipt-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-store.d.ts","sourceRoot":"","sources":["../../../src/mirror/target/receipt-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAIhD,eAAO,MAAM,qBAAqB,gDAAgD,CAAC;AACnF,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAI7C,eAAO,MAAM,iBAAiB,GAAI,QAAQ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAG,MACtB,CAAC;AAG7D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAkB7G;AAED,eAAO,MAAM,gBAAgB,GAAI,SAAS,aAAa,KAAG,MAAiD,CAAC;AAG5G,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,aAAa,EACtB,WAAW,GAAE,MAAM,GAAG,IAAW,GAChC,MAAM,CAqBR"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeReceipt = exports.receiptRepository = exports.RECEIPT_CURRENT_TAG = exports.RECEIPT_ARTIFACT_TYPE = void 0;
|
|
4
|
+
exports.readCurrentReceipt = readCurrentReceipt;
|
|
5
|
+
exports.publishReceipt = publishReceipt;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const mirror_1 = require("@xemahq/contracts/mirror");
|
|
10
|
+
const server_1 = require("@xemahq/contracts/mirror/server");
|
|
11
|
+
const target_access_1 = require("./target-access");
|
|
12
|
+
exports.RECEIPT_ARTIFACT_TYPE = 'application/vnd.xema.mirror-receipt.v1+json';
|
|
13
|
+
exports.RECEIPT_CURRENT_TAG = 'current';
|
|
14
|
+
const RECEIPT_TAG_LENGTH = 12;
|
|
15
|
+
const receiptRepository = (target) => `${target.registry}/${target.project}/xema-mirror/receipt`;
|
|
16
|
+
exports.receiptRepository = receiptRepository;
|
|
17
|
+
function readCurrentReceipt(oras, access, repository) {
|
|
18
|
+
let manifestText;
|
|
19
|
+
try {
|
|
20
|
+
manifestText = oras(['manifest', 'fetch', ...(0, target_access_1.targetFlags)(access), `${repository}:${exports.RECEIPT_CURRENT_TAG}`]);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const manifest = JSON.parse(manifestText);
|
|
26
|
+
const layer = manifest.layers?.[0]?.digest;
|
|
27
|
+
if (layer === undefined) {
|
|
28
|
+
throw new Error(`${repository}:${exports.RECEIPT_CURRENT_TAG} is not a receipt artifact (no layer)`);
|
|
29
|
+
}
|
|
30
|
+
const parsed = mirror_1.MirrorReceiptSchema.safeParse(JSON.parse(oras(['blob', 'fetch', ...(0, target_access_1.targetFlags)(access), '--output', '-', `${repository}@${layer}`])));
|
|
31
|
+
if (!parsed.success) {
|
|
32
|
+
throw new Error(`${repository}:${exports.RECEIPT_CURRENT_TAG} is not a valid receipt: ${parsed.error.issues[0]?.message ?? 'invalid'}`);
|
|
33
|
+
}
|
|
34
|
+
return parsed.data;
|
|
35
|
+
}
|
|
36
|
+
const serializeReceipt = (receipt) => `${JSON.stringify(receipt, null, 2)}\n`;
|
|
37
|
+
exports.serializeReceipt = serializeReceipt;
|
|
38
|
+
function publishReceipt(oras, access, repository, receipt, tagOverride = null) {
|
|
39
|
+
const digest = (0, server_1.mirrorReceiptDigest)(receipt);
|
|
40
|
+
const tag = tagOverride ?? digest.slice('sha256:'.length, 'sha256:'.length + RECEIPT_TAG_LENGTH);
|
|
41
|
+
const directory = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'xema-mirror-receipt-'));
|
|
42
|
+
try {
|
|
43
|
+
const file = (0, node_path_1.join)(directory, 'receipt.json');
|
|
44
|
+
(0, node_fs_1.writeFileSync)(file, (0, exports.serializeReceipt)(receipt));
|
|
45
|
+
oras([
|
|
46
|
+
'push',
|
|
47
|
+
...(0, target_access_1.targetFlags)(access),
|
|
48
|
+
'--artifact-type',
|
|
49
|
+
exports.RECEIPT_ARTIFACT_TYPE,
|
|
50
|
+
'--disable-path-validation',
|
|
51
|
+
`${repository}:${tag}`,
|
|
52
|
+
`${file}:application/json`,
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
(0, node_fs_1.rmSync)(directory, { recursive: true, force: true });
|
|
57
|
+
}
|
|
58
|
+
oras(['tag', ...(0, target_access_1.targetFlags)(access), `${repository}:${tag}`, exports.RECEIPT_CURRENT_TAG]);
|
|
59
|
+
return digest;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=receipt-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-store.js","sourceRoot":"","sources":["../../../src/mirror/target/receipt-store.ts"],"names":[],"mappings":";;;AAsBA,gDAkBC;AAKD,wC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