codebyplan 1.5.1 → 1.9.0
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/cli.js +4462 -748
- package/package.json +5 -1
- package/templates/.gitkeep +0 -0
- package/templates/README.md +20 -0
- package/templates/agents/cbp-cc-executor.md +213 -0
- package/templates/agents/cbp-database-agent.md +229 -0
- package/templates/agents/cbp-improve-claude.md +245 -0
- package/templates/agents/cbp-improve-round.md +284 -0
- package/templates/agents/cbp-mechanical-edits.md +111 -0
- package/templates/agents/cbp-research.md +282 -0
- package/templates/agents/cbp-round-executor.md +604 -0
- package/templates/agents/cbp-security-agent.md +134 -0
- package/templates/agents/cbp-task-check.md +213 -0
- package/templates/agents/cbp-task-planner.md +582 -0
- package/templates/agents/cbp-test-e2e-agent.md +363 -0
- package/templates/agents/cbp-testing-qa-agent.md +400 -0
- package/templates/context/mcp-docs.md +139 -0
- package/templates/hooks/README.md +236 -0
- package/templates/hooks/cbp-auto-test-hooks.sh +44 -0
- package/templates/hooks/cbp-lint-format-on-edit.sh +159 -0
- package/templates/hooks/cbp-maestro-yaml-validate.sh +100 -0
- package/templates/hooks/cbp-mcp-migration-guard.sh +32 -0
- package/templates/hooks/cbp-mcp-round-sync.sh +79 -0
- package/templates/hooks/cbp-mcp-worktree-inject.sh +76 -0
- package/templates/hooks/cbp-notify.sh +68 -0
- package/templates/hooks/cbp-plugin-dispatch.sh +29 -0
- package/templates/hooks/cbp-pre-commit-quality-gate.sh +204 -0
- package/templates/hooks/cbp-statusline.sh +347 -0
- package/templates/hooks/cbp-subagent-statusline.sh +182 -0
- package/templates/hooks/cbp-test-coverage-gate.sh +144 -0
- package/templates/hooks/cbp-test-hooks.sh +320 -0
- package/templates/hooks/hooks.json +85 -0
- package/templates/hooks/validate-context-usage.sh +59 -0
- package/templates/hooks/validate-git-commit.sh +78 -0
- package/templates/hooks/validate-git-stash-deny.sh +32 -0
- package/templates/hooks/validate-structure-lengths.sh +57 -0
- package/templates/hooks/validate-structure-lib.sh +104 -0
- package/templates/hooks/validate-structure-patterns.sh +54 -0
- package/templates/hooks/validate-structure-scope.sh +33 -0
- package/templates/hooks/validate-structure-smoke.sh +95 -0
- package/templates/hooks/validate-structure-templates.sh +34 -0
- package/templates/hooks/validate-structure.sh +69 -0
- package/templates/rules/.gitkeep +0 -0
- package/templates/rules/README.md +47 -0
- package/templates/rules/context-file-loading.md +52 -0
- package/templates/rules/scope-vocabulary.md +64 -0
- package/templates/rules/todo-backend.md +109 -0
- package/templates/settings.project.base.json +55 -0
- package/templates/settings.user.base.json +25 -0
- package/templates/skills/cbp-build-cc-agent/SKILL.md +139 -0
- package/templates/skills/cbp-build-cc-agent/examples/read-only-reviewer.md +32 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-hooks.md +41 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +25 -0
- package/templates/skills/cbp-build-cc-agent/reference/cbp-quality.md +153 -0
- package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +37 -0
- package/templates/skills/cbp-build-cc-agent/reference/permission-modes.md +18 -0
- package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +67 -0
- package/templates/skills/cbp-build-cc-agent/templates/agent.md +66 -0
- package/templates/skills/cbp-build-cc-claude-file/SKILL.md +178 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/minimal-project.md +33 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/monorepo-with-imports.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/imports.md +72 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/project-claude-md.md +48 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/user-claude-md.md +22 -0
- package/templates/skills/cbp-build-cc-memory/SKILL.md +201 -0
- package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +13 -0
- package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +14 -0
- package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +59 -0
- package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +62 -0
- package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +4 -0
- package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +15 -0
- package/templates/skills/cbp-build-cc-mode/SKILL.md +99 -0
- package/templates/skills/cbp-build-cc-rule/SKILL.md +176 -0
- package/templates/skills/cbp-build-cc-rule/examples/global-rule.md +19 -0
- package/templates/skills/cbp-build-cc-rule/examples/scoped-rule.md +41 -0
- package/templates/skills/cbp-build-cc-rule/reference/paths-patterns.md +48 -0
- package/templates/skills/cbp-build-cc-rule/templates/rule.md +32 -0
- package/templates/skills/cbp-build-cc-settings/SKILL.md +220 -0
- package/templates/skills/cbp-build-cc-settings/examples/hooks-config.json +64 -0
- package/templates/skills/cbp-build-cc-settings/examples/permissions-config.json +34 -0
- package/templates/skills/cbp-build-cc-settings/examples/sandbox-config.json +42 -0
- package/templates/skills/cbp-build-cc-settings/reference/cbp-conventions.md +104 -0
- package/templates/skills/cbp-build-cc-settings/reference/permission-rules.md +61 -0
- package/templates/skills/cbp-build-cc-settings/reference/scope-precedence.md +73 -0
- package/templates/skills/cbp-build-cc-settings/reference/settings-fields.md +166 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.json +23 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.local.json +10 -0
- package/templates/skills/cbp-build-cc-skill/SKILL.md +154 -0
- package/templates/skills/cbp-build-cc-skill/examples/dynamic-context.md +31 -0
- package/templates/skills/cbp-build-cc-skill/examples/fork-skill.md +22 -0
- package/templates/skills/cbp-build-cc-skill/examples/knowledge-skill.md +25 -0
- package/templates/skills/cbp-build-cc-skill/examples/task-skill.md +29 -0
- package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +157 -0
- package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +35 -0
- package/templates/skills/cbp-build-cc-skill/reference/string-substitutions.md +60 -0
- package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +90 -0
- package/templates/skills/cbp-build-cc-skill/templates/skill.md +51 -0
- package/templates/skills/cbp-checkpoint-check/SKILL.md +156 -0
- package/templates/skills/cbp-checkpoint-complete/SKILL.md +109 -0
- package/templates/skills/cbp-checkpoint-create/SKILL.md +116 -0
- package/templates/skills/cbp-checkpoint-end/SKILL.md +241 -0
- package/templates/skills/cbp-checkpoint-plan/SKILL.md +137 -0
- package/templates/skills/cbp-checkpoint-plan/reference/alternative-comparison-template.md +54 -0
- package/templates/skills/cbp-checkpoint-plan/reference/dep-decision-rubric.md +50 -0
- package/templates/skills/cbp-checkpoint-plan/reference/e2e-discovery-probe.md +57 -0
- package/templates/skills/cbp-checkpoint-plan/reference/gap-analysis-playbook.md +47 -0
- package/templates/skills/cbp-checkpoint-start/SKILL.md +84 -0
- package/templates/skills/cbp-checkpoint-update/SKILL.md +115 -0
- package/templates/skills/cbp-frontend-a11y/SKILL.md +109 -0
- package/templates/skills/cbp-frontend-a11y/reference/aria-roles-states.md +130 -0
- package/templates/skills/cbp-frontend-a11y/reference/contrast-visual.md +122 -0
- package/templates/skills/cbp-frontend-a11y/reference/keyboard-patterns.md +154 -0
- package/templates/skills/cbp-frontend-a11y/reference/semantic-html.md +111 -0
- package/templates/skills/cbp-frontend-design/SKILL.md +145 -0
- package/templates/skills/cbp-frontend-design/reference/nextjs-scss.md +118 -0
- package/templates/skills/cbp-frontend-design/reference/rn-expo.md +101 -0
- package/templates/skills/cbp-frontend-design/reference/tauri-react.md +82 -0
- package/templates/skills/cbp-frontend-ui/SKILL.md +262 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-label-maps.md +42 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-layout-patterns.md +105 -0
- package/templates/skills/cbp-frontend-ui/reference/variant-defaults.md +149 -0
- package/templates/skills/cbp-frontend-ux/SKILL.md +181 -0
- package/templates/skills/cbp-git-branch-feat-create/SKILL.md +115 -0
- package/templates/skills/cbp-git-commit/SKILL.md +278 -0
- package/templates/skills/cbp-git-worktree-create/SKILL.md +226 -0
- package/templates/skills/cbp-git-worktree-remove/SKILL.md +145 -0
- package/templates/skills/cbp-merge-main/SKILL.md +228 -0
- package/templates/skills/cbp-round-check/SKILL.md +104 -0
- package/templates/skills/cbp-round-end/SKILL.md +183 -0
- package/templates/skills/cbp-round-end/reference/findings-presentation.md +44 -0
- package/templates/skills/cbp-round-end/reference/inline-fallback.md +35 -0
- package/templates/skills/cbp-round-execute/SKILL.md +211 -0
- package/templates/skills/cbp-round-execute/reference/inline-fallback.md +59 -0
- package/templates/skills/cbp-round-input/SKILL.md +165 -0
- package/templates/skills/cbp-round-start/SKILL.md +222 -0
- package/templates/skills/cbp-round-update/SKILL.md +163 -0
- package/templates/skills/cbp-session-end/SKILL.md +187 -0
- package/templates/skills/cbp-session-start/SKILL.md +155 -0
- package/templates/skills/cbp-ship/SKILL.md +332 -0
- package/templates/skills/cbp-ship/reference/changesets-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/eas-cli-overview.md +60 -0
- package/templates/skills/cbp-ship/reference/gh-cli-overview.md +135 -0
- package/templates/skills/cbp-ship/reference/gh-cli-shipment-commands.md +283 -0
- package/templates/skills/cbp-ship/reference/npm-publish-monorepo.md +252 -0
- package/templates/skills/cbp-ship/reference/npm-publish-oidc-trusted.md +157 -0
- package/templates/skills/cbp-ship/reference/npm-publish-overview.md +171 -0
- package/templates/skills/cbp-ship/reference/preflight-checklist.md +88 -0
- package/templates/skills/cbp-ship/reference/railway-nestjs-deployment.md +169 -0
- package/templates/skills/cbp-ship/reference/railway-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/railway-troubleshooting.md +168 -0
- package/templates/skills/cbp-ship/reference/release-please-overview.md +99 -0
- package/templates/skills/cbp-ship/reference/surface-expo-eas.md +155 -0
- package/templates/skills/cbp-ship/reference/surface-npm.md +180 -0
- package/templates/skills/cbp-ship/reference/surface-railway.md +152 -0
- package/templates/skills/cbp-ship/reference/surface-supabase.md +178 -0
- package/templates/skills/cbp-ship/reference/surface-tauri.md +138 -0
- package/templates/skills/cbp-ship/reference/surface-vercel.md +124 -0
- package/templates/skills/cbp-ship/reference/surface-vscode-ext.md +144 -0
- package/templates/skills/cbp-ship/reference/surfaces.md +60 -0
- package/templates/skills/cbp-ship/reference/testflight-automation.md +215 -0
- package/templates/skills/cbp-ship/reference/testflight-internal-vs-external.md +69 -0
- package/templates/skills/cbp-ship/reference/testflight-overview.md +98 -0
- package/templates/skills/cbp-ship/reference/versioning.md +116 -0
- package/templates/skills/cbp-ship/scripts/detect-surfaces.sh +217 -0
- package/templates/skills/cbp-ship/scripts/verify-expo-eas.sh +35 -0
- package/templates/skills/cbp-ship/scripts/verify-npm.sh +21 -0
- package/templates/skills/cbp-ship/scripts/verify-railway.sh +41 -0
- package/templates/skills/cbp-ship/scripts/verify-supabase.sh +19 -0
- package/templates/skills/cbp-ship/scripts/verify-tauri.sh +24 -0
- package/templates/skills/cbp-ship/scripts/verify-vercel.sh +32 -0
- package/templates/skills/cbp-ship/scripts/verify-vscode-ext.sh +25 -0
- package/templates/skills/cbp-ship/templates/eas.json +66 -0
- package/templates/skills/cbp-ship/templates/railway.toml +15 -0
- package/templates/skills/cbp-ship/templates/release-please-config.json +17 -0
- package/templates/skills/cbp-ship/templates/vercel.json +19 -0
- package/templates/skills/cbp-ship/templates/vscodeignore +21 -0
- package/templates/skills/cbp-ship/templates/workflow-changesets.yml +41 -0
- package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +53 -0
- package/templates/skills/cbp-ship/templates/workflow-npm-publish.yml +36 -0
- package/templates/skills/cbp-ship/templates/workflow-release-please.yml +21 -0
- package/templates/skills/cbp-ship/templates/workflow-tauri-release.yml +69 -0
- package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +31 -0
- package/templates/skills/cbp-ship-configure/SKILL.md +296 -0
- package/templates/skills/cbp-ship-configure/reference/expo-mobile.md +204 -0
- package/templates/skills/cbp-ship-configure/reference/npm-package.md +165 -0
- package/templates/skills/cbp-ship-configure/reference/railway-backend.md +199 -0
- package/templates/skills/cbp-ship-configure/reference/supabase.md +200 -0
- package/templates/skills/cbp-ship-configure/reference/tauri-desktop.md +181 -0
- package/templates/skills/cbp-ship-configure/reference/vercel.md +117 -0
- package/templates/skills/cbp-ship-configure/reference/vscode-ext.md +155 -0
- package/templates/skills/cbp-ship-main/SKILL.md +65 -0
- package/templates/skills/cbp-supabase-branch-check/SKILL.md +337 -0
- package/templates/skills/cbp-supabase-branch-check/reference/dag-steps.md +29 -0
- package/templates/skills/cbp-supabase-migrate/SKILL.md +314 -0
- package/templates/skills/cbp-supabase-migrate/reference/advisor-triage.md +70 -0
- package/templates/skills/cbp-supabase-migrate/reference/cli-fallback.md +87 -0
- package/templates/skills/cbp-supabase-migrate/reference/preflight-dry-run.md +58 -0
- package/templates/skills/cbp-supabase-setup/SKILL.md +239 -0
- package/templates/skills/cbp-supabase-setup/reference/branching-setup.md +121 -0
- package/templates/skills/cbp-supabase-setup/reference/cli-fallback.md +109 -0
- package/templates/skills/cbp-task-check/SKILL.md +166 -0
- package/templates/skills/cbp-task-complete/SKILL.md +206 -0
- package/templates/skills/cbp-task-complete/reference/checkpoint-done-branching.md +48 -0
- package/templates/skills/cbp-task-complete/reference/next-step-heuristic.md +56 -0
- package/templates/skills/cbp-task-create/SKILL.md +167 -0
- package/templates/skills/cbp-task-start/SKILL.md +239 -0
- package/templates/skills/cbp-task-testing/SKILL.md +277 -0
- package/templates/skills/cbp-todo/SKILL.md +111 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Versioning Rules
|
|
2
|
+
|
|
3
|
+
How `/cbp-ship` decides which version a surface ships at.
|
|
4
|
+
|
|
5
|
+
## Three modes (per surface, configured per-package)
|
|
6
|
+
|
|
7
|
+
| Mode | Trigger | Best for |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `manual` | User bumps `package.json` / `tauri.conf.json` / `app.json` version themselves before checkpoint shipment | Apps with infrequent releases; small teams |
|
|
10
|
+
| `release-please` | GH Actions opens version-bump PRs based on conventional commit messages on the watched branch; merge the PR before shipment | npm packages with frequent releases; multi-contributor repos |
|
|
11
|
+
| `changesets` | Devs add `.changeset/*.md` entries in feature branches; an aggregator PR collects them | Monorepos with many independent packages |
|
|
12
|
+
|
|
13
|
+
Mode is set per-surface in `.codebyplan/shipment.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"surfaces": {
|
|
18
|
+
"npm-package": {
|
|
19
|
+
"packages/codebyplan-package": { "versioning": "release-please" }
|
|
20
|
+
},
|
|
21
|
+
"tauri-desktop": { "versioning": "manual" },
|
|
22
|
+
"expo-mobile": { "versioning": "auto-build-number" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Auto-bumping where possible
|
|
28
|
+
|
|
29
|
+
These bumps happen automatically — never user-prompted:
|
|
30
|
+
|
|
31
|
+
| Surface | Field | Bump rule |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `expo-mobile` | `expo.ios.buildNumber` | `eas.json` `autoIncrement: "buildNumber"` — handled by EAS |
|
|
34
|
+
| `expo-mobile` | `expo.android.versionCode` | `eas.json` `autoIncrement: "versionCode"` — handled by EAS |
|
|
35
|
+
| `vercel-web` | n/a | Vercel uses commit SHA; no semver bump needed |
|
|
36
|
+
|
|
37
|
+
## Semver bump rules (manual or release-please modes)
|
|
38
|
+
|
|
39
|
+
When the orchestrator detects a version change is needed but mode is `manual`, it suggests a bump based on commit messages since the last release:
|
|
40
|
+
|
|
41
|
+
| Commit message pattern | Suggested bump |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Has `BREAKING CHANGE:` in footer OR `feat!:`/`fix!:` prefix | major |
|
|
44
|
+
| Any `feat:` prefix | minor |
|
|
45
|
+
| Otherwise | patch |
|
|
46
|
+
|
|
47
|
+
The user can override the suggestion. The orchestrator NEVER auto-bumps without confirmation in `manual` mode.
|
|
48
|
+
|
|
49
|
+
## release-please conventions
|
|
50
|
+
|
|
51
|
+
Conventional Commits are the trigger:
|
|
52
|
+
|
|
53
|
+
| Prefix | Action |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `feat:` | Minor bump in next release-please PR |
|
|
56
|
+
| `fix:` | Patch bump |
|
|
57
|
+
| `feat!:` / `fix!:` / `BREAKING CHANGE:` | Major bump |
|
|
58
|
+
| `chore:`, `docs:`, `refactor:`, `test:`, `style:`, `perf:`, `ci:` | No bump |
|
|
59
|
+
|
|
60
|
+
The release-please workflow lives at `.github/workflows/release-please.yml` (scaffolded by `/cbp-ship-configure`).
|
|
61
|
+
|
|
62
|
+
## changesets conventions
|
|
63
|
+
|
|
64
|
+
A changeset is a markdown file describing the change:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
---
|
|
68
|
+
"@scope/pkg-a": minor
|
|
69
|
+
"@scope/pkg-b": patch
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
Add new export `foo` and fix bug in `bar`.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Changesets are committed alongside feature work. The aggregator PR (`changeset-release/main`) collects pending changesets and bumps versions when merged.
|
|
76
|
+
|
|
77
|
+
`/cbp-ship-configure` scaffolds `.changeset/config.json` and the GH Actions workflow.
|
|
78
|
+
|
|
79
|
+
## Pre-release versions
|
|
80
|
+
|
|
81
|
+
When the version contains a pre-release identifier (`-alpha.N`, `-beta.N`, `-rc.N`), the surface deploy uses the appropriate dist-tag:
|
|
82
|
+
|
|
83
|
+
| Surface | Pre-release handling |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `npm-package` | `npm publish --tag <pre-id>` (never promotes to `latest`) |
|
|
86
|
+
| `vscode-ext` | `vsce publish --pre-release` |
|
|
87
|
+
| `tauri-desktop` | Tag pushed normally; users opt into pre-release via Tauri config |
|
|
88
|
+
| `expo-mobile` | TestFlight internal/external groups handle pre-release semantics naturally |
|
|
89
|
+
| `vercel-web` | Use Vercel preview branches for pre-release URLs |
|
|
90
|
+
|
|
91
|
+
## Coordinated bumps in monorepos
|
|
92
|
+
|
|
93
|
+
When multiple surfaces ship together, bumps may need to coordinate:
|
|
94
|
+
|
|
95
|
+
- **Tauri desktop bump → updater manifest** — desktop bump triggers a `latest.json` update; users get prompted at next launch. Only push tauri tag at planned release boundaries.
|
|
96
|
+
- **npm package bump → consumer apps' `pnpm.overrides`** — if a sibling package consumes the bumped one, decide if you want apps pinned to the prior version (no override change) or rolled forward (override updated).
|
|
97
|
+
- **Mobile build number auto-increment** — EAS bumps independently; the user-facing `expo.version` (semver) is bumped only when the user explicitly changes it.
|
|
98
|
+
|
|
99
|
+
## What NOT to do
|
|
100
|
+
|
|
101
|
+
- Don't manually edit `package.json` version inside `/cbp-ship` — versioning happens before shipment, not during
|
|
102
|
+
- Don't auto-bump in `manual` mode without confirmation — the user owns the bump
|
|
103
|
+
- Don't squash changeset commits — release-please / changesets need each conventional commit visible
|
|
104
|
+
- Don't tag a Tauri release before the version commit is on PRODUCTION branch — the tag locks the shipped version
|
|
105
|
+
|
|
106
|
+
## Decision: which mode to pick when configuring a new surface
|
|
107
|
+
|
|
108
|
+
| Question | If yes |
|
|
109
|
+
|---|---|
|
|
110
|
+
| Is this an npm package with multiple authors? | release-please |
|
|
111
|
+
| Is this a monorepo with 3+ published packages? | changesets |
|
|
112
|
+
| Is this a single app with infrequent releases? | manual |
|
|
113
|
+
| Is this a mobile app? | manual for semver + auto for build numbers |
|
|
114
|
+
| Is this Tauri desktop? | manual (tags drive the release) |
|
|
115
|
+
| Is this VS Code extension? | manual |
|
|
116
|
+
| Is this Vercel web? | n/a — Vercel uses SHA not semver |
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Detect shipment surfaces in the current repo.
|
|
3
|
+
# Emits JSON to stdout: { "surfaces": [ { id, instance, configured, reason } ] }
|
|
4
|
+
# Usage: detect-surfaces.sh [--filter=<id>]
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
9
|
+
cd "$REPO_ROOT"
|
|
10
|
+
|
|
11
|
+
FILTER=""
|
|
12
|
+
for arg in "$@"; do
|
|
13
|
+
case "$arg" in
|
|
14
|
+
--filter=*) FILTER="${arg#--filter=}" ;;
|
|
15
|
+
esac
|
|
16
|
+
done
|
|
17
|
+
|
|
18
|
+
# Load shipment config from .codebyplan/shipment.json (if present)
|
|
19
|
+
DISABLED_JSON="[]"
|
|
20
|
+
SURFACES_JSON="{}"
|
|
21
|
+
if [ -f .codebyplan/shipment.json ]; then
|
|
22
|
+
DISABLED_JSON=$(jq -r '.disabled // [] | tostring' .codebyplan/shipment.json 2>/dev/null || echo "[]")
|
|
23
|
+
SURFACES_JSON=$(jq -r '.surfaces // {} | tostring' .codebyplan/shipment.json 2>/dev/null || echo "{}")
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
is_disabled() {
|
|
27
|
+
local id="$1"
|
|
28
|
+
echo "$DISABLED_JSON" | jq -e --arg id "$id" 'index($id)' >/dev/null 2>&1
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
emit() {
|
|
32
|
+
# Emit one JSON line per surface; we'll wrap in array at end
|
|
33
|
+
local id="$1" instance="$2" configured="$3" reason="$4"
|
|
34
|
+
if [ -n "$FILTER" ] && [ "$FILTER" != "$id" ]; then
|
|
35
|
+
return
|
|
36
|
+
fi
|
|
37
|
+
if is_disabled "$id"; then
|
|
38
|
+
return
|
|
39
|
+
fi
|
|
40
|
+
jq -nc \
|
|
41
|
+
--arg id "$id" --arg instance "$instance" \
|
|
42
|
+
--argjson configured "$configured" --arg reason "$reason" \
|
|
43
|
+
'{id: $id, instance: $instance, configured: $configured, reason: $reason}'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# ============ vercel-web ============
|
|
47
|
+
detect_vercel() {
|
|
48
|
+
# Look at every package.json and decide if it's a web app
|
|
49
|
+
while IFS= read -r pkg; do
|
|
50
|
+
local app_path
|
|
51
|
+
app_path=$(dirname "$pkg")
|
|
52
|
+
[ "$app_path" = "." ] && continue
|
|
53
|
+
[[ "$app_path" =~ /node_modules/ ]] && continue
|
|
54
|
+
|
|
55
|
+
# Has Next or is explicitly Vercel-flagged?
|
|
56
|
+
local has_next has_vercel_json has_vercel_link
|
|
57
|
+
has_next=$(jq -e '.dependencies.next // .devDependencies.next' "$pkg" >/dev/null 2>&1 && echo y || echo n)
|
|
58
|
+
has_vercel_json=$([ -f "$app_path/vercel.json" ] && echo y || echo n)
|
|
59
|
+
has_vercel_link=$([ -f "$app_path/.vercel/project.json" ] && echo y || echo n)
|
|
60
|
+
|
|
61
|
+
if [ "$has_next" = "y" ] || [ "$has_vercel_json" = "y" ] || [ "$has_vercel_link" = "y" ]; then
|
|
62
|
+
if [ "$has_vercel_link" = "y" ]; then
|
|
63
|
+
emit "vercel-web" "$app_path" true "vercel.json + .vercel/project.json present"
|
|
64
|
+
else
|
|
65
|
+
emit "vercel-web" "$app_path" false "Next.js detected but .vercel/project.json missing — run /cbp-ship-configure"
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
68
|
+
done < <(find apps -maxdepth 3 -name package.json 2>/dev/null; [ -f package.json ] && echo "./package.json")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# ============ expo-mobile ============
|
|
72
|
+
detect_expo() {
|
|
73
|
+
while IFS= read -r app; do
|
|
74
|
+
local app_path
|
|
75
|
+
app_path=$(dirname "$app")
|
|
76
|
+
[[ "$app_path" =~ /node_modules/ ]] && continue
|
|
77
|
+
|
|
78
|
+
local has_eas
|
|
79
|
+
has_eas=$([ -f "$app_path/eas.json" ] && echo y || echo n)
|
|
80
|
+
|
|
81
|
+
if [ "$has_eas" = "y" ]; then
|
|
82
|
+
emit "expo-mobile" "$app_path" true "app.json + eas.json present"
|
|
83
|
+
else
|
|
84
|
+
emit "expo-mobile" "$app_path" false "app.json present but eas.json missing — run /cbp-ship-configure"
|
|
85
|
+
fi
|
|
86
|
+
done < <(find . -maxdepth 4 -name "app.json" -not -path "*/node_modules/*" 2>/dev/null \
|
|
87
|
+
| xargs -I{} sh -c 'jq -e ".expo" "{}" >/dev/null 2>&1 && echo "{}"' 2>/dev/null)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# ============ tauri-desktop ============
|
|
91
|
+
detect_tauri() {
|
|
92
|
+
while IFS= read -r conf; do
|
|
93
|
+
local app_path
|
|
94
|
+
app_path=$(dirname "$(dirname "$conf")")
|
|
95
|
+
[[ "$app_path" =~ /node_modules/ ]] && continue
|
|
96
|
+
|
|
97
|
+
local has_workflow
|
|
98
|
+
has_workflow=$(find .github/workflows -maxdepth 1 -name "*.yml" 2>/dev/null \
|
|
99
|
+
| xargs grep -l "tauri-action" 2>/dev/null | head -1)
|
|
100
|
+
|
|
101
|
+
if [ -n "$has_workflow" ]; then
|
|
102
|
+
emit "tauri-desktop" "$app_path" true "src-tauri/ + tauri-action workflow present"
|
|
103
|
+
else
|
|
104
|
+
emit "tauri-desktop" "$app_path" false "src-tauri/ present but no release workflow — run /cbp-ship-configure"
|
|
105
|
+
fi
|
|
106
|
+
done < <(find . -maxdepth 4 -name "tauri.conf.json" -not -path "*/node_modules/*" -not -path "*/target/*" 2>/dev/null)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# ============ npm-package ============
|
|
110
|
+
detect_npm() {
|
|
111
|
+
while IFS= read -r pkg; do
|
|
112
|
+
local pkg_path
|
|
113
|
+
pkg_path=$(dirname "$pkg")
|
|
114
|
+
[ "$pkg_path" = "." ] && continue
|
|
115
|
+
[[ "$pkg_path" =~ /node_modules/ ]] && continue
|
|
116
|
+
[[ "$pkg_path" =~ ^./apps/ ]] && continue # apps don't publish
|
|
117
|
+
|
|
118
|
+
local is_private name
|
|
119
|
+
is_private=$(jq -r '.private // false' "$pkg")
|
|
120
|
+
name=$(jq -r '.name // ""' "$pkg")
|
|
121
|
+
|
|
122
|
+
[ "$is_private" = "true" ] && continue
|
|
123
|
+
[ -z "$name" ] && continue
|
|
124
|
+
|
|
125
|
+
emit "npm-package" "$pkg_path" true "publishable package: $name"
|
|
126
|
+
done < <(find packages -maxdepth 2 -name package.json 2>/dev/null)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
# ============ vscode-ext ============
|
|
130
|
+
detect_vscode() {
|
|
131
|
+
while IFS= read -r pkg; do
|
|
132
|
+
local pkg_path
|
|
133
|
+
pkg_path=$(dirname "$pkg")
|
|
134
|
+
[[ "$pkg_path" =~ /node_modules/ ]] && continue
|
|
135
|
+
|
|
136
|
+
local has_engine has_publisher
|
|
137
|
+
has_engine=$(jq -e '.engines.vscode' "$pkg" >/dev/null 2>&1 && echo y || echo n)
|
|
138
|
+
has_publisher=$(jq -e '.publisher' "$pkg" >/dev/null 2>&1 && echo y || echo n)
|
|
139
|
+
|
|
140
|
+
if [ "$has_engine" = "y" ] && [ "$has_publisher" = "y" ]; then
|
|
141
|
+
emit "vscode-ext" "$pkg_path" true "engines.vscode + publisher set"
|
|
142
|
+
elif [ "$has_engine" = "y" ]; then
|
|
143
|
+
emit "vscode-ext" "$pkg_path" false "engines.vscode set but publisher missing — run /cbp-ship-configure"
|
|
144
|
+
fi
|
|
145
|
+
done < <(find apps packages -maxdepth 3 -name package.json 2>/dev/null)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# ============ railway-backend ============
|
|
149
|
+
detect_railway() {
|
|
150
|
+
# Direct signal: railway config
|
|
151
|
+
while IFS= read -r conf; do
|
|
152
|
+
local app_path
|
|
153
|
+
app_path=$(dirname "$conf")
|
|
154
|
+
[[ "$app_path" =~ /node_modules/ ]] && continue
|
|
155
|
+
emit "railway-backend" "$app_path" true "railway.toml/json present"
|
|
156
|
+
done < <(find . -maxdepth 4 \( -name "railway.toml" -o -name "railway.json" \) -not -path "*/node_modules/*" 2>/dev/null)
|
|
157
|
+
|
|
158
|
+
# Indirect: Dockerfile + non-frontend package.json
|
|
159
|
+
while IFS= read -r dockerfile; do
|
|
160
|
+
local app_path
|
|
161
|
+
app_path=$(dirname "$dockerfile")
|
|
162
|
+
[[ "$app_path" =~ /node_modules/ ]] && continue
|
|
163
|
+
[ -f "$app_path/railway.toml" ] || [ -f "$app_path/railway.json" ] && continue # already emitted above
|
|
164
|
+
|
|
165
|
+
local pkg="$app_path/package.json"
|
|
166
|
+
[ -f "$pkg" ] || continue
|
|
167
|
+
local is_frontend
|
|
168
|
+
is_frontend=$(jq -e '.dependencies.next // .dependencies."react-native" // .dependencies.expo' "$pkg" >/dev/null 2>&1 && echo y || echo n)
|
|
169
|
+
[ "$is_frontend" = "y" ] && continue
|
|
170
|
+
|
|
171
|
+
emit "railway-backend" "$app_path" false "Dockerfile present but Railway not linked — run /cbp-ship-configure"
|
|
172
|
+
done < <(find . -maxdepth 3 -name "Dockerfile" -not -path "*/node_modules/*" 2>/dev/null)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
# ============ supabase ============
|
|
176
|
+
detect_supabase() {
|
|
177
|
+
if [ -d supabase/migrations ] || find apps -maxdepth 3 -type d -name "supabase" 2>/dev/null | head -1 | grep -q .; then
|
|
178
|
+
local migration_dir
|
|
179
|
+
if [ -d supabase/migrations ]; then
|
|
180
|
+
migration_dir="supabase/migrations"
|
|
181
|
+
else
|
|
182
|
+
migration_dir=$(find apps -maxdepth 3 -type d -path "*/supabase/migrations" | head -1)
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
[ -z "$migration_dir" ] && return
|
|
186
|
+
|
|
187
|
+
# Pending count = files newer than last_shipped_migration_version
|
|
188
|
+
local last_version pending_count
|
|
189
|
+
last_version=$(echo "$SURFACES_JSON" | jq -r '."supabase".last_shipped_migration_version // ""' 2>/dev/null)
|
|
190
|
+
if [ -n "$last_version" ]; then
|
|
191
|
+
pending_count=$(find "$migration_dir" -name "*.sql" -newer "$migration_dir/$last_version" 2>/dev/null | wc -l | tr -d ' ')
|
|
192
|
+
else
|
|
193
|
+
pending_count=$(find "$migration_dir" -name "*.sql" 2>/dev/null | wc -l | tr -d ' ')
|
|
194
|
+
fi
|
|
195
|
+
|
|
196
|
+
if [ "$pending_count" -gt 0 ]; then
|
|
197
|
+
local has_link
|
|
198
|
+
has_link=$([ -f supabase/.temp/project-ref ] && echo y || echo n)
|
|
199
|
+
if [ "$has_link" = "y" ]; then
|
|
200
|
+
emit "supabase" "$migration_dir" true "$pending_count migrations pending"
|
|
201
|
+
else
|
|
202
|
+
emit "supabase" "$migration_dir" false "$pending_count migrations but project not linked — run /cbp-ship-configure"
|
|
203
|
+
fi
|
|
204
|
+
fi
|
|
205
|
+
fi
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
# ============ Run all detectors and wrap in array ============
|
|
209
|
+
{
|
|
210
|
+
detect_vercel
|
|
211
|
+
detect_expo
|
|
212
|
+
detect_tauri
|
|
213
|
+
detect_npm
|
|
214
|
+
detect_vscode
|
|
215
|
+
detect_railway
|
|
216
|
+
detect_supabase
|
|
217
|
+
} | jq -s '{surfaces: .}'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify an EAS build + submission landed.
|
|
3
|
+
# Usage: verify-expo-eas.sh <build-id> [<submission-platform>]
|
|
4
|
+
# Exit: 0 ok, 1 fail, 2 verification_pending
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
BUILD_ID="$1"
|
|
8
|
+
PLATFORM="${2:-ios}"
|
|
9
|
+
|
|
10
|
+
STATUS=$(eas build:view "$BUILD_ID" --json 2>/dev/null | jq -r '.status // "UNKNOWN"')
|
|
11
|
+
|
|
12
|
+
case "$STATUS" in
|
|
13
|
+
FINISHED)
|
|
14
|
+
SUBMISSION=$(eas submit:list --status finished --json 2>/dev/null \
|
|
15
|
+
| jq -r --arg b "$BUILD_ID" '.[] | select(.buildId == $b) | .status' | head -1)
|
|
16
|
+
if [ "$SUBMISSION" = "finished" ]; then
|
|
17
|
+
echo "OK build=$BUILD_ID submission=finished"
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
echo "PENDING: build done; submission=$SUBMISSION (TestFlight/Play processing)"
|
|
21
|
+
exit 2
|
|
22
|
+
;;
|
|
23
|
+
IN_QUEUE|IN_PROGRESS)
|
|
24
|
+
echo "PENDING: $STATUS"
|
|
25
|
+
exit 2
|
|
26
|
+
;;
|
|
27
|
+
ERRORED|CANCELED)
|
|
28
|
+
echo "FAIL: build $STATUS"
|
|
29
|
+
exit 1
|
|
30
|
+
;;
|
|
31
|
+
*)
|
|
32
|
+
echo "PENDING: unknown state $STATUS"
|
|
33
|
+
exit 2
|
|
34
|
+
;;
|
|
35
|
+
esac
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify an npm package version is published.
|
|
3
|
+
# Usage: verify-npm.sh <package-name> <version>
|
|
4
|
+
# Exit: 0 ok, 1 fail
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
PKG="$1"
|
|
8
|
+
VERSION="$2"
|
|
9
|
+
|
|
10
|
+
RESOLVED=$(npm view "$PKG@$VERSION" version 2>/dev/null || echo "")
|
|
11
|
+
[ "$RESOLVED" = "$VERSION" ] || { echo "FAIL: $PKG@$VERSION not on registry"; exit 1; }
|
|
12
|
+
|
|
13
|
+
# Provenance attestation (bonus check)
|
|
14
|
+
ATT=$(npm view "$PKG@$VERSION" --json 2>/dev/null | jq -r '.dist.attestations // empty')
|
|
15
|
+
[ -n "$ATT" ] && PROV="yes" || PROV="no"
|
|
16
|
+
|
|
17
|
+
# Tarball SRI
|
|
18
|
+
SRI=$(npm view "$PKG@$VERSION" dist.integrity 2>/dev/null || echo "")
|
|
19
|
+
[ -n "$SRI" ] || echo "WARN: no integrity hash"
|
|
20
|
+
|
|
21
|
+
echo "OK $PKG@$VERSION provenance=$PROV"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify a Railway deployment is SUCCESS and the service responds.
|
|
3
|
+
# Usage: verify-railway.sh <deployment-id> [<url>]
|
|
4
|
+
# Exit: 0 ok, 1 fail, 2 pending
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
DEPLOY_ID="$1"
|
|
8
|
+
URL="${2:-}"
|
|
9
|
+
|
|
10
|
+
STATUS=$(railway deployment status "$DEPLOY_ID" --json 2>/dev/null | jq -r '.status // "UNKNOWN"')
|
|
11
|
+
|
|
12
|
+
case "$STATUS" in
|
|
13
|
+
SUCCESS|DEPLOYED)
|
|
14
|
+
if [ -n "$URL" ]; then
|
|
15
|
+
HEALTH=$(curl -sIm 10 "https://$URL/health" 2>/dev/null | head -1 | awk '{print $2}' || echo "")
|
|
16
|
+
if [ "$HEALTH" = "200" ]; then
|
|
17
|
+
echo "OK deploy=$DEPLOY_ID health=200"
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
ROOT=$(curl -sIm 10 "https://$URL" 2>/dev/null | head -1 | awk '{print $2}' || echo "")
|
|
21
|
+
case "$ROOT" in
|
|
22
|
+
2*|3*) echo "OK deploy=$DEPLOY_ID root=$ROOT (no /health endpoint)"; exit 0 ;;
|
|
23
|
+
*) echo "FAIL: deploy succeeded but service unreachable ($ROOT)"; exit 1 ;;
|
|
24
|
+
esac
|
|
25
|
+
fi
|
|
26
|
+
echo "OK deploy=$DEPLOY_ID (no URL to probe)"
|
|
27
|
+
exit 0
|
|
28
|
+
;;
|
|
29
|
+
BUILDING|DEPLOYING|QUEUED|WAITING)
|
|
30
|
+
echo "PENDING: $STATUS"
|
|
31
|
+
exit 2
|
|
32
|
+
;;
|
|
33
|
+
FAILED|CRASHED)
|
|
34
|
+
echo "FAIL: deploy $STATUS"
|
|
35
|
+
exit 1
|
|
36
|
+
;;
|
|
37
|
+
*)
|
|
38
|
+
echo "PENDING: unknown state $STATUS"
|
|
39
|
+
exit 2
|
|
40
|
+
;;
|
|
41
|
+
esac
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify Supabase migrations applied successfully.
|
|
3
|
+
# Usage: verify-supabase.sh <expected-last-migration-version>
|
|
4
|
+
# Exit: 0 ok, 1 fail
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
EXPECTED="$1"
|
|
8
|
+
|
|
9
|
+
# Migration appears in remote-applied list
|
|
10
|
+
APPLIED=$(supabase migration list --linked 2>/dev/null | grep -F "$EXPECTED" | wc -l | tr -d ' ')
|
|
11
|
+
[ "$APPLIED" -gt 0 ] || { echo "FAIL: migration $EXPECTED not found on remote"; exit 1; }
|
|
12
|
+
|
|
13
|
+
# No drift between local migrations and remote schema
|
|
14
|
+
DRIFT_LINES=$(supabase db diff --use-migra 2>/dev/null | grep -v "^--" | grep -v "^$" | wc -l | tr -d ' ')
|
|
15
|
+
if [ "$DRIFT_LINES" -gt 0 ]; then
|
|
16
|
+
echo "WARN: $DRIFT_LINES lines of drift detected (run: supabase db diff --use-migra)"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "OK migration=$EXPECTED drift_lines=$DRIFT_LINES"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify a Tauri desktop release was tagged + published with assets.
|
|
3
|
+
# Usage: verify-tauri.sh <version-without-v-prefix>
|
|
4
|
+
# Exit: 0 ok, 1 fail
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
VERSION="$1"
|
|
8
|
+
TAG="v$VERSION"
|
|
9
|
+
|
|
10
|
+
git fetch origin --tags >/dev/null 2>&1
|
|
11
|
+
git rev-parse "$TAG" >/dev/null 2>&1 || { echo "FAIL: tag $TAG missing locally"; exit 1; }
|
|
12
|
+
git ls-remote --tags origin "$TAG" | grep -q . || { echo "FAIL: tag $TAG not pushed"; exit 1; }
|
|
13
|
+
|
|
14
|
+
PUBLISHED=$(gh release view "$TAG" --json publishedAt -q .publishedAt 2>/dev/null || echo "")
|
|
15
|
+
[ -n "$PUBLISHED" ] || { echo "FAIL: release $TAG not published"; exit 1; }
|
|
16
|
+
|
|
17
|
+
ASSETS=$(gh release view "$TAG" --json assets -q '.assets | length' 2>/dev/null)
|
|
18
|
+
[ "${ASSETS:-0}" -ge 1 ] || { echo "FAIL: release $TAG has no assets"; exit 1; }
|
|
19
|
+
|
|
20
|
+
# Tauri auto-update needs latest.json
|
|
21
|
+
HAS_MANIFEST=$(gh release view "$TAG" --json assets -q '.assets[].name' | grep -c "latest.json" || true)
|
|
22
|
+
[ "$HAS_MANIFEST" -gt 0 ] || echo "WARN: latest.json missing — auto-update may not work"
|
|
23
|
+
|
|
24
|
+
echo "OK tag=$TAG assets=$ASSETS published=$PUBLISHED"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify a Vercel deployment is READY and reachable.
|
|
3
|
+
# Usage: verify-vercel.sh <deployment-id-or-url>
|
|
4
|
+
# Exit: 0 ok, 1 fail, 2 verification_pending
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
DEPLOY="$1"
|
|
8
|
+
|
|
9
|
+
STATUS=$(vercel inspect "$DEPLOY" --json 2>/dev/null | jq -r '.readyState // "UNKNOWN"')
|
|
10
|
+
|
|
11
|
+
case "$STATUS" in
|
|
12
|
+
READY)
|
|
13
|
+
URL=$(vercel inspect "$DEPLOY" --json | jq -r '.alias[0] // .url')
|
|
14
|
+
HTTP=$(curl -sIm 30 "https://$URL" 2>/dev/null | head -1 | awk '{print $2}')
|
|
15
|
+
case "$HTTP" in
|
|
16
|
+
200|301|302|401) echo "OK $URL ($HTTP)"; exit 0 ;;
|
|
17
|
+
*) echo "FAIL: HTTP $HTTP for $URL"; exit 1 ;;
|
|
18
|
+
esac
|
|
19
|
+
;;
|
|
20
|
+
BUILDING|QUEUED|INITIALIZING)
|
|
21
|
+
echo "PENDING: build still in progress ($STATUS)"
|
|
22
|
+
exit 2
|
|
23
|
+
;;
|
|
24
|
+
ERROR|CANCELED)
|
|
25
|
+
echo "FAIL: deployment $STATUS"
|
|
26
|
+
exit 1
|
|
27
|
+
;;
|
|
28
|
+
*)
|
|
29
|
+
echo "PENDING: unknown state $STATUS"
|
|
30
|
+
exit 2
|
|
31
|
+
;;
|
|
32
|
+
esac
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Verify a VS Code extension version is on the Marketplace.
|
|
3
|
+
# Usage: verify-vscode-ext.sh <publisher.name> <version>
|
|
4
|
+
# Exit: 0 ok, 1 fail, 2 pending (marketplace lag)
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
EXT_ID="$1"
|
|
8
|
+
VERSION="$2"
|
|
9
|
+
|
|
10
|
+
RESOLVED=$(npx --yes @vscode/vsce show "$EXT_ID" --json 2>/dev/null | jq -r '.versions[0].version // ""')
|
|
11
|
+
|
|
12
|
+
if [ "$RESOLVED" = "$VERSION" ]; then
|
|
13
|
+
EVENTS=$(npx --yes @vscode/vsce show "$EXT_ID" --json | jq -r '.activationEvents | length // 0')
|
|
14
|
+
[ "$EVENTS" -gt 0 ] || echo "WARN: no activation events declared"
|
|
15
|
+
echo "OK $EXT_ID@$VERSION"
|
|
16
|
+
exit 0
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [ -z "$RESOLVED" ]; then
|
|
20
|
+
echo "FAIL: extension $EXT_ID not found on marketplace"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
echo "PENDING: marketplace shows $RESOLVED, expected $VERSION (1-5min propagation lag possible)"
|
|
25
|
+
exit 2
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": {
|
|
3
|
+
"version": ">= 5.0.0"
|
|
4
|
+
},
|
|
5
|
+
"build": {
|
|
6
|
+
"development": {
|
|
7
|
+
"developmentClient": true,
|
|
8
|
+
"distribution": "internal",
|
|
9
|
+
"ios": {
|
|
10
|
+
"simulator": false,
|
|
11
|
+
"resourceClass": "m-medium"
|
|
12
|
+
},
|
|
13
|
+
"android": {
|
|
14
|
+
"buildType": "apk"
|
|
15
|
+
},
|
|
16
|
+
"channel": "development"
|
|
17
|
+
},
|
|
18
|
+
"preview": {
|
|
19
|
+
"distribution": "internal",
|
|
20
|
+
"ios": {
|
|
21
|
+
"simulator": false,
|
|
22
|
+
"resourceClass": "m-medium"
|
|
23
|
+
},
|
|
24
|
+
"android": {
|
|
25
|
+
"buildType": "apk"
|
|
26
|
+
},
|
|
27
|
+
"channel": "preview",
|
|
28
|
+
"autoIncrement": "buildNumber"
|
|
29
|
+
},
|
|
30
|
+
"production": {
|
|
31
|
+
"ios": {
|
|
32
|
+
"resourceClass": "m-medium"
|
|
33
|
+
},
|
|
34
|
+
"android": {
|
|
35
|
+
"buildType": "app-bundle"
|
|
36
|
+
},
|
|
37
|
+
"channel": "production",
|
|
38
|
+
"autoIncrement": "buildNumber"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"submit": {
|
|
42
|
+
"production": {
|
|
43
|
+
"ios": {
|
|
44
|
+
"appleId": "REPLACE_WITH_APPLE_ID_EMAIL",
|
|
45
|
+
"ascAppId": "REPLACE_WITH_APP_STORE_CONNECT_APP_ID",
|
|
46
|
+
"appleTeamId": "REPLACE_WITH_APPLE_TEAM_ID"
|
|
47
|
+
},
|
|
48
|
+
"android": {
|
|
49
|
+
"serviceAccountKeyPath": "./google-play-service-account.json",
|
|
50
|
+
"track": "internal",
|
|
51
|
+
"releaseStatus": "draft"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"preview": {
|
|
55
|
+
"ios": {
|
|
56
|
+
"appleId": "REPLACE_WITH_APPLE_ID_EMAIL",
|
|
57
|
+
"ascAppId": "REPLACE_WITH_APP_STORE_CONNECT_APP_ID",
|
|
58
|
+
"appleTeamId": "REPLACE_WITH_APPLE_TEAM_ID"
|
|
59
|
+
},
|
|
60
|
+
"android": {
|
|
61
|
+
"serviceAccountKeyPath": "./google-play-service-account.json",
|
|
62
|
+
"track": "internal"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Railway service configuration
|
|
2
|
+
# Reference: https://docs.railway.app/reference/config-as-code
|
|
3
|
+
|
|
4
|
+
[build]
|
|
5
|
+
builder = "DOCKERFILE"
|
|
6
|
+
dockerfilePath = "Dockerfile"
|
|
7
|
+
|
|
8
|
+
[deploy]
|
|
9
|
+
startCommand = "pnpm start"
|
|
10
|
+
healthcheckPath = "/health"
|
|
11
|
+
healthcheckTimeout = 30
|
|
12
|
+
restartPolicyType = "ON_FAILURE"
|
|
13
|
+
restartPolicyMaxRetries = 3
|
|
14
|
+
numReplicas = 1
|
|
15
|
+
sleepApplication = false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"release-type": "node",
|
|
4
|
+
"include-component-in-tag": false,
|
|
5
|
+
"bump-minor-pre-major": true,
|
|
6
|
+
"bump-patch-for-minor-pre-major": false,
|
|
7
|
+
"draft": false,
|
|
8
|
+
"prerelease": false,
|
|
9
|
+
"packages": {
|
|
10
|
+
".": {
|
|
11
|
+
"package-name": "REPLACE_WITH_PACKAGE_NAME",
|
|
12
|
+
"changelog-path": "CHANGELOG.md",
|
|
13
|
+
"release-type": "node",
|
|
14
|
+
"extra-files": []
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
3
|
+
"framework": "nextjs",
|
|
4
|
+
"buildCommand": "cd ../.. && pnpm turbo build --filter=REPLACE_WITH_APP_NAME",
|
|
5
|
+
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
|
|
6
|
+
"outputDirectory": ".next",
|
|
7
|
+
"regions": ["iad1"],
|
|
8
|
+
"headers": [
|
|
9
|
+
{
|
|
10
|
+
"source": "/(.*)",
|
|
11
|
+
"headers": [
|
|
12
|
+
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" },
|
|
13
|
+
{ "key": "X-Content-Type-Options", "value": "nosniff" },
|
|
14
|
+
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" },
|
|
15
|
+
{ "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|