@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
package/dist/commands/review.js
CHANGED
|
@@ -14,51 +14,51 @@ const node_fs_1 = require("node:fs");
|
|
|
14
14
|
const sharp_1 = __importDefault(require("sharp"));
|
|
15
15
|
const output_1 = require("../output");
|
|
16
16
|
exports.REVIEW_CRITERIA = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
"Gameplay / Core Loop",
|
|
18
|
+
"Depth / Replayability",
|
|
19
|
+
"Controls / Input",
|
|
20
|
+
"UX / Usability",
|
|
21
|
+
"First Time User Experience",
|
|
22
|
+
"Visuals / Art Direction",
|
|
23
|
+
"Store Listing & Metadata Accuracy",
|
|
24
|
+
"Safety / Age Rating / Compliance",
|
|
25
|
+
"Performance / Stability",
|
|
26
26
|
];
|
|
27
27
|
const STATE_OUTCOME = {
|
|
28
|
-
EXCELLENT:
|
|
29
|
-
FAILED:
|
|
30
|
-
GOOD:
|
|
31
|
-
LOW_QUALITY:
|
|
32
|
-
PASSED:
|
|
28
|
+
EXCELLENT: "Excellent",
|
|
29
|
+
FAILED: "Blocked",
|
|
30
|
+
GOOD: "Good",
|
|
31
|
+
LOW_QUALITY: "Limited",
|
|
32
|
+
PASSED: "Passed",
|
|
33
33
|
};
|
|
34
34
|
const REVIEW_STATE_ALIASES = {
|
|
35
|
-
BLOCKED:
|
|
36
|
-
EXCELLENT:
|
|
37
|
-
FAILED:
|
|
38
|
-
GOOD:
|
|
39
|
-
LIMITED:
|
|
40
|
-
LOW_QUALITY:
|
|
41
|
-
PASSED:
|
|
35
|
+
BLOCKED: "FAILED",
|
|
36
|
+
EXCELLENT: "EXCELLENT",
|
|
37
|
+
FAILED: "FAILED",
|
|
38
|
+
GOOD: "GOOD",
|
|
39
|
+
LIMITED: "LOW_QUALITY",
|
|
40
|
+
LOW_QUALITY: "LOW_QUALITY",
|
|
41
|
+
PASSED: "PASSED",
|
|
42
42
|
};
|
|
43
43
|
function normalizeTerminalReviewState(value) {
|
|
44
|
-
const input = typeof value ===
|
|
44
|
+
const input = typeof value === "string" ? value.trim() : "";
|
|
45
45
|
const state = REVIEW_STATE_ALIASES[input.toUpperCase()];
|
|
46
46
|
if (!state) {
|
|
47
|
-
throw new Error(`invalid_review_state:${input ||
|
|
47
|
+
throw new Error(`invalid_review_state:${input || "missing"}:expected=Blocked|Limited|Passed|Good|Excellent`);
|
|
48
48
|
}
|
|
49
49
|
return state;
|
|
50
50
|
}
|
|
51
51
|
exports.REQUIRED_REVIEW_EVIDENCE_FILES = [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
"first-frame.png",
|
|
53
|
+
"core.png",
|
|
54
|
+
"win.png",
|
|
55
|
+
"loss.png",
|
|
56
|
+
"composite.png",
|
|
57
|
+
"rating-card.png",
|
|
58
58
|
];
|
|
59
59
|
const REVIEW_EVIDENCE_MAX_BYTES = 10 * 1024 * 1024;
|
|
60
60
|
function resolveFilePath(filePath, code) {
|
|
61
|
-
const normalized = typeof filePath ===
|
|
61
|
+
const normalized = typeof filePath === "string" ? filePath.trim() : "";
|
|
62
62
|
if (!normalized) {
|
|
63
63
|
throw new Error(code);
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ function resolveFilePath(filePath, code) {
|
|
|
66
66
|
}
|
|
67
67
|
async function readRequiredTextFile(filePath, code) {
|
|
68
68
|
const resolved = resolveFilePath(filePath, code);
|
|
69
|
-
const content = await node_fs_1.promises.readFile(resolved,
|
|
69
|
+
const content = await node_fs_1.promises.readFile(resolved, "utf8");
|
|
70
70
|
if (!content.trim()) {
|
|
71
71
|
throw new Error(code);
|
|
72
72
|
}
|
|
@@ -80,17 +80,13 @@ function requireLine(text, prefix) {
|
|
|
80
80
|
return line.slice(prefix.length).trim();
|
|
81
81
|
}
|
|
82
82
|
function normalizeReviewText(...values) {
|
|
83
|
-
return values
|
|
84
|
-
.join(' ')
|
|
85
|
-
.toLowerCase()
|
|
86
|
-
.replace(/\s+/g, ' ')
|
|
87
|
-
.trim();
|
|
83
|
+
return values.join(" ").toLowerCase().replace(/\s+/g, " ").trim();
|
|
88
84
|
}
|
|
89
85
|
function parseScores(reviewMessage) {
|
|
90
86
|
const scores = {};
|
|
91
87
|
for (const criterion of exports.REVIEW_CRITERIA) {
|
|
92
|
-
const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g,
|
|
93
|
-
const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`,
|
|
88
|
+
const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
89
|
+
const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, "m");
|
|
94
90
|
const match = reviewMessage.match(regex);
|
|
95
91
|
if (!match) {
|
|
96
92
|
throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
|
|
@@ -109,58 +105,77 @@ function minimumScore(scores) {
|
|
|
109
105
|
function validateOutcomeAgainstScores(outcome, scores) {
|
|
110
106
|
const average = averageScore(scores);
|
|
111
107
|
const minimum = minimumScore(scores);
|
|
112
|
-
const gameplay = scores[
|
|
113
|
-
const controls = scores[
|
|
114
|
-
const ux = scores[
|
|
115
|
-
const ftue = scores[
|
|
116
|
-
const visuals = scores[
|
|
117
|
-
const performance = scores[
|
|
108
|
+
const gameplay = scores["Gameplay / Core Loop"];
|
|
109
|
+
const controls = scores["Controls / Input"];
|
|
110
|
+
const ux = scores["UX / Usability"];
|
|
111
|
+
const ftue = scores["First Time User Experience"];
|
|
112
|
+
const visuals = scores["Visuals / Art Direction"];
|
|
113
|
+
const performance = scores["Performance / Stability"];
|
|
118
114
|
const actual = `actual=average=${average.toFixed(2)},minimum=${minimum},gameplay=${gameplay},controls=${controls},ux=${ux},ftue=${ftue},visuals=${visuals},performance=${performance}`;
|
|
119
|
-
if (outcome ===
|
|
115
|
+
if (outcome === "Excellent" &&
|
|
116
|
+
(average < 8.5 ||
|
|
117
|
+
minimum < 7 ||
|
|
118
|
+
gameplay < 8 ||
|
|
119
|
+
controls < 8 ||
|
|
120
|
+
ux < 8 ||
|
|
121
|
+
ftue < 7 ||
|
|
122
|
+
visuals < 8 ||
|
|
123
|
+
performance < 8)) {
|
|
120
124
|
throw new Error(`excellent_outcome_not_supported_by_scores:requires=average>=8.5,minimum>=7,gameplay>=8,controls>=8,ux>=8,ftue>=7,visuals>=8,performance>=8:${actual}:use_good_or_lower_outcome_unless_scores_are_supported_by_evidence`);
|
|
121
125
|
}
|
|
122
|
-
if (outcome ===
|
|
126
|
+
if (outcome === "Good" &&
|
|
127
|
+
(average < 7.5 ||
|
|
128
|
+
minimum < 6 ||
|
|
129
|
+
gameplay < 7 ||
|
|
130
|
+
controls < 7 ||
|
|
131
|
+
ux < 7 ||
|
|
132
|
+
ftue < 6 ||
|
|
133
|
+
visuals < 7 ||
|
|
134
|
+
performance < 7)) {
|
|
123
135
|
throw new Error(`good_outcome_not_supported_by_scores:requires=average>=7.5,minimum>=6,gameplay>=7,controls>=7,ux>=7,ftue>=6,visuals>=7,performance>=7:${actual}:use_passed_or_lower_outcome_unless_scores_are_supported_by_evidence`);
|
|
124
136
|
}
|
|
125
|
-
if (outcome ===
|
|
137
|
+
if (outcome === "Passed" && (average < 6 || minimum < 4 || gameplay < 5 || controls < 5 || performance < 5)) {
|
|
126
138
|
throw new Error(`passed_outcome_not_supported_by_scores:requires=average>=6,minimum>=4,gameplay>=5,controls>=5,performance>=5:${actual}:use_low_quality_or_failed_unless_scores_are_supported_by_evidence`);
|
|
127
139
|
}
|
|
128
140
|
}
|
|
129
141
|
function validateRequiredEvidenceLines(reviewMessage) {
|
|
130
|
-
const primaryVerb = requireLine(reviewMessage,
|
|
131
|
-
const primaryEvidence = requireLine(reviewMessage,
|
|
132
|
-
const challengeEvidence = requireLine(reviewMessage,
|
|
133
|
-
const punchline = requireLine(reviewMessage,
|
|
134
|
-
const benchmark = requireLine(reviewMessage,
|
|
142
|
+
const primaryVerb = requireLine(reviewMessage, "Primary player verb: ");
|
|
143
|
+
const primaryEvidence = requireLine(reviewMessage, "Primary interaction evidence: ");
|
|
144
|
+
const challengeEvidence = requireLine(reviewMessage, "Challenge evidence: ");
|
|
145
|
+
const punchline = requireLine(reviewMessage, "Punchline assessment: ");
|
|
146
|
+
const benchmark = requireLine(reviewMessage, "Comparable benchmark: ");
|
|
135
147
|
if (primaryVerb.length < 3) {
|
|
136
|
-
throw new Error(
|
|
148
|
+
throw new Error("primary_player_verb_too_vague");
|
|
137
149
|
}
|
|
138
150
|
if (primaryEvidence.length < 20) {
|
|
139
|
-
throw new Error(
|
|
151
|
+
throw new Error("primary_interaction_evidence_too_vague");
|
|
140
152
|
}
|
|
141
153
|
if (challengeEvidence.length < 20) {
|
|
142
|
-
throw new Error(
|
|
154
|
+
throw new Error("challenge_evidence_too_vague");
|
|
143
155
|
}
|
|
144
156
|
if (punchline.length < 8 || punchline.length > 160) {
|
|
145
157
|
throw new Error(`punchline_assessment_invalid_length: Punchline assessment length=${punchline.length}; expected 8..160 characters.`);
|
|
146
158
|
}
|
|
147
159
|
if (benchmark.length < 8) {
|
|
148
|
-
throw new Error(
|
|
160
|
+
throw new Error("comparable_benchmark_too_vague");
|
|
149
161
|
}
|
|
150
162
|
}
|
|
151
163
|
function isNoScoreCaps(scoreCapsApplied) {
|
|
152
|
-
return scoreCapsApplied.trim().toLowerCase() ===
|
|
164
|
+
return scoreCapsApplied.trim().toLowerCase() === "none";
|
|
153
165
|
}
|
|
154
166
|
function validateCapConsistency(input) {
|
|
155
167
|
const normalizedText = normalizeReviewText(input.reviewMessage, input.creatorFeedback);
|
|
156
168
|
const describesZeroChallenge = /\bzero challenge\b|\bno (?:real |meaningful )?challenge\b(?!-)|\bchallenge (?:is )?(?:absent|missing|nonexistent)\b/.test(normalizedText);
|
|
157
169
|
const describesPrimaryMissing = /\bprimary (?:interaction|verb) (?:is )?(?:absent|missing|unavailable)\b/.test(normalizedText);
|
|
158
170
|
if (isNoScoreCaps(input.scoreCapsApplied) && (describesZeroChallenge || describesPrimaryMissing)) {
|
|
159
|
-
const trigger = describesZeroChallenge ?
|
|
171
|
+
const trigger = describesZeroChallenge ? "zero_or_missing_challenge" : "primary_interaction_missing";
|
|
160
172
|
throw new Error(`missing_required_score_cap:${trigger}:score_caps_applied_must_name_the_triggered_cap_or_adjust_the_evidence_wording`);
|
|
161
173
|
}
|
|
162
|
-
if (describesZeroChallenge &&
|
|
163
|
-
|
|
174
|
+
if (describesZeroChallenge &&
|
|
175
|
+
(["Passed", "Good", "Excellent"].includes(input.outcome) ||
|
|
176
|
+
input.scores["Gameplay / Core Loop"] > 3 ||
|
|
177
|
+
input.scores["Depth / Replayability"] > 3)) {
|
|
178
|
+
throw new Error("gameplay_challenge_absent_score_cap_required");
|
|
164
179
|
}
|
|
165
180
|
}
|
|
166
181
|
async function assertPngFile(filePath) {
|
|
@@ -178,28 +193,28 @@ async function assertPngFile(filePath) {
|
|
|
178
193
|
async function validateGameReviewResult(input) {
|
|
179
194
|
const normalizedState = normalizeTerminalReviewState(input.reviewState);
|
|
180
195
|
if (!input.reviewMessage.trim()) {
|
|
181
|
-
throw new Error(
|
|
196
|
+
throw new Error("missing_review_message");
|
|
182
197
|
}
|
|
183
|
-
const creatorFeedback = input.creatorFeedback ??
|
|
198
|
+
const creatorFeedback = input.creatorFeedback ?? "";
|
|
184
199
|
if (!creatorFeedback.trim()) {
|
|
185
|
-
throw new Error(
|
|
200
|
+
throw new Error("missing_creator_feedback");
|
|
186
201
|
}
|
|
187
202
|
if (!input.evidenceDir.trim()) {
|
|
188
|
-
throw new Error(
|
|
203
|
+
throw new Error("missing_evidence_dir");
|
|
189
204
|
}
|
|
190
205
|
const expectedOutcome = STATE_OUTCOME[normalizedState];
|
|
191
|
-
const actualOutcome = requireLine(input.reviewMessage,
|
|
206
|
+
const actualOutcome = requireLine(input.reviewMessage, "Outcome: ");
|
|
192
207
|
if (actualOutcome !== expectedOutcome) {
|
|
193
208
|
throw new Error(`review_outcome_state_mismatch:${actualOutcome}:${normalizedState}`);
|
|
194
209
|
}
|
|
195
|
-
const primarySurface = requireLine(input.reviewMessage,
|
|
196
|
-
if (![
|
|
210
|
+
const primarySurface = requireLine(input.reviewMessage, "Primary reviewed surface: ");
|
|
211
|
+
if (!["MOBILE_PORTRAIT", "MOBILE_LANDSCAPE", "DESKTOP"].includes(primarySurface)) {
|
|
197
212
|
throw new Error(`invalid_primary_reviewed_surface:${primarySurface}`);
|
|
198
213
|
}
|
|
199
214
|
validateRequiredEvidenceLines(input.reviewMessage);
|
|
200
|
-
const scoreCapsApplied = requireLine(input.reviewMessage,
|
|
215
|
+
const scoreCapsApplied = requireLine(input.reviewMessage, "Score caps applied: ");
|
|
201
216
|
if (!creatorFeedback.includes(`Reviewed surface: ${primarySurface}`)) {
|
|
202
|
-
throw new Error(
|
|
217
|
+
throw new Error("creator_feedback_missing_reviewed_surface");
|
|
203
218
|
}
|
|
204
219
|
const scores = parseScores(input.reviewMessage);
|
|
205
220
|
validateOutcomeAgainstScores(actualOutcome, scores);
|
|
@@ -210,7 +225,7 @@ async function validateGameReviewResult(input) {
|
|
|
210
225
|
scoreCapsApplied,
|
|
211
226
|
scores,
|
|
212
227
|
});
|
|
213
|
-
const evidenceDir = resolveFilePath(input.evidenceDir,
|
|
228
|
+
const evidenceDir = resolveFilePath(input.evidenceDir, "missing_evidence_dir");
|
|
214
229
|
for (const filename of exports.REQUIRED_REVIEW_EVIDENCE_FILES) {
|
|
215
230
|
await assertPngFile(node_path_1.default.join(evidenceDir, filename));
|
|
216
231
|
}
|
|
@@ -225,37 +240,39 @@ async function validateGameReviewResult(input) {
|
|
|
225
240
|
}
|
|
226
241
|
async function validateReviewResultCommand(options) {
|
|
227
242
|
const result = await validateGameReviewResult({
|
|
228
|
-
creatorFeedback: options.creatorFeedbackFile
|
|
243
|
+
creatorFeedback: options.creatorFeedbackFile
|
|
244
|
+
? await readRequiredTextFile(options.creatorFeedbackFile, "invalid_creator_feedback_file")
|
|
245
|
+
: "",
|
|
229
246
|
evidenceDir: options.evidenceDir,
|
|
230
|
-
reviewMessage: await readRequiredTextFile(options.messageFile,
|
|
247
|
+
reviewMessage: await readRequiredTextFile(options.messageFile, "invalid_review_message_file"),
|
|
231
248
|
reviewState: options.state,
|
|
232
249
|
});
|
|
233
250
|
console.log(JSON.stringify(result, null, 2));
|
|
234
251
|
}
|
|
235
252
|
async function resizeForComposite(filePath) {
|
|
236
|
-
const image = (0, sharp_1.default)(resolveFilePath(filePath,
|
|
253
|
+
const image = (0, sharp_1.default)(resolveFilePath(filePath, "invalid_review_evidence_file"));
|
|
237
254
|
const metadata = await image.metadata();
|
|
238
255
|
if (!metadata.width || !metadata.height) {
|
|
239
|
-
throw new Error(
|
|
256
|
+
throw new Error("invalid_review_evidence_image");
|
|
240
257
|
}
|
|
241
258
|
const buffer = await image
|
|
242
|
-
.resize({ width: 540, height: 960, fit:
|
|
259
|
+
.resize({ width: 540, height: 960, fit: "inside", withoutEnlargement: true })
|
|
243
260
|
.png()
|
|
244
261
|
.toBuffer();
|
|
245
262
|
const resizedMetadata = await (0, sharp_1.default)(buffer).metadata();
|
|
246
263
|
if (!resizedMetadata.width || !resizedMetadata.height) {
|
|
247
|
-
throw new Error(
|
|
264
|
+
throw new Error("invalid_review_evidence_image");
|
|
248
265
|
}
|
|
249
266
|
return { buffer, width: resizedMetadata.width, height: resizedMetadata.height };
|
|
250
267
|
}
|
|
251
268
|
async function composeReviewEvidence(options) {
|
|
252
269
|
const entries = [
|
|
253
|
-
options.core ? { label:
|
|
254
|
-
options.win ? { label:
|
|
255
|
-
options.loss ? { label:
|
|
270
|
+
options.core ? { label: "core", path: options.core } : null,
|
|
271
|
+
options.win ? { label: "win", path: options.win } : null,
|
|
272
|
+
options.loss ? { label: "loss", path: options.loss } : null,
|
|
256
273
|
].filter((entry) => Boolean(entry));
|
|
257
274
|
if (entries.length === 0) {
|
|
258
|
-
throw new Error(
|
|
275
|
+
throw new Error("missing_review_evidence_images");
|
|
259
276
|
}
|
|
260
277
|
const images = await Promise.all(entries.map((entry) => resizeForComposite(entry.path)));
|
|
261
278
|
const padding = 16;
|
|
@@ -267,7 +284,7 @@ async function composeReviewEvidence(options) {
|
|
|
267
284
|
left += image.width + padding;
|
|
268
285
|
return composite;
|
|
269
286
|
});
|
|
270
|
-
const outputPath = resolveFilePath(options.out,
|
|
287
|
+
const outputPath = resolveFilePath(options.out, "missing_out");
|
|
271
288
|
await node_fs_1.promises.mkdir(node_path_1.default.dirname(outputPath), { recursive: true });
|
|
272
289
|
await (0, sharp_1.default)({
|
|
273
290
|
create: {
|
|
@@ -284,15 +301,11 @@ async function composeReviewEvidence(options) {
|
|
|
284
301
|
return { outputPath, imageCount: images.length };
|
|
285
302
|
}
|
|
286
303
|
function escapeXml(value) {
|
|
287
|
-
return value
|
|
288
|
-
.replace(/&/g, '&')
|
|
289
|
-
.replace(/</g, '<')
|
|
290
|
-
.replace(/>/g, '>')
|
|
291
|
-
.replace(/"/g, '"');
|
|
304
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
292
305
|
}
|
|
293
306
|
function parseCriterionRating(reviewMessage, criterion) {
|
|
294
|
-
const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g,
|
|
295
|
-
const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`,
|
|
307
|
+
const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
308
|
+
const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, "m");
|
|
296
309
|
const match = reviewMessage.match(regex);
|
|
297
310
|
if (!match) {
|
|
298
311
|
throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
|
|
@@ -301,33 +314,33 @@ function parseCriterionRating(reviewMessage, criterion) {
|
|
|
301
314
|
}
|
|
302
315
|
function ratingColor(score) {
|
|
303
316
|
if (score <= 1)
|
|
304
|
-
return
|
|
317
|
+
return "#ff3b30";
|
|
305
318
|
if (score <= 4)
|
|
306
|
-
return
|
|
319
|
+
return "#ff9500";
|
|
307
320
|
if (score <= 6)
|
|
308
|
-
return
|
|
321
|
+
return "#ffd60a";
|
|
309
322
|
if (score <= 9)
|
|
310
|
-
return
|
|
311
|
-
return
|
|
323
|
+
return "#34c759";
|
|
324
|
+
return "#bf5af2";
|
|
312
325
|
}
|
|
313
326
|
function outcomeColor(outcome) {
|
|
314
|
-
if (outcome ===
|
|
315
|
-
return
|
|
316
|
-
if (outcome ===
|
|
317
|
-
return
|
|
318
|
-
if (outcome ===
|
|
319
|
-
return
|
|
320
|
-
if (outcome ===
|
|
321
|
-
return
|
|
322
|
-
if (outcome ===
|
|
323
|
-
return
|
|
324
|
-
return
|
|
327
|
+
if (outcome === "Blocked")
|
|
328
|
+
return "#ff3b30";
|
|
329
|
+
if (outcome === "Limited")
|
|
330
|
+
return "#ff9500";
|
|
331
|
+
if (outcome === "Passed")
|
|
332
|
+
return "#ffd60a";
|
|
333
|
+
if (outcome === "Good")
|
|
334
|
+
return "#34c759";
|
|
335
|
+
if (outcome === "Excellent")
|
|
336
|
+
return "#bf5af2";
|
|
337
|
+
return "#ff9500";
|
|
325
338
|
}
|
|
326
339
|
async function createReviewRatingCard(options) {
|
|
327
|
-
const reviewMessage = await readRequiredTextFile(options.reviewMessageFile,
|
|
328
|
-
const outcome = requireLine(reviewMessage,
|
|
329
|
-
const punchline = (options.punchline?.trim() || requireLine(reviewMessage,
|
|
330
|
-
const title = (options.title?.trim() ||
|
|
340
|
+
const reviewMessage = await readRequiredTextFile(options.reviewMessageFile, "invalid_review_message_file");
|
|
341
|
+
const outcome = requireLine(reviewMessage, "Outcome: ");
|
|
342
|
+
const punchline = (options.punchline?.trim() || requireLine(reviewMessage, "Punchline assessment: ")).slice(0, 160);
|
|
343
|
+
const title = (options.title?.trim() || "Game review ratings").slice(0, 80);
|
|
331
344
|
const rows = exports.REVIEW_CRITERIA.map((criterion, index) => {
|
|
332
345
|
const score = parseCriterionRating(reviewMessage, criterion);
|
|
333
346
|
const x = index < 5 ? 56 : 628;
|
|
@@ -338,7 +351,7 @@ async function createReviewRatingCard(options) {
|
|
|
338
351
|
<text x="${x + 24}" y="${y + 42}" fill="#f5f5f7" font-size="22" font-weight="700">${escapeXml(criterion)}</text>
|
|
339
352
|
<text x="${x + 448}" y="${y + 44}" fill="${ratingColor(score)}" font-size="32" font-weight="800" text-anchor="end">${score}/10</text>
|
|
340
353
|
`;
|
|
341
|
-
}).join(
|
|
354
|
+
}).join("");
|
|
342
355
|
const svg = `
|
|
343
356
|
<svg width="1200" height="760" xmlns="http://www.w3.org/2000/svg">
|
|
344
357
|
<rect width="1200" height="760" fill="#000"/>
|
|
@@ -350,7 +363,7 @@ async function createReviewRatingCard(options) {
|
|
|
350
363
|
<text x="600" y="708" fill="${outcomeColor(outcome)}" font-size="32" font-weight="800" text-anchor="middle">${escapeXml(punchline)}</text>
|
|
351
364
|
</svg>
|
|
352
365
|
`;
|
|
353
|
-
const outputPath = resolveFilePath(options.out,
|
|
366
|
+
const outputPath = resolveFilePath(options.out, "missing_out");
|
|
354
367
|
await node_fs_1.promises.mkdir(node_path_1.default.dirname(outputPath), { recursive: true });
|
|
355
368
|
await (0, sharp_1.default)(Buffer.from(svg)).png().toFile(outputPath);
|
|
356
369
|
(0, output_1.printSuccess)(`Review rating card written to ${outputPath}`);
|