@seriousgaming/sdk-tools 1.9.0 → 1.11.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/dist/agent/guidance.md +31 -23
- package/dist/{cli-KJV3GGBA.js → cli-226ZJ72R.js} +1 -1
- package/dist/{cli-VRGVHSXH.js → cli-25SJZI7N.js} +44 -9
- package/dist/{cli-YI3WZF3C.js → cli-27TQVLVF.js} +11 -11
- package/dist/cli-27Z5T52R.js +30 -0
- package/dist/cli-3VLBFWHN.js +36 -0
- package/dist/{cli-DXHPYN4N.js → cli-44CM2AH2.js} +1 -1
- package/dist/{cli-2PMLR6WG.js → cli-4F24FUW6.js} +15 -15
- package/dist/{cli-6GDPO5VU.js → cli-4FJL3KQZ.js} +2 -2
- package/dist/{cli-2BF7KBBJ.js → cli-5ATO27Z4.js} +15 -15
- package/dist/{cli-AA5GMEUL.js → cli-5EH4WTH4.js} +4 -4
- package/dist/{cli-MPWTXNF6.js → cli-5M6KDNVX.js} +2 -2
- package/dist/{cli-J2OTL6JH.js → cli-5O7XENQY.js} +5 -5
- package/dist/{cli-XA4IL7IM.js → cli-5RRPUL6V.js} +11 -11
- package/dist/{cli-JEMWAIAA.js → cli-5TTJWM2R.js} +15 -15
- package/dist/{cli-S3YIYAXC.js → cli-5UKWX3IU.js} +12 -12
- package/dist/{cli-AEAFLZGY.js → cli-5VZBFMCK.js} +5 -1
- package/dist/{cli-AGYCXRPR.js → cli-5Z4D3F6Y.js} +3 -3
- package/dist/{cli-ZHFHOWJI.js → cli-6AMK3DYS.js} +11 -11
- package/dist/{cli-G7JTIP5G.js → cli-6BLVI2JM.js} +11 -7
- package/dist/{cli-SBKTGFY4.js → cli-6JWDFCUV.js} +17 -17
- package/dist/{cli-7OCEVQQN.js → cli-6O7YCK2M.js} +2 -2
- package/dist/{cli-GZE4V7RC.js → cli-6P6V2EHY.js} +19 -19
- package/dist/{cli-KD2RQS35.js → cli-77T4LJQF.js} +22 -19
- package/dist/{cli-IC5FOT2J.js → cli-7JUNA74L.js} +1 -1
- package/dist/{cli-2FXZZLCL.js → cli-AH6AMAIB.js} +1 -1
- package/dist/{cli-NTI22MRE.js → cli-ATAJSIXH.js} +16 -16
- package/dist/{cli-OOTGO3KW.js → cli-ATHATKI5.js} +49 -49
- package/dist/{cli-QWO3XJR3.js → cli-ATWJCB2G.js} +4 -4
- package/dist/{cli-QIHVXDMW.js → cli-B2QAJ5RQ.js} +15 -15
- package/dist/{cli-MN7X4UG2.js → cli-B3EFE7ZF.js} +1 -1
- package/dist/{cli-HJPNNORV.js → cli-BC67QHD5.js} +2 -2
- package/dist/cli-BINVO5R7.js +36 -0
- package/dist/{cli-PJO4BKSV.js → cli-BJFYGVJV.js} +16 -16
- package/dist/{cli-C45A5VX6.js → cli-BQ36DV5C.js} +3 -3
- package/dist/{cli-IJPRZSJ5.js → cli-BZOKZ7LP.js} +24 -22
- package/dist/{cli-GHIMH6JU.js → cli-C32Q5E5I.js} +1 -1
- package/dist/{cli-35K37SYY.js → cli-D3S7NJZ3.js} +14 -14
- package/dist/{cli-KGJHEDR2.js → cli-DBMEH4Y5.js} +23 -21
- package/dist/{cli-A7PITFRR.js → cli-DH35TZ2Q.js} +5 -3
- package/dist/{cli-A3P3PO6Z.js → cli-DQE7ITIR.js} +15 -15
- package/dist/{cli-BV7MX7JE.js → cli-EEO5ZPAZ.js} +3 -3
- package/dist/{cli-3RMP4HKZ.js → cli-ERJNDBDH.js} +2 -2
- package/dist/{cli-2JEICVMA.js → cli-F3YJKP6D.js} +3 -3
- package/dist/{cli-2VV5IPSY.js → cli-FT3X3D4P.js} +15 -15
- package/dist/{cli-LZFUSEJT.js → cli-FYPW25VD.js} +13 -13
- package/dist/{cli-CVOLMK3Z.js → cli-G2GLW5Z4.js} +1 -1
- package/dist/{cli-BYXNPBVG.js → cli-G3TU6CP6.js} +15 -15
- package/dist/{cli-4L7S27XO.js → cli-GO64NABP.js} +1 -1
- package/dist/{cli-XRVH5WV6.js → cli-GSOV26O5.js} +13 -13
- package/dist/{cli-2UOUIVHW.js → cli-H6PP2MZT.js} +24 -12
- package/dist/{cli-6Y4XIVQS.js → cli-HGCOEL5T.js} +3 -3
- package/dist/cli-HLI5UEKX.js +36 -0
- package/dist/{cli-B5LZEFLU.js → cli-HMDYG6PS.js} +15 -15
- package/dist/{cli-7CW2BBJG.js → cli-HNDFANQG.js} +1 -1
- package/dist/{cli-MSSJLABW.js → cli-IKSLPAZN.js} +3 -3
- package/dist/{cli-AJ5CABGJ.js → cli-JHLWBRXB.js} +15 -15
- package/dist/{cli-5PTCQTS6.js → cli-JXQLHJO2.js} +1 -1
- package/dist/{cli-H7T6E7OA.js → cli-K4HSQWXC.js} +2 -2
- package/dist/{cli-WJO75KP7.js → cli-KIZTASLL.js} +3 -3
- package/dist/{cli-MX7GFQ6N.js → cli-KJA6GLZI.js} +14 -14
- package/dist/{cli-KINJAQTJ.js → cli-L7F4XKCB.js} +19 -19
- package/dist/{cli-BC4KKNLA.js → cli-LHMRUJVN.js} +4 -2
- package/dist/{cli-CQUSM3SF.js → cli-LPFSJ625.js} +19 -19
- package/dist/{cli-BNN36WZJ.js → cli-MDVC5ZNM.js} +13 -13
- package/dist/{cli-TLRTLTGK.js → cli-MSNSXVGF.js} +18 -18
- package/dist/{cli-5BPQ73OM.js → cli-NKKCDO6K.js} +15 -15
- package/dist/{cli-L5ZKQNMI.js → cli-OBLEROSC.js} +15 -15
- package/dist/cli-OF36EA62.js +36 -0
- package/dist/{cli-MZM4MW7C.js → cli-OM32UURE.js} +19 -19
- package/dist/{cli-J75EBRAJ.js → cli-OMTHTWYJ.js} +17 -17
- package/dist/{cli-K6M6YB67.js → cli-OTBCA54D.js} +1 -1
- package/dist/cli-OVIJRBFI.js +36 -0
- package/dist/{cli-IVZ7AHUJ.js → cli-OXLOGXT3.js} +3 -3
- package/dist/{cli-NU4SCD5D.js → cli-P3NUTOPK.js} +1 -1
- package/dist/{cli-D6AC3ZCX.js → cli-PNS4KWWC.js} +22 -19
- package/dist/{cli-7N7WFRWA.js → cli-PXQYY6KM.js} +0 -0
- package/dist/{cli-MTAGL3QE.js → cli-Q7QSWNY2.js} +15 -15
- package/dist/{cli-7V6GUIIS.js → cli-QDBYFITU.js} +2 -2
- package/dist/{cli-QK2OD24J.js → cli-QEFYDXMH.js} +9 -2
- package/dist/{cli-MYBDWJP7.js → cli-QPV3TYOM.js} +20 -20
- package/dist/{cli-W4BHSBAX.js → cli-QTCTWYCM.js} +3 -3
- package/dist/{cli-HCMVZXWK.js → cli-R5SNTPND.js} +17 -17
- package/dist/{cli-RHYQYXE2.js → cli-REAM7LSC.js} +18 -18
- package/dist/{cli-GHQIATHP.js → cli-RHL4B4H7.js} +6 -5
- package/dist/{cli-RL5EBZL7.js → cli-RKPQLB7J.js} +3 -3
- package/dist/{cli-E77R7ZYB.js → cli-RMD5WSUQ.js} +15 -15
- package/dist/{cli-OX3254NS.js → cli-S3NHXAJM.js} +17 -17
- package/dist/{cli-6COAU7JR.js → cli-SRXDLMXY.js} +17 -17
- package/dist/{cli-DMKRP33X.js → cli-TCQJL2GY.js} +1 -1
- package/dist/{cli-KO26S2CL.js → cli-TEBV2OIW.js} +31 -14
- package/dist/{cli-USBJQAYI.js → cli-TI2FOFPA.js} +13 -13
- package/dist/{cli-7RLZIWFP.js → cli-TLSTSZAC.js} +19 -19
- package/dist/{cli-2CSI2UU2.js → cli-UEQMK4WX.js} +1 -1
- package/dist/cli-UIYKPSIY.js +36 -0
- package/dist/{cli-2I6UN6C3.js → cli-UQC46YSV.js} +3 -3
- package/dist/{cli-BF6L37O3.js → cli-UULZSQBV.js} +3 -3
- package/dist/{cli-OK6XWVIN.js → cli-UVIURDZC.js} +17 -17
- package/dist/{cli-6KL5B7EC.js → cli-VXLHOZSO.js} +15 -15
- package/dist/{cli-UR63LFVK.js → cli-W3RG2MRI.js} +2 -2
- package/dist/{cli-G54355N5.js → cli-WJVPSVF2.js} +22 -19
- package/dist/{cli-YD4SBAHQ.js → cli-WNBP3LOD.js} +19 -19
- package/dist/{cli-DJCQ5XFR.js → cli-WNHMJM3Z.js} +15 -15
- package/dist/{cli-CL3KF5KS.js → cli-WQ7JBZNW.js} +2 -2
- package/dist/{cli-VTLFQHDO.js → cli-WW54THXN.js} +1 -1
- package/dist/cli-WZNIW6ZO.js +16 -0
- package/dist/{cli-BT47H36C.js → cli-X3TSTTYI.js} +2 -2
- package/dist/{cli-ICLCA6VD.js → cli-X52TXCNF.js} +19 -19
- package/dist/{cli-ZZSPFLTK.js → cli-X64BNBQH.js} +26 -4
- package/dist/{cli-CKV44U7P.js → cli-XJ7JESC2.js} +19 -19
- package/dist/{cli-EDZF5Q2E.js → cli-XKAIDYIE.js} +14 -14
- package/dist/{cli-CPX4YA3P.js → cli-XNOAO6DY.js} +11 -11
- package/dist/{cli-R6YAZP6E.js → cli-XOYUTNER.js} +19 -19
- package/dist/{cli-3VV2JLHX.js → cli-XW3JLRSA.js} +1 -1
- package/dist/{cli-S7PLSPGE.js → cli-YYXAGJQR.js} +15 -15
- package/dist/{cli-LFUKHLHI.js → cli-ZGCG6C22.js} +17 -17
- package/dist/{cli-QRAYIXNE.js → cli-ZJW6HQ6N.js} +5 -5
- package/dist/{cli-Y33ULHYO.js → cli-ZNQBF4Z3.js} +1 -1
- package/dist/cli.js +52 -52
- package/dist/client/index.d.ts +1 -1
- package/dist/client/test-session.d.ts +44 -6
- package/dist/client.js +100 -12
- package/dist/dev/console/assets/{index-CVNjiRUh.js → index-Ch6HHb2T.js} +1 -1
- package/dist/dev/console/index.html +1 -1
- package/dist/dev/surfaces.d.ts +8 -2
- package/dist/docs/api/index.md +3 -1
- package/dist/docs/api/sdk-tools-client.md +38 -6
- package/dist/docs/api/sdk-tools-vite.md +21 -0
- package/dist/docs/api/sdk.md +2 -0
- package/dist/docs/changelog.md +49 -0
- package/dist/docs/cli-error-codes.md +41 -39
- package/dist/docs/cli-reference.md +2 -1
- package/dist/docs/guides/endpoints.md +1 -1
- package/dist/docs/guides/engine-testing.md +49 -14
- package/dist/docs/guides/engine.md +2 -2
- package/dist/docs/guides/scenario-editor.md +1 -1
- package/dist/docs/guides/setup.md +22 -5
- package/dist/docs/guides/testing.md +3 -8
- package/dist/docs/guides/upgrading.md +15 -0
- package/dist/docs/page-index.md +6 -5
- package/dist/docs/recipes/create-game.md +1 -1
- package/dist/docs/recipes/fix-duplicate-packages.md +8 -19
- package/dist/docs/recipes/give-setup-a-menu.md +7 -1
- package/dist/docs/recipes/write-setup-notes.md +2 -2
- package/dist/host/protocol.d.ts +8 -5
- package/dist/oxlint/logic.json +184 -0
- package/dist/playwright.js +100 -12
- package/dist/runtime/manifest-version.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/schema.json +20 -0
- package/dist/templates/package/README.md.liquid +1 -0
- package/dist/templates/package/claude/rules/workflow-create-engine.md +1 -1
- package/dist/templates/package/claude/rules/workflow-create-user-interface.md +1 -1
- package/dist/templates/package/claude/rules/workflow-test-engine-or-ui.md +1 -1
- package/dist/templates/package/claude/rules/workflow-update-sdk-version.md +2 -2
- package/dist/templates/package/claude/settings.json.template +1 -0
- package/dist/templates/package/oxfmtrc.json.template +8 -1
- package/dist/templates/package/oxlintrc.json.template +1 -180
- package/dist/templates/package/package.json.liquid +1 -0
- package/dist/templates/package/vite.config.ts.liquid +2 -8
- package/dist/templates/package/vitest.config.ts.liquid +2 -8
- package/dist/templates/starter-game/package.json +2 -1
- package/dist/templates/starter-game/testing/engine/game.engine.test.ts +62 -37
- package/dist/templates/starter-game/vite.config.ts +2 -8
- package/dist/templates/starter-game/vitest.config.ts +4 -3
- package/dist/utils/error-codes.d.ts +6 -2
- package/dist/utils/resource-scan.d.ts +5 -0
- package/dist/vite/index.d.ts +30 -0
- package/dist/vite.js +12 -0
- package/package.json +12 -4
- package/dist/cli-3I6AI4AA.js +0 -36
- package/dist/cli-3YGNWZC6.js +0 -30
- package/dist/cli-4X3X4HB2.js +0 -16
- package/dist/cli-6ZBQELF2.js +0 -36
- package/dist/cli-CUZUIYCQ.js +0 -36
- package/dist/cli-DNCJURUU.js +0 -36
- package/dist/cli-UKC7KXWU.js +0 -36
- package/dist/cli-WA2PDQUB.js +0 -36
package/dist/cli.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
RESOURCE_DESCRIPTORS,
|
|
4
4
|
lazy
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-ATHATKI5.js";
|
|
6
6
|
import {
|
|
7
7
|
DEV_PORT_ENV_VAR,
|
|
8
8
|
ERROR_OVERLAY_ENV_VAR,
|
|
9
9
|
defaultDevPort
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-C32Q5E5I.js";
|
|
11
11
|
import {
|
|
12
12
|
PUBLIC_ASSET_URL_ENV_VAR,
|
|
13
13
|
PUBLIC_HMR_URL_ENV_VAR,
|
|
14
14
|
PUBLIC_URL_ENV_VAR
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-G2GLW5Z4.js";
|
|
16
16
|
import {
|
|
17
17
|
setAssumeYes,
|
|
18
18
|
setPromptUsage
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-P3NUTOPK.js";
|
|
20
20
|
import {
|
|
21
21
|
compact,
|
|
22
22
|
indent,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./cli-F2D4GGUA.js";
|
|
25
25
|
import {
|
|
26
26
|
setVerboseMode
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-TCQJL2GY.js";
|
|
28
28
|
import {
|
|
29
29
|
CliError,
|
|
30
30
|
beginCommand,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
jsonRequestedByEnvironment,
|
|
36
36
|
processExitRequested,
|
|
37
37
|
setCommandPath
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-5VZBFMCK.js";
|
|
39
39
|
|
|
40
40
|
// cli/program.ts
|
|
41
41
|
import { cwd } from "process";
|
|
@@ -138,67 +138,67 @@ function newFileHelp(spec) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// cli/program.ts
|
|
141
|
-
var blobUploadCommand = lazy(() => import("./cli-
|
|
142
|
-
var buildCommand = lazy(() => import("./cli-
|
|
143
|
-
var buildEngineCommand = lazy(() => import("./cli-
|
|
144
|
-
var configGetCommand = lazy(() => import("./cli-
|
|
145
|
-
var configPathCommand = lazy(() => import("./cli-
|
|
146
|
-
var configSetCommand = lazy(() => import("./cli-
|
|
147
|
-
var configureCommand = lazy(() => import("./cli-
|
|
148
|
-
var deleteCommand = lazy(() => import("./cli-
|
|
149
|
-
var devCommand = lazy(() => import("./cli-
|
|
150
|
-
var devStatusCommand = lazy(() => import("./cli-
|
|
151
|
-
var devStopCommand = lazy(() => import("./cli-
|
|
152
|
-
var docsCommand = lazy(() => import("./cli-
|
|
153
|
-
var docsExportCommand = lazy(() => import("./cli-
|
|
141
|
+
var blobUploadCommand = lazy(() => import("./cli-W3RG2MRI.js"), "blobUploadCommand");
|
|
142
|
+
var buildCommand = lazy(() => import("./cli-H6PP2MZT.js"), "buildCommand");
|
|
143
|
+
var buildEngineCommand = lazy(() => import("./cli-5EH4WTH4.js"), "buildEngineCommand");
|
|
144
|
+
var configGetCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configGetCommand");
|
|
145
|
+
var configPathCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configPathCommand");
|
|
146
|
+
var configSetCommand = lazy(() => import("./cli-OXLOGXT3.js"), "configSetCommand");
|
|
147
|
+
var configureCommand = lazy(() => import("./cli-XKAIDYIE.js"), "configureCommand");
|
|
148
|
+
var deleteCommand = lazy(() => import("./cli-6AMK3DYS.js"), "deleteCommand");
|
|
149
|
+
var devCommand = lazy(() => import("./cli-UVIURDZC.js"), "devCommand");
|
|
150
|
+
var devStatusCommand = lazy(() => import("./cli-5Z4D3F6Y.js"), "devStatusCommand");
|
|
151
|
+
var devStopCommand = lazy(() => import("./cli-5Z4D3F6Y.js"), "devStopCommand");
|
|
152
|
+
var docsCommand = lazy(() => import("./cli-44CM2AH2.js"), "docsCommand");
|
|
153
|
+
var docsExportCommand = lazy(() => import("./cli-7JUNA74L.js"), "docsExportCommand");
|
|
154
154
|
var endpointAuditCommand = lazy(
|
|
155
|
-
() => import("./cli-
|
|
155
|
+
() => import("./cli-5RRPUL6V.js"),
|
|
156
156
|
"endpointAuditCommand"
|
|
157
157
|
);
|
|
158
|
-
var endpointCallCommand = lazy(() => import("./cli-
|
|
159
|
-
var endpointListCommand = lazy(() => import("./cli-
|
|
160
|
-
var generateCommand = lazy(() => import("./cli-
|
|
161
|
-
var initCommand = lazy(() => import("./cli-
|
|
162
|
-
var newCommand = lazy(() => import("./cli-
|
|
158
|
+
var endpointCallCommand = lazy(() => import("./cli-JHLWBRXB.js"), "endpointCallCommand");
|
|
159
|
+
var endpointListCommand = lazy(() => import("./cli-HGCOEL5T.js"), "endpointListCommand");
|
|
160
|
+
var generateCommand = lazy(() => import("./cli-WZNIW6ZO.js"), "generateCommand");
|
|
161
|
+
var initCommand = lazy(() => import("./cli-GSOV26O5.js"), "initCommand");
|
|
162
|
+
var newCommand = lazy(() => import("./cli-XNOAO6DY.js"), "newCommand");
|
|
163
163
|
var packageBundleCommand = lazy(
|
|
164
|
-
() => import("./cli-
|
|
164
|
+
() => import("./cli-BQ36DV5C.js"),
|
|
165
165
|
"packageBundleCommand"
|
|
166
166
|
);
|
|
167
167
|
var packagePublishCommand = lazy(
|
|
168
|
-
() => import("./cli-
|
|
168
|
+
() => import("./cli-5O7XENQY.js"),
|
|
169
169
|
"packagePublishCommand"
|
|
170
170
|
);
|
|
171
171
|
var packageVersionCommand = lazy(
|
|
172
|
-
() => import("./cli-
|
|
172
|
+
() => import("./cli-4FJL3KQZ.js"),
|
|
173
173
|
"packageVersionCommand"
|
|
174
174
|
);
|
|
175
|
-
var patchCommand = lazy(() => import("./cli-
|
|
176
|
-
var resolveCommand = lazy(() => import("./cli-
|
|
177
|
-
var screenshotCommand = lazy(() => import("./cli-
|
|
178
|
-
var clockAdvanceCommand = lazy(() => import("./cli-
|
|
179
|
-
var faultCommand = lazy(() => import("./cli-
|
|
180
|
-
var localeCommand = lazy(() => import("./cli-
|
|
181
|
-
var participantAddCommand = lazy(() => import("./cli-
|
|
182
|
-
var participantJoinCommand = lazy(() => import("./cli-
|
|
183
|
-
var participantMoveCommand = lazy(() => import("./cli-
|
|
175
|
+
var patchCommand = lazy(() => import("./cli-KJA6GLZI.js"), "patchCommand");
|
|
176
|
+
var resolveCommand = lazy(() => import("./cli-IKSLPAZN.js"), "resolveCommand");
|
|
177
|
+
var screenshotCommand = lazy(() => import("./cli-S3NHXAJM.js"), "screenshotCommand");
|
|
178
|
+
var clockAdvanceCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "clockAdvanceCommand");
|
|
179
|
+
var faultCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "faultCommand");
|
|
180
|
+
var localeCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "localeCommand");
|
|
181
|
+
var participantAddCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantAddCommand");
|
|
182
|
+
var participantJoinCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantJoinCommand");
|
|
183
|
+
var participantMoveCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "participantMoveCommand");
|
|
184
184
|
var participantRenameCommand = lazy(
|
|
185
|
-
() => import("./cli-
|
|
185
|
+
() => import("./cli-D3S7NJZ3.js"),
|
|
186
186
|
"participantRenameCommand"
|
|
187
187
|
);
|
|
188
|
-
var playCommand = lazy(() => import("./cli-
|
|
189
|
-
var reconfigureCommand = lazy(() => import("./cli-
|
|
190
|
-
var resetCommand = lazy(() => import("./cli-
|
|
191
|
-
var scenarioCommand = lazy(() => import("./cli-
|
|
192
|
-
var teamAddCommand = lazy(() => import("./cli-
|
|
193
|
-
var teamRemoveCommand = lazy(() => import("./cli-
|
|
194
|
-
var teamRenameCommand = lazy(() => import("./cli-
|
|
195
|
-
var timerCommand = lazy(() => import("./cli-
|
|
196
|
-
var undoCommand = lazy(() => import("./cli-
|
|
197
|
-
var waitingRoomCommand = lazy(() => import("./cli-
|
|
198
|
-
var tickCommand = lazy(() => import("./cli-
|
|
199
|
-
var updateCommand = lazy(() => import("./cli-
|
|
200
|
-
var versionCommand = lazy(() => import("./cli-
|
|
201
|
-
var viewCommand = lazy(() => import("./cli-
|
|
188
|
+
var playCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "playCommand");
|
|
189
|
+
var reconfigureCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "reconfigureCommand");
|
|
190
|
+
var resetCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "resetCommand");
|
|
191
|
+
var scenarioCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "scenarioCommand");
|
|
192
|
+
var teamAddCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamAddCommand");
|
|
193
|
+
var teamRemoveCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamRemoveCommand");
|
|
194
|
+
var teamRenameCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "teamRenameCommand");
|
|
195
|
+
var timerCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "timerCommand");
|
|
196
|
+
var undoCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "undoCommand");
|
|
197
|
+
var waitingRoomCommand = lazy(() => import("./cli-D3S7NJZ3.js"), "waitingRoomCommand");
|
|
198
|
+
var tickCommand = lazy(() => import("./cli-27Z5T52R.js"), "tickCommand");
|
|
199
|
+
var updateCommand = lazy(() => import("./cli-27TQVLVF.js"), "updateCommand");
|
|
200
|
+
var versionCommand = lazy(() => import("./cli-5M6KDNVX.js"), "versionCommand");
|
|
201
|
+
var viewCommand = lazy(() => import("./cli-MDVC5ZNM.js"), "viewCommand");
|
|
202
202
|
function commandPath(command) {
|
|
203
203
|
const names = [];
|
|
204
204
|
for (let current = command; current?.parent; current = current.parent) {
|
package/dist/client/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
export type { ContextDeletePath, ContextUpdate, SignatureCallbacks } from '@seriousgaming/sdk';
|
|
22
|
-
export { createTestSession, type TestSession, type TestSessionOptions, type TestSessionSetDataOptions, type TestSessionSetSharedDataOptions, type TestSessionState, type TestSessionTeam, type UntypedContext, } from './test-session';
|
|
22
|
+
export { createTestSession, type LogicErrorLocation, type TestMutationResult, type TestSession, type TestSessionOptions, type TestSessionSetDataOptions, type TestSessionSetSharedDataOptions, type TestSessionState, type TestSessionTeam, type UntypedContext, } from './test-session';
|
|
23
23
|
export { startDevServer, type DevServer, type DevServerOptions } from './dev-server';
|
|
24
24
|
export { buildSurfaces, type BuildSurfacesOptions, type BuiltSurfaces } from './build-surfaces';
|
|
25
25
|
export { createStubServices, stubGenerateText, type TestServices } from './stub-services';
|
|
@@ -62,6 +62,44 @@ export interface TestSessionOptions {
|
|
|
62
62
|
apiHost?: string;
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Where game logic threw, read back to the file the author wrote: the resource
|
|
67
|
+
* whose logic it was, the tick and team it ran for, and the source position.
|
|
68
|
+
* `file` is relative to the package root; `line` and `column` are 1-based.
|
|
69
|
+
*/
|
|
70
|
+
export interface LogicErrorLocation {
|
|
71
|
+
resource: {
|
|
72
|
+
type: string;
|
|
73
|
+
identifier: string;
|
|
74
|
+
};
|
|
75
|
+
message: string;
|
|
76
|
+
tick?: number;
|
|
77
|
+
team?: {
|
|
78
|
+
teamId: string;
|
|
79
|
+
index: number;
|
|
80
|
+
};
|
|
81
|
+
file?: string;
|
|
82
|
+
line?: number;
|
|
83
|
+
column?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* What a test session answers a mutation with. A refusal that came from logic
|
|
87
|
+
* throwing (a failed tick, a hook, a validator) carries `logicError` beside
|
|
88
|
+
* its outcome, which is what `sdk tick` reports from the command line:
|
|
89
|
+
*
|
|
90
|
+
* ```ts
|
|
91
|
+
* const result = await session.tick();
|
|
92
|
+
* if (!result.ok) {
|
|
93
|
+
* const at = result.logicError;
|
|
94
|
+
* throw new Error(`${result.outcome.kind} at ${at?.file}:${at?.line} (tick ${at?.tick})`);
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* A surface never sees it: the outcome alone is what the runtime tells one.
|
|
99
|
+
*/
|
|
100
|
+
export type TestMutationResult = MutationResult & {
|
|
101
|
+
logicError?: LogicErrorLocation;
|
|
102
|
+
};
|
|
65
103
|
/** A capability context as the projection carries it, before a game's types narrow it. */
|
|
66
104
|
export type UntypedContext = Record<string, Record<string, unknown>>;
|
|
67
105
|
/** One team as {@link TestSession.state} reports it, its context typed. */
|
|
@@ -119,9 +157,9 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
|
|
|
119
157
|
* `{ ok: true }` or `{ ok: false, outcome }`, and a read answers with its
|
|
120
158
|
* result. A refusal is an answer, not a throw.
|
|
121
159
|
*/
|
|
122
|
-
send(command: MutationCommand): Promise<
|
|
160
|
+
send(command: MutationCommand): Promise<TestMutationResult>;
|
|
123
161
|
send(command: QueryCommand): Promise<QueryResult>;
|
|
124
|
-
send(command: Command): Promise<
|
|
162
|
+
send(command: Command): Promise<TestMutationResult | QueryResult>;
|
|
125
163
|
/** The whole session now: teams, contexts, rosters, the store, the timer. */
|
|
126
164
|
state(): TestSessionState<Context, Shared>;
|
|
127
165
|
/**
|
|
@@ -143,7 +181,7 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
|
|
|
143
181
|
*/
|
|
144
182
|
tick(options?: {
|
|
145
183
|
team?: number;
|
|
146
|
-
}): Promise<
|
|
184
|
+
}): Promise<TestMutationResult>;
|
|
147
185
|
/**
|
|
148
186
|
* Ask for the next tick as a participant's surface does, so the
|
|
149
187
|
* validators' `RequestTick` gates judge it. Asks as the team's first
|
|
@@ -151,14 +189,14 @@ export interface TestSession<Context = UntypedContext, Shared = UntypedContext>
|
|
|
151
189
|
*/
|
|
152
190
|
requestTick(team: number, options?: {
|
|
153
191
|
participantId?: string;
|
|
154
|
-
}): Promise<
|
|
192
|
+
}): Promise<TestMutationResult>;
|
|
155
193
|
/**
|
|
156
194
|
* Write to one team's context, by stable index. As a participant through
|
|
157
195
|
* `ui` unless `as: 'system'` (see {@link TestSessionSetDataOptions}).
|
|
158
196
|
*/
|
|
159
|
-
setData(team: number, patch: ContextUpdate<Context>, options?: TestSessionSetDataOptions): Promise<
|
|
197
|
+
setData(team: number, patch: ContextUpdate<Context>, options?: TestSessionSetDataOptions): Promise<TestMutationResult>;
|
|
160
198
|
/** Write to the shared store, as the facilitator does. */
|
|
161
|
-
setSharedData(patch: ContextUpdate<Shared>, options?: TestSessionSetSharedDataOptions): Promise<
|
|
199
|
+
setSharedData(patch: ContextUpdate<Shared>, options?: TestSessionSetSharedDataOptions): Promise<TestMutationResult>;
|
|
162
200
|
/**
|
|
163
201
|
* Resolves once everything queued has run, including a tick a timer set
|
|
164
202
|
* off. `advanceClock` already waits; this is for a timer moved by hand.
|
package/dist/client.js
CHANGED
|
@@ -623,7 +623,11 @@ var ERROR_CODES = {
|
|
|
623
623
|
},
|
|
624
624
|
SETUP_NOTES_UNCONFIGURED: {
|
|
625
625
|
category: "package",
|
|
626
|
-
description: "A warning: the setup notes name a setting the setup UI
|
|
626
|
+
description: "A warning: the setup notes name a setting the setup UI neither `configures` nor lists in `settings`, so a host refuses the change they describe and the setup UI cannot see it."
|
|
627
|
+
},
|
|
628
|
+
EDITOR_SETTINGS_CONFIGURED: {
|
|
629
|
+
category: "package",
|
|
630
|
+
description: "A warning: a settings editor lists a settings resource in both `configures` and `settings`. Configuring a resource already sends it, so the `settings` entry does nothing."
|
|
627
631
|
},
|
|
628
632
|
SETTINGS_UNGATED: {
|
|
629
633
|
category: "package",
|
|
@@ -1439,6 +1443,16 @@ var schema_default = {
|
|
|
1439
1443
|
uniqueItems: true,
|
|
1440
1444
|
default: []
|
|
1441
1445
|
},
|
|
1446
|
+
settings: {
|
|
1447
|
+
type: "array",
|
|
1448
|
+
description: "Identifiers of settings resources this setup user interface reads but does not edit, the built-in `game` included. It is sent their resolved values through `setSettings` beside those it configures, and a host refuses an `updateSettings` that names one. List a resource here, not in `configures`, when the screen only needs to see it, such as the list of what the scenario offers",
|
|
1449
|
+
items: {
|
|
1450
|
+
type: "string",
|
|
1451
|
+
pattern: "^[a-z][a-z0-9_]*$"
|
|
1452
|
+
},
|
|
1453
|
+
uniqueItems: true,
|
|
1454
|
+
default: []
|
|
1455
|
+
},
|
|
1442
1456
|
endpoints: {
|
|
1443
1457
|
type: "array",
|
|
1444
1458
|
description: "Endpoint identifiers this setup user interface is permitted to call via `callbacks.endpoints[<identifier>]`. The host throws when this UI requests an endpoint whose identifier is not listed here.",
|
|
@@ -1472,6 +1486,16 @@ var schema_default = {
|
|
|
1472
1486
|
uniqueItems: true,
|
|
1473
1487
|
default: []
|
|
1474
1488
|
},
|
|
1489
|
+
settings: {
|
|
1490
|
+
type: "array",
|
|
1491
|
+
description: "Identifiers of settings resources this scenario editor reads but does not edit, the built-in `game` included. It is sent their resolved values through `setSettings` beside those it configures, and a host refuses an `updateSettings` that names one. List a resource here, not in `configures`, when the screen only needs to see it, such as the list of what the scenario offers",
|
|
1492
|
+
items: {
|
|
1493
|
+
type: "string",
|
|
1494
|
+
pattern: "^[a-z][a-z0-9_]*$"
|
|
1495
|
+
},
|
|
1496
|
+
uniqueItems: true,
|
|
1497
|
+
default: []
|
|
1498
|
+
},
|
|
1475
1499
|
endpoints: {
|
|
1476
1500
|
type: "array",
|
|
1477
1501
|
description: "Endpoint identifiers this scenario editor is permitted to call via `callbacks.endpoints[<identifier>]`. The host throws when this UI requests an endpoint whose identifier is not listed here.",
|
|
@@ -15211,7 +15235,7 @@ var BASES = [
|
|
|
15211
15235
|
sites: []
|
|
15212
15236
|
},
|
|
15213
15237
|
// The two settings editors (§6.5): one layout, both naming the settings
|
|
15214
|
-
// they edit in `configures`. Neither ever lived under a plural directory;
|
|
15238
|
+
// they edit in `configures` and those they only read in `settings`. Neither ever lived under a plural directory;
|
|
15215
15239
|
// the version 2 settings editors they replace did, and the loader refuses
|
|
15216
15240
|
// that directory with its own message.
|
|
15217
15241
|
{
|
|
@@ -15223,6 +15247,7 @@ var BASES = [
|
|
|
15223
15247
|
kind: "ui",
|
|
15224
15248
|
label: "Setup user interface",
|
|
15225
15249
|
declaresEndpoints: true,
|
|
15250
|
+
readsSettings: true,
|
|
15226
15251
|
sites: []
|
|
15227
15252
|
},
|
|
15228
15253
|
{
|
|
@@ -15234,6 +15259,7 @@ var BASES = [
|
|
|
15234
15259
|
kind: "ui",
|
|
15235
15260
|
label: "Scenario editor",
|
|
15236
15261
|
declaresEndpoints: true,
|
|
15262
|
+
readsSettings: true,
|
|
15237
15263
|
sites: []
|
|
15238
15264
|
},
|
|
15239
15265
|
{
|
|
@@ -28004,6 +28030,7 @@ import { WebSocketServer } from "ws";
|
|
|
28004
28030
|
|
|
28005
28031
|
// cli/core/listen-with-fallback.ts
|
|
28006
28032
|
import { createServer as createSocket } from "net";
|
|
28033
|
+
var PORT_IN_USE_HINT = "`sdk dev status` says whether a dev server is already running for this package. Pass --port auto to take any free port.";
|
|
28007
28034
|
async function listenWithPortFallback(server, startPort, options = {}) {
|
|
28008
28035
|
const maxAttempts = options.maxAttempts ?? 100;
|
|
28009
28036
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
@@ -28017,7 +28044,8 @@ async function listenWithPortFallback(server, startPort, options = {}) {
|
|
|
28017
28044
|
}
|
|
28018
28045
|
throw new CliError(
|
|
28019
28046
|
"PORT_IN_USE",
|
|
28020
|
-
`Could not find available port after ${maxAttempts} attempts
|
|
28047
|
+
`Could not find available port after ${maxAttempts} attempts`,
|
|
28048
|
+
{ hint: PORT_IN_USE_HINT }
|
|
28021
28049
|
);
|
|
28022
28050
|
}
|
|
28023
28051
|
function tryListen(server, port, host) {
|
|
@@ -28055,7 +28083,8 @@ async function findFreePort(startPort, maxAttempts = 100) {
|
|
|
28055
28083
|
}
|
|
28056
28084
|
throw new CliError(
|
|
28057
28085
|
"PORT_IN_USE",
|
|
28058
|
-
`Could not find available port after ${maxAttempts} attempts
|
|
28086
|
+
`Could not find available port after ${maxAttempts} attempts`,
|
|
28087
|
+
{ hint: PORT_IN_USE_HINT }
|
|
28059
28088
|
);
|
|
28060
28089
|
}
|
|
28061
28090
|
var PROBED_ADDRESSES = [void 0, "127.0.0.1", "::1"];
|
|
@@ -29116,6 +29145,16 @@ function collectUnknownSettingsReferences(config) {
|
|
|
29116
29145
|
const resources = [
|
|
29117
29146
|
{ label: 'Engine "engine"', type: "engine", definition: config.engine?.definition },
|
|
29118
29147
|
{ label: 'User Interface "ui"', type: "ui", definition: config.ui?.definition },
|
|
29148
|
+
{
|
|
29149
|
+
label: 'Setup User Interface "setup"',
|
|
29150
|
+
type: "setup",
|
|
29151
|
+
definition: config.setup?.definition
|
|
29152
|
+
},
|
|
29153
|
+
{
|
|
29154
|
+
label: 'Scenario Editor "scenario_editor"',
|
|
29155
|
+
type: "scenario_editor",
|
|
29156
|
+
definition: config.scenario_editor?.definition
|
|
29157
|
+
},
|
|
29119
29158
|
{
|
|
29120
29159
|
label: 'Session User Interface "session"',
|
|
29121
29160
|
type: "session",
|
|
@@ -29958,13 +29997,17 @@ var VALIDATION_DESCRIPTORS = [
|
|
|
29958
29997
|
type: "setup",
|
|
29959
29998
|
resources: (config) => slot(config.setup),
|
|
29960
29999
|
identify: named2,
|
|
29961
|
-
checks: [
|
|
30000
|
+
checks: [
|
|
30001
|
+
uiFiles,
|
|
30002
|
+
(setup, context) => setupNotesChecks(setup, context),
|
|
30003
|
+
editorSettingsChecks
|
|
30004
|
+
]
|
|
29962
30005
|
}),
|
|
29963
30006
|
descriptor({
|
|
29964
30007
|
type: "scenario_editor",
|
|
29965
30008
|
resources: (config) => slot(config.scenario_editor),
|
|
29966
30009
|
identify: named2,
|
|
29967
|
-
checks: [uiFiles]
|
|
30010
|
+
checks: [uiFiles, editorSettingsChecks]
|
|
29968
30011
|
}),
|
|
29969
30012
|
descriptor({
|
|
29970
30013
|
type: "tick_controller",
|
|
@@ -30248,11 +30291,32 @@ async function validateLoadedPackage(config, options) {
|
|
|
30248
30291
|
}
|
|
30249
30292
|
};
|
|
30250
30293
|
}
|
|
30294
|
+
function editorSettingsChecks(editor) {
|
|
30295
|
+
const slot2 = editor.definition.identifier;
|
|
30296
|
+
const configures = new Set(editor.definition.configures ?? []);
|
|
30297
|
+
const warnings = [];
|
|
30298
|
+
const findings = [];
|
|
30299
|
+
(editor.definition.settings ?? []).forEach((identifier, index3) => {
|
|
30300
|
+
if (!configures.has(identifier)) return;
|
|
30301
|
+
const message = `${slot2} lists "${identifier}" in both \`configures\` and \`settings\`. Configuring a resource already sends it to the screen, so remove it from \`settings\`, or from \`configures\` if the screen should only read it.`;
|
|
30302
|
+
warnings.push(message);
|
|
30303
|
+
findings.push({
|
|
30304
|
+
severity: "warning",
|
|
30305
|
+
code: "EDITOR_SETTINGS_CONFIGURED",
|
|
30306
|
+
message,
|
|
30307
|
+
file: bundleFileOf(slot2, slot2),
|
|
30308
|
+
pointer: pointerOf("definition", "settings", index3),
|
|
30309
|
+
resource: { type: slot2, identifier: slot2 }
|
|
30310
|
+
});
|
|
30311
|
+
});
|
|
30312
|
+
return { errors: [], warnings, findings };
|
|
30313
|
+
}
|
|
30251
30314
|
function setupNotesChecks(setup, context) {
|
|
30252
30315
|
const directory = resolve7(context.workingDir, setup.rootDirectory);
|
|
30253
30316
|
const schemas = settingsSchemas(context.config);
|
|
30254
30317
|
const identifiers = new Set(Object.keys(schemas));
|
|
30255
30318
|
const configures = new Set(setup.definition.configures ?? []);
|
|
30319
|
+
const reads = new Set(setup.definition.settings ?? []);
|
|
30256
30320
|
const resource = { type: "setup", identifier: "setup" };
|
|
30257
30321
|
const outcome = {
|
|
30258
30322
|
errors: [],
|
|
@@ -30268,8 +30332,8 @@ function setupNotesChecks(setup, context) {
|
|
|
30268
30332
|
for (const { path: path3, line } of notesSettingReferences(markdown, identifiers)) {
|
|
30269
30333
|
if (!settingPathDeclared(schemas, path3)) continue;
|
|
30270
30334
|
const identifier = parseSettingPath(path3)?.identifier ?? "";
|
|
30271
|
-
if (!configures.has(identifier)) {
|
|
30272
|
-
const message = `Setup notes ${file}, line ${line}, name \`${path3}\`, but the setup UI
|
|
30335
|
+
if (!configures.has(identifier) && !reads.has(identifier)) {
|
|
30336
|
+
const message = `Setup notes ${file}, line ${line}, name \`${path3}\`, but the setup UI neither configures nor reads "${identifier}", so a host refuses a change to it. Add "${identifier}" to its \`configures\` if setup may change it, or to its \`settings\` if the notes name it only as where the menu's offer is read from.`;
|
|
30273
30337
|
outcome.warnings.push(message);
|
|
30274
30338
|
outcome.findings.push({
|
|
30275
30339
|
severity: "warning",
|
|
@@ -31234,7 +31298,10 @@ function toSurface(kind2, bundle, hidden) {
|
|
|
31234
31298
|
endpoints: endpoints ?? [],
|
|
31235
31299
|
crossTeamReads: visible(crossTeamReads),
|
|
31236
31300
|
crossTeamParticipants: crossTeamParticipants === true,
|
|
31237
|
-
|
|
31301
|
+
...kind2 === "setup" || kind2 === "scenario-editor" ? {
|
|
31302
|
+
settings: [.../* @__PURE__ */ new Set([...configures ?? [], ...settings ?? []])],
|
|
31303
|
+
configures: configures ?? []
|
|
31304
|
+
} : { settings: settings ?? [] }
|
|
31238
31305
|
};
|
|
31239
31306
|
}
|
|
31240
31307
|
var SURFACE_SLOT = {
|
|
@@ -31341,10 +31408,21 @@ function buildBatch(options) {
|
|
|
31341
31408
|
// The two settings editors are sent the same batch (§12.3): neither is
|
|
31342
31409
|
// told which slot it fills, since each is its own bundle.
|
|
31343
31410
|
case "setup":
|
|
31344
|
-
return [
|
|
31411
|
+
return [
|
|
31412
|
+
{
|
|
31413
|
+
type: "setSettings",
|
|
31414
|
+
payload: settingsFor(state2, surface),
|
|
31415
|
+
configures: surface.configures ?? []
|
|
31416
|
+
},
|
|
31417
|
+
...common
|
|
31418
|
+
];
|
|
31345
31419
|
case "scenario-editor":
|
|
31346
31420
|
return [
|
|
31347
|
-
{
|
|
31421
|
+
{
|
|
31422
|
+
type: "setSettings",
|
|
31423
|
+
payload: draftSettingsFor(state2, surface, options.viewer),
|
|
31424
|
+
configures: surface.configures ?? []
|
|
31425
|
+
},
|
|
31348
31426
|
...common
|
|
31349
31427
|
];
|
|
31350
31428
|
case "presentation":
|
|
@@ -33383,6 +33461,16 @@ function distPath(meta, identifier) {
|
|
|
33383
33461
|
return `${meta.pluralDir}/${identifier}`;
|
|
33384
33462
|
}
|
|
33385
33463
|
|
|
33464
|
+
// cli/vite/index.ts
|
|
33465
|
+
var REACT_CONTEXT_PACKAGES = [
|
|
33466
|
+
"react",
|
|
33467
|
+
"react-dom",
|
|
33468
|
+
"@emotion/react",
|
|
33469
|
+
"@emotion/styled",
|
|
33470
|
+
"@seriousgaming/sdk",
|
|
33471
|
+
"@seriousgaming/deck"
|
|
33472
|
+
];
|
|
33473
|
+
|
|
33386
33474
|
// cli/bundling/ui-bundler.ts
|
|
33387
33475
|
async function bundleUserInterface(ui, workingDir, buildDir, type) {
|
|
33388
33476
|
const uiOutputDir = join21(buildDir, distPath(getResourceMeta(type), ui.definition.identifier));
|
|
@@ -33408,7 +33496,7 @@ async function bundleUserInterface(ui, workingDir, buildDir, type) {
|
|
|
33408
33496
|
configFile: false,
|
|
33409
33497
|
plugins: [react2()],
|
|
33410
33498
|
resolve: {
|
|
33411
|
-
dedupe: [
|
|
33499
|
+
dedupe: [...REACT_CONTEXT_PACKAGES]
|
|
33412
33500
|
},
|
|
33413
33501
|
build: {
|
|
33414
33502
|
outDir: uiOutputDir,
|