@mesh-tech/mesh-cli 0.20.2 → 0.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/mesh.d.ts +0 -12
- package/dist/bin/mesh.js +15 -13
- package/dist/bin/mesh.js.map +1 -2
- package/dist/build-info.json +2 -2
- package/dist/src/commands/agent-api-client.d.ts +0 -70
- package/dist/src/commands/agent-api-client.js +0 -80
- package/dist/src/commands/app-check.d.ts +0 -56
- package/dist/src/commands/app-check.js +0 -72
- package/dist/src/commands/artifacts.d.ts +0 -11
- package/dist/src/commands/artifacts.js +0 -33
- package/dist/src/commands/cluster.d.ts +0 -39
- package/dist/src/commands/cluster.js +0 -73
- package/dist/src/commands/conversations.d.ts +0 -36
- package/dist/src/commands/conversations.js +0 -59
- package/dist/src/commands/create-app.d.ts +0 -98
- package/dist/src/commands/create-app.js +1 -163
- package/dist/src/commands/db/connect.d.ts +0 -7
- package/dist/src/commands/db/connect.js +0 -9
- package/dist/src/commands/db/credentials.d.ts +0 -7
- package/dist/src/commands/db/credentials.js +0 -10
- package/dist/src/commands/db/env.d.ts +0 -6
- package/dist/src/commands/db/env.js +0 -14
- package/dist/src/commands/db/exec.d.ts +0 -43
- package/dist/src/commands/db/exec.js +0 -69
- package/dist/src/commands/db/index.d.ts +0 -10
- package/dist/src/commands/db/index.js +0 -10
- package/dist/src/commands/db/psql.d.ts +0 -7
- package/dist/src/commands/db/psql.js +0 -18
- package/dist/src/commands/deploy.d.ts +0 -38
- package/dist/src/commands/deploy.js +1 -76
- package/dist/src/commands/dev-doctor.d.ts +0 -82
- package/dist/src/commands/dev-doctor.js +3 -132
- package/dist/src/commands/dev-launch.d.ts +0 -52
- package/dist/src/commands/dev-launch.js +0 -56
- package/dist/src/commands/dev-token-server.d.ts +0 -18
- package/dist/src/commands/dev-token-server.js +1 -24
- package/dist/src/commands/dev.d.ts +0 -246
- package/dist/src/commands/dev.js +5 -963
- package/dist/src/commands/docs.d.ts +0 -1
- package/dist/src/commands/docs.js +0 -12
- package/dist/src/commands/hub/index.d.ts +0 -60
- package/dist/src/commands/hub/index.js +2 -139
- package/dist/src/commands/init/wizard.d.ts +0 -128
- package/dist/src/commands/init/wizard.js +0 -109
- package/dist/src/commands/init.d.ts +0 -55
- package/dist/src/commands/init.js +0 -70
- package/dist/src/commands/install-shim.d.ts +0 -23
- package/dist/src/commands/install-shim.js +2 -29
- package/dist/src/commands/local/auth-provision.d.ts +0 -80
- package/dist/src/commands/local/auth-provision.js +0 -109
- package/dist/src/commands/local/dev-local.d.ts +0 -91
- package/dist/src/commands/local/dev-local.js +0 -147
- package/dist/src/commands/local/docker-runner.d.ts +0 -22
- package/dist/src/commands/local/docker-runner.js +2 -35
- package/dist/src/commands/local/helpers.d.ts +0 -14
- package/dist/src/commands/local/helpers.js +0 -13
- package/dist/src/commands/local/hub-local.d.ts +0 -96
- package/dist/src/commands/local/hub-local.js +0 -111
- package/dist/src/commands/local/index.d.ts +0 -14
- package/dist/src/commands/local/index.js +0 -86
- package/dist/src/commands/local/mocks.d.ts +0 -269
- package/dist/src/commands/local/mocks.js +1 -274
- package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
- package/dist/src/commands/local/seed-hub-catalog.js +0 -41
- package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
- package/dist/src/commands/local/seed-zitadel.js +0 -158
- package/dist/src/commands/local/seed.d.ts +0 -64
- package/dist/src/commands/local/seed.js +0 -78
- package/dist/src/commands/local/stack.d.ts +0 -141
- package/dist/src/commands/local/stack.js +0 -153
- package/dist/src/commands/login.d.ts +0 -265
- package/dist/src/commands/login.js +4 -418
- package/dist/src/commands/peer-addressing.d.ts +0 -39
- package/dist/src/commands/peer-addressing.js +0 -37
- package/dist/src/commands/port-ownership.d.ts +0 -44
- package/dist/src/commands/port-ownership.js +0 -47
- package/dist/src/commands/registry-publish.d.ts +0 -1
- package/dist/src/commands/registry-publish.js +0 -46
- package/dist/src/commands/registry.d.ts +4 -237
- package/dist/src/commands/registry.js +2 -316
- package/dist/src/commands/secrets/exec.d.ts +0 -16
- package/dist/src/commands/secrets/exec.js +0 -24
- package/dist/src/commands/secrets/index.d.ts +0 -9
- package/dist/src/commands/secrets/index.js +0 -10
- package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
- package/dist/src/commands/secrets/migrate-config.js +0 -40
- package/dist/src/commands/secrets/reindex.d.ts +0 -38
- package/dist/src/commands/secrets/reindex.js +0 -39
- package/dist/src/commands/secrets/set.d.ts +0 -47
- package/dist/src/commands/secrets/set.js +0 -107
- package/dist/src/commands/site.d.ts +0 -1
- package/dist/src/commands/site.js +0 -61
- package/dist/src/commands/skills.d.ts +0 -61
- package/dist/src/commands/skills.js +0 -83
- package/dist/src/commands/stack.d.ts +0 -15
- package/dist/src/commands/stack.js +1 -128
- package/dist/src/commands/temporal.d.ts +0 -30
- package/dist/src/commands/temporal.js +3 -1
- package/dist/src/commands/temporal.js.map +1 -2
- package/dist/src/commands/tenant.d.ts +0 -31
- package/dist/src/commands/tenant.js +0 -55
- package/dist/src/commands/tunnel/index.d.ts +0 -40
- package/dist/src/commands/tunnel/index.js +0 -141
- package/dist/src/commands/vcs/clone.d.ts +0 -1
- package/dist/src/commands/vcs/clone.js +0 -4
- package/dist/src/commands/vcs/common.d.ts +0 -32
- package/dist/src/commands/vcs/common.js +0 -41
- package/dist/src/commands/vcs/drafts.d.ts +0 -1
- package/dist/src/commands/vcs/drafts.js +0 -1
- package/dist/src/commands/vcs/get.d.ts +0 -1
- package/dist/src/commands/vcs/get.js +0 -11
- package/dist/src/commands/vcs/index.d.ts +0 -1
- package/dist/src/commands/vcs/index.js +0 -1
- package/dist/src/commands/vcs/propose.d.ts +0 -26
- package/dist/src/commands/vcs/propose.js +3 -34
- package/dist/src/commands/vcs/review.d.ts +0 -1
- package/dist/src/commands/vcs/review.js +0 -1
- package/dist/src/commands/vcs/rm.d.ts +0 -11
- package/dist/src/commands/vcs/rm.js +0 -14
- package/dist/src/commands/vcs-enrich.d.ts +0 -12
- package/dist/src/commands/vcs-enrich.js +0 -12
- package/dist/src/commands/vpn/index.d.ts +0 -17
- package/dist/src/commands/vpn/index.js +0 -102
- package/dist/src/commands/vpn/tunnel.d.ts +0 -9
- package/dist/src/commands/vpn/tunnel.js +0 -37
- package/dist/src/commands/workflow.d.ts +0 -22
- package/dist/src/commands/workflow.js +0 -80
- package/dist/src/docs/assemble.d.ts +0 -117
- package/dist/src/docs/assemble.js +0 -142
- package/dist/src/docs/cli-reference.d.ts +0 -58
- package/dist/src/docs/cli-reference.js +0 -77
- package/dist/src/docs/discover.d.ts +0 -40
- package/dist/src/docs/discover.js +2 -60
- package/dist/src/docs/portal.d.ts +0 -44
- package/dist/src/docs/portal.js +0 -49
- package/dist/src/docs/registry-docs.d.ts +0 -29
- package/dist/src/docs/registry-docs.js +0 -40
- package/dist/src/docs/schema.d.ts +0 -36
- package/dist/src/docs/schema.js +0 -52
- package/dist/src/docs/serve.d.ts +0 -18
- package/dist/src/docs/serve.js +2 -30
- package/dist/src/docs/start.d.ts +0 -42
- package/dist/src/docs/start.js +0 -70
- package/dist/src/eval/agent-eval.d.mts +0 -12
- package/dist/src/eval/agent-eval.mjs +0 -22
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.js.map +0 -1
- package/dist/src/program.d.ts +0 -20
- package/dist/src/program.js +0 -24
- package/dist/src/utils/auth-preflight.d.ts +0 -137
- package/dist/src/utils/auth-preflight.js +0 -149
- package/dist/src/utils/aws-auth.d.ts +0 -163
- package/dist/src/utils/aws-auth.js +3 -232
- package/dist/src/utils/bastion.d.ts +0 -27
- package/dist/src/utils/bastion.js +0 -28
- package/dist/src/utils/build-info.d.ts +0 -22
- package/dist/src/utils/build-info.js +0 -27
- package/dist/src/utils/cache-home.d.ts +0 -23
- package/dist/src/utils/cache-home.js +0 -25
- package/dist/src/utils/capture-history.d.ts +0 -54
- package/dist/src/utils/capture-history.js +1 -55
- package/dist/src/utils/context.d.ts +0 -23
- package/dist/src/utils/context.js +0 -43
- package/dist/src/utils/credentials.d.ts +0 -38
- package/dist/src/utils/credentials.js +0 -39
- package/dist/src/utils/deploy-preflight.d.ts +0 -38
- package/dist/src/utils/deploy-preflight.js +1 -71
- package/dist/src/utils/errors.d.ts +0 -53
- package/dist/src/utils/errors.js +0 -49
- package/dist/src/utils/first-party-contexts.d.ts +0 -38
- package/dist/src/utils/first-party-contexts.js +0 -44
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.js +0 -4
- package/dist/src/utils/kubeconfig.d.ts +0 -40
- package/dist/src/utils/kubeconfig.js +0 -44
- package/dist/src/utils/log.d.ts +0 -20
- package/dist/src/utils/log.js +0 -20
- package/dist/src/utils/mesh-json.d.ts +0 -46
- package/dist/src/utils/mesh-json.js +0 -39
- package/dist/src/utils/pid.d.ts +0 -42
- package/dist/src/utils/pid.js +0 -48
- package/dist/src/utils/pulumi-run.d.ts +0 -14
- package/dist/src/utils/pulumi-run.js +0 -42
- package/dist/src/utils/pulumi.d.ts +0 -34
- package/dist/src/utils/pulumi.js +0 -38
- package/dist/src/utils/reachability.d.ts +0 -27
- package/dist/src/utils/reachability.js +0 -40
- package/dist/src/utils/recover-conversation.d.ts +0 -110
- package/dist/src/utils/recover-conversation.js +0 -108
- package/dist/src/utils/registry-broker.d.ts +5 -84
- package/dist/src/utils/registry-broker.js +0 -62
- package/dist/src/utils/registry-identity.d.ts +0 -149
- package/dist/src/utils/registry-identity.js +0 -143
- package/dist/src/utils/scaffold-versions.d.ts +0 -41
- package/dist/src/utils/scaffold-versions.js +0 -42
- package/dist/src/utils/socks-forward.d.ts +0 -24
- package/dist/src/utils/socks-forward.js +2 -25
- package/dist/src/utils/stack-flag.d.ts +0 -13
- package/dist/src/utils/stack-flag.js +0 -21
- package/dist/src/utils/tailscale-targets.d.ts +0 -37
- package/dist/src/utils/tailscale-targets.js +0 -33
- package/dist/src/utils/tailscale.d.ts +0 -177
- package/dist/src/utils/tailscale.js +6 -337
- package/dist/src/utils/temporal-auth.d.ts +0 -41
- package/dist/src/utils/temporal-auth.js +0 -52
- package/dist/src/utils/temporal-codec.d.ts +0 -89
- package/dist/src/utils/temporal-codec.js.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts +0 -79
- package/dist/src/utils/tunnel-ownership.js +0 -74
- package/dist/src/utils/vpn-join.d.ts +0 -16
- package/dist/src/utils/vpn-join.js +0 -17
- package/dist/src/utils/vpn.d.ts +0 -42
- package/dist/src/utils/vpn.js +0 -52
- package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
- package/dist/src/utils/workflow-fingerprint.js +1 -63
- package/dist/src/utils/worktree-identity.d.ts +0 -62
- package/dist/src/utils/worktree-identity.js +0 -88
- package/package.json +2 -2
- package/skills/core/SKILL.md +9 -10
- package/templates/api-auth/api/src/index.ts.hbs +1 -1
- package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
- package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
- package/templates/api-role-gating/index.ts.hbs +1 -1
- package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
- package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
- package/templates/platform-repo/platform/index.ts +1 -1
- package/dist/bin/mesh.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.js.map +0 -1
- package/dist/src/commands/app-check.d.ts.map +0 -1
- package/dist/src/commands/app-check.js.map +0 -1
- package/dist/src/commands/artifacts.d.ts.map +0 -1
- package/dist/src/commands/artifacts.js.map +0 -1
- package/dist/src/commands/cluster.d.ts.map +0 -1
- package/dist/src/commands/cluster.js.map +0 -1
- package/dist/src/commands/conversations.d.ts.map +0 -1
- package/dist/src/commands/conversations.js.map +0 -1
- package/dist/src/commands/create-app.d.ts.map +0 -1
- package/dist/src/commands/create-app.js.map +0 -1
- package/dist/src/commands/db/connect.d.ts.map +0 -1
- package/dist/src/commands/db/connect.js.map +0 -1
- package/dist/src/commands/db/credentials.d.ts.map +0 -1
- package/dist/src/commands/db/credentials.js.map +0 -1
- package/dist/src/commands/db/env.d.ts.map +0 -1
- package/dist/src/commands/db/env.js.map +0 -1
- package/dist/src/commands/db/exec.d.ts.map +0 -1
- package/dist/src/commands/db/exec.js.map +0 -1
- package/dist/src/commands/db/index.d.ts.map +0 -1
- package/dist/src/commands/db/index.js.map +0 -1
- package/dist/src/commands/db/psql.d.ts.map +0 -1
- package/dist/src/commands/db/psql.js.map +0 -1
- package/dist/src/commands/deploy.d.ts.map +0 -1
- package/dist/src/commands/deploy.js.map +0 -1
- package/dist/src/commands/dev-doctor.d.ts.map +0 -1
- package/dist/src/commands/dev-doctor.js.map +0 -1
- package/dist/src/commands/dev-launch.d.ts.map +0 -1
- package/dist/src/commands/dev-launch.js.map +0 -1
- package/dist/src/commands/dev-token-server.d.ts.map +0 -1
- package/dist/src/commands/dev-token-server.js.map +0 -1
- package/dist/src/commands/dev.d.ts.map +0 -1
- package/dist/src/commands/dev.js.map +0 -1
- package/dist/src/commands/docs.d.ts.map +0 -1
- package/dist/src/commands/docs.js.map +0 -1
- package/dist/src/commands/hub/index.d.ts.map +0 -1
- package/dist/src/commands/hub/index.js.map +0 -1
- package/dist/src/commands/init/wizard.d.ts.map +0 -1
- package/dist/src/commands/init/wizard.js.map +0 -1
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/install-shim.d.ts.map +0 -1
- package/dist/src/commands/install-shim.js.map +0 -1
- package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
- package/dist/src/commands/local/auth-provision.js.map +0 -1
- package/dist/src/commands/local/dev-local.d.ts.map +0 -1
- package/dist/src/commands/local/dev-local.js.map +0 -1
- package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
- package/dist/src/commands/local/docker-runner.js.map +0 -1
- package/dist/src/commands/local/helpers.d.ts.map +0 -1
- package/dist/src/commands/local/helpers.js.map +0 -1
- package/dist/src/commands/local/hub-local.d.ts.map +0 -1
- package/dist/src/commands/local/hub-local.js.map +0 -1
- package/dist/src/commands/local/index.d.ts.map +0 -1
- package/dist/src/commands/local/index.js.map +0 -1
- package/dist/src/commands/local/mocks.d.ts.map +0 -1
- package/dist/src/commands/local/mocks.js.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
- package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
- package/dist/src/commands/local/seed-zitadel.js.map +0 -1
- package/dist/src/commands/local/seed.d.ts.map +0 -1
- package/dist/src/commands/local/seed.js.map +0 -1
- package/dist/src/commands/local/stack.d.ts.map +0 -1
- package/dist/src/commands/local/stack.js.map +0 -1
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/peer-addressing.d.ts.map +0 -1
- package/dist/src/commands/peer-addressing.js.map +0 -1
- package/dist/src/commands/port-ownership.d.ts.map +0 -1
- package/dist/src/commands/port-ownership.js.map +0 -1
- package/dist/src/commands/registry-publish.d.ts.map +0 -1
- package/dist/src/commands/registry-publish.js.map +0 -1
- package/dist/src/commands/registry.d.ts.map +0 -1
- package/dist/src/commands/registry.js.map +0 -1
- package/dist/src/commands/secrets/exec.d.ts.map +0 -1
- package/dist/src/commands/secrets/exec.js.map +0 -1
- package/dist/src/commands/secrets/index.d.ts.map +0 -1
- package/dist/src/commands/secrets/index.js.map +0 -1
- package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
- package/dist/src/commands/secrets/migrate-config.js.map +0 -1
- package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
- package/dist/src/commands/secrets/reindex.js.map +0 -1
- package/dist/src/commands/secrets/set.d.ts.map +0 -1
- package/dist/src/commands/secrets/set.js.map +0 -1
- package/dist/src/commands/site.d.ts.map +0 -1
- package/dist/src/commands/site.js.map +0 -1
- package/dist/src/commands/skills.d.ts.map +0 -1
- package/dist/src/commands/skills.js.map +0 -1
- package/dist/src/commands/stack.d.ts.map +0 -1
- package/dist/src/commands/stack.js.map +0 -1
- package/dist/src/commands/temporal.d.ts.map +0 -1
- package/dist/src/commands/tenant.d.ts.map +0 -1
- package/dist/src/commands/tenant.js.map +0 -1
- package/dist/src/commands/tunnel/index.d.ts.map +0 -1
- package/dist/src/commands/tunnel/index.js.map +0 -1
- package/dist/src/commands/vcs/clone.d.ts.map +0 -1
- package/dist/src/commands/vcs/clone.js.map +0 -1
- package/dist/src/commands/vcs/common.d.ts.map +0 -1
- package/dist/src/commands/vcs/common.js.map +0 -1
- package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
- package/dist/src/commands/vcs/drafts.js.map +0 -1
- package/dist/src/commands/vcs/get.d.ts.map +0 -1
- package/dist/src/commands/vcs/get.js.map +0 -1
- package/dist/src/commands/vcs/index.d.ts.map +0 -1
- package/dist/src/commands/vcs/index.js.map +0 -1
- package/dist/src/commands/vcs/propose.d.ts.map +0 -1
- package/dist/src/commands/vcs/propose.js.map +0 -1
- package/dist/src/commands/vcs/review.d.ts.map +0 -1
- package/dist/src/commands/vcs/review.js.map +0 -1
- package/dist/src/commands/vcs/rm.d.ts.map +0 -1
- package/dist/src/commands/vcs/rm.js.map +0 -1
- package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
- package/dist/src/commands/vcs-enrich.js.map +0 -1
- package/dist/src/commands/vpn/index.d.ts.map +0 -1
- package/dist/src/commands/vpn/index.js.map +0 -1
- package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
- package/dist/src/commands/vpn/tunnel.js.map +0 -1
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/docs/assemble.d.ts.map +0 -1
- package/dist/src/docs/assemble.js.map +0 -1
- package/dist/src/docs/cli-reference.d.ts.map +0 -1
- package/dist/src/docs/cli-reference.js.map +0 -1
- package/dist/src/docs/discover.d.ts.map +0 -1
- package/dist/src/docs/discover.js.map +0 -1
- package/dist/src/docs/portal.d.ts.map +0 -1
- package/dist/src/docs/portal.js.map +0 -1
- package/dist/src/docs/registry-docs.d.ts.map +0 -1
- package/dist/src/docs/registry-docs.js.map +0 -1
- package/dist/src/docs/schema.d.ts.map +0 -1
- package/dist/src/docs/schema.js.map +0 -1
- package/dist/src/docs/serve.d.ts.map +0 -1
- package/dist/src/docs/serve.js.map +0 -1
- package/dist/src/docs/start.d.ts.map +0 -1
- package/dist/src/docs/start.js.map +0 -1
- package/dist/src/eval/agent-eval.d.mts.map +0 -1
- package/dist/src/eval/agent-eval.mjs.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/program.d.ts.map +0 -1
- package/dist/src/program.js.map +0 -1
- package/dist/src/utils/auth-preflight.d.ts.map +0 -1
- package/dist/src/utils/auth-preflight.js.map +0 -1
- package/dist/src/utils/aws-auth.d.ts.map +0 -1
- package/dist/src/utils/aws-auth.js.map +0 -1
- package/dist/src/utils/bastion.d.ts.map +0 -1
- package/dist/src/utils/bastion.js.map +0 -1
- package/dist/src/utils/build-info.d.ts.map +0 -1
- package/dist/src/utils/build-info.js.map +0 -1
- package/dist/src/utils/cache-home.d.ts.map +0 -1
- package/dist/src/utils/cache-home.js.map +0 -1
- package/dist/src/utils/capture-history.d.ts.map +0 -1
- package/dist/src/utils/capture-history.js.map +0 -1
- package/dist/src/utils/context.d.ts.map +0 -1
- package/dist/src/utils/context.js.map +0 -1
- package/dist/src/utils/credentials.d.ts.map +0 -1
- package/dist/src/utils/credentials.js.map +0 -1
- package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
- package/dist/src/utils/deploy-preflight.js.map +0 -1
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
- package/dist/src/utils/first-party-contexts.js.map +0 -1
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/kubeconfig.d.ts.map +0 -1
- package/dist/src/utils/kubeconfig.js.map +0 -1
- package/dist/src/utils/log.d.ts.map +0 -1
- package/dist/src/utils/log.js.map +0 -1
- package/dist/src/utils/mesh-json.d.ts.map +0 -1
- package/dist/src/utils/mesh-json.js.map +0 -1
- package/dist/src/utils/pid.d.ts.map +0 -1
- package/dist/src/utils/pid.js.map +0 -1
- package/dist/src/utils/pulumi-run.d.ts.map +0 -1
- package/dist/src/utils/pulumi-run.js.map +0 -1
- package/dist/src/utils/pulumi.d.ts.map +0 -1
- package/dist/src/utils/pulumi.js.map +0 -1
- package/dist/src/utils/reachability.d.ts.map +0 -1
- package/dist/src/utils/reachability.js.map +0 -1
- package/dist/src/utils/recover-conversation.d.ts.map +0 -1
- package/dist/src/utils/recover-conversation.js.map +0 -1
- package/dist/src/utils/registry-broker.d.ts.map +0 -1
- package/dist/src/utils/registry-broker.js.map +0 -1
- package/dist/src/utils/registry-identity.d.ts.map +0 -1
- package/dist/src/utils/registry-identity.js.map +0 -1
- package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
- package/dist/src/utils/scaffold-versions.js.map +0 -1
- package/dist/src/utils/socks-forward.d.ts.map +0 -1
- package/dist/src/utils/socks-forward.js.map +0 -1
- package/dist/src/utils/stack-flag.d.ts.map +0 -1
- package/dist/src/utils/stack-flag.js.map +0 -1
- package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
- package/dist/src/utils/tailscale-targets.js.map +0 -1
- package/dist/src/utils/tailscale.d.ts.map +0 -1
- package/dist/src/utils/tailscale.js.map +0 -1
- package/dist/src/utils/temporal-auth.d.ts.map +0 -1
- package/dist/src/utils/temporal-auth.js.map +0 -1
- package/dist/src/utils/temporal-codec.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.js.map +0 -1
- package/dist/src/utils/vpn-join.d.ts.map +0 -1
- package/dist/src/utils/vpn-join.js.map +0 -1
- package/dist/src/utils/vpn.d.ts.map +0 -1
- package/dist/src/utils/vpn.js.map +0 -1
- package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
- package/dist/src/utils/workflow-fingerprint.js.map +0 -1
- package/dist/src/utils/worktree-identity.d.ts.map +0 -1
- package/dist/src/utils/worktree-identity.js.map +0 -1
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate the `mesh` CLI reference from the commander tree.
|
|
3
|
-
*
|
|
4
|
-
* This is the load-bearing half of "self-documenting": the reference is not a
|
|
5
|
-
* hand-maintained table that drifts from the code, it is a projection of the
|
|
6
|
-
* same `Command` objects the CLI parses. Add a flag and the docs grow it; the
|
|
7
|
-
* `--check` mode in `mesh docs` fails CI when the two diverge.
|
|
8
|
-
*
|
|
9
|
-
* Pure by construction — `extractCliReference` and `renderCliReferenceMarkdown`
|
|
10
|
-
* do no I/O, so they are directly unit-testable.
|
|
11
|
-
*/
|
|
12
1
|
import os from "node:os";
|
|
13
2
|
function currentMachinePaths() {
|
|
14
3
|
return { homeDir: os.homedir(), tmpDir: os.tmpdir() };
|
|
15
4
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Collapse machine-specific absolute paths to the symbols a reader recognizes.
|
|
18
|
-
*
|
|
19
|
-
* Some option defaults are computed at registration time from the environment —
|
|
20
|
-
* `mesh install-shim --dir` defaults to `path.join(os.homedir(), ".local/bin")`.
|
|
21
|
-
* Rendered literally, the generated reference embeds whoever ran the generator
|
|
22
|
-
* (`/Users/dmb/.local/bin` vs `/home/runner/.local/bin`), which makes the
|
|
23
|
-
* artifact machine-dependent and the `--check` gate pass only on one laptop —
|
|
24
|
-
* exactly how this was caught, by CI failing a locally-green gate.
|
|
25
|
-
*
|
|
26
|
-
* Substituting `~` fixes determinism and is also what the reader wants to see.
|
|
27
|
-
* Longest prefix first, since tmpdir can live under home on macOS.
|
|
28
|
-
*/
|
|
29
5
|
export function normalizeMachinePaths(value, paths) {
|
|
30
6
|
const candidates = [
|
|
31
7
|
{ prefix: paths.tmpDir, symbol: "$TMPDIR" },
|
|
@@ -42,14 +18,6 @@ export function normalizeMachinePaths(value, paths) {
|
|
|
42
18
|
}
|
|
43
19
|
return value;
|
|
44
20
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Render a default value the way a reader would type it, not the way
|
|
47
|
-
* `JSON.stringify` would: bare for strings so `docs/docs.config.json` doesn't
|
|
48
|
-
* arrive wrapped in quotes, JSON for everything structured.
|
|
49
|
-
*
|
|
50
|
-
* `paths` is injectable so the normalization above is testable without
|
|
51
|
-
* depending on the machine running the test.
|
|
52
|
-
*/
|
|
53
21
|
export function formatDefault(value, paths = currentMachinePaths()) {
|
|
54
22
|
if (value === undefined || value === null)
|
|
55
23
|
return undefined;
|
|
@@ -59,7 +27,6 @@ export function formatDefault(value, paths = currentMachinePaths()) {
|
|
|
59
27
|
return String(value);
|
|
60
28
|
return normalizeMachinePaths(JSON.stringify(value), paths);
|
|
61
29
|
}
|
|
62
|
-
/** Slugify a command path into a stable anchor: `mesh hub dev` → `mesh-hub-dev`. */
|
|
63
30
|
export function slugifyCommandPath(path) {
|
|
64
31
|
return path
|
|
65
32
|
.trim()
|
|
@@ -86,12 +53,6 @@ function extractOptions(command) {
|
|
|
86
53
|
return ref;
|
|
87
54
|
});
|
|
88
55
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Positional-argument usage for a command.
|
|
91
|
-
*
|
|
92
|
-
* `Command.usage()` returns the whole `[options] <arg>` string; we want only
|
|
93
|
-
* the positional part, since options are documented in their own table.
|
|
94
|
-
*/
|
|
95
56
|
function extractArgs(command) {
|
|
96
57
|
const internals = command;
|
|
97
58
|
const declared = internals.registeredArguments ?? internals._args ?? [];
|
|
@@ -106,16 +67,6 @@ function extractArgs(command) {
|
|
|
106
67
|
})
|
|
107
68
|
.join(" ");
|
|
108
69
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Commands the reference must not publish.
|
|
111
|
-
*
|
|
112
|
-
* Two kinds. Commander auto-registers a `help` subcommand on every group, which
|
|
113
|
-
* documents commander rather than Mesh. And commands declared
|
|
114
|
-
* `{ hidden: true }` are internal re-entry points the CLI spawns for itself
|
|
115
|
-
* (`mesh dev __token-server`, `mesh vpn tunnel __run`) — `hidden` is already
|
|
116
|
-
* this repo's signal for "keep out of `--help`", and the docs honor the same
|
|
117
|
-
* signal rather than inventing a second one.
|
|
118
|
-
*/
|
|
119
70
|
function isUndocumented(command) {
|
|
120
71
|
const internals = command;
|
|
121
72
|
return internals._name === "help" || internals._hidden === true;
|
|
@@ -138,13 +89,6 @@ function extractCommand(command, parentPath, depth) {
|
|
|
138
89
|
.map((child) => extractCommand(child, path, depth + 1)),
|
|
139
90
|
};
|
|
140
91
|
}
|
|
141
|
-
/**
|
|
142
|
-
* Project a commander program into a serializable reference tree.
|
|
143
|
-
*
|
|
144
|
-
* The root program's `--version` option is excluded: its value is the CLI
|
|
145
|
-
* version, which would make the generated output differ on every release and
|
|
146
|
-
* turn the `--check` gate into noise.
|
|
147
|
-
*/
|
|
148
92
|
export function extractCliReference(program) {
|
|
149
93
|
const internals = program;
|
|
150
94
|
const rootName = internals._name ?? "mesh";
|
|
@@ -157,7 +101,6 @@ export function extractCliReference(program) {
|
|
|
157
101
|
.map((child) => extractCommand(child, rootName, 1)),
|
|
158
102
|
};
|
|
159
103
|
}
|
|
160
|
-
/** Depth-first walk over every command in the tree, parents before children. */
|
|
161
104
|
export function flattenCommands(reference) {
|
|
162
105
|
const flat = [];
|
|
163
106
|
const visit = (command) => {
|
|
@@ -167,15 +110,6 @@ export function flattenCommands(reference) {
|
|
|
167
110
|
reference.commands.forEach(visit);
|
|
168
111
|
return flat;
|
|
169
112
|
}
|
|
170
|
-
/**
|
|
171
|
-
* Escape the characters that would break a markdown table cell.
|
|
172
|
-
*
|
|
173
|
-
* Backslash first, then pipe — the reverse order is subtly wrong. A description
|
|
174
|
-
* containing a literal `\|` would have its pipe escaped to `\\|`, which markdown
|
|
175
|
-
* reads as "escaped backslash, then a live cell delimiter", splitting the row.
|
|
176
|
-
* Escaping the backslash first makes it `\\\|`: one literal backslash, one
|
|
177
|
-
* escaped pipe.
|
|
178
|
-
*/
|
|
179
113
|
function cell(text) {
|
|
180
114
|
return text
|
|
181
115
|
.replace(/\\/g, "\\\\")
|
|
@@ -201,8 +135,6 @@ function renderOptionsTable(options) {
|
|
|
201
135
|
return lines;
|
|
202
136
|
}
|
|
203
137
|
function renderCommand(command) {
|
|
204
|
-
// Cap heading depth at h4 — deeper nesting produces headings no navigation
|
|
205
|
-
// renders, and Mesh's tree is at most `mesh <group> <cmd> <sub>`.
|
|
206
138
|
const heading = "#".repeat(Math.min(command.depth + 1, 4));
|
|
207
139
|
const usage = [command.path, command.options.length > 0 ? "[options]" : "", command.args]
|
|
208
140
|
.filter(Boolean)
|
|
@@ -218,13 +150,6 @@ function renderCommand(command) {
|
|
|
218
150
|
command.subcommands.forEach((child) => lines.push(...renderCommand(child)));
|
|
219
151
|
return lines;
|
|
220
152
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Render the reference as markdown.
|
|
223
|
-
*
|
|
224
|
-
* The output carries a generated-file banner naming the command that rebuilds
|
|
225
|
-
* it, because the failure mode for generated docs is someone hand-editing the
|
|
226
|
-
* artifact and losing the change on the next build.
|
|
227
|
-
*/
|
|
228
153
|
export function renderCliReferenceMarkdown(reference) {
|
|
229
154
|
const lines = [
|
|
230
155
|
"<!--",
|
|
@@ -250,7 +175,5 @@ export function renderCliReferenceMarkdown(reference) {
|
|
|
250
175
|
}
|
|
251
176
|
lines.push("");
|
|
252
177
|
reference.commands.forEach((command) => lines.push(...renderCommand(command)));
|
|
253
|
-
// Collapse the blank-line runs that per-section rendering leaves behind.
|
|
254
178
|
return `${lines.join("\n").replace(/\n{3,}/g, "\n\n").trimEnd()}\n`;
|
|
255
179
|
}
|
|
256
|
-
//# sourceMappingURL=cli-reference.js.map
|
|
@@ -1,60 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Doc-root discovery.
|
|
3
|
-
*
|
|
4
|
-
* The one rule of the portal: **a directory publishes its markdown if, and
|
|
5
|
-
* only if, it contains a `docs.json`.** This module finds those directories,
|
|
6
|
-
* validates their declarations, and walks them for publishable pages —
|
|
7
|
-
* skipping any path with a reserved segment (at any depth) and any `README.md`
|
|
8
|
-
* (a README is the directory's GitHub face, not portal content; a root that
|
|
9
|
-
* wants one published names it in `include[]`, the escape hatch).
|
|
10
|
-
*
|
|
11
|
-
* Discovery is purely about *which files* publish. Reading their content —
|
|
12
|
-
* titles, front-matter, links — is assembly's job (`assemble.ts`).
|
|
13
|
-
*/
|
|
14
1
|
import type { DocsJson } from "./schema.js";
|
|
15
|
-
/** A validated doc root. */
|
|
16
2
|
export interface DocRoot {
|
|
17
|
-
/** Repo-relative directory holding the docs.json, posix separators. */
|
|
18
3
|
dir: string;
|
|
19
4
|
config: DocsJson;
|
|
20
|
-
/** Route prefix — `config.slug` or the slugified title. "" means site root. */
|
|
21
5
|
slug: string;
|
|
22
6
|
}
|
|
23
|
-
/** One publishable markdown file. */
|
|
24
7
|
export interface DiscoveredPage {
|
|
25
|
-
/** Repo-relative source path, posix separators. */
|
|
26
8
|
source: string;
|
|
27
|
-
/** The root that claimed it. */
|
|
28
9
|
root: DocRoot;
|
|
29
|
-
/**
|
|
30
|
-
* Route path inside the section, no leading slash — e.g.
|
|
31
|
-
* `primitives/service`. "" for the section's own index page.
|
|
32
|
-
*/
|
|
33
10
|
routePath: string;
|
|
34
|
-
/** True when the page came from `include[]` rather than the tree walk. */
|
|
35
11
|
included: boolean;
|
|
36
12
|
}
|
|
37
13
|
export interface Discovery {
|
|
38
14
|
roots: DocRoot[];
|
|
39
15
|
pages: DiscoveredPage[];
|
|
40
|
-
/** Every structural problem found, human-readable. Non-empty fails --check. */
|
|
41
16
|
errors: string[];
|
|
42
17
|
}
|
|
43
|
-
/**
|
|
44
|
-
* The route a page gets inside its section: the path relative to the root,
|
|
45
|
-
* each segment slugified, the `.md` dropped, and a trailing `index` collapsed
|
|
46
|
-
* so a directory's index page serves at the directory's route.
|
|
47
|
-
*/
|
|
48
18
|
export declare function routePathFor(relPath: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* Find every doc root under `repoRoot`, validate it, and collect its pages.
|
|
51
|
-
*
|
|
52
|
-
* The walk looks for `docs.json` files anywhere in the repo (excluding the
|
|
53
|
-
* ROOT_WALK_SKIP directories), so a package opts in by adding one file and
|
|
54
|
-
* nothing else. Roots are sorted by (order, title); pages within a root are
|
|
55
|
-
* sorted by route path so assembly is deterministic.
|
|
56
|
-
*/
|
|
57
19
|
export declare function discoverDocRoots(repoRoot: string): Discovery;
|
|
58
|
-
/** What exists at `candidate`, or null. Link resolution needs the file/dir split for blob-vs-tree URLs. */
|
|
59
20
|
export declare function pathKind(candidate: string): "file" | "dir" | null;
|
|
60
|
-
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Doc-root discovery.
|
|
3
|
-
*
|
|
4
|
-
* The one rule of the portal: **a directory publishes its markdown if, and
|
|
5
|
-
* only if, it contains a `docs.json`.** This module finds those directories,
|
|
6
|
-
* validates their declarations, and walks them for publishable pages —
|
|
7
|
-
* skipping any path with a reserved segment (at any depth) and any `README.md`
|
|
8
|
-
* (a README is the directory's GitHub face, not portal content; a root that
|
|
9
|
-
* wants one published names it in `include[]`, the escape hatch).
|
|
10
|
-
*
|
|
11
|
-
* Discovery is purely about *which files* publish. Reading their content —
|
|
12
|
-
* titles, front-matter, links — is assembly's job (`assemble.ts`).
|
|
13
|
-
*/
|
|
14
1
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
15
2
|
import path from "node:path";
|
|
16
3
|
import { docsJsonSchema, hasReservedSegment, slugify } from "./schema.js";
|
|
17
|
-
/**
|
|
18
|
-
* Directories the walk never descends into while LOOKING FOR roots. This list
|
|
19
|
-
* is about walk performance and sanity (`.git`, build output), and is
|
|
20
|
-
* deliberately separate from the reserved list, which is about publish
|
|
21
|
-
* safety. `node_modules` is on both: it is huge, and it must never publish.
|
|
22
|
-
*/
|
|
23
4
|
const ROOT_WALK_SKIP = new Set([
|
|
24
5
|
".git",
|
|
25
6
|
"node_modules",
|
|
@@ -33,21 +14,13 @@ const ROOT_WALK_SKIP = new Set([
|
|
|
33
14
|
".vercel",
|
|
34
15
|
".wrangler",
|
|
35
16
|
]);
|
|
36
|
-
/**
|
|
37
|
-
* The route a page gets inside its section: the path relative to the root,
|
|
38
|
-
* each segment slugified, the `.md` dropped, and a trailing `index` collapsed
|
|
39
|
-
* so a directory's index page serves at the directory's route.
|
|
40
|
-
*/
|
|
41
17
|
export function routePathFor(relPath) {
|
|
42
18
|
const withoutExt = relPath.replace(/\.md$/i, "");
|
|
43
19
|
const parts = withoutExt.split("/").map(slugify);
|
|
44
|
-
// A trailing `index` segment collapses: the file serves at its directory's
|
|
45
|
-
// route (a root-level index.md is the section's own landing page).
|
|
46
20
|
if (parts[parts.length - 1] === "index")
|
|
47
21
|
parts.pop();
|
|
48
22
|
return parts.join("/");
|
|
49
23
|
}
|
|
50
|
-
/** Recursively collect `*.md` files under `dir`, skipping reserved segments. */
|
|
51
24
|
function walkMarkdown(absDir, relDir, errors, rootDir) {
|
|
52
25
|
const out = [];
|
|
53
26
|
let entries;
|
|
@@ -60,9 +33,6 @@ function walkMarkdown(absDir, relDir, errors, rootDir) {
|
|
|
60
33
|
for (const entry of entries) {
|
|
61
34
|
const rel = relDir ? `${relDir}/${entry.name}` : entry.name;
|
|
62
35
|
if (hasReservedSegment(entry.name)) {
|
|
63
|
-
// Reserved names are silently skipped in the walk — exclusion here is
|
|
64
|
-
// the normal case, not an error. The gate separately asserts that
|
|
65
|
-
// nothing reserved ever reaches the OUTPUT (fail-closed).
|
|
66
36
|
continue;
|
|
67
37
|
}
|
|
68
38
|
const abs = path.join(absDir, entry.name);
|
|
@@ -72,29 +42,18 @@ function walkMarkdown(absDir, relDir, errors, rootDir) {
|
|
|
72
42
|
out.push(...walkMarkdown(abs, rel, errors, rootDir));
|
|
73
43
|
}
|
|
74
44
|
else if (entry.isFile() && entry.name.toLowerCase().endsWith(".md")) {
|
|
75
|
-
// A README is the directory's GitHub face — it does not publish via the
|
|
76
|
-
// walk. The include[] escape hatch is how a README becomes a page.
|
|
77
45
|
if (entry.name.toLowerCase() === "readme.md")
|
|
78
46
|
continue;
|
|
79
47
|
out.push(rel);
|
|
80
48
|
}
|
|
81
49
|
else if (entry.isFile() &&
|
|
82
50
|
entry.name === "docs.json" &&
|
|
83
|
-
relDir !== ""
|
|
84
|
-
) {
|
|
51
|
+
relDir !== "") {
|
|
85
52
|
errors.push(`nested doc root: ${rootDir}/.../${rel} — a docs.json inside another doc root is ambiguous; give it its own sibling root or remove it`);
|
|
86
53
|
}
|
|
87
54
|
}
|
|
88
55
|
return out;
|
|
89
56
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Find every doc root under `repoRoot`, validate it, and collect its pages.
|
|
92
|
-
*
|
|
93
|
-
* The walk looks for `docs.json` files anywhere in the repo (excluding the
|
|
94
|
-
* ROOT_WALK_SKIP directories), so a package opts in by adding one file and
|
|
95
|
-
* nothing else. Roots are sorted by (order, title); pages within a root are
|
|
96
|
-
* sorted by route path so assembly is deterministic.
|
|
97
|
-
*/
|
|
98
57
|
export function discoverDocRoots(repoRoot) {
|
|
99
58
|
const errors = [];
|
|
100
59
|
const roots = [];
|
|
@@ -110,20 +69,13 @@ export function discoverDocRoots(repoRoot) {
|
|
|
110
69
|
if (hasDocsJson) {
|
|
111
70
|
const rel = relDir || ".";
|
|
112
71
|
if (insideReserved || (relDir && hasReservedSegment(relDir))) {
|
|
113
|
-
// Fail-closed: a root under a reserved directory is the "mistake one"
|
|
114
|
-
// half of the leak scenario. Refusing it here means even a deliberate
|
|
115
|
-
// docs.json in docs/plans/ publishes nothing.
|
|
116
72
|
errors.push(`doc root ${rel}/ is under a reserved segment — it publishes nothing. Move the content out of the reserved directory instead.`);
|
|
117
73
|
}
|
|
118
74
|
else {
|
|
119
75
|
const root = loadRoot(absDir, rel, errors);
|
|
120
|
-
// An invalid declaration publishes NOTHING — assembling pages under a
|
|
121
|
-
// guessed title/slug could put content at routes nobody reviewed.
|
|
122
76
|
if (root)
|
|
123
77
|
roots.push(root);
|
|
124
78
|
}
|
|
125
|
-
// Never look for further roots inside a claimed root — a nested
|
|
126
|
-
// docs.json is reported by the page walk instead (ambiguous ownership).
|
|
127
79
|
return;
|
|
128
80
|
}
|
|
129
81
|
for (const entry of entries) {
|
|
@@ -131,9 +83,6 @@ export function discoverDocRoots(repoRoot) {
|
|
|
131
83
|
continue;
|
|
132
84
|
if (ROOT_WALK_SKIP.has(entry.name))
|
|
133
85
|
continue;
|
|
134
|
-
// Dot-directories are tooling, not content — ALL of them, so a
|
|
135
|
-
// .pi/docs.json is skipped here exactly like a .claude one. The page
|
|
136
|
-
// walk does the same, so a root found there could never publish anyway.
|
|
137
86
|
if (entry.name.startsWith("."))
|
|
138
87
|
continue;
|
|
139
88
|
const rel = relDir ? `${relDir}/${entry.name}` : entry.name;
|
|
@@ -171,20 +120,16 @@ export function discoverDocRoots(repoRoot) {
|
|
|
171
120
|
continue;
|
|
172
121
|
}
|
|
173
122
|
if (pages.some((p) => p.source === normalized))
|
|
174
|
-
continue;
|
|
123
|
+
continue;
|
|
175
124
|
const stem = path.posix.basename(normalized).replace(/\.md$/i, "");
|
|
176
125
|
pages.push({
|
|
177
126
|
source: normalized,
|
|
178
127
|
root,
|
|
179
|
-
// An included README is the section's index page — "a package README
|
|
180
|
-
// is its natural overview page". Anything else routes by its stem.
|
|
181
128
|
routePath: stem.toLowerCase() === "readme" ? "" : slugify(stem),
|
|
182
129
|
included: true,
|
|
183
130
|
});
|
|
184
131
|
}
|
|
185
132
|
}
|
|
186
|
-
// Route collisions are authoring mistakes two files cannot both survive —
|
|
187
|
-
// catch them at discovery so the failure names both sources.
|
|
188
133
|
const seenRoutes = new Map();
|
|
189
134
|
for (const page of pages) {
|
|
190
135
|
const route = [page.root.slug, page.routePath].filter(Boolean).join("/");
|
|
@@ -198,7 +143,6 @@ export function discoverDocRoots(repoRoot) {
|
|
|
198
143
|
a.config.title.localeCompare(b.config.title));
|
|
199
144
|
return { roots, pages, errors };
|
|
200
145
|
}
|
|
201
|
-
/** Parse and validate one root's docs.json. Returns null (and records why) when invalid — an invalid declaration publishes nothing. */
|
|
202
146
|
function loadRoot(absDir, relDir, errors) {
|
|
203
147
|
const configPath = path.join(absDir, "docs.json");
|
|
204
148
|
let raw;
|
|
@@ -220,7 +164,6 @@ function loadRoot(absDir, relDir, errors) {
|
|
|
220
164
|
const slug = config.slug ?? slugify(config.title);
|
|
221
165
|
return { dir: relDir, config, slug };
|
|
222
166
|
}
|
|
223
|
-
/** What exists at `candidate`, or null. Link resolution needs the file/dir split for blob-vs-tree URLs. */
|
|
224
167
|
export function pathKind(candidate) {
|
|
225
168
|
try {
|
|
226
169
|
const stat = statSync(candidate);
|
|
@@ -230,4 +173,3 @@ export function pathKind(candidate) {
|
|
|
230
173
|
return null;
|
|
231
174
|
}
|
|
232
175
|
}
|
|
233
|
-
//# sourceMappingURL=discover.js.map
|
|
@@ -1,58 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh docs portal` — assemble the developer portal from the repo's
|
|
3
|
-
* docs.json-discovered markdown and hand it to the renderer (Zudoku) to build
|
|
4
|
-
* or serve.
|
|
5
|
-
*
|
|
6
|
-
* Modes:
|
|
7
|
-
*
|
|
8
|
-
* mesh docs portal assemble → `zudoku build` → apps/docs/dist
|
|
9
|
-
* mesh docs portal --serve assemble → `zudoku dev` (local preview)
|
|
10
|
-
* mesh docs portal --assemble-only assemble and stop (content/, config,
|
|
11
|
-
* manifests) — what CI runs before `build`
|
|
12
|
-
* mesh docs portal --check the CI gate: assemble to a scratch dir and
|
|
13
|
-
* fail on any of the four assertions below
|
|
14
|
-
*
|
|
15
|
-
* The four --check assertions, any of which exits non-zero:
|
|
16
|
-
* 1. a docs.json fails schema validation (or any other discovery error)
|
|
17
|
-
* 2. an assembled output path contains a reserved segment (fail-closed —
|
|
18
|
-
* internal material must never be publishable)
|
|
19
|
-
* 3. an internal link resolves to nothing
|
|
20
|
-
* 4. the committed CLI reference is stale (the command tree drifted)
|
|
21
|
-
*
|
|
22
|
-
* Assembly always writes `publish-manifest.json` — every source path that
|
|
23
|
-
* made it into the site — which CI uploads as an artifact; on PRs
|
|
24
|
-
* `--diff-base <ref>` also prints the added/removed published paths into the
|
|
25
|
-
* GitHub job summary.
|
|
26
|
-
*/
|
|
27
1
|
import type { AssembleResult } from "./assemble.js";
|
|
28
|
-
/** The Zudoku app package directory, relative to the repo root. */
|
|
29
2
|
export declare const DOCS_APP_DIR = "apps/docs";
|
|
30
3
|
export interface PortalRunResult {
|
|
31
4
|
assembled: AssembleResult;
|
|
32
5
|
errors: string[];
|
|
33
6
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Run discovery + assembly. Shared by every mode; the scratch-dir variant is
|
|
36
|
-
* what --check uses so the gate never depends on (or dirties) apps/docs.
|
|
37
|
-
*/
|
|
38
7
|
export declare function runAssemble(args: {
|
|
39
8
|
repoRoot: string;
|
|
40
9
|
outDir: string;
|
|
41
10
|
configOut?: string;
|
|
42
11
|
writeFiles?: boolean;
|
|
43
12
|
}): PortalRunResult;
|
|
44
|
-
/** Print the assembly report: counts, external-link note, broken-link list. */
|
|
45
13
|
export declare function reportAssembly(result: PortalRunResult): void;
|
|
46
|
-
/**
|
|
47
|
-
* The --check gate. Returns the failure list (empty = pass). Also writes the
|
|
48
|
-
* job-summary publish-set diff when --diff-base names a ref and
|
|
49
|
-
* GITHUB_STEP_SUMMARY is writable.
|
|
50
|
-
*/
|
|
51
14
|
export declare function checkPortal(args: {
|
|
52
15
|
repoRoot: string;
|
|
53
16
|
diffBase?: string | undefined;
|
|
54
17
|
printManifest?: boolean;
|
|
55
|
-
/** Stable path to write publish-manifest.json to (CI uploads it as an artifact). */
|
|
56
18
|
manifestOut?: string | undefined;
|
|
57
19
|
checkCliReference: () => Promise<string | null>;
|
|
58
20
|
}): Promise<string[]>;
|
|
@@ -66,14 +28,8 @@ export interface PortalCommandOptions {
|
|
|
66
28
|
diffBase?: string | undefined;
|
|
67
29
|
manifestOut?: string | undefined;
|
|
68
30
|
}
|
|
69
|
-
/**
|
|
70
|
-
* The command body. Kept free of commander types so the test suite can drive
|
|
71
|
-
* it directly; `commands/docs.ts` is a thin flag adapter.
|
|
72
|
-
*/
|
|
73
31
|
export declare function runPortalCommand(opts: PortalCommandOptions, deps: {
|
|
74
32
|
repoRoot: string;
|
|
75
33
|
checkCliReference: () => Promise<string | null>;
|
|
76
34
|
}): Promise<void>;
|
|
77
|
-
/** Re-exported so commands/docs.ts can wire the CLI-reference staleness check. */
|
|
78
35
|
export declare function cliReferenceStaleness(repoRoot: string): Promise<string | null>;
|
|
79
|
-
//# sourceMappingURL=portal.d.ts.map
|
package/dist/src/docs/portal.js
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh docs portal` — assemble the developer portal from the repo's
|
|
3
|
-
* docs.json-discovered markdown and hand it to the renderer (Zudoku) to build
|
|
4
|
-
* or serve.
|
|
5
|
-
*
|
|
6
|
-
* Modes:
|
|
7
|
-
*
|
|
8
|
-
* mesh docs portal assemble → `zudoku build` → apps/docs/dist
|
|
9
|
-
* mesh docs portal --serve assemble → `zudoku dev` (local preview)
|
|
10
|
-
* mesh docs portal --assemble-only assemble and stop (content/, config,
|
|
11
|
-
* manifests) — what CI runs before `build`
|
|
12
|
-
* mesh docs portal --check the CI gate: assemble to a scratch dir and
|
|
13
|
-
* fail on any of the four assertions below
|
|
14
|
-
*
|
|
15
|
-
* The four --check assertions, any of which exits non-zero:
|
|
16
|
-
* 1. a docs.json fails schema validation (or any other discovery error)
|
|
17
|
-
* 2. an assembled output path contains a reserved segment (fail-closed —
|
|
18
|
-
* internal material must never be publishable)
|
|
19
|
-
* 3. an internal link resolves to nothing
|
|
20
|
-
* 4. the committed CLI reference is stale (the command tree drifted)
|
|
21
|
-
*
|
|
22
|
-
* Assembly always writes `publish-manifest.json` — every source path that
|
|
23
|
-
* made it into the site — which CI uploads as an artifact; on PRs
|
|
24
|
-
* `--diff-base <ref>` also prints the added/removed published paths into the
|
|
25
|
-
* GitHub job summary.
|
|
26
|
-
*/
|
|
27
1
|
import { spawn } from "node:child_process";
|
|
28
2
|
import { appendFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync, } from "node:fs";
|
|
29
3
|
import { tmpdir } from "node:os";
|
|
@@ -31,7 +5,6 @@ import path from "node:path";
|
|
|
31
5
|
import { logError, logInfo, logSuccess, logWarn } from "../utils/log.js";
|
|
32
6
|
import { assemblePortal, currentBaseline, currentCommit, diffPublishSets, publishSetAtRef, renderPublishSetSummary, renderVersionJson, renderZudokuConfig, } from "./assemble.js";
|
|
33
7
|
import { discoverDocRoots } from "./discover.js";
|
|
34
|
-
/** The Zudoku app package directory, relative to the repo root. */
|
|
35
8
|
export const DOCS_APP_DIR = "apps/docs";
|
|
36
9
|
const CONTENT_DIR = "content";
|
|
37
10
|
const GENERATED_CONFIG = "zudoku.config.ts";
|
|
@@ -40,10 +13,6 @@ const VERSION_JSON_DIR = "public";
|
|
|
40
13
|
const VERSION_JSON = "version.json";
|
|
41
14
|
const SITE_TITLE = "Mesh Developer Portal";
|
|
42
15
|
const SITE_DESCRIPTION = "Build and run financial-services apps on Mesh Platform with the mesh developer CLI.";
|
|
43
|
-
/**
|
|
44
|
-
* Run discovery + assembly. Shared by every mode; the scratch-dir variant is
|
|
45
|
-
* what --check uses so the gate never depends on (or dirties) apps/docs.
|
|
46
|
-
*/
|
|
47
16
|
export function runAssemble(args) {
|
|
48
17
|
const discovery = discoverDocRoots(args.repoRoot);
|
|
49
18
|
const assembled = assemblePortal({
|
|
@@ -55,10 +24,6 @@ export function runAssemble(args) {
|
|
|
55
24
|
});
|
|
56
25
|
const errors = [...discovery.errors];
|
|
57
26
|
if (args.writeFiles !== false) {
|
|
58
|
-
// The manifest lands BESIDE the content dir for a real assemble
|
|
59
|
-
// (apps/docs/publish-manifest.json — gitignored derived state) and INSIDE
|
|
60
|
-
// the scratch dir for a --check run, so concurrent checks never share a
|
|
61
|
-
// file and nothing is written loose to the tmpdir root.
|
|
62
27
|
const manifestPath = args.outDir.includes(tmpdir())
|
|
63
28
|
? path.join(args.outDir, PUBLISH_MANIFEST)
|
|
64
29
|
: path.join(args.outDir, "..", PUBLISH_MANIFEST);
|
|
@@ -82,7 +47,6 @@ export function runAssemble(args) {
|
|
|
82
47
|
}
|
|
83
48
|
return { assembled, errors };
|
|
84
49
|
}
|
|
85
|
-
/** Print the assembly report: counts, external-link note, broken-link list. */
|
|
86
50
|
export function reportAssembly(result) {
|
|
87
51
|
const { assembled } = result;
|
|
88
52
|
logSuccess(`Assembled ${assembled.pages.length} pages from ${new Set(assembled.pages.map((p) => p.sectionTitle)).size} sections → ${assembled.outDir}`);
|
|
@@ -97,11 +61,6 @@ export function reportAssembly(result) {
|
|
|
97
61
|
}
|
|
98
62
|
}
|
|
99
63
|
}
|
|
100
|
-
/**
|
|
101
|
-
* The --check gate. Returns the failure list (empty = pass). Also writes the
|
|
102
|
-
* job-summary publish-set diff when --diff-base names a ref and
|
|
103
|
-
* GITHUB_STEP_SUMMARY is writable.
|
|
104
|
-
*/
|
|
105
64
|
export async function checkPortal(args) {
|
|
106
65
|
const scratch = mkdtempSync(path.join(tmpdir(), "mesh-docs-check-"));
|
|
107
66
|
const result = runAssemble({ repoRoot: args.repoRoot, outDir: scratch });
|
|
@@ -128,7 +87,6 @@ export async function checkPortal(args) {
|
|
|
128
87
|
}
|
|
129
88
|
return failures;
|
|
130
89
|
}
|
|
131
|
-
/** Diff the publish set against a git ref; print + append to the GH job summary. */
|
|
132
90
|
function writePublishSetSummary(repoRoot, diffBase, manifest) {
|
|
133
91
|
let diff = null;
|
|
134
92
|
try {
|
|
@@ -150,7 +108,6 @@ function writePublishSetSummary(repoRoot, diffBase, manifest) {
|
|
|
150
108
|
}
|
|
151
109
|
}
|
|
152
110
|
}
|
|
153
|
-
/** Spawn the renderer. Returns its exit code. */
|
|
154
111
|
function runZudoku(args) {
|
|
155
112
|
const cliArgs = args.mode === "dev"
|
|
156
113
|
? ["dev", "--port", String(args.port ?? 3000)]
|
|
@@ -166,10 +123,6 @@ function runZudoku(args) {
|
|
|
166
123
|
child.on("close", (code) => resolve(code ?? 1));
|
|
167
124
|
});
|
|
168
125
|
}
|
|
169
|
-
/**
|
|
170
|
-
* The command body. Kept free of commander types so the test suite can drive
|
|
171
|
-
* it directly; `commands/docs.ts` is a thin flag adapter.
|
|
172
|
-
*/
|
|
173
126
|
export async function runPortalCommand(opts, deps) {
|
|
174
127
|
const { repoRoot } = deps;
|
|
175
128
|
if (opts.check) {
|
|
@@ -226,7 +179,6 @@ export async function runPortalCommand(opts, deps) {
|
|
|
226
179
|
logSuccess(`Portal built → ${path.join(path.relative(repoRoot, appDir), "dist")}`);
|
|
227
180
|
}
|
|
228
181
|
}
|
|
229
|
-
/** Re-exported so commands/docs.ts can wire the CLI-reference staleness check. */
|
|
230
182
|
export async function cliReferenceStaleness(repoRoot) {
|
|
231
183
|
const [{ createProgram }, { extractCliReference, renderCliReferenceMarkdown },] = await Promise.all([
|
|
232
184
|
import("../program.js"),
|
|
@@ -239,4 +191,3 @@ export async function cliReferenceStaleness(repoRoot) {
|
|
|
239
191
|
return null;
|
|
240
192
|
return `${existing === null ? "CLI reference is missing" : "CLI reference is stale"}: docs/portal/generated/cli-reference.md — the commander tree changed; regenerate and commit with \`pnpm exec mesh docs cli-reference\``;
|
|
241
193
|
}
|
|
242
|
-
//# sourceMappingURL=portal.js.map
|
|
@@ -1,43 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The docs-as-registry-artifact client.
|
|
3
|
-
*
|
|
4
|
-
* The release job publishes the built portal as `@mesh-tech/docs` in the
|
|
5
|
-
* fixed lockstep group, so the docs version IS the @mesh-tech/* baseline
|
|
6
|
-
* version it describes. The audience is exactly "people who can install the
|
|
7
|
-
* packages": the CodeArtifact registry is Zitadel-role-gated (see
|
|
8
|
-
* `mesh registry login`), so no public hosting is required for the docs to
|
|
9
|
-
* reach precisely the authorized set.
|
|
10
|
-
*
|
|
11
|
-
* This module reads the user's existing `~/.npmrc` CodeArtifact token (the
|
|
12
|
-
* one `mesh registry login` writes), lists published docs versions, and
|
|
13
|
-
* fetches + caches a version's tarball. It never talks to AWS directly.
|
|
14
|
-
*/
|
|
15
1
|
export declare const DOCS_PACKAGE = "@mesh-tech/docs";
|
|
16
2
|
export interface DocsRegistryAuth {
|
|
17
3
|
endpoint: string;
|
|
18
4
|
token: string;
|
|
19
5
|
}
|
|
20
|
-
/** The CodeArtifact token + endpoint from `mesh registry login`'s ~/.npmrc line. */
|
|
21
6
|
export declare function readDocsRegistryAuth(npmrcPath?: string): DocsRegistryAuth | null;
|
|
22
|
-
/** x.y.z numeric compare (release versions carry no prerelease suffixes). */
|
|
23
7
|
export declare function compareVersions(a: string, b: string): number;
|
|
24
8
|
export interface DocsVersionList {
|
|
25
9
|
versions: string[];
|
|
26
10
|
latest: string | undefined;
|
|
27
11
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Every published docs version, oldest → newest, plus the registry's
|
|
30
|
-
* `latest` dist-tag. Throws with the login remediation when the registry
|
|
31
|
-
* rejects the token — an expired token is the common case (12h TTL).
|
|
32
|
-
*/
|
|
33
12
|
export declare function listDocsVersions(auth: DocsRegistryAuth, fetchImpl?: typeof fetch): Promise<DocsVersionList>;
|
|
34
|
-
/** Where fetched docs versions live: `~/.cache/mesh/docs/<version>/`. */
|
|
35
13
|
export declare function docsCacheRoot(): string;
|
|
36
|
-
/**
|
|
37
|
-
* Fetch and extract a docs version into the cache; returns the directory
|
|
38
|
-
* containing the site's `dist/`. Cache hit = the directory already has a
|
|
39
|
-
* `dist/index.html`. Partial downloads extract to a temp sibling and rename,
|
|
40
|
-
* so an interrupted fetch never leaves a half-written "good" cache entry.
|
|
41
|
-
*/
|
|
42
14
|
export declare function fetchDocsArtifact(auth: DocsRegistryAuth, version: string, cacheRoot?: string, fetchImpl?: typeof fetch): Promise<string>;
|
|
43
|
-
//# sourceMappingURL=registry-docs.d.ts.map
|