@cosmicdrift/kumiko-cli 0.412.0 → 0.413.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-cli",
3
- "version": "0.412.0",
3
+ "version": "0.413.0",
4
4
  "description": "CLI for Kumiko apps. `bunx @cosmicdrift/kumiko-cli new app <name>` scaffolds a runnable workspace; `add feature <name>` mounts a feature; `check` runs boot validation plus the guard suites with the step list derived from kumiko.json; `agent lint`, `project` and `consumer` operate on an existing app; `handbuch build` renders the HTML handbuch.",
5
5
  "license": "MIT",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -36,19 +36,19 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@cosmicdrift/kumiko-dev-server": "0.412.0",
40
- "@cosmicdrift/kumiko-feature-ast": "0.412.0",
41
- "@cosmicdrift/kumiko-guards": "0.412.0",
42
- "@cosmicdrift/kumiko-server-runtime": "0.412.0",
43
- "@cosmicdrift/kumiko-testing": "0.412.0",
39
+ "@cosmicdrift/kumiko-dev-server": "0.413.0",
40
+ "@cosmicdrift/kumiko-feature-ast": "0.413.0",
41
+ "@cosmicdrift/kumiko-guards": "0.413.0",
42
+ "@cosmicdrift/kumiko-server-runtime": "0.413.0",
43
+ "@cosmicdrift/kumiko-testing": "0.413.0",
44
44
  "marked": "^18.1.2",
45
45
  "zod": "^4.6.7"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "sharp": "^0.35.5",
49
- "@cosmicdrift/kumiko-bundled-features": "0.412.0",
50
- "@cosmicdrift/kumiko-framework": "0.412.0",
51
- "@cosmicdrift/kumiko-renderer": "0.412.0"
49
+ "@cosmicdrift/kumiko-bundled-features": "0.413.0",
50
+ "@cosmicdrift/kumiko-framework": "0.413.0",
51
+ "@cosmicdrift/kumiko-renderer": "0.413.0"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "sharp": {
@@ -65,9 +65,9 @@
65
65
  }
66
66
  },
67
67
  "devDependencies": {
68
- "@cosmicdrift/kumiko-bundled-features": "0.412.0",
69
- "@cosmicdrift/kumiko-framework": "0.412.0",
70
- "@cosmicdrift/kumiko-renderer": "0.412.0",
68
+ "@cosmicdrift/kumiko-bundled-features": "0.413.0",
69
+ "@cosmicdrift/kumiko-framework": "0.413.0",
70
+ "@cosmicdrift/kumiko-renderer": "0.413.0",
71
71
  "sharp": "^0.35.5"
72
72
  },
73
73
  "publishConfig": {
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.413.0",
4
+ "type": "fix",
5
+ "title": "Help output of kumiko and create-kumiko-app starts without loading the scaffolder",
6
+ "detail": "Both CLIs imported the `@cosmicdrift/kumiko-dev-server` barrel at the top, so every call, including `--help`, loaded framework, server-runtime and renderer (about 0.7 s cold). `kumiko new app`, `kumiko add feature`, `kumiko ports` and the create-kumiko-app scaffold step now import those modules when they run. Measured on an idle machine: `kumiko --help` 0.67 s to 0.03 s, `kumiko check --help` 0.67 s to 0.03 s, `create-kumiko-app --help` 0.65 s to 0.02 s."
7
+ },
2
8
  {
3
9
  "version": "0.405.0",
4
10
  "type": "improvement",
@@ -1,9 +1,4 @@
1
1
  import { resolve } from "node:path";
2
- import {
3
- findPortCollisions,
4
- listAppPorts,
5
- scanWorkspaceApps,
6
- } from "@cosmicdrift/kumiko-guards/repo-manifest/app-ports";
7
2
  import type { CliCommand, CliCommandContext } from "./types";
8
3
 
9
4
  // Fixed column order so the table reads the same in every run.
@@ -14,6 +9,9 @@ export async function runPorts(ctx: CliCommandContext): Promise<number> {
14
9
  ctx.out.err(" usage: kumiko ports [workspace-root]");
15
10
  return 1;
16
11
  }
12
+ const { findPortCollisions, listAppPorts, scanWorkspaceApps } = await import(
13
+ "@cosmicdrift/kumiko-guards/repo-manifest/app-ports"
14
+ );
17
15
  const root = resolve(ctx.cwd, ctx.argv[0] ?? ".");
18
16
  const apps = scanWorkspaceApps(root);
19
17
  if (apps.length === 0) {
package/src/index.ts CHANGED
@@ -9,8 +9,6 @@
9
9
  // `consumer`). Workspace-only maintainer commands (ci:guards, dev, build, …)
10
10
  // stay in the framework repo's bin/kumiko.ts.
11
11
 
12
- import { scaffoldApp, scaffoldAppFeature } from "@cosmicdrift/kumiko-dev-server";
13
- import { renderTestSetup } from "@cosmicdrift/kumiko-testing/scaffold";
14
12
  import type { CliCommand } from "./commands";
15
13
  import { APP_COMMANDS, findAppCommand } from "./commands";
16
14
  import { missingPeerMessage } from "./missing-peer";
@@ -48,7 +46,7 @@ export async function runCli(options: RunCliOptions): Promise<number> {
48
46
  }
49
47
 
50
48
  if (first === "new") return await runNew(argv.slice(1), out, cwd);
51
- if (first === "add") return runAdd(argv.slice(1), out, cwd);
49
+ if (first === "add") return await runAdd(argv.slice(1), out, cwd);
52
50
 
53
51
  const appCommand = findAppCommand(first);
54
52
  if (appCommand) {
@@ -89,6 +87,9 @@ async function runNew(args: readonly string[], out: Output, cwd: string): Promis
89
87
  return 1;
90
88
  }
91
89
  try {
90
+ // Loaded on demand: the dev-server barrel costs ~0.6 s cold, which every --help paid before.
91
+ const { scaffoldApp } = await import("@cosmicdrift/kumiko-dev-server");
92
+ const { renderTestSetup } = await import("@cosmicdrift/kumiko-testing/scaffold");
92
93
  const result = await scaffoldApp({
93
94
  name,
94
95
  destination: `${cwd}/${name}`,
@@ -109,7 +110,7 @@ async function runNew(args: readonly string[], out: Output, cwd: string): Promis
109
110
  }
110
111
  }
111
112
 
112
- function runAdd(args: readonly string[], out: Output, cwd: string): number {
113
+ async function runAdd(args: readonly string[], out: Output, cwd: string): Promise<number> {
113
114
  const [subject, name] = args;
114
115
  if (subject !== "feature") {
115
116
  out.err(`kumiko add: only "add feature <name>" is supported. Got "${subject ?? "(nothing)"}".`);
@@ -120,6 +121,7 @@ function runAdd(args: readonly string[], out: Output, cwd: string): number {
120
121
  return 1;
121
122
  }
122
123
  try {
124
+ const { scaffoldAppFeature } = await import("@cosmicdrift/kumiko-dev-server");
123
125
  const result = scaffoldAppFeature({ name, appRoot: cwd });
124
126
  out.log(`✓ Added feature ${result.featureName}:`);
125
127
  for (const f of result.files) out.log(` ${f}`);