@playdrop/playdrop-cli 0.16.12 → 0.17.0
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/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +1 -2
- package/dist/apiClient.js +1 -16
- package/dist/appUrls.js +4 -0
- package/dist/apps/build.d.ts +12 -4
- package/dist/apps/build.js +55 -22
- package/dist/apps/index.d.ts +2 -1
- package/dist/apps/index.js +4 -1
- package/dist/apps/loadCheck.d.ts +5 -1
- package/dist/apps/loadCheck.js +52 -18
- package/dist/apps/serverBuild.d.ts +17 -0
- package/dist/apps/serverBuild.js +155 -0
- package/dist/apps/staticHtml.d.ts +1 -0
- package/dist/apps/staticHtml.js +19 -10
- package/dist/apps/upload.d.ts +12 -2
- package/dist/apps/upload.js +127 -46
- package/dist/catalogue.d.ts +23 -1
- package/dist/catalogue.js +126 -100
- package/dist/commandContext.d.ts +6 -3
- package/dist/commandContext.js +108 -18
- package/dist/commands/build.js +0 -7
- package/dist/commands/captureListing.d.ts +3 -0
- package/dist/commands/captureListing.js +48 -4
- package/dist/commands/chat.d.ts +4 -7
- package/dist/commands/chat.js +165 -77
- package/dist/commands/check.js +34 -1
- package/dist/commands/create.js +30 -263
- package/dist/commands/dev.js +37 -3
- package/dist/commands/devBrowser.js +2 -2
- package/dist/commands/devGameServer.d.ts +16 -0
- package/dist/commands/devGameServer.js +237 -0
- package/dist/commands/devRuntimeAssets.d.ts +1 -0
- package/dist/commands/devRuntimeAssets.js +2 -0
- package/dist/commands/devServer.d.ts +3 -0
- package/dist/commands/devServer.js +111 -5
- package/dist/commands/generation.d.ts +33 -4
- package/dist/commands/generation.js +304 -115
- package/dist/commands/login.js +23 -7
- package/dist/commands/review.d.ts +1 -1
- package/dist/commands/review.js +68 -95
- package/dist/commands/source.d.ts +19 -0
- package/dist/commands/source.js +142 -0
- package/dist/commands/tweaks.js +5 -11
- package/dist/commands/upload-content.d.ts +1 -1
- package/dist/commands/upload-content.js +16 -12
- package/dist/commands/upload.d.ts +17 -1
- package/dist/commands/upload.js +47 -10
- package/dist/commands/worker/archive-staging.d.ts +1 -0
- package/dist/commands/worker/archive-staging.js +13 -2
- package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
- package/dist/commands/worker/e2e-fixtures.js +466 -0
- package/dist/commands/worker/game-server-infra.d.ts +80 -0
- package/dist/commands/worker/game-server-infra.js +595 -0
- package/dist/commands/worker/game-source-git.d.ts +126 -0
- package/dist/commands/worker/game-source-git.js +780 -0
- package/dist/commands/worker/generation.d.ts +94 -0
- package/dist/commands/worker/generation.js +1458 -0
- package/dist/commands/worker/provider-telemetry.js +1 -1
- package/dist/commands/worker/runtime.d.ts +8 -10
- package/dist/commands/worker/runtime.js +53 -48
- package/dist/commands/worker.d.ts +79 -19
- package/dist/commands/worker.js +1796 -419
- package/dist/config.d.ts +2 -0
- package/dist/config.js +16 -3
- package/dist/environment.d.ts +0 -1
- package/dist/environment.js +0 -8
- package/dist/index.js +92 -22
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +15 -2
- package/node_modules/@playdrop/api-client/dist/client.d.ts +143 -39
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +33 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +152 -21
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.js +477 -100
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +81 -30
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +217 -56
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
- package/node_modules/@playdrop/api-client/package.json +7 -0
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
- package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
- package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@playdrop/game-source-git/package.json +28 -0
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
- package/node_modules/@playdrop/types/dist/api.d.ts +730 -166
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +65 -18
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
- package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.js +26 -26
- package/node_modules/@playdrop/types/dist/chat.d.ts +273 -31
- package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.js +38 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
- package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/index.js +7 -1
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
- package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
- package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
- package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +111 -0
- package/node_modules/@playdrop/types/package.json +14 -0
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/node_modules/@playdrop/vox-three/package.json +8 -4
- package/package.json +9 -11
- package/dist/assets/model-artifacts.d.ts +0 -8
- package/dist/assets/model-artifacts.js +0 -382
- package/dist/assets/model-worker.d.ts +0 -22
- package/dist/assets/model-worker.js +0 -123
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
- package/node_modules/@playdrop/ai-client/package.json +0 -22
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
- package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
- package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/package.json +0 -19
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/package.json +0 -28
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PLAYDROP_E2E_MARKERS = void 0;
|
|
40
|
+
exports.detectPlaydropE2EFixture = detectPlaydropE2EFixture;
|
|
41
|
+
exports.isPlaydropE2EGameKind = isPlaydropE2EGameKind;
|
|
42
|
+
exports.isPlaydropE2EMediaKind = isPlaydropE2EMediaKind;
|
|
43
|
+
exports.buildPlaydropE2EScreeningOutput = buildPlaydropE2EScreeningOutput;
|
|
44
|
+
exports.writePlaydropE2EPng = writePlaydropE2EPng;
|
|
45
|
+
exports.validatePlaydropE2EGameFixture = validatePlaydropE2EGameFixture;
|
|
46
|
+
exports.replaceWithPlaydropE2EGameFixture = replaceWithPlaydropE2EGameFixture;
|
|
47
|
+
exports.buildPlaydropE2EMetadata = buildPlaydropE2EMetadata;
|
|
48
|
+
exports.buildPlaydropE2ETriangleGlb = buildPlaydropE2ETriangleGlb;
|
|
49
|
+
const node_fs_1 = require("node:fs");
|
|
50
|
+
const promises_1 = require("node:fs/promises");
|
|
51
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
52
|
+
exports.PLAYDROP_E2E_MARKERS = {
|
|
53
|
+
NEW_GAME: "[PLAYDROP-E2E:NEW:v1]",
|
|
54
|
+
GAME_UPDATE: "[PLAYDROP-E2E:UPDATE:v1]",
|
|
55
|
+
REMIX_GAME: "[PLAYDROP-E2E:REMIX:v1]",
|
|
56
|
+
IMAGE: "[PLAYDROP-E2E:IMAGE:v1]",
|
|
57
|
+
MODEL_3D: "[PLAYDROP-E2E:MODEL_3D:v1]",
|
|
58
|
+
VIDEO: "[PLAYDROP-E2E:VIDEO:v1]",
|
|
59
|
+
SFX: "[PLAYDROP-E2E:SFX:v1]",
|
|
60
|
+
SPEECH: "[PLAYDROP-E2E:SPEECH:v1]",
|
|
61
|
+
MUSIC: "[PLAYDROP-E2E:MUSIC:v1]",
|
|
62
|
+
};
|
|
63
|
+
const PLAYDROP_E2E_MARKER_ENTRIES = Object.entries(exports.PLAYDROP_E2E_MARKERS);
|
|
64
|
+
function detectPlaydropE2EFixture(input) {
|
|
65
|
+
const matches = PLAYDROP_E2E_MARKER_ENTRIES.filter(([, marker]) => input.includes(marker));
|
|
66
|
+
if (matches.length > 1) {
|
|
67
|
+
throw new Error(`playdrop_e2e_marker_ambiguous:${matches.map(([, marker]) => marker).join(",")}`);
|
|
68
|
+
}
|
|
69
|
+
return matches[0]?.[0] ?? null;
|
|
70
|
+
}
|
|
71
|
+
function isPlaydropE2EGameKind(kind) {
|
|
72
|
+
return kind === "NEW_GAME" || kind === "GAME_UPDATE" || kind === "REMIX_GAME";
|
|
73
|
+
}
|
|
74
|
+
function isPlaydropE2EMediaKind(kind) {
|
|
75
|
+
return kind === "IMAGE" || kind === "MODEL_3D" || kind === "VIDEO" || kind === "SFX" || kind === "SPEECH" || kind === "MUSIC";
|
|
76
|
+
}
|
|
77
|
+
function buildPlaydropE2EScreeningOutput(prompt) {
|
|
78
|
+
return {
|
|
79
|
+
promptLanguage: "en",
|
|
80
|
+
promptEnglishTranslation: prompt,
|
|
81
|
+
decision: "proceed",
|
|
82
|
+
effort: "simple",
|
|
83
|
+
rejectCategory: null,
|
|
84
|
+
flags: [],
|
|
85
|
+
reason: null,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function escapeHtml(value) {
|
|
89
|
+
return value
|
|
90
|
+
.replace(/&/gu, "&")
|
|
91
|
+
.replace(/</gu, "<")
|
|
92
|
+
.replace(/>/gu, ">")
|
|
93
|
+
.replace(/"/gu, """)
|
|
94
|
+
.replace(/'/gu, "'");
|
|
95
|
+
}
|
|
96
|
+
async function writePlaydropE2EPng(input) {
|
|
97
|
+
const sharp = (await Promise.resolve().then(() => __importStar(require("sharp")))).default;
|
|
98
|
+
const fontSize = Math.max(28, Math.round(Math.min(input.width, input.height) * 0.08));
|
|
99
|
+
const svg = Buffer.from(`
|
|
100
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${input.width}" height="${input.height}" viewBox="0 0 ${input.width} ${input.height}">
|
|
101
|
+
<defs>
|
|
102
|
+
<linearGradient id="background" x1="0" y1="0" x2="1" y2="1">
|
|
103
|
+
<stop offset="0" stop-color="#7138ff"/>
|
|
104
|
+
<stop offset="1" stop-color="#171027"/>
|
|
105
|
+
</linearGradient>
|
|
106
|
+
</defs>
|
|
107
|
+
<rect width="100%" height="100%" fill="url(#background)"/>
|
|
108
|
+
<circle cx="${Math.round(input.width * 0.76)}" cy="${Math.round(input.height * 0.24)}" r="${Math.round(Math.min(input.width, input.height) * 0.14)}" fill="#ffcc33"/>
|
|
109
|
+
<rect x="${Math.round(input.width * 0.1)}" y="${Math.round(input.height * 0.42)}" width="${Math.round(input.width * 0.8)}" height="${Math.round(input.height * 0.28)}" rx="${Math.round(Math.min(input.width, input.height) * 0.04)}" fill="#241944" fill-opacity="0.9"/>
|
|
110
|
+
<text x="50%" y="56%" dominant-baseline="middle" text-anchor="middle" fill="white" font-family="system-ui, sans-serif" font-size="${fontSize}" font-weight="800">${escapeHtml(input.label)}</text>
|
|
111
|
+
<text x="50%" y="64%" dominant-baseline="middle" text-anchor="middle" fill="#d8cff5" font-family="system-ui, sans-serif" font-size="${Math.max(18, Math.round(fontSize * 0.42))}">Deterministic fixture v1</text>
|
|
112
|
+
</svg>
|
|
113
|
+
`);
|
|
114
|
+
await sharp(svg).png().toFile(input.filePath);
|
|
115
|
+
}
|
|
116
|
+
function buildGameHtml(input) {
|
|
117
|
+
const displayName = escapeHtml(input.displayName);
|
|
118
|
+
const kind = escapeHtml(input.kind);
|
|
119
|
+
return `<!doctype html>
|
|
120
|
+
<html lang="en">
|
|
121
|
+
<head>
|
|
122
|
+
<meta charset="utf-8" />
|
|
123
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
124
|
+
<meta name="playdrop-e2e-fixture" content="v1" />
|
|
125
|
+
<title>${displayName}</title>
|
|
126
|
+
<style>
|
|
127
|
+
:root { color-scheme: dark; font-family: ui-rounded, system-ui, sans-serif; }
|
|
128
|
+
* { box-sizing: border-box; }
|
|
129
|
+
html, body { margin: 0; min-height: 100%; }
|
|
130
|
+
body { display: grid; place-items: center; background: radial-gradient(circle at top, #7138ff, #151026 65%); color: white; }
|
|
131
|
+
main { width: min(92vw, 560px); padding: 40px; border: 2px solid #bda8ff; border-radius: 28px; background: #21183dcc; text-align: center; box-shadow: 0 24px 80px #080411aa; }
|
|
132
|
+
body[data-scored="true"] { background: radial-gradient(circle at bottom, #ffcc33, #361a70 70%); }
|
|
133
|
+
body[data-scored="true"] main { border-color: #ffcc33; background: #4b258d; transform: scale(1.04); }
|
|
134
|
+
h1 { margin: 0 0 8px; font-size: clamp(2rem, 8vw, 4rem); }
|
|
135
|
+
p { color: #d8cff5; }
|
|
136
|
+
#score { display: block; margin: 28px 0; font-size: 5rem; font-weight: 900; }
|
|
137
|
+
button { min-width: 180px; padding: 16px 24px; border: 0; border-radius: 999px; background: #ffcc33; color: #211000; font: inherit; font-weight: 800; cursor: pointer; }
|
|
138
|
+
small { display: block; margin-top: 24px; color: #a89bc9; }
|
|
139
|
+
</style>
|
|
140
|
+
</head>
|
|
141
|
+
<body>
|
|
142
|
+
<main>
|
|
143
|
+
<h1>${displayName}</h1>
|
|
144
|
+
<p>Deterministic PlayDrop Cloud worker fixture</p>
|
|
145
|
+
<output id="score">0</output>
|
|
146
|
+
<button id="add" type="button">Score a point</button>
|
|
147
|
+
<small>Task ${input.taskId} · ${kind}</small>
|
|
148
|
+
</main>
|
|
149
|
+
<script src="https://assets.playdrop.ai/sdk/playdrop.js"></script>
|
|
150
|
+
<script>
|
|
151
|
+
const score = document.querySelector("#score");
|
|
152
|
+
window.addEventListener("pointerdown", () => {
|
|
153
|
+
score.textContent = String(Number(score.textContent) + 1);
|
|
154
|
+
document.body.dataset.scored = "true";
|
|
155
|
+
});
|
|
156
|
+
void (async () => {
|
|
157
|
+
const sdk = await window.playdrop.init();
|
|
158
|
+
sdk.host.ready();
|
|
159
|
+
})().catch((error) => {
|
|
160
|
+
window.playdrop?.host?.error(String(error));
|
|
161
|
+
throw error;
|
|
162
|
+
});
|
|
163
|
+
</script>
|
|
164
|
+
</body>
|
|
165
|
+
</html>
|
|
166
|
+
`;
|
|
167
|
+
}
|
|
168
|
+
const PLAYDROP_E2E_PROCEDURAL_ASSET_NAME = "playdrop-e2e-procedural";
|
|
169
|
+
function buildPlaydropE2EProceduralManifest() {
|
|
170
|
+
return {
|
|
171
|
+
manifestProtocol: "playdrop-procedural-manifest@1",
|
|
172
|
+
protocol: "playdrop-procedural@1",
|
|
173
|
+
id: PLAYDROP_E2E_PROCEDURAL_ASSET_NAME,
|
|
174
|
+
title: "PlayDrop E2E Procedural Beacon",
|
|
175
|
+
version: "1.0.0",
|
|
176
|
+
kind: "model",
|
|
177
|
+
summary: "A deterministic procedural Three.js beacon created by the PlayDrop Cloud worker update fixture.",
|
|
178
|
+
tags: ["playdrop", "e2e", "procedural"],
|
|
179
|
+
pack: {
|
|
180
|
+
id: "playdrop-e2e-fixtures",
|
|
181
|
+
title: "PlayDrop E2E Fixtures",
|
|
182
|
+
sourceProject: ".",
|
|
183
|
+
},
|
|
184
|
+
sourceEntry: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.ts`,
|
|
185
|
+
distFile: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.mjs`,
|
|
186
|
+
requirements: { renderer: "webgl", three: "0.183.2" },
|
|
187
|
+
presentation: {
|
|
188
|
+
scene: "dark",
|
|
189
|
+
camera: { view: "perspective", azimuth: -32, elevation: 18, padding: 1.25 },
|
|
190
|
+
},
|
|
191
|
+
platformAssetRef: null,
|
|
192
|
+
parameters: {
|
|
193
|
+
color: {
|
|
194
|
+
type: "color",
|
|
195
|
+
label: "Beacon color",
|
|
196
|
+
default: "#7138ff",
|
|
197
|
+
affects: "material",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
animations: [],
|
|
201
|
+
parts: ["beacon"],
|
|
202
|
+
sockets: [],
|
|
203
|
+
capabilities: { controls: true, selection: true, timeline: false, character: false },
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function buildPlaydropE2EProceduralModule() {
|
|
207
|
+
return `import * as THREE from "three";
|
|
208
|
+
|
|
209
|
+
export const info = {
|
|
210
|
+
protocol: "playdrop-procedural@1",
|
|
211
|
+
id: "${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}",
|
|
212
|
+
title: "PlayDrop E2E Procedural Beacon",
|
|
213
|
+
version: "1.0.0",
|
|
214
|
+
kind: "model",
|
|
215
|
+
summary: "A deterministic procedural Three.js beacon created by the PlayDrop Cloud worker update fixture.",
|
|
216
|
+
tags: ["playdrop", "e2e", "procedural"],
|
|
217
|
+
pack: { id: "playdrop-e2e-fixtures", title: "PlayDrop E2E Fixtures", sourceProject: "." },
|
|
218
|
+
sourceEntry: "assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.ts",
|
|
219
|
+
distFile: "assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.mjs",
|
|
220
|
+
requirements: { renderer: "webgl", three: "0.183.2" }
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export function create(context = {}) {
|
|
224
|
+
const color = context.parameters?.color ?? "#7138ff";
|
|
225
|
+
const root = new THREE.Group();
|
|
226
|
+
root.name = "playdrop-e2e-procedural-beacon";
|
|
227
|
+
const geometry = new THREE.TorusKnotGeometry(0.72, 0.2, 128, 20);
|
|
228
|
+
const material = new THREE.MeshStandardMaterial({ color, metalness: 0.35, roughness: 0.28 });
|
|
229
|
+
const beacon = new THREE.Mesh(geometry, material);
|
|
230
|
+
beacon.name = "beacon";
|
|
231
|
+
beacon.castShadow = true;
|
|
232
|
+
beacon.receiveShadow = true;
|
|
233
|
+
root.add(beacon);
|
|
234
|
+
return {
|
|
235
|
+
object: root,
|
|
236
|
+
capabilities: {
|
|
237
|
+
controls: {
|
|
238
|
+
parameters: {
|
|
239
|
+
color: { type: "color", label: "Beacon color", default: "#7138ff", affects: "material" }
|
|
240
|
+
},
|
|
241
|
+
values: () => ({ color: "#" + material.color.getHexString() }),
|
|
242
|
+
configure: (values) => {
|
|
243
|
+
if (typeof values.color === "string") material.color.set(values.color);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
selection: { parts: { beacon }, sockets: {} }
|
|
247
|
+
},
|
|
248
|
+
update: (_deltaSeconds, elapsedSeconds) => { beacon.rotation.y = elapsedSeconds * 0.45; },
|
|
249
|
+
dispose: () => { geometry.dispose(); material.dispose(); }
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
`;
|
|
253
|
+
}
|
|
254
|
+
async function writePlaydropE2EProceduralAsset(projectDir) {
|
|
255
|
+
const JSZip = (await Promise.resolve().then(() => __importStar(require("jszip")))).default;
|
|
256
|
+
const assetDir = node_path_1.default.join(projectDir, "assets");
|
|
257
|
+
await (0, promises_1.mkdir)(assetDir, { recursive: true });
|
|
258
|
+
const source = buildPlaydropE2EProceduralModule();
|
|
259
|
+
const archive = new JSZip();
|
|
260
|
+
archive.file(`assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.ts`, source, {
|
|
261
|
+
date: new Date("1980-01-01T00:00:00.000Z"),
|
|
262
|
+
createFolders: true,
|
|
263
|
+
});
|
|
264
|
+
archive.file("README.md", "# PlayDrop E2E procedural fixture\n", {
|
|
265
|
+
date: new Date("1980-01-01T00:00:00.000Z"),
|
|
266
|
+
});
|
|
267
|
+
const sourceZip = await archive.generateAsync({
|
|
268
|
+
type: "nodebuffer",
|
|
269
|
+
compression: "DEFLATE",
|
|
270
|
+
compressionOptions: { level: 9 },
|
|
271
|
+
});
|
|
272
|
+
await Promise.all([
|
|
273
|
+
(0, promises_1.writeFile)(node_path_1.default.join(assetDir, `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.mjs`), source, "utf8"),
|
|
274
|
+
(0, promises_1.writeFile)(node_path_1.default.join(assetDir, `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.manifest.json`), `${JSON.stringify(buildPlaydropE2EProceduralManifest(), null, 2)}\n`, "utf8"),
|
|
275
|
+
writePlaydropE2EPng({
|
|
276
|
+
filePath: node_path_1.default.join(assetDir, `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.png`),
|
|
277
|
+
width: 768,
|
|
278
|
+
height: 768,
|
|
279
|
+
label: "PROCEDURAL 3D",
|
|
280
|
+
}),
|
|
281
|
+
(0, promises_1.writeFile)(node_path_1.default.join(assetDir, `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}-source.zip`), sourceZip),
|
|
282
|
+
(0, promises_1.writeFile)(node_path_1.default.join(assetDir, `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.LICENSE.txt`), "CC0 1.0 Universal\n", "utf8"),
|
|
283
|
+
]);
|
|
284
|
+
}
|
|
285
|
+
async function validatePlaydropE2EGameFixture(input) {
|
|
286
|
+
const htmlPath = node_path_1.default.join(input.projectDir, "index.html");
|
|
287
|
+
const actualHtml = await (0, promises_1.readFile)(htmlPath, "utf8").catch(() => {
|
|
288
|
+
throw new Error("playdrop_e2e_fixture_html_missing");
|
|
289
|
+
});
|
|
290
|
+
const expectedHtml = buildGameHtml({
|
|
291
|
+
displayName: input.displayName,
|
|
292
|
+
taskId: input.taskId,
|
|
293
|
+
kind: input.kind,
|
|
294
|
+
});
|
|
295
|
+
if (actualHtml !== expectedHtml) {
|
|
296
|
+
throw new Error("playdrop_e2e_fixture_html_mismatch");
|
|
297
|
+
}
|
|
298
|
+
if (input.kind === "GAME_UPDATE") {
|
|
299
|
+
const manifestPath = node_path_1.default.join(input.projectDir, "assets", `${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.manifest.json`);
|
|
300
|
+
const manifest = JSON.parse(await (0, promises_1.readFile)(manifestPath, "utf8"));
|
|
301
|
+
if (manifest.id !== PLAYDROP_E2E_PROCEDURAL_ASSET_NAME || manifest.platformAssetRef !== null) {
|
|
302
|
+
throw new Error("playdrop_e2e_fixture_procedural_manifest_mismatch");
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
async function replaceWithPlaydropE2EGameFixture(input) {
|
|
307
|
+
if (!node_path_1.default.isAbsolute(input.projectDir) || !(0, node_fs_1.existsSync)(node_path_1.default.join(input.projectDir, ".git"))) {
|
|
308
|
+
throw new Error("playdrop_e2e_game_source_git_required");
|
|
309
|
+
}
|
|
310
|
+
for (const entry of await (0, promises_1.readdir)(input.projectDir, { withFileTypes: true })) {
|
|
311
|
+
if (entry.name === ".git")
|
|
312
|
+
continue;
|
|
313
|
+
await (0, promises_1.rm)(node_path_1.default.join(input.projectDir, entry.name), { recursive: true, force: true });
|
|
314
|
+
}
|
|
315
|
+
const listingDir = node_path_1.default.join(input.projectDir, "listing");
|
|
316
|
+
await (0, promises_1.mkdir)(listingDir, { recursive: true });
|
|
317
|
+
const playtestTape = {
|
|
318
|
+
version: 1,
|
|
319
|
+
primaryVerb: "tap",
|
|
320
|
+
durationMs: 2500,
|
|
321
|
+
startOnlyEventCount: 0,
|
|
322
|
+
successSignals: [
|
|
323
|
+
{
|
|
324
|
+
kind: "VISIBLE_PROGRESS",
|
|
325
|
+
description: "The visible score increases while an idle run remains unchanged.",
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
events: [{ type: "tap", atMs: 1000, x: 0.5, y: 0.5, durationMs: 100 }],
|
|
329
|
+
};
|
|
330
|
+
const catalogue = {
|
|
331
|
+
apps: [
|
|
332
|
+
{
|
|
333
|
+
name: input.appName,
|
|
334
|
+
version: input.outputVersion,
|
|
335
|
+
displayName: input.displayName,
|
|
336
|
+
subtitle: input.subtitle,
|
|
337
|
+
description: "A deterministic score-chasing game produced by the PlayDrop Cloud worker fixture, where players tap to earn points and verify every publishing, loading, and runtime integration.",
|
|
338
|
+
emoji: "test",
|
|
339
|
+
color: "#7138FF",
|
|
340
|
+
type: "GAME",
|
|
341
|
+
authMode: "NONE",
|
|
342
|
+
controllerMode: "UNSUPPORTED",
|
|
343
|
+
previewable: true,
|
|
344
|
+
file: "index.html",
|
|
345
|
+
primarySurface: input.primarySurface,
|
|
346
|
+
surfaceTargets: {
|
|
347
|
+
desktop: true,
|
|
348
|
+
mobileLandscape: true,
|
|
349
|
+
mobilePortrait: true,
|
|
350
|
+
},
|
|
351
|
+
listing: {
|
|
352
|
+
icon: "listing/icon.png",
|
|
353
|
+
heroPortrait: "listing/hero-portrait.png",
|
|
354
|
+
heroLandscape: "listing/hero-landscape.png",
|
|
355
|
+
},
|
|
356
|
+
playtestTapes: {
|
|
357
|
+
DESKTOP: playtestTape,
|
|
358
|
+
MOBILE_LANDSCAPE: playtestTape,
|
|
359
|
+
MOBILE_PORTRAIT: playtestTape,
|
|
360
|
+
},
|
|
361
|
+
releaseNotes: `Deterministic ${input.kind} E2E fixture.`,
|
|
362
|
+
hostingMode: "HOSTED",
|
|
363
|
+
// The fixture also serves as the deterministic source for the browser remix journey.
|
|
364
|
+
license: "PLAYDROP",
|
|
365
|
+
...(input.kind === "GAME_UPDATE"
|
|
366
|
+
? {
|
|
367
|
+
ownedAssets: [
|
|
368
|
+
{
|
|
369
|
+
name: PLAYDROP_E2E_PROCEDURAL_ASSET_NAME,
|
|
370
|
+
runtimeKey: "fixtureProceduralBeacon",
|
|
371
|
+
displayName: "PlayDrop E2E Procedural Beacon",
|
|
372
|
+
description: "A deterministic procedural Three.js asset produced during the update fixture.",
|
|
373
|
+
category: "MODEL_3D",
|
|
374
|
+
subcategory: "procedural",
|
|
375
|
+
format: "CUSTOM",
|
|
376
|
+
visibility: "PUBLIC",
|
|
377
|
+
license: "CC0",
|
|
378
|
+
files: {
|
|
379
|
+
primary: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.mjs`,
|
|
380
|
+
manifest: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.manifest.json`,
|
|
381
|
+
preview: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.png`,
|
|
382
|
+
source: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}-source.zip`,
|
|
383
|
+
license: `assets/${PLAYDROP_E2E_PROCEDURAL_ASSET_NAME}.LICENSE.txt`,
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
}
|
|
388
|
+
: {}),
|
|
389
|
+
...(input.kind === "REMIX_GAME" && input.remixSourceRef ? { remix: input.remixSourceRef } : {}),
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
};
|
|
393
|
+
await Promise.all([
|
|
394
|
+
(0, promises_1.writeFile)(node_path_1.default.join(input.projectDir, "catalogue.json"), `${JSON.stringify(catalogue, null, 2)}\n`, "utf8"),
|
|
395
|
+
(0, promises_1.writeFile)(node_path_1.default.join(input.projectDir, "index.html"), buildGameHtml({ displayName: input.displayName, taskId: input.taskId, kind: input.kind }), "utf8"),
|
|
396
|
+
writePlaydropE2EPng({
|
|
397
|
+
filePath: node_path_1.default.join(listingDir, "icon.png"),
|
|
398
|
+
width: 512,
|
|
399
|
+
height: 512,
|
|
400
|
+
label: "PLAYDROP E2E",
|
|
401
|
+
}),
|
|
402
|
+
writePlaydropE2EPng({
|
|
403
|
+
filePath: node_path_1.default.join(listingDir, "hero-portrait.png"),
|
|
404
|
+
width: 720,
|
|
405
|
+
height: 1280,
|
|
406
|
+
label: "PLAYDROP E2E GAME",
|
|
407
|
+
}),
|
|
408
|
+
writePlaydropE2EPng({
|
|
409
|
+
filePath: node_path_1.default.join(listingDir, "hero-landscape.png"),
|
|
410
|
+
width: 1280,
|
|
411
|
+
height: 720,
|
|
412
|
+
label: "PLAYDROP E2E GAME",
|
|
413
|
+
}),
|
|
414
|
+
...(input.kind === "GAME_UPDATE" ? [writePlaydropE2EProceduralAsset(input.projectDir)] : []),
|
|
415
|
+
]);
|
|
416
|
+
}
|
|
417
|
+
function buildPlaydropE2EMetadata(kind) {
|
|
418
|
+
const label = kind === "MODEL_3D" ? "3D Model" : kind[0] + kind.slice(1).toLowerCase();
|
|
419
|
+
return {
|
|
420
|
+
title: `PlayDrop E2E ${label}`,
|
|
421
|
+
description: `Deterministic ${label.toLowerCase()} generated by the PlayDrop Cloud worker E2E fixture.`,
|
|
422
|
+
tags: ["playdrop", "e2e", kind.toLowerCase()],
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function buildPlaydropE2ETriangleGlb() {
|
|
426
|
+
const positions = Buffer.alloc(36);
|
|
427
|
+
const vertices = [-0.8, -0.6, 0, 0.8, -0.6, 0, 0, 0.8, 0];
|
|
428
|
+
vertices.forEach((value, index) => positions.writeFloatLE(value, index * 4));
|
|
429
|
+
const indices = Buffer.alloc(8);
|
|
430
|
+
indices.writeUInt16LE(0, 0);
|
|
431
|
+
indices.writeUInt16LE(1, 2);
|
|
432
|
+
indices.writeUInt16LE(2, 4);
|
|
433
|
+
const binary = Buffer.concat([positions, indices]);
|
|
434
|
+
const json = {
|
|
435
|
+
asset: { version: "2.0", generator: "PlayDrop E2E Fixture v1" },
|
|
436
|
+
scene: 0,
|
|
437
|
+
scenes: [{ nodes: [0] }],
|
|
438
|
+
nodes: [{ mesh: 0 }],
|
|
439
|
+
meshes: [{ primitives: [{ attributes: { POSITION: 0 }, indices: 1, material: 0 }] }],
|
|
440
|
+
materials: [{ pbrMetallicRoughness: { baseColorFactor: [0.45, 0.22, 1, 1], metallicFactor: 0, roughnessFactor: 0.7 } }],
|
|
441
|
+
buffers: [{ byteLength: binary.length }],
|
|
442
|
+
bufferViews: [
|
|
443
|
+
{ buffer: 0, byteOffset: 0, byteLength: positions.length, target: 34962 },
|
|
444
|
+
{ buffer: 0, byteOffset: positions.length, byteLength: 6, target: 34963 },
|
|
445
|
+
],
|
|
446
|
+
accessors: [
|
|
447
|
+
{ bufferView: 0, componentType: 5126, count: 3, type: "VEC3", min: [-0.8, -0.6, 0], max: [0.8, 0.8, 0] },
|
|
448
|
+
{ bufferView: 1, componentType: 5123, count: 3, type: "SCALAR" },
|
|
449
|
+
],
|
|
450
|
+
};
|
|
451
|
+
const rawJson = Buffer.from(JSON.stringify(json), "utf8");
|
|
452
|
+
const paddedJson = Buffer.alloc(Math.ceil(rawJson.length / 4) * 4, 0x20);
|
|
453
|
+
rawJson.copy(paddedJson);
|
|
454
|
+
const output = Buffer.alloc(12 + 8 + paddedJson.length + 8 + binary.length);
|
|
455
|
+
output.write("glTF", 0, "ascii");
|
|
456
|
+
output.writeUInt32LE(2, 4);
|
|
457
|
+
output.writeUInt32LE(output.length, 8);
|
|
458
|
+
output.writeUInt32LE(paddedJson.length, 12);
|
|
459
|
+
output.writeUInt32LE(0x4e4f534a, 16);
|
|
460
|
+
paddedJson.copy(output, 20);
|
|
461
|
+
const binaryHeader = 20 + paddedJson.length;
|
|
462
|
+
output.writeUInt32LE(binary.length, binaryHeader);
|
|
463
|
+
output.writeUInt32LE(0x004e4942, binaryHeader + 4);
|
|
464
|
+
binary.copy(output, binaryHeader + 8);
|
|
465
|
+
return output;
|
|
466
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
export declare const WORKER_REDIS_VERSION = "7.4.5";
|
|
3
|
+
export declare const WORKER_MONGODB_VERSION = "8.0.26";
|
|
4
|
+
export declare const WORKER_REDIS_RUNTIME_COMMANDS: readonly ["+auth", "+select", "+ping", "+quit", "+info", "+client|setinfo", "+client|setname", "+publish", "+subscribe", "+unsubscribe", "+pubsub", "+get", "+set", "+setex", "+expire", "+del", "+exists", "+sadd", "+smembers", "+sismember", "+srem", "+scard", "+sinter", "+hset", "+hincrby", "+hget", "+hgetall", "+hdel", "+hlen", "+hexists", "+incr", "+decr", "+llen", "+rpush", "+lpush", "+rpop", "+lpop", "+brpop", "+multi", "+exec"];
|
|
5
|
+
export interface ManagedWorkerGameServerPaths {
|
|
6
|
+
root: string;
|
|
7
|
+
toolchainsRoot: string;
|
|
8
|
+
redisRoot: string;
|
|
9
|
+
redisBinary: string;
|
|
10
|
+
redisCliBinary: string;
|
|
11
|
+
mongoRoot: string;
|
|
12
|
+
mongodBinary: string;
|
|
13
|
+
credentialsPath: string;
|
|
14
|
+
redisConfigPath: string;
|
|
15
|
+
redisAclPath: string;
|
|
16
|
+
mongoConfigPath: string;
|
|
17
|
+
mongoKeyFilePath: string;
|
|
18
|
+
redisDataPath: string;
|
|
19
|
+
mongoDataPath: string;
|
|
20
|
+
logsPath: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ManagedWorkerGameServerInfrastructure {
|
|
23
|
+
redisAdminUrl: string;
|
|
24
|
+
mongoAdminUrl: string;
|
|
25
|
+
redisVersion: typeof WORKER_REDIS_VERSION;
|
|
26
|
+
mongoVersion: typeof WORKER_MONGODB_VERSION;
|
|
27
|
+
paths: ManagedWorkerGameServerPaths;
|
|
28
|
+
}
|
|
29
|
+
export interface WorkerGameServerDevLease {
|
|
30
|
+
scope: string;
|
|
31
|
+
redisNamespace: string;
|
|
32
|
+
redisUrl: string;
|
|
33
|
+
mongoUrl: string;
|
|
34
|
+
cleanup(): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export declare function resolveManagedWorkerGameServerPaths(workerHomeDir: string): ManagedWorkerGameServerPaths;
|
|
37
|
+
export declare function installManagedWorkerGameServerToolchains(input: {
|
|
38
|
+
workerHomeDir: string;
|
|
39
|
+
platform?: NodeJS.Platform;
|
|
40
|
+
architecture?: string;
|
|
41
|
+
}): Promise<ManagedWorkerGameServerPaths>;
|
|
42
|
+
export declare function writeManagedWorkerGameServerConfiguration(input: {
|
|
43
|
+
workerHomeDir: string;
|
|
44
|
+
}): ManagedWorkerGameServerInfrastructure;
|
|
45
|
+
export declare function buildManagedWorkerGameServerLaunchAgents(input: {
|
|
46
|
+
workerHomeDir: string;
|
|
47
|
+
}): Array<{
|
|
48
|
+
label: string;
|
|
49
|
+
plistPath: string;
|
|
50
|
+
contents: string;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function syncManagedWorkerGameServerLaunchAgents(definitions: ReturnType<typeof buildManagedWorkerGameServerLaunchAgents>, deps?: {
|
|
53
|
+
spawn: typeof spawnSync;
|
|
54
|
+
}): void;
|
|
55
|
+
export declare function setupManagedWorkerGameServerInfrastructure(input: {
|
|
56
|
+
workerHomeDir: string;
|
|
57
|
+
platform?: NodeJS.Platform;
|
|
58
|
+
architecture?: string;
|
|
59
|
+
startLaunchAgents?: boolean;
|
|
60
|
+
}): Promise<ManagedWorkerGameServerInfrastructure>;
|
|
61
|
+
export declare function probeManagedWorkerGameServerInfrastructure(input: {
|
|
62
|
+
redisAdminUrl: string;
|
|
63
|
+
mongoAdminUrl: string;
|
|
64
|
+
}): Promise<void>;
|
|
65
|
+
export declare function cleanupStaleWorkerGameServerDevResources(input: {
|
|
66
|
+
redisAdminUrl: string;
|
|
67
|
+
mongoAdminUrl: string;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
redisUsers: number;
|
|
70
|
+
redisKeys: number;
|
|
71
|
+
mongoDatabases: number;
|
|
72
|
+
}>;
|
|
73
|
+
export declare function provisionWorkerGameServerDevLease(input: {
|
|
74
|
+
taskId: number;
|
|
75
|
+
attempt: number;
|
|
76
|
+
environment: string;
|
|
77
|
+
redisAdminUrl: string;
|
|
78
|
+
mongoAdminUrl: string;
|
|
79
|
+
requireRedisAcl?: boolean;
|
|
80
|
+
}): Promise<WorkerGameServerDevLease>;
|