@mesh-tech/mesh-cli 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/mesh.d.ts +0 -12
- package/dist/bin/mesh.js +12 -12
- package/dist/bin/mesh.js.map +0 -1
- package/dist/build-info.json +2 -2
- package/dist/src/commands/agent-api-client.d.ts +0 -70
- package/dist/src/commands/agent-api-client.js +0 -80
- package/dist/src/commands/app-check.d.ts +0 -56
- package/dist/src/commands/app-check.js +0 -72
- package/dist/src/commands/artifacts.d.ts +0 -11
- package/dist/src/commands/artifacts.js +0 -33
- package/dist/src/commands/cluster.d.ts +0 -39
- package/dist/src/commands/cluster.js +0 -73
- package/dist/src/commands/conversations.d.ts +0 -36
- package/dist/src/commands/conversations.js +0 -59
- package/dist/src/commands/create-app.d.ts +0 -98
- package/dist/src/commands/create-app.js +1 -163
- package/dist/src/commands/db/connect.d.ts +0 -7
- package/dist/src/commands/db/connect.js +0 -9
- package/dist/src/commands/db/credentials.d.ts +0 -7
- package/dist/src/commands/db/credentials.js +0 -10
- package/dist/src/commands/db/env.d.ts +0 -6
- package/dist/src/commands/db/env.js +0 -14
- package/dist/src/commands/db/exec.d.ts +0 -43
- package/dist/src/commands/db/exec.js +0 -69
- package/dist/src/commands/db/index.d.ts +0 -10
- package/dist/src/commands/db/index.js +0 -10
- package/dist/src/commands/db/psql.d.ts +0 -7
- package/dist/src/commands/db/psql.js +0 -18
- package/dist/src/commands/deploy.d.ts +0 -38
- package/dist/src/commands/deploy.js +1 -76
- package/dist/src/commands/dev-doctor.d.ts +0 -82
- package/dist/src/commands/dev-doctor.js +3 -132
- package/dist/src/commands/dev-launch.d.ts +0 -52
- package/dist/src/commands/dev-launch.js +0 -56
- package/dist/src/commands/dev-token-server.d.ts +0 -18
- package/dist/src/commands/dev-token-server.js +1 -24
- package/dist/src/commands/dev.d.ts +0 -246
- package/dist/src/commands/dev.js +5 -963
- package/dist/src/commands/docs.d.ts +0 -1
- package/dist/src/commands/docs.js +0 -12
- package/dist/src/commands/hub/index.d.ts +0 -60
- package/dist/src/commands/hub/index.js +2 -139
- package/dist/src/commands/init/wizard.d.ts +0 -128
- package/dist/src/commands/init/wizard.js +0 -109
- package/dist/src/commands/init.d.ts +0 -55
- package/dist/src/commands/init.js +0 -70
- package/dist/src/commands/install-shim.d.ts +0 -23
- package/dist/src/commands/install-shim.js +2 -29
- package/dist/src/commands/local/auth-provision.d.ts +0 -80
- package/dist/src/commands/local/auth-provision.js +0 -109
- package/dist/src/commands/local/dev-local.d.ts +0 -91
- package/dist/src/commands/local/dev-local.js +0 -147
- package/dist/src/commands/local/docker-runner.d.ts +0 -22
- package/dist/src/commands/local/docker-runner.js +2 -35
- package/dist/src/commands/local/helpers.d.ts +0 -14
- package/dist/src/commands/local/helpers.js +0 -13
- package/dist/src/commands/local/hub-local.d.ts +0 -96
- package/dist/src/commands/local/hub-local.js +0 -111
- package/dist/src/commands/local/index.d.ts +0 -14
- package/dist/src/commands/local/index.js +0 -86
- package/dist/src/commands/local/mocks.d.ts +0 -269
- package/dist/src/commands/local/mocks.js +1 -274
- package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
- package/dist/src/commands/local/seed-hub-catalog.js +0 -41
- package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
- package/dist/src/commands/local/seed-zitadel.js +0 -158
- package/dist/src/commands/local/seed.d.ts +0 -64
- package/dist/src/commands/local/seed.js +0 -78
- package/dist/src/commands/local/stack.d.ts +0 -141
- package/dist/src/commands/local/stack.js +0 -153
- package/dist/src/commands/login.d.ts +0 -265
- package/dist/src/commands/login.js +4 -418
- package/dist/src/commands/peer-addressing.d.ts +0 -39
- package/dist/src/commands/peer-addressing.js +0 -37
- package/dist/src/commands/port-ownership.d.ts +0 -44
- package/dist/src/commands/port-ownership.js +0 -47
- package/dist/src/commands/registry-publish.d.ts +0 -1
- package/dist/src/commands/registry-publish.js +0 -46
- package/dist/src/commands/registry.d.ts +4 -237
- package/dist/src/commands/registry.js +2 -316
- package/dist/src/commands/secrets/exec.d.ts +0 -16
- package/dist/src/commands/secrets/exec.js +0 -24
- package/dist/src/commands/secrets/index.d.ts +0 -9
- package/dist/src/commands/secrets/index.js +0 -10
- package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
- package/dist/src/commands/secrets/migrate-config.js +0 -40
- package/dist/src/commands/secrets/reindex.d.ts +0 -38
- package/dist/src/commands/secrets/reindex.js +0 -39
- package/dist/src/commands/secrets/set.d.ts +0 -47
- package/dist/src/commands/secrets/set.js +0 -107
- package/dist/src/commands/site.d.ts +0 -1
- package/dist/src/commands/site.js +0 -61
- package/dist/src/commands/skills.d.ts +0 -61
- package/dist/src/commands/skills.js +0 -83
- package/dist/src/commands/stack.d.ts +0 -15
- package/dist/src/commands/stack.js +1 -128
- package/dist/src/commands/temporal.d.ts +0 -30
- package/dist/src/commands/temporal.js.map +0 -1
- package/dist/src/commands/tenant.d.ts +0 -31
- package/dist/src/commands/tenant.js +0 -55
- package/dist/src/commands/tunnel/index.d.ts +0 -40
- package/dist/src/commands/tunnel/index.js +0 -141
- package/dist/src/commands/vcs/clone.d.ts +0 -1
- package/dist/src/commands/vcs/clone.js +0 -4
- package/dist/src/commands/vcs/common.d.ts +0 -32
- package/dist/src/commands/vcs/common.js +0 -41
- package/dist/src/commands/vcs/drafts.d.ts +0 -1
- package/dist/src/commands/vcs/drafts.js +0 -1
- package/dist/src/commands/vcs/get.d.ts +0 -1
- package/dist/src/commands/vcs/get.js +0 -11
- package/dist/src/commands/vcs/index.d.ts +0 -1
- package/dist/src/commands/vcs/index.js +0 -1
- package/dist/src/commands/vcs/propose.d.ts +0 -26
- package/dist/src/commands/vcs/propose.js +3 -34
- package/dist/src/commands/vcs/review.d.ts +0 -1
- package/dist/src/commands/vcs/review.js +0 -1
- package/dist/src/commands/vcs/rm.d.ts +0 -11
- package/dist/src/commands/vcs/rm.js +0 -14
- package/dist/src/commands/vcs-enrich.d.ts +0 -12
- package/dist/src/commands/vcs-enrich.js +0 -12
- package/dist/src/commands/vpn/index.d.ts +0 -17
- package/dist/src/commands/vpn/index.js +0 -102
- package/dist/src/commands/vpn/tunnel.d.ts +0 -9
- package/dist/src/commands/vpn/tunnel.js +0 -37
- package/dist/src/commands/workflow.d.ts +0 -22
- package/dist/src/commands/workflow.js +0 -80
- package/dist/src/docs/assemble.d.ts +0 -117
- package/dist/src/docs/assemble.js +0 -142
- package/dist/src/docs/cli-reference.d.ts +0 -58
- package/dist/src/docs/cli-reference.js +0 -77
- package/dist/src/docs/discover.d.ts +0 -40
- package/dist/src/docs/discover.js +2 -60
- package/dist/src/docs/portal.d.ts +0 -44
- package/dist/src/docs/portal.js +0 -49
- package/dist/src/docs/registry-docs.d.ts +0 -29
- package/dist/src/docs/registry-docs.js +0 -40
- package/dist/src/docs/schema.d.ts +0 -36
- package/dist/src/docs/schema.js +0 -52
- package/dist/src/docs/serve.d.ts +0 -18
- package/dist/src/docs/serve.js +2 -30
- package/dist/src/docs/start.d.ts +0 -42
- package/dist/src/docs/start.js +0 -70
- package/dist/src/eval/agent-eval.d.mts +0 -12
- package/dist/src/eval/agent-eval.mjs +0 -22
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.js.map +0 -1
- package/dist/src/program.d.ts +0 -20
- package/dist/src/program.js +0 -24
- package/dist/src/utils/auth-preflight.d.ts +0 -137
- package/dist/src/utils/auth-preflight.js +0 -149
- package/dist/src/utils/aws-auth.d.ts +0 -163
- package/dist/src/utils/aws-auth.js +3 -232
- package/dist/src/utils/bastion.d.ts +0 -27
- package/dist/src/utils/bastion.js +0 -28
- package/dist/src/utils/build-info.d.ts +0 -22
- package/dist/src/utils/build-info.js +0 -27
- package/dist/src/utils/cache-home.d.ts +0 -23
- package/dist/src/utils/cache-home.js +0 -25
- package/dist/src/utils/capture-history.d.ts +0 -54
- package/dist/src/utils/capture-history.js +1 -55
- package/dist/src/utils/context.d.ts +0 -23
- package/dist/src/utils/context.js +0 -43
- package/dist/src/utils/credentials.d.ts +0 -38
- package/dist/src/utils/credentials.js +0 -39
- package/dist/src/utils/deploy-preflight.d.ts +0 -38
- package/dist/src/utils/deploy-preflight.js +1 -71
- package/dist/src/utils/errors.d.ts +0 -53
- package/dist/src/utils/errors.js +0 -49
- package/dist/src/utils/first-party-contexts.d.ts +0 -38
- package/dist/src/utils/first-party-contexts.js +0 -44
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.js +0 -4
- package/dist/src/utils/kubeconfig.d.ts +0 -40
- package/dist/src/utils/kubeconfig.js +0 -44
- package/dist/src/utils/log.d.ts +0 -20
- package/dist/src/utils/log.js +0 -20
- package/dist/src/utils/mesh-json.d.ts +0 -46
- package/dist/src/utils/mesh-json.js +0 -39
- package/dist/src/utils/pid.d.ts +0 -42
- package/dist/src/utils/pid.js +0 -48
- package/dist/src/utils/pulumi-run.d.ts +0 -14
- package/dist/src/utils/pulumi-run.js +0 -42
- package/dist/src/utils/pulumi.d.ts +0 -34
- package/dist/src/utils/pulumi.js +0 -38
- package/dist/src/utils/reachability.d.ts +0 -27
- package/dist/src/utils/reachability.js +0 -40
- package/dist/src/utils/recover-conversation.d.ts +0 -110
- package/dist/src/utils/recover-conversation.js +0 -108
- package/dist/src/utils/registry-broker.d.ts +5 -84
- package/dist/src/utils/registry-broker.js +0 -62
- package/dist/src/utils/registry-identity.d.ts +0 -149
- package/dist/src/utils/registry-identity.js +0 -143
- package/dist/src/utils/scaffold-versions.d.ts +0 -41
- package/dist/src/utils/scaffold-versions.js +0 -42
- package/dist/src/utils/socks-forward.d.ts +0 -24
- package/dist/src/utils/socks-forward.js +2 -25
- package/dist/src/utils/stack-flag.d.ts +0 -13
- package/dist/src/utils/stack-flag.js +0 -21
- package/dist/src/utils/tailscale-targets.d.ts +0 -37
- package/dist/src/utils/tailscale-targets.js +0 -33
- package/dist/src/utils/tailscale.d.ts +0 -177
- package/dist/src/utils/tailscale.js +6 -337
- package/dist/src/utils/temporal-auth.d.ts +0 -41
- package/dist/src/utils/temporal-auth.js +0 -52
- package/dist/src/utils/temporal-codec.d.ts +0 -89
- package/dist/src/utils/temporal-codec.js.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts +0 -79
- package/dist/src/utils/tunnel-ownership.js +0 -74
- package/dist/src/utils/vpn-join.d.ts +0 -16
- package/dist/src/utils/vpn-join.js +0 -17
- package/dist/src/utils/vpn.d.ts +0 -42
- package/dist/src/utils/vpn.js +0 -52
- package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
- package/dist/src/utils/workflow-fingerprint.js +1 -63
- package/dist/src/utils/worktree-identity.d.ts +0 -62
- package/dist/src/utils/worktree-identity.js +0 -88
- package/package.json +1 -1
- package/skills/core/SKILL.md +9 -10
- package/templates/api-auth/api/src/index.ts.hbs +1 -1
- package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
- package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
- package/templates/api-role-gating/index.ts.hbs +1 -1
- package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
- package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
- package/templates/platform-repo/platform/index.ts +1 -1
- package/dist/bin/mesh.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.js.map +0 -1
- package/dist/src/commands/app-check.d.ts.map +0 -1
- package/dist/src/commands/app-check.js.map +0 -1
- package/dist/src/commands/artifacts.d.ts.map +0 -1
- package/dist/src/commands/artifacts.js.map +0 -1
- package/dist/src/commands/cluster.d.ts.map +0 -1
- package/dist/src/commands/cluster.js.map +0 -1
- package/dist/src/commands/conversations.d.ts.map +0 -1
- package/dist/src/commands/conversations.js.map +0 -1
- package/dist/src/commands/create-app.d.ts.map +0 -1
- package/dist/src/commands/create-app.js.map +0 -1
- package/dist/src/commands/db/connect.d.ts.map +0 -1
- package/dist/src/commands/db/connect.js.map +0 -1
- package/dist/src/commands/db/credentials.d.ts.map +0 -1
- package/dist/src/commands/db/credentials.js.map +0 -1
- package/dist/src/commands/db/env.d.ts.map +0 -1
- package/dist/src/commands/db/env.js.map +0 -1
- package/dist/src/commands/db/exec.d.ts.map +0 -1
- package/dist/src/commands/db/exec.js.map +0 -1
- package/dist/src/commands/db/index.d.ts.map +0 -1
- package/dist/src/commands/db/index.js.map +0 -1
- package/dist/src/commands/db/psql.d.ts.map +0 -1
- package/dist/src/commands/db/psql.js.map +0 -1
- package/dist/src/commands/deploy.d.ts.map +0 -1
- package/dist/src/commands/deploy.js.map +0 -1
- package/dist/src/commands/dev-doctor.d.ts.map +0 -1
- package/dist/src/commands/dev-doctor.js.map +0 -1
- package/dist/src/commands/dev-launch.d.ts.map +0 -1
- package/dist/src/commands/dev-launch.js.map +0 -1
- package/dist/src/commands/dev-token-server.d.ts.map +0 -1
- package/dist/src/commands/dev-token-server.js.map +0 -1
- package/dist/src/commands/dev.d.ts.map +0 -1
- package/dist/src/commands/dev.js.map +0 -1
- package/dist/src/commands/docs.d.ts.map +0 -1
- package/dist/src/commands/docs.js.map +0 -1
- package/dist/src/commands/hub/index.d.ts.map +0 -1
- package/dist/src/commands/hub/index.js.map +0 -1
- package/dist/src/commands/init/wizard.d.ts.map +0 -1
- package/dist/src/commands/init/wizard.js.map +0 -1
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/install-shim.d.ts.map +0 -1
- package/dist/src/commands/install-shim.js.map +0 -1
- package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
- package/dist/src/commands/local/auth-provision.js.map +0 -1
- package/dist/src/commands/local/dev-local.d.ts.map +0 -1
- package/dist/src/commands/local/dev-local.js.map +0 -1
- package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
- package/dist/src/commands/local/docker-runner.js.map +0 -1
- package/dist/src/commands/local/helpers.d.ts.map +0 -1
- package/dist/src/commands/local/helpers.js.map +0 -1
- package/dist/src/commands/local/hub-local.d.ts.map +0 -1
- package/dist/src/commands/local/hub-local.js.map +0 -1
- package/dist/src/commands/local/index.d.ts.map +0 -1
- package/dist/src/commands/local/index.js.map +0 -1
- package/dist/src/commands/local/mocks.d.ts.map +0 -1
- package/dist/src/commands/local/mocks.js.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
- package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
- package/dist/src/commands/local/seed-zitadel.js.map +0 -1
- package/dist/src/commands/local/seed.d.ts.map +0 -1
- package/dist/src/commands/local/seed.js.map +0 -1
- package/dist/src/commands/local/stack.d.ts.map +0 -1
- package/dist/src/commands/local/stack.js.map +0 -1
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/peer-addressing.d.ts.map +0 -1
- package/dist/src/commands/peer-addressing.js.map +0 -1
- package/dist/src/commands/port-ownership.d.ts.map +0 -1
- package/dist/src/commands/port-ownership.js.map +0 -1
- package/dist/src/commands/registry-publish.d.ts.map +0 -1
- package/dist/src/commands/registry-publish.js.map +0 -1
- package/dist/src/commands/registry.d.ts.map +0 -1
- package/dist/src/commands/registry.js.map +0 -1
- package/dist/src/commands/secrets/exec.d.ts.map +0 -1
- package/dist/src/commands/secrets/exec.js.map +0 -1
- package/dist/src/commands/secrets/index.d.ts.map +0 -1
- package/dist/src/commands/secrets/index.js.map +0 -1
- package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
- package/dist/src/commands/secrets/migrate-config.js.map +0 -1
- package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
- package/dist/src/commands/secrets/reindex.js.map +0 -1
- package/dist/src/commands/secrets/set.d.ts.map +0 -1
- package/dist/src/commands/secrets/set.js.map +0 -1
- package/dist/src/commands/site.d.ts.map +0 -1
- package/dist/src/commands/site.js.map +0 -1
- package/dist/src/commands/skills.d.ts.map +0 -1
- package/dist/src/commands/skills.js.map +0 -1
- package/dist/src/commands/stack.d.ts.map +0 -1
- package/dist/src/commands/stack.js.map +0 -1
- package/dist/src/commands/temporal.d.ts.map +0 -1
- package/dist/src/commands/tenant.d.ts.map +0 -1
- package/dist/src/commands/tenant.js.map +0 -1
- package/dist/src/commands/tunnel/index.d.ts.map +0 -1
- package/dist/src/commands/tunnel/index.js.map +0 -1
- package/dist/src/commands/vcs/clone.d.ts.map +0 -1
- package/dist/src/commands/vcs/clone.js.map +0 -1
- package/dist/src/commands/vcs/common.d.ts.map +0 -1
- package/dist/src/commands/vcs/common.js.map +0 -1
- package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
- package/dist/src/commands/vcs/drafts.js.map +0 -1
- package/dist/src/commands/vcs/get.d.ts.map +0 -1
- package/dist/src/commands/vcs/get.js.map +0 -1
- package/dist/src/commands/vcs/index.d.ts.map +0 -1
- package/dist/src/commands/vcs/index.js.map +0 -1
- package/dist/src/commands/vcs/propose.d.ts.map +0 -1
- package/dist/src/commands/vcs/propose.js.map +0 -1
- package/dist/src/commands/vcs/review.d.ts.map +0 -1
- package/dist/src/commands/vcs/review.js.map +0 -1
- package/dist/src/commands/vcs/rm.d.ts.map +0 -1
- package/dist/src/commands/vcs/rm.js.map +0 -1
- package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
- package/dist/src/commands/vcs-enrich.js.map +0 -1
- package/dist/src/commands/vpn/index.d.ts.map +0 -1
- package/dist/src/commands/vpn/index.js.map +0 -1
- package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
- package/dist/src/commands/vpn/tunnel.js.map +0 -1
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/docs/assemble.d.ts.map +0 -1
- package/dist/src/docs/assemble.js.map +0 -1
- package/dist/src/docs/cli-reference.d.ts.map +0 -1
- package/dist/src/docs/cli-reference.js.map +0 -1
- package/dist/src/docs/discover.d.ts.map +0 -1
- package/dist/src/docs/discover.js.map +0 -1
- package/dist/src/docs/portal.d.ts.map +0 -1
- package/dist/src/docs/portal.js.map +0 -1
- package/dist/src/docs/registry-docs.d.ts.map +0 -1
- package/dist/src/docs/registry-docs.js.map +0 -1
- package/dist/src/docs/schema.d.ts.map +0 -1
- package/dist/src/docs/schema.js.map +0 -1
- package/dist/src/docs/serve.d.ts.map +0 -1
- package/dist/src/docs/serve.js.map +0 -1
- package/dist/src/docs/start.d.ts.map +0 -1
- package/dist/src/docs/start.js.map +0 -1
- package/dist/src/eval/agent-eval.d.mts.map +0 -1
- package/dist/src/eval/agent-eval.mjs.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/program.d.ts.map +0 -1
- package/dist/src/program.js.map +0 -1
- package/dist/src/utils/auth-preflight.d.ts.map +0 -1
- package/dist/src/utils/auth-preflight.js.map +0 -1
- package/dist/src/utils/aws-auth.d.ts.map +0 -1
- package/dist/src/utils/aws-auth.js.map +0 -1
- package/dist/src/utils/bastion.d.ts.map +0 -1
- package/dist/src/utils/bastion.js.map +0 -1
- package/dist/src/utils/build-info.d.ts.map +0 -1
- package/dist/src/utils/build-info.js.map +0 -1
- package/dist/src/utils/cache-home.d.ts.map +0 -1
- package/dist/src/utils/cache-home.js.map +0 -1
- package/dist/src/utils/capture-history.d.ts.map +0 -1
- package/dist/src/utils/capture-history.js.map +0 -1
- package/dist/src/utils/context.d.ts.map +0 -1
- package/dist/src/utils/context.js.map +0 -1
- package/dist/src/utils/credentials.d.ts.map +0 -1
- package/dist/src/utils/credentials.js.map +0 -1
- package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
- package/dist/src/utils/deploy-preflight.js.map +0 -1
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
- package/dist/src/utils/first-party-contexts.js.map +0 -1
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/kubeconfig.d.ts.map +0 -1
- package/dist/src/utils/kubeconfig.js.map +0 -1
- package/dist/src/utils/log.d.ts.map +0 -1
- package/dist/src/utils/log.js.map +0 -1
- package/dist/src/utils/mesh-json.d.ts.map +0 -1
- package/dist/src/utils/mesh-json.js.map +0 -1
- package/dist/src/utils/pid.d.ts.map +0 -1
- package/dist/src/utils/pid.js.map +0 -1
- package/dist/src/utils/pulumi-run.d.ts.map +0 -1
- package/dist/src/utils/pulumi-run.js.map +0 -1
- package/dist/src/utils/pulumi.d.ts.map +0 -1
- package/dist/src/utils/pulumi.js.map +0 -1
- package/dist/src/utils/reachability.d.ts.map +0 -1
- package/dist/src/utils/reachability.js.map +0 -1
- package/dist/src/utils/recover-conversation.d.ts.map +0 -1
- package/dist/src/utils/recover-conversation.js.map +0 -1
- package/dist/src/utils/registry-broker.d.ts.map +0 -1
- package/dist/src/utils/registry-broker.js.map +0 -1
- package/dist/src/utils/registry-identity.d.ts.map +0 -1
- package/dist/src/utils/registry-identity.js.map +0 -1
- package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
- package/dist/src/utils/scaffold-versions.js.map +0 -1
- package/dist/src/utils/socks-forward.d.ts.map +0 -1
- package/dist/src/utils/socks-forward.js.map +0 -1
- package/dist/src/utils/stack-flag.d.ts.map +0 -1
- package/dist/src/utils/stack-flag.js.map +0 -1
- package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
- package/dist/src/utils/tailscale-targets.js.map +0 -1
- package/dist/src/utils/tailscale.d.ts.map +0 -1
- package/dist/src/utils/tailscale.js.map +0 -1
- package/dist/src/utils/temporal-auth.d.ts.map +0 -1
- package/dist/src/utils/temporal-auth.js.map +0 -1
- package/dist/src/utils/temporal-codec.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.js.map +0 -1
- package/dist/src/utils/vpn-join.d.ts.map +0 -1
- package/dist/src/utils/vpn-join.js.map +0 -1
- package/dist/src/utils/vpn.d.ts.map +0 -1
- package/dist/src/utils/vpn.js.map +0 -1
- package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
- package/dist/src/utils/workflow-fingerprint.js.map +0 -1
- package/dist/src/utils/worktree-identity.d.ts.map +0 -1
- package/dist/src/utils/worktree-identity.js.map +0 -1
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How peers address each other inside a `mesh dev` session (MESH-2597).
|
|
3
|
-
*
|
|
4
|
-
* `mesh dev` allocates local ports and rewrites `localhost:<oldPort>` references
|
|
5
|
-
* across every service's env, which handles the PORT half of the question. The
|
|
6
|
-
* HOST half was never handled: an env var derived from a `link()` renders as
|
|
7
|
-
* `http://<svc>.<ns>.svc.cluster.local:8080`, and that survived untouched even
|
|
8
|
-
* when the service it names was one of the ones just started on this laptop.
|
|
9
|
-
*
|
|
10
|
-
* Observed 2026-08-01: after a relaunch, `studio-ui` held
|
|
11
|
-
* `AGENT_API_INTERNAL_URL=http://studio-api.fub-dev-studio.svc.cluster.local:8080`
|
|
12
|
-
* while `studio-api` was running locally on :40161. The UI's proxy dialled the
|
|
13
|
-
* cluster from the laptop, every request failed `getaddrinfo ENOTFOUND`, and the
|
|
14
|
-
* whole app returned `502 upstream unavailable`.
|
|
15
|
-
*
|
|
16
|
-
* Its own module rather than more of `dev.ts` (already ~3.7k lines) so the
|
|
17
|
-
* rewriting rule is testable without importing the launch path.
|
|
18
|
-
*/
|
|
19
|
-
/** The subset of a dev service this module reads. */
|
|
20
1
|
export interface AddressableService {
|
|
21
2
|
port: number;
|
|
22
|
-
/** Empty for a DEPLOYED service — it is not running here. */
|
|
23
3
|
command?: string[];
|
|
24
4
|
env?: Record<string, {
|
|
25
5
|
value: string;
|
|
@@ -28,24 +8,5 @@ export interface AddressableService {
|
|
|
28
8
|
export interface AddressableOutput {
|
|
29
9
|
services?: Record<string, AddressableService>;
|
|
30
10
|
}
|
|
31
|
-
/**
|
|
32
|
-
* `http(s)://<name>.<namespace>.svc.cluster.local[:port]`.
|
|
33
|
-
*
|
|
34
|
-
* Anchored on the full service name so `studio-api` cannot match
|
|
35
|
-
* `studio-api-worker`, and the name is escaped because it reaches this as data.
|
|
36
|
-
*/
|
|
37
11
|
export declare function clusterHostPattern(serviceName: string): RegExp;
|
|
38
|
-
/**
|
|
39
|
-
* Point every reference to a LOCALLY-RUN service at its local port.
|
|
40
|
-
*
|
|
41
|
-
* Only services this session actually runs are rewritten. A deployed-only service
|
|
42
|
-
* (no dev command) keeps its cluster address, because reaching that is the
|
|
43
|
-
* tunnels' job, not this one's — rewriting it would break the one case that
|
|
44
|
-
* currently works.
|
|
45
|
-
*
|
|
46
|
-
* The namespace is matched rather than resolved: the session already knows which
|
|
47
|
-
* services it started and on which ports, and re-deriving the namespace here
|
|
48
|
-
* would be a second source of truth for something the URL already carries.
|
|
49
|
-
*/
|
|
50
12
|
export declare function rewriteClusterHostsToLocal(devOutput: AddressableOutput): void;
|
|
51
|
-
//# sourceMappingURL=peer-addressing.d.ts.map
|
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How peers address each other inside a `mesh dev` session (MESH-2597).
|
|
3
|
-
*
|
|
4
|
-
* `mesh dev` allocates local ports and rewrites `localhost:<oldPort>` references
|
|
5
|
-
* across every service's env, which handles the PORT half of the question. The
|
|
6
|
-
* HOST half was never handled: an env var derived from a `link()` renders as
|
|
7
|
-
* `http://<svc>.<ns>.svc.cluster.local:8080`, and that survived untouched even
|
|
8
|
-
* when the service it names was one of the ones just started on this laptop.
|
|
9
|
-
*
|
|
10
|
-
* Observed 2026-08-01: after a relaunch, `studio-ui` held
|
|
11
|
-
* `AGENT_API_INTERNAL_URL=http://studio-api.fub-dev-studio.svc.cluster.local:8080`
|
|
12
|
-
* while `studio-api` was running locally on :40161. The UI's proxy dialled the
|
|
13
|
-
* cluster from the laptop, every request failed `getaddrinfo ENOTFOUND`, and the
|
|
14
|
-
* whole app returned `502 upstream unavailable`.
|
|
15
|
-
*
|
|
16
|
-
* Its own module rather than more of `dev.ts` (already ~3.7k lines) so the
|
|
17
|
-
* rewriting rule is testable without importing the launch path.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* `http(s)://<name>.<namespace>.svc.cluster.local[:port]`.
|
|
21
|
-
*
|
|
22
|
-
* Anchored on the full service name so `studio-api` cannot match
|
|
23
|
-
* `studio-api-worker`, and the name is escaped because it reaches this as data.
|
|
24
|
-
*/
|
|
25
1
|
export function clusterHostPattern(serviceName) {
|
|
26
2
|
const name = serviceName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
27
3
|
return new RegExp(`https?://${name}\\.[a-z0-9-]+\\.svc\\.cluster\\.local(?::\\d+)?`, "g");
|
|
28
4
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Point every reference to a LOCALLY-RUN service at its local port.
|
|
31
|
-
*
|
|
32
|
-
* Only services this session actually runs are rewritten. A deployed-only service
|
|
33
|
-
* (no dev command) keeps its cluster address, because reaching that is the
|
|
34
|
-
* tunnels' job, not this one's — rewriting it would break the one case that
|
|
35
|
-
* currently works.
|
|
36
|
-
*
|
|
37
|
-
* The namespace is matched rather than resolved: the session already knows which
|
|
38
|
-
* services it started and on which ports, and re-deriving the namespace here
|
|
39
|
-
* would be a second source of truth for something the URL already carries.
|
|
40
|
-
*/
|
|
41
5
|
export function rewriteClusterHostsToLocal(devOutput) {
|
|
42
6
|
const localPorts = new Map();
|
|
43
7
|
for (const [name, service] of Object.entries(devOutput.services ?? {})) {
|
|
@@ -61,4 +25,3 @@ export function rewriteClusterHostsToLocal(devOutput) {
|
|
|
61
25
|
}
|
|
62
26
|
}
|
|
63
27
|
}
|
|
64
|
-
//# sourceMappingURL=peer-addressing.js.map
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Who holds a port, and whether `mesh dev` may take it back (MESH-2590).
|
|
3
|
-
*
|
|
4
|
-
* The failure this exists to prevent: a service process outlives the tmux pane
|
|
5
|
-
* that supervised it, keeps listening, and the next launch either dies on
|
|
6
|
-
* `EADDRINUSE` or silently drifts to another port while the orphan keeps serving
|
|
7
|
-
* an earlier boot's configuration. Observed three times — the `:4200` Enlight dev
|
|
8
|
-
* server with no tmux owner, the 2026-07-29 detached bridge worker that won a
|
|
9
|
-
* dispatch and executed it against the wrong filesystem, and the 2026-07-31
|
|
10
|
-
* `studio-api` death on `:40161` where the Studio UI then drove a stale API and
|
|
11
|
-
* showed an empty conversation list.
|
|
12
|
-
*
|
|
13
|
-
* The decision is deliberately split from the process inspection: `decidePortHolder`
|
|
14
|
-
* is pure and unit-tested, `describePortHolder` does the `lsof`/`ps` work. Reclaiming
|
|
15
|
-
* kills a process, so the rule errs toward refusing — an unidentifiable owner is
|
|
16
|
-
* never killed, and neither is one belonging to a session that is still alive.
|
|
17
|
-
*/
|
|
18
|
-
/** A process listening on a port, with enough identity to adjudicate it. */
|
|
19
1
|
export interface PortHolder {
|
|
20
2
|
pid: number;
|
|
21
|
-
/** Executable name from `ps -o comm=`, or "unknown". */
|
|
22
3
|
command: string;
|
|
23
|
-
/** Working directory from lsof, or null when it could not be resolved. */
|
|
24
4
|
cwd: string | null;
|
|
25
5
|
}
|
|
26
6
|
export type PortDecision = {
|
|
@@ -34,36 +14,12 @@ export type PortDecision = {
|
|
|
34
14
|
holder: PortHolder;
|
|
35
15
|
reason: string;
|
|
36
16
|
};
|
|
37
|
-
/**
|
|
38
|
-
* Decide what to do about whatever holds a port.
|
|
39
|
-
*
|
|
40
|
-
* Reclaim exactly one case: an **orphan from this same worktree** — a process
|
|
41
|
-
* whose cwd is inside the worktree root and which belongs to no live session.
|
|
42
|
-
* That is the shape every observed incident had, and it is the only shape where
|
|
43
|
-
* killing is unambiguously correct.
|
|
44
|
-
*
|
|
45
|
-
* Everything else refuses, including the cases that look tempting:
|
|
46
|
-
* - owner unidentifiable → killing blind is worse than moving ports;
|
|
47
|
-
* - held by a live session → the user has a running `mesh dev`, and silently
|
|
48
|
-
* killing its service would turn one confusing session into two;
|
|
49
|
-
* - foreign cwd → not ours to take.
|
|
50
|
-
*/
|
|
51
17
|
export declare function decidePortHolder(holder: PortHolder | null, worktreeRoot: string, livePids: ReadonlySet<number>): PortDecision;
|
|
52
|
-
/** True when `child` is `root` or lives beneath it. */
|
|
53
18
|
export declare function isInside(child: string, root: string): boolean;
|
|
54
|
-
/** Identify the process listening on `port`; null when nothing holds it. */
|
|
55
19
|
export declare function describePortHolder(port: number): PortHolder | null;
|
|
56
|
-
/** `lsof -a -p <pid> -d cwd -Fn` prints `p<pid>`, `fcwd`, then `n<path>`. */
|
|
57
20
|
export declare function parseLsofCwd(out: string): string | null;
|
|
58
|
-
/**
|
|
59
|
-
* Terminate a reclaimed holder and wait for the port to actually clear. SIGTERM
|
|
60
|
-
* first so the process can shut down its own listeners; SIGKILL only if it is
|
|
61
|
-
* still holding on. Returns true once nothing is listening.
|
|
62
|
-
*/
|
|
63
21
|
export declare function reclaimPort(port: number, holder: PortHolder, opts: {
|
|
64
22
|
timeoutMs?: number;
|
|
65
23
|
isPortFree: (port: number) => Promise<boolean>;
|
|
66
|
-
/** Injectable so tests never signal a real process. */
|
|
67
24
|
kill?: (pid: number, signal: NodeJS.Signals) => void;
|
|
68
25
|
}): Promise<boolean>;
|
|
69
|
-
//# sourceMappingURL=port-ownership.d.ts.map
|
|
@@ -1,37 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Who holds a port, and whether `mesh dev` may take it back (MESH-2590).
|
|
3
|
-
*
|
|
4
|
-
* The failure this exists to prevent: a service process outlives the tmux pane
|
|
5
|
-
* that supervised it, keeps listening, and the next launch either dies on
|
|
6
|
-
* `EADDRINUSE` or silently drifts to another port while the orphan keeps serving
|
|
7
|
-
* an earlier boot's configuration. Observed three times — the `:4200` Enlight dev
|
|
8
|
-
* server with no tmux owner, the 2026-07-29 detached bridge worker that won a
|
|
9
|
-
* dispatch and executed it against the wrong filesystem, and the 2026-07-31
|
|
10
|
-
* `studio-api` death on `:40161` where the Studio UI then drove a stale API and
|
|
11
|
-
* showed an empty conversation list.
|
|
12
|
-
*
|
|
13
|
-
* The decision is deliberately split from the process inspection: `decidePortHolder`
|
|
14
|
-
* is pure and unit-tested, `describePortHolder` does the `lsof`/`ps` work. Reclaiming
|
|
15
|
-
* kills a process, so the rule errs toward refusing — an unidentifiable owner is
|
|
16
|
-
* never killed, and neither is one belonging to a session that is still alive.
|
|
17
|
-
*/
|
|
18
1
|
import { execFileSync } from 'node:child_process';
|
|
19
2
|
import * as path from 'node:path';
|
|
20
3
|
import { assertSignalablePid } from '../utils/pid.js';
|
|
21
|
-
/**
|
|
22
|
-
* Decide what to do about whatever holds a port.
|
|
23
|
-
*
|
|
24
|
-
* Reclaim exactly one case: an **orphan from this same worktree** — a process
|
|
25
|
-
* whose cwd is inside the worktree root and which belongs to no live session.
|
|
26
|
-
* That is the shape every observed incident had, and it is the only shape where
|
|
27
|
-
* killing is unambiguously correct.
|
|
28
|
-
*
|
|
29
|
-
* Everything else refuses, including the cases that look tempting:
|
|
30
|
-
* - owner unidentifiable → killing blind is worse than moving ports;
|
|
31
|
-
* - held by a live session → the user has a running `mesh dev`, and silently
|
|
32
|
-
* killing its service would turn one confusing session into two;
|
|
33
|
-
* - foreign cwd → not ours to take.
|
|
34
|
-
*/
|
|
35
4
|
export function decidePortHolder(holder, worktreeRoot, livePids) {
|
|
36
5
|
if (holder === null)
|
|
37
6
|
return { action: 'free' };
|
|
@@ -62,13 +31,11 @@ export function decidePortHolder(holder, worktreeRoot, livePids) {
|
|
|
62
31
|
reason: 'orphaned service from an earlier boot of this worktree',
|
|
63
32
|
};
|
|
64
33
|
}
|
|
65
|
-
/** True when `child` is `root` or lives beneath it. */
|
|
66
34
|
export function isInside(child, root) {
|
|
67
35
|
const c = path.resolve(child);
|
|
68
36
|
const r = path.resolve(root);
|
|
69
37
|
return c === r || c.startsWith(r + path.sep);
|
|
70
38
|
}
|
|
71
|
-
/** Identify the process listening on `port`; null when nothing holds it. */
|
|
72
39
|
export function describePortHolder(port) {
|
|
73
40
|
const pid = firstListenerPid(port);
|
|
74
41
|
if (pid === null)
|
|
@@ -86,7 +53,6 @@ function firstListenerPid(port) {
|
|
|
86
53
|
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
87
54
|
}
|
|
88
55
|
catch {
|
|
89
|
-
// lsof exits non-zero when nothing matches, which is the common case.
|
|
90
56
|
return null;
|
|
91
57
|
}
|
|
92
58
|
}
|
|
@@ -102,7 +68,6 @@ function processCommand(pid) {
|
|
|
102
68
|
return 'unknown';
|
|
103
69
|
}
|
|
104
70
|
}
|
|
105
|
-
/** `lsof -a -p <pid> -d cwd -Fn` prints `p<pid>`, `fcwd`, then `n<path>`. */
|
|
106
71
|
export function parseLsofCwd(out) {
|
|
107
72
|
for (const line of out.trim().split('\n')) {
|
|
108
73
|
if (line.startsWith('n'))
|
|
@@ -122,16 +87,7 @@ function processCwd(pid) {
|
|
|
122
87
|
return null;
|
|
123
88
|
}
|
|
124
89
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Terminate a reclaimed holder and wait for the port to actually clear. SIGTERM
|
|
127
|
-
* first so the process can shut down its own listeners; SIGKILL only if it is
|
|
128
|
-
* still holding on. Returns true once nothing is listening.
|
|
129
|
-
*/
|
|
130
90
|
export async function reclaimPort(port, holder, opts) {
|
|
131
|
-
// `holder.pid` came out of `lsof`, so it is recovered input exactly like the
|
|
132
|
-
// pids read back from `tunnel-state.json` / `daemon.json` — see the header of
|
|
133
|
-
// `utils/pid.ts` for what an unguarded one costs. No `file:` remediation here:
|
|
134
|
-
// there is no state file to delete, the value is re-derived every run.
|
|
135
91
|
assertSignalablePid(holder.pid, { what: `the process holding port ${port}` });
|
|
136
92
|
const kill = opts.kill ?? ((pid, signal) => process.kill(pid, signal));
|
|
137
93
|
const deadline = Date.now() + (opts.timeoutMs ?? 5_000);
|
|
@@ -139,7 +95,6 @@ export async function reclaimPort(port, holder, opts) {
|
|
|
139
95
|
kill(holder.pid, 'SIGTERM');
|
|
140
96
|
}
|
|
141
97
|
catch {
|
|
142
|
-
// Already gone; fall through to the freeness poll.
|
|
143
98
|
}
|
|
144
99
|
let escalated = false;
|
|
145
100
|
while (Date.now() < deadline) {
|
|
@@ -151,11 +106,9 @@ export async function reclaimPort(port, holder, opts) {
|
|
|
151
106
|
kill(holder.pid, 'SIGKILL');
|
|
152
107
|
}
|
|
153
108
|
catch {
|
|
154
|
-
/* raced with exit */
|
|
155
109
|
}
|
|
156
110
|
}
|
|
157
111
|
await new Promise((r) => setTimeout(r, 150));
|
|
158
112
|
}
|
|
159
113
|
return opts.isPortFree(port);
|
|
160
114
|
}
|
|
161
|
-
//# sourceMappingURL=port-ownership.js.map
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh registry publish --snapshot` — publish an in-development *snapshot* of the
|
|
3
|
-
* @mesh-tech/* packages to CodeArtifact under a `dev` dist-tag.
|
|
4
|
-
*
|
|
5
|
-
* Why: a consumer repo outside the monorepo (e.g. fub-mesh-apps) can't use
|
|
6
|
-
* `workspace:*`, and cutting a real release for every SDK/UI tweak is heavy. A
|
|
7
|
-
* snapshot publishes the CURRENT source at a throwaway prerelease version
|
|
8
|
-
* (`0.0.0-dev.<stamp>.<sha>`). Because it's a `0.0.0` prerelease, a consumer's
|
|
9
|
-
* `^`/`~` ranges NEVER auto-resolve it — it's picked up ONLY by an explicit pin
|
|
10
|
-
* or the `dev` dist-tag. That's the "pushed to the registry but explicitly
|
|
11
|
-
* referenced" contract.
|
|
12
|
-
*
|
|
13
|
-
* Real releases still go through changesets + the changeset-version CI workflow;
|
|
14
|
-
* this command is dev-loop tooling only and never touches the `latest` dist-tag.
|
|
15
|
-
*
|
|
16
|
-
* Mechanism: set the snapshot version into each selected publishable package.json,
|
|
17
|
-
* reuse the proven scripts/publish-packages.sh (which runs build:publish — whose
|
|
18
|
-
* build-for-publish.ts rewrites internal workspace:* deps to the local version,
|
|
19
|
-
* i.e. the snapshot — then publishes each package), always restore the source
|
|
20
|
-
* package.json versions afterward.
|
|
21
|
-
*/
|
|
22
1
|
import { execFileSync, execSync } from "child_process";
|
|
23
2
|
import * as fs from "fs";
|
|
24
3
|
import * as path from "path";
|
|
@@ -27,24 +6,16 @@ import { resolveCredentials, codeartifactLogin } from "./registry.js";
|
|
|
27
6
|
function repoRoot() {
|
|
28
7
|
return execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
|
|
29
8
|
}
|
|
30
|
-
/** `0.0.0-dev.<YYYYMMDDHHMMSS>.<shortsha>` — a valid semver prerelease. */
|
|
31
9
|
function computeSnapshotVersion(root) {
|
|
32
10
|
const sha = execSync("git rev-parse --short HEAD", { cwd: root, encoding: "utf-8" }).trim();
|
|
33
11
|
const stamp = new Date().toISOString().replace(/[-:T]/g, "").slice(0, 14);
|
|
34
12
|
return `0.0.0-dev.${stamp}.${sha}`;
|
|
35
13
|
}
|
|
36
|
-
/** Rewrite the top-level "version" field, preserving the file's formatting. */
|
|
37
14
|
function setPackageVersion(file, version) {
|
|
38
15
|
const content = fs.readFileSync(file, "utf-8");
|
|
39
16
|
const next = content.replace(/"version"(\s*:\s*)"[^"]*"/, `"version"$1"${version}"`);
|
|
40
17
|
fs.writeFileSync(file, next);
|
|
41
18
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Tracked package.json files with uncommitted modifications (`git diff`), as a set
|
|
44
|
-
* of repo-relative paths. Used to tell the user's OWN pre-existing edits apart from
|
|
45
|
-
* files `build:publish` dirties as a side effect (it re-vendors e.g. hub subpackages),
|
|
46
|
-
* so cleanup reverts only the latter.
|
|
47
|
-
*/
|
|
48
19
|
function dirtyPackageJsons(root) {
|
|
49
20
|
const out = execSync("git diff --name-only", { cwd: root, encoding: "utf-8" });
|
|
50
21
|
return new Set(out.split("\n").map((s) => s.trim()).filter((s) => s.endsWith("package.json")));
|
|
@@ -67,7 +38,6 @@ export function registerRegistryPublish(registry) {
|
|
|
67
38
|
process.exit(1);
|
|
68
39
|
}
|
|
69
40
|
const root = repoRoot();
|
|
70
|
-
// 1. CodeArtifact auth (token + scoped registry written to ~/.npmrc).
|
|
71
41
|
const awsCreds = resolveCredentials(context, opts.role);
|
|
72
42
|
const env = Object.keys(awsCreds).length > 0
|
|
73
43
|
? { ...process.env, ...awsCreds }
|
|
@@ -77,7 +47,6 @@ export function registerRegistryPublish(registry) {
|
|
|
77
47
|
logError("CodeArtifact login failed. Run: mesh registry login <context>");
|
|
78
48
|
process.exit(1);
|
|
79
49
|
}
|
|
80
|
-
// 2. Resolve the publishable set (optionally filtered by --only).
|
|
81
50
|
const listPath = path.join(root, "scripts/lib/publishable-packages.json");
|
|
82
51
|
const all = JSON.parse(fs.readFileSync(listPath, "utf-8"));
|
|
83
52
|
const patterns = (opts.only ?? "")
|
|
@@ -91,15 +60,9 @@ export function registerRegistryPublish(registry) {
|
|
|
91
60
|
logError(`No publishable package matched --only '${opts.only}'`);
|
|
92
61
|
process.exit(1);
|
|
93
62
|
}
|
|
94
|
-
// 3. Snapshot version — uniform across the selected set so their internal
|
|
95
|
-
// @mesh-tech deps rewrite to the same version.
|
|
96
63
|
const version = computeSnapshotVersion(root);
|
|
97
64
|
logInfo(`Snapshot version: ${version} (dist-tag '${opts.tag}')`);
|
|
98
|
-
// Snapshot the user's PRE-EXISTING dirty package.json set, so the cleanup in
|
|
99
|
-
// `finally` reverts only what this run (and build:publish) touched, never their edits.
|
|
100
65
|
const preDirty = dirtyPackageJsons(root);
|
|
101
|
-
// 4. Stamp the version onto each selected package (+ its sub-packages),
|
|
102
|
-
// remembering the originals so we can always restore.
|
|
103
66
|
const backups = [];
|
|
104
67
|
const stamp = (dir) => {
|
|
105
68
|
const file = path.join(root, dir, "package.json");
|
|
@@ -115,15 +78,11 @@ export function registerRegistryPublish(registry) {
|
|
|
115
78
|
stamp(path.join(p.dir, typeof sub === "string" ? sub : sub.dir));
|
|
116
79
|
}
|
|
117
80
|
}
|
|
118
|
-
// 5. Build + publish via the proven script (dev tag, never `latest`).
|
|
119
81
|
const args = [
|
|
120
82
|
"scripts/publish-packages.sh",
|
|
121
83
|
"--tag",
|
|
122
84
|
opts.tag,
|
|
123
85
|
"--skip-latest",
|
|
124
|
-
// Pass the TS-resolved DIRS (not the raw patterns) so the shell's
|
|
125
|
-
// dir-substring --only filter selects exactly the set we stamped —
|
|
126
|
-
// a name-only pattern would otherwise stamp here but be skipped there.
|
|
127
86
|
...(patterns.length ? ["--only", selected.map((p) => p.dir).join(",")] : []),
|
|
128
87
|
...(opts.dryRun ? ["--dry-run"] : []),
|
|
129
88
|
];
|
|
@@ -134,9 +93,6 @@ export function registerRegistryPublish(registry) {
|
|
|
134
93
|
for (const b of backups)
|
|
135
94
|
fs.writeFileSync(b.file, b.content);
|
|
136
95
|
logInfo("Restored source package.json versions.");
|
|
137
|
-
// build:publish re-vendors some package.json files (e.g. hub subpackages)
|
|
138
|
-
// beyond the ones we stamped — revert those too so a local run leaves a clean
|
|
139
|
-
// tree, but NEVER the user's own pre-existing edits.
|
|
140
96
|
const collateral = [...dirtyPackageJsons(root)].filter((f) => !preDirty.has(f));
|
|
141
97
|
if (collateral.length) {
|
|
142
98
|
try {
|
|
@@ -148,7 +104,6 @@ export function registerRegistryPublish(registry) {
|
|
|
148
104
|
}
|
|
149
105
|
}
|
|
150
106
|
}
|
|
151
|
-
// 6. Tell the user exactly how to consume it.
|
|
152
107
|
logSuccess(`Published snapshot ${version} under dist-tag '${opts.tag}'.`);
|
|
153
108
|
console.log("\nPin these EXACTLY in the consumer repo (prereleases are never auto-resolved by ^/~):");
|
|
154
109
|
for (const p of selected)
|
|
@@ -158,4 +113,3 @@ export function registerRegistryPublish(registry) {
|
|
|
158
113
|
.join(" ")}`);
|
|
159
114
|
});
|
|
160
115
|
}
|
|
161
|
-
//# sourceMappingURL=registry-publish.js.map
|