@stardeck-customer-apps/compose 0.10.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/SKILL.md +9 -1
- package/dist/cli.js +33 -5
- package/dist/index.js +33 -5
- package/dist/index.mjs +33 -5
- package/package.json +3 -5
package/SKILL.md
CHANGED
|
@@ -23,6 +23,12 @@ Compose turns that declaration into the code Next.js actually builds:
|
|
|
23
23
|
kept Module's `enhancements/<excluded>/`. Their source stays on disk but their
|
|
24
24
|
stubs are gone, so `next build` must type-check through this file
|
|
25
25
|
(`typescript.tsconfigPath` in `next.config.ts`), never through `tsconfig.json`.
|
|
26
|
+
It also skips test-only files (`*.test.ts(x)`, `*.spec.ts(x)`, `__tests__/`,
|
|
27
|
+
`test-utils/`, `test-helpers.ts`, Module `tests/` and `e2e/` folders, the
|
|
28
|
+
app's `e2e/`, `tests/`, `scripts/`, and the vitest/playwright configs), which
|
|
29
|
+
halves a Blueprint's deploy type-check. `npm run typecheck` still covers them
|
|
30
|
+
through `tsconfig.json`, so keep running it. A skipped file the app does
|
|
31
|
+
import is still type-checked through that import.
|
|
26
32
|
Gitignore it; do not hand-maintain an exclude list.
|
|
27
33
|
|
|
28
34
|
## Running it
|
|
@@ -75,7 +81,9 @@ a silent fallback. It holds deployment facts: gitignore it (`apps/web/.gitignore
|
|
|
75
81
|
installed Module. Library and contract Modules are always composed. A name
|
|
76
82
|
that is not installed fails with exit 1. Falls back to
|
|
77
83
|
`NEXT_PUBLIC_STARDECK_ENABLED_MODULES` (how the platform passes the selection
|
|
78
|
-
at deploy time); the flag wins.
|
|
84
|
+
at deploy time); the flag wins. A Module whose `module.json` sets
|
|
85
|
+
`"defaultEnabled": false` is still composed when `--enabled` is unset: the key
|
|
86
|
+
only tells the platform to leave it off when it creates a Blueprint fork.
|
|
79
87
|
- `--prune` — after composing, delete the source of every excluded Module, plus
|
|
80
88
|
any enhancement slice an enabled Module keeps for an excluded peer (the slice
|
|
81
89
|
imports its peer, so leaving it breaks `next build`). Requires `--enabled`,
|
package/dist/cli.js
CHANGED
|
@@ -2354,7 +2354,13 @@ var moduleManifestSchema = import_zod.z.object({
|
|
|
2354
2354
|
* `module-boundaries/ui-layer` lint rule enforces it — so a fork may
|
|
2355
2355
|
* soft-eject them. See docs/module-ui-soft-eject-plan.md.
|
|
2356
2356
|
*/
|
|
2357
|
-
ui: import_zod.z.object({ separable: import_zod.z.boolean() }).strict().optional()
|
|
2357
|
+
ui: import_zod.z.object({ separable: import_zod.z.boolean() }).strict().optional(),
|
|
2358
|
+
/**
|
|
2359
|
+
* `false` keeps a feature Module off in a new Blueprint fork unless the
|
|
2360
|
+
* creator ticks it: the fork picker leaves it unchecked and "every Module"
|
|
2361
|
+
* is written out without it. Omitted means on. Library Modules are always on.
|
|
2362
|
+
*/
|
|
2363
|
+
defaultEnabled: import_zod.z.boolean().optional()
|
|
2358
2364
|
}).strict().superRefine((manifest, ctx) => {
|
|
2359
2365
|
if (manifest.uses.includes(manifest.name)) {
|
|
2360
2366
|
ctx.addIssue({
|
|
@@ -3889,6 +3895,7 @@ function analyzeClientSafeEntryImports(sourceText, fileName) {
|
|
|
3889
3895
|
|
|
3890
3896
|
// ../../packages/lib/src/shared/platform-owned-paths.ts
|
|
3891
3897
|
var APP_WEB_PREFIX = "apps/web/";
|
|
3898
|
+
var BLUEPRINT_LINT_MARKER = `${APP_WEB_PREFIX}eslint-rules/module-boundaries.mjs`;
|
|
3892
3899
|
var MODULE_STUB_MARKER = "@stardeck-module-rail-generated";
|
|
3893
3900
|
var ENABLED_MODULES_ENV = "NEXT_PUBLIC_STARDECK_ENABLED_MODULES";
|
|
3894
3901
|
var HEADLESS_MOUNTS_ENV = "NEXT_PUBLIC_STARDECK_HEADLESS_MOUNTS";
|
|
@@ -5935,10 +5942,12 @@ var creationSourceBlueprintSchema = import_zod7.z.object({
|
|
|
5935
5942
|
/** Internal template/fork project id — keep template naming in identifiers. */
|
|
5936
5943
|
blueprintProjectId: import_zod7.z.string().uuid(),
|
|
5937
5944
|
/**
|
|
5938
|
-
* `null`/absent means every feature Module
|
|
5939
|
-
*
|
|
5940
|
-
*
|
|
5941
|
-
*
|
|
5945
|
+
* `null`/absent means every feature Module: the platform stores that as the
|
|
5946
|
+
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5947
|
+
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5948
|
+
* refused: the platform serialises it to an empty
|
|
5949
|
+
* `NEXT_PUBLIC_STARDECK_ENABLED_MODULES`, which the enablement parser reads
|
|
5950
|
+
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5942
5951
|
*/
|
|
5943
5952
|
enabledModules: import_zod7.z.array(moduleNameSchema).min(1, "Enable at least one Module").max(100).nullable().optional()
|
|
5944
5953
|
});
|
|
@@ -7707,6 +7716,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7707
7716
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7708
7717
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7709
7718
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7719
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7720
|
+
"**/*.test.ts",
|
|
7721
|
+
"**/*.test.tsx",
|
|
7722
|
+
"**/*.spec.ts",
|
|
7723
|
+
"**/*.spec.tsx",
|
|
7724
|
+
"**/__tests__",
|
|
7725
|
+
"**/test-utils",
|
|
7726
|
+
"**/test-helpers.ts",
|
|
7727
|
+
// Module test suites, including those inside enhancement slices.
|
|
7728
|
+
"src/modules/**/tests",
|
|
7729
|
+
"src/modules/**/e2e",
|
|
7730
|
+
"e2e",
|
|
7731
|
+
"tests",
|
|
7732
|
+
"scripts",
|
|
7733
|
+
"vitest.config.ts",
|
|
7734
|
+
"vitest.setup.ts",
|
|
7735
|
+
"playwright.config.ts"
|
|
7736
|
+
];
|
|
7710
7737
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7711
7738
|
const baseFile = import_node_path3.default.join(cwd, TSCONFIG_PATH);
|
|
7712
7739
|
if (!import_node_fs3.default.existsSync(import_node_path3.default.join(cwd, MODULES_DIR2)) || !import_node_fs3.default.existsSync(baseFile)) return;
|
|
@@ -7722,6 +7749,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7722
7749
|
extends: "./tsconfig.json",
|
|
7723
7750
|
exclude: [
|
|
7724
7751
|
...baseExclude,
|
|
7752
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7725
7753
|
...excluded.flatMap((name) => [
|
|
7726
7754
|
`${modulesDir}/${name}`,
|
|
7727
7755
|
`${modulesDir}/*/enhancements/${name}`
|
package/dist/index.js
CHANGED
|
@@ -2476,7 +2476,13 @@ var moduleManifestSchema = import_zod2.z.object({
|
|
|
2476
2476
|
* `module-boundaries/ui-layer` lint rule enforces it — so a fork may
|
|
2477
2477
|
* soft-eject them. See docs/module-ui-soft-eject-plan.md.
|
|
2478
2478
|
*/
|
|
2479
|
-
ui: import_zod2.z.object({ separable: import_zod2.z.boolean() }).strict().optional()
|
|
2479
|
+
ui: import_zod2.z.object({ separable: import_zod2.z.boolean() }).strict().optional(),
|
|
2480
|
+
/**
|
|
2481
|
+
* `false` keeps a feature Module off in a new Blueprint fork unless the
|
|
2482
|
+
* creator ticks it: the fork picker leaves it unchecked and "every Module"
|
|
2483
|
+
* is written out without it. Omitted means on. Library Modules are always on.
|
|
2484
|
+
*/
|
|
2485
|
+
defaultEnabled: import_zod2.z.boolean().optional()
|
|
2480
2486
|
}).strict().superRefine((manifest, ctx) => {
|
|
2481
2487
|
if (manifest.uses.includes(manifest.name)) {
|
|
2482
2488
|
ctx.addIssue({
|
|
@@ -4011,6 +4017,7 @@ function analyzeClientSafeEntryImports(sourceText, fileName) {
|
|
|
4011
4017
|
|
|
4012
4018
|
// ../../packages/lib/src/shared/platform-owned-paths.ts
|
|
4013
4019
|
var APP_WEB_PREFIX = "apps/web/";
|
|
4020
|
+
var BLUEPRINT_LINT_MARKER = `${APP_WEB_PREFIX}eslint-rules/module-boundaries.mjs`;
|
|
4014
4021
|
var MODULE_STUB_MARKER = "@stardeck-module-rail-generated";
|
|
4015
4022
|
var ENABLED_MODULES_ENV = "NEXT_PUBLIC_STARDECK_ENABLED_MODULES";
|
|
4016
4023
|
var HEADLESS_MOUNTS_ENV = "NEXT_PUBLIC_STARDECK_HEADLESS_MOUNTS";
|
|
@@ -5945,10 +5952,12 @@ var creationSourceBlueprintSchema = import_zod7.z.object({
|
|
|
5945
5952
|
/** Internal template/fork project id — keep template naming in identifiers. */
|
|
5946
5953
|
blueprintProjectId: import_zod7.z.string().uuid(),
|
|
5947
5954
|
/**
|
|
5948
|
-
* `null`/absent means every feature Module
|
|
5949
|
-
*
|
|
5950
|
-
*
|
|
5951
|
-
*
|
|
5955
|
+
* `null`/absent means every feature Module: the platform stores that as the
|
|
5956
|
+
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5957
|
+
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5958
|
+
* refused: the platform serialises it to an empty
|
|
5959
|
+
* `NEXT_PUBLIC_STARDECK_ENABLED_MODULES`, which the enablement parser reads
|
|
5960
|
+
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5952
5961
|
*/
|
|
5953
5962
|
enabledModules: import_zod7.z.array(moduleNameSchema).min(1, "Enable at least one Module").max(100).nullable().optional()
|
|
5954
5963
|
});
|
|
@@ -7717,6 +7726,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7717
7726
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7718
7727
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7719
7728
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7729
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7730
|
+
"**/*.test.ts",
|
|
7731
|
+
"**/*.test.tsx",
|
|
7732
|
+
"**/*.spec.ts",
|
|
7733
|
+
"**/*.spec.tsx",
|
|
7734
|
+
"**/__tests__",
|
|
7735
|
+
"**/test-utils",
|
|
7736
|
+
"**/test-helpers.ts",
|
|
7737
|
+
// Module test suites, including those inside enhancement slices.
|
|
7738
|
+
"src/modules/**/tests",
|
|
7739
|
+
"src/modules/**/e2e",
|
|
7740
|
+
"e2e",
|
|
7741
|
+
"tests",
|
|
7742
|
+
"scripts",
|
|
7743
|
+
"vitest.config.ts",
|
|
7744
|
+
"vitest.setup.ts",
|
|
7745
|
+
"playwright.config.ts"
|
|
7746
|
+
];
|
|
7720
7747
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7721
7748
|
const baseFile = import_node_path3.default.join(cwd, TSCONFIG_PATH);
|
|
7722
7749
|
if (!import_node_fs3.default.existsSync(import_node_path3.default.join(cwd, MODULES_DIR2)) || !import_node_fs3.default.existsSync(baseFile)) return;
|
|
@@ -7732,6 +7759,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7732
7759
|
extends: "./tsconfig.json",
|
|
7733
7760
|
exclude: [
|
|
7734
7761
|
...baseExclude,
|
|
7762
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7735
7763
|
...excluded.flatMap((name) => [
|
|
7736
7764
|
`${modulesDir}/${name}`,
|
|
7737
7765
|
`${modulesDir}/*/enhancements/${name}`
|
package/dist/index.mjs
CHANGED
|
@@ -2457,7 +2457,13 @@ var moduleManifestSchema = z2.object({
|
|
|
2457
2457
|
* `module-boundaries/ui-layer` lint rule enforces it — so a fork may
|
|
2458
2458
|
* soft-eject them. See docs/module-ui-soft-eject-plan.md.
|
|
2459
2459
|
*/
|
|
2460
|
-
ui: z2.object({ separable: z2.boolean() }).strict().optional()
|
|
2460
|
+
ui: z2.object({ separable: z2.boolean() }).strict().optional(),
|
|
2461
|
+
/**
|
|
2462
|
+
* `false` keeps a feature Module off in a new Blueprint fork unless the
|
|
2463
|
+
* creator ticks it: the fork picker leaves it unchecked and "every Module"
|
|
2464
|
+
* is written out without it. Omitted means on. Library Modules are always on.
|
|
2465
|
+
*/
|
|
2466
|
+
defaultEnabled: z2.boolean().optional()
|
|
2461
2467
|
}).strict().superRefine((manifest, ctx) => {
|
|
2462
2468
|
if (manifest.uses.includes(manifest.name)) {
|
|
2463
2469
|
ctx.addIssue({
|
|
@@ -3992,6 +3998,7 @@ function analyzeClientSafeEntryImports(sourceText, fileName) {
|
|
|
3992
3998
|
|
|
3993
3999
|
// ../../packages/lib/src/shared/platform-owned-paths.ts
|
|
3994
4000
|
var APP_WEB_PREFIX = "apps/web/";
|
|
4001
|
+
var BLUEPRINT_LINT_MARKER = `${APP_WEB_PREFIX}eslint-rules/module-boundaries.mjs`;
|
|
3995
4002
|
var MODULE_STUB_MARKER = "@stardeck-module-rail-generated";
|
|
3996
4003
|
var ENABLED_MODULES_ENV = "NEXT_PUBLIC_STARDECK_ENABLED_MODULES";
|
|
3997
4004
|
var HEADLESS_MOUNTS_ENV = "NEXT_PUBLIC_STARDECK_HEADLESS_MOUNTS";
|
|
@@ -5926,10 +5933,12 @@ var creationSourceBlueprintSchema = z7.object({
|
|
|
5926
5933
|
/** Internal template/fork project id — keep template naming in identifiers. */
|
|
5927
5934
|
blueprintProjectId: z7.string().uuid(),
|
|
5928
5935
|
/**
|
|
5929
|
-
* `null`/absent means every feature Module
|
|
5930
|
-
*
|
|
5931
|
-
*
|
|
5932
|
-
*
|
|
5936
|
+
* `null`/absent means every feature Module: the platform stores that as the
|
|
5937
|
+
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5938
|
+
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5939
|
+
* refused: the platform serialises it to an empty
|
|
5940
|
+
* `NEXT_PUBLIC_STARDECK_ENABLED_MODULES`, which the enablement parser reads
|
|
5941
|
+
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5933
5942
|
*/
|
|
5934
5943
|
enabledModules: z7.array(moduleNameSchema).min(1, "Enable at least one Module").max(100).nullable().optional()
|
|
5935
5944
|
});
|
|
@@ -7698,6 +7707,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7698
7707
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7699
7708
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7700
7709
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7710
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7711
|
+
"**/*.test.ts",
|
|
7712
|
+
"**/*.test.tsx",
|
|
7713
|
+
"**/*.spec.ts",
|
|
7714
|
+
"**/*.spec.tsx",
|
|
7715
|
+
"**/__tests__",
|
|
7716
|
+
"**/test-utils",
|
|
7717
|
+
"**/test-helpers.ts",
|
|
7718
|
+
// Module test suites, including those inside enhancement slices.
|
|
7719
|
+
"src/modules/**/tests",
|
|
7720
|
+
"src/modules/**/e2e",
|
|
7721
|
+
"e2e",
|
|
7722
|
+
"tests",
|
|
7723
|
+
"scripts",
|
|
7724
|
+
"vitest.config.ts",
|
|
7725
|
+
"vitest.setup.ts",
|
|
7726
|
+
"playwright.config.ts"
|
|
7727
|
+
];
|
|
7701
7728
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7702
7729
|
const baseFile = path3.join(cwd, TSCONFIG_PATH);
|
|
7703
7730
|
if (!fs3.existsSync(path3.join(cwd, MODULES_DIR2)) || !fs3.existsSync(baseFile)) return;
|
|
@@ -7713,6 +7740,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7713
7740
|
extends: "./tsconfig.json",
|
|
7714
7741
|
exclude: [
|
|
7715
7742
|
...baseExclude,
|
|
7743
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7716
7744
|
...excluded.flatMap((name) => [
|
|
7717
7745
|
`${modulesDir}/${name}`,
|
|
7718
7746
|
`${modulesDir}/*/enhancements/${name}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stardeck-customer-apps/compose",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Regenerates a Stardeck app's Module-rail artifacts — the six src/*.gen.ts registries and every route/endpoint stub — from src/modules/*/module.json",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "rm -rf dist && tsup",
|
|
35
35
|
"dev": "tsup --watch",
|
|
36
|
-
"format": "prettier --write . &&
|
|
36
|
+
"format": "prettier --write . && oxlint . --fix",
|
|
37
37
|
"typecheck": "tsc -p tsconfig.test.json",
|
|
38
|
-
"lint": "
|
|
38
|
+
"lint": "oxlint src/",
|
|
39
39
|
"test": "vitest run",
|
|
40
40
|
"test:watch": "vitest"
|
|
41
41
|
},
|
|
@@ -54,12 +54,10 @@
|
|
|
54
54
|
"typescript": ">=5.0.0 <7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@eslint/js": "^9.0.0",
|
|
58
57
|
"@stardeck-customer-apps/tsconfig": "*",
|
|
59
58
|
"@types/node": "^24.10.1",
|
|
60
59
|
"tsup": "^8.0.0",
|
|
61
60
|
"typescript": "^5.0.0",
|
|
62
|
-
"typescript-eslint": "^8.0.0",
|
|
63
61
|
"vitest": "^3.2.4"
|
|
64
62
|
}
|
|
65
63
|
}
|