@playdrop/playdrop-cli 0.3.1-build.1 → 0.3.4-build.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/config/client-meta.json +5 -5
- package/dist/apps/build.js +90 -114
- package/dist/apps/upload.js +30 -8
- package/dist/apps/validate.js +61 -0
- package/dist/assets/model-artifacts.d.ts +8 -0
- package/dist/assets/model-artifacts.js +375 -0
- package/dist/assets/model-worker.d.ts +22 -0
- package/dist/assets/model-worker.js +123 -0
- package/dist/catalogue.d.ts +4 -4
- package/dist/catalogue.js +234 -44
- package/dist/commands/build.js +15 -2
- package/dist/commands/dev.js +2 -0
- package/dist/commands/devServer.js +88 -9
- package/dist/commands/generation.js +130 -6
- package/dist/commands/migrateCatalogueV2.js +4 -4
- package/dist/commands/upload.js +63 -18
- package/dist/index.js +6 -5
- package/dist/playwright.js +9 -1
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +1 -1
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +39 -17
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +236 -42
- package/node_modules/@playdrop/api-client/dist/index.d.ts +27 -5
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +39 -9
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-cleaner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-utils.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.d.ts +2 -2
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +6 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/builder.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/palette_tools.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +4 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/serialization.js +10 -10
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.d.ts +5 -5
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/layer-mode.d.ts +2 -2
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/layer-mode.js +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +2 -0
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/slice.d.ts +2 -2
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/slice.js +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +3 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/upscale.js +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.d.ts +3 -3
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.d.ts +10 -10
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.js +36 -36
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/test/entity-utils.test.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.js +2 -2
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/test/layer-mode.test.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/test/palette-tools.test.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.js +6 -6
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/test/textures.test.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/types.test.js +1 -1
- package/node_modules/@playdrop/boxel-core/dist/test/types.test.js.map +1 -0
- package/node_modules/@playdrop/boxel-core/dist/test/upscale.test.js.map +1 -0
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.js +11 -11
- package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.js.map +1 -1
- package/node_modules/@playdrop/{entity-core → boxel-core}/package.json +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +4 -0
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/animations.js +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/builders.d.ts +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/builders.js +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/glb.d.ts +9 -9
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/glb.js +4 -4
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/image.d.ts +4 -4
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/image.js +5 -5
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -0
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +15 -0
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/instantiate.d.ts +4 -4
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/instantiate.js +4 -4
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/nodes.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +7 -0
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/overlays.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +3 -0
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/scene.js +6 -6
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/textures.d.ts +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/textures.js +2 -2
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/types.d.ts +15 -15
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/faces.d.ts +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/mesher.js +1 -1
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/export-image.playwright.test.js +4 -4
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/fixtures/render-worker.d.ts +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/fixtures/render-worker.js +10 -10
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/glb-skinned.test.js +5 -5
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +8 -0
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/instantiate.test.js +2 -2
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/overlays.test.js +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-filter.test.js +5 -5
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-smoke.test.js +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/skinned-mesh.test.js +2 -2
- package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/textured-overlay.test.js +3 -3
- package/node_modules/@playdrop/{entity-three → boxel-three}/package.json +3 -3
- package/node_modules/@playdrop/config/client-meta.json +5 -5
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +155 -52
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +27 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +1 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +20 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.js +43 -37
- package/node_modules/@playdrop/types/dist/entity.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/entity.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/entity.js +2 -2
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -0
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/package.json +10 -7
- package/node_modules/@playdrop/entity-core/dist/src/entity-cleaner.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/entity-utils.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/types.d.ts +0 -6
- package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/humanoid/r6/builder.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/humanoid/templates/index.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/palette_tools.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/serialization.d.ts +0 -4
- package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
- package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/src/transforms/upscale.d.ts +0 -3
- package/node_modules/@playdrop/entity-core/dist/test/entity-utils.test.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/test/layer-mode.test.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/test/palette-tools.test.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/test/textures.test.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/test/types.test.js.map +0 -1
- package/node_modules/@playdrop/entity-core/dist/test/upscale.test.js.map +0 -1
- package/node_modules/@playdrop/entity-three/dist/src/animations.d.ts +0 -4
- package/node_modules/@playdrop/entity-three/dist/src/index.d.ts +0 -17
- package/node_modules/@playdrop/entity-three/dist/src/index.js +0 -15
- package/node_modules/@playdrop/entity-three/dist/src/overlays.d.ts +0 -7
- package/node_modules/@playdrop/entity-three/dist/src/scene.d.ts +0 -3
- package/node_modules/@playdrop/entity-three/dist/test/index.test.js +0 -8
- package/node_modules/@playdrop/types/dist/profile-asset-semantics.d.ts +0 -22
- package/node_modules/@playdrop/types/dist/profile-asset-semantics.d.ts.map +0 -1
- package/node_modules/@playdrop/types/dist/profile-asset-semantics.js +0 -105
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-cleaner.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-utils.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/textured-builder.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/types.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/types.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/voxel-builder.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/builder.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/humanoid_r15.json +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/humanoid_r6.json +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/index.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/palette_tools.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/infer-face.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/merge-overlay.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/entity-utils.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/entity-utils.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/layer-mode.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/layer-mode.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.js.map +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/palette-tools.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/palette-tools.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/textures.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/textures.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/types.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/upscale.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/upscale.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.js +0 -0
- /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.js.map +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/context.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/nodes.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/primitives.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/primitives.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/skinned-mesh.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/texture-atlas.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/texture-atlas.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/types.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/faces.js +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/export-image.playwright.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/glb-skinned.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/index.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/instantiate.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/overlays.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-filter.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-smoke.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/skinned-mesh.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/textured-overlay.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/voxels.test.d.ts +0 -0
- /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/voxels.test.js +0 -0
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ Learn more at [https://playdrop.ai](https://playdrop.ai)
|
|
|
9
9
|
- `playdrop-cli create <name> (--template creator/template/name | --remix creator/type/name)` – scaffold a new project from a template or remix.
|
|
10
10
|
- `playdrop-cli dev <name>` – serve an app locally.
|
|
11
11
|
- `playdrop-cli capture [name] [--timeout seconds] [--log-level level] [--surface target] [--screenshot path]` – run the dev frame in Playwright, stream console logs, and fail on browser errors (timeout default: 5 seconds, max: 600; surfaces: desktop, mobile-landscape, mobile-portrait; log levels: debug, info, warn, error; screenshots saved as PNG).
|
|
12
|
+
- `node packages/playdrop-cli/scripts/capture-url.mjs --url <play-url> --screenshot <path> [--timeout seconds] [--log <path>] [--username <name> --password <pass> [--login-url <url>]]` – run a Playwright smoke check against a published app URL and fail on browser errors.
|
|
12
13
|
- `playdrop-cli detail <creator/type/name>` – inspect metadata for an app, asset, or pack (`--format json` for raw output).
|
|
13
14
|
- `playdrop-cli list [--type ... --creator ... --max ...]` – discover apps, assets, and packs available to your account (defaults to all creators).
|
|
14
15
|
- `playdrop-cli feedback --title <title> [--comment text|--file path]` – send feedback to the Playdrop team; CLI metadata is attached automatically.
|
package/config/client-meta.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.4",
|
|
3
3
|
"build": 1,
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": {
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
},
|
|
27
27
|
"clients": {
|
|
28
28
|
"web": {
|
|
29
|
-
"minimumVersion": "0.3.
|
|
29
|
+
"minimumVersion": "0.3.4",
|
|
30
30
|
"minimumBuild": 1
|
|
31
31
|
},
|
|
32
32
|
"admin": {
|
|
33
|
-
"minimumVersion": "0.3.
|
|
33
|
+
"minimumVersion": "0.3.4",
|
|
34
34
|
"minimumBuild": 1
|
|
35
35
|
},
|
|
36
36
|
"apple": {
|
|
37
|
-
"minimumVersion": "0.3.
|
|
37
|
+
"minimumVersion": "0.3.4",
|
|
38
38
|
"minimumBuild": 1
|
|
39
39
|
},
|
|
40
40
|
"cli": {
|
|
41
|
-
"minimumVersion": "0.3.
|
|
41
|
+
"minimumVersion": "0.3.4",
|
|
42
42
|
"minimumBuild": 1
|
|
43
43
|
}
|
|
44
44
|
}
|
package/dist/apps/build.js
CHANGED
|
@@ -173,9 +173,21 @@ function normalizeRelativePath(root, target) {
|
|
|
173
173
|
const rel = (0, node_path_1.relative)(root, target).split(node_path_1.sep).join('/');
|
|
174
174
|
return rel.replace(/^\/+/, '');
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function isPathWithinRoot(rootDir, targetPath) {
|
|
177
|
+
const normalizedRoot = (0, node_path_1.resolve)(rootDir);
|
|
178
|
+
const normalizedTarget = (0, node_path_1.resolve)(targetPath);
|
|
179
|
+
if (normalizedTarget === normalizedRoot) {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
const rootPrefix = normalizedRoot.endsWith(node_path_1.sep) ? normalizedRoot : `${normalizedRoot}${node_path_1.sep}`;
|
|
183
|
+
return normalizedTarget.startsWith(rootPrefix);
|
|
184
|
+
}
|
|
185
|
+
function collectProjectFiles(rootDir, rules, options) {
|
|
186
|
+
const includeRelativeFiles = options?.includeRelativeFiles ?? [];
|
|
187
|
+
const enforceReservedBundleNames = options?.enforceReservedBundleNames ?? false;
|
|
177
188
|
const results = [];
|
|
178
|
-
const
|
|
189
|
+
const fileByRelativePath = new Map();
|
|
190
|
+
const stack = [rootDir];
|
|
179
191
|
const visited = new Set();
|
|
180
192
|
while (stack.length > 0) {
|
|
181
193
|
const current = stack.pop();
|
|
@@ -191,10 +203,13 @@ function collectProjectFiles(projectDir, rules) {
|
|
|
191
203
|
}
|
|
192
204
|
for (const entry of dirEntries) {
|
|
193
205
|
const absolutePath = (0, node_path_1.join)(current, entry.name);
|
|
194
|
-
const relativePath = normalizeRelativePath(
|
|
206
|
+
const relativePath = normalizeRelativePath(rootDir, absolutePath);
|
|
195
207
|
if (!relativePath)
|
|
196
208
|
continue;
|
|
197
209
|
const isDir = entry.isDirectory();
|
|
210
|
+
if (!isDir && enforceReservedBundleNames && isReservedBundlePath(relativePath)) {
|
|
211
|
+
throw new Error(`[apps][build] Reserved bundle filename "${relativePath}" is not allowed. Use dedicated source/ecs/server upload fields.`);
|
|
212
|
+
}
|
|
198
213
|
const ignoreTarget = isDir ? `${relativePath}/` : relativePath;
|
|
199
214
|
if (shouldIgnore(ignoreTarget, isDir, rules))
|
|
200
215
|
continue;
|
|
@@ -213,127 +228,87 @@ function collectProjectFiles(projectDir, rules) {
|
|
|
213
228
|
}
|
|
214
229
|
if (!stats.isFile())
|
|
215
230
|
continue;
|
|
216
|
-
|
|
231
|
+
const record = {
|
|
217
232
|
absolutePath,
|
|
218
233
|
relativePath: relativePath.split('/').join('/'),
|
|
219
234
|
mtime: stats.mtime,
|
|
220
|
-
}
|
|
235
|
+
};
|
|
236
|
+
results.push(record);
|
|
237
|
+
fileByRelativePath.set(record.relativePath, record);
|
|
221
238
|
}
|
|
222
239
|
}
|
|
240
|
+
for (const includePath of includeRelativeFiles) {
|
|
241
|
+
const normalizedIncludePath = (0, node_path_1.normalize)(includePath).split(node_path_1.sep).join('/');
|
|
242
|
+
if (!normalizedIncludePath || normalizedIncludePath === '.') {
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (normalizedIncludePath.startsWith('..')) {
|
|
246
|
+
throw new Error(`[apps][build] Invalid include file path "${includePath}".`);
|
|
247
|
+
}
|
|
248
|
+
if (fileByRelativePath.has(normalizedIncludePath)) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
const absolutePath = (0, node_path_1.resolve)(rootDir, normalizedIncludePath);
|
|
252
|
+
if (!isPathWithinRoot(rootDir, absolutePath)) {
|
|
253
|
+
throw new Error(`[apps][build] Included file "${includePath}" escapes the project root.`);
|
|
254
|
+
}
|
|
255
|
+
if (!(0, node_fs_1.existsSync)(absolutePath)) {
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
const stats = (0, node_fs_1.statSync)(absolutePath);
|
|
259
|
+
if (!stats.isFile()) {
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
if (enforceReservedBundleNames && isReservedBundlePath(normalizedIncludePath)) {
|
|
263
|
+
throw new Error(`[apps][build] Reserved bundle filename "${normalizedIncludePath}" is not allowed. Use dedicated source/ecs/server upload fields.`);
|
|
264
|
+
}
|
|
265
|
+
const record = {
|
|
266
|
+
absolutePath,
|
|
267
|
+
relativePath: normalizedIncludePath,
|
|
268
|
+
mtime: stats.mtime,
|
|
269
|
+
};
|
|
270
|
+
results.push(record);
|
|
271
|
+
fileByRelativePath.set(record.relativePath, record);
|
|
272
|
+
}
|
|
223
273
|
results.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
224
274
|
return results;
|
|
225
275
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
if ((0, node_fs_1.existsSync)(agentsPath)) {
|
|
241
|
-
const stats = (0, node_fs_1.statSync)(agentsPath);
|
|
242
|
-
files.push({ absolutePath: agentsPath, relativePath: 'AGENTS.md', mtime: stats.mtime });
|
|
243
|
-
}
|
|
244
|
-
if (task.catalogueAbsolutePath && (0, node_fs_1.existsSync)(task.catalogueAbsolutePath)) {
|
|
245
|
-
const stats = (0, node_fs_1.statSync)(task.catalogueAbsolutePath);
|
|
246
|
-
const relativePath = normalizeRelativePath(task.projectDir, task.catalogueAbsolutePath) || 'catalogue.json';
|
|
247
|
-
files.push({ absolutePath: task.catalogueAbsolutePath, relativePath, mtime: stats.mtime });
|
|
276
|
+
// Files that are uploaded separately and should not be included in the bundle zip.
|
|
277
|
+
const RESERVED_BUNDLE_FILES = new Set(['source.zip', 'ecs.json', 'server.js']);
|
|
278
|
+
function isReservedBundlePath(relativePath) {
|
|
279
|
+
const normalized = relativePath.replace(/\\/g, '/');
|
|
280
|
+
const basenameValue = normalized.split('/').pop()?.toLowerCase() || '';
|
|
281
|
+
return RESERVED_BUNDLE_FILES.has(basenameValue);
|
|
282
|
+
}
|
|
283
|
+
function resolveRuntimeRoot(task) {
|
|
284
|
+
return (0, node_path_1.resolve)((0, node_path_1.dirname)(task.filePath));
|
|
285
|
+
}
|
|
286
|
+
function resolveBundleEntryPoint(task, runtimeRoot) {
|
|
287
|
+
const entryPoint = normalizeRelativePath(runtimeRoot, task.filePath);
|
|
288
|
+
if (!entryPoint || entryPoint.startsWith('..')) {
|
|
289
|
+
throw new Error(`[apps][build] App entry file for ${task.name} must remain inside runtime root ${runtimeRoot}.`);
|
|
248
290
|
}
|
|
249
|
-
|
|
250
|
-
return files;
|
|
291
|
+
return entryPoint;
|
|
251
292
|
}
|
|
252
|
-
// Files that are uploaded separately and should not be included in the bundle zip
|
|
253
|
-
const RESERVED_BUNDLE_FILES = new Set(['ecs.json', 'server.js']);
|
|
254
293
|
/**
|
|
255
294
|
* Collect files for the bundle zip.
|
|
256
|
-
*
|
|
257
|
-
* - For HTML projects: just the single HTML file (renamed to entry point)
|
|
295
|
+
* Collect files for the bundle zip from the runtime root (dirname(entry file)).
|
|
258
296
|
*/
|
|
259
297
|
function collectBundleFiles(task) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return [{
|
|
269
|
-
absolutePath: task.filePath,
|
|
270
|
-
relativePath: entryPoint,
|
|
271
|
-
mtime: htmlStats.mtime,
|
|
272
|
-
}];
|
|
273
|
-
}
|
|
274
|
-
// For TypeScript projects with a dedicated output folder, zip that folder.
|
|
275
|
-
const distDir = outputDir;
|
|
276
|
-
const results = [];
|
|
277
|
-
const stack = [distDir];
|
|
278
|
-
const visited = new Set();
|
|
279
|
-
while (stack.length > 0) {
|
|
280
|
-
const current = stack.pop();
|
|
281
|
-
if (visited.has(current))
|
|
282
|
-
continue;
|
|
283
|
-
visited.add(current);
|
|
284
|
-
let dirEntries = [];
|
|
285
|
-
try {
|
|
286
|
-
dirEntries = (0, node_fs_1.readdirSync)(current, { withFileTypes: true });
|
|
287
|
-
}
|
|
288
|
-
catch {
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
for (const entry of dirEntries) {
|
|
292
|
-
const absolutePath = (0, node_path_1.join)(current, entry.name);
|
|
293
|
-
const relativePath = normalizeRelativePath(distDir, absolutePath);
|
|
294
|
-
if (!relativePath)
|
|
295
|
-
continue;
|
|
296
|
-
if (entry.isDirectory()) {
|
|
297
|
-
stack.push(absolutePath);
|
|
298
|
-
continue;
|
|
299
|
-
}
|
|
300
|
-
if (!entry.isFile())
|
|
301
|
-
continue;
|
|
302
|
-
// Skip reserved files - they are uploaded separately
|
|
303
|
-
if (RESERVED_BUNDLE_FILES.has(entry.name)) {
|
|
304
|
-
continue;
|
|
305
|
-
}
|
|
306
|
-
let stats;
|
|
307
|
-
try {
|
|
308
|
-
stats = (0, node_fs_1.statSync)(absolutePath);
|
|
309
|
-
}
|
|
310
|
-
catch {
|
|
311
|
-
continue;
|
|
312
|
-
}
|
|
313
|
-
results.push({
|
|
314
|
-
absolutePath,
|
|
315
|
-
relativePath,
|
|
316
|
-
mtime: stats.mtime,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
results.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
321
|
-
return results;
|
|
322
|
-
}
|
|
323
|
-
// For HTML projects, zip just the single HTML file
|
|
324
|
-
const htmlStats = (0, node_fs_1.statSync)(task.filePath);
|
|
325
|
-
const entryPoint = task.relativeFile || (0, node_path_1.basename)(task.filePath);
|
|
326
|
-
return [{
|
|
327
|
-
absolutePath: task.filePath,
|
|
328
|
-
relativePath: entryPoint,
|
|
329
|
-
mtime: htmlStats.mtime,
|
|
330
|
-
}];
|
|
298
|
+
const runtimeRoot = resolveRuntimeRoot(task);
|
|
299
|
+
const entryPoint = resolveBundleEntryPoint(task, runtimeRoot);
|
|
300
|
+
const rules = buildIgnoreRules(task.projectDir);
|
|
301
|
+
const entries = collectProjectFiles(runtimeRoot, rules, {
|
|
302
|
+
includeRelativeFiles: [entryPoint],
|
|
303
|
+
enforceReservedBundleNames: true,
|
|
304
|
+
});
|
|
305
|
+
return { entries, entryPoint };
|
|
331
306
|
}
|
|
332
307
|
function createBundleArchive(task) {
|
|
333
|
-
const entries = collectBundleFiles(task);
|
|
308
|
+
const { entries, entryPoint } = collectBundleFiles(task);
|
|
334
309
|
const buffer = createZipArchive(entries);
|
|
335
310
|
const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
|
|
336
|
-
return { buffer, hash };
|
|
311
|
+
return { buffer, hash, entryPoint };
|
|
337
312
|
}
|
|
338
313
|
const CRC32_TABLE = (() => {
|
|
339
314
|
const table = new Uint32Array(256);
|
|
@@ -468,20 +443,25 @@ function createZipArchive(entries) {
|
|
|
468
443
|
return Buffer.concat(chunks);
|
|
469
444
|
}
|
|
470
445
|
function createSourceArchive(task) {
|
|
446
|
+
const rules = buildIgnoreRules(task.projectDir);
|
|
447
|
+
const includeFiles = ['README.md', 'AGENTS.md'];
|
|
448
|
+
if (task.catalogueAbsolutePath && (0, node_fs_1.existsSync)(task.catalogueAbsolutePath)) {
|
|
449
|
+
const relativeCataloguePath = normalizeRelativePath(task.projectDir, task.catalogueAbsolutePath) || 'catalogue.json';
|
|
450
|
+
includeFiles.push(relativeCataloguePath);
|
|
451
|
+
}
|
|
471
452
|
if (task.isTypescriptProject) {
|
|
472
453
|
const cached = typescriptSourceCache.get(task.projectDir);
|
|
473
454
|
if (cached) {
|
|
474
455
|
return cached;
|
|
475
456
|
}
|
|
476
|
-
const
|
|
477
|
-
const entries = collectProjectFiles(task.projectDir, rules);
|
|
457
|
+
const entries = collectProjectFiles(task.projectDir, rules, { includeRelativeFiles: includeFiles });
|
|
478
458
|
const buffer = createZipArchive(entries);
|
|
479
459
|
const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
|
|
480
460
|
const record = { buffer, hash };
|
|
481
461
|
typescriptSourceCache.set(task.projectDir, record);
|
|
482
462
|
return record;
|
|
483
463
|
}
|
|
484
|
-
const entries =
|
|
464
|
+
const entries = collectProjectFiles(task.projectDir, rules, { includeRelativeFiles: includeFiles });
|
|
485
465
|
const buffer = createZipArchive(entries);
|
|
486
466
|
const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
|
|
487
467
|
return { buffer, hash };
|
|
@@ -524,11 +504,7 @@ async function buildApp(task) {
|
|
|
524
504
|
if (task.surfaceTargets && task.surfaceTargets.length > 0) {
|
|
525
505
|
metadata.surfaceTargets = task.surfaceTargets;
|
|
526
506
|
}
|
|
527
|
-
|
|
528
|
-
// so entryPoint should be the filename, not the full catalogue path
|
|
529
|
-
metadata.entryPoint = task.isTypescriptProject
|
|
530
|
-
? (0, node_path_1.basename)(task.relativeFile)
|
|
531
|
-
: task.relativeFile;
|
|
507
|
+
metadata.entryPoint = bundleArchive.entryPoint;
|
|
532
508
|
// Build ecs file if path is defined
|
|
533
509
|
let ecsFile;
|
|
534
510
|
let ecsHash;
|
package/dist/apps/upload.js
CHANGED
|
@@ -5,11 +5,33 @@ const types_1 = require("@playdrop/types");
|
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
6
|
const node_path_1 = require("node:path");
|
|
7
7
|
const http_1 = require("../http");
|
|
8
|
+
function isPngSignature(content) {
|
|
9
|
+
if (content.length < 8) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return (content[0] === 0x89
|
|
13
|
+
&& content[1] === 0x50
|
|
14
|
+
&& content[2] === 0x4e
|
|
15
|
+
&& content[3] === 0x47
|
|
16
|
+
&& content[4] === 0x0d
|
|
17
|
+
&& content[5] === 0x0a
|
|
18
|
+
&& content[6] === 0x1a
|
|
19
|
+
&& content[7] === 0x0a);
|
|
20
|
+
}
|
|
21
|
+
function isMp4Signature(content) {
|
|
22
|
+
if (content.length < 12) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return content.toString('ascii', 4, 8) === 'ftyp';
|
|
26
|
+
}
|
|
8
27
|
/**
|
|
9
28
|
* Create a File object from a file path with specified MIME type.
|
|
10
29
|
*/
|
|
11
|
-
function createFileFromPath(filePath, mimeType) {
|
|
30
|
+
function createFileFromPath(filePath, mimeType, validator) {
|
|
12
31
|
const content = (0, node_fs_1.readFileSync)(filePath);
|
|
32
|
+
if (validator && !validator(content)) {
|
|
33
|
+
throw new Error(`Invalid listing file signature for ${filePath}. Expected ${mimeType}.`);
|
|
34
|
+
}
|
|
13
35
|
const name = (0, node_path_1.basename)(filePath);
|
|
14
36
|
return new File([content], name, { type: mimeType });
|
|
15
37
|
}
|
|
@@ -61,25 +83,25 @@ async function uploadAppVersion(client, task, artifacts, options) {
|
|
|
61
83
|
// Add listing assets if provided
|
|
62
84
|
if (task.listing) {
|
|
63
85
|
if (task.listing.iconPath) {
|
|
64
|
-
versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png');
|
|
86
|
+
versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png', isPngSignature);
|
|
65
87
|
}
|
|
66
88
|
if (task.listing.heroPortraitPath) {
|
|
67
|
-
versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png');
|
|
89
|
+
versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png', isPngSignature);
|
|
68
90
|
}
|
|
69
91
|
if (task.listing.heroLandscapePath) {
|
|
70
|
-
versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png');
|
|
92
|
+
versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png', isPngSignature);
|
|
71
93
|
}
|
|
72
94
|
if (task.listing.screenshotPortraitPaths.length > 0) {
|
|
73
|
-
versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png'));
|
|
95
|
+
versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
|
|
74
96
|
}
|
|
75
97
|
if (task.listing.screenshotLandscapePaths.length > 0) {
|
|
76
|
-
versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png'));
|
|
98
|
+
versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
|
|
77
99
|
}
|
|
78
100
|
if (task.listing.videoPortraitPaths.length > 0) {
|
|
79
|
-
versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4'));
|
|
101
|
+
versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
|
|
80
102
|
}
|
|
81
103
|
if (task.listing.videoLandscapePaths.length > 0) {
|
|
82
|
-
versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4'));
|
|
104
|
+
versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
|
|
83
105
|
}
|
|
84
106
|
}
|
|
85
107
|
try {
|
package/dist/apps/validate.js
CHANGED
|
@@ -7,6 +7,15 @@ const node_path_1 = require("node:path");
|
|
|
7
7
|
const build_1 = require("./build");
|
|
8
8
|
const projectValidateCache = new Map();
|
|
9
9
|
const projectFormatCache = new Map();
|
|
10
|
+
const LEGACY_SCAN_EXTENSIONS = new Set(['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.html']);
|
|
11
|
+
const LEGACY_SCAN_IGNORED_DIRS = new Set(['node_modules', '.git', 'dist-test', 'coverage']);
|
|
12
|
+
const LEGACY_SDK_SYMBOL_PATTERNS = [
|
|
13
|
+
{ symbol: 'selectedAvatarKey', pattern: /\bselectedAvatarKey\b/g },
|
|
14
|
+
{ symbol: 'sdk.entities', pattern: /\bsdk\s*\.\s*entities\b/g },
|
|
15
|
+
{ symbol: 'sdk.assets.avatar', pattern: /\bsdk\s*\.\s*assets\s*\.\s*avatar\b/g },
|
|
16
|
+
{ symbol: 'sdk.assets.block', pattern: /\bsdk\s*\.\s*assets\s*\.\s*block\b/g },
|
|
17
|
+
{ symbol: 'loadEntity(', pattern: /\.\s*loadEntity\s*\(/g },
|
|
18
|
+
];
|
|
10
19
|
function ensureWithinProject(task) {
|
|
11
20
|
const relativePath = (0, node_path_1.relative)(task.projectDir, task.filePath);
|
|
12
21
|
const segments = relativePath.split(/[/\\]+/);
|
|
@@ -24,6 +33,54 @@ async function ensureValidateScript(task) {
|
|
|
24
33
|
}
|
|
25
34
|
await projectValidateCache.get(task.projectDir);
|
|
26
35
|
}
|
|
36
|
+
function scanForLegacySdkSymbols(task) {
|
|
37
|
+
const findings = [];
|
|
38
|
+
const scanFile = (filePath) => {
|
|
39
|
+
const extension = (0, node_path_1.extname)(filePath).toLowerCase();
|
|
40
|
+
if (!LEGACY_SCAN_EXTENSIONS.has(extension)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const source = (0, node_fs_1.readFileSync)(filePath, 'utf8');
|
|
44
|
+
for (const { symbol, pattern } of LEGACY_SDK_SYMBOL_PATTERNS) {
|
|
45
|
+
pattern.lastIndex = 0;
|
|
46
|
+
const hit = pattern.exec(source);
|
|
47
|
+
if (!hit) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const index = typeof hit.index === 'number' ? hit.index : 0;
|
|
51
|
+
const line = source.slice(0, index).split('\n').length;
|
|
52
|
+
findings.push({
|
|
53
|
+
file: (0, node_path_1.relative)(task.projectDir, filePath),
|
|
54
|
+
line,
|
|
55
|
+
symbol,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const walk = (directory) => {
|
|
60
|
+
const entries = (0, node_fs_1.readdirSync)(directory, { withFileTypes: true });
|
|
61
|
+
for (const entry of entries) {
|
|
62
|
+
if (LEGACY_SCAN_IGNORED_DIRS.has(entry.name)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const nextPath = (0, node_path_1.join)(directory, entry.name);
|
|
66
|
+
if (entry.isDirectory()) {
|
|
67
|
+
walk(nextPath);
|
|
68
|
+
}
|
|
69
|
+
else if (entry.isFile()) {
|
|
70
|
+
scanFile(nextPath);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
walk(task.projectDir);
|
|
75
|
+
if (findings.length > 0) {
|
|
76
|
+
const details = findings
|
|
77
|
+
.slice(0, 10)
|
|
78
|
+
.map((entry) => `${entry.file}:${entry.line} (${entry.symbol})`)
|
|
79
|
+
.join(', ');
|
|
80
|
+
const suffix = findings.length > 10 ? ` (+${findings.length - 10} more)` : '';
|
|
81
|
+
throw new Error(`[apps][validate] legacy SDK symbols detected for ${task.name}: ${details}${suffix}. Remove entity-era APIs before publishing.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
27
84
|
async function runFormatScript(task) {
|
|
28
85
|
if (!task.packageJsonPath || !task.hasFormatScript) {
|
|
29
86
|
return false;
|
|
@@ -53,6 +110,9 @@ async function validateAppTask(task) {
|
|
|
53
110
|
if (!task.relativeFile) {
|
|
54
111
|
throw new Error(`[apps][validate] ${task.name} is missing a "file" field in ${task.cataloguePath}.`);
|
|
55
112
|
}
|
|
113
|
+
if (task.isTypescriptProject && !task.hasValidateScript) {
|
|
114
|
+
throw new Error(`[apps][validate] ${task.name} is missing a required "validate" script in package.json. Define a validate command (for example "validate": "npm run build").`);
|
|
115
|
+
}
|
|
56
116
|
ensureWithinProject(task);
|
|
57
117
|
if (!task.isTypescriptProject) {
|
|
58
118
|
if (!(0, node_fs_1.existsSync)(task.filePath)) {
|
|
@@ -72,4 +132,5 @@ async function validateAppTask(task) {
|
|
|
72
132
|
throw new Error(`[apps][validate] npm run validate failed for ${task.name}: ${message}`);
|
|
73
133
|
}
|
|
74
134
|
}
|
|
135
|
+
scanForLegacySdkSymbols(task);
|
|
75
136
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AssetTask, EmbeddedAssetTask } from '../catalogue';
|
|
2
|
+
type ModelAssetTask = AssetTask | EmbeddedAssetTask;
|
|
3
|
+
export declare function isGeneratedModel3DAssetTask(task: ModelAssetTask, format?: string): boolean;
|
|
4
|
+
export declare function assertGeneratedModel3DAssetRoles(task: ModelAssetTask, format?: string): void;
|
|
5
|
+
export declare function prepareModel3DAssetArtifacts(task: ModelAssetTask, options?: {
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
}): Promise<boolean>;
|
|
8
|
+
export {};
|