@playdrop/playdrop-cli 0.16.5 → 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/credits.js
CHANGED
|
@@ -11,30 +11,30 @@ function parsePositiveInteger(raw, label, fallback) {
|
|
|
11
11
|
if (raw === undefined) {
|
|
12
12
|
return fallback;
|
|
13
13
|
}
|
|
14
|
-
const parsed = typeof raw ===
|
|
14
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
15
15
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
if (label ===
|
|
18
|
+
if (label === "limit" && parsed <= 0) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
return parsed;
|
|
22
22
|
}
|
|
23
23
|
function formatTransactionTitle(transaction) {
|
|
24
|
-
if (transaction.type ===
|
|
25
|
-
const appName = typeof transaction.metadata?.appName ===
|
|
26
|
-
const adFormat = typeof transaction.metadata?.adFormat ===
|
|
27
|
-
const dateUtc = typeof transaction.metadata?.dateUtc ===
|
|
28
|
-
return [appName, adFormat, dateUtc].filter(Boolean).join(
|
|
24
|
+
if (transaction.type === "AD_PAYOUT") {
|
|
25
|
+
const appName = typeof transaction.metadata?.appName === "string" ? transaction.metadata.appName : transaction.displayName;
|
|
26
|
+
const adFormat = typeof transaction.metadata?.adFormat === "string" ? transaction.metadata.adFormat : null;
|
|
27
|
+
const dateUtc = typeof transaction.metadata?.dateUtc === "string" ? transaction.metadata.dateUtc : null;
|
|
28
|
+
return [appName, adFormat, dateUtc].filter(Boolean).join(" | ");
|
|
29
29
|
}
|
|
30
|
-
if (transaction.type ===
|
|
31
|
-
const units = typeof transaction.metadata?.units ===
|
|
30
|
+
if (transaction.type === "BOOST_PURCHASE") {
|
|
31
|
+
const units = typeof transaction.metadata?.units === "number" ? transaction.metadata.units : null;
|
|
32
32
|
return units ? `${transaction.displayName} | ${units} units` : transaction.displayName;
|
|
33
33
|
}
|
|
34
34
|
return transaction.displayName;
|
|
35
35
|
}
|
|
36
36
|
async function showCreditBalance(options = {}) {
|
|
37
|
-
await (0, commandContext_1.withEnvironment)(
|
|
37
|
+
await (0, commandContext_1.withEnvironment)("credits balance", "Checking your credit balance", async ({ client }) => {
|
|
38
38
|
try {
|
|
39
39
|
const response = await client.me();
|
|
40
40
|
const balance = response.user?.creditBalance ?? 0;
|
|
@@ -42,10 +42,12 @@ async function showCreditBalance(options = {}) {
|
|
|
42
42
|
(0, output_1.printJson)({ balance });
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
|
-
(0, output_1.printSuccess)(`Credit balance: ${balance}`, [
|
|
45
|
+
(0, output_1.printSuccess)(`Credit balance: ${balance}`, [
|
|
46
|
+
'Next: run "playdrop credits transactions" to review recent credit activity.',
|
|
47
|
+
]);
|
|
46
48
|
}
|
|
47
49
|
catch (error) {
|
|
48
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
50
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "credits balance", "Credit balance lookup", {
|
|
49
51
|
apiMessage: (apiError) => ({
|
|
50
52
|
problem: `Credit balance lookup failed with status ${apiError.status}.`,
|
|
51
53
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
@@ -58,19 +60,23 @@ async function showCreditBalance(options = {}) {
|
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
async function browseCreditTransactions(options = {}) {
|
|
61
|
-
const limit = parsePositiveInteger(options.limit,
|
|
63
|
+
const limit = parsePositiveInteger(options.limit, "limit", 20);
|
|
62
64
|
if (limit === null) {
|
|
63
|
-
(0, messages_1.printErrorWithHelp)(
|
|
65
|
+
(0, messages_1.printErrorWithHelp)("The --limit value must be a positive integer.", ["Example: --limit 20"], {
|
|
66
|
+
command: "credits transactions",
|
|
67
|
+
});
|
|
64
68
|
process.exitCode = 1;
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
67
|
-
const offset = parsePositiveInteger(options.offset,
|
|
71
|
+
const offset = parsePositiveInteger(options.offset, "offset", 0);
|
|
68
72
|
if (offset === null) {
|
|
69
|
-
(0, messages_1.printErrorWithHelp)(
|
|
73
|
+
(0, messages_1.printErrorWithHelp)("The --offset value must be zero or a positive integer.", ["Example: --offset 20"], {
|
|
74
|
+
command: "credits transactions",
|
|
75
|
+
});
|
|
70
76
|
process.exitCode = 1;
|
|
71
77
|
return;
|
|
72
78
|
}
|
|
73
|
-
await (0, commandContext_1.withEnvironment)(
|
|
79
|
+
await (0, commandContext_1.withEnvironment)("credits transactions", "Checking your credit history", async ({ client }) => {
|
|
74
80
|
try {
|
|
75
81
|
const response = await client.fetchCreditTransactions({ limit, offset });
|
|
76
82
|
const transactions = response.transactions ?? [];
|
|
@@ -79,11 +85,11 @@ async function browseCreditTransactions(options = {}) {
|
|
|
79
85
|
return;
|
|
80
86
|
}
|
|
81
87
|
if (transactions.length === 0) {
|
|
82
|
-
console.log(
|
|
88
|
+
console.log("No credit transactions found.");
|
|
83
89
|
console.log('Next: run "playdrop credits balance" to confirm your current balance.');
|
|
84
90
|
return;
|
|
85
91
|
}
|
|
86
|
-
console.log(
|
|
92
|
+
console.log("Credit transactions:\n");
|
|
87
93
|
for (const transaction of transactions) {
|
|
88
94
|
console.log(`#${transaction.id} | ${transaction.kind.toLowerCase()} | ${transaction.amount} | ${transaction.status.toLowerCase()} | ${(0, output_1.formatTimestamp)(transaction.createdAt)}`);
|
|
89
95
|
console.log(` ${formatTransactionTitle(transaction)}`);
|
|
@@ -91,7 +97,7 @@ async function browseCreditTransactions(options = {}) {
|
|
|
91
97
|
console.log('\nNext: run "playdrop credits balance" to confirm your latest balance.');
|
|
92
98
|
}
|
|
93
99
|
catch (error) {
|
|
94
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
100
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "credits transactions", "Credit transaction lookup", {
|
|
95
101
|
apiMessage: (apiError) => ({
|
|
96
102
|
problem: `Credit transaction lookup failed with status ${apiError.status}.`,
|
|
97
103
|
suggestions: ['Run "playdrop auth login" and retry.'],
|
|
@@ -104,19 +110,23 @@ async function browseCreditTransactions(options = {}) {
|
|
|
104
110
|
});
|
|
105
111
|
}
|
|
106
112
|
async function showCreatorEarnings(options = {}) {
|
|
107
|
-
const days = parsePositiveInteger(options.days,
|
|
113
|
+
const days = parsePositiveInteger(options.days, "days", 30);
|
|
108
114
|
if (days === null) {
|
|
109
|
-
(0, messages_1.printErrorWithHelp)(
|
|
115
|
+
(0, messages_1.printErrorWithHelp)("The --days value must be a positive integer.", ["Example: --days 30"], {
|
|
116
|
+
command: "credits earnings",
|
|
117
|
+
});
|
|
110
118
|
process.exitCode = 1;
|
|
111
119
|
return;
|
|
112
120
|
}
|
|
113
|
-
const appId = options.appId === undefined ? undefined : parsePositiveInteger(options.appId,
|
|
121
|
+
const appId = options.appId === undefined ? undefined : parsePositiveInteger(options.appId, "appId", 0);
|
|
114
122
|
if (options.appId !== undefined && appId === null) {
|
|
115
|
-
(0, messages_1.printErrorWithHelp)(
|
|
123
|
+
(0, messages_1.printErrorWithHelp)("The --app-id value must be a positive integer.", ["Example: --app-id 123"], {
|
|
124
|
+
command: "credits earnings",
|
|
125
|
+
});
|
|
116
126
|
process.exitCode = 1;
|
|
117
127
|
return;
|
|
118
128
|
}
|
|
119
|
-
await (0, commandContext_1.withEnvironment)(
|
|
129
|
+
await (0, commandContext_1.withEnvironment)("credits earnings", "Checking creator ad earnings", async ({ client }) => {
|
|
120
130
|
const response = await client.fetchCreatorEarnings({
|
|
121
131
|
days,
|
|
122
132
|
...(appId && appId > 0 ? { appId } : {}),
|
|
@@ -129,9 +139,9 @@ async function showCreatorEarnings(options = {}) {
|
|
|
129
139
|
console.log(`Last 7 days settled: ${response.summary.settledLast7Days}`);
|
|
130
140
|
console.log(`Last 30 days settled: ${response.summary.settledLast30Days}`);
|
|
131
141
|
console.log(`Last 30 days boost spend: ${response.summary.boostSpendLast30Days}`);
|
|
132
|
-
console.log(
|
|
142
|
+
console.log("\nDaily rows:\n");
|
|
133
143
|
for (const row of response.days) {
|
|
134
|
-
console.log(`${row.dateUtc} | total ${row.totalAmount} | interstitial ${row.interstitialAmount} | rewarded ${row.rewardedAmount} | served ${row.servedCount} | credited ${row.creditedCount}${row.provisional ?
|
|
144
|
+
console.log(`${row.dateUtc} | total ${row.totalAmount} | interstitial ${row.interstitialAmount} | rewarded ${row.rewardedAmount} | served ${row.servedCount} | credited ${row.creditedCount}${row.provisional ? " | provisional" : ""}`);
|
|
135
145
|
}
|
|
136
146
|
});
|
|
137
147
|
}
|
package/dist/commands/detail.js
CHANGED
|
@@ -8,12 +8,12 @@ const messages_1 = require("../messages");
|
|
|
8
8
|
const output_1 = require("../output");
|
|
9
9
|
const refs_1 = require("../refs");
|
|
10
10
|
function printRefValidationError(_raw) {
|
|
11
|
-
(0, messages_1.printErrorWithHelp)(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
(0, messages_1.printErrorWithHelp)("A canonical ref is required.", [
|
|
12
|
+
"Use the format <creator>/<kind>/<name>.",
|
|
13
|
+
"Kinds must be exactly app, asset, asset-spec, or asset-pack.",
|
|
14
14
|
`Example: playdrop detail playdrop/app/hangingout`,
|
|
15
15
|
`Example: playdrop detail playdrop/asset/astro`,
|
|
16
|
-
], { command:
|
|
16
|
+
], { command: "detail" });
|
|
17
17
|
process.exitCode = 1;
|
|
18
18
|
}
|
|
19
19
|
function buildAssetSourceUrl(apiBase, ref, revision) {
|
|
@@ -22,7 +22,7 @@ function buildAssetSourceUrl(apiBase, ref, revision) {
|
|
|
22
22
|
return `${apiBase}/assets/${encodedCreator}/${encodedName}/versions/${revision}/source`;
|
|
23
23
|
}
|
|
24
24
|
function resolveAppSourceUrl(apiBase, sourceUrl) {
|
|
25
|
-
const trimmed = typeof sourceUrl ===
|
|
25
|
+
const trimmed = typeof sourceUrl === "string" ? sourceUrl.trim() : "";
|
|
26
26
|
if (!trimmed) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -41,12 +41,13 @@ function buildAssetPackDownloadUrl(apiBase, ref, version) {
|
|
|
41
41
|
return `${apiBase}/asset-packs/${encodedCreator}/${encodedName}/versions/${encodedVersion}/download`;
|
|
42
42
|
}
|
|
43
43
|
function extractAssetFileUrls(asset) {
|
|
44
|
-
const files = asset.currentVersion?.fileManifest
|
|
44
|
+
const files = asset.currentVersion?.fileManifest
|
|
45
|
+
?.files;
|
|
45
46
|
if (!Array.isArray(files)) {
|
|
46
47
|
return [];
|
|
47
48
|
}
|
|
48
49
|
return files
|
|
49
|
-
.filter((entry) => typeof entry?.role ===
|
|
50
|
+
.filter((entry) => typeof entry?.role === "string" && typeof entry?.url === "string" && entry.url.trim().length > 0)
|
|
50
51
|
.map((entry) => ({ role: entry.role, url: entry.url.trim() }));
|
|
51
52
|
}
|
|
52
53
|
function decorateApp(app, apiBase, webBase, dependencies) {
|
|
@@ -87,11 +88,11 @@ function decorateAssetPackMember(asset) {
|
|
|
87
88
|
format: asset.currentVersion?.format ?? null,
|
|
88
89
|
files: Array.isArray(files)
|
|
89
90
|
? files
|
|
90
|
-
.filter((file) => typeof file?.role ===
|
|
91
|
+
.filter((file) => typeof file?.role === "string" && typeof file?.key === "string")
|
|
91
92
|
.map((file) => ({
|
|
92
93
|
role: file.role,
|
|
93
94
|
key: file.key,
|
|
94
|
-
contentType: typeof file.contentType ===
|
|
95
|
+
contentType: typeof file.contentType === "string" ? file.contentType : null,
|
|
95
96
|
}))
|
|
96
97
|
: [],
|
|
97
98
|
};
|
|
@@ -101,7 +102,9 @@ function decorateAssetPack(apiBase, ref, pack, assets) {
|
|
|
101
102
|
...pack,
|
|
102
103
|
members: assets.map(decorateAssetPackMember),
|
|
103
104
|
urls: {
|
|
104
|
-
download: pack.currentVersion?.version
|
|
105
|
+
download: pack.currentVersion?.version
|
|
106
|
+
? buildAssetPackDownloadUrl(apiBase, ref, pack.currentVersion.version)
|
|
107
|
+
: null,
|
|
105
108
|
source: pack.currentVersion?.version ? buildAssetPackSourceUrl(apiBase, ref, pack.currentVersion.version) : null,
|
|
106
109
|
},
|
|
107
110
|
};
|
|
@@ -109,9 +112,9 @@ function decorateAssetPack(apiBase, ref, pack, assets) {
|
|
|
109
112
|
function formatTagSummary(tags) {
|
|
110
113
|
const normalizedTags = Array.isArray(tags) ? tags : [];
|
|
111
114
|
if (normalizedTags.length === 0) {
|
|
112
|
-
return
|
|
115
|
+
return "none";
|
|
113
116
|
}
|
|
114
|
-
return normalizedTags.map((tag) => `${tag.ref} (${tag.displayName})`).join(
|
|
117
|
+
return normalizedTags.map((tag) => `${tag.ref} (${tag.displayName})`).join(", ");
|
|
115
118
|
}
|
|
116
119
|
function printAppDependencyLines(label, items) {
|
|
117
120
|
if (items.length === 0) {
|
|
@@ -136,14 +139,14 @@ function printAppText(ref, app) {
|
|
|
136
139
|
console.log(`Owned assets: ${app.dependencies?.ownedAssets.length ?? 0}`);
|
|
137
140
|
console.log(`Direct assets: ${app.dependencies?.directAssets.length ?? 0}`);
|
|
138
141
|
console.log(`Packs: ${app.dependencies?.packs.length ?? 0}`);
|
|
139
|
-
printAppDependencyLines(
|
|
140
|
-
const runtimeKey = typeof item.runtimeKey ===
|
|
142
|
+
printAppDependencyLines("Registered assets", (app.dependencies?.ownedAssets ?? []).map((item) => {
|
|
143
|
+
const runtimeKey = typeof item.runtimeKey === "string" && item.runtimeKey.trim().length > 0
|
|
141
144
|
? `runtimeKey=${item.runtimeKey} `
|
|
142
|
-
:
|
|
145
|
+
: "";
|
|
143
146
|
return `${runtimeKey}${item.assetRef}`;
|
|
144
147
|
}));
|
|
145
|
-
printAppDependencyLines(
|
|
146
|
-
printAppDependencyLines(
|
|
148
|
+
printAppDependencyLines("Linked assets", (app.dependencies?.directAssets ?? []).map((item) => item.assetRef));
|
|
149
|
+
printAppDependencyLines("Linked packs", (app.dependencies?.packs ?? []).map((item) => item.packRef));
|
|
147
150
|
console.log(`Play URL: ${(0, output_1.formatOptionalValue)(app.urls.play)}`);
|
|
148
151
|
console.log(`Source URL: ${(0, output_1.formatOptionalValue)(app.urls.source)}`);
|
|
149
152
|
console.log('\nNext: run "playdrop versions browse ' + ref + '" to inspect version history.');
|
|
@@ -156,7 +159,7 @@ function printAssetText(ref, asset) {
|
|
|
156
159
|
console.log(`Description: ${(0, output_1.formatOptionalValue)(asset.description)}`);
|
|
157
160
|
console.log(`Created: ${(0, output_1.formatTimestamp)(asset.createdAt)}`);
|
|
158
161
|
console.log(`Updated: ${(0, output_1.formatTimestamp)(asset.updatedAt)}`);
|
|
159
|
-
console.log(`Current revision: ${asset.currentVersion ? asset.currentVersion.revisionLabel :
|
|
162
|
+
console.log(`Current revision: ${asset.currentVersion ? asset.currentVersion.revisionLabel : "none"}`);
|
|
160
163
|
console.log(`Current subcategory: ${(0, output_1.formatOptionalValue)(asset.currentVersion?.subcategory)}`);
|
|
161
164
|
console.log(`Tags: ${formatTagSummary(asset.tags)}`);
|
|
162
165
|
console.log(`Source URL: ${(0, output_1.formatOptionalValue)(asset.urls.source)}`);
|
|
@@ -166,7 +169,7 @@ function printAssetText(ref, asset) {
|
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
171
|
else {
|
|
169
|
-
console.log(
|
|
172
|
+
console.log("File URLs: none");
|
|
170
173
|
}
|
|
171
174
|
console.log('\nNext: run "playdrop versions browse ' + ref + '" to inspect other revisions.');
|
|
172
175
|
}
|
|
@@ -181,10 +184,10 @@ function printAssetPackText(ref, pack) {
|
|
|
181
184
|
console.log(`Tags: ${formatTagSummary(pack.tags)}`);
|
|
182
185
|
console.log(`Pack members: ${pack.members.length}`);
|
|
183
186
|
for (const member of pack.members) {
|
|
184
|
-
const classification = [member.category, member.subcategory, member.format].filter(Boolean).join(
|
|
187
|
+
const classification = [member.category, member.subcategory, member.format].filter(Boolean).join("/");
|
|
185
188
|
const files = member.files.length > 0
|
|
186
|
-
? member.files.map((file) => `${file.role}:${file.contentType ?? file.key}`).join(
|
|
187
|
-
:
|
|
189
|
+
? member.files.map((file) => `${file.role}:${file.contentType ?? file.key}`).join(", ")
|
|
190
|
+
: "none";
|
|
188
191
|
console.log(`- assetRef=${member.assetRef} | ${member.displayName} | ${classification} | files=${files}`);
|
|
189
192
|
}
|
|
190
193
|
console.log(`Download URL: ${(0, output_1.formatOptionalValue)(pack.urls.download)}`);
|
|
@@ -198,9 +201,9 @@ function printAssetSpecText(ref, assetSpec) {
|
|
|
198
201
|
console.log(`Description: ${(0, output_1.formatOptionalValue)(assetSpec.description)}`);
|
|
199
202
|
console.log(`Current version: ${(0, output_1.formatOptionalValue)(assetSpec.currentVersion?.version)}`);
|
|
200
203
|
console.log(`Status: ${(0, output_1.formatOptionalValue)(assetSpec.status)}`);
|
|
201
|
-
console.log(`Public assets: ${assetSpec.publicAssetCount.toLocaleString(
|
|
202
|
-
console.log(`Supporting apps: ${assetSpec.supportingAppCount.toLocaleString(
|
|
203
|
-
console.log(`Documentation: ${assetSpec.documentationAvailable ?
|
|
204
|
+
console.log(`Public assets: ${assetSpec.publicAssetCount.toLocaleString("en-US")}`);
|
|
205
|
+
console.log(`Supporting apps: ${assetSpec.supportingAppCount.toLocaleString("en-US")}`);
|
|
206
|
+
console.log(`Documentation: ${assetSpec.documentationAvailable ? "available" : "none"}`);
|
|
204
207
|
console.log(`Created: ${(0, output_1.formatTimestamp)(assetSpec.createdAt)}`);
|
|
205
208
|
console.log(`Updated: ${(0, output_1.formatTimestamp)(assetSpec.updatedAt)}`);
|
|
206
209
|
console.log('\nNext: run "playdrop versions browse ' + ref + '" to inspect version history.');
|
|
@@ -208,15 +211,15 @@ function printAssetSpecText(ref, assetSpec) {
|
|
|
208
211
|
async function detail(rawRef, options = {}) {
|
|
209
212
|
let ref;
|
|
210
213
|
try {
|
|
211
|
-
ref = (0, refs_1.parseContentRef)(rawRef ??
|
|
214
|
+
ref = (0, refs_1.parseContentRef)(rawRef ?? "");
|
|
212
215
|
}
|
|
213
216
|
catch {
|
|
214
217
|
printRefValidationError(rawRef);
|
|
215
218
|
return;
|
|
216
219
|
}
|
|
217
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
220
|
+
await (0, commandContext_1.withPublicEnvironment)("detail", async ({ client, envConfig }) => {
|
|
218
221
|
try {
|
|
219
|
-
if (ref.kind ===
|
|
222
|
+
if (ref.kind === "app") {
|
|
220
223
|
const response = await client.fetchAppBySlug(ref.creator, ref.name, { includeDependencies: true });
|
|
221
224
|
const item = decorateApp(response.app, envConfig.apiBase, envConfig.webBase, response.dependencies);
|
|
222
225
|
if (options.json) {
|
|
@@ -226,7 +229,7 @@ async function detail(rawRef, options = {}) {
|
|
|
226
229
|
printAppText(ref.ref, item);
|
|
227
230
|
return;
|
|
228
231
|
}
|
|
229
|
-
if (ref.kind ===
|
|
232
|
+
if (ref.kind === "asset") {
|
|
230
233
|
const response = await client.fetchAssetBySlug(ref.creator, ref.name);
|
|
231
234
|
const item = decorateAsset(envConfig.apiBase, ref, response.asset);
|
|
232
235
|
if (options.json) {
|
|
@@ -236,7 +239,7 @@ async function detail(rawRef, options = {}) {
|
|
|
236
239
|
printAssetText(ref.ref, item);
|
|
237
240
|
return;
|
|
238
241
|
}
|
|
239
|
-
if (ref.kind ===
|
|
242
|
+
if (ref.kind === "asset-pack") {
|
|
240
243
|
const response = await client.fetchAssetPackBySlug(ref.creator, ref.name);
|
|
241
244
|
const item = decorateAssetPack(envConfig.apiBase, ref, response.pack, response.assets);
|
|
242
245
|
if (options.json) {
|
|
@@ -255,23 +258,26 @@ async function detail(rawRef, options = {}) {
|
|
|
255
258
|
printAssetSpecText(ref.ref, item);
|
|
256
259
|
}
|
|
257
260
|
catch (error) {
|
|
258
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
261
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "detail", "Detail lookup", {
|
|
259
262
|
apiMessage: (apiError) => {
|
|
260
263
|
if (apiError.status === 404) {
|
|
261
264
|
return {
|
|
262
265
|
problem: `No item was found for "${ref.ref}".`,
|
|
263
|
-
suggestions: [
|
|
266
|
+
suggestions: ["Check the ref and retry.", 'Run "playdrop browse" to explore available content.'],
|
|
264
267
|
};
|
|
265
268
|
}
|
|
266
269
|
if (apiError.status === 401 || apiError.status === 403) {
|
|
267
270
|
return {
|
|
268
271
|
problem: `You do not have access to "${ref.ref}".`,
|
|
269
|
-
suggestions: [
|
|
272
|
+
suggestions: [
|
|
273
|
+
'Run "playdrop auth login" if this is private content you own.',
|
|
274
|
+
'Use "playdrop help detail" for the ref format.',
|
|
275
|
+
],
|
|
270
276
|
};
|
|
271
277
|
}
|
|
272
278
|
return {
|
|
273
279
|
problem: `Detail lookup failed with status ${apiError.status}.`,
|
|
274
|
-
suggestions: [
|
|
280
|
+
suggestions: ["Retry in a moment.", 'Use "playdrop help detail" for usage details.'],
|
|
275
281
|
};
|
|
276
282
|
},
|
|
277
283
|
});
|