@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-service-vite.js","sourceRoot":"","sources":["../../src/vite/editor-service-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,0BAA0B,GAE3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wCAAwC,EACxC,2BAA2B,EAC3B,+BAA+B,GAIhC,MAAM,4BAA4B,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AC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { randomBytes, randomUUID, timingSafeEqual } from 'node:crypto';\nimport { readFileSync, unlinkSync } from 'node:fs';\nimport {\n chmod,\n mkdir,\n open,\n readFile,\n realpath,\n rename,\n unlink,\n} from 'node:fs/promises';\nimport path from 'node:path';\nimport {\n createEditorServiceGateway,\n type EditorServiceGateway,\n} from '@fps-games/editor-core';\nimport {\n EDITOR_SERVICE_DESCRIPTOR_SCHEMA_VERSION,\n EDITOR_SERVICE_GATEWAY_PATH,\n EDITOR_SERVICE_PROTOCOL_VERSION,\n type EditorServiceGatewayRequest,\n type EditorServiceRuntimeDescriptor,\n type EditorServiceTokenScope,\n} from '@fps-games/editor-protocol';\nimport type { ViteDevServer } from 'vite';\nimport type { FpsGameEditorProjectDefinition } from '../product/index';\nimport { createFpsGameEditorProjectServiceAuthority } from './project-editor-service';\nimport type { PlayableEditorViteResolvedIntegration } from './types';\n\nexport const PLAYABLE_EDITOR_AGENT_RUNTIME_RELATIVE_PATH = path.join(\n 'node_modules',\n '.fps-editor',\n 'agent-runtime.json',\n);\nconst ACTIVE_PROJECT_SERVICE_ROOTS = new Map<string, string>();\nconst PROCESS_TERMINATION_SIGNALS = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const;\nconst PROCESS_OWNED_FILE_CLEANUPS = new Set<() => void>();\nconst PROCESS_SIGNAL_HANDLERS = new Map<NodeJS.Signals, () => void>();\nlet processExitCleanupInstalled = false;\n\nexport interface PlayableEditorViteEditorServiceOptions {\n enabled?: boolean;\n project?: FpsGameEditorProjectDefinition;\n tokenScopes?: readonly EditorServiceTokenScope[];\n}\n\nexport interface PlayableEditorViteEditorService {\n readonly descriptorPath: string;\n readonly serviceInstanceId: string;\n dispose(): Promise<void>;\n}\n\nexport interface PlayableEditorViteEditorServiceCredentials {\n readonly serviceInstanceId: string;\n readonly token: string;\n}\n\nexport async function installPlayableEditorViteEditorService(input: {\n readonly server: ViteDevServer;\n readonly integration: PlayableEditorViteResolvedIntegration;\n readonly options?: PlayableEditorViteEditorServiceOptions;\n readonly credentials?: PlayableEditorViteEditorServiceCredentials;\n readonly logger?: Pick<Console, 'info' | 'warn' | 'error'>;\n}): Promise<PlayableEditorViteEditorService | null> {\n if (input.options?.enabled === false) return null;\n const canonicalProjectRoot = await realpath(input.integration.projectRoot);\n const descriptorPath = path.resolve(canonicalProjectRoot, PLAYABLE_EDITOR_AGENT_RUNTIME_RELATIVE_PATH);\n assertDescriptorInsideProject(canonicalProjectRoot, descriptorPath);\n\n const serviceInstanceId = input.credentials?.serviceInstanceId ?? randomUUID();\n const token = input.credentials?.token ?? randomBytes(32).toString('base64url');\n const tokenScopes = normalizeTokenScopes(input.options?.tokenScopes);\n const startedAt = new Date().toISOString();\n const activeOwner = ACTIVE_PROJECT_SERVICE_ROOTS.get(canonicalProjectRoot);\n if (activeOwner) throw new Error(`A live Editor Service already owns this project: ${activeOwner}.`);\n ACTIVE_PROJECT_SERVICE_ROOTS.set(canonicalProjectRoot, serviceInstanceId);\n let projectRootClaimed = true;\n const releaseProcessProjectRoot = (): void => {\n if (!projectRootClaimed) return;\n projectRootClaimed = false;\n if (ACTIVE_PROJECT_SERVICE_ROOTS.get(canonicalProjectRoot) === serviceInstanceId) {\n ACTIVE_PROJECT_SERVICE_ROOTS.delete(canonicalProjectRoot);\n }\n };\n const descriptorDirectory = path.dirname(descriptorPath);\n let projectLeaseOwner: DescriptorLockOwner;\n const projectLeasePath = `${descriptorPath}.owner`;\n try {\n await mkdir(descriptorDirectory, { recursive: true, mode: 0o700 });\n await chmod(descriptorDirectory, 0o700);\n assertDescriptorInsideProject(canonicalProjectRoot, await realpath(descriptorDirectory));\n projectLeaseOwner = await claimDescriptorLock(projectLeasePath);\n } catch (error) {\n releaseProcessProjectRoot();\n throw error;\n }\n let projectLeaseClaimed = true;\n const cleanupOwnedFilesAtProcessExit = (): void => {\n removeOwnedRuntimeDescriptorSync(descriptorPath, {\n canonicalProjectRoot,\n serviceInstanceId,\n pid: process.pid,\n token,\n });\n removeOwnedDescriptorLockSync(projectLeasePath, projectLeaseOwner);\n };\n const releaseProcessExitCleanup = registerProcessOwnedFileCleanup(\n cleanupOwnedFilesAtProcessExit,\n );\n const releaseProjectRoot = async (): Promise<void> => {\n if (!projectLeaseClaimed) return;\n projectLeaseClaimed = false;\n try {\n await removeOwnedDescriptorLock(projectLeasePath, projectLeaseOwner);\n } finally {\n releaseProcessProjectRoot();\n releaseProcessExitCleanup();\n }\n };\n let authority: Awaited<ReturnType<typeof createFpsGameEditorProjectServiceAuthority>>;\n try {\n authority = await createFpsGameEditorProjectServiceAuthority({\n projectRoot: canonicalProjectRoot,\n project: input.options?.project,\n serviceInstanceId,\n server: input.server,\n });\n } catch (error) {\n await releaseProjectRoot();\n throw error;\n }\n let gateway: EditorServiceGateway;\n let releaseBrowserCommandForwarder: () => void;\n try {\n gateway = createEditorServiceGateway({\n canonicalProjectRoot,\n packageVersion: input.integration.buildInfo.version,\n buildKey: input.integration.buildInfo.cacheKey,\n startedAt,\n host: authority.host,\n readTraces: authority.readTraces,\n readDocumentExport: authority.readDocumentExport,\n });\n releaseBrowserCommandForwarder = authority.bindBrowserCommandForwarder(\n gateway.forwardBrowserCommand,\n );\n } catch (error) {\n await authority.dispose().catch(() => undefined);\n await releaseProjectRoot();\n throw error;\n }\n const gatewayPath = EDITOR_SERVICE_GATEWAY_PATH;\n let descriptor: EditorServiceRuntimeDescriptor | null = null;\n let descriptorPublication: Promise<void> | null = null;\n let disposal: Promise<void> | null = null;\n let disposed = false;\n\n const gatewayMiddleware = async (request: any, response: any, next: any) => {\n const requestUrl = new URL(request.url ?? '', 'http://fps-editor.local');\n if (requestUrl.pathname !== gatewayPath) return next();\n setGatewayHeaders(request, response);\n if (request.method === 'OPTIONS') {\n response.statusCode = 204;\n response.end();\n return;\n }\n if (request.method !== 'POST') {\n sendJson(response, 405, { ok: false, diagnostics: [{ severity: 'error', source: 'transport', code: 'http.methodNotAllowed', message: 'Editor Service Gateway requires POST.' }] });\n return;\n }\n if (!hasBearerToken(request.headers?.authorization, token)) {\n sendJson(response, 401, { ok: false, diagnostics: [{ severity: 'error', source: 'transport', code: 'auth.invalidToken', message: 'Editor Service bearer token is invalid.' }] });\n return;\n }\n try {\n const gatewayRequest = await readJsonBody(request) as EditorServiceGatewayRequest;\n const result = await gateway.handle(gatewayRequest, tokenScopes);\n sendJson(response, result.ok ? 200 : 400, result);\n } catch (error) {\n sendJson(response, 400, {\n ok: false,\n diagnostics: [{\n severity: 'error',\n source: 'transport',\n code: 'request.invalidJson',\n message: error instanceof Error ? error.message : String(error),\n }],\n });\n }\n };\n try {\n input.server.middlewares.use(gatewayMiddleware);\n const middlewareStack = (input.server.middlewares as any).stack as Array<{ handle?: { name?: string } }> | undefined;\n const ownMiddlewareIndex = middlewareStack?.findIndex(layer => layer.handle === gatewayMiddleware) ?? -1;\n const fallbackIndex = middlewareStack?.findIndex(layer => /vite(?:SpaFallback|IndexHtml|404)Middleware/.test(layer.handle?.name ?? '')) ?? -1;\n if (middlewareStack && ownMiddlewareIndex >= 0 && fallbackIndex >= 0 && ownMiddlewareIndex > fallbackIndex) {\n const [layer] = middlewareStack.splice(ownMiddlewareIndex, 1);\n middlewareStack.splice(fallbackIndex, 0, layer);\n }\n } catch (error) {\n releaseBrowserCommandForwarder();\n gateway.dispose();\n await authority.dispose().catch(() => undefined);\n await releaseProjectRoot();\n throw error;\n }\n\n const publishDescriptor = (): Promise<void> => {\n if (disposed || descriptor) return Promise.resolve();\n if (descriptorPublication) return descriptorPublication;\n const publication = (async () => {\n const endpoint = resolveServerEndpoint(input.server, gatewayPath);\n const candidate: EditorServiceRuntimeDescriptor = {\n schemaVersion: EDITOR_SERVICE_DESCRIPTOR_SCHEMA_VERSION,\n protocolVersion: EDITOR_SERVICE_PROTOCOL_VERSION,\n canonicalProjectRoot,\n serviceInstanceId,\n pid: process.pid,\n endpoint,\n startedAt,\n packageName: '@fps-games/editor',\n packageVersion: input.integration.buildInfo.version,\n buildKey: input.integration.buildInfo.cacheKey,\n token,\n tokenScopes,\n };\n await claimRuntimeDescriptor(descriptorPath, candidate);\n descriptor = candidate;\n if (disposed) {\n await removeOwnedDescriptor(descriptorPath, candidate);\n descriptor = null;\n return;\n }\n input.logger?.info?.(`[fps-editor] Project Editor Service ready at ${endpoint}`);\n })();\n const trackedPublication = publication.finally(() => {\n if (descriptorPublication === trackedPublication) descriptorPublication = null;\n });\n descriptorPublication = trackedPublication;\n return trackedPublication;\n };\n\n const onListening = () => {\n void publishDescriptor().catch((error) => {\n input.logger?.error?.(`[fps-editor] Failed to publish Agent runtime descriptor: ${formatError(error)}`);\n void dispose();\n });\n };\n const onClose = () => { void dispose(); };\n input.server.httpServer?.once('close', onClose);\n if (input.server.httpServer?.listening) {\n try {\n await publishDescriptor();\n } catch (error) {\n await dispose().catch(() => undefined);\n throw error;\n }\n }\n else input.server.httpServer?.once('listening', onListening);\n\n async function dispose(): Promise<void> {\n if (disposal) return disposal;\n disposed = true;\n disposal = (async () => {\n input.server.httpServer?.off('listening', onListening);\n input.server.httpServer?.off('close', onClose);\n const activeMiddlewareStack = (input.server.middlewares as any).stack as Array<{ handle?: unknown }> | undefined;\n const middlewareIndex = activeMiddlewareStack?.findIndex(layer => layer.handle === gatewayMiddleware) ?? -1;\n if (middlewareIndex >= 0) activeMiddlewareStack!.splice(middlewareIndex, 1);\n const errors: unknown[] = [];\n try {\n releaseBrowserCommandForwarder();\n } catch (error) {\n errors.push(error);\n }\n gateway.dispose();\n try {\n await descriptorPublication;\n } catch (error) {\n errors.push(error);\n }\n try {\n if (descriptor) await removeOwnedDescriptor(descriptorPath, descriptor);\n } catch (error) {\n errors.push(error);\n }\n try {\n await authority.dispose();\n } catch (error) {\n errors.push(error);\n } finally {\n try {\n await releaseProjectRoot();\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length) {\n const error = new Error('Editor Service disposal failed.');\n (error as Error & { errors?: readonly unknown[] }).errors = errors;\n throw error;\n }\n })();\n return disposal;\n }\n\n return Object.freeze({ descriptorPath, serviceInstanceId, dispose });\n}\n\nasync function claimRuntimeDescriptor(\n descriptorPath: string,\n descriptor: EditorServiceRuntimeDescriptor,\n): Promise<void> {\n const directory = path.dirname(descriptorPath);\n await mkdir(directory, { recursive: true, mode: 0o700 });\n assertDescriptorInsideProject(descriptor.canonicalProjectRoot, await realpath(directory));\n const lockPath = `${descriptorPath}.lock`;\n const lockOwner = await claimDescriptorLock(lockPath);\n try {\n await assertOwnedDescriptorLock(lockPath, lockOwner);\n await assertDescriptorAvailable(descriptorPath, descriptor.canonicalProjectRoot);\n const temporaryPath = `${descriptorPath}.${process.pid}.${randomUUID()}.tmp`;\n let committed = false;\n try {\n const handle = await open(temporaryPath, 'wx', 0o600);\n try {\n await handle.writeFile(`${JSON.stringify(descriptor, null, 2)}\\n`, 'utf8');\n await handle.sync();\n } finally {\n await handle.close();\n }\n await chmod(temporaryPath, 0o600);\n await assertOwnedDescriptorLock(lockPath, lockOwner);\n await rename(temporaryPath, descriptorPath);\n committed = true;\n } finally {\n if (!committed) await unlink(temporaryPath).catch(() => undefined);\n }\n } finally {\n await removeOwnedDescriptorLock(lockPath, lockOwner);\n }\n}\n\ninterface DescriptorLockOwner { readonly pid: number; readonly token: string }\n\nfunction registerProcessOwnedFileCleanup(cleanup: () => void): () => void {\n PROCESS_OWNED_FILE_CLEANUPS.add(cleanup);\n installProcessOwnedFileCleanupHooks();\n let registered = true;\n return () => {\n if (!registered) return;\n registered = false;\n PROCESS_OWNED_FILE_CLEANUPS.delete(cleanup);\n if (PROCESS_OWNED_FILE_CLEANUPS.size === 0) removeProcessOwnedFileCleanupHooks();\n };\n}\n\nfunction installProcessOwnedFileCleanupHooks(): void {\n if (processExitCleanupInstalled) return;\n processExitCleanupInstalled = true;\n process.once('exit', cleanupProcessOwnedFiles);\n for (const signal of PROCESS_TERMINATION_SIGNALS) {\n const handler = (): void => {\n cleanupProcessOwnedFiles();\n removeProcessOwnedFileCleanupHooks();\n queueMicrotask(() => {\n try {\n process.kill(process.pid, signal);\n } catch {\n // The process may already be exiting through another signal handler.\n }\n });\n };\n PROCESS_SIGNAL_HANDLERS.set(signal, handler);\n process.once(signal, handler);\n }\n}\n\nfunction removeProcessOwnedFileCleanupHooks(): void {\n if (!processExitCleanupInstalled) return;\n processExitCleanupInstalled = false;\n process.off('exit', cleanupProcessOwnedFiles);\n for (const [signal, handler] of PROCESS_SIGNAL_HANDLERS) {\n process.off(signal, handler);\n }\n PROCESS_SIGNAL_HANDLERS.clear();\n}\n\nfunction cleanupProcessOwnedFiles(): void {\n for (const cleanup of PROCESS_OWNED_FILE_CLEANUPS) cleanup();\n}\n\nfunction removeOwnedRuntimeDescriptorSync(\n descriptorPath: string,\n owner: Pick<\n EditorServiceRuntimeDescriptor,\n 'canonicalProjectRoot' | 'serviceInstanceId' | 'pid' | 'token'\n >,\n): void {\n try {\n const current = JSON.parse(readFileSync(descriptorPath, 'utf8')) as EditorServiceRuntimeDescriptor;\n if (current.canonicalProjectRoot !== owner.canonicalProjectRoot\n || current.serviceInstanceId !== owner.serviceInstanceId\n || current.pid !== owner.pid\n || current.token !== owner.token) return;\n unlinkSync(descriptorPath);\n } catch {\n // Process exit cleanup is best effort. Stale-owner recovery remains authoritative.\n }\n}\n\nfunction removeOwnedDescriptorLockSync(\n lockPath: string,\n owner: DescriptorLockOwner,\n): void {\n try {\n const current = parseDescriptorLockOwner(readFileSync(lockPath, 'utf8'));\n if (!current || current.pid !== owner.pid || current.token !== owner.token) return;\n unlinkSync(lockPath);\n } catch {\n // Process exit cleanup is best effort. Stale-owner recovery remains authoritative.\n }\n}\n\nasync function claimDescriptorLock(lockPath: string): Promise<DescriptorLockOwner> {\n const owner = { pid: process.pid, token: randomUUID() };\n const serialized = `${JSON.stringify(owner)}\\n`;\n for (let attempt = 0; attempt < 8; attempt += 1) {\n try {\n const handle = await open(lockPath, 'wx', 0o600);\n try {\n await handle.writeFile(serialized, 'utf8');\n await handle.chmod(0o600);\n } finally {\n await handle.close();\n }\n return owner;\n } catch (error: any) {\n if (error?.code !== 'EEXIST') throw error;\n }\n const observed = await readFile(lockPath, 'utf8').catch(() => null);\n if (observed === null) continue;\n const existing = parseDescriptorLockOwner(observed);\n if (!existing || isProcessAlive(existing.pid)) {\n throw new Error(`Editor Service descriptor lock has an ambiguous live owner at ${lockPath}.`);\n }\n const quarantine = `${lockPath}.stale.${process.pid}.${randomUUID()}`;\n try { await rename(lockPath, quarantine); } catch (error: any) {\n if (error?.code === 'ENOENT') continue;\n throw error;\n }\n const moved = await readFile(quarantine, 'utf8').catch(() => null);\n if (moved !== observed) {\n await rename(quarantine, lockPath).catch(() => undefined);\n throw new Error(`Editor Service descriptor lock changed during stale-owner recovery at ${lockPath}.`);\n }\n await unlink(quarantine).catch(() => undefined);\n }\n throw new Error(`Editor Service descriptor lock could not be claimed at ${lockPath}.`);\n}\n\nfunction parseDescriptorLockOwner(source: string): DescriptorLockOwner | null {\n try {\n const value = JSON.parse(source) as DescriptorLockOwner;\n return Number.isSafeInteger(value?.pid) && value.pid > 0 && typeof value.token === 'string' && value.token\n ? value\n : null;\n } catch {\n const legacyPid = Number(source.trim());\n return Number.isSafeInteger(legacyPid) && legacyPid > 0\n ? { pid: legacyPid, token: `legacy:${legacyPid}` }\n : null;\n }\n}\n\nasync function assertOwnedDescriptorLock(lockPath: string, owner: DescriptorLockOwner): Promise<void> {\n const current = parseDescriptorLockOwner(await readFile(lockPath, 'utf8').catch(() => ''));\n if (!current || current.pid !== owner.pid || current.token !== owner.token) {\n throw new Error(`Editor Service descriptor lock ownership was lost at ${lockPath}.`);\n }\n}\n\nasync function removeOwnedDescriptorLock(lockPath: string, owner: DescriptorLockOwner): Promise<void> {\n const current = parseDescriptorLockOwner(await readFile(lockPath, 'utf8').catch(() => ''));\n if (current?.pid === owner.pid && current.token === owner.token) {\n await unlink(lockPath).catch(() => undefined);\n }\n}\n\nasync function assertDescriptorAvailable(descriptorPath: string, canonicalProjectRoot: string): Promise<void> {\n const existing = await readDescriptor(descriptorPath);\n if (!existing) return;\n if (existing.canonicalProjectRoot !== canonicalProjectRoot) {\n throw new Error(`Editor Service descriptor project identity mismatch at ${descriptorPath}.`);\n }\n if (await isDescriptorHealthy(existing)) {\n throw new Error(`A live Editor Service already owns this project: ${existing.serviceInstanceId}.`);\n }\n if (isProcessAlive(existing.pid)) {\n throw new Error(`A live Editor Service owner is temporarily unreachable; refusing to replace ${existing.serviceInstanceId}.`);\n }\n await unlink(descriptorPath).catch((error: any) => {\n if (error?.code !== 'ENOENT') throw error;\n });\n}\n\nasync function readDescriptor(descriptorPath: string): Promise<EditorServiceRuntimeDescriptor | null> {\n try {\n const value = JSON.parse(await readFile(descriptorPath, 'utf8')) as EditorServiceRuntimeDescriptor;\n if (!value || typeof value !== 'object' || typeof value.serviceInstanceId !== 'string'\n || typeof value.canonicalProjectRoot !== 'string' || typeof value.endpoint !== 'string'\n || typeof value.token !== 'string' || !Number.isSafeInteger(value.pid)) {\n throw new Error(`Editor Service runtime descriptor is malformed at ${descriptorPath}.`);\n }\n return value;\n } catch (error: any) {\n if (error?.code === 'ENOENT') return null;\n throw error;\n }\n}\n\nasync function isDescriptorHealthy(descriptor: EditorServiceRuntimeDescriptor): Promise<boolean> {\n if (!isProcessAlive(descriptor.pid)) return false;\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), 750);\n try {\n const response = await fetch(descriptor.endpoint, {\n method: 'POST',\n headers: { authorization: `Bearer ${descriptor.token}`, 'content-type': 'application/json' },\n body: JSON.stringify({ kind: 'status' }),\n signal: controller.signal,\n });\n if (!response.ok) return false;\n const body = await response.json() as any;\n return body?.ok === true\n && body?.kind === 'status'\n && body?.status?.serviceInstanceId === descriptor.serviceInstanceId\n && body?.status?.canonicalProjectRoot === descriptor.canonicalProjectRoot\n && body?.status?.protocolVersion === descriptor.protocolVersion;\n } catch {\n return false;\n } finally {\n clearTimeout(timer);\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n return true;\n } catch (error: any) {\n return error?.code === 'EPERM';\n }\n}\n\nasync function removeOwnedDescriptor(\n descriptorPath: string,\n owner: EditorServiceRuntimeDescriptor,\n): Promise<void> {\n const current = await readDescriptor(descriptorPath);\n if (!current || current.serviceInstanceId !== owner.serviceInstanceId || current.token !== owner.token) return;\n await unlink(descriptorPath).catch((error: any) => {\n if (error?.code !== 'ENOENT') throw error;\n });\n}\n\nfunction resolveServerEndpoint(server: ViteDevServer, gatewayPath: string): string {\n const address = server.httpServer?.address();\n if (!address || typeof address === 'string') throw new Error('Vite HTTP server address is unavailable.');\n return `http://127.0.0.1:${address.port}${gatewayPath}`;\n}\n\nfunction normalizeTokenScopes(value: readonly EditorServiceTokenScope[] | undefined): readonly EditorServiceTokenScope[] {\n const defaults: readonly EditorServiceTokenScope[] = ['read', 'write'];\n const scopes: EditorServiceTokenScope[] = [...new Set(value ?? defaults)];\n if (scopes.length === 0 || scopes.some(scope => scope !== 'read' && scope !== 'write')) {\n throw new Error('Editor Service token scopes must contain read or write.');\n }\n return Object.freeze(scopes);\n}\n\nfunction assertDescriptorInsideProject(projectRoot: string, descriptorPath: string): void {\n const relative = path.relative(projectRoot, descriptorPath);\n if (!relative || relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {\n throw new Error('Editor Service runtime descriptor must be inside the canonical project root.');\n }\n}\n\nfunction hasBearerToken(header: unknown, expected: string): boolean {\n if (typeof header !== 'string' || !header.startsWith('Bearer ')) return false;\n const received = Buffer.from(header.slice('Bearer '.length), 'utf8');\n const target = Buffer.from(expected, 'utf8');\n return received.length === target.length && timingSafeEqual(received, target);\n}\n\nasync function readJsonBody(request: AsyncIterable<Buffer | string>): Promise<unknown> {\n const chunks: Buffer[] = [];\n let bytes = 0;\n for await (const chunk of request) {\n const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);\n bytes += buffer.byteLength;\n if (bytes > 1024 * 1024) throw new Error('Editor Service request body exceeds 1 MiB.');\n chunks.push(buffer);\n }\n if (chunks.length === 0) throw new Error('Editor Service request body is required.');\n return JSON.parse(Buffer.concat(chunks).toString('utf8'));\n}\n\nfunction setGatewayHeaders(request: any, response: any): void {\n response.setHeader('Cache-Control', 'no-store');\n response.setHeader('Content-Type', 'application/json; charset=utf-8');\n response.setHeader('X-Content-Type-Options', 'nosniff');\n response.setHeader('Access-Control-Allow-Headers', 'authorization, content-type');\n response.setHeader('Access-Control-Allow-Methods', 'POST, OPTIONS');\n const origin = typeof request.headers?.origin === 'string' ? request.headers.origin : undefined;\n if (origin) {\n response.setHeader('Access-Control-Allow-Origin', origin);\n response.setHeader('Vary', 'Origin');\n }\n}\n\nfunction sendJson(response: any, statusCode: number, value: unknown): void {\n response.statusCode = statusCode;\n response.end(`${JSON.stringify(value)}\\n`);\n}\n\nfunction formatError(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"]}
|
|
@@ -3,15 +3,17 @@ export * from './build-info-node';
|
|
|
3
3
|
export * from './asset-authoring';
|
|
4
4
|
export * from './authoring-http';
|
|
5
5
|
export * from './editor-scene-workflow';
|
|
6
|
+
export * from './editor-service-vite';
|
|
6
7
|
export * from './plugin';
|
|
7
8
|
export * from './product-authoring-api';
|
|
9
|
+
export type { FpsGameEditorProjectAuthoringBackend } from './project-authoring-backend';
|
|
8
10
|
export * from './product-asset-authoring';
|
|
9
11
|
export * from './product-adapter';
|
|
12
|
+
export * from './project-editor-service';
|
|
10
13
|
export * from './product-scene-authoring';
|
|
11
14
|
export * from './product-rendering-authoring';
|
|
12
15
|
export * from './project-files';
|
|
13
16
|
export * from './module-invalidation';
|
|
14
|
-
export * from './session-metadata';
|
|
15
17
|
export * from './types';
|
|
16
18
|
export * from '../asset-database/index';
|
|
17
19
|
export * from '../asset-database/node';
|
|
@@ -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,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,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,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAC;AACxF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
|
|
@@ -3,15 +3,16 @@ export * from './build-info-node.js';
|
|
|
3
3
|
export * from './asset-authoring.js';
|
|
4
4
|
export * from './authoring-http.js';
|
|
5
5
|
export * from './editor-scene-workflow.js';
|
|
6
|
+
export * from './editor-service-vite.js';
|
|
6
7
|
export * from './plugin.js';
|
|
7
8
|
export * from './product-authoring-api.js';
|
|
8
9
|
export * from './product-asset-authoring.js';
|
|
9
10
|
export * from './product-adapter.js';
|
|
11
|
+
export * from './project-editor-service.js';
|
|
10
12
|
export * from './product-scene-authoring.js';
|
|
11
13
|
export * from './product-rendering-authoring.js';
|
|
12
14
|
export * from './project-files.js';
|
|
13
15
|
export * from './module-invalidation.js';
|
|
14
|
-
export * from './session-metadata.js';
|
|
15
16
|
export * from './types.js';
|
|
16
17
|
export * from '../asset-database/index.js';
|
|
17
18
|
export * from '../asset-database/node.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;
|
|
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,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AAExC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,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 './editor-service-vite';\nexport * from './plugin';\nexport * from './product-authoring-api';\nexport type { FpsGameEditorProjectAuthoringBackend } from './project-authoring-backend';\nexport * from './product-asset-authoring';\nexport * from './product-adapter';\nexport * from './project-editor-service';\nexport * from './product-scene-authoring';\nexport * from './product-rendering-authoring';\nexport * from './project-files';\nexport * from './module-invalidation';\nexport * from './types';\nexport * from '../asset-database/index';\nexport * from '../asset-database/node';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,MAAM,EAAE,UAAU,EAAiB,MAAM,MAAM,CAAC;AAS5E,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAEV,+BAA+B,EAC/B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,sCAAsC,iCAAiC,CAAC;AACrF,eAAO,MAAM,2CAA2C,qCAAqC,CAAC;AA8D9F,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,MAAM,CAmHR;AAyFD,wBAAgB,oCAAoC,CAClD,MAAM,GAAE,UAAe,EACvB,OAAO,GAAE,+BAAoC,GAC5C,qCAAqC,CAoCvC;AAED,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,qCAAqC,EAClD,OAAO,GAAE,+BAAoC,GAC5C,IAAI,CAmBN;AAED,wBAAgB,yCAAyC,CACvD,WAAW,EAAE,qCAAqC,GACjD,0BAA0B,CAe5B"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { randomBytes, randomUUID } from 'node:crypto';
|
|
1
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { collectMissingPlayableEditorPackageAliasFiles, createPlayableEditorBundledPackageAliasPlan, createPlayableEditorBundledPackageRoots, createPlayableEditorSourcePackageAliasPlan, formatPlayableEditorPackageAliasPlanError, } from '../package-resolution/index.js';
|
|
4
5
|
import { formatPlayableEditorDoctorReport, inspectPlayableEditorInstalledVersion, } from '../upgrade-doctor/index.js';
|
|
5
6
|
import { createPlayableEditorViteCacheDir } from './build-info-core.js';
|
|
6
7
|
import { readPlayableEditorBuildInfo } from './build-info-node.js';
|
|
8
|
+
import { installPlayableEditorViteEditorService } from './editor-service-vite.js';
|
|
9
|
+
import { EDITOR_SERVICE_GATEWAY_PATH, EDITOR_SERVICE_PROTOCOL_VERSION } from '@fps-games/editor-protocol';
|
|
7
10
|
export const PLAYABLE_EDITOR_VITE_CACHE_MARKER_FILE = 'fps-editor-cache-marker.json';
|
|
8
11
|
export const PLAYABLE_EDITOR_PACKED_BASELINE_MARKER_FILE = '.fps-editor-packed-baseline.json';
|
|
9
12
|
const PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH = '/__fps_editor/entry-manifest.json';
|
|
@@ -12,11 +15,28 @@ const PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL = 'public, max-age=31536000,
|
|
|
12
15
|
const PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS = [
|
|
13
16
|
'semver',
|
|
14
17
|
// Runtime projects and the packed Babylon renderer must execute the
|
|
15
|
-
// DefaultRenderingPipeline
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
// prototype side effect patches a different Scene constructor.
|
|
18
|
+
// DefaultRenderingPipeline and its dynamically imported shader registrations
|
|
19
|
+
// against the same Babylon module identities. Otherwise the async imports can
|
|
20
|
+
// register against a second ShaderStore after the pipeline starts compiling.
|
|
19
21
|
'@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js',
|
|
22
|
+
'@babylonjs/core/Shaders/postprocess.vertex.js',
|
|
23
|
+
'@babylonjs/core/Shaders/imageProcessing.fragment.js',
|
|
24
|
+
'@babylonjs/core/Shaders/extractHighlights.fragment.js',
|
|
25
|
+
'@babylonjs/core/Shaders/kernelBlur.fragment.js',
|
|
26
|
+
'@babylonjs/core/Shaders/kernelBlur.vertex.js',
|
|
27
|
+
'@babylonjs/core/Shaders/bloomMerge.fragment.js',
|
|
28
|
+
'@babylonjs/core/Shaders/fxaa.fragment.js',
|
|
29
|
+
'@babylonjs/core/Shaders/fxaa.vertex.js',
|
|
30
|
+
'@babylonjs/core/Shaders/pass.fragment.js',
|
|
31
|
+
'@babylonjs/core/ShadersWGSL/postprocess.vertex.js',
|
|
32
|
+
'@babylonjs/core/ShadersWGSL/imageProcessing.fragment.js',
|
|
33
|
+
'@babylonjs/core/ShadersWGSL/extractHighlights.fragment.js',
|
|
34
|
+
'@babylonjs/core/ShadersWGSL/kernelBlur.fragment.js',
|
|
35
|
+
'@babylonjs/core/ShadersWGSL/kernelBlur.vertex.js',
|
|
36
|
+
'@babylonjs/core/ShadersWGSL/bloomMerge.fragment.js',
|
|
37
|
+
'@babylonjs/core/ShadersWGSL/fxaa.fragment.js',
|
|
38
|
+
'@babylonjs/core/ShadersWGSL/fxaa.vertex.js',
|
|
39
|
+
'@babylonjs/core/ShadersWGSL/pass.fragment.js',
|
|
20
40
|
// ShadowGenerator loads its shader registrations dynamically. Keep those
|
|
21
41
|
// registrations in the same optimized graph as Effect/ShaderStore; serving
|
|
22
42
|
// them as raw pnpm modules registers against a second ShaderStore and makes
|
|
@@ -33,16 +53,31 @@ const PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS = [
|
|
|
33
53
|
export function playableEditorVitePlugin(options = {}) {
|
|
34
54
|
let resolvedIntegration = null;
|
|
35
55
|
let editorEntryManifest = null;
|
|
56
|
+
const editorServiceCredentials = Object.freeze({
|
|
57
|
+
serviceInstanceId: randomUUID(),
|
|
58
|
+
token: randomBytes(32).toString('base64url'),
|
|
59
|
+
});
|
|
60
|
+
let editorService = null;
|
|
36
61
|
return {
|
|
37
62
|
name: 'fps-editor-playable-vite',
|
|
38
63
|
enforce: 'pre',
|
|
39
|
-
config(config) {
|
|
64
|
+
config(config, environment) {
|
|
40
65
|
resolvedIntegration = options.resolvedIntegration
|
|
41
66
|
?? resolvePlayableEditorViteIntegration(config, options);
|
|
42
67
|
editorEntryManifest = createPlayableEditorViteEntryManifest(resolvedIntegration, options);
|
|
43
68
|
const aliasPlan = createPlayableEditorViteAliasPlan(resolvedIntegration);
|
|
44
69
|
assertPlayableEditorViteAliasFiles(aliasPlan, resolvedIntegration, options);
|
|
45
70
|
return {
|
|
71
|
+
...(environment?.command === 'serve' && options.editorService?.enabled !== false ? {
|
|
72
|
+
define: {
|
|
73
|
+
__FPS_EDITOR_AGENT_RUNTIME__: JSON.stringify({
|
|
74
|
+
protocolVersion: EDITOR_SERVICE_PROTOCOL_VERSION,
|
|
75
|
+
serviceInstanceId: editorServiceCredentials.serviceInstanceId,
|
|
76
|
+
gatewayPath: EDITOR_SERVICE_GATEWAY_PATH,
|
|
77
|
+
token: editorServiceCredentials.token,
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
} : {}),
|
|
46
81
|
...(resolvedIntegration.cacheDir ? { cacheDir: resolvedIntegration.cacheDir } : {}),
|
|
47
82
|
optimizeDeps: {
|
|
48
83
|
// Plugin manifest validation uses the CommonJS semver package. A
|
|
@@ -75,7 +110,7 @@ export function playableEditorVitePlugin(options = {}) {
|
|
|
75
110
|
...PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS,
|
|
76
111
|
]));
|
|
77
112
|
},
|
|
78
|
-
configureServer(server) {
|
|
113
|
+
async configureServer(server) {
|
|
79
114
|
const integration = resolvedIntegration
|
|
80
115
|
?? options.resolvedIntegration
|
|
81
116
|
?? resolvePlayableEditorViteIntegration({
|
|
@@ -90,6 +125,26 @@ export function playableEditorVitePlugin(options = {}) {
|
|
|
90
125
|
installPlayableEditorEntryManifestRoute(server, options.editorEntry?.manifestPath ?? PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH, editorEntryManifest);
|
|
91
126
|
}
|
|
92
127
|
emitPlayableEditorViteVersionDiagnostics(server, integration, options);
|
|
128
|
+
// Some tooling contract tests pass a deliberately partial Vite server.
|
|
129
|
+
// A real serve-mode server always exposes both middleware and HTTP ownership.
|
|
130
|
+
const runtimeServer = server;
|
|
131
|
+
if (typeof runtimeServer.middlewares?.use === 'function' && runtimeServer.httpServer) {
|
|
132
|
+
if (editorService) {
|
|
133
|
+
throw new Error('Playable Editor Vite plugin already owns an Editor Service.');
|
|
134
|
+
}
|
|
135
|
+
editorService = await installPlayableEditorViteEditorService({
|
|
136
|
+
server,
|
|
137
|
+
integration,
|
|
138
|
+
options: options.editorService,
|
|
139
|
+
credentials: editorServiceCredentials,
|
|
140
|
+
logger: options.logger,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
async closeBundle() {
|
|
145
|
+
const activeEditorService = editorService;
|
|
146
|
+
editorService = null;
|
|
147
|
+
await activeEditorService?.dispose();
|
|
93
148
|
},
|
|
94
149
|
};
|
|
95
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,6CAA6C,EAC7C,2CAA2C,EAC3C,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,GAE1C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gCAAgC,EAChC,qCAAqC,GAEtC,MAAM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ACnE,qBAAqB,CAAC,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc,EAAE,WAAmB;IAChE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7E,MAAM,iBAAiB,GAAI,KAAiC,CAAC,WAAW,CAAC,CAAC;IAC1E,OAAO,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,CAAC,IAAI,EAAE;QACtE,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE;QAC1B,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAwC,EACxC,GAAuC;IAEvC,IAAI,OAAO,CAAC,eAAe,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAClD,MAAM,KAAK,GAAG,OAAO,CAAC,eAAe,IAAI,GAAG,CAAC,oBAAoB,IAAI,IAAI,CAAC;IAC1E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvF,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACvC,OAAO,IAAI,MAAM,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { ErrorPayload, Plugin, UserConfig, ViteDevServer } from 'vite';\nimport {\n collectMissingPlayableEditorPackageAliasFiles,\n createPlayableEditorBundledPackageAliasPlan,\n createPlayableEditorBundledPackageRoots,\n createPlayableEditorSourcePackageAliasPlan,\n formatPlayableEditorPackageAliasPlanError,\n type PlayableEditorPackageAliasPlan,\n} from '../package-resolution/index';\nimport {\n formatPlayableEditorDoctorReport,\n inspectPlayableEditorInstalledVersion,\n type PlayableEditorDoctorReport,\n} from '../upgrade-doctor/index';\nimport { createPlayableEditorViteCacheDir } from './build-info-core';\nimport { readPlayableEditorBuildInfo } from './build-info-node';\nimport type {\n PlayableEditorViteCacheMarker,\n PlayableEditorVitePluginOptions,\n PlayableEditorViteResolvedIntegration,\n} from './types';\n\nexport const PLAYABLE_EDITOR_VITE_CACHE_MARKER_FILE = 'fps-editor-cache-marker.json';\nexport const PLAYABLE_EDITOR_PACKED_BASELINE_MARKER_FILE = '.fps-editor-packed-baseline.json';\nconst PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH = '/__fps_editor/entry-manifest.json';\nconst PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL = 'no-cache';\nconst PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL = 'public, max-age=31536000, immutable';\nconst PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS = [\n 'semver',\n // Runtime projects and the packed Babylon renderer must execute the\n // DefaultRenderingPipeline Scene component against the same Babylon module\n // identity. Without an explicit subpath prebundle, Vite can optimize the\n // project's Scene while serving the packed pipeline source directly, so its\n // prototype side effect patches a different Scene constructor.\n '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js',\n // ShadowGenerator loads its shader registrations dynamically. Keep those\n // registrations in the same optimized graph as Effect/ShaderStore; serving\n // them as raw pnpm modules registers against a second ShaderStore and makes\n // Babylon fall back to fetching /src/Shaders/*.fx (the SPA HTML response).\n '@babylonjs/core/Shaders/shadowMap.fragment.js',\n '@babylonjs/core/Shaders/shadowMap.vertex.js',\n '@babylonjs/core/Shaders/depthBoxBlur.fragment.js',\n '@babylonjs/core/Shaders/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js',\n '@babylonjs/core/ShadersWGSL/shadowMap.fragment.js',\n '@babylonjs/core/ShadersWGSL/shadowMap.vertex.js',\n '@babylonjs/core/ShadersWGSL/depthBoxBlur.fragment.js',\n '@babylonjs/core/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js',\n] as const;\n\ninterface PlayableEditorViteEntryManifest {\n readonly schemaVersion: 1;\n readonly build: {\n readonly packageName: string;\n readonly version: string;\n readonly buildId: string;\n readonly distHash: string;\n };\n readonly entry: {\n readonly kind: 'module';\n readonly url: string;\n readonly cache: 'revalidate' | 'immutable';\n };\n readonly cacheControl: {\n readonly manifest: 'no-cache';\n readonly immutableResource: 'public, max-age=31536000, immutable';\n };\n}\n\nexport function playableEditorVitePlugin(\n options: PlayableEditorVitePluginOptions = {},\n): Plugin {\n let resolvedIntegration: PlayableEditorViteResolvedIntegration | null = null;\n let editorEntryManifest: PlayableEditorViteEntryManifest | null = null;\n\n return {\n name: 'fps-editor-playable-vite',\n enforce: 'pre',\n\n config(config) {\n resolvedIntegration = options.resolvedIntegration\n ?? resolvePlayableEditorViteIntegration(config, options);\n editorEntryManifest = createPlayableEditorViteEntryManifest(resolvedIntegration, options);\n const aliasPlan = createPlayableEditorViteAliasPlan(resolvedIntegration);\n assertPlayableEditorViteAliasFiles(aliasPlan, resolvedIntegration, options);\n\n return {\n ...(resolvedIntegration.cacheDir ? { cacheDir: resolvedIntegration.cacheDir } : {}),\n optimizeDeps: {\n // Plugin manifest validation uses the CommonJS semver package. A\n // packed editor install must prebundle it before browser execution.\n include: [...PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS],\n // Aliased editor modules share authenticated contexts and lifecycle\n // singletons. Prebundling any one of them can embed a second module\n // instance beside the public editor graph and invalidate those\n // identities at runtime.\n exclude: aliasPlan.entries\n .map(entry => entry.packageId)\n .filter(packageId => !PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS.includes(\n packageId as (typeof PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS)[number],\n )),\n },\n resolve: {\n alias: aliasPlan.entries.map(entry => ({\n find: packageIdRegex(entry.packageId),\n replacement: entry.file,\n })),\n },\n };\n },\n\n configResolved(config) {\n // Consumers may use the editor package allowlist as their source-workspace\n // optimizeDeps.exclude list. Tooling-owned browser dependencies must win\n // over that broad exclusion after Vite has merged every config source.\n config.optimizeDeps.exclude = Array.from(new Set(\n (config.optimizeDeps.exclude ?? [])\n .filter(packageId => !PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS.includes(\n packageId as (typeof PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS)[number],\n )),\n ));\n config.optimizeDeps.include = Array.from(new Set([\n ...(config.optimizeDeps.include ?? []),\n ...PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS,\n ]));\n },\n\n configureServer(server) {\n const integration = resolvedIntegration\n ?? options.resolvedIntegration\n ?? resolvePlayableEditorViteIntegration({\n root: server.config.root,\n cacheDir: server.config.cacheDir,\n }, options);\n writePlayableEditorViteCacheMarker({\n ...integration,\n cacheDir: server.config.cacheDir || integration.cacheDir,\n }, options);\n if (editorEntryManifest) {\n installPlayableEditorEntryManifestRoute(\n server,\n options.editorEntry?.manifestPath ?? PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH,\n editorEntryManifest,\n );\n }\n emitPlayableEditorViteVersionDiagnostics(server, integration, options);\n },\n };\n}\n\nfunction createPlayableEditorViteEntryManifest(\n integration: Pick<PlayableEditorViteResolvedIntegration, 'buildInfo'>,\n options: Pick<PlayableEditorVitePluginOptions, 'editorEntry'>,\n): PlayableEditorViteEntryManifest | null {\n if (!options.editorEntry) return null;\n return Object.freeze({\n schemaVersion: 1,\n build: Object.freeze({\n packageName: integration.buildInfo.packageName,\n version: integration.buildInfo.version,\n buildId: integration.buildInfo.cacheKey,\n distHash: integration.buildInfo.distHash,\n }),\n entry: Object.freeze({\n kind: 'module',\n url: readEditorEntryUrl(options.editorEntry.url),\n cache: readEditorEntryCachePolicy(options.editorEntry.cache),\n }),\n cacheControl: Object.freeze({\n manifest: PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL,\n immutableResource: PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL,\n }),\n });\n}\n\nfunction installPlayableEditorEntryManifestRoute(\n server: ViteDevServer,\n manifestPath: string,\n manifest: PlayableEditorViteEntryManifest,\n): void {\n const pathname = normalizeManifestPath(manifestPath);\n const body = `${JSON.stringify(manifest, null, 2)}\\n`;\n const etag = `\"${manifest.build.buildId}\"`;\n server.middlewares.use((request, response, next) => {\n if (!request.url || (request.method !== 'GET' && request.method !== 'HEAD')) return next();\n const requestUrl = new URL(request.url, 'http://fps-editor.local');\n if (requestUrl.pathname !== pathname) return next();\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Cache-Control', PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL);\n response.setHeader('Content-Type', 'application/json; charset=utf-8');\n response.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');\n response.setHeader('ETag', etag);\n response.setHeader('X-Fps-Editor-Build', manifest.build.buildId);\n if (request.headers['if-none-match'] === etag) {\n response.statusCode = 304;\n response.end();\n return;\n }\n response.statusCode = 200;\n response.end(request.method === 'HEAD' ? undefined : body);\n });\n}\n\nfunction readEditorEntryCachePolicy(\n value: 'revalidate' | 'immutable' | undefined,\n): 'revalidate' | 'immutable' {\n if (value === undefined) return 'revalidate';\n if (value !== 'revalidate' && value !== 'immutable') {\n throw new Error(`Editor entry cache must be revalidate or immutable: ${String(value)}.`);\n }\n return value;\n}\n\nfunction readEditorEntryUrl(value: string): string {\n const normalized = value.trim();\n if (!normalized) throw new Error('Editor entry url must be a non-empty string.');\n let parsed: URL;\n try {\n parsed = new URL(normalized, 'https://fps-editor.invalid/');\n } catch {\n throw new Error(`Editor entry url is invalid: ${value}.`);\n }\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n throw new Error(`Editor entry url must use HTTP(S): ${value}.`);\n }\n return normalized;\n}\n\nfunction normalizeManifestPath(value: string): string {\n const normalized = value.trim();\n if (!normalized.startsWith('/') || normalized.includes('?') || normalized.includes('#')) {\n throw new Error(`Editor entry manifestPath must be an absolute URL path: ${value}.`);\n }\n return normalized;\n}\n\nexport function resolvePlayableEditorViteIntegration(\n config: UserConfig = {},\n options: PlayableEditorVitePluginOptions = {},\n): PlayableEditorViteResolvedIntegration {\n const env = options.env ?? process.env;\n const projectRoot = path.resolve(options.projectRoot ?? config.root ?? process.cwd());\n const localEditorRepo = readLocalEditorRepo(options, env);\n const bundledRoots = createPlayableEditorBundledPackageRoots(projectRoot, {\n resolvePath: path.resolve,\n });\n const editorPackageRoot = localEditorRepo\n ? path.resolve(localEditorRepo, 'packages', 'editor')\n : path.dirname(bundledRoots.editorPackageJsonPath);\n const buildInfoPath = path.join(editorPackageRoot, 'dist', 'build-info.json');\n const buildInfo = readPlayableEditorBuildInfo({\n editorPackageRoot,\n buildInfoPath,\n packageJsonPath: path.join(editorPackageRoot, 'package.json'),\n });\n const cacheDir = options.cacheDir === false\n ? null\n : options.cacheDir\n ?? config.cacheDir\n ?? createPlayableEditorViteCacheDir({\n projectRoot,\n env,\n buildInfo,\n packageVersion: buildInfo.version,\n resolvePath: path.resolve,\n });\n\n return {\n projectRoot,\n localEditorRepo,\n editorPackageRoot,\n buildInfoPath,\n buildInfo,\n cacheDir,\n };\n}\n\nexport function writePlayableEditorViteCacheMarker(\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions = {},\n): void {\n if (!integration.cacheDir) return;\n const markerPath = path.join(integration.cacheDir, PLAYABLE_EDITOR_VITE_CACHE_MARKER_FILE);\n const marker: PlayableEditorViteCacheMarker = {\n packageName: integration.buildInfo.packageName,\n version: integration.buildInfo.version,\n cacheKey: integration.buildInfo.cacheKey,\n distHash: integration.buildInfo.distHash,\n buildInfoPath: integration.buildInfoPath,\n };\n const previous = readPlayableEditorViteCacheMarker(markerPath);\n if (previous && previous.cacheKey !== marker.cacheKey) {\n options.logger?.warn?.(\n `[fps-editor] Vite cache marker changed in ${integration.cacheDir}: `\n + `${previous.cacheKey} -> ${marker.cacheKey}`,\n );\n }\n mkdirSync(integration.cacheDir, { recursive: true });\n writeFileSync(markerPath, `${JSON.stringify(marker, null, 2)}\\n`, 'utf8');\n}\n\nexport function inspectPlayableEditorViteInstalledVersion(\n integration: PlayableEditorViteResolvedIntegration,\n): PlayableEditorDoctorReport {\n if (integration.localEditorRepo) {\n return inspectPlayableEditorInstalledVersion({\n packageName: '@fps-games/editor',\n declaredVersion: null,\n installedVersion: integration.buildInfo.version,\n source: 'FPS_GAME_EDITOR_REPO',\n });\n }\n return inspectPlayableEditorInstalledVersion({\n packageName: '@fps-games/editor',\n declaredVersion: readProjectDeclaredEditorVersion(integration.projectRoot),\n installedVersion: integration.buildInfo.version,\n source: path.join(integration.projectRoot, 'package.json'),\n });\n}\n\nfunction emitPlayableEditorViteVersionDiagnostics(\n server: ViteDevServer,\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions,\n): void {\n if (options.versionDiagnostics === false) return;\n const report = inspectPlayableEditorViteInstalledVersion(integration);\n if (report.diagnostics.length === 0) return;\n const formatted = formatPlayableEditorDoctorReport(report);\n const logger = options.logger ?? console;\n if (!report.ok && hasMatchingPackedBaselineMarker(integration)) {\n logger.warn?.(`${formatted}\\n[fps-editor] Installed-version mismatch is allowed for this explicit packed-package baseline.`);\n return;\n }\n if (report.ok) {\n logger.warn?.(formatted);\n } else {\n logger.error?.(formatted);\n }\n\n const payload = createPlayableEditorViteOverlayPayload(formatted);\n server.ws?.send?.(payload);\n server.ws?.on?.('connection', () => {\n server.ws?.send?.(payload);\n });\n}\n\nfunction hasMatchingPackedBaselineMarker(integration: PlayableEditorViteResolvedIntegration): boolean {\n if (integration.localEditorRepo) return false;\n const markerPath = path.join(integration.editorPackageRoot, PLAYABLE_EDITOR_PACKED_BASELINE_MARKER_FILE);\n if (!existsSync(markerPath)) return false;\n try {\n const marker = JSON.parse(readFileSync(markerPath, 'utf8')) as {\n declaredVersion?: unknown;\n installedVersion?: unknown;\n };\n return marker.declaredVersion === readProjectDeclaredEditorVersion(integration.projectRoot)\n && marker.installedVersion === integration.buildInfo.version;\n } catch {\n return false;\n }\n}\n\nfunction createPlayableEditorViteOverlayPayload(message: string): ErrorPayload {\n return {\n type: 'error',\n err: {\n message,\n stack: '',\n plugin: 'fps-editor-playable-vite',\n },\n };\n}\n\nfunction createPlayableEditorViteAliasPlan(\n integration: PlayableEditorViteResolvedIntegration,\n): PlayableEditorPackageAliasPlan {\n if (integration.localEditorRepo) {\n return createPlayableEditorSourcePackageAliasPlan(integration.localEditorRepo, {\n resolvePath: path.resolve,\n });\n }\n\n const roots = createPlayableEditorBundledPackageRoots(integration.projectRoot, {\n resolvePath: path.resolve,\n });\n return createPlayableEditorBundledPackageAliasPlan({\n bundledEditorPackagesRoot: roots.bundledEditorPackagesRoot,\n bundledEditorNodeModulesRoot: roots.bundledEditorNodeModulesRoot,\n directBabylonRendererPackageRoot: roots.directBabylonRendererPackageRoot,\n resolvePath: path.resolve,\n fileExists: existsSync,\n });\n}\n\nfunction assertPlayableEditorViteAliasFiles(\n aliasPlan: PlayableEditorPackageAliasPlan,\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions,\n): void {\n if (options.strictAliasFiles === false) return;\n const missing = collectMissingPlayableEditorPackageAliasFiles(aliasPlan, existsSync);\n if (missing.length === 0) return;\n const mode = integration.localEditorRepo\n ? `FPS_GAME_EDITOR_REPO=${integration.localEditorRepo}`\n : '@fps-games/editor bundled dependencies';\n throw new Error(formatPlayableEditorPackageAliasPlanError(\n missing,\n `[fps-editor] The playable editor Vite integration could not resolve ${mode}.`,\n ));\n}\n\nfunction readPlayableEditorViteCacheMarker(markerPath: string): PlayableEditorViteCacheMarker | null {\n if (!existsSync(markerPath)) return null;\n try {\n const parsed = JSON.parse(readFileSync(markerPath, 'utf8')) as unknown;\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null;\n const marker = parsed as Partial<PlayableEditorViteCacheMarker>;\n if (\n typeof marker.packageName !== 'string'\n || typeof marker.version !== 'string'\n || typeof marker.cacheKey !== 'string'\n || typeof marker.distHash !== 'string'\n || typeof marker.buildInfoPath !== 'string'\n ) {\n return null;\n }\n return marker as PlayableEditorViteCacheMarker;\n } catch {\n return null;\n }\n}\n\nfunction readProjectDeclaredEditorVersion(projectRoot: string): string | null {\n const packageJsonPath = path.join(projectRoot, 'package.json');\n if (!existsSync(packageJsonPath)) return null;\n try {\n const parsed = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as unknown;\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null;\n const record = parsed as Record<string, unknown>;\n return readDependencyVersion(record.dependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.devDependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.peerDependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.optionalDependencies, '@fps-games/editor');\n } catch {\n return null;\n }\n}\n\nfunction readDependencyVersion(value: unknown, packageName: string): string | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return null;\n const dependencyVersion = (value as Record<string, unknown>)[packageName];\n return typeof dependencyVersion === 'string' && dependencyVersion.trim()\n ? dependencyVersion.trim()\n : null;\n}\n\nfunction readLocalEditorRepo(\n options: PlayableEditorVitePluginOptions,\n env: Record<string, string | undefined>,\n): string | null {\n if (options.localEditorRepo === null) return null;\n const value = options.localEditorRepo ?? env.FPS_GAME_EDITOR_REPO ?? null;\n return typeof value === 'string' && value.trim() ? path.resolve(value.trim()) : null;\n}\n\nfunction packageIdRegex(packageId: string): RegExp {\n return new RegExp(`^${escapeRegex(packageId)}$`);\n}\n\nfunction escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,6CAA6C,EAC7C,2CAA2C,EAC3C,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,GAE1C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gCAAgC,EAChC,qCAAqC,GAEtC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAMhE,OAAO,EAAE,sCAAsC,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAE1G,MAAM,CAAC,MAAM,sCAAsC,GAAG,8BAA8B,CAAC;AACrF,MAAM,CAAC,MAAM,2CAA2C,GAAG,kCAAkC,CAAC;AAC9F,MAAM,mCAAmC,GAAG,mCAAmC,CAAC;AAChF,MAAM,4CAA4C,GAAG,UAAU,CAAC;AAChE,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAC5F,MAAM,0CAA0C,GAAG;IACjD,QAAQ;IACR,oEAAoE;IACpE,6EAA6E;IAC7E,8EAA8E;IAC9E,6EAA6E;IAC7E,oFAAoF;IACpF,+CAA+C;IAC/C,qDAAqD;IACrD,uDAAuD;IACvD,gDAAgD;IAChD,8CAA8C;IAC9C,gDAAgD;IAChD,0CAA0C;IAC1C,wCAAw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C,CAAC,WAAW,CAAC,CAAC;IAC1E,OAAO,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,CAAC,IAAI,EAAE;QACtE,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE;QAC1B,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAwC,EACxC,GAAuC;IAEvC,IAAI,OAAO,CAAC,eAAe,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAClD,MAAM,KAAK,GAAG,OAAO,CAAC,eAAe,IAAI,GAAG,CAAC,oBAAoB,IAAI,IAAI,CAAC;IAC1E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvF,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACvC,OAAO,IAAI,MAAM,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { randomBytes, randomUUID } from 'node:crypto';\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { ErrorPayload, Plugin, UserConfig, ViteDevServer } from 'vite';\nimport {\n collectMissingPlayableEditorPackageAliasFiles,\n createPlayableEditorBundledPackageAliasPlan,\n createPlayableEditorBundledPackageRoots,\n createPlayableEditorSourcePackageAliasPlan,\n formatPlayableEditorPackageAliasPlanError,\n type PlayableEditorPackageAliasPlan,\n} from '../package-resolution/index';\nimport {\n formatPlayableEditorDoctorReport,\n inspectPlayableEditorInstalledVersion,\n type PlayableEditorDoctorReport,\n} from '../upgrade-doctor/index';\nimport { createPlayableEditorViteCacheDir } from './build-info-core';\nimport { readPlayableEditorBuildInfo } from './build-info-node';\nimport type {\n PlayableEditorViteCacheMarker,\n PlayableEditorVitePluginOptions,\n PlayableEditorViteResolvedIntegration,\n} from './types';\nimport { installPlayableEditorViteEditorService } from './editor-service-vite';\nimport { EDITOR_SERVICE_GATEWAY_PATH, EDITOR_SERVICE_PROTOCOL_VERSION } from '@fps-games/editor-protocol';\n\nexport const PLAYABLE_EDITOR_VITE_CACHE_MARKER_FILE = 'fps-editor-cache-marker.json';\nexport const PLAYABLE_EDITOR_PACKED_BASELINE_MARKER_FILE = '.fps-editor-packed-baseline.json';\nconst PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH = '/__fps_editor/entry-manifest.json';\nconst PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL = 'no-cache';\nconst PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL = 'public, max-age=31536000, immutable';\nconst PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS = [\n 'semver',\n // Runtime projects and the packed Babylon renderer must execute the\n // DefaultRenderingPipeline and its dynamically imported shader registrations\n // against the same Babylon module identities. Otherwise the async imports can\n // register against a second ShaderStore after the pipeline starts compiling.\n '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js',\n '@babylonjs/core/Shaders/postprocess.vertex.js',\n '@babylonjs/core/Shaders/imageProcessing.fragment.js',\n '@babylonjs/core/Shaders/extractHighlights.fragment.js',\n '@babylonjs/core/Shaders/kernelBlur.fragment.js',\n '@babylonjs/core/Shaders/kernelBlur.vertex.js',\n '@babylonjs/core/Shaders/bloomMerge.fragment.js',\n '@babylonjs/core/Shaders/fxaa.fragment.js',\n '@babylonjs/core/Shaders/fxaa.vertex.js',\n '@babylonjs/core/Shaders/pass.fragment.js',\n '@babylonjs/core/ShadersWGSL/postprocess.vertex.js',\n '@babylonjs/core/ShadersWGSL/imageProcessing.fragment.js',\n '@babylonjs/core/ShadersWGSL/extractHighlights.fragment.js',\n '@babylonjs/core/ShadersWGSL/kernelBlur.fragment.js',\n '@babylonjs/core/ShadersWGSL/kernelBlur.vertex.js',\n '@babylonjs/core/ShadersWGSL/bloomMerge.fragment.js',\n '@babylonjs/core/ShadersWGSL/fxaa.fragment.js',\n '@babylonjs/core/ShadersWGSL/fxaa.vertex.js',\n '@babylonjs/core/ShadersWGSL/pass.fragment.js',\n // ShadowGenerator loads its shader registrations dynamically. Keep those\n // registrations in the same optimized graph as Effect/ShaderStore; serving\n // them as raw pnpm modules registers against a second ShaderStore and makes\n // Babylon fall back to fetching /src/Shaders/*.fx (the SPA HTML response).\n '@babylonjs/core/Shaders/shadowMap.fragment.js',\n '@babylonjs/core/Shaders/shadowMap.vertex.js',\n '@babylonjs/core/Shaders/depthBoxBlur.fragment.js',\n '@babylonjs/core/Shaders/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js',\n '@babylonjs/core/ShadersWGSL/shadowMap.fragment.js',\n '@babylonjs/core/ShadersWGSL/shadowMap.vertex.js',\n '@babylonjs/core/ShadersWGSL/depthBoxBlur.fragment.js',\n '@babylonjs/core/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js',\n] as const;\n\ninterface PlayableEditorViteEntryManifest {\n readonly schemaVersion: 1;\n readonly build: {\n readonly packageName: string;\n readonly version: string;\n readonly buildId: string;\n readonly distHash: string;\n };\n readonly entry: {\n readonly kind: 'module';\n readonly url: string;\n readonly cache: 'revalidate' | 'immutable';\n };\n readonly cacheControl: {\n readonly manifest: 'no-cache';\n readonly immutableResource: 'public, max-age=31536000, immutable';\n };\n}\n\nexport function playableEditorVitePlugin(\n options: PlayableEditorVitePluginOptions = {},\n): Plugin {\n let resolvedIntegration: PlayableEditorViteResolvedIntegration | null = null;\n let editorEntryManifest: PlayableEditorViteEntryManifest | null = null;\n const editorServiceCredentials = Object.freeze({\n serviceInstanceId: randomUUID(),\n token: randomBytes(32).toString('base64url'),\n });\n let editorService: Awaited<ReturnType<typeof installPlayableEditorViteEditorService>> = null;\n\n return {\n name: 'fps-editor-playable-vite',\n enforce: 'pre',\n\n config(config, environment) {\n resolvedIntegration = options.resolvedIntegration\n ?? resolvePlayableEditorViteIntegration(config, options);\n editorEntryManifest = createPlayableEditorViteEntryManifest(resolvedIntegration, options);\n const aliasPlan = createPlayableEditorViteAliasPlan(resolvedIntegration);\n assertPlayableEditorViteAliasFiles(aliasPlan, resolvedIntegration, options);\n\n return {\n ...(environment?.command === 'serve' && options.editorService?.enabled !== false ? {\n define: {\n __FPS_EDITOR_AGENT_RUNTIME__: JSON.stringify({\n protocolVersion: EDITOR_SERVICE_PROTOCOL_VERSION,\n serviceInstanceId: editorServiceCredentials.serviceInstanceId,\n gatewayPath: EDITOR_SERVICE_GATEWAY_PATH,\n token: editorServiceCredentials.token,\n }),\n },\n } : {}),\n ...(resolvedIntegration.cacheDir ? { cacheDir: resolvedIntegration.cacheDir } : {}),\n optimizeDeps: {\n // Plugin manifest validation uses the CommonJS semver package. A\n // packed editor install must prebundle it before browser execution.\n include: [...PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS],\n // Aliased editor modules share authenticated contexts and lifecycle\n // singletons. Prebundling any one of them can embed a second module\n // instance beside the public editor graph and invalidate those\n // identities at runtime.\n exclude: aliasPlan.entries\n .map(entry => entry.packageId)\n .filter(packageId => !PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS.includes(\n packageId as (typeof PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS)[number],\n )),\n },\n resolve: {\n alias: aliasPlan.entries.map(entry => ({\n find: packageIdRegex(entry.packageId),\n replacement: entry.file,\n })),\n },\n };\n },\n\n configResolved(config) {\n // Consumers may use the editor package allowlist as their source-workspace\n // optimizeDeps.exclude list. Tooling-owned browser dependencies must win\n // over that broad exclusion after Vite has merged every config source.\n config.optimizeDeps.exclude = Array.from(new Set(\n (config.optimizeDeps.exclude ?? [])\n .filter(packageId => !PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS.includes(\n packageId as (typeof PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS)[number],\n )),\n ));\n config.optimizeDeps.include = Array.from(new Set([\n ...(config.optimizeDeps.include ?? []),\n ...PLAYABLE_EDITOR_VITE_PREBUNDLE_PACKAGE_IDS,\n ]));\n },\n\n async configureServer(server) {\n const integration = resolvedIntegration\n ?? options.resolvedIntegration\n ?? resolvePlayableEditorViteIntegration({\n root: server.config.root,\n cacheDir: server.config.cacheDir,\n }, options);\n writePlayableEditorViteCacheMarker({\n ...integration,\n cacheDir: server.config.cacheDir || integration.cacheDir,\n }, options);\n if (editorEntryManifest) {\n installPlayableEditorEntryManifestRoute(\n server,\n options.editorEntry?.manifestPath ?? PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH,\n editorEntryManifest,\n );\n }\n emitPlayableEditorViteVersionDiagnostics(server, integration, options);\n // Some tooling contract tests pass a deliberately partial Vite server.\n // A real serve-mode server always exposes both middleware and HTTP ownership.\n const runtimeServer = server as unknown as {\n middlewares?: { use?: unknown };\n httpServer?: unknown;\n };\n if (typeof runtimeServer.middlewares?.use === 'function' && runtimeServer.httpServer) {\n if (editorService) {\n throw new Error('Playable Editor Vite plugin already owns an Editor Service.');\n }\n editorService = await installPlayableEditorViteEditorService({\n server,\n integration,\n options: options.editorService,\n credentials: editorServiceCredentials,\n logger: options.logger,\n });\n }\n },\n async closeBundle() {\n const activeEditorService = editorService;\n editorService = null;\n await activeEditorService?.dispose();\n },\n };\n}\n\nfunction createPlayableEditorViteEntryManifest(\n integration: Pick<PlayableEditorViteResolvedIntegration, 'buildInfo'>,\n options: Pick<PlayableEditorVitePluginOptions, 'editorEntry'>,\n): PlayableEditorViteEntryManifest | null {\n if (!options.editorEntry) return null;\n return Object.freeze({\n schemaVersion: 1,\n build: Object.freeze({\n packageName: integration.buildInfo.packageName,\n version: integration.buildInfo.version,\n buildId: integration.buildInfo.cacheKey,\n distHash: integration.buildInfo.distHash,\n }),\n entry: Object.freeze({\n kind: 'module',\n url: readEditorEntryUrl(options.editorEntry.url),\n cache: readEditorEntryCachePolicy(options.editorEntry.cache),\n }),\n cacheControl: Object.freeze({\n manifest: PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL,\n immutableResource: PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL,\n }),\n });\n}\n\nfunction installPlayableEditorEntryManifestRoute(\n server: ViteDevServer,\n manifestPath: string,\n manifest: PlayableEditorViteEntryManifest,\n): void {\n const pathname = normalizeManifestPath(manifestPath);\n const body = `${JSON.stringify(manifest, null, 2)}\\n`;\n const etag = `\"${manifest.build.buildId}\"`;\n server.middlewares.use((request, response, next) => {\n if (!request.url || (request.method !== 'GET' && request.method !== 'HEAD')) return next();\n const requestUrl = new URL(request.url, 'http://fps-editor.local');\n if (requestUrl.pathname !== pathname) return next();\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Cache-Control', PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL);\n response.setHeader('Content-Type', 'application/json; charset=utf-8');\n response.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');\n response.setHeader('ETag', etag);\n response.setHeader('X-Fps-Editor-Build', manifest.build.buildId);\n if (request.headers['if-none-match'] === etag) {\n response.statusCode = 304;\n response.end();\n return;\n }\n response.statusCode = 200;\n response.end(request.method === 'HEAD' ? undefined : body);\n });\n}\n\nfunction readEditorEntryCachePolicy(\n value: 'revalidate' | 'immutable' | undefined,\n): 'revalidate' | 'immutable' {\n if (value === undefined) return 'revalidate';\n if (value !== 'revalidate' && value !== 'immutable') {\n throw new Error(`Editor entry cache must be revalidate or immutable: ${String(value)}.`);\n }\n return value;\n}\n\nfunction readEditorEntryUrl(value: string): string {\n const normalized = value.trim();\n if (!normalized) throw new Error('Editor entry url must be a non-empty string.');\n let parsed: URL;\n try {\n parsed = new URL(normalized, 'https://fps-editor.invalid/');\n } catch {\n throw new Error(`Editor entry url is invalid: ${value}.`);\n }\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n throw new Error(`Editor entry url must use HTTP(S): ${value}.`);\n }\n return normalized;\n}\n\nfunction normalizeManifestPath(value: string): string {\n const normalized = value.trim();\n if (!normalized.startsWith('/') || normalized.includes('?') || normalized.includes('#')) {\n throw new Error(`Editor entry manifestPath must be an absolute URL path: ${value}.`);\n }\n return normalized;\n}\n\nexport function resolvePlayableEditorViteIntegration(\n config: UserConfig = {},\n options: PlayableEditorVitePluginOptions = {},\n): PlayableEditorViteResolvedIntegration {\n const env = options.env ?? process.env;\n const projectRoot = path.resolve(options.projectRoot ?? config.root ?? process.cwd());\n const localEditorRepo = readLocalEditorRepo(options, env);\n const bundledRoots = createPlayableEditorBundledPackageRoots(projectRoot, {\n resolvePath: path.resolve,\n });\n const editorPackageRoot = localEditorRepo\n ? path.resolve(localEditorRepo, 'packages', 'editor')\n : path.dirname(bundledRoots.editorPackageJsonPath);\n const buildInfoPath = path.join(editorPackageRoot, 'dist', 'build-info.json');\n const buildInfo = readPlayableEditorBuildInfo({\n editorPackageRoot,\n buildInfoPath,\n packageJsonPath: path.join(editorPackageRoot, 'package.json'),\n });\n const cacheDir = options.cacheDir === false\n ? null\n : options.cacheDir\n ?? config.cacheDir\n ?? createPlayableEditorViteCacheDir({\n projectRoot,\n env,\n buildInfo,\n packageVersion: buildInfo.version,\n resolvePath: path.resolve,\n });\n\n return {\n projectRoot,\n localEditorRepo,\n editorPackageRoot,\n buildInfoPath,\n buildInfo,\n cacheDir,\n };\n}\n\nexport function writePlayableEditorViteCacheMarker(\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions = {},\n): void {\n if (!integration.cacheDir) return;\n const markerPath = path.join(integration.cacheDir, PLAYABLE_EDITOR_VITE_CACHE_MARKER_FILE);\n const marker: PlayableEditorViteCacheMarker = {\n packageName: integration.buildInfo.packageName,\n version: integration.buildInfo.version,\n cacheKey: integration.buildInfo.cacheKey,\n distHash: integration.buildInfo.distHash,\n buildInfoPath: integration.buildInfoPath,\n };\n const previous = readPlayableEditorViteCacheMarker(markerPath);\n if (previous && previous.cacheKey !== marker.cacheKey) {\n options.logger?.warn?.(\n `[fps-editor] Vite cache marker changed in ${integration.cacheDir}: `\n + `${previous.cacheKey} -> ${marker.cacheKey}`,\n );\n }\n mkdirSync(integration.cacheDir, { recursive: true });\n writeFileSync(markerPath, `${JSON.stringify(marker, null, 2)}\\n`, 'utf8');\n}\n\nexport function inspectPlayableEditorViteInstalledVersion(\n integration: PlayableEditorViteResolvedIntegration,\n): PlayableEditorDoctorReport {\n if (integration.localEditorRepo) {\n return inspectPlayableEditorInstalledVersion({\n packageName: '@fps-games/editor',\n declaredVersion: null,\n installedVersion: integration.buildInfo.version,\n source: 'FPS_GAME_EDITOR_REPO',\n });\n }\n return inspectPlayableEditorInstalledVersion({\n packageName: '@fps-games/editor',\n declaredVersion: readProjectDeclaredEditorVersion(integration.projectRoot),\n installedVersion: integration.buildInfo.version,\n source: path.join(integration.projectRoot, 'package.json'),\n });\n}\n\nfunction emitPlayableEditorViteVersionDiagnostics(\n server: ViteDevServer,\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions,\n): void {\n if (options.versionDiagnostics === false) return;\n const report = inspectPlayableEditorViteInstalledVersion(integration);\n if (report.diagnostics.length === 0) return;\n const formatted = formatPlayableEditorDoctorReport(report);\n const logger = options.logger ?? console;\n if (!report.ok && hasMatchingPackedBaselineMarker(integration)) {\n logger.warn?.(`${formatted}\\n[fps-editor] Installed-version mismatch is allowed for this explicit packed-package baseline.`);\n return;\n }\n if (report.ok) {\n logger.warn?.(formatted);\n } else {\n logger.error?.(formatted);\n }\n\n const payload = createPlayableEditorViteOverlayPayload(formatted);\n server.ws?.send?.(payload);\n server.ws?.on?.('connection', () => {\n server.ws?.send?.(payload);\n });\n}\n\nfunction hasMatchingPackedBaselineMarker(integration: PlayableEditorViteResolvedIntegration): boolean {\n if (integration.localEditorRepo) return false;\n const markerPath = path.join(integration.editorPackageRoot, PLAYABLE_EDITOR_PACKED_BASELINE_MARKER_FILE);\n if (!existsSync(markerPath)) return false;\n try {\n const marker = JSON.parse(readFileSync(markerPath, 'utf8')) as {\n declaredVersion?: unknown;\n installedVersion?: unknown;\n };\n return marker.declaredVersion === readProjectDeclaredEditorVersion(integration.projectRoot)\n && marker.installedVersion === integration.buildInfo.version;\n } catch {\n return false;\n }\n}\n\nfunction createPlayableEditorViteOverlayPayload(message: string): ErrorPayload {\n return {\n type: 'error',\n err: {\n message,\n stack: '',\n plugin: 'fps-editor-playable-vite',\n },\n };\n}\n\nfunction createPlayableEditorViteAliasPlan(\n integration: PlayableEditorViteResolvedIntegration,\n): PlayableEditorPackageAliasPlan {\n if (integration.localEditorRepo) {\n return createPlayableEditorSourcePackageAliasPlan(integration.localEditorRepo, {\n resolvePath: path.resolve,\n });\n }\n\n const roots = createPlayableEditorBundledPackageRoots(integration.projectRoot, {\n resolvePath: path.resolve,\n });\n return createPlayableEditorBundledPackageAliasPlan({\n bundledEditorPackagesRoot: roots.bundledEditorPackagesRoot,\n bundledEditorNodeModulesRoot: roots.bundledEditorNodeModulesRoot,\n directBabylonRendererPackageRoot: roots.directBabylonRendererPackageRoot,\n resolvePath: path.resolve,\n fileExists: existsSync,\n });\n}\n\nfunction assertPlayableEditorViteAliasFiles(\n aliasPlan: PlayableEditorPackageAliasPlan,\n integration: PlayableEditorViteResolvedIntegration,\n options: PlayableEditorVitePluginOptions,\n): void {\n if (options.strictAliasFiles === false) return;\n const missing = collectMissingPlayableEditorPackageAliasFiles(aliasPlan, existsSync);\n if (missing.length === 0) return;\n const mode = integration.localEditorRepo\n ? `FPS_GAME_EDITOR_REPO=${integration.localEditorRepo}`\n : '@fps-games/editor bundled dependencies';\n throw new Error(formatPlayableEditorPackageAliasPlanError(\n missing,\n `[fps-editor] The playable editor Vite integration could not resolve ${mode}.`,\n ));\n}\n\nfunction readPlayableEditorViteCacheMarker(markerPath: string): PlayableEditorViteCacheMarker | null {\n if (!existsSync(markerPath)) return null;\n try {\n const parsed = JSON.parse(readFileSync(markerPath, 'utf8')) as unknown;\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null;\n const marker = parsed as Partial<PlayableEditorViteCacheMarker>;\n if (\n typeof marker.packageName !== 'string'\n || typeof marker.version !== 'string'\n || typeof marker.cacheKey !== 'string'\n || typeof marker.distHash !== 'string'\n || typeof marker.buildInfoPath !== 'string'\n ) {\n return null;\n }\n return marker as PlayableEditorViteCacheMarker;\n } catch {\n return null;\n }\n}\n\nfunction readProjectDeclaredEditorVersion(projectRoot: string): string | null {\n const packageJsonPath = path.join(projectRoot, 'package.json');\n if (!existsSync(packageJsonPath)) return null;\n try {\n const parsed = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as unknown;\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null;\n const record = parsed as Record<string, unknown>;\n return readDependencyVersion(record.dependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.devDependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.peerDependencies, '@fps-games/editor')\n ?? readDependencyVersion(record.optionalDependencies, '@fps-games/editor');\n } catch {\n return null;\n }\n}\n\nfunction readDependencyVersion(value: unknown, packageName: string): string | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return null;\n const dependencyVersion = (value as Record<string, unknown>)[packageName];\n return typeof dependencyVersion === 'string' && dependencyVersion.trim()\n ? dependencyVersion.trim()\n : null;\n}\n\nfunction readLocalEditorRepo(\n options: PlayableEditorVitePluginOptions,\n env: Record<string, string | undefined>,\n): string | null {\n if (options.localEditorRepo === null) return null;\n const value = options.localEditorRepo ?? env.FPS_GAME_EDITOR_REPO ?? null;\n return typeof value === 'string' && value.trim() ? path.resolve(value.trim()) : null;\n}\n\nfunction packageIdRegex(packageId: string): RegExp {\n return new RegExp(`^${escapeRegex(packageId)}$`);\n}\n\nfunction escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"]}
|
|
@@ -8,7 +8,6 @@ export interface FpsGameEditorViteAdapterOptions {
|
|
|
8
8
|
editorEntry?: PlayableEditorViteEntryOptions;
|
|
9
9
|
logger?: Pick<Console, 'info'>;
|
|
10
10
|
createProjectAuthoringApiPlugin?: (input: FpsGameEditorViteAdapterProjectPluginInput) => Plugin;
|
|
11
|
-
extendAgentBridgeSessionMetadata?: (metadata: Record<string, unknown>, input: FpsGameEditorViteAdapterProjectPluginInput) => Record<string, unknown>;
|
|
12
11
|
}
|
|
13
12
|
export interface FpsGameEditorViteAdapterProjectPluginInput {
|
|
14
13
|
project: FpsGameEditorProjectDefinition;
|
|
@@ -21,7 +20,6 @@ export interface FpsGameEditorViteAdapter {
|
|
|
21
20
|
cacheDir: string | null;
|
|
22
21
|
integration: PlayableEditorViteResolvedIntegration;
|
|
23
22
|
readFpsEditorVersion(): string;
|
|
24
|
-
createAgentBridgeSessionMetadata(): Record<string, unknown>;
|
|
25
23
|
playableEditorVitePlugin(): Plugin;
|
|
26
24
|
projectAuthoringApiPlugin(): Plugin | null;
|
|
27
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-adapter.d.ts","sourceRoot":"","sources":["../../src/vite/product-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"product-adapter.d.ts","sourceRoot":"","sources":["../../src/vite/product-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EACV,8BAA8B,EAC9B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,qCAAqC,CAAC;IACpD,WAAW,CAAC,EAAE,8BAA8B,CAAC;IAC7C,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,+BAA+B,CAAC,EAAE,CAChC,KAAK,EAAE,0CAA0C,KAC9C,MAAM,CAAC;CACb;AAED,MAAM,WAAW,0CAA0C;IACzD,OAAO,EAAE,8BAA8B,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,qCAAqC,CAAC;CACpD;AAED,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,qCAAqC,CAAC;IACnD,oBAAoB,IAAI,MAAM,CAAC;IAC/B,wBAAwB,IAAI,MAAM,CAAC;IACnC,yBAAyB,IAAI,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,+BAA+B,GACvC,wBAAwB,CAwC1B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PLAYABLE_EDITOR_PACKAGE_IDS, } from '../package-resolution/index.js';
|
|
2
2
|
import { playableEditorVitePlugin, resolvePlayableEditorViteIntegration, } from './plugin.js';
|
|
3
|
-
import { createPlayableEditorViteAgentSessionMetadata, } from './session-metadata.js';
|
|
4
3
|
export function createFpsGameEditorViteAdapter(project, options) {
|
|
5
4
|
const projectRoot = options.projectRoot;
|
|
6
5
|
const integration = options.integration
|
|
@@ -26,21 +25,13 @@ export function createFpsGameEditorViteAdapter(project, options) {
|
|
|
26
25
|
? integration.buildInfo.version.trim().replace(/[^a-zA-Z0-9._-]/g, '_')
|
|
27
26
|
: 'unknown';
|
|
28
27
|
},
|
|
29
|
-
createAgentBridgeSessionMetadata() {
|
|
30
|
-
const metadata = createPlayableEditorViteAgentSessionMetadata({
|
|
31
|
-
projectRoot,
|
|
32
|
-
integration,
|
|
33
|
-
});
|
|
34
|
-
return options.extendAgentBridgeSessionMetadata
|
|
35
|
-
? options.extendAgentBridgeSessionMetadata(metadata, projectPluginInput)
|
|
36
|
-
: metadata;
|
|
37
|
-
},
|
|
38
28
|
playableEditorVitePlugin() {
|
|
39
29
|
return playableEditorVitePlugin({
|
|
40
30
|
projectRoot,
|
|
41
31
|
resolvedIntegration: integration,
|
|
42
32
|
cacheDir: integration.cacheDir ?? undefined,
|
|
43
33
|
editorEntry: options.editorEntry,
|
|
34
|
+
editorService: { project },
|
|
44
35
|
});
|
|
45
36
|
},
|
|
46
37
|
projectAuthoringApiPlugin() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-adapter.js","sourceRoot":"","sources":["../../src/vite/product-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,wBAAwB,EACxB,oCAAoC,GACrC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"product-adapter.js","sourceRoot":"","sources":["../../src/vite/product-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,wBAAwB,EACxB,oCAAoC,GACrC,MAAM,UAAU,CAAC;AAkClB,MAAM,UAAU,8BAA8B,CAC5C,OAAuC,EACvC,OAAwC;IAExC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW;WAClC,oCAAoC,CAAC,EAAE,EAAE;YAC1C,WAAW;YACX,eAAe,EAAE,OAAO,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe;SACxF,CAAC,CAAC;IACL,MAAM,kBAAkB,GAA+C;QACrE,OAAO;QACP,WAAW;QACX,WAAW;KACZ,CAAC;IAEF,IAAI,WAAW,CAAC,eAAe,EAAE,CAAC;QAChC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,gDAAgD,WAAW,CAAC,eAAe,EAAE,CAAC,CAAC;IACxG,CAAC;IAED,OAAO;QACL,sBAAsB,EAAE,WAAW,CAAC,eAAe;QACnD,gBAAgB,EAAE,2BAA2B;QAC7C,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,WAAW;QACX,oBAAoB;YAClB,OAAO,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE;gBACzC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC;gBACvE,CAAC,CAAC,SAAS,CAAC;QAChB,CAAC;QACD,wBAAwB;YACtB,OAAO,wBAAwB,CAAC;gBAC9B,WAAW;gBACX,mBAAmB,EAAE,WAAW;gBAChC,QAAQ,EAAE,WAAW,CAAC,QAAQ,IAAI,SAAS;gBAC3C,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,aAAa,EAAE,EAAE,OAAO,EAAE;aAC3B,CAAC,CAAC;QACL,CAAC;QACD,yBAAyB;YACvB,OAAO,OAAO,CAAC,+BAA+B,EAAE,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC;QAC/E,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n PLAYABLE_EDITOR_PACKAGE_IDS,\n} from '../package-resolution/index';\nimport type {\n FpsGameEditorProjectDefinition,\n} from '../product/index';\nimport {\n playableEditorVitePlugin,\n resolvePlayableEditorViteIntegration,\n} from './plugin';\nimport type { Plugin } from 'vite';\nimport type {\n PlayableEditorViteEntryOptions,\n PlayableEditorViteResolvedIntegration,\n} from './types';\n\nexport interface FpsGameEditorViteAdapterOptions {\n projectRoot: string;\n localEditorRepo?: string | null;\n integration?: PlayableEditorViteResolvedIntegration;\n editorEntry?: PlayableEditorViteEntryOptions;\n logger?: Pick<Console, 'info'>;\n createProjectAuthoringApiPlugin?: (\n input: FpsGameEditorViteAdapterProjectPluginInput,\n ) => Plugin;\n}\n\nexport interface FpsGameEditorViteAdapterProjectPluginInput {\n project: FpsGameEditorProjectDefinition;\n projectRoot: string;\n integration: PlayableEditorViteResolvedIntegration;\n}\n\nexport interface FpsGameEditorViteAdapter {\n localFpsGameEditorRepo: string | null;\n editorPackageIds: readonly string[];\n cacheDir: string | null;\n integration: PlayableEditorViteResolvedIntegration;\n readFpsEditorVersion(): string;\n playableEditorVitePlugin(): Plugin;\n projectAuthoringApiPlugin(): Plugin | null;\n}\n\nexport function createFpsGameEditorViteAdapter(\n project: FpsGameEditorProjectDefinition,\n options: FpsGameEditorViteAdapterOptions,\n): FpsGameEditorViteAdapter {\n const projectRoot = options.projectRoot;\n const integration = options.integration\n ?? resolvePlayableEditorViteIntegration({}, {\n projectRoot,\n localEditorRepo: options.localEditorRepo === undefined ? null : options.localEditorRepo,\n });\n const projectPluginInput: FpsGameEditorViteAdapterProjectPluginInput = {\n project,\n projectRoot,\n integration,\n };\n\n if (integration.localEditorRepo) {\n options.logger?.info?.(`[fps-editor] Using local editor sources from ${integration.localEditorRepo}`);\n }\n\n return {\n localFpsGameEditorRepo: integration.localEditorRepo,\n editorPackageIds: PLAYABLE_EDITOR_PACKAGE_IDS,\n cacheDir: integration.cacheDir,\n integration,\n readFpsEditorVersion() {\n return integration.buildInfo.version.trim()\n ? integration.buildInfo.version.trim().replace(/[^a-zA-Z0-9._-]/g, '_')\n : 'unknown';\n },\n playableEditorVitePlugin() {\n return playableEditorVitePlugin({\n projectRoot,\n resolvedIntegration: integration,\n cacheDir: integration.cacheDir ?? undefined,\n editorEntry: options.editorEntry,\n editorService: { project },\n });\n },\n projectAuthoringApiPlugin() {\n return options.createProjectAuthoringApiPlugin?.(projectPluginInput) ?? null;\n },\n };\n}\n"]}
|
package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-authoring-api.d.ts","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAGA,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;
|
|
1
|
+
{"version":3,"file":"product-authoring-api.d.ts","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAGA,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;AAW1B,MAAM,WAAW,6CAA6C;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,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,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,CA6NR;AAED,wBAAgB,mCAAmC,CACjD,aAAa,EAAE,MAAM,EACrB,qBAAqB,EAAE,SAAS,MAAM,EAAE,GACvC,OAAO,CAQT"}
|
|
@@ -5,6 +5,7 @@ import { handlePlayableAuthoringServerRequest, } from '../authoring-server/index
|
|
|
5
5
|
import { createPlayableAuthoringTransportPathNormalizer, readPlayableAuthoringJsonBody, sendPlayableAuthoringHttpResponse, setPlayableAuthoringCorsHeaders, } from './authoring-http.js';
|
|
6
6
|
import { resolveEditorProjectMediaSupport } from '../project-files/index.js';
|
|
7
7
|
import { resolveFpsGameEditorViteFilePath } from './module-invalidation.js';
|
|
8
|
+
import { installFpsGameEditorProjectAuthoringBackend } from './project-authoring-backend.js';
|
|
8
9
|
import { closeEditorProjectFileHandle, openVerifiedEditorProjectFile, resolveEditorProjectMediaMaxBytes, } from './project-file-handle.js';
|
|
9
10
|
import { readEditorProjectFile, scanEditorProjectFiles } from './project-files.js';
|
|
10
11
|
export function createFpsGameEditorProjectAuthoringApiPlugin(options) {
|
|
@@ -15,6 +16,26 @@ export function createFpsGameEditorProjectAuthoringApiPlugin(options) {
|
|
|
15
16
|
apply: 'serve',
|
|
16
17
|
async configureServer(server) {
|
|
17
18
|
const assetAuthoringHandlersPromise = options.createAssetAuthoringHandlers(server);
|
|
19
|
+
const releaseEditorServiceBackend = installFpsGameEditorProjectAuthoringBackend(server, {
|
|
20
|
+
loadEditorScene: () => options.loadEditorScene(server),
|
|
21
|
+
async listEditorAssets() {
|
|
22
|
+
const handlers = await assetAuthoringHandlersPromise;
|
|
23
|
+
if (!handlers.loadEditorAssetLibrary)
|
|
24
|
+
return [];
|
|
25
|
+
const result = await handlers.loadEditorAssetLibrary({});
|
|
26
|
+
if (Array.isArray(result))
|
|
27
|
+
return result;
|
|
28
|
+
if (result && typeof result === 'object') {
|
|
29
|
+
const record = result;
|
|
30
|
+
const assets = record.assets ?? record.items;
|
|
31
|
+
if (Array.isArray(assets))
|
|
32
|
+
return assets;
|
|
33
|
+
}
|
|
34
|
+
return [];
|
|
35
|
+
},
|
|
36
|
+
saveEditorScene: input => options.saveEditorScene({ server, ...input }),
|
|
37
|
+
});
|
|
38
|
+
server.httpServer?.once('close', releaseEditorServiceBackend);
|
|
18
39
|
if (options.getAuthoringWrittenFiles) {
|
|
19
40
|
authoringWrittenFilesPromise = options.getAuthoringWrittenFiles(server)
|
|
20
41
|
.then(paths => paths.map(file => path.resolve(options.projectRoot, file)))
|