@mesh-tech/mesh-cli 0.20.2 → 0.20.3
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 +12 -12
- package/dist/bin/mesh.js.map +0 -1
- 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.map +0 -1
- 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 +1 -1
- 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,25 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Root of the CLI's on-disk cache — logs, probe targets, compose output,
|
|
3
|
-
* seeded credentials, hub build contexts.
|
|
4
|
-
*
|
|
5
|
-
* Defaults to `~/.cache/mesh`. `MESH_CACHE_HOME` overrides it, and the override
|
|
6
|
-
* is read on every call rather than captured at import, so a process that sets
|
|
7
|
-
* it after this module loads still gets it.
|
|
8
|
-
*
|
|
9
|
-
* WHY THE OVERRIDE EXISTS. Several helpers here `mkdirSync` eagerly, so merely
|
|
10
|
-
* *calling* one writes to the user's home — which meant `pnpm test` wrote into
|
|
11
|
-
* `~/.cache/mesh` on any machine that runs it, and fail outright under a sandbox
|
|
12
|
-
* that denies writes outside the workspace (`EPERM: mkdir
|
|
13
|
-
* '/Users/…/.cache/mesh/mesh-local/probes'`). The suite points this at a
|
|
14
|
-
* gitignored directory inside the package — see `test/setup.ts` — so tests never
|
|
15
|
-
* reach outside the repo.
|
|
16
|
-
*/
|
|
17
1
|
export declare function meshCacheHome(): string;
|
|
18
|
-
/**
|
|
19
|
-
* A directory under the cache root, created if absent.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* meshCacheDir("mesh-local", "probes"); // → "/Users/me/.cache/mesh/mesh-local/probes"
|
|
23
|
-
*/
|
|
24
2
|
export declare function meshCacheDir(...segments: string[]): string;
|
|
25
|
-
//# sourceMappingURL=cache-home.d.ts.map
|
|
@@ -1,36 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
/**
|
|
5
|
-
* Root of the CLI's on-disk cache — logs, probe targets, compose output,
|
|
6
|
-
* seeded credentials, hub build contexts.
|
|
7
|
-
*
|
|
8
|
-
* Defaults to `~/.cache/mesh`. `MESH_CACHE_HOME` overrides it, and the override
|
|
9
|
-
* is read on every call rather than captured at import, so a process that sets
|
|
10
|
-
* it after this module loads still gets it.
|
|
11
|
-
*
|
|
12
|
-
* WHY THE OVERRIDE EXISTS. Several helpers here `mkdirSync` eagerly, so merely
|
|
13
|
-
* *calling* one writes to the user's home — which meant `pnpm test` wrote into
|
|
14
|
-
* `~/.cache/mesh` on any machine that runs it, and fail outright under a sandbox
|
|
15
|
-
* that denies writes outside the workspace (`EPERM: mkdir
|
|
16
|
-
* '/Users/…/.cache/mesh/mesh-local/probes'`). The suite points this at a
|
|
17
|
-
* gitignored directory inside the package — see `test/setup.ts` — so tests never
|
|
18
|
-
* reach outside the repo.
|
|
19
|
-
*/
|
|
20
4
|
export function meshCacheHome() {
|
|
21
|
-
// `||` not `??`: an empty MESH_CACHE_HOME must fall back, or path.join()
|
|
22
|
-
// resolves cache paths against the filesystem root.
|
|
23
5
|
return process.env.MESH_CACHE_HOME || path.join(os.homedir(), ".cache", "mesh");
|
|
24
6
|
}
|
|
25
|
-
/**
|
|
26
|
-
* A directory under the cache root, created if absent.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* meshCacheDir("mesh-local", "probes"); // → "/Users/me/.cache/mesh/mesh-local/probes"
|
|
30
|
-
*/
|
|
31
7
|
export function meshCacheDir(...segments) {
|
|
32
8
|
const dir = path.join(meshCacheHome(), ...segments);
|
|
33
9
|
fs.mkdirSync(dir, { recursive: true });
|
|
34
10
|
return dir;
|
|
35
11
|
}
|
|
36
|
-
//# sourceMappingURL=cache-home.js.map
|
|
@@ -1,62 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serialize a fetched Temporal workflow history into the replay-fixture JSON
|
|
3
|
-
* shape — the same canonical proto3-JSON `{ events: [...] }` that
|
|
4
|
-
* `@mesh-tech/agent-sdk`'s `replay/history-io.ts` `historyToFixture` produces,
|
|
5
|
-
* so a captured file replays via `replayFixture` (which rehydrates it with
|
|
6
|
-
* `historyFromJSON`) for LOCAL debugging. Captured PRODUCTION histories are
|
|
7
|
-
* never committed (they contain real, decrypted customer/conversation data —
|
|
8
|
-
* see the CLI's do-not-commit warning); only synthetic goldens live in
|
|
9
|
-
* `packages/agent-sdk/src/replay/fixtures/`.
|
|
10
|
-
*
|
|
11
|
-
* We reuse `@temporalio/common`'s `historyToJSON` directly (the exact helper
|
|
12
|
-
* agent-sdk's history-io uses) rather than importing `@mesh-tech/agent-sdk`:
|
|
13
|
-
* the CLI has no reason to pull in the whole worker/replay stack, and keeping
|
|
14
|
-
* the dependency pointed at the shared Temporal library guarantees the output
|
|
15
|
-
* round-trips through `historyFromJSON`.
|
|
16
|
-
*
|
|
17
|
-
* The one thing a *real* history needs that a synthetic golden fixture doesn't:
|
|
18
|
-
* its payloads are ENCRYPTED (the worker's AES-GCM codec). `historyToJSON`
|
|
19
|
-
* would just base64 the ciphertext, which `replayFixture`'s plaintext converter
|
|
20
|
-
* can't decode. So before serializing we walk every Payload in the history and
|
|
21
|
-
* replace each encrypted one with its decrypted inner Payload — yielding a
|
|
22
|
-
* plaintext fixture identical in shape to a codec-free golden capture.
|
|
23
|
-
*/
|
|
24
1
|
import type { RawPayloadDecrypter } from "./temporal-codec.js";
|
|
25
|
-
/**
|
|
26
|
-
* Walk an arbitrary history-event tree and decrypt every encrypted Payload in
|
|
27
|
-
* place, using `decrypt` to turn an encrypted Payload into its plaintext inner
|
|
28
|
-
* Payload. Payloads the decrypter reports as non-encrypted (`null`) are left
|
|
29
|
-
* untouched. Returns the number of payloads that were decrypted.
|
|
30
|
-
*
|
|
31
|
-
* The `{ metadata, data }` heuristic mirrors Temporal's own `fixPayloads` in
|
|
32
|
-
* `@temporalio/common/lib/proto-utils`, so it identifies exactly the nodes
|
|
33
|
-
* proto3-JSON treats as payloads. Once a node is a Payload we do NOT recurse
|
|
34
|
-
* into it (its metadata values are bytes, not nested payloads).
|
|
35
|
-
*/
|
|
36
2
|
export declare function decryptHistoryPayloads(node: unknown, decrypt: RawPayloadDecrypter): Promise<number>;
|
|
37
|
-
/** Result of {@link serializeHistoryToFixture}. */
|
|
38
3
|
export interface CaptureResult {
|
|
39
|
-
/** The parsed proto3-JSON fixture object (drop-in for `replayFixture`). */
|
|
40
4
|
fixture: unknown;
|
|
41
|
-
/** Total events serialized. */
|
|
42
5
|
eventCount: number;
|
|
43
|
-
/** How many encrypted payloads were decrypted (0 when no decrypter given). */
|
|
44
6
|
decryptedPayloads: number;
|
|
45
7
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Turn an ordered list of raw history events into a replay fixture object.
|
|
48
|
-
*
|
|
49
|
-
* @param events - Raw proto-decoded history events, in order (as yielded by the
|
|
50
|
-
* CLI's `iterHistoryEvents` over `getWorkflowExecutionHistory`).
|
|
51
|
-
* @param decrypter - Optional raw payload decrypter. When provided, every
|
|
52
|
-
* encrypted payload in the history is decrypted in place before serialization
|
|
53
|
-
* so the fixture is replayable with a plaintext converter. When omitted, the
|
|
54
|
-
* payloads are serialized as-is (ciphertext, base64-encoded).
|
|
55
|
-
*
|
|
56
|
-
* `historyToJSON` runs its input through protobuf `History.fromObject`, so a
|
|
57
|
-
* plain `{ events }` object of raw events is accepted directly; it returns a
|
|
58
|
-
* proto3-JSON *string* which we parse back to a structured object (the same
|
|
59
|
-
* `JSON.parse(historyToJSON(...))` round-trip `historyToFixture` performs).
|
|
60
|
-
*/
|
|
61
8
|
export declare function serializeHistoryToFixture(events: unknown[], decrypter?: RawPayloadDecrypter): Promise<CaptureResult>;
|
|
62
|
-
//# sourceMappingURL=capture-history.d.ts.map
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serialize a fetched Temporal workflow history into the replay-fixture JSON
|
|
3
|
-
* shape — the same canonical proto3-JSON `{ events: [...] }` that
|
|
4
|
-
* `@mesh-tech/agent-sdk`'s `replay/history-io.ts` `historyToFixture` produces,
|
|
5
|
-
* so a captured file replays via `replayFixture` (which rehydrates it with
|
|
6
|
-
* `historyFromJSON`) for LOCAL debugging. Captured PRODUCTION histories are
|
|
7
|
-
* never committed (they contain real, decrypted customer/conversation data —
|
|
8
|
-
* see the CLI's do-not-commit warning); only synthetic goldens live in
|
|
9
|
-
* `packages/agent-sdk/src/replay/fixtures/`.
|
|
10
|
-
*
|
|
11
|
-
* We reuse `@temporalio/common`'s `historyToJSON` directly (the exact helper
|
|
12
|
-
* agent-sdk's history-io uses) rather than importing `@mesh-tech/agent-sdk`:
|
|
13
|
-
* the CLI has no reason to pull in the whole worker/replay stack, and keeping
|
|
14
|
-
* the dependency pointed at the shared Temporal library guarantees the output
|
|
15
|
-
* round-trips through `historyFromJSON`.
|
|
16
|
-
*
|
|
17
|
-
* The one thing a *real* history needs that a synthetic golden fixture doesn't:
|
|
18
|
-
* its payloads are ENCRYPTED (the worker's AES-GCM codec). `historyToJSON`
|
|
19
|
-
* would just base64 the ciphertext, which `replayFixture`'s plaintext converter
|
|
20
|
-
* can't decode. So before serializing we walk every Payload in the history and
|
|
21
|
-
* replace each encrypted one with its decrypted inner Payload — yielding a
|
|
22
|
-
* plaintext fixture identical in shape to a codec-free golden capture.
|
|
23
|
-
*/
|
|
24
|
-
// Explicit `.js` — this package publishes native ESM, so the compiled dist
|
|
25
|
-
// must use a fully-specified specifier or Node throws ERR_MODULE_NOT_FOUND at
|
|
26
|
-
// runtime (MESH-2262). tsx tolerates the extensionless form; node does not.
|
|
27
1
|
import { historyToJSON } from "@temporalio/common/lib/proto-utils.js";
|
|
28
2
|
function isPayload(value) {
|
|
29
3
|
return (value != null &&
|
|
@@ -31,25 +5,13 @@ function isPayload(value) {
|
|
|
31
5
|
"metadata" in value &&
|
|
32
6
|
"data" in value);
|
|
33
7
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Walk an arbitrary history-event tree and decrypt every encrypted Payload in
|
|
36
|
-
* place, using `decrypt` to turn an encrypted Payload into its plaintext inner
|
|
37
|
-
* Payload. Payloads the decrypter reports as non-encrypted (`null`) are left
|
|
38
|
-
* untouched. Returns the number of payloads that were decrypted.
|
|
39
|
-
*
|
|
40
|
-
* The `{ metadata, data }` heuristic mirrors Temporal's own `fixPayloads` in
|
|
41
|
-
* `@temporalio/common/lib/proto-utils`, so it identifies exactly the nodes
|
|
42
|
-
* proto3-JSON treats as payloads. Once a node is a Payload we do NOT recurse
|
|
43
|
-
* into it (its metadata values are bytes, not nested payloads).
|
|
44
|
-
*/
|
|
45
8
|
export async function decryptHistoryPayloads(node, decrypt) {
|
|
46
9
|
if (node == null || typeof node !== "object")
|
|
47
10
|
return 0;
|
|
48
11
|
if (isPayload(node)) {
|
|
49
12
|
const inner = await decrypt(node);
|
|
50
13
|
if (inner === null)
|
|
51
|
-
return 0;
|
|
52
|
-
// Replace the encrypted envelope with the decrypted inner payload's bytes.
|
|
14
|
+
return 0;
|
|
53
15
|
node.metadata = inner.metadata ?? {};
|
|
54
16
|
node.data = inner.data ?? new Uint8Array(0);
|
|
55
17
|
return 1;
|
|
@@ -66,21 +28,6 @@ export async function decryptHistoryPayloads(node, decrypt) {
|
|
|
66
28
|
}
|
|
67
29
|
return count;
|
|
68
30
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Turn an ordered list of raw history events into a replay fixture object.
|
|
71
|
-
*
|
|
72
|
-
* @param events - Raw proto-decoded history events, in order (as yielded by the
|
|
73
|
-
* CLI's `iterHistoryEvents` over `getWorkflowExecutionHistory`).
|
|
74
|
-
* @param decrypter - Optional raw payload decrypter. When provided, every
|
|
75
|
-
* encrypted payload in the history is decrypted in place before serialization
|
|
76
|
-
* so the fixture is replayable with a plaintext converter. When omitted, the
|
|
77
|
-
* payloads are serialized as-is (ciphertext, base64-encoded).
|
|
78
|
-
*
|
|
79
|
-
* `historyToJSON` runs its input through protobuf `History.fromObject`, so a
|
|
80
|
-
* plain `{ events }` object of raw events is accepted directly; it returns a
|
|
81
|
-
* proto3-JSON *string* which we parse back to a structured object (the same
|
|
82
|
-
* `JSON.parse(historyToJSON(...))` round-trip `historyToFixture` performs).
|
|
83
|
-
*/
|
|
84
31
|
export async function serializeHistoryToFixture(events, decrypter) {
|
|
85
32
|
let decryptedPayloads = 0;
|
|
86
33
|
if (decrypter) {
|
|
@@ -91,4 +38,3 @@ export async function serializeHistoryToFixture(events, decrypter) {
|
|
|
91
38
|
const fixture = JSON.parse(historyToJSON({ events }));
|
|
92
39
|
return { fixture, eventCount: events.length, decryptedPayloads };
|
|
93
40
|
}
|
|
94
|
-
//# sourceMappingURL=capture-history.js.map
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context detection - determines tenant, stage, and platform environment
|
|
3
|
-
* from the current directory and environment variables.
|
|
4
|
-
*/
|
|
5
1
|
export interface MeshContext {
|
|
6
2
|
tenant: string;
|
|
7
3
|
stage: string;
|
|
8
4
|
platformEnv: string;
|
|
9
5
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Detect tenant and stage from current directory and environment.
|
|
12
|
-
*
|
|
13
|
-
* Priority for stage:
|
|
14
|
-
* 1. --stage flag (passed as stageArg)
|
|
15
|
-
* 2. MESH_STAGE env var
|
|
16
|
-
* 3. SST_STAGE env var
|
|
17
|
-
* 4. .sst/stage file
|
|
18
|
-
* 5. Pulumi config file name
|
|
19
|
-
* 6. Default: "dev"
|
|
20
|
-
*
|
|
21
|
-
* Priority for tenant:
|
|
22
|
-
* 1. MESH_TENANT env var
|
|
23
|
-
* 2. config.ts tenant field
|
|
24
|
-
* 3. Pulumi config mesh:tenant
|
|
25
|
-
* 4. Directory path (tenants/{tenant}/...)
|
|
26
|
-
* 5. Default: "mesh"
|
|
27
|
-
*/
|
|
28
6
|
export declare function detectContext(stageArg?: string): MeshContext;
|
|
29
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context detection - determines tenant, stage, and platform environment
|
|
3
|
-
* from the current directory and environment variables.
|
|
4
|
-
*/
|
|
5
1
|
import * as fs from "fs";
|
|
6
2
|
import * as path from "path";
|
|
7
3
|
import { logInfo } from "./log.js";
|
|
8
|
-
/**
|
|
9
|
-
* Find a file by walking up directories from the starting directory.
|
|
10
|
-
* Returns the full path to the file if found, undefined otherwise.
|
|
11
|
-
*/
|
|
12
4
|
function findFileUpward(filename, startDir = process.cwd()) {
|
|
13
5
|
let currentDir = startDir;
|
|
14
6
|
const root = path.parse(currentDir).root;
|
|
@@ -21,53 +13,29 @@ function findFileUpward(filename, startDir = process.cwd()) {
|
|
|
21
13
|
}
|
|
22
14
|
return undefined;
|
|
23
15
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Detect tenant and stage from current directory and environment.
|
|
26
|
-
*
|
|
27
|
-
* Priority for stage:
|
|
28
|
-
* 1. --stage flag (passed as stageArg)
|
|
29
|
-
* 2. MESH_STAGE env var
|
|
30
|
-
* 3. SST_STAGE env var
|
|
31
|
-
* 4. .sst/stage file
|
|
32
|
-
* 5. Pulumi config file name
|
|
33
|
-
* 6. Default: "dev"
|
|
34
|
-
*
|
|
35
|
-
* Priority for tenant:
|
|
36
|
-
* 1. MESH_TENANT env var
|
|
37
|
-
* 2. config.ts tenant field
|
|
38
|
-
* 3. Pulumi config mesh:tenant
|
|
39
|
-
* 4. Directory path (tenants/{tenant}/...)
|
|
40
|
-
* 5. Default: "mesh"
|
|
41
|
-
*/
|
|
42
16
|
export function detectContext(stageArg) {
|
|
43
17
|
let tenant;
|
|
44
18
|
let stage;
|
|
45
19
|
const cwd = process.cwd();
|
|
46
|
-
// Try to detect from Pulumi.yaml
|
|
47
20
|
if (fs.existsSync("Pulumi.yaml")) {
|
|
48
|
-
// Look for Pulumi.*.yaml config files
|
|
49
21
|
const files = fs.readdirSync(".").filter((f) => f.startsWith("Pulumi.") && f.endsWith(".yaml") && f !== "Pulumi.yaml");
|
|
50
22
|
const configFile = files[0];
|
|
51
23
|
if (configFile) {
|
|
52
24
|
const content = fs.readFileSync(configFile, "utf-8");
|
|
53
|
-
// Extract tenant from mesh:tenant config
|
|
54
25
|
const tenantMatch = content.match(/^\s*mesh:tenant:\s*["']?([^"'\n]+)["']?/m);
|
|
55
26
|
if (tenantMatch?.[1]) {
|
|
56
27
|
tenant = tenantMatch[1].trim();
|
|
57
28
|
}
|
|
58
|
-
// Extract stage from filename: Pulumi.<stage>.yaml
|
|
59
29
|
const stageMatch = configFile.match(/Pulumi\.(.+)\.yaml/);
|
|
60
30
|
if (stageMatch?.[1]) {
|
|
61
31
|
stage = stageMatch[1];
|
|
62
32
|
}
|
|
63
33
|
}
|
|
64
34
|
}
|
|
65
|
-
// Try to detect from SST config (walk up directories to find it)
|
|
66
35
|
const sstConfigPath = findFileUpward("sst.config.ts");
|
|
67
36
|
let sstDir;
|
|
68
37
|
if (sstConfigPath) {
|
|
69
38
|
sstDir = path.dirname(sstConfigPath);
|
|
70
|
-
// Check parent config.ts for tenant (relative to sst.config.ts location)
|
|
71
39
|
const parentConfigPath = path.join(sstDir, "..", "config.ts");
|
|
72
40
|
if (fs.existsSync(parentConfigPath)) {
|
|
73
41
|
const configContent = fs.readFileSync(parentConfigPath, "utf-8");
|
|
@@ -76,31 +44,25 @@ export function detectContext(stageArg) {
|
|
|
76
44
|
tenant = tenantMatch[1];
|
|
77
45
|
}
|
|
78
46
|
}
|
|
79
|
-
// Check .sst/stage for current stage (relative to sst.config.ts location)
|
|
80
47
|
const sstStagePath = path.join(sstDir, ".sst", "stage");
|
|
81
48
|
if (fs.existsSync(sstStagePath)) {
|
|
82
49
|
stage = fs.readFileSync(sstStagePath, "utf-8").trim();
|
|
83
50
|
}
|
|
84
51
|
}
|
|
85
|
-
// Fallback: infer tenant from directory path
|
|
86
52
|
if (!tenant) {
|
|
87
53
|
const pathMatch = cwd.match(/tenants\/([^/]+)/);
|
|
88
54
|
if (pathMatch) {
|
|
89
55
|
tenant = pathMatch[1];
|
|
90
56
|
}
|
|
91
57
|
}
|
|
92
|
-
// Apply priority: stageArg > MESH_STAGE > SST_STAGE > detected > default
|
|
93
58
|
stage = stageArg || process.env.MESH_STAGE || process.env.SST_STAGE || stage || "dev";
|
|
94
59
|
tenant = process.env.MESH_TENANT || tenant || "mesh";
|
|
95
|
-
// Resolve platform environment from config.ts if available
|
|
96
60
|
let platformEnv = stage;
|
|
97
61
|
let platformEnvMap = {};
|
|
98
62
|
let defaultPlatformEnv;
|
|
99
|
-
// Try to read platformEnvMap and defaultPlatformEnv from config.ts (relative to sst.config.ts location)
|
|
100
63
|
const configPath = sstDir ? path.join(sstDir, "..", "config.ts") : "../config.ts";
|
|
101
64
|
if (fs.existsSync(configPath)) {
|
|
102
65
|
const configContent = fs.readFileSync(configPath, "utf-8");
|
|
103
|
-
// Parse platformEnvMap object
|
|
104
66
|
const mapMatch = configContent.match(/platformEnvMap:\s*\{([^}]+)\}/);
|
|
105
67
|
if (mapMatch?.[1]) {
|
|
106
68
|
const entries = mapMatch[1].matchAll(/(\w+):\s*["']([^"']+)["']/g);
|
|
@@ -112,21 +74,16 @@ export function detectContext(stageArg) {
|
|
|
112
74
|
}
|
|
113
75
|
}
|
|
114
76
|
}
|
|
115
|
-
// Parse defaultPlatformEnv
|
|
116
77
|
const defaultMatch = configContent.match(/defaultPlatformEnv:\s*["']([^"']+)["']/);
|
|
117
78
|
if (defaultMatch?.[1]) {
|
|
118
79
|
defaultPlatformEnv = defaultMatch[1];
|
|
119
80
|
}
|
|
120
81
|
}
|
|
121
|
-
// Parse env from stage by stripping tenant prefix (matches Pulumi pattern)
|
|
122
|
-
// e.g., "mesh-dev-temporal" → env "dev-temporal"
|
|
123
82
|
const tenantPrefix = `${tenant}-`;
|
|
124
83
|
const parsedEnv = stage.startsWith(tenantPrefix)
|
|
125
84
|
? stage.slice(tenantPrefix.length)
|
|
126
85
|
: stage;
|
|
127
|
-
// Use config mapping if available, then defaultPlatformEnv, otherwise use parsed env directly
|
|
128
86
|
platformEnv = platformEnvMap[parsedEnv] ?? platformEnvMap[stage] ?? defaultPlatformEnv ?? parsedEnv;
|
|
129
87
|
logInfo(`Stage: ${stage}, Platform: ${platformEnv}, Tenant: ${tenant}`);
|
|
130
88
|
return { tenant, stage, platformEnv };
|
|
131
89
|
}
|
|
132
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database credential utilities
|
|
3
|
-
*/
|
|
4
1
|
export interface DatabaseCredentials {
|
|
5
2
|
username: string;
|
|
6
3
|
password: string;
|
|
@@ -8,54 +5,19 @@ export interface DatabaseCredentials {
|
|
|
8
5
|
port: number;
|
|
9
6
|
database: string;
|
|
10
7
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Options for credential lookup
|
|
13
|
-
*/
|
|
14
8
|
export interface CredentialLookupOptions {
|
|
15
|
-
/** App name (e.g., "rdc") - if provided, uses path mesh/{tenant}/{stage}/{app}/db-credentials */
|
|
16
9
|
app?: string;
|
|
17
10
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Get DATABASE_URL from Secrets Manager.
|
|
20
|
-
*
|
|
21
|
-
* Credential path patterns:
|
|
22
|
-
* - With app: mesh/{tenant}/{stage}/{app}/db-credentials
|
|
23
|
-
* - Without app: mesh/{tenant}/{stage}/db-credentials
|
|
24
|
-
*
|
|
25
|
-
* Returns the DATABASE_URL string directly. Use rewriteDatabaseUrl() to
|
|
26
|
-
* modify host/port for tunnel usage.
|
|
27
|
-
*/
|
|
28
11
|
export declare function getDatabaseUrl(tenant: string, stage: string, options?: CredentialLookupOptions): Promise<string>;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated Use getDatabaseUrl instead - returns DATABASE_URL directly
|
|
31
|
-
*/
|
|
32
12
|
export declare function getDbCredentials(tenant: string, stage: string, _platformEnv: string, rdsHost: string, rdsPort: number, options?: CredentialLookupOptions): Promise<DatabaseCredentials>;
|
|
33
|
-
/**
|
|
34
|
-
* Options for rewriting DATABASE_URL
|
|
35
|
-
*/
|
|
36
13
|
export interface DatabaseUrlRewriteOptions {
|
|
37
|
-
/** New host:port endpoint (e.g., "localhost:5432") */
|
|
38
14
|
endpoint?: string;
|
|
39
|
-
/** SSL mode (require, no-verify, disable) */
|
|
40
15
|
sslMode?: string;
|
|
41
16
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Rewrite DATABASE_URL with new endpoint and/or SSL mode.
|
|
44
|
-
* Preserves username, password, database name, and other query params.
|
|
45
|
-
*
|
|
46
|
-
* Used by both mesh-env-exec (for sst dev) and mesh db exec (for ad-hoc commands).
|
|
47
|
-
*/
|
|
48
17
|
export declare function rewriteDatabaseUrl(url: string, options: DatabaseUrlRewriteOptions): string;
|
|
49
|
-
/**
|
|
50
|
-
* Build a DATABASE_URL from credentials.
|
|
51
|
-
*/
|
|
52
18
|
export declare function buildDatabaseUrl(creds: DatabaseCredentials, options?: DatabaseUrlRewriteOptions): string;
|
|
53
|
-
/**
|
|
54
|
-
* Try to read database info from SST outputs (when sst dev has run).
|
|
55
|
-
*/
|
|
56
19
|
export declare function readSstOutputs(): Promise<{
|
|
57
20
|
databaseUrl?: string;
|
|
58
21
|
databaseName?: string;
|
|
59
22
|
secretArn?: string;
|
|
60
23
|
} | null>;
|
|
61
|
-
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database credential utilities
|
|
3
|
-
*/
|
|
4
1
|
import { SecretsManagerClient, GetSecretValueCommand, } from "@aws-sdk/client-secrets-manager";
|
|
5
2
|
import { logInfo, logSuccess } from "./log.js";
|
|
6
|
-
/**
|
|
7
|
-
* Get DATABASE_URL from Secrets Manager.
|
|
8
|
-
*
|
|
9
|
-
* Credential path patterns:
|
|
10
|
-
* - With app: mesh/{tenant}/{stage}/{app}/db-credentials
|
|
11
|
-
* - Without app: mesh/{tenant}/{stage}/db-credentials
|
|
12
|
-
*
|
|
13
|
-
* Returns the DATABASE_URL string directly. Use rewriteDatabaseUrl() to
|
|
14
|
-
* modify host/port for tunnel usage.
|
|
15
|
-
*/
|
|
16
3
|
export async function getDatabaseUrl(tenant, stage, options) {
|
|
17
4
|
const secretsManager = new SecretsManagerClient({});
|
|
18
|
-
// Build secret path - with or without app name
|
|
19
5
|
const secretName = options?.app
|
|
20
6
|
? `mesh/${tenant}/${stage}/${options.app}/db-credentials`
|
|
21
7
|
: `mesh/${tenant}/${stage}/db-credentials`;
|
|
@@ -24,13 +10,11 @@ export async function getDatabaseUrl(tenant, stage, options) {
|
|
|
24
10
|
const response = await secretsManager.send(new GetSecretValueCommand({ SecretId: secretName }));
|
|
25
11
|
if (response.SecretString) {
|
|
26
12
|
const secret = JSON.parse(response.SecretString);
|
|
27
|
-
// Handle DATABASE_URL format (preferred)
|
|
28
13
|
if (secret.DATABASE_URL) {
|
|
29
14
|
const parsed = new URL(secret.DATABASE_URL);
|
|
30
15
|
logSuccess(`Got credentials for user: ${parsed.username}`);
|
|
31
16
|
return secret.DATABASE_URL;
|
|
32
17
|
}
|
|
33
|
-
// Handle individual fields format (legacy)
|
|
34
18
|
if (secret.username && secret.password) {
|
|
35
19
|
logSuccess(`Got credentials for user: ${secret.username}`);
|
|
36
20
|
const database = secret.dbname ?? secret.database ?? "postgres";
|
|
@@ -43,13 +27,9 @@ export async function getDatabaseUrl(tenant, stage, options) {
|
|
|
43
27
|
if (error.message?.includes("unexpected format")) {
|
|
44
28
|
throw error;
|
|
45
29
|
}
|
|
46
|
-
// Secret not found - will be caught by caller
|
|
47
30
|
}
|
|
48
31
|
throw new Error(`Could not find credentials at ${secretName}`);
|
|
49
32
|
}
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated Use getDatabaseUrl instead - returns DATABASE_URL directly
|
|
52
|
-
*/
|
|
53
33
|
export async function getDbCredentials(tenant, stage, _platformEnv, rdsHost, rdsPort, options) {
|
|
54
34
|
const databaseUrl = await getDatabaseUrl(tenant, stage, options);
|
|
55
35
|
const parsed = new URL(databaseUrl);
|
|
@@ -61,16 +41,9 @@ export async function getDbCredentials(tenant, stage, _platformEnv, rdsHost, rds
|
|
|
61
41
|
database: parsed.pathname.slice(1),
|
|
62
42
|
};
|
|
63
43
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Rewrite DATABASE_URL with new endpoint and/or SSL mode.
|
|
66
|
-
* Preserves username, password, database name, and other query params.
|
|
67
|
-
*
|
|
68
|
-
* Used by both mesh-env-exec (for sst dev) and mesh db exec (for ad-hoc commands).
|
|
69
|
-
*/
|
|
70
44
|
export function rewriteDatabaseUrl(url, options) {
|
|
71
45
|
try {
|
|
72
46
|
const parsed = new URL(url);
|
|
73
|
-
// Rewrite endpoint if provided
|
|
74
47
|
if (options.endpoint) {
|
|
75
48
|
if (options.endpoint.includes(":")) {
|
|
76
49
|
const colonIndex = options.endpoint.lastIndexOf(":");
|
|
@@ -82,10 +55,8 @@ export function rewriteDatabaseUrl(url, options) {
|
|
|
82
55
|
parsed.port = parsed.port || "5432";
|
|
83
56
|
}
|
|
84
57
|
}
|
|
85
|
-
// Set SSL mode if provided
|
|
86
58
|
if (options.sslMode) {
|
|
87
59
|
parsed.searchParams.set("sslmode", options.sslMode);
|
|
88
|
-
// For Prisma: accept invalid/self-signed certificates through tunnels
|
|
89
60
|
if (options.sslMode === "require" || options.sslMode === "no-verify") {
|
|
90
61
|
parsed.searchParams.set("sslaccept", "accept_invalid_certs");
|
|
91
62
|
}
|
|
@@ -93,13 +64,9 @@ export function rewriteDatabaseUrl(url, options) {
|
|
|
93
64
|
return parsed.toString();
|
|
94
65
|
}
|
|
95
66
|
catch {
|
|
96
|
-
// If URL parsing fails, return original
|
|
97
67
|
return url;
|
|
98
68
|
}
|
|
99
69
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Build a DATABASE_URL from credentials.
|
|
102
|
-
*/
|
|
103
70
|
export function buildDatabaseUrl(creds, options) {
|
|
104
71
|
const host = options?.endpoint?.split(":")[0] ?? creds.host;
|
|
105
72
|
const port = options?.endpoint?.split(":")[1] ?? String(creds.port);
|
|
@@ -112,9 +79,6 @@ export function buildDatabaseUrl(creds, options) {
|
|
|
112
79
|
}
|
|
113
80
|
return url;
|
|
114
81
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Try to read database info from SST outputs (when sst dev has run).
|
|
117
|
-
*/
|
|
118
82
|
export async function readSstOutputs() {
|
|
119
83
|
const fs = await import("fs");
|
|
120
84
|
if (!fs.existsSync(".sst/outputs.json")) {
|
|
@@ -125,7 +89,6 @@ export async function readSstOutputs() {
|
|
|
125
89
|
const outputs = JSON.parse(content);
|
|
126
90
|
if (outputs.databaseUrl) {
|
|
127
91
|
logInfo("Found SST outputs with database config");
|
|
128
|
-
// Extract secret ARN from URL if present
|
|
129
92
|
const secretArnMatch = outputs.databaseUrl.match(/secretArn=([^&]+)/);
|
|
130
93
|
const secretArn = secretArnMatch
|
|
131
94
|
? decodeURIComponent(secretArnMatch[1])
|
|
@@ -138,8 +101,6 @@ export async function readSstOutputs() {
|
|
|
138
101
|
}
|
|
139
102
|
}
|
|
140
103
|
catch {
|
|
141
|
-
// Ignore parse errors
|
|
142
104
|
}
|
|
143
105
|
return null;
|
|
144
106
|
}
|
|
145
|
-
//# sourceMappingURL=credentials.js.map
|
|
@@ -1,52 +1,14 @@
|
|
|
1
|
-
/** A `@mesh-tech/*` dep whose installed version differs from the lockfile's. */
|
|
2
1
|
export interface DepMismatch {
|
|
3
2
|
name: string;
|
|
4
|
-
/** Version the lockfile says should be installed. */
|
|
5
3
|
expected: string;
|
|
6
|
-
/** Version actually resolvable in node_modules, or null if not installed. */
|
|
7
4
|
installed: string | null;
|
|
8
5
|
}
|
|
9
|
-
/** pulumi ops that EVALUATE the program (a stale install can produce a wrong plan). */
|
|
10
6
|
export declare const PROGRAM_EVAL_OPS: Set<string>;
|
|
11
|
-
/** Env escape hatch — set truthy to skip the preflight (e.g. deliberate local link testing). */
|
|
12
7
|
export declare const SKIP_ENV = "MESH_SKIP_DEPLOY_PREFLIGHT";
|
|
13
|
-
/**
|
|
14
|
-
* A lockfile `version:` is checkable only when it's a concrete published version.
|
|
15
|
-
* `link:…`/`file:…` (dev-link pnpmfile, local tarballs) point at live source and
|
|
16
|
-
* are never stale; anything not starting with a digit isn't a comparable version.
|
|
17
|
-
* Peer/patch suffixes (`1.0.1(react@18)`) are stripped to the bare version.
|
|
18
|
-
*/
|
|
19
8
|
export declare function normalizeLockVersion(raw: unknown): string | null;
|
|
20
|
-
/**
|
|
21
|
-
* Pure: extract the gated (`@mesh-tech/*`), concretely-versioned deps for one
|
|
22
|
-
* importer of a parsed pnpm-lock document → `{ name: expectedVersion }`.
|
|
23
|
-
*
|
|
24
|
-
* Handles the pnpm v9 shape (`{ specifier, version }` per dep) and the older flat
|
|
25
|
-
* shape (`name: "1.0.1"`). Unknown importer → `{}` (nothing checkable).
|
|
26
|
-
*/
|
|
27
9
|
export declare function extractImporterMeshVersions(lockDoc: unknown, importerRel: string): Record<string, string>;
|
|
28
|
-
/**
|
|
29
|
-
* Pure: diff the lockfile's expected versions against the installed ones. A dep
|
|
30
|
-
* is a mismatch when the installed version differs (or it isn't installed).
|
|
31
|
-
*/
|
|
32
10
|
export declare function diffLockVsInstalled(expected: Record<string, string>, installed: Record<string, string | null>): DepMismatch[];
|
|
33
|
-
/** Walk up from `startDir` to the nearest directory containing a `pnpm-lock.yaml`. */
|
|
34
11
|
export declare function findPnpmLock(startDir: string): string | null;
|
|
35
|
-
/**
|
|
36
|
-
* Check that the `@mesh-tech/*` deps installed in `appRoot`'s `node_modules` match
|
|
37
|
-
* what the pnpm lockfile says. Returns the list of mismatches (empty = fresh), or
|
|
38
|
-
* `null` when the check does not apply (no lockfile — not a pnpm repo, or the
|
|
39
|
-
* monorepo running without one). IO wrapper around the pure helpers above.
|
|
40
|
-
*/
|
|
41
12
|
export declare function checkDeployDepsFresh(appRoot: string): DepMismatch[] | null;
|
|
42
|
-
/** Human-readable stale-deps report (mirrors the stale-dist detector's style). */
|
|
43
13
|
export declare function formatStaleDepsError(mismatches: DepMismatch[]): string;
|
|
44
|
-
/**
|
|
45
|
-
* Gate a `mesh deploy` invocation: if `op` evaluates the pulumi program and the
|
|
46
|
-
* deploy repo's `node_modules` is stale vs the lockfile, print the fix and exit
|
|
47
|
-
* non-zero BEFORE pulumi runs. No-op for non-evaluating ops, a fresh install, a
|
|
48
|
-
* non-pnpm repo, or when the skip env is set. Kept side-effecting (log + exit) so
|
|
49
|
-
* `deploy.ts` stays a thin wiring layer; the decision logic is pure above.
|
|
50
|
-
*/
|
|
51
14
|
export declare function assertDeployDepsFresh(appRoot: string, op: string): void;
|
|
52
|
-
//# sourceMappingURL=deploy-preflight.d.ts.map
|