@seriousgaming/sdk-tools 1.6.1 → 1.8.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 +1 -0
- package/dist/{cli-2NU2LPEE.js → cli-27M4PX7O.js} +17 -17
- package/dist/{cli-2BH7FX27.js → cli-2FXZZLCL.js} +1 -1
- package/dist/{cli-5ACDPCXI.js → cli-2KDV2DYC.js} +3 -3
- package/dist/{cli-OXAUOWCN.js → cli-2QM63J3I.js} +1 -1
- package/dist/{cli-HW53ICZC.js → cli-32NRB2IT.js} +15 -15
- package/dist/{cli-45OCBG53.js → cli-3HBYH4VF.js} +11 -11
- package/dist/{cli-4VFZHLDG.js → cli-3HPAKEJJ.js} +2 -2
- package/dist/{cli-R2MUZQE2.js → cli-3HZGJRQW.js} +11 -11
- package/dist/{cli-PGCIHPU7.js → cli-3OCKRPXI.js} +18 -18
- package/dist/{cli-64AB62PM.js → cli-3OVXQJEW.js} +2 -2
- package/dist/{cli-4UWFQNGF.js → cli-3VV2JLHX.js} +1 -1
- package/dist/{cli-XSLNH5PR.js → cli-42ZUP4X3.js} +141 -5
- package/dist/{cli-ZJFQ7EEA.js → cli-4B5OBHSY.js} +19 -19
- package/dist/{cli-7A6MKCUJ.js → cli-4EMNCU63.js} +27 -19
- package/dist/cli-5CG6BMCY.js +36 -0
- package/dist/{cli-XZCJIKIV.js → cli-5FRKWNVP.js} +19 -19
- package/dist/{cli-Y3DDNMPX.js → cli-5P66N5G6.js} +17 -17
- package/dist/{cli-6VNKQ3OX.js → cli-5SYPXJCB.js} +28 -16
- package/dist/{cli-G6CANSPL.js → cli-66AHBZRZ.js} +15 -15
- package/dist/{cli-BJMS3VX3.js → cli-6AGWTGTO.js} +106 -28
- package/dist/{cli-TTMBBEJC.js → cli-6BAZE75K.js} +18 -18
- package/dist/{cli-GFNDW2DL.js → cli-6FVHRL3H.js} +19 -19
- package/dist/{cli-QVASWX2A.js → cli-6GDPO5VU.js} +2 -2
- package/dist/{cli-7XLHO2FE.js → cli-6NBER36P.js} +1 -1
- package/dist/{cli-FQRVFGN6.js → cli-726NJARI.js} +0 -0
- package/dist/{cli-CD5CIJZI.js → cli-72DRYVTT.js} +13 -13
- package/dist/{cli-MMN4BPO4.js → cli-7CW2BBJG.js} +1 -1
- package/dist/{cli-XAT25PRU.js → cli-7GJGFILU.js} +15 -15
- package/dist/{cli-HFX3YPUL.js → cli-7NCVUM5U.js} +3 -3
- package/dist/cli-7S4G4EKK.js +110 -0
- package/dist/{cli-J4DKUUTK.js → cli-7V6GUIIS.js} +2 -2
- package/dist/{cli-N6H6T2E2.js → cli-AEAFLZGY.js} +12 -0
- package/dist/{cli-C47GJATR.js → cli-AGYCXRPR.js} +3 -3
- package/dist/{cli-XSVGKI3R.js → cli-BC4KKNLA.js} +1 -1
- package/dist/cli-BQ3FHENQ.js +16 -0
- package/dist/{cli-KGM6RRQW.js → cli-BXCCODYD.js} +20 -20
- package/dist/cli-C2XDL4LD.js +30 -0
- package/dist/{cli-MJUYJIEP.js → cli-C45A5VX6.js} +3 -3
- package/dist/{cli-DOXRQ3S5.js → cli-C7YZNPWX.js} +11 -11
- package/dist/{cli-HOE3WLFH.js → cli-CAX4CQTC.js} +13 -13
- package/dist/{cli-YOTGR3NB.js → cli-CVOLMK3Z.js} +1 -1
- package/dist/{cli-ILFDANBR.js → cli-D3CZRXVJ.js} +63 -17
- package/dist/{cli-4YB3ROVR.js → cli-DMKRP33X.js} +1 -1
- package/dist/{cli-Y3O5F4JN.js → cli-DPFN2LIZ.js} +15 -15
- package/dist/{cli-6UTPHWRQ.js → cli-DT756M3Z.js} +20 -20
- package/dist/{cli-TIDQ4WUE.js → cli-DXHPYN4N.js} +1 -1
- package/dist/{cli-6K3VQQUS.js → cli-E665NKUQ.js} +5 -5
- package/dist/{cli-O5ABH2WK.js → cli-EK7CGMGS.js} +17 -17
- package/dist/{cli-6QB2VFPY.js → cli-ESU3J563.js} +15 -15
- package/dist/{cli-VPRRICZA.js → cli-F47ELAXM.js} +47 -47
- package/dist/{cli-RLEGRWFM.js → cli-FH4WBZHA.js} +14 -14
- package/dist/{cli-3D3ZXWOV.js → cli-FHKRO6OU.js} +19 -19
- package/dist/{cli-JZCLIT3O.js → cli-FSEDPZR5.js} +19 -19
- package/dist/{cli-XOTNXEJA.js → cli-FV45UZQP.js} +19 -19
- package/dist/{cli-AV2FYC5G.js → cli-G7FX7ZIU.js} +12 -12
- package/dist/{cli-IP4RXGHM.js → cli-GFONBOJT.js} +129 -38
- package/dist/{cli-C5QOJJWX.js → cli-GHIMH6JU.js} +1 -1
- package/dist/{cli-IDVUHGKG.js → cli-HC7L5DXV.js} +15 -15
- package/dist/{cli-WU43JT4T.js → cli-HJPNNORV.js} +2 -2
- package/dist/{cli-QY5NZAR7.js → cli-HMEZHQBC.js} +17 -17
- package/dist/{cli-JZOZOEZM.js → cli-HQUVSAHY.js} +18 -18
- package/dist/{cli-MYJGMA6U.js → cli-IC5FOT2J.js} +1 -1
- package/dist/{cli-VL2P354N.js → cli-IVZ7AHUJ.js} +3 -3
- package/dist/{cli-B6YHEKIJ.js → cli-J2OTL6JH.js} +5 -5
- package/dist/{cli-Z56ZIVA6.js → cli-JA6UFTSX.js} +17 -17
- package/dist/{cli-MJV47HKI.js → cli-JOXCAGM7.js} +19 -19
- package/dist/{cli-ZBN5KAIB.js → cli-JQ6I5GGE.js} +3 -3
- package/dist/{cli-TDSQSCX4.js → cli-K6M6YB67.js} +1 -1
- package/dist/{cli-C6ZLPK2U.js → cli-KFVA7DT3.js} +3 -3
- package/dist/{cli-KOGRWFN7.js → cli-KH6FKM5A.js} +15 -15
- package/dist/{cli-5IAW3LIF.js → cli-KMT235FV.js} +2 -2
- package/dist/{cli-ZDUADFBY.js → cli-KU4PG7ZA.js} +15 -15
- package/dist/{cli-N45DREM4.js → cli-L4DEEAMK.js} +17 -17
- package/dist/{cli-MU5LB43S.js → cli-ME3JKMJL.js} +19 -19
- package/dist/{cli-C3CMJSNL.js → cli-MJ65PIYI.js} +15 -15
- package/dist/cli-MM2ROZWO.js +36 -0
- package/dist/{cli-RZITKPJX.js → cli-MN7X4UG2.js} +1 -1
- package/dist/{cli-4SIWLHQO.js → cli-MPU4FLA7.js} +4 -4
- package/dist/{cli-HCRTYQQS.js → cli-MPWTXNF6.js} +2 -2
- package/dist/{cli-EVI36HEM.js → cli-N5K2KHPR.js} +15 -15
- package/dist/{cli-RSW6EBBD.js → cli-NGOQWOQE.js} +15 -15
- package/dist/{cli-ZTWOE3ZT.js → cli-NU4SCD5D.js} +1 -1
- package/dist/{cli-BYCHKSSH.js → cli-O3IMNLN2.js} +282 -96
- package/dist/{cli-KGT5L7VZ.js → cli-OUFXSQOW.js} +7265 -4467
- package/dist/{cli-DFBTZEBX.js → cli-PEY6XZDE.js} +16 -16
- package/dist/{cli-QUSCIUOM.js → cli-PLW3TWJ7.js} +19 -19
- package/dist/{cli-JVI24FI6.js → cli-PO2ALWHP.js} +13 -13
- package/dist/{cli-3BRC32CP.js → cli-PPEB3ENS.js} +18 -18
- package/dist/{cli-ZDOTXEKL.js → cli-PZ7G544B.js} +3 -3
- package/dist/{cli-L7VYSXQK.js → cli-Q5BKFFDL.js} +4 -4
- package/dist/{cli-3ZKWV3PN.js → cli-QAI6T5FL.js} +15 -15
- package/dist/{cli-KSGB2ZLK.js → cli-QAVLRCQ5.js} +3 -3
- package/dist/{cli-VDBW23SS.js → cli-QDIH2G2P.js} +15 -15
- package/dist/cli-SN7D7HTX.js +36 -0
- package/dist/{cli-IEMKI7J7.js → cli-SOQJHK4Q.js} +6 -6
- package/dist/{cli-4PXNOJQX.js → cli-SPKPDXWD.js} +15 -15
- package/dist/{cli-MOPSZ3CS.js → cli-SWUAXVIJ.js} +15 -15
- package/dist/cli-TJNLXQJ5.js +36 -0
- package/dist/{cli-BUQI5UU4.js → cli-U2EWI6H5.js} +11 -11
- package/dist/{cli-TT36JCU5.js → cli-UADUC4JD.js} +2 -2
- package/dist/{cli-FWFRKQNE.js → cli-UR63LFVK.js} +2 -2
- package/dist/{cli-J4UBELKF.js → cli-UTHPCZYL.js} +2 -2
- package/dist/{cli-Q6ZBZYK2.js → cli-UYV3BDPA.js} +3 -3
- package/dist/{cli-LQOHATY2.js → cli-UZCQL6YP.js} +3 -3
- package/dist/{cli-HKORECAG.js → cli-V5K3CCYZ.js} +2 -2
- package/dist/cli-V7L3HEL4.js +36 -0
- package/dist/{cli-HSIHDN6K.js → cli-VBSF3R3L.js} +16 -16
- package/dist/{cli-NROTDF5Y.js → cli-VQ4OJ4KE.js} +18 -18
- package/dist/{cli-IUS2YCD3.js → cli-VTLFQHDO.js} +1 -1
- package/dist/{cli-JJSWBW4H.js → cli-W7XCTGQ7.js} +15 -15
- package/dist/{cli-UZZFNXRX.js → cli-W7Y7X3FX.js} +19 -19
- package/dist/cli-WWNTBK37.js +1973 -0
- package/dist/cli-XPJGW375.js +36 -0
- package/dist/{cli-SRHBXZCN.js → cli-Y33ULHYO.js} +1 -1
- package/dist/{cli-TTKICM5P.js → cli-YLYB4ITF.js} +13 -13
- package/dist/{cli-72XDEFU3.js → cli-ZFY6TGU7.js} +4 -4
- package/dist/{cli-6SGCYEEC.js → cli-ZSKP2IRP.js} +53 -38
- package/dist/cli.js +53 -51
- package/dist/client.js +17699 -16630
- package/dist/core/game-settings.d.ts +5 -3
- package/dist/core/save-scenario.d.ts +1 -0
- package/dist/core/session-roster.d.ts +10 -0
- package/dist/core/session-start-gate.d.ts +25 -0
- package/dist/core/session.d.ts +4 -0
- package/dist/dev/console/assets/index-CVNjiRUh.js +208 -0
- package/dist/dev/console/index.html +1 -1
- package/dist/dev/routes.d.ts +5 -2
- package/dist/dev/shell.d.ts +9 -1
- package/dist/dev/view/batch.d.ts +11 -1
- package/dist/dev/view/route.d.ts +18 -1
- package/dist/dev/view/view.d.ts +9 -0
- package/dist/docs/api/deck.md +1 -1
- package/dist/docs/api/index.md +2 -2
- package/dist/docs/api/sdk-commands.md +4 -0
- package/dist/docs/api/sdk-e2e.md +12 -6
- package/dist/docs/api/sdk-projection.md +1 -0
- package/dist/docs/api/sdk-tools-client.md +7 -1
- package/dist/docs/api/sdk-tools-playwright.md +1 -8
- package/dist/docs/api/sdk-ui-testing.md +1 -0
- package/dist/docs/api/sdk-ui.md +67 -63
- package/dist/docs/api/sdk.md +12 -1
- package/dist/docs/changelog.md +26 -0
- package/dist/docs/cli-and-dev-server.md +4 -0
- package/dist/docs/cli-error-codes.md +7 -1
- package/dist/docs/cli-reference.md +20 -2
- package/dist/docs/concepts/index.md +1 -0
- package/dist/docs/guides/engine.md +5 -0
- package/dist/docs/guides/file-handling.md +4 -1
- package/dist/docs/guides/llm-integration.md +3 -2
- package/dist/docs/guides/multi-team-games.md +2 -0
- package/dist/docs/guides/patterns.md +5 -0
- package/dist/docs/guides/presentation.md +11 -10
- package/dist/docs/guides/session-hooks.md +16 -0
- package/dist/docs/guides/session.md +1 -1
- package/dist/docs/guides/settings.md +6 -2
- package/dist/docs/guides/setup.md +23 -2
- package/dist/docs/guides/speech-generation.md +1 -0
- package/dist/docs/guides/testing.md +2 -0
- package/dist/docs/guides/tick-controller.md +2 -0
- package/dist/docs/guides/type-safety.md +2 -1
- package/dist/docs/guides/ui-files-and-llms.md +3 -1
- package/dist/docs/guides/upgrading.md +16 -0
- package/dist/docs/guides/validators.md +27 -4
- package/dist/docs/guides/waiting-room.md +2 -0
- package/dist/docs/page-index.md +12 -10
- package/dist/docs/recipes/call-endpoint-from-ui.md +1 -0
- package/dist/docs/recipes/create-scenario-editor.md +2 -1
- package/dist/docs/recipes/create-setup.md +2 -1
- package/dist/docs/recipes/declare-api-uses.md +1 -0
- package/dist/docs/recipes/describe-setup-with-endpoint.md +69 -0
- package/dist/docs/recipes/index.md +3 -1
- package/dist/docs/recipes/share-logic-between-engine-and-ui.md +2 -2
- package/dist/docs/recipes/test-user-interface.md +1 -1
- package/dist/docs/recipes/validate-scenarios.md +9 -3
- package/dist/docs/recipes/write-setup-notes.md +58 -0
- package/dist/docs/troubleshooting.md +2 -1
- package/dist/execution/executor.d.ts +12 -0
- package/dist/execution/scenario-gates.d.ts +40 -0
- package/dist/host/protocol.d.ts +10 -1
- package/dist/host.js +1083 -467
- package/dist/playwright.js +17760 -16691
- package/dist/runtime/manifest-version.d.ts +1 -1
- package/dist/runtime.js +4 -2
- package/dist/schema.json +10 -1
- package/dist/setup/setup-notes.d.ts +42 -0
- package/dist/templates/package/package.json.liquid +15 -15
- package/dist/templates/starter-game/package.json +13 -13
- package/dist/utils/error-codes.d.ts +13 -1
- package/dist/validation/package-validation.d.ts +1 -1
- package/package.json +22 -23
- package/dist/cli-2GZYGRVL.js +0 -36
- package/dist/cli-5SM367K7.js +0 -30
- package/dist/cli-DDJYUKQG.js +0 -36
- package/dist/cli-LK3V4RI5.js +0 -36
- package/dist/cli-N24OHSAN.js +0 -36
- package/dist/cli-OMWC75CC.js +0 -256
- package/dist/cli-RCIWBCXD.js +0 -36
- package/dist/cli-UMEBPAZQ.js +0 -16
- package/dist/cli-VQ6HVQW4.js +0 -4010
- package/dist/cli-WR3NOY74.js +0 -36
- package/dist/dev/console/assets/index-CuMOOH9m.js +0 -204
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/assets/icon-CRaj5uhr.svg" />
|
|
7
7
|
<title>Serious Gaming</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CVNjiRUh.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-q6-lvlN3.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/dev/routes.d.ts
CHANGED
|
@@ -30,8 +30,11 @@ export interface RouteDeps {
|
|
|
30
30
|
settleWalkthroughReset: (command: Command) => Promise<MutationResult>;
|
|
31
31
|
packagePath: string;
|
|
32
32
|
vitePort: () => number;
|
|
33
|
-
/**
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The origin bundles are served from, as seen by a client that reached
|
|
35
|
+
* `host`; `local` for one that asked for this server's own origins.
|
|
36
|
+
*/
|
|
37
|
+
assetOrigin: (host: string | undefined, local: boolean) => string;
|
|
35
38
|
/** This server, as its lock names it, so a reused port is not taken for it. */
|
|
36
39
|
instanceId: string;
|
|
37
40
|
/** What the server could not apply live to a run, for the CLI to say (#640). */
|
package/dist/dev/shell.d.ts
CHANGED
|
@@ -202,8 +202,11 @@ export declare class DevShell {
|
|
|
202
202
|
* public one where given, else the same host on the asset port. A browser
|
|
203
203
|
* on another machine reached us by an address `localhost` would not
|
|
204
204
|
* resolve to on its side.
|
|
205
|
+
*
|
|
206
|
+
* `local` skips the public one, for a client that has said it runs here
|
|
207
|
+
* (`?local-origins`): it may not reach the proxy in front of us at all.
|
|
205
208
|
*/
|
|
206
|
-
assetOrigin(host: string | undefined): string;
|
|
209
|
+
assetOrigin(host: string | undefined, local?: boolean): string;
|
|
207
210
|
/** The console's own origin, as a client that reached `host` names it. */
|
|
208
211
|
private consoleOrigin;
|
|
209
212
|
/** Where a frame's hot-reload client connects, when a public origin decides it. */
|
|
@@ -306,6 +309,11 @@ export declare class DevShell {
|
|
|
306
309
|
* somebody else, another surface, or a command its surface may not send.
|
|
307
310
|
*/
|
|
308
311
|
private receiveView;
|
|
312
|
+
/**
|
|
313
|
+
* Join from the session link's page (§13.4): the session places the
|
|
314
|
+
* newcomer, and the page is sent on to the participant it made.
|
|
315
|
+
*/
|
|
316
|
+
private joinThroughSessionLink;
|
|
309
317
|
private broadcast;
|
|
310
318
|
/**
|
|
311
319
|
* Say what went wrong where the author is actually looking.
|
package/dist/dev/view/batch.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { HostOverlay, ResolvedPackageManifest } from '@seriousgaming/sdk';
|
|
15
15
|
import type { StateProjection } from '@seriousgaming/sdk/projection';
|
|
16
|
-
import type { CrossTeamData, SessionData, TeamConfiguration, TeamLinks, WalkthroughLink } from '@seriousgaming/sdk/ui';
|
|
16
|
+
import type { CrossTeamData, SessionData, TeamConfiguration, TeamLinks, SessionJoinLink, WalkthroughLink } from '@seriousgaming/sdk/ui';
|
|
17
17
|
import type { ViewerRole } from '../../core/protocol';
|
|
18
18
|
import type { HostMessage } from '../../host';
|
|
19
19
|
import type { MountableSurface } from '../surfaces';
|
|
@@ -170,6 +170,16 @@ export declare const PRESENTATION_OVERLAY = "presentation-overlay";
|
|
|
170
170
|
* is no `fallbackJoinUrl`: one origin, one form of the link.
|
|
171
171
|
*/
|
|
172
172
|
export declare function teamLinks(state: StateProjection, origin: string): TeamLinks[];
|
|
173
|
+
/**
|
|
174
|
+
* The session's one join link (§13.4), or `null` where it offers none: a game
|
|
175
|
+
* whose `teams.sessionJoin` is false, and a walkthrough, which holds one
|
|
176
|
+
* participant and so has nobody to place.
|
|
177
|
+
*
|
|
178
|
+
* Like a team's, it is a route that resolves, and with no PIN and no account
|
|
179
|
+
* here, no `fallbackJoinUrl` either. Which team it places somebody in is this
|
|
180
|
+
* host's own rule (see `SessionRoster.joinSession`), not the specification's.
|
|
181
|
+
*/
|
|
182
|
+
export declare function sessionJoinLink(state: StateProjection, origin: string): SessionJoinLink | null;
|
|
173
183
|
/** The mode and the **effective** bounds a surface gates its controls on (§5.4). */
|
|
174
184
|
export declare function teamConfiguration(state: StateProjection): TeamConfiguration;
|
|
175
185
|
/**
|
package/dist/dev/view/route.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ import type { RunKind } from '@seriousgaming/sdk';
|
|
|
16
16
|
* facilitator hands out, and it asks which participant you are — or, when the
|
|
17
17
|
* team holds one, simply opens as them.
|
|
18
18
|
*
|
|
19
|
+
* `/join` is the session's one join link (§13.4): it names no team, and
|
|
20
|
+
* pressing Join places you in one and creates your participant there, then
|
|
21
|
+
* sends you to that participant's own addressable page. Reloading that page
|
|
22
|
+
* keeps you; opening `/join` again is somebody new, which is how an author
|
|
23
|
+
* plays out a room arriving.
|
|
24
|
+
*
|
|
19
25
|
* `/walkthrough` names the walkthrough run's play surface (§5.7). It takes no
|
|
20
26
|
* team or participant because a walkthrough holds one of each, so there is
|
|
21
27
|
* nothing to choose: it is the view you put on the projector while you talk the
|
|
@@ -24,7 +30,7 @@ import type { RunKind } from '@seriousgaming/sdk';
|
|
|
24
30
|
* `/presentation` is the facilitator's deck (§6.15), and `?preview` shows it as
|
|
25
31
|
* it looks with no session: in a library, or exported before the day.
|
|
26
32
|
*/
|
|
27
|
-
export type RouteKind = 'console' | 'player' | 'observer' | 'join' | 'waiting-room' | 'setup' | 'scenario-editor' | 'guide' | 'print' | 'presentation';
|
|
33
|
+
export type RouteKind = 'console' | 'player' | 'observer' | 'join' | 'session-join' | 'waiting-room' | 'setup' | 'scenario-editor' | 'guide' | 'print' | 'presentation';
|
|
28
34
|
export interface Route {
|
|
29
35
|
kind: RouteKind;
|
|
30
36
|
/**
|
|
@@ -50,6 +56,17 @@ export interface Route {
|
|
|
50
56
|
/** Show a presentation as if there were no session (§6.15). */
|
|
51
57
|
preview?: boolean;
|
|
52
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The flag `sdk screenshot` sets on the page it opens. It runs on the
|
|
61
|
+
* server's own machine, which may not reach the public origins a proxy put in
|
|
62
|
+
* front, and the server cannot tell it apart from a proxied browser by its
|
|
63
|
+
* `Host` (a sandbox rewrites every one to `localhost`), so it says so.
|
|
64
|
+
*/
|
|
65
|
+
export declare const LOCAL_ORIGINS_FLAG = "local-origins";
|
|
66
|
+
/** Whether a query asks for the server's own origins rather than its public ones. */
|
|
67
|
+
export declare function wantsLocalOrigins(search: string): boolean;
|
|
68
|
+
/** `path` with the flag carried over from a page's query, so its requests ask as it did. */
|
|
69
|
+
export declare function forwardLocalOrigins(path: string, pageSearch: string): string;
|
|
53
70
|
export declare function parseRoute(pathname: string, search: string): Route;
|
|
54
71
|
/** The URL for a route, so the console links rather than constructs by hand. */
|
|
55
72
|
export declare function routeHref(route: Omit<Route, 'bare' | 'run'> & {
|
package/dist/dev/view/view.d.ts
CHANGED
|
@@ -47,6 +47,15 @@ export type ViewPage = {
|
|
|
47
47
|
} | {
|
|
48
48
|
status: 'join';
|
|
49
49
|
team: JoinTeam | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The session link's page (§13.4). `offered` is false where the session
|
|
53
|
+
* has none to follow: a game whose `teams.sessionJoin` is false, or a
|
|
54
|
+
* walkthrough.
|
|
55
|
+
*/
|
|
56
|
+
| {
|
|
57
|
+
status: 'session-join';
|
|
58
|
+
offered: boolean;
|
|
50
59
|
} | {
|
|
51
60
|
status: 'redirect';
|
|
52
61
|
href: string;
|
package/dist/docs/api/deck.md
CHANGED
package/dist/docs/api/index.md
CHANGED
|
@@ -6,8 +6,8 @@ Every type, function, hook and component your game imports, one page per entry p
|
|
|
6
6
|
|
|
7
7
|
| Entry point | Exports |
|
|
8
8
|
| ------------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
9
|
-
| [`@seriousgaming/sdk`](./sdk.md) | 12 functions, 3 classes, 1 constant, 100 interfaces,
|
|
10
|
-
| [`@seriousgaming/sdk/ui`](./sdk-ui.md) |
|
|
9
|
+
| [`@seriousgaming/sdk`](./sdk.md) | 12 functions, 3 classes, 1 constant, 100 interfaces, 49 types |
|
|
10
|
+
| [`@seriousgaming/sdk/ui`](./sdk-ui.md) | 50 functions, 3 classes, 40 constants, 26 interfaces, 38 types |
|
|
11
11
|
| [`@seriousgaming/sdk/ui/testing`](./sdk-ui-testing.md) | 14 functions, 6 types |
|
|
12
12
|
| [`@seriousgaming/sdk/testing`](./sdk-testing.md) | 8 functions, 4 constants, 8 types |
|
|
13
13
|
| [`@seriousgaming/sdk/projection`](./sdk-projection.md) | 1 constant, 8 interfaces, 3 types |
|
package/dist/docs/api/sdk-e2e.md
CHANGED
|
@@ -103,18 +103,19 @@ Selectors and URLs for the dev console.
|
|
|
103
103
|
const DEV_SERVER: {
|
|
104
104
|
readonly DEFAULT_PORT: 3000;
|
|
105
105
|
readonly selectors: {
|
|
106
|
-
readonly devDrawerHandle:
|
|
107
|
-
readonly devDrawer:
|
|
108
|
-
readonly localeSelect:
|
|
109
|
-
readonly play:
|
|
110
|
-
readonly guideContent:
|
|
111
|
-
readonly printSheets:
|
|
106
|
+
readonly devDrawerHandle: "[data-testid=\"dev-drawer-handle\"]";
|
|
107
|
+
readonly devDrawer: "[data-testid=\"dev-drawer\"]";
|
|
108
|
+
readonly localeSelect: "[data-testid=\"locale\"]";
|
|
109
|
+
readonly play: "[data-testid=\"play\"]";
|
|
110
|
+
readonly guideContent: "[data-testid=\"guide-content\"]";
|
|
111
|
+
readonly printSheets: "[data-testid=\"print-sheets\"]";
|
|
112
112
|
};
|
|
113
113
|
readonly consoleUrl: () => string;
|
|
114
114
|
readonly playerUrl: (team: number, participant?: number) => string;
|
|
115
115
|
readonly observeUrl: (team: number) => string;
|
|
116
116
|
readonly waitingRoomUrl: (team: number) => string;
|
|
117
117
|
readonly joinUrl: (team: number) => string;
|
|
118
|
+
readonly sessionJoinUrl: () => string;
|
|
118
119
|
readonly setupUrl: () => string;
|
|
119
120
|
readonly scenarioEditorUrl: (scenario: string) => string;
|
|
120
121
|
readonly guideUrl: () => string;
|
|
@@ -292,6 +293,10 @@ type MutationCommand =
|
|
|
292
293
|
teamId: string;
|
|
293
294
|
name?: string;
|
|
294
295
|
}
|
|
296
|
+
| {
|
|
297
|
+
type: 'joinSession';
|
|
298
|
+
name?: string;
|
|
299
|
+
}
|
|
295
300
|
| {
|
|
296
301
|
type: 'renameParticipant';
|
|
297
302
|
participantId: string;
|
|
@@ -352,6 +357,7 @@ type MutationResult =
|
|
|
352
357
|
| {
|
|
353
358
|
ok: true;
|
|
354
359
|
committedAtTick?: number;
|
|
360
|
+
warnings?: string[];
|
|
355
361
|
}
|
|
356
362
|
| {
|
|
357
363
|
ok: false;
|
|
@@ -12,9 +12,10 @@ server already running for the package, for browser tests and recordings.
|
|
|
12
12
|
@example
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
|
-
import { createTestSession } from '@seriousgaming/sdk-tools/client';
|
|
16
15
|
import { fileURLToPath } from 'url';
|
|
17
16
|
|
|
17
|
+
import { createTestSession } from '@seriousgaming/sdk-tools/client';
|
|
18
|
+
|
|
18
19
|
const session = await createTestSession({
|
|
19
20
|
packagePath: fileURLToPath(new URL('../..', import.meta.url)),
|
|
20
21
|
});
|
|
@@ -419,6 +420,10 @@ type MutationCommand =
|
|
|
419
420
|
teamId: string;
|
|
420
421
|
name?: string;
|
|
421
422
|
}
|
|
423
|
+
| {
|
|
424
|
+
type: 'joinSession';
|
|
425
|
+
name?: string;
|
|
426
|
+
}
|
|
422
427
|
| {
|
|
423
428
|
type: 'renameParticipant';
|
|
424
429
|
participantId: string;
|
|
@@ -479,6 +484,7 @@ type MutationResult =
|
|
|
479
484
|
| {
|
|
480
485
|
ok: true;
|
|
481
486
|
committedAtTick?: number;
|
|
487
|
+
warnings?: string[];
|
|
482
488
|
}
|
|
483
489
|
| {
|
|
484
490
|
ok: false;
|
|
@@ -60,14 +60,7 @@ const expect: Expect<{}>;
|
|
|
60
60
|
Playwright's `test`, with an isolated dev server started for each worker.
|
|
61
61
|
|
|
62
62
|
```ts
|
|
63
|
-
const test: import(
|
|
64
|
-
import('@playwright/test').PlaywrightTestArgs &
|
|
65
|
-
import('@playwright/test').PlaywrightTestOptions &
|
|
66
|
-
object,
|
|
67
|
-
import('@playwright/test').PlaywrightWorkerArgs &
|
|
68
|
-
import('@playwright/test').PlaywrightWorkerOptions &
|
|
69
|
-
DevServerWorkerFixtures
|
|
70
|
-
>;
|
|
63
|
+
const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & object, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & DevServerWorkerFixtures>;
|
|
71
64
|
```
|
|
72
65
|
|
|
73
66
|
## Interfaces
|
|
@@ -168,6 +168,7 @@ type RenderSessionUserInterfaceOptions<
|
|
|
168
168
|
teamLinks?: TeamLinks[];
|
|
169
169
|
runKind?: RunKind;
|
|
170
170
|
walkthroughLink?: WalkthroughLink | null;
|
|
171
|
+
sessionJoinLink?: SessionJoinLink | null;
|
|
171
172
|
hostOverlays?: HostOverlay[];
|
|
172
173
|
hookFailures?: SessionHookFailure[];
|
|
173
174
|
clearHookFailures?: () => void;
|