@vibesdotdev/infra-deploy 0.0.2 → 1.0.0-rc.5
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/LICENSE +18 -0
- package/README.md +76 -12
- package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.d.ts +48 -35
- package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.js +1 -1
- package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.js.map +1 -1
- package/dist/cli/alerts/infra-alerts-create.cli-command.impl.d.ts +2 -1
- package/dist/cli/alerts/infra-alerts-create.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-create.cli-command.impl.js +31 -21
- package/dist/cli/alerts/infra-alerts-create.cli-command.impl.js.map +1 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.d.ts +26 -27
- package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.js +1 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.js.map +1 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.d.ts +2 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.js +11 -11
- package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.js.map +1 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.d.ts +19 -17
- package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.js +1 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.js.map +1 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.impl.d.ts +2 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/alerts/infra-alerts-list.cli-command.impl.js +15 -14
- package/dist/cli/alerts/infra-alerts-list.cli-command.impl.js.map +1 -1
- package/dist/cli/alerts/infra-alerts.cli-group.descriptor.d.ts +8 -8
- package/dist/cli/alerts/infra-alerts.cli-group.descriptor.js +1 -1
- package/dist/cli/alerts/infra-alerts.cli-group.descriptor.js.map +1 -1
- package/dist/cli/audit/infra-audit.cli-command.descriptor.d.ts +24 -17
- package/dist/cli/audit/infra-audit.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/audit/infra-audit.cli-command.descriptor.js +8 -3
- package/dist/cli/audit/infra-audit.cli-command.descriptor.js.map +1 -1
- package/dist/cli/audit/infra-audit.cli-command.impl.d.ts +164 -1
- package/dist/cli/audit/infra-audit.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/audit/infra-audit.cli-command.impl.js +557 -76
- package/dist/cli/audit/infra-audit.cli-command.impl.js.map +1 -1
- package/dist/cli/db/infra-db.cli-command.descriptor.d.ts +49 -0
- package/dist/cli/db/infra-db.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/db/infra-db.cli-command.descriptor.js +60 -0
- package/dist/cli/db/infra-db.cli-command.descriptor.js.map +1 -0
- package/dist/cli/db/infra-db.cli-command.impl.d.ts +30 -0
- package/dist/cli/db/infra-db.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/db/infra-db.cli-command.impl.js +167 -0
- package/dist/cli/db/infra-db.cli-command.impl.js.map +1 -0
- package/dist/cli/dns/infra-dns-activate.cli-command.impl.d.ts +6 -0
- package/dist/cli/dns/infra-dns-activate.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-activate.cli-command.impl.js +53 -0
- package/dist/cli/dns/infra-dns-activate.cli-command.impl.js.map +1 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.d.ts +41 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.js +50 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.js.map +1 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.impl.d.ts +12 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.impl.js +70 -0
- package/dist/cli/dns/infra-dns-delete.cli-command.impl.js.map +1 -0
- package/dist/cli/dns/infra-dns-list.cli-command.descriptor.d.ts +32 -0
- package/dist/cli/dns/infra-dns-list.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-list.cli-command.descriptor.js +39 -0
- package/dist/cli/dns/infra-dns-list.cli-command.descriptor.js.map +1 -0
- package/dist/cli/dns/infra-dns-list.cli-command.impl.d.ts +17 -0
- package/dist/cli/dns/infra-dns-list.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-list.cli-command.impl.js +66 -0
- package/dist/cli/dns/infra-dns-list.cli-command.impl.js.map +1 -0
- package/dist/cli/dns/infra-dns-set.cli-command.descriptor.d.ts +58 -0
- package/dist/cli/dns/infra-dns-set.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-set.cli-command.descriptor.js +72 -0
- package/dist/cli/dns/infra-dns-set.cli-command.descriptor.js.map +1 -0
- package/dist/cli/dns/infra-dns-set.cli-command.impl.d.ts +14 -0
- package/dist/cli/dns/infra-dns-set.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns-set.cli-command.impl.js +110 -0
- package/dist/cli/dns/infra-dns-set.cli-command.impl.js.map +1 -0
- package/dist/cli/dns/infra-dns.cli-group.descriptor.d.ts +41 -0
- package/dist/cli/dns/infra-dns.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/dns/infra-dns.cli-group.descriptor.js +47 -0
- package/dist/cli/dns/infra-dns.cli-group.descriptor.js.map +1 -0
- package/dist/cli/dns/resolve-dns-provider.d.ts +24 -0
- package/dist/cli/dns/resolve-dns-provider.d.ts.map +1 -0
- package/dist/cli/dns/resolve-dns-provider.js +62 -0
- package/dist/cli/dns/resolve-dns-provider.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.d.ts +37 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.js +45 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.d.ts +15 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.js +78 -0
- package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.d.ts +29 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.js +35 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.d.ts +19 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.js +73 -0
- package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.d.ts +41 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.js +50 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.d.ts +16 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.js +81 -0
- package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.d.ts +40 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.js +49 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.d.ts +14 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.js +78 -0
- package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.js.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.js +12 -0
- package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.js.map +1 -0
- package/dist/cli/edge-tls/resolve-edge-tls-provider.d.ts +25 -0
- package/dist/cli/edge-tls/resolve-edge-tls-provider.d.ts.map +1 -0
- package/dist/cli/edge-tls/resolve-edge-tls-provider.js +74 -0
- package/dist/cli/edge-tls/resolve-edge-tls-provider.js.map +1 -0
- package/dist/cli/infra-deploy.cli-group.descriptor.d.ts +8 -8
- package/dist/cli/infra-deploy.cli-group.descriptor.js +1 -1
- package/dist/cli/infra-deploy.cli-group.descriptor.js.map +1 -1
- package/dist/cli/infra.cli-group.descriptor.d.ts +7 -7
- package/dist/cli/infra.cli-group.descriptor.js +1 -1
- package/dist/cli/infra.cli-group.descriptor.js.map +1 -1
- package/dist/cli/inventory/infra-inventory.cli-command.descriptor.d.ts +26 -0
- package/dist/cli/inventory/infra-inventory.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/inventory/infra-inventory.cli-command.descriptor.js +18 -0
- package/dist/cli/inventory/infra-inventory.cli-command.descriptor.js.map +1 -0
- package/dist/cli/inventory/infra-inventory.cli-command.impl.d.ts +18 -0
- package/dist/cli/inventory/infra-inventory.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/inventory/infra-inventory.cli-command.impl.js +204 -0
- package/dist/cli/inventory/infra-inventory.cli-command.impl.js.map +1 -0
- package/dist/cli/list/infra-deploy.list.cli-command.descriptor.d.ts +40 -30
- package/dist/cli/list/infra-deploy.list.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/list/infra-deploy.list.cli-command.descriptor.js +7 -3
- package/dist/cli/list/infra-deploy.list.cli-command.descriptor.js.map +1 -1
- package/dist/cli/list/infra-deploy.list.cli-command.impl.d.ts +35 -1
- package/dist/cli/list/infra-deploy.list.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/list/infra-deploy.list.cli-command.impl.js +202 -20
- package/dist/cli/list/infra-deploy.list.cli-command.impl.js.map +1 -1
- package/dist/cli/logs/infra-logs.cli-command.descriptor.d.ts +113 -35
- package/dist/cli/logs/infra-logs.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/logs/infra-logs.cli-command.descriptor.js +87 -3
- package/dist/cli/logs/infra-logs.cli-command.descriptor.js.map +1 -1
- package/dist/cli/logs/infra-logs.cli-command.impl.d.ts +61 -1
- package/dist/cli/logs/infra-logs.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/logs/infra-logs.cli-command.impl.js +1160 -111
- package/dist/cli/logs/infra-logs.cli-command.impl.js.map +1 -1
- package/dist/cli/logs/stream-worker-tail.d.ts +7 -2
- package/dist/cli/logs/stream-worker-tail.d.ts.map +1 -1
- package/dist/cli/logs/stream-worker-tail.js +280 -113
- package/dist/cli/logs/stream-worker-tail.js.map +1 -1
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.d.ts +62 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.js +79 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.js.map +1 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.d.ts +8 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.js +105 -0
- package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.js.map +1 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.d.ts +40 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.js +50 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.js.map +1 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.impl.d.ts +13 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.impl.js +108 -0
- package/dist/cli/npm/infra-npm-mirror.cli-command.impl.js.map +1 -0
- package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.d.ts +83 -23
- package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.js +52 -16
- package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.js.map +1 -1
- package/dist/cli/npm/infra-npm-publish.cli-command.impl.d.ts +52 -1
- package/dist/cli/npm/infra-npm-publish.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/npm/infra-npm-publish.cli-command.impl.js +568 -351
- package/dist/cli/npm/infra-npm-publish.cli-command.impl.js.map +1 -1
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.d.ts +28 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.js +34 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.js.map +1 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.d.ts +12 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.js +134 -0
- package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.js.map +1 -0
- package/dist/cli/npm/infra-npm.cli-group.descriptor.d.ts +8 -8
- package/dist/cli/npm/infra-npm.cli-group.descriptor.js +1 -1
- package/dist/cli/npm/infra-npm.cli-group.descriptor.js.map +1 -1
- package/dist/cli/npm/mirror-registry-artifacts.d.ts +91 -0
- package/dist/cli/npm/mirror-registry-artifacts.d.ts.map +1 -0
- package/dist/cli/npm/mirror-registry-artifacts.js +99 -0
- package/dist/cli/npm/mirror-registry-artifacts.js.map +1 -0
- package/dist/cli/npm/npm-protocol-package-registry.d.ts +32 -0
- package/dist/cli/npm/npm-protocol-package-registry.d.ts.map +1 -0
- package/dist/cli/npm/npm-protocol-package-registry.js +237 -0
- package/dist/cli/npm/npm-protocol-package-registry.js.map +1 -0
- package/dist/cli/npm/publish/command-options.d.ts +24 -0
- package/dist/cli/npm/publish/command-options.d.ts.map +1 -0
- package/dist/cli/npm/publish/command-options.js +85 -0
- package/dist/cli/npm/publish/command-options.js.map +1 -0
- package/dist/cli/npm/publish/concurrency.d.ts +19 -0
- package/dist/cli/npm/publish/concurrency.d.ts.map +1 -0
- package/dist/cli/npm/publish/concurrency.js +60 -0
- package/dist/cli/npm/publish/concurrency.js.map +1 -0
- package/dist/cli/npm/publish/consumer-smoke.d.ts +83 -0
- package/dist/cli/npm/publish/consumer-smoke.d.ts.map +1 -0
- package/dist/cli/npm/publish/consumer-smoke.js +371 -0
- package/dist/cli/npm/publish/consumer-smoke.js.map +1 -0
- package/dist/cli/npm/publish/consumer-surfaces.d.ts +81 -0
- package/dist/cli/npm/publish/consumer-surfaces.d.ts.map +1 -0
- package/dist/cli/npm/publish/consumer-surfaces.js +199 -0
- package/dist/cli/npm/publish/consumer-surfaces.js.map +1 -0
- package/dist/cli/npm/publish/external-requirements.d.ts +171 -0
- package/dist/cli/npm/publish/external-requirements.d.ts.map +1 -0
- package/dist/cli/npm/publish/external-requirements.js +365 -0
- package/dist/cli/npm/publish/external-requirements.js.map +1 -0
- package/dist/cli/npm/publish/forge-source-identity.d.ts +64 -0
- package/dist/cli/npm/publish/forge-source-identity.d.ts.map +1 -0
- package/dist/cli/npm/publish/forge-source-identity.js +201 -0
- package/dist/cli/npm/publish/forge-source-identity.js.map +1 -0
- package/dist/cli/npm/publish/fs-paths.d.ts +25 -0
- package/dist/cli/npm/publish/fs-paths.d.ts.map +1 -0
- package/dist/cli/npm/publish/fs-paths.js +87 -0
- package/dist/cli/npm/publish/fs-paths.js.map +1 -0
- package/dist/cli/npm/publish/lease-preflight-answer.d.ts +17 -0
- package/dist/cli/npm/publish/lease-preflight-answer.d.ts.map +1 -0
- package/dist/cli/npm/publish/lease-preflight-answer.js +35 -0
- package/dist/cli/npm/publish/lease-preflight-answer.js.map +1 -0
- package/dist/cli/npm/publish/lease-preflight.d.ts +92 -0
- package/dist/cli/npm/publish/lease-preflight.d.ts.map +1 -0
- package/dist/cli/npm/publish/lease-preflight.js +205 -0
- package/dist/cli/npm/publish/lease-preflight.js.map +1 -0
- package/dist/cli/npm/publish/managed-lease.d.ts +110 -0
- package/dist/cli/npm/publish/managed-lease.d.ts.map +1 -0
- package/dist/cli/npm/publish/managed-lease.js +191 -0
- package/dist/cli/npm/publish/managed-lease.js.map +1 -0
- package/dist/cli/npm/publish/npm-exec.d.ts +148 -0
- package/dist/cli/npm/publish/npm-exec.d.ts.map +1 -0
- package/dist/cli/npm/publish/npm-exec.js +311 -0
- package/dist/cli/npm/publish/npm-exec.js.map +1 -0
- package/dist/cli/npm/publish/package-artifact.d.ts +107 -0
- package/dist/cli/npm/publish/package-artifact.d.ts.map +1 -0
- package/dist/cli/npm/publish/package-artifact.js +418 -0
- package/dist/cli/npm/publish/package-artifact.js.map +1 -0
- package/dist/cli/npm/publish/platform-registry.d.ts +76 -0
- package/dist/cli/npm/publish/platform-registry.d.ts.map +1 -0
- package/dist/cli/npm/publish/platform-registry.js +324 -0
- package/dist/cli/npm/publish/platform-registry.js.map +1 -0
- package/dist/cli/npm/publish/proof-external-closure.d.ts +139 -0
- package/dist/cli/npm/publish/proof-external-closure.d.ts.map +1 -0
- package/dist/cli/npm/publish/proof-external-closure.js +339 -0
- package/dist/cli/npm/publish/proof-external-closure.js.map +1 -0
- package/dist/cli/npm/publish/proof-installed-graph.d.ts +26 -0
- package/dist/cli/npm/publish/proof-installed-graph.d.ts.map +1 -0
- package/dist/cli/npm/publish/proof-installed-graph.js +229 -0
- package/dist/cli/npm/publish/proof-installed-graph.js.map +1 -0
- package/dist/cli/npm/publish/proof-registry.d.ts +74 -0
- package/dist/cli/npm/publish/proof-registry.d.ts.map +1 -0
- package/dist/cli/npm/publish/proof-registry.js +335 -0
- package/dist/cli/npm/publish/proof-registry.js.map +1 -0
- package/dist/cli/npm/publish/proof-source-credentials.d.ts +42 -0
- package/dist/cli/npm/publish/proof-source-credentials.d.ts.map +1 -0
- package/dist/cli/npm/publish/proof-source-credentials.js +129 -0
- package/dist/cli/npm/publish/proof-source-credentials.js.map +1 -0
- package/dist/cli/npm/publish/publish-package.d.ts +66 -0
- package/dist/cli/npm/publish/publish-package.d.ts.map +1 -0
- package/dist/cli/npm/publish/publish-package.js +544 -0
- package/dist/cli/npm/publish/publish-package.js.map +1 -0
- package/dist/cli/npm/publish/publish-to-mirror.d.ts +28 -0
- package/dist/cli/npm/publish/publish-to-mirror.d.ts.map +1 -0
- package/dist/cli/npm/publish/publish-to-mirror.js +36 -0
- package/dist/cli/npm/publish/publish-to-mirror.js.map +1 -0
- package/dist/cli/npm/publish/publisher-manifest.d.ts +173 -0
- package/dist/cli/npm/publish/publisher-manifest.d.ts.map +1 -0
- package/dist/cli/npm/publish/publisher-manifest.js +79 -0
- package/dist/cli/npm/publish/publisher-manifest.js.map +1 -0
- package/dist/cli/npm/publish/rc-major-exception.d.ts +20 -0
- package/dist/cli/npm/publish/rc-major-exception.d.ts.map +1 -0
- package/dist/cli/npm/publish/rc-major-exception.js +46 -0
- package/dist/cli/npm/publish/rc-major-exception.js.map +1 -0
- package/dist/cli/npm/publish/registry-availability.d.ts +150 -0
- package/dist/cli/npm/publish/registry-availability.d.ts.map +1 -0
- package/dist/cli/npm/publish/registry-availability.js +570 -0
- package/dist/cli/npm/publish/registry-availability.js.map +1 -0
- package/dist/cli/npm/publish/registry-credentials.d.ts +108 -0
- package/dist/cli/npm/publish/registry-credentials.d.ts.map +1 -0
- package/dist/cli/npm/publish/registry-credentials.js +290 -0
- package/dist/cli/npm/publish/registry-credentials.js.map +1 -0
- package/dist/cli/npm/publish/registry-reads.d.ts +42 -0
- package/dist/cli/npm/publish/registry-reads.d.ts.map +1 -0
- package/dist/cli/npm/publish/registry-reads.js +181 -0
- package/dist/cli/npm/publish/registry-reads.js.map +1 -0
- package/dist/cli/npm/publish/release-build.d.ts +46 -0
- package/dist/cli/npm/publish/release-build.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-build.js +140 -0
- package/dist/cli/npm/publish/release-build.js.map +1 -0
- package/dist/cli/npm/publish/release-consumer-proof.d.ts +70 -0
- package/dist/cli/npm/publish/release-consumer-proof.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-consumer-proof.js +397 -0
- package/dist/cli/npm/publish/release-consumer-proof.js.map +1 -0
- package/dist/cli/npm/publish/release-executor.d.ts +46 -0
- package/dist/cli/npm/publish/release-executor.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-executor.js +181 -0
- package/dist/cli/npm/publish/release-executor.js.map +1 -0
- package/dist/cli/npm/publish/release-grants.client.impl.d.ts +10 -0
- package/dist/cli/npm/publish/release-grants.client.impl.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-grants.client.impl.js +63 -0
- package/dist/cli/npm/publish/release-grants.client.impl.js.map +1 -0
- package/dist/cli/npm/publish/release-jobs.client.d.ts +39 -0
- package/dist/cli/npm/publish/release-jobs.client.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-jobs.client.js +124 -0
- package/dist/cli/npm/publish/release-jobs.client.js.map +1 -0
- package/dist/cli/npm/publish/release-jobs.consumer.plugin.d.ts +20 -0
- package/dist/cli/npm/publish/release-jobs.consumer.plugin.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-jobs.consumer.plugin.js +82 -0
- package/dist/cli/npm/publish/release-jobs.consumer.plugin.js.map +1 -0
- package/dist/cli/npm/publish/release-jobs.impl.d.ts +15 -0
- package/dist/cli/npm/publish/release-jobs.impl.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-jobs.impl.js +42 -0
- package/dist/cli/npm/publish/release-jobs.impl.js.map +1 -0
- package/dist/cli/npm/publish/release-lock.d.ts +143 -0
- package/dist/cli/npm/publish/release-lock.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-lock.js +371 -0
- package/dist/cli/npm/publish/release-lock.js.map +1 -0
- package/dist/cli/npm/publish/release-phases.d.ts +93 -0
- package/dist/cli/npm/publish/release-phases.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-phases.js +175 -0
- package/dist/cli/npm/publish/release-phases.js.map +1 -0
- package/dist/cli/npm/publish/release-plan.d.ts +65 -0
- package/dist/cli/npm/publish/release-plan.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-plan.js +178 -0
- package/dist/cli/npm/publish/release-plan.js.map +1 -0
- package/dist/cli/npm/publish/release-preflight.job.impl.d.ts +16 -0
- package/dist/cli/npm/publish/release-preflight.job.impl.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-preflight.job.impl.js +71 -0
- package/dist/cli/npm/publish/release-preflight.job.impl.js.map +1 -0
- package/dist/cli/npm/publish/release-publish.job.impl.d.ts +18 -0
- package/dist/cli/npm/publish/release-publish.job.impl.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-publish.job.impl.js +295 -0
- package/dist/cli/npm/publish/release-publish.job.impl.js.map +1 -0
- package/dist/cli/npm/publish/release-workspace.d.ts +95 -0
- package/dist/cli/npm/publish/release-workspace.d.ts.map +1 -0
- package/dist/cli/npm/publish/release-workspace.js +243 -0
- package/dist/cli/npm/publish/release-workspace.js.map +1 -0
- package/dist/cli/npm/publish/sensitive-temp.d.ts +90 -0
- package/dist/cli/npm/publish/sensitive-temp.d.ts.map +1 -0
- package/dist/cli/npm/publish/sensitive-temp.js +351 -0
- package/dist/cli/npm/publish/sensitive-temp.js.map +1 -0
- package/dist/cli/npm/publish/source-snapshot.d.ts +91 -0
- package/dist/cli/npm/publish/source-snapshot.d.ts.map +1 -0
- package/dist/cli/npm/publish/source-snapshot.js +245 -0
- package/dist/cli/npm/publish/source-snapshot.js.map +1 -0
- package/dist/cli/npm/publish/types.d.ts +69 -0
- package/dist/cli/npm/publish/types.d.ts.map +1 -0
- package/dist/cli/npm/publish/types.js +2 -0
- package/dist/cli/npm/publish/types.js.map +1 -0
- package/dist/cli/npm/publish/workspace-discovery.d.ts +48 -0
- package/dist/cli/npm/publish/workspace-discovery.d.ts.map +1 -0
- package/dist/cli/npm/publish/workspace-discovery.js +313 -0
- package/dist/cli/npm/publish/workspace-discovery.js.map +1 -0
- package/dist/cli/npm/put-attested-packument.d.ts +142 -0
- package/dist/cli/npm/put-attested-packument.d.ts.map +1 -0
- package/dist/cli/npm/put-attested-packument.js +353 -0
- package/dist/cli/npm/put-attested-packument.js.map +1 -0
- package/dist/cli/npm/reconcile-latest.d.ts +55 -0
- package/dist/cli/npm/reconcile-latest.d.ts.map +1 -0
- package/dist/cli/npm/reconcile-latest.js +59 -0
- package/dist/cli/npm/reconcile-latest.js.map +1 -0
- package/dist/cli/npm/registries/npmjs.package-registry.descriptor.d.ts +56 -0
- package/dist/cli/npm/registries/npmjs.package-registry.descriptor.d.ts.map +1 -0
- package/dist/cli/npm/registries/npmjs.package-registry.descriptor.js +16 -0
- package/dist/cli/npm/registries/npmjs.package-registry.descriptor.js.map +1 -0
- package/dist/cli/npm/registries/package-registries.plugin.d.ts +3 -0
- package/dist/cli/npm/registries/package-registries.plugin.d.ts.map +1 -0
- package/dist/cli/npm/registries/package-registries.plugin.js +44 -0
- package/dist/cli/npm/registries/package-registries.plugin.js.map +1 -0
- package/dist/cli/npm/registries/resolve-package-registry.d.ts +29 -0
- package/dist/cli/npm/registries/resolve-package-registry.d.ts.map +1 -0
- package/dist/cli/npm/registries/resolve-package-registry.js +58 -0
- package/dist/cli/npm/registries/resolve-package-registry.js.map +1 -0
- package/dist/cli/npm/registries/vibes-registry.package-registry.descriptor.d.ts +53 -0
- package/dist/cli/npm/registries/vibes-registry.package-registry.descriptor.d.ts.map +1 -0
- package/dist/cli/npm/registries/vibes-registry.package-registry.descriptor.js +12 -0
- package/dist/cli/npm/registries/vibes-registry.package-registry.descriptor.js.map +1 -0
- package/dist/cli/observability/blind-spots.d.ts +10 -0
- package/dist/cli/observability/blind-spots.d.ts.map +1 -0
- package/dist/cli/observability/blind-spots.js +19 -0
- package/dist/cli/observability/blind-spots.js.map +1 -0
- package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.d.ts +6 -0
- package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.js +75 -0
- package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.js.map +1 -0
- package/dist/cli/observability/infra-observability-set.cli-command.descriptor.d.ts +42 -21
- package/dist/cli/observability/infra-observability-set.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/observability/infra-observability-set.cli-command.descriptor.js +3 -3
- package/dist/cli/observability/infra-observability-set.cli-command.descriptor.js.map +1 -1
- package/dist/cli/observability/infra-observability-set.cli-command.impl.d.ts +3 -2
- package/dist/cli/observability/infra-observability-set.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/observability/infra-observability-set.cli-command.impl.js +14 -14
- package/dist/cli/observability/infra-observability-set.cli-command.impl.js.map +1 -1
- package/dist/cli/observability/infra-observability-status.cli-command.descriptor.d.ts +25 -17
- package/dist/cli/observability/infra-observability-status.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/observability/infra-observability-status.cli-command.descriptor.js +1 -1
- package/dist/cli/observability/infra-observability-status.cli-command.descriptor.js.map +1 -1
- package/dist/cli/observability/infra-observability-status.cli-command.impl.d.ts +2 -1
- package/dist/cli/observability/infra-observability-status.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/observability/infra-observability-status.cli-command.impl.js +30 -23
- package/dist/cli/observability/infra-observability-status.cli-command.impl.js.map +1 -1
- package/dist/cli/observability/infra-observability.cli-group.descriptor.d.ts +8 -8
- package/dist/cli/observability/infra-observability.cli-group.descriptor.js +1 -1
- package/dist/cli/observability/infra-observability.cli-group.descriptor.js.map +1 -1
- package/dist/cli/plugin.d.ts +3 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +45 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.d.ts +38 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.js +43 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.js.map +1 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.d.ts +117 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.js +678 -0
- package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.js.map +1 -0
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.d.ts +37 -23
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.js +7 -1
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.js.map +1 -1
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.d.ts +2 -1
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.js +100 -25
- package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.js.map +1 -1
- package/dist/cli/release/cli/latest-manifest.d.ts +148 -0
- package/dist/cli/release/cli/latest-manifest.d.ts.map +1 -0
- package/dist/cli/release/cli/latest-manifest.js +152 -0
- package/dist/cli/release/cli/latest-manifest.js.map +1 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.d.ts +41 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.js +49 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.js.map +1 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.d.ts +16 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.js +52 -0
- package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.js.map +1 -0
- package/dist/cli/rum/infra-rum-status.cli-command.descriptor.d.ts +19 -17
- package/dist/cli/rum/infra-rum-status.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/rum/infra-rum-status.cli-command.descriptor.js +1 -1
- package/dist/cli/rum/infra-rum-status.cli-command.descriptor.js.map +1 -1
- package/dist/cli/rum/infra-rum-status.cli-command.impl.d.ts +2 -1
- package/dist/cli/rum/infra-rum-status.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/rum/infra-rum-status.cli-command.impl.js +21 -15
- package/dist/cli/rum/infra-rum-status.cli-command.impl.js.map +1 -1
- package/dist/cli/rum/infra-rum.cli-group.descriptor.d.ts +8 -8
- package/dist/cli/rum/infra-rum.cli-group.descriptor.js +1 -1
- package/dist/cli/rum/infra-rum.cli-group.descriptor.js.map +1 -1
- package/dist/cli/run/deploy-smoke.d.ts +57 -0
- package/dist/cli/run/deploy-smoke.d.ts.map +1 -0
- package/dist/cli/run/deploy-smoke.js +251 -0
- package/dist/cli/run/deploy-smoke.js.map +1 -0
- package/dist/cli/run/deployment-marker.d.ts +74 -0
- package/dist/cli/run/deployment-marker.d.ts.map +1 -0
- package/dist/cli/run/deployment-marker.js +237 -0
- package/dist/cli/run/deployment-marker.js.map +1 -0
- package/dist/cli/run/deployment-provider.d.ts +51 -0
- package/dist/cli/run/deployment-provider.d.ts.map +1 -0
- package/dist/cli/run/deployment-provider.js +274 -0
- package/dist/cli/run/deployment-provider.js.map +1 -0
- package/dist/cli/run/deployment-run-ledger.d.ts +72 -0
- package/dist/cli/run/deployment-run-ledger.d.ts.map +1 -0
- package/dist/cli/run/deployment-run-ledger.js +164 -0
- package/dist/cli/run/deployment-run-ledger.js.map +1 -0
- package/dist/cli/run/git-source-identity.d.ts +21 -0
- package/dist/cli/run/git-source-identity.d.ts.map +1 -0
- package/dist/cli/run/git-source-identity.js +73 -0
- package/dist/cli/run/git-source-identity.js.map +1 -0
- package/dist/cli/run/immutable-deployment-release.program.d.ts +404 -0
- package/dist/cli/run/immutable-deployment-release.program.d.ts.map +1 -0
- package/dist/cli/run/immutable-deployment-release.program.js +585 -0
- package/dist/cli/run/immutable-deployment-release.program.js.map +1 -0
- package/dist/cli/run/immutable-deployment-workspace.d.ts +39 -0
- package/dist/cli/run/immutable-deployment-workspace.d.ts.map +1 -0
- package/dist/cli/run/immutable-deployment-workspace.js +525 -0
- package/dist/cli/run/immutable-deployment-workspace.js.map +1 -0
- package/dist/cli/run/infra-deploy.run.cli-command.descriptor.d.ts +77 -23
- package/dist/cli/run/infra-deploy.run.cli-command.descriptor.d.ts.map +1 -1
- package/dist/cli/run/infra-deploy.run.cli-command.descriptor.js +49 -8
- package/dist/cli/run/infra-deploy.run.cli-command.descriptor.js.map +1 -1
- package/dist/cli/run/infra-deploy.run.cli-command.impl.d.ts +46 -1
- package/dist/cli/run/infra-deploy.run.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/run/infra-deploy.run.cli-command.impl.js +440 -229
- package/dist/cli/run/infra-deploy.run.cli-command.impl.js.map +1 -1
- package/dist/cli/shared/build-workspace-artifacts.d.ts +152 -0
- package/dist/cli/shared/build-workspace-artifacts.d.ts.map +1 -0
- package/dist/cli/shared/build-workspace-artifacts.js +2049 -0
- package/dist/cli/shared/build-workspace-artifacts.js.map +1 -0
- package/dist/cli/shared/credential-source.d.ts +3 -0
- package/dist/cli/shared/credential-source.d.ts.map +1 -0
- package/dist/cli/shared/credential-source.js +19 -0
- package/dist/cli/shared/credential-source.js.map +1 -0
- package/dist/cli/shared/discover-deployments.d.ts +46 -5
- package/dist/cli/shared/discover-deployments.d.ts.map +1 -1
- package/dist/cli/shared/discover-deployments.js +167 -41
- package/dist/cli/shared/discover-deployments.js.map +1 -1
- package/dist/cli/shared/infer-apex-zone.d.ts +18 -0
- package/dist/cli/shared/infer-apex-zone.d.ts.map +1 -0
- package/dist/cli/shared/infer-apex-zone.js +75 -0
- package/dist/cli/shared/infer-apex-zone.js.map +1 -0
- package/dist/cli/shared/option-strings.d.ts +2 -0
- package/dist/cli/shared/option-strings.d.ts.map +1 -0
- package/dist/cli/shared/option-strings.js +13 -0
- package/dist/cli/shared/option-strings.js.map +1 -0
- package/dist/cli/shared/repository-collection.d.ts +42 -0
- package/dist/cli/shared/repository-collection.d.ts.map +1 -0
- package/dist/cli/shared/repository-collection.js +111 -0
- package/dist/cli/shared/repository-collection.js.map +1 -0
- package/dist/cli/shared/runtime-execution.d.ts +78 -0
- package/dist/cli/shared/runtime-execution.d.ts.map +1 -0
- package/dist/cli/shared/runtime-execution.js +182 -0
- package/dist/cli/shared/runtime-execution.js.map +1 -0
- package/dist/cli/shared/workspace-artifact-lock.d.ts +17 -0
- package/dist/cli/shared/workspace-artifact-lock.d.ts.map +1 -0
- package/dist/cli/shared/workspace-artifact-lock.js +37 -0
- package/dist/cli/shared/workspace-artifact-lock.js.map +1 -0
- package/dist/cli/shared/workspace-artifact-store.d.ts +14 -0
- package/dist/cli/shared/workspace-artifact-store.d.ts.map +1 -0
- package/dist/cli/shared/workspace-artifact-store.js +53 -0
- package/dist/cli/shared/workspace-artifact-store.js.map +1 -0
- package/dist/cli/workers/doks-worker-runtime.d.ts +239 -0
- package/dist/cli/workers/doks-worker-runtime.d.ts.map +1 -0
- package/dist/cli/workers/doks-worker-runtime.js +410 -0
- package/dist/cli/workers/doks-worker-runtime.js.map +1 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.d.ts +28 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.js +28 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.js.map +1 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.impl.d.ts +6 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.impl.js +75 -0
- package/dist/cli/workers/infra-workers-apply.cli-command.impl.js.map +1 -0
- package/dist/cli/workers/infra-workers-build.cli-command.descriptor.d.ts +31 -0
- package/dist/cli/workers/infra-workers-build.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-build.cli-command.descriptor.js +32 -0
- package/dist/cli/workers/infra-workers-build.cli-command.descriptor.js.map +1 -0
- package/dist/cli/workers/infra-workers-build.cli-command.impl.d.ts +6 -0
- package/dist/cli/workers/infra-workers-build.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-build.cli-command.impl.js +67 -0
- package/dist/cli/workers/infra-workers-build.cli-command.impl.js.map +1 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.d.ts +48 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.js +60 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.js.map +1 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.impl.d.ts +6 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.impl.js +74 -0
- package/dist/cli/workers/infra-workers-logs.cli-command.impl.js.map +1 -0
- package/dist/cli/workers/infra-workers.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/workers/infra-workers.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/workers/infra-workers.cli-group.descriptor.js +12 -0
- package/dist/cli/workers/infra-workers.cli-group.descriptor.js.map +1 -0
- package/dist/config-loader.d.ts +60 -13
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +371 -104
- package/dist/config-loader.js.map +1 -1
- package/dist/declared-provider.d.ts +27 -0
- package/dist/declared-provider.d.ts.map +1 -0
- package/dist/declared-provider.js +46 -0
- package/dist/declared-provider.js.map +1 -0
- package/dist/deployment-collisions.d.ts +55 -0
- package/dist/deployment-collisions.d.ts.map +1 -0
- package/dist/deployment-collisions.js +70 -0
- package/dist/deployment-collisions.js.map +1 -0
- package/dist/deployment-environment.d.ts +57 -0
- package/dist/deployment-environment.d.ts.map +1 -0
- package/dist/deployment-environment.js +198 -0
- package/dist/deployment-environment.js.map +1 -0
- package/dist/deployment-settings.d.ts +27 -0
- package/dist/deployment-settings.d.ts.map +1 -0
- package/dist/deployment-settings.js +52 -0
- package/dist/deployment-settings.js.map +1 -0
- package/dist/deployment.config.descriptor.d.ts +59 -0
- package/dist/deployment.config.descriptor.d.ts.map +1 -0
- package/dist/deployment.config.descriptor.js +54 -0
- package/dist/deployment.config.descriptor.js.map +1 -0
- package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.d.ts +29 -0
- package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.d.ts.map +1 -0
- package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.js +35 -0
- package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.js.map +1 -0
- package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.d.ts +12 -0
- package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.d.ts.map +1 -0
- package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.js +12 -0
- package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.js.map +1 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/infra-deploy.plugin.d.ts +2 -2
- package/dist/infra-deploy.plugin.d.ts.map +1 -1
- package/dist/infra-deploy.plugin.js +65 -20
- package/dist/infra-deploy.plugin.js.map +1 -1
- package/dist/logger.d.ts +10 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +11 -0
- package/dist/logger.js.map +1 -0
- package/dist/migrations/migrate-workspace.d.ts +21 -0
- package/dist/migrations/migrate-workspace.d.ts.map +1 -0
- package/dist/migrations/migrate-workspace.js +83 -0
- package/dist/migrations/migrate-workspace.js.map +1 -0
- package/dist/migrations/run-migrate.d.ts +15 -0
- package/dist/migrations/run-migrate.d.ts.map +1 -0
- package/dist/migrations/run-migrate.js +314 -0
- package/dist/migrations/run-migrate.js.map +1 -0
- package/dist/regenerate.d.ts +52 -30
- package/dist/regenerate.d.ts.map +1 -1
- package/dist/regenerate.js +176 -148
- package/dist/regenerate.js.map +1 -1
- package/dist/runtime-execution.d.ts +5 -0
- package/dist/runtime-execution.d.ts.map +1 -0
- package/dist/runtime-execution.js +12 -0
- package/dist/runtime-execution.js.map +1 -0
- package/dist/schemas/migrate.d.ts +110 -0
- package/dist/schemas/migrate.d.ts.map +1 -0
- package/dist/schemas/migrate.js +55 -0
- package/dist/schemas/migrate.js.map +1 -0
- package/dist/schemas/proof-registry.d.ts +25 -0
- package/dist/schemas/proof-registry.d.ts.map +1 -0
- package/dist/schemas/proof-registry.js +24 -0
- package/dist/schemas/proof-registry.js.map +1 -0
- package/dist/schemas/release-grants.d.ts +7 -0
- package/dist/schemas/release-grants.d.ts.map +1 -0
- package/dist/schemas/release-grants.js +6 -0
- package/dist/schemas/release-grants.js.map +1 -0
- package/dist/schemas/release-jobs.d.ts +444 -0
- package/dist/schemas/release-jobs.d.ts.map +1 -0
- package/dist/schemas/release-jobs.js +204 -0
- package/dist/schemas/release-jobs.js.map +1 -0
- package/dist/schemas/service-release.d.ts +15 -0
- package/dist/schemas/service-release.d.ts.map +1 -0
- package/dist/schemas/service-release.js +13 -0
- package/dist/schemas/service-release.js.map +1 -0
- package/dist/schemas/worker-logs.d.ts +42 -0
- package/dist/schemas/worker-logs.d.ts.map +1 -0
- package/dist/schemas/worker-logs.js +29 -0
- package/dist/schemas/worker-logs.js.map +1 -0
- package/dist/storage/deployment-runs.schema.d.ts +199 -0
- package/dist/storage/deployment-runs.schema.d.ts.map +1 -0
- package/dist/storage/deployment-runs.schema.js +61 -0
- package/dist/storage/deployment-runs.schema.js.map +1 -0
- package/dist/storage/deployment-runs.storage.descriptor.d.ts +4 -0
- package/dist/storage/deployment-runs.storage.descriptor.d.ts.map +1 -0
- package/dist/storage/deployment-runs.storage.descriptor.js +36 -0
- package/dist/storage/deployment-runs.storage.descriptor.js.map +1 -0
- package/package.json +107 -38
- package/src/cli/alerts/infra-alerts-create.cli-command.descriptor.ts +0 -61
- package/src/cli/alerts/infra-alerts-create.cli-command.impl.ts +0 -131
- package/src/cli/alerts/infra-alerts-delete.cli-command.descriptor.ts +0 -36
- package/src/cli/alerts/infra-alerts-delete.cli-command.impl.ts +0 -75
- package/src/cli/alerts/infra-alerts-list.cli-command.descriptor.ts +0 -27
- package/src/cli/alerts/infra-alerts-list.cli-command.impl.ts +0 -88
- package/src/cli/alerts/infra-alerts.cli-group.descriptor.ts +0 -12
- package/src/cli/audit/infra-audit.cli-command.descriptor.ts +0 -28
- package/src/cli/audit/infra-audit.cli-command.impl.ts +0 -293
- package/src/cli/infra-deploy.cli-group.descriptor.ts +0 -12
- package/src/cli/infra.cli-group.descriptor.ts +0 -11
- package/src/cli/list/infra-deploy.list.cli-command.descriptor.ts +0 -29
- package/src/cli/list/infra-deploy.list.cli-command.impl.ts +0 -125
- package/src/cli/logs/infra-logs.cli-command.descriptor.ts +0 -65
- package/src/cli/logs/infra-logs.cli-command.impl.ts +0 -354
- package/src/cli/logs/stream-worker-tail.ts +0 -202
- package/src/cli/npm/infra-npm-publish.cli-command.descriptor.ts +0 -75
- package/src/cli/npm/infra-npm-publish.cli-command.impl.ts +0 -474
- package/src/cli/npm/infra-npm.cli-group.descriptor.ts +0 -12
- package/src/cli/observability/infra-observability-set.cli-command.descriptor.ts +0 -57
- package/src/cli/observability/infra-observability-set.cli-command.impl.ts +0 -173
- package/src/cli/observability/infra-observability-status.cli-command.descriptor.ts +0 -35
- package/src/cli/observability/infra-observability-status.cli-command.impl.ts +0 -124
- package/src/cli/observability/infra-observability.cli-group.descriptor.ts +0 -12
- package/src/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.ts +0 -36
- package/src/cli/regenerate/infra-deploy.regenerate.cli-command.impl.ts +0 -103
- package/src/cli/rum/infra-rum-status.cli-command.descriptor.ts +0 -27
- package/src/cli/rum/infra-rum-status.cli-command.impl.ts +0 -112
- package/src/cli/rum/infra-rum.cli-group.descriptor.ts +0 -12
- package/src/cli/run/infra-deploy.run.cli-command.descriptor.ts +0 -49
- package/src/cli/run/infra-deploy.run.cli-command.impl.ts +0 -330
- package/src/cli/shared/discover-deployments.ts +0 -127
- package/src/config-loader.ts +0 -179
- package/src/index.ts +0 -11
- package/src/infra-deploy.plugin.ts +0 -83
- package/src/regenerate.ts +0 -230
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The local proof registry the installed release proof installs from: sealed
|
|
3
|
+
* artifacts served verbatim, optional upstream proxying, and source npmrc files.
|
|
4
|
+
*/
|
|
5
|
+
import type { ChildEnvRuntime } from "../../shared/runtime-execution.ts";
|
|
6
|
+
import type { RuntimeExecution } from "@vibesdotdev/kernel/execution";
|
|
7
|
+
import type { PackageJson, RegistryReleasePublishTarget } from "./types.ts";
|
|
8
|
+
/** Node resolution of `name` from `fromDir`, bounded by `workspaceRoot`. */
|
|
9
|
+
export declare function resolveInstalledPackageDirectory(options: {
|
|
10
|
+
runtime: ChildEnvRuntime;
|
|
11
|
+
workspaceRoot: string;
|
|
12
|
+
fromDir: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}): Promise<string | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Where the proof fetches external packages from: a default registry, scoped
|
|
17
|
+
* registries, and each origin's read token and renewer.
|
|
18
|
+
*/
|
|
19
|
+
export type ReleaseConsumerSourceRegistry = {
|
|
20
|
+
defaultRegistry: string;
|
|
21
|
+
scopedRegistries?: Readonly<Record<string, string>>;
|
|
22
|
+
tokensByRegistry?: Readonly<Record<string, string | undefined>>;
|
|
23
|
+
renewSessionTokensByRegistry?: Readonly<Record<string, () => Promise<string | null | undefined>>>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The source registries of a release's targets; one registry per scope and at
|
|
27
|
+
* most one authenticated origin per run.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildReleaseConsumerSourceRegistry(options: {
|
|
30
|
+
targets: readonly RegistryReleasePublishTarget[];
|
|
31
|
+
readToken?: string;
|
|
32
|
+
renewReadToken?: () => Promise<string | null | undefined>;
|
|
33
|
+
}): ReleaseConsumerSourceRegistry;
|
|
34
|
+
/** The source registry a package is fetched from. */
|
|
35
|
+
export declare function registryForProofPackage(name: string, source: ReleaseConsumerSourceRegistry): string;
|
|
36
|
+
/** The npmrc that reads every source registry with its token. */
|
|
37
|
+
export declare function releaseConsumerSourceNpmrc(source: ReleaseConsumerSourceRegistry): string;
|
|
38
|
+
/** Atomically write the source-registry npmrc (mode 0600). */
|
|
39
|
+
export declare function writeReleaseConsumerSourceNpmrc(npmrcPath: string, source: ReleaseConsumerSourceRegistry,
|
|
40
|
+
/** The runtime whose logger reports a scratch file a failed write could not scrub. */
|
|
41
|
+
runtime: ChildEnvRuntime): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Serve sealed artifacts verbatim from a local registry for the proof install,
|
|
44
|
+
* optionally proxying misses upstream and withholding named packages.
|
|
45
|
+
*/
|
|
46
|
+
export declare function startProofLocalRegistry(runtime: ChildEnvRuntime, artifacts: readonly {
|
|
47
|
+
manifest: PackageJson & {
|
|
48
|
+
name: string;
|
|
49
|
+
version: string;
|
|
50
|
+
};
|
|
51
|
+
tarball: string;
|
|
52
|
+
}[], options?: {
|
|
53
|
+
/**
|
|
54
|
+
* When set, packument misses proxy to this upstream registry so consumer
|
|
55
|
+
* install can resolve unsealed public transitive dependencies. Sealed
|
|
56
|
+
* artifacts always win. Omit for withhold proofs that must fail closed.
|
|
57
|
+
*/
|
|
58
|
+
upstreamRegistry?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Packages the proof must fail without. Their packuments and tarballs are
|
|
61
|
+
* never proxied upstream, so an install that needs one fails on it rather
|
|
62
|
+
* than on an unsealed public transitive.
|
|
63
|
+
*/
|
|
64
|
+
withhold?: ReadonlySet<string>;
|
|
65
|
+
}): Promise<{
|
|
66
|
+
origin: string;
|
|
67
|
+
close(): Promise<void>;
|
|
68
|
+
}>;
|
|
69
|
+
/** The package.json inside a proof artifact tarball. */
|
|
70
|
+
export declare function readProofArtifactManifest(execution: RuntimeExecution, runtime: ChildEnvRuntime, tarball: string): Promise<PackageJson & {
|
|
71
|
+
name: string;
|
|
72
|
+
version: string;
|
|
73
|
+
}>;
|
|
74
|
+
//# sourceMappingURL=proof-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-registry.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAOzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAWtE,OAAO,KAAK,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5E,4EAA4E;AAC5E,wBAAsB,gCAAgC,CAAC,OAAO,EAAE;IAC9D,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBzB;AAED;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAChE,4BAA4B,CAAC,EAAE,QAAQ,CACrC,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CACzD,CAAC;CACH,CAAC;AAQF;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE;IAC1D,OAAO,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CAC3D,GAAG,6BAA6B,CA2ChC;AAED,qDAAqD;AACrD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,6BAA6B,GACpC,MAAM,CAMR;AAED,iEAAiE;AACjE,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,6BAA6B,GACpC,MAAM,CAwBR;AAED,8DAA8D;AAC9D,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,6BAA6B;AACrC,sFAAsF;AACtF,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB,EAAE,EACH,OAAO,GAAE;IACP;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B,GACL,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAuMrD;AAED,wDAAwD;AACxD,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAwD1D"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { hashBase64, hashHex } from "@vibesdotdev/crypto";
|
|
2
|
+
import { resolveFileSystemAdapter } from "@vibesdotdev/filesystem";
|
|
3
|
+
import { getRuntimePath } from "@vibesdotdev/paths";
|
|
4
|
+
import { getRuntimeHttpListener, valueFreeFailure, settle, CapabilityError } from "@vibesdotdev/kernel";
|
|
5
|
+
import { proofRegistryPackumentSchema } from "../../../schemas/proof-registry.js";
|
|
6
|
+
import { z } from "zod/v4";
|
|
7
|
+
import { rcompare, satisfies, valid } from "semver";
|
|
8
|
+
import { runRuntimeCommand } from "../../shared/runtime-execution.js";
|
|
9
|
+
import { pathExists } from "./fs-paths.js";
|
|
10
|
+
import { authConfigLine } from "./npm-exec.js";
|
|
11
|
+
import { normalizeRegistryUrl, PUBLIC_NPM_REGISTRY, } from "./registry-credentials.js";
|
|
12
|
+
import { writeSensitiveNpmrcAtomically } from "./sensitive-temp.js";
|
|
13
|
+
import { parsePublisherManifest } from "./publisher-manifest.js";
|
|
14
|
+
/** Node resolution of `name` from `fromDir`, bounded by `workspaceRoot`. */
|
|
15
|
+
export async function resolveInstalledPackageDirectory(options) {
|
|
16
|
+
const paths = await getRuntimePath(options.runtime);
|
|
17
|
+
let cursor = options.fromDir;
|
|
18
|
+
while (true) {
|
|
19
|
+
const position = paths.relative(options.workspaceRoot, cursor);
|
|
20
|
+
if (position.startsWith("../") || position.startsWith("..\\") || paths.isAbsolute(position)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const candidate = paths.join(cursor, "node_modules", ...options.name.split("/"));
|
|
24
|
+
if (await pathExists(options.runtime, paths.join(candidate, "package.json"), { binding: false })) {
|
|
25
|
+
return candidate;
|
|
26
|
+
}
|
|
27
|
+
if (cursor === options.workspaceRoot)
|
|
28
|
+
return null;
|
|
29
|
+
const parent = paths.dirname(cursor);
|
|
30
|
+
if (parent === cursor)
|
|
31
|
+
return null;
|
|
32
|
+
cursor = parent;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function packageScope(name) {
|
|
36
|
+
if (!name.startsWith("@"))
|
|
37
|
+
return undefined;
|
|
38
|
+
const slash = name.indexOf("/");
|
|
39
|
+
return slash > 1 ? name.slice(0, slash) : undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The source registries of a release's targets; one registry per scope and at
|
|
43
|
+
* most one authenticated origin per run.
|
|
44
|
+
*/
|
|
45
|
+
export function buildReleaseConsumerSourceRegistry(options) {
|
|
46
|
+
const scopedRegistries = {};
|
|
47
|
+
const registries = new Set();
|
|
48
|
+
for (const target of options.targets) {
|
|
49
|
+
const registry = normalizeRegistryUrl(target.registry);
|
|
50
|
+
registries.add(registry);
|
|
51
|
+
const scope = packageScope(target.name);
|
|
52
|
+
if (!scope)
|
|
53
|
+
continue;
|
|
54
|
+
const prior = scopedRegistries[scope];
|
|
55
|
+
if (prior && prior !== registry) {
|
|
56
|
+
throw new Error(`Release consumer proof scope ${scope} maps to multiple registries: ${prior}, ${registry}`);
|
|
57
|
+
}
|
|
58
|
+
scopedRegistries[scope] = registry;
|
|
59
|
+
}
|
|
60
|
+
const uniqueRegistries = [...registries];
|
|
61
|
+
if ((options.readToken || options.renewReadToken) &&
|
|
62
|
+
uniqueRegistries.length !== 1) {
|
|
63
|
+
throw new Error("External proof authentication requires one registry per run; one token is never shared across origins");
|
|
64
|
+
}
|
|
65
|
+
if (options.renewReadToken && !options.readToken) {
|
|
66
|
+
throw new Error("External proof session renewal requires an initial Registry read credential");
|
|
67
|
+
}
|
|
68
|
+
const source = {
|
|
69
|
+
defaultRegistry: PUBLIC_NPM_REGISTRY,
|
|
70
|
+
scopedRegistries,
|
|
71
|
+
tokensByRegistry: options.readToken
|
|
72
|
+
? { [uniqueRegistries[0]]: options.readToken }
|
|
73
|
+
: undefined,
|
|
74
|
+
};
|
|
75
|
+
if (options.renewReadToken) {
|
|
76
|
+
source.renewSessionTokensByRegistry = {
|
|
77
|
+
[uniqueRegistries[0]]: options.renewReadToken,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return source;
|
|
81
|
+
}
|
|
82
|
+
/** The source registry a package is fetched from. */
|
|
83
|
+
export function registryForProofPackage(name, source) {
|
|
84
|
+
const scope = packageScope(name);
|
|
85
|
+
return normalizeRegistryUrl((scope ? source.scopedRegistries?.[scope] : undefined) ??
|
|
86
|
+
source.defaultRegistry);
|
|
87
|
+
}
|
|
88
|
+
/** The npmrc that reads every source registry with its token. */
|
|
89
|
+
export function releaseConsumerSourceNpmrc(source) {
|
|
90
|
+
const defaultRegistry = normalizeRegistryUrl(source.defaultRegistry);
|
|
91
|
+
const scoped = Object.entries(source.scopedRegistries ?? {})
|
|
92
|
+
.map(([scope, registry]) => [
|
|
93
|
+
scope.startsWith("@") ? scope : `@${scope}`,
|
|
94
|
+
normalizeRegistryUrl(registry),
|
|
95
|
+
])
|
|
96
|
+
.sort(([left], [right]) => left.localeCompare(right));
|
|
97
|
+
const registries = new Set([
|
|
98
|
+
defaultRegistry,
|
|
99
|
+
...scoped.map(([, registry]) => registry),
|
|
100
|
+
]);
|
|
101
|
+
const lines = [
|
|
102
|
+
`registry=${defaultRegistry}`,
|
|
103
|
+
...scoped.map(([scope, registry]) => `${scope}:registry=${registry}`),
|
|
104
|
+
...[...registries].sort().flatMap((registry) => {
|
|
105
|
+
const token = source.tokensByRegistry?.[registry];
|
|
106
|
+
return token ? [`${authConfigLine(registry)}=${token}`] : [];
|
|
107
|
+
}),
|
|
108
|
+
];
|
|
109
|
+
return `${lines.join("\n")}\n`;
|
|
110
|
+
}
|
|
111
|
+
/** Atomically write the source-registry npmrc (mode 0600). */
|
|
112
|
+
export async function writeReleaseConsumerSourceNpmrc(npmrcPath, source,
|
|
113
|
+
/** The runtime whose logger reports a scratch file a failed write could not scrub. */
|
|
114
|
+
runtime) {
|
|
115
|
+
await writeSensitiveNpmrcAtomically(npmrcPath, releaseConsumerSourceNpmrc(source), runtime);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Serve sealed artifacts verbatim from a local registry for the proof install,
|
|
119
|
+
* optionally proxying misses upstream and withholding named packages.
|
|
120
|
+
*/
|
|
121
|
+
export async function startProofLocalRegistry(runtime, artifacts, options = {}) {
|
|
122
|
+
const byPackage = new Map();
|
|
123
|
+
for (const artifact of artifacts) {
|
|
124
|
+
const files = await resolveFileSystemAdapter(runtime, { binding: false });
|
|
125
|
+
const bytes = z.instanceof(Uint8Array).parse(await files.readFile(artifact.tarball));
|
|
126
|
+
const versions = byPackage.get(artifact.manifest.name) ?? new Map();
|
|
127
|
+
const identity = {
|
|
128
|
+
manifest: artifact.manifest,
|
|
129
|
+
tarball: artifact.tarball,
|
|
130
|
+
integrity: `sha512-${await hashBase64(runtime, "sha512", bytes)}`,
|
|
131
|
+
shasum: await hashHex(runtime, "sha1", bytes),
|
|
132
|
+
};
|
|
133
|
+
const existing = versions.get(artifact.manifest.version);
|
|
134
|
+
if (existing && existing.integrity !== identity.integrity) {
|
|
135
|
+
throw new Error(`Proof-local Registry found conflicting bytes for ${artifact.manifest.name}@${artifact.manifest.version}`);
|
|
136
|
+
}
|
|
137
|
+
versions.set(artifact.manifest.version, identity);
|
|
138
|
+
byPackage.set(artifact.manifest.name, versions);
|
|
139
|
+
}
|
|
140
|
+
let origin = "";
|
|
141
|
+
const listener = await getRuntimeHttpListener(runtime);
|
|
142
|
+
const binding = await listener.listen({
|
|
143
|
+
hostname: "127.0.0.1",
|
|
144
|
+
port: 0,
|
|
145
|
+
fetch: async (request) => {
|
|
146
|
+
const response = await settle(async () => {
|
|
147
|
+
const pathname = decodeURIComponent(new URL(request.url).pathname.slice(1));
|
|
148
|
+
if (pathname.startsWith("__tarball/")) {
|
|
149
|
+
const [encodedName, version] = pathname
|
|
150
|
+
.slice("__tarball/".length)
|
|
151
|
+
.split("/");
|
|
152
|
+
const name = Buffer.from(encodedName ?? "", "base64url").toString("utf8");
|
|
153
|
+
const artifact = version
|
|
154
|
+
? byPackage.get(name)?.get(version)
|
|
155
|
+
: undefined;
|
|
156
|
+
if (!artifact) {
|
|
157
|
+
return new Response("missing sealed artifact", { status: 404 });
|
|
158
|
+
}
|
|
159
|
+
return new Response(z.instanceof(Uint8Array).parse(await (await resolveFileSystemAdapter(runtime, { binding: false })).readFile(artifact.tarball)), {
|
|
160
|
+
status: 200,
|
|
161
|
+
headers: { "content-type": "application/octet-stream" },
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const withheldName = [...(options.withhold ?? [])].find((name) => pathname === name || pathname.startsWith(`${name}/-/`));
|
|
165
|
+
if (withheldName) {
|
|
166
|
+
return new Response(JSON.stringify({
|
|
167
|
+
error: `package withheld from proof registry: ${withheldName}`,
|
|
168
|
+
}), { status: 404, headers: { "content-type": "application/json" } });
|
|
169
|
+
}
|
|
170
|
+
const versions = byPackage.get(pathname);
|
|
171
|
+
// Merge public versions without allowing a sealed caret range to select
|
|
172
|
+
// newer upstream bytes. Exact older pins and incompatible majors stay usable.
|
|
173
|
+
const upstream = options.upstreamRegistry
|
|
174
|
+
? normalizeRegistryUrl(options.upstreamRegistry)
|
|
175
|
+
: undefined;
|
|
176
|
+
let upstreamPackument;
|
|
177
|
+
// Proxy whatever upstream returns byte-for-byte on the miss path: npm
|
|
178
|
+
// rewrites verified npmjs tarball hosts to the configured registry, so a
|
|
179
|
+
// miss is often a tarball request, not a packument. Only JSON parses are
|
|
180
|
+
// considered for the sealed merge below.
|
|
181
|
+
let upstreamBody;
|
|
182
|
+
if (upstream) {
|
|
183
|
+
const upstreamUrl = `${upstream.replace(/\/$/, "")}/${pathname}`;
|
|
184
|
+
const fetched = await settle(async () => {
|
|
185
|
+
const response = await fetch(upstreamUrl, {
|
|
186
|
+
headers: { accept: "application/json" },
|
|
187
|
+
redirect: "follow",
|
|
188
|
+
});
|
|
189
|
+
// Do not read error payloads; their status is the useful evidence.
|
|
190
|
+
const body = response.ok
|
|
191
|
+
? new Uint8Array(await response.arrayBuffer())
|
|
192
|
+
: undefined;
|
|
193
|
+
if (!response.ok)
|
|
194
|
+
await response.body?.cancel();
|
|
195
|
+
return { response, body };
|
|
196
|
+
});
|
|
197
|
+
if (!fetched.ok) {
|
|
198
|
+
return Response.json({
|
|
199
|
+
error: "proof registry upstream transport failed",
|
|
200
|
+
reason: "proof-upstream-transport-failed",
|
|
201
|
+
cause: valueFreeFailure(fetched.cause),
|
|
202
|
+
}, { status: 502 });
|
|
203
|
+
}
|
|
204
|
+
const { response: upstreamResponse, body } = fetched.value;
|
|
205
|
+
if (upstreamResponse.status !== 404) {
|
|
206
|
+
if (!upstreamResponse.ok || body === undefined) {
|
|
207
|
+
return Response.json({
|
|
208
|
+
error: "proof registry upstream request failed",
|
|
209
|
+
reason: "proof-upstream-http-failed",
|
|
210
|
+
upstreamStatus: upstreamResponse.status,
|
|
211
|
+
}, { status: 502 });
|
|
212
|
+
}
|
|
213
|
+
const contentType = upstreamResponse.headers.get("content-type") ?? "application/octet-stream";
|
|
214
|
+
upstreamBody = { status: upstreamResponse.status, contentType, body };
|
|
215
|
+
// Tarballs are opaque. Package documents cross the metadata boundary.
|
|
216
|
+
if (!pathname.includes("/-/")) {
|
|
217
|
+
const parsed = await settle(() => proofRegistryPackumentSchema.parse(JSON.parse(new TextDecoder().decode(body))));
|
|
218
|
+
if (!parsed.ok) {
|
|
219
|
+
return Response.json({
|
|
220
|
+
error: "proof registry upstream metadata is unreadable",
|
|
221
|
+
reason: "proof-upstream-metadata-invalid",
|
|
222
|
+
cause: valueFreeFailure(parsed.cause),
|
|
223
|
+
}, { status: 502 });
|
|
224
|
+
}
|
|
225
|
+
upstreamPackument = parsed.value;
|
|
226
|
+
if (upstreamPackument.name !== pathname) {
|
|
227
|
+
return Response.json({
|
|
228
|
+
error: "proof registry upstream metadata identity mismatch",
|
|
229
|
+
reason: "proof-upstream-identity-invalid",
|
|
230
|
+
}, { status: 502 });
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (!versions) {
|
|
236
|
+
if (upstreamBody) {
|
|
237
|
+
return new Response(new Uint8Array(upstreamBody.body), {
|
|
238
|
+
status: upstreamBody.status,
|
|
239
|
+
headers: { "content-type": upstreamBody.contentType },
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return new Response(JSON.stringify({
|
|
243
|
+
error: "package absent from sealed proof registry",
|
|
244
|
+
}), { status: 404, headers: { "content-type": "application/json" } });
|
|
245
|
+
}
|
|
246
|
+
const versionRecords = Object.fromEntries([...versions.entries()].map(([version, artifact]) => [
|
|
247
|
+
version,
|
|
248
|
+
{
|
|
249
|
+
...artifact.manifest,
|
|
250
|
+
dist: {
|
|
251
|
+
integrity: artifact.integrity,
|
|
252
|
+
shasum: artifact.shasum,
|
|
253
|
+
tarball: `${origin}/__tarball/${Buffer.from(pathname).toString("base64url")}/${version}`,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
]));
|
|
257
|
+
const latest = [...versions.keys()].sort(rcompare)[0];
|
|
258
|
+
if (latest === undefined) {
|
|
259
|
+
throw new Error(`Proof-local Registry has no sealed version for ${pathname}`);
|
|
260
|
+
}
|
|
261
|
+
for (const [version, record] of Object.entries(upstreamPackument?.versions ?? {})) {
|
|
262
|
+
if (versions.has(version))
|
|
263
|
+
continue;
|
|
264
|
+
if (!valid(version))
|
|
265
|
+
continue;
|
|
266
|
+
if ([...versions.keys()].some((sealed) => rcompare(version, sealed) < 0 &&
|
|
267
|
+
satisfies(version, `^${sealed}`)))
|
|
268
|
+
continue;
|
|
269
|
+
versionRecords[version] = record;
|
|
270
|
+
}
|
|
271
|
+
return new Response(JSON.stringify({
|
|
272
|
+
name: pathname,
|
|
273
|
+
"dist-tags": { latest },
|
|
274
|
+
versions: versionRecords,
|
|
275
|
+
}), { status: 200, headers: { "content-type": "application/json" } });
|
|
276
|
+
});
|
|
277
|
+
if (response.ok)
|
|
278
|
+
return response.value;
|
|
279
|
+
return Response.json({
|
|
280
|
+
error: "proof registry request failed",
|
|
281
|
+
cause: valueFreeFailure(response.cause),
|
|
282
|
+
}, { status: 500 });
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
origin = binding.origin;
|
|
286
|
+
return { origin, close: () => binding.stop() };
|
|
287
|
+
}
|
|
288
|
+
/** The package.json inside a proof artifact tarball. */
|
|
289
|
+
export async function readProofArtifactManifest(execution, runtime, tarball) {
|
|
290
|
+
const listed = await runRuntimeCommand({
|
|
291
|
+
runtime,
|
|
292
|
+
execution,
|
|
293
|
+
command: "tar",
|
|
294
|
+
args: ["-tzf", tarball],
|
|
295
|
+
cwd: (await getRuntimePath(runtime)).dirname(tarball),
|
|
296
|
+
});
|
|
297
|
+
if (listed.code !== 0) {
|
|
298
|
+
throw new Error(`Release proof cannot list ${tarball}: ${listed.stderr}`);
|
|
299
|
+
}
|
|
300
|
+
const manifestPaths = listed.stdout
|
|
301
|
+
.split(/\r?\n/)
|
|
302
|
+
.map((entry) => entry.trim())
|
|
303
|
+
.filter(Boolean)
|
|
304
|
+
.filter((entry) => {
|
|
305
|
+
const parts = entry.replace(/^\.\/+/, "").split("/");
|
|
306
|
+
return (parts.length === 2 && parts[0] !== ".." && parts[1] === "package.json");
|
|
307
|
+
});
|
|
308
|
+
if (manifestPaths.length !== 1) {
|
|
309
|
+
throw new Error(`Release proof artifact ${tarball} must contain exactly one top-level package.json; found ${manifestPaths.length}`);
|
|
310
|
+
}
|
|
311
|
+
const extracted = await runRuntimeCommand({
|
|
312
|
+
runtime,
|
|
313
|
+
execution,
|
|
314
|
+
command: "tar",
|
|
315
|
+
args: ["-xOf", tarball, "--", manifestPaths[0]],
|
|
316
|
+
cwd: (await getRuntimePath(runtime)).dirname(tarball),
|
|
317
|
+
});
|
|
318
|
+
if (extracted.code !== 0) {
|
|
319
|
+
throw new Error(`Release proof cannot read ${tarball}: ${extracted.stderr}`);
|
|
320
|
+
}
|
|
321
|
+
let manifest;
|
|
322
|
+
try {
|
|
323
|
+
manifest = parsePublisherManifest(JSON.parse(extracted.stdout));
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
throw new CapabilityError(`Release proof artifact ${tarball} has malformed package.json`, "INVALID_INPUT", { reason: "proof-artifact-manifest-invalid", cause: error });
|
|
327
|
+
}
|
|
328
|
+
if (!manifest.name || !manifest.version) {
|
|
329
|
+
throw new Error(`Release proof artifact ${tarball} has no package name or version`);
|
|
330
|
+
}
|
|
331
|
+
const name = manifest.name;
|
|
332
|
+
const version = manifest.version;
|
|
333
|
+
return { ...manifest, name, version };
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=proof-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-registry.js","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-registry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,4BAA4B,EAA6B,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,OAKtD;IACC,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,OAA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eAAe,CACvB,0BAA0B,OAAO,6BAA6B,EAC9D,eAAe,EACf,EAAE,MAAM,EAAE,iCAAiC,EAAE,KAAK,EAAE,KAAK,EAAE,CAC5D,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,0BAA0B,OAAO,iCAAiC,CACnE,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read credentials for the release proof's source registries: one token per
|
|
3
|
+
* configured origin, renewed from the caller's session when it nears expiry or
|
|
4
|
+
* a concealed 404 suggests it went stale. Every token ever held is tracked so
|
|
5
|
+
* cleanup and npm output can redact it.
|
|
6
|
+
*/
|
|
7
|
+
import { type RuntimeRef } from "@vibesdotdev/kernel";
|
|
8
|
+
import { type ReleaseConsumerSourceRegistry } from "./proof-registry.ts";
|
|
9
|
+
/** The proof's source-registry credentials. */
|
|
10
|
+
export type ProofSourceCredentials = {
|
|
11
|
+
/** Every token held during the proof (initial and renewed), for redaction. */
|
|
12
|
+
readonly redactValues: string[];
|
|
13
|
+
/** The source registry with the current token of each origin. */
|
|
14
|
+
sourceRegistryWithCurrentTokens(override?: readonly [registry: string, token: string][]): ReleaseConsumerSourceRegistry;
|
|
15
|
+
/**
|
|
16
|
+
* Renew `registry`'s token when it nears expiry (or, with `force`, when the
|
|
17
|
+
* caller saw a concealed 404). Rewrites the proof npmrc; true when renewed.
|
|
18
|
+
*/
|
|
19
|
+
ensureFresh(registry: string, refreshOptions?: {
|
|
20
|
+
force?: boolean;
|
|
21
|
+
}): Promise<boolean>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Validate the source registry's tokens and renewers against its configured
|
|
25
|
+
* origins, and return the renewable credential set the proof reads through.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createProofSourceCredentials(options: {
|
|
28
|
+
/** The runtime whose logger reports a token that does not decode or a scratch file a write could not scrub. */
|
|
29
|
+
runtime: RuntimeRef;
|
|
30
|
+
sourceRegistry: ReleaseConsumerSourceRegistry;
|
|
31
|
+
/** The proof npmrc a renewal rewrites; resolved lazily, after validation. */
|
|
32
|
+
npmrcPath: () => string;
|
|
33
|
+
now?: () => number;
|
|
34
|
+
}): ProofSourceCredentials;
|
|
35
|
+
/**
|
|
36
|
+
* Write a consumer's source-registry npmrc with each session read credential
|
|
37
|
+
* renewed first when it nears expiry. A release reaches its consumer installs
|
|
38
|
+
* long after it resolved the credential, and the Registry answers an expired
|
|
39
|
+
* one with a concealed 404 for every package.
|
|
40
|
+
*/
|
|
41
|
+
export declare function writeFreshReleaseConsumerSourceNpmrc(npmrcPath: string, sourceRegistry: ReleaseConsumerSourceRegistry, runtime: RuntimeRef, now?: () => number): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=proof-source-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-source-credentials.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-source-credentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,qBAAqB,CAAC;AAS7B,+CAA+C;AAC/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAChC,iEAAiE;IACjE,+BAA+B,CAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,GACtD,6BAA6B,CAAC;IACjC;;;OAGG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GACnC,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE;IACpD,+GAA+G;IAC/G,OAAO,EAAE,UAAU,CAAC;IACpB,cAAc,EAAE,6BAA6B,CAAC;IAC9C,6EAA6E;IAC7E,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,GAAG,sBAAsB,CA6IzB;AAED;;;;;GAKG;AACH,wBAAsB,oCAAoC,CACxD,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,6BAA6B,EAC7C,OAAO,EAAE,UAAU,EACnB,GAAG,CAAC,EAAE,MAAM,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read credentials for the release proof's source registries: one token per
|
|
3
|
+
* configured origin, renewed from the caller's session when it nears expiry or
|
|
4
|
+
* a concealed 404 suggests it went stale. Every token ever held is tracked so
|
|
5
|
+
* cleanup and npm output can redact it.
|
|
6
|
+
*/
|
|
7
|
+
import { settle, valueFreeFailure } from "@vibesdotdev/kernel";
|
|
8
|
+
import { readString } from "./command-options.js";
|
|
9
|
+
import { writeReleaseConsumerSourceNpmrc, } from "./proof-registry.js";
|
|
10
|
+
import { normalizeRegistryUrl, REGISTRY_SESSION_JWT_MIN_LIFETIME_MS, registryReadCredentialRenewalError, registrySessionJwtClaims, registrySessionJwtContinuityMatches, } from "./registry-credentials.js";
|
|
11
|
+
/**
|
|
12
|
+
* Validate the source registry's tokens and renewers against its configured
|
|
13
|
+
* origins, and return the renewable credential set the proof reads through.
|
|
14
|
+
*/
|
|
15
|
+
export function createProofSourceCredentials(options) {
|
|
16
|
+
const { sourceRegistry } = options;
|
|
17
|
+
const configuredSourceRegistries = new Set([
|
|
18
|
+
normalizeRegistryUrl(sourceRegistry.defaultRegistry),
|
|
19
|
+
...Object.values(sourceRegistry.scopedRegistries ?? {}).map(normalizeRegistryUrl),
|
|
20
|
+
]);
|
|
21
|
+
const sourceTokens = new Map();
|
|
22
|
+
for (const [registry, rawToken] of Object.entries(sourceRegistry.tokensByRegistry ?? {})) {
|
|
23
|
+
const token = readString(rawToken);
|
|
24
|
+
if (!token)
|
|
25
|
+
continue;
|
|
26
|
+
const normalizedRegistry = normalizeRegistryUrl(registry);
|
|
27
|
+
if (!configuredSourceRegistries.has(normalizedRegistry)) {
|
|
28
|
+
throw new Error(`Release consumer proof refused a read credential for unconfigured Registry origin ${normalizedRegistry}`);
|
|
29
|
+
}
|
|
30
|
+
const prior = sourceTokens.get(normalizedRegistry);
|
|
31
|
+
if (prior && prior !== token) {
|
|
32
|
+
throw new Error(`Release consumer proof received multiple read credentials for Registry origin ${normalizedRegistry}`);
|
|
33
|
+
}
|
|
34
|
+
sourceTokens.set(normalizedRegistry, token);
|
|
35
|
+
}
|
|
36
|
+
const sourceRenewers = new Map();
|
|
37
|
+
const managerMintedSourceTokens = new Map();
|
|
38
|
+
for (const [registry, renew] of Object.entries(sourceRegistry.renewSessionTokensByRegistry ?? {})) {
|
|
39
|
+
const normalizedRegistry = normalizeRegistryUrl(registry);
|
|
40
|
+
if (!configuredSourceRegistries.has(normalizedRegistry)) {
|
|
41
|
+
throw new Error(`Release consumer proof refused session renewal for unconfigured Registry origin ${normalizedRegistry}`);
|
|
42
|
+
}
|
|
43
|
+
if (!sourceTokens.has(normalizedRegistry)) {
|
|
44
|
+
throw new Error(`Release consumer proof session renewal for ${normalizedRegistry} has no initial read credential`);
|
|
45
|
+
}
|
|
46
|
+
sourceRenewers.set(normalizedRegistry, renew);
|
|
47
|
+
}
|
|
48
|
+
const redactValues = [...new Set(sourceTokens.values())];
|
|
49
|
+
const sourceRegistryWithCurrentTokens = (override) => {
|
|
50
|
+
const current = {
|
|
51
|
+
defaultRegistry: sourceRegistry.defaultRegistry,
|
|
52
|
+
tokensByRegistry: Object.fromEntries(override ? new Map([...sourceTokens, ...override]) : sourceTokens),
|
|
53
|
+
};
|
|
54
|
+
if (sourceRegistry.scopedRegistries) {
|
|
55
|
+
current.scopedRegistries = sourceRegistry.scopedRegistries;
|
|
56
|
+
}
|
|
57
|
+
return current;
|
|
58
|
+
};
|
|
59
|
+
const ensureFresh = async (registry, refreshOptions = {}) => {
|
|
60
|
+
const normalizedRegistry = normalizeRegistryUrl(registry);
|
|
61
|
+
const renew = sourceRenewers.get(normalizedRegistry);
|
|
62
|
+
if (!renew)
|
|
63
|
+
return false;
|
|
64
|
+
const currentToken = sourceTokens.get(normalizedRegistry);
|
|
65
|
+
const currentClaims = currentToken
|
|
66
|
+
? registrySessionJwtClaims(currentToken, options.runtime)
|
|
67
|
+
: undefined;
|
|
68
|
+
if (!currentToken || !currentClaims) {
|
|
69
|
+
throw registryReadCredentialRenewalError(normalizedRegistry, "cannot identify the current session JWT");
|
|
70
|
+
}
|
|
71
|
+
const nowMs = (options.now ?? Date.now)();
|
|
72
|
+
if (refreshOptions.force &&
|
|
73
|
+
managerMintedSourceTokens.get(normalizedRegistry) === currentToken &&
|
|
74
|
+
currentClaims.expiresAtMs > nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
if (!refreshOptions.force &&
|
|
78
|
+
currentClaims.expiresAtMs > nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
const renewed = await settle(renew);
|
|
82
|
+
if (!renewed.ok) {
|
|
83
|
+
throw registryReadCredentialRenewalError(normalizedRegistry, "failed", valueFreeFailure(renewed.cause));
|
|
84
|
+
}
|
|
85
|
+
const renewedToken = readString(renewed.value);
|
|
86
|
+
if (renewedToken && !redactValues.includes(renewedToken)) {
|
|
87
|
+
redactValues.push(renewedToken);
|
|
88
|
+
}
|
|
89
|
+
const renewedClaims = renewedToken
|
|
90
|
+
? registrySessionJwtClaims(renewedToken, options.runtime)
|
|
91
|
+
: undefined;
|
|
92
|
+
if (!renewedToken || !renewedClaims) {
|
|
93
|
+
throw registryReadCredentialRenewalError(normalizedRegistry, "returned no signed JWT");
|
|
94
|
+
}
|
|
95
|
+
if (!registrySessionJwtContinuityMatches(currentClaims, renewedClaims)) {
|
|
96
|
+
throw registryReadCredentialRenewalError(normalizedRegistry, "returned different session authority");
|
|
97
|
+
}
|
|
98
|
+
if (renewedClaims.expiresAtMs <=
|
|
99
|
+
nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
|
|
100
|
+
throw registryReadCredentialRenewalError(normalizedRegistry, "returned another stale JWT");
|
|
101
|
+
}
|
|
102
|
+
await writeReleaseConsumerSourceNpmrc(options.npmrcPath(), sourceRegistryWithCurrentTokens([[normalizedRegistry, renewedToken]]), options.runtime);
|
|
103
|
+
sourceTokens.set(normalizedRegistry, renewedToken);
|
|
104
|
+
managerMintedSourceTokens.set(normalizedRegistry, renewedToken);
|
|
105
|
+
return true;
|
|
106
|
+
};
|
|
107
|
+
return { redactValues, sourceRegistryWithCurrentTokens, ensureFresh };
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Write a consumer's source-registry npmrc with each session read credential
|
|
111
|
+
* renewed first when it nears expiry. A release reaches its consumer installs
|
|
112
|
+
* long after it resolved the credential, and the Registry answers an expired
|
|
113
|
+
* one with a concealed 404 for every package.
|
|
114
|
+
*/
|
|
115
|
+
export async function writeFreshReleaseConsumerSourceNpmrc(npmrcPath, sourceRegistry, runtime, now) {
|
|
116
|
+
const options = {
|
|
117
|
+
runtime,
|
|
118
|
+
sourceRegistry,
|
|
119
|
+
npmrcPath: () => npmrcPath,
|
|
120
|
+
};
|
|
121
|
+
if (now)
|
|
122
|
+
options.now = now;
|
|
123
|
+
const credentials = createProofSourceCredentials(options);
|
|
124
|
+
for (const registry of Object.keys(sourceRegistry.tokensByRegistry ?? {})) {
|
|
125
|
+
await credentials.ensureFresh(registry);
|
|
126
|
+
}
|
|
127
|
+
await writeReleaseConsumerSourceNpmrc(npmrcPath, credentials.sourceRegistryWithCurrentTokens(), runtime);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=proof-source-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-source-credentials.js","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-source-credentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,oCAAoC,EACpC,kCAAkC,EAClC,wBAAwB,EACxB,mCAAmC,GACpC,MAAM,2BAA2B,CAAC;AAoBnC;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAO5C;IACC,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IACnC,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;QACzC,oBAAoB,CAAC,cAAc,CAAC,eAAe,CAAC;QACpD,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CACzD,oBAAoB,CACrB;KACF,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAC/C,cAAc,CAAC,gBAAgB,IAAI,EAAE,CACtC,EAAE,CAAC;QACF,MAAM,KAAK,GAAG,UAA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