@playdrop/playdrop-cli 0.16.5 → 0.16.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,29 +5,29 @@ exports.readDocumentation = readDocumentation;
|
|
|
5
5
|
const commandContext_1 = require("../commandContext");
|
|
6
6
|
const messages_1 = require("../messages");
|
|
7
7
|
const output_1 = require("../output");
|
|
8
|
-
const DOCUMENTATION_ROOT =
|
|
9
|
-
const DOCUMENTATION_INDEX_FILE =
|
|
8
|
+
const DOCUMENTATION_ROOT = "documentation";
|
|
9
|
+
const DOCUMENTATION_INDEX_FILE = "documentation.json";
|
|
10
10
|
function normalizeDocPath(value) {
|
|
11
|
-
if (typeof value !==
|
|
11
|
+
if (typeof value !== "string") {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
const trimmed = value.trim();
|
|
15
15
|
if (!trimmed) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
const unified = trimmed.replace(/\\/g,
|
|
19
|
-
const segments = unified.split(
|
|
20
|
-
if (segments.some((segment) => !segment || segment ===
|
|
18
|
+
const unified = trimmed.replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
19
|
+
const segments = unified.split("/");
|
|
20
|
+
if (segments.some((segment) => !segment || segment === "." || segment === "..")) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
return segments.join(
|
|
23
|
+
return segments.join("/");
|
|
24
24
|
}
|
|
25
25
|
function toDisplayDocPath(entry) {
|
|
26
|
-
if (entry.endsWith(
|
|
27
|
-
return entry.slice(0, -
|
|
26
|
+
if (entry.endsWith("/README.md")) {
|
|
27
|
+
return entry.slice(0, -"/README.md".length);
|
|
28
28
|
}
|
|
29
|
-
if (entry.endsWith(
|
|
30
|
-
return `${entry.slice(0, -
|
|
29
|
+
if (entry.endsWith("/AGENTS.md")) {
|
|
30
|
+
return `${entry.slice(0, -"/AGENTS.md".length)}/agents`;
|
|
31
31
|
}
|
|
32
32
|
return entry;
|
|
33
33
|
}
|
|
@@ -41,15 +41,15 @@ function createDocAliasMap(entries) {
|
|
|
41
41
|
}
|
|
42
42
|
function encodePathSegments(pathValue) {
|
|
43
43
|
return pathValue
|
|
44
|
-
.split(
|
|
44
|
+
.split("/")
|
|
45
45
|
.map((segment) => encodeURIComponent(segment))
|
|
46
|
-
.join(
|
|
46
|
+
.join("/");
|
|
47
47
|
}
|
|
48
48
|
function buildDocumentationIndexUrl(base) {
|
|
49
|
-
return `${base.replace(/\/$/,
|
|
49
|
+
return `${base.replace(/\/$/, "")}/${DOCUMENTATION_ROOT}/${encodeURIComponent(DOCUMENTATION_INDEX_FILE)}`;
|
|
50
50
|
}
|
|
51
51
|
function buildDocumentationFileUrl(base, relativePath) {
|
|
52
|
-
return `${base.replace(/\/$/,
|
|
52
|
+
return `${base.replace(/\/$/, "")}/${DOCUMENTATION_ROOT}/${encodePathSegments(relativePath)}`;
|
|
53
53
|
}
|
|
54
54
|
async function fetchDocumentationIndex(indexUrl, command) {
|
|
55
55
|
let response;
|
|
@@ -57,7 +57,9 @@ async function fetchDocumentationIndex(indexUrl, command) {
|
|
|
57
57
|
response = await fetch(indexUrl);
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
60
|
-
(0, messages_1.printErrorWithHelp)(
|
|
60
|
+
(0, messages_1.printErrorWithHelp)("Fetching documentation failed.", [error instanceof Error ? error.message : String(error)], {
|
|
61
|
+
command,
|
|
62
|
+
});
|
|
61
63
|
process.exitCode = 1;
|
|
62
64
|
return null;
|
|
63
65
|
}
|
|
@@ -67,35 +69,39 @@ async function fetchDocumentationIndex(indexUrl, command) {
|
|
|
67
69
|
return null;
|
|
68
70
|
}
|
|
69
71
|
const payload = await response.json().catch(() => null);
|
|
70
|
-
if (!Array.isArray(payload) || payload.some((entry) => typeof entry !==
|
|
71
|
-
(0, messages_1.printErrorWithHelp)(
|
|
72
|
+
if (!Array.isArray(payload) || payload.some((entry) => typeof entry !== "string")) {
|
|
73
|
+
(0, messages_1.printErrorWithHelp)("Documentation index is invalid.", ["Retry in a moment or contact the platform team."], {
|
|
74
|
+
command,
|
|
75
|
+
});
|
|
72
76
|
process.exitCode = 1;
|
|
73
77
|
return null;
|
|
74
78
|
}
|
|
75
79
|
return payload;
|
|
76
80
|
}
|
|
77
81
|
async function browseDocumentation(options = {}) {
|
|
78
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
82
|
+
await (0, commandContext_1.withPublicEnvironment)("documentation browse", async ({ envConfig }) => {
|
|
79
83
|
if (!envConfig.cdnBase) {
|
|
80
|
-
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a documentation base URL.`, [
|
|
84
|
+
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a documentation base URL.`, ["Set PLAYDROP_CDN_BASE or use an environment that publishes documentation assets."], { command: "documentation browse" });
|
|
81
85
|
process.exitCode = 1;
|
|
82
86
|
return;
|
|
83
87
|
}
|
|
84
|
-
const entries = await fetchDocumentationIndex(buildDocumentationIndexUrl(envConfig.cdnBase),
|
|
88
|
+
const entries = await fetchDocumentationIndex(buildDocumentationIndexUrl(envConfig.cdnBase), "documentation browse");
|
|
85
89
|
if (!entries) {
|
|
86
90
|
return;
|
|
87
91
|
}
|
|
88
|
-
const normalizedEntries = [
|
|
92
|
+
const normalizedEntries = [
|
|
93
|
+
...new Set(entries.map((entry) => normalizeDocPath(entry)).filter((entry) => Boolean(entry))),
|
|
94
|
+
].sort((a, b) => a.localeCompare(b));
|
|
89
95
|
const items = [...new Set(normalizedEntries.map((entry) => toDisplayDocPath(entry)))].sort((a, b) => a.localeCompare(b));
|
|
90
96
|
if (options.json) {
|
|
91
97
|
(0, output_1.printJson)({ items });
|
|
92
98
|
return;
|
|
93
99
|
}
|
|
94
100
|
if (items.length === 0) {
|
|
95
|
-
console.log(
|
|
101
|
+
console.log("No documentation entries were returned.");
|
|
96
102
|
return;
|
|
97
103
|
}
|
|
98
|
-
console.log(
|
|
104
|
+
console.log("Documentation:\n");
|
|
99
105
|
for (const item of items) {
|
|
100
106
|
console.log(item);
|
|
101
107
|
}
|
|
@@ -105,25 +111,27 @@ async function browseDocumentation(options = {}) {
|
|
|
105
111
|
async function readDocumentation(pathArg) {
|
|
106
112
|
const normalizedTarget = normalizeDocPath(pathArg);
|
|
107
113
|
if (!normalizedTarget) {
|
|
108
|
-
(0, messages_1.printErrorWithHelp)(
|
|
114
|
+
(0, messages_1.printErrorWithHelp)("A documentation path is required.", ["Use a relative path such as runtime.", 'Run "playdrop documentation browse" to list available entries.'], { command: "documentation read" });
|
|
109
115
|
process.exitCode = 1;
|
|
110
116
|
return;
|
|
111
117
|
}
|
|
112
|
-
await (0, commandContext_1.withPublicEnvironment)(
|
|
118
|
+
await (0, commandContext_1.withPublicEnvironment)("documentation read", async ({ envConfig }) => {
|
|
113
119
|
if (!envConfig.cdnBase) {
|
|
114
|
-
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a documentation base URL.`, [
|
|
120
|
+
(0, messages_1.printErrorWithHelp)(`Environment "${envConfig.name}" does not include a documentation base URL.`, ["Set PLAYDROP_CDN_BASE or use an environment that publishes documentation assets."], { command: "documentation read" });
|
|
115
121
|
process.exitCode = 1;
|
|
116
122
|
return;
|
|
117
123
|
}
|
|
118
|
-
const entries = await fetchDocumentationIndex(buildDocumentationIndexUrl(envConfig.cdnBase),
|
|
124
|
+
const entries = await fetchDocumentationIndex(buildDocumentationIndexUrl(envConfig.cdnBase), "documentation read");
|
|
119
125
|
if (!entries) {
|
|
120
126
|
return;
|
|
121
127
|
}
|
|
122
|
-
const normalizedEntries = [
|
|
128
|
+
const normalizedEntries = [
|
|
129
|
+
...new Set(entries.map((entry) => normalizeDocPath(entry)).filter((entry) => Boolean(entry))),
|
|
130
|
+
];
|
|
123
131
|
const aliases = createDocAliasMap(normalizedEntries);
|
|
124
132
|
const resolvedTarget = aliases.get(normalizedTarget);
|
|
125
133
|
if (!resolvedTarget) {
|
|
126
|
-
(0, messages_1.printErrorWithHelp)(`Documentation entry "${normalizedTarget}" was not found.`, ['Run "playdrop documentation browse" to list available entries.'], { command:
|
|
134
|
+
(0, messages_1.printErrorWithHelp)(`Documentation entry "${normalizedTarget}" was not found.`, ['Run "playdrop documentation browse" to list available entries.'], { command: "documentation read" });
|
|
127
135
|
process.exitCode = 1;
|
|
128
136
|
return;
|
|
129
137
|
}
|
|
@@ -133,12 +141,14 @@ async function readDocumentation(pathArg) {
|
|
|
133
141
|
response = await fetch(fileUrl);
|
|
134
142
|
}
|
|
135
143
|
catch (error) {
|
|
136
|
-
(0, messages_1.printErrorWithHelp)(`Fetching documentation entry "${normalizedTarget}" failed.`, [error instanceof Error ? error.message : String(error)], { command:
|
|
144
|
+
(0, messages_1.printErrorWithHelp)(`Fetching documentation entry "${normalizedTarget}" failed.`, [error instanceof Error ? error.message : String(error)], { command: "documentation read" });
|
|
137
145
|
process.exitCode = 1;
|
|
138
146
|
return;
|
|
139
147
|
}
|
|
140
148
|
if (!response.ok) {
|
|
141
|
-
(0, messages_1.printErrorWithHelp)(`Failed to fetch "${normalizedTarget}".`, [`HTTP ${response.status} ${response.statusText}`], {
|
|
149
|
+
(0, messages_1.printErrorWithHelp)(`Failed to fetch "${normalizedTarget}".`, [`HTTP ${response.status} ${response.statusText}`], {
|
|
150
|
+
command: "documentation read",
|
|
151
|
+
});
|
|
142
152
|
process.exitCode = 1;
|
|
143
153
|
return;
|
|
144
154
|
}
|
|
@@ -21,18 +21,20 @@ function parsePositiveInteger(raw, label, command, options = {}) {
|
|
|
21
21
|
if (raw === undefined) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
const parsed = typeof raw ===
|
|
24
|
+
const parsed = typeof raw === "number" ? raw : Number.parseInt(String(raw), 10);
|
|
25
25
|
if (!Number.isInteger(parsed) || parsed < 0 || (!options.zeroAllowed && parsed === 0)) {
|
|
26
|
-
(0, messages_1.printErrorWithHelp)(`${label} must be ${options.zeroAllowed ?
|
|
26
|
+
(0, messages_1.printErrorWithHelp)(`${label} must be ${options.zeroAllowed ? "zero or a positive integer" : "a positive integer"}.`, [], { command });
|
|
27
27
|
process.exitCode = 1;
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
return parsed;
|
|
31
31
|
}
|
|
32
32
|
function parseFeedbackCategory(raw, command) {
|
|
33
|
-
const normalized = typeof raw ===
|
|
33
|
+
const normalized = typeof raw === "string" && raw.trim().length > 0 ? raw.trim() : "other";
|
|
34
34
|
if (!FEEDBACK_CATEGORY_SET.has(normalized)) {
|
|
35
|
-
(0, messages_1.printErrorWithHelp)(`Feedback category must be one of: ${types_1.MANUAL_FEEDBACK_CATEGORY_VALUES.join(
|
|
35
|
+
(0, messages_1.printErrorWithHelp)(`Feedback category must be one of: ${types_1.MANUAL_FEEDBACK_CATEGORY_VALUES.join(", ")}.`, [], {
|
|
36
|
+
command,
|
|
37
|
+
});
|
|
36
38
|
process.exitCode = 1;
|
|
37
39
|
return null;
|
|
38
40
|
}
|
|
@@ -41,7 +43,7 @@ function parseFeedbackCategory(raw, command) {
|
|
|
41
43
|
async function loadCommentFromFile(filePath) {
|
|
42
44
|
const absolute = node_path_1.default.resolve(filePath);
|
|
43
45
|
try {
|
|
44
|
-
const contents = await node_fs_1.promises.readFile(absolute,
|
|
46
|
+
const contents = await node_fs_1.promises.readFile(absolute, "utf8");
|
|
45
47
|
const trimmed = contents.trim();
|
|
46
48
|
return trimmed.length > 0 ? trimmed : null;
|
|
47
49
|
}
|
|
@@ -50,51 +52,57 @@ async function loadCommentFromFile(filePath) {
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
async function sendFeedback(options = {}) {
|
|
53
|
-
const title = typeof options.title ===
|
|
55
|
+
const title = typeof options.title === "string" ? options.title.trim() : "";
|
|
54
56
|
if (!title) {
|
|
55
|
-
(0, messages_1.printErrorWithHelp)(
|
|
57
|
+
(0, messages_1.printErrorWithHelp)("Feedback title is required.", ["Use --title <title>."], { command: "feedback send" });
|
|
56
58
|
process.exitCode = 1;
|
|
57
59
|
return;
|
|
58
60
|
}
|
|
59
61
|
if (title.length > MAX_FEEDBACK_TITLE_LENGTH) {
|
|
60
|
-
(0, messages_1.printErrorWithHelp)(`Feedback title must be ${MAX_FEEDBACK_TITLE_LENGTH} characters or fewer.`, [], {
|
|
62
|
+
(0, messages_1.printErrorWithHelp)(`Feedback title must be ${MAX_FEEDBACK_TITLE_LENGTH} characters or fewer.`, [], {
|
|
63
|
+
command: "feedback send",
|
|
64
|
+
});
|
|
61
65
|
process.exitCode = 1;
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
64
68
|
const commentParts = [];
|
|
65
|
-
if (typeof options.comment ===
|
|
69
|
+
if (typeof options.comment === "string" && options.comment.trim().length > 0) {
|
|
66
70
|
commentParts.push(options.comment.trim());
|
|
67
71
|
}
|
|
68
|
-
if (typeof options.file ===
|
|
72
|
+
if (typeof options.file === "string" && options.file.trim().length > 0) {
|
|
69
73
|
const fileComment = await loadCommentFromFile(options.file.trim());
|
|
70
74
|
if (!fileComment) {
|
|
71
|
-
(0, messages_1.printErrorWithHelp)(`Could not read feedback text from "${options.file}".`, [
|
|
75
|
+
(0, messages_1.printErrorWithHelp)(`Could not read feedback text from "${options.file}".`, ["Provide a readable file or use --comment <text>."], { command: "feedback send" });
|
|
72
76
|
process.exitCode = 1;
|
|
73
77
|
return;
|
|
74
78
|
}
|
|
75
79
|
commentParts.push(fileComment);
|
|
76
80
|
}
|
|
77
|
-
const comment = commentParts.join(
|
|
81
|
+
const comment = commentParts.join("\n\n").trim();
|
|
78
82
|
if (!comment) {
|
|
79
|
-
(0, messages_1.printErrorWithHelp)(
|
|
83
|
+
(0, messages_1.printErrorWithHelp)("Feedback text is required.", ["Use --comment <text> or --file <path>."], {
|
|
84
|
+
command: "feedback send",
|
|
85
|
+
});
|
|
80
86
|
process.exitCode = 1;
|
|
81
87
|
return;
|
|
82
88
|
}
|
|
83
89
|
if (comment.length > MAX_FEEDBACK_COMMENT_LENGTH) {
|
|
84
|
-
(0, messages_1.printErrorWithHelp)(`Feedback text must be ${MAX_FEEDBACK_COMMENT_LENGTH} characters or fewer.`, [], {
|
|
90
|
+
(0, messages_1.printErrorWithHelp)(`Feedback text must be ${MAX_FEEDBACK_COMMENT_LENGTH} characters or fewer.`, [], {
|
|
91
|
+
command: "feedback send",
|
|
92
|
+
});
|
|
85
93
|
process.exitCode = 1;
|
|
86
94
|
return;
|
|
87
95
|
}
|
|
88
|
-
const category = parseFeedbackCategory(options.category,
|
|
96
|
+
const category = parseFeedbackCategory(options.category, "feedback send");
|
|
89
97
|
if (!category) {
|
|
90
98
|
return;
|
|
91
99
|
}
|
|
92
|
-
await (0, commandContext_1.withEnvironment)(
|
|
100
|
+
await (0, commandContext_1.withEnvironment)("feedback send", "Sending feedback", async ({ client }) => {
|
|
93
101
|
try {
|
|
94
102
|
const response = await client.submitFeedback({
|
|
95
103
|
title,
|
|
96
104
|
comment,
|
|
97
|
-
client:
|
|
105
|
+
client: "cli",
|
|
98
106
|
category,
|
|
99
107
|
version: (0, clientInfo_1.getCliVersion)(),
|
|
100
108
|
build: String((0, clientInfo_1.getCliBuild)()),
|
|
@@ -103,13 +111,18 @@ async function sendFeedback(options = {}) {
|
|
|
103
111
|
(0, output_1.printJson)({ success: true, response });
|
|
104
112
|
return;
|
|
105
113
|
}
|
|
106
|
-
(0, output_1.printSuccess)(
|
|
114
|
+
(0, output_1.printSuccess)("Feedback sent.", [
|
|
115
|
+
'Next: run "playdrop feedback browse" if you want to review your submitted feedback.',
|
|
116
|
+
]);
|
|
107
117
|
}
|
|
108
118
|
catch (error) {
|
|
109
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
119
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "feedback send", "Feedback send", {
|
|
110
120
|
apiMessage: (apiError) => ({
|
|
111
121
|
problem: `Feedback send failed with status ${apiError.status}.`,
|
|
112
|
-
suggestions: [
|
|
122
|
+
suggestions: [
|
|
123
|
+
"Check the provided fields and retry.",
|
|
124
|
+
'Run "playdrop auth login" if your session may be stale.',
|
|
125
|
+
],
|
|
113
126
|
}),
|
|
114
127
|
});
|
|
115
128
|
if (!handled) {
|
|
@@ -119,31 +132,33 @@ async function sendFeedback(options = {}) {
|
|
|
119
132
|
});
|
|
120
133
|
}
|
|
121
134
|
async function browseFeedback(options = {}) {
|
|
122
|
-
const limit = options.limit !== undefined ? parsePositiveInteger(options.limit,
|
|
135
|
+
const limit = options.limit !== undefined ? parsePositiveInteger(options.limit, "--limit", "feedback browse") : null;
|
|
123
136
|
if (options.limit !== undefined && limit === null) {
|
|
124
137
|
return;
|
|
125
138
|
}
|
|
126
|
-
const offset = options.offset !== undefined
|
|
139
|
+
const offset = options.offset !== undefined
|
|
140
|
+
? parsePositiveInteger(options.offset, "--offset", "feedback browse", { zeroAllowed: true })
|
|
141
|
+
: null;
|
|
127
142
|
if (options.offset !== undefined && offset === null) {
|
|
128
143
|
return;
|
|
129
144
|
}
|
|
130
|
-
const userId = options.userId !== undefined ? parsePositiveInteger(options.userId,
|
|
145
|
+
const userId = options.userId !== undefined ? parsePositiveInteger(options.userId, "--user-id", "feedback browse") : null;
|
|
131
146
|
if (options.userId !== undefined && userId === null) {
|
|
132
147
|
return;
|
|
133
148
|
}
|
|
134
|
-
const clientFilter = typeof options.client ===
|
|
135
|
-
if (clientFilter && clientFilter !==
|
|
136
|
-
(0, messages_1.printErrorWithHelp)(
|
|
149
|
+
const clientFilter = typeof options.client === "string" && options.client.trim().length > 0 ? options.client.trim() : undefined;
|
|
150
|
+
if (clientFilter && clientFilter !== "cli") {
|
|
151
|
+
(0, messages_1.printErrorWithHelp)("CLI feedback browse only supports --client cli.", [], { command: "feedback browse" });
|
|
137
152
|
process.exitCode = 1;
|
|
138
153
|
return;
|
|
139
154
|
}
|
|
140
155
|
const sinceHours = options.sinceHours !== undefined
|
|
141
|
-
? parsePositiveInteger(options.sinceHours,
|
|
156
|
+
? parsePositiveInteger(options.sinceHours, "--since-hours", "feedback browse")
|
|
142
157
|
: null;
|
|
143
158
|
if (options.sinceHours !== undefined && sinceHours === null) {
|
|
144
159
|
return;
|
|
145
160
|
}
|
|
146
|
-
await (0, commandContext_1.withEnvironment)(
|
|
161
|
+
await (0, commandContext_1.withEnvironment)("feedback browse", "Browsing feedback", async ({ client }) => {
|
|
147
162
|
try {
|
|
148
163
|
if (options.admin) {
|
|
149
164
|
const cutoff = sinceHours === null ? null : Date.now() - sinceHours * 60 * 60 * 1000;
|
|
@@ -170,10 +185,10 @@ async function browseFeedback(options = {}) {
|
|
|
170
185
|
return;
|
|
171
186
|
}
|
|
172
187
|
if (items.length === 0) {
|
|
173
|
-
console.log(
|
|
188
|
+
console.log("No feedback entries found.");
|
|
174
189
|
return;
|
|
175
190
|
}
|
|
176
|
-
console.log(
|
|
191
|
+
console.log("Feedback:\n");
|
|
177
192
|
for (const item of items) {
|
|
178
193
|
console.log(`#${item.id} | ${item.category} | ${item.client} | ${(0, output_1.formatTimestamp)(item.createdAt)}`);
|
|
179
194
|
console.log(` ${item.title}`);
|
|
@@ -193,10 +208,10 @@ async function browseFeedback(options = {}) {
|
|
|
193
208
|
return;
|
|
194
209
|
}
|
|
195
210
|
if (items.length === 0) {
|
|
196
|
-
console.log(
|
|
211
|
+
console.log("No feedback entries found.");
|
|
197
212
|
return;
|
|
198
213
|
}
|
|
199
|
-
console.log(
|
|
214
|
+
console.log("Feedback:\n");
|
|
200
215
|
for (const item of items) {
|
|
201
216
|
console.log(`#${item.id} | ${item.username} | ${(0, output_1.formatTimestamp)(item.createdAt)}`);
|
|
202
217
|
console.log(` ${item.title}`);
|
|
@@ -204,17 +219,17 @@ async function browseFeedback(options = {}) {
|
|
|
204
219
|
}
|
|
205
220
|
}
|
|
206
221
|
catch (error) {
|
|
207
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
222
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "feedback browse", "Feedback browse", {
|
|
208
223
|
apiMessage: (apiError) => {
|
|
209
224
|
if (apiError.status === 403) {
|
|
210
225
|
return {
|
|
211
|
-
problem:
|
|
212
|
-
suggestions: [
|
|
226
|
+
problem: "You can only browse your own feedback unless you are an admin.",
|
|
227
|
+
suggestions: ["Drop --user-id or use your own user id, then retry."],
|
|
213
228
|
};
|
|
214
229
|
}
|
|
215
230
|
return {
|
|
216
231
|
problem: `Feedback browse failed with status ${apiError.status}.`,
|
|
217
|
-
suggestions: [
|
|
232
|
+
suggestions: ["Ensure you are logged in with a valid Playdrop session."],
|
|
218
233
|
};
|
|
219
234
|
},
|
|
220
235
|
});
|
|
@@ -225,31 +240,33 @@ async function browseFeedback(options = {}) {
|
|
|
225
240
|
});
|
|
226
241
|
}
|
|
227
242
|
async function deleteFeedbackEntry(rawId, options = {}) {
|
|
228
|
-
const id = parsePositiveInteger(rawId,
|
|
243
|
+
const id = parsePositiveInteger(rawId, "Feedback id", "feedback delete");
|
|
229
244
|
if (id === null) {
|
|
230
245
|
return;
|
|
231
246
|
}
|
|
232
|
-
await (0, commandContext_1.withEnvironment)(
|
|
247
|
+
await (0, commandContext_1.withEnvironment)("feedback delete", "Deleting feedback", async ({ client }) => {
|
|
233
248
|
try {
|
|
234
249
|
const response = await client.deleteFeedback(id);
|
|
235
250
|
if (options.json) {
|
|
236
251
|
(0, output_1.printJson)({ success: Boolean(response.success), id });
|
|
237
252
|
return;
|
|
238
253
|
}
|
|
239
|
-
(0, output_1.printSuccess)(`Feedback #${id} deleted.`, [
|
|
254
|
+
(0, output_1.printSuccess)(`Feedback #${id} deleted.`, [
|
|
255
|
+
'Next: run "playdrop feedback browse" to review the remaining entries.',
|
|
256
|
+
]);
|
|
240
257
|
}
|
|
241
258
|
catch (error) {
|
|
242
|
-
const handled = (0, errors_1.handleCommandFailure)(error,
|
|
259
|
+
const handled = (0, errors_1.handleCommandFailure)(error, "feedback delete", "Feedback delete", {
|
|
243
260
|
apiMessage: (apiError) => {
|
|
244
261
|
if (apiError.status === 403) {
|
|
245
262
|
return {
|
|
246
|
-
problem:
|
|
263
|
+
problem: "Only admins can delete feedback.",
|
|
247
264
|
suggestions: [],
|
|
248
265
|
};
|
|
249
266
|
}
|
|
250
267
|
return {
|
|
251
268
|
problem: `Feedback delete failed with status ${apiError.status}.`,
|
|
252
|
-
suggestions: [
|
|
269
|
+
suggestions: ["Check the id and your permissions, then retry."],
|
|
253
270
|
};
|
|
254
271
|
},
|
|
255
272
|
});
|
package/dist/commands/format.js
CHANGED
|
@@ -8,28 +8,28 @@ const validate_1 = require("../apps/validate");
|
|
|
8
8
|
async function format(pathOrName) {
|
|
9
9
|
const selection = (0, taskSelection_1.selectTasks)(pathOrName);
|
|
10
10
|
if (selection.errors.length > 0) {
|
|
11
|
-
(0, taskSelection_1.reportTaskErrors)(selection.errors,
|
|
11
|
+
(0, taskSelection_1.reportTaskErrors)(selection.errors, "project format");
|
|
12
12
|
process.exitCode = 1;
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
const tasks = selection.tasks;
|
|
16
16
|
const warnings = selection.warnings;
|
|
17
17
|
if (tasks.length === 0) {
|
|
18
|
-
(0, uploadLog_1.printTaskSummary)([], warnings, { action:
|
|
18
|
+
(0, uploadLog_1.printTaskSummary)([], warnings, { action: "format" });
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
const results = [];
|
|
22
22
|
for (const task of (0, taskUtils_1.sortTasks)(tasks)) {
|
|
23
23
|
try {
|
|
24
|
-
if (task.kind ===
|
|
24
|
+
if (task.kind === "app") {
|
|
25
25
|
const ran = await (0, validate_1.runFormatScript)(task);
|
|
26
26
|
if (!ran) {
|
|
27
27
|
throw new Error(`project format requires a package.json "format" script for app "${task.name}".`);
|
|
28
28
|
}
|
|
29
29
|
const entry = {
|
|
30
|
-
action:
|
|
31
|
-
status:
|
|
32
|
-
entityType:
|
|
30
|
+
action: "format",
|
|
31
|
+
status: "success",
|
|
32
|
+
entityType: "app",
|
|
33
33
|
entityId: task.name,
|
|
34
34
|
catalogue: task.cataloguePath,
|
|
35
35
|
};
|
|
@@ -43,8 +43,8 @@ async function format(pathOrName) {
|
|
|
43
43
|
catch (error) {
|
|
44
44
|
const message = error?.message ?? String(error);
|
|
45
45
|
const entry = {
|
|
46
|
-
action:
|
|
47
|
-
status:
|
|
46
|
+
action: "format",
|
|
47
|
+
status: "error",
|
|
48
48
|
entityType: task.kind,
|
|
49
49
|
entityId: task.name,
|
|
50
50
|
catalogue: task.cataloguePath,
|
|
@@ -54,5 +54,5 @@ async function format(pathOrName) {
|
|
|
54
54
|
console.log((0, uploadLog_1.formatTaskLogLine)(entry));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
(0, uploadLog_1.printTaskSummary)(results, warnings, { action:
|
|
57
|
+
(0, uploadLog_1.printTaskSummary)(results, warnings, { action: "format" });
|
|
58
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ImageAttachment } from
|
|
1
|
+
import type { ImageAttachment } from "@playdrop/ai-client";
|
|
2
2
|
type AiGenerateOptions = {
|
|
3
3
|
subcategory?: string;
|
|
4
4
|
assetName?: string;
|
|
@@ -33,7 +33,7 @@ type AiListOptions = {
|
|
|
33
33
|
offset?: string | number;
|
|
34
34
|
format?: string;
|
|
35
35
|
};
|
|
36
|
-
export declare function resolveImageAttachment(value: string | undefined, optionName:
|
|
36
|
+
export declare function resolveImageAttachment(value: string | undefined, optionName: "image1" | "image2"): ImageAttachment | undefined;
|
|
37
37
|
export declare function generate(typeInput: string, promptInput: string, options?: AiGenerateOptions): Promise<void>;
|
|
38
38
|
type AiJobBrowseOptions = {
|
|
39
39
|
type?: string;
|