@cosmicdrift/kumiko-framework 0.315.0 → 0.316.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-framework",
3
- "version": "0.315.0",
3
+ "version": "0.316.0",
4
4
  "description": "Framework core — engine, pipeline, API, DB, and every other bit that makes Kumiko go.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -198,8 +198,8 @@
198
198
  "./package.json": "./package.json"
199
199
  },
200
200
  "dependencies": {
201
- "@cosmicdrift/kumiko-http": "0.315.0",
202
- "@cosmicdrift/kumiko-types": "0.315.0",
201
+ "@cosmicdrift/kumiko-http": "0.316.0",
202
+ "@cosmicdrift/kumiko-types": "0.316.0",
203
203
  "bullmq": "^5.76.7",
204
204
  "bun-types": "^1.3.13",
205
205
  "hono": "^4.13.1",
@@ -215,7 +215,7 @@
215
215
  "zod": "^4.4.3"
216
216
  },
217
217
  "devDependencies": {
218
- "@cosmicdrift/kumiko-dispatcher-live": "0.315.0",
218
+ "@cosmicdrift/kumiko-dispatcher-live": "0.316.0",
219
219
  "bun-types": "^1.3.13",
220
220
  "pino-pretty": "^13.1.3"
221
221
  },
@@ -108,6 +108,15 @@ describe("runSchemaCli — no-DB paths", () => {
108
108
  expect(existsSync(join(appCwd, "kumiko/migrations"))).toBe(false);
109
109
  });
110
110
 
111
+ test("generate <name> --dry-run is rejected, exits 1, writes no migration (there is no such flag)", async () => {
112
+ writeSchemaFile(appCwd, "tbl_a");
113
+ const cap = captureOut();
114
+ const code = await runSchemaCli(["generate", "init", "--dry-run"], appCwd, cap.out);
115
+ expect(code).toBe(1);
116
+ expect(cap.err.join("\n")).toContain("Unrecognized argument(s): --dry-run");
117
+ expect(existsSync(join(appCwd, "kumiko/migrations"))).toBe(false);
118
+ });
119
+
111
120
  test("generate with a hyphenated name still works", async () => {
112
121
  writeSchemaFile(appCwd, "tbl_a");
113
122
  const cap = captureOut();
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.316.0",
4
+ "type": "fix",
5
+ "title": "schema generate rejects unrecognized trailing arguments",
6
+ "detail": "`kumiko-schema generate <name>` only ever read `argv[1]` as the migration\nname; any further argument (e.g. a typo'd `generate my-migration --dry-run`\n— there is no dry-run flag) was silently ignored and the migration was\nwritten anyway, with no indication the trailing argument did nothing.\n`generate` now exits 1 with \"Unrecognized argument(s): ...\" and writes\nnothing when called with more than a name."
7
+ },
2
8
  {
3
9
  "version": "0.315.0",
4
10
  "type": "breaking",
package/src/schema-cli.ts CHANGED
@@ -141,6 +141,14 @@ export async function runSchemaCli(
141
141
  out.err(" Usage: schema generate <name>");
142
142
  return 1;
143
143
  }
144
+ // Trailing args (e.g. a typo'd `--dry-run` — there is no such flag) were
145
+ // silently ignored and the migration got written anyway. Reject them
146
+ // before any IO instead of pretending they did something.
147
+ if (argv.length > 2) {
148
+ out.err(` Unrecognized argument(s): ${argv.slice(2).join(" ")}`);
149
+ out.err(" Usage: schema generate <name>");
150
+ return 1;
151
+ }
144
152
  if (!existsSync(schemaFile)) {
145
153
  out.err(` ${schemaFile} fehlt.`);
146
154
  out.err(" App-Convention: kumiko/schema.ts mit");