create-kumiko-app 0.294.1 → 0.295.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 +5 -4
- package/src/__tests__/cli.test.ts +6 -0
- package/src/index.ts +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-kumiko-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.295.0",
|
|
4
4
|
"description": "`bun create kumiko-app <name>` — scaffold a new Kumiko app with an interactive feature picker.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cosmicdrift/kumiko-dev-server": "0.
|
|
31
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
32
|
-
"@cosmicdrift/kumiko-server-runtime": "0.
|
|
30
|
+
"@cosmicdrift/kumiko-dev-server": "0.295.0",
|
|
31
|
+
"@cosmicdrift/kumiko-framework": "0.295.0",
|
|
32
|
+
"@cosmicdrift/kumiko-server-runtime": "0.295.0",
|
|
33
|
+
"@cosmicdrift/kumiko-testing": "0.295.0",
|
|
33
34
|
"@inquirer/core": "^10.0.0",
|
|
34
35
|
"@inquirer/prompts": "^7.4.0"
|
|
35
36
|
},
|
|
@@ -42,6 +42,12 @@ describe("create-kumiko-app CLI", () => {
|
|
|
42
42
|
expect(existsSync(dest)).toBe(true);
|
|
43
43
|
expect(existsSync(join(dest, "package.json"))).toBe(true);
|
|
44
44
|
expect(existsSync(join(dest, "bin/main.ts"))).toBe(true);
|
|
45
|
+
expect(existsSync(join(dest, "playwright.config.ts"))).toBe(true);
|
|
46
|
+
expect(existsSync(join(dest, "e2e/smoke.spec.ts"))).toBe(true);
|
|
47
|
+
const pkg = JSON.parse(readFileSync(join(dest, "package.json"), "utf-8")) as {
|
|
48
|
+
devDependencies: Record<string, string>;
|
|
49
|
+
};
|
|
50
|
+
expect(pkg.devDependencies["@cosmicdrift/kumiko-testing"]).toMatch(/^\^\d+\.\d+\.\d+/);
|
|
45
51
|
|
|
46
52
|
const cfg = readFileSync(join(dest, "src/run-config.ts"), "utf-8");
|
|
47
53
|
// Picker-MVP recommended features land in run-config — except the four
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
// --print-manifest / --yes) → resolve deps → map to scaffold entries →
|
|
5
5
|
// scaffoldApp() → print next-steps.
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
resolveFrameworkVersion,
|
|
9
|
+
type ScaffoldFeatureEntry,
|
|
10
|
+
scaffoldApp,
|
|
11
|
+
} from "@cosmicdrift/kumiko-dev-server";
|
|
12
|
+
import { renderTestSetup } from "@cosmicdrift/kumiko-testing/scaffold";
|
|
8
13
|
import { resolveDeps } from "./dep-resolver";
|
|
9
14
|
import { FEATURE_CONSTRUCTORS } from "./feature-constructors";
|
|
10
15
|
import { loadManifest, type Manifest } from "./manifest";
|
|
@@ -62,10 +67,13 @@ export async function runCreate(args: CliArgs): Promise<number> {
|
|
|
62
67
|
`→ Scaffolding ${features.length} feature${features.length === 1 ? "" : "s"} into ./${args.name}/ …`,
|
|
63
68
|
);
|
|
64
69
|
|
|
70
|
+
const frameworkVersion = resolveFrameworkVersion();
|
|
65
71
|
const result = await scaffoldApp({
|
|
66
72
|
name: args.name,
|
|
67
73
|
cwd: args.cwd,
|
|
68
74
|
features,
|
|
75
|
+
testSetup: renderTestSetup,
|
|
76
|
+
...(frameworkVersion !== undefined && { frameworkVersion }),
|
|
69
77
|
});
|
|
70
78
|
|
|
71
79
|
log("");
|