@mesh-tech/mesh-cli 0.20.2 → 0.20.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/dist/bin/mesh.d.ts +0 -12
- package/dist/bin/mesh.js +15 -13
- package/dist/bin/mesh.js.map +1 -2
- package/dist/build-info.json +2 -2
- package/dist/src/commands/agent-api-client.d.ts +0 -70
- package/dist/src/commands/agent-api-client.js +0 -80
- package/dist/src/commands/app-check.d.ts +0 -56
- package/dist/src/commands/app-check.js +0 -72
- package/dist/src/commands/artifacts.d.ts +0 -11
- package/dist/src/commands/artifacts.js +0 -33
- package/dist/src/commands/cluster.d.ts +0 -39
- package/dist/src/commands/cluster.js +0 -73
- package/dist/src/commands/conversations.d.ts +0 -36
- package/dist/src/commands/conversations.js +0 -59
- package/dist/src/commands/create-app.d.ts +0 -98
- package/dist/src/commands/create-app.js +1 -163
- package/dist/src/commands/db/connect.d.ts +0 -7
- package/dist/src/commands/db/connect.js +0 -9
- package/dist/src/commands/db/credentials.d.ts +0 -7
- package/dist/src/commands/db/credentials.js +0 -10
- package/dist/src/commands/db/env.d.ts +0 -6
- package/dist/src/commands/db/env.js +0 -14
- package/dist/src/commands/db/exec.d.ts +0 -43
- package/dist/src/commands/db/exec.js +0 -69
- package/dist/src/commands/db/index.d.ts +0 -10
- package/dist/src/commands/db/index.js +0 -10
- package/dist/src/commands/db/psql.d.ts +0 -7
- package/dist/src/commands/db/psql.js +0 -18
- package/dist/src/commands/deploy.d.ts +0 -38
- package/dist/src/commands/deploy.js +1 -76
- package/dist/src/commands/dev-doctor.d.ts +0 -82
- package/dist/src/commands/dev-doctor.js +3 -132
- package/dist/src/commands/dev-launch.d.ts +0 -52
- package/dist/src/commands/dev-launch.js +0 -56
- package/dist/src/commands/dev-token-server.d.ts +0 -18
- package/dist/src/commands/dev-token-server.js +1 -24
- package/dist/src/commands/dev.d.ts +0 -246
- package/dist/src/commands/dev.js +5 -963
- package/dist/src/commands/docs.d.ts +0 -1
- package/dist/src/commands/docs.js +0 -12
- package/dist/src/commands/hub/index.d.ts +0 -60
- package/dist/src/commands/hub/index.js +2 -139
- package/dist/src/commands/init/wizard.d.ts +0 -128
- package/dist/src/commands/init/wizard.js +0 -109
- package/dist/src/commands/init.d.ts +0 -55
- package/dist/src/commands/init.js +0 -70
- package/dist/src/commands/install-shim.d.ts +0 -23
- package/dist/src/commands/install-shim.js +2 -29
- package/dist/src/commands/local/auth-provision.d.ts +0 -80
- package/dist/src/commands/local/auth-provision.js +0 -109
- package/dist/src/commands/local/dev-local.d.ts +0 -91
- package/dist/src/commands/local/dev-local.js +0 -147
- package/dist/src/commands/local/docker-runner.d.ts +0 -22
- package/dist/src/commands/local/docker-runner.js +2 -35
- package/dist/src/commands/local/helpers.d.ts +0 -14
- package/dist/src/commands/local/helpers.js +0 -13
- package/dist/src/commands/local/hub-local.d.ts +0 -96
- package/dist/src/commands/local/hub-local.js +0 -111
- package/dist/src/commands/local/index.d.ts +0 -14
- package/dist/src/commands/local/index.js +0 -86
- package/dist/src/commands/local/mocks.d.ts +0 -269
- package/dist/src/commands/local/mocks.js +1 -274
- package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
- package/dist/src/commands/local/seed-hub-catalog.js +0 -41
- package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
- package/dist/src/commands/local/seed-zitadel.js +0 -158
- package/dist/src/commands/local/seed.d.ts +0 -64
- package/dist/src/commands/local/seed.js +0 -78
- package/dist/src/commands/local/stack.d.ts +0 -141
- package/dist/src/commands/local/stack.js +0 -153
- package/dist/src/commands/login.d.ts +0 -265
- package/dist/src/commands/login.js +4 -418
- package/dist/src/commands/peer-addressing.d.ts +0 -39
- package/dist/src/commands/peer-addressing.js +0 -37
- package/dist/src/commands/port-ownership.d.ts +0 -44
- package/dist/src/commands/port-ownership.js +0 -47
- package/dist/src/commands/registry-publish.d.ts +0 -1
- package/dist/src/commands/registry-publish.js +0 -46
- package/dist/src/commands/registry.d.ts +4 -237
- package/dist/src/commands/registry.js +2 -316
- package/dist/src/commands/secrets/exec.d.ts +0 -16
- package/dist/src/commands/secrets/exec.js +0 -24
- package/dist/src/commands/secrets/index.d.ts +0 -9
- package/dist/src/commands/secrets/index.js +0 -10
- package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
- package/dist/src/commands/secrets/migrate-config.js +0 -40
- package/dist/src/commands/secrets/reindex.d.ts +0 -38
- package/dist/src/commands/secrets/reindex.js +0 -39
- package/dist/src/commands/secrets/set.d.ts +0 -47
- package/dist/src/commands/secrets/set.js +0 -107
- package/dist/src/commands/site.d.ts +0 -1
- package/dist/src/commands/site.js +0 -61
- package/dist/src/commands/skills.d.ts +0 -61
- package/dist/src/commands/skills.js +0 -83
- package/dist/src/commands/stack.d.ts +0 -15
- package/dist/src/commands/stack.js +1 -128
- package/dist/src/commands/temporal.d.ts +0 -30
- package/dist/src/commands/temporal.js +3 -1
- package/dist/src/commands/temporal.js.map +1 -2
- package/dist/src/commands/tenant.d.ts +0 -31
- package/dist/src/commands/tenant.js +0 -55
- package/dist/src/commands/tunnel/index.d.ts +0 -40
- package/dist/src/commands/tunnel/index.js +0 -141
- package/dist/src/commands/vcs/clone.d.ts +0 -1
- package/dist/src/commands/vcs/clone.js +0 -4
- package/dist/src/commands/vcs/common.d.ts +0 -32
- package/dist/src/commands/vcs/common.js +0 -41
- package/dist/src/commands/vcs/drafts.d.ts +0 -1
- package/dist/src/commands/vcs/drafts.js +0 -1
- package/dist/src/commands/vcs/get.d.ts +0 -1
- package/dist/src/commands/vcs/get.js +0 -11
- package/dist/src/commands/vcs/index.d.ts +0 -1
- package/dist/src/commands/vcs/index.js +0 -1
- package/dist/src/commands/vcs/propose.d.ts +0 -26
- package/dist/src/commands/vcs/propose.js +3 -34
- package/dist/src/commands/vcs/review.d.ts +0 -1
- package/dist/src/commands/vcs/review.js +0 -1
- package/dist/src/commands/vcs/rm.d.ts +0 -11
- package/dist/src/commands/vcs/rm.js +0 -14
- package/dist/src/commands/vcs-enrich.d.ts +0 -12
- package/dist/src/commands/vcs-enrich.js +0 -12
- package/dist/src/commands/vpn/index.d.ts +0 -17
- package/dist/src/commands/vpn/index.js +0 -102
- package/dist/src/commands/vpn/tunnel.d.ts +0 -9
- package/dist/src/commands/vpn/tunnel.js +0 -37
- package/dist/src/commands/workflow.d.ts +0 -22
- package/dist/src/commands/workflow.js +0 -80
- package/dist/src/docs/assemble.d.ts +0 -117
- package/dist/src/docs/assemble.js +0 -142
- package/dist/src/docs/cli-reference.d.ts +0 -58
- package/dist/src/docs/cli-reference.js +0 -77
- package/dist/src/docs/discover.d.ts +0 -40
- package/dist/src/docs/discover.js +2 -60
- package/dist/src/docs/portal.d.ts +0 -44
- package/dist/src/docs/portal.js +0 -49
- package/dist/src/docs/registry-docs.d.ts +0 -29
- package/dist/src/docs/registry-docs.js +0 -40
- package/dist/src/docs/schema.d.ts +0 -36
- package/dist/src/docs/schema.js +0 -52
- package/dist/src/docs/serve.d.ts +0 -18
- package/dist/src/docs/serve.js +2 -30
- package/dist/src/docs/start.d.ts +0 -42
- package/dist/src/docs/start.js +0 -70
- package/dist/src/eval/agent-eval.d.mts +0 -12
- package/dist/src/eval/agent-eval.mjs +0 -22
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.js.map +0 -1
- package/dist/src/program.d.ts +0 -20
- package/dist/src/program.js +0 -24
- package/dist/src/utils/auth-preflight.d.ts +0 -137
- package/dist/src/utils/auth-preflight.js +0 -149
- package/dist/src/utils/aws-auth.d.ts +0 -163
- package/dist/src/utils/aws-auth.js +3 -232
- package/dist/src/utils/bastion.d.ts +0 -27
- package/dist/src/utils/bastion.js +0 -28
- package/dist/src/utils/build-info.d.ts +0 -22
- package/dist/src/utils/build-info.js +0 -27
- package/dist/src/utils/cache-home.d.ts +0 -23
- package/dist/src/utils/cache-home.js +0 -25
- package/dist/src/utils/capture-history.d.ts +0 -54
- package/dist/src/utils/capture-history.js +1 -55
- package/dist/src/utils/context.d.ts +0 -23
- package/dist/src/utils/context.js +0 -43
- package/dist/src/utils/credentials.d.ts +0 -38
- package/dist/src/utils/credentials.js +0 -39
- package/dist/src/utils/deploy-preflight.d.ts +0 -38
- package/dist/src/utils/deploy-preflight.js +1 -71
- package/dist/src/utils/errors.d.ts +0 -53
- package/dist/src/utils/errors.js +0 -49
- package/dist/src/utils/first-party-contexts.d.ts +0 -38
- package/dist/src/utils/first-party-contexts.js +0 -44
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.js +0 -4
- package/dist/src/utils/kubeconfig.d.ts +0 -40
- package/dist/src/utils/kubeconfig.js +0 -44
- package/dist/src/utils/log.d.ts +0 -20
- package/dist/src/utils/log.js +0 -20
- package/dist/src/utils/mesh-json.d.ts +0 -46
- package/dist/src/utils/mesh-json.js +0 -39
- package/dist/src/utils/pid.d.ts +0 -42
- package/dist/src/utils/pid.js +0 -48
- package/dist/src/utils/pulumi-run.d.ts +0 -14
- package/dist/src/utils/pulumi-run.js +0 -42
- package/dist/src/utils/pulumi.d.ts +0 -34
- package/dist/src/utils/pulumi.js +0 -38
- package/dist/src/utils/reachability.d.ts +0 -27
- package/dist/src/utils/reachability.js +0 -40
- package/dist/src/utils/recover-conversation.d.ts +0 -110
- package/dist/src/utils/recover-conversation.js +0 -108
- package/dist/src/utils/registry-broker.d.ts +5 -84
- package/dist/src/utils/registry-broker.js +0 -62
- package/dist/src/utils/registry-identity.d.ts +0 -149
- package/dist/src/utils/registry-identity.js +0 -143
- package/dist/src/utils/scaffold-versions.d.ts +0 -41
- package/dist/src/utils/scaffold-versions.js +0 -42
- package/dist/src/utils/socks-forward.d.ts +0 -24
- package/dist/src/utils/socks-forward.js +2 -25
- package/dist/src/utils/stack-flag.d.ts +0 -13
- package/dist/src/utils/stack-flag.js +0 -21
- package/dist/src/utils/tailscale-targets.d.ts +0 -37
- package/dist/src/utils/tailscale-targets.js +0 -33
- package/dist/src/utils/tailscale.d.ts +0 -177
- package/dist/src/utils/tailscale.js +6 -337
- package/dist/src/utils/temporal-auth.d.ts +0 -41
- package/dist/src/utils/temporal-auth.js +0 -52
- package/dist/src/utils/temporal-codec.d.ts +0 -89
- package/dist/src/utils/temporal-codec.js.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts +0 -79
- package/dist/src/utils/tunnel-ownership.js +0 -74
- package/dist/src/utils/vpn-join.d.ts +0 -16
- package/dist/src/utils/vpn-join.js +0 -17
- package/dist/src/utils/vpn.d.ts +0 -42
- package/dist/src/utils/vpn.js +0 -52
- package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
- package/dist/src/utils/workflow-fingerprint.js +1 -63
- package/dist/src/utils/worktree-identity.d.ts +0 -62
- package/dist/src/utils/worktree-identity.js +0 -88
- package/package.json +2 -2
- package/skills/core/SKILL.md +9 -10
- package/templates/api-auth/api/src/index.ts.hbs +1 -1
- package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
- package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
- package/templates/api-role-gating/index.ts.hbs +1 -1
- package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
- package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
- package/templates/platform-repo/platform/index.ts +1 -1
- package/dist/bin/mesh.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.js.map +0 -1
- package/dist/src/commands/app-check.d.ts.map +0 -1
- package/dist/src/commands/app-check.js.map +0 -1
- package/dist/src/commands/artifacts.d.ts.map +0 -1
- package/dist/src/commands/artifacts.js.map +0 -1
- package/dist/src/commands/cluster.d.ts.map +0 -1
- package/dist/src/commands/cluster.js.map +0 -1
- package/dist/src/commands/conversations.d.ts.map +0 -1
- package/dist/src/commands/conversations.js.map +0 -1
- package/dist/src/commands/create-app.d.ts.map +0 -1
- package/dist/src/commands/create-app.js.map +0 -1
- package/dist/src/commands/db/connect.d.ts.map +0 -1
- package/dist/src/commands/db/connect.js.map +0 -1
- package/dist/src/commands/db/credentials.d.ts.map +0 -1
- package/dist/src/commands/db/credentials.js.map +0 -1
- package/dist/src/commands/db/env.d.ts.map +0 -1
- package/dist/src/commands/db/env.js.map +0 -1
- package/dist/src/commands/db/exec.d.ts.map +0 -1
- package/dist/src/commands/db/exec.js.map +0 -1
- package/dist/src/commands/db/index.d.ts.map +0 -1
- package/dist/src/commands/db/index.js.map +0 -1
- package/dist/src/commands/db/psql.d.ts.map +0 -1
- package/dist/src/commands/db/psql.js.map +0 -1
- package/dist/src/commands/deploy.d.ts.map +0 -1
- package/dist/src/commands/deploy.js.map +0 -1
- package/dist/src/commands/dev-doctor.d.ts.map +0 -1
- package/dist/src/commands/dev-doctor.js.map +0 -1
- package/dist/src/commands/dev-launch.d.ts.map +0 -1
- package/dist/src/commands/dev-launch.js.map +0 -1
- package/dist/src/commands/dev-token-server.d.ts.map +0 -1
- package/dist/src/commands/dev-token-server.js.map +0 -1
- package/dist/src/commands/dev.d.ts.map +0 -1
- package/dist/src/commands/dev.js.map +0 -1
- package/dist/src/commands/docs.d.ts.map +0 -1
- package/dist/src/commands/docs.js.map +0 -1
- package/dist/src/commands/hub/index.d.ts.map +0 -1
- package/dist/src/commands/hub/index.js.map +0 -1
- package/dist/src/commands/init/wizard.d.ts.map +0 -1
- package/dist/src/commands/init/wizard.js.map +0 -1
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/install-shim.d.ts.map +0 -1
- package/dist/src/commands/install-shim.js.map +0 -1
- package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
- package/dist/src/commands/local/auth-provision.js.map +0 -1
- package/dist/src/commands/local/dev-local.d.ts.map +0 -1
- package/dist/src/commands/local/dev-local.js.map +0 -1
- package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
- package/dist/src/commands/local/docker-runner.js.map +0 -1
- package/dist/src/commands/local/helpers.d.ts.map +0 -1
- package/dist/src/commands/local/helpers.js.map +0 -1
- package/dist/src/commands/local/hub-local.d.ts.map +0 -1
- package/dist/src/commands/local/hub-local.js.map +0 -1
- package/dist/src/commands/local/index.d.ts.map +0 -1
- package/dist/src/commands/local/index.js.map +0 -1
- package/dist/src/commands/local/mocks.d.ts.map +0 -1
- package/dist/src/commands/local/mocks.js.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
- package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
- package/dist/src/commands/local/seed-zitadel.js.map +0 -1
- package/dist/src/commands/local/seed.d.ts.map +0 -1
- package/dist/src/commands/local/seed.js.map +0 -1
- package/dist/src/commands/local/stack.d.ts.map +0 -1
- package/dist/src/commands/local/stack.js.map +0 -1
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/peer-addressing.d.ts.map +0 -1
- package/dist/src/commands/peer-addressing.js.map +0 -1
- package/dist/src/commands/port-ownership.d.ts.map +0 -1
- package/dist/src/commands/port-ownership.js.map +0 -1
- package/dist/src/commands/registry-publish.d.ts.map +0 -1
- package/dist/src/commands/registry-publish.js.map +0 -1
- package/dist/src/commands/registry.d.ts.map +0 -1
- package/dist/src/commands/registry.js.map +0 -1
- package/dist/src/commands/secrets/exec.d.ts.map +0 -1
- package/dist/src/commands/secrets/exec.js.map +0 -1
- package/dist/src/commands/secrets/index.d.ts.map +0 -1
- package/dist/src/commands/secrets/index.js.map +0 -1
- package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
- package/dist/src/commands/secrets/migrate-config.js.map +0 -1
- package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
- package/dist/src/commands/secrets/reindex.js.map +0 -1
- package/dist/src/commands/secrets/set.d.ts.map +0 -1
- package/dist/src/commands/secrets/set.js.map +0 -1
- package/dist/src/commands/site.d.ts.map +0 -1
- package/dist/src/commands/site.js.map +0 -1
- package/dist/src/commands/skills.d.ts.map +0 -1
- package/dist/src/commands/skills.js.map +0 -1
- package/dist/src/commands/stack.d.ts.map +0 -1
- package/dist/src/commands/stack.js.map +0 -1
- package/dist/src/commands/temporal.d.ts.map +0 -1
- package/dist/src/commands/tenant.d.ts.map +0 -1
- package/dist/src/commands/tenant.js.map +0 -1
- package/dist/src/commands/tunnel/index.d.ts.map +0 -1
- package/dist/src/commands/tunnel/index.js.map +0 -1
- package/dist/src/commands/vcs/clone.d.ts.map +0 -1
- package/dist/src/commands/vcs/clone.js.map +0 -1
- package/dist/src/commands/vcs/common.d.ts.map +0 -1
- package/dist/src/commands/vcs/common.js.map +0 -1
- package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
- package/dist/src/commands/vcs/drafts.js.map +0 -1
- package/dist/src/commands/vcs/get.d.ts.map +0 -1
- package/dist/src/commands/vcs/get.js.map +0 -1
- package/dist/src/commands/vcs/index.d.ts.map +0 -1
- package/dist/src/commands/vcs/index.js.map +0 -1
- package/dist/src/commands/vcs/propose.d.ts.map +0 -1
- package/dist/src/commands/vcs/propose.js.map +0 -1
- package/dist/src/commands/vcs/review.d.ts.map +0 -1
- package/dist/src/commands/vcs/review.js.map +0 -1
- package/dist/src/commands/vcs/rm.d.ts.map +0 -1
- package/dist/src/commands/vcs/rm.js.map +0 -1
- package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
- package/dist/src/commands/vcs-enrich.js.map +0 -1
- package/dist/src/commands/vpn/index.d.ts.map +0 -1
- package/dist/src/commands/vpn/index.js.map +0 -1
- package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
- package/dist/src/commands/vpn/tunnel.js.map +0 -1
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/docs/assemble.d.ts.map +0 -1
- package/dist/src/docs/assemble.js.map +0 -1
- package/dist/src/docs/cli-reference.d.ts.map +0 -1
- package/dist/src/docs/cli-reference.js.map +0 -1
- package/dist/src/docs/discover.d.ts.map +0 -1
- package/dist/src/docs/discover.js.map +0 -1
- package/dist/src/docs/portal.d.ts.map +0 -1
- package/dist/src/docs/portal.js.map +0 -1
- package/dist/src/docs/registry-docs.d.ts.map +0 -1
- package/dist/src/docs/registry-docs.js.map +0 -1
- package/dist/src/docs/schema.d.ts.map +0 -1
- package/dist/src/docs/schema.js.map +0 -1
- package/dist/src/docs/serve.d.ts.map +0 -1
- package/dist/src/docs/serve.js.map +0 -1
- package/dist/src/docs/start.d.ts.map +0 -1
- package/dist/src/docs/start.js.map +0 -1
- package/dist/src/eval/agent-eval.d.mts.map +0 -1
- package/dist/src/eval/agent-eval.mjs.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/program.d.ts.map +0 -1
- package/dist/src/program.js.map +0 -1
- package/dist/src/utils/auth-preflight.d.ts.map +0 -1
- package/dist/src/utils/auth-preflight.js.map +0 -1
- package/dist/src/utils/aws-auth.d.ts.map +0 -1
- package/dist/src/utils/aws-auth.js.map +0 -1
- package/dist/src/utils/bastion.d.ts.map +0 -1
- package/dist/src/utils/bastion.js.map +0 -1
- package/dist/src/utils/build-info.d.ts.map +0 -1
- package/dist/src/utils/build-info.js.map +0 -1
- package/dist/src/utils/cache-home.d.ts.map +0 -1
- package/dist/src/utils/cache-home.js.map +0 -1
- package/dist/src/utils/capture-history.d.ts.map +0 -1
- package/dist/src/utils/capture-history.js.map +0 -1
- package/dist/src/utils/context.d.ts.map +0 -1
- package/dist/src/utils/context.js.map +0 -1
- package/dist/src/utils/credentials.d.ts.map +0 -1
- package/dist/src/utils/credentials.js.map +0 -1
- package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
- package/dist/src/utils/deploy-preflight.js.map +0 -1
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
- package/dist/src/utils/first-party-contexts.js.map +0 -1
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/kubeconfig.d.ts.map +0 -1
- package/dist/src/utils/kubeconfig.js.map +0 -1
- package/dist/src/utils/log.d.ts.map +0 -1
- package/dist/src/utils/log.js.map +0 -1
- package/dist/src/utils/mesh-json.d.ts.map +0 -1
- package/dist/src/utils/mesh-json.js.map +0 -1
- package/dist/src/utils/pid.d.ts.map +0 -1
- package/dist/src/utils/pid.js.map +0 -1
- package/dist/src/utils/pulumi-run.d.ts.map +0 -1
- package/dist/src/utils/pulumi-run.js.map +0 -1
- package/dist/src/utils/pulumi.d.ts.map +0 -1
- package/dist/src/utils/pulumi.js.map +0 -1
- package/dist/src/utils/reachability.d.ts.map +0 -1
- package/dist/src/utils/reachability.js.map +0 -1
- package/dist/src/utils/recover-conversation.d.ts.map +0 -1
- package/dist/src/utils/recover-conversation.js.map +0 -1
- package/dist/src/utils/registry-broker.d.ts.map +0 -1
- package/dist/src/utils/registry-broker.js.map +0 -1
- package/dist/src/utils/registry-identity.d.ts.map +0 -1
- package/dist/src/utils/registry-identity.js.map +0 -1
- package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
- package/dist/src/utils/scaffold-versions.js.map +0 -1
- package/dist/src/utils/socks-forward.d.ts.map +0 -1
- package/dist/src/utils/socks-forward.js.map +0 -1
- package/dist/src/utils/stack-flag.d.ts.map +0 -1
- package/dist/src/utils/stack-flag.js.map +0 -1
- package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
- package/dist/src/utils/tailscale-targets.js.map +0 -1
- package/dist/src/utils/tailscale.d.ts.map +0 -1
- package/dist/src/utils/tailscale.js.map +0 -1
- package/dist/src/utils/temporal-auth.d.ts.map +0 -1
- package/dist/src/utils/temporal-auth.js.map +0 -1
- package/dist/src/utils/temporal-codec.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.js.map +0 -1
- package/dist/src/utils/vpn-join.d.ts.map +0 -1
- package/dist/src/utils/vpn-join.js.map +0 -1
- package/dist/src/utils/vpn.d.ts.map +0 -1
- package/dist/src/utils/vpn.js.map +0 -1
- package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
- package/dist/src/utils/workflow-fingerprint.js.map +0 -1
- package/dist/src/utils/worktree-identity.d.ts.map +0 -1
- package/dist/src/utils/worktree-identity.js.map +0 -1
|
@@ -1,58 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh.json` — the repo-level record of which tenant a checkout belongs to
|
|
3
|
-
* and where that tenant runs.
|
|
4
|
-
*
|
|
5
|
-
* Written by the `mesh init` wizard at the repo root, read by anything that
|
|
6
|
-
* wants a default `--tenant` (`mesh create-app`, `mesh dev`'s local mode) and
|
|
7
|
-
* by the wizard itself so a re-run pre-fills its answers. It is deliberately
|
|
8
|
-
* tiny and app-agnostic: per-app identity stays in each app's Pulumi config,
|
|
9
|
-
* which wins when both are present.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* // mesh.json
|
|
13
|
-
* { "tenant": "acme", "platform": "local" }
|
|
14
|
-
*/
|
|
15
|
-
/** The file's name at the repo root. */
|
|
16
1
|
export declare const MESH_JSON = "mesh.json";
|
|
17
|
-
/** The record `mesh.json` holds. */
|
|
18
2
|
export interface MeshJson {
|
|
19
|
-
/** The app tenant this repo belongs to (`^[a-z][a-z0-9-]*$`). */
|
|
20
3
|
tenant: string;
|
|
21
|
-
/**
|
|
22
|
-
* Where the tenant runs: `local` (the `mesh start` platform, no deployed
|
|
23
|
-
* platform yet) or the environment name of a deployed platform (`dev`,
|
|
24
|
-
* `uat`, …), which with the tenant forms the `<tenant>.<env>` login context.
|
|
25
|
-
*/
|
|
26
4
|
platform: string;
|
|
27
5
|
}
|
|
28
|
-
/** True when `value` is a tenant name every Mesh command accepts. */
|
|
29
6
|
export declare function isValidTenantName(value: string): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Parse `mesh.json` content. Null when the document is not the expected
|
|
32
|
-
* shape — a malformed file is treated as absent, never as an error, because
|
|
33
|
-
* nothing that reads it can do better than "no default".
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* parseMeshJson('{"tenant":"acme","platform":"local"}'); // → { tenant: "acme", platform: "local" }
|
|
37
|
-
*/
|
|
38
7
|
export declare function parseMeshJson(content: string): MeshJson | null;
|
|
39
|
-
/**
|
|
40
|
-
* Find the nearest `mesh.json` at or above `startDir`. Stops at the first
|
|
41
|
-
* match, at a `.git` directory (a repo boundary), or at the filesystem root.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* findMeshJson("/work/acme-mesh-apps/apps/billing"); // → { path: "/work/acme-mesh-apps/mesh.json", data }
|
|
45
|
-
*/
|
|
46
8
|
export declare function findMeshJson(startDir: string): {
|
|
47
9
|
path: string;
|
|
48
10
|
data: MeshJson;
|
|
49
11
|
} | null;
|
|
50
|
-
/**
|
|
51
|
-
* Write `mesh.json` under `rootDir`, replacing an existing one. Returns the
|
|
52
|
-
* path written.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* writeMeshJson("/work/acme-mesh-apps", { tenant: "acme", platform: "dev" });
|
|
56
|
-
*/
|
|
57
12
|
export declare function writeMeshJson(rootDir: string, data: MeshJson): string;
|
|
58
|
-
//# sourceMappingURL=mesh-json.d.ts.map
|
|
@@ -1,33 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh.json` — the repo-level record of which tenant a checkout belongs to
|
|
3
|
-
* and where that tenant runs.
|
|
4
|
-
*
|
|
5
|
-
* Written by the `mesh init` wizard at the repo root, read by anything that
|
|
6
|
-
* wants a default `--tenant` (`mesh create-app`, `mesh dev`'s local mode) and
|
|
7
|
-
* by the wizard itself so a re-run pre-fills its answers. It is deliberately
|
|
8
|
-
* tiny and app-agnostic: per-app identity stays in each app's Pulumi config,
|
|
9
|
-
* which wins when both are present.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* // mesh.json
|
|
13
|
-
* { "tenant": "acme", "platform": "local" }
|
|
14
|
-
*/
|
|
15
1
|
import * as fs from "fs";
|
|
16
2
|
import * as path from "path";
|
|
17
|
-
/** The file's name at the repo root. */
|
|
18
3
|
export const MESH_JSON = "mesh.json";
|
|
19
|
-
/** True when `value` is a tenant name every Mesh command accepts. */
|
|
20
4
|
export function isValidTenantName(value) {
|
|
21
5
|
return /^[a-z][a-z0-9-]*$/.test(value);
|
|
22
6
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Parse `mesh.json` content. Null when the document is not the expected
|
|
25
|
-
* shape — a malformed file is treated as absent, never as an error, because
|
|
26
|
-
* nothing that reads it can do better than "no default".
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* parseMeshJson('{"tenant":"acme","platform":"local"}'); // → { tenant: "acme", platform: "local" }
|
|
30
|
-
*/
|
|
31
7
|
export function parseMeshJson(content) {
|
|
32
8
|
try {
|
|
33
9
|
const data = JSON.parse(content);
|
|
@@ -40,13 +16,6 @@ export function parseMeshJson(content) {
|
|
|
40
16
|
return null;
|
|
41
17
|
}
|
|
42
18
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Find the nearest `mesh.json` at or above `startDir`. Stops at the first
|
|
45
|
-
* match, at a `.git` directory (a repo boundary), or at the filesystem root.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* findMeshJson("/work/acme-mesh-apps/apps/billing"); // → { path: "/work/acme-mesh-apps/mesh.json", data }
|
|
49
|
-
*/
|
|
50
19
|
export function findMeshJson(startDir) {
|
|
51
20
|
let dir = path.resolve(startDir);
|
|
52
21
|
while (true) {
|
|
@@ -70,16 +39,8 @@ export function findMeshJson(startDir) {
|
|
|
70
39
|
dir = parent;
|
|
71
40
|
}
|
|
72
41
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Write `mesh.json` under `rootDir`, replacing an existing one. Returns the
|
|
75
|
-
* path written.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* writeMeshJson("/work/acme-mesh-apps", { tenant: "acme", platform: "dev" });
|
|
79
|
-
*/
|
|
80
42
|
export function writeMeshJson(rootDir, data) {
|
|
81
43
|
const target = path.join(rootDir, MESH_JSON);
|
|
82
44
|
fs.writeFileSync(target, `${JSON.stringify({ tenant: data.tenant, platform: data.platform }, null, 2)}\n`);
|
|
83
45
|
return target;
|
|
84
46
|
}
|
|
85
|
-
//# sourceMappingURL=mesh-json.js.map
|
package/dist/src/utils/pid.d.ts
CHANGED
|
@@ -1,47 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Guard for pids the CLI reads back rather than constructs.
|
|
3
|
-
*
|
|
4
|
-
* Every teardown path in the CLI signals a pid it recovered from somewhere:
|
|
5
|
-
* `tunnel-state.json`, `runner.json`, `daemon.json`, or a `ps` argv scan. None
|
|
6
|
-
* of those are trustworthy — a truncated write, a stale file from an older
|
|
7
|
-
* build, or a hand-edited state dir can put any integer there. POSIX `kill(2)`
|
|
8
|
-
* overloads the pid argument, so the wrong integer is not a no-op:
|
|
9
|
-
*
|
|
10
|
-
* - `kill(0, sig)` → every process in the CALLER'S OWN process group.
|
|
11
|
-
* - `kill(-1, sig)` → every process the caller is permitted to signal.
|
|
12
|
-
* - `kill(1, sig)` → init. And teardown negates before signalling, so a `1`
|
|
13
|
-
* on disk becomes `kill(-1)` — the broadcast.
|
|
14
|
-
*
|
|
15
|
-
* That is not hypothetical: a `pid: -1` written by a unit test SIGTERM'd the
|
|
16
|
-
* author's entire login session (tmux server, every pane, an in-flight
|
|
17
|
-
* `mesh login`) on 2026-08-01. Refuse the input instead of signalling it.
|
|
18
|
-
*
|
|
19
|
-
* The guard is intentionally strict about the LOW end (`pid >= 2`) so the
|
|
20
|
-
* NEGATED form used for process-group teardown is safe by construction: if
|
|
21
|
-
* `pid >= 2` then `-pid <= -2`, which is always a real process group and never
|
|
22
|
-
* `0` (own group) or `-1` (broadcast). Callers signalling `-pid` need no
|
|
23
|
-
* second check — see `killSupervisor`.
|
|
24
|
-
*/
|
|
25
|
-
/** Where a recovered pid came from, for the refusal message + remediation. */
|
|
26
1
|
export interface PidSource {
|
|
27
|
-
/** What the pid claims to be, e.g. "tunnel supervisor pid". */
|
|
28
2
|
what: string;
|
|
29
|
-
/**
|
|
30
|
-
* Absolute path of the state file it was read from, when there is one.
|
|
31
|
-
* Present ⇒ the refusal tells the user the exact file to delete, so a corrupt
|
|
32
|
-
* state dir does not brick `mesh tunnel down` (which is the command that
|
|
33
|
-
* would otherwise clear it).
|
|
34
|
-
*/
|
|
35
3
|
file?: string;
|
|
36
4
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Throw unless `pid` is safe to pass to `process.kill` (directly or negated).
|
|
39
|
-
*
|
|
40
|
-
* Call this at the top of any function that signals a pid it did not construct
|
|
41
|
-
* itself. Existence checks (`process.kill(pid, 0)`) do not need it — signal 0
|
|
42
|
-
* delivers nothing — but they gain nothing from skipping it either.
|
|
43
|
-
*
|
|
44
|
-
* @throws {MeshCliError} with `rm <file>` remediation when `source.file` is set.
|
|
45
|
-
*/
|
|
46
5
|
export declare function assertSignalablePid(pid: unknown, source: PidSource): void;
|
|
47
|
-
//# sourceMappingURL=pid.d.ts.map
|
package/dist/src/utils/pid.js
CHANGED
|
@@ -1,44 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Guard for pids the CLI reads back rather than constructs.
|
|
3
|
-
*
|
|
4
|
-
* Every teardown path in the CLI signals a pid it recovered from somewhere:
|
|
5
|
-
* `tunnel-state.json`, `runner.json`, `daemon.json`, or a `ps` argv scan. None
|
|
6
|
-
* of those are trustworthy — a truncated write, a stale file from an older
|
|
7
|
-
* build, or a hand-edited state dir can put any integer there. POSIX `kill(2)`
|
|
8
|
-
* overloads the pid argument, so the wrong integer is not a no-op:
|
|
9
|
-
*
|
|
10
|
-
* - `kill(0, sig)` → every process in the CALLER'S OWN process group.
|
|
11
|
-
* - `kill(-1, sig)` → every process the caller is permitted to signal.
|
|
12
|
-
* - `kill(1, sig)` → init. And teardown negates before signalling, so a `1`
|
|
13
|
-
* on disk becomes `kill(-1)` — the broadcast.
|
|
14
|
-
*
|
|
15
|
-
* That is not hypothetical: a `pid: -1` written by a unit test SIGTERM'd the
|
|
16
|
-
* author's entire login session (tmux server, every pane, an in-flight
|
|
17
|
-
* `mesh login`) on 2026-08-01. Refuse the input instead of signalling it.
|
|
18
|
-
*
|
|
19
|
-
* The guard is intentionally strict about the LOW end (`pid >= 2`) so the
|
|
20
|
-
* NEGATED form used for process-group teardown is safe by construction: if
|
|
21
|
-
* `pid >= 2` then `-pid <= -2`, which is always a real process group and never
|
|
22
|
-
* `0` (own group) or `-1` (broadcast). Callers signalling `-pid` need no
|
|
23
|
-
* second check — see `killSupervisor`.
|
|
24
|
-
*/
|
|
25
1
|
import { MeshCliError } from "./errors.js";
|
|
26
|
-
/**
|
|
27
|
-
* Lowest pid the CLI will ever signal. 0 and 1 are the two overloaded values;
|
|
28
|
-
* anything below 0 is already a process-group id, not a pid.
|
|
29
|
-
*/
|
|
30
2
|
const MIN_SIGNALABLE_PID = 2;
|
|
31
|
-
/**
|
|
32
|
-
* Why `pid` must not be handed to `process.kill`, or null if it is signalable.
|
|
33
|
-
* Pure — every branch is unit-testable without spawning anything.
|
|
34
|
-
*/
|
|
35
3
|
function unsignalableReason(pid) {
|
|
36
4
|
if (typeof pid !== "number") {
|
|
37
5
|
return `expected an integer, got ${typeof pid} (${String(pid)})`;
|
|
38
6
|
}
|
|
39
7
|
if (!Number.isInteger(pid)) {
|
|
40
|
-
// NaN, ±Infinity, and fractions all land here. Number.isInteger is the one
|
|
41
|
-
// predicate that rejects every non-pid a JSON.parse can produce.
|
|
42
8
|
return `expected an integer, got ${String(pid)}`;
|
|
43
9
|
}
|
|
44
10
|
if (pid === 0) {
|
|
@@ -58,26 +24,12 @@ function unsignalableReason(pid) {
|
|
|
58
24
|
}
|
|
59
25
|
return null;
|
|
60
26
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Throw unless `pid` is safe to pass to `process.kill` (directly or negated).
|
|
63
|
-
*
|
|
64
|
-
* Call this at the top of any function that signals a pid it did not construct
|
|
65
|
-
* itself. Existence checks (`process.kill(pid, 0)`) do not need it — signal 0
|
|
66
|
-
* delivers nothing — but they gain nothing from skipping it either.
|
|
67
|
-
*
|
|
68
|
-
* @throws {MeshCliError} with `rm <file>` remediation when `source.file` is set.
|
|
69
|
-
*/
|
|
70
27
|
export function assertSignalablePid(pid, source) {
|
|
71
28
|
const reason = unsignalableReason(pid);
|
|
72
29
|
if (reason === null)
|
|
73
30
|
return;
|
|
74
|
-
// "Corrupt or stale" is only true when the pid was read back from a state
|
|
75
|
-
// file. Call sites without one (e.g. reclaimPort's lsof-derived holder) get a
|
|
76
|
-
// pid that is CORRECT — that is exactly why it is refused — so the causal
|
|
77
|
-
// clause is gated on the same condition as the `rm` remediation.
|
|
78
31
|
throw new MeshCliError(`Refusing to signal ${source.what} — ${reason}. ` +
|
|
79
32
|
(source.file
|
|
80
33
|
? `The recorded value is corrupt or stale; signalling it could terminate unrelated processes.`
|
|
81
34
|
: `Signalling it could terminate unrelated processes.`), source.file ? { remediation: { command: `rm ${source.file}` } } : {});
|
|
82
35
|
}
|
|
83
|
-
//# sourceMappingURL=pid.js.map
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { type CredProbe } from "../commands/login.js";
|
|
2
|
-
/**
|
|
3
|
-
* Map a credential probe to a preflight message. Pure — no I/O — so the
|
|
4
|
-
* remediation wording is unit-testable. `null` means "proceed" (`ok`, or a
|
|
5
|
-
* non-fatal warning already surfaced). `fatal` callers should stop before
|
|
6
|
-
* touching pulumi; non-fatal is a warning that lets the run continue.
|
|
7
|
-
*/
|
|
8
2
|
export declare function credProbeToPreflightError(probe: CredProbe, context: string): {
|
|
9
3
|
message: string;
|
|
10
4
|
fatal: boolean;
|
|
11
5
|
} | null;
|
|
12
|
-
/**
|
|
13
|
-
* Resolve deployer AWS credentials for a `pulumi` invocation against `stack`,
|
|
14
|
-
* with an up-front login preflight. Returns env vars to merge into the pulumi
|
|
15
|
-
* child (`AWS_ACCESS_KEY_ID`/`_SECRET_ACCESS_KEY`/`_SESSION_TOKEN`). Exits the
|
|
16
|
-
* process with a clear, actionable message on any hard failure — callers can
|
|
17
|
-
* treat a return as "creds are ready".
|
|
18
|
-
*/
|
|
19
6
|
export declare function resolvePulumiEnv(opts: {
|
|
20
7
|
appRoot: string;
|
|
21
8
|
stack: string;
|
|
22
9
|
}): Promise<Record<string, string>>;
|
|
23
|
-
//# sourceMappingURL=pulumi-run.d.ts.map
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The single credentialed-Pulumi chokepoint (MESH-2085).
|
|
3
|
-
*
|
|
4
|
-
* Every mesh command that shells `pulumi` against the S3 state backend needs
|
|
5
|
-
* AWS credentials from the stack's `mesh:deployerRole`. Historically each
|
|
6
|
-
* command re-implemented that glue and `mesh stack init` skipped it entirely
|
|
7
|
-
* (→ `NoCredentialProviders`). This module centralizes it:
|
|
8
|
-
*
|
|
9
|
-
* 1. read `mesh:deployerRole` from the stack config (clear error if absent),
|
|
10
|
-
* 2. run a LOGIN PREFLIGHT (`probeCredentials`) that names the real problem
|
|
11
|
-
* ("run `mesh login --device`") BEFORE pulumi is invoked — and before
|
|
12
|
-
* `resolveAwsCredentials`' interactive path can hang a browser login over
|
|
13
|
-
* SSH,
|
|
14
|
-
* 3. resolve the deployer creds and return them as env vars to merge into the
|
|
15
|
-
* `pulumi` child process.
|
|
16
|
-
*
|
|
17
|
-
* Callers thread the returned env into their existing `execFileSync("pulumi", …)`
|
|
18
|
-
* calls (deploy passes it once; stack init reuses it across init/select/config).
|
|
19
|
-
*/
|
|
20
1
|
import { logError, logWarn } from "./log.js";
|
|
21
2
|
import { readStackConfig } from "./pulumi.js";
|
|
22
3
|
import { derivePlatformContext, resolveAwsCredentials } from "./aws-auth.js";
|
|
23
4
|
import { probeCredentials } from "../commands/login.js";
|
|
24
|
-
/**
|
|
25
|
-
* Map a credential probe to a preflight message. Pure — no I/O — so the
|
|
26
|
-
* remediation wording is unit-testable. `null` means "proceed" (`ok`, or a
|
|
27
|
-
* non-fatal warning already surfaced). `fatal` callers should stop before
|
|
28
|
-
* touching pulumi; non-fatal is a warning that lets the run continue.
|
|
29
|
-
*/
|
|
30
5
|
export function credProbeToPreflightError(probe, context) {
|
|
31
6
|
switch (probe.state) {
|
|
32
7
|
case "ok":
|
|
@@ -58,20 +33,10 @@ export function credProbeToPreflightError(probe, context) {
|
|
|
58
33
|
};
|
|
59
34
|
}
|
|
60
35
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Resolve deployer AWS credentials for a `pulumi` invocation against `stack`,
|
|
63
|
-
* with an up-front login preflight. Returns env vars to merge into the pulumi
|
|
64
|
-
* child (`AWS_ACCESS_KEY_ID`/`_SECRET_ACCESS_KEY`/`_SESSION_TOKEN`). Exits the
|
|
65
|
-
* process with a clear, actionable message on any hard failure — callers can
|
|
66
|
-
* treat a return as "creds are ready".
|
|
67
|
-
*/
|
|
68
36
|
export async function resolvePulumiEnv(opts) {
|
|
69
37
|
const { appRoot, stack } = opts;
|
|
70
38
|
const roleArn = readStackConfig(appRoot, stack, "mesh:deployerRole");
|
|
71
39
|
if (!roleArn) {
|
|
72
|
-
// Platform stacks are deployed by operators with ambient credentials
|
|
73
|
-
// (SSO/exported env) and typically carry no mesh:deployerRole — only app
|
|
74
|
-
// stacks do. With ambient creds present, run Pulumi against them directly.
|
|
75
40
|
if (process.env.AWS_ACCESS_KEY_ID) {
|
|
76
41
|
return {};
|
|
77
42
|
}
|
|
@@ -82,12 +47,6 @@ export async function resolvePulumiEnv(opts) {
|
|
|
82
47
|
` (or provide operator AWS credentials in the environment for platform stacks).`);
|
|
83
48
|
process.exit(1);
|
|
84
49
|
}
|
|
85
|
-
// Skip the login preflight whenever explicit ambient AWS credentials are
|
|
86
|
-
// present — both the CI/OIDC case (key + session token) AND long-lived static
|
|
87
|
-
// keys (key, no session token). Requiring a session token here regressed
|
|
88
|
-
// static-key users: with no cached mesh session the probe returns `no-session`
|
|
89
|
-
// → fatal, even though `resolveAwsCredentials`' ambient-SDK AssumeRole path
|
|
90
|
-
// (which accepts a bare static key) would have worked. (MESH-2085 review.)
|
|
91
50
|
const hasAmbientCreds = !!process.env.AWS_ACCESS_KEY_ID;
|
|
92
51
|
const context = derivePlatformContext(appRoot, stack);
|
|
93
52
|
if (!hasAmbientCreds && context) {
|
|
@@ -109,4 +68,3 @@ export async function resolvePulumiEnv(opts) {
|
|
|
109
68
|
}
|
|
110
69
|
return { ...resolved.env };
|
|
111
70
|
}
|
|
112
|
-
//# sourceMappingURL=pulumi-run.js.map
|
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pulumi-related utilities shared across CLI commands.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Find the Pulumi app root by walking up from a starting directory.
|
|
6
|
-
* Returns the first directory containing `Pulumi.yaml`, or null.
|
|
7
|
-
*/
|
|
8
1
|
export declare function findAppRoot(startDir: string): string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Find Pulumi.<stack>.yaml files in a directory.
|
|
11
|
-
* Returns an array of stack names (without the Pulumi. prefix and .yaml suffix).
|
|
12
|
-
*/
|
|
13
2
|
export declare function findStackConfigs(appRoot: string): string[];
|
|
14
|
-
/**
|
|
15
|
-
* Get the currently selected Pulumi stack name, or null.
|
|
16
|
-
*/
|
|
17
3
|
export declare function getCurrentStack(appRoot: string): string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Read a config value from Pulumi.<stack>.yaml.
|
|
20
|
-
* Simple regex-based parser — handles single-line string values.
|
|
21
|
-
* For complex values, use `pulumi config` CLI instead.
|
|
22
|
-
*/
|
|
23
4
|
export declare function readStackConfig(appRoot: string, stack: string, key: string): string | null;
|
|
24
|
-
/**
|
|
25
|
-
* Run `pulumi stack output <key> --json` with the given extra args.
|
|
26
|
-
*
|
|
27
|
-
* Pulumi redacts secret-tainted outputs as the literal string `"[secret]"`.
|
|
28
|
-
* Outputs like `env.register()`'s `dev` blob are tainted because they transitively
|
|
29
|
-
* include secret values (e.g. `TEMPORAL_ENCODING_KEY`, DB passwords), even though
|
|
30
|
-
* much of the blob (tunnels, namespace, service scaffolding) is non-secret.
|
|
31
|
-
*
|
|
32
|
-
* This helper tries without `--show-secrets` first — which avoids requiring
|
|
33
|
-
* the local machine to have the stack's secrets provider configured (KMS access
|
|
34
|
-
* etc.) — and retries with `--show-secrets` only if the first call returns a
|
|
35
|
-
* `"[secret]"` placeholder. KMS/secrets-provider errors are not retried because
|
|
36
|
-
* they will fail the same way with the flag set.
|
|
37
|
-
*/
|
|
38
5
|
export declare function pulumiStackOutput(appRoot: string, key: string, extraArgs: string[], env?: Record<string, string>): string;
|
|
39
|
-
//# sourceMappingURL=pulumi.d.ts.map
|
package/dist/src/utils/pulumi.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pulumi-related utilities shared across CLI commands.
|
|
3
|
-
*/
|
|
4
1
|
import { execFileSync } from "child_process";
|
|
5
2
|
import * as path from "path";
|
|
6
3
|
import * as fs from "fs";
|
|
7
|
-
/**
|
|
8
|
-
* Find the Pulumi app root by walking up from a starting directory.
|
|
9
|
-
* Returns the first directory containing `Pulumi.yaml`, or null.
|
|
10
|
-
*/
|
|
11
4
|
export function findAppRoot(startDir) {
|
|
12
5
|
let dir = startDir;
|
|
13
6
|
while (true) {
|
|
@@ -19,18 +12,11 @@ export function findAppRoot(startDir) {
|
|
|
19
12
|
dir = parent;
|
|
20
13
|
}
|
|
21
14
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Find Pulumi.<stack>.yaml files in a directory.
|
|
24
|
-
* Returns an array of stack names (without the Pulumi. prefix and .yaml suffix).
|
|
25
|
-
*/
|
|
26
15
|
export function findStackConfigs(appRoot) {
|
|
27
16
|
return fs.readdirSync(appRoot)
|
|
28
17
|
.filter((f) => /^Pulumi\..+\.yaml$/.test(f) && f !== "Pulumi.yaml")
|
|
29
18
|
.map((f) => f.replace(/^Pulumi\./, "").replace(/\.yaml$/, ""));
|
|
30
19
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Get the currently selected Pulumi stack name, or null.
|
|
33
|
-
*/
|
|
34
20
|
export function getCurrentStack(appRoot) {
|
|
35
21
|
try {
|
|
36
22
|
const result = execFileSync("pulumi", ["stack", "--show-name"], {
|
|
@@ -44,11 +30,6 @@ export function getCurrentStack(appRoot) {
|
|
|
44
30
|
return null;
|
|
45
31
|
}
|
|
46
32
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Read a config value from Pulumi.<stack>.yaml.
|
|
49
|
-
* Simple regex-based parser — handles single-line string values.
|
|
50
|
-
* For complex values, use `pulumi config` CLI instead.
|
|
51
|
-
*/
|
|
52
33
|
export function readStackConfig(appRoot, stack, key) {
|
|
53
34
|
const configFile = path.join(appRoot, `Pulumi.${stack}.yaml`);
|
|
54
35
|
if (!fs.existsSync(configFile))
|
|
@@ -60,34 +41,16 @@ export function readStackConfig(appRoot, stack, key) {
|
|
|
60
41
|
return null;
|
|
61
42
|
return match[1].trim().replace(/^["']|["']$/g, "");
|
|
62
43
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Run `pulumi stack output <key> --json` with the given extra args.
|
|
65
|
-
*
|
|
66
|
-
* Pulumi redacts secret-tainted outputs as the literal string `"[secret]"`.
|
|
67
|
-
* Outputs like `env.register()`'s `dev` blob are tainted because they transitively
|
|
68
|
-
* include secret values (e.g. `TEMPORAL_ENCODING_KEY`, DB passwords), even though
|
|
69
|
-
* much of the blob (tunnels, namespace, service scaffolding) is non-secret.
|
|
70
|
-
*
|
|
71
|
-
* This helper tries without `--show-secrets` first — which avoids requiring
|
|
72
|
-
* the local machine to have the stack's secrets provider configured (KMS access
|
|
73
|
-
* etc.) — and retries with `--show-secrets` only if the first call returns a
|
|
74
|
-
* `"[secret]"` placeholder. KMS/secrets-provider errors are not retried because
|
|
75
|
-
* they will fail the same way with the flag set.
|
|
76
|
-
*/
|
|
77
44
|
export function pulumiStackOutput(appRoot, key, extraArgs, env) {
|
|
78
45
|
const execEnv = env ? { ...process.env, ...env } : undefined;
|
|
79
|
-
// First attempt: no --show-secrets (works without PULUMI_CONFIG_PASSPHRASE / KMS)
|
|
80
46
|
try {
|
|
81
47
|
const result = execFileSync("pulumi", ["stack", "output", key, "--json", ...extraArgs], { cwd: appRoot, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"], env: execEnv });
|
|
82
|
-
// If the output contains "[secret]" placeholders, retry with --show-secrets
|
|
83
48
|
if (result.includes('"[secret]"')) {
|
|
84
49
|
return execFileSync("pulumi", ["stack", "output", key, "--json", "--show-secrets", ...extraArgs], { cwd: appRoot, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"], env: execEnv });
|
|
85
50
|
}
|
|
86
51
|
return result;
|
|
87
52
|
}
|
|
88
53
|
catch (err) {
|
|
89
|
-
// If the error is a secrets/KMS issue, don't retry with --show-secrets
|
|
90
|
-
// (it will fail the same way). Only retry for other Pulumi errors.
|
|
91
54
|
const errMsg = err?.stderr ?? "";
|
|
92
55
|
if (errMsg.includes("kms:") || errMsg.includes("KMS") || errMsg.includes("secrets manager")) {
|
|
93
56
|
throw err;
|
|
@@ -95,4 +58,3 @@ export function pulumiStackOutput(appRoot, key, extraArgs, env) {
|
|
|
95
58
|
return execFileSync("pulumi", ["stack", "output", key, "--json", "--show-secrets", ...extraArgs], { cwd: appRoot, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"], env: execEnv });
|
|
96
59
|
}
|
|
97
60
|
}
|
|
98
|
-
//# sourceMappingURL=pulumi.js.map
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve `true` if a TCP connection to `host:port` completes within
|
|
3
|
-
* `timeoutMs`, else `false`. Never rejects — any failure (timeout, refused, DNS)
|
|
4
|
-
* is a `false`, since for transport selection "can't reach it" is the only signal
|
|
5
|
-
* that matters. The socket is always destroyed.
|
|
6
|
-
*/
|
|
7
1
|
export declare function probeTcpReachable(host: string, port: number, timeoutMs?: number): Promise<boolean>;
|
|
8
|
-
/**
|
|
9
|
-
* Resolve `true` if a connection to `host:port` completes AND survives a brief
|
|
10
|
-
* grace window (`holdMs`). Stronger than {@link probeTcpReachable} for probing a
|
|
11
|
-
* LOCAL FORWARDER port, where "the port accepts" is not proof the tunnel carries
|
|
12
|
-
* traffic: a forwarder (SSM port-forward, or the userspace-Tailscale SOCKS
|
|
13
|
-
* bridge) binds its local port even when its upstream leg is dead — so a plain
|
|
14
|
-
* connect succeeds while nothing flows. A dead-upstream forwarder accepts the
|
|
15
|
-
* TCP connection and then tears it down SYNCHRONOUSLY (e.g. the Tailscale bridge
|
|
16
|
-
* dials a SOCKS port the daemon isn't on and destroys the client — MESH-2169);
|
|
17
|
-
* measured, that teardown lands in ~1ms.
|
|
18
|
-
*
|
|
19
|
-
* The window is deliberately SMALL — just enough to clear that ~1ms fail-fast
|
|
20
|
-
* teardown. It is NOT a latency budget for the upstream: a real upstream need
|
|
21
|
-
* send no bytes and may itself idle-close a bare connection (Temporal's UI drops
|
|
22
|
-
* an idle HTTP connection at ~50ms; Temporal gRPC and Postgres hold indefinitely).
|
|
23
|
-
* So "closed within ~1ms of connecting" means the forwarder never reached a real
|
|
24
|
-
* upstream; surviving `holdMs` means it did. A larger window would mis-report a
|
|
25
|
-
* healthy-but-idle-closing service (like the Temporal UI) as DOWN. Never rejects;
|
|
26
|
-
* the socket is always destroyed.
|
|
27
|
-
*/
|
|
28
2
|
export declare function probeConnectionHolds(host: string, port: number, timeoutMs?: number, holdMs?: number): Promise<boolean>;
|
|
29
|
-
//# sourceMappingURL=reachability.d.ts.map
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TCP reachability probe for transport selection.
|
|
3
|
-
*
|
|
4
|
-
* `mesh dev`'s VPN detection is otherwise a *presence* check — it asks whether a
|
|
5
|
-
* Tailscale/VPN connection exists, not whether the mesh VPC actually routes. On a
|
|
6
|
-
* machine using Tailscale for SSH (but not the mesh Headscale VPN) that presence
|
|
7
|
-
* check returns true, `mesh dev` picks "VPN-direct", and the worker then dies with
|
|
8
|
-
* `DnsResolutionError` / `ECONNREFUSED` on the Temporal frontend. Dialing the
|
|
9
|
-
* endpoint before committing to VPN-direct turns that tribal-knowledge failure
|
|
10
|
-
* into an automatic SSM fallback (MESH-2016).
|
|
11
|
-
*/
|
|
12
1
|
import { createConnection } from "node:net";
|
|
13
|
-
/**
|
|
14
|
-
* Resolve `true` if a TCP connection to `host:port` completes within
|
|
15
|
-
* `timeoutMs`, else `false`. Never rejects — any failure (timeout, refused, DNS)
|
|
16
|
-
* is a `false`, since for transport selection "can't reach it" is the only signal
|
|
17
|
-
* that matters. The socket is always destroyed.
|
|
18
|
-
*/
|
|
19
2
|
export function probeTcpReachable(host, port, timeoutMs = 1500) {
|
|
20
3
|
return new Promise((resolve) => {
|
|
21
4
|
let settled = false;
|
|
@@ -33,26 +16,6 @@ export function probeTcpReachable(host, port, timeoutMs = 1500) {
|
|
|
33
16
|
socket.once("error", () => finish(false));
|
|
34
17
|
});
|
|
35
18
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolve `true` if a connection to `host:port` completes AND survives a brief
|
|
38
|
-
* grace window (`holdMs`). Stronger than {@link probeTcpReachable} for probing a
|
|
39
|
-
* LOCAL FORWARDER port, where "the port accepts" is not proof the tunnel carries
|
|
40
|
-
* traffic: a forwarder (SSM port-forward, or the userspace-Tailscale SOCKS
|
|
41
|
-
* bridge) binds its local port even when its upstream leg is dead — so a plain
|
|
42
|
-
* connect succeeds while nothing flows. A dead-upstream forwarder accepts the
|
|
43
|
-
* TCP connection and then tears it down SYNCHRONOUSLY (e.g. the Tailscale bridge
|
|
44
|
-
* dials a SOCKS port the daemon isn't on and destroys the client — MESH-2169);
|
|
45
|
-
* measured, that teardown lands in ~1ms.
|
|
46
|
-
*
|
|
47
|
-
* The window is deliberately SMALL — just enough to clear that ~1ms fail-fast
|
|
48
|
-
* teardown. It is NOT a latency budget for the upstream: a real upstream need
|
|
49
|
-
* send no bytes and may itself idle-close a bare connection (Temporal's UI drops
|
|
50
|
-
* an idle HTTP connection at ~50ms; Temporal gRPC and Postgres hold indefinitely).
|
|
51
|
-
* So "closed within ~1ms of connecting" means the forwarder never reached a real
|
|
52
|
-
* upstream; surviving `holdMs` means it did. A larger window would mis-report a
|
|
53
|
-
* healthy-but-idle-closing service (like the Temporal UI) as DOWN. Never rejects;
|
|
54
|
-
* the socket is always destroyed.
|
|
55
|
-
*/
|
|
56
19
|
export function probeConnectionHolds(host, port, timeoutMs = 800, holdMs = 25) {
|
|
57
20
|
return new Promise((resolve) => {
|
|
58
21
|
let settled = false;
|
|
@@ -68,14 +31,11 @@ export function probeConnectionHolds(host, port, timeoutMs = 800, holdMs = 25) {
|
|
|
68
31
|
resolve(ok);
|
|
69
32
|
};
|
|
70
33
|
socket.setTimeout(timeoutMs);
|
|
71
|
-
// Healthy iff the connection survives the grace window after connecting.
|
|
72
34
|
socket.once("connect", () => {
|
|
73
35
|
holdTimer = setTimeout(() => finish(true), holdMs);
|
|
74
36
|
});
|
|
75
|
-
// Closed before the grace window elapsed → the forwarder's upstream is dead.
|
|
76
37
|
socket.once("close", () => finish(false));
|
|
77
38
|
socket.once("timeout", () => finish(false));
|
|
78
39
|
socket.once("error", () => finish(false));
|
|
79
40
|
});
|
|
80
41
|
}
|
|
81
|
-
//# sourceMappingURL=reachability.js.map
|