@playdrop/playdrop-cli 0.16.2 → 0.16.11
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
package/dist/commands/notes.js
CHANGED
|
@@ -10,29 +10,29 @@ const errors_1 = require("../errors");
|
|
|
10
10
|
const messages_1 = require("../messages");
|
|
11
11
|
const output_1 = require("../output");
|
|
12
12
|
function notesApiMessage(error) {
|
|
13
|
-
if (error.code ===
|
|
14
|
-
const missingIds = Array.isArray(error.details?.[
|
|
13
|
+
if (error.code === "playtest_notes_changed") {
|
|
14
|
+
const missingIds = Array.isArray(error.details?.["missingIds"]) ? error.details["missingIds"] : [];
|
|
15
15
|
return {
|
|
16
|
-
problem: `The note inbox changed before it could be cleared${missingIds.length > 0 ? `: ${missingIds.join(
|
|
17
|
-
suggestions: [
|
|
16
|
+
problem: `The note inbox changed before it could be cleared${missingIds.length > 0 ? `: ${missingIds.join(", ")}` : "."}`,
|
|
17
|
+
suggestions: ["Run notes browse again, then clear the current IDs."],
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
return { problem: `PlayDrop rejected the notes request: ${error.code ?? error.message} (HTTP ${error.status}).` };
|
|
21
21
|
}
|
|
22
22
|
function parseAppVersionRef(raw, command) {
|
|
23
|
-
const ref = (0, types_1.parseContentVersionRef)(raw ??
|
|
24
|
-
if (!ref || ref.kind !==
|
|
25
|
-
(0, messages_1.printErrorWithHelp)(
|
|
23
|
+
const ref = (0, types_1.parseContentVersionRef)(raw ?? "");
|
|
24
|
+
if (!ref || ref.kind !== "app") {
|
|
25
|
+
(0, messages_1.printErrorWithHelp)("An exact canonical app-version ref is required.", ["Use app:creator/name@x.y.z.", `Example: playdrop ${command} app:olivier/platformer@1.4.0`], { command });
|
|
26
26
|
process.exitCode = 1;
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
return ref;
|
|
30
30
|
}
|
|
31
31
|
async function browseNotes(rawRef, options = {}) {
|
|
32
|
-
const ref = parseAppVersionRef(rawRef,
|
|
32
|
+
const ref = parseAppVersionRef(rawRef, "notes browse");
|
|
33
33
|
if (!ref)
|
|
34
34
|
return;
|
|
35
|
-
await (0, commandContext_1.withEnvironment)(
|
|
35
|
+
await (0, commandContext_1.withEnvironment)("notes browse", "Reading playtest notes", async ({ client }) => {
|
|
36
36
|
try {
|
|
37
37
|
const response = await client.listPlaytestNotes(ref.creatorUsername, ref.name, ref.version);
|
|
38
38
|
let output = response;
|
|
@@ -51,7 +51,7 @@ async function browseNotes(rawRef, options = {}) {
|
|
|
51
51
|
notes.push({ ...note, localPath });
|
|
52
52
|
}
|
|
53
53
|
output = { notes };
|
|
54
|
-
(0, node_fs_1.writeFileSync)((0, node_path_1.resolve)(outputDirectory,
|
|
54
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.resolve)(outputDirectory, "notes.json"), `${JSON.stringify(output, null, 2)}\n`, "utf8");
|
|
55
55
|
}
|
|
56
56
|
if (options.json) {
|
|
57
57
|
(0, output_1.printJson)(output);
|
|
@@ -62,35 +62,35 @@ async function browseNotes(rawRef, options = {}) {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (output.notes.length === 0) {
|
|
65
|
-
console.log(
|
|
65
|
+
console.log("No pending playtest notes.");
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
for (const note of output.notes) {
|
|
69
|
-
const summary = note.kind ===
|
|
69
|
+
const summary = note.kind === "TEXT"
|
|
70
70
|
? note.text
|
|
71
|
-
: note.kind ===
|
|
71
|
+
: note.kind === "ASSET"
|
|
72
72
|
? `${note.assetRef}: ${note.comment}`
|
|
73
73
|
: note.attachment?.fileName;
|
|
74
|
-
console.log(`${note.id}\t${note.kind}\tv${note.authoredVersion}\t${summary ??
|
|
74
|
+
console.log(`${note.id}\t${note.kind}\tv${note.authoredVersion}\t${summary ?? ""}`);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
catch (error) {
|
|
78
|
-
if (!(0, errors_1.handleCommandFailure)(error,
|
|
78
|
+
if (!(0, errors_1.handleCommandFailure)(error, "notes browse", "Read playtest notes", { apiMessage: notesApiMessage }))
|
|
79
79
|
throw error;
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
async function clearNotes(rawRef, rawIds, options = {}) {
|
|
84
|
-
const ref = parseAppVersionRef(rawRef,
|
|
84
|
+
const ref = parseAppVersionRef(rawRef, "notes clear");
|
|
85
85
|
if (!ref)
|
|
86
86
|
return;
|
|
87
87
|
const ids = rawIds.map(Number);
|
|
88
88
|
if (ids.length === 0 || ids.some((id) => !Number.isInteger(id) || id <= 0) || new Set(ids).size !== ids.length) {
|
|
89
|
-
(0, messages_1.printErrorWithHelp)(
|
|
89
|
+
(0, messages_1.printErrorWithHelp)("One or more explicit note IDs are required.", ["Example: playdrop notes clear app:olivier/platformer@1.4.0 42 43"], { command: "notes clear" });
|
|
90
90
|
process.exitCode = 1;
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
await (0, commandContext_1.withEnvironment)(
|
|
93
|
+
await (0, commandContext_1.withEnvironment)("notes clear", "Clearing playtest notes", async ({ client }) => {
|
|
94
94
|
try {
|
|
95
95
|
const result = await client.clearPlaytestNotes(ref.creatorUsername, ref.name, ref.version, ids);
|
|
96
96
|
if (options.json) {
|
|
@@ -100,7 +100,7 @@ async function clearNotes(rawRef, rawIds, options = {}) {
|
|
|
100
100
|
(0, output_1.printSuccess)(`Cleared ${result.cleared.length} playtest notes. ${result.count} pending.`);
|
|
101
101
|
}
|
|
102
102
|
catch (error) {
|
|
103
|
-
if (!(0, errors_1.handleCommandFailure)(error,
|
|
103
|
+
if (!(0, errors_1.handleCommandFailure)(error, "notes clear", "Clear playtest notes", { apiMessage: notesApiMessage }))
|
|
104
104
|
throw error;
|
|
105
105
|
}
|
|
106
106
|
});
|
|
@@ -9,10 +9,10 @@ const messages_1 = require("../messages");
|
|
|
9
9
|
const output_1 = require("../output");
|
|
10
10
|
function parseStatus(raw) {
|
|
11
11
|
if (!raw || raw.trim().length === 0) {
|
|
12
|
-
return
|
|
12
|
+
return "unread";
|
|
13
13
|
}
|
|
14
14
|
const normalized = raw.trim().toLowerCase();
|
|
15
|
-
if (normalized ===
|
|
15
|
+
if (normalized === "all" || normalized === "read" || normalized === "unread") {
|
|
16
16
|
return normalized;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
@@ -21,17 +21,17 @@ function parsePositiveInteger(raw, label, fallback) {
|
|
|
21
21
|
if (raw === undefined) {
|
|
22
22
|
return fallback;
|
|
23
23
|
}
|
|
24
|
-
const parsed = typeof raw ===
|
|
24
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
25
25
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
if (label ===
|
|
28
|
+
if (label === "limit" && parsed <= 0) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
return parsed;
|
|
32
32
|
}
|
|
33
33
|
async function fetchNotificationsByStatus(fetchPage, status, limit, offset) {
|
|
34
|
-
if (status ===
|
|
34
|
+
if (status === "all" || status === "unread") {
|
|
35
35
|
return fetchPage(status, limit, offset);
|
|
36
36
|
}
|
|
37
37
|
const pageSize = Math.max(limit, 50);
|
|
@@ -40,7 +40,7 @@ async function fetchNotificationsByStatus(fetchPage, status, limit, offset) {
|
|
|
40
40
|
let cursor = 0;
|
|
41
41
|
let hasMore = true;
|
|
42
42
|
while (hasMore && collected.length < offset + limit) {
|
|
43
|
-
const response = await fetchPage(
|
|
43
|
+
const response = await fetchPage("all", pageSize, cursor);
|
|
44
44
|
unreadCount = response.unreadCount;
|
|
45
45
|
const matching = response.notifications.filter((notification) => notification.readAt !== null);
|
|
46
46
|
collected.push(...matching);
|
|
@@ -65,23 +65,29 @@ async function fetchNotificationsByStatus(fetchPage, status, limit, offset) {
|
|
|
65
65
|
async function browseNotifications(options = {}) {
|
|
66
66
|
const status = parseStatus(options.status);
|
|
67
67
|
if (!status) {
|
|
68
|
-
(0, messages_1.printErrorWithHelp)(`Status "${options.status ??
|
|
68
|
+
(0, messages_1.printErrorWithHelp)(`Status "${options.status ?? ""}" is not supported.`, ["Use one of: unread, read, all."], {
|
|
69
|
+
command: "notifications browse",
|
|
70
|
+
});
|
|
69
71
|
process.exitCode = 1;
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
const limit = parsePositiveInteger(options.limit,
|
|
74
|
+
const limit = parsePositiveInteger(options.limit, "limit", 20);
|
|
73
75
|
if (limit === null) {
|
|
74
|
-
(0, messages_1.printErrorWithHelp)(
|
|
76
|
+
(0, messages_1.printErrorWithHelp)("The --limit value must be a positive integer.", ["Example: --limit 20"], {
|
|
77
|
+
command: "notifications browse",
|
|
78
|
+
});
|
|
75
79
|
process.exitCode = 1;
|
|
76
80
|
return;
|
|
77
81
|
}
|
|
78
|
-
const offset = parsePositiveInteger(options.offset,
|
|
82
|
+
const offset = parsePositiveInteger(options.offset, "offset", 0);
|
|
79
83
|
if (offset === null) {
|
|
80
|
-
(0, messages_1.printErrorWithHelp)(
|
|
84
|
+
(0, messages_1.printErrorWithHelp)("The --offset value must be zero or a positive integer.", ["Example: --offset 20"], {
|
|
85
|
+
command: "notifications browse",
|
|
86
|
+
});
|
|
81
87
|
process.exitCode = 1;
|
|
82
88
|
return;
|
|
83
89
|
}
|
|
84
|
-
await (0, commandContext_1.withEnvironment)(
|
|
90
|
+
await (0, commandContext_1.withEnvironment)("notifications browse", "Checking your notifications", async ({ client }) => {
|
|
85
91
|
try {
|
|
86
92
|
const response = await fetchNotificationsByStatus(async (requestStatus, requestLimit, requestOffset) => client.fetchNotifications({
|
|
87
93
|
status: requestStatus,
|
|
@@ -103,7 +109,7 @@ async function browseNotifications(options = {}) {
|
|
|
103
109
|
}
|
|
104
110
|
console.log(`Notifications (${status}):\n`);
|
|
105
111
|
for (const notification of response.notifications) {
|
|
106
|
-
const state = notification.readAt ?
|
|
112
|
+
const state = notification.readAt ? "read" : "unread";
|
|
107
113
|
console.log(`#${notification.id} | ${state} | ${(0, output_1.formatTimestamp)(notification.createdAt)}`);
|
|
108
114
|
console.log(` ${notification.title}`);
|
|
109
115
|
if (notification.body) {
|
|
@@ -113,7 +119,7 @@ async function browseNotifications(options = {}) {
|
|
|
113
119
|
console.log('\nNext: run "playdrop notifications read <id>" or "playdrop notifications read-all".');
|
|
114
120
|
}
|
|
115
121
|
catch (error) {
|
|
116
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
122
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "notifications browse", "Notification lookup", {
|
|
117
123
|
apiMessage: (apiError) => ({
|
|
118
124
|
problem: `Notification lookup failed with status ${apiError.status}.`,
|
|
119
125
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
@@ -126,23 +132,27 @@ async function browseNotifications(options = {}) {
|
|
|
126
132
|
});
|
|
127
133
|
}
|
|
128
134
|
async function readNotification(rawId, options = {}) {
|
|
129
|
-
const id = parsePositiveInteger(rawId,
|
|
135
|
+
const id = parsePositiveInteger(rawId, "Notification id", 0);
|
|
130
136
|
if (id === null || id === 0) {
|
|
131
|
-
(0, messages_1.printErrorWithHelp)(
|
|
137
|
+
(0, messages_1.printErrorWithHelp)("Notification id must be a positive integer.", ["Example: playdrop notifications read 42"], {
|
|
138
|
+
command: "notifications read",
|
|
139
|
+
});
|
|
132
140
|
process.exitCode = 1;
|
|
133
141
|
return;
|
|
134
142
|
}
|
|
135
|
-
await (0, commandContext_1.withEnvironment)(
|
|
143
|
+
await (0, commandContext_1.withEnvironment)("notifications read", "Marking a notification as read", async ({ client }) => {
|
|
136
144
|
try {
|
|
137
145
|
const response = await client.markNotificationRead(id);
|
|
138
146
|
if (options.json) {
|
|
139
147
|
(0, output_1.printJson)({ success: Boolean(response.success), unreadCount: response.unreadCount });
|
|
140
148
|
return;
|
|
141
149
|
}
|
|
142
|
-
(0, output_1.printSuccess)(`Notification #${id} marked as read.`, [
|
|
150
|
+
(0, output_1.printSuccess)(`Notification #${id} marked as read.`, [
|
|
151
|
+
'Next: run "playdrop notifications browse --status unread" to review what remains.',
|
|
152
|
+
]);
|
|
143
153
|
}
|
|
144
154
|
catch (error) {
|
|
145
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
155
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "notifications read", "Notification update", {
|
|
146
156
|
apiMessage: (apiError) => ({
|
|
147
157
|
problem: `Notification update failed with status ${apiError.status}.`,
|
|
148
158
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
@@ -155,17 +165,19 @@ async function readNotification(rawId, options = {}) {
|
|
|
155
165
|
});
|
|
156
166
|
}
|
|
157
167
|
async function readAllNotifications(options = {}) {
|
|
158
|
-
await (0, commandContext_1.withEnvironment)(
|
|
168
|
+
await (0, commandContext_1.withEnvironment)("notifications read-all", "Marking all notifications as read", async ({ client }) => {
|
|
159
169
|
try {
|
|
160
170
|
const response = await client.markAllNotificationsRead();
|
|
161
171
|
if (options.json) {
|
|
162
172
|
(0, output_1.printJson)({ success: Boolean(response.success), unreadCount: response.unreadCount });
|
|
163
173
|
return;
|
|
164
174
|
}
|
|
165
|
-
(0, output_1.printSuccess)(
|
|
175
|
+
(0, output_1.printSuccess)("All notifications marked as read.", [
|
|
176
|
+
'Next: run "playdrop notifications browse --status unread" to confirm your inbox is clear.',
|
|
177
|
+
]);
|
|
166
178
|
}
|
|
167
179
|
catch (error) {
|
|
168
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
180
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "notifications read-all", "Notification update", {
|
|
169
181
|
apiMessage: (apiError) => ({
|
|
170
182
|
problem: `Notification update failed with status ${apiError.status}.`,
|
|
171
183
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
@@ -7,14 +7,14 @@ exports.resolveNpmInvocation = resolveNpmInvocation;
|
|
|
7
7
|
const node_path_1 = require("node:path");
|
|
8
8
|
const node_process_1 = __importDefault(require("node:process"));
|
|
9
9
|
function resolveNpmInvocation(args, platform = node_process_1.default.platform, nodeExecutable = node_process_1.default.execPath) {
|
|
10
|
-
if (platform ===
|
|
10
|
+
if (platform === "win32") {
|
|
11
11
|
return {
|
|
12
12
|
command: nodeExecutable,
|
|
13
13
|
args: [
|
|
14
|
-
node_path_1.win32.join(node_path_1.win32.dirname(nodeExecutable),
|
|
14
|
+
node_path_1.win32.join(node_path_1.win32.dirname(nodeExecutable), "node_modules", "npm", "bin", "npm-cli.js"),
|
|
15
15
|
...args,
|
|
16
16
|
],
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
return { command:
|
|
19
|
+
return { command: "npm", args };
|
|
20
20
|
}
|
|
@@ -9,18 +9,18 @@ const node_fs_1 = require("node:fs");
|
|
|
9
9
|
const node_path_1 = require("node:path");
|
|
10
10
|
const sharp_1 = __importDefault(require("sharp"));
|
|
11
11
|
const IMAGE_BY_EXTENSION = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
".png": { format: "png", contentType: "image/png" },
|
|
13
|
+
".jpg": { format: "jpeg", contentType: "image/jpeg" },
|
|
14
|
+
".jpeg": { format: "jpeg", contentType: "image/jpeg" },
|
|
15
|
+
".webp": { format: "webp", contentType: "image/webp" },
|
|
16
|
+
".gif": { format: "gif", contentType: "image/gif" },
|
|
17
|
+
".svg": { format: "svg", contentType: "image/svg+xml" },
|
|
18
18
|
};
|
|
19
19
|
const SHARP_FORMAT_BY_DECLARED_FORMAT = {
|
|
20
|
-
PNG:
|
|
21
|
-
JPEG:
|
|
22
|
-
WEBP:
|
|
23
|
-
GIF:
|
|
20
|
+
PNG: "png",
|
|
21
|
+
JPEG: "jpeg",
|
|
22
|
+
WEBP: "webp",
|
|
23
|
+
GIF: "gif",
|
|
24
24
|
};
|
|
25
25
|
async function validateOwnedRuntimeImageFile(input) {
|
|
26
26
|
let stats;
|
|
@@ -36,23 +36,25 @@ async function validateOwnedRuntimeImageFile(input) {
|
|
|
36
36
|
const extension = (0, node_path_1.extname)(input.filePath).toLowerCase();
|
|
37
37
|
const expected = IMAGE_BY_EXTENSION[extension];
|
|
38
38
|
if (!expected) {
|
|
39
|
-
throw new Error(`agent_task_owned_image_format_unsupported:${input.assetName}:${extension ||
|
|
39
|
+
throw new Error(`agent_task_owned_image_format_unsupported:${input.assetName}:${extension || "missing_extension"}`);
|
|
40
40
|
}
|
|
41
41
|
let metadata;
|
|
42
42
|
try {
|
|
43
|
-
metadata = await (0, sharp_1.default)(input.filePath, { failOn:
|
|
43
|
+
metadata = await (0, sharp_1.default)(input.filePath, { failOn: "error" }).metadata();
|
|
44
44
|
}
|
|
45
45
|
catch {
|
|
46
46
|
throw new Error(`agent_task_owned_image_decode_failed:${input.assetName}:${input.filePath}`);
|
|
47
47
|
}
|
|
48
|
-
if (!Number.isInteger(metadata.width) ||
|
|
49
|
-
|
|
48
|
+
if (!Number.isInteger(metadata.width) ||
|
|
49
|
+
Number(metadata.width) <= 0 ||
|
|
50
|
+
!Number.isInteger(metadata.height) ||
|
|
51
|
+
Number(metadata.height) <= 0) {
|
|
50
52
|
throw new Error(`agent_task_owned_image_dimensions_invalid:${input.assetName}:${input.filePath}`);
|
|
51
53
|
}
|
|
52
54
|
if (metadata.format !== expected.format) {
|
|
53
|
-
throw new Error(`agent_task_owned_image_format_mismatch:${input.assetName}:extension=${extension}:contentType=${expected.contentType}:decoded=${metadata.format ??
|
|
55
|
+
throw new Error(`agent_task_owned_image_format_mismatch:${input.assetName}:extension=${extension}:contentType=${expected.contentType}:decoded=${metadata.format ?? "unknown"}`);
|
|
54
56
|
}
|
|
55
|
-
const declaredFormat = input.declaredFormat?.trim().toUpperCase() ??
|
|
57
|
+
const declaredFormat = input.declaredFormat?.trim().toUpperCase() ?? "";
|
|
56
58
|
const declaredSharpFormat = SHARP_FORMAT_BY_DECLARED_FORMAT[declaredFormat];
|
|
57
59
|
if (declaredSharpFormat && declaredSharpFormat !== metadata.format) {
|
|
58
60
|
throw new Error(`agent_task_owned_image_format_mismatch:${input.assetName}:declared=${declaredFormat}:decoded=${metadata.format}`);
|
|
@@ -60,7 +62,7 @@ async function validateOwnedRuntimeImageFile(input) {
|
|
|
60
62
|
}
|
|
61
63
|
async function assertOwnedRuntimeImagesAreValid(task) {
|
|
62
64
|
for (const ownedAsset of task.ownedAssets) {
|
|
63
|
-
if (!ownedAsset.runtimeKey || ownedAsset.category !==
|
|
65
|
+
if (!ownedAsset.runtimeKey || ownedAsset.category !== "IMAGE") {
|
|
64
66
|
continue;
|
|
65
67
|
}
|
|
66
68
|
const primaryPath = ownedAsset.filePaths?.primary;
|
package/dist/commands/play.js
CHANGED
|
@@ -11,30 +11,24 @@ const output_1 = require("../output");
|
|
|
11
11
|
const refs_1 = require("../refs");
|
|
12
12
|
const devShared_1 = require("./devShared");
|
|
13
13
|
function printPlayRefValidationError(_rawRef) {
|
|
14
|
-
(0, messages_1.printErrorWithHelp)(
|
|
15
|
-
'Use the format <creator>/app/<name>.',
|
|
16
|
-
'Example: playdrop play playdrop/app/hangingout',
|
|
17
|
-
], { command: 'play' });
|
|
14
|
+
(0, messages_1.printErrorWithHelp)("A canonical app ref is required.", ["Use the format <creator>/app/<name>.", "Example: playdrop play playdrop/app/hangingout"], { command: "play" });
|
|
18
15
|
process.exitCode = 1;
|
|
19
16
|
}
|
|
20
17
|
async function play(rawRef, options = {}) {
|
|
21
18
|
let ref;
|
|
22
19
|
try {
|
|
23
|
-
ref = (0, refs_1.parseContentRef)(rawRef ??
|
|
20
|
+
ref = (0, refs_1.parseContentRef)(rawRef ?? "");
|
|
24
21
|
}
|
|
25
22
|
catch {
|
|
26
23
|
printPlayRefValidationError(rawRef);
|
|
27
24
|
return;
|
|
28
25
|
}
|
|
29
|
-
if (ref.kind !==
|
|
30
|
-
(0, messages_1.printErrorWithHelp)(
|
|
31
|
-
'Use the format <creator>/app/<name>.',
|
|
32
|
-
'Assets and asset packs do not have authenticated play routes.',
|
|
33
|
-
], { command: 'play' });
|
|
26
|
+
if (ref.kind !== "app") {
|
|
27
|
+
(0, messages_1.printErrorWithHelp)("The play command only supports app refs.", ["Use the format <creator>/app/<name>.", "Assets and asset packs do not have authenticated play routes."], { command: "play" });
|
|
34
28
|
process.exitCode = 1;
|
|
35
29
|
return;
|
|
36
30
|
}
|
|
37
|
-
await (0, commandContext_1.withEnvironment)(
|
|
31
|
+
await (0, commandContext_1.withEnvironment)("play", "Launching a published app", async ({ client, envConfig }) => {
|
|
38
32
|
try {
|
|
39
33
|
const response = await client.fetchAppBySlug(ref.creator, ref.name);
|
|
40
34
|
const playUrl = (0, appUrls_1.buildPlatformPlayUrl)(envConfig.webBase, {
|
|
@@ -60,10 +54,10 @@ async function play(rawRef, options = {}) {
|
|
|
60
54
|
console.log(`Launch URL: ${launch.launchUrl}`);
|
|
61
55
|
const opened = await (0, browser_1.openBrowserUrl)(launch.launchUrl).catch(() => false);
|
|
62
56
|
if (opened) {
|
|
63
|
-
console.log(
|
|
57
|
+
console.log("Opened the app in your browser.");
|
|
64
58
|
}
|
|
65
59
|
else {
|
|
66
|
-
console.log(
|
|
60
|
+
console.log("Open the launch URL above in your browser.");
|
|
67
61
|
}
|
|
68
62
|
}
|
|
69
63
|
catch (error) {
|
|
@@ -71,28 +65,25 @@ async function play(rawRef, options = {}) {
|
|
|
71
65
|
return;
|
|
72
66
|
}
|
|
73
67
|
if (error instanceof types_1.UnsupportedClientError) {
|
|
74
|
-
(0, http_1.handleUnsupportedError)(error,
|
|
68
|
+
(0, http_1.handleUnsupportedError)(error, "Play");
|
|
75
69
|
process.exitCode = 1;
|
|
76
70
|
return;
|
|
77
71
|
}
|
|
78
72
|
if (error instanceof types_1.ApiError) {
|
|
79
73
|
if (error.status === 404) {
|
|
80
|
-
(0, messages_1.printErrorWithHelp)(`No app was found for "${ref.ref}".`, [
|
|
81
|
-
'Check the ref and retry.',
|
|
82
|
-
'Run "playdrop browse --kind app" to discover public apps.',
|
|
83
|
-
], { command: 'play' });
|
|
74
|
+
(0, messages_1.printErrorWithHelp)(`No app was found for "${ref.ref}".`, ["Check the ref and retry.", 'Run "playdrop browse --kind app" to discover public apps.'], { command: "play" });
|
|
84
75
|
process.exitCode = 1;
|
|
85
76
|
return;
|
|
86
77
|
}
|
|
87
78
|
(0, messages_1.printErrorWithHelp)(`Could not launch "${ref.ref}" (status ${error.status}).`, [
|
|
88
79
|
'Run "playdrop auth whoami" to confirm your session.',
|
|
89
|
-
|
|
90
|
-
], { command:
|
|
80
|
+
"Retry in a moment if the platform was just updated.",
|
|
81
|
+
], { command: "play" });
|
|
91
82
|
process.exitCode = 1;
|
|
92
83
|
return;
|
|
93
84
|
}
|
|
94
85
|
if ((0, devShared_1.isNetworkError)(error)) {
|
|
95
|
-
(0, messages_1.printNetworkIssue)(
|
|
86
|
+
(0, messages_1.printNetworkIssue)("Could not reach the Playdrop API to launch the app.", "play");
|
|
96
87
|
process.exitCode = 1;
|
|
97
88
|
return;
|
|
98
89
|
}
|
|
@@ -4,12 +4,12 @@ exports.showPublicPage = showPublicPage;
|
|
|
4
4
|
const commandContext_1 = require("../commandContext");
|
|
5
5
|
const messages_1 = require("../messages");
|
|
6
6
|
function buildPublicPageUrl(base, relativePath) {
|
|
7
|
-
return `${base.replace(/\/$/,
|
|
7
|
+
return `${base.replace(/\/$/, "")}/${relativePath}`;
|
|
8
8
|
}
|
|
9
9
|
async function showPublicPage(command, relativePath) {
|
|
10
10
|
await (0, commandContext_1.withPublicEnvironment)(command, async ({ envConfig }) => {
|
|
11
11
|
if (!envConfig.cdnBase) {
|
|
12
|
-
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a public content base URL.`, [
|
|
12
|
+
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a public content base URL.`, ["Set PLAYDROP_CDN_BASE or use an environment that publishes public content assets."], { command });
|
|
13
13
|
process.exitCode = 1;
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
@@ -18,12 +18,16 @@ async function showPublicPage(command, relativePath) {
|
|
|
18
18
|
response = await fetch(buildPublicPageUrl(envConfig.cdnBase, relativePath));
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
|
-
(0, messages_1.printErrorWithHelp)(`Fetching ${command} failed.`, [error instanceof Error ? error.message : String(error)], {
|
|
21
|
+
(0, messages_1.printErrorWithHelp)(`Fetching ${command} failed.`, [error instanceof Error ? error.message : String(error)], {
|
|
22
|
+
command,
|
|
23
|
+
});
|
|
22
24
|
process.exitCode = 1;
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
25
27
|
if (!response.ok) {
|
|
26
|
-
(0, messages_1.printErrorWithHelp)(`Failed to fetch ${command}.`, [`HTTP ${response.status} ${response.statusText}`], {
|
|
28
|
+
(0, messages_1.printErrorWithHelp)(`Failed to fetch ${command}.`, [`HTTP ${response.status} ${response.statusText}`], {
|
|
29
|
+
command,
|
|
30
|
+
});
|
|
27
31
|
process.exitCode = 1;
|
|
28
32
|
return;
|
|
29
33
|
}
|