@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,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh start / stop / status — the full-local Mesh platform.
|
|
3
|
-
*
|
|
4
|
-
* mesh start [--no-seed] Bring up the local platform (docker compose) and
|
|
5
|
-
* seed tenant `local` / env `dev` on first boot.
|
|
6
|
-
* mesh stop [--destroy] Stop the stack; --destroy also removes volumes
|
|
7
|
-
* (resets databases and seeds).
|
|
8
|
-
* mesh status [--json] Per-service health, endpoints, and ports.
|
|
9
|
-
*
|
|
10
|
-
* Everything here works with zero AWS credentials, zero VPN, and zero Pulumi
|
|
11
|
-
* state — Docker is the only prerequisite.
|
|
12
|
-
*/
|
|
13
1
|
import * as fs from "fs";
|
|
14
2
|
import * as path from "path";
|
|
15
3
|
import chalk from "chalk";
|
|
@@ -24,7 +12,6 @@ import { LOGIN_CONTEXT, readHubAuth, seedZitadel, TEST_USERS } from "./seed-zita
|
|
|
24
12
|
import { publishHubAuthzCatalog } from "./seed-hub-catalog.js";
|
|
25
13
|
const WAIT_TIMEOUT_MS = 180_000;
|
|
26
14
|
const WAIT_POLL_MS = 3_000;
|
|
27
|
-
/** The one crash message, so both wait loops stay on the same remediation. */
|
|
28
15
|
function crashError(crashed) {
|
|
29
16
|
return new MeshCliError(`Service(s) exited during startup: ${crashed.map((s) => s.name).join(", ")}`, {
|
|
30
17
|
remediation: {
|
|
@@ -51,13 +38,6 @@ export async function waitForStack(io = {
|
|
|
51
38
|
}
|
|
52
39
|
}
|
|
53
40
|
pending = stillDown;
|
|
54
|
-
// Surface hard failures on EVERY round, including the one that would end
|
|
55
|
-
// the wait: not every container has a STACK_ENDPOINTS entry, so with all
|
|
56
|
-
// probes answering first try an endpoint-less service (blackbox-exporter,
|
|
57
|
-
// temporal-admin-tools) could exit during startup unseen.
|
|
58
|
-
// The Hub overlay has not been brought up yet (that happens after the
|
|
59
|
-
// seed, below), so its containers are excluded — an `exited` hub-api
|
|
60
|
-
// here is a leftover from a previous run, not this run's crash.
|
|
61
41
|
const crashed = crashedServices(io.services(), {
|
|
62
42
|
overlayServices: io.overlayServices(),
|
|
63
43
|
overlayStarted: false,
|
|
@@ -76,8 +56,6 @@ export async function waitForStack(io = {
|
|
|
76
56
|
function printEndpoints(hubRunning) {
|
|
77
57
|
console.log("");
|
|
78
58
|
if (hubRunning) {
|
|
79
|
-
// The Hub is the front door — the same operations dashboard customers
|
|
80
|
-
// use against the hosted platform. Everything else is plumbing.
|
|
81
59
|
console.log(chalk.bold.cyan("★ Mesh Hub — your operations dashboard (start here)"));
|
|
82
60
|
console.log(` ${"Hub UI".padEnd(34)} ${chalk.bold.cyan(`http://localhost:${hubPort()}`)}`);
|
|
83
61
|
console.log(` ${"".padEnd(34)} ${chalk.dim("sign in: admin@local.mesh or dev@local.mesh / LocalDev1!")}`);
|
|
@@ -110,15 +88,6 @@ function printEndpoints(hubRunning) {
|
|
|
110
88
|
console.log("");
|
|
111
89
|
logInfo("Next: `mesh dev` in an apps repo wires services to this stack automatically.");
|
|
112
90
|
}
|
|
113
|
-
/**
|
|
114
|
-
* The mesh-platform checkout `--hub-from-source` builds from.
|
|
115
|
-
*
|
|
116
|
-
* The cwd wins when it sits inside a checkout, so running `mesh start` from an
|
|
117
|
-
* app directory of the monorepo still builds that monorepo's Hub. Otherwise the
|
|
118
|
-
* CLI's own location decides, which resolves correctly for `pnpm exec mesh` in a
|
|
119
|
-
* worktree and lands somewhere without `apps/hub` for a global install — where
|
|
120
|
-
* the builder refuses with a message naming the requirement.
|
|
121
|
-
*/
|
|
122
91
|
function repoRootForHubSource() {
|
|
123
92
|
for (let dir = process.cwd();;) {
|
|
124
93
|
if (fs.existsSync(path.join(dir, "apps", "hub", "package.json")))
|
|
@@ -141,12 +110,6 @@ export function registerLocalCommands(program) {
|
|
|
141
110
|
.option("--takeover", "re-own a stack that another checkout started (may recreate shared containers with THIS checkout's config)", false)
|
|
142
111
|
.action(async (opts) => {
|
|
143
112
|
ensureDockerAvailable();
|
|
144
|
-
// The stack is machine-wide; a `start` from a checkout whose compose
|
|
145
|
-
// config differs recreates shared containers out from under whatever
|
|
146
|
-
// is running against them (another project's `mesh dev` session, a
|
|
147
|
-
// Hub under development, …). Tenant/app work never needs `start`
|
|
148
|
-
// against an already-running stack — `mesh dev --local` deploys
|
|
149
|
-
// tenant-scoped only.
|
|
150
113
|
const foreign = stackOwnedElsewhere();
|
|
151
114
|
if (foreign && !opts.takeover) {
|
|
152
115
|
throw new MeshCliError(`The local platform is already running, started from a different checkout:\n ${foreign}\n` +
|
|
@@ -160,23 +123,12 @@ export function registerLocalCommands(program) {
|
|
|
160
123
|
if (foreign && opts.takeover) {
|
|
161
124
|
logWarn(`Taking over the running stack (previously driven from ${foreign}).`);
|
|
162
125
|
}
|
|
163
|
-
// The Hub is the platform's front door, so it's part of the default
|
|
164
|
-
// stack: use already-built images when present; build from the
|
|
165
|
-
// published tarball when registry auth allows; otherwise start
|
|
166
|
-
// without it and say exactly how to enable it. --with-hub forces a
|
|
167
|
-
// registry resolve (picks up newly published hub versions).
|
|
168
126
|
let hubVersion;
|
|
169
127
|
if (opts.hub) {
|
|
170
128
|
if (opts.hubFromSource) {
|
|
171
|
-
// Deliberately ahead of the registry arms: from-source never consults
|
|
172
|
-
// CodeArtifact for the Hub itself, so a stale token is irrelevant here.
|
|
173
129
|
hubVersion = await buildHubImagesFromSource(repoRootForHubSource());
|
|
174
130
|
}
|
|
175
131
|
else if (opts.withHub) {
|
|
176
|
-
// Auth preflight (MESH-2479): the tarball fetch + image build run
|
|
177
|
-
// for minutes — verify the CodeArtifact token BEFORE that work.
|
|
178
|
-
// Only a refresh needs the registry: with already-built images a
|
|
179
|
-
// bad token degrades to them instead of failing an offline path.
|
|
180
132
|
const probe = await probeRegistryToken();
|
|
181
133
|
const plan = planWithHubRefresh(probe.state, localHubVersion());
|
|
182
134
|
if (plan.action === "fail") {
|
|
@@ -195,8 +147,6 @@ export function registerLocalCommands(program) {
|
|
|
195
147
|
if (!hubVersion && hasRegistryAuth()) {
|
|
196
148
|
const probe = await probeRegistryToken();
|
|
197
149
|
if (probe.state === "expired") {
|
|
198
|
-
// Keep `mesh start`'s Docker-only promise: degrade to a
|
|
199
|
-
// hub-less stack, but say exactly how to get the Hub back.
|
|
200
150
|
logWarn(`CodeArtifact token is expired — starting without the Hub. Fix: ${REGISTRY_LOGIN_FIX}, then: mesh start --with-hub`);
|
|
201
151
|
}
|
|
202
152
|
else {
|
|
@@ -211,16 +161,7 @@ export function registerLocalCommands(program) {
|
|
|
211
161
|
}
|
|
212
162
|
}
|
|
213
163
|
logInfo("Starting the local Mesh platform (docker compose project: mesh-local)…");
|
|
214
|
-
// Base stack first; the Hub joins AFTER seeding so its oauth2-proxy
|
|
215
|
-
// gets the seeded client credentials and hub-api never caches a
|
|
216
|
-
// pre-seed (empty) registry view.
|
|
217
164
|
await composeStreamed(["up", "-d"]);
|
|
218
|
-
// Deterministic cache bust for the bind-mounted observability configs:
|
|
219
|
-
// `up -d` only recreates a container whose compose spec changed, and
|
|
220
|
-
// Prometheus re-reads prometheus.yml on restart/SIGHUP only. A CLI
|
|
221
|
-
// upgrade that edits observability/*.yml would otherwise leave a
|
|
222
|
-
// running stack on the OLD scrape config (and blackbox on old modules)
|
|
223
|
-
// — silently, since a misrouted probe just reports probe_success 0.
|
|
224
165
|
compose(["restart", "prometheus", "blackbox-exporter"], { inherit: true });
|
|
225
166
|
await waitForStack();
|
|
226
167
|
let hubAuth = readHubAuth();
|
|
@@ -230,9 +171,6 @@ export function registerLocalCommands(program) {
|
|
|
230
171
|
logInfo("Seeding Zitadel (Platform project, Mesh CLI app, Hub auth, test users)…");
|
|
231
172
|
const zitadel = await seedZitadel(LOCAL_AWS_CONFIG);
|
|
232
173
|
hubAuth = zitadel.hubAuth;
|
|
233
|
-
// The Hub's role catalog: what Users → Roles / Permissions render and what
|
|
234
|
-
// the create-user form offers. The hosted platform publishes it from
|
|
235
|
-
// MeshHub; locally it comes from the catalog the Hub images were built with.
|
|
236
174
|
if (hubVersion) {
|
|
237
175
|
const compiled = readHubCompiledAuthz(hubVersion);
|
|
238
176
|
if (compiled) {
|
|
@@ -243,9 +181,6 @@ export function registerLocalCommands(program) {
|
|
|
243
181
|
logWarn(`Hub v${hubVersion} ships no compiled role catalog (api/dist/authz/compiled.json) — Users → Roles will be empty. Hub ≥ 2.1.0 publishes one.`);
|
|
244
182
|
}
|
|
245
183
|
}
|
|
246
|
-
// Zitadel is the auth source of truth — mirror every provisioned
|
|
247
|
-
// app tenant/app into the registry so the Hub shows them even if
|
|
248
|
-
// the app hasn't been run since it was provisioned.
|
|
249
184
|
try {
|
|
250
185
|
const reconciled = await reconcileRegistryFromZitadel();
|
|
251
186
|
if (reconciled.tenants.length > 0) {
|
|
@@ -265,10 +200,6 @@ export function registerLocalCommands(program) {
|
|
|
265
200
|
if (!hubAuth) {
|
|
266
201
|
logWarn("Hub auth is not seeded yet (started with --no-seed?) — Hub sign-in needs one seeded run: mesh start");
|
|
267
202
|
}
|
|
268
|
-
// The redirect URI for a non-default port is registered during
|
|
269
|
-
// seeding (reconcileHubRedirectUris) — skipping the seed with a new
|
|
270
|
-
// port reproduces the "redirect_uri is missing in the client
|
|
271
|
-
// configuration" login failure.
|
|
272
203
|
if (!opts.seed && hubPort() !== DEFAULT_HUB_PORT) {
|
|
273
204
|
logWarn(`--no-seed with MESH_HUB_PORT=${hubPort()}: this port's redirect URI is registered during seeding — if Hub sign-in fails with "redirect_uri is missing in the client configuration", re-run without --no-seed.`);
|
|
274
205
|
}
|
|
@@ -281,14 +212,8 @@ export function registerLocalCommands(program) {
|
|
|
281
212
|
}
|
|
282
213
|
await composeStreamed(["up", "-d"], { hub: true, env: hubEnv });
|
|
283
214
|
if (opts.seed) {
|
|
284
|
-
// Deterministic cache bust: hub-api holds its tenants view for 5
|
|
285
|
-
// minutes and this run's seed/reconcile may have changed it.
|
|
286
215
|
compose(["restart", "hub-api"], { hub: true, env: hubEnv });
|
|
287
216
|
}
|
|
288
|
-
// From here the overlay HAS been started, so an exited hub service is
|
|
289
|
-
// a real crash again — same message, same remediation as the base
|
|
290
|
-
// stack's. (Without this the loop would spin out its 60 attempts and
|
|
291
|
-
// then claim the endpoint was up.)
|
|
292
217
|
const overlayServices = hubOverlayServices();
|
|
293
218
|
for (const endpoint of hubEndpoints()) {
|
|
294
219
|
logInfo(`Waiting for ${endpoint.label}…`);
|
|
@@ -349,17 +274,9 @@ export function registerLocalCommands(program) {
|
|
|
349
274
|
remediation: { command: "mesh start" },
|
|
350
275
|
});
|
|
351
276
|
}
|
|
352
|
-
// `status` never started anything, so "is the Hub overlay part of this
|
|
353
|
-
// run?" can only be read off the containers: at least one overlay
|
|
354
|
-
// service actually running. Everything Hub-related keys off that — an
|
|
355
|
-
// overlay container left `exited` by a previous run (a Docker restart,
|
|
356
|
-
// a laptop sleep) is "not started", not "crashed".
|
|
357
277
|
const overlayServices = hubOverlayServices();
|
|
358
278
|
const overlayStarted = hubOverlayRunning(services, overlayServices);
|
|
359
279
|
const notStarted = (s) => !overlayStarted && overlayServices.has(s.name) && s.state === "exited";
|
|
360
|
-
// A *running* hub-api, not merely a hub-api container: a leftover
|
|
361
|
-
// exited one from a previous run would otherwise make status probe Hub
|
|
362
|
-
// endpoints that were never meant to be up and report them down.
|
|
363
280
|
const hasHub = hubApiRunning(services);
|
|
364
281
|
const endpoints = hasHub ? [...STACK_ENDPOINTS, ...hubEndpoints()] : STACK_ENDPOINTS;
|
|
365
282
|
const probes = await Promise.all(endpoints.map(async (endpoint) => ({
|
|
@@ -368,8 +285,6 @@ export function registerLocalCommands(program) {
|
|
|
368
285
|
url: endpoint.url,
|
|
369
286
|
up: await probeEndpoint(endpoint),
|
|
370
287
|
})));
|
|
371
|
-
// The P0 gate: with the fabric up, the 8 KB Advanced-tier round-trip
|
|
372
|
-
// must pass on every status check, not just at seed time.
|
|
373
288
|
let fabric = null;
|
|
374
289
|
if (probes.find((p) => p.service === "ministack")?.up) {
|
|
375
290
|
try {
|
|
@@ -425,4 +340,3 @@ export function registerLocalCommands(program) {
|
|
|
425
340
|
}
|
|
426
341
|
});
|
|
427
342
|
}
|
|
428
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,231 +1,50 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh dev --externals` (alias `--mock`) — external-service realizations
|
|
3
|
-
* for a local dev session (MESH-1885, design C4).
|
|
4
|
-
*
|
|
5
|
-
* Apps DECLARE how each external dependency is realized locally in the root
|
|
6
|
-
* package.json under `mesh.externals` (legacy key `mesh.mocks` still read).
|
|
7
|
-
* Every declaration runs in exactly one of three MODES:
|
|
8
|
-
*
|
|
9
|
-
* mock — the service is MIMICKED: no real instance exists locally or
|
|
10
|
-
* remotely. Realized from an OpenAPI spec (`openapi` → Prism
|
|
11
|
-
* mock server) or a hand-written mock process (`src`).
|
|
12
|
-
* local — a LOCAL VERSION of the real service runs on this machine,
|
|
13
|
-
* e.g. a vendor-shaped database replica. Realized from a docker
|
|
14
|
-
* compose file (`compose` + published `port`).
|
|
15
|
-
* remote — the session connects to the ACTUAL external service: either
|
|
16
|
-
* the vendor's real endpoint with inline `credentials` (e.g. a
|
|
17
|
-
* sandbox), or the external service as configured in the app's
|
|
18
|
-
* tenant environment (`remote.env`, e.g. dev — credentials are
|
|
19
|
-
* pulled from that environment's secret).
|
|
20
|
-
*
|
|
21
|
-
* "mesh": {
|
|
22
|
-
* "externals": {
|
|
23
|
-
* "plaid-db": { // ── local (default) ──
|
|
24
|
-
* "mode": "local",
|
|
25
|
-
* "compose": "libs/plaid-db/docker/docker-compose.yml",
|
|
26
|
-
* "port": 1433, // REQUIRED: the published port
|
|
27
|
-
* "probe": "tcp", // non-HTTP uptime probe
|
|
28
|
-
* "external": "plaid-db",
|
|
29
|
-
* "credentials": { // {{host}}/{{port}} → localhost:1433
|
|
30
|
-
* "host": "{{host}}", "port": "{{port}}",
|
|
31
|
-
* "name": "Plaid_Clean", "username": "sa",
|
|
32
|
-
* "password": "{{env:PLAID_DB_PASSWORD}}"
|
|
33
|
-
* },
|
|
34
|
-
* "remote": { "env": "dev" } // `--externals plaid-db=remote`
|
|
35
|
-
* }, // pulls the dev-configured secret
|
|
36
|
-
* "plaid": { // ── remote ──
|
|
37
|
-
* "mode": "remote",
|
|
38
|
-
* "external": "plaid", // the vendor's REAL sandbox
|
|
39
|
-
* "displayName": "Plaid", // the Hub shows the real name…
|
|
40
|
-
* "type": "api", // …and the integration type
|
|
41
|
-
* "docs": "https://plaid.com/docs/api/", // vendor reference docs
|
|
42
|
-
* "credentials": {
|
|
43
|
-
* "endpoint": "https://sandbox.plaid.com",
|
|
44
|
-
* "client_id": "{{env:PLAID_CLIENT_ID}}",
|
|
45
|
-
* "secret": "{{env:PLAID_SECRET}}"
|
|
46
|
-
* }
|
|
47
|
-
* },
|
|
48
|
-
* "vendorpay": { // ── mock ──
|
|
49
|
-
* "mode": "mock",
|
|
50
|
-
* "openapi": "api/docs/spec/openapi.json", // spec → Prism emulation
|
|
51
|
-
* "external": "vendorpay",
|
|
52
|
-
* "credentials": { "baseUrl": "{{url}}", "apiKey": "mock" }
|
|
53
|
-
* }
|
|
54
|
-
* }
|
|
55
|
-
* }
|
|
56
|
-
*
|
|
57
|
-
* `mode` picks the DEFAULT; a declaration may carry more than one
|
|
58
|
-
* realization (e.g. compose + remote.env) and the CLI overrides per
|
|
59
|
-
* external at run time: `mesh dev --externals plaid-db=remote,plaid`.
|
|
60
|
-
* Declarations without `mode` infer it from their fields (compose → local,
|
|
61
|
-
* openapi/src → mock, sandbox/credentials-only → remote), so pre-mode
|
|
62
|
-
* declarations keep working (`sandbox: true` is a deprecated alias for
|
|
63
|
-
* mode remote).
|
|
64
|
-
*
|
|
65
|
-
* All credential values support `{{env:VAR}}` interpolation from the
|
|
66
|
-
* developer's environment, so real secrets (sandbox keys, DB passwords)
|
|
67
|
-
* never land in package.json.
|
|
68
|
-
*
|
|
69
|
-
* Realization: mock externals join the SAME orchestration as services named
|
|
70
|
-
* mock-{name} (ports, env files, tmux windows, Loki log pipeline); local
|
|
71
|
-
* externals come up via `docker compose up -d --wait` before the app's
|
|
72
|
-
* services and are torn down on `mesh dev --kill`; remote externals spawn
|
|
73
|
-
* nothing. In every mode the ExternalService credential secret is seeded at
|
|
74
|
-
* mesh/{tenant}/{env}/external/{name} so the app's resolveCredentials()
|
|
75
|
-
* path runs UNCHANGED, the vendor is registered in the local Hub's
|
|
76
|
-
* external-services view, and a blackbox uptime probe watches the
|
|
77
|
-
* realization — remote endpoints included.
|
|
78
|
-
*/
|
|
79
1
|
export interface LocalMockDecl {
|
|
80
|
-
/** Default mode for this external: "mock" (emulate via openapi/src),
|
|
81
|
-
* "local" (docker compose local version), "remote" (the actual service).
|
|
82
|
-
* Inferred from the realization fields when omitted; overridable per run
|
|
83
|
-
* with `mesh dev --externals name=mode`. */
|
|
84
2
|
mode?: ExternalMode;
|
|
85
|
-
/** Mock mode: directory (relative to app root) with a package.json `dev`
|
|
86
|
-
* script — a hand-written mock process. */
|
|
87
3
|
src?: string;
|
|
88
|
-
/** Local mode: docker compose file (relative to app root) running a local
|
|
89
|
-
* version of the external service — e.g. a vendor-shaped database
|
|
90
|
-
* replica. `mesh dev` runs `docker compose up -d --wait` before the
|
|
91
|
-
* app's services and `docker compose down` on `--kill`. Requires `port`. */
|
|
92
4
|
compose?: string;
|
|
93
|
-
/** Mock mode: OpenAPI spec file (relative to app root); the CLI emulates
|
|
94
|
-
* the service with a Prism mock server (`npx @stoplight/prism-cli mock`)
|
|
95
|
-
* as mock-{name}. */
|
|
96
5
|
openapi?: string;
|
|
97
|
-
/** @deprecated alias for `mode: "remote"` (with inline credentials). */
|
|
98
6
|
sandbox?: boolean;
|
|
99
|
-
/** Remote-mode credential source. When the external runs in remote mode,
|
|
100
|
-
* its credentials come from (first match): `remote.credentials` (inline,
|
|
101
|
-
* env-interpolated), the top-level `credentials` if this declaration has
|
|
102
|
-
* no local/mock realization (a pure-remote declaration), or the external
|
|
103
|
-
* service configured in the app's tenant environment `remote.env`
|
|
104
|
-
* (default "dev") — secret mesh/{tenant}/{env}/external/{name}, read
|
|
105
|
-
* with the developer's ambient AWS credentials. `remote.profile` names
|
|
106
|
-
* the AWS profile for that pull when the shell carries no AWS identity
|
|
107
|
-
* (no AWS_ACCESS_KEY_ID / AWS_PROFILE); the MESH_AWS_PROFILE env var
|
|
108
|
-
* overrides it — the same convention repo pull scripts use. */
|
|
109
7
|
remote?: {
|
|
110
8
|
env?: string;
|
|
111
9
|
credentials?: Record<string, string>;
|
|
112
10
|
profile?: string;
|
|
113
11
|
};
|
|
114
|
-
/** Human-facing integration name shown in the Hub (e.g. "Plaid",
|
|
115
|
-
* "Unit21"). @default the external name title-cased ("plaid-db" →
|
|
116
|
-
* "Plaid Db"). */
|
|
117
12
|
displayName?: string;
|
|
118
|
-
/** Vendor reference documentation for the integration, linked from the
|
|
119
|
-
* Hub — a URL string or `{ url, provider }`.
|
|
120
|
-
* @example "https://plaid.com/docs/api/" */
|
|
121
13
|
docs?: string | {
|
|
122
14
|
url: string;
|
|
123
15
|
provider?: string;
|
|
124
16
|
};
|
|
125
|
-
/** Fixed port; omitted = auto-allocated after the app's services.
|
|
126
|
-
* REQUIRED in local (compose) mode — the compose file's published port. */
|
|
127
17
|
port?: number;
|
|
128
|
-
/** Launch command (default: ["pnpm", "dev"]; openapi mocks synthesize a
|
|
129
|
-
* Prism command) */
|
|
130
18
|
command?: string[];
|
|
131
|
-
/** Extra env for the mock process */
|
|
132
19
|
env?: Record<string, string>;
|
|
133
|
-
/** ExternalService name this declaration realizes */
|
|
134
20
|
external?: string;
|
|
135
|
-
/** Credential JSON seeded into the external secret (the local/mock
|
|
136
|
-
* realization's template; also the remote source for pure-remote
|
|
137
|
-
* declarations). Tokens: "{{url}}" → the stand-in's URL, "{{host}}"/
|
|
138
|
-
* "{{port}}" → its host/port, and "{{env:VAR}}" → the developer's
|
|
139
|
-
* environment (all modes). */
|
|
140
21
|
credentials?: Record<string, string>;
|
|
141
|
-
/** Integration type shown in the Hub — api, database, object_storage,
|
|
142
|
-
* sftp, banking_core, … (@default "other"). Display only; derived
|
|
143
|
-
* reachability probes key off the credential fields themselves (a
|
|
144
|
-
* `bucket` credential probes TCP to the bucket endpoint regardless of
|
|
145
|
-
* the declared type). */
|
|
146
22
|
type?: string;
|
|
147
|
-
/** Health endpoint path probed by the platform's blackbox exporter
|
|
148
|
-
* (uptime in the Hub). @default "/health" for local/mock realizations;
|
|
149
|
-
* remote endpoints default to probing the endpoint root ("") since
|
|
150
|
-
* vendors rarely expose /health. */
|
|
151
23
|
healthPath?: string;
|
|
152
|
-
/** Blackbox probe module. "http" (default) GETs the health URL and
|
|
153
|
-
* expects 2xx; "tcp" only checks the port accepts connections — REQUIRED
|
|
154
|
-
* for non-HTTP externals (databases, SFTP, …) whose uptime would
|
|
155
|
-
* otherwise always read down. */
|
|
156
24
|
probe?: "http" | "tcp";
|
|
157
25
|
}
|
|
158
|
-
/** The three ways an external service exists in a local dev session. */
|
|
159
26
|
export type ExternalMode = "mock" | "local" | "remote";
|
|
160
|
-
/**
|
|
161
|
-
* Resolve + validate an external's mode: explicit `mode` (or the one
|
|
162
|
-
* inferred from the realization fields), checked against the fields that
|
|
163
|
-
* mode needs. Pre-mode declarations infer: compose → local, openapi/src →
|
|
164
|
-
* mock, sandbox/credentials-only → remote.
|
|
165
|
-
*/
|
|
166
27
|
export declare function externalMode(name: string, decl: LocalMockDecl): ExternalMode;
|
|
167
|
-
/** A parsed `--externals` selection: the externals named, and the per-run
|
|
168
|
-
* mode overrides typed alongside them (`plaid-db=remote`). */
|
|
169
28
|
export interface ExternalsSelection {
|
|
170
29
|
names: string[];
|
|
171
30
|
overrides: Map<string, ExternalMode>;
|
|
172
31
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Parse a `--externals` value — a comma-separated list of `name` or
|
|
175
|
-
* `name=mode` entries. An explicit mode overrides that declaration's
|
|
176
|
-
* default FOR THIS RUN; a bare name keeps the declared default.
|
|
177
|
-
*
|
|
178
|
-
* Names are returned in the order typed, de-duplicated (the last mode
|
|
179
|
-
* given for a name wins, so `--externals plaid,plaid=remote` is remote).
|
|
180
|
-
*/
|
|
181
32
|
export declare function parseExternalsSelection(input: string): ExternalsSelection;
|
|
182
|
-
/**
|
|
183
|
-
* The inline credential template a remote-mode run should use, if any:
|
|
184
|
-
* `remote.credentials` always wins; top-level `credentials` count only when
|
|
185
|
-
* the declaration has no local/mock realization (otherwise they are that
|
|
186
|
-
* realization's template, full of {{host}}/{{port}} tokens that only mean
|
|
187
|
-
* something against a local endpoint).
|
|
188
|
-
*/
|
|
189
33
|
export declare function remoteInlineCredentials(decl: LocalMockDecl): Record<string, string> | undefined;
|
|
190
|
-
/** Whether this declaration runs as a mock-{name} service in the dev
|
|
191
|
-
* orchestration (mock mode) vs outside it (local compose / remote). */
|
|
192
34
|
export declare function isServiceMode(name: string, decl: LocalMockDecl): boolean;
|
|
193
|
-
/** Endpoint tokens available to credential interpolation. */
|
|
194
35
|
export interface MockEndpoint {
|
|
195
36
|
url: string;
|
|
196
37
|
host: string;
|
|
197
38
|
port: number;
|
|
198
39
|
}
|
|
199
|
-
/**
|
|
200
|
-
* Interpolate one credential value: {{url}}/{{host}}/{{port}} from the
|
|
201
|
-
* stand-in's endpoint, {{env:VAR}} from the developer's environment
|
|
202
|
-
* (missing env vars are a hard error — a half-seeded secret is worse).
|
|
203
|
-
*/
|
|
204
40
|
export declare function interpolateCredentialValue(raw: string, endpoint: MockEndpoint | undefined, env?: NodeJS.ProcessEnv): string;
|
|
205
|
-
/** The Prism mock command for an openapi-mode declaration. `$PORT` expands
|
|
206
|
-
* in the service's launch shell (tmux and docker runners both source the
|
|
207
|
-
* env file), so port reallocation keeps working. */
|
|
208
41
|
export declare function openapiMockCommand(decl: LocalMockDecl): string[];
|
|
209
|
-
/** Compose-mode project name — pinned so `--kill` can tear down exactly
|
|
210
|
-
* what `up` created, regardless of the compose file's own `name:`. */
|
|
211
42
|
export declare function composeProjectName(sessionName: string, mockName: string): string;
|
|
212
|
-
/** A compose-mode external recorded in session state for teardown. */
|
|
213
43
|
export interface ComposeExternalRef {
|
|
214
44
|
name: string;
|
|
215
45
|
composeFile: string;
|
|
216
46
|
project: string;
|
|
217
47
|
}
|
|
218
|
-
/** What an existing realization of a compose external means for this run.
|
|
219
|
-
* - `up` → nothing foreign in the way (or the realization is OURS):
|
|
220
|
-
* normal idempotent `up`, ref recorded for `--kill`.
|
|
221
|
-
* - `adopt-served` → ANOTHER realization of THIS compose file already serves
|
|
222
|
-
* the declared port.
|
|
223
|
-
* - `adopt-stopped` → a stopped container from another compose project holds
|
|
224
|
-
* a `container_name` this file pins.
|
|
225
|
-
* - `conflict` → the port is served by something this compose file does
|
|
226
|
-
* not define (a native database, an unrelated container).
|
|
227
|
-
* Never adopted: the app's credentials would be seeded
|
|
228
|
-
* against the wrong service. */
|
|
229
48
|
export type ComposeExternalPlan = {
|
|
230
49
|
action: "up";
|
|
231
50
|
} | {
|
|
@@ -238,119 +57,32 @@ export type ComposeExternalPlan = {
|
|
|
238
57
|
action: "conflict";
|
|
239
58
|
container?: string;
|
|
240
59
|
};
|
|
241
|
-
/** The docker/network lookups `planComposeExternal` needs, injectable so the
|
|
242
|
-
* branch table is unit-testable without a docker daemon. */
|
|
243
60
|
export interface ComposeExternalProbes {
|
|
244
|
-
/** Is a container of OUR compose project already running for this file? */
|
|
245
61
|
ownsRunning(composeFile: string, project: string): boolean;
|
|
246
|
-
/** Does anything accept TCP on the declared port? */
|
|
247
62
|
portServed(port: number): Promise<boolean>;
|
|
248
|
-
/** A pinned `container_name` held by a DIFFERENT compose project. */
|
|
249
63
|
foreignPinned(composeFile: string, project: string): string | undefined;
|
|
250
|
-
/** Who publishes `port`, and is it a service THIS compose file defines?
|
|
251
|
-
* Undefined when nothing in docker publishes it (a native process, or no
|
|
252
|
-
* docker at all) — which is itself disqualifying for adoption. */
|
|
253
64
|
portPublisher(composeFile: string, port: number): {
|
|
254
65
|
container: string;
|
|
255
66
|
definedByFile: boolean;
|
|
256
67
|
} | undefined;
|
|
257
68
|
}
|
|
258
|
-
/**
|
|
259
|
-
* Decide how to realize a compose external, given what already exists.
|
|
260
|
-
*
|
|
261
|
-
* OWNERSHIP FIRST: a port probe can't tell WHO serves the port, and the
|
|
262
|
-
* ordinary flow re-runs `mesh dev` against a session whose compose externals
|
|
263
|
-
* are deliberately left running. Adopting there would drop the ref from
|
|
264
|
-
* session state and permanently orphan the checkout's own container, so our
|
|
265
|
-
* own realization takes the normal `up` path (idempotent, ref re-recorded)
|
|
266
|
-
* and only a foreign one is adopted.
|
|
267
|
-
*
|
|
268
|
-
* IDENTITY SECOND: a foreign publisher is only adopted when it is a service
|
|
269
|
-
* THIS compose file defines. Well-known ports (1433/5432/22) are exactly
|
|
270
|
-
* where a native install or an unrelated container turns up, and adopting one
|
|
271
|
-
* silently seeds the app's credentials against the wrong database.
|
|
272
|
-
*/
|
|
273
69
|
export declare function planComposeExternal(composeFile: string, project: string, port: number, probes: ComposeExternalProbes): Promise<ComposeExternalPlan>;
|
|
274
|
-
/**
|
|
275
|
-
* Bring a compose-mode external up (idempotent; waits for healthchecks —
|
|
276
|
-
* vendor DBs restoring seed data can take a while, hence the timeout).
|
|
277
|
-
*
|
|
278
|
-
* ADOPTION: the same external is often realized by more than one checkout —
|
|
279
|
-
* e.g. a vendor-DB compose ported from a legacy repo pins `container_name`
|
|
280
|
-
* and a host port, so whichever checkout created it first blocks every other
|
|
281
|
-
* `docker compose up` (name + port conflicts). An external service is by
|
|
282
|
-
* definition outside the app, so if ANOTHER checkout already serves its
|
|
283
|
-
* published port — or left a stopped container holding the pinned name —
|
|
284
|
-
* this ADOPTS that realization instead of failing: skip/`docker start`, wait
|
|
285
|
-
* for the port, and return undefined so `--kill` never tears down what
|
|
286
|
-
* another checkout owns. Our OWN realization is never adopted (see
|
|
287
|
-
* `planComposeExternal`) — it stays recorded so `--kill` still cleans it up,
|
|
288
|
-
* and a publisher this compose file doesn't define is never adopted either
|
|
289
|
-
* (it would seed the app's credentials against the wrong service).
|
|
290
|
-
*/
|
|
291
70
|
export declare function composeExternalUp(appRoot: string, sessionName: string, name: string, decl: LocalMockDecl, probes?: ComposeExternalProbes): Promise<ComposeExternalRef | undefined>;
|
|
292
|
-
/** Tear down compose-mode externals recorded in session state. Volumes are
|
|
293
|
-
* kept (vendor DB data survives sessions, like the cloud external it
|
|
294
|
-
* stands in for); best-effort per project. */
|
|
295
71
|
export declare function composeExternalsDown(refs: ComposeExternalRef[] | undefined): void;
|
|
296
|
-
/** Read the app's declared externals (root package.json → mesh.externals;
|
|
297
|
-
* legacy key mesh.mocks still read, externals wins on name collision). */
|
|
298
72
|
export declare function readLocalMocks(appRoot: string): Record<string, LocalMockDecl>;
|
|
299
73
|
export declare function externalSecretPath(tenant: string, external: string): string;
|
|
300
|
-
/**
|
|
301
|
-
* Pull an external service's credentials as configured in the app's tenant
|
|
302
|
-
* environment (the CLOUD platform, not the local fabric) — secret
|
|
303
|
-
* mesh/{tenant}/{env}/external/{name}, read with the developer's ambient
|
|
304
|
-
* AWS credentials (AWS_PROFILE / SSO session for that tenant's account).
|
|
305
|
-
* When the shell carries no AWS identity at all, `profile` (from the
|
|
306
|
-
* declaration; MESH_AWS_PROFILE overrides) names the profile to use — the
|
|
307
|
-
* same convention repo pull scripts follow.
|
|
308
|
-
*/
|
|
309
74
|
export declare function fetchRemoteExternalCredentials(tenant: string, env: string, external: string, profile?: string): Promise<Record<string, string>>;
|
|
310
|
-
/** The blackbox probe target for a realization, by mode: local/mock
|
|
311
|
-
* stand-ins are probed on the host (the prober runs inside the stack →
|
|
312
|
-
* host.docker.internal); remote externals are probed at their REAL
|
|
313
|
-
* endpoint, so the Hub shows actual vendor reachability. Every integration
|
|
314
|
-
* gets AT LEAST a reachability check when its credentials expose a target:
|
|
315
|
-
* an HTTP endpoint, a host(:port), or an S3 bucket (probed via TCP to the
|
|
316
|
-
* bucket endpoint — no SDK/credentials needed, the same technique CSP's
|
|
317
|
-
* network lib used). Undefined = nothing probeable in the credentials.
|
|
318
|
-
*
|
|
319
|
-
* Target and module come from ONE decision here so they can't drift: a
|
|
320
|
-
* misrouted probe just reports probe_success 0, indistinguishable from a
|
|
321
|
-
* genuinely down service. `tcp` yields host:port with no scheme/path and
|
|
322
|
-
* routes the scrape to blackbox's tcp_connect (the scrape config's default
|
|
323
|
-
* stays http_2xx); `http` GETs the target and expects 2xx. */
|
|
324
75
|
export declare function resolveProbeTarget(mode: ExternalMode, decl: LocalMockDecl, endpoint: MockEndpoint | undefined, creds: Record<string, string>): {
|
|
325
76
|
target: string;
|
|
326
77
|
module?: "tcp_connect";
|
|
327
78
|
} | undefined;
|
|
328
|
-
/** Hub display name: explicit `displayName`, else the external name
|
|
329
|
-
* title-cased on word boundaries ("plaid-db" → "Plaid Db"). */
|
|
330
79
|
export declare function externalDisplayName(name: string, decl: LocalMockDecl): string;
|
|
331
|
-
/** Normalize the decl's `docs` (string URL or {url, provider}) for the meta. */
|
|
332
80
|
export declare function externalDocs(decl: LocalMockDecl): {
|
|
333
81
|
url: string;
|
|
334
82
|
provider?: string;
|
|
335
83
|
} | undefined;
|
|
336
|
-
/** Prometheus file_sd target file for one external's uptime probe. One
|
|
337
|
-
* file per (tenant, app, external) so a session's probes can be removed on
|
|
338
|
-
* `--kill` without touching another app's. */
|
|
339
84
|
export declare function localProbeFile(tenant: string, app: string, external: string): string;
|
|
340
|
-
/** Drop probe target files (best effort). Called on `mesh dev --kill` so
|
|
341
|
-
* Prometheus stops scraping stand-ins that no longer exist — otherwise the
|
|
342
|
-
* Hub shows an integration down for a session that isn't running. */
|
|
343
85
|
export declare function localProbesRemove(files: string[] | undefined): void;
|
|
344
|
-
/**
|
|
345
|
-
* Wire a realization into the platform: seed the external-service
|
|
346
|
-
* credential secret and register the vendor in the local Hub's
|
|
347
|
-
* external-services view — the same shapes ExternalService exports in the
|
|
348
|
-
* cloud. `endpoint` is the local stand-in's address (absent in remote
|
|
349
|
-
* mode — the credentials carry the real endpoint).
|
|
350
|
-
*
|
|
351
|
-
* Returns the probe target file this realization registered, if any, so the
|
|
352
|
-
* caller can record it in session state and remove it on `--kill`.
|
|
353
|
-
*/
|
|
354
86
|
export declare function seedLocalMock(args: {
|
|
355
87
|
tenant: string;
|
|
356
88
|
app: string;
|
|
@@ -358,4 +90,3 @@ export declare function seedLocalMock(args: {
|
|
|
358
90
|
decl: LocalMockDecl;
|
|
359
91
|
endpoint?: MockEndpoint;
|
|
360
92
|
}): Promise<string | undefined>;
|
|
361
|
-
//# sourceMappingURL=mocks.d.ts.map
|