@vibesdotdev/infra-deploy 0.0.2 → 1.0.0-rc.4
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 +34 -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 +42 -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 +82 -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 +80 -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 +48 -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 +47 -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 +532 -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 +64 -0
- package/dist/cli/npm/mirror-registry-artifacts.d.ts.map +1 -0
- package/dist/cli/npm/mirror-registry-artifacts.js +114 -0
- package/dist/cli/npm/mirror-registry-artifacts.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/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 +164 -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 +96 -0
- package/dist/cli/npm/put-attested-packument.d.ts.map +1 -0
- package/dist/cli/npm/put-attested-packument.js +240 -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/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 +56 -0
- package/dist/cli/run/deployment-provider.d.ts.map +1 -0
- package/dist/cli/run/deployment-provider.js +295 -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 +403 -0
- package/dist/cli/run/immutable-deployment-release.program.d.ts.map +1 -0
- package/dist/cli/run/immutable-deployment-release.program.js +589 -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 +80 -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 +50 -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 +464 -226
- package/dist/cli/run/infra-deploy.run.cli-command.impl.js.map +1 -1
- package/dist/cli/shared/build-workspace-artifacts.d.ts +147 -0
- package/dist/cli/shared/build-workspace-artifacts.d.ts.map +1 -0
- package/dist/cli/shared/build-workspace-artifacts.js +2013 -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/workers/doks-worker-runtime.d.ts +238 -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 +63 -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
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getRuntimePath } from '@vibesdotdev/paths';
|
|
2
|
+
import { CapabilityError, requireRuntimeCwd, settle, settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
3
|
+
import { JsonObjectSchema, JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
4
|
+
import { hostArgv, requestCLIExit } from '@vibesdotdev/cli/providers';
|
|
5
|
+
import { InfraLogsDescriptorSchema } from '@vibesdotdev/infra-core';
|
|
6
|
+
import { z } from 'zod/v4';
|
|
3
7
|
import { discoverDeployments } from "../shared/discover-deployments.js";
|
|
4
8
|
import { streamWorkerTail } from "./stream-worker-tail.js";
|
|
9
|
+
import { readCredentialSource } from "../shared/credential-source.js";
|
|
10
|
+
import { loadDeploymentConfig } from "../../config-loader.js";
|
|
11
|
+
const FiniteNumberSchema = z.number().finite();
|
|
12
|
+
const TimestampSchema = FiniteNumberSchema.gt(1_000_000_000_000);
|
|
13
|
+
const JsonListSchema = z.array(JsonValueSchema);
|
|
14
|
+
const StatusSchema = z.enum(['ok', 'error', 'canceled']);
|
|
15
|
+
const AssetOnlyWorkerPattern = /asset-only|no Worker script/i;
|
|
16
|
+
/** The deployment provider whose deployed units a logs source observes, as its descriptor declares it. */
|
|
17
|
+
const DeploymentProviderConfigSchema = z.object({ deploymentProvider: z.string().min(1) }).loose();
|
|
18
|
+
const LogsReadySchema = z.object({
|
|
19
|
+
getAnalytics: z.function()
|
|
20
|
+
});
|
|
21
|
+
const AGGREGATE_QUERY_FAILED = 'Analytics query failed.';
|
|
22
|
+
const TAIL_ATTACH_FAILED = 'Tail session could not be started.';
|
|
23
|
+
const TAIL_STREAM_FAILED = 'Tail streaming failed.';
|
|
24
|
+
const LOGS_RESOLVE_FAILED = 'Log implementation could not be resolved.';
|
|
25
|
+
const LOGS_CREDENTIAL_CHOICE_UNSUPPORTED = 'This log source reads only its default credentials; it takes no --environment or --use-ambient-credentials.';
|
|
5
26
|
/** Parse a duration suffix like "30s", "2m", "1h" → milliseconds. Falls back to 30s. */
|
|
6
27
|
function parseDurationMs(input) {
|
|
7
28
|
if (!input)
|
|
@@ -22,26 +43,663 @@ function parseDurationMs(input) {
|
|
|
22
43
|
return 30_000;
|
|
23
44
|
}
|
|
24
45
|
function readString(v) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
46
|
+
const text = z.string().safeParse(v);
|
|
47
|
+
if (text.success)
|
|
48
|
+
return text.data.length > 0 ? text.data : undefined;
|
|
49
|
+
const numeric = FiniteNumberSchema.safeParse(v);
|
|
50
|
+
if (numeric.success)
|
|
51
|
+
return String(numeric.data);
|
|
29
52
|
return undefined;
|
|
30
53
|
}
|
|
31
54
|
function readBoolean(v) {
|
|
32
|
-
|
|
55
|
+
if (v === true)
|
|
56
|
+
return true;
|
|
57
|
+
const text = z.string().safeParse(v);
|
|
58
|
+
return text.success && text.data === 'true';
|
|
59
|
+
}
|
|
60
|
+
function readStringArray(v) {
|
|
61
|
+
const list = JsonListSchema.safeParse(v);
|
|
62
|
+
if (list.success) {
|
|
63
|
+
return list.data.flatMap((entry) => {
|
|
64
|
+
const text = readString(entry);
|
|
65
|
+
return text === undefined ? [] : [text];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const single = readString(v);
|
|
69
|
+
return single ? [single] : [];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Analytics aggregates currently expose fleet totals only. Fail closed when a
|
|
73
|
+
* caller supplies event-level filters instead of returning an authoritative-
|
|
74
|
+
* looking but unfiltered number.
|
|
75
|
+
*/
|
|
76
|
+
export function unsupportedAggregateFilters(input) {
|
|
77
|
+
const flags = [];
|
|
78
|
+
if (input.search)
|
|
79
|
+
flags.push('--search');
|
|
80
|
+
if (input.path)
|
|
81
|
+
flags.push('--path');
|
|
82
|
+
if (input.method)
|
|
83
|
+
flags.push('--method');
|
|
84
|
+
if (input.statusCode)
|
|
85
|
+
flags.push('--status-code');
|
|
86
|
+
if (input.level)
|
|
87
|
+
flags.push('--level');
|
|
88
|
+
if (input.requestId)
|
|
89
|
+
flags.push('--request-id');
|
|
90
|
+
if (input.status)
|
|
91
|
+
flags.push('--status');
|
|
92
|
+
if (input.fields && input.fields.length > 0)
|
|
93
|
+
flags.push('--field');
|
|
94
|
+
if (input.from)
|
|
95
|
+
flags.push('--from');
|
|
96
|
+
if (input.to)
|
|
97
|
+
flags.push('--to');
|
|
98
|
+
if (input.regex)
|
|
99
|
+
flags.push('--regex');
|
|
100
|
+
if (input.matchCase)
|
|
101
|
+
flags.push('--match-case');
|
|
102
|
+
if (input.explicitLimit)
|
|
103
|
+
flags.push('--limit');
|
|
104
|
+
if (input.explicitTimeStart)
|
|
105
|
+
flags.push('--time-start');
|
|
106
|
+
return flags;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The source under one command's credential choice (`--use-ambient-credentials`,
|
|
110
|
+
* `--environment`) through the kind's `create`; the source refuses credentials
|
|
111
|
+
* it cannot resolve. A source without `create` cannot honour the choice, so it
|
|
112
|
+
* answers null rather than querying with credentials the operator did not pick.
|
|
113
|
+
*/
|
|
114
|
+
export async function withLogsSourceOptions(impl, options) {
|
|
115
|
+
return impl.create ? impl.create(options) : null;
|
|
116
|
+
}
|
|
117
|
+
function hasExplicitOption(argv, option) {
|
|
118
|
+
return argv.some((arg) => arg === option || arg.startsWith(`${option}=`));
|
|
119
|
+
}
|
|
120
|
+
function parseRelativeTimeMs(input) {
|
|
121
|
+
const m = /^(\d+)\s*(ms|s|m|h|d)$/i.exec(input.trim());
|
|
122
|
+
if (!m)
|
|
123
|
+
return null;
|
|
124
|
+
const n = Number.parseInt(m[1], 10);
|
|
125
|
+
const unit = m[2].toLowerCase();
|
|
126
|
+
if (unit === 'ms')
|
|
127
|
+
return n;
|
|
128
|
+
if (unit === 's')
|
|
129
|
+
return n * 1000;
|
|
130
|
+
if (unit === 'm')
|
|
131
|
+
return n * 60_000;
|
|
132
|
+
if (unit === 'h')
|
|
133
|
+
return n * 3_600_000;
|
|
134
|
+
if (unit === 'd')
|
|
135
|
+
return n * 86_400_000;
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
export function parseTelemetryTime(input, fallback, epochMs) {
|
|
139
|
+
if (!input)
|
|
140
|
+
return fallback;
|
|
141
|
+
const relative = parseRelativeTimeMs(input);
|
|
142
|
+
if (relative !== null)
|
|
143
|
+
return epochMs - relative;
|
|
144
|
+
const parsed = Date.parse(input);
|
|
145
|
+
if (Number.isFinite(parsed))
|
|
146
|
+
return parsed;
|
|
147
|
+
const numeric = Number(input);
|
|
148
|
+
if (Number.isFinite(numeric))
|
|
149
|
+
return numeric;
|
|
150
|
+
return fallback;
|
|
151
|
+
}
|
|
152
|
+
export function requireLogsWallClockMs(runtime) {
|
|
153
|
+
const readWallClock = runtime.localEnvironment.getWallClockMs;
|
|
154
|
+
if (readWallClock === undefined) {
|
|
155
|
+
throw new CapabilityError('The runtime wall clock is unavailable.', 'UNAVAILABLE', {
|
|
156
|
+
reason: 'runtime-clock-unavailable'
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const epoch = readWallClock();
|
|
160
|
+
if (!Number.isFinite(epoch)) {
|
|
161
|
+
throw new CapabilityError('The runtime wall clock is not finite.', 'UNAVAILABLE', {
|
|
162
|
+
reason: 'runtime-clock-unavailable'
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
return epoch;
|
|
166
|
+
}
|
|
167
|
+
export function resolveHistoricalWindow(input, epochMs) {
|
|
168
|
+
const to = parseTelemetryTime(input.to, epochMs, epochMs);
|
|
169
|
+
const from = parseTelemetryTime(input.from ?? input.timeStart, to - 86_400_000, to);
|
|
170
|
+
return { from, to };
|
|
171
|
+
}
|
|
172
|
+
function parseFieldValue(raw) {
|
|
173
|
+
if (raw === 'true')
|
|
174
|
+
return { value: true, type: 'boolean' };
|
|
175
|
+
if (raw === 'false')
|
|
176
|
+
return { value: false, type: 'boolean' };
|
|
177
|
+
const numeric = Number(raw);
|
|
178
|
+
if (raw.trim() !== '' && Number.isFinite(numeric))
|
|
179
|
+
return { value: numeric, type: 'number' };
|
|
180
|
+
return { value: raw, type: 'string' };
|
|
181
|
+
}
|
|
182
|
+
function invalidFieldMessage(input) {
|
|
183
|
+
return `Invalid --field filter '${input}'. Use key=value, key~value, key!=value, key>number, key<number, or key?`;
|
|
184
|
+
}
|
|
185
|
+
function parseAdvancedFilter(input) {
|
|
186
|
+
if (input.endsWith('?')) {
|
|
187
|
+
return { ok: true, filter: { key: input.slice(0, -1), operation: 'exists' } };
|
|
188
|
+
}
|
|
189
|
+
const operators = [
|
|
190
|
+
{ token: '!=', operation: 'neq' },
|
|
191
|
+
{ token: '>=', operation: 'gte' },
|
|
192
|
+
{ token: '<=', operation: 'lte' },
|
|
193
|
+
{ token: '~', operation: 'includes' },
|
|
194
|
+
{ token: '>', operation: 'gt' },
|
|
195
|
+
{ token: '<', operation: 'lt' },
|
|
196
|
+
{ token: '=', operation: 'eq' }
|
|
197
|
+
];
|
|
198
|
+
for (const candidate of operators) {
|
|
199
|
+
const idx = input.indexOf(candidate.token);
|
|
200
|
+
if (idx <= 0)
|
|
201
|
+
continue;
|
|
202
|
+
const key = input.slice(0, idx).trim();
|
|
203
|
+
const raw = input.slice(idx + candidate.token.length).trim();
|
|
204
|
+
const parsed = parseFieldValue(raw);
|
|
205
|
+
return {
|
|
206
|
+
ok: true,
|
|
207
|
+
filter: { key, operation: candidate.operation, type: parsed.type, value: parsed.value }
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return { ok: false, message: invalidFieldMessage(input) };
|
|
211
|
+
}
|
|
212
|
+
function asJsonObject(value) {
|
|
213
|
+
const parsed = JsonObjectSchema.safeParse(value);
|
|
214
|
+
return parsed.success ? parsed.data : undefined;
|
|
215
|
+
}
|
|
216
|
+
function asJsonList(value) {
|
|
217
|
+
const parsed = JsonListSchema.safeParse(value);
|
|
218
|
+
return parsed.success ? parsed.data : undefined;
|
|
219
|
+
}
|
|
220
|
+
function groupedInvocations(record) {
|
|
221
|
+
const grouped = [];
|
|
222
|
+
for (const [requestId, events] of Object.entries(record)) {
|
|
223
|
+
if (requestId === 'count' || requestId === 'fields' || requestId === 'series')
|
|
224
|
+
continue;
|
|
225
|
+
grouped.push({ requestId, events });
|
|
226
|
+
}
|
|
227
|
+
return grouped;
|
|
228
|
+
}
|
|
229
|
+
function extractTelemetryRows(result, view) {
|
|
230
|
+
const directList = asJsonList(result[view]);
|
|
231
|
+
if (directList)
|
|
232
|
+
return directList;
|
|
233
|
+
const directRecord = asJsonObject(result[view]);
|
|
234
|
+
if (directRecord) {
|
|
235
|
+
const nestedView = asJsonList(directRecord[view]);
|
|
236
|
+
if (nestedView)
|
|
237
|
+
return nestedView;
|
|
238
|
+
if (view === 'events') {
|
|
239
|
+
const events = asJsonList(directRecord.events);
|
|
240
|
+
if (events)
|
|
241
|
+
return events;
|
|
242
|
+
}
|
|
243
|
+
if (view === 'invocations') {
|
|
244
|
+
const invocations = asJsonList(directRecord.invocations);
|
|
245
|
+
if (invocations)
|
|
246
|
+
return invocations;
|
|
247
|
+
const grouped = groupedInvocations(directRecord);
|
|
248
|
+
if (grouped.length > 0)
|
|
249
|
+
return grouped;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const eventsRecord = asJsonObject(result.events);
|
|
253
|
+
if (eventsRecord) {
|
|
254
|
+
const nestedEvents = asJsonList(eventsRecord.events);
|
|
255
|
+
if (nestedEvents)
|
|
256
|
+
return nestedEvents;
|
|
257
|
+
}
|
|
258
|
+
const events = asJsonList(result.events);
|
|
259
|
+
if (events)
|
|
260
|
+
return events;
|
|
261
|
+
const invocationsRecord = asJsonObject(result.invocations);
|
|
262
|
+
if (invocationsRecord) {
|
|
263
|
+
const nestedInvocations = asJsonList(invocationsRecord.invocations);
|
|
264
|
+
if (nestedInvocations)
|
|
265
|
+
return nestedInvocations;
|
|
266
|
+
const grouped = groupedInvocations(invocationsRecord);
|
|
267
|
+
if (grouped.length > 0)
|
|
268
|
+
return grouped;
|
|
269
|
+
}
|
|
270
|
+
const invocations = asJsonList(result.invocations);
|
|
271
|
+
if (invocations)
|
|
272
|
+
return invocations;
|
|
273
|
+
const calculations = asJsonList(result.calculations);
|
|
274
|
+
if (calculations)
|
|
275
|
+
return calculations;
|
|
276
|
+
const rows = asJsonList(result.rows);
|
|
277
|
+
if (rows)
|
|
278
|
+
return rows;
|
|
279
|
+
const nested = asJsonObject(result.result);
|
|
280
|
+
if (nested) {
|
|
281
|
+
const nestedRows = extractTelemetryRows(nested, view);
|
|
282
|
+
if (nestedRows.length > 0)
|
|
283
|
+
return nestedRows;
|
|
284
|
+
}
|
|
285
|
+
return [];
|
|
286
|
+
}
|
|
287
|
+
function admitTelemetryField(target, key, value) {
|
|
288
|
+
if (value === undefined)
|
|
289
|
+
return;
|
|
290
|
+
if (Array.isArray(value)) {
|
|
291
|
+
const admitted = [];
|
|
292
|
+
for (const entry of value) {
|
|
293
|
+
const parsed = JsonValueSchema.safeParse(entry);
|
|
294
|
+
if (parsed.success)
|
|
295
|
+
admitted.push(parsed.data);
|
|
296
|
+
}
|
|
297
|
+
if (value.length === 0 || admitted.length > 0)
|
|
298
|
+
target[key] = admitted;
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const direct = JsonValueSchema.safeParse(value);
|
|
302
|
+
if (direct.success) {
|
|
303
|
+
target[key] = direct.data;
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const written = settleNow(() => JSON.stringify(value));
|
|
307
|
+
if (!written.ok)
|
|
308
|
+
return;
|
|
309
|
+
const parsed = settleNow(() => JSON.parse(written.value));
|
|
310
|
+
if (!parsed.ok)
|
|
311
|
+
return;
|
|
312
|
+
const json = JsonValueSchema.safeParse(parsed.value);
|
|
313
|
+
if (json.success)
|
|
314
|
+
target[key] = json.data;
|
|
315
|
+
}
|
|
316
|
+
function telemetryObject(result) {
|
|
317
|
+
const target = {};
|
|
318
|
+
admitTelemetryField(target, 'events', result.events);
|
|
319
|
+
admitTelemetryField(target, 'invocations', result.invocations);
|
|
320
|
+
admitTelemetryField(target, 'calculations', result.calculations);
|
|
321
|
+
admitTelemetryField(target, 'rows', result.rows);
|
|
322
|
+
admitTelemetryField(target, 'result', result.result);
|
|
323
|
+
if (result.queryId !== undefined)
|
|
324
|
+
target.queryId = result.queryId;
|
|
325
|
+
if (result.count !== undefined)
|
|
326
|
+
target.count = result.count;
|
|
327
|
+
if (result.matchedBeforeLimit !== undefined)
|
|
328
|
+
target.matchedBeforeLimit = result.matchedBeforeLimit;
|
|
329
|
+
return target;
|
|
330
|
+
}
|
|
331
|
+
function readPathSegment(current, segment) {
|
|
332
|
+
const list = JsonListSchema.safeParse(current);
|
|
333
|
+
if (list.success) {
|
|
334
|
+
if (!/^\d+$/.test(segment))
|
|
335
|
+
return undefined;
|
|
336
|
+
const index = Number.parseInt(segment, 10);
|
|
337
|
+
return list.data[index];
|
|
338
|
+
}
|
|
339
|
+
const object = JsonObjectSchema.safeParse(current);
|
|
340
|
+
if (!object.success)
|
|
341
|
+
return undefined;
|
|
342
|
+
return object.data[segment];
|
|
343
|
+
}
|
|
344
|
+
function getRecordPath(record, path) {
|
|
345
|
+
const segments = path.split('.');
|
|
346
|
+
let current = record;
|
|
347
|
+
for (const segment of segments) {
|
|
348
|
+
current = readPathSegment(current, segment);
|
|
349
|
+
if (current === undefined)
|
|
350
|
+
return undefined;
|
|
351
|
+
}
|
|
352
|
+
if (current === undefined || current === null)
|
|
353
|
+
return undefined;
|
|
354
|
+
return current;
|
|
355
|
+
}
|
|
356
|
+
function pickRecord(record, paths) {
|
|
357
|
+
for (const path of paths) {
|
|
358
|
+
const value = getRecordPath(record, path);
|
|
359
|
+
if (value !== undefined && value !== null && value !== '')
|
|
360
|
+
return value;
|
|
361
|
+
}
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
function jsonText(value) {
|
|
365
|
+
const written = settleNow(() => JSON.stringify(value));
|
|
366
|
+
return written.ok && written.value !== undefined ? written.value : '';
|
|
367
|
+
}
|
|
368
|
+
function stringifyCell(value, maxLength = 140) {
|
|
369
|
+
if (value === null || value === undefined)
|
|
370
|
+
return '';
|
|
371
|
+
const timestamp = TimestampSchema.safeParse(value);
|
|
372
|
+
let text;
|
|
373
|
+
if (timestamp.success) {
|
|
374
|
+
text = new Date(timestamp.data).toISOString();
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
const asText = z.string().safeParse(value);
|
|
378
|
+
text = asText.success ? asText.data : jsonText(value);
|
|
379
|
+
}
|
|
380
|
+
return text.length > maxLength ? `${text.slice(0, maxLength - 1)}…` : text;
|
|
381
|
+
}
|
|
382
|
+
const SENSITIVE_FIELD_NAMES = new Set([
|
|
383
|
+
'accesscode',
|
|
384
|
+
'accesstoken',
|
|
385
|
+
'apikey',
|
|
386
|
+
'authorization',
|
|
387
|
+
'authorizationcode',
|
|
388
|
+
'bearer',
|
|
389
|
+
'clientsecret',
|
|
390
|
+
'code',
|
|
391
|
+
'idtoken',
|
|
392
|
+
'oauthcode',
|
|
393
|
+
'refreshtoken',
|
|
394
|
+
'secret',
|
|
395
|
+
'signature',
|
|
396
|
+
'state',
|
|
397
|
+
'token'
|
|
398
|
+
]);
|
|
399
|
+
const SENSITIVE_QUERY_PARAM_NAMES = new Set([
|
|
400
|
+
'access_token',
|
|
401
|
+
'api_key',
|
|
402
|
+
'authorization',
|
|
403
|
+
'client_secret',
|
|
404
|
+
'code',
|
|
405
|
+
'id_token',
|
|
406
|
+
'key',
|
|
407
|
+
'oauth_token',
|
|
408
|
+
'refresh_token',
|
|
409
|
+
'signature',
|
|
410
|
+
'state',
|
|
411
|
+
'token'
|
|
412
|
+
]);
|
|
413
|
+
function normalizeSecretName(name) {
|
|
414
|
+
return name.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
415
|
+
}
|
|
416
|
+
function shouldRedactFieldName(name) {
|
|
417
|
+
return SENSITIVE_FIELD_NAMES.has(normalizeSecretName(name));
|
|
418
|
+
}
|
|
419
|
+
function shouldRedactQueryParamName(name) {
|
|
420
|
+
return SENSITIVE_QUERY_PARAM_NAMES.has(name.toLowerCase());
|
|
421
|
+
}
|
|
422
|
+
function redactUrlLikeText(text) {
|
|
423
|
+
let redacted = text.replace(/([?&](?:access_token|api_key|authorization|client_secret|code|id_token|key|oauth_token|refresh_token|signature|state|token)=)[^&#\s"']+/gi, '$1[redacted]');
|
|
424
|
+
const parsed = settleNow(() => new URL(redacted));
|
|
425
|
+
if (parsed.ok) {
|
|
426
|
+
let changed = false;
|
|
427
|
+
for (const key of Array.from(parsed.value.searchParams.keys())) {
|
|
428
|
+
if (shouldRedactQueryParamName(key)) {
|
|
429
|
+
parsed.value.searchParams.set(key, '[redacted]');
|
|
430
|
+
changed = true;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if (changed)
|
|
434
|
+
redacted = parsed.value.toString();
|
|
435
|
+
}
|
|
436
|
+
return redacted;
|
|
437
|
+
}
|
|
438
|
+
function redactTelemetryValue(value, fieldName, depth = 0) {
|
|
439
|
+
if (fieldName && shouldRedactFieldName(fieldName))
|
|
440
|
+
return '[redacted]';
|
|
441
|
+
if (value === null || value === undefined)
|
|
442
|
+
return null;
|
|
443
|
+
const text = z.string().safeParse(value);
|
|
444
|
+
if (text.success)
|
|
445
|
+
return redactUrlLikeText(text.data);
|
|
446
|
+
const list = JsonListSchema.safeParse(value);
|
|
447
|
+
if (list.success) {
|
|
448
|
+
if (depth > 12)
|
|
449
|
+
return '[redacted-depth-limit]';
|
|
450
|
+
return list.data.map((entry) => redactTelemetryValue(entry, undefined, depth + 1));
|
|
451
|
+
}
|
|
452
|
+
const object = JsonObjectSchema.safeParse(value);
|
|
453
|
+
if (object.success) {
|
|
454
|
+
if (depth > 12)
|
|
455
|
+
return '[redacted-depth-limit]';
|
|
456
|
+
const redacted = {};
|
|
457
|
+
for (const [key, entry] of Object.entries(object.data)) {
|
|
458
|
+
redacted[key] = redactTelemetryValue(entry, key, depth + 1);
|
|
459
|
+
}
|
|
460
|
+
return redacted;
|
|
461
|
+
}
|
|
462
|
+
return value;
|
|
463
|
+
}
|
|
464
|
+
function unwrapTelemetryRecord(record) {
|
|
465
|
+
const object = JsonObjectSchema.safeParse(record);
|
|
466
|
+
if (!object.success)
|
|
467
|
+
return record;
|
|
468
|
+
const events = JsonListSchema.safeParse(object.data.events);
|
|
469
|
+
if (!events.success || events.data.length === 0)
|
|
470
|
+
return record;
|
|
471
|
+
const first = events.data[0];
|
|
472
|
+
return first === undefined ? record : first;
|
|
473
|
+
}
|
|
474
|
+
function telemetrySummaryJson(summary) {
|
|
475
|
+
return {
|
|
476
|
+
time: summary.time,
|
|
477
|
+
service: summary.service,
|
|
478
|
+
level: summary.level,
|
|
479
|
+
outcome: summary.outcome,
|
|
480
|
+
status: summary.status,
|
|
481
|
+
method: summary.method,
|
|
482
|
+
url: summary.url,
|
|
483
|
+
message: summary.message
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
function summarizeTelemetryRecord(record) {
|
|
487
|
+
const summaryRecord = unwrapTelemetryRecord(record);
|
|
488
|
+
return {
|
|
489
|
+
time: stringifyCell(pickRecord(summaryRecord, [
|
|
490
|
+
'$metadata.timestamp',
|
|
491
|
+
'$metadata.eventTimestamp',
|
|
492
|
+
'timestamp',
|
|
493
|
+
'eventTimestamp',
|
|
494
|
+
'$metadata.startTime',
|
|
495
|
+
'startTime'
|
|
496
|
+
]), 36),
|
|
497
|
+
service: stringifyCell(pickRecord(summaryRecord, ['$metadata.service', '$workers.scriptName', 'service', 'scriptName']), 36),
|
|
498
|
+
level: stringifyCell(pickRecord(summaryRecord, ['$metadata.level', 'level']), 16),
|
|
499
|
+
outcome: stringifyCell(pickRecord(summaryRecord, ['$workers.outcome', 'outcome']), 24),
|
|
500
|
+
status: stringifyCell(pickRecord(summaryRecord, [
|
|
501
|
+
'$metadata.statusCode',
|
|
502
|
+
'$workers.event.response.status',
|
|
503
|
+
'event.response.status',
|
|
504
|
+
'response.status'
|
|
505
|
+
]), 8),
|
|
506
|
+
method: stringifyCell(pickRecord(summaryRecord, [
|
|
507
|
+
'$metadata.method',
|
|
508
|
+
'$workers.event.request.method',
|
|
509
|
+
'event.request.method',
|
|
510
|
+
'request.method'
|
|
511
|
+
]), 8),
|
|
512
|
+
url: stringifyCell(pickRecord(summaryRecord, [
|
|
513
|
+
'$metadata.url',
|
|
514
|
+
'$workers.event.request.url',
|
|
515
|
+
'event.request.url',
|
|
516
|
+
'request.url',
|
|
517
|
+
'url'
|
|
518
|
+
]), 120),
|
|
519
|
+
message: stringifyCell(pickRecord(summaryRecord, [
|
|
520
|
+
'$metadata.message',
|
|
521
|
+
'message',
|
|
522
|
+
'logs.0.message',
|
|
523
|
+
'exceptions.0.message'
|
|
524
|
+
]) ?? pickRecord(record, ['requestId']), 160)
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
export function buildTelemetryJsonPayload(input) {
|
|
528
|
+
const redactedRows = input.rows.map((row) => redactTelemetryValue(row));
|
|
529
|
+
const rows = input.compact
|
|
530
|
+
? redactedRows.map((row) => telemetrySummaryJson(summarizeTelemetryRecord(row)))
|
|
531
|
+
: redactedRows;
|
|
532
|
+
return {
|
|
533
|
+
source: input.source,
|
|
534
|
+
worker: input.worker,
|
|
535
|
+
mode: input.mode,
|
|
536
|
+
from: new Date(input.from).toISOString(),
|
|
537
|
+
to: new Date(input.to).toISOString(),
|
|
538
|
+
count: input.count,
|
|
539
|
+
resultKeys: input.resultKeys,
|
|
540
|
+
compact: Boolean(input.compact),
|
|
541
|
+
rows
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
function scalarText(value) {
|
|
545
|
+
const text = z.string().safeParse(value);
|
|
546
|
+
if (text.success)
|
|
547
|
+
return text.data;
|
|
548
|
+
const numeric = FiniteNumberSchema.safeParse(value);
|
|
549
|
+
if (numeric.success)
|
|
550
|
+
return String(numeric.data);
|
|
551
|
+
const flag = z.boolean().safeParse(value);
|
|
552
|
+
if (flag.success)
|
|
553
|
+
return flag.data ? 'true' : 'false';
|
|
554
|
+
return undefined;
|
|
555
|
+
}
|
|
556
|
+
function matchesStringValue(value, expected, mode) {
|
|
557
|
+
const text = scalarText(value);
|
|
558
|
+
if (text === undefined)
|
|
559
|
+
return false;
|
|
560
|
+
return mode === 'eq' ? text === expected : text.includes(expected);
|
|
561
|
+
}
|
|
562
|
+
function matchesNumberValue(value, expected) {
|
|
563
|
+
const numeric = FiniteNumberSchema.safeParse(value);
|
|
564
|
+
if (numeric.success)
|
|
565
|
+
return numeric.data === expected;
|
|
566
|
+
const text = z.string().safeParse(value);
|
|
567
|
+
if (text.success)
|
|
568
|
+
return Number.parseInt(text.data, 10) === expected;
|
|
569
|
+
return false;
|
|
570
|
+
}
|
|
571
|
+
function isAssetOnlyWorker(failure) {
|
|
572
|
+
const text = failure instanceof Error ? failure.message : failure.description;
|
|
573
|
+
return text.includes('100311') || AssetOnlyWorkerPattern.test(text);
|
|
574
|
+
}
|
|
575
|
+
function readyLogsImplementation(impl) {
|
|
576
|
+
return LogsReadySchema.safeParse(impl).success ? impl : null;
|
|
577
|
+
}
|
|
578
|
+
function tailEntryMessage(entry) {
|
|
579
|
+
const parts = [];
|
|
580
|
+
for (const item of entry.message ?? []) {
|
|
581
|
+
const text = z.string().safeParse(item);
|
|
582
|
+
if (text.success) {
|
|
583
|
+
parts.push(text.data);
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
const json = JsonValueSchema.safeParse(item);
|
|
587
|
+
if (!json.success)
|
|
588
|
+
continue;
|
|
589
|
+
const written = settleNow(() => JSON.stringify(json.data));
|
|
590
|
+
if (written.ok && written.value !== undefined)
|
|
591
|
+
parts.push(written.value);
|
|
592
|
+
}
|
|
593
|
+
return parts.join(' ');
|
|
594
|
+
}
|
|
595
|
+
function telemetryRecordMatches(record, input) {
|
|
596
|
+
const summaryRecord = unwrapTelemetryRecord(record);
|
|
597
|
+
if (input.workerName) {
|
|
598
|
+
const service = pickRecord(summaryRecord, [
|
|
599
|
+
'$metadata.service',
|
|
600
|
+
'$workers.scriptName',
|
|
601
|
+
'$workers.script_name',
|
|
602
|
+
'service',
|
|
603
|
+
'scriptName',
|
|
604
|
+
'script_name'
|
|
605
|
+
]);
|
|
606
|
+
// A record carrying NO service field at all comes from an adapter that
|
|
607
|
+
// scopes server-side — the DOKS source selects `namespace/podPrefix`
|
|
608
|
+
// before it reads a byte. Rejecting those here dropped every row it
|
|
609
|
+
// returned and reported the empty result as a successful query.
|
|
610
|
+
// Only reject when a service is present and disagrees.
|
|
611
|
+
if (service !== null && !matchesStringValue(service, input.workerName, 'eq')) {
|
|
612
|
+
return false;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
if (input.pathFilter &&
|
|
616
|
+
!matchesStringValue(pickRecord(summaryRecord, [
|
|
617
|
+
'$metadata.url',
|
|
618
|
+
'$workers.event.request.url',
|
|
619
|
+
'event.request.url',
|
|
620
|
+
'request.url',
|
|
621
|
+
'url'
|
|
622
|
+
]), input.pathFilter, 'includes')) {
|
|
623
|
+
return false;
|
|
624
|
+
}
|
|
625
|
+
if (input.methodFilter &&
|
|
626
|
+
!matchesStringValue(pickRecord(summaryRecord, [
|
|
627
|
+
'$metadata.method',
|
|
628
|
+
'$workers.event.request.method',
|
|
629
|
+
'event.request.method',
|
|
630
|
+
'request.method'
|
|
631
|
+
]), input.methodFilter.toUpperCase(), 'eq')) {
|
|
632
|
+
return false;
|
|
633
|
+
}
|
|
634
|
+
if (input.statusCode !== undefined &&
|
|
635
|
+
!matchesNumberValue(pickRecord(summaryRecord, [
|
|
636
|
+
'$metadata.statusCode',
|
|
637
|
+
'$workers.event.response.status',
|
|
638
|
+
'event.response.status',
|
|
639
|
+
'response.status'
|
|
640
|
+
]), input.statusCode)) {
|
|
641
|
+
return false;
|
|
642
|
+
}
|
|
643
|
+
if (input.levelFilter &&
|
|
644
|
+
!matchesStringValue(pickRecord(summaryRecord, ['$metadata.level', 'level']), input.levelFilter, 'eq')) {
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
if (input.requestId &&
|
|
648
|
+
!matchesStringValue(pickRecord(summaryRecord, [
|
|
649
|
+
'$metadata.requestId',
|
|
650
|
+
'$metadata.id',
|
|
651
|
+
'$workers.requestId',
|
|
652
|
+
'$workers.event.request.cf.ray',
|
|
653
|
+
'requestId',
|
|
654
|
+
'id'
|
|
655
|
+
]), input.requestId, 'eq')) {
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
if (input.status) {
|
|
659
|
+
const outcome = pickRecord(summaryRecord, ['$workers.outcome', 'outcome']);
|
|
660
|
+
if (input.status === 'ok')
|
|
661
|
+
return matchesStringValue(outcome, 'ok', 'eq');
|
|
662
|
+
if (input.status === 'canceled')
|
|
663
|
+
return matchesStringValue(outcome, 'canceled', 'eq');
|
|
664
|
+
if (input.status === 'error') {
|
|
665
|
+
// Providers without a Workers outcome vocabulary say `error` plainly.
|
|
666
|
+
if (matchesStringValue(outcome, 'error', 'eq'))
|
|
667
|
+
return true;
|
|
668
|
+
if (matchesStringValue(outcome, 'exception', 'eq'))
|
|
669
|
+
return true;
|
|
670
|
+
if (matchesStringValue(outcome, 'exceededCpu', 'eq'))
|
|
671
|
+
return true;
|
|
672
|
+
if (matchesStringValue(outcome, 'exceededMemory', 'eq'))
|
|
673
|
+
return true;
|
|
674
|
+
if (pickRecord(summaryRecord, ['$metadata.error', 'error', 'exceptions.0.message']) !== null) {
|
|
675
|
+
return true;
|
|
676
|
+
}
|
|
677
|
+
return false;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return true;
|
|
33
681
|
}
|
|
34
682
|
function descriptorHasWorkerSource(descriptor, workerName) {
|
|
35
683
|
return descriptor.sources?.some((s) => s.type === 'worker' && (s.name === workerName || descriptor.id === workerName)) ?? false;
|
|
36
684
|
}
|
|
685
|
+
export function resolveLogsTarget(descriptor, sourceName, workerName) {
|
|
686
|
+
if (workerName)
|
|
687
|
+
return { workerName, isExplicitWorker: true };
|
|
688
|
+
const sourceWorker = descriptor.sources?.find((s) => s.type === 'worker' && s.name === sourceName);
|
|
689
|
+
if (sourceWorker)
|
|
690
|
+
return { workerName: sourceWorker.name, isExplicitWorker: true };
|
|
691
|
+
const fallbackWorker = descriptor.sources?.find((s) => s.type === 'worker');
|
|
692
|
+
return { workerName: fallbackWorker?.name ?? sourceName, isExplicitWorker: false };
|
|
693
|
+
}
|
|
37
694
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
695
|
+
* The deployment provider whose deployed units an `infra/logs` source
|
|
696
|
+
* observes: its descriptor's `adapterConfig.deploymentProvider`. A source
|
|
697
|
+
* that names none (a DOKS source's workloads are cluster state read at query
|
|
698
|
+
* time, not workspace deployments) folds in no discovered deployment.
|
|
40
699
|
*/
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return undefined;
|
|
700
|
+
function observedDeploymentProvider(descriptor) {
|
|
701
|
+
const parsed = DeploymentProviderConfigSchema.safeParse(descriptor.adapterConfig);
|
|
702
|
+
return parsed.success ? parsed.data.deploymentProvider : undefined;
|
|
45
703
|
}
|
|
46
704
|
/**
|
|
47
705
|
* Build the `sources` list a logs descriptor should expose at display time
|
|
@@ -50,11 +708,8 @@ function adapterToProvider(adapter) {
|
|
|
50
708
|
* de-duped by name.
|
|
51
709
|
*/
|
|
52
710
|
function mergeDescriptorSources(descriptor, discovered) {
|
|
53
|
-
const provider =
|
|
54
|
-
const fromWorkspace = discovered
|
|
55
|
-
.filter((d) => !provider || d.provider === provider)
|
|
56
|
-
.filter((d) => Boolean(d.workerName))
|
|
57
|
-
.map((d) => ({ type: 'worker', name: d.workerName }));
|
|
711
|
+
const provider = observedDeploymentProvider(descriptor);
|
|
712
|
+
const fromWorkspace = provider === undefined ? [] : discovered.flatMap((d) => d.provider === provider && d.unitName ? [{ type: 'worker', name: d.unitName }] : []);
|
|
58
713
|
const seen = new Set();
|
|
59
714
|
const merged = [];
|
|
60
715
|
for (const src of [...(descriptor.sources ?? []), ...fromWorkspace]) {
|
|
@@ -67,23 +722,111 @@ function mergeDescriptorSources(descriptor, discovered) {
|
|
|
67
722
|
return merged;
|
|
68
723
|
}
|
|
69
724
|
export default {
|
|
70
|
-
async execute(args, opts) {
|
|
71
|
-
const runtime =
|
|
72
|
-
const ui =
|
|
725
|
+
async execute(args, opts, context) {
|
|
726
|
+
const { runtime } = context;
|
|
727
|
+
const ui = await runtime.context('cli/ui');
|
|
73
728
|
const sourceName = readString(args.source);
|
|
74
729
|
const workerName = readString(args.worker);
|
|
75
730
|
const output = readString(opts.output) ?? 'table';
|
|
76
731
|
const showAnalytics = readBoolean(opts.analytics);
|
|
77
732
|
const timeStart = readString(opts.timeStart) ?? '24h';
|
|
78
733
|
const doTail = readBoolean(opts.tail);
|
|
79
|
-
const
|
|
734
|
+
const doAggregate = readBoolean(opts.aggregate);
|
|
735
|
+
const queryEvents = readBoolean(opts.events);
|
|
736
|
+
const queryInvocations = readBoolean(opts.invocations);
|
|
737
|
+
const statusText = readString(opts.status);
|
|
738
|
+
const parsedStatus = statusText === undefined ? undefined : StatusSchema.safeParse(statusText);
|
|
739
|
+
if (parsedStatus && !parsedStatus.success) {
|
|
740
|
+
ui.error(`Invalid --status '${statusText}'. Expected ok, error, or canceled.`);
|
|
741
|
+
requestCLIExit(1);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
const status = parsedStatus?.success ? parsedStatus.data : undefined;
|
|
80
745
|
const limitRaw = readString(opts.limit) ?? '100';
|
|
81
746
|
const limit = Number.parseInt(limitRaw, 10);
|
|
82
747
|
const windowRaw = readString(opts.window);
|
|
83
748
|
const windowMs = parseDurationMs(windowRaw);
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
const
|
|
749
|
+
const fromRaw = readString(opts.from);
|
|
750
|
+
const toRaw = readString(opts.to);
|
|
751
|
+
const search = readString(opts.search);
|
|
752
|
+
const pathFilter = readString(opts.path);
|
|
753
|
+
const methodFilter = readString(opts.method);
|
|
754
|
+
const statusCodeRaw = readString(opts.statusCode ?? opts['status-code']);
|
|
755
|
+
const levelFilter = readString(opts.level);
|
|
756
|
+
const requestId = readString(opts.requestId ?? opts['request-id']);
|
|
757
|
+
const compact = readBoolean(opts.compact);
|
|
758
|
+
const regex = readBoolean(opts.regex);
|
|
759
|
+
const matchCase = readBoolean(opts.matchCase ?? opts['match-case']);
|
|
760
|
+
const advancedFields = readStringArray(opts.field);
|
|
761
|
+
const isExplicitQuery = hostArgv(runtime).some(arg => arg.includes('--status') ||
|
|
762
|
+
arg.includes('--limit') ||
|
|
763
|
+
arg.includes('--window') ||
|
|
764
|
+
arg.includes('--tail') ||
|
|
765
|
+
arg.includes('--events') ||
|
|
766
|
+
arg.includes('--invocations') ||
|
|
767
|
+
arg.includes('--analytics') ||
|
|
768
|
+
arg.includes('--output') ||
|
|
769
|
+
arg.includes('-o'));
|
|
770
|
+
if (doAggregate) {
|
|
771
|
+
const unsupported = unsupportedAggregateFilters({
|
|
772
|
+
search,
|
|
773
|
+
path: pathFilter,
|
|
774
|
+
method: methodFilter,
|
|
775
|
+
statusCode: statusCodeRaw,
|
|
776
|
+
level: levelFilter,
|
|
777
|
+
requestId,
|
|
778
|
+
status,
|
|
779
|
+
fields: advancedFields,
|
|
780
|
+
from: fromRaw,
|
|
781
|
+
to: toRaw,
|
|
782
|
+
regex,
|
|
783
|
+
matchCase,
|
|
784
|
+
explicitLimit: hasExplicitOption(hostArgv(runtime), '--limit'),
|
|
785
|
+
explicitTimeStart: hasExplicitOption(hostArgv(runtime), '--time-start')
|
|
786
|
+
});
|
|
787
|
+
if (unsupported.length > 0) {
|
|
788
|
+
ui.error(`--aggregate does not support event filters (${unsupported.join(', ')}). ` +
|
|
789
|
+
'Use --events or --invocations for filtered telemetry; aggregate filters are never silently ignored.');
|
|
790
|
+
requestCLIExit(1);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
// Each log source resolves its own credentials through the runtime's
|
|
795
|
+
// secrets stores, for `--environment` when given; `--use-ambient-credentials`
|
|
796
|
+
// hands the source the operator's opt-in instead (it refuses incomplete
|
|
797
|
+
// shell credentials and never opens a store). `--cwd` selects the app whose deployment config
|
|
798
|
+
// wires the secrets backend; its configs render under an empty
|
|
799
|
+
// projection, so ambient state never shapes them. Best-effort: an app
|
|
800
|
+
// without a loadable deployment config still queries.
|
|
801
|
+
const credCwd = readString(opts.cwd);
|
|
802
|
+
const credentialSource = readCredentialSource(opts);
|
|
803
|
+
const useAmbient = credentialSource === 'ambient';
|
|
804
|
+
const credentialEnvironment = readString(opts.environment);
|
|
805
|
+
// A relative `--cwd` resolves against the invocation cwd; a host without
|
|
806
|
+
// one fails here, typed, before any best-effort load.
|
|
807
|
+
const credAppDir = (await getRuntimePath(runtime)).resolve(requireRuntimeCwd(runtime), credCwd ?? '.');
|
|
808
|
+
const projectionEnvironment = {};
|
|
809
|
+
const loadedConfig = await settle(() => loadDeploymentConfig(credAppDir, { runtime, projectionEnvironment }));
|
|
810
|
+
if (!loadedConfig.ok) {
|
|
811
|
+
ui.info(useAmbient
|
|
812
|
+
? 'Deployment config not loaded; using ambient credentials only (--use-ambient-credentials). The secrets store will not be consulted.'
|
|
813
|
+
: 'Deployment config not loaded; continuing with secrets-store credentials.');
|
|
814
|
+
}
|
|
815
|
+
// Get all infra/logs descriptors. One unreadable descriptor is skipped;
|
|
816
|
+
// the others still list.
|
|
817
|
+
const rawDescriptors = [];
|
|
818
|
+
let refusedDescriptors = 0;
|
|
819
|
+
for (const candidate of runtime.assets('infra/logs').descriptors()) {
|
|
820
|
+
const parsed = InfraLogsDescriptorSchema.safeParse(candidate);
|
|
821
|
+
if (!parsed.success) {
|
|
822
|
+
refusedDescriptors += 1;
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
rawDescriptors.push(parsed.data);
|
|
826
|
+
}
|
|
827
|
+
if (refusedDescriptors > 0) {
|
|
828
|
+
ui.info(`${refusedDescriptors} infra/logs descriptor(s) were refused because they did not match the logs schema.`);
|
|
829
|
+
}
|
|
87
830
|
if (rawDescriptors.length === 0) {
|
|
88
831
|
if (output === 'json')
|
|
89
832
|
ui.json([]);
|
|
@@ -95,7 +838,11 @@ export default {
|
|
|
95
838
|
// workspace's deployment.config.ts files. Framework-registered
|
|
96
839
|
// descriptors carry no app-name list — that inventory lives in
|
|
97
840
|
// per-app deployment configs and is resolved here at call time.
|
|
98
|
-
const discovered = await discoverDeployments(
|
|
841
|
+
const discovered = await discoverDeployments({
|
|
842
|
+
runtime,
|
|
843
|
+
projectionEnvironment,
|
|
844
|
+
root: await runtime.context('runtime/workspace-path')
|
|
845
|
+
});
|
|
99
846
|
const descriptors = rawDescriptors.map((d) => ({
|
|
100
847
|
...d,
|
|
101
848
|
sources: mergeDescriptorSources(d, discovered)
|
|
@@ -103,27 +850,35 @@ export default {
|
|
|
103
850
|
// Resolve implementations for each descriptor
|
|
104
851
|
const implementations = [];
|
|
105
852
|
for (const descriptor of descriptors) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const resolvedObj = resolved;
|
|
109
|
-
// The resolved object may have implementation directly or nested
|
|
110
|
-
const impl = resolvedObj.implementation ??
|
|
111
|
-
resolvedObj;
|
|
112
|
-
implementations.push({
|
|
113
|
-
id: descriptor.id,
|
|
114
|
-
descriptor,
|
|
115
|
-
implementation: impl && typeof impl === 'object' && 'getAnalytics' in impl ? impl : null,
|
|
116
|
-
error: impl && typeof impl === 'object' && 'getAnalytics' in impl ? undefined : 'Implementation not available'
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
853
|
+
const resolved = await settle(() => runtime.query('infra/logs').withId(descriptor.id).resolve());
|
|
854
|
+
if (!resolved.ok) {
|
|
120
855
|
implementations.push({
|
|
121
856
|
id: descriptor.id,
|
|
122
857
|
descriptor,
|
|
123
858
|
implementation: null,
|
|
124
|
-
error:
|
|
859
|
+
error: LOGS_RESOLVE_FAILED
|
|
125
860
|
});
|
|
861
|
+
continue;
|
|
126
862
|
}
|
|
863
|
+
let impl = readyLogsImplementation(resolved.value);
|
|
864
|
+
// `--use-ambient-credentials` or `--environment` re-creates the source under that choice.
|
|
865
|
+
if (impl && (useAmbient || credentialEnvironment)) {
|
|
866
|
+
const options = credentialEnvironment
|
|
867
|
+
? { credentialSource, environment: credentialEnvironment, log: ui }
|
|
868
|
+
: { credentialSource, log: ui };
|
|
869
|
+
const chosen = await withLogsSourceOptions(impl, options);
|
|
870
|
+
if (!chosen) {
|
|
871
|
+
implementations.push({ id: descriptor.id, descriptor, implementation: null, error: LOGS_CREDENTIAL_CHOICE_UNSUPPORTED });
|
|
872
|
+
continue;
|
|
873
|
+
}
|
|
874
|
+
impl = readyLogsImplementation(chosen);
|
|
875
|
+
}
|
|
876
|
+
implementations.push({
|
|
877
|
+
id: descriptor.id,
|
|
878
|
+
descriptor,
|
|
879
|
+
implementation: impl,
|
|
880
|
+
error: impl ? undefined : 'Implementation not available'
|
|
881
|
+
});
|
|
127
882
|
}
|
|
128
883
|
// If a specific source is requested, find it
|
|
129
884
|
if (sourceName) {
|
|
@@ -132,16 +887,16 @@ export default {
|
|
|
132
887
|
if (!implEntry) {
|
|
133
888
|
ui.error(`Log source '${sourceName}' not found. Available sources: ${implementations.map((impl) => impl.id).join(', ')}`);
|
|
134
889
|
requestCLIExit(1);
|
|
890
|
+
return;
|
|
135
891
|
}
|
|
136
892
|
const { implementation: logsImpl, descriptor, error } = implEntry;
|
|
137
893
|
if (!logsImpl) {
|
|
138
|
-
|
|
139
|
-
ui.info('Make sure credentials are configured in your secrets store or environment.');
|
|
140
|
-
return;
|
|
894
|
+
throw new CapabilityError(`Cannot access log source '${sourceName}': ${error ?? 'Implementation not available'}`, 'UNAVAILABLE', { recoveryHint: 'Make sure credentials are configured in your secrets store or environment.' });
|
|
141
895
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
896
|
+
const target = resolveLogsTarget(descriptor, sourceName, workerName);
|
|
897
|
+
const targetWorker = target.workerName ?? sourceName;
|
|
898
|
+
if (target.isExplicitWorker) {
|
|
899
|
+
const specific = descriptor.sources?.find((s) => s.type === 'worker' && s.name === targetWorker);
|
|
145
900
|
if (!specific) {
|
|
146
901
|
// Worker not in the discovered inventory — pass it through to
|
|
147
902
|
// the provider anyway so the user can target ad-hoc names
|
|
@@ -149,117 +904,409 @@ export default {
|
|
|
149
904
|
// preview environments, etc.). The provider will return a
|
|
150
905
|
// clean error if the worker truly doesn't exist.
|
|
151
906
|
const known = descriptor.sources?.map((s) => s.name).join(', ') || '(none discovered)';
|
|
152
|
-
ui.info(`Worker '${
|
|
907
|
+
ui.info(`Worker '${targetWorker}' is not in the discovered inventory (known: ${known}). Passing through to the provider.`);
|
|
153
908
|
}
|
|
154
|
-
targetWorker = workerName;
|
|
155
909
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
910
|
+
// "Show me logs/errors" defaults to a HISTORICAL Workers Observability
|
|
911
|
+
// query (lookback, default 24h). The realtime 30s live-Tail capture is
|
|
912
|
+
// now opt-in behind --window: it only sees events DURING the window, so
|
|
913
|
+
// for any past incident it silently reads as "no logs" — which is what
|
|
914
|
+
// made `vibes infra logs <worker> --status error` look like history was
|
|
915
|
+
// unavailable. --events/--invocations force the historical path; --tail
|
|
916
|
+
// streams live; --window <dur> selects the realtime capture; --aggregate
|
|
917
|
+
// /--analytics return counts.
|
|
918
|
+
const explicitHistorical = queryEvents || queryInvocations;
|
|
919
|
+
// `--window` carries a default of "30s" in the descriptor, so `windowRaw`
|
|
920
|
+
// is always truthy — detect an EXPLICIT --window from argv to know the
|
|
921
|
+
// user actually opted into the realtime capture.
|
|
922
|
+
const explicitWindow = hostArgv(runtime).some((arg) => arg.includes('--window'));
|
|
923
|
+
const defaultHistorical = !explicitHistorical &&
|
|
924
|
+
!doTail &&
|
|
925
|
+
!doAggregate &&
|
|
926
|
+
!showAnalytics &&
|
|
927
|
+
!explicitWindow &&
|
|
928
|
+
Boolean(logsImpl.queryLogs) &&
|
|
929
|
+
(status !== undefined || target.isExplicitWorker || isExplicitQuery);
|
|
930
|
+
if (explicitHistorical || defaultHistorical) {
|
|
931
|
+
if (!logsImpl.queryLogs) {
|
|
932
|
+
ui.error(`Log source '${descriptor.id}' does not support historical telemetry queries.`);
|
|
933
|
+
requestCLIExit(1);
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
const view = queryInvocations ? 'invocations' : 'events';
|
|
937
|
+
const now = requireLogsWallClockMs(runtime);
|
|
938
|
+
const { from, to } = resolveHistoricalWindow({ from: fromRaw, to: toRaw, timeStart }, now);
|
|
939
|
+
const filters = [];
|
|
940
|
+
const localStatusCode = statusCodeRaw ? Number.parseInt(statusCodeRaw, 10) : undefined;
|
|
941
|
+
if (statusCodeRaw) {
|
|
942
|
+
const code = Number.parseInt(statusCodeRaw, 10);
|
|
943
|
+
if (!Number.isFinite(code)) {
|
|
944
|
+
ui.error(`Invalid --status-code '${statusCodeRaw}'. Expected an integer.`);
|
|
945
|
+
requestCLIExit(1);
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
for (const field of advancedFields) {
|
|
950
|
+
const parsedField = parseAdvancedFilter(field);
|
|
951
|
+
if (!parsedField.ok) {
|
|
952
|
+
ui.error(parsedField.message);
|
|
953
|
+
requestCLIExit(1);
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
filters.push(parsedField.filter);
|
|
957
|
+
}
|
|
958
|
+
const queryWorker = target.isExplicitWorker ? targetWorker : undefined;
|
|
959
|
+
const needleValue = search ?? pathFilter;
|
|
960
|
+
const queryLimit = pathFilter || methodFilter || statusCodeRaw || levelFilter || requestId || status || queryWorker
|
|
961
|
+
? Math.max(limit, 500)
|
|
962
|
+
: limit;
|
|
963
|
+
const result = await logsImpl.queryLogs(queryWorker ?? '', {
|
|
964
|
+
view,
|
|
965
|
+
from,
|
|
966
|
+
to,
|
|
967
|
+
limit: queryLimit,
|
|
968
|
+
filters,
|
|
969
|
+
filterCombination: 'and',
|
|
970
|
+
needle: needleValue ? { value: needleValue, isRegex: regex && needleValue === search, matchCase } : undefined
|
|
971
|
+
});
|
|
972
|
+
const telemetry = telemetryObject(result);
|
|
973
|
+
const matchingRows = extractTelemetryRows(telemetry, view).filter((row) => telemetryRecordMatches(row, {
|
|
974
|
+
workerName: queryWorker,
|
|
975
|
+
pathFilter,
|
|
976
|
+
methodFilter,
|
|
977
|
+
statusCode: localStatusCode,
|
|
978
|
+
levelFilter,
|
|
979
|
+
requestId,
|
|
980
|
+
status
|
|
981
|
+
}));
|
|
982
|
+
const rows = matchingRows.slice(0, limit);
|
|
983
|
+
if (output === 'json') {
|
|
984
|
+
ui.json(buildTelemetryJsonPayload({
|
|
985
|
+
source: descriptor.id,
|
|
986
|
+
worker: queryWorker ?? null,
|
|
987
|
+
mode: view,
|
|
988
|
+
from,
|
|
989
|
+
to,
|
|
990
|
+
count: matchingRows.length,
|
|
991
|
+
resultKeys: Object.keys(telemetry),
|
|
992
|
+
rows,
|
|
993
|
+
compact
|
|
994
|
+
}));
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
ui.info(`Telemetry ${view} for ${queryWorker ?? 'all workers'} (${new Date(from).toISOString()} → ${new Date(to).toISOString()}, count=${rows.length})`);
|
|
998
|
+
if (rows.length === 0) {
|
|
999
|
+
ui.info('No matching telemetry rows.');
|
|
1000
|
+
}
|
|
1001
|
+
else {
|
|
1002
|
+
const redactedRows = rows.map((row) => redactTelemetryValue(row));
|
|
1003
|
+
ui.table(redactedRows.map((row) => summarizeTelemetryRecord(row)), {
|
|
1004
|
+
columns: ['time', 'service', 'level', 'outcome', 'status', 'method', 'url', 'message']
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
return;
|
|
159
1009
|
}
|
|
160
1010
|
if (doTail) {
|
|
161
|
-
// Real-time log streaming
|
|
162
1011
|
const tailResult = await logsImpl.tailLogs(targetWorker, { status, limit });
|
|
163
1012
|
ui.info(`Log tail started: ${tailResult.tailId} (worker=${targetWorker})`);
|
|
164
1013
|
await streamWorkerTail({
|
|
1014
|
+
runtime,
|
|
165
1015
|
url: tailResult.websocketUrl,
|
|
166
1016
|
ui,
|
|
167
1017
|
filterStatus: status,
|
|
168
1018
|
limit
|
|
169
1019
|
});
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
// best-effort cleanup
|
|
1020
|
+
const stopped = await settle(() => logsImpl.stopTail(targetWorker, tailResult.tailId));
|
|
1021
|
+
if (!stopped.ok) {
|
|
1022
|
+
// The capture result stands. A failed stop is not the command outcome.
|
|
1023
|
+
valueFreeFailure(stopped.cause);
|
|
175
1024
|
}
|
|
176
1025
|
}
|
|
177
|
-
else if (
|
|
178
|
-
|
|
179
|
-
const
|
|
1026
|
+
else if (doAggregate) {
|
|
1027
|
+
const aggWindow = windowRaw ?? '2h';
|
|
1028
|
+
const targetWorkers = target.isExplicitWorker
|
|
1029
|
+
? [targetWorker]
|
|
1030
|
+
: (descriptor.sources?.filter((s) => s.type === 'worker').map((s) => s.name) ?? []);
|
|
1031
|
+
if (targetWorkers.length === 0) {
|
|
1032
|
+
ui.error(`No workers found in source '${descriptor.id}'`);
|
|
1033
|
+
requestCLIExit(1);
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
const results = await Promise.all(targetWorkers.map(async (worker) => {
|
|
1037
|
+
const analytics = await settle(() => logsImpl.getAnalytics(worker, { timeStart: aggWindow }));
|
|
1038
|
+
if (analytics.ok) {
|
|
1039
|
+
const row = {
|
|
1040
|
+
worker,
|
|
1041
|
+
invocations: analytics.value.totalInvocations,
|
|
1042
|
+
errors: analytics.value.errorCount,
|
|
1043
|
+
errorRate: analytics.value.errorRate,
|
|
1044
|
+
p99WallMs: analytics.value.p99DurationMs,
|
|
1045
|
+
skipped: false,
|
|
1046
|
+
error: null
|
|
1047
|
+
};
|
|
1048
|
+
return row;
|
|
1049
|
+
}
|
|
1050
|
+
if (isAssetOnlyWorker(analytics.cause)) {
|
|
1051
|
+
const skipped = {
|
|
1052
|
+
worker,
|
|
1053
|
+
invocations: 0,
|
|
1054
|
+
errors: 0,
|
|
1055
|
+
errorRate: 0,
|
|
1056
|
+
p99WallMs: 0,
|
|
1057
|
+
skipped: true,
|
|
1058
|
+
error: null
|
|
1059
|
+
};
|
|
1060
|
+
return skipped;
|
|
1061
|
+
}
|
|
1062
|
+
const failed = {
|
|
1063
|
+
worker,
|
|
1064
|
+
invocations: 0,
|
|
1065
|
+
errors: 0,
|
|
1066
|
+
errorRate: 0,
|
|
1067
|
+
p99WallMs: 0,
|
|
1068
|
+
skipped: false,
|
|
1069
|
+
error: AGGREGATE_QUERY_FAILED
|
|
1070
|
+
};
|
|
1071
|
+
return failed;
|
|
1072
|
+
}));
|
|
1073
|
+
const totalErrors = results.reduce((n, r) => n + r.errors, 0);
|
|
180
1074
|
if (output === 'json') {
|
|
181
|
-
ui.json(
|
|
1075
|
+
ui.json({
|
|
1076
|
+
source: descriptor.id,
|
|
1077
|
+
mode: 'aggregate',
|
|
1078
|
+
window: aggWindow,
|
|
1079
|
+
status: status ?? null,
|
|
1080
|
+
count: totalErrors,
|
|
1081
|
+
workers: results
|
|
1082
|
+
});
|
|
182
1083
|
}
|
|
183
1084
|
else {
|
|
184
|
-
ui.info(`
|
|
185
|
-
ui.table(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
1085
|
+
ui.info(`Aggregate (${aggWindow}) for ${descriptor.id} — historical error counts:`);
|
|
1086
|
+
ui.table(results.map((r) => ({
|
|
1087
|
+
worker: r.worker,
|
|
1088
|
+
invocations: r.skipped ? 'skipped (asset-only)' : String(r.invocations),
|
|
1089
|
+
errors: r.skipped ? '-' : String(r.errors),
|
|
1090
|
+
rate: r.skipped ? '-' : `${(r.errorRate * 100).toFixed(2)}%`
|
|
1091
|
+
})), { columns: ['worker', 'invocations', 'errors', 'rate'] });
|
|
1092
|
+
const failed = results.filter((r) => r.error);
|
|
1093
|
+
if (failed.length > 0) {
|
|
1094
|
+
ui.info('\nErrors during query:');
|
|
1095
|
+
for (const f of failed)
|
|
1096
|
+
ui.error(` ${f.worker}: ${f.error}`);
|
|
1097
|
+
requestCLIExit(1);
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
193
1100
|
}
|
|
1101
|
+
return;
|
|
194
1102
|
}
|
|
195
|
-
else if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
1103
|
+
else if (showAnalytics) {
|
|
1104
|
+
if (target.isExplicitWorker) {
|
|
1105
|
+
const analytics = await logsImpl.getAnalytics(targetWorker, { timeStart });
|
|
1106
|
+
if (output === 'json') {
|
|
1107
|
+
ui.json(analytics);
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
ui.info(`Analytics for ${targetWorker} (${timeStart}):`);
|
|
1111
|
+
ui.table([
|
|
1112
|
+
{ metric: 'Total Invocations', value: analytics.totalInvocations.toString() },
|
|
1113
|
+
{ metric: 'Error Count', value: analytics.errorCount.toString() },
|
|
1114
|
+
{ metric: 'Error Rate', value: `${(analytics.errorRate * 100).toFixed(2)}%` },
|
|
1115
|
+
{ metric: 'P50 Wall Time', value: `${analytics.avgDurationMs.toFixed(2)}ms` },
|
|
1116
|
+
{ metric: 'P99 Wall Time', value: `${analytics.p99DurationMs.toFixed(2)}ms` },
|
|
1117
|
+
{ metric: 'P50 CPU Time', value: `${analytics.totalCpuTimeMs.toFixed(2)}ms` }
|
|
1118
|
+
], { columns: ['metric', 'value'] });
|
|
1119
|
+
}
|
|
204
1120
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
await
|
|
1121
|
+
else {
|
|
1122
|
+
const workers = descriptor.sources?.filter((s) => s.type === 'worker') ?? [];
|
|
1123
|
+
if (workers.length === 0) {
|
|
1124
|
+
if (output === 'json')
|
|
1125
|
+
ui.json([]);
|
|
1126
|
+
else
|
|
1127
|
+
ui.info('No worker sources configured.');
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
const results = await Promise.all(workers.map(async (w) => {
|
|
1131
|
+
const res = await settle(() => logsImpl.getAnalytics(w.name, { timeStart }));
|
|
1132
|
+
if (!res.ok) {
|
|
1133
|
+
return {
|
|
1134
|
+
worker: w.name,
|
|
1135
|
+
invocations: '-',
|
|
1136
|
+
errors: '-',
|
|
1137
|
+
rate: '-',
|
|
1138
|
+
p99Wall: '-',
|
|
1139
|
+
p50Cpu: '-',
|
|
1140
|
+
error: AGGREGATE_QUERY_FAILED
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
return {
|
|
1144
|
+
worker: w.name,
|
|
1145
|
+
invocations: res.value.totalInvocations.toString(),
|
|
1146
|
+
errors: res.value.errorCount.toString(),
|
|
1147
|
+
rate: `${(res.value.errorRate * 100).toFixed(2)}%`,
|
|
1148
|
+
p99Wall: `${res.value.p99DurationMs.toFixed(2)}ms`,
|
|
1149
|
+
p50Cpu: `${res.value.totalCpuTimeMs.toFixed(2)}ms`,
|
|
1150
|
+
error: null
|
|
1151
|
+
};
|
|
1152
|
+
}));
|
|
1153
|
+
if (output === 'json') {
|
|
1154
|
+
ui.json({ source: descriptor.id, timeStart, results });
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
ui.info(`Analytics summary for ${descriptor.id} (${timeStart}):`);
|
|
1158
|
+
ui.table(results.map((r) => ({
|
|
1159
|
+
worker: r.worker,
|
|
1160
|
+
invocations: r.invocations,
|
|
1161
|
+
errors: r.errors,
|
|
1162
|
+
rate: r.rate,
|
|
1163
|
+
'P99 Wall': r.p99Wall,
|
|
1164
|
+
'P50 CPU': r.p50Cpu
|
|
1165
|
+
})), { columns: ['worker', 'invocations', 'errors', 'rate', 'P99 Wall', 'P50 CPU'] });
|
|
1166
|
+
const failed = results.filter((r) => r.error);
|
|
1167
|
+
if (failed.length > 0) {
|
|
1168
|
+
ui.info('\nErrors during query:');
|
|
1169
|
+
for (const f of failed) {
|
|
1170
|
+
ui.error(` ${f.worker}: ${f.error}`);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
215
1174
|
}
|
|
216
|
-
|
|
217
|
-
|
|
1175
|
+
}
|
|
1176
|
+
else if (target.isExplicitWorker || status !== undefined || isExplicitQuery) {
|
|
1177
|
+
// Windowed query: a worker was named OR a query is requested across all workers.
|
|
1178
|
+
const targetWorkers = target.isExplicitWorker
|
|
1179
|
+
? [targetWorker]
|
|
1180
|
+
: (descriptor.sources?.filter((s) => s.type === 'worker').map((s) => s.name) ?? []);
|
|
1181
|
+
if (targetWorkers.length === 0) {
|
|
1182
|
+
throw new CapabilityError(`No workers found in source '${descriptor.id}'`, 'NOT_FOUND');
|
|
218
1183
|
}
|
|
219
|
-
|
|
1184
|
+
if (output !== 'json') {
|
|
1185
|
+
ui.info(`Realtime capture: ${targetWorkers.join(', ')} (window=${windowRaw ?? '30s'}, status=${status ?? 'any'}, limit=${limit}). ` +
|
|
1186
|
+
`This is a live Tail window — it only sees events DURING the capture. For a past incident, drop --window to query historical Workers Observability telemetry (default 24h lookback; tune with --from/--to).`);
|
|
1187
|
+
}
|
|
1188
|
+
// Query all target workers in parallel. A worker whose tail fails to
|
|
1189
|
+
// attach or stream is a CAPTURE FAILURE, not a quiet window — record it
|
|
1190
|
+
// so `count: 0` can never mean "we silently watched nothing".
|
|
1191
|
+
const captureFailures = [];
|
|
1192
|
+
const allRecordsList = await Promise.all(targetWorkers.map(async (worker) => {
|
|
1193
|
+
const attached = await settle(() => logsImpl.tailLogs(worker, { status, limit }));
|
|
1194
|
+
if (!attached.ok) {
|
|
1195
|
+
captureFailures.push({ worker, stage: 'attach', error: TAIL_ATTACH_FAILED });
|
|
1196
|
+
if (output !== 'json') {
|
|
1197
|
+
ui.warn(`[${worker}] Failed to start tail session.`);
|
|
1198
|
+
}
|
|
1199
|
+
return [];
|
|
1200
|
+
}
|
|
1201
|
+
const tailSession = attached.value;
|
|
1202
|
+
try {
|
|
1203
|
+
const streamed = await settle(() => streamWorkerTail({
|
|
1204
|
+
runtime,
|
|
1205
|
+
url: tailSession.websocketUrl,
|
|
1206
|
+
ui,
|
|
1207
|
+
filterStatus: status,
|
|
1208
|
+
limit,
|
|
1209
|
+
windowMs,
|
|
1210
|
+
collect: true
|
|
1211
|
+
}));
|
|
1212
|
+
if (!streamed.ok) {
|
|
1213
|
+
captureFailures.push({ worker, stage: 'stream', error: TAIL_STREAM_FAILED });
|
|
1214
|
+
if (output !== 'json') {
|
|
1215
|
+
ui.error(`[${worker}] Tail streaming error.`);
|
|
1216
|
+
}
|
|
1217
|
+
return [];
|
|
1218
|
+
}
|
|
1219
|
+
return streamed.value.map((rec) => ({ ...rec, workerName: worker }));
|
|
1220
|
+
}
|
|
1221
|
+
finally {
|
|
1222
|
+
const stopped = await settle(() => logsImpl.stopTail(worker, tailSession.tailId));
|
|
1223
|
+
if (!stopped.ok) {
|
|
1224
|
+
// The capture result stands. A failed stop is not the command outcome.
|
|
1225
|
+
valueFreeFailure(stopped.cause);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
}));
|
|
1229
|
+
const combinedRecords = allRecordsList.flat();
|
|
1230
|
+
const allWorkersFailed = captureFailures.length >= targetWorkers.length && targetWorkers.length > 0;
|
|
1231
|
+
const entries = combinedRecords.map((rec) => ({
|
|
220
1232
|
timestamp: rec.eventTimestamp ? new Date(rec.eventTimestamp).toISOString() : null,
|
|
221
1233
|
outcome: rec.outcome ?? null,
|
|
222
|
-
scriptName: rec.scriptName ??
|
|
1234
|
+
scriptName: rec.scriptName ?? rec.workerName,
|
|
223
1235
|
method: rec.event?.request?.method ?? null,
|
|
224
|
-
url: rec.event?.request?.url
|
|
1236
|
+
url: rec.event?.request?.url !== undefined ? redactUrlLikeText(rec.event.request.url) : null,
|
|
225
1237
|
responseStatus: rec.event?.response?.status ?? null,
|
|
226
|
-
trigger: rec.event?.cron
|
|
227
|
-
|
|
228
|
-
|
|
1238
|
+
trigger: rec.event?.cron
|
|
1239
|
+
? `cron ${rec.event.cron}`
|
|
1240
|
+
: rec.event?.rpcMethod
|
|
1241
|
+
? `rpc ${rec.event.rpcMethod}`
|
|
1242
|
+
: rec.event?.request
|
|
1243
|
+
? 'request'
|
|
1244
|
+
: 'event',
|
|
229
1245
|
logs: (rec.logs ?? []).map((l) => ({
|
|
230
1246
|
level: l.level ?? 'log',
|
|
231
|
-
message: (l
|
|
232
|
-
return JSON.stringify(m);
|
|
233
|
-
}
|
|
234
|
-
catch {
|
|
235
|
-
return String(m);
|
|
236
|
-
} })()).join(' '),
|
|
1247
|
+
message: redactUrlLikeText(tailEntryMessage(l)),
|
|
237
1248
|
timestamp: l.timestamp ? new Date(l.timestamp).toISOString() : null
|
|
238
1249
|
})),
|
|
239
1250
|
exceptions: (rec.exceptions ?? []).map((e) => ({
|
|
240
1251
|
name: e.name ?? 'Error',
|
|
241
|
-
message: e.message
|
|
1252
|
+
message: e.message !== undefined ? redactUrlLikeText(e.message) : '',
|
|
242
1253
|
timestamp: e.timestamp ? new Date(e.timestamp).toISOString() : null
|
|
243
1254
|
}))
|
|
244
1255
|
}));
|
|
1256
|
+
// Sort entries chronologically ascending
|
|
1257
|
+
entries.sort((a, b) => {
|
|
1258
|
+
if (!a.timestamp)
|
|
1259
|
+
return 1;
|
|
1260
|
+
if (!b.timestamp)
|
|
1261
|
+
return -1;
|
|
1262
|
+
return a.timestamp.localeCompare(b.timestamp);
|
|
1263
|
+
});
|
|
245
1264
|
if (output === 'json') {
|
|
246
1265
|
ui.json({
|
|
247
1266
|
source: descriptor.id,
|
|
248
|
-
|
|
1267
|
+
workers: targetWorkers,
|
|
249
1268
|
window: windowRaw ?? '30s',
|
|
250
1269
|
status: status ?? null,
|
|
251
1270
|
limit,
|
|
252
1271
|
capturedAt: new Date().toISOString(),
|
|
1272
|
+
captureFailed: allWorkersFailed,
|
|
1273
|
+
failures: captureFailures,
|
|
253
1274
|
count: entries.length,
|
|
254
1275
|
entries
|
|
255
1276
|
});
|
|
1277
|
+
if (allWorkersFailed) {
|
|
1278
|
+
requestCLIExit(1);
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
256
1281
|
}
|
|
257
1282
|
else {
|
|
1283
|
+
if (allWorkersFailed) {
|
|
1284
|
+
ui.error(`Capture FAILED for all ${targetWorkers.length} worker(s) — no tail session attached, so this says nothing about actual traffic.`);
|
|
1285
|
+
for (const failure of captureFailures) {
|
|
1286
|
+
ui.error(` [${failure.worker}] ${failure.stage}: ${failure.error}`);
|
|
1287
|
+
}
|
|
1288
|
+
requestCLIExit(1);
|
|
1289
|
+
return;
|
|
1290
|
+
}
|
|
1291
|
+
if (captureFailures.length > 0) {
|
|
1292
|
+
ui.warn(`Partial capture: ${captureFailures.length} of ${targetWorkers.length} worker(s) failed to tail (${captureFailures.map((f) => f.worker).join(', ')}).`);
|
|
1293
|
+
}
|
|
258
1294
|
if (entries.length === 0) {
|
|
259
1295
|
ui.info(`No log entries captured in the ${windowRaw ?? '30s'} window.`);
|
|
260
1296
|
}
|
|
261
1297
|
else {
|
|
262
1298
|
ui.info(`Captured ${entries.length} entries.`);
|
|
1299
|
+
for (const entry of entries) {
|
|
1300
|
+
const time = entry.timestamp ? new Date(entry.timestamp).toLocaleTimeString() : 'unknown';
|
|
1301
|
+
const statusText = entry.outcome === 'ok' ? 'OK' : `ERR(${entry.outcome})`;
|
|
1302
|
+
ui.log(`[${time}] [${entry.scriptName}] [${statusText}] ${entry.method ?? ''} ${entry.url ?? ''}`);
|
|
1303
|
+
for (const ex of entry.exceptions) {
|
|
1304
|
+
ui.error(` Exception: ${ex.name}: ${ex.message}`);
|
|
1305
|
+
}
|
|
1306
|
+
for (const log of entry.logs) {
|
|
1307
|
+
ui.log(` [${log.level}] ${log.message}`);
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
263
1310
|
}
|
|
264
1311
|
}
|
|
265
1312
|
}
|
|
@@ -303,13 +1350,15 @@ export default {
|
|
|
303
1350
|
ui.table(rows, { columns: ['id', 'name', 'adapter', 'sources', 'status'] });
|
|
304
1351
|
ui.info('');
|
|
305
1352
|
ui.info('Usage:');
|
|
306
|
-
ui.info(' vibes infra logs <source>
|
|
307
|
-
ui.info(' vibes infra logs <source> <worker>
|
|
308
|
-
ui.info(' vibes infra logs <source> <worker> --
|
|
309
|
-
ui.info(' vibes infra logs <source> <worker> --
|
|
1353
|
+
ui.info(' vibes infra logs <source> # Show source details');
|
|
1354
|
+
ui.info(' vibes infra logs <source> <worker> --status=error # Historical errors (default 24h lookback)');
|
|
1355
|
+
ui.info(' vibes infra logs <source> <worker> --from=6h # Historical events over a lookback window');
|
|
1356
|
+
ui.info(' vibes infra logs <source> <worker> --window=60s # Realtime capture (live Tail, only during the window)');
|
|
1357
|
+
ui.info(' vibes infra logs <source> <worker> --analytics # Aggregate analytics');
|
|
1358
|
+
ui.info(' vibes infra logs <source> <worker> --tail # Stream logs in real-time');
|
|
310
1359
|
ui.info('');
|
|
311
1360
|
ui.info('Examples:');
|
|
312
|
-
ui.info(' vibes infra logs cloudflare-logs vibes-auth --status=error --
|
|
1361
|
+
ui.info(' vibes infra logs cloudflare-logs vibes-auth --status=error --from=6h --output=json');
|
|
313
1362
|
ui.info(' vibes infra logs cloudflare-logs vibes-auth --analytics --timeStart=2h');
|
|
314
1363
|
ui.info(' vibes infra logs cloudflare-logs vibes-auth --tail --status=error');
|
|
315
1364
|
// Show errors if any
|