@dreamboard-games/cli 0.1.30-alpha.12 → 0.1.30-alpha.13
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/README.md +2 -6
- package/dist/agent-verifier/agent-workspace-verifier.mjs +18 -17
- package/dist/agent-verifier/agent-workspace-verifier.mjs.map +1 -1
- package/dist/agent-verifier/{chunk-TLYGTHXU.mjs → chunk-5GCZZ6NW.mjs} +3 -3
- package/dist/agent-verifier/{chunk-YR664DJX.mjs → chunk-A67WUYN2.mjs} +42 -68
- package/dist/agent-verifier/chunk-A67WUYN2.mjs.map +1 -0
- package/dist/agent-verifier/chunk-AXXUGU7Q.mjs +255 -0
- package/dist/agent-verifier/chunk-AXXUGU7Q.mjs.map +1 -0
- package/dist/agent-verifier/chunk-CO3BRUD6.mjs +342 -0
- package/dist/agent-verifier/chunk-CO3BRUD6.mjs.map +1 -0
- package/dist/agent-verifier/chunk-DPYC2NDB.mjs +59 -0
- package/dist/agent-verifier/chunk-DPYC2NDB.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-4GU3PCHV.mjs → chunk-DWLTCUUX.mjs} +576 -393
- package/dist/agent-verifier/chunk-DWLTCUUX.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-COB56ESI.mjs → chunk-G2ECODRB.mjs} +2 -2
- package/dist/agent-verifier/{chunk-6XRC5PWB.mjs → chunk-H3XNWKJU.mjs} +217 -232
- package/dist/agent-verifier/chunk-H3XNWKJU.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-Z6OZWUIZ.mjs → chunk-HLHT57AW.mjs} +64 -16
- package/dist/agent-verifier/chunk-HLHT57AW.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-YDIOW2BO.mjs → chunk-INIK6LHK.mjs} +2 -2
- package/dist/agent-verifier/{chunk-VLOIZDR6.mjs → chunk-JPN62WDY.mjs} +199 -190
- package/dist/agent-verifier/chunk-JPN62WDY.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-UWJIZML3.mjs → chunk-LKQ557TJ.mjs} +30 -23
- package/dist/agent-verifier/chunk-LKQ557TJ.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-NAK77WXW.mjs → chunk-MYMVXTZT.mjs} +4 -5
- package/dist/agent-verifier/chunk-MYMVXTZT.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-UIJ2NDG6.mjs → chunk-NFL3Z4Z7.mjs} +31 -238
- package/dist/agent-verifier/chunk-NFL3Z4Z7.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-XKCJBIRY.mjs → chunk-QD4SQNUP.mjs} +2 -2
- package/dist/agent-verifier/{chunk-IAYRNVUC.mjs → chunk-RDYXWXXC.mjs} +1 -3
- package/dist/agent-verifier/{chunk-QBAF7EYR.mjs → chunk-TTB7AIHZ.mjs} +4 -4
- package/dist/agent-verifier/{chunk-QBAF7EYR.mjs.map → chunk-TTB7AIHZ.mjs.map} +1 -1
- package/dist/agent-verifier/chunk-V6AQDR7W.mjs +89 -0
- package/dist/agent-verifier/chunk-V6AQDR7W.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-RHI6S4SU.mjs → chunk-V7ABTZXW.mjs} +1 -3
- package/dist/agent-verifier/{chunk-RHI6S4SU.mjs.map → chunk-V7ABTZXW.mjs.map} +1 -1
- package/dist/agent-verifier/chunk-WAFBU5U7.mjs +467 -0
- package/dist/agent-verifier/chunk-WAFBU5U7.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-3IJBOLGT.mjs → chunk-WSIYUUSD.mjs} +2 -2
- package/dist/agent-verifier/{compile-WZ7X6I2A.mjs → compile-H6KCBCVH.mjs} +22 -18
- package/dist/agent-verifier/compile-H6KCBCVH.mjs.map +1 -0
- package/dist/agent-verifier/{global-config-XHL7BCKN.mjs → global-config-6UGFPLDA.mjs} +4 -3
- package/dist/agent-verifier/{keychain-backend-A3MRWLPF.mjs → keychain-backend-BQLW5VEC.mjs} +11 -6
- package/dist/agent-verifier/keychain-backend-BQLW5VEC.mjs.map +1 -0
- package/dist/agent-verifier/{local-files-ZW52HSVT.mjs → local-files-WPHUV6GU.mjs} +6 -6
- package/dist/agent-verifier/{materialize-workspace-BKZLLFI4.mjs → materialize-workspace-EHCQB4UU.mjs} +17 -17
- package/dist/agent-verifier/materialize-workspace-EHCQB4UU.mjs.map +1 -0
- package/dist/agent-verifier/{reducer-bundle-preflight-7NYZF5ZT.mjs → reducer-bundle-preflight-3DSXIELT.mjs} +4 -4
- package/dist/agent-verifier/reducer-contract-preflight-FQB7M4PU.mjs +11 -0
- package/dist/agent-verifier/{reducer-native-test-harness-D4VWPIAC.mjs → reducer-native-test-harness-GY2CCQWN.mjs} +12 -9
- package/dist/agent-verifier/{static-scaffold-JCRBDKEH.mjs → static-scaffold-3O543YTZ.mjs} +7 -9
- package/dist/agent-verifier/{sync-ELLJEWMB.mjs → sync-URBFMM6H.mjs} +24 -22
- package/dist/agent-verifier/{sync-ELLJEWMB.mjs.map → sync-URBFMM6H.mjs.map} +1 -1
- package/dist/agent-verifier/{test-OSXBPLSP.mjs → test-LQAGEQLY.mjs} +19 -17
- package/dist/agent-verifier/test-LQAGEQLY.mjs.map +1 -0
- package/dist/agent-verifier/{workspace-codegen-WPZHMATU.mjs → workspace-codegen-4IWICKLB.mjs} +3 -3
- package/dist/agent-verifier/{workspace-dependencies-ULZZZPNX.mjs → workspace-dependencies-ZMHPHVQV.mjs} +2 -2
- package/dist/authoring-compatibility-internal.js +12 -0
- package/dist/{agent-verifier/chunk-W2MDP5ZN.mjs → chunk-AVOAT522.js} +118 -21
- package/dist/chunk-AVOAT522.js.map +1 -0
- package/dist/chunk-EV7Q6BIF.js +4298 -0
- package/dist/chunk-EV7Q6BIF.js.map +1 -0
- package/dist/chunk-FFO2IJL3.js +204 -0
- package/dist/chunk-FFO2IJL3.js.map +1 -0
- package/dist/{chunk-P5TITCD3.js → chunk-GS6A7T53.js} +2240 -4554
- package/dist/chunk-GS6A7T53.js.map +1 -0
- package/dist/{global-config-WPJRXVDO.js → global-config-NLGAFSRU.js} +3 -2
- package/dist/global-config-NLGAFSRU.js.map +1 -0
- package/dist/index.js +1371 -3545
- package/dist/index.js.map +1 -1
- package/dist/internal.js +14 -8
- package/dist/{keychain-backend-JHTXAKWC.js → keychain-backend-47LZ5IX5.js} +11 -6
- package/dist/keychain-backend-47LZ5IX5.js.map +1 -0
- package/package.json +9 -19
- package/release/authoring-release-set.json +38 -0
- package/skills/dreamboard/references/manifest-authoring.md +11 -3
- package/dist/agent-verifier/chunk-4GU3PCHV.mjs.map +0 -1
- package/dist/agent-verifier/chunk-6XRC5PWB.mjs.map +0 -1
- package/dist/agent-verifier/chunk-G42BGGG2.mjs +0 -70
- package/dist/agent-verifier/chunk-G42BGGG2.mjs.map +0 -1
- package/dist/agent-verifier/chunk-KK47X7RV.mjs +0 -14
- package/dist/agent-verifier/chunk-KK47X7RV.mjs.map +0 -1
- package/dist/agent-verifier/chunk-NAK77WXW.mjs.map +0 -1
- package/dist/agent-verifier/chunk-UIJ2NDG6.mjs.map +0 -1
- package/dist/agent-verifier/chunk-UWJIZML3.mjs.map +0 -1
- package/dist/agent-verifier/chunk-VLOIZDR6.mjs.map +0 -1
- package/dist/agent-verifier/chunk-W2MDP5ZN.mjs.map +0 -1
- package/dist/agent-verifier/chunk-YR664DJX.mjs.map +0 -1
- package/dist/agent-verifier/chunk-Z6OZWUIZ.mjs.map +0 -1
- package/dist/agent-verifier/compile-WZ7X6I2A.mjs.map +0 -1
- package/dist/agent-verifier/keychain-backend-A3MRWLPF.mjs.map +0 -1
- package/dist/agent-verifier/materialize-workspace-BKZLLFI4.mjs.map +0 -1
- package/dist/agent-verifier/reducer-contract-preflight-COD2CO22.mjs +0 -11
- package/dist/agent-verifier/test-OSXBPLSP.mjs.map +0 -1
- package/dist/chunk-GXM7RRZJ.js +0 -433
- package/dist/chunk-GXM7RRZJ.js.map +0 -1
- package/dist/chunk-P5TITCD3.js.map +0 -1
- package/dist/dev-host/components/drawer.tsx +0 -132
- package/dist/dev-host/components/input.tsx +0 -21
- package/dist/dev-host/dev-api-proxy-plugin.ts +0 -328
- package/dist/dev-host/dev-author-dom-warnings.ts +0 -100
- package/dist/dev-host/dev-diagnostics.ts +0 -62
- package/dist/dev-host/dev-fallback-stylesheet.ts +0 -53
- package/dist/dev-host/dev-hmr-guard-plugin.ts +0 -47
- package/dist/dev-host/dev-host-controller.ts +0 -674
- package/dist/dev-host/dev-host-player-query.ts +0 -17
- package/dist/dev-host/dev-host-session-transport.ts +0 -52
- package/dist/dev-host/dev-host-storage.ts +0 -56
- package/dist/dev-host/dev-log-relay-plugin.ts +0 -510
- package/dist/dev-host/dev-runtime-config.ts +0 -14
- package/dist/dev-host/dev-runtime-platform.ts +0 -335
- package/dist/dev-host/dev-virtual-modules-plugin.ts +0 -64
- package/dist/dev-host/host-main.css +0 -224
- package/dist/dev-host/host-main.tsx +0 -954
- package/dist/dev-host/index.html +0 -56
- package/dist/dev-host/lib/utils.ts +0 -6
- package/dist/dev-host/plugin-main.ts +0 -61
- package/dist/dev-host/plugin.html +0 -24
- package/dist/dev-host/shared-styles.css +0 -144
- package/dist/dev-host/start-dev-server.ts +0 -140
- package/dist/dev-host/virtual-modules.d.ts +0 -27
- package/dist/keychain-backend-JHTXAKWC.js.map +0 -1
- /package/dist/agent-verifier/{chunk-TLYGTHXU.mjs.map → chunk-5GCZZ6NW.mjs.map} +0 -0
- /package/dist/agent-verifier/{chunk-COB56ESI.mjs.map → chunk-G2ECODRB.mjs.map} +0 -0
- /package/dist/agent-verifier/{chunk-YDIOW2BO.mjs.map → chunk-INIK6LHK.mjs.map} +0 -0
- /package/dist/agent-verifier/{chunk-XKCJBIRY.mjs.map → chunk-QD4SQNUP.mjs.map} +0 -0
- /package/dist/agent-verifier/{chunk-IAYRNVUC.mjs.map → chunk-RDYXWXXC.mjs.map} +0 -0
- /package/dist/agent-verifier/{chunk-3IJBOLGT.mjs.map → chunk-WSIYUUSD.mjs.map} +0 -0
- /package/dist/agent-verifier/{global-config-XHL7BCKN.mjs.map → global-config-6UGFPLDA.mjs.map} +0 -0
- /package/dist/agent-verifier/{local-files-ZW52HSVT.mjs.map → local-files-WPHUV6GU.mjs.map} +0 -0
- /package/dist/agent-verifier/{reducer-bundle-preflight-7NYZF5ZT.mjs.map → reducer-bundle-preflight-3DSXIELT.mjs.map} +0 -0
- /package/dist/agent-verifier/{reducer-contract-preflight-COD2CO22.mjs.map → reducer-contract-preflight-FQB7M4PU.mjs.map} +0 -0
- /package/dist/agent-verifier/{reducer-native-test-harness-D4VWPIAC.mjs.map → reducer-native-test-harness-GY2CCQWN.mjs.map} +0 -0
- /package/dist/agent-verifier/{static-scaffold-JCRBDKEH.mjs.map → static-scaffold-3O543YTZ.mjs.map} +0 -0
- /package/dist/agent-verifier/{workspace-codegen-WPZHMATU.mjs.map → workspace-codegen-4IWICKLB.mjs.map} +0 -0
- /package/dist/agent-verifier/{workspace-dependencies-ULZZZPNX.mjs.map → workspace-dependencies-ZMHPHVQV.mjs.map} +0 -0
- /package/dist/{global-config-WPJRXVDO.js.map → authoring-compatibility-internal.js.map} +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.framework.json +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.json +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/ui/index.tsx +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/ui/style.css +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.framework.json +0 -0
- /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.json +0 -0
|
@@ -3,23 +3,22 @@ import {
|
|
|
3
3
|
REDUCER_TESTING_TYPES_WRAPPER_CONTENT
|
|
4
4
|
} from "./chunk-F2DIOJJZ.mjs";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
ensureDir
|
|
7
|
+
} from "./chunk-RDYXWXXC.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isDynamicSeedPath,
|
|
10
10
|
materializeManifest
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H3XNWKJU.mjs";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./chunk-IAYRNVUC.mjs";
|
|
13
|
+
normalizeOwnedProjectPath,
|
|
14
|
+
readWorkspaceTextFile,
|
|
15
|
+
readWorkspaceTextFileIfExists,
|
|
16
|
+
removeWorkspacePath,
|
|
17
|
+
resolveWorkspacePath,
|
|
18
|
+
unlinkWorkspaceFile,
|
|
19
|
+
workspacePathExists,
|
|
20
|
+
writeWorkspaceTextFile
|
|
21
|
+
} from "./chunk-WAFBU5U7.mjs";
|
|
23
22
|
import {
|
|
24
23
|
FRAMEWORK_PNPM_OVERRIDES,
|
|
25
24
|
FRAMEWORK_REACT_DEPENDENCIES,
|
|
@@ -30,10 +29,52 @@ import {
|
|
|
30
29
|
} from "./chunk-M7UVBANQ.mjs";
|
|
31
30
|
|
|
32
31
|
// src/services/project/static-scaffold.ts
|
|
33
|
-
import { existsSync
|
|
34
|
-
import { readdir, readFile,
|
|
32
|
+
import { existsSync } from "fs";
|
|
33
|
+
import { readdir, readFile, rmdir } from "fs/promises";
|
|
35
34
|
import path from "path";
|
|
36
35
|
import { fileURLToPath } from "url";
|
|
36
|
+
|
|
37
|
+
// src/release/authoring-release-set.generated.ts
|
|
38
|
+
var AUTHORING_RELEASE_SET = {
|
|
39
|
+
"schemaVersion": 1,
|
|
40
|
+
"channel": "public",
|
|
41
|
+
"packages": {
|
|
42
|
+
"cli": {
|
|
43
|
+
"name": "@dreamboard-games/cli",
|
|
44
|
+
"version": "0.1.30-alpha.13"
|
|
45
|
+
},
|
|
46
|
+
"sdk": {
|
|
47
|
+
"name": "@dreamboard-games/sdk",
|
|
48
|
+
"version": "0.4.0-alpha.1"
|
|
49
|
+
},
|
|
50
|
+
"apiClient": {
|
|
51
|
+
"name": "@dreamboard-games/api-client",
|
|
52
|
+
"version": "0.3.0-alpha.4"
|
|
53
|
+
},
|
|
54
|
+
"devHost": {
|
|
55
|
+
"name": "@dreamboard-games/dev-host",
|
|
56
|
+
"version": "0.1.30-alpha.13"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"protocols": {
|
|
60
|
+
"authoringAdapter": 1,
|
|
61
|
+
"devHost": 1,
|
|
62
|
+
"verifier": 1
|
|
63
|
+
},
|
|
64
|
+
"schemas": {
|
|
65
|
+
"scaffold": 2,
|
|
66
|
+
"manifest": 2,
|
|
67
|
+
"generatedArtifacts": 1
|
|
68
|
+
},
|
|
69
|
+
"registry": {
|
|
70
|
+
"kind": "public-npm",
|
|
71
|
+
"portable": true
|
|
72
|
+
},
|
|
73
|
+
"packageManager": "pnpm@10.4.1",
|
|
74
|
+
"releaseSetId": "sha256:e342f47ce36c53d58b4049cc68db5a51f94e940ee1ed39fedd723c837e52822b"
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// src/services/project/static-scaffold.ts
|
|
37
78
|
var DREAMBOARD_SYNC_COMMAND = "dreamboard sync";
|
|
38
79
|
var DREAMBOARD_GITIGNORE_BLOCK = [
|
|
39
80
|
"# Dreamboard local state",
|
|
@@ -91,14 +132,16 @@ export default defineScenario({
|
|
|
91
132
|
});
|
|
92
133
|
`;
|
|
93
134
|
var STATIC_ASSET_ROOT = resolveStaticAssetRoot();
|
|
94
|
-
var
|
|
95
|
-
"@dreamboard-games/sdk":
|
|
135
|
+
var SDK_DEPENDENCY_RANGES = {
|
|
136
|
+
"@dreamboard-games/sdk": AUTHORING_RELEASE_SET.packages.sdk.version
|
|
96
137
|
};
|
|
97
|
-
var
|
|
98
|
-
"@dreamboard-games/
|
|
138
|
+
var DEV_HOST_DEPENDENCY_RANGES = {
|
|
139
|
+
"@dreamboard-games/dev-host": AUTHORING_RELEASE_SET.packages.devHost.version
|
|
99
140
|
};
|
|
100
|
-
var
|
|
101
|
-
"@dreamboard-games/
|
|
141
|
+
var DREAMBOARD_PACKAGE_OVERRIDES = {
|
|
142
|
+
"@dreamboard-games/api-client": AUTHORING_RELEASE_SET.packages.apiClient.version,
|
|
143
|
+
"@dreamboard-games/dev-host": AUTHORING_RELEASE_SET.packages.devHost.version,
|
|
144
|
+
"@dreamboard-games/sdk": AUTHORING_RELEASE_SET.packages.sdk.version
|
|
102
145
|
};
|
|
103
146
|
var FRAMEWORK_SCRIPTS = {
|
|
104
147
|
dev: "dreamboard dev",
|
|
@@ -125,50 +168,38 @@ var SHARED_DEV_DEPENDENCIES = {
|
|
|
125
168
|
async function scaffoldStaticWorkspace(projectRoot, mode, options = {}) {
|
|
126
169
|
await writeFrameworkStaticFiles(projectRoot, mode, options);
|
|
127
170
|
await ensureDreamboardGitignore(projectRoot);
|
|
128
|
-
await writeManifestTypecheckTsconfig(
|
|
129
|
-
path.join(projectRoot, MANIFEST_TYPECHECK_CONFIG_FILE)
|
|
130
|
-
);
|
|
171
|
+
await writeManifestTypecheckTsconfig(projectRoot);
|
|
131
172
|
await removeLegacyVendoredSdkPaths(projectRoot);
|
|
132
173
|
await removeLegacyDreamboardComponentPath(projectRoot);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
await
|
|
138
|
-
await ensureDir(scenariosDir);
|
|
139
|
-
await ensureDir(generatedDir);
|
|
140
|
-
await writeTestReadme(path.join(testDir, "README.md"));
|
|
141
|
-
await writeGeneratedTestingStubs(generatedDir, mode);
|
|
174
|
+
await ensureDir(resolveWorkspacePath(projectRoot, "test/bases"));
|
|
175
|
+
await ensureDir(resolveWorkspacePath(projectRoot, "test/scenarios"));
|
|
176
|
+
await ensureDir(resolveWorkspacePath(projectRoot, "test/generated"));
|
|
177
|
+
await writeTestReadme(projectRoot);
|
|
178
|
+
await writeGeneratedTestingStubs(projectRoot, mode);
|
|
142
179
|
const initialTestPlayerCount = await inferInitialTestPlayerCount(projectRoot);
|
|
143
|
-
await writeInitialBase(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
path.join(scenariosDir, "smoke-initial-turn.scenario.ts"),
|
|
150
|
-
mode
|
|
151
|
-
);
|
|
152
|
-
await writeTestingTypes(path.join(testDir, "testing-types.ts"), mode);
|
|
153
|
-
await writeTestTsconfig(path.join(testDir, "tsconfig.json"));
|
|
154
|
-
const staleDtsPath = path.join(testDir, "testing-types.d.ts");
|
|
155
|
-
if (await exists(staleDtsPath)) {
|
|
156
|
-
await unlink(staleDtsPath);
|
|
180
|
+
await writeInitialBase(projectRoot, mode, initialTestPlayerCount);
|
|
181
|
+
await writeInitialScenario(projectRoot, mode);
|
|
182
|
+
await writeTestingTypes(projectRoot, mode);
|
|
183
|
+
await writeTestTsconfig(projectRoot);
|
|
184
|
+
if (await workspacePathExists(projectRoot, "test/testing-types.d.ts")) {
|
|
185
|
+
await unlinkWorkspaceFile(projectRoot, "test/testing-types.d.ts");
|
|
157
186
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
await unlink(staleBaseScenariosPath);
|
|
187
|
+
if (await workspacePathExists(projectRoot, "test/base-scenarios.json")) {
|
|
188
|
+
await unlinkWorkspaceFile(projectRoot, "test/base-scenarios.json");
|
|
161
189
|
}
|
|
162
190
|
await migrateLegacyScenarioImports(projectRoot);
|
|
163
191
|
}
|
|
164
192
|
async function ensureDreamboardGitignore(projectRoot) {
|
|
165
|
-
const
|
|
166
|
-
|
|
193
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
194
|
+
projectRoot,
|
|
195
|
+
".gitignore"
|
|
196
|
+
);
|
|
167
197
|
if (existing?.includes(".dreamboard/state.json")) {
|
|
168
198
|
return;
|
|
169
199
|
}
|
|
170
|
-
await
|
|
171
|
-
|
|
200
|
+
await writeWorkspaceTextFile(
|
|
201
|
+
projectRoot,
|
|
202
|
+
".gitignore",
|
|
172
203
|
`${existing ? `${existing.trimEnd()}
|
|
173
204
|
|
|
174
205
|
` : ""}${DREAMBOARD_GITIGNORE_BLOCK}`
|
|
@@ -178,14 +209,18 @@ async function assertCliStaticScaffoldComplete(projectRoot, deletedPaths = []) {
|
|
|
178
209
|
const expectedEntries = await getExpectedStaticEntries(projectRoot);
|
|
179
210
|
const missingOrBlankPaths = [];
|
|
180
211
|
for (const entry of expectedEntries) {
|
|
181
|
-
const
|
|
182
|
-
|
|
212
|
+
const content = await readWorkspaceTextFileIfExists(
|
|
213
|
+
projectRoot,
|
|
214
|
+
entry.targetPath
|
|
215
|
+
);
|
|
183
216
|
if (content === null || content.trim().length === 0) {
|
|
184
217
|
missingOrBlankPaths.push(entry.targetPath);
|
|
185
218
|
}
|
|
186
219
|
}
|
|
187
220
|
const staticPaths = new Set(expectedEntries.map((entry) => entry.targetPath));
|
|
188
|
-
const deletedStaticPaths = deletedPaths.map(
|
|
221
|
+
const deletedStaticPaths = deletedPaths.map(normalizeOwnedProjectPath).filter(
|
|
222
|
+
(filePath) => filePath !== null && staticPaths.has(filePath)
|
|
223
|
+
).sort();
|
|
189
224
|
if (missingOrBlankPaths.length === 0 && deletedStaticPaths.length === 0) {
|
|
190
225
|
return;
|
|
191
226
|
}
|
|
@@ -205,48 +240,48 @@ async function assertCliStaticScaffoldComplete(projectRoot, deletedPaths = []) {
|
|
|
205
240
|
async function writeFrameworkStaticFiles(projectRoot, mode, options) {
|
|
206
241
|
const assetEntries = await getStaticAssetEntries();
|
|
207
242
|
for (const entry of assetEntries) {
|
|
208
|
-
const fullPath = path.join(projectRoot, entry.targetPath);
|
|
209
243
|
if (mode === "update" && isDynamicSeedPath(entry.targetPath)) {
|
|
210
|
-
const existing = await
|
|
244
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
245
|
+
projectRoot,
|
|
246
|
+
entry.targetPath
|
|
247
|
+
);
|
|
211
248
|
if (existing !== null && existing.trim().length > 0) {
|
|
212
249
|
continue;
|
|
213
250
|
}
|
|
214
251
|
}
|
|
215
|
-
await
|
|
252
|
+
await writeWorkspaceTextFile(projectRoot, entry.targetPath, entry.content);
|
|
216
253
|
}
|
|
217
254
|
for (const entry of await getDynamicStaticEntries(
|
|
218
255
|
projectRoot,
|
|
219
256
|
mode,
|
|
220
257
|
options
|
|
221
258
|
)) {
|
|
222
|
-
await
|
|
223
|
-
path.join(projectRoot, entry.targetPath),
|
|
224
|
-
entry.content
|
|
225
|
-
);
|
|
259
|
+
await writeWorkspaceTextFile(projectRoot, entry.targetPath, entry.content);
|
|
226
260
|
}
|
|
227
261
|
if (!options.localMaintainerRegistry) {
|
|
228
|
-
await
|
|
262
|
+
await removeWorkspacePath(projectRoot, ".npmrc", { force: true });
|
|
229
263
|
}
|
|
230
264
|
}
|
|
231
265
|
async function removeLegacyVendoredSdkPaths(projectRoot) {
|
|
232
|
-
await
|
|
266
|
+
await removeWorkspacePath(projectRoot, "app/sdk", {
|
|
233
267
|
recursive: true,
|
|
234
268
|
force: true
|
|
235
269
|
});
|
|
236
|
-
await
|
|
270
|
+
await removeWorkspacePath(projectRoot, "ui/sdk", {
|
|
237
271
|
recursive: true,
|
|
238
272
|
force: true
|
|
239
273
|
});
|
|
240
274
|
}
|
|
241
275
|
async function removeLegacyDreamboardComponentPath(projectRoot) {
|
|
242
|
-
const
|
|
276
|
+
const legacyIndexProjectPath = "ui/components/dreamboard/index.ts";
|
|
277
|
+
const legacyDirPath = resolveWorkspacePath(
|
|
278
|
+
projectRoot,
|
|
279
|
+
"ui/components/dreamboard"
|
|
280
|
+
);
|
|
281
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
243
282
|
projectRoot,
|
|
244
|
-
|
|
245
|
-
"components",
|
|
246
|
-
"dreamboard"
|
|
283
|
+
legacyIndexProjectPath
|
|
247
284
|
);
|
|
248
|
-
const legacyIndexPath = path.join(legacyDirPath, "index.ts");
|
|
249
|
-
const existing = await readTextFileIfExists(legacyIndexPath);
|
|
250
285
|
const removableLegacyContents = /* @__PURE__ */ new Set([
|
|
251
286
|
LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT.trim(),
|
|
252
287
|
OLD_LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT.trim(),
|
|
@@ -255,24 +290,26 @@ async function removeLegacyDreamboardComponentPath(projectRoot) {
|
|
|
255
290
|
if (existing === null || !removableLegacyContents.has(existing.trim())) {
|
|
256
291
|
return;
|
|
257
292
|
}
|
|
258
|
-
await
|
|
293
|
+
await unlinkWorkspaceFile(projectRoot, legacyIndexProjectPath);
|
|
259
294
|
const remainingEntries = await readdir(legacyDirPath).catch(() => []);
|
|
260
295
|
if (remainingEntries.length === 0) {
|
|
261
296
|
await rmdir(legacyDirPath);
|
|
262
297
|
}
|
|
263
298
|
}
|
|
264
|
-
async function writeTestReadme(
|
|
265
|
-
await
|
|
266
|
-
|
|
299
|
+
async function writeTestReadme(projectRoot) {
|
|
300
|
+
await writeWorkspaceTextFile(
|
|
301
|
+
projectRoot,
|
|
302
|
+
"test/README.md",
|
|
267
303
|
"# Dreamboard Test Workspace\n\nTypeScript bases live in `test/bases/*.base.ts` and scenarios live in `test/scenarios/*.scenario.ts`.\n\n1. Define reusable seeded bases with `defineBase({ id, seed, players, setupProfileId?, setup })`.\n2. Define scenarios with `defineScenario({ id, from, when, then })`.\n3. Scenario assertions can read `players()`, `state()`, `view(playerId)`, and `interactions(playerId)`.\n4. Generate deterministic base snapshots: `dreamboard test generate`.\n5. Run tests: `dreamboard test run`.\n\nImport test helpers from `../testing-types`.\n\nGenerated artifacts are written to `test/generated/*` and should not be edited manually.\n"
|
|
268
304
|
);
|
|
269
305
|
}
|
|
270
|
-
async function writeInitialBase(
|
|
306
|
+
async function writeInitialBase(projectRoot, mode, players) {
|
|
271
307
|
if (mode === "update") {
|
|
272
308
|
return;
|
|
273
309
|
}
|
|
274
|
-
await
|
|
275
|
-
|
|
310
|
+
await writeWorkspaceTextFile(
|
|
311
|
+
projectRoot,
|
|
312
|
+
"test/bases/initial-turn.base.ts",
|
|
276
313
|
`import { defineBase } from "../testing-types";
|
|
277
314
|
|
|
278
315
|
export default defineBase({
|
|
@@ -284,44 +321,69 @@ export default defineBase({
|
|
|
284
321
|
`
|
|
285
322
|
);
|
|
286
323
|
}
|
|
287
|
-
async function writeInitialScenario(
|
|
324
|
+
async function writeInitialScenario(projectRoot, mode) {
|
|
288
325
|
if (mode === "new") {
|
|
289
|
-
await
|
|
326
|
+
await writeWorkspaceTextFile(
|
|
327
|
+
projectRoot,
|
|
328
|
+
"test/scenarios/smoke-initial-turn.scenario.ts",
|
|
329
|
+
INITIAL_SCENARIO_CONTENT
|
|
330
|
+
);
|
|
290
331
|
return;
|
|
291
332
|
}
|
|
292
|
-
const existing = await
|
|
333
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
334
|
+
projectRoot,
|
|
335
|
+
"test/scenarios/smoke-initial-turn.scenario.ts"
|
|
336
|
+
);
|
|
293
337
|
if (existing === null || existing.trim().length === 0 || existing === INITIAL_SCENARIO_CONTENT) {
|
|
294
|
-
await
|
|
338
|
+
await writeWorkspaceTextFile(
|
|
339
|
+
projectRoot,
|
|
340
|
+
"test/scenarios/smoke-initial-turn.scenario.ts",
|
|
341
|
+
INITIAL_SCENARIO_CONTENT
|
|
342
|
+
);
|
|
295
343
|
}
|
|
296
344
|
}
|
|
297
|
-
async function writeTestingTypes(
|
|
345
|
+
async function writeTestingTypes(projectRoot, mode) {
|
|
298
346
|
if (mode === "new") {
|
|
299
|
-
await
|
|
347
|
+
await writeWorkspaceTextFile(
|
|
348
|
+
projectRoot,
|
|
349
|
+
"test/testing-types.ts",
|
|
350
|
+
REDUCER_TESTING_TYPES_WRAPPER_CONTENT
|
|
351
|
+
);
|
|
300
352
|
return;
|
|
301
353
|
}
|
|
302
|
-
const existing = await
|
|
354
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
355
|
+
projectRoot,
|
|
356
|
+
"test/testing-types.ts"
|
|
357
|
+
);
|
|
303
358
|
if (shouldRefreshGeneratedTestingTypes(existing)) {
|
|
304
|
-
await
|
|
359
|
+
await writeWorkspaceTextFile(
|
|
360
|
+
projectRoot,
|
|
361
|
+
"test/testing-types.ts",
|
|
362
|
+
REDUCER_TESTING_TYPES_WRAPPER_CONTENT
|
|
363
|
+
);
|
|
305
364
|
}
|
|
306
365
|
}
|
|
307
|
-
async function writeGeneratedTestingStubs(
|
|
366
|
+
async function writeGeneratedTestingStubs(projectRoot, mode) {
|
|
308
367
|
const header = "// Generated by dreamboard scaffold. Do not edit by hand.\n";
|
|
309
368
|
await writeGeneratedTestingStubFile(
|
|
310
|
-
|
|
369
|
+
projectRoot,
|
|
370
|
+
"test/generated/base-states.generated.ts",
|
|
311
371
|
`${header}export const BASE_STATES = {} as const;
|
|
312
372
|
export const BASE_STATES_CONTRACT_FINGERPRINT = undefined;
|
|
313
373
|
`,
|
|
314
374
|
mode
|
|
315
375
|
);
|
|
316
376
|
await writeGeneratedTestingStubFile(
|
|
317
|
-
|
|
377
|
+
projectRoot,
|
|
378
|
+
"test/generated/base-states.generated.d.ts",
|
|
318
379
|
`${header}export declare const BASE_STATES: Record<string, unknown>;
|
|
319
380
|
export declare const BASE_STATES_CONTRACT_FINGERPRINT: string | undefined;
|
|
320
381
|
`,
|
|
321
382
|
mode
|
|
322
383
|
);
|
|
323
384
|
await writeGeneratedTestingStubFile(
|
|
324
|
-
|
|
385
|
+
projectRoot,
|
|
386
|
+
"test/generated/testing-contract.ts",
|
|
325
387
|
`${header}export type BaseId = string;
|
|
326
388
|
export type GameView = unknown;
|
|
327
389
|
export type InteractionId = string;
|
|
@@ -348,25 +410,30 @@ export interface ScenarioDefinition<Runners extends readonly TestRunner[] = read
|
|
|
348
410
|
mode
|
|
349
411
|
);
|
|
350
412
|
await writeGeneratedTestingStubFile(
|
|
351
|
-
|
|
413
|
+
projectRoot,
|
|
414
|
+
"test/generated/scenario-manifest.generated.ts",
|
|
352
415
|
`${header}export const SCENARIO_MANIFEST = [] as const;
|
|
353
416
|
`,
|
|
354
417
|
mode
|
|
355
418
|
);
|
|
356
419
|
}
|
|
357
|
-
async function writeGeneratedTestingStubFile(
|
|
420
|
+
async function writeGeneratedTestingStubFile(projectRoot, projectPath, content, mode) {
|
|
358
421
|
if (mode === "new") {
|
|
359
|
-
await
|
|
422
|
+
await writeWorkspaceTextFile(projectRoot, projectPath, content);
|
|
360
423
|
return;
|
|
361
424
|
}
|
|
362
|
-
const existing = await
|
|
425
|
+
const existing = await readWorkspaceTextFileIfExists(
|
|
426
|
+
projectRoot,
|
|
427
|
+
projectPath
|
|
428
|
+
);
|
|
363
429
|
if (existing === null || existing.trim().length === 0 || existing.startsWith(GENERATED_SCENARIO_PREFIX)) {
|
|
364
|
-
await
|
|
430
|
+
await writeWorkspaceTextFile(projectRoot, projectPath, content);
|
|
365
431
|
}
|
|
366
432
|
}
|
|
367
|
-
async function writeTestTsconfig(
|
|
368
|
-
await
|
|
369
|
-
|
|
433
|
+
async function writeTestTsconfig(projectRoot) {
|
|
434
|
+
await writeWorkspaceTextFile(
|
|
435
|
+
projectRoot,
|
|
436
|
+
"test/tsconfig.json",
|
|
370
437
|
`${JSON.stringify(
|
|
371
438
|
{
|
|
372
439
|
compilerOptions: {
|
|
@@ -391,9 +458,10 @@ async function writeTestTsconfig(filePath) {
|
|
|
391
458
|
`
|
|
392
459
|
);
|
|
393
460
|
}
|
|
394
|
-
async function writeManifestTypecheckTsconfig(
|
|
395
|
-
await
|
|
396
|
-
|
|
461
|
+
async function writeManifestTypecheckTsconfig(projectRoot) {
|
|
462
|
+
await writeWorkspaceTextFile(
|
|
463
|
+
projectRoot,
|
|
464
|
+
MANIFEST_TYPECHECK_CONFIG_FILE,
|
|
397
465
|
`${JSON.stringify(
|
|
398
466
|
{
|
|
399
467
|
compilerOptions: {
|
|
@@ -415,11 +483,12 @@ async function writeManifestTypecheckTsconfig(filePath) {
|
|
|
415
483
|
);
|
|
416
484
|
}
|
|
417
485
|
async function migrateLegacyScenarioImports(projectRoot) {
|
|
418
|
-
|
|
419
|
-
|
|
486
|
+
if (!await workspacePathExists(projectRoot, "test/scenarios")) return;
|
|
487
|
+
const scenariosRoot = resolveWorkspacePath(projectRoot, "test/scenarios");
|
|
420
488
|
const scenarioFiles = await collectScenarioFiles(scenariosRoot);
|
|
421
489
|
for (const filePath of scenarioFiles) {
|
|
422
|
-
const
|
|
490
|
+
const projectPath = toWorkspaceProjectPath(projectRoot, filePath);
|
|
491
|
+
const content = await readWorkspaceTextFile(projectRoot, projectPath);
|
|
423
492
|
if (!content.includes("@dreamboard/cli/testing")) continue;
|
|
424
493
|
const relativeToTestingTypes = normalizeImportPath(
|
|
425
494
|
path.relative(
|
|
@@ -429,7 +498,7 @@ async function migrateLegacyScenarioImports(projectRoot) {
|
|
|
429
498
|
);
|
|
430
499
|
const migrated = content.replaceAll('"@dreamboard/cli/testing"', `"${relativeToTestingTypes}"`).replaceAll("'@dreamboard/cli/testing'", `'${relativeToTestingTypes}'`);
|
|
431
500
|
if (migrated !== content) {
|
|
432
|
-
await
|
|
501
|
+
await writeWorkspaceTextFile(projectRoot, projectPath, migrated);
|
|
433
502
|
}
|
|
434
503
|
}
|
|
435
504
|
}
|
|
@@ -443,8 +512,7 @@ function shouldRefreshGeneratedTestingTypes(existingContent) {
|
|
|
443
512
|
return existingContent.startsWith(GENERATED_TESTING_TYPES_PREFIX);
|
|
444
513
|
}
|
|
445
514
|
async function inferInitialTestPlayerCount(projectRoot) {
|
|
446
|
-
|
|
447
|
-
if (!await exists(manifestPath)) {
|
|
515
|
+
if (!await workspacePathExists(projectRoot, "manifest.ts")) {
|
|
448
516
|
return 4;
|
|
449
517
|
}
|
|
450
518
|
try {
|
|
@@ -491,9 +559,12 @@ async function getStaticAssetEntries() {
|
|
|
491
559
|
const files = await walkFiles(STATIC_ASSET_ROOT);
|
|
492
560
|
const entries = [];
|
|
493
561
|
for (const filePath of files) {
|
|
494
|
-
const targetPath =
|
|
495
|
-
path.relative(STATIC_ASSET_ROOT, filePath)
|
|
562
|
+
const targetPath = normalizeOwnedProjectPath(
|
|
563
|
+
path.relative(STATIC_ASSET_ROOT, filePath).replaceAll(path.sep, "/")
|
|
496
564
|
);
|
|
565
|
+
if (targetPath === null) {
|
|
566
|
+
throw new Error(`Unsafe static scaffold asset path: ${filePath}`);
|
|
567
|
+
}
|
|
497
568
|
entries.push({
|
|
498
569
|
targetPath,
|
|
499
570
|
content: await readFile(filePath, "utf8")
|
|
@@ -559,8 +630,9 @@ async function buildRootPackageJson(projectRoot, mode, options) {
|
|
|
559
630
|
...SDK_DEPENDENCY_RANGES,
|
|
560
631
|
...options.localMaintainerRegistry?.packages ?? {}
|
|
561
632
|
};
|
|
562
|
-
const
|
|
563
|
-
|
|
633
|
+
const existingPackageJson = mode === "update" && await workspacePathExists(projectRoot, "package.json") ? JSON.parse(
|
|
634
|
+
await readWorkspaceTextFile(projectRoot, "package.json")
|
|
635
|
+
) : null;
|
|
564
636
|
const {
|
|
565
637
|
dreamboardFrameworkVersion: _legacyFrameworkVersion,
|
|
566
638
|
...existingPackageJsonWithoutLegacyVersion
|
|
@@ -571,11 +643,13 @@ async function buildRootPackageJson(projectRoot, mode, options) {
|
|
|
571
643
|
...ROOT_APP_DEPENDENCIES
|
|
572
644
|
};
|
|
573
645
|
const frameworkDevDependencies = {
|
|
574
|
-
...SHARED_DEV_DEPENDENCIES
|
|
646
|
+
...SHARED_DEV_DEPENDENCIES,
|
|
647
|
+
...DEV_HOST_DEPENDENCY_RANGES
|
|
575
648
|
};
|
|
576
649
|
const nextPackageJson = {
|
|
577
650
|
...existingPackageJsonWithoutLegacyVersion,
|
|
578
651
|
private: true,
|
|
652
|
+
packageManager: AUTHORING_RELEASE_SET.packageManager,
|
|
579
653
|
scripts: {
|
|
580
654
|
...existingPackageJson?.scripts ?? {},
|
|
581
655
|
...FRAMEWORK_SCRIPTS
|
|
@@ -599,7 +673,8 @@ function mergePnpmConfig(existingPnpm) {
|
|
|
599
673
|
...existingPnpm ?? {},
|
|
600
674
|
overrides: {
|
|
601
675
|
...existingOverrides,
|
|
602
|
-
...FRAMEWORK_PNPM_OVERRIDES
|
|
676
|
+
...FRAMEWORK_PNPM_OVERRIDES,
|
|
677
|
+
...DREAMBOARD_PACKAGE_OVERRIDES
|
|
603
678
|
}
|
|
604
679
|
};
|
|
605
680
|
}
|
|
@@ -619,83 +694,18 @@ function buildUiPackageJson() {
|
|
|
619
694
|
)}
|
|
620
695
|
`;
|
|
621
696
|
}
|
|
622
|
-
function readPackageVersion(packageJsonPath, packageName) {
|
|
623
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
624
|
-
if (typeof packageJson.version !== "string" || packageJson.version.trim().length === 0) {
|
|
625
|
-
return null;
|
|
626
|
-
}
|
|
627
|
-
return `^${packageJson.version.trim()}`;
|
|
628
|
-
}
|
|
629
|
-
function findNearestPackageJsonPath(importMetaUrl = import.meta.url) {
|
|
630
|
-
let current = path.dirname(fileURLToPath(importMetaUrl));
|
|
631
|
-
while (true) {
|
|
632
|
-
const candidate = path.join(current, "package.json");
|
|
633
|
-
if (existsSync(candidate)) {
|
|
634
|
-
return candidate;
|
|
635
|
-
}
|
|
636
|
-
const parent = path.dirname(current);
|
|
637
|
-
if (parent === current) {
|
|
638
|
-
return null;
|
|
639
|
-
}
|
|
640
|
-
current = parent;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
function isSourceCheckoutCliPackageJsonPath(packageJsonPath, importMetaUrl = import.meta.url) {
|
|
644
|
-
try {
|
|
645
|
-
return path.resolve(packageJsonPath) === path.join(
|
|
646
|
-
resolveCliRepoRoot(importMetaUrl),
|
|
647
|
-
"apps",
|
|
648
|
-
"dreamboard-cli",
|
|
649
|
-
"package.json"
|
|
650
|
-
);
|
|
651
|
-
} catch {
|
|
652
|
-
return false;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
function readPackagedSdkDependencyRange(packageName, importMetaUrl = import.meta.url) {
|
|
656
|
-
const packageJsonPath = findNearestPackageJsonPath(importMetaUrl);
|
|
657
|
-
if (!packageJsonPath) {
|
|
658
|
-
return null;
|
|
659
|
-
}
|
|
660
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
661
|
-
const packagedRange = packageJson.dependencies?.[packageName];
|
|
662
|
-
if (typeof packagedRange !== "string" || packagedRange.trim().length === 0 || packagedRange.startsWith("workspace:") || packagedRange.startsWith("link:") || packagedRange.startsWith("file:") && !IS_PUBLISHED_BUILD && isSourceCheckoutCliPackageJsonPath(packageJsonPath, importMetaUrl)) {
|
|
663
|
-
return null;
|
|
664
|
-
}
|
|
665
|
-
return packagedRange.trim();
|
|
666
|
-
}
|
|
667
|
-
function stripLocalSnapshotSuffix(range) {
|
|
668
|
-
return range.replace(/-local\..*$/, "");
|
|
669
|
-
}
|
|
670
|
-
function resolveSdkDependencyRange(packageName, importMetaUrl = import.meta.url) {
|
|
671
|
-
const packagedRange = readPackagedSdkDependencyRange(
|
|
672
|
-
packageName,
|
|
673
|
-
importMetaUrl
|
|
674
|
-
);
|
|
675
|
-
if (packagedRange) {
|
|
676
|
-
return stripLocalSnapshotSuffix(packagedRange);
|
|
677
|
-
}
|
|
678
|
-
try {
|
|
679
|
-
const repoRoot = resolveCliRepoRoot(importMetaUrl);
|
|
680
|
-
const packageJsonPath = path.join(
|
|
681
|
-
repoRoot,
|
|
682
|
-
...SDK_PACKAGE_PATHS[packageName]
|
|
683
|
-
);
|
|
684
|
-
const repoRange = readPackageVersion(packageJsonPath, packageName);
|
|
685
|
-
if (repoRange) {
|
|
686
|
-
return stripLocalSnapshotSuffix(repoRange);
|
|
687
|
-
}
|
|
688
|
-
} catch {
|
|
689
|
-
}
|
|
690
|
-
return DEFAULT_SDK_DEPENDENCY_RANGES[packageName];
|
|
691
|
-
}
|
|
692
697
|
function normalizeImportPath(relativePath) {
|
|
693
698
|
const normalized = relativePath.replaceAll("\\", "/");
|
|
694
699
|
if (normalized.startsWith(".")) return normalized;
|
|
695
700
|
return `./${normalized}`;
|
|
696
701
|
}
|
|
697
|
-
function
|
|
698
|
-
|
|
702
|
+
function toWorkspaceProjectPath(projectRoot, filePath) {
|
|
703
|
+
const relativePath = path.relative(path.resolve(projectRoot), path.resolve(filePath)).replaceAll(path.sep, "/");
|
|
704
|
+
const projectPath = normalizeOwnedProjectPath(relativePath);
|
|
705
|
+
if (projectPath === null) {
|
|
706
|
+
throw new Error(`Unsafe project path: ${relativePath}`);
|
|
707
|
+
}
|
|
708
|
+
return projectPath;
|
|
699
709
|
}
|
|
700
710
|
function summarizePaths(paths) {
|
|
701
711
|
const maxShown = 5;
|
|
@@ -708,7 +718,6 @@ export {
|
|
|
708
718
|
scaffoldStaticWorkspace,
|
|
709
719
|
assertCliStaticScaffoldComplete,
|
|
710
720
|
migrateLegacyScenarioImports,
|
|
711
|
-
resolveStaticAssetRoot
|
|
712
|
-
resolveSdkDependencyRange
|
|
721
|
+
resolveStaticAssetRoot
|
|
713
722
|
};
|
|
714
|
-
//# sourceMappingURL=chunk-
|
|
723
|
+
//# sourceMappingURL=chunk-JPN62WDY.mjs.map
|