create-apollo-monorepo 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/index.mjs +15 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -352,6 +352,11 @@ function writeRootPackageJson(targetDir, dirName) {
352
352
  // `pnpm setup` is pnpm's CLI bootstrap built-in — must use `run` to
353
353
  // forward to the workspace's setup script (apollo-cms's db:push + db:seed).
354
354
  "backend:setup": "pnpm --filter ./apps/backend run setup",
355
+ // Full apollo-cms upgrade pipeline: drizzle push + replay
356
+ // src/upgrades/0.1.*.ts data migrations + seed. Run this after
357
+ // `pnpm backend:update` so any data-migration step from the new
358
+ // apollo-cms version is applied — `backend:setup` alone skips it.
359
+ "backend:upgrade": "pnpm --filter ./apps/backend exec bun run upgrade",
355
360
  },
356
361
  devDependencies: {
357
362
  concurrently: "^9.0.0",
@@ -1003,12 +1008,20 @@ folder + \`plugin.json#name\`.
1003
1008
 
1004
1009
  ## Updating the backend
1005
1010
 
1006
- Apollo CMS is tracked as a git submodule. Pull the latest:
1011
+ Apollo CMS is tracked as a git submodule. Full upgrade flow:
1007
1012
 
1008
1013
  \`\`\`bash
1009
- pnpm backend:update
1014
+ pnpm backend:update # fast-forward apps/backend to the latest apollo-cms commit
1015
+ pnpm install # in case the submodule changed package.json
1016
+ pnpm backend:upgrade # drizzle push + replay version migrations + seed
1010
1017
  \`\`\`
1011
1018
 
1019
+ | Script | What it does |
1020
+ | --- | --- |
1021
+ | \`pnpm backend:update\` | \`git submodule update --remote --merge apps/backend\` — code only |
1022
+ | \`pnpm backend:setup\` | First-time bootstrap: \`db:push\` + \`db:seed\` only |
1023
+ | \`pnpm backend:upgrade\` | Full pipeline: \`db:push\` + replay \`src/upgrades/0.1.*.ts\` data migrations + \`db:seed\`. **Use this** after \`backend:update\` — \`backend:setup\` skips the data-migration phase. |
1024
+
1012
1025
  Do **not** edit files inside \`apps/backend\`. Open issues / PRs in the
1013
1026
  \`apollo-cms\` repository upstream.
1014
1027
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-apollo-monorepo",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Scaffold a monorepo with a frontend app and Apollo CMS as a git submodule backend (single-origin via Next.js rewrites + assetPrefix)",
5
5
  "bin": {
6
6
  "create-apollo-monorepo": "index.mjs"