@playdrop/playdrop-cli 0.3.1-build.1 → 0.3.5-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 +60 -22
- package/config/client-meta.json +5 -5
- package/dist/apps/build.js +90 -114
- package/dist/apps/upload.js +35 -11
- 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 +10 -4
- package/dist/catalogue.js +272 -45
- package/dist/commandContext.d.ts +1 -0
- package/dist/commandContext.js +45 -15
- package/dist/commands/browse.d.ts +16 -0
- package/dist/commands/browse.js +370 -0
- package/dist/commands/build.js +12 -4
- package/dist/commands/capture.js +24 -24
- package/dist/commands/captureRemote.d.ts +11 -0
- package/dist/commands/captureRemote.js +90 -0
- package/dist/commands/comments.d.ts +14 -0
- package/dist/commands/comments.js +189 -0
- package/dist/commands/create.js +112 -72
- package/dist/commands/creations.d.ts +49 -0
- package/dist/commands/creations.js +657 -0
- package/dist/commands/credits.d.ts +10 -0
- package/dist/commands/credits.js +91 -0
- package/dist/commands/detail.d.ts +2 -2
- package/dist/commands/detail.js +148 -290
- package/dist/commands/dev.js +26 -24
- package/dist/commands/devServer.js +88 -9
- package/dist/commands/devShared.js +2 -2
- package/dist/commands/documentation.d.ts +4 -1
- package/dist/commands/documentation.js +79 -104
- package/dist/commands/feedback.d.ts +12 -9
- package/dist/commands/feedback.js +125 -257
- package/dist/commands/format.js +6 -13
- package/dist/commands/generation.d.ts +11 -0
- package/dist/commands/generation.js +329 -43
- package/dist/commands/gettingStarted.d.ts +1 -0
- package/dist/commands/gettingStarted.js +26 -0
- package/dist/commands/init.js +26 -24
- package/dist/commands/login.js +9 -8
- package/dist/commands/logout.js +2 -1
- package/dist/commands/notifications.d.ts +14 -0
- package/dist/commands/notifications.js +179 -0
- package/dist/commands/search.d.ts +13 -0
- package/dist/commands/search.js +198 -0
- package/dist/commands/upload.js +83 -35
- package/dist/commands/validate.js +15 -1
- package/dist/commands/versionsBrowse.d.ts +7 -0
- package/dist/commands/versionsBrowse.js +209 -0
- package/dist/commands/whoami.js +9 -8
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +52 -0
- package/dist/externalAssetPackValidation.d.ts +2 -0
- package/dist/externalAssetPackValidation.js +115 -0
- package/dist/http.js +1 -1
- package/dist/index.js +570 -629
- package/dist/messages.js +11 -11
- package/dist/output.d.ts +5 -0
- package/dist/output.js +45 -0
- package/dist/playwright.js +10 -2
- package/dist/refs.d.ts +18 -0
- package/dist/refs.js +105 -0
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +43 -16
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/ai-client/package.json +1 -0
- package/node_modules/@playdrop/api-client/dist/client.d.ts +77 -43
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +379 -1574
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +9 -0
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/core/errors.js +46 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +27 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/core/request.js +122 -0
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +75 -0
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +282 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +22 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +15 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +60 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +301 -0
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +59 -0
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +297 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +62 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +297 -0
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +28 -0
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/auth.js +78 -0
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +29 -0
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/comments.js +65 -0
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +24 -0
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/me.js +35 -0
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +37 -0
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +148 -0
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +27 -0
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/search.js +65 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +59 -60
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +142 -53
- package/node_modules/@playdrop/api-client/package.json +3 -2
- 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 +3 -3
- 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 +6 -6
- 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 +3 -3
- 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 +3 -3
- 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 +5 -4
- package/node_modules/@playdrop/config/client-meta.json +5 -5
- package/node_modules/@playdrop/config/dist/src/constants.d.ts +5 -0
- package/node_modules/@playdrop/config/dist/src/constants.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/constants.js +5 -1
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +326 -62
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +56 -0
- package/node_modules/@playdrop/types/dist/app.d.ts +0 -14
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app.js +0 -10
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +12 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +85 -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 +27 -26
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.d.ts +5 -0
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/package.json +11 -9
- package/bin/playdrop-cli +0 -2
- package/dist/commands/asset-packs.d.ts +0 -27
- package/dist/commands/asset-packs.js +0 -508
- package/dist/commands/assets.d.ts +0 -35
- package/dist/commands/assets.js +0 -668
- package/dist/commands/list.d.ts +0 -7
- package/dist/commands/list.js +0 -347
- package/dist/commands/migrateCatalogueV2.d.ts +0 -1
- package/dist/commands/migrateCatalogueV2.js +0 -142
- package/dist/commands/versions.d.ts +0 -17
- package/dist/commands/versions.js +0 -384
- 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
|
@@ -1,24 +1,62 @@
|
|
|
1
1
|
# @playdrop/playdrop-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
Command-line interface for creators and AI agents using Playdrop.
|
|
4
|
+
|
|
5
|
+
## Main Commands
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
playdrop auth login
|
|
9
|
+
playdrop browse
|
|
10
|
+
playdrop search "city builder"
|
|
11
|
+
playdrop detail playdrop/app/hangingout
|
|
12
|
+
playdrop comments browse playdrop/app/hangingout
|
|
13
|
+
playdrop versions browse playdrop/app/hangingout
|
|
14
|
+
playdrop credits balance
|
|
15
|
+
playdrop notifications browse
|
|
16
|
+
playdrop creations browse
|
|
17
|
+
playdrop ai create image "Pixel art hero portrait"
|
|
18
|
+
playdrop project init .
|
|
19
|
+
playdrop project create app my-app --template playdrop/template/html_template
|
|
20
|
+
playdrop project dev my-app
|
|
21
|
+
playdrop project publish .
|
|
22
|
+
playdrop documentation browse
|
|
23
|
+
playdrop feedback send --title "Bug report" --comment "Details here."
|
|
24
|
+
playdrop getting-started
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Ref Format
|
|
28
|
+
|
|
29
|
+
Public content refs are always:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
<creator>/<kind>/<name>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Valid kinds:
|
|
36
|
+
|
|
37
|
+
- `app`
|
|
38
|
+
- `asset`
|
|
39
|
+
- `asset-pack`
|
|
40
|
+
|
|
41
|
+
Examples:
|
|
42
|
+
|
|
43
|
+
- `playdrop/app/hangingout`
|
|
44
|
+
- `playdrop/asset/astro`
|
|
45
|
+
- `playdrop/asset-pack/starter-kit`
|
|
46
|
+
|
|
47
|
+
## Local Project Flow
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
playdrop auth login
|
|
51
|
+
playdrop project init .
|
|
52
|
+
playdrop project create app my-app --template playdrop/template/html_template
|
|
53
|
+
playdrop project dev my-app
|
|
54
|
+
playdrop project publish .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
playdrop documentation browse
|
|
61
|
+
playdrop documentation read getting-started.md
|
|
62
|
+
```
|
package/config/client-meta.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.5",
|
|
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.5",
|
|
30
30
|
"minimumBuild": 1
|
|
31
31
|
},
|
|
32
32
|
"admin": {
|
|
33
|
-
"minimumVersion": "0.3.
|
|
33
|
+
"minimumVersion": "0.3.5",
|
|
34
34
|
"minimumBuild": 1
|
|
35
35
|
},
|
|
36
36
|
"apple": {
|
|
37
|
-
"minimumVersion": "0.3.
|
|
37
|
+
"minimumVersion": "0.3.5",
|
|
38
38
|
"minimumBuild": 1
|
|
39
39
|
},
|
|
40
40
|
"cli": {
|
|
41
|
-
"minimumVersion": "0.3.
|
|
41
|
+
"minimumVersion": "0.3.5",
|
|
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
|
}
|
|
@@ -25,6 +47,10 @@ async function uploadApp(client, task, artifacts, options) {
|
|
|
25
47
|
* Upload an app version using the versioned API.
|
|
26
48
|
*/
|
|
27
49
|
async function uploadAppVersion(client, task, artifacts, options) {
|
|
50
|
+
const creatorUsername = typeof options?.creatorUsername === 'string' ? options.creatorUsername.trim() : '';
|
|
51
|
+
if (!creatorUsername) {
|
|
52
|
+
throw new Error(`Missing creator username for app "${task.name}" upload.`);
|
|
53
|
+
}
|
|
28
54
|
const versionOptions = {
|
|
29
55
|
version: task.version,
|
|
30
56
|
releaseNotes: task.releaseNotes,
|
|
@@ -37,8 +63,6 @@ async function uploadAppVersion(client, task, artifacts, options) {
|
|
|
37
63
|
type: task.type,
|
|
38
64
|
emoji: task.emoji ?? undefined,
|
|
39
65
|
color: task.color ?? undefined,
|
|
40
|
-
// Admin-only: publish as different user
|
|
41
|
-
creatorUsername: options?.creatorUsername,
|
|
42
66
|
};
|
|
43
67
|
// For EXTERNAL hosting mode, use externalUrl instead of bundle
|
|
44
68
|
if (task.hostingMode === 'EXTERNAL') {
|
|
@@ -61,29 +85,29 @@ async function uploadAppVersion(client, task, artifacts, options) {
|
|
|
61
85
|
// Add listing assets if provided
|
|
62
86
|
if (task.listing) {
|
|
63
87
|
if (task.listing.iconPath) {
|
|
64
|
-
versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png');
|
|
88
|
+
versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png', isPngSignature);
|
|
65
89
|
}
|
|
66
90
|
if (task.listing.heroPortraitPath) {
|
|
67
|
-
versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png');
|
|
91
|
+
versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png', isPngSignature);
|
|
68
92
|
}
|
|
69
93
|
if (task.listing.heroLandscapePath) {
|
|
70
|
-
versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png');
|
|
94
|
+
versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png', isPngSignature);
|
|
71
95
|
}
|
|
72
96
|
if (task.listing.screenshotPortraitPaths.length > 0) {
|
|
73
|
-
versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png'));
|
|
97
|
+
versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
|
|
74
98
|
}
|
|
75
99
|
if (task.listing.screenshotLandscapePaths.length > 0) {
|
|
76
|
-
versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png'));
|
|
100
|
+
versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
|
|
77
101
|
}
|
|
78
102
|
if (task.listing.videoPortraitPaths.length > 0) {
|
|
79
|
-
versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4'));
|
|
103
|
+
versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
|
|
80
104
|
}
|
|
81
105
|
if (task.listing.videoLandscapePaths.length > 0) {
|
|
82
|
-
versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4'));
|
|
106
|
+
versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
|
|
83
107
|
}
|
|
84
108
|
}
|
|
85
109
|
try {
|
|
86
|
-
const response = await client.uploadAppVersion(task.name, versionOptions);
|
|
110
|
+
const response = await client.uploadAppVersion(creatorUsername, task.name, versionOptions);
|
|
87
111
|
return {
|
|
88
112
|
versionCreated: true,
|
|
89
113
|
version: response?.version?.version,
|
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 {};
|