@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,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-party PUT of an npm publish document that keeps `_vibes_source`.
|
|
3
|
+
*
|
|
4
|
+
* `npm publish` copies package.json into the PUT `versions` map and drops
|
|
5
|
+
* underscore-prefixed fields. packages.vibes.dev requires the attested stamp
|
|
6
|
+
* on that JSON body. Build the document from the packed tarball ourselves.
|
|
7
|
+
*/
|
|
8
|
+
import { resolveFileSystemAdapter } from '@vibesdotdev/filesystem';
|
|
9
|
+
import { parseRegistryPublishManifest } from '@vibesdotdev/registry';
|
|
10
|
+
import { CapabilityError, settle, settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
11
|
+
import { MAX_CAUSE_CHARS, redactCredentials } from '@vibesdotdev/shared/utils';
|
|
12
|
+
import { gt, prerelease, valid } from 'semver';
|
|
13
|
+
import { z } from 'zod/v4';
|
|
14
|
+
/** The npm pack root member. Nested `package.json` files belong to bundled dependencies. */
|
|
15
|
+
const NPM_PACK_MANIFEST = 'package/package.json';
|
|
16
|
+
/** packages.vibes.dev answers every refusal with a value-free `{ error }` body. */
|
|
17
|
+
const RegistryErrorBodySchema = z.object({ error: z.string() });
|
|
18
|
+
/**
|
|
19
|
+
* The registry's `{ error }` text for a failed response, only when it is
|
|
20
|
+
* short and reads the same after the shared credential redaction (with the
|
|
21
|
+
* request's token as a secret). Any other body is never read into a failure.
|
|
22
|
+
*/
|
|
23
|
+
export async function registryErrorText(response, secrets) {
|
|
24
|
+
const read = await settle(() => response.text());
|
|
25
|
+
if (!read.ok)
|
|
26
|
+
return undefined;
|
|
27
|
+
const decoded = settleNow(() => JSON.parse(read.value));
|
|
28
|
+
if (!decoded.ok)
|
|
29
|
+
return undefined;
|
|
30
|
+
const body = RegistryErrorBodySchema.safeParse(decoded.value);
|
|
31
|
+
if (!body.success)
|
|
32
|
+
return undefined;
|
|
33
|
+
const text = body.data.error;
|
|
34
|
+
if (text.length === 0 || text.length > MAX_CAUSE_CHARS)
|
|
35
|
+
return undefined;
|
|
36
|
+
return redactCredentials(text, secrets) === text ? text : undefined;
|
|
37
|
+
}
|
|
38
|
+
export function registryRefusalDetails(response, secrets) {
|
|
39
|
+
const details = { status: response.status };
|
|
40
|
+
const retryAfter = response.headers.get('retry-after');
|
|
41
|
+
if (retryAfter !== null && /^[\w ,:-]{1,64}$/.test(retryAfter))
|
|
42
|
+
details.retryAfter = retryAfter;
|
|
43
|
+
const contentType = response.headers.get('content-type')?.split(';')[0]?.trim();
|
|
44
|
+
if (contentType)
|
|
45
|
+
details.contentType = contentType;
|
|
46
|
+
const notice = response.headers.get('npm-notice');
|
|
47
|
+
if (notice !== null && notice.length <= MAX_CAUSE_CHARS && redactCredentials(notice, secrets) === notice)
|
|
48
|
+
details.notice = notice;
|
|
49
|
+
return details;
|
|
50
|
+
}
|
|
51
|
+
export function tarballFilename(name, version) {
|
|
52
|
+
const unscoped = name.includes('/') ? name.split('/')[1] : name;
|
|
53
|
+
return `${unscoped}-${version}.tgz`;
|
|
54
|
+
}
|
|
55
|
+
async function gunzip(gzipBytes) {
|
|
56
|
+
const body = new Response(new Uint8Array(gzipBytes)).body;
|
|
57
|
+
if (body === null)
|
|
58
|
+
throw new Error('gzip body is missing');
|
|
59
|
+
const tar = body.pipeThrough(new DecompressionStream('gzip'));
|
|
60
|
+
return new Uint8Array(await new Response(tar).arrayBuffer());
|
|
61
|
+
}
|
|
62
|
+
export async function extractPackageJsonFromTgz(gzipBytes) {
|
|
63
|
+
const tarBytes = await gunzip(gzipBytes);
|
|
64
|
+
const decoder = new TextDecoder();
|
|
65
|
+
let manifestText;
|
|
66
|
+
let offset = 0;
|
|
67
|
+
while (offset + 512 <= tarBytes.length) {
|
|
68
|
+
const header = tarBytes.subarray(offset, offset + 512);
|
|
69
|
+
if (header.every((byte) => byte === 0))
|
|
70
|
+
break;
|
|
71
|
+
const name = readTarString(header, 0, 100);
|
|
72
|
+
const prefix = readTarString(header, 345, 155);
|
|
73
|
+
const fullName = (prefix ? `${prefix}/${name}` : name).replace(/^\.\//, '');
|
|
74
|
+
const size = readTarOctal(header, 124, 12);
|
|
75
|
+
const type = header[156];
|
|
76
|
+
const dataStart = offset + 512;
|
|
77
|
+
const dataEnd = dataStart + size;
|
|
78
|
+
if (dataEnd > tarBytes.length) {
|
|
79
|
+
throw new Error(`invalid tar entry size for ${fullName}`);
|
|
80
|
+
}
|
|
81
|
+
if ((type === 0 || type === 48) && fullName === NPM_PACK_MANIFEST) {
|
|
82
|
+
if (manifestText !== undefined) {
|
|
83
|
+
throw new CapabilityError(`packed tarball has duplicate ${NPM_PACK_MANIFEST}`, 'INVALID_INPUT', {
|
|
84
|
+
reason: 'tarball-manifest-invalid'
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
manifestText = decoder.decode(tarBytes.subarray(dataStart, dataEnd));
|
|
88
|
+
}
|
|
89
|
+
offset = dataStart + Math.ceil(size / 512) * 512;
|
|
90
|
+
}
|
|
91
|
+
if (manifestText === undefined)
|
|
92
|
+
throw new Error('packed tarball has no package.json');
|
|
93
|
+
const decoded = settleNow(() => JSON.parse(manifestText));
|
|
94
|
+
if (!decoded.ok) {
|
|
95
|
+
throw new CapabilityError('packed package.json is not valid JSON', 'INVALID_INPUT', {
|
|
96
|
+
reason: 'registry-manifest-invalid',
|
|
97
|
+
cause: valueFreeFailure(decoded.cause)
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return parseRegistryPublishManifest(decoded.value);
|
|
101
|
+
}
|
|
102
|
+
function readTarString(bytes, offset, length) {
|
|
103
|
+
const end = offset + length;
|
|
104
|
+
let actualEnd = offset;
|
|
105
|
+
while (actualEnd < end && bytes[actualEnd] !== 0)
|
|
106
|
+
actualEnd++;
|
|
107
|
+
return new TextDecoder().decode(bytes.subarray(offset, actualEnd));
|
|
108
|
+
}
|
|
109
|
+
function readTarOctal(bytes, offset, length) {
|
|
110
|
+
const raw = readTarString(bytes, offset, length).trim();
|
|
111
|
+
if (!raw)
|
|
112
|
+
return 0;
|
|
113
|
+
const parsed = Number.parseInt(raw, 8);
|
|
114
|
+
if (!Number.isFinite(parsed))
|
|
115
|
+
throw new Error(`invalid tar octal size: ${raw}`);
|
|
116
|
+
return parsed;
|
|
117
|
+
}
|
|
118
|
+
export function bytesToBase64(bytes) {
|
|
119
|
+
let binary = '';
|
|
120
|
+
for (const byte of bytes)
|
|
121
|
+
binary += String.fromCharCode(byte);
|
|
122
|
+
return btoa(binary);
|
|
123
|
+
}
|
|
124
|
+
/** Default dist-tag when no explicit tag is supplied: `rc` for prereleases, `latest` for stable releases. */
|
|
125
|
+
export function defaultDistTagForVersion(version) {
|
|
126
|
+
return prerelease(version) !== null ? 'rc' : 'latest';
|
|
127
|
+
}
|
|
128
|
+
export async function buildAttestedPublishPayload(options) {
|
|
129
|
+
const manifest = await extractPackageJsonFromTgz(options.tarball);
|
|
130
|
+
if (!manifest.name || !manifest.version) {
|
|
131
|
+
throw new Error('packed package.json is missing name or version');
|
|
132
|
+
}
|
|
133
|
+
const name = manifest.name;
|
|
134
|
+
const version = manifest.version;
|
|
135
|
+
if (!manifest._vibes_source?.repo || !manifest._vibes_source.sha || !manifest._vibes_source.workspaceDigest) {
|
|
136
|
+
throw new Error(`packed ${name}@${version} is missing _vibes_source {repo, sha, workspaceDigest}`);
|
|
137
|
+
}
|
|
138
|
+
const attested = { ...manifest, name, version };
|
|
139
|
+
const file = tarballFilename(name, version);
|
|
140
|
+
const registry = options.registry.replace(/\/$/, '');
|
|
141
|
+
const tarballUrl = `${registry}/${name}/-/${file}`;
|
|
142
|
+
const resolvedTag = options.tag ?? defaultDistTagForVersion(version);
|
|
143
|
+
const payload = {
|
|
144
|
+
_id: name,
|
|
145
|
+
name,
|
|
146
|
+
'dist-tags': { [resolvedTag]: version },
|
|
147
|
+
versions: {
|
|
148
|
+
[version]: {
|
|
149
|
+
...attested,
|
|
150
|
+
dist: { ...options.dist, tarball: tarballUrl }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
_attachments: {
|
|
154
|
+
[file]: {
|
|
155
|
+
content_type: 'application/octet-stream',
|
|
156
|
+
data: bytesToBase64(options.tarball),
|
|
157
|
+
length: options.tarball.byteLength
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
if (options.access)
|
|
162
|
+
payload.access = options.access;
|
|
163
|
+
return {
|
|
164
|
+
name,
|
|
165
|
+
version,
|
|
166
|
+
payload,
|
|
167
|
+
url: `${registry}/${encodeURIComponent(name)}`
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export async function putAttestedPackument(options) {
|
|
171
|
+
const tarball = 'bytes' in options.tarball
|
|
172
|
+
? options.tarball.bytes
|
|
173
|
+
: z.instanceof(Uint8Array).parse(await (await resolveFileSystemAdapter(options.runtime, { binding: false })).readFile(options.tarball.path));
|
|
174
|
+
const built = await buildAttestedPublishPayload({
|
|
175
|
+
tarball,
|
|
176
|
+
registry: options.registry,
|
|
177
|
+
tag: options.tag,
|
|
178
|
+
access: options.access,
|
|
179
|
+
dist: options.dist
|
|
180
|
+
});
|
|
181
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
182
|
+
// `latest` names the current stable release line. A non-`latest` publish that displaces `latest`
|
|
183
|
+
// (see `latestDisplacedBy`) moves `latest` in the same PUT; prereleases never displace `latest`.
|
|
184
|
+
const resolvedTag = options.tag ?? defaultDistTagForVersion(built.version);
|
|
185
|
+
let latestTag = { state: 'unchanged' };
|
|
186
|
+
if (resolvedTag !== 'latest') {
|
|
187
|
+
const read = await settle(() => readDistTags({ ...options, fetchImpl, name: built.name }));
|
|
188
|
+
if (!read.ok)
|
|
189
|
+
latestTag = { state: 'unread', failure: valueFreeFailure(read.cause) };
|
|
190
|
+
else if (latestDisplacedBy(read.value.latest, built.version)) {
|
|
191
|
+
built.payload['dist-tags'].latest = built.version;
|
|
192
|
+
latestTag = { state: 'moved' };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const response = await writeWithSecondFactor({
|
|
196
|
+
runtime: options.runtime,
|
|
197
|
+
url: built.url,
|
|
198
|
+
body: JSON.stringify(built.payload),
|
|
199
|
+
token: options.token,
|
|
200
|
+
otp: options.otp,
|
|
201
|
+
webAuth: options.webAuth,
|
|
202
|
+
fetchImpl
|
|
203
|
+
});
|
|
204
|
+
if (!response.ok) {
|
|
205
|
+
const details = registryRefusalDetails(response, [options.token]);
|
|
206
|
+
const registryError = await registryErrorText(response, [options.token]);
|
|
207
|
+
const said = registryError === undefined ? '' : `: ${registryError}`;
|
|
208
|
+
throw new CapabilityError(`Attested publish PUT ${built.name}@${built.version} failed (${response.status})${said}`, 'UNAVAILABLE', {
|
|
209
|
+
reason: 'registry-put-failed',
|
|
210
|
+
// The registry sends `retry-after` only with its bounded-CAS 409; every other 409 is final.
|
|
211
|
+
// A rate limit or a server failure may run again; a retry after a PUT that did store is
|
|
212
|
+
// refused as an existing version, which the publisher skips.
|
|
213
|
+
retryable: (response.status === 409 && response.headers.has('retry-after')) || response.status === 429 || response.status >= 500,
|
|
214
|
+
details
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return { name: built.name, version: built.version, status: response.status, latestTag };
|
|
218
|
+
}
|
|
219
|
+
const WebAuthChallengeSchema = z.object({ authUrl: z.string().url(), doneUrl: z.string().url() });
|
|
220
|
+
const WebAuthDoneSchema = z.object({ token: z.string().min(1) });
|
|
221
|
+
const ObjectBodySchema = z.looseObject({});
|
|
222
|
+
/** The approval and wait URLs a 401 names when the registry offers its web second factor. */
|
|
223
|
+
async function webAuthChallenge(response) {
|
|
224
|
+
const read = await settle(() => response.json());
|
|
225
|
+
if (!read.ok)
|
|
226
|
+
return undefined;
|
|
227
|
+
const challenge = WebAuthChallengeSchema.safeParse(read.value);
|
|
228
|
+
return challenge.success ? challenge.data : undefined;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* One registry write (`PUT` of a JSON body) answered with the second factor the
|
|
232
|
+
* caller holds: a one-time password, or npm's web flow (the write asks for it, a
|
|
233
|
+
* 401 names the approval URL, `announce` shows it, and the write runs once more
|
|
234
|
+
* with the token the approval issues). The final response is returned unread.
|
|
235
|
+
*/
|
|
236
|
+
export async function writeWithSecondFactor(options) {
|
|
237
|
+
const headers = new Headers({
|
|
238
|
+
authorization: `Bearer ${options.token}`,
|
|
239
|
+
'content-type': 'application/json',
|
|
240
|
+
accept: 'application/json'
|
|
241
|
+
});
|
|
242
|
+
if (options.otp)
|
|
243
|
+
headers.set('npm-otp', options.otp);
|
|
244
|
+
else if (options.webAuth) {
|
|
245
|
+
for (const [name, value] of Object.entries(webAuthHeaders(options.webAuth)))
|
|
246
|
+
headers.set(name, value);
|
|
247
|
+
}
|
|
248
|
+
const write = () => options.fetchImpl(options.url, { method: 'PUT', headers, body: options.body });
|
|
249
|
+
const webAuth = options.webAuth;
|
|
250
|
+
if (webAuth === undefined || options.otp)
|
|
251
|
+
return write();
|
|
252
|
+
// Each unanswered approval expires; with `retryOnTimeout` the write asks for a fresh one until it is given.
|
|
253
|
+
for (;;) {
|
|
254
|
+
headers.delete('npm-otp');
|
|
255
|
+
const response = await write();
|
|
256
|
+
if (response.status !== 401)
|
|
257
|
+
return response;
|
|
258
|
+
const challenge = await webAuthChallenge(response.clone());
|
|
259
|
+
if (challenge === undefined)
|
|
260
|
+
return response;
|
|
261
|
+
await response.body?.cancel();
|
|
262
|
+
await webAuth.announce(challenge.authUrl);
|
|
263
|
+
const approved = await settle(() => webAuthToken({ ...options, webAuth, doneUrl: challenge.doneUrl }));
|
|
264
|
+
if (approved.ok) {
|
|
265
|
+
headers.set('npm-otp', approved.value);
|
|
266
|
+
return write();
|
|
267
|
+
}
|
|
268
|
+
const timedOut = approved.cause instanceof CapabilityError && approved.cause.reason === 'registry-web-auth-timeout';
|
|
269
|
+
if (!timedOut || webAuth.retryOnTimeout !== true)
|
|
270
|
+
throw approved.cause;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/** The headers npm's client sends with a web second factor (npm-registry-fetch `getHeaders`). */
|
|
274
|
+
function webAuthHeaders(webAuth) {
|
|
275
|
+
return { 'npm-auth-type': 'web', 'npm-command': 'publish', 'npm-session': webAuth.session };
|
|
276
|
+
}
|
|
277
|
+
/** Waits on `doneUrl` (202 + `retry-after` while pending) for the one-time token the approval issues. */
|
|
278
|
+
async function webAuthToken(options) {
|
|
279
|
+
const deadline = Date.now() + (options.webAuth.timeoutMs ?? 5 * 60_000);
|
|
280
|
+
let polls = 0;
|
|
281
|
+
while (Date.now() < deadline) {
|
|
282
|
+
const done = await options.fetchImpl(options.doneUrl, {
|
|
283
|
+
headers: { authorization: `Bearer ${options.token}`, accept: 'application/json', ...webAuthHeaders(options.webAuth) }
|
|
284
|
+
});
|
|
285
|
+
polls++;
|
|
286
|
+
if (done.status === 200) {
|
|
287
|
+
const body = await settle(() => done.json());
|
|
288
|
+
const issued = body.ok ? WebAuthDoneSchema.safeParse(body.value) : undefined;
|
|
289
|
+
if (issued?.success)
|
|
290
|
+
return issued.data.token;
|
|
291
|
+
throw new CapabilityError('Web second-factor approval answered 200 without a token', 'UNAVAILABLE', {
|
|
292
|
+
reason: 'registry-web-auth-invalid',
|
|
293
|
+
details: {
|
|
294
|
+
...registryRefusalDetails(done, [options.token]),
|
|
295
|
+
polls,
|
|
296
|
+
fields: Object.keys((body.ok && ObjectBodySchema.safeParse(body.value).data) || {}).sort()
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
const details = { ...registryRefusalDetails(done, [options.token]), polls };
|
|
301
|
+
await done.body?.cancel();
|
|
302
|
+
if (done.status !== 202) {
|
|
303
|
+
throw new CapabilityError(`Web second-factor approval was refused (${done.status})`, 'PERMISSION_DENIED', {
|
|
304
|
+
reason: 'registry-web-auth-refused',
|
|
305
|
+
details
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
const seconds = Number(done.headers.get('retry-after') ?? '1');
|
|
309
|
+
await options.runtime.lifecycle.delay(Math.max(1, Number.isFinite(seconds) ? seconds : 1) * 1_000);
|
|
310
|
+
}
|
|
311
|
+
throw new CapabilityError(`Web second-factor approval was not seen on doneUrl after ${polls} polls (each 202)`, 'UNAVAILABLE', {
|
|
312
|
+
reason: 'registry-web-auth-timeout',
|
|
313
|
+
retryable: true,
|
|
314
|
+
details: { polls }
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Whether `published`, released on a tag other than `latest`, displaces the
|
|
319
|
+
* package's current `latest`. Prereleases (`1.0.0-rc.*`, etc.) are published on
|
|
320
|
+
* `rc` only and never displace `latest`. A stable release displaces `latest`
|
|
321
|
+
* when `latest` is absent (or not a version) or when `latest` is an older
|
|
322
|
+
* prerelease (`gt(published, latest)`). A stable published on another tag never
|
|
323
|
+
* displaces an existing stable `latest`. The publish PUT and the train's latest
|
|
324
|
+
* reconcile share this rule.
|
|
325
|
+
*/
|
|
326
|
+
export function latestDisplacedBy(latest, published) {
|
|
327
|
+
if (!valid(published) || prerelease(published) !== null)
|
|
328
|
+
return false;
|
|
329
|
+
if (latest === undefined || !valid(latest))
|
|
330
|
+
return true;
|
|
331
|
+
if (prerelease(latest) !== null)
|
|
332
|
+
return gt(published, latest);
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
const DistTagsSchema = z.object({ 'dist-tags': z.record(z.string(), z.string()).default({}) });
|
|
336
|
+
/** The package's current dist-tags; empty for a package the registry does not hold yet. */
|
|
337
|
+
export async function readDistTags(options) {
|
|
338
|
+
const registry = options.registry.replace(/\/$/, '');
|
|
339
|
+
const current = await options.fetchImpl(`${registry}/${encodeURIComponent(options.name)}`, {
|
|
340
|
+
headers: { authorization: `Bearer ${options.token}`, accept: 'application/json' }
|
|
341
|
+
});
|
|
342
|
+
if (current.status === 404) {
|
|
343
|
+
await current.body?.cancel();
|
|
344
|
+
return {};
|
|
345
|
+
}
|
|
346
|
+
if (!current.ok) {
|
|
347
|
+
const details = registryRefusalDetails(current, [options.token]);
|
|
348
|
+
const said = await registryErrorText(current, [options.token]);
|
|
349
|
+
throw new CapabilityError(`Reading ${options.name}'s dist-tags failed (${current.status})${said === undefined ? '' : `: ${said}`}`, 'UNAVAILABLE', { reason: 'registry-dist-tag-read-failed', retryable: current.status === 429 || current.status >= 500, details });
|
|
350
|
+
}
|
|
351
|
+
return DistTagsSchema.parse(await current.json())['dist-tags'];
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=put-attested-packument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put-attested-packument.js","sourceRoot":"","sources":["../../../src/cli/npm/put-attested-packument.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAgC,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,4FAA4F;AAC5F,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEjD,mFAAmF;AACnF,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAkB,EAAE,OAA0B;IACrF,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,IAAI,CAAC,IAAI,CAAC,EAA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H,IAAI,OAAO,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC5B,MAAM,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/D,MAAM,IAAI,eAAe,CACxB,WAAW,OAAO,CAAC,IAAI,wBAAwB,OAAO,CAAC,MAAM,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,EAAE,EACxG,aAAa,EACb,EAAE,MAAM,EAAE,+BAA+B,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,CAChH,CAAC;IACH,CAAC;IACD,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The release train's `latest` reconcile. After a train publishes, each graph
|
|
3
|
+
* package whose registry `latest` is displaced (`latestDisplacedBy`, the same
|
|
4
|
+
* rule the publish PUT applies) by its newest version on the release tag has
|
|
5
|
+
* `latest` moved through the registry's dist-tag operation, leaves first.
|
|
6
|
+
*
|
|
7
|
+
* Authority is the caller's: the bearer token is the one its publish ran
|
|
8
|
+
* under. A registry refusal (with its status and `{ error }` text) or a failed
|
|
9
|
+
* read is reported for that package, never retried around, and the reconcile
|
|
10
|
+
* continues with the next package.
|
|
11
|
+
*/
|
|
12
|
+
import { valueFreeFailure } from '@vibesdotdev/kernel';
|
|
13
|
+
/** What the reconcile did to one package's `latest`. */
|
|
14
|
+
export type LatestReconcileOutcome = {
|
|
15
|
+
name: string;
|
|
16
|
+
state: 'moved';
|
|
17
|
+
from: string | undefined;
|
|
18
|
+
to: string;
|
|
19
|
+
} | {
|
|
20
|
+
name: string;
|
|
21
|
+
state: 'unchanged';
|
|
22
|
+
latest: string | undefined;
|
|
23
|
+
release: string;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
state: 'untagged';
|
|
27
|
+
}
|
|
28
|
+
/** The registry answered the dist-tag operation with a refusal: its status and `{ error }` text. */
|
|
29
|
+
| {
|
|
30
|
+
name: string;
|
|
31
|
+
state: 'refused';
|
|
32
|
+
release: string;
|
|
33
|
+
status: number;
|
|
34
|
+
error: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** The packument read or the request itself failed. */
|
|
37
|
+
| {
|
|
38
|
+
name: string;
|
|
39
|
+
state: 'failed';
|
|
40
|
+
failure: ReturnType<typeof valueFreeFailure>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Reconcile `latest` for `packages`, which must be in dependency order
|
|
44
|
+
* (leaves first, as a release plan's `publishOrder` is). Each package is read
|
|
45
|
+
* and, when displaced, moved before the next is touched.
|
|
46
|
+
*/
|
|
47
|
+
export declare function reconcileLatestDistTags(options: {
|
|
48
|
+
registry: string;
|
|
49
|
+
token: string;
|
|
50
|
+
/** The release tag the train published on (e.g. `rc`). */
|
|
51
|
+
tag: string;
|
|
52
|
+
packages: readonly string[];
|
|
53
|
+
fetchImpl?: typeof fetch;
|
|
54
|
+
}): Promise<LatestReconcileOutcome[]>;
|
|
55
|
+
//# sourceMappingURL=reconcile-latest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-latest.d.ts","sourceRoot":"","sources":["../../../src/cli/npm/reconcile-latest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA2B,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGhF,wDAAwD;AACxD,MAAM,MAAM,sBAAsB,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE;AACrC,oGAAoG;GAClG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE;AAChG,uDAAuD;GACrD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;CAAE,CAAC;AAEnF;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACzB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAcpC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The release train's `latest` reconcile. After a train publishes, each graph
|
|
3
|
+
* package whose registry `latest` is displaced (`latestDisplacedBy`, the same
|
|
4
|
+
* rule the publish PUT applies) by its newest version on the release tag has
|
|
5
|
+
* `latest` moved through the registry's dist-tag operation, leaves first.
|
|
6
|
+
*
|
|
7
|
+
* Authority is the caller's: the bearer token is the one its publish ran
|
|
8
|
+
* under. A registry refusal (with its status and `{ error }` text) or a failed
|
|
9
|
+
* read is reported for that package, never retried around, and the reconcile
|
|
10
|
+
* continues with the next package.
|
|
11
|
+
*/
|
|
12
|
+
import { CapabilityError, settle, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
13
|
+
import { latestDisplacedBy, readDistTags, registryErrorText } from "./put-attested-packument.js";
|
|
14
|
+
/**
|
|
15
|
+
* Reconcile `latest` for `packages`, which must be in dependency order
|
|
16
|
+
* (leaves first, as a release plan's `publishOrder` is). Each package is read
|
|
17
|
+
* and, when displaced, moved before the next is touched.
|
|
18
|
+
*/
|
|
19
|
+
export async function reconcileLatestDistTags(options) {
|
|
20
|
+
if (options.tag === 'latest') {
|
|
21
|
+
throw new CapabilityError('The latest reconcile reads a release tag other than latest.', 'INVALID_INPUT', {
|
|
22
|
+
reason: 'latest-reconcile-tag-invalid'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
26
|
+
const registry = options.registry.replace(/\/$/, '');
|
|
27
|
+
const outcomes = [];
|
|
28
|
+
for (const name of options.packages) {
|
|
29
|
+
const reconciled = await settle(() => reconcileOne({ ...options, registry, fetchImpl, name }));
|
|
30
|
+
outcomes.push(reconciled.ok ? reconciled.value : { name, state: 'failed', failure: valueFreeFailure(reconciled.cause) });
|
|
31
|
+
}
|
|
32
|
+
return outcomes;
|
|
33
|
+
}
|
|
34
|
+
async function reconcileOne(options) {
|
|
35
|
+
const { name } = options;
|
|
36
|
+
const tags = await readDistTags(options);
|
|
37
|
+
const release = tags[options.tag];
|
|
38
|
+
if (release === undefined)
|
|
39
|
+
return { name, state: 'untagged' };
|
|
40
|
+
const latest = tags.latest;
|
|
41
|
+
if (!latestDisplacedBy(latest, release))
|
|
42
|
+
return { name, state: 'unchanged', latest, release };
|
|
43
|
+
const response = await options.fetchImpl(`${options.registry}/-/package/${encodeURIComponent(name)}/dist-tags/latest`, {
|
|
44
|
+
method: 'PUT',
|
|
45
|
+
headers: {
|
|
46
|
+
authorization: `Bearer ${options.token}`,
|
|
47
|
+
'content-type': 'application/json',
|
|
48
|
+
accept: 'application/json'
|
|
49
|
+
},
|
|
50
|
+
body: JSON.stringify(release)
|
|
51
|
+
});
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
const error = await registryErrorText(response, [options.token]);
|
|
54
|
+
return { name, state: 'refused', release, status: response.status, error };
|
|
55
|
+
}
|
|
56
|
+
await response.body?.cancel();
|
|
57
|
+
return { name, state: 'moved', from: latest, to: release };
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=reconcile-latest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-latest.js","sourceRoot":"","sources":["../../../src/cli/npm/reconcile-latest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAYjG;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAO7C;IACA,IAAI,OAAO,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,eAAe,CAAC,6DAA6D,EAAE,eAAe,EAAE;YACzG,MAAM,EAAE,8BAA8B;SACtC,CAAC,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC;IAC7C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC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,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,kBAAkB;SAC1B;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;KAC7B,CACD,CAAC;IACF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QAClB,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACjE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IAC5E,CAAC;IACD,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAC9B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public npm. It carries the Vibes Registry's exact bytes (`mirrorOf`), never a
|
|
3
|
+
* separate pack, and its account asks for a browser second factor on writes.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: "infra/package-registry";
|
|
8
|
+
registryType: "npm" | "docker" | "maven" | "helm";
|
|
9
|
+
authRequired: boolean;
|
|
10
|
+
ssl: boolean;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
tags?: string[] | undefined;
|
|
14
|
+
hardware?: string[] | undefined;
|
|
15
|
+
enabled?: boolean | undefined;
|
|
16
|
+
priority?: number | undefined;
|
|
17
|
+
capabilityId?: string | undefined;
|
|
18
|
+
requiredContext?: string[] | undefined;
|
|
19
|
+
optionalContext?: string[] | undefined;
|
|
20
|
+
retention?: string | {
|
|
21
|
+
reason: string;
|
|
22
|
+
maxAgeDays?: number | undefined;
|
|
23
|
+
maxEntries?: number | undefined;
|
|
24
|
+
maxBytes?: number | undefined;
|
|
25
|
+
cascadeFrom?: string | undefined;
|
|
26
|
+
ageField?: string | undefined;
|
|
27
|
+
enforcedBy?: string | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
url?: string | undefined;
|
|
30
|
+
service?: string | undefined;
|
|
31
|
+
scope?: string | undefined;
|
|
32
|
+
upstreamUrl?: string | undefined;
|
|
33
|
+
env?: {
|
|
34
|
+
name: string;
|
|
35
|
+
public?: boolean | undefined;
|
|
36
|
+
required?: boolean | undefined;
|
|
37
|
+
value?: string | undefined;
|
|
38
|
+
secret?: boolean | undefined;
|
|
39
|
+
description?: string | undefined;
|
|
40
|
+
storeKey?: string | undefined;
|
|
41
|
+
storeBinding?: boolean | undefined;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
publish?: {
|
|
44
|
+
credential: {
|
|
45
|
+
secret: string;
|
|
46
|
+
};
|
|
47
|
+
secondFactor: "web" | "none" | "otp";
|
|
48
|
+
mirrorOf?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
config?: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
adapter: string;
|
|
53
|
+
} | undefined;
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
56
|
+
//# sourceMappingURL=npmjs.package-registry.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmjs.package-registry.descriptor.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/registries/npmjs.package-registry.descriptor.ts"],"names":[],"mappings":"AAEA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBASG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PackageRegistryDescriptorSchema } from '@vibesdotdev/infra-core';
|
|
2
|
+
/**
|
|
3
|
+
* Public npm. It carries the Vibes Registry's exact bytes (`mirrorOf`), never a
|
|
4
|
+
* separate pack, and its account asks for a browser second factor on writes.
|
|
5
|
+
*/
|
|
6
|
+
export default PackageRegistryDescriptorSchema.parse({
|
|
7
|
+
kind: 'infra/package-registry',
|
|
8
|
+
id: 'npmjs',
|
|
9
|
+
name: 'npm',
|
|
10
|
+
url: 'https://registry.npmjs.org',
|
|
11
|
+
registryType: 'npm',
|
|
12
|
+
authRequired: false,
|
|
13
|
+
publish: { credential: { secret: 'NPM_TOKEN' }, secondFactor: 'web', mirrorOf: 'vibes-registry' },
|
|
14
|
+
config: { adapter: 'npm-protocol' }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=npmjs.package-registry.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmjs.package-registry.descriptor.js","sourceRoot":"","sources":["../../../../src/cli/npm/registries/npmjs.package-registry.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;GAGG;AACH,eAAe,+BAA+B,CAAC,KAAK,CAAC;IACpD,IAAI,EAAE,wBAAwB;IAC9B,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,4BAA4B;IACjC,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE;IACjG,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registries.plugin.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/registries/package-registries.plugin.ts"],"names":[],"mappings":";AAyBA,wBAoBG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The package registries a Vibes release writes to, as `infra/package-registry`
|
|
3
|
+
* descriptors, each with the npm-protocol implementation registered under its id.
|
|
4
|
+
* A workspace declares another npm-protocol registry the same way: a descriptor
|
|
5
|
+
* plus a loader that calls `createNpmProtocolPackageRegistry`.
|
|
6
|
+
*/
|
|
7
|
+
import { CapabilityError, createRuntimeImplementation, createRuntimePlugin, VibesRuntime } from '@vibesdotdev/kernel';
|
|
8
|
+
import { PackageRegistryDescriptorSchema } from '@vibesdotdev/infra-core';
|
|
9
|
+
import vibesRegistry from "./vibes-registry.package-registry.descriptor.js";
|
|
10
|
+
import npmjs from "./npmjs.package-registry.descriptor.js";
|
|
11
|
+
const registries = [vibesRegistry, npmjs];
|
|
12
|
+
/** The npm-protocol implementation loads only when a registry resolves. */
|
|
13
|
+
const loadNpmProtocolRegistry = () => import("../npm-protocol-package-registry.js");
|
|
14
|
+
function hostRuntime(resolving, registered) {
|
|
15
|
+
const runtime = resolving ?? registered;
|
|
16
|
+
if (runtime instanceof VibesRuntime)
|
|
17
|
+
return runtime;
|
|
18
|
+
throw new CapabilityError('A package registry needs the full runtime that resolves it.', 'UNAVAILABLE', {
|
|
19
|
+
reason: 'runtime-unavailable',
|
|
20
|
+
details: { owner: 'infra-deploy/package-registries' }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export default createRuntimePlugin({
|
|
24
|
+
id: 'infra-deploy.package-registries',
|
|
25
|
+
name: 'Package registries',
|
|
26
|
+
descriptors: registries,
|
|
27
|
+
onRegister(runtime) {
|
|
28
|
+
for (const descriptor of registries) {
|
|
29
|
+
runtime.registerLoader('infra/package-registry', descriptor.id, async (resolving) => {
|
|
30
|
+
const { createNpmProtocolPackageRegistry } = await loadNpmProtocolRegistry();
|
|
31
|
+
return createRuntimeImplementation({
|
|
32
|
+
id: descriptor.id,
|
|
33
|
+
kind: 'infra/package-registry',
|
|
34
|
+
priority: 10,
|
|
35
|
+
implementation: createNpmProtocolPackageRegistry({
|
|
36
|
+
descriptor: PackageRegistryDescriptorSchema.parse(descriptor),
|
|
37
|
+
runtime: hostRuntime(resolving, runtime)
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=package-registries.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registries.plugin.js","sourceRoot":"","sources":["../../../../src/cli/npm/registries/package-registries.plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AACvI,OAAO,EAAE,+BAA+B,EAAkC,MAAM,yBAAyB,CAAC;AAC1G,OAAO,aAAa,MAAM,iDAAiD,CAAC;AAC5E,OAAO,KAAK,MAAM,wCAAwC,CAAC;AAE3D,MAAM,UAAU,GAAgC,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAEvE,2EAA2E;AAC3E,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC;AAEpF,SAAS,WAAW,CAAC,SAAmC,EAAE,UAAsB;IAC/E,MAAM,OAAO,GAAG,SAAS,IAAI,UAAU,CAAC;IACxC,IAAI,OAAO,YAAY,YAAY;QAAE,OAAO,OAAO,CAAC;IACpD,MAAM,IAAI,eAAe,CAAC,6DAA6D,EAAE,aAAa,EAAE;QACvG,MAAM,EAAE,qBAAqB;QAC7B,OAAO,EAAE,EAAE,KAAK,EAAE,iCAAiC,EAAE;KACrD,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,mBAAmB,CAAC;IAClC,EAAE,EAAE,iCAAiC;IACrC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,UAAU;IACvB,UAAU,CAAC,OAAmB;QAC7B,KAAK,MAAM,UAAU,IAAI,UAAU,EAAE,CAAC;YACrC,OAAO,CAAC,cAAc,CAAC,wBAAwB,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK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