@playdrop/playdrop-cli 0.16.5 → 0.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiClient } from
|
|
2
|
-
import type { AppResponse, UserResponse } from
|
|
3
|
-
import { type ParsedSurfaceTargets } from
|
|
1
|
+
import type { ApiClient } from "@playdrop/api-client";
|
|
2
|
+
import type { AppResponse, UserResponse } from "@playdrop/types";
|
|
3
|
+
import { type ParsedSurfaceTargets } from "../catalogue-utils";
|
|
4
4
|
export type ResolvedDevTarget = {
|
|
5
5
|
appName: string;
|
|
6
6
|
htmlPath: string;
|
|
@@ -25,55 +25,55 @@ function createDevError(code, message) {
|
|
|
25
25
|
return error;
|
|
26
26
|
}
|
|
27
27
|
function isNetworkError(error) {
|
|
28
|
-
if (!error || typeof error !==
|
|
28
|
+
if (!error || typeof error !== "object") {
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
31
|
const candidate = error;
|
|
32
32
|
if (candidate instanceof TypeError) {
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
|
-
const code = typeof candidate.code ===
|
|
36
|
-
if (code ===
|
|
35
|
+
const code = typeof candidate.code === "string" ? candidate.code : undefined;
|
|
36
|
+
if (code === "ECONNREFUSED" || code === "ENOTFOUND") {
|
|
37
37
|
return true;
|
|
38
38
|
}
|
|
39
39
|
const cause = candidate.cause;
|
|
40
|
-
if (cause && typeof cause ===
|
|
40
|
+
if (cause && typeof cause === "object" && typeof cause.code === "string") {
|
|
41
41
|
const nestedCode = cause.code;
|
|
42
|
-
return nestedCode ===
|
|
42
|
+
return nestedCode === "ECONNREFUSED" || nestedCode === "ENOTFOUND";
|
|
43
43
|
}
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
async function fetchDevUser(client) {
|
|
47
47
|
const response = await client.me();
|
|
48
48
|
const user = response?.user;
|
|
49
|
-
if (user && typeof user.username ===
|
|
49
|
+
if (user && typeof user.username === "string" && user.username.trim().length > 0) {
|
|
50
50
|
return { ...user, username: user.username.trim() };
|
|
51
51
|
}
|
|
52
|
-
throw new Error(
|
|
52
|
+
throw new Error("DEV_USERNAME_EMPTY");
|
|
53
53
|
}
|
|
54
54
|
async function fetchDevUsername(client) {
|
|
55
55
|
const user = await fetchDevUser(client);
|
|
56
56
|
return user.username;
|
|
57
57
|
}
|
|
58
58
|
async function resolveDevCreatorUsername(input) {
|
|
59
|
-
const workspaceOwnerUsername = input.workspaceOwnerUsername?.trim() ??
|
|
59
|
+
const workspaceOwnerUsername = input.workspaceOwnerUsername?.trim() ?? "";
|
|
60
60
|
if (workspaceOwnerUsername) {
|
|
61
61
|
return workspaceOwnerUsername;
|
|
62
62
|
}
|
|
63
|
-
const accountUsername = input.accountUsername?.trim() ??
|
|
64
|
-
return accountUsername || await fetchDevUsername(input.client);
|
|
63
|
+
const accountUsername = input.accountUsername?.trim() ?? "";
|
|
64
|
+
return accountUsername || (await fetchDevUsername(input.client));
|
|
65
65
|
}
|
|
66
66
|
async function assertAppRegistered(client, creatorUsername, appName) {
|
|
67
67
|
const response = await client.fetchAppBySlug(creatorUsername, appName);
|
|
68
68
|
if (!response?.app) {
|
|
69
|
-
throw new Error(
|
|
69
|
+
throw new Error("app_not_found");
|
|
70
70
|
}
|
|
71
71
|
return response.app;
|
|
72
72
|
}
|
|
73
73
|
function findNearestCatalogue(startDir) {
|
|
74
74
|
let current = (0, node_path_1.resolve)(startDir);
|
|
75
75
|
while (true) {
|
|
76
|
-
const candidate = (0, node_path_1.join)(current,
|
|
76
|
+
const candidate = (0, node_path_1.join)(current, "catalogue.json");
|
|
77
77
|
if ((0, node_fs_1.existsSync)(candidate)) {
|
|
78
78
|
return candidate;
|
|
79
79
|
}
|
|
@@ -86,40 +86,40 @@ function findNearestCatalogue(startDir) {
|
|
|
86
86
|
}
|
|
87
87
|
function parseCatalogueApps(cataloguePath) {
|
|
88
88
|
try {
|
|
89
|
-
const raw = (0, node_fs_1.readFileSync)(cataloguePath,
|
|
89
|
+
const raw = (0, node_fs_1.readFileSync)(cataloguePath, "utf8");
|
|
90
90
|
const data = raw.trim() ? JSON.parse(raw) : {};
|
|
91
91
|
if (Array.isArray(data)) {
|
|
92
92
|
return data;
|
|
93
93
|
}
|
|
94
|
-
if (data && typeof data ===
|
|
94
|
+
if (data && typeof data === "object" && Array.isArray(data.apps)) {
|
|
95
95
|
return data.apps;
|
|
96
96
|
}
|
|
97
97
|
return [];
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
|
-
throw createDevError(
|
|
100
|
+
throw createDevError("invalid_catalogue", `Failed to parse catalogue at ${cataloguePath}: ${error?.message || "invalid JSON"}`);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function resolveAppFromCatalogue(cataloguePath, appName) {
|
|
104
|
-
const apps = parseCatalogueApps(cataloguePath).filter(entry => entry && typeof entry.name ===
|
|
104
|
+
const apps = parseCatalogueApps(cataloguePath).filter((entry) => entry && typeof entry.name === "string");
|
|
105
105
|
if (apps.length === 0) {
|
|
106
|
-
throw createDevError(
|
|
106
|
+
throw createDevError("empty_catalogue", `No apps found in ${cataloguePath}.`);
|
|
107
107
|
}
|
|
108
108
|
let selected;
|
|
109
109
|
if (appName) {
|
|
110
|
-
selected = apps.find(entry => entry.name.trim() === appName.trim());
|
|
110
|
+
selected = apps.find((entry) => entry.name.trim() === appName.trim());
|
|
111
111
|
if (!selected) {
|
|
112
|
-
throw createDevError(
|
|
112
|
+
throw createDevError("app_not_found", `App "${appName}" was not found in ${cataloguePath}.`);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
else if (apps.length === 1) {
|
|
116
116
|
selected = apps[0];
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
|
-
throw createDevError(
|
|
119
|
+
throw createDevError("app_required", `Multiple apps found in ${cataloguePath}. Use --app <name> to choose one.`);
|
|
120
120
|
}
|
|
121
121
|
const entryName = selected.name.trim();
|
|
122
|
-
const relativeFile = typeof selected.file ===
|
|
122
|
+
const relativeFile = typeof selected.file === "string" && selected.file.trim().length > 0
|
|
123
123
|
? selected.file.trim()
|
|
124
124
|
: `${entryName}.html`;
|
|
125
125
|
const htmlPath = (0, node_path_1.resolve)((0, node_path_1.dirname)(cataloguePath), relativeFile);
|
|
@@ -135,7 +135,7 @@ function resolveDevTarget(targetArg, appOption) {
|
|
|
135
135
|
if (!targetArg) {
|
|
136
136
|
const cataloguePath = findNearestCatalogue(process.cwd());
|
|
137
137
|
if (!cataloguePath) {
|
|
138
|
-
throw createDevError(
|
|
138
|
+
throw createDevError("catalogue_missing", 'Run "playdrop project dev" inside a workspace or provide a path to an app HTML file.');
|
|
139
139
|
}
|
|
140
140
|
return resolveAppFromCatalogue(cataloguePath, appOption);
|
|
141
141
|
}
|
|
@@ -143,20 +143,20 @@ function resolveDevTarget(targetArg, appOption) {
|
|
|
143
143
|
if ((0, node_fs_1.existsSync)(absoluteTarget)) {
|
|
144
144
|
const stats = (0, node_fs_1.statSync)(absoluteTarget);
|
|
145
145
|
if (stats.isDirectory()) {
|
|
146
|
-
const cataloguePath = (0, node_path_1.join)(absoluteTarget,
|
|
146
|
+
const cataloguePath = (0, node_path_1.join)(absoluteTarget, "catalogue.json");
|
|
147
147
|
if (!(0, node_fs_1.existsSync)(cataloguePath)) {
|
|
148
|
-
throw createDevError(
|
|
148
|
+
throw createDevError("catalogue_missing", `Directory ${absoluteTarget} does not contain catalogue.json.`);
|
|
149
149
|
}
|
|
150
150
|
return resolveAppFromCatalogue(cataloguePath, appOption);
|
|
151
151
|
}
|
|
152
152
|
if (!stats.isFile()) {
|
|
153
|
-
throw createDevError(
|
|
153
|
+
throw createDevError("invalid_target", `Target ${absoluteTarget} is not a file.`);
|
|
154
154
|
}
|
|
155
|
-
if (!absoluteTarget.toLowerCase().endsWith(
|
|
156
|
-
throw createDevError(
|
|
155
|
+
if (!absoluteTarget.toLowerCase().endsWith(".html")) {
|
|
156
|
+
throw createDevError("invalid_target", "Provide an HTML file when using a direct file path.");
|
|
157
157
|
}
|
|
158
158
|
let surfaceTargets = cloneSurfaceTargets(DEFAULT_SURFACE_TARGETS);
|
|
159
|
-
let derivedName = (0, node_path_1.basename)(absoluteTarget,
|
|
159
|
+
let derivedName = (0, node_path_1.basename)(absoluteTarget, ".html");
|
|
160
160
|
let derivedCataloguePath = null;
|
|
161
161
|
try {
|
|
162
162
|
const info = (0, catalogue_utils_1.findAppCatalogueInfo)(absoluteTarget);
|
|
@@ -182,7 +182,7 @@ function resolveDevTarget(targetArg, appOption) {
|
|
|
182
182
|
}
|
|
183
183
|
const cataloguePath = findNearestCatalogue(process.cwd());
|
|
184
184
|
if (!cataloguePath) {
|
|
185
|
-
throw createDevError(
|
|
185
|
+
throw createDevError("catalogue_missing", `Could not find catalogue.json for app "${targetArg}". Run "playdrop project dev" from a workspace or provide a file path.`);
|
|
186
186
|
}
|
|
187
187
|
return resolveAppFromCatalogue(cataloguePath, targetArg);
|
|
188
188
|
}
|
|
@@ -191,10 +191,10 @@ function findProjectInfo(htmlPath) {
|
|
|
191
191
|
const visited = new Set();
|
|
192
192
|
while (!visited.has(current)) {
|
|
193
193
|
visited.add(current);
|
|
194
|
-
const candidate = (0, node_path_1.join)(current,
|
|
194
|
+
const candidate = (0, node_path_1.join)(current, "package.json");
|
|
195
195
|
if ((0, node_fs_1.existsSync)(candidate) && (0, node_fs_1.statSync)(candidate).isFile()) {
|
|
196
196
|
try {
|
|
197
|
-
const pkg = JSON.parse((0, node_fs_1.readFileSync)(candidate,
|
|
197
|
+
const pkg = JSON.parse((0, node_fs_1.readFileSync)(candidate, "utf8"));
|
|
198
198
|
return { projectDir: current, packageJsonPath: candidate, packageJson: pkg };
|
|
199
199
|
}
|
|
200
200
|
catch {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ClientStatus } from
|
|
2
|
-
import { type AgentsStatus } from
|
|
3
|
-
import { type WorkspaceCacheView } from
|
|
1
|
+
import { type ClientStatus } from "./clients";
|
|
2
|
+
import { type AgentsStatus } from "./agents";
|
|
3
|
+
import { type WorkspaceCacheView } from "./workspaces";
|
|
4
4
|
interface ToolHealth {
|
|
5
5
|
installed: boolean;
|
|
6
6
|
version?: string;
|
|
@@ -19,7 +19,7 @@ interface AccountHealth {
|
|
|
19
19
|
interface CliHealth {
|
|
20
20
|
version: string;
|
|
21
21
|
latestVersion?: string;
|
|
22
|
-
updateStatus:
|
|
22
|
+
updateStatus: "current" | "update-available" | "unknown";
|
|
23
23
|
updateAvailable?: boolean;
|
|
24
24
|
nextAction?: string;
|
|
25
25
|
command?: CliCommandHealth;
|
|
@@ -29,7 +29,7 @@ interface CliCommandHealth {
|
|
|
29
29
|
path?: string;
|
|
30
30
|
npmGlobalBin?: string;
|
|
31
31
|
npmShimPath?: string;
|
|
32
|
-
issue?:
|
|
32
|
+
issue?: "not-on-path" | "shim-missing";
|
|
33
33
|
}
|
|
34
34
|
export interface DoctorReport {
|
|
35
35
|
cli: CliHealth;
|
package/dist/commands/doctor.js
CHANGED
|
@@ -19,16 +19,20 @@ async function showDoctor(options = {}) {
|
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
const providers = options.providers ?? {};
|
|
22
|
-
const includeClients = !section || section ===
|
|
23
|
-
const includeAgents = !section || section ===
|
|
24
|
-
const includeWorkspaces = !section || section ===
|
|
22
|
+
const includeClients = !section || section === "clients";
|
|
23
|
+
const includeAgents = !section || section === "agents";
|
|
24
|
+
const includeWorkspaces = !section || section === "workspaces";
|
|
25
25
|
const [cli, account, tools, clients, agents, workspaces] = await Promise.all([
|
|
26
26
|
providers.cli ? providers.cli() : getCliHealth(),
|
|
27
27
|
providers.account ? providers.account() : getAccountHealth(),
|
|
28
28
|
providers.tools ? providers.tools() : getToolsHealth(),
|
|
29
29
|
includeClients ? (providers.clients ? providers.clients() : (0, clients_1.getClientStatus)()) : Promise.resolve(undefined),
|
|
30
30
|
includeAgents ? (providers.agents ? providers.agents() : (0, agents_1.getAgentsStatus)()) : Promise.resolve(undefined),
|
|
31
|
-
includeWorkspaces
|
|
31
|
+
includeWorkspaces
|
|
32
|
+
? providers.workspaces
|
|
33
|
+
? providers.workspaces()
|
|
34
|
+
: Promise.resolve(buildWorkspaceDoctorStatus(options.cwd))
|
|
35
|
+
: Promise.resolve(undefined),
|
|
32
36
|
]);
|
|
33
37
|
const report = {
|
|
34
38
|
cli,
|
|
@@ -51,7 +55,7 @@ function normalizeSection(value) {
|
|
|
51
55
|
if (!value) {
|
|
52
56
|
return null;
|
|
53
57
|
}
|
|
54
|
-
return value ===
|
|
58
|
+
return value === "clients" || value === "agents" || value === "workspaces" ? value : null;
|
|
55
59
|
}
|
|
56
60
|
async function getAccountHealth() {
|
|
57
61
|
const session = (0, config_1.getCurrentAccountSession)((0, config_1.loadConfig)());
|
|
@@ -63,11 +67,11 @@ async function getAccountHealth() {
|
|
|
63
67
|
async function getCliHealth() {
|
|
64
68
|
const currentVersion = (0, clientInfo_1.getCliVersion)();
|
|
65
69
|
const command = getCliCommandHealth();
|
|
66
|
-
const result = (0, shellProbe_1.runShell)(
|
|
70
|
+
const result = (0, shellProbe_1.runShell)("npm view @playdrop/playdrop-cli version --json");
|
|
67
71
|
if (result.exitCode !== 0 || !result.output.trim()) {
|
|
68
72
|
return {
|
|
69
73
|
version: (0, clientInfo_1.getCliVersionLabel)(),
|
|
70
|
-
updateStatus:
|
|
74
|
+
updateStatus: "unknown",
|
|
71
75
|
command,
|
|
72
76
|
};
|
|
73
77
|
}
|
|
@@ -75,7 +79,7 @@ async function getCliHealth() {
|
|
|
75
79
|
if (!latestVersion) {
|
|
76
80
|
return {
|
|
77
81
|
version: (0, clientInfo_1.getCliVersionLabel)(),
|
|
78
|
-
updateStatus:
|
|
82
|
+
updateStatus: "unknown",
|
|
79
83
|
command,
|
|
80
84
|
};
|
|
81
85
|
}
|
|
@@ -83,51 +87,51 @@ async function getCliHealth() {
|
|
|
83
87
|
return {
|
|
84
88
|
version: (0, clientInfo_1.getCliVersionLabel)(),
|
|
85
89
|
latestVersion,
|
|
86
|
-
updateStatus: updateAvailable ?
|
|
90
|
+
updateStatus: updateAvailable ? "update-available" : "current",
|
|
87
91
|
updateAvailable,
|
|
88
|
-
nextAction: updateAvailable ?
|
|
92
|
+
nextAction: updateAvailable ? "playdrop update" : undefined,
|
|
89
93
|
command,
|
|
90
94
|
};
|
|
91
95
|
}
|
|
92
96
|
function getCliCommandHealth(platform = process.platform) {
|
|
93
|
-
const pathProbe = (0, shellProbe_1.runShell)((0, shellProbe_1.buildCommandPathProbe)(
|
|
97
|
+
const pathProbe = (0, shellProbe_1.runShell)((0, shellProbe_1.buildCommandPathProbe)("playdrop", platform), platform);
|
|
94
98
|
if (pathProbe.exitCode === 0 && pathProbe.output.trim()) {
|
|
95
99
|
return {
|
|
96
100
|
available: true,
|
|
97
|
-
path: pathProbe.output.split(
|
|
101
|
+
path: pathProbe.output.split("\n")[0]?.trim(),
|
|
98
102
|
};
|
|
99
103
|
}
|
|
100
|
-
if (platform !==
|
|
101
|
-
return { available: false, issue:
|
|
104
|
+
if (platform !== "win32") {
|
|
105
|
+
return { available: false, issue: "not-on-path" };
|
|
102
106
|
}
|
|
103
107
|
const npmGlobalBin = resolveNpmGlobalBin(platform);
|
|
104
|
-
const npmShimPath = npmGlobalBin ? (0, node_path_1.join)(npmGlobalBin,
|
|
108
|
+
const npmShimPath = npmGlobalBin ? (0, node_path_1.join)(npmGlobalBin, "playdrop.cmd") : undefined;
|
|
105
109
|
const shimExists = npmShimPath ? (0, node_fs_1.existsSync)(npmShimPath) : false;
|
|
106
110
|
return {
|
|
107
111
|
available: false,
|
|
108
112
|
npmGlobalBin,
|
|
109
113
|
npmShimPath: shimExists ? npmShimPath : undefined,
|
|
110
|
-
issue: shimExists ?
|
|
114
|
+
issue: shimExists ? "not-on-path" : "shim-missing",
|
|
111
115
|
};
|
|
112
116
|
}
|
|
113
117
|
function resolveNpmGlobalBin(platform) {
|
|
114
|
-
const prefix = (0, shellProbe_1.runShell)(
|
|
118
|
+
const prefix = (0, shellProbe_1.runShell)("npm config get prefix", platform).output.split("\n")[0]?.trim();
|
|
115
119
|
return prefix && prefix.length > 0 ? prefix : undefined;
|
|
116
120
|
}
|
|
117
121
|
function parseNpmVersion(output) {
|
|
118
122
|
const trimmed = output.trim();
|
|
119
123
|
try {
|
|
120
124
|
const parsed = JSON.parse(trimmed);
|
|
121
|
-
return typeof parsed ===
|
|
125
|
+
return typeof parsed === "string" && parsed.trim().length > 0 ? parsed.trim() : undefined;
|
|
122
126
|
}
|
|
123
127
|
catch {
|
|
124
|
-
return trimmed.length > 0 ? trimmed.split(
|
|
128
|
+
return trimmed.length > 0 ? trimmed.split("\n")[0]?.trim() : undefined;
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
131
|
async function getToolsHealth() {
|
|
128
132
|
const [node, npm, git] = await Promise.all([
|
|
129
|
-
detectTool(
|
|
130
|
-
detectTool(
|
|
133
|
+
detectTool("node", ["--version"]),
|
|
134
|
+
detectTool("npm", ["--version"]),
|
|
131
135
|
detectGit(),
|
|
132
136
|
]);
|
|
133
137
|
return { node, npm, git };
|
|
@@ -137,20 +141,20 @@ async function detectTool(command, versionArgs) {
|
|
|
137
141
|
if (pathProbe.exitCode !== 0 || !pathProbe.output) {
|
|
138
142
|
return { installed: false };
|
|
139
143
|
}
|
|
140
|
-
const version = (0, shellProbe_1.runShell)([command, ...versionArgs].join(
|
|
144
|
+
const version = (0, shellProbe_1.runShell)([command, ...versionArgs].join(" "));
|
|
141
145
|
return {
|
|
142
146
|
installed: true,
|
|
143
|
-
path: pathProbe.output.split(
|
|
144
|
-
version: version.exitCode === 0 ? version.output.split(
|
|
147
|
+
path: pathProbe.output.split("\n")[0]?.trim(),
|
|
148
|
+
version: version.exitCode === 0 ? version.output.split("\n")[0]?.trim() : undefined,
|
|
145
149
|
};
|
|
146
150
|
}
|
|
147
151
|
async function detectGit() {
|
|
148
|
-
const status = await detectTool(
|
|
152
|
+
const status = await detectTool("git", ["--version"]);
|
|
149
153
|
if (!status.installed) {
|
|
150
154
|
return status;
|
|
151
155
|
}
|
|
152
|
-
const email = (0, shellProbe_1.runShell)(
|
|
153
|
-
const name = (0, shellProbe_1.runShell)(
|
|
156
|
+
const email = (0, shellProbe_1.runShell)("git config --global --get user.email").output.trim();
|
|
157
|
+
const name = (0, shellProbe_1.runShell)("git config --global --get user.name").output.trim();
|
|
154
158
|
const identity = email ? (name ? `${name} <${email}>` : email) : name || undefined;
|
|
155
159
|
return { ...status, identity };
|
|
156
160
|
}
|
|
@@ -180,7 +184,7 @@ function collectNextActions(cli, clients, agents, workspaces) {
|
|
|
180
184
|
}
|
|
181
185
|
if (workspaces && workspaces.workspaces.length === 0) {
|
|
182
186
|
actions.push(recommendedWorkspaceRefreshCommand());
|
|
183
|
-
actions.push(
|
|
187
|
+
actions.push("playdrop workspaces init");
|
|
184
188
|
}
|
|
185
189
|
return [...new Set(actions)];
|
|
186
190
|
}
|
|
@@ -188,17 +192,17 @@ function recommendedWorkspaceRefreshCommand() {
|
|
|
188
192
|
return (0, workspaces_1.getWorkspaceRefreshExample)();
|
|
189
193
|
}
|
|
190
194
|
function printDoctorReport(report) {
|
|
191
|
-
const cliUpdate = report.cli.updateStatus ===
|
|
195
|
+
const cliUpdate = report.cli.updateStatus === "update-available"
|
|
192
196
|
? `, update available: ${report.cli.latestVersion}`
|
|
193
|
-
: report.cli.updateStatus ===
|
|
194
|
-
?
|
|
195
|
-
:
|
|
197
|
+
: report.cli.updateStatus === "current"
|
|
198
|
+
? ", current"
|
|
199
|
+
: ", update status unknown";
|
|
196
200
|
console.log(`PlayDrop CLI: ${report.cli.version}${cliUpdate}`);
|
|
197
201
|
printCliCommandDoctorStatus(report.cli.command);
|
|
198
|
-
console.log(`Account: ${report.account.loggedIn ? report.account.identity ??
|
|
199
|
-
console.log(`Node: ${report.tools.node.installed ? report.tools.node.version ??
|
|
200
|
-
console.log(`npm: ${report.tools.npm.installed ? report.tools.npm.version ??
|
|
201
|
-
console.log(`Git: ${report.tools.git.installed ? report.tools.git.identity ?? report.tools.git.version ??
|
|
202
|
+
console.log(`Account: ${report.account.loggedIn ? (report.account.identity ?? "logged in") : "not logged in"}`);
|
|
203
|
+
console.log(`Node: ${report.tools.node.installed ? (report.tools.node.version ?? "installed") : "missing"}`);
|
|
204
|
+
console.log(`npm: ${report.tools.npm.installed ? (report.tools.npm.version ?? "installed") : "missing"}`);
|
|
205
|
+
console.log(`Git: ${report.tools.git.installed ? (report.tools.git.identity ?? report.tools.git.version ?? "installed") : "missing"}`);
|
|
202
206
|
if (report.clients) {
|
|
203
207
|
printNativeClientDoctorStatus(report.clients);
|
|
204
208
|
}
|
|
@@ -217,7 +221,7 @@ function printDoctorReport(report) {
|
|
|
217
221
|
}
|
|
218
222
|
}
|
|
219
223
|
if (report.nextActions.length > 0) {
|
|
220
|
-
console.log(
|
|
224
|
+
console.log("Next actions:");
|
|
221
225
|
for (const action of report.nextActions) {
|
|
222
226
|
console.log(` Run: ${action}`);
|
|
223
227
|
}
|
|
@@ -228,10 +232,10 @@ function printCliCommandDoctorStatus(command) {
|
|
|
228
232
|
return;
|
|
229
233
|
}
|
|
230
234
|
if (command.available) {
|
|
231
|
-
console.log(`CLI command: ${command.path ??
|
|
235
|
+
console.log(`CLI command: ${command.path ?? "available"}`);
|
|
232
236
|
return;
|
|
233
237
|
}
|
|
234
|
-
console.log(
|
|
238
|
+
console.log("CLI command: not on PATH");
|
|
235
239
|
if (command.npmShimPath) {
|
|
236
240
|
console.log(` Direct npm shim: ${command.npmShimPath}`);
|
|
237
241
|
}
|
|
@@ -245,13 +249,13 @@ function printNativeClientDoctorStatus(status) {
|
|
|
245
249
|
return;
|
|
246
250
|
}
|
|
247
251
|
if (!status.installed) {
|
|
248
|
-
console.log(
|
|
252
|
+
console.log("Native client: missing");
|
|
249
253
|
if (status.reason) {
|
|
250
254
|
console.log(` ${status.reason}`);
|
|
251
255
|
}
|
|
252
256
|
return;
|
|
253
257
|
}
|
|
254
|
-
const statusLabel = status.updateAvailable ?
|
|
258
|
+
const statusLabel = status.updateAvailable ? "update available" : "up to date";
|
|
255
259
|
console.log(`Native client: ${statusLabel}`);
|
|
256
260
|
console.log(` Installed: ${formatVersionBuild(status.version, status.build)}`);
|
|
257
261
|
if (status.latestVersion || status.latestBuild) {
|
|
@@ -262,14 +266,14 @@ function printNativeClientDoctorStatus(status) {
|
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
268
|
function printAgentsDoctorStatus(status) {
|
|
265
|
-
console.log(
|
|
269
|
+
console.log("Agents:");
|
|
266
270
|
if (status.agents.length === 0) {
|
|
267
|
-
console.log(
|
|
271
|
+
console.log(" none detected");
|
|
268
272
|
return;
|
|
269
273
|
}
|
|
270
274
|
for (const agent of status.agents) {
|
|
271
275
|
console.log(` ${agent.name}`);
|
|
272
|
-
console.log(` App: ${agent.app.installed ? agent.app.path ? `installed at ${agent.app.path}` :
|
|
276
|
+
console.log(` App: ${agent.app.installed ? (agent.app.path ? `installed at ${agent.app.path}` : "installed") : "missing"}`);
|
|
273
277
|
console.log(` CLI: ${formatAgentCli(agent.cli)}`);
|
|
274
278
|
console.log(` Account: ${formatAgentAccount(agent.account)}`);
|
|
275
279
|
console.log(` Plugin: ${formatAgentPlugin(agent.plugin)}`);
|
|
@@ -279,13 +283,13 @@ function formatVersionBuild(version, build) {
|
|
|
279
283
|
if (version && build) {
|
|
280
284
|
return `${version} (build ${build})`;
|
|
281
285
|
}
|
|
282
|
-
return version ?? build ??
|
|
286
|
+
return version ?? build ?? "unknown";
|
|
283
287
|
}
|
|
284
288
|
function formatAgentCli(cli) {
|
|
285
289
|
if (!cli.installed) {
|
|
286
|
-
return
|
|
290
|
+
return "missing";
|
|
287
291
|
}
|
|
288
|
-
const label = cli.version ??
|
|
292
|
+
const label = cli.version ?? "installed";
|
|
289
293
|
return cli.path ? `${label} at ${cli.path}` : label;
|
|
290
294
|
}
|
|
291
295
|
function formatAgentAccount(account) {
|
|
@@ -293,24 +297,26 @@ function formatAgentAccount(account) {
|
|
|
293
297
|
return account.subscription ? `${account.identity} (${account.subscription})` : account.identity;
|
|
294
298
|
}
|
|
295
299
|
if (account?.signedIn === false) {
|
|
296
|
-
return
|
|
300
|
+
return "not signed in";
|
|
297
301
|
}
|
|
298
|
-
return
|
|
302
|
+
return "unknown";
|
|
299
303
|
}
|
|
300
304
|
function formatAgentPlugin(plugin) {
|
|
301
|
-
if (plugin.status ===
|
|
302
|
-
return plugin.latestVersion
|
|
305
|
+
if (plugin.status === "manual-verification-required") {
|
|
306
|
+
return plugin.latestVersion
|
|
307
|
+
? `manual verification required, latest: ${plugin.latestVersion}`
|
|
308
|
+
: "manual verification required";
|
|
303
309
|
}
|
|
304
|
-
if (plugin.status ===
|
|
305
|
-
return plugin.message ? `unknown (${plugin.message})` :
|
|
310
|
+
if (plugin.status === "unknown") {
|
|
311
|
+
return plugin.message ? `unknown (${plugin.message})` : "unknown";
|
|
306
312
|
}
|
|
307
313
|
if (!plugin.installed) {
|
|
308
|
-
return plugin.latestVersion ? `missing, latest: ${plugin.latestVersion}` :
|
|
314
|
+
return plugin.latestVersion ? `missing, latest: ${plugin.latestVersion}` : "missing";
|
|
309
315
|
}
|
|
310
|
-
const installedVersion = plugin.version ??
|
|
311
|
-
const enabled = plugin.status ===
|
|
316
|
+
const installedVersion = plugin.version ?? "installed";
|
|
317
|
+
const enabled = plugin.status === "activation-required" || plugin.enabled === false ? ", activation required" : "";
|
|
312
318
|
if (plugin.updateAvailable) {
|
|
313
|
-
return `${installedVersion}${enabled}, update available: ${plugin.latestVersion ??
|
|
319
|
+
return `${installedVersion}${enabled}, update available: ${plugin.latestVersion ?? "unknown"}`;
|
|
314
320
|
}
|
|
315
321
|
return `${installedVersion}${enabled}, up to date`;
|
|
316
322
|
}
|