@stardeck-customer-apps/compose 0.11.0 → 0.13.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 +6 -0
- package/dist/cli.js +44 -11
- package/dist/index.js +44 -11
- package/dist/index.mjs +44 -11
- package/package.json +2 -2
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
|
package/dist/cli.js
CHANGED
|
@@ -2249,14 +2249,22 @@ var datastoreRequirementSchema = import_zod.z.object({
|
|
|
2249
2249
|
/** Checked against the connected store's accessLevel at install. */
|
|
2250
2250
|
access: import_zod.z.enum(["read", "write", "admin"]).default("write")
|
|
2251
2251
|
}).strict();
|
|
2252
|
-
var
|
|
2252
|
+
var MODULE_PERMISSION_DEFAULT_ROLES = ["manager", "member", "viewer"];
|
|
2253
|
+
var modulePermissionClaimSchema = import_zod.z.object({
|
|
2253
2254
|
/**
|
|
2254
2255
|
* Lowercase resource:action with one colon and no underscores. This grammar
|
|
2255
2256
|
* is deliberately narrower than the platform permission tool's charset.
|
|
2256
2257
|
*/
|
|
2257
2258
|
key: import_zod.z.string().regex(/^[a-z0-9][a-z0-9-]*:[a-z0-9][a-z0-9-]*$/, "must be a lowercase resource:action key").max(100, "must be at most 100 characters (platform permission tool limit)"),
|
|
2258
2259
|
/** Human label for the deployment auth config row. */
|
|
2259
|
-
description: descriptionSchema
|
|
2260
|
+
description: descriptionSchema,
|
|
2261
|
+
/**
|
|
2262
|
+
* The default organization roles that hold this key when the platform
|
|
2263
|
+
* first registers it on an app (a Blueprint fork, a Module install). Admin
|
|
2264
|
+
* holds every key without being listed; External Viewer never holds one.
|
|
2265
|
+
* Changing a role's grants afterwards is the organization's business.
|
|
2266
|
+
*/
|
|
2267
|
+
roles: import_zod.z.array(import_zod.z.enum(MODULE_PERMISSION_DEFAULT_ROLES)).optional()
|
|
2260
2268
|
}).strict();
|
|
2261
2269
|
var seedBundleSchema = import_zod.z.object({
|
|
2262
2270
|
table: tableNameSchema,
|
|
@@ -2339,7 +2347,7 @@ var moduleManifestSchema = import_zod.z.object({
|
|
|
2339
2347
|
* Keys this module's guards enforce. Install registers them in deployment
|
|
2340
2348
|
* auth config; registration only — declaring is never granting.
|
|
2341
2349
|
*/
|
|
2342
|
-
permissions: import_zod.z.array(
|
|
2350
|
+
permissions: import_zod.z.array(modulePermissionClaimSchema).optional(),
|
|
2343
2351
|
/**
|
|
2344
2352
|
* Optional starter rows for tables this module owns. Replay is
|
|
2345
2353
|
* `INSERT ... ON CONFLICT (conflictTarget) DO NOTHING` — idempotent by
|
|
@@ -3961,11 +3969,18 @@ ${result.error}`);
|
|
|
3961
3969
|
}
|
|
3962
3970
|
|
|
3963
3971
|
// ../../packages/lib/src/server/sandbox/redact-secrets.ts
|
|
3972
|
+
var SECRET_NAME = String.raw`[A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD)`;
|
|
3973
|
+
var SECRET_ASSIGNMENT = new RegExp(
|
|
3974
|
+
String.raw`\b(${SECRET_NAME})\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)`,
|
|
3975
|
+
"g"
|
|
3976
|
+
);
|
|
3977
|
+
var JSON_SECRET_PAIR = new RegExp(
|
|
3978
|
+
String.raw`"(${SECRET_NAME})"(\s*:\s*)"(?:[^"\\\n]|\\.)*"`,
|
|
3979
|
+
"g"
|
|
3980
|
+
);
|
|
3981
|
+
var SECRET_QUOTE_OPENER = new RegExp(String.raw`\b${SECRET_NAME}\s*=\s*(['"])`, "g");
|
|
3964
3982
|
function redactSecrets(text) {
|
|
3965
|
-
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(
|
|
3966
|
-
/\b([A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD))\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)/g,
|
|
3967
|
-
"$1=***"
|
|
3968
|
-
).replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
3983
|
+
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(SECRET_ASSIGNMENT, "$1=***").replace(JSON_SECRET_PAIR, '"$1"$2"***"').replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
3969
3984
|
}
|
|
3970
3985
|
|
|
3971
3986
|
// ../../packages/lib/src/server/sandbox/sh-quote.ts
|
|
@@ -5945,11 +5960,10 @@ var creationSourceBlueprintSchema = import_zod7.z.object({
|
|
|
5945
5960
|
* `null`/absent means every feature Module: the platform stores that as the
|
|
5946
5961
|
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5947
5962
|
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5948
|
-
*
|
|
5949
|
-
*
|
|
5950
|
-
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5963
|
+
* a custom app: no feature Module, Library Modules only (`resolvePlatformEnv`
|
|
5964
|
+
* emits it as a set value naming no Module).
|
|
5951
5965
|
*/
|
|
5952
|
-
enabledModules: import_zod7.z.array(moduleNameSchema).
|
|
5966
|
+
enabledModules: import_zod7.z.array(moduleNameSchema).max(100).nullable().optional()
|
|
5953
5967
|
});
|
|
5954
5968
|
var creationSourceSchema = import_zod7.z.discriminatedUnion("type", [
|
|
5955
5969
|
creationSourceBlankSchema,
|
|
@@ -7716,6 +7730,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7716
7730
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7717
7731
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7718
7732
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7733
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7734
|
+
"**/*.test.ts",
|
|
7735
|
+
"**/*.test.tsx",
|
|
7736
|
+
"**/*.spec.ts",
|
|
7737
|
+
"**/*.spec.tsx",
|
|
7738
|
+
"**/__tests__",
|
|
7739
|
+
"**/test-utils",
|
|
7740
|
+
"**/test-helpers.ts",
|
|
7741
|
+
// Module test suites, including those inside enhancement slices.
|
|
7742
|
+
"src/modules/**/tests",
|
|
7743
|
+
"src/modules/**/e2e",
|
|
7744
|
+
"e2e",
|
|
7745
|
+
"tests",
|
|
7746
|
+
"scripts",
|
|
7747
|
+
"vitest.config.ts",
|
|
7748
|
+
"vitest.setup.ts",
|
|
7749
|
+
"playwright.config.ts"
|
|
7750
|
+
];
|
|
7719
7751
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7720
7752
|
const baseFile = import_node_path3.default.join(cwd, TSCONFIG_PATH);
|
|
7721
7753
|
if (!import_node_fs3.default.existsSync(import_node_path3.default.join(cwd, MODULES_DIR2)) || !import_node_fs3.default.existsSync(baseFile)) return;
|
|
@@ -7731,6 +7763,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7731
7763
|
extends: "./tsconfig.json",
|
|
7732
7764
|
exclude: [
|
|
7733
7765
|
...baseExclude,
|
|
7766
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7734
7767
|
...excluded.flatMap((name) => [
|
|
7735
7768
|
`${modulesDir}/${name}`,
|
|
7736
7769
|
`${modulesDir}/*/enhancements/${name}`
|
package/dist/index.js
CHANGED
|
@@ -2087,11 +2087,18 @@ ${result.error}`);
|
|
|
2087
2087
|
}
|
|
2088
2088
|
|
|
2089
2089
|
// ../../packages/lib/src/server/sandbox/redact-secrets.ts
|
|
2090
|
+
var SECRET_NAME = String.raw`[A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD)`;
|
|
2091
|
+
var SECRET_ASSIGNMENT = new RegExp(
|
|
2092
|
+
String.raw`\b(${SECRET_NAME})\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)`,
|
|
2093
|
+
"g"
|
|
2094
|
+
);
|
|
2095
|
+
var JSON_SECRET_PAIR = new RegExp(
|
|
2096
|
+
String.raw`"(${SECRET_NAME})"(\s*:\s*)"(?:[^"\\\n]|\\.)*"`,
|
|
2097
|
+
"g"
|
|
2098
|
+
);
|
|
2099
|
+
var SECRET_QUOTE_OPENER = new RegExp(String.raw`\b${SECRET_NAME}\s*=\s*(['"])`, "g");
|
|
2090
2100
|
function redactSecrets(text) {
|
|
2091
|
-
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(
|
|
2092
|
-
/\b([A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD))\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)/g,
|
|
2093
|
-
"$1=***"
|
|
2094
|
-
).replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
2101
|
+
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(SECRET_ASSIGNMENT, "$1=***").replace(JSON_SECRET_PAIR, '"$1"$2"***"').replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
2095
2102
|
}
|
|
2096
2103
|
|
|
2097
2104
|
// ../../packages/lib/src/server/sandbox/sh-quote.ts
|
|
@@ -2371,14 +2378,22 @@ var datastoreRequirementSchema = import_zod2.z.object({
|
|
|
2371
2378
|
/** Checked against the connected store's accessLevel at install. */
|
|
2372
2379
|
access: import_zod2.z.enum(["read", "write", "admin"]).default("write")
|
|
2373
2380
|
}).strict();
|
|
2374
|
-
var
|
|
2381
|
+
var MODULE_PERMISSION_DEFAULT_ROLES = ["manager", "member", "viewer"];
|
|
2382
|
+
var modulePermissionClaimSchema = import_zod2.z.object({
|
|
2375
2383
|
/**
|
|
2376
2384
|
* Lowercase resource:action with one colon and no underscores. This grammar
|
|
2377
2385
|
* is deliberately narrower than the platform permission tool's charset.
|
|
2378
2386
|
*/
|
|
2379
2387
|
key: import_zod2.z.string().regex(/^[a-z0-9][a-z0-9-]*:[a-z0-9][a-z0-9-]*$/, "must be a lowercase resource:action key").max(100, "must be at most 100 characters (platform permission tool limit)"),
|
|
2380
2388
|
/** Human label for the deployment auth config row. */
|
|
2381
|
-
description: descriptionSchema
|
|
2389
|
+
description: descriptionSchema,
|
|
2390
|
+
/**
|
|
2391
|
+
* The default organization roles that hold this key when the platform
|
|
2392
|
+
* first registers it on an app (a Blueprint fork, a Module install). Admin
|
|
2393
|
+
* holds every key without being listed; External Viewer never holds one.
|
|
2394
|
+
* Changing a role's grants afterwards is the organization's business.
|
|
2395
|
+
*/
|
|
2396
|
+
roles: import_zod2.z.array(import_zod2.z.enum(MODULE_PERMISSION_DEFAULT_ROLES)).optional()
|
|
2382
2397
|
}).strict();
|
|
2383
2398
|
var seedBundleSchema = import_zod2.z.object({
|
|
2384
2399
|
table: tableNameSchema,
|
|
@@ -2461,7 +2476,7 @@ var moduleManifestSchema = import_zod2.z.object({
|
|
|
2461
2476
|
* Keys this module's guards enforce. Install registers them in deployment
|
|
2462
2477
|
* auth config; registration only — declaring is never granting.
|
|
2463
2478
|
*/
|
|
2464
|
-
permissions: import_zod2.z.array(
|
|
2479
|
+
permissions: import_zod2.z.array(modulePermissionClaimSchema).optional(),
|
|
2465
2480
|
/**
|
|
2466
2481
|
* Optional starter rows for tables this module owns. Replay is
|
|
2467
2482
|
* `INSERT ... ON CONFLICT (conflictTarget) DO NOTHING` — idempotent by
|
|
@@ -5955,11 +5970,10 @@ var creationSourceBlueprintSchema = import_zod7.z.object({
|
|
|
5955
5970
|
* `null`/absent means every feature Module: the platform stores that as the
|
|
5956
5971
|
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5957
5972
|
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5958
|
-
*
|
|
5959
|
-
*
|
|
5960
|
-
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5973
|
+
* a custom app: no feature Module, Library Modules only (`resolvePlatformEnv`
|
|
5974
|
+
* emits it as a set value naming no Module).
|
|
5961
5975
|
*/
|
|
5962
|
-
enabledModules: import_zod7.z.array(moduleNameSchema).
|
|
5976
|
+
enabledModules: import_zod7.z.array(moduleNameSchema).max(100).nullable().optional()
|
|
5963
5977
|
});
|
|
5964
5978
|
var creationSourceSchema = import_zod7.z.discriminatedUnion("type", [
|
|
5965
5979
|
creationSourceBlankSchema,
|
|
@@ -7726,6 +7740,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7726
7740
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7727
7741
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7728
7742
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7743
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7744
|
+
"**/*.test.ts",
|
|
7745
|
+
"**/*.test.tsx",
|
|
7746
|
+
"**/*.spec.ts",
|
|
7747
|
+
"**/*.spec.tsx",
|
|
7748
|
+
"**/__tests__",
|
|
7749
|
+
"**/test-utils",
|
|
7750
|
+
"**/test-helpers.ts",
|
|
7751
|
+
// Module test suites, including those inside enhancement slices.
|
|
7752
|
+
"src/modules/**/tests",
|
|
7753
|
+
"src/modules/**/e2e",
|
|
7754
|
+
"e2e",
|
|
7755
|
+
"tests",
|
|
7756
|
+
"scripts",
|
|
7757
|
+
"vitest.config.ts",
|
|
7758
|
+
"vitest.setup.ts",
|
|
7759
|
+
"playwright.config.ts"
|
|
7760
|
+
];
|
|
7729
7761
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7730
7762
|
const baseFile = import_node_path3.default.join(cwd, TSCONFIG_PATH);
|
|
7731
7763
|
if (!import_node_fs3.default.existsSync(import_node_path3.default.join(cwd, MODULES_DIR2)) || !import_node_fs3.default.existsSync(baseFile)) return;
|
|
@@ -7741,6 +7773,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7741
7773
|
extends: "./tsconfig.json",
|
|
7742
7774
|
exclude: [
|
|
7743
7775
|
...baseExclude,
|
|
7776
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7744
7777
|
...excluded.flatMap((name) => [
|
|
7745
7778
|
`${modulesDir}/${name}`,
|
|
7746
7779
|
`${modulesDir}/*/enhancements/${name}`
|
package/dist/index.mjs
CHANGED
|
@@ -2068,11 +2068,18 @@ ${result.error}`);
|
|
|
2068
2068
|
}
|
|
2069
2069
|
|
|
2070
2070
|
// ../../packages/lib/src/server/sandbox/redact-secrets.ts
|
|
2071
|
+
var SECRET_NAME = String.raw`[A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD)`;
|
|
2072
|
+
var SECRET_ASSIGNMENT = new RegExp(
|
|
2073
|
+
String.raw`\b(${SECRET_NAME})\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)`,
|
|
2074
|
+
"g"
|
|
2075
|
+
);
|
|
2076
|
+
var JSON_SECRET_PAIR = new RegExp(
|
|
2077
|
+
String.raw`"(${SECRET_NAME})"(\s*:\s*)"(?:[^"\\\n]|\\.)*"`,
|
|
2078
|
+
"g"
|
|
2079
|
+
);
|
|
2080
|
+
var SECRET_QUOTE_OPENER = new RegExp(String.raw`\b${SECRET_NAME}\s*=\s*(['"])`, "g");
|
|
2071
2081
|
function redactSecrets(text) {
|
|
2072
|
-
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(
|
|
2073
|
-
/\b([A-Z][A-Z0-9_]*(?:_SECRET|_SECRET_KEY|_API_KEY|_KEY|_TOKEN|_PASSWORD))\s*=\s*(?:'(?:[^']|'\\'')*'|"[^"]*"|[^\s&"',;}\]]+)/g,
|
|
2074
|
-
"$1=***"
|
|
2075
|
-
).replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
2082
|
+
return text.replace(/x-access-token:[^@\s]+@/g, "x-access-token:***@").replace(/https:\/\/(?!x-access-token:)[^/\s:@]+:[^/\s@]+@/gi, "https://***:***@").replace(/\b(gh[pousr]_)[A-Za-z0-9]+/g, "$1***").replace(/\b(github_pat_)[A-Za-z0-9_]+/g, "$1***").replace(/\b(postgres(?:ql)?:\/\/)([^:\s/@]+):([^@\s/]+)@/gi, "$1$2:***@").replace(/\b(npm_[A-Za-z0-9]+)/g, "npm_***").replace(/(_authToken=)([^\s&]+)/gi, "$1***").replace(SECRET_ASSIGNMENT, "$1=***").replace(JSON_SECRET_PAIR, '"$1"$2"***"').replace(/\b(Authorization:\s*(?:Bearer|Basic)\s+)\S+/gi, "$1***");
|
|
2076
2083
|
}
|
|
2077
2084
|
|
|
2078
2085
|
// ../../packages/lib/src/server/sandbox/sh-quote.ts
|
|
@@ -2352,14 +2359,22 @@ var datastoreRequirementSchema = z2.object({
|
|
|
2352
2359
|
/** Checked against the connected store's accessLevel at install. */
|
|
2353
2360
|
access: z2.enum(["read", "write", "admin"]).default("write")
|
|
2354
2361
|
}).strict();
|
|
2355
|
-
var
|
|
2362
|
+
var MODULE_PERMISSION_DEFAULT_ROLES = ["manager", "member", "viewer"];
|
|
2363
|
+
var modulePermissionClaimSchema = z2.object({
|
|
2356
2364
|
/**
|
|
2357
2365
|
* Lowercase resource:action with one colon and no underscores. This grammar
|
|
2358
2366
|
* is deliberately narrower than the platform permission tool's charset.
|
|
2359
2367
|
*/
|
|
2360
2368
|
key: z2.string().regex(/^[a-z0-9][a-z0-9-]*:[a-z0-9][a-z0-9-]*$/, "must be a lowercase resource:action key").max(100, "must be at most 100 characters (platform permission tool limit)"),
|
|
2361
2369
|
/** Human label for the deployment auth config row. */
|
|
2362
|
-
description: descriptionSchema
|
|
2370
|
+
description: descriptionSchema,
|
|
2371
|
+
/**
|
|
2372
|
+
* The default organization roles that hold this key when the platform
|
|
2373
|
+
* first registers it on an app (a Blueprint fork, a Module install). Admin
|
|
2374
|
+
* holds every key without being listed; External Viewer never holds one.
|
|
2375
|
+
* Changing a role's grants afterwards is the organization's business.
|
|
2376
|
+
*/
|
|
2377
|
+
roles: z2.array(z2.enum(MODULE_PERMISSION_DEFAULT_ROLES)).optional()
|
|
2363
2378
|
}).strict();
|
|
2364
2379
|
var seedBundleSchema = z2.object({
|
|
2365
2380
|
table: tableNameSchema,
|
|
@@ -2442,7 +2457,7 @@ var moduleManifestSchema = z2.object({
|
|
|
2442
2457
|
* Keys this module's guards enforce. Install registers them in deployment
|
|
2443
2458
|
* auth config; registration only — declaring is never granting.
|
|
2444
2459
|
*/
|
|
2445
|
-
permissions: z2.array(
|
|
2460
|
+
permissions: z2.array(modulePermissionClaimSchema).optional(),
|
|
2446
2461
|
/**
|
|
2447
2462
|
* Optional starter rows for tables this module owns. Replay is
|
|
2448
2463
|
* `INSERT ... ON CONFLICT (conflictTarget) DO NOTHING` — idempotent by
|
|
@@ -5936,11 +5951,10 @@ var creationSourceBlueprintSchema = z7.object({
|
|
|
5936
5951
|
* `null`/absent means every feature Module: the platform stores that as the
|
|
5937
5952
|
* explicit list of feature Modules in the published Blueprint version the fork
|
|
5938
5953
|
* is cut from, so a Module a later Blueprint update adds arrives off. `[]` is
|
|
5939
|
-
*
|
|
5940
|
-
*
|
|
5941
|
-
* back as "all" (`module-enablement.ts`) — the opposite of an empty selection.
|
|
5954
|
+
* a custom app: no feature Module, Library Modules only (`resolvePlatformEnv`
|
|
5955
|
+
* emits it as a set value naming no Module).
|
|
5942
5956
|
*/
|
|
5943
|
-
enabledModules: z7.array(moduleNameSchema).
|
|
5957
|
+
enabledModules: z7.array(moduleNameSchema).max(100).nullable().optional()
|
|
5944
5958
|
});
|
|
5945
5959
|
var creationSourceSchema = z7.discriminatedUnion("type", [
|
|
5946
5960
|
creationSourceBlankSchema,
|
|
@@ -7707,6 +7721,24 @@ function assertNoAppLayerImporters(cwd, excluded) {
|
|
|
7707
7721
|
var TSCONFIG_PATH = "apps/web/tsconfig.json";
|
|
7708
7722
|
var BUILD_TSCONFIG_PATH = "apps/web/tsconfig.build.gen.json";
|
|
7709
7723
|
var BUILD_TSCONFIG_HEADER = "// Generated by stardeck-compose \u2014 the tsconfig `next build` type-checks. Do not edit or commit.";
|
|
7724
|
+
var BUILD_TYPECHECK_SKIP = [
|
|
7725
|
+
"**/*.test.ts",
|
|
7726
|
+
"**/*.test.tsx",
|
|
7727
|
+
"**/*.spec.ts",
|
|
7728
|
+
"**/*.spec.tsx",
|
|
7729
|
+
"**/__tests__",
|
|
7730
|
+
"**/test-utils",
|
|
7731
|
+
"**/test-helpers.ts",
|
|
7732
|
+
// Module test suites, including those inside enhancement slices.
|
|
7733
|
+
"src/modules/**/tests",
|
|
7734
|
+
"src/modules/**/e2e",
|
|
7735
|
+
"e2e",
|
|
7736
|
+
"tests",
|
|
7737
|
+
"scripts",
|
|
7738
|
+
"vitest.config.ts",
|
|
7739
|
+
"vitest.setup.ts",
|
|
7740
|
+
"playwright.config.ts"
|
|
7741
|
+
];
|
|
7710
7742
|
function writeBuildTsconfig(cwd, excluded) {
|
|
7711
7743
|
const baseFile = path3.join(cwd, TSCONFIG_PATH);
|
|
7712
7744
|
if (!fs3.existsSync(path3.join(cwd, MODULES_DIR2)) || !fs3.existsSync(baseFile)) return;
|
|
@@ -7722,6 +7754,7 @@ function writeBuildTsconfig(cwd, excluded) {
|
|
|
7722
7754
|
extends: "./tsconfig.json",
|
|
7723
7755
|
exclude: [
|
|
7724
7756
|
...baseExclude,
|
|
7757
|
+
...BUILD_TYPECHECK_SKIP,
|
|
7725
7758
|
...excluded.flatMap((name) => [
|
|
7726
7759
|
`${modulesDir}/${name}`,
|
|
7727
7760
|
`${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.13.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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "rm -rf dist && tsup",
|
|
35
35
|
"dev": "tsup --watch",
|
|
36
36
|
"format": "prettier --write . && oxlint . --fix",
|
|
37
|
-
"typecheck": "
|
|
37
|
+
"typecheck": "tsgo -p tsconfig.test.json",
|
|
38
38
|
"lint": "oxlint src/",
|
|
39
39
|
"test": "vitest run",
|
|
40
40
|
"test:watch": "vitest"
|