@playdrop/playdrop-cli 0.16.16 → 0.17.0
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/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +1 -2
- package/dist/apiClient.js +1 -16
- package/dist/appUrls.js +4 -0
- package/dist/apps/build.d.ts +12 -4
- package/dist/apps/build.js +55 -22
- package/dist/apps/index.d.ts +2 -1
- package/dist/apps/index.js +4 -1
- package/dist/apps/loadCheck.d.ts +5 -1
- package/dist/apps/loadCheck.js +52 -18
- package/dist/apps/serverBuild.d.ts +17 -0
- package/dist/apps/serverBuild.js +155 -0
- package/dist/apps/staticHtml.d.ts +1 -0
- package/dist/apps/staticHtml.js +19 -10
- package/dist/apps/upload.d.ts +12 -2
- package/dist/apps/upload.js +127 -46
- package/dist/catalogue.d.ts +23 -1
- package/dist/catalogue.js +126 -100
- package/dist/commandContext.d.ts +6 -3
- package/dist/commandContext.js +108 -18
- package/dist/commands/build.js +0 -7
- package/dist/commands/captureListing.d.ts +3 -0
- package/dist/commands/captureListing.js +48 -4
- package/dist/commands/chat.d.ts +4 -0
- package/dist/commands/chat.js +133 -8
- package/dist/commands/check.js +34 -1
- package/dist/commands/create.js +30 -263
- package/dist/commands/dev.js +37 -3
- package/dist/commands/devBrowser.js +2 -2
- package/dist/commands/devGameServer.d.ts +16 -0
- package/dist/commands/devGameServer.js +237 -0
- package/dist/commands/devRuntimeAssets.d.ts +1 -0
- package/dist/commands/devRuntimeAssets.js +2 -0
- package/dist/commands/devServer.d.ts +3 -0
- package/dist/commands/devServer.js +111 -5
- package/dist/commands/generation.d.ts +33 -4
- package/dist/commands/generation.js +304 -115
- package/dist/commands/login.js +23 -7
- package/dist/commands/review.d.ts +1 -1
- package/dist/commands/review.js +68 -95
- package/dist/commands/source.d.ts +19 -0
- package/dist/commands/source.js +142 -0
- package/dist/commands/tweaks.js +5 -11
- package/dist/commands/upload-content.d.ts +1 -1
- package/dist/commands/upload-content.js +16 -12
- package/dist/commands/upload.d.ts +17 -1
- package/dist/commands/upload.js +47 -10
- package/dist/commands/worker/archive-staging.d.ts +1 -0
- package/dist/commands/worker/archive-staging.js +13 -2
- package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
- package/dist/commands/worker/e2e-fixtures.js +466 -0
- package/dist/commands/worker/game-server-infra.d.ts +80 -0
- package/dist/commands/worker/game-server-infra.js +595 -0
- package/dist/commands/worker/game-source-git.d.ts +126 -0
- package/dist/commands/worker/game-source-git.js +780 -0
- package/dist/commands/worker/generation.d.ts +94 -0
- package/dist/commands/worker/generation.js +1458 -0
- package/dist/commands/worker/runtime.d.ts +8 -10
- package/dist/commands/worker/runtime.js +51 -45
- package/dist/commands/worker.d.ts +79 -19
- package/dist/commands/worker.js +1796 -419
- package/dist/config.d.ts +2 -0
- package/dist/config.js +16 -3
- package/dist/environment.d.ts +0 -1
- package/dist/environment.js +0 -8
- package/dist/index.js +92 -13
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +15 -2
- package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +33 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
- 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 +338 -41
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +217 -56
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
- package/node_modules/@playdrop/api-client/package.json +7 -0
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
- package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
- package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@playdrop/game-source-git/package.json +28 -0
- 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/agent-task-terminal.js +15 -9
- package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +60 -11
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
- package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.js +26 -26
- package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
- package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.js +33 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
- package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/index.js +7 -1
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
- package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
- package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
- package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +111 -0
- package/node_modules/@playdrop/types/package.json +14 -0
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/node_modules/@playdrop/vox-three/package.json +8 -4
- package/package.json +9 -11
- package/dist/assets/model-artifacts.d.ts +0 -8
- package/dist/assets/model-artifacts.js +0 -382
- package/dist/assets/model-worker.d.ts +0 -22
- package/dist/assets/model-worker.js +0 -123
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
- package/node_modules/@playdrop/ai-client/package.json +0 -22
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
- package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
- package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/package.json +0 -19
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/package.json +0 -28
|
@@ -36,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.resolveCaptureSurfaces = resolveCaptureSurfaces;
|
|
39
40
|
exports.resolveListingCaptureRouteSegment = resolveListingCaptureRouteSegment;
|
|
40
41
|
exports.resolveCaptureListingDevRouterPort = resolveCaptureListingDevRouterPort;
|
|
41
42
|
exports.resolveListingCaptureLocalDevPort = resolveListingCaptureLocalDevPort;
|
|
@@ -111,6 +112,28 @@ const SURFACE_OUTPUT_SLUG = {
|
|
|
111
112
|
MOBILE_LANDSCAPE: "mobile-landscape",
|
|
112
113
|
MOBILE_PORTRAIT: "mobile-portrait",
|
|
113
114
|
};
|
|
115
|
+
const CAPTURE_SURFACE_BY_INPUT = {
|
|
116
|
+
desktop: "DESKTOP",
|
|
117
|
+
"mobile-landscape": "MOBILE_LANDSCAPE",
|
|
118
|
+
"mobile-portrait": "MOBILE_PORTRAIT",
|
|
119
|
+
};
|
|
120
|
+
function parseCaptureSurface(value) {
|
|
121
|
+
const normalized = value?.trim().toLowerCase().replace(/_/g, "-") ?? "";
|
|
122
|
+
if (!normalized)
|
|
123
|
+
return null;
|
|
124
|
+
const surface = CAPTURE_SURFACE_BY_INPUT[normalized];
|
|
125
|
+
if (!surface)
|
|
126
|
+
throw new Error("surface_invalid");
|
|
127
|
+
return surface;
|
|
128
|
+
}
|
|
129
|
+
function resolveCaptureSurfaces(declared, selected) {
|
|
130
|
+
if (!selected)
|
|
131
|
+
return [...declared];
|
|
132
|
+
if (!declared.includes(selected)) {
|
|
133
|
+
throw new Error(`surface_not_declared:${selected}`);
|
|
134
|
+
}
|
|
135
|
+
return [selected];
|
|
136
|
+
}
|
|
114
137
|
function resolveListingCaptureRouteSegment(previewable) {
|
|
115
138
|
if (!previewable) {
|
|
116
139
|
throw new Error("listing_preview_support_missing");
|
|
@@ -169,6 +192,10 @@ function parseCaptureListingOptions(targetArg, options = {}) {
|
|
|
169
192
|
maximum: MAX_DIMENSION,
|
|
170
193
|
integer: true,
|
|
171
194
|
});
|
|
195
|
+
if (width % 2 !== 0)
|
|
196
|
+
throw new Error("width_must_be_even");
|
|
197
|
+
if (height % 2 !== 0)
|
|
198
|
+
throw new Error("height_must_be_even");
|
|
172
199
|
const fps = parsePositiveNumber(options.fps, DEFAULT_FPS, "fps", {
|
|
173
200
|
minimum: 1,
|
|
174
201
|
maximum: MAX_FPS,
|
|
@@ -183,6 +210,7 @@ function parseCaptureListingOptions(targetArg, options = {}) {
|
|
|
183
210
|
return {
|
|
184
211
|
targetArg,
|
|
185
212
|
appName: options.app?.trim() || undefined,
|
|
213
|
+
surface: parseCaptureSurface(options.surface),
|
|
186
214
|
durationSeconds,
|
|
187
215
|
width,
|
|
188
216
|
height,
|
|
@@ -322,6 +350,10 @@ async function launchListingBrowser(initialViewport, automationOrigin, contextOp
|
|
|
322
350
|
const context = await browser.newContext(contextOptions);
|
|
323
351
|
await grantListingBrowserLocalNetworkAccess(context, automationOrigin);
|
|
324
352
|
const page = await context.newPage();
|
|
353
|
+
const cdpSession = await context.newCDPSession(page);
|
|
354
|
+
await cdpSession.send("Emulation.setSafeAreaInsetsOverride", {
|
|
355
|
+
insets: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
356
|
+
});
|
|
325
357
|
return {
|
|
326
358
|
browser,
|
|
327
359
|
context,
|
|
@@ -898,7 +930,7 @@ function formatCommandError(error) {
|
|
|
898
930
|
suggestions: [],
|
|
899
931
|
};
|
|
900
932
|
}
|
|
901
|
-
async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop, width, height, fps, posterAtSeconds, deadlineAt) {
|
|
933
|
+
async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop, width, height, fps, durationSeconds, posterAtSeconds, deadlineAt) {
|
|
902
934
|
const filter = `crop=${crop.width}:${crop.height}:${crop.x}:${crop.y},scale=${width}:${height}:flags=lanczos,fps=${fps}`;
|
|
903
935
|
runTool("ffmpeg", [
|
|
904
936
|
"-y",
|
|
@@ -912,6 +944,8 @@ async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop
|
|
|
912
944
|
"yuv420p",
|
|
913
945
|
"-c:a",
|
|
914
946
|
"aac",
|
|
947
|
+
"-t",
|
|
948
|
+
String(durationSeconds),
|
|
915
949
|
finalVideoPath,
|
|
916
950
|
], "ffmpeg_failed", deadlineAt);
|
|
917
951
|
runTool("ffmpeg", ["-y", "-ss", String(posterAtSeconds), "-i", finalVideoPath, "-frames:v", "1", posterPath], "ffmpeg_failed", deadlineAt);
|
|
@@ -1081,6 +1115,16 @@ async function captureListing(targetArg, options = {}) {
|
|
|
1081
1115
|
if (!resolvedTarget) {
|
|
1082
1116
|
return;
|
|
1083
1117
|
}
|
|
1118
|
+
let requestedSurfaces;
|
|
1119
|
+
try {
|
|
1120
|
+
requestedSurfaces = resolveCaptureSurfaces(resolvedTarget.surfaceTargets.list, parsedOptions.surface);
|
|
1121
|
+
}
|
|
1122
|
+
catch (error) {
|
|
1123
|
+
const detail = formatCommandError(error instanceof Error ? error : new Error(String(error)));
|
|
1124
|
+
(0, messages_1.printErrorWithHelp)(detail.message, detail.suggestions, { command: "project capture" });
|
|
1125
|
+
process.exitCode = 1;
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1084
1128
|
let appName = resolvedTarget.appName;
|
|
1085
1129
|
let appTypeSlug = (0, appUrls_1.getAppTypeSlug)(null);
|
|
1086
1130
|
let declaresPreviewSupport = false;
|
|
@@ -1213,7 +1257,7 @@ async function captureListing(targetArg, options = {}) {
|
|
|
1213
1257
|
outputPaths,
|
|
1214
1258
|
parsedOptions,
|
|
1215
1259
|
runtimeBundleHash,
|
|
1216
|
-
surfaces:
|
|
1260
|
+
surfaces: requestedSurfaces,
|
|
1217
1261
|
deadlineAt: captureDeadlineAt,
|
|
1218
1262
|
});
|
|
1219
1263
|
if (reused) {
|
|
@@ -1321,7 +1365,7 @@ async function captureListing(targetArg, options = {}) {
|
|
|
1321
1365
|
const reportFrameUrl = (0, appUrls_1.redactTaskCaptureSession)(frameUrl);
|
|
1322
1366
|
console.log(`[listing] Opening ${reportFrameUrl}`);
|
|
1323
1367
|
const shouldExportPreviewAudio = parsedOptions.audio && routeSegment === "dev-preview";
|
|
1324
|
-
const surfaces =
|
|
1368
|
+
const surfaces = requestedSurfaces;
|
|
1325
1369
|
const useSurfacePrefix = surfaces.length > 1;
|
|
1326
1370
|
const captures = [];
|
|
1327
1371
|
const artifactHashes = {};
|
|
@@ -1379,7 +1423,7 @@ async function captureListing(targetArg, options = {}) {
|
|
|
1379
1423
|
const rawAudioTrackCount = countAudioStreams(rawProbe);
|
|
1380
1424
|
const crop = computeRecordedCrop(measurement, recorderMetadata, rawVideoStream.width, rawVideoStream.height);
|
|
1381
1425
|
console.log(`[listing] Cropping raw capture to gameplay at ${crop.width}x${crop.height}+${crop.x}+${crop.y}.`);
|
|
1382
|
-
await encodeListingVideo(surfaceOutputPaths.rawVideoPath, surfaceOutputPaths.finalVideoPath, surfaceOutputPaths.posterPath, crop, dimensions.width, dimensions.height, parsedOptions.fps, parsedOptions.posterAtSeconds, captureDeadlineAt);
|
|
1426
|
+
await encodeListingVideo(surfaceOutputPaths.rawVideoPath, surfaceOutputPaths.finalVideoPath, surfaceOutputPaths.posterPath, crop, dimensions.width, dimensions.height, parsedOptions.fps, parsedOptions.durationSeconds, parsedOptions.posterAtSeconds, captureDeadlineAt);
|
|
1383
1427
|
if (exportedAudioPath) {
|
|
1384
1428
|
await muxListingAudio(surfaceOutputPaths.finalVideoPath, exportedAudioPath, captureDeadlineAt);
|
|
1385
1429
|
}
|
package/dist/commands/chat.d.ts
CHANGED
|
@@ -9,12 +9,16 @@ export type ChatWriteCommandOptions = ChatCommonOptions & {
|
|
|
9
9
|
eventType?: string;
|
|
10
10
|
eventDataFile?: string;
|
|
11
11
|
asSystem?: boolean;
|
|
12
|
+
attachment?: string[];
|
|
12
13
|
};
|
|
13
14
|
export declare function listChatChannels(options?: ChatCommonOptions): Promise<void>;
|
|
14
15
|
export declare function readChatChannel(channel: string, options?: ChatCommonOptions): Promise<void>;
|
|
15
16
|
export declare function readChatThread(rawMessageId: string, options?: ChatCommonOptions): Promise<void>;
|
|
17
|
+
export declare function listChatInbox(options?: ChatCommonOptions): Promise<void>;
|
|
18
|
+
export declare function readChatConversation(rawConversationId: string, options?: ChatCommonOptions): Promise<void>;
|
|
16
19
|
export declare function sendChatMessage(channel: string, options: ChatWriteCommandOptions): Promise<void>;
|
|
17
20
|
export declare function replyChatMessage(rawMessageId: string, options: ChatWriteCommandOptions): Promise<void>;
|
|
21
|
+
export declare function sendChatDirectMessage(username: string, options: ChatWriteCommandOptions): Promise<void>;
|
|
18
22
|
export declare function editChatMessage(rawMessageId: string, options: ChatWriteCommandOptions): Promise<void>;
|
|
19
23
|
export declare function reactChatMessage(rawMessageId: string, emoji: string, options?: ChatCommonOptions): Promise<void>;
|
|
20
24
|
export declare function unreactChatMessage(rawMessageId: string, emoji: string, options?: ChatCommonOptions): Promise<void>;
|
package/dist/commands/chat.js
CHANGED
|
@@ -6,18 +6,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.listChatChannels = listChatChannels;
|
|
7
7
|
exports.readChatChannel = readChatChannel;
|
|
8
8
|
exports.readChatThread = readChatThread;
|
|
9
|
+
exports.listChatInbox = listChatInbox;
|
|
10
|
+
exports.readChatConversation = readChatConversation;
|
|
9
11
|
exports.sendChatMessage = sendChatMessage;
|
|
10
12
|
exports.replyChatMessage = replyChatMessage;
|
|
13
|
+
exports.sendChatDirectMessage = sendChatDirectMessage;
|
|
11
14
|
exports.editChatMessage = editChatMessage;
|
|
12
15
|
exports.reactChatMessage = reactChatMessage;
|
|
13
16
|
exports.unreactChatMessage = unreactChatMessage;
|
|
14
17
|
const node_crypto_1 = require("node:crypto");
|
|
15
18
|
const node_fs_1 = require("node:fs");
|
|
16
19
|
const node_path_1 = __importDefault(require("node:path"));
|
|
20
|
+
const types_1 = require("@playdrop/types");
|
|
17
21
|
const commandContext_1 = require("../commandContext");
|
|
18
22
|
const errors_1 = require("../errors");
|
|
19
23
|
const messages_1 = require("../messages");
|
|
20
24
|
const output_1 = require("../output");
|
|
25
|
+
const CHAT_ATTACHMENT_MAX_COUNT = 10;
|
|
26
|
+
const CHAT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION = {
|
|
27
|
+
".gif": "image/gif",
|
|
28
|
+
".jpg": "image/jpeg",
|
|
29
|
+
".jpeg": "image/jpeg",
|
|
30
|
+
".png": "image/png",
|
|
31
|
+
".webp": "image/webp",
|
|
32
|
+
".mp4": "video/mp4",
|
|
33
|
+
".mov": "video/quicktime",
|
|
34
|
+
".webm": "video/webm",
|
|
35
|
+
".txt": "text/plain",
|
|
36
|
+
".md": "text/markdown",
|
|
37
|
+
".markdown": "text/markdown",
|
|
38
|
+
".json": "application/json",
|
|
39
|
+
};
|
|
21
40
|
function positiveId(raw, command) {
|
|
22
41
|
try {
|
|
23
42
|
if (BigInt(raw) > 0n)
|
|
@@ -47,6 +66,42 @@ async function readWriteOptions(options) {
|
|
|
47
66
|
...(options.asSystem !== undefined ? { asSystem: options.asSystem } : {}),
|
|
48
67
|
};
|
|
49
68
|
}
|
|
69
|
+
async function uploadAttachmentFiles(client, conversationId, attachmentPaths = []) {
|
|
70
|
+
if (attachmentPaths.length > CHAT_ATTACHMENT_MAX_COUNT)
|
|
71
|
+
throw new Error("chat_attachment_limit_exceeded");
|
|
72
|
+
const files = await Promise.all(attachmentPaths.map(async (inputPath) => {
|
|
73
|
+
const filePath = node_path_1.default.resolve(inputPath);
|
|
74
|
+
const contentType = CHAT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION[node_path_1.default.extname(filePath).toLowerCase()];
|
|
75
|
+
if (!contentType)
|
|
76
|
+
throw new Error(`chat_invalid_attachment_content_type:${inputPath}`);
|
|
77
|
+
const stats = await node_fs_1.promises.stat(filePath);
|
|
78
|
+
if (!stats.isFile())
|
|
79
|
+
throw new Error(`chat_attachment_not_file:${inputPath}`);
|
|
80
|
+
if (stats.size <= 0 || stats.size > (0, types_1.maxMessageAttachmentBytes)(contentType)) {
|
|
81
|
+
throw new Error(`chat_invalid_attachment_size:${inputPath}`);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
fileName: node_path_1.default.basename(filePath),
|
|
85
|
+
contentType,
|
|
86
|
+
sizeBytes: stats.size,
|
|
87
|
+
bytes: await node_fs_1.promises.readFile(filePath),
|
|
88
|
+
};
|
|
89
|
+
}));
|
|
90
|
+
const createdSessionIds = [];
|
|
91
|
+
const results = await Promise.allSettled(files.map(async (file) => {
|
|
92
|
+
const session = await client.createChatAttachmentUploadSession(conversationId, file);
|
|
93
|
+
createdSessionIds.push(session.id);
|
|
94
|
+
await client.uploadChatAttachment(session, new Blob([new Uint8Array(file.bytes)], { type: file.contentType }));
|
|
95
|
+
await client.completeChatAttachmentUploadSession(session.id);
|
|
96
|
+
return session.id;
|
|
97
|
+
}));
|
|
98
|
+
const failed = results.find((result) => result.status === "rejected");
|
|
99
|
+
if (failed) {
|
|
100
|
+
await Promise.allSettled(createdSessionIds.map((id) => client.abortChatAttachmentUploadSession(id)));
|
|
101
|
+
throw failed.reason;
|
|
102
|
+
}
|
|
103
|
+
return results.map((result) => result.value);
|
|
104
|
+
}
|
|
50
105
|
function printMessage(message, indent = "") {
|
|
51
106
|
const edited = message.editedAt ? " edited" : "";
|
|
52
107
|
const author = message.author
|
|
@@ -108,9 +163,43 @@ async function readChatThread(rawMessageId, options = {}) {
|
|
|
108
163
|
response.messages.forEach((message) => printMessage(message, " "));
|
|
109
164
|
});
|
|
110
165
|
}
|
|
166
|
+
async function listChatInbox(options = {}) {
|
|
167
|
+
await runChatCommand("chat inbox", options, async (client) => {
|
|
168
|
+
const response = await client.fetchChatConversations({ limit: 100 });
|
|
169
|
+
if (options.json)
|
|
170
|
+
return (0, output_1.printJson)(response);
|
|
171
|
+
if (response.conversations.length === 0)
|
|
172
|
+
return console.log("Chat inbox is empty.");
|
|
173
|
+
for (const conversation of response.conversations) {
|
|
174
|
+
const label = conversation.channel?.displayName ?? conversation.peer?.displayName ?? "Conversation";
|
|
175
|
+
console.log(`${conversation.id}\t${label}\t${conversation.type}\t${conversation.unreadCount > 0 ? `${conversation.unreadCount} unread` : "read"}`);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
async function readChatConversation(rawConversationId, options = {}) {
|
|
180
|
+
const conversationId = positiveId(rawConversationId, "chat conversation");
|
|
181
|
+
if (!conversationId)
|
|
182
|
+
return;
|
|
183
|
+
await runChatCommand("chat conversation", options, async (client) => {
|
|
184
|
+
const [conversation, messages] = await Promise.all([
|
|
185
|
+
client.fetchChatConversation(conversationId),
|
|
186
|
+
client.fetchConversationMessages(conversationId, { limit: 100 }),
|
|
187
|
+
]);
|
|
188
|
+
if (options.json)
|
|
189
|
+
return (0, output_1.printJson)({ ...conversation, ...messages });
|
|
190
|
+
const label = conversation.conversation.channel?.displayName ?? conversation.conversation.peer?.displayName ?? conversationId;
|
|
191
|
+
console.log(`${label} (#${conversationId})`);
|
|
192
|
+
if (messages.messages.length === 0)
|
|
193
|
+
return console.log("No messages.");
|
|
194
|
+
messages.messages.forEach((message) => printMessage(message));
|
|
195
|
+
});
|
|
196
|
+
}
|
|
111
197
|
async function sendChatMessage(channel, options) {
|
|
112
198
|
await runChatCommand("chat send", options, async (client) => {
|
|
113
199
|
const write = await readWriteOptions(options);
|
|
200
|
+
if (write.asSystem && (options.attachment?.length ?? 0) > 0) {
|
|
201
|
+
throw new Error("chat_system_attachments_not_supported");
|
|
202
|
+
}
|
|
114
203
|
const response = write.asSystem
|
|
115
204
|
? await client.sendSystemChatMessage(channel, {
|
|
116
205
|
body: write.body,
|
|
@@ -118,10 +207,17 @@ async function sendChatMessage(channel, options) {
|
|
|
118
207
|
eventType: write.eventType,
|
|
119
208
|
eventData: write.eventData,
|
|
120
209
|
})
|
|
121
|
-
: await
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
210
|
+
: await (async () => {
|
|
211
|
+
const channelRecord = (await client.fetchChatChannels()).channels.find((candidate) => candidate.slug === channel);
|
|
212
|
+
if (!channelRecord)
|
|
213
|
+
throw new Error("chat_channel_not_found");
|
|
214
|
+
const attachmentUploadIds = await uploadAttachmentFiles(client, channelRecord.id, options.attachment);
|
|
215
|
+
return await client.sendConversationMessage(channelRecord.id, {
|
|
216
|
+
clientMessageId: write.clientMessageId,
|
|
217
|
+
body: write.body,
|
|
218
|
+
...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
|
|
219
|
+
});
|
|
220
|
+
})();
|
|
125
221
|
if (options.json)
|
|
126
222
|
return (0, output_1.printJson)(response);
|
|
127
223
|
(0, output_1.printSuccess)(`Message #${response.message.id} sent to ${channel}.`);
|
|
@@ -133,6 +229,9 @@ async function replyChatMessage(rawMessageId, options) {
|
|
|
133
229
|
return;
|
|
134
230
|
await runChatCommand("chat reply", options, async (client) => {
|
|
135
231
|
const write = await readWriteOptions(options);
|
|
232
|
+
if (write.asSystem && (options.attachment?.length ?? 0) > 0) {
|
|
233
|
+
throw new Error("chat_system_attachments_not_supported");
|
|
234
|
+
}
|
|
136
235
|
const response = write.asSystem
|
|
137
236
|
? await client.replySystemChatMessage(messageId, {
|
|
138
237
|
body: write.body,
|
|
@@ -140,15 +239,41 @@ async function replyChatMessage(rawMessageId, options) {
|
|
|
140
239
|
eventType: write.eventType,
|
|
141
240
|
eventData: write.eventData,
|
|
142
241
|
})
|
|
143
|
-
: await
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
242
|
+
: await (async () => {
|
|
243
|
+
const context = await client.fetchChatThread(messageId, { limit: 1 });
|
|
244
|
+
if (!context.conversationId)
|
|
245
|
+
throw new Error("chat_message_context_missing");
|
|
246
|
+
const attachmentUploadIds = await uploadAttachmentFiles(client, context.conversationId, options.attachment);
|
|
247
|
+
return await client.sendConversationMessage(context.conversationId, {
|
|
248
|
+
clientMessageId: write.clientMessageId,
|
|
249
|
+
body: write.body,
|
|
250
|
+
...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
|
|
251
|
+
replyToMessageId: messageId,
|
|
252
|
+
...(context.threadingAvailable ? { threadRootMessageId: messageId } : {}),
|
|
253
|
+
});
|
|
254
|
+
})();
|
|
147
255
|
if (options.json)
|
|
148
256
|
return (0, output_1.printJson)(response);
|
|
149
257
|
(0, output_1.printSuccess)(`Reply #${response.message.id} sent.`);
|
|
150
258
|
});
|
|
151
259
|
}
|
|
260
|
+
async function sendChatDirectMessage(username, options) {
|
|
261
|
+
await runChatCommand("chat dm", options, async (client) => {
|
|
262
|
+
if (options.asSystem)
|
|
263
|
+
throw new Error("chat_dm_system_not_supported");
|
|
264
|
+
const write = await readWriteOptions(options);
|
|
265
|
+
const direct = await client.createDirectChatConversation(username.trim().toLowerCase());
|
|
266
|
+
const attachmentUploadIds = await uploadAttachmentFiles(client, direct.conversation.id, options.attachment);
|
|
267
|
+
const response = await client.sendConversationMessage(direct.conversation.id, {
|
|
268
|
+
clientMessageId: write.clientMessageId,
|
|
269
|
+
body: write.body,
|
|
270
|
+
...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
|
|
271
|
+
});
|
|
272
|
+
if (options.json)
|
|
273
|
+
return (0, output_1.printJson)(response);
|
|
274
|
+
(0, output_1.printSuccess)(`Direct message #${response.message.id} sent to ${username}.`);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
152
277
|
async function editChatMessage(rawMessageId, options) {
|
|
153
278
|
const messageId = positiveId(rawMessageId, "chat edit");
|
|
154
279
|
if (!messageId)
|
package/dist/commands/check.js
CHANGED
|
@@ -13,6 +13,7 @@ const messages_1 = require("../messages");
|
|
|
13
13
|
const loadCheck_1 = require("../apps/loadCheck");
|
|
14
14
|
const devShared_1 = require("./devShared");
|
|
15
15
|
const taskCaptureSession_1 = require("./taskCaptureSession");
|
|
16
|
+
const serverBuild_1 = require("../apps/serverBuild");
|
|
16
17
|
function resolveProjectCheckTarget(targetArg, appOption) {
|
|
17
18
|
try {
|
|
18
19
|
return (0, devShared_1.resolveDevTarget)(targetArg, appOption);
|
|
@@ -32,7 +33,7 @@ function resolveProjectCheckTarget(targetArg, appOption) {
|
|
|
32
33
|
}
|
|
33
34
|
function parseProjectCheckTimeoutMs(value) {
|
|
34
35
|
if (value === undefined || value === null || value === "") {
|
|
35
|
-
return
|
|
36
|
+
return loadCheck_1.DEFAULT_HOSTED_LAUNCH_DEADLINE_MS;
|
|
36
37
|
}
|
|
37
38
|
const numeric = typeof value === "number" ? value : Number(value);
|
|
38
39
|
if (!Number.isFinite(numeric) || numeric <= 0) {
|
|
@@ -89,6 +90,19 @@ async function check(targetArg, options = {}) {
|
|
|
89
90
|
process.exitCode = 1;
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
93
|
+
if (taskLookup.task.server) {
|
|
94
|
+
try {
|
|
95
|
+
const serverBuild = await (0, serverBuild_1.buildGameServer)(taskLookup.task);
|
|
96
|
+
if (!serverBuild)
|
|
97
|
+
throw new Error("server_build_missing");
|
|
98
|
+
console.log(`[check] Server contract passed: ${serverBuild.manifest.rooms.join(", ")} -> ${(0, serverBuild_1.formatServerBuildPath)(taskLookup.task, serverBuild.bundlePath)} (${serverBuild.manifest.size} bytes)`);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
(0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Server validation failed.", ["Fix the server declaration, frozen dependencies, imports, authentication, or bundle output."], { command: "project check" });
|
|
102
|
+
process.exitCode = 1;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
92
106
|
let tapeSurface = null;
|
|
93
107
|
let playtestTape = null;
|
|
94
108
|
if (options.tape) {
|
|
@@ -183,6 +197,24 @@ async function check(targetArg, options = {}) {
|
|
|
183
197
|
process.exitCode = 1;
|
|
184
198
|
return;
|
|
185
199
|
}
|
|
200
|
+
let gameServerCredential = null;
|
|
201
|
+
if (taskLookup.task?.server) {
|
|
202
|
+
if (!taskLookup.task.version || typeof registeredApp.id !== "number") {
|
|
203
|
+
(0, messages_1.printErrorWithHelp)("A registered app and exact catalogue version are required for local game-server authentication.", ["Register the app and set its version in catalogue.json."], { command: "project check" });
|
|
204
|
+
process.exitCode = 1;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
try {
|
|
208
|
+
gameServerCredential = await client.requestDevGameServerCredential(registeredApp.id, {
|
|
209
|
+
version: taskLookup.task.version,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
(0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Failed to request the local game-server credential.", ["Confirm the logged-in creator owns this registered app and the catalogue version exists."], { command: "project check" });
|
|
214
|
+
process.exitCode = 1;
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
186
218
|
const runCheck = async (input) => await (0, loadCheck_1.runLocalHostedLoadCheck)({
|
|
187
219
|
client,
|
|
188
220
|
apiBase: envConfig.apiBase,
|
|
@@ -197,6 +229,7 @@ async function check(targetArg, options = {}) {
|
|
|
197
229
|
surface: input.surface,
|
|
198
230
|
playtestTape: input.tape,
|
|
199
231
|
postReadyWaitMs: input.postReadyWaitMs,
|
|
232
|
+
gameServerCredential,
|
|
200
233
|
});
|
|
201
234
|
if (tapeSurface && playtestTape) {
|
|
202
235
|
const idleScreenshotPath = buildComparisonScreenshotPath(screenshotPath, "idle");
|