@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.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.
Files changed (335) hide show
  1. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
  2. package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
  3. package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
  4. package/dist/build-info.json +46 -46
  5. package/dist/internal/material-preview.d.ts +22 -0
  6. package/dist/internal/material-preview.d.ts.map +1 -0
  7. package/dist/internal/material-preview.js +186 -0
  8. package/dist/internal/material-preview.js.map +1 -0
  9. package/dist/internal/project-model-preview.d.ts +4 -0
  10. package/dist/internal/project-model-preview.d.ts.map +1 -0
  11. package/dist/internal/project-model-preview.js +359 -0
  12. package/dist/internal/project-model-preview.js.map +1 -0
  13. package/dist/local-editor-agent-context.d.ts +12 -1
  14. package/dist/local-editor-agent-context.d.ts.map +1 -1
  15. package/dist/local-editor-agent-context.js +47 -0
  16. package/dist/local-editor-agent-context.js.map +1 -1
  17. package/dist/local-editor-harness.d.ts +15 -2
  18. package/dist/local-editor-harness.d.ts.map +1 -1
  19. package/dist/local-editor-harness.js +326 -28
  20. package/dist/local-editor-harness.js.map +1 -1
  21. package/dist/local-editor-tools.d.ts +1 -0
  22. package/dist/local-editor-tools.d.ts.map +1 -1
  23. package/dist/local-editor-tools.js +3 -0
  24. package/dist/local-editor-tools.js.map +1 -1
  25. package/dist/playable-babylon-rendering.d.ts +8 -7
  26. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  27. package/dist/playable-babylon-rendering.js +77 -32
  28. package/dist/playable-babylon-rendering.js.map +1 -1
  29. package/dist/playable-local-editor-host.d.ts +4 -0
  30. package/dist/playable-local-editor-host.d.ts.map +1 -1
  31. package/dist/playable-local-editor-host.js +27 -0
  32. package/dist/playable-local-editor-host.js.map +1 -1
  33. package/dist/playable-product-projection-preview.d.ts +2 -0
  34. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  35. package/dist/playable-product-projection-preview.js +7 -4
  36. package/dist/playable-product-projection-preview.js.map +1 -1
  37. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  38. package/dist/playable-product-scene-capabilities.js +9 -3
  39. package/dist/playable-product-scene-capabilities.js.map +1 -1
  40. package/dist/playable-sdk.d.ts +1 -1
  41. package/dist/playable-sdk.d.ts.map +1 -1
  42. package/dist/playable-sdk.js +1 -1
  43. package/dist/playable-sdk.js.map +1 -1
  44. package/dist/playable-standard-project.d.ts +0 -1
  45. package/dist/playable-standard-project.d.ts.map +1 -1
  46. package/dist/playable-standard-project.js +17 -5
  47. package/dist/playable-standard-project.js.map +1 -1
  48. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
  49. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
  50. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
  51. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
  52. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
  53. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
  54. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
  55. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
  56. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
  57. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
  58. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
  59. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
  60. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
  61. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
  62. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
  63. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
  64. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
  65. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
  66. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
  67. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
  68. package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
  69. package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
  70. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
  72. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
  73. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  74. package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
  75. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  76. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
  77. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
  78. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
  79. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
  80. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  81. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
  82. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  83. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  85. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
  86. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  87. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
  88. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
  89. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
  90. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  91. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
  92. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  93. package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
  94. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  95. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  131. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  132. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
  133. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  134. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
  135. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
  137. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  138. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
  139. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
  140. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
  141. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
  142. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
  143. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  144. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  145. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
  146. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
  147. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
  148. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
  149. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
  157. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  158. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
  159. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
  161. package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
  162. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
  163. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
  165. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
  166. package/node_modules/@fps-games/editor-core/package.json +6 -6
  167. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  195. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  196. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
  197. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
  198. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
  199. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
  200. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
  201. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
  202. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
  203. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
  204. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
  205. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
  206. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
  207. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
  208. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
  209. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
  210. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
  211. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
  212. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
  213. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
  214. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
  215. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
  216. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
  217. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
  218. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
  219. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
  220. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
  221. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  222. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
  223. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +53 -0
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
  252. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  253. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
  254. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
  255. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
  256. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  257. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  258. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
  259. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
  260. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
  261. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  262. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
  263. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
  264. package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
  265. package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
  266. package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
  267. package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
  268. package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
  269. package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
  270. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
  271. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
  272. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
  273. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
  274. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  275. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  276. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  277. package/node_modules/@fps-games/playable-runtime/dist/runtime.d.ts.map +1 -1
  278. package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
  279. package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
  280. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
  281. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
  282. package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
  283. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  284. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  285. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  286. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  287. package/node_modules/@fps-games/plugin-assets/dist/reference.d.ts.map +1 -1
  288. package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
  289. package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
  290. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
  291. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
  292. package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
  293. package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
  294. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
  295. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
  296. package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
  297. package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
  298. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
  299. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
  300. package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
  301. package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +1 -1
  302. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  303. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  304. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  305. package/node_modules/@fps-games/plugin-assets/package.json +32 -8
  306. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  307. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  308. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  309. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  310. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  311. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  312. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  313. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  314. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  315. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  316. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  317. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  318. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  319. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  320. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  321. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  322. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  323. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  324. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  325. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  326. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  327. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  328. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  329. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  330. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  331. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  332. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  333. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  334. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  335. package/package.json +24 -22
@@ -1 +1 @@
1
- {"version":3,"file":"inspectors.js","sourceRoot":"","sources":["../../src/upgrade-doctor/inspectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,GAG9C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,4CAA4C,EAAE,MAAM,QAAQ,CAAC;AActE,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAClD,MAAM,uCAAuC,GAAG,+BAA+B,CAAC;AAChF,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAC5D,MAAM,2BAA2B,GAAG,iCAAiC,CAAC;AACtE,MAAM,mCAAmC,GAAG,+CAA+C,CAAC;AAC5F,MAAM,yBAAyB,GAAG,qCAAqC,CAAC;AACxE,MAAM,wBAAwB,GAAG,oCAAoC,CAAC;AACtE,MAAM,gCAAgC,GAAG,4CAA4C,CAAC;AACtF,MAAM,qBAAqB,GAAG;I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,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClF,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1F,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAiF;IACzG,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import {\n collectMissingPlayableEditorPackageAliasFiles,\n type PlayableEditorFileExists,\n type PlayableEditorPackageAliasPlan,\n} from '../package-resolution/index';\nimport { parse } from '@babel/parser';\nimport { createPlayableEditorDoctorReport } from './report';\nimport { inspectPlayableEditorHostCompatibilityReport } from './host';\nimport type {\n PlayableEditorDoctorDiagnostic,\n PlayableEditorDoctorReport,\n PlayableEditorImportBoundaryInspectionOptions,\n PlayableEditorImportSnapshot,\n PlayableEditorImportSnapshotFile,\n PlayableEditorInstalledVersionInspectionOptions,\n PlayableEditorInstalledVersionLike,\n PlayableEditorMigrationReadinessInspectionOptions,\n PlayableEditorPackageExportsInspectionOptions,\n PlayableEditorPackageExportsLike,\n PlayableEditorUpgradeReadinessInspectionInput,\n} from './types';\nimport { mergePlayableEditorDoctorReports } from './report';\n\nconst PLAYABLE_SDK_EXPORT_PATH = './playable-sdk';\nconst PLAYABLE_SDK_UPGRADE_DOCTOR_EXPORT_PATH = './playable-sdk/upgrade-doctor';\nconst PLAYABLE_SDK_VITE_EXPORT_PATH = './playable-sdk/vite';\nconst PLAYABLE_SDK_SUBPATH_PREFIX = '@fps-games/editor/playable-sdk/';\nconst PLAYABLE_SDK_UPGRADE_DOCTOR_SUBPATH = '@fps-games/editor/playable-sdk/upgrade-doctor';\nconst PLAYABLE_SDK_VITE_SUBPATH = '@fps-games/editor/playable-sdk/vite';\nconst PLAYABLE_RUNTIME_SUBPATH = '@fps-games/editor/playable-runtime';\nconst PLAYABLE_RUNTIME_BABYLON_SUBPATH = '@fps-games/editor/playable-runtime/babylon';\nconst DIRECT_EDITOR_IMPORTS = [\n '@fps-games/editor',\n '@fps-games/editor-core',\n] as const;\n\n/**\n * Default forbidden packages for new playable editor integration code.\n * These packages are internal to the editor framework and should not be\n * imported directly from project-side code. Use @fps-games/editor/playable-sdk\n * facade exports instead.\n */\nexport const PLAYABLE_EDITOR_DEFAULT_FORBIDDEN_PACKAGES: readonly string[] = [\n '@fps-games/editor-agent-bridge',\n '@fps-games/editor-babylon',\n '@fps-games/editor-browser',\n '@fps-games/editor-forge-play',\n '@fps-games/editor-playable-sdk',\n '@fps-games/editor-protocol',\n '@fps-games/babylon-renderer',\n];\n\nexport function inspectPlayableEditorPackageAliasPlan(\n plan: PlayableEditorPackageAliasPlan,\n fileExists: PlayableEditorFileExists,\n options: { title?: string } = {},\n): PlayableEditorDoctorReport {\n const missing = collectMissingPlayableEditorPackageAliasFiles(plan, fileExists);\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor package aliases',\n diagnostics: missing.map(entry => ({\n severity: 'error',\n code: 'package.alias.missing-file',\n source: entry.packageId,\n path: entry.file,\n message: `Package alias for ${entry.packageId} points to a missing file.`,\n })),\n });\n}\n\nexport function inspectPlayableEditorPackageExports(\n packageJson: PlayableEditorPackageExportsLike,\n options: PlayableEditorPackageExportsInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const packageName = options.packageName ?? readString(packageJson.name) ?? '@fps-games/editor';\n const exportPath = options.playableSdkExportPath ?? PLAYABLE_SDK_EXPORT_PATH;\n const upgradeDoctorExportPath = options.playableSdkUpgradeDoctorExportPath ?? PLAYABLE_SDK_UPGRADE_DOCTOR_EXPORT_PATH;\n const viteExportPath = options.playableSdkViteExportPath ?? PLAYABLE_SDK_VITE_EXPORT_PATH;\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n\n if (!isRecord(packageJson.exports)) {\n diagnostics.push({\n severity: 'error',\n code: 'package.export.invalid',\n source: packageName,\n path: 'exports',\n message: `Package ${packageName} must expose an object exports map.`,\n });\n } else {\n for (const requiredExportPath of [exportPath, upgradeDoctorExportPath, viteExportPath]) {\n const hasExport = requiredExportPath in packageJson.exports;\n const usableTarget = hasExport && (\n requiredExportPath === upgradeDoctorExportPath\n ? isUsableNodePackageExportTarget(packageJson.exports[requiredExportPath])\n : isUsablePackageExportTarget(packageJson.exports[requiredExportPath])\n );\n if (usableTarget) continue;\n diagnostics.push({\n severity: 'error',\n code: hasExport ? 'package.export.invalid-target' : 'package.export.missing',\n source: packageName,\n path: `exports[\"${requiredExportPath}\"]`,\n message: hasExport\n ? `Package ${packageName} has no usable runtime target for the ${requiredExportPath} export.`\n : `Package ${packageName} is missing the ${requiredExportPath} export.`,\n });\n }\n }\n\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor package exports',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorInstalledVersion(\n packageJson: PlayableEditorInstalledVersionLike,\n options: PlayableEditorInstalledVersionInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const packageName = options.packageName\n ?? readString(packageJson.packageName)\n ?? '@fps-games/editor';\n const declaredVersion = readString(packageJson.declaredVersion);\n const installedVersion = readString(packageJson.installedVersion);\n const source = readString(packageJson.source) ?? packageName;\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n\n if (declaredVersion && installedVersion && isExactDependencyVersion(declaredVersion) && declaredVersion !== installedVersion) {\n diagnostics.push({\n severity: options.exactMismatchSeverity ?? 'error',\n code: 'package.version.installed-mismatch',\n source,\n path: 'dependencies',\n details: { packageName, declaredVersion, installedVersion },\n message: `Project declares ${packageName}@${declaredVersion}, but node_modules contains ${installedVersion}. Reinstall dependencies and restart the dev server.`,\n });\n }\n\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor installed version',\n diagnostics,\n });\n}\n\nexport function createPlayableEditorImportSnapshot(\n files: readonly PlayableEditorImportSnapshotFile[],\n): PlayableEditorImportSnapshot {\n return {\n files: files.map(file => ({\n filePath: file.filePath,\n content: file.content,\n })),\n };\n}\n\nexport function inspectPlayableEditorImportBoundaries(\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[],\n options: PlayableEditorImportBoundaryInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const files: readonly PlayableEditorImportSnapshotFile[] = isImportSnapshot(snapshot)\n ? snapshot.files\n : snapshot;\n const forbiddenPackages = normalizeForbiddenPackages(\n options.forbiddenPackages ?? PLAYABLE_EDITOR_DEFAULT_FORBIDDEN_PACKAGES,\n );\n const forbiddenPackageSeverity = options.forbiddenPackageSeverity ?? 'warning';\n const diagnostics = files.flatMap(file =>\n inspectFileImports(file, forbiddenPackages, forbiddenPackageSeverity),\n );\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor import boundaries',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorMigrationReadiness(\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[],\n options: PlayableEditorMigrationReadinessInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const files: readonly PlayableEditorImportSnapshotFile[] = isImportSnapshot(snapshot)\n ? snapshot.files\n : snapshot;\n const diagnostics = files.flatMap(file => inspectMigrationReadinessFile(file, options));\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor hard-cut readiness',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorUpgradeReadiness(\n input: PlayableEditorUpgradeReadinessInspectionInput = {},\n): PlayableEditorDoctorReport {\n const reports: PlayableEditorDoctorReport[] = [];\n if (input.hostCompatibility) {\n reports.push(inspectPlayableEditorHostCompatibilityReport(\n input.hostCompatibility.report,\n input.hostCompatibility.options,\n ));\n }\n if (input.packageAliasPlan) {\n reports.push(inspectPlayableEditorPackageAliasPlan(\n input.packageAliasPlan.plan,\n input.packageAliasPlan.fileExists,\n { title: input.packageAliasPlan.title },\n ));\n }\n if (input.packageExports) {\n reports.push(inspectPlayableEditorPackageExports(\n input.packageExports.packageJson,\n input.packageExports.options,\n ));\n }\n if (input.installedVersion) {\n reports.push(inspectPlayableEditorInstalledVersion(\n input.installedVersion.packageJson,\n input.installedVersion.options,\n ));\n }\n if (input.importBoundaries) {\n reports.push(inspectPlayableEditorImportBoundaries(\n input.importBoundaries.snapshot,\n input.importBoundaries.options,\n ));\n }\n if (input.migrationReadiness) {\n reports.push(inspectPlayableEditorMigrationReadiness(\n input.migrationReadiness.snapshot,\n input.migrationReadiness.options,\n ));\n }\n return mergePlayableEditorDoctorReports(reports, {\n title: input.title ?? 'Playable editor upgrade readiness',\n });\n}\n\nfunction inspectMigrationReadinessFile(\n file: PlayableEditorImportSnapshotFile,\n options: PlayableEditorMigrationReadinessInspectionOptions,\n): PlayableEditorDoctorDiagnostic[] {\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n const content = file.content;\n if (/\\bassertRuntimeSceneConfig(?:ModulePath|ExportName)\\b/.test(content)) {\n diagnostics.push({\n severity: 'warning',\n code: 'hard-cut.scene-artifact.project-validator-hook-removed',\n path: file.filePath,\n message: 'Removed project SceneArtifact validator hook detected; delete assertRuntimeSceneConfigModulePath/assertRuntimeSceneConfigExportName because @fps-games/editor/playable-sdk now validates the canonical runtime artifact.',\n });\n }\n if (/\\bhierarchyContextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.browser-callbacks-removed',\n path: file.filePath,\n message: 'Removed hierarchyContextActions Browser callback API detected; migrate each action to a typed capabilities.hierarchyActions.operations contribution.',\n });\n }\n if (/\\bcreateLocalEditorHarness\\b/.test(content) && /\\bcontextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.direct-harness',\n path: file.filePath,\n message: 'Removed hierarchy.contextActions API detected; migrate each action to a typed capabilities.hierarchyActions.operations contribution.',\n });\n }\n if (/\\bhierarchyActions\\b/.test(content) && /\\bcontextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.context-actions-removed',\n path: file.filePath,\n message: 'Removed capabilities.hierarchyActions.contextActions API detected; use capabilities.hierarchyActions.operations.',\n });\n }\n const retiredBypassPattern = new RegExp(`\\\\binstall${'Leg' + 'acy'}AssetCommandBypass\\\\b|__project${'Leg' + 'acy'}AssetBypass`);\n if (retiredBypassPattern.test(content)) {\n diagnostics.push({\n severity: options.retiredAssetBypassSeverity ?? 'error',\n code: 'hard-cut.asset-bypass.retired-helper',\n path: file.filePath,\n message: 'A retired asset command bypass helper was detected; delete it and use product asset capabilities.',\n });\n }\n const retiredRuntimePattern = new RegExp(\n `__bridge${'Leg' + 'acy'}EditorRuntime|register${'Leg' + 'acy'}RuntimeProxy|install${'Leg' + 'acy'}CommandBypass`,\n );\n if (retiredRuntimePattern.test(content)) {\n diagnostics.push({\n severity: 'error',\n code: 'hard-cut.runtime.retired-bridge',\n path: file.filePath,\n message: 'A retired runtime bridge/global was detected; remove it and mount the product editor adapter directly.',\n });\n }\n const deprecatedAuthoredFields = collectDeprecatedAuthoredFields(file.filePath, content);\n for (const field of deprecatedAuthoredFields) {\n diagnostics.push({\n severity: 'error',\n code: 'hard-cut.schema.deprecated-field',\n path: file.filePath,\n details: { field },\n message: `Deprecated authored field ${field} is unsupported; migrate the authored source to the current contract.`,\n });\n }\n if (\n /\\bhandleProjectAssetCommand\\b/.test(content)\n && /\\b(asset\\.import|asset\\.library\\.refresh|editor\\.asset\\.place|ASSET_IMPORT|ASSET_LIBRARY_REFRESH|EDITOR_ASSET_PLACE)\\b/.test(content)\n && !/\\bcreatePlayableProjectAssetCommandHandler\\b/.test(content)\n ) {\n diagnostics.push({\n severity: options.projectAssetCommandGlueSeverity ?? 'warning',\n code: 'migration.project-asset-command.local-glue',\n path: file.filePath,\n message: 'Project asset command glue detected; consider createPlayableProjectAssetCommandHandler and keep only project registration/placement policies local.',\n });\n }\n if (\n /\\bimportProjectionModel\\b/.test(content)\n && !/\\bcreateEditorSceneRuntimePreviewImportPlan\\b/.test(content)\n ) {\n diagnostics.push({\n severity: options.runtimePreviewProjectionSeverity ?? 'info',\n code: 'migration.runtime-preview.projection-plan-missing',\n path: file.filePath,\n message: 'Projection import logic is present without the SDK runtime preview import plan helper; verify asset URL and projection diagnostics during migration.',\n });\n }\n return diagnostics;\n}\n\nfunction collectDeprecatedAuthoredFields(filePath: string, content: string): string[] {\n if (/\\.json$/i.test(filePath)) {\n try {\n const value = JSON.parse(content) as unknown;\n const fields = new Set<string>();\n collectDeprecatedJsonFields(value, [], fields);\n return [...fields];\n } catch {\n return [];\n }\n }\n // Authored scene schemas are structured JSON. TypeScript project code is\n // covered by import/runtime checks and must not be guessed through regexes.\n return [];\n}\n\nfunction collectDeprecatedJsonFields(value: unknown, path: string[], fields: Set<string>): void {\n if (Array.isArray(value)) {\n value.forEach(entry => collectDeprecatedJsonFields(entry, path, fields));\n return;\n }\n if (!isRecord(value)) return;\n for (const field of ['shadowMode', 'sceneInstances', 'modelRegistry', 'childMaterialBindings', 'childMaterials', 'useBlobShadow', 'blobSettings']) {\n if (field in value) fields.add(field);\n }\n if (path[path.length - 1] === 'globalVolume') {\n for (const field of ['samples', 'camera', 'lights']) {\n if (field in value) fields.add(`globalVolume.${field}`);\n }\n }\n if (value.kind === 'box' && path.slice(-2).join('.') === 'marker.geometry') {\n for (const field of ['coordinateSpace', 'center', 'size', 'rotation']) if (field in value) fields.add(`marker.geometry.${field}`);\n }\n if (path.slice(-3).join('.') === 'shadows.staticProjected.bake') {\n for (const field of ['resolution', 'maxSize']) if (field in value) fields.add(`shadows.staticProjected.bake.${field}`);\n }\n if (path.slice(-2).join('.') === 'globalVolume.environment') {\n for (const field of ['textureAssetId', 'textureUrl', 'intensity']) if (field in value) fields.add(`globalVolume.environment.${field}`);\n }\n for (const [key, child] of Object.entries(value)) {\n if (key !== 'metadata') collectDeprecatedJsonFields(child, [...path, key], fields);\n }\n}\n\nfunction inspectFileImports(\n file: PlayableEditorImportSnapshotFile,\n forbiddenPackages: readonly string[],\n forbiddenPackageSeverity: PlayableEditorDoctorDiagnostic['severity'],\n): PlayableEditorDoctorDiagnostic[] {\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n let imports: string[];\n try {\n imports = readImportSpecifiers(file.content, file.filePath);\n } catch (error) {\n return [{\n severity: 'error',\n code: 'import.boundary.parse-error',\n path: file.filePath,\n message: `Unable to parse project module for import-boundary validation: ${error instanceof Error ? error.message : String(error)}`,\n }];\n }\n for (const specifier of imports) {\n if (specifier === PLAYABLE_RUNTIME_SUBPATH || specifier === PLAYABLE_RUNTIME_BABYLON_SUBPATH) continue;\n if (specifier === '@fps-games/editor' && isPublicEditorProductEntryFile(file.filePath)) continue;\n if (specifier === '@fps-games/editor/vite' && (isViteConfigFile(file.filePath) || isProjectScriptFile(file.filePath))) continue;\n if (specifier.startsWith(PLAYABLE_SDK_SUBPATH_PREFIX)) {\n const isAllowedUpgradeDoctorSubpath =\n specifier === PLAYABLE_SDK_UPGRADE_DOCTOR_SUBPATH\n && isProjectScriptFile(file.filePath);\n const isAllowedViteSubpath =\n specifier === PLAYABLE_SDK_VITE_SUBPATH\n && (\n isViteConfigFile(file.filePath)\n || isProjectScriptFile(file.filePath)\n );\n if (isAllowedUpgradeDoctorSubpath || isAllowedViteSubpath) {\n continue;\n }\n diagnostics.push({\n severity: 'error',\n code: 'import.boundary.playable-sdk-subpath',\n source: specifier,\n path: file.filePath,\n message: 'Import @fps-games/editor/playable-sdk only through the public aggregate subpath.',\n });\n continue;\n }\n const directEditorPackage = findMatchingForbiddenPackage(specifier, DIRECT_EDITOR_IMPORTS);\n if (directEditorPackage && specifier !== '@fps-games/editor/playable-sdk') {\n diagnostics.push({\n severity: 'error',\n code: directEditorPackage === '@fps-games/editor'\n ? 'import.boundary.direct-editor'\n : 'import.boundary.direct-editor-core',\n source: specifier,\n path: file.filePath,\n message: `New playable editor integration code should import stable contracts from @fps-games/editor/playable-sdk instead of ${specifier}.`,\n });\n continue;\n }\n const forbiddenPackage = findMatchingForbiddenPackage(specifier, forbiddenPackages);\n if (forbiddenPackage) {\n diagnostics.push({\n severity: forbiddenPackageSeverity,\n code: 'import.boundary.forbidden-package',\n source: specifier,\n path: file.filePath,\n details: { packageName: forbiddenPackage },\n message: `Import ${forbiddenPackage} directly couples to editor internals. Consider using @fps-games/editor/playable-sdk facade exports instead.`,\n });\n }\n }\n return diagnostics;\n}\n\nfunction isViteConfigFile(filePath: string): boolean {\n const normalized = normalizeFilePath(filePath);\n return !normalized.includes('/') && /^vite\\.config\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction isPublicEditorProductEntryFile(filePath: string): boolean {\n if (isFpsConfigFile(filePath) || isProjectScriptFile(filePath)) return true;\n const normalized = normalizeFilePath(filePath);\n return /(?:^|\\/)src\\/(?:editor-features|services\\/fps-game-editor)\\/plugin-host\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction isFpsConfigFile(filePath: string): boolean {\n const normalized = normalizeFilePath(filePath);\n return /(?:^|\\/)fps\\.config\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction normalizeForbiddenPackages(packages: readonly string[]): string[] {\n const normalized: string[] = [];\n for (const packageName of packages) {\n const trimmed = packageName.trim();\n if (trimmed.length > 0 && !normalized.includes(trimmed)) {\n normalized.push(trimmed);\n }\n }\n return normalized;\n}\n\nfunction findMatchingForbiddenPackage(specifier: string, forbiddenPackages: readonly string[]): string | undefined {\n return forbiddenPackages.find(packageName => specifier === packageName || specifier.startsWith(`${packageName}/`));\n}\n\nfunction readImportSpecifiers(content: string, filePath: string): string[] {\n const supportsJsx = /\\.[cm]?[jt]sx$/i.test(filePath);\n const root = parse(content, {\n sourceType: 'unambiguous',\n allowAwaitOutsideFunction: true,\n allowReturnOutsideFunction: true,\n plugins: [\n 'typescript',\n ...(supportsJsx ? ['jsx' as const] : []),\n 'decorators',\n 'importAttributes',\n ],\n });\n const specifiers: string[] = [];\n visitBabelNode(root, (node) => {\n const type = readBabelNodeType(node);\n if (type === 'ImportDeclaration' || type === 'ExportNamedDeclaration' || type === 'ExportAllDeclaration') {\n const source = readBabelStaticString(node.source);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'ImportExpression') {\n const source = readBabelStaticString(node.source);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'TSExternalModuleReference') {\n const source = readBabelStaticString(node.expression);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'TSImportType') {\n const source = readBabelStaticString(node.argument);\n if (source) specifiers.push(source);\n return;\n }\n if (type !== 'CallExpression' && type !== 'OptionalCallExpression') return;\n if (!isBabelStaticModuleLoader(node.callee)) return;\n const source = readBabelStaticString(Array.isArray(node.arguments) ? node.arguments[0] : null);\n if (source) specifiers.push(source);\n });\n return specifiers;\n}\n\nfunction visitBabelNode(value: unknown, visit: (node: Record<string, unknown>) => void): void {\n if (Array.isArray(value)) {\n for (const entry of value) visitBabelNode(entry, visit);\n return;\n }\n if (!isRecord(value) || typeof value.type !== 'string') return;\n visit(value);\n for (const [key, child] of Object.entries(value)) {\n if (key === 'loc' || key === 'start' || key === 'end' || key === 'extra' || key === 'comments' || key === 'tokens') continue;\n visitBabelNode(child, visit);\n }\n}\n\nfunction readBabelNodeType(value: unknown): string | null {\n return isRecord(value) && typeof value.type === 'string' ? value.type : null;\n}\n\nfunction readBabelStaticString(value: unknown): string | null {\n if (!isRecord(value)) return null;\n if (value.type === 'StringLiteral' && typeof value.value === 'string') return value.value;\n if (value.type === 'TemplateLiteral' && Array.isArray(value.expressions) && value.expressions.length === 0) {\n const quasi = Array.isArray(value.quasis) ? value.quasis[0] : null;\n const cooked = isRecord(quasi) && isRecord(quasi.value) ? quasi.value.cooked : null;\n return typeof cooked === 'string' ? cooked : null;\n }\n return null;\n}\n\nfunction isBabelStaticModuleLoader(value: unknown): boolean {\n if (!isRecord(value)) return false;\n if (value.type === 'Import') return true;\n if (value.type === 'Identifier') return value.name === 'require';\n if (value.type !== 'MemberExpression' && value.type !== 'OptionalMemberExpression') return false;\n const objectName = readBabelIdentifierName(value.object);\n const propertyName = value.computed\n ? readBabelStaticString(value.property)\n : readBabelIdentifierName(value.property);\n return (objectName === 'module' && propertyName === 'require')\n || (objectName === 'require' && propertyName === 'resolve');\n}\n\nfunction readBabelIdentifierName(value: unknown): string | null {\n return isRecord(value) && value.type === 'Identifier' && typeof value.name === 'string' ? value.name : null;\n}\n\nfunction isUsablePackageExportTarget(value: unknown): boolean {\n if (typeof value === 'string') {\n if (!/^\\.\\/.+\\.(?:[cm]?js|json|node)$/.test(value)) return false;\n return value.slice(2).split('/').every(isUsablePackageTargetSegment);\n }\n if (Array.isArray(value)) return value.some(isUsablePackageExportTarget);\n if (!isRecord(value)) return false;\n const entries = Object.entries(value);\n if (entries.some(([condition]) => !/^[A-Za-z][A-Za-z0-9_-]*$/.test(condition))) return false;\n return entries.some(([condition, target]) => condition !== 'types' && isUsablePackageExportTarget(target));\n}\n\nfunction isUsableNodePackageExportTarget(value: unknown): boolean {\n if (typeof value === 'string') return isUsablePackageExportTarget(value);\n if (Array.isArray(value)) return value.some(isUsableNodePackageExportTarget);\n if (!isRecord(value)) return false;\n const entries = Object.entries(value);\n if (entries.some(([condition]) => !/^[A-Za-z][A-Za-z0-9_-]*$/.test(condition))) return false;\n for (const [condition, target] of entries) {\n if (condition !== 'node' && condition !== 'import' && condition !== 'default') continue;\n return isUsableNodePackageExportTarget(target);\n }\n return false;\n}\n\nfunction isUsablePackageTargetSegment(segment: string): boolean {\n if (!segment) return false;\n try {\n const decoded = decodeURIComponent(segment);\n return decoded !== '.'\n && decoded !== '..'\n && decoded.toLowerCase() !== 'node_modules'\n && !decoded.includes('/')\n && !decoded.includes('\\\\');\n } catch {\n return false;\n }\n}\n\nfunction isProjectScriptFile(filePath: string): boolean {\n return normalizeFilePath(filePath).startsWith('scripts/');\n}\n\nfunction normalizeFilePath(filePath: string): string {\n return filePath.replace(/\\\\/g, '/').replace(/\\/+/g, '/').replace(/^\\.\\//, '');\n}\n\nfunction isExactDependencyVersion(value: string): boolean {\n return /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z]+(?:\\.[0-9A-Za-z]+)*)?$/.test(value.trim());\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim().length > 0 ? value : undefined;\n}\n\nfunction readSeverity(value: unknown): PlayableEditorDoctorDiagnostic['severity'] | undefined {\n return value === 'error' || value === 'warning' || value === 'info' ? value : undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isImportSnapshot(value: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[]): value is PlayableEditorImportSnapshot {\n return isRecord(value) && Array.isArray(value.files);\n}\n"]}
1
+ {"version":3,"file":"inspectors.js","sourceRoot":"","sources":["../../src/upgrade-doctor/inspectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,GAG9C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,4CAA4C,EAAE,MAAM,QAAQ,CAAC;AActE,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAClD,MAAM,uCAAuC,GAAG,+BAA+B,CAAC;AAChF,MAAM,6BAA6B,GA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,CAAC,SAAS,CAAC;AAClF,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1F,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAiF;IACzG,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import {\n collectMissingPlayableEditorPackageAliasFiles,\n type PlayableEditorFileExists,\n type PlayableEditorPackageAliasPlan,\n} from '../package-resolution/index';\nimport { parse } from '@babel/parser';\nimport { createPlayableEditorDoctorReport } from './report';\nimport { inspectPlayableEditorHostCompatibilityReport } from './host';\nimport type {\n PlayableEditorDoctorDiagnostic,\n PlayableEditorDoctorReport,\n PlayableEditorImportBoundaryInspectionOptions,\n PlayableEditorImportSnapshot,\n PlayableEditorImportSnapshotFile,\n PlayableEditorInstalledVersionInspectionOptions,\n PlayableEditorInstalledVersionLike,\n PlayableEditorMigrationReadinessInspectionOptions,\n PlayableEditorPackageExportsInspectionOptions,\n PlayableEditorPackageExportsLike,\n PlayableEditorUpgradeReadinessInspectionInput,\n} from './types';\nimport { mergePlayableEditorDoctorReports } from './report';\n\nconst PLAYABLE_SDK_EXPORT_PATH = './playable-sdk';\nconst PLAYABLE_SDK_UPGRADE_DOCTOR_EXPORT_PATH = './playable-sdk/upgrade-doctor';\nconst PLAYABLE_SDK_VITE_EXPORT_PATH = './playable-sdk/vite';\nconst PLAYABLE_SDK_SUBPATH_PREFIX = '@fps-games/editor/playable-sdk/';\nconst PLAYABLE_SDK_UPGRADE_DOCTOR_SUBPATH = '@fps-games/editor/playable-sdk/upgrade-doctor';\nconst PLAYABLE_SDK_VITE_SUBPATH = '@fps-games/editor/playable-sdk/vite';\nconst PLAYABLE_RUNTIME_SUBPATH = '@fps-games/editor/playable-runtime';\nconst PLAYABLE_RUNTIME_BABYLON_SUBPATH = '@fps-games/editor/playable-runtime/babylon';\nconst DIRECT_EDITOR_IMPORTS = [\n '@fps-games/editor',\n '@fps-games/editor-core',\n] as const;\n\n/**\n * Default forbidden packages for new playable editor integration code.\n * These packages are internal to the editor framework and should not be\n * imported directly from project-side code. Use @fps-games/editor/playable-sdk\n * facade exports instead.\n */\nexport const PLAYABLE_EDITOR_DEFAULT_FORBIDDEN_PACKAGES: readonly string[] = [\n '@fps-games/editor-agent-bridge',\n '@fps-games/editor-babylon',\n '@fps-games/editor-browser',\n '@fps-games/editor-forge-play',\n '@fps-games/editor-playable-sdk',\n '@fps-games/editor-protocol',\n '@fps-games/babylon-renderer',\n];\n\nexport function inspectPlayableEditorPackageAliasPlan(\n plan: PlayableEditorPackageAliasPlan,\n fileExists: PlayableEditorFileExists,\n options: { title?: string } = {},\n): PlayableEditorDoctorReport {\n const missing = collectMissingPlayableEditorPackageAliasFiles(plan, fileExists);\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor package aliases',\n diagnostics: missing.map(entry => ({\n severity: 'error',\n code: 'package.alias.missing-file',\n source: entry.packageId,\n path: entry.file,\n message: `Package alias for ${entry.packageId} points to a missing file.`,\n })),\n });\n}\n\nexport function inspectPlayableEditorPackageExports(\n packageJson: PlayableEditorPackageExportsLike,\n options: PlayableEditorPackageExportsInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const packageName = options.packageName ?? readString(packageJson.name) ?? '@fps-games/editor';\n const exportPath = options.playableSdkExportPath ?? PLAYABLE_SDK_EXPORT_PATH;\n const upgradeDoctorExportPath = options.playableSdkUpgradeDoctorExportPath ?? PLAYABLE_SDK_UPGRADE_DOCTOR_EXPORT_PATH;\n const viteExportPath = options.playableSdkViteExportPath ?? PLAYABLE_SDK_VITE_EXPORT_PATH;\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n\n if (!isRecord(packageJson.exports)) {\n diagnostics.push({\n severity: 'error',\n code: 'package.export.invalid',\n source: packageName,\n path: 'exports',\n message: `Package ${packageName} must expose an object exports map.`,\n });\n } else {\n for (const requiredExportPath of [exportPath, upgradeDoctorExportPath, viteExportPath]) {\n const hasExport = requiredExportPath in packageJson.exports;\n const usableTarget = hasExport && (\n requiredExportPath === upgradeDoctorExportPath\n ? isUsableNodePackageExportTarget(packageJson.exports[requiredExportPath])\n : isUsablePackageExportTarget(packageJson.exports[requiredExportPath])\n );\n if (usableTarget) continue;\n diagnostics.push({\n severity: 'error',\n code: hasExport ? 'package.export.invalid-target' : 'package.export.missing',\n source: packageName,\n path: `exports[\"${requiredExportPath}\"]`,\n message: hasExport\n ? `Package ${packageName} has no usable runtime target for the ${requiredExportPath} export.`\n : `Package ${packageName} is missing the ${requiredExportPath} export.`,\n });\n }\n }\n\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor package exports',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorInstalledVersion(\n packageJson: PlayableEditorInstalledVersionLike,\n options: PlayableEditorInstalledVersionInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const packageName = options.packageName\n ?? readString(packageJson.packageName)\n ?? '@fps-games/editor';\n const declaredVersion = readString(packageJson.declaredVersion);\n const installedVersion = readString(packageJson.installedVersion);\n const source = readString(packageJson.source) ?? packageName;\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n\n if (declaredVersion && installedVersion && isExactDependencyVersion(declaredVersion) && declaredVersion !== installedVersion) {\n diagnostics.push({\n severity: options.exactMismatchSeverity ?? 'error',\n code: 'package.version.installed-mismatch',\n source,\n path: 'dependencies',\n details: { packageName, declaredVersion, installedVersion },\n message: `Project declares ${packageName}@${declaredVersion}, but node_modules contains ${installedVersion}. Reinstall dependencies and restart the dev server.`,\n });\n }\n\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor installed version',\n diagnostics,\n });\n}\n\nexport function createPlayableEditorImportSnapshot(\n files: readonly PlayableEditorImportSnapshotFile[],\n): PlayableEditorImportSnapshot {\n return {\n files: files.map(file => ({\n filePath: file.filePath,\n content: file.content,\n })),\n };\n}\n\nexport function inspectPlayableEditorImportBoundaries(\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[],\n options: PlayableEditorImportBoundaryInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const files: readonly PlayableEditorImportSnapshotFile[] = isImportSnapshot(snapshot)\n ? snapshot.files\n : snapshot;\n const forbiddenPackages = normalizeForbiddenPackages(\n options.forbiddenPackages ?? PLAYABLE_EDITOR_DEFAULT_FORBIDDEN_PACKAGES,\n );\n const forbiddenPackageSeverity = options.forbiddenPackageSeverity ?? 'warning';\n const diagnostics = files.flatMap(file =>\n inspectFileImports(file, forbiddenPackages, forbiddenPackageSeverity),\n );\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor import boundaries',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorMigrationReadiness(\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[],\n options: PlayableEditorMigrationReadinessInspectionOptions = {},\n): PlayableEditorDoctorReport {\n const files: readonly PlayableEditorImportSnapshotFile[] = isImportSnapshot(snapshot)\n ? snapshot.files\n : snapshot;\n const diagnostics = files.flatMap(file => inspectMigrationReadinessFile(file, options));\n return createPlayableEditorDoctorReport({\n title: options.title ?? 'Playable editor hard-cut readiness',\n diagnostics,\n });\n}\n\nexport function inspectPlayableEditorUpgradeReadiness(\n input: PlayableEditorUpgradeReadinessInspectionInput = {},\n): PlayableEditorDoctorReport {\n const reports: PlayableEditorDoctorReport[] = [];\n if (input.hostCompatibility) {\n reports.push(inspectPlayableEditorHostCompatibilityReport(\n input.hostCompatibility.report,\n input.hostCompatibility.options,\n ));\n }\n if (input.packageAliasPlan) {\n reports.push(inspectPlayableEditorPackageAliasPlan(\n input.packageAliasPlan.plan,\n input.packageAliasPlan.fileExists,\n { title: input.packageAliasPlan.title },\n ));\n }\n if (input.packageExports) {\n reports.push(inspectPlayableEditorPackageExports(\n input.packageExports.packageJson,\n input.packageExports.options,\n ));\n }\n if (input.installedVersion) {\n reports.push(inspectPlayableEditorInstalledVersion(\n input.installedVersion.packageJson,\n input.installedVersion.options,\n ));\n }\n if (input.importBoundaries) {\n reports.push(inspectPlayableEditorImportBoundaries(\n input.importBoundaries.snapshot,\n input.importBoundaries.options,\n ));\n }\n if (input.migrationReadiness) {\n reports.push(inspectPlayableEditorMigrationReadiness(\n input.migrationReadiness.snapshot,\n input.migrationReadiness.options,\n ));\n }\n return mergePlayableEditorDoctorReports(reports, {\n title: input.title ?? 'Playable editor upgrade readiness',\n });\n}\n\nfunction inspectMigrationReadinessFile(\n file: PlayableEditorImportSnapshotFile,\n options: PlayableEditorMigrationReadinessInspectionOptions,\n): PlayableEditorDoctorDiagnostic[] {\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n const content = file.content;\n const environmentResourceHardCutSeverity = options.environmentResourceHardCutSeverity ?? 'error';\n if (/\\bassertRuntimeSceneConfig(?:ModulePath|ExportName)\\b/.test(content)) {\n diagnostics.push({\n severity: 'warning',\n code: 'hard-cut.scene-artifact.project-validator-hook-removed',\n path: file.filePath,\n message: 'Removed project SceneArtifact validator hook detected; delete assertRuntimeSceneConfigModulePath/assertRuntimeSceneConfigExportName because @fps-games/editor/playable-sdk now validates the canonical runtime artifact.',\n });\n }\n if (/\\bhierarchyContextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.browser-callbacks-removed',\n path: file.filePath,\n message: 'Removed hierarchyContextActions Browser callback API detected; migrate each action to a typed capabilities.hierarchyActions.operations contribution.',\n });\n }\n if (/\\bcreateLocalEditorHarness\\b/.test(content) && /\\bcontextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.direct-harness',\n path: file.filePath,\n message: 'Removed hierarchy.contextActions API detected; migrate each action to a typed capabilities.hierarchyActions.operations contribution.',\n });\n }\n if (/\\bhierarchyActions\\b/.test(content) && /\\bcontextActions\\b/.test(content)) {\n diagnostics.push({\n severity: options.hierarchyContextActionSeverity ?? 'warning',\n code: 'hard-cut.hierarchy-actions.context-actions-removed',\n path: file.filePath,\n message: 'Removed capabilities.hierarchyActions.contextActions API detected; use capabilities.hierarchyActions.operations.',\n });\n }\n const retiredBypassPattern = new RegExp(`\\\\binstall${'Leg' + 'acy'}AssetCommandBypass\\\\b|__project${'Leg' + 'acy'}AssetBypass`);\n if (retiredBypassPattern.test(content)) {\n diagnostics.push({\n severity: options.retiredAssetBypassSeverity ?? 'error',\n code: 'hard-cut.asset-bypass.retired-helper',\n path: file.filePath,\n message: 'A retired asset command bypass helper was detected; delete it and use product asset capabilities.',\n });\n }\n const retiredRuntimePattern = new RegExp(\n `__bridge${'Leg' + 'acy'}EditorRuntime|register${'Leg' + 'acy'}RuntimeProxy|install${'Leg' + 'acy'}CommandBypass`,\n );\n if (retiredRuntimePattern.test(content)) {\n diagnostics.push({\n severity: 'error',\n code: 'hard-cut.runtime.retired-bridge',\n path: file.filePath,\n message: 'A retired runtime bridge/global was detected; remove it and mount the product editor adapter directly.',\n });\n }\n const deprecatedAuthoredFields = collectDeprecatedAuthoredFields(file.filePath, content);\n for (const field of deprecatedAuthoredFields) {\n diagnostics.push({\n severity: 'error',\n code: 'hard-cut.schema.deprecated-field',\n path: file.filePath,\n details: { field },\n message: `Deprecated authored field ${field} is unsupported; migrate the authored source to the current contract.`,\n });\n }\n if (\n /\\bhandleProjectAssetCommand\\b/.test(content)\n && /\\b(asset\\.import|asset\\.library\\.refresh|editor\\.asset\\.place|ASSET_IMPORT|ASSET_LIBRARY_REFRESH|EDITOR_ASSET_PLACE)\\b/.test(content)\n && !/\\bcreatePlayableProjectAssetCommandHandler\\b/.test(content)\n ) {\n diagnostics.push({\n severity: options.projectAssetCommandGlueSeverity ?? 'warning',\n code: 'migration.project-asset-command.local-glue',\n path: file.filePath,\n message: 'Project asset command glue detected; consider createPlayableProjectAssetCommandHandler and keep only project registration/placement policies local.',\n });\n }\n if (\n /\\bimportProjectionModel\\b/.test(content)\n && !/\\bcreateEditorSceneRuntimePreviewImportPlan\\b/.test(content)\n ) {\n diagnostics.push({\n severity: options.runtimePreviewProjectionSeverity ?? 'info',\n code: 'migration.runtime-preview.projection-plan-missing',\n path: file.filePath,\n message: 'Projection import logic is present without the SDK runtime preview import plan helper; verify asset URL and projection diagnostics during migration.',\n });\n }\n diagnostics.push(...collectEnvironmentResourceHardCutDiagnostics(\n file.filePath,\n content,\n environmentResourceHardCutSeverity,\n ));\n return diagnostics;\n}\n\n/**\n * These checks intentionally inspect only project-side migration snapshots. They\n * flag retired public integration shapes, not generic material texture fields or\n * plugin registration order; those are validated by the product contract tests.\n */\nfunction collectEnvironmentResourceHardCutDiagnostics(\n filePath: string,\n content: string,\n severity: PlayableEditorDoctorDiagnostic['severity'],\n): PlayableEditorDoctorDiagnostic[] {\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n const add = (code: string, message: string) => diagnostics.push({\n severity,\n code,\n path: filePath,\n message,\n });\n\n const hasBabylonRendererSurface = /\\b(?:FpsBabylonRendererContext|FpsBabylonRendererPluginConfig|BabylonEnvironmentTexture(?:Profile|Factory)|createFpsBabylon(?:GameWorldPluginLifecycle|RendererHost))\\b/.test(content);\n if (/\\bresolveAssetUrl\\b/.test(content) && hasBabylonRendererSurface) {\n add(\n 'hard-cut.environment-resource.resolve-asset-url-removed',\n 'Removed Babylon resolveAssetUrl integration detected; pass the generated asset catalog to the Host and resolve a PlayableResolvedAssetResource through the Assets Plugin service.',\n );\n }\n if (/\\bFpsBabylonRendererPluginConfig\\b/.test(content) && /\\benvironmentTexture\\s*:/.test(content)) {\n add(\n 'hard-cut.environment-resource.renderer-environment-texture-removed',\n 'Removed FpsBabylonRendererPluginConfig.environmentTexture fallback detected; authored rendering must resolve through the catalog-backed resource service.',\n );\n }\n if (/\\bBabylonEnvironmentTextureProfile\\s*\\{[^}]*\\btextureUrl\\b/.test(content)) {\n add(\n 'hard-cut.environment-resource.profile-texture-url-removed',\n 'Removed BabylonEnvironmentTextureProfile.textureUrl shape detected; use profile.texture: PlayableResolvedAssetResource | null.',\n );\n }\n if (/\\bBabylonEnvironmentTextureFactory\\b/.test(content) && /\\b(?:textureUrl|url)\\s*:\\s*(?:string|String)\\b/.test(content)) {\n add(\n 'hard-cut.environment-resource.url-factory-removed',\n 'Removed URL-only BabylonEnvironmentTextureFactory contract detected; the factory must receive a PlayableResolvedAssetResource so it can preserve the asset format.',\n );\n }\n if (/\\bresolvePlayableBabylonRenderingEnvironmentTextureUrl\\b/.test(content)) {\n add(\n 'hard-cut.environment-resource.resolve-url-helper-removed',\n 'Removed resolvePlayableBabylonRenderingEnvironmentTextureUrl helper detected; use resolvePlayableBabylonRenderingEnvironmentTextureResource.',\n );\n }\n if (isGeneratedAssetCatalogFile(filePath, content) && !hasGeneratedAssetCatalogFormat(content)) {\n add(\n 'hard-cut.environment-resource.generated-catalog-format-missing',\n 'Generated asset catalog is missing the required format field; regenerate it with the current playable SDK instead of editing catalog output by hand.',\n );\n }\n if (hasBabylonHostFactoryCall(content) && !hasCatalogSourceReference(content)) {\n add(\n 'hard-cut.environment-resource.host-catalog-source-missing',\n 'Babylon Runtime/Renderer Host construction has no generated asset catalog input; pass the catalog source so plugin-assets can provide the shared resource resolver.',\n );\n }\n return diagnostics;\n}\n\nfunction isGeneratedAssetCatalogFile(filePath: string, content: string): boolean {\n return /(?:^|\\/)asset-catalog(?:\\.generated)?\\.[cm]?[jt]s$/i.test(normalizeFilePath(filePath))\n || (\n /\\binterface\\s+GeneratedAssetCatalogEntry\\b/.test(content)\n && /\\b(?:export\\s+)?const\\s+GENERATED_ASSET_CATALOG\\b/.test(content)\n );\n}\n\nfunction hasGeneratedAssetCatalogFormat(content: string): boolean {\n return /\\bformat\\s*:\\s*(?:string|[\"'`][^\"'`]+[\"'`])/.test(content);\n}\n\nfunction hasBabylonHostFactoryCall(content: string): boolean {\n return /\\b(?:createFpsRuntime|createFpsBabylonGameWorldPluginLifecycle|createFpsBabylonRendererHost)\\s*\\(/.test(content);\n}\n\nfunction hasCatalogSourceReference(content: string): boolean {\n return /\\b(?:assetCatalog(?:Source)?|generatedAssetCatalog|GENERATED_ASSET_CATALOG)\\b/.test(content);\n}\n\nfunction collectDeprecatedAuthoredFields(filePath: string, content: string): string[] {\n if (/\\.json$/i.test(filePath)) {\n try {\n const value = JSON.parse(content) as unknown;\n const fields = new Set<string>();\n collectDeprecatedJsonFields(value, [], fields);\n return [...fields];\n } catch {\n return [];\n }\n }\n // Authored scene schemas are structured JSON. TypeScript project code is\n // covered by import/runtime checks and must not be guessed through regexes.\n return [];\n}\n\nfunction collectDeprecatedJsonFields(value: unknown, path: string[], fields: Set<string>): void {\n if (Array.isArray(value)) {\n value.forEach(entry => collectDeprecatedJsonFields(entry, path, fields));\n return;\n }\n if (!isRecord(value)) return;\n for (const field of ['shadowMode', 'sceneInstances', 'modelRegistry', 'childMaterialBindings', 'childMaterials', 'useBlobShadow', 'blobSettings']) {\n if (field in value) fields.add(field);\n }\n if (path[path.length - 1] === 'globalVolume') {\n for (const field of ['samples', 'camera', 'lights']) {\n if (field in value) fields.add(`globalVolume.${field}`);\n }\n }\n if (value.kind === 'box' && path.slice(-2).join('.') === 'marker.geometry') {\n for (const field of ['coordinateSpace', 'center', 'size', 'rotation']) if (field in value) fields.add(`marker.geometry.${field}`);\n }\n if (path.slice(-3).join('.') === 'shadows.staticProjected.bake') {\n for (const field of ['resolution', 'maxSize']) if (field in value) fields.add(`shadows.staticProjected.bake.${field}`);\n }\n if (path.slice(-2).join('.') === 'globalVolume.environment') {\n for (const field of ['textureAssetId', 'textureUrl', 'intensity']) if (field in value) fields.add(`globalVolume.environment.${field}`);\n }\n for (const [key, child] of Object.entries(value)) {\n if (key !== 'metadata') collectDeprecatedJsonFields(child, [...path, key], fields);\n }\n}\n\nfunction inspectFileImports(\n file: PlayableEditorImportSnapshotFile,\n forbiddenPackages: readonly string[],\n forbiddenPackageSeverity: PlayableEditorDoctorDiagnostic['severity'],\n): PlayableEditorDoctorDiagnostic[] {\n const diagnostics: PlayableEditorDoctorDiagnostic[] = [];\n let imports: string[];\n try {\n imports = readImportSpecifiers(file.content, file.filePath);\n } catch (error) {\n return [{\n severity: 'error',\n code: 'import.boundary.parse-error',\n path: file.filePath,\n message: `Unable to parse project module for import-boundary validation: ${error instanceof Error ? error.message : String(error)}`,\n }];\n }\n for (const specifier of imports) {\n if (specifier === PLAYABLE_RUNTIME_SUBPATH || specifier === PLAYABLE_RUNTIME_BABYLON_SUBPATH) continue;\n if (specifier === '@fps-games/editor' && isPublicEditorProductEntryFile(file.filePath)) continue;\n if (specifier === '@fps-games/editor/vite' && (isViteConfigFile(file.filePath) || isProjectScriptFile(file.filePath))) continue;\n if (specifier.startsWith(PLAYABLE_SDK_SUBPATH_PREFIX)) {\n const isAllowedUpgradeDoctorSubpath =\n specifier === PLAYABLE_SDK_UPGRADE_DOCTOR_SUBPATH\n && isProjectScriptFile(file.filePath);\n const isAllowedViteSubpath =\n specifier === PLAYABLE_SDK_VITE_SUBPATH\n && (\n isViteConfigFile(file.filePath)\n || isProjectScriptFile(file.filePath)\n );\n if (isAllowedUpgradeDoctorSubpath || isAllowedViteSubpath) {\n continue;\n }\n diagnostics.push({\n severity: 'error',\n code: 'import.boundary.playable-sdk-subpath',\n source: specifier,\n path: file.filePath,\n message: 'Import @fps-games/editor/playable-sdk only through the public aggregate subpath.',\n });\n continue;\n }\n const directEditorPackage = findMatchingForbiddenPackage(specifier, DIRECT_EDITOR_IMPORTS);\n if (directEditorPackage && specifier !== '@fps-games/editor/playable-sdk') {\n diagnostics.push({\n severity: 'error',\n code: directEditorPackage === '@fps-games/editor'\n ? 'import.boundary.direct-editor'\n : 'import.boundary.direct-editor-core',\n source: specifier,\n path: file.filePath,\n message: `New playable editor integration code should import stable contracts from @fps-games/editor/playable-sdk instead of ${specifier}.`,\n });\n continue;\n }\n const forbiddenPackage = findMatchingForbiddenPackage(specifier, forbiddenPackages);\n if (forbiddenPackage) {\n diagnostics.push({\n severity: forbiddenPackageSeverity,\n code: 'import.boundary.forbidden-package',\n source: specifier,\n path: file.filePath,\n details: { packageName: forbiddenPackage },\n message: `Import ${forbiddenPackage} directly couples to editor internals. Consider using @fps-games/editor/playable-sdk facade exports instead.`,\n });\n }\n }\n return diagnostics;\n}\n\nfunction isViteConfigFile(filePath: string): boolean {\n const normalized = normalizeFilePath(filePath);\n return !normalized.includes('/') && /^vite\\.config\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction isPublicEditorProductEntryFile(filePath: string): boolean {\n if (isFpsConfigFile(filePath) || isProjectScriptFile(filePath)) return true;\n const normalized = normalizeFilePath(filePath);\n return /(?:^|\\/)src\\/(?:editor-features|services\\/fps-game-editor)\\/plugin-host\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction isFpsConfigFile(filePath: string): boolean {\n const normalized = normalizeFilePath(filePath);\n return /(?:^|\\/)fps\\.config\\.(?:[cm]?[jt]s)$/.test(normalized);\n}\n\nfunction normalizeForbiddenPackages(packages: readonly string[]): string[] {\n const normalized: string[] = [];\n for (const packageName of packages) {\n const trimmed = packageName.trim();\n if (trimmed.length > 0 && !normalized.includes(trimmed)) {\n normalized.push(trimmed);\n }\n }\n return normalized;\n}\n\nfunction findMatchingForbiddenPackage(specifier: string, forbiddenPackages: readonly string[]): string | undefined {\n return forbiddenPackages.find(packageName => specifier === packageName || specifier.startsWith(`${packageName}/`));\n}\n\nfunction readImportSpecifiers(content: string, filePath: string): string[] {\n const supportsJsx = /\\.[cm]?[jt]sx$/i.test(filePath);\n const root = parse(content, {\n sourceType: 'unambiguous',\n allowAwaitOutsideFunction: true,\n allowReturnOutsideFunction: true,\n plugins: [\n 'typescript',\n ...(supportsJsx ? ['jsx' as const] : []),\n 'decorators',\n 'importAttributes',\n ],\n });\n const specifiers: string[] = [];\n visitBabelNode(root, (node) => {\n const type = readBabelNodeType(node);\n if (type === 'ImportDeclaration' || type === 'ExportNamedDeclaration' || type === 'ExportAllDeclaration') {\n const source = readBabelStaticString(node.source);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'ImportExpression') {\n const source = readBabelStaticString(node.source);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'TSExternalModuleReference') {\n const source = readBabelStaticString(node.expression);\n if (source) specifiers.push(source);\n return;\n }\n if (type === 'TSImportType') {\n const source = readBabelStaticString(node.argument);\n if (source) specifiers.push(source);\n return;\n }\n if (type !== 'CallExpression' && type !== 'OptionalCallExpression') return;\n if (!isBabelStaticModuleLoader(node.callee)) return;\n const source = readBabelStaticString(Array.isArray(node.arguments) ? node.arguments[0] : null);\n if (source) specifiers.push(source);\n });\n return specifiers;\n}\n\nfunction visitBabelNode(value: unknown, visit: (node: Record<string, unknown>) => void): void {\n if (Array.isArray(value)) {\n for (const entry of value) visitBabelNode(entry, visit);\n return;\n }\n if (!isRecord(value) || typeof value.type !== 'string') return;\n visit(value);\n for (const [key, child] of Object.entries(value)) {\n if (key === 'loc' || key === 'start' || key === 'end' || key === 'extra' || key === 'comments' || key === 'tokens') continue;\n visitBabelNode(child, visit);\n }\n}\n\nfunction readBabelNodeType(value: unknown): string | null {\n return isRecord(value) && typeof value.type === 'string' ? value.type : null;\n}\n\nfunction readBabelStaticString(value: unknown): string | null {\n if (!isRecord(value)) return null;\n if (value.type === 'StringLiteral' && typeof value.value === 'string') return value.value;\n if (value.type === 'TemplateLiteral' && Array.isArray(value.expressions) && value.expressions.length === 0) {\n const quasi = Array.isArray(value.quasis) ? value.quasis[0] : null;\n const cooked = isRecord(quasi) && isRecord(quasi.value) ? quasi.value.cooked : null;\n return typeof cooked === 'string' ? cooked : null;\n }\n return null;\n}\n\nfunction isBabelStaticModuleLoader(value: unknown): boolean {\n if (!isRecord(value)) return false;\n if (value.type === 'Import') return true;\n if (value.type === 'Identifier') return value.name === 'require';\n if (value.type !== 'MemberExpression' && value.type !== 'OptionalMemberExpression') return false;\n const objectName = readBabelIdentifierName(value.object);\n const propertyName = value.computed\n ? readBabelStaticString(value.property)\n : readBabelIdentifierName(value.property);\n return (objectName === 'module' && propertyName === 'require')\n || (objectName === 'require' && propertyName === 'resolve');\n}\n\nfunction readBabelIdentifierName(value: unknown): string | null {\n return isRecord(value) && value.type === 'Identifier' && typeof value.name === 'string' ? value.name : null;\n}\n\nfunction isUsablePackageExportTarget(value: unknown): boolean {\n if (typeof value === 'string') {\n if (!/^\\.\\/.+\\.(?:[cm]?js|json|node)$/.test(value)) return false;\n return value.slice(2).split('/').every(isUsablePackageTargetSegment);\n }\n if (Array.isArray(value)) return value.some(isUsablePackageExportTarget);\n if (!isRecord(value)) return false;\n const entries = Object.entries(value);\n if (entries.some(([condition]) => !/^[A-Za-z][A-Za-z0-9_-]*$/.test(condition))) return false;\n return entries.some(([condition, target]) => condition !== 'types' && isUsablePackageExportTarget(target));\n}\n\nfunction isUsableNodePackageExportTarget(value: unknown): boolean {\n if (typeof value === 'string') return isUsablePackageExportTarget(value);\n if (Array.isArray(value)) return value.some(isUsableNodePackageExportTarget);\n if (!isRecord(value)) return false;\n const entries = Object.entries(value);\n if (entries.some(([condition]) => !/^[A-Za-z][A-Za-z0-9_-]*$/.test(condition))) return false;\n for (const [condition, target] of entries) {\n if (condition !== 'node' && condition !== 'import' && condition !== 'default') continue;\n return isUsableNodePackageExportTarget(target);\n }\n return false;\n}\n\nfunction isUsablePackageTargetSegment(segment: string): boolean {\n if (!segment) return false;\n try {\n const decoded = decodeURIComponent(segment);\n return decoded !== '.'\n && decoded !== '..'\n && decoded.toLowerCase() !== 'node_modules'\n && !decoded.includes('/')\n && !decoded.includes('\\\\');\n } catch {\n return false;\n }\n}\n\nfunction isProjectScriptFile(filePath: string): boolean {\n return normalizeFilePath(filePath).startsWith('scripts/');\n}\n\nfunction normalizeFilePath(filePath: string): string {\n return filePath.replace(/\\\\/g, '/').replace(/\\/+/g, '/').replace(/^\\.\\//, '');\n}\n\nfunction isExactDependencyVersion(value: string): boolean {\n return /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z]+(?:\\.[0-9A-Za-z]+)*)?$/.test(value.trim());\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim().length > 0 ? value : undefined;\n}\n\nfunction readSeverity(value: unknown): PlayableEditorDoctorDiagnostic['severity'] | undefined {\n return value === 'error' || value === 'warning' || value === 'info' ? value : undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isImportSnapshot(value: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[]): value is PlayableEditorImportSnapshot {\n return isRecord(value) && Array.isArray(value.files);\n}\n"]}
@@ -57,6 +57,8 @@ export interface PlayableEditorMigrationReadinessInspectionOptions {
57
57
  retiredAssetBypassSeverity?: PlayableEditorDoctorSeverity;
58
58
  projectAssetCommandGlueSeverity?: PlayableEditorDoctorSeverity;
59
59
  runtimePreviewProjectionSeverity?: PlayableEditorDoctorSeverity;
60
+ /** Severity for the Issue #565 catalog-backed environment resource hard cut. Defaults to 'error'. */
61
+ environmentResourceHardCutSeverity?: PlayableEditorDoctorSeverity;
60
62
  }
61
63
  export interface PlayableEditorHostCompatibilityDiagnosticLike {
62
64
  severity?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upgrade-doctor/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,8BAA8B;IAC7C,QAA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ctor/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PlayableEditorDoctorSeverity = 'error' | 'warning' | 'info';\n\nexport interface PlayableEditorDoctorDiagnostic {\n severity: PlayableEditorDoctorSeverity;\n code: string;\n message: string;\n path?: string;\n source?: string;\n details?: Record<string, unknown>;\n}\n\nexport interface PlayableEditorDoctorReport {\n title: string;\n ok: boolean;\n diagnostics: PlayableEditorDoctorDiagnostic[];\n}\n\nexport interface PlayableEditorDoctorReportInput {\n title?: string;\n diagnostics?: readonly PlayableEditorDoctorDiagnostic[];\n}\n\nexport interface PlayableEditorPackageExportsInspectionOptions {\n title?: string;\n packageName?: string;\n playableSdkExportPath?: string;\n playableSdkUpgradeDoctorExportPath?: string;\n playableSdkViteExportPath?: string;\n}\n\nexport interface PlayableEditorPackageExportsLike {\n name?: unknown;\n exports?: unknown;\n}\n\nexport interface PlayableEditorInstalledVersionLike {\n packageName?: unknown;\n declaredVersion?: unknown;\n installedVersion?: unknown;\n source?: unknown;\n}\n\nexport interface PlayableEditorInstalledVersionInspectionOptions {\n title?: string;\n packageName?: string;\n exactMismatchSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorImportSnapshotFile {\n filePath: string;\n content: string;\n}\n\nexport interface PlayableEditorImportSnapshot {\n files: PlayableEditorImportSnapshotFile[];\n}\n\nexport interface PlayableEditorImportBoundaryInspectionOptions {\n title?: string;\n forbiddenPackages?: readonly string[];\n /** Severity for forbidden package imports. Defaults to 'warning'. */\n forbiddenPackageSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorMigrationReadinessInspectionOptions {\n title?: string;\n hierarchyContextActionSeverity?: PlayableEditorDoctorSeverity;\n retiredAssetBypassSeverity?: PlayableEditorDoctorSeverity;\n projectAssetCommandGlueSeverity?: PlayableEditorDoctorSeverity;\n runtimePreviewProjectionSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorHostCompatibilityDiagnosticLike {\n severity?: unknown;\n code?: unknown;\n message?: unknown;\n path?: unknown;\n}\n\nexport interface PlayableEditorHostCompatibilityReportLike {\n diagnostics?: unknown;\n}\n\nexport interface PlayableEditorHostCompatibilityInspectionOptions {\n title?: string;\n source?: string;\n}\n\nexport interface PlayableEditorPackageAliasPlanInspectionInput {\n plan: import('../package-resolution/index').PlayableEditorPackageAliasPlan;\n fileExists: import('../package-resolution/index').PlayableEditorFileExists;\n title?: string;\n}\n\nexport interface PlayableEditorUpgradeReadinessInspectionInput {\n title?: string;\n hostCompatibility?: {\n report: PlayableEditorHostCompatibilityReportLike;\n options?: PlayableEditorHostCompatibilityInspectionOptions;\n };\n packageAliasPlan?: PlayableEditorPackageAliasPlanInspectionInput;\n packageExports?: {\n packageJson: PlayableEditorPackageExportsLike;\n options?: PlayableEditorPackageExportsInspectionOptions;\n };\n installedVersion?: {\n packageJson: PlayableEditorInstalledVersionLike;\n options?: PlayableEditorInstalledVersionInspectionOptions;\n };\n importBoundaries?: {\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[];\n options?: PlayableEditorImportBoundaryInspectionOptions;\n };\n migrationReadiness?: {\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[];\n options?: PlayableEditorMigrationReadinessInspectionOptions;\n };\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/upgrade-doctor/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PlayableEditorDoctorSeverity = 'error' | 'warning' | 'info';\n\nexport interface PlayableEditorDoctorDiagnostic {\n severity: PlayableEditorDoctorSeverity;\n code: string;\n message: string;\n path?: string;\n source?: string;\n details?: Record<string, unknown>;\n}\n\nexport interface PlayableEditorDoctorReport {\n title: string;\n ok: boolean;\n diagnostics: PlayableEditorDoctorDiagnostic[];\n}\n\nexport interface PlayableEditorDoctorReportInput {\n title?: string;\n diagnostics?: readonly PlayableEditorDoctorDiagnostic[];\n}\n\nexport interface PlayableEditorPackageExportsInspectionOptions {\n title?: string;\n packageName?: string;\n playableSdkExportPath?: string;\n playableSdkUpgradeDoctorExportPath?: string;\n playableSdkViteExportPath?: string;\n}\n\nexport interface PlayableEditorPackageExportsLike {\n name?: unknown;\n exports?: unknown;\n}\n\nexport interface PlayableEditorInstalledVersionLike {\n packageName?: unknown;\n declaredVersion?: unknown;\n installedVersion?: unknown;\n source?: unknown;\n}\n\nexport interface PlayableEditorInstalledVersionInspectionOptions {\n title?: string;\n packageName?: string;\n exactMismatchSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorImportSnapshotFile {\n filePath: string;\n content: string;\n}\n\nexport interface PlayableEditorImportSnapshot {\n files: PlayableEditorImportSnapshotFile[];\n}\n\nexport interface PlayableEditorImportBoundaryInspectionOptions {\n title?: string;\n forbiddenPackages?: readonly string[];\n /** Severity for forbidden package imports. Defaults to 'warning'. */\n forbiddenPackageSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorMigrationReadinessInspectionOptions {\n title?: string;\n hierarchyContextActionSeverity?: PlayableEditorDoctorSeverity;\n retiredAssetBypassSeverity?: PlayableEditorDoctorSeverity;\n projectAssetCommandGlueSeverity?: PlayableEditorDoctorSeverity;\n runtimePreviewProjectionSeverity?: PlayableEditorDoctorSeverity;\n /** Severity for the Issue #565 catalog-backed environment resource hard cut. Defaults to 'error'. */\n environmentResourceHardCutSeverity?: PlayableEditorDoctorSeverity;\n}\n\nexport interface PlayableEditorHostCompatibilityDiagnosticLike {\n severity?: unknown;\n code?: unknown;\n message?: unknown;\n path?: unknown;\n}\n\nexport interface PlayableEditorHostCompatibilityReportLike {\n diagnostics?: unknown;\n}\n\nexport interface PlayableEditorHostCompatibilityInspectionOptions {\n title?: string;\n source?: string;\n}\n\nexport interface PlayableEditorPackageAliasPlanInspectionInput {\n plan: import('../package-resolution/index').PlayableEditorPackageAliasPlan;\n fileExists: import('../package-resolution/index').PlayableEditorFileExists;\n title?: string;\n}\n\nexport interface PlayableEditorUpgradeReadinessInspectionInput {\n title?: string;\n hostCompatibility?: {\n report: PlayableEditorHostCompatibilityReportLike;\n options?: PlayableEditorHostCompatibilityInspectionOptions;\n };\n packageAliasPlan?: PlayableEditorPackageAliasPlanInspectionInput;\n packageExports?: {\n packageJson: PlayableEditorPackageExportsLike;\n options?: PlayableEditorPackageExportsInspectionOptions;\n };\n installedVersion?: {\n packageJson: PlayableEditorInstalledVersionLike;\n options?: PlayableEditorInstalledVersionInspectionOptions;\n };\n importBoundaries?: {\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[];\n options?: PlayableEditorImportBoundaryInspectionOptions;\n };\n migrationReadiness?: {\n snapshot: PlayableEditorImportSnapshot | readonly PlayableEditorImportSnapshotFile[];\n options?: PlayableEditorMigrationReadinessInspectionOptions;\n };\n}\n"]}
@@ -9,6 +9,7 @@ export * from './product-asset-authoring';
9
9
  export * from './product-adapter';
10
10
  export * from './product-scene-authoring';
11
11
  export * from './product-rendering-authoring';
12
+ export * from './project-files';
12
13
  export * from './module-invalidation';
13
14
  export * from './session-metadata';
14
15
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
@@ -9,6 +9,7 @@ export * from './product-asset-authoring.js';
9
9
  export * from './product-adapter.js';
10
10
  export * from './product-scene-authoring.js';
11
11
  export * from './product-rendering-authoring.js';
12
+ export * from './project-files.js';
12
13
  export * from './module-invalidation.js';
13
14
  export * from './session-metadata.js';
14
15
  export * from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './build-info-core';\nexport * from './build-info-node';\nexport * from './asset-authoring';\nexport * from './authoring-http';\nexport * from './editor-scene-workflow';\nexport * from './plugin';\nexport * from './product-authoring-api';\nexport * from './product-asset-authoring';\nexport * from './product-adapter';\nexport * from './product-scene-authoring';\nexport * from './product-rendering-authoring';\nexport * from './module-invalidation';\nexport * from './session-metadata';\nexport * from './types';\nexport * from '../asset-database/index';\nexport * from '../asset-database/node';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './build-info-core';\nexport * from './build-info-node';\nexport * from './asset-authoring';\nexport * from './authoring-http';\nexport * from './editor-scene-workflow';\nexport * from './plugin';\nexport * from './product-authoring-api';\nexport * from './product-asset-authoring';\nexport * from './product-adapter';\nexport * from './product-scene-authoring';\nexport * from './product-rendering-authoring';\nexport * from './project-files';\nexport * from './module-invalidation';\nexport * from './session-metadata';\nexport * from './types';\nexport * from '../asset-database/index';\nexport * from '../asset-database/node';\n"]}
@@ -3,6 +3,7 @@ import { type PlayableAuthoringServerHandlers, type PlayableAuthoringServerRespo
3
3
  import { readPlayableAuthoringJsonBody } from './authoring-http';
4
4
  export interface FpsGameEditorProjectAuthoringApiPluginOptions {
5
5
  projectRoot: string;
6
+ projectMediaMaxBytes?: number;
6
7
  name?: string;
7
8
  createAssetAuthoringHandlers(server: ViteDevServer): Promise<Pick<PlayableAuthoringServerHandlers, 'loadManifest' | 'loadEditorAssetLibrary' | 'runCommand'>>;
8
9
  getAuthoringWrittenFiles?: (server: ViteDevServer) => Promise<readonly string[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"product-authoring-api.d.ts","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAc,MAAM,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,6BAA6B,EAG9B,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,6CAA6C;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAC/D,+BAA+B,EAC/B,cAAc,GAAG,wBAAwB,GAAG,YAAY,CACzD,CAAC,CAAC;IACH,wBAAwB,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACjF,2BAA2B,CAAC,EAAE,CAAC,KAAK,EAAE;QACpC,MAAM,EAAE,aAAa,CAAC;QACtB,GAAG,EAAE,OAAO,CAAC;QACb,YAAY,EAAE,OAAO,6BAA6B,CAAC;KACpD,KAAK,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC/C,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzE,eAAe,CAAC,KAAK,EAAE;QACrB,MAAM,EAAE,aAAa,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxC,IAAI,EAAE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AAK,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC/C,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzE,eAAe,CAAC,KAAK,EAAE;QACrB,MAAM,EAAE,aAAa,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,+BAA+B,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC;CACxC;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,6CAA6C,GACrD,MAAM,CA4MR;AAED,wBAAgB,mCAAmC,CACjD,aAAa,EAAE,MAAM,EACrB,qBAAqB,EAAE,SAAS,MAAM,EAAE,GACvC,OAAO,CAQT"}
@@ -1,8 +1,12 @@
1
1
  import path from 'node:path';
2
2
  import { mkdir, writeFile } from 'node:fs/promises';
3
+ import { pipeline } from 'node:stream/promises';
3
4
  import { handlePlayableAuthoringServerRequest, } from '../authoring-server/index.js';
4
5
  import { createPlayableAuthoringTransportPathNormalizer, readPlayableAuthoringJsonBody, sendPlayableAuthoringHttpResponse, setPlayableAuthoringCorsHeaders, } from './authoring-http.js';
6
+ import { resolveEditorProjectMediaSupport } from '../project-files/index.js';
5
7
  import { resolveFpsGameEditorViteFilePath } from './module-invalidation.js';
8
+ import { closeEditorProjectFileHandle, openVerifiedEditorProjectFile, resolveEditorProjectMediaMaxBytes, } from './project-file-handle.js';
9
+ import { readEditorProjectFile, scanEditorProjectFiles } from './project-files.js';
6
10
  export function createFpsGameEditorProjectAuthoringApiPlugin(options) {
7
11
  let authoringWrittenFilesPromise = Promise.resolve([]);
8
12
  return {
@@ -35,6 +39,90 @@ export function createFpsGameEditorProjectAuthoringApiPlugin(options) {
35
39
  ? pathname
36
40
  .replace(/^\/__fps_editor_authoring/, '') || '/'
37
41
  : '/';
42
+ if (isProjectAuthoringRoute && route === '/project-media') {
43
+ setPlayableAuthoringCorsHeaders(res);
44
+ if (req.method === 'OPTIONS') {
45
+ res.statusCode = 204;
46
+ res.end();
47
+ return;
48
+ }
49
+ if (req.method !== 'GET') {
50
+ sendPlayableAuthoringHttpResponse(res, { statusCode: 405, body: { ok: false, error: 'method_not_allowed' } });
51
+ return;
52
+ }
53
+ const requestedPath = requestUrl.searchParams.get('path')?.trim() ?? '';
54
+ if (!requestedPath) {
55
+ sendPlayableAuthoringHttpResponse(res, { statusCode: 400, body: { ok: false, error: 'missing_file_path' } });
56
+ return;
57
+ }
58
+ try {
59
+ const opened = await openVerifiedEditorProjectFile(options.projectRoot, requestedPath);
60
+ let operationError = null;
61
+ let finalByte = null;
62
+ try {
63
+ const support = resolveEditorProjectMediaSupport(opened.relativePath);
64
+ if (!support)
65
+ throw new Error('project_file_media_unsupported');
66
+ if (opened.stat.size > resolveEditorProjectMediaMaxBytes(options.projectMediaMaxBytes)) {
67
+ throw new Error('project_file_media_too_large');
68
+ }
69
+ const name = path.basename(opened.relativePath);
70
+ res.statusCode = 200;
71
+ res.setHeader('Content-Type', support.mimeType);
72
+ res.setHeader('Content-Length', String(opened.stat.size));
73
+ res.setHeader('Content-Disposition', `inline; filename*=UTF-8''${encodeURIComponent(name)}`);
74
+ res.setHeader('X-Content-Type-Options', 'nosniff');
75
+ if (opened.stat.size > 0) {
76
+ finalByte = Buffer.allocUnsafe(1);
77
+ const read = await opened.handle.read(finalByte, 0, 1, opened.stat.size - 1);
78
+ if (read.bytesRead !== 1)
79
+ throw new Error('project_file_changed_during_read');
80
+ }
81
+ if (opened.stat.size > 1) {
82
+ await pipeline(opened.handle.createReadStream({
83
+ autoClose: false,
84
+ start: 0,
85
+ end: opened.stat.size - 2,
86
+ }), res, { end: false });
87
+ }
88
+ }
89
+ catch (error) {
90
+ operationError = error;
91
+ }
92
+ try {
93
+ await closeEditorProjectFileHandle(opened.handle);
94
+ }
95
+ catch (closeError) {
96
+ if (operationError) {
97
+ const aggregate = new Error('project_file_close_failed');
98
+ aggregate.errors = [operationError, closeError];
99
+ operationError = aggregate;
100
+ }
101
+ else {
102
+ operationError = closeError;
103
+ }
104
+ }
105
+ if (operationError)
106
+ throw operationError;
107
+ if (finalByte)
108
+ res.end(finalByte);
109
+ else
110
+ res.end();
111
+ }
112
+ catch (error) {
113
+ if (!res.headersSent) {
114
+ const errorMessage = error instanceof Error ? error.message : String(error);
115
+ sendPlayableAuthoringHttpResponse(res, {
116
+ statusCode: errorMessage === 'project_file_media_too_large' ? 413 : 404,
117
+ body: { ok: false, error: errorMessage },
118
+ });
119
+ }
120
+ else {
121
+ res.destroy(error instanceof Error ? error : undefined);
122
+ }
123
+ }
124
+ return;
125
+ }
38
126
  if (isProjectAuthoringRoute && route.startsWith('/rendering-profile')) {
39
127
  if (!options.handleRenderingProfileRoute) {
40
128
  next();
@@ -86,6 +174,12 @@ export function createFpsGameEditorProjectAuthoringApiPlugin(options) {
86
174
  throw new Error('asset_library_handler_unavailable');
87
175
  return handlers.loadEditorAssetLibrary(routeInput);
88
176
  },
177
+ async loadProjectFiles() {
178
+ return scanEditorProjectFiles(options.projectRoot);
179
+ },
180
+ async loadProjectFile({ path: requestedPath }) {
181
+ return readEditorProjectFile(options.projectRoot, requestedPath);
182
+ },
89
183
  async loadEditorScene() {
90
184
  return options.loadEditorScene(server);
91
185
  },
@@ -1 +1 @@
1
- {"version":3,"file":"product-authoring-api.js","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAA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,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAmC,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACzG,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAC1C,OAAO,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,0BAA0B,CAAC,EACxC,IAAI,EAAE,UAAU,EAChB,IAAI,GACqE;IACzE,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC","sourcesContent":["import path from 'node:path';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport type { HmrContext, Plugin, ViteDevServer } from 'vite';\nimport {\n handlePlayableAuthoringServerRequest,\n type PlayableAuthoringServerHandlers,\n type PlayableAuthoringServerResponse,\n} from '../authoring-server/index';\nimport {\n createPlayableAuthoringTransportPathNormalizer,\n readPlayableAuthoringJsonBody,\n sendPlayableAuthoringHttpResponse,\n setPlayableAuthoringCorsHeaders,\n} from './authoring-http';\nimport { resolveFpsGameEditorViteFilePath } from './module-invalidation';\n\nexport interface FpsGameEditorProjectAuthoringApiPluginOptions {\n projectRoot: string;\n name?: string;\n createAssetAuthoringHandlers(server: ViteDevServer): Promise<Pick<\n PlayableAuthoringServerHandlers,\n 'loadManifest' | 'loadEditorAssetLibrary' | 'runCommand'\n >>;\n getAuthoringWrittenFiles?: (server: ViteDevServer) => Promise<readonly string[]>;\n handleRenderingProfileRoute?: (input: {\n server: ViteDevServer;\n req: unknown;\n readJsonBody: typeof readPlayableAuthoringJsonBody;\n }) => Promise<PlayableAuthoringServerResponse>;\n loadEditorScene(server: ViteDevServer): Promise<Record<string, unknown>>;\n saveEditorScene(input: {\n server: ViteDevServer;\n saveMode: string;\n rawEditorScene: Record<string, unknown>;\n body: Record<string, unknown>;\n }): Promise<Record<string, unknown>>;\n writeFile?: PlayableAuthoringServerHandlers['writeFile'];\n logger?: Pick<Console, 'log' | 'warn'>;\n}\n\nexport function createFpsGameEditorProjectAuthoringApiPlugin(\n options: FpsGameEditorProjectAuthoringApiPluginOptions,\n): Plugin {\n let authoringWrittenFilesPromise: Promise<readonly string[]> = Promise.resolve([]);\n return {\n name: options.name ?? 'fps-editor-project-authoring-api',\n enforce: 'post' as const,\n apply: 'serve' as const,\n async configureServer(server) {\n const assetAuthoringHandlersPromise = options.createAssetAuthoringHandlers(server);\n if (options.getAuthoringWrittenFiles) {\n authoringWrittenFilesPromise = options.getAuthoringWrittenFiles(server)\n .then(paths => paths.map(file => path.resolve(options.projectRoot, file)))\n .then(async (paths) => {\n suppressFpsGameEditorAuthoringFullReloads(server, paths);\n suppressFpsGameEditorAuthoringWatcherAdds(server.watcher, paths);\n await server.watcher?.unwatch?.(paths);\n options.logger?.log?.('[ProjectAuthoring][Vite] watcher and HMR suppressed for authoring-written files', paths);\n return paths;\n })\n .catch((error) => {\n options.logger?.warn?.('[ProjectAuthoring][Vite] failed to resolve authoring files for HMR suppression', error);\n return [];\n });\n await authoringWrittenFilesPromise;\n }\n\n server.middlewares.use(async (req: any, res: any, next: any) => {\n const requestUrl = new URL(req.url ?? '', 'http://localhost');\n const pathname = requestUrl.pathname;\n const isProjectAuthoringRoute = pathname.startsWith('/__fps_editor_authoring');\n const route = isProjectAuthoringRoute\n ? pathname\n .replace(/^\\/__fps_editor_authoring/, '') || '/'\n : '/';\n\n if (isProjectAuthoringRoute && route.startsWith('/rendering-profile')) {\n if (!options.handleRenderingProfileRoute) {\n next();\n return;\n }\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n\n try {\n const response = await options.handleRenderingProfileRoute({\n server,\n req,\n readJsonBody: readPlayableAuthoringJsonBody,\n });\n sendPlayableAuthoringHttpResponse(res, response);\n } catch (error) {\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: 500,\n body: {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: (error as any)?.details,\n },\n });\n }\n return;\n }\n\n const response = await handlePlayableAuthoringServerRequest({\n url: req.url ?? '',\n method: req.method ?? 'GET',\n }, {\n readBody: () => readPlayableAuthoringJsonBody(req),\n normalizeTransportPath: createPlayableAuthoringTransportPathNormalizer(options.projectRoot, {\n relativeRoot: '.platform-sim',\n }),\n async loadManifest(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadManifest) throw new Error('asset_manifest_handler_unavailable');\n return handlers.loadManifest(routeInput);\n },\n async loadEditorAssetLibrary(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadEditorAssetLibrary) throw new Error('asset_library_handler_unavailable');\n return handlers.loadEditorAssetLibrary(routeInput);\n },\n async loadEditorScene() {\n return options.loadEditorScene(server);\n },\n writeFile: options.writeFile ?? writePlayableAuthoringFile,\n async runCommand(commandInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.runCommand) throw new Error('asset_command_handler_unavailable');\n return handlers.runCommand(commandInput);\n },\n async saveEditorScene({ mode: saveMode, rawEditorScene, body }) {\n return options.saveEditorScene({\n server,\n saveMode,\n rawEditorScene: rawEditorScene as Record<string, unknown>,\n body: body as Record<string, unknown>,\n });\n },\n });\n\n if (!response) {\n next();\n return;\n }\n sendPlayableAuthoringHttpResponse(res, response);\n });\n },\n async handleHotUpdate(context: HmrContext) {\n if (typeof context.file !== 'string') return;\n const authoringWrittenFiles = await authoringWrittenFilesPromise;\n if (isFpsGameEditorAuthoringWrittenFile(context.file, authoringWrittenFiles)) {\n // Keep the watcher event active until Vite has finished running every\n // hot-update hook. Vite may emit its full-reload message only after\n // this hook resolves; clearing here lets canonical asset replacements\n // reload the whole Editor before the freshness coordinator can rebase\n // the active session.\n return [];\n }\n },\n };\n}\n\nexport function isFpsGameEditorAuthoringWrittenFile(\n candidateFile: string,\n authoringWrittenFiles: readonly string[],\n): boolean {\n const candidate = resolveFpsGameEditorViteFilePath(candidateFile);\n return authoringWrittenFiles.some((configuredFile) => {\n const configured = resolveFpsGameEditorViteFilePath(configuredFile);\n if (candidate === configured) return true;\n const relative = path.relative(configured, candidate);\n return relative.length > 0 && relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n });\n}\n\nfunction suppressFpsGameEditorAuthoringFullReloads(\n server: {\n watcher?: { prependListener?: (event: string, listener: (file: unknown) => void) => unknown };\n ws?: { send?: (payload: any, ...args: any[]) => unknown };\n },\n authoringWrittenFiles: readonly string[],\n): void {\n if (!server.watcher?.prependListener || !server.ws?.send) return;\n let activeAuthoringFile: string | null = null;\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n const clearActiveFile = (): void => {\n activeAuthoringFile = null;\n if (clearTimer) clearTimeout(clearTimer);\n clearTimer = null;\n };\n const markFile = (file: unknown): void => {\n clearActiveFile();\n activeAuthoringFile = typeof file === 'string'\n && isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles)\n ? resolveFpsGameEditorViteFilePath(file)\n : null;\n if (activeAuthoringFile) {\n clearTimer = setTimeout(clearActiveFile, 1_000);\n }\n };\n for (const event of ['add', 'change', 'unlink']) {\n server.watcher.prependListener(event, markFile);\n }\n\n const send = server.ws.send.bind(server.ws);\n server.ws.send = (payload: any, ...args: any[]) => {\n const triggeredBy = typeof payload?.triggeredBy === 'string' ? payload.triggeredBy : undefined;\n const isOwnedTriggeredFile = triggeredBy\n ? isFpsGameEditorAuthoringWrittenFile(triggeredBy, authoringWrittenFiles)\n : false;\n if (payload?.type === 'full-reload' && (isOwnedTriggeredFile || (activeAuthoringFile && !triggeredBy))) {\n return;\n }\n return send(payload, ...args);\n };\n}\n\nfunction suppressFpsGameEditorAuthoringWatcherAdds(\n watcher: { add?: (paths: string | readonly string[]) => unknown } | undefined,\n authoringWrittenFiles: readonly string[],\n): void {\n if (!watcher?.add) return;\n const add = watcher.add.bind(watcher);\n watcher.add = (input) => {\n const paths = typeof input === 'string' ? [input] : [...input];\n const filtered = paths.filter(file => !isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles));\n if (filtered.length === 0) return watcher;\n return add(typeof input === 'string' ? filtered[0] : filtered);\n };\n}\n\nasync function writePlayableAuthoringFile({\n path: targetPath,\n text,\n}: Parameters<NonNullable<PlayableAuthoringServerHandlers['writeFile']>>[0]) {\n await mkdir(path.dirname(targetPath), { recursive: true });\n await writeFile(targetPath, text, 'utf8');\n return { ok: true, path: targetPath };\n}\n"]}
1
+ {"version":3,"file":"product-authoring-api.js","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EACL,oCAAoC,GAGrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,8CAA8C,EAC9C,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAA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AK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAmC,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACzG,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAC1C,OAAO,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,0BAA0B,CAAC,EACxC,IAAI,EAAE,UAAU,EAChB,IAAI,GACqE;IACzE,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC","sourcesContent":["import path from 'node:path';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport type { HmrContext, Plugin, ViteDevServer } from 'vite';\nimport {\n handlePlayableAuthoringServerRequest,\n type PlayableAuthoringServerHandlers,\n type PlayableAuthoringServerResponse,\n} from '../authoring-server/index';\nimport {\n createPlayableAuthoringTransportPathNormalizer,\n readPlayableAuthoringJsonBody,\n sendPlayableAuthoringHttpResponse,\n setPlayableAuthoringCorsHeaders,\n} from './authoring-http';\nimport { resolveEditorProjectMediaSupport } from '../project-files/index';\nimport { resolveFpsGameEditorViteFilePath } from './module-invalidation';\nimport {\n closeEditorProjectFileHandle,\n openVerifiedEditorProjectFile,\n resolveEditorProjectMediaMaxBytes,\n} from './project-file-handle';\nimport { readEditorProjectFile, scanEditorProjectFiles } from './project-files';\n\nexport interface FpsGameEditorProjectAuthoringApiPluginOptions {\n projectRoot: string;\n projectMediaMaxBytes?: number;\n name?: string;\n createAssetAuthoringHandlers(server: ViteDevServer): Promise<Pick<\n PlayableAuthoringServerHandlers,\n 'loadManifest' | 'loadEditorAssetLibrary' | 'runCommand'\n >>;\n getAuthoringWrittenFiles?: (server: ViteDevServer) => Promise<readonly string[]>;\n handleRenderingProfileRoute?: (input: {\n server: ViteDevServer;\n req: unknown;\n readJsonBody: typeof readPlayableAuthoringJsonBody;\n }) => Promise<PlayableAuthoringServerResponse>;\n loadEditorScene(server: ViteDevServer): Promise<Record<string, unknown>>;\n saveEditorScene(input: {\n server: ViteDevServer;\n saveMode: string;\n rawEditorScene: Record<string, unknown>;\n body: Record<string, unknown>;\n }): Promise<Record<string, unknown>>;\n writeFile?: PlayableAuthoringServerHandlers['writeFile'];\n logger?: Pick<Console, 'log' | 'warn'>;\n}\n\nexport function createFpsGameEditorProjectAuthoringApiPlugin(\n options: FpsGameEditorProjectAuthoringApiPluginOptions,\n): Plugin {\n let authoringWrittenFilesPromise: Promise<readonly string[]> = Promise.resolve([]);\n return {\n name: options.name ?? 'fps-editor-project-authoring-api',\n enforce: 'post' as const,\n apply: 'serve' as const,\n async configureServer(server) {\n const assetAuthoringHandlersPromise = options.createAssetAuthoringHandlers(server);\n if (options.getAuthoringWrittenFiles) {\n authoringWrittenFilesPromise = options.getAuthoringWrittenFiles(server)\n .then(paths => paths.map(file => path.resolve(options.projectRoot, file)))\n .then(async (paths) => {\n suppressFpsGameEditorAuthoringFullReloads(server, paths);\n suppressFpsGameEditorAuthoringWatcherAdds(server.watcher, paths);\n await server.watcher?.unwatch?.(paths);\n options.logger?.log?.('[ProjectAuthoring][Vite] watcher and HMR suppressed for authoring-written files', paths);\n return paths;\n })\n .catch((error) => {\n options.logger?.warn?.('[ProjectAuthoring][Vite] failed to resolve authoring files for HMR suppression', error);\n return [];\n });\n await authoringWrittenFilesPromise;\n }\n\n server.middlewares.use(async (req: any, res: any, next: any) => {\n const requestUrl = new URL(req.url ?? '', 'http://localhost');\n const pathname = requestUrl.pathname;\n const isProjectAuthoringRoute = pathname.startsWith('/__fps_editor_authoring');\n const route = isProjectAuthoringRoute\n ? pathname\n .replace(/^\\/__fps_editor_authoring/, '') || '/'\n : '/';\n\n if (isProjectAuthoringRoute && route === '/project-media') {\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n if (req.method !== 'GET') {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 405, body: { ok: false, error: 'method_not_allowed' } });\n return;\n }\n const requestedPath = requestUrl.searchParams.get('path')?.trim() ?? '';\n if (!requestedPath) {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 400, body: { ok: false, error: 'missing_file_path' } });\n return;\n }\n try {\n const opened = await openVerifiedEditorProjectFile(options.projectRoot, requestedPath);\n let operationError: unknown = null;\n let finalByte: Buffer | null = null;\n try {\n const support = resolveEditorProjectMediaSupport(opened.relativePath);\n if (!support) throw new Error('project_file_media_unsupported');\n if (opened.stat.size > resolveEditorProjectMediaMaxBytes(options.projectMediaMaxBytes)) {\n throw new Error('project_file_media_too_large');\n }\n const name = path.basename(opened.relativePath);\n res.statusCode = 200;\n res.setHeader('Content-Type', support.mimeType);\n res.setHeader('Content-Length', String(opened.stat.size));\n res.setHeader('Content-Disposition', `inline; filename*=UTF-8''${encodeURIComponent(name)}`);\n res.setHeader('X-Content-Type-Options', 'nosniff');\n if (opened.stat.size > 0) {\n finalByte = Buffer.allocUnsafe(1);\n const read = await opened.handle.read(finalByte, 0, 1, opened.stat.size - 1);\n if (read.bytesRead !== 1) throw new Error('project_file_changed_during_read');\n }\n if (opened.stat.size > 1) {\n await pipeline(opened.handle.createReadStream({\n autoClose: false,\n start: 0,\n end: opened.stat.size - 2,\n }), res, { end: false });\n }\n } catch (error) {\n operationError = error;\n }\n try {\n await closeEditorProjectFileHandle(opened.handle);\n } catch (closeError) {\n if (operationError) {\n const aggregate = new Error('project_file_close_failed') as Error & { errors: unknown[] };\n aggregate.errors = [operationError, closeError];\n operationError = aggregate;\n } else {\n operationError = closeError;\n }\n }\n if (operationError) throw operationError;\n if (finalByte) res.end(finalByte);\n else res.end();\n } catch (error) {\n if (!res.headersSent) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: errorMessage === 'project_file_media_too_large' ? 413 : 404,\n body: { ok: false, error: errorMessage },\n });\n } else {\n res.destroy(error instanceof Error ? error : undefined);\n }\n }\n return;\n }\n\n if (isProjectAuthoringRoute && route.startsWith('/rendering-profile')) {\n if (!options.handleRenderingProfileRoute) {\n next();\n return;\n }\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n\n try {\n const response = await options.handleRenderingProfileRoute({\n server,\n req,\n readJsonBody: readPlayableAuthoringJsonBody,\n });\n sendPlayableAuthoringHttpResponse(res, response);\n } catch (error) {\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: 500,\n body: {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: (error as any)?.details,\n },\n });\n }\n return;\n }\n\n const response = await handlePlayableAuthoringServerRequest({\n url: req.url ?? '',\n method: req.method ?? 'GET',\n }, {\n readBody: () => readPlayableAuthoringJsonBody(req),\n normalizeTransportPath: createPlayableAuthoringTransportPathNormalizer(options.projectRoot, {\n relativeRoot: '.platform-sim',\n }),\n async loadManifest(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadManifest) throw new Error('asset_manifest_handler_unavailable');\n return handlers.loadManifest(routeInput);\n },\n async loadEditorAssetLibrary(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadEditorAssetLibrary) throw new Error('asset_library_handler_unavailable');\n return handlers.loadEditorAssetLibrary(routeInput);\n },\n async loadProjectFiles() {\n return scanEditorProjectFiles(options.projectRoot);\n },\n async loadProjectFile({ path: requestedPath }) {\n return readEditorProjectFile(options.projectRoot, requestedPath);\n },\n async loadEditorScene() {\n return options.loadEditorScene(server);\n },\n writeFile: options.writeFile ?? writePlayableAuthoringFile,\n async runCommand(commandInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.runCommand) throw new Error('asset_command_handler_unavailable');\n return handlers.runCommand(commandInput);\n },\n async saveEditorScene({ mode: saveMode, rawEditorScene, body }) {\n return options.saveEditorScene({\n server,\n saveMode,\n rawEditorScene: rawEditorScene as Record<string, unknown>,\n body: body as Record<string, unknown>,\n });\n },\n });\n\n if (!response) {\n next();\n return;\n }\n sendPlayableAuthoringHttpResponse(res, response);\n });\n },\n async handleHotUpdate(context: HmrContext) {\n if (typeof context.file !== 'string') return;\n const authoringWrittenFiles = await authoringWrittenFilesPromise;\n if (isFpsGameEditorAuthoringWrittenFile(context.file, authoringWrittenFiles)) {\n // Keep the watcher event active until Vite has finished running every\n // hot-update hook. Vite may emit its full-reload message only after\n // this hook resolves; clearing here lets canonical asset replacements\n // reload the whole Editor before the freshness coordinator can rebase\n // the active session.\n return [];\n }\n },\n };\n}\n\nexport function isFpsGameEditorAuthoringWrittenFile(\n candidateFile: string,\n authoringWrittenFiles: readonly string[],\n): boolean {\n const candidate = resolveFpsGameEditorViteFilePath(candidateFile);\n return authoringWrittenFiles.some((configuredFile) => {\n const configured = resolveFpsGameEditorViteFilePath(configuredFile);\n if (candidate === configured) return true;\n const relative = path.relative(configured, candidate);\n return relative.length > 0 && relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n });\n}\n\nfunction suppressFpsGameEditorAuthoringFullReloads(\n server: {\n watcher?: { prependListener?: (event: string, listener: (file: unknown) => void) => unknown };\n ws?: { send?: (payload: any, ...args: any[]) => unknown };\n },\n authoringWrittenFiles: readonly string[],\n): void {\n if (!server.watcher?.prependListener || !server.ws?.send) return;\n let activeAuthoringFile: string | null = null;\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n const clearActiveFile = (): void => {\n activeAuthoringFile = null;\n if (clearTimer) clearTimeout(clearTimer);\n clearTimer = null;\n };\n const markFile = (file: unknown): void => {\n clearActiveFile();\n activeAuthoringFile = typeof file === 'string'\n && isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles)\n ? resolveFpsGameEditorViteFilePath(file)\n : null;\n if (activeAuthoringFile) {\n clearTimer = setTimeout(clearActiveFile, 1_000);\n }\n };\n for (const event of ['add', 'change', 'unlink']) {\n server.watcher.prependListener(event, markFile);\n }\n\n const send = server.ws.send.bind(server.ws);\n server.ws.send = (payload: any, ...args: any[]) => {\n const triggeredBy = typeof payload?.triggeredBy === 'string' ? payload.triggeredBy : undefined;\n const isOwnedTriggeredFile = triggeredBy\n ? isFpsGameEditorAuthoringWrittenFile(triggeredBy, authoringWrittenFiles)\n : false;\n if (payload?.type === 'full-reload' && (isOwnedTriggeredFile || (activeAuthoringFile && !triggeredBy))) {\n return;\n }\n return send(payload, ...args);\n };\n}\n\nfunction suppressFpsGameEditorAuthoringWatcherAdds(\n watcher: { add?: (paths: string | readonly string[]) => unknown } | undefined,\n authoringWrittenFiles: readonly string[],\n): void {\n if (!watcher?.add) return;\n const add = watcher.add.bind(watcher);\n watcher.add = (input) => {\n const paths = typeof input === 'string' ? [input] : [...input];\n const filtered = paths.filter(file => !isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles));\n if (filtered.length === 0) return watcher;\n return add(typeof input === 'string' ? filtered[0] : filtered);\n };\n}\n\nasync function writePlayableAuthoringFile({\n path: targetPath,\n text,\n}: Parameters<NonNullable<PlayableAuthoringServerHandlers['writeFile']>>[0]) {\n await mkdir(path.dirname(targetPath), { recursive: true });\n await writeFile(targetPath, text, 'utf8');\n return { ok: true, path: targetPath };\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { type Stats } from 'node:fs';
2
+ import { type FileHandle } from 'node:fs/promises';
3
+ export declare const DEFAULT_EDITOR_PROJECT_MEDIA_MAX_BYTES: number;
4
+ export interface OpenedVerifiedEditorProjectFile {
5
+ absolutePath: string;
6
+ handle: FileHandle;
7
+ relativePath: string;
8
+ stat: Stats;
9
+ }
10
+ export declare function closeEditorProjectFileHandle(handle: Pick<FileHandle, 'close'>): Promise<void>;
11
+ export declare function normalizeEditorProjectFileReadPath(requestedPath: string): string;
12
+ export declare function resolveEditorProjectMediaMaxBytes(value?: number): number;
13
+ export declare function openVerifiedEditorProjectFile(projectRoot: string, requestedPath: string): Promise<OpenedVerifiedEditorProjectFile>;
14
+ //# sourceMappingURL=project-file-handle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-file-handle.d.ts","sourceRoot":"","sources":["../../src/vite/project-file-handle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAChD,OAAW,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGvD,eAAO,MAAM,sCAAsC,QAAoB,CAAC;AAGxE,MAAM,WAAW,+BAA+B;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,KAAK,CAAC;CACb;AAED,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CAaf;AAED,wBAAgB,kCAAkC,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAehF;AAED,wBAAgB,iCAAiC,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAIxE;AAED,wBAAsB,6BAA6B,CACjD,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,+BAA+B,CAAC,CAwC1C"}