@dreamboard-games/cli 0.1.30-alpha.1 → 0.1.30-alpha.3
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 +179 -22
- package/dist/agent-verifier/agent-workspace-verifier.mjs +30 -30
- package/dist/agent-verifier/agent-workspace-verifier.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-JH22JNYD.mjs → chunk-3UKQVWLV.mjs} +82 -19
- package/dist/agent-verifier/chunk-3UKQVWLV.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-4WD3YU2E.mjs → chunk-776W3UGV.mjs} +4 -3
- package/dist/agent-verifier/chunk-776W3UGV.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-CJEEA6NJ.mjs → chunk-7WWGFAAU.mjs} +9 -10
- package/dist/agent-verifier/chunk-7WWGFAAU.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-2SZHMP6F.mjs → chunk-A64ZZUZV.mjs} +6 -9
- package/dist/agent-verifier/chunk-A64ZZUZV.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-6A5HRJMQ.mjs → chunk-E7SSWJXJ.mjs} +62 -99
- package/dist/agent-verifier/chunk-E7SSWJXJ.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-2GBBP27W.mjs → chunk-F2DIOJJZ.mjs} +1 -0
- package/dist/agent-verifier/chunk-F2DIOJJZ.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-CFU5EWIC.mjs → chunk-G42BGGG2.mjs} +7 -6
- package/dist/agent-verifier/chunk-G42BGGG2.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-SHUMAVAP.mjs → chunk-H76MT5UR.mjs} +7 -9
- package/dist/agent-verifier/chunk-H76MT5UR.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-7E65UQLY.mjs → chunk-HGMUAL33.mjs} +3 -2
- package/dist/agent-verifier/chunk-HGMUAL33.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-LM3OZLZG.mjs → chunk-IAYRNVUC.mjs} +1 -0
- package/dist/agent-verifier/chunk-IAYRNVUC.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-VYJTHSYR.mjs → chunk-JGT4P4UD.mjs} +2 -1
- package/dist/agent-verifier/chunk-JGT4P4UD.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-CEDUHGNH.mjs → chunk-LUZ7KE6H.mjs} +8 -3
- package/dist/agent-verifier/chunk-LUZ7KE6H.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-2E5P5NWG.mjs → chunk-NAK77WXW.mjs} +58 -126
- package/dist/agent-verifier/chunk-NAK77WXW.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-SYPLYRGB.mjs → chunk-O4YCPU7C.mjs} +116 -15
- package/dist/agent-verifier/chunk-O4YCPU7C.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-BVVNBJM4.mjs → chunk-S34FRJHS.mjs} +2 -1
- package/dist/agent-verifier/chunk-S34FRJHS.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-HJFQDSTU.mjs → chunk-SH5JKYOB.mjs} +6 -5
- package/dist/agent-verifier/chunk-SH5JKYOB.mjs.map +1 -0
- package/dist/agent-verifier/chunk-SKI2ESE5.mjs +44 -0
- package/dist/agent-verifier/{chunk-MINCYHXN.mjs → chunk-TAEQKBJB.mjs} +1 -0
- package/dist/agent-verifier/chunk-TAEQKBJB.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-CEQ2VJWN.mjs → chunk-UIOLGH4A.mjs} +2 -1
- package/dist/agent-verifier/chunk-UIOLGH4A.mjs.map +1 -0
- package/dist/agent-verifier/chunk-UIZNWRM6.mjs +2432 -0
- package/dist/agent-verifier/chunk-UIZNWRM6.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-2QMNAVV4.mjs → chunk-VS573ERH.mjs} +2 -1
- package/dist/agent-verifier/chunk-VS573ERH.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-EOQIV6PS.mjs → chunk-W3N3QJ4V.mjs} +75 -100
- package/dist/agent-verifier/chunk-W3N3QJ4V.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-EIQWDQWJ.mjs → chunk-XGWCY624.mjs} +11 -12
- package/dist/agent-verifier/chunk-XGWCY624.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-7653FPGJ.mjs → chunk-XQXDOBYB.mjs} +3 -2
- package/dist/agent-verifier/chunk-XQXDOBYB.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-MRCUP5SW.mjs → chunk-YE7UAO3T.mjs} +1 -0
- package/dist/agent-verifier/chunk-YE7UAO3T.mjs.map +1 -0
- package/dist/agent-verifier/{chunk-RBDDIIPM.mjs → chunk-ZEELHSY3.mjs} +1 -0
- package/dist/agent-verifier/chunk-ZEELHSY3.mjs.map +1 -0
- package/dist/agent-verifier/{compile-5QSPIOUT.mjs → compile-TEQVA46V.mjs} +24 -25
- package/dist/agent-verifier/compile-TEQVA46V.mjs.map +1 -0
- package/dist/agent-verifier/{global-config-WX3ZZIVU.mjs → global-config-Y2NTSK4R.mjs} +6 -5
- package/dist/{keychain-backend-JHTXAKWC.js → agent-verifier/keychain-backend-SPQWGKZN.mjs} +2 -2
- package/dist/agent-verifier/keychain-backend-SPQWGKZN.mjs.map +1 -0
- package/dist/agent-verifier/{local-files-MTPLP62S.mjs → local-files-JFOQQZDL.mjs} +10 -11
- package/dist/agent-verifier/local-files-JFOQQZDL.mjs.map +1 -0
- package/dist/agent-verifier/local-typecheck-XVGWI75X.mjs +10 -0
- package/dist/agent-verifier/local-typecheck-XVGWI75X.mjs.map +1 -0
- package/dist/agent-verifier/{materialize-workspace-FKALAE2T.mjs → materialize-workspace-ZAVGQQSF.mjs} +17 -18
- package/dist/agent-verifier/materialize-workspace-ZAVGQQSF.mjs.map +1 -0
- package/dist/agent-verifier/{project-state-7GR6BQTQ.mjs → project-state-K576C2TE.mjs} +3 -2
- package/dist/agent-verifier/project-state-K576C2TE.mjs.map +1 -0
- package/dist/{prompt-GMZABCJC.js → agent-verifier/prompt-MJRJMOGQ.mjs} +2 -2
- package/dist/agent-verifier/prompt-MJRJMOGQ.mjs.map +1 -0
- package/dist/agent-verifier/{reducer-bundle-preflight-C73LEXI2.mjs → reducer-bundle-preflight-LXNJUBKL.mjs} +6 -9
- package/dist/agent-verifier/reducer-bundle-preflight-LXNJUBKL.mjs.map +1 -0
- package/dist/agent-verifier/reducer-contract-preflight-TUMQ43JV.mjs +11 -0
- package/dist/agent-verifier/reducer-contract-preflight-TUMQ43JV.mjs.map +1 -0
- package/dist/agent-verifier/{reducer-native-test-harness-GMWBUISX.mjs → reducer-native-test-harness-CHX5MBL5.mjs} +14 -17
- package/dist/agent-verifier/reducer-native-test-harness-CHX5MBL5.mjs.map +1 -0
- package/dist/agent-verifier/static-scaffold-R7SVDRQI.mjs +27 -0
- package/dist/agent-verifier/static-scaffold-R7SVDRQI.mjs.map +1 -0
- package/dist/agent-verifier/{sync-3DUQH32H.mjs → sync-THAI546U.mjs} +31 -37
- package/dist/agent-verifier/sync-THAI546U.mjs.map +1 -0
- package/dist/agent-verifier/{test-P4U5INTD.mjs → test-AFAQFKOB.mjs} +28 -31
- package/dist/agent-verifier/test-AFAQFKOB.mjs.map +1 -0
- package/dist/agent-verifier/workspace-codegen-2ZMQRIKJ.mjs +10 -0
- package/dist/agent-verifier/workspace-codegen-2ZMQRIKJ.mjs.map +1 -0
- package/dist/agent-verifier/{workspace-dependencies-HZ6VVS4G.mjs → workspace-dependencies-NOOQBK6I.mjs} +5 -4
- package/dist/agent-verifier/workspace-dependencies-NOOQBK6I.mjs.map +1 -0
- package/dist/{chunk-C6UAT6EH.js → chunk-N7XPNNUI.js} +9 -12
- package/dist/chunk-N7XPNNUI.js.map +1 -0
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/chunk-SEGVTWSK.js.map +1 -0
- package/dist/{chunk-RS7UXJZV.js → chunk-TAQKH67O.js} +21300 -35881
- package/dist/chunk-TAQKH67O.js.map +1 -0
- package/dist/{global-config-AGFBDFYD.js → global-config-S4ZIPECE.js} +3 -3
- package/dist/global-config-S4ZIPECE.js.map +1 -0
- package/dist/index.js +415 -37
- package/dist/index.js.map +1 -1
- package/dist/internal.js +3 -4
- package/dist/{agent-verifier/keychain-backend-TNOPQV3Z.mjs → keychain-backend-HDF4TZDL.js} +2 -1
- package/dist/{agent-verifier/prompt-3BAINGAQ.mjs → prompt-NDV3AE5L.js} +2 -1
- package/package.json +8 -7
- package/skills/dreamboard/references/building-your-first-game.md +510 -0
- package/skills/dreamboard/references/cli.md +104 -0
- package/skills/dreamboard/references/game-interface.md +548 -0
- package/skills/dreamboard/references/manifest-authoring.md +597 -0
- package/skills/dreamboard/references/quickstart.md +66 -0
- package/skills/dreamboard/references/reducer.md +864 -0
- package/skills/dreamboard/references/rule-authoring.md +147 -0
- package/skills/dreamboard/references/testing.md +249 -0
- package/skills/dreamboard/scripts/events-extract.mjs +218 -0
- package/dist/agent-verifier/chunk-54TAYXUD.mjs +0 -12
- package/dist/agent-verifier/chunk-6UUJEYDV.mjs +0 -213
- package/dist/agent-verifier/chunk-HBNDKQT5.mjs +0 -8381
- package/dist/agent-verifier/chunk-LI3ZR3BI.mjs +0 -41
- package/dist/agent-verifier/chunk-U6OJN7XS.mjs +0 -8092
- package/dist/agent-verifier/chunk-XYDL7GY6.mjs +0 -10
- package/dist/agent-verifier/local-typecheck-QFYYAZOK.mjs +0 -9
- package/dist/agent-verifier/reducer-contract-preflight-22X7DSZW.mjs +0 -10
- package/dist/agent-verifier/static-scaffold-AJMZZQWS.mjs +0 -28
- package/dist/agent-verifier/testing-5K2BJYF2.mjs +0 -674
- package/dist/agent-verifier/workspace-codegen-JDZJRSDV.mjs +0 -11
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-7FOO4AJI.js +0 -50
- package/dist/chunk-7FOO4AJI.js.map +0 -1
- package/dist/chunk-C6UAT6EH.js.map +0 -1
- package/dist/chunk-RS7UXJZV.js.map +0 -1
- package/dist/internal.d.ts +0 -311
- package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +0 -71
- package/dist/runtime-packages/ui-host-runtime/src/browser-interaction.ts +0 -139
- package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +0 -374
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +0 -266
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +0 -212
- package/dist/runtime-packages/ui-host-runtime/src/components/host-primitives.tsx +0 -271
- package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +0 -135
- package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +0 -5
- package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +0 -194
- package/dist/runtime-packages/ui-host-runtime/src/gameplay-authority-transport.ts +0 -626
- package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +0 -294
- package/dist/runtime-packages/ui-host-runtime/src/index.ts +0 -3
- package/dist/runtime-packages/ui-host-runtime/src/logger.ts +0 -11
- package/dist/runtime-packages/ui-host-runtime/src/perf.ts +0 -324
- package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +0 -195
- package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +0 -138
- package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +0 -159
- package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +0 -551
- package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +0 -13
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +0 -122
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +0 -26
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +0 -583
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +0 -219
- package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +0 -117
- package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +0 -431
- package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +0 -211
- package/dist/runtime-packages/ui-host-runtime/src/session-recovery.ts +0 -80
- package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +0 -1034
- package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +0 -416
- package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +0 -184
- package/dist/testing-KLSV6CPJ.js +0 -674
- package/dist/testing-KLSV6CPJ.js.map +0 -1
- /package/dist/{chunk-2H7UOFLK.js.map → agent-verifier/chunk-SKI2ESE5.mjs.map} +0 -0
- /package/dist/{global-config-AGFBDFYD.js.map → agent-verifier/global-config-Y2NTSK4R.mjs.map} +0 -0
- /package/dist/{keychain-backend-JHTXAKWC.js.map → keychain-backend-HDF4TZDL.js.map} +0 -0
- /package/dist/{prompt-GMZABCJC.js.map → prompt-NDV3AE5L.js.map} +0 -0
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getGlobalConfigPath,
|
|
5
5
|
loadGlobalConfig,
|
|
6
6
|
saveGlobalConfig
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-N7XPNNUI.js";
|
|
8
|
+
import "./chunk-SEGVTWSK.js";
|
|
9
9
|
export {
|
|
10
10
|
getGlobalAuthPath,
|
|
11
11
|
getGlobalConfigPath,
|
|
12
12
|
loadGlobalConfig,
|
|
13
13
|
saveGlobalConfig
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=global-config-
|
|
15
|
+
//# sourceMappingURL=global-config-S4ZIPECE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -13,13 +13,14 @@ import {
|
|
|
13
13
|
collectLocalFiles,
|
|
14
14
|
computeManifestHash,
|
|
15
15
|
configureClient,
|
|
16
|
-
|
|
16
|
+
createGameRevision,
|
|
17
17
|
createPkcePair,
|
|
18
|
-
|
|
18
|
+
createProjectSession,
|
|
19
|
+
createProjectSourceBlobUploadSession,
|
|
19
20
|
createSessionFromScenario,
|
|
20
21
|
didLocalMaintainerSnapshotChange,
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
ensureProject,
|
|
23
|
+
ensureProjectDevCompile,
|
|
23
24
|
exchangeClerkOAuthCode,
|
|
24
25
|
external_exports,
|
|
25
26
|
findProjectCompiledResultsForRevision,
|
|
@@ -29,36 +30,32 @@ import {
|
|
|
29
30
|
getApiVersion,
|
|
30
31
|
getAuthTokenExpiry,
|
|
31
32
|
getCliErrorExitCode,
|
|
33
|
+
getCurrentAuthUser,
|
|
32
34
|
getLocalDiff,
|
|
33
35
|
getProjectAuthoringState,
|
|
34
|
-
|
|
36
|
+
getProjectBySlug,
|
|
35
37
|
getProjectCompileState,
|
|
36
38
|
getProjectCompiledResultSdk,
|
|
37
39
|
getProjectLocalMaintainerRegistry,
|
|
38
40
|
getProjectPendingAuthoringSync,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
getProjectRevisionSources,
|
|
42
|
+
getProjectSources,
|
|
41
43
|
getSessionEventBatch,
|
|
42
44
|
getSessionSnapshot,
|
|
43
45
|
importTypeScriptModule,
|
|
44
46
|
isAllowedGamePath,
|
|
45
|
-
isAuthoritativeGeneratedPath,
|
|
46
47
|
isDreamboardApiError,
|
|
48
|
+
isDynamicGeneratedPath,
|
|
47
49
|
isDynamicSeedPath,
|
|
48
50
|
isLibraryPath,
|
|
49
51
|
isLocalMaintainerRegistryEnabled,
|
|
50
|
-
isPerPlayer,
|
|
51
52
|
isReducerNativeTestingWorkspace,
|
|
52
53
|
isStaleContractArtifactError,
|
|
53
54
|
isStaleContractArtifactMessage,
|
|
54
55
|
loadManifest,
|
|
55
56
|
loadProjectConfig,
|
|
56
|
-
loadRemoteProjectIdentity,
|
|
57
57
|
loadRule,
|
|
58
|
-
mapUpsertBlobContentsByContentHash,
|
|
59
58
|
materializeManifest,
|
|
60
|
-
materializeManifestTable,
|
|
61
|
-
materializeSourceChangeOperations,
|
|
62
59
|
normalizeSlug,
|
|
63
60
|
parseAuthCommandArgs,
|
|
64
61
|
parseCloneCommandArgs,
|
|
@@ -75,7 +72,6 @@ import {
|
|
|
75
72
|
parseQueryCommandArgs,
|
|
76
73
|
parseStatusCommandArgs,
|
|
77
74
|
parseSyncCommandArgs,
|
|
78
|
-
perPlayerSchema,
|
|
79
75
|
projectIdFromSessionGameSource,
|
|
80
76
|
queryWorkshopRulebook,
|
|
81
77
|
queueProjectRevisionCompileSdk,
|
|
@@ -91,13 +87,13 @@ import {
|
|
|
91
87
|
setLatestCompileAttempt,
|
|
92
88
|
shortHash,
|
|
93
89
|
submitGameplayAuthorityAction,
|
|
90
|
+
titleFromSlug,
|
|
94
91
|
toApiProblem,
|
|
95
92
|
toDreamboardApiError,
|
|
96
93
|
updateProjectAuthoringState,
|
|
97
94
|
updateProjectLocalMaintainerRegistry,
|
|
98
95
|
updateProjectState,
|
|
99
|
-
|
|
100
|
-
uploadProjectSourceBlobsSdk,
|
|
96
|
+
uploadInitialProjection,
|
|
101
97
|
valueOrUndefined,
|
|
102
98
|
waitForCompiledResultJobSdk,
|
|
103
99
|
writeManifest,
|
|
@@ -105,7 +101,7 @@ import {
|
|
|
105
101
|
writeSnapshot,
|
|
106
102
|
writeSnapshotFromFiles,
|
|
107
103
|
writeSourceFiles
|
|
108
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-TAQKH67O.js";
|
|
109
105
|
import {
|
|
110
106
|
DEFAULT_LOGIN_TIMEOUT_MS,
|
|
111
107
|
DEFAULT_WEB_BASE_URL,
|
|
@@ -130,12 +126,11 @@ import {
|
|
|
130
126
|
setCredentials,
|
|
131
127
|
writeJsonFile,
|
|
132
128
|
writeTextFile
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import "./chunk-
|
|
135
|
-
import "./chunk-2H7UOFLK.js";
|
|
129
|
+
} from "./chunk-N7XPNNUI.js";
|
|
130
|
+
import "./chunk-SEGVTWSK.js";
|
|
136
131
|
|
|
137
132
|
// src/commands/auth.ts
|
|
138
|
-
import
|
|
133
|
+
import crypto2 from "crypto";
|
|
139
134
|
|
|
140
135
|
// ../../node_modules/.pnpm/citty@0.2.2/node_modules/citty/dist/_chunks/libs/scule.mjs
|
|
141
136
|
var NUMBER_CHAR_RE = /\d/;
|
|
@@ -1686,7 +1681,7 @@ function createConsola2(options = {}) {
|
|
|
1686
1681
|
defaults: { level },
|
|
1687
1682
|
stdout: process.stdout,
|
|
1688
1683
|
stderr: process.stderr,
|
|
1689
|
-
prompt: (...args) => import("./prompt-
|
|
1684
|
+
prompt: (...args) => import("./prompt-NDV3AE5L.js").then((m) => m.prompt(...args)),
|
|
1690
1685
|
reporters: options.reporters || [
|
|
1691
1686
|
options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()
|
|
1692
1687
|
],
|
|
@@ -1867,7 +1862,7 @@ function openBrowser(url) {
|
|
|
1867
1862
|
|
|
1868
1863
|
// src/commands/auth.ts
|
|
1869
1864
|
async function loginWithBrowser(config, quiet) {
|
|
1870
|
-
const state =
|
|
1865
|
+
const state = crypto2.randomUUID();
|
|
1871
1866
|
const pkce = createPkcePair();
|
|
1872
1867
|
const server = await startOAuthCallbackServer(
|
|
1873
1868
|
state,
|
|
@@ -2207,6 +2202,340 @@ var query_default = defineCommand({
|
|
|
2207
2202
|
// src/commands/clone.ts
|
|
2208
2203
|
import path5 from "path";
|
|
2209
2204
|
|
|
2205
|
+
// src/services/api/project-api.ts
|
|
2206
|
+
async function loadRemoteProjectIdentity() {
|
|
2207
|
+
const [versionResponse, userResponse] = await Promise.all([
|
|
2208
|
+
getApiVersion(),
|
|
2209
|
+
getCurrentAuthUser()
|
|
2210
|
+
]);
|
|
2211
|
+
if (versionResponse.error || !versionResponse.data) {
|
|
2212
|
+
throw toDreamboardApiError(
|
|
2213
|
+
versionResponse.error,
|
|
2214
|
+
versionResponse.response,
|
|
2215
|
+
"Failed to resolve backend deployment identity"
|
|
2216
|
+
);
|
|
2217
|
+
}
|
|
2218
|
+
if (userResponse.error || !userResponse.data) {
|
|
2219
|
+
throw toDreamboardApiError(
|
|
2220
|
+
userResponse.error,
|
|
2221
|
+
userResponse.response,
|
|
2222
|
+
"Failed to resolve authenticated owner scope"
|
|
2223
|
+
);
|
|
2224
|
+
}
|
|
2225
|
+
const deploymentId = versionResponse.data.deploymentId;
|
|
2226
|
+
const ownerScopeId = userResponse.data.ownerScopeId;
|
|
2227
|
+
return {
|
|
2228
|
+
deploymentId,
|
|
2229
|
+
ownerScopeId,
|
|
2230
|
+
bindingKey: `${deploymentId}:${ownerScopeId}`
|
|
2231
|
+
};
|
|
2232
|
+
}
|
|
2233
|
+
async function ensureProjectSdk(options) {
|
|
2234
|
+
const { data, error, response } = await ensureProject({
|
|
2235
|
+
path: { projectId: options.projectId },
|
|
2236
|
+
body: {
|
|
2237
|
+
slug: options.slug,
|
|
2238
|
+
name: titleFromSlug(options.slug),
|
|
2239
|
+
description: options.description ?? `Dreamboard workspace for ${options.slug}.`,
|
|
2240
|
+
...options.updateAlias ? { updateAlias: true } : {}
|
|
2241
|
+
}
|
|
2242
|
+
});
|
|
2243
|
+
if (error || !data) {
|
|
2244
|
+
throw toDreamboardApiError(error, response, "Failed to ensure project");
|
|
2245
|
+
}
|
|
2246
|
+
return data;
|
|
2247
|
+
}
|
|
2248
|
+
async function getProjectBySlugSdk(slug) {
|
|
2249
|
+
const { data, error, response } = await getProjectBySlug({
|
|
2250
|
+
path: { slug }
|
|
2251
|
+
});
|
|
2252
|
+
if (error || !data) {
|
|
2253
|
+
throw toDreamboardApiError(
|
|
2254
|
+
error,
|
|
2255
|
+
response,
|
|
2256
|
+
`Project '${slug}' not found`
|
|
2257
|
+
);
|
|
2258
|
+
}
|
|
2259
|
+
return data;
|
|
2260
|
+
}
|
|
2261
|
+
async function createGameRevisionSdk(options) {
|
|
2262
|
+
const { data, error, response } = await createGameRevision({
|
|
2263
|
+
path: { projectId: options.projectId },
|
|
2264
|
+
body: options.request
|
|
2265
|
+
});
|
|
2266
|
+
if (error || !data) {
|
|
2267
|
+
throw toDreamboardApiError(
|
|
2268
|
+
error,
|
|
2269
|
+
response,
|
|
2270
|
+
"Failed to create game revision"
|
|
2271
|
+
);
|
|
2272
|
+
}
|
|
2273
|
+
return data;
|
|
2274
|
+
}
|
|
2275
|
+
async function getProjectSourcesSdk(projectId) {
|
|
2276
|
+
const { data, error, response } = await getProjectSources({
|
|
2277
|
+
path: { projectId }
|
|
2278
|
+
});
|
|
2279
|
+
if (response?.status === 404) {
|
|
2280
|
+
return null;
|
|
2281
|
+
}
|
|
2282
|
+
if (error || !data) {
|
|
2283
|
+
throw toDreamboardApiError(
|
|
2284
|
+
error,
|
|
2285
|
+
response,
|
|
2286
|
+
"Failed to fetch project sources"
|
|
2287
|
+
);
|
|
2288
|
+
}
|
|
2289
|
+
return data;
|
|
2290
|
+
}
|
|
2291
|
+
async function getProjectRevisionSourcesSdk(options) {
|
|
2292
|
+
const { data, error, response } = await getProjectRevisionSources({
|
|
2293
|
+
path: {
|
|
2294
|
+
projectId: options.projectId,
|
|
2295
|
+
revisionDigest: options.revisionDigest
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
if (error || !data) {
|
|
2299
|
+
throw toDreamboardApiError(
|
|
2300
|
+
error,
|
|
2301
|
+
response,
|
|
2302
|
+
"Failed to fetch project revision sources"
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
return data;
|
|
2306
|
+
}
|
|
2307
|
+
async function ensureProjectDevCompileSdk(options) {
|
|
2308
|
+
const { data, error, response } = await ensureProjectDevCompile({
|
|
2309
|
+
path: { projectId: options.projectId },
|
|
2310
|
+
body: options.request
|
|
2311
|
+
});
|
|
2312
|
+
if (error || !data) {
|
|
2313
|
+
throw toDreamboardApiError(error, response, "Failed to ensure dev compile");
|
|
2314
|
+
}
|
|
2315
|
+
return data;
|
|
2316
|
+
}
|
|
2317
|
+
async function createProjectSessionSdk(options) {
|
|
2318
|
+
const { data, error, response } = await createProjectSession({
|
|
2319
|
+
path: { projectId: options.projectId },
|
|
2320
|
+
body: options.request
|
|
2321
|
+
});
|
|
2322
|
+
if (error || !data) {
|
|
2323
|
+
throw toDreamboardApiError(error, response, "Failed to create session");
|
|
2324
|
+
}
|
|
2325
|
+
return data;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
// src/services/api/preview-api.ts
|
|
2329
|
+
async function uploadInitialProjectionSdk(gameId, projectionJson) {
|
|
2330
|
+
const { error, response } = await uploadInitialProjection({
|
|
2331
|
+
path: { gameId },
|
|
2332
|
+
body: { projectionJson }
|
|
2333
|
+
});
|
|
2334
|
+
if (error) {
|
|
2335
|
+
throw toDreamboardApiError(
|
|
2336
|
+
error,
|
|
2337
|
+
response,
|
|
2338
|
+
"Failed to upload initial preview projection"
|
|
2339
|
+
);
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
// ../../packages/api-client/dist/source-revisions.js
|
|
2344
|
+
var textEncoder = new TextEncoder();
|
|
2345
|
+
function bytesToHex(bytes) {
|
|
2346
|
+
return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2347
|
+
}
|
|
2348
|
+
async function sha256Hex(bytes) {
|
|
2349
|
+
const normalizedBytes = new Uint8Array(bytes.byteLength);
|
|
2350
|
+
normalizedBytes.set(bytes);
|
|
2351
|
+
const digest = await crypto.subtle.digest("SHA-256", normalizedBytes.buffer);
|
|
2352
|
+
return bytesToHex(new Uint8Array(digest));
|
|
2353
|
+
}
|
|
2354
|
+
function getUtf8ByteSize(content) {
|
|
2355
|
+
return textEncoder.encode(content).byteLength;
|
|
2356
|
+
}
|
|
2357
|
+
async function computeSourceContentHash(content) {
|
|
2358
|
+
return sha256Hex(textEncoder.encode(content));
|
|
2359
|
+
}
|
|
2360
|
+
async function describeSourceBlob(content) {
|
|
2361
|
+
return {
|
|
2362
|
+
contentHash: await computeSourceContentHash(content),
|
|
2363
|
+
byteSize: getUtf8ByteSize(content)
|
|
2364
|
+
};
|
|
2365
|
+
}
|
|
2366
|
+
async function materializeSourceChangeOperations(changes) {
|
|
2367
|
+
const blobsByHash = /* @__PURE__ */ new Map();
|
|
2368
|
+
const materialized = await Promise.all(Array.from(changes, async (change) => {
|
|
2369
|
+
if (change.kind === "delete") {
|
|
2370
|
+
return change;
|
|
2371
|
+
}
|
|
2372
|
+
const blob = await describeSourceBlob(change.content);
|
|
2373
|
+
const existing = blobsByHash.get(blob.contentHash);
|
|
2374
|
+
if (!existing) {
|
|
2375
|
+
blobsByHash.set(blob.contentHash, blob);
|
|
2376
|
+
}
|
|
2377
|
+
return {
|
|
2378
|
+
kind: "upsert",
|
|
2379
|
+
path: change.path,
|
|
2380
|
+
contentHash: blob.contentHash,
|
|
2381
|
+
byteSize: blob.byteSize
|
|
2382
|
+
};
|
|
2383
|
+
}));
|
|
2384
|
+
return {
|
|
2385
|
+
blobs: Array.from(blobsByHash.values()).sort((left, right) => left.contentHash.localeCompare(right.contentHash)),
|
|
2386
|
+
changes: materialized
|
|
2387
|
+
};
|
|
2388
|
+
}
|
|
2389
|
+
function mapUpsertBlobContentsByContentHash(localChanges, materializedChanges) {
|
|
2390
|
+
const uploadBlobs = /* @__PURE__ */ new Map();
|
|
2391
|
+
const length = Math.min(localChanges.length, materializedChanges.length);
|
|
2392
|
+
for (let index = 0; index < length; index += 1) {
|
|
2393
|
+
const localChange = localChanges[index];
|
|
2394
|
+
const materializedChange = materializedChanges[index];
|
|
2395
|
+
if (localChange?.kind !== "upsert" || materializedChange?.kind !== "upsert") {
|
|
2396
|
+
continue;
|
|
2397
|
+
}
|
|
2398
|
+
uploadBlobs.set(materializedChange.contentHash, {
|
|
2399
|
+
contentHash: materializedChange.contentHash,
|
|
2400
|
+
byteSize: materializedChange.byteSize,
|
|
2401
|
+
content: localChange.content
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
return uploadBlobs;
|
|
2405
|
+
}
|
|
2406
|
+
var SourceBlobUploadError = class extends Error {
|
|
2407
|
+
constructor(status, details) {
|
|
2408
|
+
const suffix = details.trim().length > 0 ? `: ${details.trim()}` : "";
|
|
2409
|
+
super(`Failed to upload source blob (HTTP ${status}${suffix})`);
|
|
2410
|
+
this.name = "SourceBlobUploadError";
|
|
2411
|
+
this.status = status;
|
|
2412
|
+
this.details = details;
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
function isDuplicateDirectUploadError(error) {
|
|
2416
|
+
if (!(error instanceof SourceBlobUploadError)) {
|
|
2417
|
+
return false;
|
|
2418
|
+
}
|
|
2419
|
+
if (error.status === 409) {
|
|
2420
|
+
return true;
|
|
2421
|
+
}
|
|
2422
|
+
const normalizedDetails = error.details.toLowerCase();
|
|
2423
|
+
return normalizedDetails.includes("duplicate") || normalizedDetails.includes("already exists") || normalizedDetails.includes("resource already exists");
|
|
2424
|
+
}
|
|
2425
|
+
async function uploadSourceBlob(uploadTarget, content) {
|
|
2426
|
+
const response = await fetch(uploadTarget.url, {
|
|
2427
|
+
method: uploadTarget.method,
|
|
2428
|
+
headers: uploadTarget.headers,
|
|
2429
|
+
body: textEncoder.encode(content)
|
|
2430
|
+
});
|
|
2431
|
+
if (response.ok) {
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
const details = await response.text().catch(() => "");
|
|
2435
|
+
throw new SourceBlobUploadError(response.status, details);
|
|
2436
|
+
}
|
|
2437
|
+
var SourceBlobSessionRequestError = class extends Error {
|
|
2438
|
+
constructor(message, apiError, response) {
|
|
2439
|
+
super(message);
|
|
2440
|
+
this.name = "SourceBlobSessionRequestError";
|
|
2441
|
+
this.apiError = apiError;
|
|
2442
|
+
this.response = response;
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2445
|
+
function assertSourceBlobUploadSession(data, response) {
|
|
2446
|
+
if (!data || typeof data !== "object" || !Array.isArray(data.uploads)) {
|
|
2447
|
+
throw new SourceBlobSessionRequestError("Source blob upload session response did not include an uploads array", data, response);
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
async function confirmSourceBlobAlreadyExists(options) {
|
|
2451
|
+
const { requestUploadSession, blob } = options;
|
|
2452
|
+
const { data, error, response } = await requestUploadSession([
|
|
2453
|
+
{
|
|
2454
|
+
contentHash: blob.contentHash,
|
|
2455
|
+
byteSize: blob.byteSize
|
|
2456
|
+
}
|
|
2457
|
+
]);
|
|
2458
|
+
if (error || !data) {
|
|
2459
|
+
throw new SourceBlobSessionRequestError("Failed to create source blob upload session", error, response);
|
|
2460
|
+
}
|
|
2461
|
+
assertSourceBlobUploadSession(data, response);
|
|
2462
|
+
return data.uploads[0]?.status === "exists";
|
|
2463
|
+
}
|
|
2464
|
+
async function uploadSourceBlobs(options) {
|
|
2465
|
+
const { blobs, requestUploadSession } = options;
|
|
2466
|
+
const uniqueBlobs = /* @__PURE__ */ new Map();
|
|
2467
|
+
for (const blob of blobs) {
|
|
2468
|
+
const existing = uniqueBlobs.get(blob.contentHash);
|
|
2469
|
+
if (!existing) {
|
|
2470
|
+
uniqueBlobs.set(blob.contentHash, blob);
|
|
2471
|
+
continue;
|
|
2472
|
+
}
|
|
2473
|
+
if (existing.byteSize !== blob.byteSize) {
|
|
2474
|
+
throw new Error(`Source blob ${blob.contentHash} has conflicting byte sizes.`);
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
if (uniqueBlobs.size === 0) {
|
|
2478
|
+
return;
|
|
2479
|
+
}
|
|
2480
|
+
const { data, error, response } = await requestUploadSession(Array.from(uniqueBlobs.values(), ({ contentHash, byteSize }) => ({
|
|
2481
|
+
contentHash,
|
|
2482
|
+
byteSize
|
|
2483
|
+
})));
|
|
2484
|
+
if (error || !data) {
|
|
2485
|
+
throw new SourceBlobSessionRequestError("Failed to create source blob upload session", error, response);
|
|
2486
|
+
}
|
|
2487
|
+
assertSourceBlobUploadSession(data, response);
|
|
2488
|
+
for (const upload of data.uploads) {
|
|
2489
|
+
if (upload.status !== "upload_required") {
|
|
2490
|
+
continue;
|
|
2491
|
+
}
|
|
2492
|
+
const blob = uniqueBlobs.get(upload.contentHash);
|
|
2493
|
+
if (!blob) {
|
|
2494
|
+
throw new Error(`Upload session referenced unknown source blob ${upload.contentHash}.`);
|
|
2495
|
+
}
|
|
2496
|
+
if (!upload.uploadTarget) {
|
|
2497
|
+
throw new Error(`Upload target missing for source blob ${upload.contentHash}.`);
|
|
2498
|
+
}
|
|
2499
|
+
try {
|
|
2500
|
+
await uploadSourceBlob(upload.uploadTarget, blob.content);
|
|
2501
|
+
if (!await confirmSourceBlobAlreadyExists({ requestUploadSession, blob })) {
|
|
2502
|
+
throw new Error(`Source blob ${blob.contentHash} was uploaded but not registered.`);
|
|
2503
|
+
}
|
|
2504
|
+
} catch (error2) {
|
|
2505
|
+
if (isDuplicateDirectUploadError(error2) && await confirmSourceBlobAlreadyExists({ requestUploadSession, blob })) {
|
|
2506
|
+
continue;
|
|
2507
|
+
}
|
|
2508
|
+
throw error2;
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
async function uploadProjectSourceBlobs(options) {
|
|
2513
|
+
const { projectId, blobs } = options;
|
|
2514
|
+
return uploadSourceBlobs({
|
|
2515
|
+
blobs,
|
|
2516
|
+
requestUploadSession: (uploadBlobs) => createProjectSourceBlobUploadSession({
|
|
2517
|
+
path: { projectId },
|
|
2518
|
+
body: { blobs: uploadBlobs }
|
|
2519
|
+
})
|
|
2520
|
+
});
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
// src/services/api/source-revisions-api.ts
|
|
2524
|
+
async function uploadProjectSourceBlobsSdk(projectId, blobs) {
|
|
2525
|
+
try {
|
|
2526
|
+
await uploadProjectSourceBlobs({ projectId, blobs });
|
|
2527
|
+
} catch (error) {
|
|
2528
|
+
if (error instanceof SourceBlobSessionRequestError) {
|
|
2529
|
+
throw toDreamboardApiError(
|
|
2530
|
+
error.apiError,
|
|
2531
|
+
error.response,
|
|
2532
|
+
error.message
|
|
2533
|
+
);
|
|
2534
|
+
}
|
|
2535
|
+
throw error;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2210
2539
|
// src/services/project/static-scaffold.ts
|
|
2211
2540
|
import { existsSync, readFileSync } from "fs";
|
|
2212
2541
|
import { readdir, readFile, rm, rmdir, unlink } from "fs/promises";
|
|
@@ -2913,7 +3242,7 @@ import { unlink as unlink2 } from "fs/promises";
|
|
|
2913
3242
|
import path3 from "path";
|
|
2914
3243
|
|
|
2915
3244
|
// src/services/project/workspace-dependencies.ts
|
|
2916
|
-
import
|
|
3245
|
+
import crypto3 from "crypto";
|
|
2917
3246
|
import { spawn as spawn2 } from "child_process";
|
|
2918
3247
|
import "events";
|
|
2919
3248
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -3173,7 +3502,7 @@ async function readRepoPackageManager() {
|
|
|
3173
3502
|
return hasExactPnpmVersion(packageManager) ? packageManager : DEFAULT_PACKAGE_MANAGER;
|
|
3174
3503
|
}
|
|
3175
3504
|
function fingerprintContent(parts) {
|
|
3176
|
-
return
|
|
3505
|
+
return crypto3.createHash("sha256").update(parts.join("\n---\n")).digest("hex");
|
|
3177
3506
|
}
|
|
3178
3507
|
function resolvePnpmInstallInvocation(installArgs) {
|
|
3179
3508
|
const corepackPath = path2.join(path2.dirname(process.execPath), "corepack");
|
|
@@ -3840,6 +4169,10 @@ async function buildSourceDependencyProfile(options) {
|
|
|
3840
4169
|
}
|
|
3841
4170
|
async function assertCompilerPortableDependencies(options) {
|
|
3842
4171
|
const packageJson = await readProjectPackageJson(options.projectRoot);
|
|
4172
|
+
const legacyProblems = collectLegacyDreamboardSpecifiers(packageJson);
|
|
4173
|
+
if (legacyProblems.length > 0) {
|
|
4174
|
+
throwLegacyDreamboardPackageError(legacyProblems);
|
|
4175
|
+
}
|
|
3843
4176
|
const problems = collectUnportableDreamboardSpecifiers(packageJson);
|
|
3844
4177
|
if (problems.length > 0) {
|
|
3845
4178
|
const details = problems.map(
|
|
@@ -3849,7 +4182,7 @@ async function assertCompilerPortableDependencies(options) {
|
|
|
3849
4182
|
[
|
|
3850
4183
|
"Compiler-bound workspaces must install Dreamboard packages from a registry.",
|
|
3851
4184
|
`Found unportable Dreamboard dependency specifier(s): ${details}.`,
|
|
3852
|
-
"Run `dreamboard sync` from a workspace that uses registry-pinned @dreamboard/* and dreamboard versions before compiling."
|
|
4185
|
+
"Run `dreamboard sync` from a workspace that uses registry-pinned @dreamboard-games/* and dreamboard versions before compiling."
|
|
3853
4186
|
].join(" ")
|
|
3854
4187
|
);
|
|
3855
4188
|
}
|
|
@@ -3865,6 +4198,11 @@ async function assertCompilerPortableDependencies(options) {
|
|
|
3865
4198
|
return profile;
|
|
3866
4199
|
}
|
|
3867
4200
|
async function assertReleaseEnvironmentPortableDependencies(options) {
|
|
4201
|
+
const packageJson = await readProjectPackageJson(options.projectRoot);
|
|
4202
|
+
const legacyProblems = collectLegacyDreamboardSpecifiers(packageJson);
|
|
4203
|
+
if (legacyProblems.length > 0) {
|
|
4204
|
+
throwLegacyDreamboardPackageError(legacyProblems);
|
|
4205
|
+
}
|
|
3868
4206
|
const profile = await buildSourceDependencyProfile(options);
|
|
3869
4207
|
if (!isReleaseEnvironment(options.environment)) {
|
|
3870
4208
|
return profile;
|
|
@@ -3898,7 +4236,7 @@ function collectDreamboardPackageSpecifiers(packageJson) {
|
|
|
3898
4236
|
const dependencies = packageJson[field];
|
|
3899
4237
|
if (!dependencies) continue;
|
|
3900
4238
|
for (const [packageName, specifier] of Object.entries(dependencies)) {
|
|
3901
|
-
if (
|
|
4239
|
+
if (isPortableDreamboardPackage(packageName)) {
|
|
3902
4240
|
packages[packageName] = specifier;
|
|
3903
4241
|
}
|
|
3904
4242
|
}
|
|
@@ -3906,7 +4244,7 @@ function collectDreamboardPackageSpecifiers(packageJson) {
|
|
|
3906
4244
|
const overrides = packageJson.pnpm?.overrides;
|
|
3907
4245
|
if (overrides) {
|
|
3908
4246
|
for (const [packageName, specifier] of Object.entries(overrides)) {
|
|
3909
|
-
if (
|
|
4247
|
+
if (isPortableDreamboardPackage(packageName) && typeof specifier === "string" && packages[packageName] === void 0) {
|
|
3910
4248
|
packages[packageName] = specifier;
|
|
3911
4249
|
}
|
|
3912
4250
|
}
|
|
@@ -3919,7 +4257,7 @@ function collectUnportableDreamboardSpecifiers(packageJson) {
|
|
|
3919
4257
|
const dependencies = packageJson[field];
|
|
3920
4258
|
if (!dependencies) continue;
|
|
3921
4259
|
for (const [packageName, specifier] of Object.entries(dependencies)) {
|
|
3922
|
-
if (
|
|
4260
|
+
if (isPortableDreamboardPackage(packageName) && UNPORTABLE_SPECIFIER_PATTERN.test(specifier)) {
|
|
3923
4261
|
problems.push({ location: field, packageName, specifier });
|
|
3924
4262
|
}
|
|
3925
4263
|
}
|
|
@@ -3927,7 +4265,7 @@ function collectUnportableDreamboardSpecifiers(packageJson) {
|
|
|
3927
4265
|
const overrides = packageJson.pnpm?.overrides;
|
|
3928
4266
|
if (overrides) {
|
|
3929
4267
|
for (const [packageName, specifier] of Object.entries(overrides)) {
|
|
3930
|
-
if (
|
|
4268
|
+
if (isPortableDreamboardPackage(packageName) && typeof specifier === "string" && UNPORTABLE_SPECIFIER_PATTERN.test(specifier)) {
|
|
3931
4269
|
problems.push({
|
|
3932
4270
|
location: "pnpm.overrides",
|
|
3933
4271
|
packageName,
|
|
@@ -3938,8 +4276,42 @@ function collectUnportableDreamboardSpecifiers(packageJson) {
|
|
|
3938
4276
|
}
|
|
3939
4277
|
return problems;
|
|
3940
4278
|
}
|
|
3941
|
-
function
|
|
3942
|
-
|
|
4279
|
+
function collectLegacyDreamboardSpecifiers(packageJson) {
|
|
4280
|
+
const problems = [];
|
|
4281
|
+
for (const field of DEPENDENCY_FIELDS) {
|
|
4282
|
+
const dependencies = packageJson[field];
|
|
4283
|
+
if (!dependencies) continue;
|
|
4284
|
+
for (const packageName of Object.keys(dependencies)) {
|
|
4285
|
+
if (isLegacyDreamboardPackage(packageName)) {
|
|
4286
|
+
problems.push({ location: field, packageName });
|
|
4287
|
+
}
|
|
4288
|
+
}
|
|
4289
|
+
}
|
|
4290
|
+
const overrides = packageJson.pnpm?.overrides;
|
|
4291
|
+
if (overrides) {
|
|
4292
|
+
for (const packageName of Object.keys(overrides)) {
|
|
4293
|
+
if (isLegacyDreamboardPackage(packageName)) {
|
|
4294
|
+
problems.push({ location: "pnpm.overrides", packageName });
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
}
|
|
4298
|
+
return problems;
|
|
4299
|
+
}
|
|
4300
|
+
function throwLegacyDreamboardPackageError(problems) {
|
|
4301
|
+
const details = problems.map((problem) => `${problem.location} ${problem.packageName}`).join("; ");
|
|
4302
|
+
throw new Error(
|
|
4303
|
+
[
|
|
4304
|
+
"Legacy @dreamboard/* package dependencies are no longer supported in compiler-bound workspaces.",
|
|
4305
|
+
`Found ${details}.`,
|
|
4306
|
+
"Repin to the public @dreamboard-games/* packages and rerun the command."
|
|
4307
|
+
].join(" ")
|
|
4308
|
+
);
|
|
4309
|
+
}
|
|
4310
|
+
function isPortableDreamboardPackage(packageName) {
|
|
4311
|
+
return packageName === "dreamboard" || packageName.startsWith("@dreamboard-games/");
|
|
4312
|
+
}
|
|
4313
|
+
function isLegacyDreamboardPackage(packageName) {
|
|
4314
|
+
return packageName.startsWith("@dreamboard/");
|
|
3943
4315
|
}
|
|
3944
4316
|
function isReleaseEnvironment(environment) {
|
|
3945
4317
|
return environment === "staging" || environment === "prod";
|
|
@@ -5676,6 +6048,9 @@ async function assertReducerContractPreflight(projectRoot) {
|
|
|
5676
6048
|
|
|
5677
6049
|
// src/services/project/reducer-bundle-preflight.ts
|
|
5678
6050
|
import path13 from "path";
|
|
6051
|
+
import { isPerPlayer, perPlayerSchema } from "@dreamboard-games/sdk/reducer";
|
|
6052
|
+
import "@dreamboard-games/sdk/reducer-contract";
|
|
6053
|
+
import { materializeManifestTable } from "@dreamboard-games/sdk/codegen";
|
|
5679
6054
|
globalThis.__DREAMBOARD_AUTHORING_WARNINGS__ = true;
|
|
5680
6055
|
var REDUCER_BUNDLE_ENTRY_PATH = path13.join("app", "index.ts");
|
|
5681
6056
|
var PREFLIGHT_RNG_SEED = 1337;
|
|
@@ -5921,7 +6296,7 @@ function isSourceRevisionPath(filePath) {
|
|
|
5921
6296
|
return filePath !== RULE_FILE && isAllowedGamePath(filePath);
|
|
5922
6297
|
}
|
|
5923
6298
|
function shouldAlwaysUpsertSourcePath(filePath) {
|
|
5924
|
-
return filePath === ".npmrc" ||
|
|
6299
|
+
return filePath === ".npmrc" || isDynamicGeneratedPath(filePath);
|
|
5925
6300
|
}
|
|
5926
6301
|
|
|
5927
6302
|
// src/commands/dev.ts
|
|
@@ -6496,12 +6871,12 @@ async function readWorkspacePackageJson(projectRoot) {
|
|
|
6496
6871
|
return {
|
|
6497
6872
|
dependencies: Object.fromEntries(
|
|
6498
6873
|
Object.entries(parsed.dependencies ?? {}).filter(
|
|
6499
|
-
([name]) => name
|
|
6874
|
+
([name]) => isDreamboardPublicPackage(name)
|
|
6500
6875
|
)
|
|
6501
6876
|
),
|
|
6502
6877
|
devDependencies: Object.fromEntries(
|
|
6503
6878
|
Object.entries(parsed.devDependencies ?? {}).filter(
|
|
6504
|
-
([name]) => name
|
|
6879
|
+
([name]) => isDreamboardPublicPackage(name)
|
|
6505
6880
|
)
|
|
6506
6881
|
)
|
|
6507
6882
|
};
|
|
@@ -6509,6 +6884,9 @@ async function readWorkspacePackageJson(projectRoot) {
|
|
|
6509
6884
|
return null;
|
|
6510
6885
|
}
|
|
6511
6886
|
}
|
|
6887
|
+
function isDreamboardPublicPackage(packageName) {
|
|
6888
|
+
return packageName === "dreamboard" || packageName.startsWith("@dreamboard-games/");
|
|
6889
|
+
}
|
|
6512
6890
|
function stableJson(value) {
|
|
6513
6891
|
if (value === null || typeof value !== "object") {
|
|
6514
6892
|
return JSON.stringify(value);
|
|
@@ -7638,7 +8016,7 @@ async function assertKnownPlayerId(sessionId, playerId) {
|
|
|
7638
8016
|
}
|
|
7639
8017
|
|
|
7640
8018
|
// src/commands/login.ts
|
|
7641
|
-
import
|
|
8019
|
+
import crypto4 from "crypto";
|
|
7642
8020
|
var login_default = defineCommand({
|
|
7643
8021
|
meta: {
|
|
7644
8022
|
name: "login",
|
|
@@ -7664,7 +8042,7 @@ var login_default = defineCommand({
|
|
|
7664
8042
|
void 0,
|
|
7665
8043
|
storedSession
|
|
7666
8044
|
);
|
|
7667
|
-
const state =
|
|
8045
|
+
const state = crypto4.randomUUID();
|
|
7668
8046
|
const pkce = createPkcePair();
|
|
7669
8047
|
const server = await startOAuthCallbackServer(
|
|
7670
8048
|
state,
|