@playdrop/playdrop-cli 0.16.2 → 0.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -56,11 +56,11 @@ function validateAssetTask(task, assetSpecLookups) {
|
|
|
56
56
|
const errors = [];
|
|
57
57
|
(0, assetSpecs_1.validateCustomAssetFilesAgainstContract)(localAssetSpecTask.contract, task.filePaths, errors, `Asset "${task.name}"`);
|
|
58
58
|
if (errors.length > 0) {
|
|
59
|
-
throw new Error(errors.join(
|
|
59
|
+
throw new Error(errors.join(" "));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
async function loadAuthenticatedValidationContext(workspacePath, envOverride) {
|
|
63
|
-
const ctx = await (0, commandContext_1.resolveOptionalEnvironmentContext)(
|
|
63
|
+
const ctx = await (0, commandContext_1.resolveOptionalEnvironmentContext)("project validate", {
|
|
64
64
|
env: envOverride,
|
|
65
65
|
workspacePath,
|
|
66
66
|
});
|
|
@@ -70,7 +70,7 @@ async function loadAuthenticatedValidationContext(workspacePath, envOverride) {
|
|
|
70
70
|
const { client } = ctx;
|
|
71
71
|
try {
|
|
72
72
|
const me = await client.me();
|
|
73
|
-
const username = typeof me?.user?.username ===
|
|
73
|
+
const username = typeof me?.user?.username === "string" ? me.user.username.trim() : "";
|
|
74
74
|
if (!username) {
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
@@ -85,16 +85,16 @@ async function loadAuthenticatedValidationContext(workspacePath, envOverride) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
function printResolvedValidationAccount(ctx) {
|
|
88
|
-
const username = typeof ctx.account?.username ===
|
|
88
|
+
const username = typeof ctx.account?.username === "string" && ctx.account.username.trim().length > 0
|
|
89
89
|
? ctx.account.username.trim()
|
|
90
|
-
:
|
|
90
|
+
: "unknown";
|
|
91
91
|
console.log(`Resolved account: ${username} (${ctx.env})`);
|
|
92
92
|
}
|
|
93
93
|
function resolveValidationWorkspacePath(pathOrName, resolution) {
|
|
94
|
-
return resolution ===
|
|
94
|
+
return resolution === "name" ? process.cwd() : pathOrName;
|
|
95
95
|
}
|
|
96
96
|
function formatLiveTagClearWarning(input) {
|
|
97
|
-
const countLabel = input.liveTagCount === 1 ?
|
|
97
|
+
const countLabel = input.liveTagCount === 1 ? "1 existing live tag" : `${input.liveTagCount} existing live tags`;
|
|
98
98
|
return `${input.entityLabel} "${input.displayName}" would remove ${countLabel} on publish. Add a tags field or pass --clear-tags to confirm.`;
|
|
99
99
|
}
|
|
100
100
|
async function collectLiveTagClearWarnings(tasks, workspacePath, envOverride) {
|
|
@@ -104,8 +104,7 @@ async function collectLiveTagClearWarnings(tasks, workspacePath, envOverride) {
|
|
|
104
104
|
}
|
|
105
105
|
const warnings = [];
|
|
106
106
|
for (const task of tasks) {
|
|
107
|
-
if ((task.kind !==
|
|
108
|
-
|| task.tags.length > 0) {
|
|
107
|
+
if ((task.kind !== "app" && task.kind !== "asset" && task.kind !== "asset-pack") || task.tags.length > 0) {
|
|
109
108
|
continue;
|
|
110
109
|
}
|
|
111
110
|
const creatorResult = (0, upload_content_1.getTaskCreatorResult)(task, context.username, context.currentUserRole);
|
|
@@ -113,24 +112,24 @@ async function collectLiveTagClearWarnings(tasks, workspacePath, envOverride) {
|
|
|
113
112
|
continue;
|
|
114
113
|
}
|
|
115
114
|
try {
|
|
116
|
-
if (task.kind ===
|
|
115
|
+
if (task.kind === "app") {
|
|
117
116
|
const response = await context.client.fetchAppBySlug(creatorResult.taskCreator, task.name);
|
|
118
117
|
const liveTagCount = Array.isArray(response.app.tags) ? response.app.tags.length : 0;
|
|
119
118
|
if (liveTagCount > 0) {
|
|
120
119
|
warnings.push(formatLiveTagClearWarning({
|
|
121
|
-
entityLabel:
|
|
120
|
+
entityLabel: "App",
|
|
122
121
|
displayName: `${creatorResult.taskCreator}/${task.name}`,
|
|
123
122
|
liveTagCount,
|
|
124
123
|
}));
|
|
125
124
|
}
|
|
126
125
|
continue;
|
|
127
126
|
}
|
|
128
|
-
if (task.kind ===
|
|
127
|
+
if (task.kind === "asset") {
|
|
129
128
|
const response = await context.client.fetchAssetBySlug(creatorResult.taskCreator, task.name);
|
|
130
129
|
const liveTagCount = Array.isArray(response.asset.tags) ? response.asset.tags.length : 0;
|
|
131
130
|
if (liveTagCount > 0) {
|
|
132
131
|
warnings.push(formatLiveTagClearWarning({
|
|
133
|
-
entityLabel:
|
|
132
|
+
entityLabel: "Asset",
|
|
134
133
|
displayName: `${creatorResult.taskCreator}/${task.name}`,
|
|
135
134
|
liveTagCount,
|
|
136
135
|
}));
|
|
@@ -141,7 +140,7 @@ async function collectLiveTagClearWarnings(tasks, workspacePath, envOverride) {
|
|
|
141
140
|
const liveTagCount = Array.isArray(response.pack.tags) ? response.pack.tags.length : 0;
|
|
142
141
|
if (liveTagCount > 0) {
|
|
143
142
|
warnings.push(formatLiveTagClearWarning({
|
|
144
|
-
entityLabel:
|
|
143
|
+
entityLabel: "Asset pack",
|
|
145
144
|
displayName: `${creatorResult.taskCreator}/${task.name}`,
|
|
146
145
|
liveTagCount,
|
|
147
146
|
}));
|
|
@@ -158,7 +157,7 @@ async function collectLiveTagClearWarnings(tasks, workspacePath, envOverride) {
|
|
|
158
157
|
async function validate(pathOrName, options = {}) {
|
|
159
158
|
const selection = (0, taskSelection_1.selectTasks)(pathOrName);
|
|
160
159
|
const workspacePath = resolveValidationWorkspacePath(pathOrName, selection.resolution);
|
|
161
|
-
const resolvedValidationContext = await (0, commandContext_1.resolveOptionalEnvironmentContext)(
|
|
160
|
+
const resolvedValidationContext = await (0, commandContext_1.resolveOptionalEnvironmentContext)("project validate", {
|
|
162
161
|
env: options.env,
|
|
163
162
|
workspacePath,
|
|
164
163
|
});
|
|
@@ -166,41 +165,43 @@ async function validate(pathOrName, options = {}) {
|
|
|
166
165
|
printResolvedValidationAccount(resolvedValidationContext);
|
|
167
166
|
}
|
|
168
167
|
if (selection.errors.length > 0) {
|
|
169
|
-
(0, taskSelection_1.reportTaskErrors)(selection.errors,
|
|
168
|
+
(0, taskSelection_1.reportTaskErrors)(selection.errors, "project validate");
|
|
170
169
|
process.exitCode = 1;
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
173
172
|
const externalAssetPackErrors = await (0, externalAssetPackValidation_1.validateExternalAssetPackTasks)(selection.tasks);
|
|
174
173
|
if (externalAssetPackErrors.length > 0) {
|
|
175
174
|
(0, taskSelection_1.reportTaskErrors)(externalAssetPackErrors.map((message) => ({
|
|
176
|
-
type:
|
|
175
|
+
type: "invalid-catalogue",
|
|
177
176
|
message,
|
|
178
|
-
help: [
|
|
179
|
-
})),
|
|
177
|
+
help: ["Update the asset pack downloadUrl to a public hostname that resolves successfully, then try again."],
|
|
178
|
+
})), "project validate");
|
|
180
179
|
process.exitCode = 1;
|
|
181
180
|
return;
|
|
182
181
|
}
|
|
183
182
|
const tasks = selection.tasks;
|
|
184
183
|
const warnings = selection.warnings;
|
|
185
184
|
if (tasks.length === 0) {
|
|
186
|
-
(0, uploadLog_1.printTaskSummary)([], warnings, { action:
|
|
185
|
+
(0, uploadLog_1.printTaskSummary)([], warnings, { action: "validate" });
|
|
187
186
|
return;
|
|
188
187
|
}
|
|
189
188
|
const results = [];
|
|
190
|
-
const assetSpecTasks = tasks.filter((task) => task.kind ===
|
|
189
|
+
const assetSpecTasks = tasks.filter((task) => task.kind === "asset-spec");
|
|
191
190
|
const assetSpecLookups = buildLocalAssetSpecLookups(assetSpecTasks);
|
|
192
191
|
const sortedTasks = (0, taskUtils_1.sortTasks)(tasks);
|
|
193
192
|
const tweakValidationContext = await loadAuthenticatedValidationContext(workspacePath, options.env);
|
|
194
193
|
for (const task of sortedTasks) {
|
|
195
194
|
const entityId = task.name;
|
|
196
195
|
try {
|
|
197
|
-
if (task.kind ===
|
|
196
|
+
if (task.kind === "app") {
|
|
198
197
|
const workerContext = (0, listingPreflight_1.readWorkerUploadPreflightContext)(task.projectDir);
|
|
199
198
|
if (tweakValidationContext) {
|
|
200
199
|
const creatorResult = (0, upload_content_1.getTaskCreatorResult)(task, tweakValidationContext.username, tweakValidationContext.currentUserRole);
|
|
201
200
|
if (creatorResult.creatorTargetError)
|
|
202
201
|
throw new Error(creatorResult.creatorTargetError);
|
|
203
|
-
await (0, tweakStaleness_1.fetchAndAssertTweakState)(tweakValidationContext.client, creatorResult.taskCreator, task, {
|
|
202
|
+
await (0, tweakStaleness_1.fetchAndAssertTweakState)(tweakValidationContext.client, creatorResult.taskCreator, task, {
|
|
203
|
+
allowAppNotFound: true,
|
|
204
|
+
});
|
|
204
205
|
}
|
|
205
206
|
else if (workerContext?.tweaks) {
|
|
206
207
|
(0, tweakStaleness_1.assertTweakStateMatches)(task, workerContext.tweaks);
|
|
@@ -215,23 +216,23 @@ async function validate(pathOrName, options = {}) {
|
|
|
215
216
|
});
|
|
216
217
|
}
|
|
217
218
|
await (0, apps_1.validateAppTask)(task);
|
|
218
|
-
(0, apps_1.collectAppValidationWarnings)(task,
|
|
219
|
+
(0, apps_1.collectAppValidationWarnings)(task, "source").forEach((warning) => warnings.add(warning));
|
|
219
220
|
}
|
|
220
|
-
else if (task.kind ===
|
|
221
|
+
else if (task.kind === "asset-spec") {
|
|
221
222
|
// Parsing already validates the contract, symbol, and documentation files.
|
|
222
223
|
}
|
|
223
|
-
else if (task.kind ===
|
|
224
|
+
else if (task.kind === "asset") {
|
|
224
225
|
validateAssetTask(task, assetSpecLookups);
|
|
225
226
|
}
|
|
226
|
-
else if (task.kind ===
|
|
227
|
+
else if (task.kind === "owned-asset" || task.kind === "asset-pack") {
|
|
227
228
|
// Structural validation already ran during catalogue parsing.
|
|
228
229
|
}
|
|
229
230
|
else {
|
|
230
231
|
throw new Error(`project validate does not support "${entityId}".`);
|
|
231
232
|
}
|
|
232
233
|
const entry = {
|
|
233
|
-
action:
|
|
234
|
-
status:
|
|
234
|
+
action: "validate",
|
|
235
|
+
status: "success",
|
|
235
236
|
entityType: task.kind,
|
|
236
237
|
entityId,
|
|
237
238
|
catalogue: task.cataloguePath,
|
|
@@ -242,8 +243,8 @@ async function validate(pathOrName, options = {}) {
|
|
|
242
243
|
catch (error) {
|
|
243
244
|
const message = (error?.message ?? String(error));
|
|
244
245
|
const entry = {
|
|
245
|
-
action:
|
|
246
|
-
status:
|
|
246
|
+
action: "validate",
|
|
247
|
+
status: "error",
|
|
247
248
|
entityType: task.kind,
|
|
248
249
|
entityId,
|
|
249
250
|
catalogue: task.cataloguePath,
|
|
@@ -255,5 +256,5 @@ async function validate(pathOrName, options = {}) {
|
|
|
255
256
|
}
|
|
256
257
|
const liveTagWarnings = await collectLiveTagClearWarnings(sortedTasks, workspacePath, options.env);
|
|
257
258
|
liveTagWarnings.forEach((warning) => warnings.add(warning));
|
|
258
|
-
(0, uploadLog_1.printTaskSummary)(results, warnings, { action:
|
|
259
|
+
(0, uploadLog_1.printTaskSummary)(results, warnings, { action: "validate" });
|
|
259
260
|
}
|
|
@@ -8,44 +8,44 @@ const output_1 = require("../output");
|
|
|
8
8
|
const refs_1 = require("../refs");
|
|
9
9
|
const appUrls_1 = require("../appUrls");
|
|
10
10
|
function formatCreatorReviewState(reviewState) {
|
|
11
|
-
if (reviewState ===
|
|
12
|
-
return
|
|
11
|
+
if (reviewState === "FAILED") {
|
|
12
|
+
return "Blocked";
|
|
13
13
|
}
|
|
14
|
-
if (reviewState ===
|
|
15
|
-
return
|
|
14
|
+
if (reviewState === "LOW_QUALITY") {
|
|
15
|
+
return "Limited";
|
|
16
16
|
}
|
|
17
|
-
if (reviewState ===
|
|
18
|
-
return
|
|
17
|
+
if (reviewState === "PASSED") {
|
|
18
|
+
return "Passed";
|
|
19
19
|
}
|
|
20
|
-
if (reviewState ===
|
|
21
|
-
return
|
|
20
|
+
if (reviewState === "GOOD") {
|
|
21
|
+
return "Good";
|
|
22
22
|
}
|
|
23
|
-
if (reviewState ===
|
|
24
|
-
return
|
|
23
|
+
if (reviewState === "EXCELLENT") {
|
|
24
|
+
return "Excellent";
|
|
25
25
|
}
|
|
26
|
-
if (reviewState ===
|
|
27
|
-
return
|
|
26
|
+
if (reviewState === "RUNNING") {
|
|
27
|
+
return "In Review";
|
|
28
28
|
}
|
|
29
|
-
if (reviewState ===
|
|
30
|
-
return
|
|
29
|
+
if (reviewState === "QUEUED") {
|
|
30
|
+
return "Queued";
|
|
31
31
|
}
|
|
32
|
-
if (reviewState ===
|
|
33
|
-
return
|
|
32
|
+
if (reviewState === "SUPERSEDED") {
|
|
33
|
+
return "Superseded";
|
|
34
34
|
}
|
|
35
|
-
if (reviewState ===
|
|
36
|
-
return
|
|
35
|
+
if (reviewState === "ERROR") {
|
|
36
|
+
return "Review Error";
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return "Not Required";
|
|
39
39
|
}
|
|
40
40
|
function parsePositiveInteger(raw, label, fallback) {
|
|
41
41
|
if (raw === undefined) {
|
|
42
42
|
return fallback;
|
|
43
43
|
}
|
|
44
|
-
const parsed = typeof raw ===
|
|
44
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
45
45
|
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
|
-
if (label ===
|
|
48
|
+
if (label === "limit" && parsed <= 0) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
51
|
return parsed;
|
|
@@ -54,7 +54,7 @@ function buildAssetSourceUrl(apiBase, ref, revision) {
|
|
|
54
54
|
return `${apiBase}/assets/${encodeURIComponent(ref.creator)}/${encodeURIComponent(ref.name)}/versions/${revision}/source`;
|
|
55
55
|
}
|
|
56
56
|
function resolveAppSourceUrl(apiBase, sourceUrl) {
|
|
57
|
-
const trimmed = typeof sourceUrl ===
|
|
57
|
+
const trimmed = typeof sourceUrl === "string" ? sourceUrl.trim() : "";
|
|
58
58
|
if (!trimmed) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
@@ -72,25 +72,27 @@ function assetFileUrls(version) {
|
|
|
72
72
|
return [];
|
|
73
73
|
}
|
|
74
74
|
return files
|
|
75
|
-
.filter((entry) => typeof entry?.role ===
|
|
75
|
+
.filter((entry) => typeof entry?.role === "string" && typeof entry?.url === "string" && entry.url.trim().length > 0)
|
|
76
76
|
.map((entry) => ({ role: entry.role, url: entry.url.trim() }));
|
|
77
77
|
}
|
|
78
78
|
function printEntry(entry) {
|
|
79
|
-
if (entry.kind ===
|
|
80
|
-
const currentLabel = entry.isCurrent ?
|
|
79
|
+
if (entry.kind === "app") {
|
|
80
|
+
const currentLabel = entry.isCurrent ? " | current" : "";
|
|
81
81
|
console.log(`${entry.version} | ${entry.visibility.toLowerCase()}${currentLabel} | ${formatCreatorReviewState(entry.reviewState)} | ${(0, output_1.formatTimestamp)(entry.createdAt)}`);
|
|
82
82
|
console.log(` Play URL: ${(0, output_1.formatOptionalValue)(entry.urls.play)}`);
|
|
83
83
|
console.log(` Source URL: ${(0, output_1.formatOptionalValue)(entry.urls.source)}`);
|
|
84
|
-
if (entry.showCreatorFeedback &&
|
|
85
|
-
|
|
84
|
+
if (entry.showCreatorFeedback &&
|
|
85
|
+
typeof entry.creatorFeedback === "string" &&
|
|
86
|
+
entry.creatorFeedback.trim().length > 0) {
|
|
87
|
+
console.log(" Creator Feedback:");
|
|
86
88
|
for (const line of entry.creatorFeedback.split(/\r?\n/)) {
|
|
87
89
|
console.log(` ${line}`);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
return;
|
|
91
93
|
}
|
|
92
|
-
if (entry.kind ===
|
|
93
|
-
const currentLabel = entry.isCurrent ?
|
|
94
|
+
if (entry.kind === "asset") {
|
|
95
|
+
const currentLabel = entry.isCurrent ? " | current" : "";
|
|
94
96
|
console.log(`${entry.revisionLabel} | ${entry.visibility.toLowerCase()}${currentLabel} | ${entry.format.toLowerCase()} | ${entry.subcategory} | ${(0, output_1.formatTimestamp)(entry.createdAt)}`);
|
|
95
97
|
console.log(` Source URL: ${entry.urls.source}`);
|
|
96
98
|
if (entry.urls.files.length > 0) {
|
|
@@ -100,32 +102,32 @@ function printEntry(entry) {
|
|
|
100
102
|
}
|
|
101
103
|
return;
|
|
102
104
|
}
|
|
103
|
-
if (entry.kind ===
|
|
104
|
-
const currentLabel = entry.isCurrent ?
|
|
105
|
+
if (entry.kind === "asset-spec") {
|
|
106
|
+
const currentLabel = entry.isCurrent ? " | current" : "";
|
|
105
107
|
console.log(`${entry.version} | ${entry.visibility.toLowerCase()} | ${entry.status.toLowerCase()}${currentLabel} | ${(0, output_1.formatTimestamp)(entry.createdAt)}`);
|
|
106
108
|
console.log(` Documentation URL: ${(0, output_1.formatOptionalValue)(entry.documentationUrl)}`);
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
|
-
const currentLabel = entry.isCurrent ?
|
|
111
|
+
const currentLabel = entry.isCurrent ? " | current" : "";
|
|
110
112
|
console.log(`${entry.version} | ${entry.visibility.toLowerCase()}${currentLabel} | ${(0, output_1.formatTimestamp)(entry.createdAt)}`);
|
|
111
113
|
console.log(` Download URL: ${(0, output_1.formatOptionalValue)(entry.urls.download)}`);
|
|
112
114
|
console.log(` Source URL: ${entry.urls.source}`);
|
|
113
115
|
}
|
|
114
116
|
async function loadVersionEntries(input) {
|
|
115
117
|
const { client, envConfig, ref, limit, offset } = input;
|
|
116
|
-
if (ref.kind ===
|
|
118
|
+
if (ref.kind === "app") {
|
|
117
119
|
const [appDetail, response] = await Promise.all([
|
|
118
120
|
client.fetchAppBySlug(ref.creator, ref.name),
|
|
119
121
|
client.listAppVersions(ref.creator, ref.name),
|
|
120
122
|
]);
|
|
121
123
|
const listed = response.versions ?? [];
|
|
122
124
|
const selected = listed.slice(offset, offset + limit);
|
|
123
|
-
const normalizedAccountUsername = typeof input.accountUsername ===
|
|
125
|
+
const normalizedAccountUsername = typeof input.accountUsername === "string" ? input.accountUsername.trim() : "";
|
|
124
126
|
const showCreatorFeedback = normalizedAccountUsername.length > 0 && normalizedAccountUsername === ref.creator;
|
|
125
127
|
const entries = await Promise.all(selected.map(async (version) => {
|
|
126
128
|
const detail = await client.getAppVersion(ref.creator, ref.name, version.version);
|
|
127
129
|
return {
|
|
128
|
-
kind:
|
|
130
|
+
kind: "app",
|
|
129
131
|
version: version.version,
|
|
130
132
|
visibility: version.visibility,
|
|
131
133
|
reviewState: detail.version.reviewState,
|
|
@@ -155,7 +157,7 @@ async function loadVersionEntries(input) {
|
|
|
155
157
|
},
|
|
156
158
|
};
|
|
157
159
|
}
|
|
158
|
-
if (ref.kind ===
|
|
160
|
+
if (ref.kind === "asset") {
|
|
159
161
|
const [detail, response] = await Promise.all([
|
|
160
162
|
client.fetchAssetBySlug(ref.creator, ref.name),
|
|
161
163
|
client.listAssetVersions(ref.creator, ref.name, { limit, offset }),
|
|
@@ -163,7 +165,7 @@ async function loadVersionEntries(input) {
|
|
|
163
165
|
const currentRevision = detail.asset.currentVersion?.revision ?? null;
|
|
164
166
|
return {
|
|
165
167
|
entries: (response.versions ?? []).map((version) => ({
|
|
166
|
-
kind:
|
|
168
|
+
kind: "asset",
|
|
167
169
|
revision: version.revision,
|
|
168
170
|
revisionLabel: version.revisionLabel,
|
|
169
171
|
visibility: version.visibility,
|
|
@@ -185,7 +187,7 @@ async function loadVersionEntries(input) {
|
|
|
185
187
|
},
|
|
186
188
|
};
|
|
187
189
|
}
|
|
188
|
-
if (ref.kind ===
|
|
190
|
+
if (ref.kind === "asset-pack") {
|
|
189
191
|
const [detail, response] = await Promise.all([
|
|
190
192
|
client.fetchAssetPackBySlug(ref.creator, ref.name),
|
|
191
193
|
client.listAssetPackVersions(ref.creator, ref.name, { limit, offset }),
|
|
@@ -193,7 +195,7 @@ async function loadVersionEntries(input) {
|
|
|
193
195
|
const currentVersion = detail.pack.currentVersion?.version ?? null;
|
|
194
196
|
return {
|
|
195
197
|
entries: (response.versions ?? []).map((version) => ({
|
|
196
|
-
kind:
|
|
198
|
+
kind: "asset-pack",
|
|
197
199
|
version: version.version,
|
|
198
200
|
visibility: version.visibility,
|
|
199
201
|
createdAt: version.createdAt,
|
|
@@ -219,7 +221,7 @@ async function loadVersionEntries(input) {
|
|
|
219
221
|
const currentVersion = detail.assetSpec.currentVersion?.version ?? null;
|
|
220
222
|
return {
|
|
221
223
|
entries: (response.versions ?? []).map((version) => ({
|
|
222
|
-
kind:
|
|
224
|
+
kind: "asset-spec",
|
|
223
225
|
version: version.version,
|
|
224
226
|
visibility: version.visibility,
|
|
225
227
|
status: version.status,
|
|
@@ -239,26 +241,34 @@ async function loadVersionEntries(input) {
|
|
|
239
241
|
async function browseVersions(rawRef, options = {}) {
|
|
240
242
|
let ref;
|
|
241
243
|
try {
|
|
242
|
-
ref = (0, refs_1.parseContentRef)(rawRef ??
|
|
244
|
+
ref = (0, refs_1.parseContentRef)(rawRef ?? "");
|
|
243
245
|
}
|
|
244
246
|
catch {
|
|
245
|
-
(0, messages_1.printErrorWithHelp)(
|
|
247
|
+
(0, messages_1.printErrorWithHelp)("A canonical ref is required.", [
|
|
248
|
+
"Use the format <creator>/<kind>/<name>.",
|
|
249
|
+
"Example: playdrop versions browse playdrop/app/hangingout",
|
|
250
|
+
"Example: playdrop versions browse playdrop/asset-spec/platformer-level",
|
|
251
|
+
], { command: "versions browse" });
|
|
246
252
|
process.exitCode = 1;
|
|
247
253
|
return;
|
|
248
254
|
}
|
|
249
|
-
const limit = parsePositiveInteger(options.limit,
|
|
255
|
+
const limit = parsePositiveInteger(options.limit, "limit", 10);
|
|
250
256
|
if (limit === null) {
|
|
251
|
-
(0, messages_1.printErrorWithHelp)(
|
|
257
|
+
(0, messages_1.printErrorWithHelp)("The --limit value must be a positive integer.", ["Example: --limit 10"], {
|
|
258
|
+
command: "versions browse",
|
|
259
|
+
});
|
|
252
260
|
process.exitCode = 1;
|
|
253
261
|
return;
|
|
254
262
|
}
|
|
255
|
-
const offset = parsePositiveInteger(options.offset,
|
|
263
|
+
const offset = parsePositiveInteger(options.offset, "offset", 0);
|
|
256
264
|
if (offset === null) {
|
|
257
|
-
(0, messages_1.printErrorWithHelp)(
|
|
265
|
+
(0, messages_1.printErrorWithHelp)("The --offset value must be zero or a positive integer.", ["Example: --offset 20"], {
|
|
266
|
+
command: "versions browse",
|
|
267
|
+
});
|
|
258
268
|
process.exitCode = 1;
|
|
259
269
|
return;
|
|
260
270
|
}
|
|
261
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
271
|
+
await (0, commandContext_1.withPublicEnvironment)("versions browse", async ({ client, envConfig, account }) => {
|
|
262
272
|
try {
|
|
263
273
|
const { entries, pagination } = await loadVersionEntries({
|
|
264
274
|
client,
|
|
@@ -273,7 +283,7 @@ async function browseVersions(rawRef, options = {}) {
|
|
|
273
283
|
kind: ref.kind,
|
|
274
284
|
ref: ref.ref,
|
|
275
285
|
entries: entries.map((entry) => {
|
|
276
|
-
if (entry.kind !==
|
|
286
|
+
if (entry.kind !== "app") {
|
|
277
287
|
return entry;
|
|
278
288
|
}
|
|
279
289
|
const { showCreatorFeedback: _showCreatorFeedback, ...appEntry } = entry;
|
|
@@ -295,12 +305,12 @@ async function browseVersions(rawRef, options = {}) {
|
|
|
295
305
|
console.log('\nNext: use the URLs above directly, or run "playdrop detail ' + ref.ref + '" for the current item summary.');
|
|
296
306
|
}
|
|
297
307
|
catch (error) {
|
|
298
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
308
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "versions browse", "Version lookup", {
|
|
299
309
|
apiMessage: (apiError) => {
|
|
300
310
|
if (apiError.status === 404) {
|
|
301
311
|
return {
|
|
302
312
|
problem: `No item was found for "${ref.ref}".`,
|
|
303
|
-
suggestions: [
|
|
313
|
+
suggestions: ["Check the ref and retry.", 'Run "playdrop browse" to explore available content.'],
|
|
304
314
|
};
|
|
305
315
|
}
|
|
306
316
|
if (apiError.status === 401 || apiError.status === 403) {
|
|
@@ -311,7 +321,7 @@ async function browseVersions(rawRef, options = {}) {
|
|
|
311
321
|
}
|
|
312
322
|
return {
|
|
313
323
|
problem: `Version lookup failed with status ${apiError.status}.`,
|
|
314
|
-
suggestions: [
|
|
324
|
+
suggestions: ["Retry in a moment.", 'Use "playdrop help versions browse" for usage details.'],
|
|
315
325
|
};
|
|
316
326
|
},
|
|
317
327
|
});
|
package/dist/commands/whoami.js
CHANGED
|
@@ -7,7 +7,7 @@ const commandContext_1 = require("../commandContext");
|
|
|
7
7
|
const http_1 = require("../http");
|
|
8
8
|
const messages_1 = require("../messages");
|
|
9
9
|
async function whoami(options = {}) {
|
|
10
|
-
const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)(
|
|
10
|
+
const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)("auth whoami", "Checking your Playdrop account status", {
|
|
11
11
|
env: options.env,
|
|
12
12
|
workspacePath: process.cwd(),
|
|
13
13
|
});
|
|
@@ -23,13 +23,13 @@ async function whoami(options = {}) {
|
|
|
23
23
|
}
|
|
24
24
|
catch (unknownError) {
|
|
25
25
|
if (unknownError instanceof types_1.UnsupportedClientError) {
|
|
26
|
-
(0, http_1.handleUnsupportedError)(unknownError,
|
|
26
|
+
(0, http_1.handleUnsupportedError)(unknownError, "Whoami");
|
|
27
27
|
}
|
|
28
28
|
if (unknownError instanceof types_1.ApiError) {
|
|
29
29
|
(0, messages_1.printErrorWithHelp)(`Request failed with status ${unknownError.status}.`, [
|
|
30
30
|
'Run "playdrop auth login" to refresh your credentials.',
|
|
31
31
|
'Use "playdrop auth whoami" again after logging in to confirm your status.',
|
|
32
|
-
], { command:
|
|
32
|
+
], { command: "whoami" });
|
|
33
33
|
process.exitCode = 1;
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
@@ -44,7 +44,7 @@ async function whoami(options = {}) {
|
|
|
44
44
|
if (e instanceof http_1.CLIUnsupportedClientError) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
(0, messages_1.printNetworkIssue)(
|
|
47
|
+
(0, messages_1.printNetworkIssue)("Could not reach the Playdrop API to check your account.", "whoami");
|
|
48
48
|
process.exitCode = 1;
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -52,10 +52,7 @@ async function whoami(options = {}) {
|
|
|
52
52
|
return;
|
|
53
53
|
const username = data.user?.username?.trim();
|
|
54
54
|
if (!username) {
|
|
55
|
-
(0, messages_1.printErrorWithHelp)(
|
|
56
|
-
'Retry "playdrop auth whoami" in a moment.',
|
|
57
|
-
'If the problem continues, contact the Playdrop team.',
|
|
58
|
-
], { command: 'whoami' });
|
|
55
|
+
(0, messages_1.printErrorWithHelp)("The Playdrop API returned an unexpected response.", ['Retry "playdrop auth whoami" in a moment.', "If the problem continues, contact the Playdrop team."], { command: "whoami" });
|
|
59
56
|
process.exitCode = 1;
|
|
60
57
|
return;
|
|
61
58
|
}
|
|
@@ -73,17 +70,17 @@ async function whoami(options = {}) {
|
|
|
73
70
|
}
|
|
74
71
|
else {
|
|
75
72
|
const role = data.user?.role?.trim();
|
|
76
|
-
console.log(`Authenticated actor: ${username} (${resolvedCtx.env}${role ? `, ${role}` :
|
|
73
|
+
console.log(`Authenticated actor: ${username} (${resolvedCtx.env}${role ? `, ${role}` : ""})`);
|
|
77
74
|
console.log(`Workspace owner: ${workspaceOwner}`);
|
|
78
|
-
console.log(
|
|
75
|
+
console.log("Authorization: delegated account access is enforced by the PlayDrop API");
|
|
79
76
|
}
|
|
80
|
-
const resolutionSources = [
|
|
77
|
+
const resolutionSources = [".playdrop.json"];
|
|
81
78
|
if (options.env) {
|
|
82
79
|
resolutionSources.push(`--env ${options.env}`);
|
|
83
80
|
}
|
|
84
|
-
console.log(`Resolved from: ${resolutionSources.join(
|
|
85
|
-
if (globalCurrentAccount
|
|
86
|
-
|
|
81
|
+
console.log(`Resolved from: ${resolutionSources.join(" + ")}`);
|
|
82
|
+
if (globalCurrentAccount &&
|
|
83
|
+
(globalCurrentAccount.username !== username || globalCurrentAccount.env !== resolvedCtx.env)) {
|
|
87
84
|
console.log(`Global default: ${globalCurrentAccount.username} (${globalCurrentAccount.env})`);
|
|
88
85
|
}
|
|
89
86
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type WorkspaceArchiveStageInput = {
|
|
2
|
+
downloadUrl: string;
|
|
3
|
+
expectedSize: number;
|
|
4
|
+
targetDir: string;
|
|
5
|
+
timeoutMs: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function extractZipArchive(zipBuffer: Uint8Array, targetDir: string): string[];
|
|
8
|
+
export declare function stageWorkspaceArchiveInChild(input: WorkspaceArchiveStageInput): Promise<void>;
|
|
9
|
+
export {};
|