generatesaas 2.2.0 → 2.4.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/index.js +301 -320
- package/dist/skill/content/SKILL.md +21 -39
- package/package.json +1 -1
|
@@ -21,7 +21,6 @@ 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)
|
|
25
24
|
Step 3: Classify files (script)
|
|
26
25
|
Step 4: Analyze dependencies
|
|
27
26
|
Step 5: Present update plan - user chooses interaction mode
|
|
@@ -155,7 +154,7 @@ it stays complete). Read `newOptions` from `.generatesaas/staging.json`. **If it
|
|
|
155
154
|
empty, skip this step entirely.**
|
|
156
155
|
|
|
157
156
|
Otherwise, present each option so the user can decide whether to adopt it. Each entry has
|
|
158
|
-
`{ key, label, hint, default, impact, requiresLabel? }`. For each one:
|
|
157
|
+
`{ key, label, hint, default, impact, choices?, requiresLabel? }`. For each one:
|
|
159
158
|
|
|
160
159
|
```
|
|
161
160
|
### New since your version: {label}
|
|
@@ -173,14 +172,32 @@ it is a large surface you didn't originally choose" or "Safe to adopt - it is pu
|
|
|
173
172
|
> 2. **Adopt it** - turn this feature on
|
|
174
173
|
```
|
|
175
174
|
|
|
175
|
+
**An entry with `choices` is not a yes/no.** It takes one of several values, so the two-way block
|
|
176
|
+
above cannot express it - offer the values as a numbered pick list instead, one line per choice,
|
|
177
|
+
with the entry's `default` marked as the current behavior:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
**Default:** `{default}` (your project's current behavior is unchanged).
|
|
181
|
+
**My recommendation:** {your recommendation, naming one of the choices}
|
|
182
|
+
|
|
183
|
+
> **Which would you like?**
|
|
184
|
+
> 1. **`{choices[0]}`** {"(current)" on the one equal to default}
|
|
185
|
+
> 2. **`{choices[1]}`**
|
|
186
|
+
> 3. **`{choices[2]}`** ...one line per choice, however many there are
|
|
187
|
+
```
|
|
188
|
+
|
|
176
189
|
**Ask the user about every new option, in every mode - including Automatic.** Surfacing a new
|
|
177
190
|
feature is exactly the kind of decision the update must never assume. Give your recommendation,
|
|
178
191
|
but the user decides.
|
|
179
192
|
|
|
180
193
|
**Applying the decisions:**
|
|
181
194
|
|
|
182
|
-
1. For each option the user **adopts**, write
|
|
183
|
-
|
|
195
|
+
1. For each option the user **adopts**, write the value they picked into
|
|
196
|
+
`.generatesaas/manifest.json` under the entry's `key`. For an option with no `choices` that value
|
|
197
|
+
is `true` (e.g. set `"desktop": true`); for one with `choices` it is the choice they named,
|
|
198
|
+
verbatim (e.g. set `"errorTracking": "sentry"`). Never write `true` for an option that has
|
|
199
|
+
`choices` - the CLI refuses any value outside them and stages nothing at all. The manifest is the
|
|
200
|
+
single shaping input.
|
|
184
201
|
2. **If the user adopted at least one option, re-stage once** so re-shaping produces the
|
|
185
202
|
feature's files. Re-run the CLI (append `auto` if you are in Automatic mode, so the staged
|
|
186
203
|
metadata keeps the unattended signal):
|
|
@@ -199,41 +216,6 @@ but the user decides.
|
|
|
199
216
|
before this point, so a re-stage never leaves a half-applied tree.
|
|
200
217
|
4. If the user adopted nothing, continue to Step 3 directly.
|
|
201
218
|
|
|
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`), and
|
|
220
|
-
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"`.
|
|
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
|
-
|
|
237
219
|
### Step 3: Classify Files
|
|
238
220
|
|
|
239
221
|
```bash
|