@playdrop/playdrop-cli 0.16.5 → 0.16.12
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/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- 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 +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/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 +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/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 +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/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 +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- 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/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiClient } from
|
|
2
|
-
import { type AppResponse } from
|
|
3
|
-
import type { AppTask } from
|
|
1
|
+
import type { ApiClient } from "@playdrop/api-client";
|
|
2
|
+
import { type AppResponse } from "@playdrop/types";
|
|
3
|
+
import type { AppTask } from "../catalogue";
|
|
4
4
|
export declare function fetchRegisteredAppShell(client: ApiClient, creatorUsername: string, appName: string): Promise<AppResponse | null>;
|
|
5
5
|
export declare function ensureRegisteredHostedAppShell(input: {
|
|
6
6
|
client: ApiClient;
|
|
@@ -4,7 +4,7 @@ exports.fetchRegisteredAppShell = fetchRegisteredAppShell;
|
|
|
4
4
|
exports.ensureRegisteredHostedAppShell = ensureRegisteredHostedAppShell;
|
|
5
5
|
const types_1 = require("@playdrop/types");
|
|
6
6
|
function resolveRegistrationDisplayName(task) {
|
|
7
|
-
const displayName = typeof task.displayName ===
|
|
7
|
+
const displayName = typeof task.displayName === "string" ? task.displayName.trim() : "";
|
|
8
8
|
return displayName || task.name;
|
|
9
9
|
}
|
|
10
10
|
async function fetchRegisteredAppShell(client, creatorUsername, appName) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AppSurface } from
|
|
2
|
-
import type { AppTask } from
|
|
3
|
-
import { type AppBuildArtifacts } from
|
|
1
|
+
import type { AppSurface } from "@playdrop/types";
|
|
2
|
+
import type { AppTask } from "../catalogue";
|
|
3
|
+
import { type AppBuildArtifacts } from "./build";
|
|
4
4
|
export type StaticHtmlMetadata = {
|
|
5
5
|
title: string;
|
|
6
6
|
description: string | null;
|
package/dist/apps/staticHtml.js
CHANGED
|
@@ -11,8 +11,8 @@ const node_os_1 = require("node:os");
|
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
12
|
const parse5_1 = require("parse5");
|
|
13
13
|
const build_1 = require("./build");
|
|
14
|
-
const STATIC_GAME_SURFACES = [
|
|
15
|
-
const STATIC_SOURCE_EXCLUDES = [
|
|
14
|
+
const STATIC_GAME_SURFACES = ["DESKTOP", "MOBILE_LANDSCAPE", "MOBILE_PORTRAIT"];
|
|
15
|
+
const STATIC_SOURCE_EXCLUDES = ["AGENTS.md", "CLAUDE.md", ".playdrop/", "bin/playdrop"];
|
|
16
16
|
const STATIC_BUNDLE_EXCLUDES = [...STATIC_SOURCE_EXCLUDES];
|
|
17
17
|
function attribute(node, name) {
|
|
18
18
|
return node.attrs?.find((entry) => entry.name.toLowerCase() === name)?.value.trim() ?? null;
|
|
@@ -34,34 +34,33 @@ function findElement(node, tagName) {
|
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
function textContent(node) {
|
|
37
|
-
if (typeof node.value ===
|
|
37
|
+
if (typeof node.value === "string") {
|
|
38
38
|
return node.value;
|
|
39
39
|
}
|
|
40
|
-
return (node.childNodes ?? []).map(textContent).join(
|
|
40
|
+
return (node.childNodes ?? []).map(textContent).join("");
|
|
41
41
|
}
|
|
42
42
|
function isPngFile(filePath) {
|
|
43
43
|
const signature = (0, node_fs_1.readFileSync)(filePath).subarray(0, 8);
|
|
44
|
-
return signature.length === 8
|
|
45
|
-
&& signature.equals(Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]));
|
|
44
|
+
return signature.length === 8 && signature.equals(Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]));
|
|
46
45
|
}
|
|
47
46
|
function isInside(root, candidate) {
|
|
48
47
|
const rel = (0, node_path_1.relative)(root, candidate);
|
|
49
|
-
return rel ===
|
|
48
|
+
return rel === "" || (!rel.startsWith(`..${node_path_1.sep}`) && rel !== ".." && !(0, node_path_1.isAbsolute)(rel));
|
|
50
49
|
}
|
|
51
50
|
function localReferencePath(projectDir, rawReference, code) {
|
|
52
51
|
const reference = rawReference.trim();
|
|
53
|
-
if (!reference || reference.startsWith(
|
|
52
|
+
if (!reference || reference.startsWith("#") || reference.startsWith("data:") || reference.startsWith("blob:")) {
|
|
54
53
|
return null;
|
|
55
54
|
}
|
|
56
55
|
if (/^(?:https?:)?\/\//i.test(reference) || /^[a-z][a-z0-9+.-]*:/i.test(reference)) {
|
|
57
56
|
throw new Error(`${code}:remote_reference:${reference}`);
|
|
58
57
|
}
|
|
59
|
-
if (reference.startsWith(
|
|
58
|
+
if (reference.startsWith("/")) {
|
|
60
59
|
throw new Error(`${code}:root_reference:${reference}`);
|
|
61
60
|
}
|
|
62
61
|
let decoded;
|
|
63
62
|
try {
|
|
64
|
-
decoded = decodeURIComponent(reference.split(/[?#]/, 1)[0] ??
|
|
63
|
+
decoded = decodeURIComponent(reference.split(/[?#]/, 1)[0] ?? "");
|
|
65
64
|
}
|
|
66
65
|
catch {
|
|
67
66
|
throw new Error(`${code}:invalid_reference:${reference}`);
|
|
@@ -83,70 +82,69 @@ function validateHtmlRuntimeReferences(projectDir, document) {
|
|
|
83
82
|
const tag = node.tagName?.toLowerCase();
|
|
84
83
|
if (!tag)
|
|
85
84
|
return;
|
|
86
|
-
if (tag ===
|
|
87
|
-
throw new Error(
|
|
85
|
+
if (tag === "base") {
|
|
86
|
+
throw new Error("static_game_artifact_base_tag_unsupported");
|
|
88
87
|
}
|
|
89
|
-
const rel = attribute(node,
|
|
90
|
-
const reference = tag ===
|
|
91
|
-
? attribute(node,
|
|
92
|
-
: tag ===
|
|
93
|
-
? attribute(node,
|
|
94
|
-
: [
|
|
95
|
-
? attribute(node, tag ===
|
|
88
|
+
const rel = attribute(node, "rel")?.toLowerCase().split(/\s+/) ?? [];
|
|
89
|
+
const reference = tag === "script"
|
|
90
|
+
? attribute(node, "src")
|
|
91
|
+
: tag === "link" && (rel.includes("stylesheet") || rel.includes("icon") || rel.includes("preload"))
|
|
92
|
+
? attribute(node, "href")
|
|
93
|
+
: ["img", "audio", "video", "source", "track", "embed", "object", "iframe"].includes(tag)
|
|
94
|
+
? attribute(node, tag === "object" ? "data" : "src")
|
|
96
95
|
: null;
|
|
97
96
|
if (reference) {
|
|
98
|
-
localReferencePath(projectDir, reference,
|
|
97
|
+
localReferencePath(projectDir, reference, "static_game_artifact_invalid_local_path");
|
|
99
98
|
}
|
|
100
|
-
const srcset = tag ===
|
|
101
|
-
for (const candidate of srcset?.split(
|
|
99
|
+
const srcset = tag === "img" || tag === "source" ? attribute(node, "srcset") : null;
|
|
100
|
+
for (const candidate of srcset?.split(",") ?? []) {
|
|
102
101
|
const referenceValue = candidate.trim().split(/\s+/, 1)[0];
|
|
103
102
|
if (referenceValue) {
|
|
104
|
-
localReferencePath(projectDir, referenceValue,
|
|
103
|
+
localReferencePath(projectDir, referenceValue, "static_game_artifact_invalid_local_path");
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
}
|
|
109
|
-
function parseStaticHtmlProject(projectDir, entryPoint =
|
|
108
|
+
function parseStaticHtmlProject(projectDir, entryPoint = "index.html") {
|
|
110
109
|
const root = (0, node_path_1.resolve)(projectDir);
|
|
111
110
|
const entryPath = (0, node_path_1.resolve)(root, entryPoint);
|
|
112
|
-
if (!isInside(root, entryPath) || (0, node_path_1.basename)(entryPath).toLowerCase() !==
|
|
113
|
-
throw new Error(
|
|
111
|
+
if (!isInside(root, entryPath) || (0, node_path_1.basename)(entryPath).toLowerCase() !== "index.html") {
|
|
112
|
+
throw new Error("static_game_artifact_invalid_entry_point");
|
|
114
113
|
}
|
|
115
114
|
if (!(0, node_fs_1.existsSync)(entryPath) || !(0, node_fs_1.statSync)(entryPath).isFile()) {
|
|
116
|
-
throw new Error(
|
|
115
|
+
throw new Error("static_game_artifact_index_missing");
|
|
117
116
|
}
|
|
118
|
-
const html = (0, node_fs_1.readFileSync)(entryPath,
|
|
119
|
-
if (html.includes(
|
|
120
|
-
throw new Error(
|
|
117
|
+
const html = (0, node_fs_1.readFileSync)(entryPath, "utf8");
|
|
118
|
+
if (html.includes("data-playdrop-static-sdk") || html.includes("data-playdrop-static-bootstrap")) {
|
|
119
|
+
throw new Error("static_game_artifact_injected_sdk_already_present");
|
|
121
120
|
}
|
|
122
121
|
const document = (0, parse5_1.parse)(html, { sourceCodeLocationInfo: true });
|
|
123
|
-
const head = findElement(document,
|
|
124
|
-
const body = findElement(document,
|
|
122
|
+
const head = findElement(document, "head");
|
|
123
|
+
const body = findElement(document, "body");
|
|
125
124
|
if (!head) {
|
|
126
|
-
throw new Error(
|
|
125
|
+
throw new Error("static_game_artifact_head_missing");
|
|
127
126
|
}
|
|
128
127
|
const titles = [];
|
|
129
128
|
const metas = [];
|
|
130
129
|
let headEndOffset = null;
|
|
131
130
|
walk(head, (node) => {
|
|
132
|
-
if (node.tagName ===
|
|
131
|
+
if (node.tagName === "title")
|
|
133
132
|
titles.push(node);
|
|
134
|
-
if (node.tagName ===
|
|
133
|
+
if (node.tagName === "meta")
|
|
135
134
|
metas.push(node);
|
|
136
|
-
if (node.tagName ===
|
|
135
|
+
if (node.tagName === "head" && Number.isInteger(node.sourceCodeLocation?.endTag?.startOffset)) {
|
|
137
136
|
headEndOffset = Number(node.sourceCodeLocation.endTag.startOffset);
|
|
138
137
|
}
|
|
139
138
|
});
|
|
140
139
|
if (titles.length !== 1) {
|
|
141
140
|
throw new Error(`static_game_artifact_title_count:${titles.length}`);
|
|
142
141
|
}
|
|
143
|
-
const title = textContent(titles[0]).replace(/\s+/g,
|
|
142
|
+
const title = textContent(titles[0]).replace(/\s+/g, " ").trim();
|
|
144
143
|
if (!title || title.length > 120) {
|
|
145
|
-
throw new Error(
|
|
144
|
+
throw new Error("static_game_artifact_title_invalid");
|
|
146
145
|
}
|
|
147
146
|
if (headEndOffset === null && body) {
|
|
148
|
-
const explicitBodyStart = body.sourceCodeLocation?.startTag?.startOffset
|
|
149
|
-
?? body.sourceCodeLocation?.startOffset;
|
|
147
|
+
const explicitBodyStart = body.sourceCodeLocation?.startTag?.startOffset ?? body.sourceCodeLocation?.startOffset;
|
|
150
148
|
const firstBodyChildStart = (body.childNodes ?? [])
|
|
151
149
|
.map((node) => node.sourceCodeLocation?.startOffset)
|
|
152
150
|
.find((offset) => Number.isInteger(offset));
|
|
@@ -157,41 +155,40 @@ function parseStaticHtmlProject(projectDir, entryPoint = 'index.html') {
|
|
|
157
155
|
headEndOffset = explicitBodyStart ?? firstBodyChildStart ?? finalHeadChildEnd ?? null;
|
|
158
156
|
}
|
|
159
157
|
if (headEndOffset === null) {
|
|
160
|
-
throw new Error(
|
|
158
|
+
throw new Error("static_game_artifact_html_injection_point_missing");
|
|
161
159
|
}
|
|
162
160
|
for (const meta of metas) {
|
|
163
|
-
const httpEquiv = attribute(meta,
|
|
164
|
-
if (httpEquiv ===
|
|
165
|
-
throw new Error(
|
|
161
|
+
const httpEquiv = attribute(meta, "http-equiv")?.toLowerCase();
|
|
162
|
+
if (httpEquiv === "content-security-policy") {
|
|
163
|
+
throw new Error("static_game_artifact_blocking_csp");
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
166
|
validateHtmlRuntimeReferences(root, document);
|
|
169
167
|
const readMeta = (...keys) => {
|
|
170
168
|
for (const key of keys) {
|
|
171
|
-
const match = metas.find((node) =>
|
|
172
|
-
|
|
173
|
-
const value = match ? attribute(match, 'content') : null;
|
|
169
|
+
const match = metas.find((node) => attribute(node, "name")?.toLowerCase() === key || attribute(node, "property")?.toLowerCase() === key);
|
|
170
|
+
const value = match ? attribute(match, "content") : null;
|
|
174
171
|
if (value)
|
|
175
172
|
return value;
|
|
176
173
|
}
|
|
177
174
|
return null;
|
|
178
175
|
};
|
|
179
|
-
const description = readMeta(
|
|
180
|
-
const image = readMeta(
|
|
176
|
+
const description = readMeta("description", "og:description");
|
|
177
|
+
const image = readMeta("og:image", "twitter:image");
|
|
181
178
|
const warnings = [];
|
|
182
179
|
let imagePath = null;
|
|
183
180
|
if (image) {
|
|
184
181
|
try {
|
|
185
|
-
const resolvedImage = localReferencePath(root, image,
|
|
186
|
-
if (resolvedImage && (0, node_path_1.extname)(resolvedImage).toLowerCase() ===
|
|
182
|
+
const resolvedImage = localReferencePath(root, image, "static_game_artifact_image_invalid");
|
|
183
|
+
if (resolvedImage && (0, node_path_1.extname)(resolvedImage).toLowerCase() === ".png" && isPngFile(resolvedImage)) {
|
|
187
184
|
imagePath = resolvedImage;
|
|
188
185
|
}
|
|
189
186
|
else {
|
|
190
|
-
warnings.push(
|
|
187
|
+
warnings.push("Optional HTML image metadata was ignored because it is not a local PNG.");
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
catch {
|
|
194
|
-
warnings.push(
|
|
191
|
+
warnings.push("Optional HTML image metadata was ignored because it does not resolve to a local PNG.");
|
|
195
192
|
}
|
|
196
193
|
}
|
|
197
194
|
return {
|
|
@@ -200,25 +197,24 @@ function parseStaticHtmlProject(projectDir, entryPoint = 'index.html') {
|
|
|
200
197
|
metadata: { title, description, imagePath, warnings },
|
|
201
198
|
};
|
|
202
199
|
}
|
|
203
|
-
function parseStaticHtmlMetadata(projectDir, entryPoint =
|
|
200
|
+
function parseStaticHtmlMetadata(projectDir, entryPoint = "index.html") {
|
|
204
201
|
return parseStaticHtmlProject(projectDir, entryPoint).metadata;
|
|
205
202
|
}
|
|
206
203
|
function buildStaticGameSlug(title, taskId) {
|
|
207
|
-
const base = title
|
|
208
|
-
.
|
|
204
|
+
const base = title
|
|
205
|
+
.normalize("NFKD")
|
|
206
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
209
207
|
.toLowerCase()
|
|
210
|
-
.replace(/[^a-z0-9]+/g,
|
|
211
|
-
.replace(/^-+|-+$/g,
|
|
212
|
-
const suffix = taskId === undefined ?
|
|
213
|
-
return `${base.slice(0, 128 - suffix.length).replace(/-+$/g,
|
|
208
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
209
|
+
.replace(/^-+|-+$/g, "") || "game";
|
|
210
|
+
const suffix = taskId === undefined ? "" : `-t${taskId}`;
|
|
211
|
+
return `${base.slice(0, 128 - suffix.length).replace(/-+$/g, "")}${suffix}`;
|
|
214
212
|
}
|
|
215
213
|
function buildListing(imagePath, primarySurface) {
|
|
216
214
|
if (!imagePath)
|
|
217
215
|
return undefined;
|
|
218
216
|
return {
|
|
219
|
-
...(primarySurface ===
|
|
220
|
-
? { heroPortraitPath: imagePath }
|
|
221
|
-
: { heroLandscapePath: imagePath }),
|
|
217
|
+
...(primarySurface === "MOBILE_PORTRAIT" ? { heroPortraitPath: imagePath } : { heroLandscapePath: imagePath }),
|
|
222
218
|
screenshotPortraitPaths: [],
|
|
223
219
|
screenshotLandscapePaths: [],
|
|
224
220
|
videoPortraitPaths: [],
|
|
@@ -228,13 +224,13 @@ function buildListing(imagePath, primarySurface) {
|
|
|
228
224
|
}
|
|
229
225
|
function buildStaticAppTask(input) {
|
|
230
226
|
return {
|
|
231
|
-
kind:
|
|
227
|
+
kind: "app",
|
|
232
228
|
name: input.name,
|
|
233
229
|
cataloguePath: input.entryPath,
|
|
234
230
|
catalogueAbsolutePath: input.entryPath,
|
|
235
231
|
catalogueDir: input.projectDir,
|
|
236
232
|
filePath: input.entryPath,
|
|
237
|
-
relativeFile:
|
|
233
|
+
relativeFile: "index.html",
|
|
238
234
|
projectDir: input.projectDir,
|
|
239
235
|
packageJsonPath: null,
|
|
240
236
|
isTypescriptProject: false,
|
|
@@ -243,19 +239,19 @@ function buildStaticAppTask(input) {
|
|
|
243
239
|
displayName: input.metadata.title,
|
|
244
240
|
...(input.metadata.description ? { subtitle: input.metadata.description } : {}),
|
|
245
241
|
...(input.metadata.description ? { description: input.metadata.description } : {}),
|
|
246
|
-
type:
|
|
242
|
+
type: "GAME",
|
|
247
243
|
surfaceTargets: [...STATIC_GAME_SURFACES],
|
|
248
244
|
primarySurface: input.primarySurface,
|
|
249
245
|
missingMetadata: [],
|
|
250
|
-
version:
|
|
251
|
-
releaseNotes:
|
|
252
|
-
versionVisibility:
|
|
246
|
+
version: "1.0.0",
|
|
247
|
+
releaseNotes: "Initial static game upload",
|
|
248
|
+
versionVisibility: "PRIVATE",
|
|
253
249
|
sourceArchiveExcludeRelativeFiles: STATIC_SOURCE_EXCLUDES,
|
|
254
250
|
bundleArchiveExcludeRelativeFiles: STATIC_BUNDLE_EXCLUDES,
|
|
255
|
-
license:
|
|
251
|
+
license: "CLOSED",
|
|
256
252
|
tags: [],
|
|
257
|
-
hostingMode:
|
|
258
|
-
authMode:
|
|
253
|
+
hostingMode: "HOSTED",
|
|
254
|
+
authMode: "NONE",
|
|
259
255
|
previewable: true,
|
|
260
256
|
editorSupported: false,
|
|
261
257
|
...(buildListing(input.metadata.imagePath, input.primarySurface)
|
|
@@ -272,32 +268,32 @@ function buildStaticAppTask(input) {
|
|
|
272
268
|
function buildStaticSdkBootstrap(cdnBase) {
|
|
273
269
|
let sdkUrl;
|
|
274
270
|
try {
|
|
275
|
-
sdkUrl = new URL(
|
|
271
|
+
sdkUrl = new URL("sdk/playdrop.js", `${cdnBase.trim().replace(/\/+$/, "")}/`);
|
|
276
272
|
}
|
|
277
273
|
catch {
|
|
278
|
-
throw new Error(
|
|
274
|
+
throw new Error("static_game_sdk_base_invalid");
|
|
279
275
|
}
|
|
280
|
-
if (sdkUrl.protocol !==
|
|
281
|
-
throw new Error(
|
|
276
|
+
if (sdkUrl.protocol !== "http:" && sdkUrl.protocol !== "https:") {
|
|
277
|
+
throw new Error("static_game_sdk_base_invalid");
|
|
282
278
|
}
|
|
283
279
|
return [
|
|
284
280
|
`<script src="${sdkUrl.toString()}" data-playdrop-static-sdk></script>`,
|
|
285
|
-
|
|
281
|
+
"<script data-playdrop-static-bootstrap>",
|
|
286
282
|
'window.addEventListener("load", async () => {',
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
].join(
|
|
283
|
+
" const sdk = await window.playdrop.init();",
|
|
284
|
+
" await sdk.host.ready();",
|
|
285
|
+
"}, { once: true });",
|
|
286
|
+
"</script>",
|
|
287
|
+
].join("\n");
|
|
292
288
|
}
|
|
293
289
|
async function prepareStaticHtmlProject(input) {
|
|
294
290
|
const sourceRoot = (0, node_fs_1.realpathSync)((0, node_path_1.resolve)(input.projectDir));
|
|
295
|
-
const sourceEntryPath = (0, node_path_1.join)(sourceRoot,
|
|
291
|
+
const sourceEntryPath = (0, node_path_1.join)(sourceRoot, "index.html");
|
|
296
292
|
const parsedProject = parseStaticHtmlProject(sourceRoot);
|
|
297
293
|
const metadata = parsedProject.metadata;
|
|
298
|
-
const requestedAppName = input.appName?.trim() ??
|
|
294
|
+
const requestedAppName = input.appName?.trim() ?? "";
|
|
299
295
|
if (requestedAppName && (requestedAppName.length > 128 || !/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(requestedAppName))) {
|
|
300
|
-
throw new Error(
|
|
296
|
+
throw new Error("static_game_artifact_claimed_slug_invalid");
|
|
301
297
|
}
|
|
302
298
|
const name = requestedAppName || buildStaticGameSlug(metadata.title, input.taskId);
|
|
303
299
|
const sourceTask = buildStaticAppTask({
|
|
@@ -313,14 +309,15 @@ async function prepareStaticHtmlProject(input) {
|
|
|
313
309
|
await (0, promises_1.cp)(sourceRoot, runtimeDir, {
|
|
314
310
|
recursive: true,
|
|
315
311
|
filter: (source) => {
|
|
316
|
-
const rel = (0, node_path_1.relative)(sourceRoot, source).replace(/\\/g,
|
|
317
|
-
return !rel ||
|
|
312
|
+
const rel = (0, node_path_1.relative)(sourceRoot, source).replace(/\\/g, "/");
|
|
313
|
+
return (!rel ||
|
|
314
|
+
!STATIC_SOURCE_EXCLUDES.some((excluded) => excluded.endsWith("/") ? rel === excluded.slice(0, -1) || rel.startsWith(excluded) : rel === excluded));
|
|
318
315
|
},
|
|
319
316
|
});
|
|
320
|
-
const runtimeEntryPath = (0, node_path_1.join)(runtimeDir,
|
|
317
|
+
const runtimeEntryPath = (0, node_path_1.join)(runtimeDir, "index.html");
|
|
321
318
|
const sourceHtml = parsedProject.html;
|
|
322
319
|
const runtimeHtml = `${sourceHtml.slice(0, parsedProject.headEndOffset)}${buildStaticSdkBootstrap(input.cdnBase)}\n${sourceHtml.slice(parsedProject.headEndOffset)}`;
|
|
323
|
-
await (0, promises_1.writeFile)(runtimeEntryPath, runtimeHtml,
|
|
320
|
+
await (0, promises_1.writeFile)(runtimeEntryPath, runtimeHtml, "utf8");
|
|
324
321
|
const runtimeTask = buildStaticAppTask({
|
|
325
322
|
projectDir: runtimeDir,
|
|
326
323
|
entryPath: runtimeEntryPath,
|
|
@@ -345,7 +342,9 @@ async function prepareStaticHtmlProject(input) {
|
|
|
345
342
|
runtimeHash: runtimeArtifacts.bundleHash,
|
|
346
343
|
metadata,
|
|
347
344
|
runtimeDir,
|
|
348
|
-
cleanup: async () => {
|
|
345
|
+
cleanup: async () => {
|
|
346
|
+
await (0, promises_1.rm)(runtimeDir, { recursive: true, force: true });
|
|
347
|
+
},
|
|
349
348
|
};
|
|
350
349
|
}
|
|
351
350
|
catch (error) {
|
|
@@ -354,5 +353,5 @@ async function prepareStaticHtmlProject(input) {
|
|
|
354
353
|
}
|
|
355
354
|
}
|
|
356
355
|
function sha256File(filePath) {
|
|
357
|
-
return (0, node_crypto_1.createHash)(
|
|
356
|
+
return (0, node_crypto_1.createHash)("sha256").update((0, node_fs_1.readFileSync)(filePath)).digest("hex");
|
|
358
357
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppSurface } from
|
|
2
|
-
import type { BrowserContextOptions } from
|
|
1
|
+
import type { AppSurface } from "@playdrop/types";
|
|
2
|
+
import type { BrowserContextOptions } from "playwright-core";
|
|
3
3
|
export declare const PLAYDROP_MOBILE_USER_AGENT = "Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1";
|
|
4
4
|
export type PlaydropSurfaceProfile = {
|
|
5
5
|
contextOptions: BrowserContextOptions;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PLAYDROP_SURFACE_CONTEXT_OPTIONS = exports.PLAYDROP_SURFACE_PROFILES = exports.PLAYDROP_MOBILE_USER_AGENT = void 0;
|
|
4
4
|
exports.clonePlaydropSurfaceContextOptions = clonePlaydropSurfaceContextOptions;
|
|
5
5
|
exports.buildPlaywrightMcpSurfaceArgs = buildPlaywrightMcpSurfaceArgs;
|
|
6
|
-
exports.PLAYDROP_MOBILE_USER_AGENT =
|
|
6
|
+
exports.PLAYDROP_MOBILE_USER_AGENT = "Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1";
|
|
7
7
|
exports.PLAYDROP_SURFACE_PROFILES = {
|
|
8
8
|
DESKTOP: {
|
|
9
9
|
contextOptions: {
|
|
@@ -23,7 +23,7 @@ exports.PLAYDROP_SURFACE_PROFILES = {
|
|
|
23
23
|
hasTouch: true,
|
|
24
24
|
userAgent: exports.PLAYDROP_MOBILE_USER_AGENT,
|
|
25
25
|
},
|
|
26
|
-
playwrightMcpDevice:
|
|
26
|
+
playwrightMcpDevice: "iPhone 13 landscape",
|
|
27
27
|
},
|
|
28
28
|
MOBILE_PORTRAIT: {
|
|
29
29
|
contextOptions: {
|
|
@@ -34,7 +34,7 @@ exports.PLAYDROP_SURFACE_PROFILES = {
|
|
|
34
34
|
hasTouch: true,
|
|
35
35
|
userAgent: exports.PLAYDROP_MOBILE_USER_AGENT,
|
|
36
36
|
},
|
|
37
|
-
playwrightMcpDevice:
|
|
37
|
+
playwrightMcpDevice: "iPhone 13",
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
exports.PLAYDROP_SURFACE_CONTEXT_OPTIONS = {
|
|
@@ -57,9 +57,9 @@ function buildPlaywrightMcpSurfaceArgs(surface) {
|
|
|
57
57
|
throw new Error(`playdrop_surface_viewport_missing:${surface}`);
|
|
58
58
|
}
|
|
59
59
|
return [
|
|
60
|
-
...(profile.playwrightMcpDevice ? [
|
|
61
|
-
|
|
60
|
+
...(profile.playwrightMcpDevice ? ["--device", profile.playwrightMcpDevice] : []),
|
|
61
|
+
"--viewport-size",
|
|
62
62
|
`${viewport.width}x${viewport.height}`,
|
|
63
|
-
...(profile.contextOptions.userAgent ? [
|
|
63
|
+
...(profile.contextOptions.userAgent ? ["--user-agent", profile.contextOptions.userAgent] : []),
|
|
64
64
|
];
|
|
65
65
|
}
|
package/dist/apps/upload.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ApiClient } from
|
|
2
|
-
import type { AgentTaskPlaytestProof, UserResponse } from
|
|
3
|
-
import type { AppTask } from
|
|
4
|
-
import type { TaskCaptureSession } from
|
|
5
|
-
import type { AppBuildArtifacts } from
|
|
1
|
+
import type { ApiClient } from "@playdrop/api-client";
|
|
2
|
+
import type { AgentTaskPlaytestProof, UserResponse } from "@playdrop/types";
|
|
3
|
+
import type { AppTask } from "../catalogue";
|
|
4
|
+
import type { TaskCaptureSession } from "../appUrls";
|
|
5
|
+
import type { AppBuildArtifacts } from "./build";
|
|
6
6
|
export type AppUploadResult = {
|
|
7
7
|
fileUnchanged?: boolean;
|
|
8
8
|
metadataUnchanged?: boolean;
|