@kywi-software/cli 0.11.0 → 0.12.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/README.md +10 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +138 -12
- package/dist/commands/migrate.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,6 +29,16 @@ kywi seed # create the default site + a superadmin user
|
|
|
29
29
|
kywi seed:demo # seed realistic demo content (pages, posts, event, contact form, taxonomy, media, feed)
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
`kywi migrate` (without `--push`) runs `drizzle-kit generate` itself before
|
|
33
|
+
applying, so a project's migration journal (`kywi-generated/migrations/`) is
|
|
34
|
+
bootstrapped on the first run and grows on every schema-bearing release after
|
|
35
|
+
— no manual `drizzle-kit generate` step required (kywi-cms#141). It fails
|
|
36
|
+
loudly, rather than falling back silently, if drizzle-kit can only resolve the
|
|
37
|
+
diff by asking an interactive question (e.g. an ambiguous rename) that a
|
|
38
|
+
scripted run has no terminal to answer; see
|
|
39
|
+
[`docs/hosting.md`](../../docs/hosting.md#framework-config-required-to-consume-core)
|
|
40
|
+
for the full behavior.
|
|
41
|
+
|
|
32
42
|
Every command accepts `-c, --config <path>` (default `kywi.config.ts`).
|
|
33
43
|
|
|
34
44
|
`DATABASE_URL` (or the `db.url` in `kywi.config.ts`) selects the target
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAcA,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAUlE"}
|
package/dist/commands/migrate.js
CHANGED
|
@@ -27,6 +27,7 @@ program
|
|
|
27
27
|
.description("Apply the generated Drizzle schema to the database. Runs 'migrate:generate' first, then drizzle-kit migrate.")
|
|
28
28
|
.option('-c, --config <path>', 'Path to kywi.config.ts', 'kywi.config.ts')
|
|
29
29
|
.option('--push', 'Use drizzle-kit push instead of migrate (for prototyping — no migration files)', false)
|
|
30
|
+
.option('--force-push', 'Required alongside --push on a project that already has a migration journal, acknowledging that push will desync it', false)
|
|
30
31
|
.action(async (options) => {
|
|
31
32
|
const drizzleConfigPath = resolve(process.cwd(), 'drizzle.config.ts');
|
|
32
33
|
// Step 1: regenerate schema files.
|
|
@@ -44,6 +45,11 @@ program
|
|
|
44
45
|
console.error("Run 'kywi migrate:generate' first.");
|
|
45
46
|
process.exit(1);
|
|
46
47
|
}
|
|
48
|
+
// Held from the pre-flight below so the post-migrate steps can reuse the
|
|
49
|
+
// same connection. Stays undefined when there is no reachable database
|
|
50
|
+
// (offline generate, or a config that failed to import) — every post step
|
|
51
|
+
// is then skipped rather than guessed at.
|
|
52
|
+
let migratedDb;
|
|
47
53
|
// Pre-flight the database connection so a missing DB / wrong DATABASE_URL /
|
|
48
54
|
// stopped server surfaces as one actionable line here, instead of drizzle-kit
|
|
49
55
|
// dumping a raw pg 3D000 stack (F1a-J01-G2).
|
|
@@ -63,6 +69,7 @@ program
|
|
|
63
69
|
const db = createDb(dbUrl, config.db?.provider);
|
|
64
70
|
try {
|
|
65
71
|
await db.execute(sql `select 1`);
|
|
72
|
+
migratedDb = db;
|
|
66
73
|
}
|
|
67
74
|
catch (err) {
|
|
68
75
|
const friendly = explainDbError(err, dbUrl);
|
|
@@ -143,21 +150,115 @@ program
|
|
|
143
150
|
if (err?.userFacing)
|
|
144
151
|
throw err;
|
|
145
152
|
}
|
|
146
|
-
// Step 2:
|
|
153
|
+
// Step 2: keep the migration journal current, then apply it.
|
|
147
154
|
const drizzleKitBin = resolve(process.cwd(), 'node_modules', '.bin', 'drizzle-kit');
|
|
148
155
|
const migrationsDir = resolve(process.cwd(), 'kywi-generated', 'migrations');
|
|
149
156
|
let subCommand = options.push ? 'push' : 'migrate';
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
if (options.push) {
|
|
158
|
+
// --push on a project that already has a migration journal is the
|
|
159
|
+
// exact mixed-history hazard the "journal present, generate failed"
|
|
160
|
+
// branch below refuses to create by falling back to push: push writes
|
|
161
|
+
// straight to the database and never touches meta/_journal.json, so a
|
|
162
|
+
// later `drizzle-kit generate`/`migrate` diffs against a journal that
|
|
163
|
+
// never recorded the pushed change — it can then silently skip that
|
|
164
|
+
// change or fail applying a migration the live DB already has.
|
|
165
|
+
// Require an explicit acknowledgment before doing that on purpose.
|
|
166
|
+
// Plain `--push` on a project with no journal yet is unaffected — that
|
|
167
|
+
// is the intended prototyping story (kywi-cms#141) and needs no flag.
|
|
168
|
+
if (hasMigrationJournal(migrationsDir) && !options.forcePush) {
|
|
169
|
+
console.error(`\n✖ Refusing to run 'drizzle-kit push': this project is journal-managed ` +
|
|
170
|
+
`(a migration journal exists at ${migrationsDir}) — --push will apply changes ` +
|
|
171
|
+
`the journal will not record, desyncing them. Subsequent journal-based ` +
|
|
172
|
+
`migrations may then fail or silently skip that change.\n` +
|
|
173
|
+
` Re-run with '--push --force-push' to proceed anyway, or drop --push to use ` +
|
|
174
|
+
`the journal-based migrate path instead.`);
|
|
175
|
+
process.exit(1);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
const journalPresent = hasMigrationJournal(migrationsDir);
|
|
181
|
+
// `drizzle-kit generate` is the ONLY thing that ever writes
|
|
182
|
+
// meta/_journal.json (kywi-cms#141) — and it is also how the journal
|
|
183
|
+
// GROWS release over release, since it diffs the schema files Step 1
|
|
184
|
+
// just wrote against the last snapshot it recorded. Run it every time,
|
|
185
|
+
// whether this project has ever run it before (bootstrap) or already
|
|
186
|
+
// has a journal (growth), so a schema-bearing kywi upgrade always ends
|
|
187
|
+
// up with a real migration file instead of silently drifting.
|
|
188
|
+
//
|
|
189
|
+
// Empirically verified against drizzle-kit 0.28.1 (kywi-cms#141
|
|
190
|
+
// investigation): a from-nothing bootstrap generates idempotent SQL
|
|
191
|
+
// (CREATE TABLE/INDEX IF NOT EXISTS, FK adds wrapped in a
|
|
192
|
+
// duplicate_object-swallowing DO block) that applies cleanly even
|
|
193
|
+
// against a database whose tables already exist from years of `push` —
|
|
194
|
+
// so no separate "is this DB fresh?" check or hand-rolled baseline step
|
|
195
|
+
// is needed. The one real hazard: `drizzle-kit generate` can decide a
|
|
196
|
+
// diff is AMBIGUOUS (e.g. "was this column created or renamed from
|
|
197
|
+
// another one?") and prints an interactive prompt — with no TTY
|
|
198
|
+
// attached (every scripted or one-shot `kywi migrate` run), that prompt
|
|
199
|
+
// resolves nothing and drizzle-kit exits 0 having silently written NO
|
|
200
|
+
// migration for that change. That is the worst possible failure mode
|
|
201
|
+
// for an automated deploy, so output is captured (not inherited) and
|
|
202
|
+
// checked for the prompt's text instead of trusting the exit code.
|
|
203
|
+
console.log("Running 'drizzle-kit generate' to capture any schema changes...");
|
|
204
|
+
const genResult = spawnSync(drizzleKitBin, ['generate'], {
|
|
205
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
206
|
+
env: process.env,
|
|
207
|
+
});
|
|
208
|
+
const genOutput = `${genResult.stdout ?? ''}${genResult.stderr ?? ''}`;
|
|
209
|
+
if (genOutput)
|
|
210
|
+
process.stdout.write(genOutput);
|
|
211
|
+
// COUPLED TO DRIZZLE-KIT 0.28.1's EXACT PROMPT WORDING (four variants
|
|
212
|
+
// verified during the kywi-cms#141 investigation: column and table,
|
|
213
|
+
// each phrased as "created or renamed from"). Re-verify this string
|
|
214
|
+
// against the actual prompt text on every drizzle-kit version bump. A
|
|
215
|
+
// silent miss here has no downstream backstop in the journal-present
|
|
216
|
+
// (GROWTH) case: `generate` would exit 0 having written nothing, then
|
|
217
|
+
// `migrate` would run happily against the now-stale journal, and the
|
|
218
|
+
// schema change would be dropped with no error anywhere.
|
|
219
|
+
const ambiguous = /created or renamed from/i.test(genOutput);
|
|
220
|
+
if (ambiguous) {
|
|
221
|
+
console.error(`\n✖ 'drizzle-kit generate' found an ambiguous schema change it can only resolve ` +
|
|
222
|
+
`interactively (a possible rename) — and with no terminal attached to answer it, ` +
|
|
223
|
+
`it wrote nothing. Run 'drizzle-kit generate' yourself in an interactive terminal ` +
|
|
224
|
+
`to resolve the prompt, commit the resulting migration file, then re-run 'kywi migrate'.` +
|
|
225
|
+
`\n (kywi-cms#141)`);
|
|
226
|
+
process.exit(1);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
else if (genResult.error || genResult.status !== 0) {
|
|
230
|
+
if (journalPresent) {
|
|
231
|
+
// Already journal-managed — a generate failure here is a real
|
|
232
|
+
// problem, not the historical "never had a journal" case (#141).
|
|
233
|
+
// Falling back to push would apply changes push never records,
|
|
234
|
+
// silently mixing tracked and untracked schema history.
|
|
235
|
+
if (genResult.error) {
|
|
236
|
+
// A spawn-level failure (e.g. ENOENT — drizzle-kit missing from
|
|
237
|
+
// node_modules/.bin) never reaches stdout/stderr, so genOutput
|
|
238
|
+
// above is empty and nothing was printed — without this, "Fix
|
|
239
|
+
// the error above" below would point at nothing.
|
|
240
|
+
console.error(`\n✖ Could not run 'drizzle-kit generate' (${genResult.error.message}).`);
|
|
241
|
+
}
|
|
242
|
+
console.error(`\n✖ 'drizzle-kit generate' failed while growing an existing migration journal at ` +
|
|
243
|
+
`${migrationsDir}.\n Not falling back to push. Fix the error above and re-run.`);
|
|
244
|
+
process.exit(genResult.status ?? 1);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
// No journal yet and bootstrapping one failed for some other reason
|
|
248
|
+
// (e.g. a drizzle-kit bug) — preserve the pre-adoption fallback
|
|
249
|
+
// (kywi-cms#141) rather than block every migrate on it.
|
|
250
|
+
console.warn(`\n⚠ Could not bootstrap a migration journal (drizzle-kit generate failed) — ` +
|
|
251
|
+
`falling back to push instead of migrate.\n` +
|
|
252
|
+
` Run 'drizzle-kit generate' by hand to investigate, or pass --push to silence this warning.`);
|
|
253
|
+
subCommand = 'push';
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
subCommand = 'migrate';
|
|
257
|
+
if (!journalPresent) {
|
|
258
|
+
console.log(`Bootstrapped a migration journal for this project at ${migrationsDir} — future ` +
|
|
259
|
+
`schema-bearing upgrades will apply through drizzle-kit migrate (kywi-cms#141).`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
161
262
|
}
|
|
162
263
|
console.log(`\nRunning drizzle-kit ${subCommand}...`);
|
|
163
264
|
const result = spawnSync(drizzleKitBin, [subCommand], {
|
|
@@ -171,6 +272,31 @@ program
|
|
|
171
272
|
console.error(" Is 'drizzle-kit' installed? It is a devDependency of the generated app — run 'pnpm install'.");
|
|
172
273
|
process.exit(1);
|
|
173
274
|
}
|
|
275
|
+
// Step 3: post-migration data steps — things a new table needs before it is
|
|
276
|
+
// correct, which the operator must never have to know about.
|
|
277
|
+
//
|
|
278
|
+
// `kywi_component_instances` (kywi-cms#147) is the index of linked-component
|
|
279
|
+
// placements. It is maintained transactionally on every layout save, but it
|
|
280
|
+
// ships EMPTY while existing installs already have layouts full of links, so
|
|
281
|
+
// on the upgrade that creates it every count would read zero until each page
|
|
282
|
+
// happened to be re-saved. Rebuilding it here — idempotent, and only parsing
|
|
283
|
+
// layouts that mention a component id — makes the upgrade self-completing
|
|
284
|
+
// and doubles as the repair path if the index is ever suspected of drift.
|
|
285
|
+
if (result.status === 0 && migratedDb) {
|
|
286
|
+
try {
|
|
287
|
+
const { reindexComponentInstances } = await import('@kywi-software/core');
|
|
288
|
+
const { instances, documentsScanned } = await reindexComponentInstances(migratedDb);
|
|
289
|
+
if (instances > 0) {
|
|
290
|
+
console.log(`Indexed ${instances} linked component instance(s) across ${documentsScanned} document(s).`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
catch (err) {
|
|
294
|
+
// Never fail a successful migration over a derived cache — say what
|
|
295
|
+
// happened and how to redo it.
|
|
296
|
+
console.warn(`Warning: could not rebuild the component instance index (${err.message}). ` +
|
|
297
|
+
'Component usage counts may read low until the next `kywi migrate`.');
|
|
298
|
+
}
|
|
299
|
+
}
|
|
174
300
|
process.exit(result.status ?? 1);
|
|
175
301
|
});
|
|
176
302
|
//# sourceMappingURL=migrate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,MAAM,UAAU,mBAAmB,CAAC,aAAqB;IACvD,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;IACnE,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAA;QAC9C,OAAO,I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C,CAAA;QAC/G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,4EAA4E;IAC5E,6DAA6D;IAC7D,EAAE;IACF,6EAA6E;IAC7E,4EAA4E;IAC5E,6EAA6E;IAC7E,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,0EAA0E;IAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,EAAE,CAAC;QACtC,IAAI,CAAC;YACH,MAAM,EAAE,yBAAyB,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAA;YACzE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,MAAM,yBAAyB,CAAC,UAAU,CAAC,CAAA;YACnF,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;gBAClB,OAAO,CAAC,GAAG,CACT,WAAW,SAAS,wCAAwC,gBAAgB,eAAe,CAC5F,CAAA;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,oEAAoE;YACpE,+BAA+B;YAC/B,OAAO,CAAC,IAAI,CACV,4DAA6D,GAAa,CAAC,OAAO,KAAK;gBACrF,oEAAoE,CACvE,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAA;AAClC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kywi-software/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Kywi CMS command-line tool — migrate, seed, and generate schema from a kywi.config.ts project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"commander": "^12.0.0",
|
|
37
37
|
"drizzle-orm": "^0.38.0",
|
|
38
38
|
"tsx": "^4.7.0",
|
|
39
|
-
"@kywi-software/core": "0.
|
|
39
|
+
"@kywi-software/core": "0.12.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.0.0",
|