generatesaas 1.23.1 → 2.0.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.
@@ -21,6 +21,7 @@ Step 0: Pre-flight safety checks
21
21
  Step 1: Fetch + stage + prepare update data (you run the CLI, then the script)
22
22
  Step 2: Present changelog to user
23
23
  Step 2.5: Review newly available options - adopt or keep default (re-stage if adopted)
24
+ Step 2.6: Companion source flips (only when the user asks)
24
25
  Step 3: Classify files (script)
25
26
  Step 4: Analyze dependencies
26
27
  Step 5: Present update plan - user chooses interaction mode
@@ -198,6 +199,41 @@ but the user decides.
198
199
  before this point, so a re-stage never leaves a half-applied tree.
199
200
  4. If the user adopted nothing, continue to Step 3 directly.
200
201
 
202
+ ### Step 2.6: Companion Source Flips (only when the user asks)
203
+
204
+ A companion-ON project records where its daemon comes from in `companionSource`
205
+ ("shared" points at an existing companion repo; "vendored" owns the daemon in this repo).
206
+ Flipping it is a manifest edit + re-stage, exactly like option adoption in Step 2.5.
207
+ **Never flip it unprompted** - only when the user explicitly asks to switch.
208
+
209
+ **vendored -> shared** (abandons the in-repo daemon):
210
+
211
+ 1. Warn first and get explicit confirmation:
212
+
213
+ > Switching to a shared companion REMOVES `apps/companion` and `scripts/companion-export`
214
+ > from this project when the update is applied. Local customisations to the vendored daemon
215
+ > are abandoned (they survive only in git history), and your published companion repo stops
216
+ > receiving updates from this project. Continue?
217
+
218
+ 2. On confirmation, edit `.generatesaas/manifest.json`: set `"companionSource": "shared"`, add
219
+ `"companionRepoUrl"` (ask which repo; default `https://github.com/Duzbee/OpenCompanion`),
220
+ optionally `"companionLocalPath"`, and REMOVE `"companionName"`.
221
+ 3. Re-run `npx generatesaas@latest update` to re-stage (append `auto` in Automatic mode), then
222
+ continue the normal flow. The CLI removes the now-stale `.generatesaas/companion-release.json`
223
+ on shared-source updates.
224
+ 4. Remind the user: their end-users keep running the OLD published daemon until they install the
225
+ shared one; after apply + deploy, the Companions page renders the new install command.
226
+
227
+ **shared -> vendored** (take ownership of a daemon):
228
+
229
+ 1. Edit `.generatesaas/manifest.json`: set `"companionSource": "vendored"`, add
230
+ `"companionName"` (ask; default: the title-cased project name + " Companion"), and REMOVE
231
+ `"companionRepoUrl"` / `"companionLocalPath"`.
232
+ 2. Re-run `npx generatesaas@latest update` to re-stage. Applying vendors `apps/companion` + the
233
+ export pipeline, branded from the name.
234
+ 3. Remind the user: the Companions page shows a publish-first state until they run
235
+ `pnpm companion:publish`.
236
+
201
237
  ### Step 3: Classify Files
202
238
 
203
239
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generatesaas",
3
- "version": "1.23.1",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "description": "CLI for scaffolding and managing GenerateSaaS projects",
6
6
  "license": "UNLICENSED",
@@ -21,7 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@types/node": "^25.6.0",
23
23
  "tsup": "^8.5.1",
24
- "typescript": "^6.0.2",
24
+ "typescript": "^6.0.3",
25
25
  "vitest": "^4.1.5",
26
26
  "@repo/tsconfig": "1.0.0"
27
27
  },