@playdrop/playdrop-cli 0.16.2 → 0.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/dev.js
CHANGED
|
@@ -19,120 +19,96 @@ const devServer_1 = require("./devServer");
|
|
|
19
19
|
const tweakStaleness_1 = require("../tweakStaleness");
|
|
20
20
|
const devShared_1 = require("./devShared");
|
|
21
21
|
function formatDevRuntimeAssetManifestFailure(error) {
|
|
22
|
-
const rawMessage = error instanceof Error ? error.message : String(error ??
|
|
23
|
-
if (rawMessage.startsWith(
|
|
24
|
-
const ref = rawMessage.slice(
|
|
22
|
+
const rawMessage = error instanceof Error ? error.message : String(error ?? "unknown_error");
|
|
23
|
+
if (rawMessage.startsWith("dev_runtime_asset_ref_invalid:")) {
|
|
24
|
+
const ref = rawMessage.slice("dev_runtime_asset_ref_invalid:".length);
|
|
25
25
|
return {
|
|
26
26
|
message: `Invalid uses.assets ref "${ref}" in catalogue.json.`,
|
|
27
|
-
suggestions: [
|
|
28
|
-
'Use an exact canonical asset ref like asset:creator/name@r1.',
|
|
29
|
-
],
|
|
27
|
+
suggestions: ["Use an exact canonical asset ref like asset:creator/name@r1."],
|
|
30
28
|
};
|
|
31
29
|
}
|
|
32
|
-
if (rawMessage.startsWith(
|
|
33
|
-
const ref = rawMessage.slice(
|
|
30
|
+
if (rawMessage.startsWith("dev_runtime_asset_version_not_found:")) {
|
|
31
|
+
const ref = rawMessage.slice("dev_runtime_asset_version_not_found:".length);
|
|
34
32
|
return {
|
|
35
33
|
message: `Exact direct asset dependency "${ref}" does not exist on the server.`,
|
|
36
|
-
suggestions: [
|
|
37
|
-
'Publish that exact asset revision first or update uses.assets to a valid exact ref.',
|
|
38
|
-
],
|
|
34
|
+
suggestions: ["Publish that exact asset revision first or update uses.assets to a valid exact ref."],
|
|
39
35
|
};
|
|
40
36
|
}
|
|
41
|
-
if (rawMessage.startsWith(
|
|
42
|
-
const ref = rawMessage.slice(
|
|
37
|
+
if (rawMessage.startsWith("dev_runtime_asset_not_public:")) {
|
|
38
|
+
const ref = rawMessage.slice("dev_runtime_asset_not_public:".length);
|
|
43
39
|
return {
|
|
44
40
|
message: `Direct asset dependency "${ref}" is not publicly readable for project dev.`,
|
|
45
|
-
suggestions: [
|
|
46
|
-
'Make the asset public or remove it from uses.assets for this first-pass dev flow.',
|
|
47
|
-
],
|
|
41
|
+
suggestions: ["Make the asset public or remove it from uses.assets for this first-pass dev flow."],
|
|
48
42
|
};
|
|
49
43
|
}
|
|
50
|
-
if (rawMessage.startsWith(
|
|
51
|
-
const ref = rawMessage.slice(
|
|
44
|
+
if (rawMessage.startsWith("dev_runtime_pack_ref_invalid:")) {
|
|
45
|
+
const ref = rawMessage.slice("dev_runtime_pack_ref_invalid:".length);
|
|
52
46
|
return {
|
|
53
47
|
message: `Invalid uses.packs ref "${ref}" in catalogue.json.`,
|
|
54
|
-
suggestions: [
|
|
55
|
-
'Use an exact canonical pack ref like pack:creator/name@1.2.3.',
|
|
56
|
-
],
|
|
48
|
+
suggestions: ["Use an exact canonical pack ref like pack:creator/name@1.2.3."],
|
|
57
49
|
};
|
|
58
50
|
}
|
|
59
|
-
if (rawMessage.startsWith(
|
|
60
|
-
const ref = rawMessage.slice(
|
|
51
|
+
if (rawMessage.startsWith("dev_runtime_pack_version_not_found:")) {
|
|
52
|
+
const ref = rawMessage.slice("dev_runtime_pack_version_not_found:".length);
|
|
61
53
|
return {
|
|
62
54
|
message: `Exact pack dependency "${ref}" does not exist on the server.`,
|
|
63
|
-
suggestions: [
|
|
64
|
-
'Publish that exact pack version first or update uses.packs to a valid exact ref.',
|
|
65
|
-
],
|
|
55
|
+
suggestions: ["Publish that exact pack version first or update uses.packs to a valid exact ref."],
|
|
66
56
|
};
|
|
67
57
|
}
|
|
68
|
-
if (rawMessage.startsWith(
|
|
69
|
-
const ref = rawMessage.slice(
|
|
58
|
+
if (rawMessage.startsWith("dev_runtime_pack_not_public:")) {
|
|
59
|
+
const ref = rawMessage.slice("dev_runtime_pack_not_public:".length);
|
|
70
60
|
return {
|
|
71
61
|
message: `Pack dependency "${ref}" is not publicly readable for project dev.`,
|
|
72
|
-
suggestions: [
|
|
73
|
-
'Make the pack public or remove it from uses.packs for this first-pass dev flow.',
|
|
74
|
-
],
|
|
62
|
+
suggestions: ["Make the pack public or remove it from uses.packs for this first-pass dev flow."],
|
|
75
63
|
};
|
|
76
64
|
}
|
|
77
|
-
if (rawMessage.startsWith(
|
|
78
|
-
const runtimeKey = rawMessage.split(
|
|
65
|
+
if (rawMessage.startsWith("dev_runtime_key_duplicate:")) {
|
|
66
|
+
const runtimeKey = rawMessage.split(":")[1] ?? "unknown";
|
|
79
67
|
return {
|
|
80
68
|
message: `Duplicate runtimeKey "${runtimeKey}" detected while building dev runtime assets.`,
|
|
81
|
-
suggestions: [
|
|
82
|
-
'Give every owned asset and direct dependency a unique runtimeKey in catalogue.json.',
|
|
83
|
-
],
|
|
69
|
+
suggestions: ["Give every owned asset and direct dependency a unique runtimeKey in catalogue.json."],
|
|
84
70
|
};
|
|
85
71
|
}
|
|
86
|
-
if (rawMessage.startsWith(
|
|
87
|
-
const ownedAssetName = rawMessage.slice(
|
|
72
|
+
if (rawMessage.startsWith("dev_runtime_owned_asset_duplicate:")) {
|
|
73
|
+
const ownedAssetName = rawMessage.slice("dev_runtime_owned_asset_duplicate:".length);
|
|
88
74
|
return {
|
|
89
75
|
message: `Duplicate owned asset name "${ownedAssetName}" detected in catalogue.json.`,
|
|
90
|
-
suggestions: [
|
|
91
|
-
'Owned asset names must be unique inside the app catalogue entry.',
|
|
92
|
-
],
|
|
76
|
+
suggestions: ["Owned asset names must be unique inside the app catalogue entry."],
|
|
93
77
|
};
|
|
94
78
|
}
|
|
95
|
-
if (rawMessage.startsWith(
|
|
96
|
-
const ref = rawMessage.slice(
|
|
79
|
+
if (rawMessage.startsWith("dev_runtime_asset_files_missing:")) {
|
|
80
|
+
const ref = rawMessage.slice("dev_runtime_asset_files_missing:".length);
|
|
97
81
|
return {
|
|
98
82
|
message: `Dependency "${ref}" has no runtime file manifest on the server.`,
|
|
99
|
-
suggestions: [
|
|
100
|
-
'Republish the dependency so it has declared file roles before using it in project dev.',
|
|
101
|
-
],
|
|
83
|
+
suggestions: ["Republish the dependency so it has declared file roles before using it in project dev."],
|
|
102
84
|
};
|
|
103
85
|
}
|
|
104
|
-
if (rawMessage.startsWith(
|
|
105
|
-
const [, ref =
|
|
86
|
+
if (rawMessage.startsWith("dev_runtime_asset_spec_invalid:")) {
|
|
87
|
+
const [, ref = "unknown", assetSpecVersion = "unknown"] = rawMessage.split(":");
|
|
106
88
|
return {
|
|
107
89
|
message: `Dependency "${ref}" returned an invalid asset spec version ref "${assetSpecVersion}".`,
|
|
108
|
-
suggestions: [
|
|
109
|
-
'Republish the dependency with a valid assetSpecVersionRef or remove it from uses.assets.',
|
|
110
|
-
],
|
|
90
|
+
suggestions: ["Republish the dependency with a valid assetSpecVersionRef or remove it from uses.assets."],
|
|
111
91
|
};
|
|
112
92
|
}
|
|
113
|
-
if (rawMessage.startsWith(
|
|
114
|
-
const [, ref =
|
|
93
|
+
if (rawMessage.startsWith("dev_runtime_asset_spec_unsupported:")) {
|
|
94
|
+
const [, ref = "unknown", assetSpecVersion = "unknown"] = rawMessage.split(":");
|
|
115
95
|
return {
|
|
116
96
|
message: `Dependency "${ref}" uses unsupported custom asset version "${assetSpecVersion}" for this app.`,
|
|
117
97
|
suggestions: [
|
|
118
|
-
|
|
98
|
+
"Update assetSpecSupport in catalogue.json or pin uses.assets to a supported custom asset revision.",
|
|
119
99
|
],
|
|
120
100
|
};
|
|
121
101
|
}
|
|
122
|
-
if (rawMessage.startsWith(
|
|
123
|
-
const appName = rawMessage.slice(
|
|
102
|
+
if (rawMessage.startsWith("dev_runtime_app_type_missing:")) {
|
|
103
|
+
const appName = rawMessage.slice("dev_runtime_app_type_missing:".length);
|
|
124
104
|
return {
|
|
125
105
|
message: `App "${appName}" is missing a valid type in catalogue.json.`,
|
|
126
|
-
suggestions: [
|
|
127
|
-
'Set "type" in the app catalogue entry before running "playdrop project dev".',
|
|
128
|
-
],
|
|
106
|
+
suggestions: ['Set "type" in the app catalogue entry before running "playdrop project dev".'],
|
|
129
107
|
};
|
|
130
108
|
}
|
|
131
109
|
return {
|
|
132
|
-
message:
|
|
133
|
-
suggestions: [
|
|
134
|
-
rawMessage,
|
|
135
|
-
],
|
|
110
|
+
message: "Failed to build the local runtime asset manifest for project dev.",
|
|
111
|
+
suggestions: [rawMessage],
|
|
136
112
|
};
|
|
137
113
|
}
|
|
138
114
|
async function dev(targetArg, appOption, devOptions = {}) {
|
|
@@ -143,45 +119,47 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
143
119
|
}
|
|
144
120
|
catch (error) {
|
|
145
121
|
const code = error?.code;
|
|
146
|
-
const message = error?.message ||
|
|
122
|
+
const message = error?.message || "Unable to resolve dev target.";
|
|
147
123
|
let suggestions = [];
|
|
148
124
|
switch (code) {
|
|
149
|
-
case
|
|
125
|
+
case "app_required":
|
|
150
126
|
suggestions = ['Use "--app <name>" to select which app to run.'];
|
|
151
127
|
break;
|
|
152
|
-
case
|
|
153
|
-
suggestions = [
|
|
128
|
+
case "app_not_found":
|
|
129
|
+
suggestions = [
|
|
130
|
+
'Check the app name in catalogue.json or run "playdrop project create app" to register a new app.',
|
|
131
|
+
];
|
|
154
132
|
break;
|
|
155
|
-
case
|
|
156
|
-
suggestions = [
|
|
133
|
+
case "catalogue_missing":
|
|
134
|
+
suggestions = [
|
|
135
|
+
'Run "playdrop project dev" from a workspace with catalogue.json or provide the path to an HTML file.',
|
|
136
|
+
];
|
|
157
137
|
break;
|
|
158
|
-
case
|
|
159
|
-
suggestions = [
|
|
138
|
+
case "invalid_target":
|
|
139
|
+
suggestions = ["Provide a path to an HTML file or directory containing a catalogue.json."];
|
|
160
140
|
break;
|
|
161
|
-
case
|
|
141
|
+
case "empty_catalogue":
|
|
162
142
|
suggestions = ['Add apps to catalogue.json before running "playdrop project dev".'];
|
|
163
143
|
break;
|
|
164
|
-
case
|
|
144
|
+
case "invalid_catalogue":
|
|
165
145
|
suggestions = ['Fix the catalogue.json file and rerun "playdrop project dev".'];
|
|
166
146
|
break;
|
|
167
147
|
default:
|
|
168
|
-
suggestions = [
|
|
148
|
+
suggestions = ["Provide an app name, HTML file path, or run inside a Playdrop workspace."];
|
|
169
149
|
break;
|
|
170
150
|
}
|
|
171
|
-
(0, messages_1.printErrorWithHelp)(message, suggestions, { command:
|
|
151
|
+
(0, messages_1.printErrorWithHelp)(message, suggestions, { command: "project dev" });
|
|
172
152
|
process.exitCode = 1;
|
|
173
153
|
return;
|
|
174
154
|
}
|
|
175
155
|
let appName = resolvedTarget.appName;
|
|
176
156
|
const filePath = resolvedTarget.htmlPath;
|
|
177
157
|
if (!(0, node_fs_1.existsSync)(filePath) || !(0, node_fs_1.statSync)(filePath).isFile()) {
|
|
178
|
-
(0, messages_1.printErrorWithHelp)(`App HTML was not found at ${filePath}.`, [
|
|
179
|
-
'Ensure the catalogue entry points to a compiled HTML file or provide the correct file path.'
|
|
180
|
-
], { command: 'project dev' });
|
|
158
|
+
(0, messages_1.printErrorWithHelp)(`App HTML was not found at ${filePath}.`, ["Ensure the catalogue entry points to a compiled HTML file or provide the correct file path."], { command: "project dev" });
|
|
181
159
|
process.exitCode = 1;
|
|
182
160
|
return;
|
|
183
161
|
}
|
|
184
|
-
let appTypeSlug =
|
|
162
|
+
let appTypeSlug = "game";
|
|
185
163
|
try {
|
|
186
164
|
const match = (0, catalogue_utils_1.findAppDefinition)(filePath);
|
|
187
165
|
appName = match.name;
|
|
@@ -189,10 +167,10 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
189
167
|
}
|
|
190
168
|
catch (error) {
|
|
191
169
|
if (resolvedTarget.cataloguePath) {
|
|
192
|
-
(0, messages_1.printErrorWithHelp)(error?.message ||
|
|
193
|
-
|
|
170
|
+
(0, messages_1.printErrorWithHelp)(error?.message || "Catalogue lookup failed.", [
|
|
171
|
+
"Ensure the HTML file is listed exactly once in catalogue.json with a valid type.",
|
|
194
172
|
'Run "playdrop project create app <name>" to scaffold a new entry if needed.',
|
|
195
|
-
], { command:
|
|
173
|
+
], { command: "project dev" });
|
|
196
174
|
process.exitCode = 1;
|
|
197
175
|
return;
|
|
198
176
|
}
|
|
@@ -202,24 +180,26 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
202
180
|
devAuthSelection = (0, devAuth_1.parseHostedDevAuthSelection)({
|
|
203
181
|
devAuth: devOptions.devAuth,
|
|
204
182
|
player: devOptions.player,
|
|
205
|
-
defaultMode:
|
|
183
|
+
defaultMode: "prompt",
|
|
206
184
|
allowPrompt: true,
|
|
207
185
|
});
|
|
208
186
|
}
|
|
209
187
|
catch (error) {
|
|
210
|
-
const message = error instanceof Error ? error.message :
|
|
211
|
-
if (message ===
|
|
212
|
-
(0, messages_1.printErrorWithHelp)(
|
|
188
|
+
const message = error instanceof Error ? error.message : "dev_auth_invalid";
|
|
189
|
+
if (message === "dev_auth_player_slot_required") {
|
|
190
|
+
(0, messages_1.printErrorWithHelp)("Use --player 1, 2, 3, or 4 when --dev-auth player is selected.", [], {
|
|
191
|
+
command: "project dev",
|
|
192
|
+
});
|
|
213
193
|
}
|
|
214
194
|
else {
|
|
215
|
-
(0, messages_1.printErrorWithHelp)(
|
|
195
|
+
(0, messages_1.printErrorWithHelp)("Use --dev-auth prompt, anonymous, viewer, or player.", ["If you choose --dev-auth player, also pass --player 1, 2, 3, or 4."], { command: "project dev" });
|
|
216
196
|
}
|
|
217
197
|
process.exitCode = 1;
|
|
218
198
|
return;
|
|
219
199
|
}
|
|
220
200
|
const workspacePath = resolvedTarget.cataloguePath ?? (0, node_path_1.dirname)(filePath);
|
|
221
|
-
await (0, commandContext_1.withEnvironment)(
|
|
222
|
-
let currentUsername = account?.username?.trim() ??
|
|
201
|
+
await (0, commandContext_1.withEnvironment)("project dev", "Starting the dev server", async ({ client, env, envConfig, account }) => {
|
|
202
|
+
let currentUsername = account?.username?.trim() ?? "";
|
|
223
203
|
if (!currentUsername) {
|
|
224
204
|
try {
|
|
225
205
|
currentUsername = await (0, devShared_1.fetchDevUsername)(client);
|
|
@@ -229,7 +209,7 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
229
209
|
return;
|
|
230
210
|
}
|
|
231
211
|
if (error instanceof types_1.UnsupportedClientError) {
|
|
232
|
-
(0, http_1.handleUnsupportedError)(error,
|
|
212
|
+
(0, http_1.handleUnsupportedError)(error, "Authentication");
|
|
233
213
|
process.exitCode = 1;
|
|
234
214
|
return;
|
|
235
215
|
}
|
|
@@ -237,12 +217,12 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
237
217
|
(0, messages_1.printErrorWithHelp)(`Could not fetch your account (status ${error.status}).`, [
|
|
238
218
|
'Run "playdrop auth login" to refresh your session and ensure the API is reachable.',
|
|
239
219
|
'Use "playdrop auth whoami" afterwards to confirm your status.',
|
|
240
|
-
], { command:
|
|
220
|
+
], { command: "project dev" });
|
|
241
221
|
process.exitCode = 1;
|
|
242
222
|
return;
|
|
243
223
|
}
|
|
244
224
|
if ((0, devShared_1.isNetworkError)(error)) {
|
|
245
|
-
(0, messages_1.printNetworkIssue)(
|
|
225
|
+
(0, messages_1.printNetworkIssue)("Could not reach the Playdrop API to resolve your account.", "project dev");
|
|
246
226
|
process.exitCode = 1;
|
|
247
227
|
return;
|
|
248
228
|
}
|
|
@@ -258,7 +238,7 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
258
238
|
return;
|
|
259
239
|
}
|
|
260
240
|
if (error instanceof types_1.UnsupportedClientError) {
|
|
261
|
-
(0, http_1.handleUnsupportedError)(error,
|
|
241
|
+
(0, http_1.handleUnsupportedError)(error, "Dev");
|
|
262
242
|
process.exitCode = 1;
|
|
263
243
|
return;
|
|
264
244
|
}
|
|
@@ -266,20 +246,17 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
266
246
|
if (error.status === 404) {
|
|
267
247
|
(0, messages_1.printErrorWithHelp)(`App ${currentUsername}/${appName} is not registered on ${env}.`, [
|
|
268
248
|
`Run "playdrop project create app ${appName}" to register the app before starting the dev server.`,
|
|
269
|
-
|
|
270
|
-
], { command:
|
|
249
|
+
"If you expected it to exist, ensure you are logged into the correct environment.",
|
|
250
|
+
], { command: "project dev" });
|
|
271
251
|
}
|
|
272
252
|
else {
|
|
273
|
-
(0, messages_1.printErrorWithHelp)(`Failed to verify app registration (status ${error.status}).`, [
|
|
274
|
-
'Retry in a moment.',
|
|
275
|
-
'If the issue persists, contact the Playdrop team.'
|
|
276
|
-
], { command: 'project dev' });
|
|
253
|
+
(0, messages_1.printErrorWithHelp)(`Failed to verify app registration (status ${error.status}).`, ["Retry in a moment.", "If the issue persists, contact the Playdrop team."], { command: "project dev" });
|
|
277
254
|
}
|
|
278
255
|
process.exitCode = 1;
|
|
279
256
|
return;
|
|
280
257
|
}
|
|
281
258
|
if ((0, devShared_1.isNetworkError)(error)) {
|
|
282
|
-
(0, messages_1.printNetworkIssue)(
|
|
259
|
+
(0, messages_1.printNetworkIssue)("Could not reach the Playdrop API to verify the app registration.", "project dev");
|
|
283
260
|
process.exitCode = 1;
|
|
284
261
|
return;
|
|
285
262
|
}
|
|
@@ -287,10 +264,10 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
287
264
|
}
|
|
288
265
|
}
|
|
289
266
|
const projectInfo = (0, devShared_1.findProjectInfo)(filePath);
|
|
290
|
-
const devScriptAvailable = Boolean(projectInfo.projectDir && projectInfo.packageJson && typeof projectInfo.packageJson.scripts?.dev ===
|
|
267
|
+
const devScriptAvailable = Boolean(projectInfo.projectDir && projectInfo.packageJson && typeof projectInfo.packageJson.scripts?.dev === "string");
|
|
291
268
|
const taskLookup = (0, catalogue_1.findAppTaskByFile)(filePath);
|
|
292
269
|
if (taskLookup.errors.length > 0) {
|
|
293
|
-
(0, messages_1.printErrorWithHelp)(taskLookup.errors[0] ||
|
|
270
|
+
(0, messages_1.printErrorWithHelp)(taskLookup.errors[0] || "Failed to resolve the app task from catalogue.json.", taskLookup.errors.slice(1), { command: "project dev" });
|
|
294
271
|
process.exitCode = 1;
|
|
295
272
|
return;
|
|
296
273
|
}
|
|
@@ -306,7 +283,9 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
306
283
|
await (0, tweakStaleness_1.fetchAndAssertTweakState)(client, currentUsername, taskLookup.task);
|
|
307
284
|
}
|
|
308
285
|
catch (error) {
|
|
309
|
-
(0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message :
|
|
286
|
+
(0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Could not verify the current tweak state.", [], {
|
|
287
|
+
command: "project dev",
|
|
288
|
+
});
|
|
310
289
|
process.exitCode = 1;
|
|
311
290
|
return;
|
|
312
291
|
}
|
|
@@ -316,12 +295,12 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
316
295
|
apiBase: envConfig.apiBase,
|
|
317
296
|
task: taskLookup.task,
|
|
318
297
|
creatorUsername: currentUsername,
|
|
319
|
-
appBaseUrl: new URL(
|
|
298
|
+
appBaseUrl: new URL(".", localDevAppUrl).toString(),
|
|
320
299
|
});
|
|
321
300
|
}
|
|
322
301
|
catch (error) {
|
|
323
302
|
const formatted = formatDevRuntimeAssetManifestFailure(error);
|
|
324
|
-
(0, messages_1.printErrorWithHelp)(formatted.message, formatted.suggestions, { command:
|
|
303
|
+
(0, messages_1.printErrorWithHelp)(formatted.message, formatted.suggestions, { command: "project dev" });
|
|
325
304
|
process.exitCode = 1;
|
|
326
305
|
return;
|
|
327
306
|
}
|
|
@@ -339,26 +318,26 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
339
318
|
});
|
|
340
319
|
}
|
|
341
320
|
catch (error) {
|
|
342
|
-
const message = typeof error?.message ===
|
|
321
|
+
const message = typeof error?.message === "string" ? error.message : "";
|
|
343
322
|
const mountConflict = (0, devServer_1.parseMountConflictError)(message);
|
|
344
323
|
if (mountConflict) {
|
|
345
324
|
(0, messages_1.printErrorWithHelp)(`A different dev session already owns ${mountConflict.ref}.`, [
|
|
346
325
|
`Active owner pid: ${mountConflict.ownerPid}.`,
|
|
347
326
|
`Mounted repo root: ${mountConflict.repoRoot}.`,
|
|
348
327
|
`Mounted HTML path: ${mountConflict.htmlPath}.`,
|
|
349
|
-
], { command:
|
|
328
|
+
], { command: "project dev" });
|
|
350
329
|
}
|
|
351
|
-
else if (message.startsWith(
|
|
330
|
+
else if (message.startsWith("dev_router_incompatible:")) {
|
|
352
331
|
(0, messages_1.printErrorWithHelp)(`An incompatible shared dev router is already running on port ${devRouterPort}.`, [
|
|
353
332
|
'Stop the existing dev router process, then retry "playdrop project dev".',
|
|
354
333
|
`If needed, rebuild the local CLI first with "npm run build --workspace @playdrop/playdrop-cli" from /Users/oliviermichon/Documents/playdrop.`,
|
|
355
|
-
], { command:
|
|
334
|
+
], { command: "project dev" });
|
|
356
335
|
}
|
|
357
336
|
else {
|
|
358
337
|
(0, messages_1.printErrorWithHelp)(error?.message || `Failed to start the shared dev router on port ${devRouterPort}.`, [
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
], { command:
|
|
338
|
+
"Close the conflicting process or wait for the stale mount to exit.",
|
|
339
|
+
"Ensure the app HTML file exists and is readable.",
|
|
340
|
+
], { command: "project dev" });
|
|
362
341
|
}
|
|
363
342
|
process.exitCode = 1;
|
|
364
343
|
return;
|
|
@@ -368,16 +347,14 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
368
347
|
if (shuttingDown)
|
|
369
348
|
return;
|
|
370
349
|
shuttingDown = true;
|
|
371
|
-
process.off(
|
|
372
|
-
process.off(
|
|
373
|
-
handle
|
|
374
|
-
.close()
|
|
375
|
-
.catch(closeError => {
|
|
350
|
+
process.off("SIGINT", handleShutdown);
|
|
351
|
+
process.off("SIGTERM", handleShutdown);
|
|
352
|
+
handle.close().catch((closeError) => {
|
|
376
353
|
console.error(closeError instanceof Error ? closeError.message : closeError);
|
|
377
354
|
});
|
|
378
355
|
};
|
|
379
|
-
process.on(
|
|
380
|
-
process.on(
|
|
356
|
+
process.on("SIGINT", handleShutdown);
|
|
357
|
+
process.on("SIGTERM", handleShutdown);
|
|
381
358
|
const webUrl = envConfig.webBase;
|
|
382
359
|
const entryLabel = (0, node_path_1.relative)(process.cwd(), filePath) || filePath;
|
|
383
360
|
const runtimeRootLabel = (0, node_path_1.relative)(process.cwd(), (0, node_path_1.dirname)(filePath)) || (0, node_path_1.dirname)(filePath);
|
|
@@ -397,9 +374,9 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
397
374
|
appName,
|
|
398
375
|
localDevPort: devRouterPort === devServer_1.DEV_ROUTER_PORT ? null : devRouterPort,
|
|
399
376
|
}), devAuthSelection);
|
|
400
|
-
console.log(
|
|
377
|
+
console.log("\nTest your app at:");
|
|
401
378
|
console.log(` ${iframeUrl}`);
|
|
402
|
-
console.log(
|
|
379
|
+
console.log("\nMake something fun then share it with");
|
|
403
380
|
console.log(`playdrop project publish ${appName}`);
|
|
404
381
|
}
|
|
405
382
|
else {
|
|
@@ -408,19 +385,19 @@ async function dev(targetArg, appOption, devOptions = {}) {
|
|
|
408
385
|
}, { workspacePath });
|
|
409
386
|
}
|
|
410
387
|
function resolveDevRouterPort(value) {
|
|
411
|
-
if (value === null || value === undefined || String(value).trim() ===
|
|
388
|
+
if (value === null || value === undefined || String(value).trim() === "") {
|
|
412
389
|
return devServer_1.DEV_ROUTER_PORT;
|
|
413
390
|
}
|
|
414
|
-
const parsed = typeof value ===
|
|
391
|
+
const parsed = typeof value === "number" ? value : Number.parseInt(String(value), 10);
|
|
415
392
|
if (!Number.isInteger(parsed) || parsed <= 0 || parsed > 65535) {
|
|
416
|
-
throw new Error(
|
|
393
|
+
throw new Error("invalid_dev_router_port");
|
|
417
394
|
}
|
|
418
395
|
return parsed;
|
|
419
396
|
}
|
|
420
397
|
function resolveRequiredWorkerDevRouterPort(env) {
|
|
421
398
|
const raw = env.PLAYDROP_WORKER_TASK_DEV_PORT;
|
|
422
399
|
if (!raw?.trim()) {
|
|
423
|
-
throw new Error(
|
|
400
|
+
throw new Error("worker_task_dev_port_missing");
|
|
424
401
|
}
|
|
425
402
|
try {
|
|
426
403
|
return resolveDevRouterPort(raw);
|
|
@@ -430,7 +407,7 @@ function resolveRequiredWorkerDevRouterPort(env) {
|
|
|
430
407
|
}
|
|
431
408
|
}
|
|
432
409
|
function resolveCliDevRouterPort(env = process.env) {
|
|
433
|
-
if (env.PLAYDROP_WORKER_CONTEXT !==
|
|
410
|
+
if (env.PLAYDROP_WORKER_CONTEXT !== "1") {
|
|
434
411
|
return devServer_1.DEV_ROUTER_PORT;
|
|
435
412
|
}
|
|
436
413
|
const workerPort = resolveRequiredWorkerDevRouterPort(env);
|