@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
|
@@ -9,57 +9,57 @@ const node_os_1 = __importDefault(require("node:os"));
|
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const node_test_1 = __importDefault(require("node:test"));
|
|
11
11
|
const deployment_1 = require("../src/deployment");
|
|
12
|
-
(0, node_test_1.default)(
|
|
13
|
-
strict_1.default.equal((0, deployment_1.parseDeployRole)(
|
|
14
|
-
strict_1.default.equal((0, deployment_1.parseDeployRole)(
|
|
15
|
-
strict_1.default.equal((0, deployment_1.parseDeployRole)(
|
|
12
|
+
(0, node_test_1.default)("deploy role parsing stays strict", () => {
|
|
13
|
+
strict_1.default.equal((0, deployment_1.parseDeployRole)("prod"), "prod");
|
|
14
|
+
strict_1.default.equal((0, deployment_1.parseDeployRole)("preview"), "preview");
|
|
15
|
+
strict_1.default.equal((0, deployment_1.parseDeployRole)("blue"), null);
|
|
16
16
|
strict_1.default.equal((0, deployment_1.parseDeployRole)(undefined), null);
|
|
17
17
|
});
|
|
18
|
-
(0, node_test_1.default)(
|
|
19
|
-
strict_1.default.equal((0, deployment_1.parseDeploySlot)(
|
|
20
|
-
strict_1.default.equal((0, deployment_1.parseDeploySlot)(
|
|
21
|
-
strict_1.default.equal((0, deployment_1.parseDeploySlot)(
|
|
18
|
+
(0, node_test_1.default)("deploy slot parsing stays strict", () => {
|
|
19
|
+
strict_1.default.equal((0, deployment_1.parseDeploySlot)("blue"), "blue");
|
|
20
|
+
strict_1.default.equal((0, deployment_1.parseDeploySlot)("green"), "green");
|
|
21
|
+
strict_1.default.equal((0, deployment_1.parseDeploySlot)("prod"), null);
|
|
22
22
|
});
|
|
23
|
-
(0, node_test_1.default)(
|
|
24
|
-
const env = { NODE_ENV:
|
|
25
|
-
strict_1.default.equal((0, deployment_1.resolveDeployRole)(env),
|
|
26
|
-
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env),
|
|
27
|
-
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env),
|
|
28
|
-
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env),
|
|
29
|
-
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env),
|
|
30
|
-
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env),
|
|
31
|
-
strict_1.default.equal((0, deployment_1.resolveSeoIndexingMode)(env),
|
|
23
|
+
(0, node_test_1.default)("prod defaults resolve to public production origins", () => {
|
|
24
|
+
const env = { NODE_ENV: "production" };
|
|
25
|
+
strict_1.default.equal((0, deployment_1.resolveDeployRole)(env), "prod");
|
|
26
|
+
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env), "prod");
|
|
27
|
+
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env), "https://www.playdrop.ai");
|
|
28
|
+
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env), "https://api.playdrop.ai");
|
|
29
|
+
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env), "https://ai.playdrop.ai");
|
|
30
|
+
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env), "wss://play.playdrop.ai");
|
|
31
|
+
strict_1.default.equal((0, deployment_1.resolveSeoIndexingMode)(env), "public");
|
|
32
32
|
strict_1.default.equal((0, deployment_1.isBackgroundWorkEnabled)(env), true);
|
|
33
33
|
});
|
|
34
|
-
(0, node_test_1.default)(
|
|
34
|
+
(0, node_test_1.default)("preview defaults resolve to preview origins and noindex seo", () => {
|
|
35
35
|
const env = {
|
|
36
|
-
NODE_ENV:
|
|
37
|
-
PLAYDROP_DEPLOY_ROLE:
|
|
38
|
-
PLAYDROP_SLOT:
|
|
36
|
+
NODE_ENV: "production",
|
|
37
|
+
PLAYDROP_DEPLOY_ROLE: "preview",
|
|
38
|
+
PLAYDROP_SLOT: "green",
|
|
39
39
|
};
|
|
40
|
-
strict_1.default.equal((0, deployment_1.resolveDeployRole)(env),
|
|
41
|
-
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env),
|
|
42
|
-
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env),
|
|
43
|
-
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env),
|
|
44
|
-
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env),
|
|
45
|
-
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env),
|
|
46
|
-
strict_1.default.equal((0, deployment_1.resolveSeoIndexingMode)(env),
|
|
40
|
+
strict_1.default.equal((0, deployment_1.resolveDeployRole)(env), "preview");
|
|
41
|
+
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env), "preview");
|
|
42
|
+
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env), "https://preview.playdrop.ai");
|
|
43
|
+
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env), "https://api.preview.playdrop.ai");
|
|
44
|
+
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env), "https://ai.preview.playdrop.ai");
|
|
45
|
+
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env), "wss://play.preview.playdrop.ai");
|
|
46
|
+
strict_1.default.equal((0, deployment_1.resolveSeoIndexingMode)(env), "noindex");
|
|
47
47
|
strict_1.default.equal((0, deployment_1.isBackgroundWorkEnabled)(env), false);
|
|
48
48
|
});
|
|
49
|
-
(0, node_test_1.default)(
|
|
50
|
-
const tempDir = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(),
|
|
51
|
-
const slotStatePath = node_path_1.default.join(tempDir,
|
|
49
|
+
(0, node_test_1.default)("background work follows the runtime slot-state file when present", () => {
|
|
50
|
+
const tempDir = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(), "playdrop-slot-state-"));
|
|
51
|
+
const slotStatePath = node_path_1.default.join(tempDir, "slot-state.json");
|
|
52
52
|
try {
|
|
53
|
-
node_fs_1.default.writeFileSync(slotStatePath, JSON.stringify({ activeSlot:
|
|
53
|
+
node_fs_1.default.writeFileSync(slotStatePath, JSON.stringify({ activeSlot: "green" }));
|
|
54
54
|
const env = {
|
|
55
|
-
NODE_ENV:
|
|
56
|
-
PLAYDROP_DEPLOY_ROLE:
|
|
57
|
-
PLAYDROP_SLOT:
|
|
55
|
+
NODE_ENV: "production",
|
|
56
|
+
PLAYDROP_DEPLOY_ROLE: "prod",
|
|
57
|
+
PLAYDROP_SLOT: "green",
|
|
58
58
|
PLAYDROP_SLOT_STATE_PATH: slotStatePath,
|
|
59
59
|
};
|
|
60
60
|
strict_1.default.equal((0, deployment_1.isCurrentSlotActive)(env), true);
|
|
61
61
|
strict_1.default.equal((0, deployment_1.isBackgroundWorkEnabled)(env), true);
|
|
62
|
-
node_fs_1.default.writeFileSync(slotStatePath, JSON.stringify({ activeSlot:
|
|
62
|
+
node_fs_1.default.writeFileSync(slotStatePath, JSON.stringify({ activeSlot: "blue" }));
|
|
63
63
|
strict_1.default.equal((0, deployment_1.isCurrentSlotActive)(env), false);
|
|
64
64
|
strict_1.default.equal((0, deployment_1.isBackgroundWorkEnabled)(env), false);
|
|
65
65
|
}
|
|
@@ -67,32 +67,32 @@ const deployment_1 = require("../src/deployment");
|
|
|
67
67
|
node_fs_1.default.rmSync(tempDir, { recursive: true, force: true });
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
(0, node_test_1.default)(
|
|
70
|
+
(0, node_test_1.default)("explicit origin overrides win over derived defaults", () => {
|
|
71
71
|
const env = {
|
|
72
|
-
PLAYDROP_PUBLIC_ORIGIN:
|
|
73
|
-
PLAYDROP_API_BASE_URL:
|
|
74
|
-
PLAYDROP_AI_BASE_URL:
|
|
75
|
-
PLAYDROP_REALTIME_BASE_URL:
|
|
76
|
-
PLAYDROP_PUBLIC_SURFACE:
|
|
72
|
+
PLAYDROP_PUBLIC_ORIGIN: "https://blue.playdrop.ai/",
|
|
73
|
+
PLAYDROP_API_BASE_URL: "https://api.blue.playdrop.ai/",
|
|
74
|
+
PLAYDROP_AI_BASE_URL: "https://ai.blue.playdrop.ai/",
|
|
75
|
+
PLAYDROP_REALTIME_BASE_URL: "wss://play.blue.playdrop.ai/ws/",
|
|
76
|
+
PLAYDROP_PUBLIC_SURFACE: "blue",
|
|
77
77
|
};
|
|
78
|
-
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env),
|
|
79
|
-
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env),
|
|
80
|
-
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env),
|
|
81
|
-
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env),
|
|
82
|
-
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env),
|
|
78
|
+
strict_1.default.equal((0, deployment_1.resolvePublicSurface)(env), "blue");
|
|
79
|
+
strict_1.default.equal((0, deployment_1.resolveWebOrigin)(env), "https://blue.playdrop.ai");
|
|
80
|
+
strict_1.default.equal((0, deployment_1.resolveApiOrigin)(env), "https://api.blue.playdrop.ai");
|
|
81
|
+
strict_1.default.equal((0, deployment_1.resolveAiOrigin)(env), "https://ai.blue.playdrop.ai");
|
|
82
|
+
strict_1.default.equal((0, deployment_1.resolveRealtimeOrigin)(env), "wss://play.blue.playdrop.ai/ws");
|
|
83
83
|
});
|
|
84
|
-
(0, node_test_1.default)(
|
|
85
|
-
const fields = (0, deployment_1.resolveStructuredLogFields)(
|
|
86
|
-
NODE_ENV:
|
|
87
|
-
PLAYDROP_DEPLOY_ROLE:
|
|
88
|
-
PLAYDROP_SLOT:
|
|
89
|
-
PLAYDROP_PUBLIC_SURFACE:
|
|
84
|
+
(0, node_test_1.default)("structured log fields include phase 1 deploy metadata", () => {
|
|
85
|
+
const fields = (0, deployment_1.resolveStructuredLogFields)("api-server", {
|
|
86
|
+
NODE_ENV: "production",
|
|
87
|
+
PLAYDROP_DEPLOY_ROLE: "preview",
|
|
88
|
+
PLAYDROP_SLOT: "green",
|
|
89
|
+
PLAYDROP_PUBLIC_SURFACE: "preview",
|
|
90
90
|
});
|
|
91
|
-
strict_1.default.equal(fields.environment,
|
|
92
|
-
strict_1.default.equal(fields.slot,
|
|
93
|
-
strict_1.default.equal(fields.service,
|
|
94
|
-
strict_1.default.equal(fields.deploy_role,
|
|
95
|
-
strict_1.default.equal(fields.public_surface,
|
|
91
|
+
strict_1.default.equal(fields.environment, "production");
|
|
92
|
+
strict_1.default.equal(fields.slot, "green");
|
|
93
|
+
strict_1.default.equal(fields.service, "api-server");
|
|
94
|
+
strict_1.default.equal(fields.deploy_role, "preview");
|
|
95
|
+
strict_1.default.equal(fields.public_surface, "preview");
|
|
96
96
|
strict_1.default.match(fields.release_version, /^\d+\.\d+\.\d+$/);
|
|
97
|
-
strict_1.default.equal(typeof fields.build_number,
|
|
97
|
+
strict_1.default.equal(typeof fields.build_number, "number");
|
|
98
98
|
});
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
7
7
|
const node_test_1 = __importDefault(require("node:test"));
|
|
8
8
|
const fastify_1 = require("../src/server/fastify");
|
|
9
|
-
(0, node_test_1.default)(
|
|
10
|
-
const options = (0, fastify_1.buildFastifyServerOptions)({ service:
|
|
9
|
+
(0, node_test_1.default)("buildFastifyServerOptions allows long path params for encrypted auth tokens", () => {
|
|
10
|
+
const options = (0, fastify_1.buildFastifyServerOptions)({ service: "api-server" });
|
|
11
11
|
strict_1.default.equal(options.routerOptions?.maxParamLength, 2048);
|
|
12
12
|
});
|
|
13
|
-
(0, node_test_1.default)(
|
|
14
|
-
const options = (0, fastify_1.buildFastifyServerOptions)({ service:
|
|
13
|
+
(0, node_test_1.default)("buildFastifyServerOptions supports trusted proxy configuration", () => {
|
|
14
|
+
const options = (0, fastify_1.buildFastifyServerOptions)({ service: "api-server", trustProxy: true });
|
|
15
15
|
strict_1.default.equal(options.trustProxy, true);
|
|
16
16
|
});
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const node_test_1 = __importDefault(require("node:test"));
|
|
7
7
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
8
8
|
const game_arena_1 = require("../src/game-arena");
|
|
9
|
-
(0, node_test_1.default)(
|
|
10
|
-
strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.description,
|
|
11
|
-
strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)(undefined),
|
|
12
|
-
strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.revealLabel,
|
|
13
|
-
strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)(
|
|
14
|
-
strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse(
|
|
15
|
-
strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse(
|
|
16
|
-
strict_1.default.throws(() => (0, game_arena_1.resolveGameArenaRevealAt)(
|
|
9
|
+
(0, node_test_1.default)("Game Arena round one keeps the launch framing and configured reveal", () => {
|
|
10
|
+
strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.description, "Opus 5 vs Sol 5.6 · casual games");
|
|
11
|
+
strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)(undefined), "2026-08-16T17:00:00-04:00");
|
|
12
|
+
strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.revealLabel, "Sunday · 5:00 PM ET");
|
|
13
|
+
strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)("2026-08-13T17:00:00-04:00"), "2026-08-13T17:00:00-04:00");
|
|
14
|
+
strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse("2026-08-16T16:59:59-04:00")), false);
|
|
15
|
+
strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse("2026-08-16T17:00:00-04:00")), true);
|
|
16
|
+
strict_1.default.throws(() => (0, game_arena_1.resolveGameArenaRevealAt)("not-a-date"), /invalid_game_arena_reveal_at/);
|
|
17
17
|
});
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
7
7
|
const node_test_1 = __importDefault(require("node:test"));
|
|
8
8
|
const logging_1 = require("../src/server/logging");
|
|
9
|
-
(0, node_test_1.default)(
|
|
10
|
-
strict_1.default.equal((0, logging_1.resolveStructuredLogFilePath)(
|
|
9
|
+
(0, node_test_1.default)("structured log file path is disabled without an explicit directory", () => {
|
|
10
|
+
strict_1.default.equal((0, logging_1.resolveStructuredLogFilePath)("api-server", {}), null);
|
|
11
11
|
});
|
|
12
|
-
(0, node_test_1.default)(
|
|
13
|
-
const filePath = (0, logging_1.resolveStructuredLogFilePath)(
|
|
14
|
-
PLAYDROP_STRUCTURED_LOG_DIR:
|
|
12
|
+
(0, node_test_1.default)("structured log file path resolves to a per-service jsonl file", () => {
|
|
13
|
+
const filePath = (0, logging_1.resolveStructuredLogFilePath)("api-server", {
|
|
14
|
+
PLAYDROP_STRUCTURED_LOG_DIR: "/var/log/playdrop",
|
|
15
15
|
});
|
|
16
|
-
strict_1.default.equal(filePath,
|
|
16
|
+
strict_1.default.equal(filePath, "/var/log/playdrop/api-server.jsonl");
|
|
17
17
|
});
|
|
@@ -8,24 +8,24 @@ const strict_1 = __importDefault(require("node:assert/strict"));
|
|
|
8
8
|
const index_1 = require("../src/index");
|
|
9
9
|
function runtime(overrides = {}) {
|
|
10
10
|
return {
|
|
11
|
-
client:
|
|
12
|
-
clientVersion:
|
|
11
|
+
client: "web",
|
|
12
|
+
clientVersion: "1.0.0",
|
|
13
13
|
clientBuild: 3,
|
|
14
|
-
platform:
|
|
15
|
-
platformVersion:
|
|
14
|
+
platform: "macos",
|
|
15
|
+
platformVersion: "14.0",
|
|
16
16
|
...overrides,
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
(0, node_test_1.default)(
|
|
20
|
-
const info = runtime({ clientVersion:
|
|
19
|
+
(0, node_test_1.default)("accepts newer client version even if build is below minimum for previous release", () => {
|
|
20
|
+
const info = runtime({ clientVersion: "1.0.1", clientBuild: 1 });
|
|
21
21
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
22
22
|
strict_1.default.equal(result.ok, true);
|
|
23
23
|
});
|
|
24
|
-
(0, node_test_1.default)(
|
|
24
|
+
(0, node_test_1.default)("enforces minimum build when version matches requirement", () => {
|
|
25
25
|
const meta = (0, index_1.loadClientMeta)();
|
|
26
|
-
const requiredVersion = meta.clients[
|
|
27
|
-
const requiredBuild = meta.clients[
|
|
28
|
-
if (typeof requiredBuild !==
|
|
26
|
+
const requiredVersion = meta.clients["all"]?.minimumVersion ?? meta.version;
|
|
27
|
+
const requiredBuild = meta.clients["all"]?.minimumBuild;
|
|
28
|
+
if (typeof requiredBuild !== "number") {
|
|
29
29
|
strict_1.default.equal(true, true);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -33,124 +33,124 @@ function runtime(overrides = {}) {
|
|
|
33
33
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
34
34
|
strict_1.default.equal(result.ok, false);
|
|
35
35
|
if (!result.ok) {
|
|
36
|
-
strict_1.default.equal(result.code,
|
|
36
|
+
strict_1.default.equal(result.code, "unsupported_client_build");
|
|
37
37
|
strict_1.default.equal(result.requiredBuild, requiredBuild);
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
(0, node_test_1.default)(
|
|
41
|
-
const info = runtime({ clientVersion:
|
|
40
|
+
(0, node_test_1.default)("enforces minimum version before build check", () => {
|
|
41
|
+
const info = runtime({ clientVersion: "0.0.9", clientBuild: 99 });
|
|
42
42
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
43
43
|
strict_1.default.equal(result.ok, false);
|
|
44
44
|
if (!result.ok) {
|
|
45
|
-
strict_1.default.equal(result.code,
|
|
45
|
+
strict_1.default.equal(result.code, "unsupported_client_version");
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
(0, node_test_1.default)(
|
|
49
|
-
const info = runtime({ platform:
|
|
48
|
+
(0, node_test_1.default)("accepts supported clients without platform-specific floors", () => {
|
|
49
|
+
const info = runtime({ platform: "ios", platformVersion: "15.5", client: "apple-playdrop-ios" });
|
|
50
50
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
51
51
|
strict_1.default.equal(result.ok, true);
|
|
52
52
|
});
|
|
53
|
-
(0, node_test_1.default)(
|
|
53
|
+
(0, node_test_1.default)("accepts product-specific Apple client ids that meet the minimum version", () => {
|
|
54
54
|
const meta = (0, index_1.loadClientMeta)();
|
|
55
|
-
for (const clientName of [
|
|
56
|
-
const requiredVersion = meta.clients[
|
|
57
|
-
const requiredBuild = meta.clients[
|
|
55
|
+
for (const clientName of ["apple-playdrop-ios", "apple-playdrop-mac", "apple-games", "apple-music"]) {
|
|
56
|
+
const requiredVersion = meta.clients["all"]?.minimumVersion ?? meta.version;
|
|
57
|
+
const requiredBuild = meta.clients["all"]?.minimumBuild ?? meta.build;
|
|
58
58
|
const info = runtime({
|
|
59
59
|
client: clientName,
|
|
60
60
|
clientVersion: requiredVersion,
|
|
61
61
|
clientBuild: requiredBuild,
|
|
62
|
-
platform:
|
|
63
|
-
platformVersion:
|
|
62
|
+
platform: "ios",
|
|
63
|
+
platformVersion: "18.0",
|
|
64
64
|
});
|
|
65
65
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
66
66
|
strict_1.default.equal(result.ok, true, clientName);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
(0, node_test_1.default)(
|
|
69
|
+
(0, node_test_1.default)("accepts android-games as a first-class client identity", () => {
|
|
70
70
|
const meta = (0, index_1.loadClientMeta)();
|
|
71
|
-
const requiredVersion = meta.clients[
|
|
72
|
-
const requiredBuild = meta.clients[
|
|
71
|
+
const requiredVersion = meta.clients["all"]?.minimumVersion ?? meta.version;
|
|
72
|
+
const requiredBuild = meta.clients["all"]?.minimumBuild ?? meta.build;
|
|
73
73
|
const info = runtime({
|
|
74
|
-
client:
|
|
74
|
+
client: "android-games",
|
|
75
75
|
clientVersion: requiredVersion,
|
|
76
76
|
clientBuild: requiredBuild,
|
|
77
|
-
platform:
|
|
78
|
-
platformVersion:
|
|
77
|
+
platform: "android",
|
|
78
|
+
platformVersion: "16",
|
|
79
79
|
});
|
|
80
80
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
81
81
|
strict_1.default.equal(result.ok, true);
|
|
82
82
|
});
|
|
83
|
-
(0, node_test_1.default)(
|
|
83
|
+
(0, node_test_1.default)("accepts windows-playdrop as a first-class Windows client identity", () => {
|
|
84
84
|
const meta = (0, index_1.loadClientMeta)();
|
|
85
|
-
const windowsRule = meta.clients[
|
|
86
|
-
strict_1.default.ok(windowsRule,
|
|
85
|
+
const windowsRule = meta.clients["windows-playdrop"];
|
|
86
|
+
strict_1.default.ok(windowsRule, "windows-playdrop metadata must be explicit");
|
|
87
87
|
const requiredVersion = windowsRule.minimumVersion ?? meta.version;
|
|
88
88
|
const requiredBuild = windowsRule.minimumBuild ?? meta.build;
|
|
89
89
|
const info = runtime({
|
|
90
|
-
client:
|
|
90
|
+
client: "windows-playdrop",
|
|
91
91
|
clientVersion: requiredVersion,
|
|
92
92
|
clientBuild: requiredBuild,
|
|
93
|
-
platform:
|
|
94
|
-
platformVersion:
|
|
93
|
+
platform: "windows",
|
|
94
|
+
platformVersion: "10.0.22631",
|
|
95
95
|
});
|
|
96
96
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
97
97
|
strict_1.default.equal(result.ok, true);
|
|
98
98
|
});
|
|
99
|
-
(0, node_test_1.default)(
|
|
99
|
+
(0, node_test_1.default)("enforces the windows-playdrop alpha build floor", () => {
|
|
100
100
|
const meta = (0, index_1.loadClientMeta)();
|
|
101
|
-
const windowsRule = meta.clients[
|
|
102
|
-
strict_1.default.ok(windowsRule?.minimumVersion,
|
|
101
|
+
const windowsRule = meta.clients["windows-playdrop"];
|
|
102
|
+
strict_1.default.ok(windowsRule?.minimumVersion, "windows-playdrop requires an explicit minimum version");
|
|
103
103
|
const requiredBuild = windowsRule.minimumBuild;
|
|
104
|
-
if (typeof requiredBuild !==
|
|
105
|
-
strict_1.default.fail(
|
|
104
|
+
if (typeof requiredBuild !== "number") {
|
|
105
|
+
strict_1.default.fail("windows-playdrop requires an explicit minimum build");
|
|
106
106
|
}
|
|
107
107
|
const info = runtime({
|
|
108
|
-
client:
|
|
108
|
+
client: "windows-playdrop",
|
|
109
109
|
clientVersion: windowsRule.minimumVersion,
|
|
110
110
|
clientBuild: Math.max(requiredBuild - 1, 0),
|
|
111
|
-
platform:
|
|
112
|
-
platformVersion:
|
|
111
|
+
platform: "windows",
|
|
112
|
+
platformVersion: "10.0.22631",
|
|
113
113
|
});
|
|
114
114
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
115
115
|
strict_1.default.equal(result.ok, false);
|
|
116
116
|
if (!result.ok) {
|
|
117
|
-
strict_1.default.equal(result.code,
|
|
117
|
+
strict_1.default.equal(result.code, "unsupported_client_build");
|
|
118
118
|
strict_1.default.equal(result.requiredVersion, windowsRule.minimumVersion);
|
|
119
119
|
strict_1.default.equal(result.requiredBuild, requiredBuild);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
(0, node_test_1.default)(
|
|
122
|
+
(0, node_test_1.default)("keeps accepting the legacy Apple client id during rollout", () => {
|
|
123
123
|
const meta = (0, index_1.loadClientMeta)();
|
|
124
|
-
const requiredVersion = meta.clients[
|
|
125
|
-
const requiredBuild = meta.clients[
|
|
124
|
+
const requiredVersion = meta.clients["all"]?.minimumVersion ?? meta.version;
|
|
125
|
+
const requiredBuild = meta.clients["all"]?.minimumBuild ?? meta.build;
|
|
126
126
|
const info = runtime({
|
|
127
|
-
client:
|
|
127
|
+
client: "apple",
|
|
128
128
|
clientVersion: requiredVersion,
|
|
129
129
|
clientBuild: requiredBuild,
|
|
130
|
-
platform:
|
|
131
|
-
platformVersion:
|
|
130
|
+
platform: "ios",
|
|
131
|
+
platformVersion: "18.0",
|
|
132
132
|
});
|
|
133
133
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
134
134
|
strict_1.default.equal(result.ok, true);
|
|
135
135
|
});
|
|
136
|
-
(0, node_test_1.default)(
|
|
136
|
+
(0, node_test_1.default)("does not require a build floor for newer cli versions once the version is supported", () => {
|
|
137
137
|
const meta = (0, index_1.loadClientMeta)();
|
|
138
|
-
const requiredVersion = meta.clients[
|
|
138
|
+
const requiredVersion = meta.clients["all"]?.minimumVersion ?? meta.version;
|
|
139
139
|
const info = runtime({
|
|
140
|
-
client:
|
|
140
|
+
client: "cli",
|
|
141
141
|
clientVersion: requiredVersion,
|
|
142
142
|
clientBuild: 0,
|
|
143
|
-
platform:
|
|
144
|
-
platformVersion:
|
|
143
|
+
platform: "macos",
|
|
144
|
+
platformVersion: "14.0",
|
|
145
145
|
});
|
|
146
146
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
147
147
|
strict_1.default.equal(result.ok, true);
|
|
148
148
|
});
|
|
149
|
-
(0, node_test_1.default)(
|
|
150
|
-
const info = runtime({ clientVersion:
|
|
149
|
+
(0, node_test_1.default)("returns failure when metadata is incomplete", () => {
|
|
150
|
+
const info = runtime({ clientVersion: "", platformVersion: "" });
|
|
151
151
|
const result = (0, index_1.validateClientEnvironment)(info);
|
|
152
152
|
strict_1.default.equal(result.ok, false);
|
|
153
153
|
if (!result.ok) {
|
|
154
|
-
strict_1.default.equal(result.code,
|
|
154
|
+
strict_1.default.equal(result.code, "missing_client_metadata");
|
|
155
155
|
}
|
|
156
156
|
});
|