@playdrop/playdrop-cli 0.16.5 → 0.16.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/playdrop +1 -2
- package/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +2 -2
- package/dist/apiClient.js +16 -20
- package/dist/appUrls.d.ts +2 -2
- package/dist/appUrls.js +31 -33
- package/dist/apps/build.d.ts +2 -2
- package/dist/apps/build.js +83 -83
- package/dist/apps/index.d.ts +7 -7
- package/dist/apps/index.js +8 -8
- package/dist/apps/loadCheck.d.ts +28 -16
- package/dist/apps/loadCheck.js +411 -279
- package/dist/apps/registration.d.ts +3 -3
- package/dist/apps/registration.js +1 -1
- package/dist/apps/staticHtml.d.ts +3 -3
- package/dist/apps/staticHtml.js +90 -91
- package/dist/apps/surfaceProfiles.d.ts +2 -2
- package/dist/apps/surfaceProfiles.js +6 -6
- package/dist/apps/upload.d.ts +5 -5
- package/dist/apps/upload.js +75 -81
- package/dist/apps/validate.d.ts +2 -2
- package/dist/apps/validate.js +18 -22
- package/dist/assetSpecs.d.ts +2 -2
- package/dist/assetSpecs.js +35 -35
- package/dist/assets/model-artifacts.d.ts +1 -1
- package/dist/assets/model-artifacts.js +81 -77
- package/dist/assets/model-worker.d.ts +1 -1
- package/dist/assets/model-worker.js +6 -6
- package/dist/browser.js +9 -9
- package/dist/catalogue-utils.d.ts +1 -1
- package/dist/catalogue-utils.js +26 -26
- package/dist/catalogue.d.ts +21 -16
- package/dist/catalogue.js +509 -413
- package/dist/clientInfo.d.ts +1 -1
- package/dist/clientInfo.js +28 -28
- package/dist/commandContext.d.ts +5 -5
- package/dist/commandContext.js +19 -23
- package/dist/commands/accounts.js +6 -6
- package/dist/commands/ads.js +16 -16
- package/dist/commands/agents.d.ts +2 -2
- package/dist/commands/agents.js +131 -127
- package/dist/commands/boosts.js +41 -31
- package/dist/commands/browse.d.ts +2 -2
- package/dist/commands/browse.js +168 -128
- package/dist/commands/build.js +9 -9
- package/dist/commands/captureListing.d.ts +8 -8
- package/dist/commands/captureListing.js +292 -332
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/chat.js +51 -53
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.js +44 -44
- package/dist/commands/clients.d.ts +3 -3
- package/dist/commands/clients.js +67 -64
- package/dist/commands/comments.js +36 -29
- package/dist/commands/create.js +305 -312
- package/dist/commands/createRemixContent.d.ts +1 -1
- package/dist/commands/createRemixContent.js +65 -60
- package/dist/commands/creations.js +205 -135
- package/dist/commands/credits.js +37 -27
- package/dist/commands/detail.js +40 -34
- package/dist/commands/dev.js +103 -126
- package/dist/commands/devBrowser.js +74 -65
- package/dist/commands/devRuntimeAssets.d.ts +4 -4
- package/dist/commands/devRuntimeAssets.js +38 -40
- package/dist/commands/devServer.d.ts +4 -4
- package/dist/commands/devServer.js +183 -174
- package/dist/commands/devShared.d.ts +3 -3
- package/dist/commands/devShared.js +31 -31
- package/dist/commands/doctor.d.ts +5 -5
- package/dist/commands/doctor.js +63 -57
- package/dist/commands/documentation.js +42 -32
- package/dist/commands/feedback.js +59 -42
- package/dist/commands/format.js +9 -9
- package/dist/commands/generation.d.ts +2 -2
- package/dist/commands/generation.js +344 -326
- package/dist/commands/init.d.ts +4 -4
- package/dist/commands/init.js +64 -61
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +42 -62
- package/dist/commands/logout.js +4 -4
- package/dist/commands/marketing.d.ts +8 -8
- package/dist/commands/marketing.js +246 -297
- package/dist/commands/notes.js +19 -19
- package/dist/commands/notifications.js +34 -22
- package/dist/commands/npmProcess.js +3 -3
- package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
- package/dist/commands/ownedRuntimeImageValidation.js +19 -17
- package/dist/commands/play.js +12 -21
- package/dist/commands/publicPages.js +8 -4
- package/dist/commands/review.js +123 -110
- package/dist/commands/search.js +107 -88
- package/dist/commands/tags.js +10 -12
- package/dist/commands/taskCaptureSession.d.ts +3 -3
- package/dist/commands/taskCaptureSession.js +3 -3
- package/dist/commands/tweaks.js +25 -23
- package/dist/commands/upgrade.js +40 -31
- package/dist/commands/upload-content.d.ts +5 -5
- package/dist/commands/upload-content.js +130 -122
- package/dist/commands/upload-graph.d.ts +1 -1
- package/dist/commands/upload-graph.js +7 -11
- package/dist/commands/upload.d.ts +7 -7
- package/dist/commands/upload.js +196 -217
- package/dist/commands/validate.js +33 -32
- package/dist/commands/versionsBrowse.js +61 -51
- package/dist/commands/whoami.js +11 -14
- package/dist/commands/worker/archive-staging.d.ts +9 -0
- package/dist/commands/worker/archive-staging.js +257 -0
- package/dist/commands/worker/instrument-evidence.d.ts +1 -1
- package/dist/commands/worker/instrument-evidence.js +41 -43
- package/dist/commands/worker/provider-telemetry.d.ts +2 -1
- package/dist/commands/worker/provider-telemetry.js +181 -64
- package/dist/commands/worker/runtime.d.ts +18 -3
- package/dist/commands/worker/runtime.js +291 -239
- package/dist/commands/worker.d.ts +83 -22
- package/dist/commands/worker.js +1980 -1411
- package/dist/commands/workspaces.d.ts +2 -2
- package/dist/commands/workspaces.js +57 -57
- package/dist/config.js +23 -20
- package/dist/devAuth.d.ts +3 -3
- package/dist/devAuth.js +20 -17
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +34 -34
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -7
- package/dist/externalAssetPackValidation.d.ts +1 -1
- package/dist/externalAssetPackValidation.js +9 -9
- package/dist/http.d.ts +1 -1
- package/dist/http.js +9 -9
- package/dist/index.js +657 -664
- package/dist/listingCaptureLease.js +23 -23
- package/dist/listingPreflight.d.ts +2 -2
- package/dist/listingPreflight.js +33 -33
- package/dist/messages.js +6 -14
- package/dist/output.js +9 -9
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +35 -40
- package/dist/proxyFetch.js +30 -27
- package/dist/recorderRelease.js +8 -8
- package/dist/refs.d.ts +5 -5
- package/dist/refs.js +40 -37
- package/dist/sessionCookie.js +15 -21
- package/dist/shellProbe.js +5 -5
- package/dist/taskSelection.d.ts +3 -3
- package/dist/taskSelection.js +67 -62
- package/dist/taskUtils.d.ts +1 -1
- package/dist/taskUtils.js +4 -4
- package/dist/tweakStaleness.d.ts +3 -3
- package/dist/tweakStaleness.js +8 -8
- package/dist/uploadLog.d.ts +3 -3
- package/dist/uploadLog.js +51 -51
- package/dist/versionCompare.js +3 -3
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +10 -17
- package/dist/workspaceAuth.d.ts +1 -1
- package/dist/workspaceAuth.js +28 -22
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
- package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +7 -2
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
- package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
- package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
- package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
- package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/index.js +24 -25
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
- package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
- package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
- package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
- package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
- package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
- package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
- package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +40 -59
- package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
- package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/app-review.js +1 -6
- package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
- package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
- package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/locale.js +2 -17
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
- package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
- package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
- package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
- package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
- package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +4 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,10 +13,10 @@ const node_os_1 = __importDefault(require("node:os"));
|
|
|
13
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
14
14
|
exports.LISTING_CAPTURE_MAX_DURATION_MS = 30 * 60 * 1000;
|
|
15
15
|
const DEFAULT_LEASE_POLL_INTERVAL_MS = 250;
|
|
16
|
-
const LEASE_OWNER_FILE =
|
|
16
|
+
const LEASE_OWNER_FILE = "owner.json";
|
|
17
17
|
function resolveListingCaptureLeasePath(env = process.env) {
|
|
18
18
|
const configured = env.PLAYDROP_LISTING_CAPTURE_LEASE_PATH?.trim();
|
|
19
|
-
return configured || node_path_1.default.join(node_os_1.default.tmpdir(),
|
|
19
|
+
return configured || node_path_1.default.join(node_os_1.default.tmpdir(), "playdrop-listing-capture.lock");
|
|
20
20
|
}
|
|
21
21
|
function isProcessAlive(pid) {
|
|
22
22
|
if (!Number.isInteger(pid) || pid <= 0) {
|
|
@@ -27,20 +27,20 @@ function isProcessAlive(pid) {
|
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
return error.code ===
|
|
30
|
+
return error.code === "EPERM";
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
async function readLeaseOwner(lockPath) {
|
|
34
34
|
try {
|
|
35
|
-
const parsed = JSON.parse(await (0, promises_1.readFile)(node_path_1.default.join(lockPath, LEASE_OWNER_FILE),
|
|
36
|
-
if (typeof parsed.token !==
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
const parsed = JSON.parse(await (0, promises_1.readFile)(node_path_1.default.join(lockPath, LEASE_OWNER_FILE), "utf8"));
|
|
36
|
+
if (typeof parsed.token !== "string" ||
|
|
37
|
+
!parsed.token ||
|
|
38
|
+
!Number.isInteger(parsed.pid) ||
|
|
39
|
+
Number(parsed.pid) <= 0 ||
|
|
40
|
+
typeof parsed.acquiredAt !== "string" ||
|
|
41
|
+
!parsed.acquiredAt ||
|
|
42
|
+
typeof parsed.workspaceDir !== "string" ||
|
|
43
|
+
!node_path_1.default.isAbsolute(parsed.workspaceDir)) {
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
return parsed;
|
|
@@ -56,7 +56,7 @@ async function removeDeadLease(lockPath, token) {
|
|
|
56
56
|
}
|
|
57
57
|
catch (error) {
|
|
58
58
|
const code = error.code;
|
|
59
|
-
if (code ===
|
|
59
|
+
if (code === "ENOENT" || code === "EEXIST") {
|
|
60
60
|
return false;
|
|
61
61
|
}
|
|
62
62
|
throw error;
|
|
@@ -66,25 +66,25 @@ async function removeDeadLease(lockPath, token) {
|
|
|
66
66
|
}
|
|
67
67
|
async function acquireListingCaptureLease(input = {}) {
|
|
68
68
|
if (input.timeoutMs !== undefined && input.deadlineAt !== undefined) {
|
|
69
|
-
throw new Error(
|
|
69
|
+
throw new Error("listing_capture_lease_deadline_conflict");
|
|
70
70
|
}
|
|
71
71
|
const timeoutMs = input.timeoutMs ?? exports.LISTING_CAPTURE_MAX_DURATION_MS;
|
|
72
72
|
const pollIntervalMs = input.pollIntervalMs ?? DEFAULT_LEASE_POLL_INTERVAL_MS;
|
|
73
73
|
if (!Number.isInteger(timeoutMs) || timeoutMs <= 0) {
|
|
74
|
-
throw new Error(
|
|
74
|
+
throw new Error("listing_capture_timeout_invalid");
|
|
75
75
|
}
|
|
76
76
|
if (!Number.isInteger(pollIntervalMs) || pollIntervalMs <= 0) {
|
|
77
|
-
throw new Error(
|
|
77
|
+
throw new Error("listing_capture_lease_poll_interval_invalid");
|
|
78
78
|
}
|
|
79
79
|
const lockPath = input.lockPath ?? resolveListingCaptureLeasePath();
|
|
80
80
|
if (!node_path_1.default.isAbsolute(lockPath)) {
|
|
81
|
-
throw new Error(
|
|
81
|
+
throw new Error("listing_capture_lease_path_invalid");
|
|
82
82
|
}
|
|
83
83
|
const workspaceDir = node_path_1.default.resolve(input.workspaceDir ?? process.cwd());
|
|
84
84
|
const token = (0, node_crypto_1.randomUUID)();
|
|
85
85
|
const deadlineAt = input.deadlineAt ?? Date.now() + timeoutMs;
|
|
86
86
|
if (!Number.isFinite(deadlineAt) || deadlineAt <= Date.now()) {
|
|
87
|
-
throw new Error(
|
|
87
|
+
throw new Error("listing_capture_timeout");
|
|
88
88
|
}
|
|
89
89
|
while (true) {
|
|
90
90
|
try {
|
|
@@ -96,21 +96,21 @@ async function acquireListingCaptureLease(input = {}) {
|
|
|
96
96
|
workspaceDir,
|
|
97
97
|
};
|
|
98
98
|
const temporaryOwnerPath = node_path_1.default.join(lockPath, `${LEASE_OWNER_FILE}.${token}.tmp`);
|
|
99
|
-
await (0, promises_1.writeFile)(temporaryOwnerPath, `${JSON.stringify(owner)}\n`, { encoding:
|
|
99
|
+
await (0, promises_1.writeFile)(temporaryOwnerPath, `${JSON.stringify(owner)}\n`, { encoding: "utf8", mode: 0o600 });
|
|
100
100
|
await (0, promises_1.rename)(temporaryOwnerPath, node_path_1.default.join(lockPath, LEASE_OWNER_FILE));
|
|
101
101
|
return {
|
|
102
102
|
deadlineAt,
|
|
103
103
|
release: async () => {
|
|
104
104
|
const current = await readLeaseOwner(lockPath);
|
|
105
105
|
if (!current || current.token !== token) {
|
|
106
|
-
throw new Error(
|
|
106
|
+
throw new Error("listing_capture_lease_ownership_lost");
|
|
107
107
|
}
|
|
108
108
|
await (0, promises_1.rm)(lockPath, { recursive: true, force: true });
|
|
109
109
|
},
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
catch (error) {
|
|
113
|
-
if (error.code !==
|
|
113
|
+
if (error.code !== "EEXIST") {
|
|
114
114
|
throw error;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -127,13 +127,13 @@ async function acquireListingCaptureLease(input = {}) {
|
|
|
127
127
|
if (remainingMs <= 0) {
|
|
128
128
|
throw new Error(`listing_capture_lease_timeout:${current.pid}`);
|
|
129
129
|
}
|
|
130
|
-
await new Promise(resolve => setTimeout(resolve, Math.min(pollIntervalMs, remainingMs)));
|
|
130
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(pollIntervalMs, remainingMs)));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
function remainingListingCaptureTime(deadlineAt) {
|
|
134
134
|
const remainingMs = Math.floor(deadlineAt - Date.now());
|
|
135
135
|
if (remainingMs <= 0) {
|
|
136
|
-
throw new Error(
|
|
136
|
+
throw new Error("listing_capture_timeout");
|
|
137
137
|
}
|
|
138
138
|
return remainingMs;
|
|
139
139
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type WorkerUploadPreflightContext = {
|
|
2
|
-
kind:
|
|
3
|
-
target:
|
|
2
|
+
kind: "NEW_GAME" | "REMIX_GAME" | "GAME_UPDATE";
|
|
3
|
+
target: "FIRST_PARTY" | "PERSONAL";
|
|
4
4
|
creatorUsername: string;
|
|
5
5
|
creatorRequest: string;
|
|
6
6
|
outputVersion?: string;
|
package/dist/listingPreflight.js
CHANGED
|
@@ -6,7 +6,7 @@ const node_path_1 = require("node:path");
|
|
|
6
6
|
function findWorkerTaskContextPath(projectDir) {
|
|
7
7
|
let current = (0, node_path_1.resolve)(projectDir);
|
|
8
8
|
while (true) {
|
|
9
|
-
const candidate = (0, node_path_1.join)(current,
|
|
9
|
+
const candidate = (0, node_path_1.join)(current, ".playdrop", "task.json");
|
|
10
10
|
if ((0, node_fs_1.existsSync)(candidate)) {
|
|
11
11
|
return candidate;
|
|
12
12
|
}
|
|
@@ -24,7 +24,7 @@ function readWorkerUploadPreflightContext(projectDir) {
|
|
|
24
24
|
}
|
|
25
25
|
let parsed;
|
|
26
26
|
try {
|
|
27
|
-
parsed = JSON.parse((0, node_fs_1.readFileSync)(contextPath,
|
|
27
|
+
parsed = JSON.parse((0, node_fs_1.readFileSync)(contextPath, "utf8"));
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
const reason = error instanceof Error ? error.message : String(error);
|
|
@@ -34,40 +34,40 @@ function readWorkerUploadPreflightContext(projectDir) {
|
|
|
34
34
|
const task = parsed.task;
|
|
35
35
|
const request = parsed.request;
|
|
36
36
|
const playdrop = task?.metadata?.playdrop;
|
|
37
|
-
if (!task
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
if (!task ||
|
|
38
|
+
typeof task !== "object" ||
|
|
39
|
+
Array.isArray(task) ||
|
|
40
|
+
!request ||
|
|
41
|
+
typeof request !== "object" ||
|
|
42
|
+
Array.isArray(request) ||
|
|
43
|
+
!playdrop ||
|
|
44
|
+
typeof playdrop !== "object" ||
|
|
45
|
+
Array.isArray(playdrop)) {
|
|
46
46
|
throw new Error(`agent_task_context_invalid: ${contextPath} has invalid protocol-v2 task metadata.`);
|
|
47
47
|
}
|
|
48
48
|
const kind = playdrop.kind;
|
|
49
|
-
if (kind !==
|
|
49
|
+
if (kind !== "NEW_GAME" && kind !== "REMIX_GAME" && kind !== "GAME_UPDATE") {
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
const target = task.executionTarget;
|
|
53
|
-
if (target !==
|
|
53
|
+
if (target !== "FIRST_PARTY" && target !== "PERSONAL") {
|
|
54
54
|
throw new Error(`agent_task_context_invalid: ${contextPath} has invalid execution target.`);
|
|
55
55
|
}
|
|
56
56
|
return {
|
|
57
57
|
kind,
|
|
58
58
|
target,
|
|
59
|
-
creatorUsername: typeof playdrop.creatorUsername ===
|
|
60
|
-
creatorRequest: typeof request.prompt ===
|
|
61
|
-
...(typeof playdrop.output?.version ===
|
|
59
|
+
creatorUsername: typeof playdrop.creatorUsername === "string" ? playdrop.creatorUsername.trim() : "",
|
|
60
|
+
creatorRequest: typeof request.prompt === "string" ? request.prompt.trim() : "",
|
|
61
|
+
...(typeof playdrop.output?.version === "string" && playdrop.output.version.trim()
|
|
62
62
|
? { outputVersion: playdrop.output.version.trim() }
|
|
63
63
|
: {}),
|
|
64
|
-
...(playdrop.tweaks
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
...(playdrop.tweaks &&
|
|
65
|
+
typeof playdrop.tweaks === "object" &&
|
|
66
|
+
!Array.isArray(playdrop.tweaks) &&
|
|
67
|
+
typeof playdrop.tweaks.id === "string" &&
|
|
68
|
+
playdrop.tweaks.values &&
|
|
69
|
+
typeof playdrop.tweaks.values === "object" &&
|
|
70
|
+
!Array.isArray(playdrop.tweaks.values)
|
|
71
71
|
? { tweaks: { id: playdrop.tweaks.id, values: playdrop.tweaks.values } }
|
|
72
72
|
: {}),
|
|
73
73
|
};
|
|
@@ -75,23 +75,23 @@ function readWorkerUploadPreflightContext(projectDir) {
|
|
|
75
75
|
if (parsed?.protocolVersion !== undefined) {
|
|
76
76
|
throw new Error(`agent_task_context_invalid: ${contextPath} has unsupported protocol version.`);
|
|
77
77
|
}
|
|
78
|
-
if (parsed?.kind !==
|
|
78
|
+
if (parsed?.kind !== "NEW_GAME" && parsed?.kind !== "REMIX_GAME" && parsed?.kind !== "GAME_UPDATE") {
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
|
-
if (parsed.target !==
|
|
81
|
+
if (parsed.target !== "FIRST_PARTY" && parsed.target !== "PERSONAL") {
|
|
82
82
|
throw new Error(`agent_task_context_invalid: ${contextPath} has invalid target.`);
|
|
83
83
|
}
|
|
84
84
|
return {
|
|
85
85
|
kind: parsed.kind,
|
|
86
86
|
target: parsed.target,
|
|
87
|
-
creatorUsername: typeof parsed.creatorUsername ===
|
|
88
|
-
creatorRequest: typeof parsed.creatorRequest ===
|
|
89
|
-
...(parsed.tweaks
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
creatorUsername: typeof parsed.creatorUsername === "string" ? parsed.creatorUsername.trim() : "",
|
|
88
|
+
creatorRequest: typeof parsed.creatorRequest === "string" ? parsed.creatorRequest.trim() : "",
|
|
89
|
+
...(parsed.tweaks &&
|
|
90
|
+
typeof parsed.tweaks === "object" &&
|
|
91
|
+
typeof parsed.tweaks.id === "string" &&
|
|
92
|
+
parsed.tweaks.values &&
|
|
93
|
+
typeof parsed.tweaks.values === "object" &&
|
|
94
|
+
!Array.isArray(parsed.tweaks.values)
|
|
95
95
|
? { tweaks: parsed.tweaks }
|
|
96
96
|
: {}),
|
|
97
97
|
};
|
package/dist/messages.js
CHANGED
|
@@ -27,13 +27,10 @@ function printErrorWithHelp(problem, suggestions, options = {}) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
function printLoginRequired(context, command) {
|
|
30
|
-
printErrorWithHelp(`${context} requires you to be logged in.`, [
|
|
31
|
-
'Run "playdrop auth login" to authenticate.',
|
|
32
|
-
'Use "playdrop auth whoami" to verify your current status.',
|
|
33
|
-
], { command });
|
|
30
|
+
printErrorWithHelp(`${context} requires you to be logged in.`, ['Run "playdrop auth login" to authenticate.', 'Use "playdrop auth whoami" to verify your current status.'], { command });
|
|
34
31
|
}
|
|
35
32
|
function printUnknownEnvironment(env, available, command) {
|
|
36
|
-
const listLine = available ? `Available environments: ${available}.` :
|
|
33
|
+
const listLine = available ? `Available environments: ${available}.` : "";
|
|
37
34
|
const suggestions = [
|
|
38
35
|
listLine,
|
|
39
36
|
'Run "playdrop auth login --env <env>" to store a supported environment before retrying.',
|
|
@@ -41,25 +38,20 @@ function printUnknownEnvironment(env, available, command) {
|
|
|
41
38
|
printErrorWithHelp(`Environment "${env}" is not supported.`, suggestions, { command });
|
|
42
39
|
}
|
|
43
40
|
function printConfigEnvironmentMissing(command) {
|
|
44
|
-
printErrorWithHelp(
|
|
41
|
+
printErrorWithHelp("No environment is configured yet.", [
|
|
45
42
|
'Run "playdrop auth login" to choose an environment and save your credentials.',
|
|
46
43
|
'Use "playdrop auth whoami" after logging in to confirm your status.',
|
|
47
44
|
], { command });
|
|
48
45
|
}
|
|
49
46
|
function printNetworkIssue(context, command) {
|
|
50
|
-
printErrorWithHelp(context, [
|
|
51
|
-
'Check your network connection and ensure the Playdrop API is reachable.',
|
|
52
|
-
'Retry once connectivity is restored.'
|
|
53
|
-
], { command });
|
|
47
|
+
printErrorWithHelp(context, ["Check your network connection and ensure the Playdrop API is reachable.", "Retry once connectivity is restored."], { command });
|
|
54
48
|
}
|
|
55
49
|
function printCatalogueMissing(directory, command) {
|
|
56
50
|
printErrorWithHelp(`Processing "${directory}" requires a catalogue.json at the root, but none was found.`, [
|
|
57
51
|
'Run "playdrop project init ." inside that folder to create the starter files without changing existing content.',
|
|
58
|
-
'Use "playdrop project create app <name>" to register your apps and add them to the catalogue.'
|
|
52
|
+
'Use "playdrop project create app <name>" to register your apps and add them to the catalogue.',
|
|
59
53
|
], { command });
|
|
60
54
|
}
|
|
61
55
|
function printInvalidCatalogue(command) {
|
|
62
|
-
printErrorWithHelp(
|
|
63
|
-
'Fix the catalogue.json files highlighted above, then rerun the command.'
|
|
64
|
-
], { command });
|
|
56
|
+
printErrorWithHelp("No valid entries were found in the catalogue files.", ["Fix the catalogue.json files highlighted above, then rerun the command."], { command });
|
|
65
57
|
}
|
package/dist/output.js
CHANGED
|
@@ -20,23 +20,23 @@ function printSection(title) {
|
|
|
20
20
|
console.log(title);
|
|
21
21
|
}
|
|
22
22
|
function formatOptionalValue(value) {
|
|
23
|
-
if (typeof value ===
|
|
24
|
-
return value.trim().length > 0 ? value :
|
|
23
|
+
if (typeof value === "string") {
|
|
24
|
+
return value.trim().length > 0 ? value : "none";
|
|
25
25
|
}
|
|
26
26
|
if (value === null || value === undefined) {
|
|
27
|
-
return
|
|
27
|
+
return "none";
|
|
28
28
|
}
|
|
29
29
|
return String(value);
|
|
30
30
|
}
|
|
31
31
|
function formatTimestamp(isoDate) {
|
|
32
32
|
try {
|
|
33
33
|
const date = new Date(isoDate);
|
|
34
|
-
return date.toLocaleString(
|
|
35
|
-
year:
|
|
36
|
-
month:
|
|
37
|
-
day:
|
|
38
|
-
hour:
|
|
39
|
-
minute:
|
|
34
|
+
return date.toLocaleString("en-US", {
|
|
35
|
+
year: "numeric",
|
|
36
|
+
month: "short",
|
|
37
|
+
day: "numeric",
|
|
38
|
+
hour: "2-digit",
|
|
39
|
+
minute: "2-digit",
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
catch {
|
package/dist/playwright.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Browser, BrowserContext, BrowserContextOptions, Page } from
|
|
1
|
+
import type { Browser, BrowserContext, BrowserContextOptions, Page } from "playwright-core";
|
|
2
2
|
export declare const HEADLESS_CHROMIUM_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"];
|
|
3
3
|
export declare const INTERACTIVE_CHROMIUM_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--ignore-gpu-blocklist"];
|
|
4
4
|
export declare const INSTALLED_CHROME_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--ignore-gpu-blocklist"];
|
package/dist/playwright.js
CHANGED
|
@@ -41,31 +41,25 @@ exports.withChromiumPage = withChromiumPage;
|
|
|
41
41
|
exports.withInstalledChromePage = withInstalledChromePage;
|
|
42
42
|
exports.launchPersistentChromiumContext = launchPersistentChromiumContext;
|
|
43
43
|
const node_url_1 = require("node:url");
|
|
44
|
-
const TOOL_NAME =
|
|
45
|
-
const INSTALLED_CHROME_CHANNEL =
|
|
46
|
-
const COMMON_CHROMIUM_ARGS = [
|
|
47
|
-
'--no-sandbox',
|
|
48
|
-
'--disable-web-security',
|
|
49
|
-
];
|
|
44
|
+
const TOOL_NAME = "playdrop";
|
|
45
|
+
const INSTALLED_CHROME_CHANNEL = "chrome";
|
|
46
|
+
const COMMON_CHROMIUM_ARGS = ["--no-sandbox", "--disable-web-security"];
|
|
50
47
|
// Force software WebGL for headless capture so local preview output stays stable.
|
|
51
48
|
exports.HEADLESS_CHROMIUM_ARGS = [
|
|
52
49
|
...COMMON_CHROMIUM_ARGS,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
"--use-gl=angle",
|
|
51
|
+
"--use-angle=swiftshader",
|
|
52
|
+
"--enable-unsafe-swiftshader",
|
|
53
|
+
"--ignore-gpu-blocklist",
|
|
57
54
|
];
|
|
58
55
|
// Visible dev-browser sessions should use the normal GPU path instead of SwiftShader.
|
|
59
|
-
exports.INTERACTIVE_CHROMIUM_ARGS = [
|
|
60
|
-
...COMMON_CHROMIUM_ARGS,
|
|
61
|
-
'--ignore-gpu-blocklist',
|
|
62
|
-
];
|
|
56
|
+
exports.INTERACTIVE_CHROMIUM_ARGS = [...COMMON_CHROMIUM_ARGS, "--ignore-gpu-blocklist"];
|
|
63
57
|
// Deterministic project checks must exercise the installed Chrome GPU path.
|
|
64
58
|
exports.INSTALLED_CHROME_ARGS = exports.INTERACTIVE_CHROMIUM_ARGS;
|
|
65
59
|
// Backward-compatible alias for older imports.
|
|
66
60
|
exports.CHROMIUM_ARGS = exports.HEADLESS_CHROMIUM_ARGS;
|
|
67
61
|
let customLoader = null;
|
|
68
|
-
const nativeImport = new Function(
|
|
62
|
+
const nativeImport = new Function("specifier", "return import(specifier);");
|
|
69
63
|
function setPlaywrightLoader(loader) {
|
|
70
64
|
customLoader = loader;
|
|
71
65
|
}
|
|
@@ -76,59 +70,60 @@ async function loadPlaywright() {
|
|
|
76
70
|
const loaderPath = process.env.PLAYDROP_PLAYWRIGHT_LOADER_PATH?.trim();
|
|
77
71
|
if (loaderPath) {
|
|
78
72
|
const loaderModule = await nativeImport((0, node_url_1.pathToFileURL)(loaderPath).href);
|
|
79
|
-
const candidate = loaderModule.loadPlaywright
|
|
80
|
-
|
|
81
|
-
?? loaderModule.default
|
|
82
|
-
?? loaderModule;
|
|
83
|
-
if (typeof candidate === 'function') {
|
|
73
|
+
const candidate = loaderModule.loadPlaywright ?? loaderModule.createPlaywrightModule ?? loaderModule.default ?? loaderModule;
|
|
74
|
+
if (typeof candidate === "function") {
|
|
84
75
|
return await candidate();
|
|
85
76
|
}
|
|
86
|
-
if (candidate && typeof candidate ===
|
|
77
|
+
if (candidate && typeof candidate === "object" && typeof candidate.chromium?.launch === "function") {
|
|
87
78
|
return candidate;
|
|
88
79
|
}
|
|
89
80
|
throw new Error(`Invalid Playwright loader module at ${loaderPath}.`);
|
|
90
81
|
}
|
|
91
|
-
return Promise.resolve().then(() => __importStar(require(
|
|
82
|
+
return Promise.resolve().then(() => __importStar(require("playwright-core")));
|
|
92
83
|
}
|
|
93
84
|
function createPlaywrightLaunchError(tool, error) {
|
|
94
|
-
const message = error && typeof error ===
|
|
85
|
+
const message = error && typeof error === "object" && "message" in error
|
|
86
|
+
? String(error.message)
|
|
87
|
+
: String(error);
|
|
95
88
|
if (/browserType\.launch/i.test(message) || /Chromium/i.test(message)) {
|
|
96
89
|
return new Error([
|
|
97
90
|
`[${tool}] Failed to launch Playwright Chromium.`,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
"",
|
|
92
|
+
"Required setup:",
|
|
93
|
+
" 1. npx playwright install chromium",
|
|
101
94
|
' 2. On macOS: xattr -dr com.apple.quarantine "$HOME/Library/Caches/ms-playwright"',
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
" 3. If the issue persists, rerun the command with elevated privileges or outside sandboxed contexts.",
|
|
96
|
+
"",
|
|
104
97
|
`Original error: ${message}`,
|
|
105
|
-
].join(
|
|
98
|
+
].join("\n"));
|
|
106
99
|
}
|
|
107
100
|
return error instanceof Error ? error : new Error(message);
|
|
108
101
|
}
|
|
109
102
|
function createInstalledChromeLaunchError(tool, error) {
|
|
110
|
-
const message = error && typeof error ===
|
|
103
|
+
const message = error && typeof error === "object" && "message" in error
|
|
104
|
+
? String(error.message)
|
|
105
|
+
: String(error);
|
|
111
106
|
return new Error([
|
|
112
107
|
`[${tool}] Failed to launch installed Google Chrome.`,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
"",
|
|
109
|
+
"Required setup:",
|
|
110
|
+
" 1. Install Google Chrome for this macOS user.",
|
|
111
|
+
" 2. Run from a logged-in GUI session with WindowServer access.",
|
|
112
|
+
" 3. If invoked over SSH, keep keychain unlock and the command in the same SSH session.",
|
|
113
|
+
"",
|
|
119
114
|
`Original error: ${message}`,
|
|
120
|
-
].join(
|
|
115
|
+
].join("\n"));
|
|
121
116
|
}
|
|
122
117
|
async function grantAutomationLocalNetworkAccess(context, origin) {
|
|
123
118
|
if (!origin?.trim()) {
|
|
124
119
|
return;
|
|
125
120
|
}
|
|
126
121
|
const grantPermissions = context.grantPermissions;
|
|
127
|
-
if (typeof grantPermissions !==
|
|
122
|
+
if (typeof grantPermissions !== "function") {
|
|
128
123
|
return;
|
|
129
124
|
}
|
|
130
125
|
try {
|
|
131
|
-
await grantPermissions.call(context, [
|
|
126
|
+
await grantPermissions.call(context, ["local-network-access"], { origin });
|
|
132
127
|
}
|
|
133
128
|
catch (error) {
|
|
134
129
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -214,7 +209,7 @@ async function withInstalledChromePage(callback, options = {}) {
|
|
|
214
209
|
}
|
|
215
210
|
async function launchPersistentChromiumContext(userDataDir, options = {}) {
|
|
216
211
|
const { chromium } = await loadPlaywright();
|
|
217
|
-
if (typeof chromium.launchPersistentContext !==
|
|
212
|
+
if (typeof chromium.launchPersistentContext !== "function") {
|
|
218
213
|
throw new Error(`[${TOOL_NAME}] Your Playwright Chromium build does not support persistent contexts.`);
|
|
219
214
|
}
|
|
220
215
|
try {
|
package/dist/proxyFetch.js
CHANGED
|
@@ -19,9 +19,9 @@ function resolveProxyAgent() {
|
|
|
19
19
|
return cachedProxyAgent;
|
|
20
20
|
}
|
|
21
21
|
const candidates = [
|
|
22
|
-
() => attemptRequire(
|
|
23
|
-
() => attemptRequire(
|
|
24
|
-
() => attemptRequire(
|
|
22
|
+
() => attemptRequire("undici")?.ProxyAgent ?? null,
|
|
23
|
+
() => attemptRequire("node:undici")?.ProxyAgent ?? null,
|
|
24
|
+
() => attemptRequire("internal/deps/undici/undici")?.ProxyAgent ?? null,
|
|
25
25
|
];
|
|
26
26
|
for (const load of candidates) {
|
|
27
27
|
const ctor = load();
|
|
@@ -36,7 +36,7 @@ function resolveProxyAgent() {
|
|
|
36
36
|
function firstDefined(keys) {
|
|
37
37
|
for (const key of keys) {
|
|
38
38
|
const value = process.env[key];
|
|
39
|
-
if (typeof value ===
|
|
39
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
40
40
|
return value.trim();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -44,25 +44,25 @@ function firstDefined(keys) {
|
|
|
44
44
|
}
|
|
45
45
|
function normalizeHost(value) {
|
|
46
46
|
let normalized = value.trim().toLowerCase();
|
|
47
|
-
if (normalized.startsWith(
|
|
47
|
+
if (normalized.startsWith("[") && normalized.endsWith("]")) {
|
|
48
48
|
normalized = normalized.slice(1, -1);
|
|
49
49
|
}
|
|
50
50
|
return normalized;
|
|
51
51
|
}
|
|
52
52
|
function splitHostPort(rule) {
|
|
53
|
-
if (rule.startsWith(
|
|
54
|
-
const closing = rule.indexOf(
|
|
53
|
+
if (rule.startsWith("[")) {
|
|
54
|
+
const closing = rule.indexOf("]");
|
|
55
55
|
if (closing !== -1) {
|
|
56
56
|
const host = rule.slice(1, closing);
|
|
57
57
|
const remainder = rule.slice(closing + 1);
|
|
58
|
-
if (remainder.startsWith(
|
|
58
|
+
if (remainder.startsWith(":")) {
|
|
59
59
|
return { host, port: remainder.slice(1) };
|
|
60
60
|
}
|
|
61
61
|
return { host };
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
const firstColon = rule.indexOf(
|
|
65
|
-
const lastColon = rule.lastIndexOf(
|
|
64
|
+
const firstColon = rule.indexOf(":");
|
|
65
|
+
const lastColon = rule.lastIndexOf(":");
|
|
66
66
|
if (firstColon !== -1 && firstColon === lastColon) {
|
|
67
67
|
return { host: rule.slice(0, firstColon), port: rule.slice(firstColon + 1) };
|
|
68
68
|
}
|
|
@@ -72,7 +72,7 @@ function matchesNoProxyRule(host, port, rule) {
|
|
|
72
72
|
if (!rule) {
|
|
73
73
|
return false;
|
|
74
74
|
}
|
|
75
|
-
if (rule ===
|
|
75
|
+
if (rule === "*") {
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
78
|
const { host: ruleHostRaw, port: rulePortRaw } = splitHostPort(rule);
|
|
@@ -91,41 +91,44 @@ function matchesNoProxyRule(host, port, rule) {
|
|
|
91
91
|
if (normalizedRuleHost === host) {
|
|
92
92
|
return true;
|
|
93
93
|
}
|
|
94
|
-
if (normalizedRuleHost.startsWith(
|
|
94
|
+
if (normalizedRuleHost.startsWith(".")) {
|
|
95
95
|
const suffix = normalizedRuleHost.slice(1);
|
|
96
96
|
return host === suffix || host.endsWith(`.${suffix}`);
|
|
97
97
|
}
|
|
98
|
-
if (normalizedRuleHost.startsWith(
|
|
99
|
-
const suffix = normalizedRuleHost.replace(/^\*+/,
|
|
98
|
+
if (normalizedRuleHost.startsWith("*")) {
|
|
99
|
+
const suffix = normalizedRuleHost.replace(/^\*+/, "");
|
|
100
100
|
if (!suffix) {
|
|
101
101
|
return true;
|
|
102
102
|
}
|
|
103
|
-
const normalizedSuffix = suffix.startsWith(
|
|
103
|
+
const normalizedSuffix = suffix.startsWith(".") ? suffix.slice(1) : suffix;
|
|
104
104
|
return host === normalizedSuffix || host.endsWith(`.${normalizedSuffix}`);
|
|
105
105
|
}
|
|
106
106
|
return host === normalizedRuleHost || host.endsWith(`.${normalizedRuleHost}`);
|
|
107
107
|
}
|
|
108
108
|
function isNoProxyMatch(target) {
|
|
109
|
-
const raw = firstDefined([
|
|
109
|
+
const raw = firstDefined(["NO_PROXY", "no_proxy"]);
|
|
110
110
|
if (!raw) {
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
113
|
const host = normalizeHost(target.hostname);
|
|
114
|
-
const port = target.port || (target.protocol ===
|
|
115
|
-
const rules = raw
|
|
114
|
+
const port = target.port || (target.protocol === "https:" ? "443" : target.protocol === "http:" ? "80" : "");
|
|
115
|
+
const rules = raw
|
|
116
|
+
.split(",")
|
|
117
|
+
.map((entry) => entry.trim().toLowerCase())
|
|
118
|
+
.filter(Boolean);
|
|
116
119
|
return rules.some((rule) => matchesNoProxyRule(host, port, rule));
|
|
117
120
|
}
|
|
118
121
|
function resolveProxyUrl(target) {
|
|
119
122
|
const protocol = target.protocol;
|
|
120
123
|
let proxy;
|
|
121
|
-
if (protocol ===
|
|
122
|
-
proxy = firstDefined([
|
|
124
|
+
if (protocol === "http:") {
|
|
125
|
+
proxy = firstDefined(["HTTP_PROXY", "http_proxy", "ALL_PROXY", "all_proxy"]);
|
|
123
126
|
}
|
|
124
|
-
else if (protocol ===
|
|
125
|
-
proxy = firstDefined([
|
|
127
|
+
else if (protocol === "https:") {
|
|
128
|
+
proxy = firstDefined(["HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy", "ALL_PROXY", "all_proxy"]);
|
|
126
129
|
}
|
|
127
130
|
else {
|
|
128
|
-
proxy = firstDefined([
|
|
131
|
+
proxy = firstDefined(["ALL_PROXY", "all_proxy"]);
|
|
129
132
|
}
|
|
130
133
|
if (!proxy) {
|
|
131
134
|
return null;
|
|
@@ -136,7 +139,7 @@ function resolveProxyUrl(target) {
|
|
|
136
139
|
return proxy;
|
|
137
140
|
}
|
|
138
141
|
function determineProxyForRequest(input) {
|
|
139
|
-
if (typeof input ===
|
|
142
|
+
if (typeof input === "string") {
|
|
140
143
|
if (!/^https?:/i.test(input)) {
|
|
141
144
|
return null;
|
|
142
145
|
}
|
|
@@ -151,7 +154,7 @@ function determineProxyForRequest(input) {
|
|
|
151
154
|
if (input instanceof URL) {
|
|
152
155
|
return resolveProxyUrl(input);
|
|
153
156
|
}
|
|
154
|
-
if (typeof Request !==
|
|
157
|
+
if (typeof Request !== "undefined" && input instanceof Request) {
|
|
155
158
|
try {
|
|
156
159
|
const absolute = new URL(input.url);
|
|
157
160
|
return resolveProxyUrl(absolute);
|
|
@@ -163,7 +166,7 @@ function determineProxyForRequest(input) {
|
|
|
163
166
|
return null;
|
|
164
167
|
}
|
|
165
168
|
function createProxyAwareFetch(fetchImpl, ProxyAgent) {
|
|
166
|
-
if (typeof fetchImpl !==
|
|
169
|
+
if (typeof fetchImpl !== "function") {
|
|
167
170
|
return fetchImpl;
|
|
168
171
|
}
|
|
169
172
|
const agentCache = new Map();
|
|
@@ -193,7 +196,7 @@ function installProxyFetch() {
|
|
|
193
196
|
return;
|
|
194
197
|
}
|
|
195
198
|
installed = true;
|
|
196
|
-
if (typeof globalThis.fetch !==
|
|
199
|
+
if (typeof globalThis.fetch !== "function") {
|
|
197
200
|
return;
|
|
198
201
|
}
|
|
199
202
|
const ProxyAgent = resolveProxyAgent();
|