@playdrop/playdrop-cli 0.16.5 → 0.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
package/dist/recorderRelease.js
CHANGED
|
@@ -14,21 +14,21 @@ const node_os_1 = __importDefault(require("node:os"));
|
|
|
14
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
15
|
exports.MAC_WORKER_RECORDER_RELEASE = {
|
|
16
16
|
version: 1,
|
|
17
|
-
architecture:
|
|
18
|
-
url:
|
|
19
|
-
sha256:
|
|
17
|
+
architecture: "arm64",
|
|
18
|
+
url: "https://assets.playdrop.ai/cli/recorder/1/darwin-arm64/playdrop-listing-recorder",
|
|
19
|
+
sha256: "0a19f0613b8b69945b532d9bc75a52803cd84c5977c78da76a446ecd2d29f715",
|
|
20
20
|
};
|
|
21
21
|
const MAX_RECORDER_DOWNLOAD_BYTES = 10 * 1024 * 1024;
|
|
22
22
|
const RECORDER_DOWNLOAD_TIMEOUT_MS = 30000;
|
|
23
23
|
function resolveWorkerHomeDirectory() {
|
|
24
24
|
const configured = process.env.PLAYDROP_WORKER_HOME?.trim();
|
|
25
|
-
return configured ? node_path_1.default.resolve(configured) : node_path_1.default.join(node_os_1.default.homedir(),
|
|
25
|
+
return configured ? node_path_1.default.resolve(configured) : node_path_1.default.join(node_os_1.default.homedir(), "PlayDropWorker");
|
|
26
26
|
}
|
|
27
27
|
function resolveMacWorkerRecorderPath(workerHome = resolveWorkerHomeDirectory()) {
|
|
28
|
-
return node_path_1.default.join(node_path_1.default.resolve(workerHome),
|
|
28
|
+
return node_path_1.default.join(node_path_1.default.resolve(workerHome), "tools", "playdrop-listing-recorder");
|
|
29
29
|
}
|
|
30
30
|
function recorderSha256(bytes) {
|
|
31
|
-
return (0, node_crypto_1.createHash)(
|
|
31
|
+
return (0, node_crypto_1.createHash)("sha256").update(bytes).digest("hex");
|
|
32
32
|
}
|
|
33
33
|
async function downloadRecorder(url) {
|
|
34
34
|
const controller = new AbortController();
|
|
@@ -51,7 +51,7 @@ async function downloadRecorder(url) {
|
|
|
51
51
|
async function ensureMacWorkerRecorderInstalled(input = {}) {
|
|
52
52
|
const platform = input.platform ?? process.platform;
|
|
53
53
|
const architecture = input.architecture ?? process.arch;
|
|
54
|
-
if (platform !==
|
|
54
|
+
if (platform !== "darwin") {
|
|
55
55
|
throw new Error(`worker_recorder_platform_unsupported:${platform}`);
|
|
56
56
|
}
|
|
57
57
|
if (architecture !== exports.MAC_WORKER_RECORDER_RELEASE.architecture) {
|
|
@@ -63,7 +63,7 @@ async function ensureMacWorkerRecorderInstalled(input = {}) {
|
|
|
63
63
|
installedBytes = await (0, promises_1.readFile)(recorderPath);
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
66
|
-
if (error.code !==
|
|
66
|
+
if (error.code !== "ENOENT") {
|
|
67
67
|
throw error;
|
|
68
68
|
}
|
|
69
69
|
}
|
package/dist/refs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiClient } from
|
|
2
|
-
import type { SavedItemKind } from
|
|
3
|
-
export type ContentKind =
|
|
1
|
+
import type { ApiClient } from "@playdrop/api-client";
|
|
2
|
+
import type { SavedItemKind } from "@playdrop/types";
|
|
3
|
+
export type ContentKind = "app" | "asset" | "asset-pack" | "asset-spec";
|
|
4
4
|
export type ContentRef = {
|
|
5
5
|
creator: string;
|
|
6
6
|
kind: ContentKind;
|
|
@@ -9,10 +9,10 @@ export type ContentRef = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function parseContentRef(raw: string): ContentRef;
|
|
11
11
|
export declare function parseScopedName(raw: string, label: string): string;
|
|
12
|
-
export declare function parseCreatorOption(raw: string | undefined): string |
|
|
12
|
+
export declare function parseCreatorOption(raw: string | undefined): string | "me";
|
|
13
13
|
export declare function resolveCreatorOption(client: ApiClient, raw: string | undefined): Promise<string>;
|
|
14
14
|
export declare function buildScopedRef(creator: string, kind: ContentKind, name: string): ContentRef;
|
|
15
15
|
export declare function contentKindToSavedItemKind(kind: ContentKind): SavedItemKind;
|
|
16
|
-
export declare function contentKindToSearchKind(kind: ContentKind |
|
|
16
|
+
export declare function contentKindToSearchKind(kind: ContentKind | "all"): "all" | "app" | "asset" | "asset-spec" | "pack";
|
|
17
17
|
export declare function contentKindLabel(kind: ContentKind): string;
|
|
18
18
|
export declare function contentKindPluralLabel(kind: ContentKind): string;
|
package/dist/refs.js
CHANGED
|
@@ -14,7 +14,7 @@ function sanitizeSegment(value, label) {
|
|
|
14
14
|
if (!normalized) {
|
|
15
15
|
throw new Error(`missing_${label}`);
|
|
16
16
|
}
|
|
17
|
-
if (normalized.includes(
|
|
17
|
+
if (normalized.includes("/") || normalized.includes("\\") || normalized.includes("..")) {
|
|
18
18
|
throw new Error(`invalid_${label}`);
|
|
19
19
|
}
|
|
20
20
|
return normalized;
|
|
@@ -22,17 +22,20 @@ function sanitizeSegment(value, label) {
|
|
|
22
22
|
function parseContentRef(raw) {
|
|
23
23
|
const normalized = raw.trim();
|
|
24
24
|
if (!normalized) {
|
|
25
|
-
throw new Error(
|
|
25
|
+
throw new Error("missing_ref");
|
|
26
26
|
}
|
|
27
|
-
const segments = normalized
|
|
27
|
+
const segments = normalized
|
|
28
|
+
.split("/")
|
|
29
|
+
.map((segment) => segment.trim())
|
|
30
|
+
.filter(Boolean);
|
|
28
31
|
if (segments.length !== 3) {
|
|
29
|
-
throw new Error(
|
|
32
|
+
throw new Error("invalid_ref");
|
|
30
33
|
}
|
|
31
|
-
const creator = sanitizeSegment(segments[0],
|
|
32
|
-
const kind = sanitizeSegment(segments[1],
|
|
33
|
-
const name = sanitizeSegment(segments[2],
|
|
34
|
-
if (kind !==
|
|
35
|
-
throw new Error(
|
|
34
|
+
const creator = sanitizeSegment(segments[0], "creator");
|
|
35
|
+
const kind = sanitizeSegment(segments[1], "kind");
|
|
36
|
+
const name = sanitizeSegment(segments[2], "name");
|
|
37
|
+
if (kind !== "app" && kind !== "asset" && kind !== "asset-pack" && kind !== "asset-spec") {
|
|
38
|
+
throw new Error("invalid_kind");
|
|
36
39
|
}
|
|
37
40
|
return {
|
|
38
41
|
creator,
|
|
@@ -45,30 +48,30 @@ function parseScopedName(raw, label) {
|
|
|
45
48
|
return sanitizeSegment(raw, label);
|
|
46
49
|
}
|
|
47
50
|
function parseCreatorOption(raw) {
|
|
48
|
-
if (typeof raw !==
|
|
49
|
-
return
|
|
51
|
+
if (typeof raw !== "string" || raw.trim().length === 0) {
|
|
52
|
+
return "me";
|
|
50
53
|
}
|
|
51
54
|
const normalized = raw.trim();
|
|
52
|
-
if (normalized.toLowerCase() ===
|
|
53
|
-
return
|
|
55
|
+
if (normalized.toLowerCase() === "me") {
|
|
56
|
+
return "me";
|
|
54
57
|
}
|
|
55
|
-
return sanitizeSegment(normalized,
|
|
58
|
+
return sanitizeSegment(normalized, "creator");
|
|
56
59
|
}
|
|
57
60
|
async function resolveCreatorOption(client, raw) {
|
|
58
61
|
const parsed = parseCreatorOption(raw);
|
|
59
|
-
if (parsed !==
|
|
62
|
+
if (parsed !== "me") {
|
|
60
63
|
return parsed;
|
|
61
64
|
}
|
|
62
65
|
const response = await client.me();
|
|
63
66
|
const username = response.user?.username?.trim();
|
|
64
67
|
if (!username) {
|
|
65
|
-
throw new Error(
|
|
68
|
+
throw new Error("missing_current_user");
|
|
66
69
|
}
|
|
67
70
|
return username;
|
|
68
71
|
}
|
|
69
72
|
function buildScopedRef(creator, kind, name) {
|
|
70
|
-
const normalizedCreator = sanitizeSegment(creator,
|
|
71
|
-
const normalizedName = sanitizeSegment(name,
|
|
73
|
+
const normalizedCreator = sanitizeSegment(creator, "creator");
|
|
74
|
+
const normalizedName = sanitizeSegment(name, "name");
|
|
72
75
|
return {
|
|
73
76
|
creator: normalizedCreator,
|
|
74
77
|
kind,
|
|
@@ -77,41 +80,41 @@ function buildScopedRef(creator, kind, name) {
|
|
|
77
80
|
};
|
|
78
81
|
}
|
|
79
82
|
function contentKindToSavedItemKind(kind) {
|
|
80
|
-
if (kind ===
|
|
81
|
-
return
|
|
83
|
+
if (kind === "app") {
|
|
84
|
+
return "APP";
|
|
82
85
|
}
|
|
83
|
-
if (kind ===
|
|
84
|
-
return
|
|
86
|
+
if (kind === "asset") {
|
|
87
|
+
return "ASSET";
|
|
85
88
|
}
|
|
86
|
-
if (kind ===
|
|
87
|
-
throw new Error(
|
|
89
|
+
if (kind === "asset-spec") {
|
|
90
|
+
throw new Error("asset_specs_not_saveable");
|
|
88
91
|
}
|
|
89
|
-
return
|
|
92
|
+
return "PACK";
|
|
90
93
|
}
|
|
91
94
|
function contentKindToSearchKind(kind) {
|
|
92
|
-
if (kind ===
|
|
93
|
-
return
|
|
95
|
+
if (kind === "asset-spec") {
|
|
96
|
+
return "asset-spec";
|
|
94
97
|
}
|
|
95
|
-
if (kind ===
|
|
96
|
-
return
|
|
98
|
+
if (kind === "asset-pack") {
|
|
99
|
+
return "pack";
|
|
97
100
|
}
|
|
98
101
|
return kind;
|
|
99
102
|
}
|
|
100
103
|
function contentKindLabel(kind) {
|
|
101
|
-
if (kind ===
|
|
102
|
-
return
|
|
104
|
+
if (kind === "asset-pack") {
|
|
105
|
+
return "asset pack";
|
|
103
106
|
}
|
|
104
|
-
if (kind ===
|
|
105
|
-
return
|
|
107
|
+
if (kind === "asset-spec") {
|
|
108
|
+
return "asset spec";
|
|
106
109
|
}
|
|
107
110
|
return kind;
|
|
108
111
|
}
|
|
109
112
|
function contentKindPluralLabel(kind) {
|
|
110
|
-
if (kind ===
|
|
111
|
-
return
|
|
113
|
+
if (kind === "asset-pack") {
|
|
114
|
+
return "asset packs";
|
|
112
115
|
}
|
|
113
|
-
if (kind ===
|
|
114
|
-
return
|
|
116
|
+
if (kind === "asset-spec") {
|
|
117
|
+
return "asset specs";
|
|
115
118
|
}
|
|
116
119
|
return `${kind}s`;
|
|
117
120
|
}
|
package/dist/sessionCookie.js
CHANGED
|
@@ -4,13 +4,13 @@ exports.resolveCaptureSessionCookieDomain = resolveCaptureSessionCookieDomain;
|
|
|
4
4
|
exports.shouldUseSecureCaptureSessionCookie = shouldUseSecureCaptureSessionCookie;
|
|
5
5
|
exports.buildCaptureAccessTokenCookies = buildCaptureAccessTokenCookies;
|
|
6
6
|
const node_net_1 = require("node:net");
|
|
7
|
-
const ACCESS_TOKEN_COOKIE_NAME =
|
|
8
|
-
const DOMAIN_PREFIXES = [
|
|
7
|
+
const ACCESS_TOKEN_COOKIE_NAME = "playdrop_access_token";
|
|
8
|
+
const DOMAIN_PREFIXES = ["api.", "www.", "admin.", "ai.", "play.", "assets."];
|
|
9
9
|
function normalizeHostname(hostname) {
|
|
10
10
|
return hostname.trim().toLowerCase();
|
|
11
11
|
}
|
|
12
12
|
function isLocalSessionHostname(hostname) {
|
|
13
|
-
return hostname ===
|
|
13
|
+
return hostname === "localhost" || hostname.endsWith(".localhost") || hostname.endsWith(".local");
|
|
14
14
|
}
|
|
15
15
|
function stripKnownPrefix(hostname) {
|
|
16
16
|
for (const prefix of DOMAIN_PREFIXES) {
|
|
@@ -24,7 +24,7 @@ function shouldUseSharedCookieDomain(hostname) {
|
|
|
24
24
|
return hostname.length > 0 && !isLocalSessionHostname(hostname) && (0, node_net_1.isIP)(hostname) === 0;
|
|
25
25
|
}
|
|
26
26
|
function resolveCaptureSessionCookieDomain(hostname) {
|
|
27
|
-
const override = process.env.PLAYDROP_SESSION_COOKIE_DOMAIN?.trim() ||
|
|
27
|
+
const override = process.env.PLAYDROP_SESSION_COOKIE_DOMAIN?.trim() || "";
|
|
28
28
|
if (override) {
|
|
29
29
|
return override;
|
|
30
30
|
}
|
|
@@ -43,28 +43,22 @@ function shouldUseSecureCaptureSessionCookie(hostname) {
|
|
|
43
43
|
}
|
|
44
44
|
function resolveLocalCaptureCookieHosts(hostname) {
|
|
45
45
|
const normalizedHostname = normalizeHostname(hostname);
|
|
46
|
-
if (normalizedHostname ===
|
|
46
|
+
if (normalizedHostname === "localhost" || (0, node_net_1.isIP)(normalizedHostname) !== 0) {
|
|
47
47
|
return [normalizedHostname];
|
|
48
48
|
}
|
|
49
49
|
const strippedHostname = stripKnownPrefix(normalizedHostname);
|
|
50
|
-
if (!strippedHostname.endsWith(
|
|
50
|
+
if (!strippedHostname.endsWith(".localhost") &&
|
|
51
|
+
!strippedHostname.endsWith(".local") &&
|
|
52
|
+
strippedHostname !== "localhost") {
|
|
51
53
|
return [normalizedHostname];
|
|
52
54
|
}
|
|
53
|
-
return Array.from(new Set([
|
|
54
|
-
normalizedHostname,
|
|
55
|
-
`www.${strippedHostname}`,
|
|
56
|
-
`api.${strippedHostname}`,
|
|
57
|
-
]));
|
|
55
|
+
return Array.from(new Set([normalizedHostname, `www.${strippedHostname}`, `api.${strippedHostname}`]));
|
|
58
56
|
}
|
|
59
57
|
function buildOrigin(protocol, hostname, port) {
|
|
60
|
-
return `${protocol}//${hostname}${port ? `:${port}` :
|
|
58
|
+
return `${protocol}//${hostname}${port ? `:${port}` : ""}`;
|
|
61
59
|
}
|
|
62
60
|
function resolveSharedCaptureCookieHosts(hostname, sharedDomain) {
|
|
63
|
-
return Array.from(new Set([
|
|
64
|
-
hostname,
|
|
65
|
-
`www.${sharedDomain}`,
|
|
66
|
-
`api.${sharedDomain}`,
|
|
67
|
-
]));
|
|
61
|
+
return Array.from(new Set([hostname, `www.${sharedDomain}`, `api.${sharedDomain}`]));
|
|
68
62
|
}
|
|
69
63
|
function buildCaptureAccessTokenCookies(targetUrl, accessToken) {
|
|
70
64
|
const parsedUrl = new URL(targetUrl);
|
|
@@ -77,9 +71,9 @@ function buildCaptureAccessTokenCookies(targetUrl, accessToken) {
|
|
|
77
71
|
name: ACCESS_TOKEN_COOKIE_NAME,
|
|
78
72
|
value: accessToken,
|
|
79
73
|
domain: sharedDomain,
|
|
80
|
-
path:
|
|
74
|
+
path: "/",
|
|
81
75
|
httpOnly: true,
|
|
82
|
-
sameSite:
|
|
76
|
+
sameSite: "Lax",
|
|
83
77
|
secure,
|
|
84
78
|
},
|
|
85
79
|
...resolveSharedCaptureCookieHosts(hostname, sharedDomain).map((cookieHostname) => ({
|
|
@@ -87,7 +81,7 @@ function buildCaptureAccessTokenCookies(targetUrl, accessToken) {
|
|
|
87
81
|
value: accessToken,
|
|
88
82
|
url: buildOrigin(parsedUrl.protocol, cookieHostname, parsedUrl.port),
|
|
89
83
|
httpOnly: true,
|
|
90
|
-
sameSite:
|
|
84
|
+
sameSite: "Lax",
|
|
91
85
|
secure,
|
|
92
86
|
})),
|
|
93
87
|
];
|
|
@@ -97,7 +91,7 @@ function buildCaptureAccessTokenCookies(targetUrl, accessToken) {
|
|
|
97
91
|
value: accessToken,
|
|
98
92
|
url: buildOrigin(parsedUrl.protocol, cookieHostname, parsedUrl.port),
|
|
99
93
|
httpOnly: true,
|
|
100
|
-
sameSite:
|
|
94
|
+
sameSite: "Lax",
|
|
101
95
|
secure,
|
|
102
96
|
}));
|
|
103
97
|
}
|
package/dist/shellProbe.js
CHANGED
|
@@ -4,14 +4,14 @@ exports.buildCommandPathProbe = buildCommandPathProbe;
|
|
|
4
4
|
exports.runShell = runShell;
|
|
5
5
|
const node_child_process_1 = require("node:child_process");
|
|
6
6
|
function buildCommandPathProbe(command, platform = process.platform) {
|
|
7
|
-
return platform ===
|
|
7
|
+
return platform === "win32" ? `where ${command}` : `command -v ${command}`;
|
|
8
8
|
}
|
|
9
9
|
function runShell(command, platform = process.platform, timeoutMs = 30000) {
|
|
10
|
-
const result = platform ===
|
|
11
|
-
? (0, node_child_process_1.spawnSync)(
|
|
12
|
-
: (0, node_child_process_1.spawnSync)(
|
|
10
|
+
const result = platform === "win32"
|
|
11
|
+
? (0, node_child_process_1.spawnSync)("cmd.exe", ["/d", "/s", "/c", command], { encoding: "utf8", timeout: timeoutMs })
|
|
12
|
+
: (0, node_child_process_1.spawnSync)("/bin/zsh", ["-lc", command], { encoding: "utf8", timeout: timeoutMs });
|
|
13
13
|
return {
|
|
14
14
|
exitCode: result.status ?? 1,
|
|
15
|
-
output: `${result.stdout ??
|
|
15
|
+
output: `${result.stdout ?? ""}${result.stderr ?? ""}`.trim(),
|
|
16
16
|
};
|
|
17
17
|
}
|
package/dist/taskSelection.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type CliTask } from
|
|
2
|
-
export type TaskErrorType =
|
|
1
|
+
import { type CliTask } from "./taskUtils";
|
|
2
|
+
export type TaskErrorType = "catalogue-missing" | "invalid-catalogue" | "no-tasks" | "unsupported-file" | "multiple-apps" | "app-not-found";
|
|
3
3
|
export interface TaskError {
|
|
4
4
|
type: TaskErrorType;
|
|
5
5
|
message: string;
|
|
@@ -10,7 +10,7 @@ export interface TaskSelectionResult {
|
|
|
10
10
|
tasks: CliTask[];
|
|
11
11
|
warnings: Set<string>;
|
|
12
12
|
errors: TaskError[];
|
|
13
|
-
resolution:
|
|
13
|
+
resolution: "directory" | "file" | "name";
|
|
14
14
|
}
|
|
15
15
|
export declare function selectTasks(pathOrName: string): TaskSelectionResult;
|
|
16
16
|
export declare function reportTaskErrors(errors: TaskError[], command: string): void;
|
package/dist/taskSelection.js
CHANGED
|
@@ -12,10 +12,10 @@ function createDirectAppTask(htmlPath) {
|
|
|
12
12
|
const rootDir = (0, node_path_1.dirname)(htmlPath);
|
|
13
13
|
const name = (0, node_path_1.basename)(htmlPath, (0, node_path_1.extname)(htmlPath));
|
|
14
14
|
return {
|
|
15
|
-
kind:
|
|
15
|
+
kind: "app",
|
|
16
16
|
name,
|
|
17
|
-
cataloguePath:
|
|
18
|
-
catalogueAbsolutePath: (0, node_path_1.join)(rootDir,
|
|
17
|
+
cataloguePath: "direct upload",
|
|
18
|
+
catalogueAbsolutePath: (0, node_path_1.join)(rootDir, "catalogue.json"),
|
|
19
19
|
catalogueDir: rootDir,
|
|
20
20
|
filePath: htmlPath,
|
|
21
21
|
relativeFile: (0, node_path_1.basename)(htmlPath),
|
|
@@ -48,117 +48,117 @@ function selectTasks(pathOrName) {
|
|
|
48
48
|
if ((0, node_fs_1.existsSync)(absolute)) {
|
|
49
49
|
const stats = (0, node_fs_1.statSync)(absolute);
|
|
50
50
|
if (stats.isDirectory()) {
|
|
51
|
-
const rootCataloguePath = (0, node_path_1.join)(absolute,
|
|
51
|
+
const rootCataloguePath = (0, node_path_1.join)(absolute, "catalogue.json");
|
|
52
52
|
if (!(0, node_fs_1.existsSync)(rootCataloguePath)) {
|
|
53
53
|
errors.push({
|
|
54
|
-
type:
|
|
54
|
+
type: "catalogue-missing",
|
|
55
55
|
message: `catalogue.json not found in ${absolute}`,
|
|
56
56
|
directory: absolute,
|
|
57
57
|
});
|
|
58
|
-
return { tasks: [], warnings, errors, resolution:
|
|
58
|
+
return { tasks: [], warnings, errors, resolution: "directory" };
|
|
59
59
|
}
|
|
60
|
-
const { apps, assetSpecs, assets, assetPacks, warnings: rawWarnings, errors: catalogueErrors } = (0, catalogue_1.resolveCatalogueEntries)(absolute);
|
|
60
|
+
const { apps, assetSpecs, assets, assetPacks, warnings: rawWarnings, errors: catalogueErrors, } = (0, catalogue_1.resolveCatalogueEntries)(absolute);
|
|
61
61
|
if (catalogueErrors.length > 0) {
|
|
62
|
-
catalogueErrors.forEach(message => {
|
|
62
|
+
catalogueErrors.forEach((message) => {
|
|
63
63
|
errors.push({
|
|
64
|
-
type:
|
|
64
|
+
type: "invalid-catalogue",
|
|
65
65
|
message,
|
|
66
|
-
help: [
|
|
66
|
+
help: ["Update the catalogue entry noted above and try again."],
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
|
-
return { tasks: [], warnings, errors, resolution:
|
|
69
|
+
return { tasks: [], warnings, errors, resolution: "directory" };
|
|
70
70
|
}
|
|
71
71
|
const taskList = [...assetSpecs, ...assets, ...apps, ...assetPacks];
|
|
72
72
|
if (taskList.length === 0) {
|
|
73
73
|
errors.push({
|
|
74
|
-
type:
|
|
74
|
+
type: "no-tasks",
|
|
75
75
|
message: `No publishable entries were found under ${absolute}.`,
|
|
76
|
-
help: [
|
|
76
|
+
help: [
|
|
77
|
+
"Add child catalogue.json files or add apps, assetSpecs, assets, or assetPacks to the root catalogue.json, then rerun the command.",
|
|
78
|
+
],
|
|
77
79
|
directory: absolute,
|
|
78
80
|
});
|
|
79
|
-
return { tasks: [], warnings, errors, resolution:
|
|
81
|
+
return { tasks: [], warnings, errors, resolution: "directory" };
|
|
80
82
|
}
|
|
81
83
|
const metadataWarnings = (0, catalogue_1.formatMetadataWarnings)(rawWarnings);
|
|
82
|
-
metadataWarnings.forEach(entry => warnings.add(entry));
|
|
84
|
+
metadataWarnings.forEach((entry) => warnings.add(entry));
|
|
83
85
|
(0, taskUtils_1.addTaskWarnings)(warnings, taskList);
|
|
84
|
-
return { tasks: taskList, warnings, errors, resolution:
|
|
86
|
+
return { tasks: taskList, warnings, errors, resolution: "directory" };
|
|
85
87
|
}
|
|
86
88
|
if (stats.isFile()) {
|
|
87
89
|
const extension = (0, node_path_1.extname)(absolute).toLowerCase();
|
|
88
|
-
if (extension !==
|
|
90
|
+
if (extension !== ".html") {
|
|
89
91
|
errors.push({
|
|
90
|
-
type:
|
|
91
|
-
message:
|
|
92
|
+
type: "unsupported-file",
|
|
93
|
+
message: "Single-file commands only support app HTML files.",
|
|
92
94
|
help: [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
"For assets and packs, run the command on the directory with catalogue.json.",
|
|
96
|
+
"Select the app HTML file you want to process, or provide the app name instead.",
|
|
95
97
|
],
|
|
96
98
|
});
|
|
97
|
-
return { tasks: [], warnings, errors, resolution:
|
|
99
|
+
return { tasks: [], warnings, errors, resolution: "file" };
|
|
98
100
|
}
|
|
99
101
|
const lookup = (0, catalogue_1.findAppTaskByFile)(absolute);
|
|
100
|
-
lookup.errors.forEach(message => {
|
|
102
|
+
lookup.errors.forEach((message) => {
|
|
101
103
|
errors.push({
|
|
102
|
-
type:
|
|
104
|
+
type: "invalid-catalogue",
|
|
103
105
|
message,
|
|
104
|
-
help: [
|
|
106
|
+
help: ["Update the catalogue entry noted above and try again."],
|
|
105
107
|
});
|
|
106
108
|
});
|
|
107
|
-
lookup.warnings.forEach(entry => warnings.add(entry));
|
|
109
|
+
lookup.warnings.forEach((entry) => warnings.add(entry));
|
|
108
110
|
if (lookup.errors.length > 0) {
|
|
109
|
-
return { tasks: [], warnings, errors, resolution:
|
|
111
|
+
return { tasks: [], warnings, errors, resolution: "file" };
|
|
110
112
|
}
|
|
111
113
|
if (lookup.task) {
|
|
112
114
|
(0, taskUtils_1.addTaskWarnings)(warnings, [lookup.task]);
|
|
113
|
-
return { tasks: [lookup.task], warnings, errors, resolution:
|
|
115
|
+
return { tasks: [lookup.task], warnings, errors, resolution: "file" };
|
|
114
116
|
}
|
|
115
117
|
const directTask = createDirectAppTask(absolute);
|
|
116
118
|
(0, taskUtils_1.addTaskWarnings)(warnings, [directTask]);
|
|
117
|
-
return { tasks: [directTask], warnings, errors, resolution:
|
|
119
|
+
return { tasks: [directTask], warnings, errors, resolution: "file" };
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
const lookup = (0, catalogue_1.resolveCatalogueEntries)(process.cwd(), { filterName: pathOrName });
|
|
121
|
-
lookup.errors.forEach(message => {
|
|
123
|
+
lookup.errors.forEach((message) => {
|
|
122
124
|
errors.push({
|
|
123
|
-
type:
|
|
125
|
+
type: "invalid-catalogue",
|
|
124
126
|
message,
|
|
125
|
-
help: [
|
|
127
|
+
help: ["Update the catalogue entry noted above and try again."],
|
|
126
128
|
});
|
|
127
129
|
});
|
|
128
130
|
if (lookup.errors.length > 0) {
|
|
129
|
-
return { tasks: [], warnings, errors, resolution:
|
|
131
|
+
return { tasks: [], warnings, errors, resolution: "name" };
|
|
130
132
|
}
|
|
131
133
|
const candidates = [
|
|
132
|
-
...lookup.apps.filter(task => task.name === pathOrName),
|
|
133
|
-
...lookup.assetSpecs.filter(task => task.name === pathOrName),
|
|
134
|
-
...lookup.assets.filter(task => task.name === pathOrName),
|
|
135
|
-
...lookup.assetPacks.filter(task => task.name === pathOrName),
|
|
134
|
+
...lookup.apps.filter((task) => task.name === pathOrName),
|
|
135
|
+
...lookup.assetSpecs.filter((task) => task.name === pathOrName),
|
|
136
|
+
...lookup.assets.filter((task) => task.name === pathOrName),
|
|
137
|
+
...lookup.assetPacks.filter((task) => task.name === pathOrName),
|
|
136
138
|
];
|
|
137
139
|
if (candidates.length === 0) {
|
|
138
140
|
errors.push({
|
|
139
|
-
type:
|
|
141
|
+
type: "app-not-found",
|
|
140
142
|
message: `"${pathOrName}" was not found in any catalogue.json under ${process.cwd()}.`,
|
|
141
143
|
help: [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
"Ensure the catalogue entry exists and matches the name.",
|
|
145
|
+
"You can also provide a directory path to process all apps, assets, and packs.",
|
|
144
146
|
],
|
|
145
147
|
});
|
|
146
|
-
return { tasks: [], warnings, errors, resolution:
|
|
148
|
+
return { tasks: [], warnings, errors, resolution: "name" };
|
|
147
149
|
}
|
|
148
150
|
if (candidates.length > 1) {
|
|
149
151
|
errors.push({
|
|
150
|
-
type:
|
|
152
|
+
type: "multiple-apps",
|
|
151
153
|
message: `Multiple catalogue entries share the name "${pathOrName}".`,
|
|
152
|
-
help: [
|
|
153
|
-
'Use a directory path to process all entries, or rename entries so names are unique.',
|
|
154
|
-
],
|
|
154
|
+
help: ["Use a directory path to process all entries, or rename entries so names are unique."],
|
|
155
155
|
});
|
|
156
|
-
return { tasks: [], warnings, errors, resolution:
|
|
156
|
+
return { tasks: [], warnings, errors, resolution: "name" };
|
|
157
157
|
}
|
|
158
158
|
const metadataWarnings = (0, catalogue_1.formatMetadataWarnings)(lookup.warnings);
|
|
159
|
-
metadataWarnings.forEach(entry => warnings.add(entry));
|
|
159
|
+
metadataWarnings.forEach((entry) => warnings.add(entry));
|
|
160
160
|
(0, taskUtils_1.addTaskWarnings)(warnings, candidates);
|
|
161
|
-
return { tasks: [...candidates], warnings, errors, resolution:
|
|
161
|
+
return { tasks: [...candidates], warnings, errors, resolution: "name" };
|
|
162
162
|
}
|
|
163
163
|
function reportTaskErrors(errors, command) {
|
|
164
164
|
if (errors.length === 0) {
|
|
@@ -167,38 +167,43 @@ function reportTaskErrors(errors, command) {
|
|
|
167
167
|
let sawInvalidCatalogue = false;
|
|
168
168
|
for (const error of errors) {
|
|
169
169
|
switch (error.type) {
|
|
170
|
-
case
|
|
170
|
+
case "catalogue-missing":
|
|
171
171
|
if (error.directory) {
|
|
172
172
|
(0, messages_1.printCatalogueMissing)(error.directory, command);
|
|
173
173
|
}
|
|
174
174
|
break;
|
|
175
|
-
case
|
|
176
|
-
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
175
|
+
case "invalid-catalogue": {
|
|
176
|
+
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? ["Update the catalogue entry noted above and try again."], {
|
|
177
|
+
command,
|
|
178
|
+
includeGeneralHelp: false,
|
|
179
|
+
});
|
|
177
180
|
sawInvalidCatalogue = true;
|
|
178
181
|
break;
|
|
179
182
|
}
|
|
180
|
-
case
|
|
181
|
-
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
183
|
+
case "no-tasks": {
|
|
184
|
+
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
185
|
+
"Add catalogue.json files to the project folders you want to process, then rerun the command.",
|
|
186
|
+
], { command });
|
|
182
187
|
break;
|
|
183
188
|
}
|
|
184
|
-
case
|
|
189
|
+
case "unsupported-file": {
|
|
185
190
|
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
"For assets and packs, run the command on the directory with catalogue.json.",
|
|
192
|
+
"Select the app HTML file you want to process, or provide the app name instead.",
|
|
188
193
|
], { command });
|
|
189
194
|
break;
|
|
190
195
|
}
|
|
191
|
-
case
|
|
196
|
+
case "multiple-apps": {
|
|
192
197
|
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
"Ensure app names are unique across catalogue.json files.",
|
|
199
|
+
"Alternatively, provide the path to the HTML file you want to process.",
|
|
195
200
|
], { command });
|
|
196
201
|
break;
|
|
197
202
|
}
|
|
198
|
-
case
|
|
203
|
+
case "app-not-found": {
|
|
199
204
|
(0, messages_1.printErrorWithHelp)(error.message, error.help ?? [
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
"Ensure the catalogue entry exists and matches the app name.",
|
|
206
|
+
"You can also provide the path to the app HTML file to process it directly.",
|
|
202
207
|
], { command });
|
|
203
208
|
break;
|
|
204
209
|
}
|
package/dist/taskUtils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppTask, AssetSpecTask, AssetTask, OwnedAssetTask, AssetPackTask } from
|
|
1
|
+
import type { AppTask, AssetSpecTask, AssetTask, OwnedAssetTask, AssetPackTask } from "./catalogue";
|
|
2
2
|
export type CliTask = AppTask | AssetSpecTask | AssetTask | OwnedAssetTask | AssetPackTask;
|
|
3
3
|
export declare function sortTasks(tasks: CliTask[]): CliTask[];
|
|
4
4
|
export declare function addTaskWarnings(warnings: Set<string>, tasks: CliTask[]): void;
|
package/dist/taskUtils.js
CHANGED
|
@@ -5,11 +5,11 @@ exports.addTaskWarnings = addTaskWarnings;
|
|
|
5
5
|
const catalogue_1 = require("./catalogue");
|
|
6
6
|
function sortTasks(tasks) {
|
|
7
7
|
const order = {
|
|
8
|
-
|
|
8
|
+
"asset-spec": 0,
|
|
9
9
|
asset: 1,
|
|
10
10
|
app: 2,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
"asset-pack": 3,
|
|
12
|
+
"owned-asset": 4,
|
|
13
13
|
};
|
|
14
14
|
return [...tasks].sort((a, b) => {
|
|
15
15
|
if (order[a.kind] !== order[b.kind]) {
|
|
@@ -26,7 +26,7 @@ function sortTasks(tasks) {
|
|
|
26
26
|
}
|
|
27
27
|
function addTaskWarnings(warnings, tasks) {
|
|
28
28
|
for (const task of tasks) {
|
|
29
|
-
if (
|
|
29
|
+
if ("missingMetadata" in task && Array.isArray(task.missingMetadata)) {
|
|
30
30
|
const extra = (0, catalogue_1.formatMissingMetadataWarnings)(task);
|
|
31
31
|
if (extra) {
|
|
32
32
|
warnings.add(extra);
|
package/dist/tweakStaleness.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AppTweaksSnapshot } from
|
|
2
|
-
import type { ApiClient } from
|
|
3
|
-
import type { AppTask } from
|
|
1
|
+
import { type AppTweaksSnapshot } from "@playdrop/types";
|
|
2
|
+
import type { ApiClient } from "@playdrop/api-client";
|
|
3
|
+
import type { AppTask } from "./catalogue";
|
|
4
4
|
export declare function assertTweakStateMatches(task: AppTask, latest: AppTweaksSnapshot | null): void;
|
|
5
5
|
export declare function fetchAndAssertTweakState(client: ApiClient, creatorUsername: string, task: AppTask, options?: {
|
|
6
6
|
allowAppNotFound?: boolean;
|