@playdrop/playdrop-cli 0.16.5 → 0.16.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/browse.js
CHANGED
|
@@ -11,24 +11,28 @@ const refs_1 = require("../refs");
|
|
|
11
11
|
const MERGED_PAGE_SIZE = 100;
|
|
12
12
|
function parseBrowseKind(raw) {
|
|
13
13
|
if (!raw || raw.trim().length === 0) {
|
|
14
|
-
return
|
|
14
|
+
return "all";
|
|
15
15
|
}
|
|
16
16
|
const normalized = raw.trim().toLowerCase();
|
|
17
|
-
if (normalized ===
|
|
17
|
+
if (normalized === "app" ||
|
|
18
|
+
normalized === "asset" ||
|
|
19
|
+
normalized === "asset-pack" ||
|
|
20
|
+
normalized === "asset-spec" ||
|
|
21
|
+
normalized === "all") {
|
|
18
22
|
return normalized;
|
|
19
23
|
}
|
|
20
24
|
return null;
|
|
21
25
|
}
|
|
22
26
|
function parseBrowseCreator(raw) {
|
|
23
27
|
if (!raw || raw.trim().length === 0) {
|
|
24
|
-
return
|
|
28
|
+
return "all";
|
|
25
29
|
}
|
|
26
30
|
const normalized = raw.trim();
|
|
27
31
|
const lowered = normalized.toLowerCase();
|
|
28
|
-
if (lowered ===
|
|
32
|
+
if (lowered === "all" || lowered === "me") {
|
|
29
33
|
return lowered;
|
|
30
34
|
}
|
|
31
|
-
if (normalized.includes(
|
|
35
|
+
if (normalized.includes("/") || normalized.includes("\\") || normalized.includes("..")) {
|
|
32
36
|
return null;
|
|
33
37
|
}
|
|
34
38
|
return normalized;
|
|
@@ -37,11 +41,11 @@ function parsePositiveInteger(raw, label, fallback) {
|
|
|
37
41
|
if (raw === undefined) {
|
|
38
42
|
return fallback;
|
|
39
43
|
}
|
|
40
|
-
const parsed = typeof raw ===
|
|
44
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
41
45
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
42
46
|
return null;
|
|
43
47
|
}
|
|
44
|
-
if (label ===
|
|
48
|
+
if (label === "limit" && parsed <= 0) {
|
|
45
49
|
return null;
|
|
46
50
|
}
|
|
47
51
|
return parsed;
|
|
@@ -50,9 +54,9 @@ function parseAssetCategory(raw) {
|
|
|
50
54
|
if (!raw || raw.trim().length === 0) {
|
|
51
55
|
return undefined;
|
|
52
56
|
}
|
|
53
|
-
const normalized = raw.trim().toUpperCase().replace(/[-\s]/g,
|
|
54
|
-
if (normalized ===
|
|
55
|
-
return
|
|
57
|
+
const normalized = raw.trim().toUpperCase().replace(/[-\s]/g, "_");
|
|
58
|
+
if (normalized === "3D" || normalized === "MODEL3D") {
|
|
59
|
+
return "MODEL_3D";
|
|
56
60
|
}
|
|
57
61
|
if (types_1.ASSET_CATEGORY_VALUES.includes(normalized)) {
|
|
58
62
|
return normalized;
|
|
@@ -93,55 +97,57 @@ function toBrowseItem(kind, item) {
|
|
|
93
97
|
};
|
|
94
98
|
}
|
|
95
99
|
function itemSummary(item) {
|
|
96
|
-
if (item.kind ===
|
|
100
|
+
if (item.kind === "app") {
|
|
97
101
|
return item.item.type.toLowerCase();
|
|
98
102
|
}
|
|
99
|
-
if (item.kind ===
|
|
103
|
+
if (item.kind === "asset") {
|
|
100
104
|
const subcategory = item.item.currentVersion?.subcategory;
|
|
101
105
|
return subcategory ? `${item.item.category.toLowerCase()}/${subcategory}` : item.item.category.toLowerCase();
|
|
102
106
|
}
|
|
103
|
-
if (item.kind ===
|
|
104
|
-
return item.item.currentVersionRef
|
|
107
|
+
if (item.kind === "asset-spec") {
|
|
108
|
+
return item.item.currentVersionRef
|
|
109
|
+
? `current ${item.item.currentVersionRef.split("@")[1] ?? "none"}`
|
|
110
|
+
: "no current version";
|
|
105
111
|
}
|
|
106
|
-
return
|
|
112
|
+
return "asset-pack";
|
|
107
113
|
}
|
|
108
114
|
function formatCountValue(value) {
|
|
109
|
-
return value.toLocaleString(
|
|
115
|
+
return value.toLocaleString("en-US");
|
|
110
116
|
}
|
|
111
117
|
function buildCountsSuffix(item) {
|
|
112
118
|
const parts = [];
|
|
113
|
-
if (item.kind ===
|
|
114
|
-
if (typeof item.item.viewCount ===
|
|
119
|
+
if (item.kind === "app" && typeof item.item.playCount === "number") {
|
|
120
|
+
if (typeof item.item.viewCount === "number") {
|
|
115
121
|
parts.push(`view ${formatCountValue(item.item.viewCount)}`);
|
|
116
122
|
}
|
|
117
123
|
parts.push(`launch ${formatCountValue(item.item.playCount)}`);
|
|
118
124
|
}
|
|
119
|
-
if (item.kind ===
|
|
120
|
-
if (typeof item.item.viewCount ===
|
|
125
|
+
if (item.kind === "asset") {
|
|
126
|
+
if (typeof item.item.viewCount === "number") {
|
|
121
127
|
parts.push(`view ${formatCountValue(item.item.viewCount)}`);
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
|
-
if (item.kind ===
|
|
130
|
+
if (item.kind === "asset-pack" && typeof item.item.downloadCount === "number") {
|
|
125
131
|
parts.push(`download ${formatCountValue(item.item.downloadCount)}`);
|
|
126
132
|
}
|
|
127
|
-
if (item.kind ===
|
|
133
|
+
if (item.kind === "asset-spec") {
|
|
128
134
|
parts.push(`assets ${formatCountValue(item.item.publicAssetCount)}`);
|
|
129
135
|
parts.push(`apps ${formatCountValue(item.item.supportingAppCount)}`);
|
|
130
136
|
if (item.item.documentationAvailable) {
|
|
131
|
-
parts.push(
|
|
137
|
+
parts.push("docs yes");
|
|
132
138
|
}
|
|
133
|
-
return ` | ${parts.join(
|
|
139
|
+
return ` | ${parts.join(" | ")}`;
|
|
134
140
|
}
|
|
135
|
-
if (typeof item.item.likeCount ===
|
|
141
|
+
if (typeof item.item.likeCount === "number") {
|
|
136
142
|
parts.push(`like ${formatCountValue(item.item.likeCount)}`);
|
|
137
143
|
}
|
|
138
|
-
if (typeof item.item.remixCount ===
|
|
144
|
+
if (typeof item.item.remixCount === "number") {
|
|
139
145
|
parts.push(`remix ${formatCountValue(item.item.remixCount)}`);
|
|
140
146
|
}
|
|
141
|
-
if (typeof item.item.commentCount ===
|
|
147
|
+
if (typeof item.item.commentCount === "number") {
|
|
142
148
|
parts.push(`comment ${formatCountValue(item.item.commentCount)}`);
|
|
143
149
|
}
|
|
144
|
-
return parts.length > 0 ? ` | ${parts.join(
|
|
150
|
+
return parts.length > 0 ? ` | ${parts.join(" | ")}` : "";
|
|
145
151
|
}
|
|
146
152
|
async function collectPaginatedItems(fetchPage) {
|
|
147
153
|
const items = [];
|
|
@@ -155,7 +161,7 @@ async function collectPaginatedItems(fetchPage) {
|
|
|
155
161
|
break;
|
|
156
162
|
}
|
|
157
163
|
if (page.pagination.limit <= 0) {
|
|
158
|
-
throw new Error(
|
|
164
|
+
throw new Error("invalid_pagination_limit");
|
|
159
165
|
}
|
|
160
166
|
offset += page.pagination.limit;
|
|
161
167
|
}
|
|
@@ -183,16 +189,16 @@ function requirePagination(pagination, context) {
|
|
|
183
189
|
return pagination;
|
|
184
190
|
}
|
|
185
191
|
async function resolveCreatorUsername(creator, command, resolveMe) {
|
|
186
|
-
if (creator ===
|
|
192
|
+
if (creator === "all") {
|
|
187
193
|
return null;
|
|
188
194
|
}
|
|
189
|
-
if (creator ===
|
|
195
|
+
if (creator === "me") {
|
|
190
196
|
try {
|
|
191
197
|
return await resolveMe();
|
|
192
198
|
}
|
|
193
199
|
catch (error) {
|
|
194
200
|
if (error instanceof types_1.ApiError && (error.status === 401 || error.status === 403)) {
|
|
195
|
-
(0, messages_1.printLoginRequired)(
|
|
201
|
+
(0, messages_1.printLoginRequired)("Browsing your content", command);
|
|
196
202
|
process.exitCode = 1;
|
|
197
203
|
return null;
|
|
198
204
|
}
|
|
@@ -202,7 +208,7 @@ async function resolveCreatorUsername(creator, command, resolveMe) {
|
|
|
202
208
|
return creator;
|
|
203
209
|
}
|
|
204
210
|
function normalizeOptionalOption(value) {
|
|
205
|
-
if (typeof value !==
|
|
211
|
+
if (typeof value !== "string") {
|
|
206
212
|
return undefined;
|
|
207
213
|
}
|
|
208
214
|
const normalized = value.trim();
|
|
@@ -215,10 +221,10 @@ function normalizeTagFilters(rawTags) {
|
|
|
215
221
|
const normalizedRefs = [];
|
|
216
222
|
const seenRefs = new Set();
|
|
217
223
|
for (const rawTag of rawTags) {
|
|
218
|
-
if (typeof rawTag !==
|
|
224
|
+
if (typeof rawTag !== "string" || rawTag.trim().length === 0) {
|
|
219
225
|
return null;
|
|
220
226
|
}
|
|
221
|
-
let normalizedRef =
|
|
227
|
+
let normalizedRef = "";
|
|
222
228
|
try {
|
|
223
229
|
normalizedRef = (0, types_1.normalizeTagRef)(rawTag);
|
|
224
230
|
}
|
|
@@ -239,34 +245,37 @@ function normalizeTagFilters(rawTags) {
|
|
|
239
245
|
function buildTagSuffix(tags) {
|
|
240
246
|
const normalizedTags = Array.isArray(tags) ? tags : [];
|
|
241
247
|
if (normalizedTags.length === 0) {
|
|
242
|
-
return
|
|
248
|
+
return "";
|
|
243
249
|
}
|
|
244
|
-
return ` | tags ${normalizedTags
|
|
250
|
+
return ` | tags ${normalizedTags
|
|
251
|
+
.slice(0, 3)
|
|
252
|
+
.map((tag) => tag.ref)
|
|
253
|
+
.join(", ")}`;
|
|
245
254
|
}
|
|
246
255
|
function parseBrowseSortOption(rawSort, kind) {
|
|
247
256
|
const sort = parseBrowseSort(rawSort);
|
|
248
257
|
if (sort === null) {
|
|
249
|
-
(0, messages_1.printErrorWithHelp)(`Sort "${rawSort ??
|
|
258
|
+
(0, messages_1.printErrorWithHelp)(`Sort "${rawSort ?? ""}" is not supported.`, ["Use one of: newest, updated, views, likes, used, recent, remixes, comments, assets, apps, alpha."], { command: "browse" });
|
|
250
259
|
process.exitCode = 1;
|
|
251
260
|
return null;
|
|
252
261
|
}
|
|
253
|
-
if (sort && kind ===
|
|
254
|
-
(0, messages_1.printErrorWithHelp)(
|
|
262
|
+
if (sort && kind === "all") {
|
|
263
|
+
(0, messages_1.printErrorWithHelp)("The --sort option is not supported with --kind all.", ["Choose --kind app, --kind asset, or --kind asset-spec when sorting browse results."], { command: "browse" });
|
|
255
264
|
process.exitCode = 1;
|
|
256
265
|
return null;
|
|
257
266
|
}
|
|
258
|
-
if (sort && kind ===
|
|
259
|
-
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for apps.`, [
|
|
267
|
+
if (sort && kind === "app" && !types_1.APP_LIST_SORT_VALUES.includes(sort)) {
|
|
268
|
+
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for apps.`, ["Use one of: newest, updated, views, likes, used."], { command: "browse" });
|
|
260
269
|
process.exitCode = 1;
|
|
261
270
|
return null;
|
|
262
271
|
}
|
|
263
|
-
if (sort && kind ===
|
|
264
|
-
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for asset specs.`, [
|
|
272
|
+
if (sort && kind === "asset-spec" && !types_1.ASSET_SPEC_LIST_SORT_VALUES.includes(sort)) {
|
|
273
|
+
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for asset specs.`, ["Use one of: recent, assets, apps, alpha."], { command: "browse" });
|
|
265
274
|
process.exitCode = 1;
|
|
266
275
|
return null;
|
|
267
276
|
}
|
|
268
|
-
if (sort && kind ===
|
|
269
|
-
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for assets.`, [
|
|
277
|
+
if (sort && kind === "asset" && !types_1.ASSET_LIST_SORT_VALUES.includes(sort)) {
|
|
278
|
+
(0, messages_1.printErrorWithHelp)(`Sort "${sort}" is not supported for assets.`, ["Use one of: recent, likes, remixes, comments."], { command: "browse" });
|
|
270
279
|
process.exitCode = 1;
|
|
271
280
|
return null;
|
|
272
281
|
}
|
|
@@ -275,25 +284,27 @@ function parseBrowseSortOption(rawSort, kind) {
|
|
|
275
284
|
function parseBrowseLimitsAndFilters(options) {
|
|
276
285
|
const assetCategory = parseAssetCategory(options.assetCategory);
|
|
277
286
|
if (assetCategory === null) {
|
|
278
|
-
(0, messages_1.printErrorWithHelp)(`Asset category "${options.assetCategory}" is not supported.`, [
|
|
287
|
+
(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: "browse" });
|
|
279
288
|
process.exitCode = 1;
|
|
280
289
|
return null;
|
|
281
290
|
}
|
|
282
291
|
const assetSubcategory = parseAssetSubcategory(options.assetSubcategory);
|
|
283
292
|
if (assetSubcategory === null) {
|
|
284
|
-
(0, messages_1.printErrorWithHelp)(`Asset subcategory "${options.assetSubcategory}" is invalid.`, [
|
|
293
|
+
(0, messages_1.printErrorWithHelp)(`Asset subcategory "${options.assetSubcategory}" is invalid.`, ["Use lowercase slug values like generic, avatar, music, or sfx."], { command: "browse" });
|
|
285
294
|
process.exitCode = 1;
|
|
286
295
|
return null;
|
|
287
296
|
}
|
|
288
|
-
const limit = parsePositiveInteger(options.limit,
|
|
297
|
+
const limit = parsePositiveInteger(options.limit, "limit", 10);
|
|
289
298
|
if (limit === null) {
|
|
290
|
-
(0, messages_1.printErrorWithHelp)(
|
|
299
|
+
(0, messages_1.printErrorWithHelp)("The --limit value must be a positive integer.", ["Example: --limit 10"], { command: "browse" });
|
|
291
300
|
process.exitCode = 1;
|
|
292
301
|
return null;
|
|
293
302
|
}
|
|
294
|
-
const offset = parsePositiveInteger(options.offset,
|
|
303
|
+
const offset = parsePositiveInteger(options.offset, "offset", 0);
|
|
295
304
|
if (offset === null) {
|
|
296
|
-
(0, messages_1.printErrorWithHelp)(
|
|
305
|
+
(0, messages_1.printErrorWithHelp)("The --offset value must be zero or a positive integer.", ["Example: --offset 20"], {
|
|
306
|
+
command: "browse",
|
|
307
|
+
});
|
|
297
308
|
process.exitCode = 1;
|
|
298
309
|
return null;
|
|
299
310
|
}
|
|
@@ -307,43 +318,49 @@ function parseBrowseLimitsAndFilters(options) {
|
|
|
307
318
|
function parseBrowseCommandOptions(options) {
|
|
308
319
|
const kind = parseBrowseKind(options.kind);
|
|
309
320
|
if (!kind) {
|
|
310
|
-
(0, messages_1.printErrorWithHelp)(`Kind "${options.kind ??
|
|
321
|
+
(0, messages_1.printErrorWithHelp)(`Kind "${options.kind ?? ""}" is not supported.`, ["Use one of: app, asset, asset-pack, asset-spec, all."], { command: "browse" });
|
|
311
322
|
process.exitCode = 1;
|
|
312
323
|
return { ok: false };
|
|
313
324
|
}
|
|
314
325
|
const creator = parseBrowseCreator(options.creator);
|
|
315
326
|
if (!creator) {
|
|
316
|
-
(0, messages_1.printErrorWithHelp)(
|
|
327
|
+
(0, messages_1.printErrorWithHelp)("The --creator value is invalid.", ["Use all, me, or a creator slug without path separators."], {
|
|
328
|
+
command: "browse",
|
|
329
|
+
});
|
|
317
330
|
process.exitCode = 1;
|
|
318
331
|
return { ok: false };
|
|
319
332
|
}
|
|
320
333
|
const appType = options.appType ? (0, types_1.parseAppType)(options.appType.trim().toUpperCase()) : undefined;
|
|
321
334
|
if (options.appType !== undefined && !appType) {
|
|
322
|
-
(0, messages_1.printErrorWithHelp)(`App type "${options.appType}" is not supported.`, [
|
|
335
|
+
(0, messages_1.printErrorWithHelp)(`App type "${options.appType}" is not supported.`, ["Use one of: game, demo, tool, template."], {
|
|
336
|
+
command: "browse",
|
|
337
|
+
});
|
|
323
338
|
process.exitCode = 1;
|
|
324
339
|
return { ok: false };
|
|
325
340
|
}
|
|
326
341
|
const auth = options.auth === undefined ? undefined : (0, types_1.parseAppAuthFilter)(options.auth);
|
|
327
342
|
if (options.auth !== undefined && !auth) {
|
|
328
|
-
(0, messages_1.printErrorWithHelp)(`Auth filter "${options.auth}" is not supported.`, [
|
|
343
|
+
(0, messages_1.printErrorWithHelp)(`Auth filter "${options.auth}" is not supported.`, ["Use one of: required, optional, none."], {
|
|
344
|
+
command: "browse",
|
|
345
|
+
});
|
|
329
346
|
process.exitCode = 1;
|
|
330
347
|
return { ok: false };
|
|
331
348
|
}
|
|
332
349
|
const controller = options.controller === undefined ? undefined : (0, types_1.parseAppControllerFilter)(options.controller);
|
|
333
350
|
if (options.controller !== undefined && !controller) {
|
|
334
|
-
(0, messages_1.printErrorWithHelp)(`Controller filter "${options.controller}" is not supported.`, [
|
|
351
|
+
(0, messages_1.printErrorWithHelp)(`Controller filter "${options.controller}" is not supported.`, ["Use one of: required, optional, none."], { command: "browse" });
|
|
335
352
|
process.exitCode = 1;
|
|
336
353
|
return { ok: false };
|
|
337
354
|
}
|
|
338
355
|
const surface = options.surface === undefined ? undefined : (0, types_1.parseAppSurfaceFilter)(options.surface);
|
|
339
356
|
if (options.surface !== undefined && !surface) {
|
|
340
|
-
(0, messages_1.printErrorWithHelp)(`Surface filter "${options.surface}" is not supported.`, [
|
|
357
|
+
(0, messages_1.printErrorWithHelp)(`Surface filter "${options.surface}" is not supported.`, ["Use one of: desktop, mobile-portrait, mobile-landscape."], { command: "browse" });
|
|
341
358
|
process.exitCode = 1;
|
|
342
359
|
return { ok: false };
|
|
343
360
|
}
|
|
344
361
|
const hasCapabilityFilters = Boolean(auth || controller || surface);
|
|
345
|
-
if (hasCapabilityFilters && kind !==
|
|
346
|
-
(0, messages_1.printErrorWithHelp)(
|
|
362
|
+
if (hasCapabilityFilters && kind !== "app") {
|
|
363
|
+
(0, messages_1.printErrorWithHelp)("Capability filters only support app browse.", ["Use --kind app together with --auth, --surface, or --controller."], { command: "browse" });
|
|
347
364
|
process.exitCode = 1;
|
|
348
365
|
return { ok: false };
|
|
349
366
|
}
|
|
@@ -357,7 +374,7 @@ function parseBrowseCommandOptions(options) {
|
|
|
357
374
|
}
|
|
358
375
|
const tags = normalizeTagFilters(options.tag);
|
|
359
376
|
if (tags === null) {
|
|
360
|
-
(0, messages_1.printErrorWithHelp)(
|
|
377
|
+
(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: "browse" });
|
|
361
378
|
process.exitCode = 1;
|
|
362
379
|
return { ok: false };
|
|
363
380
|
}
|
|
@@ -382,7 +399,8 @@ function parseBrowseCommandOptions(options) {
|
|
|
382
399
|
async function loadMergedBrowseResults(input) {
|
|
383
400
|
const { client, creatorUsername, appType, assetCategory, assetSubcategory, assetSpec, assetSpecOwner, assetSpecName, limit, offset, tags, } = input;
|
|
384
401
|
const appResultsPromise = creatorUsername
|
|
385
|
-
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
402
|
+
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
403
|
+
.fetchAppsByCreator(creatorUsername, {
|
|
386
404
|
limit: pageLimit,
|
|
387
405
|
offset: pageOffset,
|
|
388
406
|
type: appType,
|
|
@@ -391,29 +409,34 @@ async function loadMergedBrowseResults(input) {
|
|
|
391
409
|
})
|
|
392
410
|
.then((response) => ({
|
|
393
411
|
items: response.apps ?? [],
|
|
394
|
-
pagination: requirePagination(response.pagination,
|
|
412
|
+
pagination: requirePagination(response.pagination, "browse_all_creator_apps"),
|
|
395
413
|
})))
|
|
396
|
-
:
|
|
397
|
-
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
414
|
+
: appType
|
|
415
|
+
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
416
|
+
.fetchAppsByType(appType, {
|
|
398
417
|
limit: pageLimit,
|
|
399
418
|
offset: pageOffset,
|
|
400
419
|
...(tags.length > 0 ? { tags } : {}),
|
|
401
420
|
...(input.sort ? { sort: input.sort } : {}),
|
|
402
|
-
})
|
|
421
|
+
})
|
|
422
|
+
.then((response) => ({
|
|
403
423
|
items: response.apps ?? [],
|
|
404
|
-
pagination: requirePagination(response.pagination,
|
|
424
|
+
pagination: requirePagination(response.pagination, "browse_all_type_apps"),
|
|
405
425
|
})))
|
|
406
|
-
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
426
|
+
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
427
|
+
.fetchApps({
|
|
407
428
|
limit: pageLimit,
|
|
408
429
|
offset: pageOffset,
|
|
409
430
|
...(tags.length > 0 ? { tags } : {}),
|
|
410
431
|
...(input.sort ? { sort: input.sort } : {}),
|
|
411
|
-
})
|
|
432
|
+
})
|
|
433
|
+
.then((response) => ({
|
|
412
434
|
items: response.apps ?? [],
|
|
413
|
-
pagination: requirePagination(response.pagination,
|
|
414
|
-
})))
|
|
435
|
+
pagination: requirePagination(response.pagination, "browse_all_apps"),
|
|
436
|
+
})));
|
|
415
437
|
const assetResultsPromise = creatorUsername
|
|
416
|
-
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
438
|
+
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
439
|
+
.listAssetsForCreator(creatorUsername, {
|
|
417
440
|
limit: pageLimit,
|
|
418
441
|
offset: pageOffset,
|
|
419
442
|
category: assetCategory,
|
|
@@ -422,11 +445,13 @@ async function loadMergedBrowseResults(input) {
|
|
|
422
445
|
assetSpecOwner,
|
|
423
446
|
assetSpecName,
|
|
424
447
|
...(tags.length > 0 ? { tags } : {}),
|
|
425
|
-
})
|
|
448
|
+
})
|
|
449
|
+
.then((response) => ({
|
|
426
450
|
items: response.assets ?? [],
|
|
427
|
-
pagination: requirePagination(response.pagination,
|
|
451
|
+
pagination: requirePagination(response.pagination, "browse_all_creator_assets"),
|
|
428
452
|
})))
|
|
429
|
-
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
453
|
+
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
454
|
+
.listAssets({
|
|
430
455
|
limit: pageLimit,
|
|
431
456
|
offset: pageOffset,
|
|
432
457
|
category: assetCategory,
|
|
@@ -435,39 +460,48 @@ async function loadMergedBrowseResults(input) {
|
|
|
435
460
|
assetSpecOwner,
|
|
436
461
|
assetSpecName,
|
|
437
462
|
...(tags.length > 0 ? { tags } : {}),
|
|
438
|
-
})
|
|
463
|
+
})
|
|
464
|
+
.then((response) => ({
|
|
439
465
|
items: response.assets ?? [],
|
|
440
|
-
pagination: requirePagination(response.pagination,
|
|
466
|
+
pagination: requirePagination(response.pagination, "browse_all_assets"),
|
|
441
467
|
})));
|
|
442
468
|
const specResultsPromise = creatorUsername
|
|
443
|
-
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
469
|
+
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
470
|
+
.listAssetSpecsForCreator(creatorUsername, { limit: pageLimit, offset: pageOffset })
|
|
471
|
+
.then((response) => ({
|
|
444
472
|
items: response.assetSpecs ?? [],
|
|
445
|
-
pagination: requirePagination(response.pagination,
|
|
473
|
+
pagination: requirePagination(response.pagination, "browse_all_creator_specs"),
|
|
446
474
|
})))
|
|
447
|
-
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
475
|
+
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
476
|
+
.listAssetSpecs({ limit: pageLimit, offset: pageOffset })
|
|
477
|
+
.then((response) => ({
|
|
448
478
|
items: response.assetSpecs ?? [],
|
|
449
|
-
pagination: requirePagination(response.pagination,
|
|
479
|
+
pagination: requirePagination(response.pagination, "browse_all_specs"),
|
|
450
480
|
})));
|
|
451
481
|
const packResultsPromise = creatorUsername
|
|
452
|
-
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
482
|
+
? collectPaginatedItems((pageLimit, pageOffset) => client
|
|
483
|
+
.listAssetPacksForCreator(creatorUsername, {
|
|
453
484
|
limit: pageLimit,
|
|
454
485
|
offset: pageOffset,
|
|
455
486
|
containsCategory: assetCategory,
|
|
456
487
|
containsSubcategory: assetSubcategory,
|
|
457
488
|
...(tags.length > 0 ? { tags } : {}),
|
|
458
|
-
})
|
|
489
|
+
})
|
|
490
|
+
.then((response) => ({
|
|
459
491
|
items: response.packs ?? [],
|
|
460
|
-
pagination: requirePagination(response.pagination,
|
|
492
|
+
pagination: requirePagination(response.pagination, "browse_all_creator_packs"),
|
|
461
493
|
})))
|
|
462
|
-
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
494
|
+
: collectPaginatedItems((pageLimit, pageOffset) => client
|
|
495
|
+
.listAssetPacks({
|
|
463
496
|
limit: pageLimit,
|
|
464
497
|
offset: pageOffset,
|
|
465
498
|
containsCategory: assetCategory,
|
|
466
499
|
containsSubcategory: assetSubcategory,
|
|
467
500
|
...(tags.length > 0 ? { tags } : {}),
|
|
468
|
-
})
|
|
501
|
+
})
|
|
502
|
+
.then((response) => ({
|
|
469
503
|
items: response.packs ?? [],
|
|
470
|
-
pagination: requirePagination(response.pagination,
|
|
504
|
+
pagination: requirePagination(response.pagination, "browse_all_packs"),
|
|
471
505
|
})));
|
|
472
506
|
const [apps, assets, specs, packs] = await Promise.all([
|
|
473
507
|
appResultsPromise,
|
|
@@ -476,15 +510,15 @@ async function loadMergedBrowseResults(input) {
|
|
|
476
510
|
packResultsPromise,
|
|
477
511
|
]);
|
|
478
512
|
const combined = [
|
|
479
|
-
...apps.items.map((item) => toBrowseItem(
|
|
480
|
-
...assets.items.map((item) => toBrowseItem(
|
|
481
|
-
...specs.items.map((item) => toBrowseItem(
|
|
482
|
-
...packs.items.map((item) => toBrowseItem(
|
|
513
|
+
...apps.items.map((item) => toBrowseItem("app", item)),
|
|
514
|
+
...assets.items.map((item) => toBrowseItem("asset", item)),
|
|
515
|
+
...specs.items.map((item) => toBrowseItem("asset-spec", item)),
|
|
516
|
+
...packs.items.map((item) => toBrowseItem("asset-pack", item)),
|
|
483
517
|
];
|
|
484
518
|
return sliceMergedItems(combined, limit, offset);
|
|
485
519
|
}
|
|
486
520
|
async function runAssetBrowseCommand(input) {
|
|
487
|
-
const { client, creatorUsername, assetCategory, assetSubcategory, assetSpec, assetSpecOwner, assetSpecName, sort, limit, offset, tags } = input;
|
|
521
|
+
const { client, creatorUsername, assetCategory, assetSubcategory, assetSpec, assetSpecOwner, assetSpecName, sort, limit, offset, tags, } = input;
|
|
488
522
|
const response = creatorUsername
|
|
489
523
|
? await client.listAssetsForCreator(creatorUsername, {
|
|
490
524
|
limit,
|
|
@@ -509,18 +543,22 @@ async function runAssetBrowseCommand(input) {
|
|
|
509
543
|
...(sort ? { sort: sort } : {}),
|
|
510
544
|
});
|
|
511
545
|
return {
|
|
512
|
-
items: (response.assets ?? []).map((item) => toBrowseItem(
|
|
513
|
-
pagination: requirePagination(response.pagination,
|
|
546
|
+
items: (response.assets ?? []).map((item) => toBrowseItem("asset", item)),
|
|
547
|
+
pagination: requirePagination(response.pagination, "browse_assets"),
|
|
514
548
|
};
|
|
515
549
|
}
|
|
516
550
|
async function runAssetSpecBrowseCommand(input) {
|
|
517
551
|
const { client, creatorUsername, sort, limit, offset } = input;
|
|
518
552
|
const response = creatorUsername
|
|
519
|
-
? await client.listAssetSpecsForCreator(creatorUsername, {
|
|
553
|
+
? await client.listAssetSpecsForCreator(creatorUsername, {
|
|
554
|
+
limit,
|
|
555
|
+
offset,
|
|
556
|
+
...(sort ? { sort: sort } : {}),
|
|
557
|
+
})
|
|
520
558
|
: await client.listAssetSpecs({ limit, offset, ...(sort ? { sort: sort } : {}) });
|
|
521
559
|
return {
|
|
522
|
-
items: (response.assetSpecs ?? []).map((item) => toBrowseItem(
|
|
523
|
-
pagination: requirePagination(response.pagination,
|
|
560
|
+
items: (response.assetSpecs ?? []).map((item) => toBrowseItem("asset-spec", item)),
|
|
561
|
+
pagination: requirePagination(response.pagination, "browse_asset_specs"),
|
|
524
562
|
};
|
|
525
563
|
}
|
|
526
564
|
async function runAssetPackBrowseCommand(input) {
|
|
@@ -541,13 +579,13 @@ async function runAssetPackBrowseCommand(input) {
|
|
|
541
579
|
...(tags.length > 0 ? { tags } : {}),
|
|
542
580
|
});
|
|
543
581
|
return {
|
|
544
|
-
items: (response.packs ?? []).map((item) => toBrowseItem(
|
|
545
|
-
pagination: requirePagination(response.pagination,
|
|
582
|
+
items: (response.packs ?? []).map((item) => toBrowseItem("asset-pack", item)),
|
|
583
|
+
pagination: requirePagination(response.pagination, "browse_asset_packs"),
|
|
546
584
|
};
|
|
547
585
|
}
|
|
548
586
|
async function runBrowseCommand(input) {
|
|
549
|
-
const { client, kind, creatorUsername, appType, auth, controller, surface, sort, limit, offset, tags
|
|
550
|
-
if (kind ===
|
|
587
|
+
const { client, kind, creatorUsername, appType, auth, controller, surface, sort, limit, offset, tags } = input;
|
|
588
|
+
if (kind === "app") {
|
|
551
589
|
if (creatorUsername) {
|
|
552
590
|
const response = await client.fetchAppsByCreator(creatorUsername, {
|
|
553
591
|
limit,
|
|
@@ -560,8 +598,8 @@ async function runBrowseCommand(input) {
|
|
|
560
598
|
...(sort ? { sort: sort } : {}),
|
|
561
599
|
});
|
|
562
600
|
return {
|
|
563
|
-
items: (response.apps ?? []).map((item) => toBrowseItem(
|
|
564
|
-
pagination: requirePagination(response.pagination,
|
|
601
|
+
items: (response.apps ?? []).map((item) => toBrowseItem("app", item)),
|
|
602
|
+
pagination: requirePagination(response.pagination, "browse_app_creator"),
|
|
565
603
|
};
|
|
566
604
|
}
|
|
567
605
|
if (appType) {
|
|
@@ -575,8 +613,8 @@ async function runBrowseCommand(input) {
|
|
|
575
613
|
...(sort ? { sort: sort } : {}),
|
|
576
614
|
});
|
|
577
615
|
return {
|
|
578
|
-
items: (response.apps ?? []).map((item) => toBrowseItem(
|
|
579
|
-
pagination: requirePagination(response.pagination,
|
|
616
|
+
items: (response.apps ?? []).map((item) => toBrowseItem("app", item)),
|
|
617
|
+
pagination: requirePagination(response.pagination, "browse_app_type"),
|
|
580
618
|
};
|
|
581
619
|
}
|
|
582
620
|
const response = await client.fetchApps({
|
|
@@ -589,17 +627,17 @@ async function runBrowseCommand(input) {
|
|
|
589
627
|
...(sort ? { sort: sort } : {}),
|
|
590
628
|
});
|
|
591
629
|
return {
|
|
592
|
-
items: (response.apps ?? []).map((item) => toBrowseItem(
|
|
593
|
-
pagination: requirePagination(response.pagination,
|
|
630
|
+
items: (response.apps ?? []).map((item) => toBrowseItem("app", item)),
|
|
631
|
+
pagination: requirePagination(response.pagination, "browse_app_all"),
|
|
594
632
|
};
|
|
595
633
|
}
|
|
596
|
-
if (kind ===
|
|
634
|
+
if (kind === "asset") {
|
|
597
635
|
return await runAssetBrowseCommand(input);
|
|
598
636
|
}
|
|
599
|
-
if (kind ===
|
|
637
|
+
if (kind === "asset-spec") {
|
|
600
638
|
return await runAssetSpecBrowseCommand(input);
|
|
601
639
|
}
|
|
602
|
-
if (kind ===
|
|
640
|
+
if (kind === "asset-pack") {
|
|
603
641
|
return await runAssetPackBrowseCommand(input);
|
|
604
642
|
}
|
|
605
643
|
return await loadMergedBrowseResults(input);
|
|
@@ -610,13 +648,13 @@ async function browse(options = {}) {
|
|
|
610
648
|
return;
|
|
611
649
|
}
|
|
612
650
|
const { kind, creator, appType, auth, controller, surface, assetCategory, assetSubcategory, assetSpec, assetSpecOwner, assetSpecName, sort, limit, offset, tags, } = parsed.input;
|
|
613
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
651
|
+
await (0, commandContext_1.withPublicEnvironment)("browse", async ({ client }) => {
|
|
614
652
|
try {
|
|
615
|
-
const creatorUsername = await resolveCreatorUsername(creator,
|
|
653
|
+
const creatorUsername = await resolveCreatorUsername(creator, "browse", async () => {
|
|
616
654
|
const response = await client.me();
|
|
617
655
|
const username = response.user?.username?.trim();
|
|
618
656
|
if (!username) {
|
|
619
|
-
throw new Error(
|
|
657
|
+
throw new Error("missing_current_user");
|
|
620
658
|
}
|
|
621
659
|
return username;
|
|
622
660
|
});
|
|
@@ -650,13 +688,13 @@ async function browse(options = {}) {
|
|
|
650
688
|
return;
|
|
651
689
|
}
|
|
652
690
|
if (items.length === 0) {
|
|
653
|
-
const label = kind ===
|
|
691
|
+
const label = kind === "all" ? "content" : (0, refs_1.contentKindPluralLabel)(kind);
|
|
654
692
|
console.log(`No ${label} found.`);
|
|
655
693
|
console.log('Next: adjust your filters or run "playdrop search <query>" to look for something specific.');
|
|
656
694
|
return;
|
|
657
695
|
}
|
|
658
|
-
if (kind ===
|
|
659
|
-
console.log(
|
|
696
|
+
if (kind === "all") {
|
|
697
|
+
console.log("Browsing content (apps, assets, asset specs, then asset packs):\n");
|
|
660
698
|
}
|
|
661
699
|
else {
|
|
662
700
|
console.log(`Browsing ${(0, refs_1.contentKindPluralLabel)(kind)}:\n`);
|
|
@@ -668,23 +706,25 @@ async function browse(options = {}) {
|
|
|
668
706
|
console.log('\nNext: run "playdrop detail <creator>/<kind>/<name>" to inspect one item.');
|
|
669
707
|
}
|
|
670
708
|
catch (error) {
|
|
671
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
709
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "browse", "Browse", {
|
|
672
710
|
apiMessage: (apiError) => {
|
|
673
|
-
if (apiError.code ===
|
|
711
|
+
if (apiError.code === "invalid_tag_ref" ||
|
|
712
|
+
apiError.code === "duplicate_tag_ref" ||
|
|
713
|
+
apiError.code === "tag_filter_limit_exceeded") {
|
|
674
714
|
return {
|
|
675
|
-
problem:
|
|
676
|
-
suggestions: [
|
|
715
|
+
problem: "One or more tag filters are invalid.",
|
|
716
|
+
suggestions: ["Use canonical refs like theme/pirate.", "Pass at most 5 unique --tag values."],
|
|
677
717
|
};
|
|
678
718
|
}
|
|
679
719
|
if (apiError.status === 401 || apiError.status === 403) {
|
|
680
720
|
return {
|
|
681
|
-
problem:
|
|
721
|
+
problem: "Browsing this content requires you to be logged in.",
|
|
682
722
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
683
723
|
};
|
|
684
724
|
}
|
|
685
725
|
return {
|
|
686
726
|
problem: `Browse failed with status ${apiError.status}.`,
|
|
687
|
-
suggestions: [
|
|
727
|
+
suggestions: ["Retry in a moment.", 'Use "playdrop help browse" for usage details.'],
|
|
688
728
|
};
|
|
689
729
|
},
|
|
690
730
|
});
|
|
@@ -695,7 +735,7 @@ async function browse(options = {}) {
|
|
|
695
735
|
});
|
|
696
736
|
}
|
|
697
737
|
async function browseCategories(options = {}) {
|
|
698
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
738
|
+
await (0, commandContext_1.withPublicEnvironment)("browse categories", async ({ client }) => {
|
|
699
739
|
try {
|
|
700
740
|
const response = await client.listAssetCategories();
|
|
701
741
|
const items = response.categories ?? [];
|
|
@@ -704,22 +744,22 @@ async function browseCategories(options = {}) {
|
|
|
704
744
|
return;
|
|
705
745
|
}
|
|
706
746
|
if (items.length === 0) {
|
|
707
|
-
console.log(
|
|
747
|
+
console.log("No asset categories were returned.");
|
|
708
748
|
return;
|
|
709
749
|
}
|
|
710
|
-
console.log(
|
|
750
|
+
console.log("Asset categories:\n");
|
|
711
751
|
for (const item of items) {
|
|
712
|
-
const formats = Array.isArray(item.formats) ? item.formats.join(
|
|
752
|
+
const formats = Array.isArray(item.formats) ? item.formats.join(", ") : "none";
|
|
713
753
|
console.log(`${item.category} / ${item.subcategory}`);
|
|
714
754
|
console.log(` Formats: ${formats}`);
|
|
715
755
|
}
|
|
716
756
|
console.log('\nNext: use these values with "playdrop browse" or "playdrop search".');
|
|
717
757
|
}
|
|
718
758
|
catch (error) {
|
|
719
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
759
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "browse categories", "Browse categories", {
|
|
720
760
|
apiMessage: (apiError) => ({
|
|
721
761
|
problem: `Category lookup failed with status ${apiError.status}.`,
|
|
722
|
-
suggestions: [
|
|
762
|
+
suggestions: ["Retry in a moment."],
|
|
723
763
|
}),
|
|
724
764
|
});
|
|
725
765
|
if (!handled) {
|