@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/search.js
CHANGED
|
@@ -10,10 +10,14 @@ const refs_1 = require("../refs");
|
|
|
10
10
|
const CREATOR_USERNAME_FILTER_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
11
11
|
function parseSearchKind(raw) {
|
|
12
12
|
if (!raw || raw.trim().length === 0) {
|
|
13
|
-
return
|
|
13
|
+
return "all";
|
|
14
14
|
}
|
|
15
15
|
const normalized = raw.trim().toLowerCase();
|
|
16
|
-
if (normalized ===
|
|
16
|
+
if (normalized === "app" ||
|
|
17
|
+
normalized === "asset" ||
|
|
18
|
+
normalized === "asset-pack" ||
|
|
19
|
+
normalized === "asset-spec" ||
|
|
20
|
+
normalized === "all") {
|
|
17
21
|
return normalized;
|
|
18
22
|
}
|
|
19
23
|
return null;
|
|
@@ -22,11 +26,11 @@ function parsePositiveInteger(raw, label, fallback) {
|
|
|
22
26
|
if (raw === undefined) {
|
|
23
27
|
return fallback;
|
|
24
28
|
}
|
|
25
|
-
const parsed = typeof raw ===
|
|
29
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
26
30
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
27
31
|
return null;
|
|
28
32
|
}
|
|
29
|
-
if (label ===
|
|
33
|
+
if (label === "limit" && parsed <= 0) {
|
|
30
34
|
return null;
|
|
31
35
|
}
|
|
32
36
|
return parsed;
|
|
@@ -35,9 +39,9 @@ function parseAssetCategory(raw) {
|
|
|
35
39
|
if (!raw || raw.trim().length === 0) {
|
|
36
40
|
return undefined;
|
|
37
41
|
}
|
|
38
|
-
const normalized = raw.trim().toUpperCase().replace(/[-\s]/g,
|
|
39
|
-
if (normalized ===
|
|
40
|
-
return
|
|
42
|
+
const normalized = raw.trim().toUpperCase().replace(/[-\s]/g, "_");
|
|
43
|
+
if (normalized === "3D" || normalized === "MODEL3D") {
|
|
44
|
+
return "MODEL_3D";
|
|
41
45
|
}
|
|
42
46
|
if (types_1.ASSET_CATEGORY_VALUES.includes(normalized)) {
|
|
43
47
|
return normalized;
|
|
@@ -62,33 +66,33 @@ function parseSearchSort(raw) {
|
|
|
62
66
|
return null;
|
|
63
67
|
}
|
|
64
68
|
function toSearchItem(result) {
|
|
65
|
-
if (result.kind ===
|
|
69
|
+
if (result.kind === "app") {
|
|
66
70
|
return {
|
|
67
|
-
kind:
|
|
71
|
+
kind: "app",
|
|
68
72
|
ref: `${result.app.creatorUsername}/app/${result.app.name}`,
|
|
69
73
|
targetPath: result.targetPath,
|
|
70
74
|
item: result.app,
|
|
71
75
|
};
|
|
72
76
|
}
|
|
73
|
-
if (result.kind ===
|
|
77
|
+
if (result.kind === "asset") {
|
|
74
78
|
return {
|
|
75
|
-
kind:
|
|
79
|
+
kind: "asset",
|
|
76
80
|
ref: `${result.asset.creatorUsername}/asset/${result.asset.name}`,
|
|
77
81
|
targetPath: result.targetPath,
|
|
78
82
|
item: result.asset,
|
|
79
83
|
};
|
|
80
84
|
}
|
|
81
|
-
if (result.kind ===
|
|
85
|
+
if (result.kind === "asset-spec") {
|
|
82
86
|
return {
|
|
83
|
-
kind:
|
|
87
|
+
kind: "asset-spec",
|
|
84
88
|
ref: `${result.assetSpec.creatorUsername}/asset-spec/${result.assetSpec.name}`,
|
|
85
89
|
targetPath: result.targetPath,
|
|
86
90
|
item: result.assetSpec,
|
|
87
91
|
};
|
|
88
92
|
}
|
|
89
|
-
if (result.kind ===
|
|
93
|
+
if (result.kind === "pack") {
|
|
90
94
|
return {
|
|
91
|
-
kind:
|
|
95
|
+
kind: "asset-pack",
|
|
92
96
|
ref: `${result.pack.creatorUsername}/asset-pack/${result.pack.name}`,
|
|
93
97
|
targetPath: result.targetPath,
|
|
94
98
|
item: result.pack,
|
|
@@ -97,58 +101,60 @@ function toSearchItem(result) {
|
|
|
97
101
|
return null;
|
|
98
102
|
}
|
|
99
103
|
function itemSummary(item) {
|
|
100
|
-
if (item.kind ===
|
|
104
|
+
if (item.kind === "app") {
|
|
101
105
|
return item.item.type.toLowerCase();
|
|
102
106
|
}
|
|
103
|
-
if (item.kind ===
|
|
107
|
+
if (item.kind === "asset") {
|
|
104
108
|
const subcategory = item.item.currentVersion?.subcategory;
|
|
105
109
|
return subcategory ? `${item.item.category.toLowerCase()}/${subcategory}` : item.item.category.toLowerCase();
|
|
106
110
|
}
|
|
107
|
-
if (item.kind ===
|
|
108
|
-
return item.item.currentVersionRef
|
|
111
|
+
if (item.kind === "asset-spec") {
|
|
112
|
+
return item.item.currentVersionRef
|
|
113
|
+
? `current ${item.item.currentVersionRef.split("@")[1] ?? "none"}`
|
|
114
|
+
: "no current version";
|
|
109
115
|
}
|
|
110
|
-
return
|
|
116
|
+
return "asset-pack";
|
|
111
117
|
}
|
|
112
118
|
function formatCountValue(value) {
|
|
113
|
-
return value.toLocaleString(
|
|
119
|
+
return value.toLocaleString("en-US");
|
|
114
120
|
}
|
|
115
121
|
function buildCountsSuffix(item) {
|
|
116
122
|
const parts = [];
|
|
117
|
-
if (item.kind ===
|
|
118
|
-
if (typeof item.item.viewCount ===
|
|
123
|
+
if (item.kind === "app" && typeof item.item.playCount === "number") {
|
|
124
|
+
if (typeof item.item.viewCount === "number") {
|
|
119
125
|
parts.push(`view ${formatCountValue(item.item.viewCount)}`);
|
|
120
126
|
}
|
|
121
127
|
parts.push(`launch ${formatCountValue(item.item.playCount)}`);
|
|
122
128
|
}
|
|
123
|
-
if (item.kind ===
|
|
124
|
-
if (typeof item.item.viewCount ===
|
|
129
|
+
if (item.kind === "asset") {
|
|
130
|
+
if (typeof item.item.viewCount === "number") {
|
|
125
131
|
parts.push(`view ${formatCountValue(item.item.viewCount)}`);
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
|
-
if (item.kind ===
|
|
134
|
+
if (item.kind === "asset-pack" && typeof item.item.downloadCount === "number") {
|
|
129
135
|
parts.push(`download ${formatCountValue(item.item.downloadCount)}`);
|
|
130
136
|
}
|
|
131
|
-
if (item.kind ===
|
|
137
|
+
if (item.kind === "asset-spec") {
|
|
132
138
|
parts.push(`assets ${formatCountValue(item.item.publicAssetCount)}`);
|
|
133
139
|
parts.push(`apps ${formatCountValue(item.item.supportingAppCount)}`);
|
|
134
140
|
if (item.item.documentationAvailable) {
|
|
135
|
-
parts.push(
|
|
141
|
+
parts.push("docs yes");
|
|
136
142
|
}
|
|
137
|
-
return ` | ${parts.join(
|
|
143
|
+
return ` | ${parts.join(" | ")}`;
|
|
138
144
|
}
|
|
139
|
-
if (typeof item.item.likeCount ===
|
|
145
|
+
if (typeof item.item.likeCount === "number") {
|
|
140
146
|
parts.push(`like ${formatCountValue(item.item.likeCount)}`);
|
|
141
147
|
}
|
|
142
|
-
if (typeof item.item.remixCount ===
|
|
148
|
+
if (typeof item.item.remixCount === "number") {
|
|
143
149
|
parts.push(`remix ${formatCountValue(item.item.remixCount)}`);
|
|
144
150
|
}
|
|
145
|
-
if (typeof item.item.commentCount ===
|
|
151
|
+
if (typeof item.item.commentCount === "number") {
|
|
146
152
|
parts.push(`comment ${formatCountValue(item.item.commentCount)}`);
|
|
147
153
|
}
|
|
148
|
-
return parts.length > 0 ? ` | ${parts.join(
|
|
154
|
+
return parts.length > 0 ? ` | ${parts.join(" | ")}` : "";
|
|
149
155
|
}
|
|
150
156
|
function normalizeOptionalString(value) {
|
|
151
|
-
if (typeof value !==
|
|
157
|
+
if (typeof value !== "string") {
|
|
152
158
|
return undefined;
|
|
153
159
|
}
|
|
154
160
|
const normalized = value.trim();
|
|
@@ -161,10 +167,10 @@ function normalizeTagFilters(rawTags) {
|
|
|
161
167
|
const normalizedRefs = [];
|
|
162
168
|
const seenRefs = new Set();
|
|
163
169
|
for (const rawTag of rawTags) {
|
|
164
|
-
if (typeof rawTag !==
|
|
170
|
+
if (typeof rawTag !== "string" || rawTag.trim().length === 0) {
|
|
165
171
|
return null;
|
|
166
172
|
}
|
|
167
|
-
let normalizedRef =
|
|
173
|
+
let normalizedRef = "";
|
|
168
174
|
try {
|
|
169
175
|
normalizedRef = (0, types_1.normalizeTagRef)(rawTag);
|
|
170
176
|
}
|
|
@@ -185,18 +191,18 @@ function normalizeTagFilters(rawTags) {
|
|
|
185
191
|
function buildTagSuffix(tags) {
|
|
186
192
|
const normalizedTags = Array.isArray(tags) ? tags : [];
|
|
187
193
|
if (normalizedTags.length === 0) {
|
|
188
|
-
return
|
|
194
|
+
return "";
|
|
189
195
|
}
|
|
190
196
|
const label = normalizedTags
|
|
191
197
|
.slice(0, 3)
|
|
192
198
|
.map((tag) => tag.ref)
|
|
193
|
-
.join(
|
|
199
|
+
.join(", ");
|
|
194
200
|
return ` | tags ${label}`;
|
|
195
201
|
}
|
|
196
202
|
function buildSearchRequest(input) {
|
|
197
203
|
return {
|
|
198
204
|
q: input.trimmedQuery,
|
|
199
|
-
mode:
|
|
205
|
+
mode: "flat",
|
|
200
206
|
kind: (0, refs_1.contentKindToSearchKind)(input.kind),
|
|
201
207
|
page: 1,
|
|
202
208
|
pageSize: input.limit + input.offset,
|
|
@@ -217,127 +223,138 @@ function buildSearchRequest(input) {
|
|
|
217
223
|
};
|
|
218
224
|
}
|
|
219
225
|
async function search(query, options = {}) {
|
|
220
|
-
const trimmedQuery = typeof query ===
|
|
226
|
+
const trimmedQuery = typeof query === "string" ? query.trim() : "";
|
|
221
227
|
const creatorUsername = normalizeOptionalString(options.creator)?.toLowerCase();
|
|
222
228
|
if (creatorUsername && !CREATOR_USERNAME_FILTER_REGEX.test(creatorUsername)) {
|
|
223
|
-
(0, messages_1.printErrorWithHelp)(
|
|
229
|
+
(0, messages_1.printErrorWithHelp)("The --creator value is invalid.", ["Use a creator username like playdrop or olivier-dev."], {
|
|
230
|
+
command: "search",
|
|
231
|
+
});
|
|
224
232
|
process.exitCode = 1;
|
|
225
233
|
return;
|
|
226
234
|
}
|
|
227
|
-
const hasScopeFilters = Boolean(creatorUsername)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
const hasScopeFilters = Boolean(creatorUsername) ||
|
|
236
|
+
Boolean(options.appType) ||
|
|
237
|
+
Boolean(options.auth) ||
|
|
238
|
+
Boolean(options.controller) ||
|
|
239
|
+
Boolean(options.surface) ||
|
|
240
|
+
Boolean(options.assetCategory) ||
|
|
241
|
+
Boolean(options.assetSubcategory) ||
|
|
242
|
+
Boolean(options.assetSpec) ||
|
|
243
|
+
Boolean(options.assetSpecOwner) ||
|
|
244
|
+
Boolean(options.assetSpecName) ||
|
|
245
|
+
Boolean(options.packContainsCategory) ||
|
|
246
|
+
Boolean(options.packContainsSubcategory) ||
|
|
247
|
+
(Array.isArray(options.tag) && options.tag.length > 0);
|
|
240
248
|
if (!trimmedQuery && !hasScopeFilters) {
|
|
241
|
-
(0, messages_1.printErrorWithHelp)(
|
|
249
|
+
(0, messages_1.printErrorWithHelp)("A search query or filter is required.", ['Example: playdrop search "city builder"', "Example: playdrop search --creator playdrop --kind app"], { command: "search" });
|
|
242
250
|
process.exitCode = 1;
|
|
243
251
|
return;
|
|
244
252
|
}
|
|
245
253
|
const kind = parseSearchKind(options.kind);
|
|
246
254
|
if (!kind) {
|
|
247
|
-
(0, messages_1.printErrorWithHelp)(`Kind "${options.kind ??
|
|
255
|
+
(0, messages_1.printErrorWithHelp)(`Kind "${options.kind ?? ""}" is not supported.`, ["Use one of: app, asset, asset-pack, asset-spec, all."], { command: "search" });
|
|
248
256
|
process.exitCode = 1;
|
|
249
257
|
return;
|
|
250
258
|
}
|
|
251
|
-
const limit = parsePositiveInteger(options.limit,
|
|
259
|
+
const limit = parsePositiveInteger(options.limit, "limit", 10);
|
|
252
260
|
if (limit === null) {
|
|
253
|
-
(0, messages_1.printErrorWithHelp)(
|
|
261
|
+
(0, messages_1.printErrorWithHelp)("The --limit value must be a positive integer.", ["Example: --limit 10"], { command: "search" });
|
|
254
262
|
process.exitCode = 1;
|
|
255
263
|
return;
|
|
256
264
|
}
|
|
257
|
-
const offset = parsePositiveInteger(options.offset,
|
|
265
|
+
const offset = parsePositiveInteger(options.offset, "offset", 0);
|
|
258
266
|
if (offset === null) {
|
|
259
|
-
(0, messages_1.printErrorWithHelp)(
|
|
267
|
+
(0, messages_1.printErrorWithHelp)("The --offset value must be zero or a positive integer.", ["Example: --offset 20"], {
|
|
268
|
+
command: "search",
|
|
269
|
+
});
|
|
260
270
|
process.exitCode = 1;
|
|
261
271
|
return;
|
|
262
272
|
}
|
|
263
273
|
const sort = parseSearchSort(options.sort);
|
|
264
274
|
if (sort === null) {
|
|
265
|
-
(0, messages_1.printErrorWithHelp)(`Sort "${options.sort ??
|
|
275
|
+
(0, messages_1.printErrorWithHelp)(`Sort "${options.sort ?? ""}" is not supported.`, [
|
|
276
|
+
"Use one of: relevance, views, likes, used, newest, updated, downloads, remixes, comments, assets, apps, alpha.",
|
|
277
|
+
], { command: "search" });
|
|
266
278
|
process.exitCode = 1;
|
|
267
279
|
return;
|
|
268
280
|
}
|
|
269
281
|
const appType = options.appType ? (0, types_1.parseAppType)(options.appType.trim().toUpperCase()) : undefined;
|
|
270
282
|
if (options.appType !== undefined && !appType) {
|
|
271
|
-
(0, messages_1.printErrorWithHelp)(`App type "${options.appType}" is not supported.`, [
|
|
283
|
+
(0, messages_1.printErrorWithHelp)(`App type "${options.appType}" is not supported.`, ["Use one of: game, demo, tool, template."], {
|
|
284
|
+
command: "search",
|
|
285
|
+
});
|
|
272
286
|
process.exitCode = 1;
|
|
273
287
|
return;
|
|
274
288
|
}
|
|
275
289
|
const auth = options.auth === undefined ? undefined : (0, types_1.parseAppAuthFilter)(options.auth);
|
|
276
290
|
if (options.auth !== undefined && !auth) {
|
|
277
|
-
(0, messages_1.printErrorWithHelp)(`Auth filter "${options.auth}" is not supported.`, [
|
|
291
|
+
(0, messages_1.printErrorWithHelp)(`Auth filter "${options.auth}" is not supported.`, ["Use one of: required, optional, none."], {
|
|
292
|
+
command: "search",
|
|
293
|
+
});
|
|
278
294
|
process.exitCode = 1;
|
|
279
295
|
return;
|
|
280
296
|
}
|
|
281
297
|
const controller = options.controller === undefined ? undefined : (0, types_1.parseAppControllerFilter)(options.controller);
|
|
282
298
|
if (options.controller !== undefined && !controller) {
|
|
283
|
-
(0, messages_1.printErrorWithHelp)(`Controller filter "${options.controller}" is not supported.`, [
|
|
299
|
+
(0, messages_1.printErrorWithHelp)(`Controller filter "${options.controller}" is not supported.`, ["Use one of: required, optional, none."], { command: "search" });
|
|
284
300
|
process.exitCode = 1;
|
|
285
301
|
return;
|
|
286
302
|
}
|
|
287
303
|
const surface = options.surface === undefined ? undefined : (0, types_1.parseAppSurfaceFilter)(options.surface);
|
|
288
304
|
if (options.surface !== undefined && !surface) {
|
|
289
|
-
(0, messages_1.printErrorWithHelp)(`Surface filter "${options.surface}" is not supported.`, [
|
|
305
|
+
(0, messages_1.printErrorWithHelp)(`Surface filter "${options.surface}" is not supported.`, ["Use one of: desktop, mobile-portrait, mobile-landscape."], { command: "search" });
|
|
290
306
|
process.exitCode = 1;
|
|
291
307
|
return;
|
|
292
308
|
}
|
|
293
309
|
const hasCapabilityFilters = Boolean(auth || controller || surface);
|
|
294
|
-
if (hasCapabilityFilters && kind !==
|
|
295
|
-
(0, messages_1.printErrorWithHelp)(
|
|
310
|
+
if (hasCapabilityFilters && kind !== "all" && kind !== "app") {
|
|
311
|
+
(0, messages_1.printErrorWithHelp)("Capability filters only support app search.", ["Use --kind app, or omit --kind to search across app results only."], { command: "search" });
|
|
296
312
|
process.exitCode = 1;
|
|
297
313
|
return;
|
|
298
314
|
}
|
|
299
315
|
const assetCategory = parseAssetCategory(options.assetCategory);
|
|
300
316
|
if (assetCategory === null) {
|
|
301
|
-
(0, messages_1.printErrorWithHelp)(`Asset category "${options.assetCategory}" is not supported.`, [
|
|
317
|
+
(0, messages_1.printErrorWithHelp)(`Asset category "${options.assetCategory}" is not supported.`, ["Use a canonical asset category like IMAGE, VIDEO, AUDIO, SPRITESHEET, or MODEL_3D."], { command: "search" });
|
|
302
318
|
process.exitCode = 1;
|
|
303
319
|
return;
|
|
304
320
|
}
|
|
305
321
|
const assetSubcategory = parseAssetSubcategory(options.assetSubcategory);
|
|
306
322
|
if (assetSubcategory === null) {
|
|
307
|
-
(0, messages_1.printErrorWithHelp)(`Asset subcategory "${options.assetSubcategory}" is invalid.`, [
|
|
323
|
+
(0, messages_1.printErrorWithHelp)(`Asset subcategory "${options.assetSubcategory}" is invalid.`, ["Use lowercase slug values like generic, avatar, music, or sfx."], { command: "search" });
|
|
308
324
|
process.exitCode = 1;
|
|
309
325
|
return;
|
|
310
326
|
}
|
|
311
327
|
const packContainsCategory = parseAssetCategory(options.packContainsCategory);
|
|
312
328
|
if (packContainsCategory === null) {
|
|
313
|
-
(0, messages_1.printErrorWithHelp)(`Pack category "${options.packContainsCategory}" is not supported.`, [
|
|
329
|
+
(0, messages_1.printErrorWithHelp)(`Pack category "${options.packContainsCategory}" is not supported.`, ["Use a canonical asset category like IMAGE, VIDEO, AUDIO, SPRITESHEET, or MODEL_3D."], { command: "search" });
|
|
314
330
|
process.exitCode = 1;
|
|
315
331
|
return;
|
|
316
332
|
}
|
|
317
333
|
const packContainsSubcategory = parseAssetSubcategory(options.packContainsSubcategory);
|
|
318
334
|
if (packContainsSubcategory === null) {
|
|
319
|
-
(0, messages_1.printErrorWithHelp)(`Pack subcategory "${options.packContainsSubcategory}" is invalid.`, [
|
|
335
|
+
(0, messages_1.printErrorWithHelp)(`Pack subcategory "${options.packContainsSubcategory}" is invalid.`, ["Use lowercase slug values like generic, avatar, music, or sfx."], { command: "search" });
|
|
320
336
|
process.exitCode = 1;
|
|
321
337
|
return;
|
|
322
338
|
}
|
|
323
|
-
if (hasCapabilityFilters &&
|
|
324
|
-
||
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
339
|
+
if (hasCapabilityFilters &&
|
|
340
|
+
(assetCategory ||
|
|
341
|
+
assetSubcategory ||
|
|
342
|
+
normalizeOptionalString(options.assetSpec) ||
|
|
343
|
+
normalizeOptionalString(options.assetSpecOwner) ||
|
|
344
|
+
normalizeOptionalString(options.assetSpecName) ||
|
|
345
|
+
packContainsCategory ||
|
|
346
|
+
packContainsSubcategory)) {
|
|
347
|
+
(0, messages_1.printErrorWithHelp)("Capability filters cannot be combined with asset or pack search filters.", ["Use app search filters only when passing --auth, --surface, or --controller."], { command: "search" });
|
|
331
348
|
process.exitCode = 1;
|
|
332
349
|
return;
|
|
333
350
|
}
|
|
334
351
|
const tags = normalizeTagFilters(options.tag);
|
|
335
352
|
if (tags === null) {
|
|
336
|
-
(0, messages_1.printErrorWithHelp)(
|
|
353
|
+
(0, messages_1.printErrorWithHelp)("The --tag value is invalid.", ["Use canonical refs like theme/pirate or visual-style/pixel-art.", "Pass at most 5 unique tag refs."], { command: "search" });
|
|
337
354
|
process.exitCode = 1;
|
|
338
355
|
return;
|
|
339
356
|
}
|
|
340
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
357
|
+
await (0, commandContext_1.withPublicEnvironment)("search", async ({ client }) => {
|
|
341
358
|
try {
|
|
342
359
|
const response = await client.search(buildSearchRequest({
|
|
343
360
|
trimmedQuery,
|
|
@@ -374,11 +391,11 @@ async function search(query, options = {}) {
|
|
|
374
391
|
return;
|
|
375
392
|
}
|
|
376
393
|
if (items.length === 0) {
|
|
377
|
-
console.log(trimmedQuery ? `No results found for "${trimmedQuery}".` :
|
|
394
|
+
console.log(trimmedQuery ? `No results found for "${trimmedQuery}".` : "No results found.");
|
|
378
395
|
console.log('Next: adjust your filters or run "playdrop browse" to explore available content.');
|
|
379
396
|
return;
|
|
380
397
|
}
|
|
381
|
-
console.log(trimmedQuery ? `Search results for "${trimmedQuery}":\n` :
|
|
398
|
+
console.log(trimmedQuery ? `Search results for "${trimmedQuery}":\n` : "Search results:\n");
|
|
382
399
|
for (const [index, item] of items.entries()) {
|
|
383
400
|
const displayName = item.item.displayName || item.item.name;
|
|
384
401
|
console.log(`${index + 1}. [${item.kind}] ${item.ref} | ${displayName} | @${item.item.creatorUsername} | ${itemSummary(item)}${buildCountsSuffix(item)}${buildTagSuffix(item.item.tags)}`);
|
|
@@ -386,17 +403,19 @@ async function search(query, options = {}) {
|
|
|
386
403
|
console.log('\nNext: run "playdrop detail <creator>/<kind>/<name>" to inspect one result.');
|
|
387
404
|
}
|
|
388
405
|
catch (error) {
|
|
389
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
406
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "search", "Search", {
|
|
390
407
|
apiMessage: (apiError) => {
|
|
391
|
-
if (apiError.code ===
|
|
408
|
+
if (apiError.code === "invalid_tag_ref" ||
|
|
409
|
+
apiError.code === "duplicate_tag_ref" ||
|
|
410
|
+
apiError.code === "tag_filter_limit_exceeded") {
|
|
392
411
|
return {
|
|
393
|
-
problem:
|
|
394
|
-
suggestions: [
|
|
412
|
+
problem: "One or more tag filters are invalid.",
|
|
413
|
+
suggestions: ["Use canonical refs like theme/pirate.", "Pass at most 5 unique --tag values."],
|
|
395
414
|
};
|
|
396
415
|
}
|
|
397
416
|
return {
|
|
398
417
|
problem: `Search failed with status ${apiError.status}.`,
|
|
399
|
-
suggestions: [
|
|
418
|
+
suggestions: ["Retry in a moment.", 'Use "playdrop help search" for usage details.'],
|
|
400
419
|
};
|
|
401
420
|
},
|
|
402
421
|
});
|
package/dist/commands/tags.js
CHANGED
|
@@ -5,38 +5,36 @@ const types_1 = require("@playdrop/types");
|
|
|
5
5
|
const commandContext_1 = require("../commandContext");
|
|
6
6
|
const messages_1 = require("../messages");
|
|
7
7
|
function normalizeGroupSlug(value) {
|
|
8
|
-
const normalized = typeof value ===
|
|
8
|
+
const normalized = typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
9
9
|
return normalized.length > 0 ? normalized : null;
|
|
10
10
|
}
|
|
11
11
|
function normalizeTargetKind(value) {
|
|
12
|
-
const normalized = typeof value ===
|
|
12
|
+
const normalized = typeof value === "string" ? value.trim().toUpperCase() : "";
|
|
13
13
|
if (!normalized) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
return types_1.SAVED_ITEM_KIND_VALUES.includes(normalized)
|
|
17
|
-
? normalized
|
|
18
|
-
: null;
|
|
16
|
+
return types_1.SAVED_ITEM_KIND_VALUES.includes(normalized) ? normalized : null;
|
|
19
17
|
}
|
|
20
18
|
function formatAllowedTargetKinds(kinds) {
|
|
21
19
|
if (!Array.isArray(kinds) || kinds.length === 0) {
|
|
22
|
-
return
|
|
20
|
+
return "all";
|
|
23
21
|
}
|
|
24
|
-
return kinds.join(
|
|
22
|
+
return kinds.join(", ");
|
|
25
23
|
}
|
|
26
24
|
async function browseTags(options) {
|
|
27
25
|
const groupSlug = normalizeGroupSlug(options.group);
|
|
28
26
|
const targetKind = normalizeTargetKind(options.kind);
|
|
29
27
|
if (options.group && (!groupSlug || !(0, types_1.isValidTagSlug)(groupSlug))) {
|
|
30
|
-
(0, messages_1.printErrorWithHelp)(`Invalid group slug "${options.group}".`, [
|
|
28
|
+
(0, messages_1.printErrorWithHelp)(`Invalid group slug "${options.group}".`, ["Use lowercase letters, numbers, and hyphens only."], { command: "tags browse" });
|
|
31
29
|
process.exitCode = 1;
|
|
32
30
|
return;
|
|
33
31
|
}
|
|
34
32
|
if (options.kind && !targetKind) {
|
|
35
|
-
(0, messages_1.printErrorWithHelp)(`Unsupported target kind "${options.kind}".`, [`Use one of: ${types_1.SAVED_ITEM_KIND_VALUES.join(
|
|
33
|
+
(0, messages_1.printErrorWithHelp)(`Unsupported target kind "${options.kind}".`, [`Use one of: ${types_1.SAVED_ITEM_KIND_VALUES.join(", ")}.`], { command: "tags browse" });
|
|
36
34
|
process.exitCode = 1;
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
39
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
37
|
+
await (0, commandContext_1.withPublicEnvironment)("tags browse", async ({ client }) => {
|
|
40
38
|
const response = await client.fetchTags({
|
|
41
39
|
...(groupSlug ? { groupSlug } : {}),
|
|
42
40
|
...(targetKind ? { targetKind } : {}),
|
|
@@ -46,12 +44,12 @@ async function browseTags(options) {
|
|
|
46
44
|
return;
|
|
47
45
|
}
|
|
48
46
|
if (response.groups.length === 0) {
|
|
49
|
-
console.log(
|
|
47
|
+
console.log("No tags found.");
|
|
50
48
|
return;
|
|
51
49
|
}
|
|
52
50
|
for (const [groupIndex, group] of response.groups.entries()) {
|
|
53
51
|
if (groupIndex > 0) {
|
|
54
|
-
console.log(
|
|
52
|
+
console.log("");
|
|
55
53
|
}
|
|
56
54
|
console.log(`${group.displayName} (${group.slug})`);
|
|
57
55
|
console.log(`Allowed targets: ${formatAllowedTargetKinds(group.allowedTargetKinds)}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppResponse } from
|
|
2
|
-
import type { TaskCaptureSession } from
|
|
3
|
-
import type { ResolvedWorkspaceAuthConfig } from
|
|
1
|
+
import type { AppResponse } from "@playdrop/types";
|
|
2
|
+
import type { TaskCaptureSession } from "../appUrls";
|
|
3
|
+
import type { ResolvedWorkspaceAuthConfig } from "../workspaceAuth";
|
|
4
4
|
export declare function resolveTaskCaptureSession(workspaceAuth: ResolvedWorkspaceAuthConfig | null, app: AppResponse): TaskCaptureSession | null;
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.resolveTaskCaptureSession = resolveTaskCaptureSession;
|
|
4
4
|
function resolveTaskCaptureSession(workspaceAuth, app) {
|
|
5
5
|
const taskId = workspaceAuth?.config.taskId;
|
|
6
|
-
const taskToken = workspaceAuth?.config.taskToken?.trim() ??
|
|
6
|
+
const taskToken = workspaceAuth?.config.taskToken?.trim() ?? "";
|
|
7
7
|
if (taskId === undefined && !taskToken) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
if (!Number.isInteger(taskId) || Number(taskId) <= 0 || !taskToken) {
|
|
11
|
-
throw new Error(
|
|
11
|
+
throw new Error("worker_capture_session_incomplete");
|
|
12
12
|
}
|
|
13
13
|
if (!Number.isInteger(app.id) || Number(app.id) <= 0) {
|
|
14
|
-
throw new Error(
|
|
14
|
+
throw new Error("registered_app_id_missing");
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
17
|
appId: Number(app.id),
|
package/dist/commands/tweaks.js
CHANGED
|
@@ -9,37 +9,39 @@ const errors_1 = require("../errors");
|
|
|
9
9
|
const messages_1 = require("../messages");
|
|
10
10
|
const output_1 = require("../output");
|
|
11
11
|
function tweakApiMessage(error) {
|
|
12
|
-
if (error.code ===
|
|
13
|
-
const latestVersion = typeof error.details?.[
|
|
14
|
-
const latestId = typeof error.details?.[
|
|
15
|
-
const latestVisibility = typeof error.details?.[
|
|
12
|
+
if (error.code === "creator_latest_private_version_required") {
|
|
13
|
+
const latestVersion = typeof error.details?.["latestVersion"] === "string" ? error.details["latestVersion"] : null;
|
|
14
|
+
const latestId = typeof error.details?.["latestId"] === "string" ? error.details["latestId"] : null;
|
|
15
|
+
const latestVisibility = typeof error.details?.["latestVisibility"] === "string" ? error.details["latestVisibility"] : null;
|
|
16
16
|
return {
|
|
17
|
-
problem: latestVersion && latestVisibility ===
|
|
17
|
+
problem: latestVersion && latestVisibility === "PUBLIC"
|
|
18
18
|
? `The latest tweak base, ${latestVersion}, is live and cannot be edited.`
|
|
19
19
|
: latestVersion
|
|
20
20
|
? `Tweaks can only be changed on the latest editable version, ${latestVersion}.`
|
|
21
|
-
:
|
|
22
|
-
suggestions: latestVersion && latestVisibility ===
|
|
23
|
-
? [`Create a new private version based on ${latestId ??
|
|
24
|
-
: latestId
|
|
21
|
+
: "This app has no editable tweak base version.",
|
|
22
|
+
suggestions: latestVersion && latestVisibility === "PUBLIC"
|
|
23
|
+
? [`Create a new private version based on ${latestId ?? "the latest tweak state"}, then tune that version.`]
|
|
24
|
+
: latestId
|
|
25
|
+
? [`Latest tweak state: ${latestId}`]
|
|
26
|
+
: [],
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
return { problem: `PlayDrop rejected the tweak request: ${error.code ?? error.message} (HTTP ${error.status}).` };
|
|
28
30
|
}
|
|
29
31
|
function parseAppVersionRef(raw, command) {
|
|
30
|
-
const ref = (0, types_1.parseContentVersionRef)(raw ??
|
|
31
|
-
if (!ref || ref.kind !==
|
|
32
|
-
(0, messages_1.printErrorWithHelp)(
|
|
32
|
+
const ref = (0, types_1.parseContentVersionRef)(raw ?? "");
|
|
33
|
+
if (!ref || ref.kind !== "app") {
|
|
34
|
+
(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 });
|
|
33
35
|
process.exitCode = 1;
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
36
38
|
return ref;
|
|
37
39
|
}
|
|
38
40
|
async function getTweaks(rawRef, options = {}) {
|
|
39
|
-
const ref = parseAppVersionRef(rawRef,
|
|
41
|
+
const ref = parseAppVersionRef(rawRef, "tweaks get");
|
|
40
42
|
if (!ref)
|
|
41
43
|
return;
|
|
42
|
-
await (0, commandContext_1.withEnvironment)(
|
|
44
|
+
await (0, commandContext_1.withEnvironment)("tweaks get", "Reading tweaks", async ({ client }) => {
|
|
43
45
|
try {
|
|
44
46
|
const snapshot = await client.getAppTweaks(ref.creatorUsername, ref.name, ref.version);
|
|
45
47
|
if (options.json) {
|
|
@@ -50,33 +52,33 @@ async function getTweaks(rawRef, options = {}) {
|
|
|
50
52
|
console.log(JSON.stringify(snapshot.values, null, 2));
|
|
51
53
|
}
|
|
52
54
|
catch (error) {
|
|
53
|
-
if (!(0, errors_1.handleCommandFailure)(error,
|
|
55
|
+
if (!(0, errors_1.handleCommandFailure)(error, "tweaks get", "Read tweaks", { apiMessage: tweakApiMessage }))
|
|
54
56
|
throw error;
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
59
|
}
|
|
58
60
|
async function replaceTweaks(rawRef, file, options = {}) {
|
|
59
|
-
const ref = parseAppVersionRef(rawRef,
|
|
61
|
+
const ref = parseAppVersionRef(rawRef, "tweaks replace");
|
|
60
62
|
if (!ref)
|
|
61
63
|
return;
|
|
62
64
|
if (!file?.trim()) {
|
|
63
|
-
(0, messages_1.printErrorWithHelp)(
|
|
65
|
+
(0, messages_1.printErrorWithHelp)("A JSON file is required.", ["Pass --file <path>."], { command: "tweaks replace" });
|
|
64
66
|
process.exitCode = 1;
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
let values;
|
|
68
70
|
try {
|
|
69
|
-
const parsed = JSON.parse((0, node_fs_1.readFileSync)(file,
|
|
70
|
-
if (!parsed || typeof parsed !==
|
|
71
|
-
throw new Error(
|
|
71
|
+
const parsed = JSON.parse((0, node_fs_1.readFileSync)(file, "utf8"));
|
|
72
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
73
|
+
throw new Error("not_object");
|
|
72
74
|
values = parsed;
|
|
73
75
|
}
|
|
74
76
|
catch {
|
|
75
|
-
(0, messages_1.printErrorWithHelp)(`Could not read a JSON object from ${file}.`, [], { command:
|
|
77
|
+
(0, messages_1.printErrorWithHelp)(`Could not read a JSON object from ${file}.`, [], { command: "tweaks replace" });
|
|
76
78
|
process.exitCode = 1;
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
|
-
await (0, commandContext_1.withEnvironment)(
|
|
81
|
+
await (0, commandContext_1.withEnvironment)("tweaks replace", "Replacing tweaks", async ({ client }) => {
|
|
80
82
|
try {
|
|
81
83
|
const snapshot = await client.replaceAppTweaks(ref.creatorUsername, ref.name, ref.version, values);
|
|
82
84
|
if (options.json) {
|
|
@@ -86,7 +88,7 @@ async function replaceTweaks(rawRef, file, options = {}) {
|
|
|
86
88
|
(0, output_1.printSuccess)(`Tweaks replaced. New state: ${snapshot.id}`);
|
|
87
89
|
}
|
|
88
90
|
catch (error) {
|
|
89
|
-
if (!(0, errors_1.handleCommandFailure)(error,
|
|
91
|
+
if (!(0, errors_1.handleCommandFailure)(error, "tweaks replace", "Replace tweaks", { apiMessage: tweakApiMessage }))
|
|
90
92
|
throw error;
|
|
91
93
|
}
|
|
92
94
|
});
|