@dreamboard-games/cli 0.1.30-alpha.2 → 0.1.30-alpha.21

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.
Files changed (136) hide show
  1. package/README.md +25 -107
  2. package/dist/agent-verifier/agent-workspace-verifier.mjs +1682 -0
  3. package/dist/agent-verifier/agent-workspace-verifier.mjs.map +1 -0
  4. package/dist/agent-verifier/chunk-22U6RMWO.mjs +722 -0
  5. package/dist/agent-verifier/chunk-22U6RMWO.mjs.map +1 -0
  6. package/dist/agent-verifier/chunk-4I2WWAPK.mjs +399 -0
  7. package/dist/agent-verifier/chunk-4I2WWAPK.mjs.map +1 -0
  8. package/dist/agent-verifier/chunk-BWBN2TDJ.mjs +2811 -0
  9. package/dist/agent-verifier/chunk-BWBN2TDJ.mjs.map +1 -0
  10. package/dist/agent-verifier/chunk-DQUYBIGQ.mjs +353 -0
  11. package/dist/agent-verifier/chunk-DQUYBIGQ.mjs.map +1 -0
  12. package/dist/agent-verifier/chunk-F2DIOJJZ.mjs +302 -0
  13. package/dist/agent-verifier/chunk-F2DIOJJZ.mjs.map +1 -0
  14. package/dist/agent-verifier/chunk-GWRZRWCF.mjs +107 -0
  15. package/dist/agent-verifier/chunk-GWRZRWCF.mjs.map +1 -0
  16. package/dist/agent-verifier/chunk-H6XDQJ3N.mjs +11 -0
  17. package/dist/agent-verifier/chunk-HUBV22JQ.mjs +89 -0
  18. package/dist/agent-verifier/chunk-HUBV22JQ.mjs.map +1 -0
  19. package/dist/agent-verifier/chunk-IWB4L2HV.mjs +273 -0
  20. package/dist/agent-verifier/chunk-IWB4L2HV.mjs.map +1 -0
  21. package/dist/agent-verifier/chunk-JZTH3EMV.mjs +14523 -0
  22. package/dist/agent-verifier/chunk-JZTH3EMV.mjs.map +1 -0
  23. package/dist/agent-verifier/chunk-KDAQ4CZY.mjs +192 -0
  24. package/dist/agent-verifier/chunk-KDAQ4CZY.mjs.map +1 -0
  25. package/dist/agent-verifier/chunk-M7UVBANQ.mjs +58 -0
  26. package/dist/agent-verifier/chunk-M7UVBANQ.mjs.map +1 -0
  27. package/dist/agent-verifier/chunk-MYMVXTZT.mjs +766 -0
  28. package/dist/agent-verifier/chunk-MYMVXTZT.mjs.map +1 -0
  29. package/dist/agent-verifier/chunk-OJFZVGEL.mjs +492 -0
  30. package/dist/agent-verifier/chunk-OJFZVGEL.mjs.map +1 -0
  31. package/dist/agent-verifier/chunk-QD4SQNUP.mjs +75 -0
  32. package/dist/agent-verifier/chunk-QD4SQNUP.mjs.map +1 -0
  33. package/dist/agent-verifier/chunk-RDYXWXXC.mjs +47 -0
  34. package/dist/agent-verifier/chunk-RDYXWXXC.mjs.map +1 -0
  35. package/dist/agent-verifier/chunk-TIDX3YLW.mjs +158 -0
  36. package/dist/agent-verifier/chunk-TIDX3YLW.mjs.map +1 -0
  37. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs +214 -0
  38. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs.map +1 -0
  39. package/dist/agent-verifier/chunk-UXGTT25Q.mjs +59 -0
  40. package/dist/agent-verifier/chunk-UXGTT25Q.mjs.map +1 -0
  41. package/dist/agent-verifier/chunk-YE7UAO3T.mjs +129 -0
  42. package/dist/agent-verifier/chunk-YE7UAO3T.mjs.map +1 -0
  43. package/dist/agent-verifier/chunk-ZEELHSY3.mjs +20 -0
  44. package/dist/agent-verifier/chunk-ZEELHSY3.mjs.map +1 -0
  45. package/dist/agent-verifier/global-config-IXZLY4BS.mjs +19 -0
  46. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs +140 -0
  47. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs.map +1 -0
  48. package/dist/agent-verifier/local-files-OF4QFISU.mjs +45 -0
  49. package/dist/agent-verifier/local-files-OF4QFISU.mjs.map +1 -0
  50. package/dist/agent-verifier/local-typecheck-DHVLM37Z.mjs +150 -0
  51. package/dist/agent-verifier/local-typecheck-DHVLM37Z.mjs.map +1 -0
  52. package/dist/agent-verifier/materialize-workspace-7DFE45ZH.mjs +90 -0
  53. package/dist/agent-verifier/materialize-workspace-7DFE45ZH.mjs.map +1 -0
  54. package/dist/agent-verifier/project-state-XKUSCFSV.mjs +33 -0
  55. package/dist/agent-verifier/project-state-XKUSCFSV.mjs.map +1 -0
  56. package/dist/agent-verifier/prompt-VKHMCQT6.mjs +756 -0
  57. package/dist/agent-verifier/prompt-VKHMCQT6.mjs.map +1 -0
  58. package/dist/agent-verifier/reducer-bundle-preflight-GLUJKTWU.mjs +312 -0
  59. package/dist/agent-verifier/reducer-bundle-preflight-GLUJKTWU.mjs.map +1 -0
  60. package/dist/agent-verifier/reducer-contract-preflight-WVQQPW5F.mjs +46 -0
  61. package/dist/agent-verifier/reducer-contract-preflight-WVQQPW5F.mjs.map +1 -0
  62. package/dist/agent-verifier/reducer-native-test-harness-H6G6RBRY.mjs +3436 -0
  63. package/dist/agent-verifier/reducer-native-test-harness-H6G6RBRY.mjs.map +1 -0
  64. package/dist/agent-verifier/static-scaffold-CC4KL6K7.mjs +24 -0
  65. package/dist/agent-verifier/static-scaffold-CC4KL6K7.mjs.map +1 -0
  66. package/dist/agent-verifier/workspace-codegen-SPPVHURX.mjs +10 -0
  67. package/dist/agent-verifier/workspace-codegen-SPPVHURX.mjs.map +1 -0
  68. package/dist/agent-verifier/workspace-dependencies-5HEEKZFP.mjs +17 -0
  69. package/dist/agent-verifier/workspace-dependencies-5HEEKZFP.mjs.map +1 -0
  70. package/dist/authoring-compatibility-internal.js +12 -0
  71. package/dist/authoring-compatibility-internal.js.map +1 -0
  72. package/dist/chunk-2H7UOFLK.js +11 -0
  73. package/dist/chunk-2H7UOFLK.js.map +1 -0
  74. package/dist/{chunk-TAQKH67O.js → chunk-2Z65YI7P.js} +2702 -7338
  75. package/dist/chunk-2Z65YI7P.js.map +1 -0
  76. package/dist/chunk-EQNBQVIW.js +204 -0
  77. package/dist/chunk-EQNBQVIW.js.map +1 -0
  78. package/dist/chunk-GQ3ZEAEG.js +4281 -0
  79. package/dist/chunk-GQ3ZEAEG.js.map +1 -0
  80. package/dist/chunk-UI7NWSYA.js +334 -0
  81. package/dist/chunk-UI7NWSYA.js.map +1 -0
  82. package/dist/{global-config-S4ZIPECE.js → global-config-GK2UC2X6.js} +4 -3
  83. package/dist/global-config-GK2UC2X6.js.map +1 -0
  84. package/dist/index.js +3421 -6435
  85. package/dist/index.js.map +1 -1
  86. package/dist/internal.js +15 -9
  87. package/dist/{keychain-backend-HDF4TZDL.js → keychain-backend-GO34KGTG.js} +12 -7
  88. package/dist/keychain-backend-GO34KGTG.js.map +1 -0
  89. package/dist/{prompt-NDV3AE5L.js → prompt-GMZABCJC.js} +2 -2
  90. package/package.json +11 -20
  91. package/release/authoring-release-set.json +38 -0
  92. package/skills/dreamboard/SKILL.md +30 -28
  93. package/skills/dreamboard/references/building-your-first-game.md +15 -15
  94. package/skills/dreamboard/references/cli.md +48 -47
  95. package/skills/dreamboard/references/manifest-authoring.md +11 -3
  96. package/skills/dreamboard/references/quickstart.md +16 -13
  97. package/skills/dreamboard/references/testing.md +10 -10
  98. package/dist/chunk-N7XPNNUI.js +0 -432
  99. package/dist/chunk-N7XPNNUI.js.map +0 -1
  100. package/dist/chunk-SEGVTWSK.js +0 -44
  101. package/dist/chunk-TAQKH67O.js.map +0 -1
  102. package/dist/dev-host/components/drawer.tsx +0 -132
  103. package/dist/dev-host/components/input.tsx +0 -21
  104. package/dist/dev-host/dev-api-proxy-plugin.ts +0 -328
  105. package/dist/dev-host/dev-author-dom-warnings.ts +0 -100
  106. package/dist/dev-host/dev-diagnostics.ts +0 -62
  107. package/dist/dev-host/dev-fallback-stylesheet.ts +0 -53
  108. package/dist/dev-host/dev-hmr-guard-plugin.ts +0 -47
  109. package/dist/dev-host/dev-host-controller.ts +0 -674
  110. package/dist/dev-host/dev-host-player-query.ts +0 -17
  111. package/dist/dev-host/dev-host-session-transport.ts +0 -52
  112. package/dist/dev-host/dev-host-storage.ts +0 -56
  113. package/dist/dev-host/dev-log-relay-plugin.ts +0 -510
  114. package/dist/dev-host/dev-runtime-config.ts +0 -14
  115. package/dist/dev-host/dev-runtime-platform.ts +0 -335
  116. package/dist/dev-host/dev-virtual-modules-plugin.ts +0 -64
  117. package/dist/dev-host/host-main.css +0 -224
  118. package/dist/dev-host/host-main.tsx +0 -948
  119. package/dist/dev-host/index.html +0 -56
  120. package/dist/dev-host/lib/utils.ts +0 -6
  121. package/dist/dev-host/plugin-main.ts +0 -61
  122. package/dist/dev-host/plugin.html +0 -24
  123. package/dist/dev-host/shared-styles.css +0 -144
  124. package/dist/dev-host/start-dev-server.ts +0 -140
  125. package/dist/dev-host/virtual-modules.d.ts +0 -27
  126. package/dist/keychain-backend-HDF4TZDL.js.map +0 -1
  127. package/skills/dreamboard/scripts/events-extract.mjs +0 -218
  128. /package/dist/{chunk-SEGVTWSK.js.map → agent-verifier/chunk-H6XDQJ3N.mjs.map} +0 -0
  129. /package/dist/{global-config-S4ZIPECE.js.map → agent-verifier/global-config-IXZLY4BS.mjs.map} +0 -0
  130. /package/dist/{prompt-NDV3AE5L.js.map → prompt-GMZABCJC.js.map} +0 -0
  131. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.framework.json +0 -0
  132. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.json +0 -0
  133. /package/{dist/scaffold → scaffold}/assets/static/ui/index.tsx +0 -0
  134. /package/{dist/scaffold → scaffold}/assets/static/ui/style.css +0 -0
  135. /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.framework.json +0 -0
  136. /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.json +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/project/static-scaffold.ts","../../src/release/authoring-release-set.generated.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { readdir, readFile, rmdir } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport type { GameTopologyManifest } from \"@dreamboard-games/sdk/types\";\nimport { AUTHORING_RELEASE_SET } from \"../../release/authoring-release-set.js\";\nimport { REDUCER_TESTING_TYPES_WRAPPER_CONTENT } from \"../../templates/testing-types-content.js\";\nimport {\n MANIFEST_TYPECHECK_CONFIG_FILE,\n PROJECT_CONFIG_FILE,\n PROJECT_DIR_NAME,\n} from \"../../constants.js\";\nimport type { LocalMaintainerRegistryConfig } from \"../../types.js\";\nimport { ensureDir } from \"../../utils/fs.js\";\nimport { materializeManifest } from \"./manifest-authoring.js\";\nimport { isDynamicSeedPath } from \"./scaffold-ownership.js\";\nimport {\n normalizeOwnedProjectPath,\n readWorkspaceTextFile,\n readWorkspaceTextFileIfExists,\n removeWorkspacePath,\n resolveWorkspacePath,\n unlinkWorkspaceFile,\n workspacePathExists,\n writeWorkspaceTextFile,\n} from \"./workspace-path.js\";\nimport {\n FRAMEWORK_PNPM_OVERRIDES,\n FRAMEWORK_REACT_DEPENDENCIES,\n FRAMEWORK_ZOD_VERSION,\n} from \"./framework-dependencies.js\";\n\ntype StaticScaffoldMode = \"new\" | \"update\";\ntype StaticAssetEntry = {\n targetPath: string;\n content: string;\n};\ntype StaticScaffoldOptions = {\n localMaintainerRegistry?: LocalMaintainerRegistryConfig | null;\n};\ntype RootPackageJsonShape = {\n private?: boolean;\n packageManager?: string;\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n overrides?: Record<string, unknown>;\n pnpm?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\nconst DREAMBOARD_SCAFFOLD_REFRESH_COMMAND =\n \"dreamboard project create or dreamboard project clone\";\nconst DREAMBOARD_GITIGNORE_BLOCK = [\n \"# Dreamboard local state\",\n \".dreamboard/state.json\",\n \".dreamboard/snapshot.json\",\n \".dreamboard/dev/\",\n \".dreamboard/generated/\",\n \"node_modules/\",\n \"ui/node_modules/\",\n \"\",\n].join(\"\\n\");\nconst TESTING_TYPES_STUB =\n \"export function defineScenario(scenario) { return scenario; }\\n\";\nconst GENERATED_TESTING_TYPES_PREFIX = \"// Generated by dreamboard\";\nconst GENERATED_SCENARIO_PREFIX = \"// Generated by dreamboard scaffold.\";\nconst LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT = `export {\n ErrorBoundary,\n type ErrorBoundaryProps,\n} from \"@dreamboard-games/sdk/ui\";\nexport { PluginRuntime, type PluginRuntimeProps } from \"@dreamboard-games/sdk/runtime\";\n`;\nconst OLD_LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT = [\n \"export {\",\n \" ErrorBoundary,\",\n \" PluginRuntime,\",\n \" type ErrorBoundaryProps,\",\n \" type PluginRuntimeProps,\",\n `} from \"@dreamboard/ui-${\"sdk\"}\";`,\n \"\",\n].join(\"\\n\");\nconst OLD_PUBLIC_DREAMBOARD_COMPONENT_INDEX_CONTENT = [\n \"export {\",\n \" ErrorBoundary,\",\n \" PluginRuntime,\",\n \" type ErrorBoundaryProps,\",\n \" type PluginRuntimeProps,\",\n `} from \"@dreamboard-games/ui-${\"sdk\"}\";`,\n \"\",\n].join(\"\\n\");\nconst INITIAL_SCENARIO_CONTENT = `${GENERATED_SCENARIO_PREFIX}\nimport { defineScenario } from \"../testing-types\";\n\nexport default defineScenario({\n id: \"smoke-initial-turn\",\n description:\n \"Sanity check that the scaffolded workspace boots into its initial phase.\",\n from: \"initial-turn\",\n when: async () => undefined,\n then: ({ expect, players, state }) => {\n const playerIds = players();\n expect(playerIds).toHaveLength(playerIds.length);\n expect(playerIds.length).toBeGreaterThanOrEqual(1);\n expect(state()).toBe(\"setup\");\n },\n});\n`;\nconst STATIC_ASSET_ROOT = resolveStaticAssetRoot();\nconst SDK_DEPENDENCY_RANGES = {\n \"@dreamboard-games/sdk\": AUTHORING_RELEASE_SET.packages.sdk.version,\n} as const;\nconst DEV_HOST_DEPENDENCY_RANGES = {\n \"@dreamboard-games/dev-host\": AUTHORING_RELEASE_SET.packages.devHost.version,\n} as const;\nconst DREAMBOARD_PACKAGE_OVERRIDES = {\n \"@dreamboard-games/api-client\":\n AUTHORING_RELEASE_SET.packages.apiClient.version,\n \"@dreamboard-games/dev-host\": AUTHORING_RELEASE_SET.packages.devHost.version,\n \"@dreamboard-games/sdk\": AUTHORING_RELEASE_SET.packages.sdk.version,\n} as const;\n\nconst FRAMEWORK_SCRIPTS = {\n dev: \"dreamboard dev\",\n \"test:ui\":\n \"tsx --tsconfig test/tsconfig.tsx-runtime.json --test test/ui/**/*.test.tsx\",\n typecheck: `tsc --noEmit -p ${MANIFEST_TYPECHECK_CONFIG_FILE} && tsc --noEmit -p app/tsconfig.json && tsc --noEmit -p ui/tsconfig.json`,\n \"typecheck:manifest\": `tsc --noEmit -p ${MANIFEST_TYPECHECK_CONFIG_FILE}`,\n \"typecheck:app\": \"tsc --noEmit -p app/tsconfig.json\",\n \"typecheck:ui\": \"tsc --noEmit -p ui/tsconfig.json\",\n} as const;\nconst SHARED_DEPENDENCIES = {\n ...FRAMEWORK_REACT_DEPENDENCIES,\n} as const;\nconst ROOT_APP_DEPENDENCIES = {\n zod: FRAMEWORK_ZOD_VERSION,\n} as const;\nconst SHARED_DEV_DEPENDENCIES = {\n typescript: \"^5.9.2\",\n \"@types/node\": \"^24.5.2\",\n \"@types/react\": \"^19.0.0\",\n \"@types/react-dom\": \"^19.0.0\",\n csstype: \"^3.1.3\",\n tsx: \"^4.20.5\",\n} as const;\n\nexport async function scaffoldStaticWorkspace(\n projectRoot: string,\n mode: StaticScaffoldMode,\n options: StaticScaffoldOptions = {},\n): Promise<void> {\n await writeFrameworkStaticFiles(projectRoot, mode, options);\n await ensureDreamboardGitignore(projectRoot);\n await writeManifestTypecheckTsconfig(projectRoot);\n await removeLegacyVendoredSdkPaths(projectRoot);\n await removeLegacyDreamboardComponentPath(projectRoot);\n\n await ensureDir(resolveWorkspacePath(projectRoot, \"test/bases\"));\n await ensureDir(resolveWorkspacePath(projectRoot, \"test/scenarios\"));\n await ensureDir(resolveWorkspacePath(projectRoot, \"test/generated\"));\n\n await writeTestReadme(projectRoot);\n await writeGeneratedTestingStubs(projectRoot, mode);\n const initialTestPlayerCount = await inferInitialTestPlayerCount(projectRoot);\n await writeInitialBase(projectRoot, mode, initialTestPlayerCount);\n await writeInitialScenario(projectRoot, mode);\n await writeTestingTypes(projectRoot, mode);\n await writeTestTsconfig(projectRoot);\n\n if (await workspacePathExists(projectRoot, \"test/testing-types.d.ts\")) {\n await unlinkWorkspaceFile(projectRoot, \"test/testing-types.d.ts\");\n }\n if (await workspacePathExists(projectRoot, \"test/base-scenarios.json\")) {\n await unlinkWorkspaceFile(projectRoot, \"test/base-scenarios.json\");\n }\n\n await migrateLegacyScenarioImports(projectRoot);\n}\n\nasync function ensureDreamboardGitignore(projectRoot: string): Promise<void> {\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n \".gitignore\",\n );\n if (existing?.includes(\".dreamboard/state.json\")) {\n return;\n }\n await writeWorkspaceTextFile(\n projectRoot,\n \".gitignore\",\n `${existing ? `${existing.trimEnd()}\\n\\n` : \"\"}${DREAMBOARD_GITIGNORE_BLOCK}`,\n );\n}\n\nexport async function assertCliStaticScaffoldComplete(\n projectRoot: string,\n deletedPaths: readonly string[] = [],\n): Promise<void> {\n const expectedEntries = await getExpectedStaticEntries(projectRoot);\n const missingOrBlankPaths: string[] = [];\n\n for (const entry of expectedEntries) {\n const content = await readWorkspaceTextFileIfExists(\n projectRoot,\n entry.targetPath,\n );\n\n if (content === null || content.trim().length === 0) {\n missingOrBlankPaths.push(entry.targetPath);\n }\n }\n\n const staticPaths = new Set(expectedEntries.map((entry) => entry.targetPath));\n const deletedStaticPaths = deletedPaths\n .map(normalizeOwnedProjectPath)\n .filter(\n (filePath): filePath is string =>\n filePath !== null && staticPaths.has(filePath),\n )\n .sort();\n\n if (missingOrBlankPaths.length === 0 && deletedStaticPaths.length === 0) {\n return;\n }\n\n const problems: string[] = [];\n if (missingOrBlankPaths.length > 0) {\n problems.push(\n `missing or blank: ${summarizePaths(missingOrBlankPaths.sort())}`,\n );\n }\n if (deletedStaticPaths.length > 0) {\n problems.push(`deleted: ${summarizePaths(deletedStaticPaths)}`);\n }\n\n throw new Error(\n `CLI static scaffold is incomplete (${problems.join(\"; \")}). Refresh the project scaffold with ${DREAMBOARD_SCAFFOLD_REFRESH_COMMAND} before building or testing.`,\n );\n}\n\nasync function writeFrameworkStaticFiles(\n projectRoot: string,\n mode: StaticScaffoldMode,\n options: StaticScaffoldOptions,\n): Promise<void> {\n const assetEntries = await getStaticAssetEntries();\n\n for (const entry of assetEntries) {\n // Dynamic seed files are user-customizable: only write them on first\n // scaffold; preserve existing content on subsequent updates.\n if (mode === \"update\" && isDynamicSeedPath(entry.targetPath)) {\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n entry.targetPath,\n );\n if (existing !== null && existing.trim().length > 0) {\n continue;\n }\n }\n await writeWorkspaceTextFile(projectRoot, entry.targetPath, entry.content);\n }\n\n for (const entry of await getDynamicStaticEntries(\n projectRoot,\n mode,\n options,\n )) {\n await writeWorkspaceTextFile(projectRoot, entry.targetPath, entry.content);\n }\n\n if (!options.localMaintainerRegistry) {\n await removeWorkspacePath(projectRoot, \".npmrc\", { force: true });\n }\n}\n\nasync function removeLegacyVendoredSdkPaths(\n projectRoot: string,\n): Promise<void> {\n await removeWorkspacePath(projectRoot, \"app/sdk\", {\n recursive: true,\n force: true,\n });\n await removeWorkspacePath(projectRoot, \"ui/sdk\", {\n recursive: true,\n force: true,\n });\n}\n\nasync function removeLegacyDreamboardComponentPath(\n projectRoot: string,\n): Promise<void> {\n const legacyIndexProjectPath = \"ui/components/dreamboard/index.ts\";\n const legacyDirPath = resolveWorkspacePath(\n projectRoot,\n \"ui/components/dreamboard\",\n );\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n legacyIndexProjectPath,\n );\n\n const removableLegacyContents = new Set([\n LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT.trim(),\n OLD_LEGACY_DREAMBOARD_COMPONENT_INDEX_CONTENT.trim(),\n OLD_PUBLIC_DREAMBOARD_COMPONENT_INDEX_CONTENT.trim(),\n ]);\n\n if (existing === null || !removableLegacyContents.has(existing.trim())) {\n return;\n }\n\n await unlinkWorkspaceFile(projectRoot, legacyIndexProjectPath);\n const remainingEntries = await readdir(legacyDirPath).catch(() => []);\n if (remainingEntries.length === 0) {\n await rmdir(legacyDirPath);\n }\n}\n\nasync function writeTestReadme(projectRoot: string): Promise<void> {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/README.md\",\n \"# 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. Run deterministic scenario tests: `dreamboard test`.\\n5. Run a single scenario when needed: `dreamboard test --scenario <scenario-id>`.\\n\\nImport test helpers from `../testing-types`.\\n\\nGenerated artifacts are written to `test/generated/*` and should not be edited manually.\\n\",\n );\n}\n\nasync function writeInitialBase(\n projectRoot: string,\n mode: StaticScaffoldMode,\n players: number,\n): Promise<void> {\n if (mode === \"update\") {\n return;\n }\n\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/bases/initial-turn.base.ts\",\n `import { defineBase } from \"../testing-types\";\n\nexport default defineBase({\n id: \"initial-turn\",\n seed: 1337,\n players: ${players},\n setup: async () => undefined,\n});\n`,\n );\n}\n\nasync function writeInitialScenario(\n projectRoot: string,\n mode: StaticScaffoldMode,\n): Promise<void> {\n if (mode === \"new\") {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/scenarios/smoke-initial-turn.scenario.ts\",\n INITIAL_SCENARIO_CONTENT,\n );\n return;\n }\n\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n \"test/scenarios/smoke-initial-turn.scenario.ts\",\n );\n if (\n existing === null ||\n existing.trim().length === 0 ||\n existing.startsWith(GENERATED_SCENARIO_PREFIX)\n ) {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/scenarios/smoke-initial-turn.scenario.ts\",\n INITIAL_SCENARIO_CONTENT,\n );\n }\n}\n\nasync function writeTestingTypes(\n projectRoot: string,\n mode: StaticScaffoldMode,\n): Promise<void> {\n if (mode === \"new\") {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/testing-types.ts\",\n REDUCER_TESTING_TYPES_WRAPPER_CONTENT,\n );\n return;\n }\n\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n \"test/testing-types.ts\",\n );\n if (shouldRefreshGeneratedTestingTypes(existing)) {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/testing-types.ts\",\n REDUCER_TESTING_TYPES_WRAPPER_CONTENT,\n );\n }\n}\n\nasync function writeGeneratedTestingStubs(\n projectRoot: string,\n mode: StaticScaffoldMode,\n): Promise<void> {\n const header = \"// Generated by dreamboard scaffold. Do not edit by hand.\\n\";\n await writeGeneratedTestingStubFile(\n projectRoot,\n \"test/generated/base-states.generated.ts\",\n `${header}export const BASE_STATES = {} as const;\\nexport const BASE_STATES_CONTRACT_FINGERPRINT = undefined;\\n`,\n mode,\n );\n await writeGeneratedTestingStubFile(\n projectRoot,\n \"test/generated/base-states.generated.d.ts\",\n `${header}export declare const BASE_STATES: Record<string, unknown>;\\nexport declare const BASE_STATES_CONTRACT_FINGERPRINT: string | undefined;\\n`,\n mode,\n );\n await writeGeneratedTestingStubFile(\n projectRoot,\n \"test/generated/testing-contract.ts\",\n `${header}export type BaseId = string;\\nexport type GameView = unknown;\\nexport type InteractionId = string;\\nexport type InteractionParamsOf<_Id extends string> = Record<string, unknown>;\\nexport type PhaseName = string;\\nexport type PlayerId = string;\\nexport type RejectionCode = string;\\nexport type StateName = string;\\nexport type TestRunner = \"reducer\" | \"remote\" | \"browser\";\\nexport type ViewByPhase = Record<string, GameView>;\\nexport type WorkspaceStageName<_Phase extends string = string> = string;\\nexport type Expectation = { [matcher: string]: (...args: unknown[]) => unknown; not: Expectation };\\nexport type ExpectFn = (actual: unknown) => Expectation;\\nexport type InteractionExplanation = { interactionId: string; phase: string; step: string | null; availability: \"available\" | \"notYourTurn\" | \"wrongPhase\" | \"wrongStep\" | \"blocked\"; rules: readonly { ruleId: string; outcome: \"passed\" | \"failed\" | \"notEvaluated\"; errorCode?: string; message?: string; }[]; actor: { required: readonly string[]; playerIsActor: boolean }; inputs: readonly { key: string; kind: string; eligibleCount: number | \"lazy\"; }[]; };\\nexport interface InteractionDescriptorFor<Id extends string = string> { interactionId: Id; [key: string]: unknown; }\\nexport interface ScenarioGameApi { start(): Promise<void>; submit<Id extends InteractionId>(playerId: PlayerId, interactionId: Id, params?: InteractionParamsOf<Id>): Promise<void>; }\\nexport interface BaseContext { game: ScenarioGameApi; players(): readonly PlayerId[]; seat(index: number): PlayerId; }\\nexport interface SharedScenarioContext { game: ScenarioGameApi; players(): readonly PlayerId[]; seat(index: number): PlayerId; state(): StateName; view(playerId: PlayerId): GameView; interactions(playerId: PlayerId): readonly InteractionDescriptorFor[]; explain(playerId: PlayerId, interactionId: InteractionId): InteractionExplanation; expect: ExpectFn; }\\nexport type ScenarioContext<Phase extends PhaseName | undefined = undefined> = Omit<SharedScenarioContext, \"state\" | \"view\"> & { state(): Phase extends PhaseName ? Phase : StateName; view(playerId: PlayerId): Phase extends PhaseName ? ViewByPhase[Phase] : GameView; };\\nexport type ScenarioThenContext<_Runners extends readonly TestRunner[] = readonly [\"reducer\"], Phase extends PhaseName | undefined = undefined> = ScenarioContext<Phase>;\\nexport interface BaseDefinition { id: string; seed?: number; players?: number; setupProfileId?: string; extends?: BaseId | string; setup: (ctx: BaseContext) => void | Promise<void>; }\\nexport interface ScenarioDefinition<Runners extends readonly TestRunner[] = readonly [\"reducer\"], Phase extends PhaseName | undefined = undefined> { id: string; description?: string; from: BaseId | string; runners?: Runners; phase?: Phase; stage?: Phase extends PhaseName ? WorkspaceStageName<Phase> : never; when: (ctx: ScenarioContext<Phase>) => void | Promise<void>; then: (ctx: ScenarioThenContext<Runners, Phase>) => void | Promise<void>; }\\n`,\n mode,\n );\n await writeGeneratedTestingStubFile(\n projectRoot,\n \"test/generated/scenario-manifest.generated.ts\",\n `${header}export const SCENARIO_MANIFEST = [] as const;\\n`,\n mode,\n );\n}\n\nasync function writeGeneratedTestingStubFile(\n projectRoot: string,\n projectPath: string,\n content: string,\n mode: StaticScaffoldMode,\n): Promise<void> {\n if (mode === \"new\") {\n await writeWorkspaceTextFile(projectRoot, projectPath, content);\n return;\n }\n\n const existing = await readWorkspaceTextFileIfExists(\n projectRoot,\n projectPath,\n );\n if (\n existing === null ||\n existing.trim().length === 0 ||\n existing.startsWith(GENERATED_SCENARIO_PREFIX)\n ) {\n await writeWorkspaceTextFile(projectRoot, projectPath, content);\n }\n}\n\nasync function writeTestTsconfig(projectRoot: string): Promise<void> {\n await writeWorkspaceTextFile(\n projectRoot,\n \"test/tsconfig.json\",\n `${JSON.stringify(\n {\n compilerOptions: {\n target: \"ES2022\",\n module: \"ESNext\",\n moduleResolution: \"bundler\",\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n noEmit: true,\n },\n include: [\n \"./**/*.ts\",\n \"./**/*.d.ts\",\n \"../shared/**/*.ts\",\n \"../shared/**/*.d.ts\",\n ],\n },\n null,\n 2,\n )}\\n`,\n );\n}\n\nasync function writeManifestTypecheckTsconfig(\n projectRoot: string,\n): Promise<void> {\n await writeWorkspaceTextFile(\n projectRoot,\n MANIFEST_TYPECHECK_CONFIG_FILE,\n `${JSON.stringify(\n {\n compilerOptions: {\n target: \"ES2022\",\n module: \"ESNext\",\n moduleResolution: \"bundler\",\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n noEmit: true,\n allowImportingTsExtensions: true,\n },\n include: [\"./manifest.ts\"],\n },\n null,\n 2,\n )}\\n`,\n );\n}\n\nexport async function migrateLegacyScenarioImports(\n projectRoot: string,\n): Promise<void> {\n if (!(await workspacePathExists(projectRoot, \"test/scenarios\"))) return;\n\n const scenariosRoot = resolveWorkspacePath(projectRoot, \"test/scenarios\");\n const scenarioFiles = await collectScenarioFiles(scenariosRoot);\n for (const filePath of scenarioFiles) {\n const projectPath = toWorkspaceProjectPath(projectRoot, filePath);\n const content = await readWorkspaceTextFile(projectRoot, projectPath);\n if (!content.includes(\"@dreamboard/cli/testing\")) continue;\n\n const relativeToTestingTypes = normalizeImportPath(\n path.relative(\n path.dirname(filePath),\n path.join(projectRoot, \"test\", \"testing-types\"),\n ),\n );\n\n const migrated = content\n .replaceAll('\"@dreamboard/cli/testing\"', `\"${relativeToTestingTypes}\"`)\n .replaceAll(\"'@dreamboard/cli/testing'\", `'${relativeToTestingTypes}'`);\n\n if (migrated !== content) {\n await writeWorkspaceTextFile(projectRoot, projectPath, migrated);\n }\n }\n}\n\nfunction shouldRefreshGeneratedTestingTypes(\n existingContent: string | null,\n): boolean {\n if (existingContent === null || existingContent.trim().length === 0) {\n return true;\n }\n if (existingContent === TESTING_TYPES_STUB) {\n return true;\n }\n return existingContent.startsWith(GENERATED_TESTING_TYPES_PREFIX);\n}\n\nasync function inferInitialTestPlayerCount(\n projectRoot: string,\n): Promise<number> {\n if (!(await workspacePathExists(projectRoot, \"manifest.ts\"))) {\n return 4;\n }\n\n try {\n const manifest = await materializeManifest(projectRoot);\n return manifest.players.optimalPlayers ?? manifest.players.minPlayers ?? 4;\n } catch {\n return 4;\n }\n}\n\nasync function collectScenarioFiles(rootDir: string): Promise<string[]> {\n const files: string[] = [];\n const stack = [rootDir];\n\n while (stack.length > 0) {\n const dir = stack.pop();\n if (!dir) continue;\n\n const entries = await readdir(dir, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n if (entry.isDirectory()) {\n stack.push(fullPath);\n } else if (entry.isFile() && entry.name.endsWith(\".ts\")) {\n files.push(fullPath);\n }\n }\n }\n\n return files;\n}\n\nexport function resolveStaticAssetRoot(\n importUrl: string = import.meta.url,\n): string {\n const candidates = [\n fileURLToPath(new URL(\"../../scaffold/assets/static/\", importUrl)),\n fileURLToPath(new URL(\"./scaffold/assets/static/\", importUrl)),\n fileURLToPath(new URL(\"../scaffold/assets/static/\", importUrl)),\n ];\n\n for (const candidate of candidates) {\n if (existsSync(candidate)) {\n return candidate;\n }\n }\n\n throw new Error(\n `Unable to locate CLI static scaffold assets. Checked: ${candidates.join(\", \")}`,\n );\n}\n\nasync function getStaticAssetEntries(): Promise<StaticAssetEntry[]> {\n const files = await walkFiles(STATIC_ASSET_ROOT);\n const entries: StaticAssetEntry[] = [];\n\n for (const filePath of files) {\n const targetPath = normalizeOwnedProjectPath(\n path.relative(STATIC_ASSET_ROOT, filePath).replaceAll(path.sep, \"/\"),\n );\n if (targetPath === null) {\n throw new Error(`Unsafe static scaffold asset path: ${filePath}`);\n }\n entries.push({\n targetPath,\n content: await readFile(filePath, \"utf8\"),\n });\n }\n\n entries.sort((left, right) =>\n left.targetPath.localeCompare(right.targetPath),\n );\n return entries;\n}\n\nasync function getDynamicStaticEntries(\n projectRoot: string,\n mode: StaticScaffoldMode,\n options: StaticScaffoldOptions = {},\n): Promise<StaticAssetEntry[]> {\n const entries: StaticAssetEntry[] = [\n {\n targetPath: \"package.json\",\n content: await buildRootPackageJson(projectRoot, mode, options),\n },\n {\n targetPath: \"ui/package.json\",\n content: buildUiPackageJson(),\n },\n ];\n\n if (options.localMaintainerRegistry) {\n entries.push({\n targetPath: \".npmrc\",\n content: buildWorkspaceNpmrc(options.localMaintainerRegistry.registryUrl),\n });\n }\n\n return entries;\n}\n\nasync function getExpectedStaticEntries(\n projectRoot: string,\n): Promise<StaticAssetEntry[]> {\n const entries = [\n ...(await getStaticAssetEntries()).filter(\n (entry) => entry.targetPath !== \".npmrc\",\n ),\n ...(await getDynamicStaticEntries(projectRoot, \"update\")),\n ];\n entries.sort((left, right) =>\n left.targetPath.localeCompare(right.targetPath),\n );\n return entries;\n}\n\nasync function walkFiles(rootDir: string): Promise<string[]> {\n const files: string[] = [];\n const stack = [rootDir];\n\n while (stack.length > 0) {\n const currentDir = stack.pop();\n if (!currentDir) continue;\n\n const entries = await readdir(currentDir, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = path.join(currentDir, entry.name);\n if (entry.isDirectory()) {\n stack.push(fullPath);\n } else if (entry.isFile()) {\n files.push(fullPath);\n }\n }\n }\n\n files.sort((left, right) => left.localeCompare(right));\n return files;\n}\n\nasync function buildRootPackageJson(\n projectRoot: string,\n mode: StaticScaffoldMode,\n options: StaticScaffoldOptions,\n): Promise<string> {\n const sdkPackageRanges = {\n ...SDK_DEPENDENCY_RANGES,\n ...(options.localMaintainerRegistry?.packages ?? {}),\n };\n const existingPackageJson =\n mode === \"update\" &&\n (await workspacePathExists(projectRoot, \"package.json\"))\n ? (JSON.parse(\n await readWorkspaceTextFile(projectRoot, \"package.json\"),\n ) as RootPackageJsonShape)\n : null;\n const {\n dreamboardFrameworkVersion: _legacyFrameworkVersion,\n ...existingPackageJsonWithoutLegacyVersion\n } = existingPackageJson ?? {};\n const frameworkDependencies = {\n \"@dreamboard-games/sdk\":\n sdkPackageRanges[\"@dreamboard-games/sdk\"] ??\n SDK_DEPENDENCY_RANGES[\"@dreamboard-games/sdk\"],\n ...SHARED_DEPENDENCIES,\n ...ROOT_APP_DEPENDENCIES,\n };\n const frameworkDevDependencies = {\n ...SHARED_DEV_DEPENDENCIES,\n ...DEV_HOST_DEPENDENCY_RANGES,\n };\n const nextPackageJson: RootPackageJsonShape = {\n ...existingPackageJsonWithoutLegacyVersion,\n private: true,\n packageManager: AUTHORING_RELEASE_SET.packageManager,\n scripts: {\n ...(existingPackageJson?.scripts ?? {}),\n ...FRAMEWORK_SCRIPTS,\n },\n dependencies: {\n ...(existingPackageJson?.dependencies ?? {}),\n ...frameworkDependencies,\n },\n devDependencies: {\n ...(existingPackageJson?.devDependencies ?? {}),\n ...frameworkDevDependencies,\n },\n pnpm: mergePnpmConfig(existingPackageJson?.pnpm),\n };\n return `${JSON.stringify(nextPackageJson, null, 2)}\\n`;\n}\n\nfunction mergePnpmConfig(\n existingPnpm: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n const existingOverrides =\n existingPnpm?.overrides &&\n typeof existingPnpm.overrides === \"object\" &&\n !Array.isArray(existingPnpm.overrides)\n ? (existingPnpm.overrides as Record<string, unknown>)\n : {};\n return {\n ...(existingPnpm ?? {}),\n overrides: {\n ...existingOverrides,\n ...FRAMEWORK_PNPM_OVERRIDES,\n ...DREAMBOARD_PACKAGE_OVERRIDES,\n },\n };\n}\n\nfunction buildWorkspaceNpmrc(registryUrl: string): string {\n return `@dreamboard-games:registry=${registryUrl}\\n`;\n}\n\nfunction buildUiPackageJson(): string {\n return `${JSON.stringify(\n {\n private: true,\n dependencies: SHARED_DEPENDENCIES,\n devDependencies: SHARED_DEV_DEPENDENCIES,\n },\n null,\n 2,\n )}\\n`;\n}\n\nfunction normalizeImportPath(relativePath: string): string {\n const normalized = relativePath.replaceAll(\"\\\\\", \"/\");\n if (normalized.startsWith(\".\")) return normalized;\n return `./${normalized}`;\n}\n\nfunction toWorkspaceProjectPath(projectRoot: string, filePath: string): string {\n const relativePath = path\n .relative(path.resolve(projectRoot), path.resolve(filePath))\n .replaceAll(path.sep, \"/\");\n const projectPath = normalizeOwnedProjectPath(relativePath);\n if (projectPath === null) {\n throw new Error(`Unsafe project path: ${relativePath}`);\n }\n return projectPath;\n}\n\nfunction summarizePaths(paths: readonly string[]): string {\n const maxShown = 5;\n const shown = paths.slice(0, maxShown).join(\", \");\n if (paths.length <= maxShown) return shown;\n return `${shown}, and ${paths.length - maxShown} more`;\n}\n","// Generated by scripts/generate-authoring-release-set.ts. Do not edit by hand.\nimport type { AuthoringReleaseSetV1 } from \"./authoring-release-set.js\";\n\nexport const AUTHORING_RELEASE_SET = {\n \"schemaVersion\": 1,\n \"channel\": \"public\",\n \"packages\": {\n \"cli\": {\n \"name\": \"@dreamboard-games/cli\",\n \"version\": \"0.1.30-alpha.21\"\n },\n \"sdk\": {\n \"name\": \"@dreamboard-games/sdk\",\n \"version\": \"0.4.0-alpha.6\"\n },\n \"apiClient\": {\n \"name\": \"@dreamboard-games/api-client\",\n \"version\": \"0.3.0-alpha.4\"\n },\n \"devHost\": {\n \"name\": \"@dreamboard-games/dev-host\",\n \"version\": \"0.1.30-alpha.19\"\n }\n },\n \"protocols\": {\n \"authoringAdapter\": 1,\n \"devHost\": 1,\n \"verifier\": 1\n },\n \"schemas\": {\n \"scaffold\": 2,\n \"manifest\": 2,\n \"generatedArtifacts\": 1\n },\n \"registry\": {\n \"kind\": \"public-npm\",\n \"portable\": true\n },\n \"packageManager\": \"pnpm@10.4.1\",\n \"releaseSetId\": \"sha256:9719136d41000ccb72a11154e402a320e5cefd56905b1555b05a05d710d1d7e4\"\n} as const satisfies AuthoringReleaseSetV1;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,SAAS,UAAU,aAAa;AACzC,OAAO,UAAU;AACjB,SAAS,qBAAqB;;;ACAvB,IAAM,wBAAwB;AAAA,EACnC,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,YAAY;AAAA,IACV,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,IACb;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,WAAW;AAAA,IACb;AAAA,IACA,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,aAAa;AAAA,IACX,oBAAoB;AAAA,IACpB,WAAW;AAAA,IACX,YAAY;AAAA,EACd;AAAA,EACA,WAAW;AAAA,IACT,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,sBAAsB;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,IACV,QAAQ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;AACpC,SAAO,GAAG,KAAK;AAAA,IACb;AAAA,MACE,SAAS;AAAA,MACT,cAAc;AAAA,MACd,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAAA;AACH;AAEA,SAAS,oBAAoB,cAA8B;AACzD,QAAM,aAAa,aAAa,WAAW,MAAM,GAAG;AACpD,MAAI,WAAW,WAAW,GAAG,EAAG,QAAO;AACvC,SAAO,KAAK,UAAU;AACxB;AAEA,SAAS,uBAAuB,aAAqB,UAA0B;AAC7E,QAAM,eAAe,KAClB,SAAS,KAAK,QAAQ,WAAW,GAAG,KAAK,QAAQ,QAAQ,CAAC,EAC1D,WAAW,KAAK,KAAK,GAAG;AAC3B,QAAM,cAAc,0BAA0B,YAAY;AAC1D,MAAI,gBAAgB,MAAM;AACxB,UAAM,IAAI,MAAM,wBAAwB,YAAY,EAAE;AAAA,EACxD;AACA,SAAO;AACT;AAEA,SAAS,eAAe,OAAkC;AACxD,QAAM,WAAW;AACjB,QAAM,QAAQ,MAAM,MAAM,GAAG,QAAQ,EAAE,KAAK,IAAI;AAChD,MAAI,MAAM,UAAU,SAAU,QAAO;AACrC,SAAO,GAAG,KAAK,SAAS,MAAM,SAAS,QAAQ;AACjD;","names":[]}
@@ -0,0 +1,399 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ FRAMEWORK_PNPM_OVERRIDES
4
+ } from "./chunk-ZEELHSY3.mjs";
5
+ import {
6
+ DEFAULT_WEB_BASE_URL
7
+ } from "./chunk-M7UVBANQ.mjs";
8
+
9
+ // src/services/project/workspace-dependencies.ts
10
+ import crypto from "crypto";
11
+ import { spawn } from "child_process";
12
+ import "events";
13
+ import { existsSync } from "fs";
14
+ import { mkdir, lstat, readFile, rm, writeFile } from "fs/promises";
15
+ import path from "path";
16
+ import { fileURLToPath } from "url";
17
+
18
+ // src/services/project/dependency-tooling-messages.ts
19
+ var DEPENDENCY_SETUP_DOCS_PATH = "/docs/reference/dependency-setup";
20
+ var DEPENDENCY_SETUP_DOCS_URL = `${DEFAULT_WEB_BASE_URL}${DEPENDENCY_SETUP_DOCS_PATH}`;
21
+ function buildMissingDependencyToolingMessage() {
22
+ return [
23
+ "Dreamboard needs dependency tooling to prepare this workspace.",
24
+ "Use Node 24+ with Corepack enabled, then rerun the command.",
25
+ "If Corepack is unavailable on this machine, install pnpm globally with `npm install -g pnpm`.",
26
+ `Help: ${DEPENDENCY_SETUP_DOCS_URL}`
27
+ ].join("\n");
28
+ }
29
+ function buildPackageLockConflictMessage() {
30
+ return [
31
+ "Dreamboard manages workspace dependencies during project setup.",
32
+ "This workspace has an npm lockfile that conflicts with Dreamboard-managed dependencies.",
33
+ "Remove `package-lock.json` and rerun the command.",
34
+ `Help: ${DEPENDENCY_SETUP_DOCS_URL}`
35
+ ].join("\n");
36
+ }
37
+ function buildMissingGeneratedLockfileMessage() {
38
+ return [
39
+ "Dreamboard could not finish preparing workspace dependencies.",
40
+ "Diagnostic: `pnpm-lock.yaml` was not created.",
41
+ `Help: ${DEPENDENCY_SETUP_DOCS_URL}`
42
+ ].join("\n");
43
+ }
44
+ function buildDependencyPreparationFailureMessage(options) {
45
+ const details = options.output?.trim();
46
+ return [
47
+ `Dreamboard could not finish preparing workspace dependencies${options.exitCode != null ? ` (exit code ${options.exitCode})` : ""}.`,
48
+ details ? `Diagnostic output:
49
+ ${details}` : null,
50
+ `Help: ${DEPENDENCY_SETUP_DOCS_URL}`
51
+ ].filter(Boolean).join("\n");
52
+ }
53
+
54
+ // src/services/project/workspace-dependencies.ts
55
+ var MODULE_DIR = path.dirname(fileURLToPath(import.meta.url));
56
+ var CLI_ROOT = path.resolve(MODULE_DIR, "../../..");
57
+ var REPO_ROOT = path.resolve(CLI_ROOT, "../..");
58
+ var REPO_PACKAGE_JSON_PATH = path.join(REPO_ROOT, "package.json");
59
+ var DEFAULT_PACKAGE_MANAGER = "pnpm@10.4.1";
60
+ var SDK_PACKAGE_NAME = "@dreamboard-games/sdk";
61
+ var SDK_REQUIRED_DIST_FILES = [
62
+ "dist/index.d.ts",
63
+ "dist/index.js",
64
+ "dist/types.d.ts",
65
+ "dist/types.js",
66
+ "dist/ui.d.ts",
67
+ "dist/ui.js",
68
+ "dist/runtime.d.ts",
69
+ "dist/runtime.js"
70
+ ];
71
+ var DEPENDENCY_INSTALL_METADATA_PATH_SEGMENTS = [
72
+ ".dreamboard",
73
+ "dependency-install.json"
74
+ ];
75
+ var LockfileGenerationError = class extends Error {
76
+ constructor(binary, details) {
77
+ super(buildLockfileGenerationErrorMessage(binary, details), {
78
+ cause: details.cause
79
+ });
80
+ this.binary = binary;
81
+ this.details = details;
82
+ this.name = "LockfileGenerationError";
83
+ }
84
+ };
85
+ async function generatePnpmLockfile(projectRoot, _options = {}) {
86
+ await ensurePackageManagerNormalized(projectRoot);
87
+ await assertNoNpmLockfileConflict(projectRoot);
88
+ await runPackageManagerCommand(projectRoot, {
89
+ args: [
90
+ "install",
91
+ "--ignore-workspace",
92
+ "--lockfile-only",
93
+ "--config.shared-workspace-lockfile=false"
94
+ ]
95
+ });
96
+ await assertPnpmLockfilePresent(projectRoot);
97
+ return true;
98
+ }
99
+ async function installWorkspaceDependencies(projectRoot, _options = {}) {
100
+ const result = await reconcileWorkspaceDependencies(projectRoot);
101
+ return result.required;
102
+ }
103
+ async function installFrozenWorkspaceDependencies(projectRoot) {
104
+ const packageJsonPath = path.join(projectRoot, "package.json");
105
+ if (!await pathExists(packageJsonPath)) {
106
+ return false;
107
+ }
108
+ await assertNoNpmLockfileConflict(projectRoot);
109
+ await assertPnpmLockfilePresent(projectRoot);
110
+ await runPackageManagerCommand(projectRoot, {
111
+ args: [
112
+ "install",
113
+ "--ignore-workspace",
114
+ "--frozen-lockfile",
115
+ "--ignore-scripts",
116
+ "--config.shared-workspace-lockfile=false"
117
+ ]
118
+ });
119
+ return true;
120
+ }
121
+ async function reconcileWorkspaceDependencies(projectRoot) {
122
+ const packageJsonPath = path.join(projectRoot, "package.json");
123
+ if (!await pathExists(packageJsonPath)) {
124
+ return {
125
+ required: false,
126
+ installed: false,
127
+ lockfileGenerated: false,
128
+ packageManagerNormalized: false,
129
+ fingerprint: null
130
+ };
131
+ }
132
+ await assertNoNpmLockfileConflict(projectRoot);
133
+ const packageManagerNormalized = await ensurePackageManagerNormalized(projectRoot);
134
+ const pnpmLockfilePath = path.join(projectRoot, "pnpm-lock.yaml");
135
+ const nodeModulesPath = path.join(projectRoot, "node_modules");
136
+ const metadataPath = path.join(
137
+ projectRoot,
138
+ ...DEPENDENCY_INSTALL_METADATA_PATH_SEGMENTS
139
+ );
140
+ let lockfileGenerated = false;
141
+ let installed = false;
142
+ const metadata = await readJsonFile(metadataPath);
143
+ const lockfileExists = await pathExists(pnpmLockfilePath);
144
+ if (!lockfileExists) {
145
+ await runPackageManagerCommand(projectRoot, {
146
+ args: [
147
+ "install",
148
+ "--ignore-workspace",
149
+ "--config.shared-workspace-lockfile=false"
150
+ ]
151
+ });
152
+ lockfileGenerated = true;
153
+ installed = true;
154
+ }
155
+ await assertPnpmLockfilePresent(projectRoot);
156
+ let fingerprint = await fingerprintInstallManifest({
157
+ packageJsonPath,
158
+ lockfilePath: pnpmLockfilePath
159
+ });
160
+ const hasValidInstalledDeps = await pathExists(nodeModulesPath) && await hasValidInstalledDependencies({
161
+ packageJsonPath,
162
+ nodeModulesPath
163
+ });
164
+ const shouldInstall = !installed && (metadata?.dependencyFingerprint !== fingerprint || !hasValidInstalledDeps);
165
+ if (shouldInstall) {
166
+ await rm(nodeModulesPath, { recursive: true, force: true });
167
+ await runPackageManagerCommand(projectRoot, {
168
+ args: [
169
+ "install",
170
+ "--ignore-workspace",
171
+ "--config.shared-workspace-lockfile=false"
172
+ ]
173
+ });
174
+ installed = true;
175
+ fingerprint = await fingerprintInstallManifest({
176
+ packageJsonPath,
177
+ lockfilePath: pnpmLockfilePath
178
+ });
179
+ }
180
+ if (installed || packageManagerNormalized || !metadata) {
181
+ await mkdir(path.dirname(metadataPath), { recursive: true });
182
+ await writeJsonFile(metadataPath, {
183
+ dependencyFingerprint: fingerprint,
184
+ installedAt: (/* @__PURE__ */ new Date()).toISOString(),
185
+ packageManager: await readRepoPackageManager()
186
+ });
187
+ }
188
+ return {
189
+ required: true,
190
+ installed,
191
+ lockfileGenerated,
192
+ packageManagerNormalized,
193
+ fingerprint
194
+ };
195
+ }
196
+ async function assertNoNpmLockfileConflict(projectRoot) {
197
+ const packageLockPath = path.join(projectRoot, "package-lock.json");
198
+ const pnpmLockPath = path.join(projectRoot, "pnpm-lock.yaml");
199
+ if (await pathExists(packageLockPath) && !await pathExists(pnpmLockPath)) {
200
+ throw new Error(buildPackageLockConflictMessage());
201
+ }
202
+ }
203
+ async function assertPnpmLockfilePresent(projectRoot) {
204
+ const pnpmLockfilePath = path.join(projectRoot, "pnpm-lock.yaml");
205
+ if (!await pathExists(pnpmLockfilePath)) {
206
+ throw new Error(buildMissingGeneratedLockfileMessage());
207
+ }
208
+ }
209
+ async function ensurePackageManagerNormalized(projectRoot) {
210
+ const packageJsonPath = path.join(projectRoot, "package.json");
211
+ const packageJsonContent = await readFile(packageJsonPath, "utf8");
212
+ const packageJson = JSON.parse(packageJsonContent);
213
+ const packageManager = await readRepoPackageManager();
214
+ const nextPackageJson = {
215
+ ...packageJson,
216
+ packageManager,
217
+ pnpm: mergePnpmConfig(packageJson.pnpm)
218
+ };
219
+ const normalizedPackageJson = `${JSON.stringify(nextPackageJson, null, 2)}
220
+ `;
221
+ if (normalizedPackageJson === packageJsonContent) {
222
+ return false;
223
+ }
224
+ await writeFile(packageJsonPath, normalizedPackageJson, "utf8");
225
+ return true;
226
+ }
227
+ function mergePnpmConfig(existingPnpm) {
228
+ const existingOverrides = existingPnpm?.overrides && typeof existingPnpm.overrides === "object" && !Array.isArray(existingPnpm.overrides) ? existingPnpm.overrides : {};
229
+ return {
230
+ ...existingPnpm ?? {},
231
+ overrides: {
232
+ ...existingOverrides,
233
+ ...FRAMEWORK_PNPM_OVERRIDES
234
+ }
235
+ };
236
+ }
237
+ async function fingerprintInstallManifest(options) {
238
+ const packageJson = await readFile(options.packageJsonPath, "utf8");
239
+ const lockfile = await readFile(options.lockfilePath, "utf8");
240
+ const packageManager = await readRepoPackageManager();
241
+ return fingerprintContent([
242
+ packageJson,
243
+ lockfile,
244
+ `packageManager:${packageManager}`
245
+ ]);
246
+ }
247
+ async function hasValidInstalledDependencies(options) {
248
+ const packageJson = await readJsonFile(
249
+ options.packageJsonPath
250
+ );
251
+ if (!packageJson) {
252
+ return false;
253
+ }
254
+ const directDependencyNames = /* @__PURE__ */ new Set();
255
+ for (const field of [
256
+ "dependencies",
257
+ "devDependencies",
258
+ "optionalDependencies"
259
+ ]) {
260
+ for (const packageName of Object.keys(packageJson[field] ?? {})) {
261
+ directDependencyNames.add(packageName);
262
+ }
263
+ }
264
+ if (directDependencyNames.size === 0) {
265
+ return true;
266
+ }
267
+ for (const packageName of directDependencyNames) {
268
+ const packageRoot = path.join(
269
+ options.nodeModulesPath,
270
+ ...packageName.split("/")
271
+ );
272
+ if (!await pathExists(path.join(packageRoot, "package.json"))) {
273
+ return false;
274
+ }
275
+ if (packageName === SDK_PACKAGE_NAME && !await hasInstalledSdkDistFiles(packageRoot)) {
276
+ return false;
277
+ }
278
+ }
279
+ return true;
280
+ }
281
+ async function hasInstalledSdkDistFiles(packageRoot) {
282
+ for (const relativePath of SDK_REQUIRED_DIST_FILES) {
283
+ if (!await pathExists(path.join(packageRoot, relativePath))) {
284
+ return false;
285
+ }
286
+ }
287
+ return true;
288
+ }
289
+ function hasExactPnpmVersion(value) {
290
+ return /^pnpm@\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(value ?? "");
291
+ }
292
+ async function readRepoPackageManager() {
293
+ const packageJson = await readJsonFile(
294
+ REPO_PACKAGE_JSON_PATH
295
+ );
296
+ const packageManager = packageJson?.packageManager?.trim();
297
+ return hasExactPnpmVersion(packageManager) ? packageManager : DEFAULT_PACKAGE_MANAGER;
298
+ }
299
+ function fingerprintContent(parts) {
300
+ return crypto.createHash("sha256").update(parts.join("\n---\n")).digest("hex");
301
+ }
302
+ function resolvePnpmInstallInvocation(installArgs) {
303
+ const corepackPath = path.join(path.dirname(process.execPath), "corepack");
304
+ if (existsSync(corepackPath)) {
305
+ return { command: corepackPath, args: ["pnpm", ...installArgs] };
306
+ }
307
+ return { command: "pnpm", args: [...installArgs] };
308
+ }
309
+ async function runPackageManagerCommand(projectRoot, command) {
310
+ const invocation = resolvePnpmInstallInvocation(command.args);
311
+ await runLockfileCommand(projectRoot, {
312
+ binary: invocation.command,
313
+ args: invocation.args
314
+ });
315
+ }
316
+ async function runLockfileCommand(projectRoot, command) {
317
+ await new Promise((resolve, reject) => {
318
+ const child = spawn(command.binary, command.args, {
319
+ cwd: projectRoot,
320
+ env: process.env,
321
+ stdio: ["ignore", "pipe", "pipe"]
322
+ });
323
+ let stdout = "";
324
+ let stderr = "";
325
+ bindStream(child.stdout, (chunk) => {
326
+ stdout += chunk.toString();
327
+ });
328
+ bindStream(child.stderr, (chunk) => {
329
+ stderr += chunk.toString();
330
+ });
331
+ child.on("error", (cause) => {
332
+ reject(
333
+ new LockfileGenerationError(command.binary, {
334
+ stdout,
335
+ stderr,
336
+ cause
337
+ })
338
+ );
339
+ });
340
+ child.on("close", (code) => {
341
+ if (code === 0) {
342
+ resolve();
343
+ return;
344
+ }
345
+ reject(
346
+ new LockfileGenerationError(command.binary, {
347
+ code,
348
+ stdout,
349
+ stderr
350
+ })
351
+ );
352
+ });
353
+ });
354
+ }
355
+ function buildLockfileGenerationErrorMessage(binary, details) {
356
+ if (details.cause) {
357
+ const errnoError = details.cause;
358
+ const binaryName = path.basename(binary).toLowerCase();
359
+ if (errnoError.code === "ENOENT" && (binaryName === "pnpm" || binaryName === "pnpm.cmd" || binaryName === "corepack" || binaryName === "corepack.exe")) {
360
+ return buildMissingDependencyToolingMessage();
361
+ }
362
+ return `Failed to start ${binary} for Dreamboard dependency reconciliation. ${details.cause.message}`;
363
+ }
364
+ const output = [details.stdout.trim(), details.stderr.trim()].filter((chunk) => chunk.length > 0).join("\n");
365
+ return buildDependencyPreparationFailureMessage({
366
+ exitCode: details.code,
367
+ output
368
+ });
369
+ }
370
+ async function pathExists(targetPath) {
371
+ try {
372
+ await lstat(targetPath);
373
+ return true;
374
+ } catch {
375
+ return false;
376
+ }
377
+ }
378
+ async function readJsonFile(filePath) {
379
+ try {
380
+ return JSON.parse(await readFile(filePath, "utf8"));
381
+ } catch {
382
+ return null;
383
+ }
384
+ }
385
+ async function writeJsonFile(filePath, value) {
386
+ await writeFile(filePath, `${JSON.stringify(value, null, 2)}
387
+ `, "utf8");
388
+ }
389
+ function bindStream(stream, onData) {
390
+ stream?.on("data", onData);
391
+ }
392
+
393
+ export {
394
+ generatePnpmLockfile,
395
+ installWorkspaceDependencies,
396
+ installFrozenWorkspaceDependencies,
397
+ reconcileWorkspaceDependencies
398
+ };
399
+ //# sourceMappingURL=chunk-4I2WWAPK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/project/workspace-dependencies.ts","../../src/services/project/dependency-tooling-messages.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport { spawn } from \"node:child_process\";\nimport { EventEmitter } from \"node:events\";\nimport { existsSync } from \"node:fs\";\nimport { mkdir, lstat, readFile, rm, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport type { Readable } from \"node:stream\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n buildDependencyPreparationFailureMessage,\n buildMissingDependencyToolingMessage,\n buildMissingGeneratedLockfileMessage,\n buildPackageLockConflictMessage,\n} from \"./dependency-tooling-messages.js\";\nimport { FRAMEWORK_PNPM_OVERRIDES } from \"./framework-dependencies.js\";\n\ntype LockfileGenerationOptions = Record<string, never>;\n\ntype PackageJsonShape = {\n packageManager?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n pnpm?: Record<string, unknown>;\n};\n\ntype DependencyInstallMetadata = {\n dependencyFingerprint: string;\n installedAt: string;\n packageManager: string;\n};\n\ntype LockfileCommand = {\n binary: string;\n args: string[];\n};\n\nexport type WorkspaceDependencyReconciliationResult = {\n required: boolean;\n installed: boolean;\n lockfileGenerated: boolean;\n packageManagerNormalized: boolean;\n fingerprint: string | null;\n};\n\nconst MODULE_DIR = path.dirname(fileURLToPath(import.meta.url));\nconst CLI_ROOT = path.resolve(MODULE_DIR, \"../../..\");\nconst REPO_ROOT = path.resolve(CLI_ROOT, \"../..\");\nconst REPO_PACKAGE_JSON_PATH = path.join(REPO_ROOT, \"package.json\");\nconst DEFAULT_PACKAGE_MANAGER = \"pnpm@10.4.1\";\nconst SDK_PACKAGE_NAME = \"@dreamboard-games/sdk\";\nconst SDK_REQUIRED_DIST_FILES = [\n \"dist/index.d.ts\",\n \"dist/index.js\",\n \"dist/types.d.ts\",\n \"dist/types.js\",\n \"dist/ui.d.ts\",\n \"dist/ui.js\",\n \"dist/runtime.d.ts\",\n \"dist/runtime.js\",\n] as const;\nconst DEPENDENCY_INSTALL_METADATA_PATH_SEGMENTS = [\n \".dreamboard\",\n \"dependency-install.json\",\n] as const;\n\nclass LockfileGenerationError extends Error {\n constructor(\n readonly binary: string,\n readonly details: {\n code?: number | null;\n stdout: string;\n stderr: string;\n cause?: Error;\n },\n ) {\n super(buildLockfileGenerationErrorMessage(binary, details), {\n cause: details.cause,\n });\n this.name = \"LockfileGenerationError\";\n }\n}\n\nexport async function generatePnpmLockfile(\n projectRoot: string,\n _options: LockfileGenerationOptions = {},\n): Promise<boolean> {\n await ensurePackageManagerNormalized(projectRoot);\n await assertNoNpmLockfileConflict(projectRoot);\n await runPackageManagerCommand(projectRoot, {\n args: [\n \"install\",\n \"--ignore-workspace\",\n \"--lockfile-only\",\n \"--config.shared-workspace-lockfile=false\",\n ],\n });\n await assertPnpmLockfilePresent(projectRoot);\n return true;\n}\n\nexport async function installWorkspaceDependencies(\n projectRoot: string,\n _options: LockfileGenerationOptions = {},\n): Promise<boolean> {\n const result = await reconcileWorkspaceDependencies(projectRoot);\n return result.required;\n}\n\nexport async function installFrozenWorkspaceDependencies(\n projectRoot: string,\n): Promise<boolean> {\n const packageJsonPath = path.join(projectRoot, \"package.json\");\n if (!(await pathExists(packageJsonPath))) {\n return false;\n }\n\n await assertNoNpmLockfileConflict(projectRoot);\n await assertPnpmLockfilePresent(projectRoot);\n await runPackageManagerCommand(projectRoot, {\n args: [\n \"install\",\n \"--ignore-workspace\",\n \"--frozen-lockfile\",\n \"--ignore-scripts\",\n \"--config.shared-workspace-lockfile=false\",\n ],\n });\n return true;\n}\n\nexport async function reconcileWorkspaceDependencies(\n projectRoot: string,\n): Promise<WorkspaceDependencyReconciliationResult> {\n const packageJsonPath = path.join(projectRoot, \"package.json\");\n if (!(await pathExists(packageJsonPath))) {\n return {\n required: false,\n installed: false,\n lockfileGenerated: false,\n packageManagerNormalized: false,\n fingerprint: null,\n };\n }\n\n await assertNoNpmLockfileConflict(projectRoot);\n const packageManagerNormalized =\n await ensurePackageManagerNormalized(projectRoot);\n const pnpmLockfilePath = path.join(projectRoot, \"pnpm-lock.yaml\");\n const nodeModulesPath = path.join(projectRoot, \"node_modules\");\n const metadataPath = path.join(\n projectRoot,\n ...DEPENDENCY_INSTALL_METADATA_PATH_SEGMENTS,\n );\n\n let lockfileGenerated = false;\n let installed = false;\n const metadata = await readJsonFile<DependencyInstallMetadata>(metadataPath);\n const lockfileExists = await pathExists(pnpmLockfilePath);\n\n if (!lockfileExists) {\n await runPackageManagerCommand(projectRoot, {\n args: [\n \"install\",\n \"--ignore-workspace\",\n \"--config.shared-workspace-lockfile=false\",\n ],\n });\n lockfileGenerated = true;\n installed = true;\n }\n\n await assertPnpmLockfilePresent(projectRoot);\n let fingerprint = await fingerprintInstallManifest({\n packageJsonPath,\n lockfilePath: pnpmLockfilePath,\n });\n const hasValidInstalledDeps =\n (await pathExists(nodeModulesPath)) &&\n (await hasValidInstalledDependencies({\n packageJsonPath,\n nodeModulesPath,\n }));\n const shouldInstall =\n !installed &&\n (metadata?.dependencyFingerprint !== fingerprint || !hasValidInstalledDeps);\n\n if (shouldInstall) {\n await rm(nodeModulesPath, { recursive: true, force: true });\n await runPackageManagerCommand(projectRoot, {\n args: [\n \"install\",\n \"--ignore-workspace\",\n \"--config.shared-workspace-lockfile=false\",\n ],\n });\n installed = true;\n fingerprint = await fingerprintInstallManifest({\n packageJsonPath,\n lockfilePath: pnpmLockfilePath,\n });\n }\n\n if (installed || packageManagerNormalized || !metadata) {\n await mkdir(path.dirname(metadataPath), { recursive: true });\n await writeJsonFile(metadataPath, {\n dependencyFingerprint: fingerprint,\n installedAt: new Date().toISOString(),\n packageManager: await readRepoPackageManager(),\n } satisfies DependencyInstallMetadata);\n }\n\n return {\n required: true,\n installed,\n lockfileGenerated,\n packageManagerNormalized,\n fingerprint,\n };\n}\n\nasync function assertNoNpmLockfileConflict(projectRoot: string): Promise<void> {\n const packageLockPath = path.join(projectRoot, \"package-lock.json\");\n const pnpmLockPath = path.join(projectRoot, \"pnpm-lock.yaml\");\n if (\n (await pathExists(packageLockPath)) &&\n !(await pathExists(pnpmLockPath))\n ) {\n throw new Error(buildPackageLockConflictMessage());\n }\n}\n\nasync function assertPnpmLockfilePresent(projectRoot: string): Promise<void> {\n const pnpmLockfilePath = path.join(projectRoot, \"pnpm-lock.yaml\");\n if (!(await pathExists(pnpmLockfilePath))) {\n throw new Error(buildMissingGeneratedLockfileMessage());\n }\n}\n\nasync function ensurePackageManagerNormalized(\n projectRoot: string,\n): Promise<boolean> {\n const packageJsonPath = path.join(projectRoot, \"package.json\");\n const packageJsonContent = await readFile(packageJsonPath, \"utf8\");\n const packageJson = JSON.parse(packageJsonContent) as PackageJsonShape;\n const packageManager = await readRepoPackageManager();\n const nextPackageJson: PackageJsonShape = {\n ...packageJson,\n packageManager,\n pnpm: mergePnpmConfig(packageJson.pnpm),\n };\n const normalizedPackageJson = `${JSON.stringify(nextPackageJson, null, 2)}\\n`;\n if (normalizedPackageJson === packageJsonContent) {\n return false;\n }\n await writeFile(packageJsonPath, normalizedPackageJson, \"utf8\");\n return true;\n}\n\nfunction mergePnpmConfig(\n existingPnpm: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n const existingOverrides =\n existingPnpm?.overrides &&\n typeof existingPnpm.overrides === \"object\" &&\n !Array.isArray(existingPnpm.overrides)\n ? (existingPnpm.overrides as Record<string, unknown>)\n : {};\n return {\n ...(existingPnpm ?? {}),\n overrides: {\n ...existingOverrides,\n ...FRAMEWORK_PNPM_OVERRIDES,\n },\n };\n}\n\nasync function fingerprintInstallManifest(options: {\n packageJsonPath: string;\n lockfilePath: string;\n}): Promise<string> {\n const packageJson = await readFile(options.packageJsonPath, \"utf8\");\n const lockfile = await readFile(options.lockfilePath, \"utf8\");\n const packageManager = await readRepoPackageManager();\n return fingerprintContent([\n packageJson,\n lockfile,\n `packageManager:${packageManager}`,\n ]);\n}\n\nasync function hasValidInstalledDependencies(options: {\n packageJsonPath: string;\n nodeModulesPath: string;\n}): Promise<boolean> {\n const packageJson = await readJsonFile<PackageJsonShape>(\n options.packageJsonPath,\n );\n if (!packageJson) {\n return false;\n }\n\n const directDependencyNames = new Set<string>();\n for (const field of [\n \"dependencies\",\n \"devDependencies\",\n \"optionalDependencies\",\n ] as const) {\n for (const packageName of Object.keys(packageJson[field] ?? {})) {\n directDependencyNames.add(packageName);\n }\n }\n\n if (directDependencyNames.size === 0) {\n return true;\n }\n\n for (const packageName of directDependencyNames) {\n const packageRoot = path.join(\n options.nodeModulesPath,\n ...packageName.split(\"/\"),\n );\n if (!(await pathExists(path.join(packageRoot, \"package.json\")))) {\n return false;\n }\n if (\n packageName === SDK_PACKAGE_NAME &&\n !(await hasInstalledSdkDistFiles(packageRoot))\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nasync function hasInstalledSdkDistFiles(packageRoot: string): Promise<boolean> {\n for (const relativePath of SDK_REQUIRED_DIST_FILES) {\n if (!(await pathExists(path.join(packageRoot, relativePath)))) {\n return false;\n }\n }\n return true;\n}\n\nfunction hasExactPnpmVersion(value?: string): boolean {\n return /^pnpm@\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(value ?? \"\");\n}\n\nasync function readRepoPackageManager(): Promise<string> {\n const packageJson = await readJsonFile<PackageJsonShape>(\n REPO_PACKAGE_JSON_PATH,\n );\n const packageManager = packageJson?.packageManager?.trim();\n return hasExactPnpmVersion(packageManager)\n ? packageManager!\n : DEFAULT_PACKAGE_MANAGER;\n}\n\nfunction fingerprintContent(parts: string[]): string {\n return crypto\n .createHash(\"sha256\")\n .update(parts.join(\"\\n---\\n\"))\n .digest(\"hex\");\n}\n\nfunction resolvePnpmInstallInvocation(installArgs: readonly string[]): {\n command: string;\n args: string[];\n} {\n const corepackPath = path.join(path.dirname(process.execPath), \"corepack\");\n if (existsSync(corepackPath)) {\n return { command: corepackPath, args: [\"pnpm\", ...installArgs] };\n }\n return { command: \"pnpm\", args: [...installArgs] };\n}\n\nasync function runPackageManagerCommand(\n projectRoot: string,\n command: { args: string[] },\n): Promise<void> {\n const invocation = resolvePnpmInstallInvocation(command.args);\n await runLockfileCommand(projectRoot, {\n binary: invocation.command,\n args: invocation.args,\n });\n}\n\nasync function runLockfileCommand(\n projectRoot: string,\n command: LockfileCommand,\n): Promise<void> {\n await new Promise<void>((resolve, reject) => {\n const child = spawn(command.binary, command.args, {\n cwd: projectRoot,\n env: process.env,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n\n let stdout = \"\";\n let stderr = \"\";\n\n bindStream(child.stdout, (chunk) => {\n stdout += chunk.toString();\n });\n bindStream(child.stderr, (chunk) => {\n stderr += chunk.toString();\n });\n\n child.on(\"error\", (cause) => {\n reject(\n new LockfileGenerationError(command.binary, {\n stdout,\n stderr,\n cause,\n }),\n );\n });\n child.on(\"close\", (code) => {\n if (code === 0) {\n resolve();\n return;\n }\n reject(\n new LockfileGenerationError(command.binary, {\n code,\n stdout,\n stderr,\n }),\n );\n });\n });\n}\n\nfunction buildLockfileGenerationErrorMessage(\n binary: string,\n details: {\n code?: number | null;\n stdout: string;\n stderr: string;\n cause?: Error;\n },\n): string {\n if (details.cause) {\n const errnoError = details.cause as NodeJS.ErrnoException;\n const binaryName = path.basename(binary).toLowerCase();\n if (\n errnoError.code === \"ENOENT\" &&\n (binaryName === \"pnpm\" ||\n binaryName === \"pnpm.cmd\" ||\n binaryName === \"corepack\" ||\n binaryName === \"corepack.exe\")\n ) {\n return buildMissingDependencyToolingMessage();\n }\n return `Failed to start ${binary} for Dreamboard dependency reconciliation. ${details.cause.message}`;\n }\n\n const output = [details.stdout.trim(), details.stderr.trim()]\n .filter((chunk) => chunk.length > 0)\n .join(\"\\n\");\n\n return buildDependencyPreparationFailureMessage({\n exitCode: details.code,\n output,\n });\n}\n\nasync function pathExists(targetPath: string): Promise<boolean> {\n try {\n await lstat(targetPath);\n return true;\n } catch {\n return false;\n }\n}\n\nasync function readJsonFile<T>(filePath: string): Promise<T | null> {\n try {\n return JSON.parse(await readFile(filePath, \"utf8\")) as T;\n } catch {\n return null;\n }\n}\n\nasync function writeJsonFile(filePath: string, value: unknown): Promise<void> {\n await writeFile(filePath, `${JSON.stringify(value, null, 2)}\\n`, \"utf8\");\n}\n\nfunction bindStream(\n stream: Readable | EventEmitter | null | undefined,\n onData: (chunk: Buffer | string) => void,\n): void {\n stream?.on(\"data\", onData);\n}\n","import { DEFAULT_WEB_BASE_URL } from \"../../constants.js\";\n\nexport const DEPENDENCY_SETUP_DOCS_PATH = \"/docs/reference/dependency-setup\";\nexport const DEPENDENCY_SETUP_DOCS_URL = `${DEFAULT_WEB_BASE_URL}${DEPENDENCY_SETUP_DOCS_PATH}`;\n\nexport function buildMissingDependencyToolingMessage(): string {\n return [\n \"Dreamboard needs dependency tooling to prepare this workspace.\",\n \"Use Node 24+ with Corepack enabled, then rerun the command.\",\n \"If Corepack is unavailable on this machine, install pnpm globally with `npm install -g pnpm`.\",\n `Help: ${DEPENDENCY_SETUP_DOCS_URL}`,\n ].join(\"\\n\");\n}\n\nexport function buildPackageLockConflictMessage(): string {\n return [\n \"Dreamboard manages workspace dependencies during project setup.\",\n \"This workspace has an npm lockfile that conflicts with Dreamboard-managed dependencies.\",\n \"Remove `package-lock.json` and rerun the command.\",\n `Help: ${DEPENDENCY_SETUP_DOCS_URL}`,\n ].join(\"\\n\");\n}\n\nexport function buildMissingGeneratedLockfileMessage(): string {\n return [\n \"Dreamboard could not finish preparing workspace dependencies.\",\n \"Diagnostic: `pnpm-lock.yaml` was not created.\",\n `Help: ${DEPENDENCY_SETUP_DOCS_URL}`,\n ].join(\"\\n\");\n}\n\nexport function buildDependencyPreparationFailureMessage(options: {\n output?: string;\n exitCode?: number | null;\n}): string {\n const details = options.output?.trim();\n return [\n `Dreamboard could not finish preparing workspace dependencies${options.exitCode != null ? ` (exit code ${options.exitCode})` : \"\"}.`,\n details ? `Diagnostic output:\\n${details}` : null,\n `Help: ${DEPENDENCY_SETUP_DOCS_URL}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;AAAA,OAAO,YAAY;AACnB,SAAS,aAAa;AACtB,OAA6B;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,OAAO,OAAO,UAAU,IAAI,iBAAiB;AACtD,OAAO,UAAU;AAEjB,SAAS,qBAAqB;;;ACLvB,IAAM,6BAA6B;AACnC,IAAM,4BAA4B,GAAG,oBAAoB,GAAG,0BAA0B;AAEtF,SAAS,uCAA+C;AAC7D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,yBAAyB;AAAA,EACpC,EAAE,KAAK,IAAI;AACb;AAEO,SAAS,kCAA0C;AACxD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,yBAAyB;AAAA,EACpC,EAAE,KAAK,IAAI;AACb;AAEO,SAAS,uCAA+C;AAC7D,SAAO;AAAA,IACL;AAAA,IAC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