rastack 0.0.56 → 0.0.58
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/CHANGELOG.md +4 -0
- package/admin/index.tsx +19 -13
- package/admin/ui/BootScreen.tsx +201 -0
- package/dist/admin.js +156 -18
- package/dist/compile/index.d.ts +1 -0
- package/dist/compile/index.js +8 -3
- package/dist/compile/run.d.ts +13 -0
- package/dist/compile/run.js +63 -0
- package/dist/deploy/ci.d.ts +8 -1
- package/dist/deploy/ci.js +15 -9
- package/dist/dev/harness.js +20 -3
- package/dist/rastack-admin.js +2 -9
- package/dist/rastack-ci.js +15 -3
- package/dist/rastack-compile.d.ts +6 -3
- package/dist/rastack-compile.js +10 -16
- package/dist/rastack-dev.js +193 -14
- package/dist/rastack.d.ts +3 -1
- package/dist/rastack.js +12 -2
- package/dist/wasm/rastack_wasm_bg.wasm +0 -0
- package/package.json +2 -1
- package/src/compile/index.ts +13 -4
- package/src/compile/run.ts +26 -0
- package/src/deploy/ci.ts +24 -10
- package/src/dev/harness.ts +20 -3
- package/src/rastack-admin.ts +6 -15
- package/src/rastack-ci.ts +16 -3
- package/src/rastack-compile.ts +10 -18
- package/src/rastack-dev.ts +225 -22
- package/src/rastack.ts +14 -2
- package/test/deploy.spec.ts +5 -2
- package/wasm/rastack_wasm_bg.wasm +0 -0
package/src/rastack.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* rastack — unified CLI for React API Stack
|
|
5
5
|
*
|
|
6
|
+
* Compilation is not a command of its own: it runs in-process inside the two
|
|
7
|
+
* modalities of use — `rastack dev`/`admin` (local) and `rastack ci` (deploy).
|
|
8
|
+
*
|
|
6
9
|
* Commands:
|
|
7
|
-
* rastack compile [resourcesDir] [outDir] TypeScript resources → schema.rastack.json + openapi.json
|
|
8
10
|
* rastack check [resourcesDir] Validate the resource graph
|
|
9
11
|
* rastack list [resourcesDir] Print resources, fields and relations
|
|
10
12
|
* rastack urls [resourcesDir] Print the generated /api/{app}/v1/{model}/ routes
|
|
@@ -65,6 +67,17 @@ switch (command) {
|
|
|
65
67
|
printVersion();
|
|
66
68
|
break;
|
|
67
69
|
case "compile":
|
|
70
|
+
// Compilation is no longer a standalone command — it runs in-process as
|
|
71
|
+
// part of the two modalities of use. Point the way rather than 404.
|
|
72
|
+
console.error(
|
|
73
|
+
"`rastack compile` has been removed — compilation now runs automatically\n" +
|
|
74
|
+
"inside the two modalities of use:\n" +
|
|
75
|
+
" • rastack dev local development (compiles, then serves over WASM)\n" +
|
|
76
|
+
" • rastack ci the deploy pipeline (compiles the manifest + OpenAPI)\n\n" +
|
|
77
|
+
"Introspect the resource graph with: rastack check | list | urls\n",
|
|
78
|
+
);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
break;
|
|
68
81
|
case "check":
|
|
69
82
|
case "list":
|
|
70
83
|
case "urls":
|
|
@@ -135,7 +148,6 @@ switch (command) {
|
|
|
135
148
|
console.error(
|
|
136
149
|
`Unknown command: "${command}"\n\n` +
|
|
137
150
|
`Usage:\n` +
|
|
138
|
-
` rastack compile [resourcesDir] [outDir]\n` +
|
|
139
151
|
` rastack check | list | urls [resourcesDir]\n` +
|
|
140
152
|
` rastack generate [--schema-only]\n` +
|
|
141
153
|
` rastack tokens [input] [outDir] [--prefix p] Compile design tokens → CSS vars + typed theme\n` +
|
package/test/deploy.spec.ts
CHANGED
|
@@ -419,12 +419,15 @@ describe("repo variables + lambda env", () => {
|
|
|
419
419
|
});
|
|
420
420
|
|
|
421
421
|
describe("ci plan — check", () => {
|
|
422
|
-
it("validates then compiles, honouring the resources dir + bin", () => {
|
|
422
|
+
it("validates then compiles in-process, honouring the resources dir + bin", () => {
|
|
423
423
|
const steps = checkSteps(base({ resourcesDir: "res" }), "npx rastack");
|
|
424
424
|
expect(steps.map((s) => s.run)).toEqual([
|
|
425
425
|
"npx rastack check res",
|
|
426
|
-
"
|
|
426
|
+
"compile res .rastack (in-process)",
|
|
427
427
|
]);
|
|
428
|
+
// The compile step runs in-process (no shell command), so the CLI can drop
|
|
429
|
+
// the standalone `compile` command entirely.
|
|
430
|
+
expect(steps[1].action).toBe("compile");
|
|
428
431
|
expect(ciPlan("check", base(), { bin: "rastack" })).toEqual(
|
|
429
432
|
checkSteps(base(), "rastack"),
|
|
430
433
|
);
|
|
Binary file
|