@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,55 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deploy preflight — guard `mesh deploy` (pulumi up/preview/destroy/refresh) in a
|
|
3
|
-
* DEPLOY repo against a stale `node_modules` (MESH-2266).
|
|
4
|
-
*
|
|
5
|
-
* The hazard: a teammate pulls a `@mesh-tech/*` version bump (package.json +
|
|
6
|
-
* pnpm-lock.yaml move together in the commit) but forgets `pnpm install`, so
|
|
7
|
-
* `node_modules` still links the OLD version. The pulumi program then evaluates
|
|
8
|
-
* OLD component code and produces a plan that DELETES resources the new code would
|
|
9
|
-
* keep — the exact incident that showed `VpnJoinBroker` (+~40 resources) as a
|
|
10
|
-
* delete on mesh-dev when node_modules lagged the 1.0.1 bump. This is the same
|
|
11
|
-
* stale-artifact class as the monorepo stale-dist detector (MESH-2019) and the
|
|
12
|
-
* canonical CLI (MESH-2261), one layer up with higher stakes.
|
|
13
|
-
*
|
|
14
|
-
* The check is cheap and precise: compare each `@mesh-tech/*` version the LOCKFILE
|
|
15
|
-
* says should be installed against what is ACTUALLY installed in `node_modules`.
|
|
16
|
-
* A mismatch means `pnpm install` hasn't run since the lockfile changed. We only
|
|
17
|
-
* gate program-EVALUATING ops (a stale install can't corrupt `whoami`/`stack
|
|
18
|
-
* output`), and source-linked deps (`link:`/`file:`/dev-link pnpmfile) are skipped
|
|
19
|
-
* — they are intentionally pointed at live source and never "stale".
|
|
20
|
-
*/
|
|
21
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
22
2
|
import { dirname, join, relative } from 'node:path';
|
|
23
3
|
import { parse as parseYaml } from 'yaml';
|
|
24
4
|
import { logWarn } from './log.js';
|
|
25
|
-
/** Package-name prefixes whose version drift changes the pulumi plan. */
|
|
26
5
|
const GATED_PREFIXES = ['@mesh-tech/'];
|
|
27
|
-
/** pulumi ops that EVALUATE the program (a stale install can produce a wrong plan). */
|
|
28
6
|
export const PROGRAM_EVAL_OPS = new Set(['up', 'preview', 'destroy', 'refresh', 'import']);
|
|
29
|
-
/** Env escape hatch — set truthy to skip the preflight (e.g. deliberate local link testing). */
|
|
30
7
|
export const SKIP_ENV = 'MESH_SKIP_DEPLOY_PREFLIGHT';
|
|
31
8
|
function isGated(name) {
|
|
32
9
|
return GATED_PREFIXES.some((p) => name.startsWith(p));
|
|
33
10
|
}
|
|
34
|
-
/**
|
|
35
|
-
* A lockfile `version:` is checkable only when it's a concrete published version.
|
|
36
|
-
* `link:…`/`file:…` (dev-link pnpmfile, local tarballs) point at live source and
|
|
37
|
-
* are never stale; anything not starting with a digit isn't a comparable version.
|
|
38
|
-
* Peer/patch suffixes (`1.0.1(react@18)`) are stripped to the bare version.
|
|
39
|
-
*/
|
|
40
11
|
export function normalizeLockVersion(raw) {
|
|
41
12
|
if (typeof raw !== 'string' || raw.length === 0)
|
|
42
13
|
return null;
|
|
43
14
|
const bare = raw.split('(')[0].trim();
|
|
44
15
|
return /^\d/.test(bare) ? bare : null;
|
|
45
16
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Pure: extract the gated (`@mesh-tech/*`), concretely-versioned deps for one
|
|
48
|
-
* importer of a parsed pnpm-lock document → `{ name: expectedVersion }`.
|
|
49
|
-
*
|
|
50
|
-
* Handles the pnpm v9 shape (`{ specifier, version }` per dep) and the older flat
|
|
51
|
-
* shape (`name: "1.0.1"`). Unknown importer → `{}` (nothing checkable).
|
|
52
|
-
*/
|
|
53
17
|
export function extractImporterMeshVersions(lockDoc, importerRel) {
|
|
54
18
|
const out = {};
|
|
55
19
|
const importers = lockDoc?.importers;
|
|
@@ -71,10 +35,6 @@ export function extractImporterMeshVersions(lockDoc, importerRel) {
|
|
|
71
35
|
}
|
|
72
36
|
return out;
|
|
73
37
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Pure: diff the lockfile's expected versions against the installed ones. A dep
|
|
76
|
-
* is a mismatch when the installed version differs (or it isn't installed).
|
|
77
|
-
*/
|
|
78
38
|
export function diffLockVsInstalled(expected, installed) {
|
|
79
39
|
const out = [];
|
|
80
40
|
for (const [name, exp] of Object.entries(expected)) {
|
|
@@ -84,7 +44,6 @@ export function diffLockVsInstalled(expected, installed) {
|
|
|
84
44
|
}
|
|
85
45
|
return out;
|
|
86
46
|
}
|
|
87
|
-
/** Walk up from `startDir` to the nearest directory containing a `pnpm-lock.yaml`. */
|
|
88
47
|
export function findPnpmLock(startDir) {
|
|
89
48
|
let dir = startDir;
|
|
90
49
|
for (;;) {
|
|
@@ -97,18 +56,6 @@ export function findPnpmLock(startDir) {
|
|
|
97
56
|
dir = parent;
|
|
98
57
|
}
|
|
99
58
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Read the installed version of `name` from `fromDir`'s `node_modules`, or null.
|
|
102
|
-
*
|
|
103
|
-
* Reads `node_modules/<name>/package.json` DIRECTLY (following pnpm's symlink into
|
|
104
|
-
* the store) rather than `require.resolve(`${name}/package.json`)`: Node's exports
|
|
105
|
-
* gate throws `ERR_PACKAGE_PATH_NOT_EXPORTED` for the many `@mesh-tech/*` packages
|
|
106
|
-
* whose `exports` omit `./package.json` (e.g. `tsconfig`, `pulumi-utils`) — which
|
|
107
|
-
* would return null → a FALSE "stale" hard-stop on a correctly-installed repo that
|
|
108
|
-
* `pnpm install` can't clear. A plain read sidesteps the gate and stays scoped to
|
|
109
|
-
* THIS importer's node_modules instead of walking up to a hoisted copy owned by
|
|
110
|
-
* another importer (MESH-2266 review).
|
|
111
|
-
*/
|
|
112
59
|
function readInstalledVersion(fromDir, name) {
|
|
113
60
|
try {
|
|
114
61
|
const pkgPath = join(fromDir, 'node_modules', name, 'package.json');
|
|
@@ -119,12 +66,6 @@ function readInstalledVersion(fromDir, name) {
|
|
|
119
66
|
return null;
|
|
120
67
|
}
|
|
121
68
|
}
|
|
122
|
-
/**
|
|
123
|
-
* Check that the `@mesh-tech/*` deps installed in `appRoot`'s `node_modules` match
|
|
124
|
-
* what the pnpm lockfile says. Returns the list of mismatches (empty = fresh), or
|
|
125
|
-
* `null` when the check does not apply (no lockfile — not a pnpm repo, or the
|
|
126
|
-
* monorepo running without one). IO wrapper around the pure helpers above.
|
|
127
|
-
*/
|
|
128
69
|
export function checkDeployDepsFresh(appRoot) {
|
|
129
70
|
const lockPath = findPnpmLock(appRoot);
|
|
130
71
|
if (!lockPath)
|
|
@@ -134,8 +75,6 @@ export function checkDeployDepsFresh(appRoot) {
|
|
|
134
75
|
lockDoc = parseYaml(readFileSync(lockPath, 'utf8'));
|
|
135
76
|
}
|
|
136
77
|
catch {
|
|
137
|
-
// Don't block the deploy on our own parse failure — but a silently-disabled
|
|
138
|
-
// safety guard is worse than a noisy one, so surface that the check is off.
|
|
139
78
|
logWarn(`deploy preflight: could not parse ${lockPath} — skipping the stale-node_modules check.`);
|
|
140
79
|
return null;
|
|
141
80
|
}
|
|
@@ -149,7 +88,6 @@ export function checkDeployDepsFresh(appRoot) {
|
|
|
149
88
|
installed[name] = readInstalledVersion(appRoot, name);
|
|
150
89
|
return diffLockVsInstalled(expected, installed);
|
|
151
90
|
}
|
|
152
|
-
/** Human-readable stale-deps report (mirrors the stale-dist detector's style). */
|
|
153
91
|
export function formatStaleDepsError(mismatches) {
|
|
154
92
|
const lines = [
|
|
155
93
|
`✗ ${mismatches.length} @mesh-tech/* dep${mismatches.length === 1 ? '' : 's'} in node_modules ` +
|
|
@@ -159,16 +97,9 @@ export function formatStaleDepsError(mismatches) {
|
|
|
159
97
|
for (const m of mismatches) {
|
|
160
98
|
lines.push(` • ${m.name} — installed ${m.installed ?? '(missing)'}, lockfile wants ${m.expected}`);
|
|
161
99
|
}
|
|
162
|
-
lines.push('', ' A stale node_modules makes pulumi evaluate OLD component code and can plan to', ' DELETE resources the current code would keep
|
|
100
|
+
lines.push('', ' A stale node_modules makes pulumi evaluate OLD component code and can plan to', ' DELETE resources the current code would keep. Fix:', '', ' pnpm install', '', ` To bypass this check (rarely correct): ${SKIP_ENV}=1 mesh deploy …`);
|
|
163
101
|
return lines.join('\n');
|
|
164
102
|
}
|
|
165
|
-
/**
|
|
166
|
-
* Gate a `mesh deploy` invocation: if `op` evaluates the pulumi program and the
|
|
167
|
-
* deploy repo's `node_modules` is stale vs the lockfile, print the fix and exit
|
|
168
|
-
* non-zero BEFORE pulumi runs. No-op for non-evaluating ops, a fresh install, a
|
|
169
|
-
* non-pnpm repo, or when the skip env is set. Kept side-effecting (log + exit) so
|
|
170
|
-
* `deploy.ts` stays a thin wiring layer; the decision logic is pure above.
|
|
171
|
-
*/
|
|
172
103
|
export function assertDeployDepsFresh(appRoot, op) {
|
|
173
104
|
if (!PROGRAM_EVAL_OPS.has(op))
|
|
174
105
|
return;
|
|
@@ -180,4 +111,3 @@ export function assertDeployDepsFresh(appRoot, op) {
|
|
|
180
111
|
process.stderr.write(formatStaleDepsError(mismatches) + '\n');
|
|
181
112
|
process.exit(1);
|
|
182
113
|
}
|
|
183
|
-
//# sourceMappingURL=deploy-preflight.js.map
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared CLI error type with structured remediation.
|
|
3
|
-
*
|
|
4
|
-
* Every failure along the golden path should tell the user the exact `mesh`
|
|
5
|
-
* command (or doc) that fixes it. Remediation strings must be commands or
|
|
6
|
-
* docs — never "ask <person>".
|
|
7
|
-
*/
|
|
8
1
|
export interface Remediation {
|
|
9
|
-
/** Exact command that fixes the failure, e.g. "mesh login trabian-dev" */
|
|
10
2
|
command?: string;
|
|
11
|
-
/** Documentation URL or repo-relative doc path with more context */
|
|
12
3
|
docs?: string;
|
|
13
|
-
/** Whether the owning command can apply this fix itself via --fix */
|
|
14
4
|
autoFixable?: boolean;
|
|
15
5
|
}
|
|
16
6
|
export interface MeshCliErrorOptions {
|
|
17
7
|
remediation?: Remediation;
|
|
18
|
-
/** Process exit code (default 1) */
|
|
19
8
|
exitCode?: number;
|
|
20
9
|
cause?: unknown;
|
|
21
10
|
}
|
|
@@ -24,52 +13,10 @@ export declare class MeshCliError extends Error {
|
|
|
24
13
|
readonly exitCode: number;
|
|
25
14
|
constructor(message: string, options?: MeshCliErrorOptions);
|
|
26
15
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Render an error's BODY — the message plus its "→ run: <command>" /
|
|
29
|
-
* "→ see: <docs>" remediation lines, with no leading severity glyph.
|
|
30
|
-
*
|
|
31
|
-
* Use this when the caller supplies its own glyph: a recovery path that logs a
|
|
32
|
-
* refusal through `logWarn` (which prefixes ⚠) and carries on would otherwise
|
|
33
|
-
* print "⚠ ✗ …". The remediation lines are the part that must survive — they
|
|
34
|
-
* name the corrupt file to delete.
|
|
35
|
-
*/
|
|
36
16
|
export declare function renderErrorBody(err: unknown): string;
|
|
37
|
-
/**
|
|
38
|
-
* Render an error for humans. MeshCliError gets its remediation appended as
|
|
39
|
-
* "→ run: <command>" / "→ see: <docs>" lines; anything else renders its message.
|
|
40
|
-
*/
|
|
41
17
|
export declare function renderError(err: unknown): string;
|
|
42
|
-
/**
|
|
43
|
-
* Render an error as JSON for agents. Same structure as the human output:
|
|
44
|
-
* { error, remediation?: { command?, docs?, autoFixable? } }.
|
|
45
|
-
*/
|
|
46
18
|
export declare function renderErrorJson(err: unknown): string;
|
|
47
|
-
/**
|
|
48
|
-
* Print a command's `--json` payload — the single machine-readable document on
|
|
49
|
-
* stdout — and record that it happened.
|
|
50
|
-
*
|
|
51
|
-
* A command that emits a payload and *then* throws (the `mesh init` doctor
|
|
52
|
-
* throws by design whenever a check fails) used to produce TWO concatenated
|
|
53
|
-
* JSON documents on stdout, because `handleCliError` appended `{"error":…}`.
|
|
54
|
-
* Two documents is not JSON: `mesh init app-tenant --json | jq` failed to parse
|
|
55
|
-
* on exactly the failure path a script cares about. Routing every payload
|
|
56
|
-
* through here lets the handler know stdout is already spoken for.
|
|
57
|
-
*/
|
|
58
19
|
export declare function emitJsonPayload(payload: unknown): void;
|
|
59
|
-
/** True once a command has written its `--json` payload to stdout. */
|
|
60
20
|
export declare function hasEmittedJsonPayload(): boolean;
|
|
61
|
-
/** Test seam — the flag is module state, so specs have to be able to clear it. */
|
|
62
21
|
export declare function resetJsonPayloadEmitted(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Top-level handler for bin/mesh.ts. Prints the error (JSON when the
|
|
65
|
-
* invocation asked for --json anywhere, since per-command flags aren't
|
|
66
|
-
* parsed once dispatch has failed) and exits with the error's code.
|
|
67
|
-
*
|
|
68
|
-
* When the command already emitted a `--json` payload, that payload IS the
|
|
69
|
-
* machine surface — and it says strictly more than this error would (the
|
|
70
|
-
* doctor's payload carries `ok:false` plus a per-check `fix` command). So the
|
|
71
|
-
* error goes to stderr as human diagnostics and stdout keeps exactly one
|
|
72
|
-
* parseable document.
|
|
73
|
-
*/
|
|
74
22
|
export declare function handleCliError(err: unknown): never;
|
|
75
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/src/utils/errors.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared CLI error type with structured remediation.
|
|
3
|
-
*
|
|
4
|
-
* Every failure along the golden path should tell the user the exact `mesh`
|
|
5
|
-
* command (or doc) that fixes it. Remediation strings must be commands or
|
|
6
|
-
* docs — never "ask <person>".
|
|
7
|
-
*/
|
|
8
1
|
import chalk from "chalk";
|
|
9
2
|
export class MeshCliError extends Error {
|
|
10
3
|
remediation;
|
|
@@ -16,15 +9,6 @@ export class MeshCliError extends Error {
|
|
|
16
9
|
this.exitCode = options.exitCode ?? 1;
|
|
17
10
|
}
|
|
18
11
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Render an error's BODY — the message plus its "→ run: <command>" /
|
|
21
|
-
* "→ see: <docs>" remediation lines, with no leading severity glyph.
|
|
22
|
-
*
|
|
23
|
-
* Use this when the caller supplies its own glyph: a recovery path that logs a
|
|
24
|
-
* refusal through `logWarn` (which prefixes ⚠) and carries on would otherwise
|
|
25
|
-
* print "⚠ ✗ …". The remediation lines are the part that must survive — they
|
|
26
|
-
* name the corrupt file to delete.
|
|
27
|
-
*/
|
|
28
12
|
export function renderErrorBody(err) {
|
|
29
13
|
const message = err instanceof Error ? err.message : String(err);
|
|
30
14
|
if (!(err instanceof MeshCliError))
|
|
@@ -38,17 +22,9 @@ export function renderErrorBody(err) {
|
|
|
38
22
|
}
|
|
39
23
|
return lines.join("\n");
|
|
40
24
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Render an error for humans. MeshCliError gets its remediation appended as
|
|
43
|
-
* "→ run: <command>" / "→ see: <docs>" lines; anything else renders its message.
|
|
44
|
-
*/
|
|
45
25
|
export function renderError(err) {
|
|
46
26
|
return chalk.red("✗") + " " + renderErrorBody(err);
|
|
47
27
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Render an error as JSON for agents. Same structure as the human output:
|
|
50
|
-
* { error, remediation?: { command?, docs?, autoFixable? } }.
|
|
51
|
-
*/
|
|
52
28
|
export function renderErrorJson(err) {
|
|
53
29
|
if (err instanceof MeshCliError) {
|
|
54
30
|
return JSON.stringify({
|
|
@@ -59,40 +35,16 @@ export function renderErrorJson(err) {
|
|
|
59
35
|
return JSON.stringify({ error: err instanceof Error ? err.message : String(err) });
|
|
60
36
|
}
|
|
61
37
|
let jsonPayloadEmitted = false;
|
|
62
|
-
/**
|
|
63
|
-
* Print a command's `--json` payload — the single machine-readable document on
|
|
64
|
-
* stdout — and record that it happened.
|
|
65
|
-
*
|
|
66
|
-
* A command that emits a payload and *then* throws (the `mesh init` doctor
|
|
67
|
-
* throws by design whenever a check fails) used to produce TWO concatenated
|
|
68
|
-
* JSON documents on stdout, because `handleCliError` appended `{"error":…}`.
|
|
69
|
-
* Two documents is not JSON: `mesh init app-tenant --json | jq` failed to parse
|
|
70
|
-
* on exactly the failure path a script cares about. Routing every payload
|
|
71
|
-
* through here lets the handler know stdout is already spoken for.
|
|
72
|
-
*/
|
|
73
38
|
export function emitJsonPayload(payload) {
|
|
74
39
|
console.log(JSON.stringify(payload, null, 2));
|
|
75
40
|
jsonPayloadEmitted = true;
|
|
76
41
|
}
|
|
77
|
-
/** True once a command has written its `--json` payload to stdout. */
|
|
78
42
|
export function hasEmittedJsonPayload() {
|
|
79
43
|
return jsonPayloadEmitted;
|
|
80
44
|
}
|
|
81
|
-
/** Test seam — the flag is module state, so specs have to be able to clear it. */
|
|
82
45
|
export function resetJsonPayloadEmitted() {
|
|
83
46
|
jsonPayloadEmitted = false;
|
|
84
47
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Top-level handler for bin/mesh.ts. Prints the error (JSON when the
|
|
87
|
-
* invocation asked for --json anywhere, since per-command flags aren't
|
|
88
|
-
* parsed once dispatch has failed) and exits with the error's code.
|
|
89
|
-
*
|
|
90
|
-
* When the command already emitted a `--json` payload, that payload IS the
|
|
91
|
-
* machine surface — and it says strictly more than this error would (the
|
|
92
|
-
* doctor's payload carries `ok:false` plus a per-check `fix` command). So the
|
|
93
|
-
* error goes to stderr as human diagnostics and stdout keeps exactly one
|
|
94
|
-
* parseable document.
|
|
95
|
-
*/
|
|
96
48
|
export function handleCliError(err) {
|
|
97
49
|
const wantsJson = process.argv.includes("--json");
|
|
98
50
|
if (wantsJson && !hasEmittedJsonPayload()) {
|
|
@@ -103,4 +55,3 @@ export function handleCliError(err) {
|
|
|
103
55
|
}
|
|
104
56
|
process.exit(err instanceof MeshCliError ? err.exitCode : 1);
|
|
105
57
|
}
|
|
106
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pinned short-name → FQDN map for FIRST-PARTY Mesh platforms.
|
|
3
|
-
*
|
|
4
|
-
* ## Why this file exists
|
|
5
|
-
*
|
|
6
|
-
* `mesh login mesh.dev` on a clean laptop used to be unresolvable. Discovery
|
|
7
|
-
* has two paths: SSM (needs AWS credentials — the thing we are removing) and
|
|
8
|
-
* the anonymous `https://cli.<domain>/.well-known/mesh.json` endpoint. The
|
|
9
|
-
* HTTPS path is deliberately gated to contexts with ≥2 dots, because hitting
|
|
10
|
-
* `https://cli.<short-name>/…` for an arbitrary short context would let whoever
|
|
11
|
-
* registers that domain seed our cached issuer/clientId — login phishing.
|
|
12
|
-
*
|
|
13
|
-
* So the short context every internal doc tells a new developer to use was
|
|
14
|
-
* exactly the one that could not resolve without AWS.
|
|
15
|
-
*
|
|
16
|
-
* ## Why a compiled-in map is the safe fix
|
|
17
|
-
*
|
|
18
|
-
* The alias is resolved from THIS table, which ships inside the CLI and is
|
|
19
|
-
* changed only by a reviewed commit. It is not read from the network, from
|
|
20
|
-
* `~/.config/mesh`, or from an environment variable, so it cannot be seeded by
|
|
21
|
-
* an attacker — which is the property the ≥2-dot guard protects and the reason
|
|
22
|
-
* that guard must NOT be loosened instead.
|
|
23
|
-
*
|
|
24
|
-
* ## Adding an entry
|
|
25
|
-
*
|
|
26
|
-
* Only add a domain Trabian controls and has verified serves
|
|
27
|
-
* `/.well-known/mesh.json`. The map is the trust anchor; a typo here is a
|
|
28
|
-
* phishing vector, so treat additions as a security review, not a config edit.
|
|
29
|
-
*/
|
|
30
1
|
export declare const FIRST_PARTY_CONTEXTS: Readonly<Record<string, string>>;
|
|
31
|
-
/**
|
|
32
|
-
* The FQDN to run anonymous HTTPS discovery against for a short first-party
|
|
33
|
-
* context, or null when the context is not a pinned alias.
|
|
34
|
-
*
|
|
35
|
-
* `Object.hasOwn` rather than a bare lookup: a plain-object index answers
|
|
36
|
-
* `constructor` / `toString` from the prototype chain, and this function's
|
|
37
|
-
* answer decides which host we trust with our issuer + client id.
|
|
38
|
-
*/
|
|
39
2
|
export declare function firstPartyDomainFor(context: string): string | null;
|
|
40
|
-
//# sourceMappingURL=first-party-contexts.d.ts.map
|
|
@@ -1,53 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pinned short-name → FQDN map for FIRST-PARTY Mesh platforms.
|
|
3
|
-
*
|
|
4
|
-
* ## Why this file exists
|
|
5
|
-
*
|
|
6
|
-
* `mesh login mesh.dev` on a clean laptop used to be unresolvable. Discovery
|
|
7
|
-
* has two paths: SSM (needs AWS credentials — the thing we are removing) and
|
|
8
|
-
* the anonymous `https://cli.<domain>/.well-known/mesh.json` endpoint. The
|
|
9
|
-
* HTTPS path is deliberately gated to contexts with ≥2 dots, because hitting
|
|
10
|
-
* `https://cli.<short-name>/…` for an arbitrary short context would let whoever
|
|
11
|
-
* registers that domain seed our cached issuer/clientId — login phishing.
|
|
12
|
-
*
|
|
13
|
-
* So the short context every internal doc tells a new developer to use was
|
|
14
|
-
* exactly the one that could not resolve without AWS.
|
|
15
|
-
*
|
|
16
|
-
* ## Why a compiled-in map is the safe fix
|
|
17
|
-
*
|
|
18
|
-
* The alias is resolved from THIS table, which ships inside the CLI and is
|
|
19
|
-
* changed only by a reviewed commit. It is not read from the network, from
|
|
20
|
-
* `~/.config/mesh`, or from an environment variable, so it cannot be seeded by
|
|
21
|
-
* an attacker — which is the property the ≥2-dot guard protects and the reason
|
|
22
|
-
* that guard must NOT be loosened instead.
|
|
23
|
-
*
|
|
24
|
-
* ## Adding an entry
|
|
25
|
-
*
|
|
26
|
-
* Only add a domain Trabian controls and has verified serves
|
|
27
|
-
* `/.well-known/mesh.json`. The map is the trust anchor; a typo here is a
|
|
28
|
-
* phishing vector, so treat additions as a security review, not a config edit.
|
|
29
|
-
*/
|
|
30
1
|
export const FIRST_PARTY_CONTEXTS = Object.freeze({
|
|
31
|
-
// Verified 2026-08-14: https://cli.dev.platform.meshtech.io/.well-known/mesh.json
|
|
32
|
-
// answers with the platform's issuer + CLI client id + registryBroker,
|
|
33
|
-
// anonymously. (Repointed from dev.trabian.meshtech.io — the trabian tenant
|
|
34
|
-
// platform lives in a different AWS account with no registry; the
|
|
35
|
-
// platform-dev stack in the registry-owning account is the developer front
|
|
36
|
-
// door. mesh-sandbox#32 / #3587.)
|
|
37
2
|
"mesh.dev": "dev.platform.meshtech.io",
|
|
38
3
|
});
|
|
39
|
-
/**
|
|
40
|
-
* The FQDN to run anonymous HTTPS discovery against for a short first-party
|
|
41
|
-
* context, or null when the context is not a pinned alias.
|
|
42
|
-
*
|
|
43
|
-
* `Object.hasOwn` rather than a bare lookup: a plain-object index answers
|
|
44
|
-
* `constructor` / `toString` from the prototype chain, and this function's
|
|
45
|
-
* answer decides which host we trust with our issuer + client id.
|
|
46
|
-
*/
|
|
47
4
|
export function firstPartyDomainFor(context) {
|
|
48
5
|
if (!Object.hasOwn(FIRST_PARTY_CONTEXTS, context))
|
|
49
6
|
return null;
|
|
50
7
|
const domain = FIRST_PARTY_CONTEXTS[context];
|
|
51
8
|
return typeof domain === "string" && domain ? domain : null;
|
|
52
9
|
}
|
|
53
|
-
//# sourceMappingURL=first-party-contexts.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility exports
|
|
3
|
-
*/
|
|
4
1
|
export * from "./errors.js";
|
|
5
2
|
export * from "./log.js";
|
|
6
3
|
export * from "./context.js";
|
|
@@ -8,4 +5,3 @@ export * from "./bastion.js";
|
|
|
8
5
|
export * from "./credentials.js";
|
|
9
6
|
export * from "./pulumi.js";
|
|
10
7
|
export * from "./vpn.js";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility exports
|
|
3
|
-
*/
|
|
4
1
|
export * from "./errors.js";
|
|
5
2
|
export * from "./log.js";
|
|
6
3
|
export * from "./context.js";
|
|
@@ -8,4 +5,3 @@ export * from "./bastion.js";
|
|
|
8
5
|
export * from "./credentials.js";
|
|
9
6
|
export * from "./pulumi.js";
|
|
10
7
|
export * from "./vpn.js";
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -3,60 +3,20 @@ interface EksClusterData {
|
|
|
3
3
|
clusterCaData: string;
|
|
4
4
|
clusterName: string;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Build a kubeconfig YAML that authenticates to `cluster` via `aws eks get-token`.
|
|
8
|
-
* Pure — no I/O. The `region` is for the get-token exec args (the active AWS
|
|
9
|
-
* identity is whatever the process runs as: deployer / SSO / CI).
|
|
10
|
-
*/
|
|
11
6
|
export declare function buildKubeconfig(cluster: EksClusterData, region: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Deterministic path of the session-scoped kubeconfig written by
|
|
14
|
-
* {@link ensureKubeconfig}. Exposed so callers can point `KUBECONFIG` at the
|
|
15
|
-
* last-good file when a fresh SSM re-resolve isn't available (e.g. on
|
|
16
|
-
* `mesh dev restart --refresh-env`), rather than letting kubectl fall back to
|
|
17
|
-
* `~/.kube/config`.
|
|
18
|
-
*/
|
|
19
7
|
export declare function sessionKubeconfigPath(sessionName: string): string;
|
|
20
|
-
/** Why {@link ensureKubeconfig} couldn't resolve the cluster. */
|
|
21
8
|
export interface EnsureKubeconfigFailure {
|
|
22
|
-
/** The SSM parameter name that was read (or attempted). */
|
|
23
9
|
parameter: string;
|
|
24
|
-
/** The exception thrown, or a synthetic Error for empty/malformed data. */
|
|
25
10
|
error: unknown;
|
|
26
11
|
}
|
|
27
12
|
export interface EnsureKubeconfigDeps {
|
|
28
|
-
/** SSM GetParameter (decrypted value or undefined) — injectable for tests. */
|
|
29
13
|
getParameter?: (name: string) => Promise<string | undefined>;
|
|
30
|
-
/**
|
|
31
|
-
* Invoked when cluster resolution fails, with the parameter tried and the
|
|
32
|
-
* underlying error — so callers can say WHAT failed instead of guessing
|
|
33
|
-
* "check your SSM read access" at the user (MESH-2515).
|
|
34
|
-
*/
|
|
35
14
|
onError?: (failure: EnsureKubeconfigFailure) => void;
|
|
36
15
|
}
|
|
37
|
-
/**
|
|
38
|
-
* The HUB platform name for platform-level resource lookups (EKS export,
|
|
39
|
-
* bastion). `platform.name` in the dev output is the hub (e.g. "trabian");
|
|
40
|
-
* when absent — outputs predating the field — fall back to the default hub
|
|
41
|
-
* "mesh", NEVER to the app tenant. This one definition pins the axis that
|
|
42
|
-
* regressed in the original MESH-2515 bug.
|
|
43
|
-
*/
|
|
44
16
|
export declare function resolveHubPlatformName(platform: {
|
|
45
17
|
name?: string;
|
|
46
18
|
tenant?: string;
|
|
47
19
|
env?: string;
|
|
48
20
|
} | undefined): string;
|
|
49
|
-
/**
|
|
50
|
-
* Resolve the hub EKS cluster from SSM and write a session-scoped kubeconfig.
|
|
51
|
-
*
|
|
52
|
-
* Reads `/mesh-platform/{platformName}/{env}/core/eks` — platform-level cluster
|
|
53
|
-
* data lives under the app's HUB platform (`platform.name` in the dev output,
|
|
54
|
-
* e.g. "trabian"; "mesh" is only the default hub, MESH-2515). Writes to
|
|
55
|
-
* `${tmpdir}/mesh-dev-sessions/{sessionName}.kubeconfig` (never touches
|
|
56
|
-
* ~/.kube/config). Returns the path, or `null` if the cluster data can't be
|
|
57
|
-
* resolved (best-effort — the caller continues without it; the failure detail
|
|
58
|
-
* goes to `deps.onError`).
|
|
59
|
-
*/
|
|
60
21
|
export declare function ensureKubeconfig(platformName: string, env: string, sessionName: string, deps?: EnsureKubeconfigDeps): Promise<string | null>;
|
|
61
22
|
export {};
|
|
62
|
-
//# sourceMappingURL=kubeconfig.d.ts.map
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turnkey kubeconfig for `mesh dev`.
|
|
3
|
-
*
|
|
4
|
-
* `mesh dev` shells out to `kubectl` (Temporal encoding-key read, temporal-pod
|
|
5
|
-
* env fallback). Rather than depend on the operator's ambient ~/.kube/config
|
|
6
|
-
* (which may be unset/stale, and which the apps-deployer role can't populate via
|
|
7
|
-
* `aws eks update-kubeconfig` — it lacks `eks:DescribeCluster`), we build a
|
|
8
|
-
* kubeconfig from the platform EKS cluster data in SSM and authenticate via
|
|
9
|
-
* `aws eks get-token` (STS-only — needs just the cluster name).
|
|
10
|
-
*
|
|
11
|
-
* Mirrors the kubeconfig the Pulumi k8s provider builds in
|
|
12
|
-
* `@mesh-tech/infra-components` AppEnvironment.buildExecKubeconfig.
|
|
13
|
-
*/
|
|
14
1
|
import * as fs from 'fs';
|
|
15
2
|
import * as os from 'os';
|
|
16
3
|
import * as path from 'path';
|
|
17
|
-
/**
|
|
18
|
-
* Build a kubeconfig YAML that authenticates to `cluster` via `aws eks get-token`.
|
|
19
|
-
* Pure — no I/O. The `region` is for the get-token exec args (the active AWS
|
|
20
|
-
* identity is whatever the process runs as: deployer / SSO / CI).
|
|
21
|
-
*/
|
|
22
4
|
export function buildKubeconfig(cluster, region) {
|
|
23
5
|
return `apiVersion: v1
|
|
24
6
|
kind: Config
|
|
@@ -48,23 +30,9 @@ users:
|
|
|
48
30
|
- ${region}
|
|
49
31
|
`;
|
|
50
32
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Deterministic path of the session-scoped kubeconfig written by
|
|
53
|
-
* {@link ensureKubeconfig}. Exposed so callers can point `KUBECONFIG` at the
|
|
54
|
-
* last-good file when a fresh SSM re-resolve isn't available (e.g. on
|
|
55
|
-
* `mesh dev restart --refresh-env`), rather than letting kubectl fall back to
|
|
56
|
-
* `~/.kube/config`.
|
|
57
|
-
*/
|
|
58
33
|
export function sessionKubeconfigPath(sessionName) {
|
|
59
34
|
return path.join(os.tmpdir(), 'mesh-dev-sessions', `${sessionName}.kubeconfig`);
|
|
60
35
|
}
|
|
61
|
-
/**
|
|
62
|
-
* The HUB platform name for platform-level resource lookups (EKS export,
|
|
63
|
-
* bastion). `platform.name` in the dev output is the hub (e.g. "trabian");
|
|
64
|
-
* when absent — outputs predating the field — fall back to the default hub
|
|
65
|
-
* "mesh", NEVER to the app tenant. This one definition pins the axis that
|
|
66
|
-
* regressed in the original MESH-2515 bug.
|
|
67
|
-
*/
|
|
68
36
|
export function resolveHubPlatformName(platform) {
|
|
69
37
|
return platform?.name ?? 'mesh';
|
|
70
38
|
}
|
|
@@ -74,17 +42,6 @@ async function ssmGetParameter(name) {
|
|
|
74
42
|
const resp = await ssm.send(new GetParameterCommand({ Name: name, WithDecryption: true }));
|
|
75
43
|
return resp.Parameter?.Value;
|
|
76
44
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Resolve the hub EKS cluster from SSM and write a session-scoped kubeconfig.
|
|
79
|
-
*
|
|
80
|
-
* Reads `/mesh-platform/{platformName}/{env}/core/eks` — platform-level cluster
|
|
81
|
-
* data lives under the app's HUB platform (`platform.name` in the dev output,
|
|
82
|
-
* e.g. "trabian"; "mesh" is only the default hub, MESH-2515). Writes to
|
|
83
|
-
* `${tmpdir}/mesh-dev-sessions/{sessionName}.kubeconfig` (never touches
|
|
84
|
-
* ~/.kube/config). Returns the path, or `null` if the cluster data can't be
|
|
85
|
-
* resolved (best-effort — the caller continues without it; the failure detail
|
|
86
|
-
* goes to `deps.onError`).
|
|
87
|
-
*/
|
|
88
45
|
export async function ensureKubeconfig(platformName, env, sessionName, deps = {}) {
|
|
89
46
|
const parameter = `/mesh-platform/${platformName}/${env}/core/eks`;
|
|
90
47
|
const getParameter = deps.getParameter ?? ssmGetParameter;
|
|
@@ -115,4 +72,3 @@ export async function ensureKubeconfig(platformName, env, sessionName, deps = {}
|
|
|
115
72
|
fs.writeFileSync(kubeconfigPath, buildKubeconfig(cluster, region), { mode: 0o600 });
|
|
116
73
|
return kubeconfigPath;
|
|
117
74
|
}
|
|
118
|
-
//# sourceMappingURL=kubeconfig.js.map
|
package/dist/src/utils/log.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logging utilities with colored output.
|
|
3
|
-
*
|
|
4
|
-
* Non-TTY streams (CI, agent runs, piped output) get an [HH:MM:SS] prefix on
|
|
5
|
-
* every line so long quiet stretches are attributable after the fact
|
|
6
|
-
* (MESH-2479); interactive terminals stay clean. Override with
|
|
7
|
-
* MESH_LOG_TIMESTAMPS=1 (force on) / =0 (force off).
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Pure prefix decision, exported for tests: timestamps when the env flag says
|
|
11
|
-
* so, else whenever stderr is not a TTY.
|
|
12
|
-
*/
|
|
13
1
|
export declare function logPrefix(opts: {
|
|
14
2
|
isTTY: boolean;
|
|
15
3
|
envFlag: string | undefined;
|
|
@@ -19,16 +7,8 @@ export declare function logInfo(message: string): void;
|
|
|
19
7
|
export declare function logSuccess(message: string): void;
|
|
20
8
|
export declare function logWarn(message: string): void;
|
|
21
9
|
export declare function logError(message: string): void;
|
|
22
|
-
/** Render elapsed milliseconds compactly: "45s", "2m 30s", "1h 5m". */
|
|
23
10
|
export declare function formatElapsed(ms: number): string;
|
|
24
|
-
/**
|
|
25
|
-
* Periodic "still working" line during a long silent operation (registry
|
|
26
|
-
* fetches, image builds) so a non-TTY first run never sits at 0 bytes of
|
|
27
|
-
* output for minutes (MESH-2479). `touch()` marks recent real output, which
|
|
28
|
-
* suppresses the next beat — the heartbeat only fills silence.
|
|
29
|
-
*/
|
|
30
11
|
export declare function startHeartbeat(label: string, intervalMs?: number): {
|
|
31
12
|
stop: () => void;
|
|
32
13
|
touch: () => void;
|
|
33
14
|
};
|
|
34
|
-
//# sourceMappingURL=log.d.ts.map
|
package/dist/src/utils/log.js
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logging utilities with colored output.
|
|
3
|
-
*
|
|
4
|
-
* Non-TTY streams (CI, agent runs, piped output) get an [HH:MM:SS] prefix on
|
|
5
|
-
* every line so long quiet stretches are attributable after the fact
|
|
6
|
-
* (MESH-2479); interactive terminals stay clean. Override with
|
|
7
|
-
* MESH_LOG_TIMESTAMPS=1 (force on) / =0 (force off).
|
|
8
|
-
*/
|
|
9
1
|
import chalk from "chalk";
|
|
10
|
-
/**
|
|
11
|
-
* Pure prefix decision, exported for tests: timestamps when the env flag says
|
|
12
|
-
* so, else whenever stderr is not a TTY.
|
|
13
|
-
*/
|
|
14
2
|
export function logPrefix(opts) {
|
|
15
3
|
const enabled = opts.envFlag === "1" || (opts.envFlag !== "0" && !opts.isTTY);
|
|
16
4
|
return enabled ? `[${opts.now.toISOString().slice(11, 19)}] ` : "";
|
|
@@ -34,7 +22,6 @@ export function logWarn(message) {
|
|
|
34
22
|
export function logError(message) {
|
|
35
23
|
console.error(prefix() + chalk.red("✗"), message);
|
|
36
24
|
}
|
|
37
|
-
/** Render elapsed milliseconds compactly: "45s", "2m 30s", "1h 5m". */
|
|
38
25
|
export function formatElapsed(ms) {
|
|
39
26
|
const totalSec = Math.max(0, Math.round(ms / 1000));
|
|
40
27
|
const h = Math.floor(totalSec / 3600);
|
|
@@ -46,12 +33,6 @@ export function formatElapsed(ms) {
|
|
|
46
33
|
return `${m}m ${s}s`;
|
|
47
34
|
return `${s}s`;
|
|
48
35
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Periodic "still working" line during a long silent operation (registry
|
|
51
|
-
* fetches, image builds) so a non-TTY first run never sits at 0 bytes of
|
|
52
|
-
* output for minutes (MESH-2479). `touch()` marks recent real output, which
|
|
53
|
-
* suppresses the next beat — the heartbeat only fills silence.
|
|
54
|
-
*/
|
|
55
36
|
export function startHeartbeat(label, intervalMs = 15_000) {
|
|
56
37
|
const startedAt = Date.now();
|
|
57
38
|
let lastOutputAt = startedAt;
|
|
@@ -68,4 +49,3 @@ export function startHeartbeat(label, intervalMs = 15_000) {
|
|
|
68
49
|
},
|
|
69
50
|
};
|
|
70
51
|
}
|
|
71
|
-
//# sourceMappingURL=log.js.map
|