@team-antioch/sc2-adjutant 0.1.0 → 0.1.1
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/README.md +2 -0
- package/data/blizzard-baseline.json +3061 -0
- package/data/button-hotkeys.json +5722 -0
- package/data/game-assets.json +50909 -0
- package/data/package-entries.json +32361 -2
- package/dist/capture/bank-fixtures.d.ts +13 -0
- package/dist/capture/bank-fixtures.js +35 -0
- package/dist/capture/bank-snapshots.d.ts +95 -0
- package/dist/capture/bank-snapshots.js +302 -0
- package/dist/capture/editor-broker-client.d.ts +27 -4
- package/dist/capture/editor-broker-client.js +3 -3
- package/dist/capture/editor-broker.js +154 -9
- package/dist/capture/effect-tour.d.ts +113 -0
- package/dist/capture/effect-tour.js +283 -0
- package/dist/capture/effect-video.d.ts +74 -0
- package/dist/capture/effect-video.js +173 -0
- package/dist/capture/exemplar-capture.d.ts +4 -0
- package/dist/capture/exemplar-capture.js +4 -1
- package/dist/capture/shots.d.ts +6 -1
- package/dist/capture/shots.js +1 -1
- package/dist/capture/stop-tour.d.ts +3 -1
- package/dist/capture/stop-tour.js +1 -1
- package/dist/capture/style-pack-captures.d.ts +67 -0
- package/dist/capture/style-pack-captures.js +172 -0
- package/dist/catalog/stock-catalog.d.ts +8 -0
- package/dist/catalog/stock-catalog.js +13 -0
- package/dist/cli/capture-exemplars.js +18 -32
- package/dist/cli/effect-tour.d.ts +2 -0
- package/dist/cli/effect-tour.js +378 -0
- package/dist/cli/make-frames.d.ts +1 -0
- package/dist/cli/make-frames.js +21 -0
- package/dist/cli/sound-mix.d.ts +1 -0
- package/dist/cli/sound-mix.js +75 -0
- package/dist/cli/study.js +6 -26
- package/dist/domain/blueprint-trigger.d.ts +355 -3
- package/dist/domain/blueprint-trigger.js +149 -8
- package/dist/domain/library-interface.d.ts +50 -29
- package/dist/domain/library-interface.js +54 -41
- package/dist/domain/mission-blueprint.d.ts +13 -6
- package/dist/domain/mission-blueprint.js +6 -0
- package/dist/domain/mod-blueprint.d.ts +4 -4
- package/dist/host/game-logs.d.ts +63 -0
- package/dist/host/game-logs.js +178 -0
- package/dist/host/game-ownership.d.ts +37 -0
- package/dist/host/game-ownership.js +84 -0
- package/dist/host/game-run-report.d.ts +63 -0
- package/dist/host/game-run-report.js +119 -0
- package/dist/host/known-errors.d.ts +34 -0
- package/dist/host/known-errors.js +73 -0
- package/dist/init/init-workspace.d.ts +3 -1
- package/dist/init/init-workspace.js +10 -1
- package/dist/map/convert-mission-triggers.d.ts +115 -7
- package/dist/map/convert-mission-triggers.js +527 -47
- package/dist/map/editor-changes.d.ts +1 -1
- package/dist/map/editor-form.d.ts +5 -0
- package/dist/map/editor-form.js +72 -0
- package/dist/map/game-packages.d.ts +3 -2
- package/dist/map/game-packages.js +5 -2
- package/dist/map/kept-references.js +47 -1
- package/dist/map/kept-session.js +3 -1
- package/dist/map/outline-diff.d.ts +24 -0
- package/dist/map/outline-diff.js +95 -0
- package/dist/map/outline-trigger.d.ts +7 -0
- package/dist/map/outline-trigger.js +29 -20
- package/dist/map/ownership-plan.d.ts +6 -2
- package/dist/map/ownership-plan.js +1 -1
- package/dist/map/package-output.js +13 -8
- package/dist/map/tune-kept-triggers.d.ts +7 -0
- package/dist/map/tune-kept-triggers.js +33 -6
- package/dist/map/write-blueprint-trigger.d.ts +9 -4
- package/dist/map/write-blueprint-trigger.js +46 -13
- package/dist/map/write-map-package.js +20 -9
- package/dist/mcp/capture-jobs.d.ts +2 -0
- package/dist/mcp/capture-jobs.js +2 -0
- package/dist/mcp/server.d.ts +11 -2
- package/dist/mcp/server.js +17 -4
- package/dist/mcp/tools/bank-report.d.ts +19 -0
- package/dist/mcp/tools/bank-report.js +51 -0
- package/dist/mcp/tools/blueprint.js +18 -14
- package/dist/mcp/tools/capture.d.ts +4 -0
- package/dist/mcp/tools/capture.js +22 -5
- package/dist/mcp/tools/catalog.d.ts +1 -1
- package/dist/mcp/tools/catalog.js +30 -1
- package/dist/mcp/tools/compile.d.ts +1 -1
- package/dist/mcp/tools/compile.js +100 -9
- package/dist/mcp/tools/editor-handoff.d.ts +4 -1
- package/dist/mcp/tools/editor-handoff.js +6 -3
- package/dist/mcp/tools/style-pack.d.ts +11 -0
- package/dist/mcp/tools/style-pack.js +245 -0
- package/dist/mcp/tools/tool-group.d.ts +9 -0
- package/dist/mods/button-hotkeys.d.ts +45 -0
- package/dist/mods/button-hotkeys.js +185 -0
- package/dist/mods/compile-mod.js +19 -5
- package/dist/mods/custom-doodads.d.ts +21 -1
- package/dist/mods/custom-doodads.js +53 -7
- package/dist/mods/data-rules.js +8 -1
- package/dist/mods/effective-entry.d.ts +18 -0
- package/dist/mods/effective-entry.js +52 -0
- package/dist/mods/function-search.js +12 -0
- package/dist/mods/library-xml.d.ts +34 -5
- package/dist/mods/library-xml.js +94 -22
- package/dist/mods/sound-mix.d.ts +92 -0
- package/dist/mods/sound-mix.js +195 -0
- package/dist/plugins/check-workspace.js +22 -3
- package/dist/plugins/plugin-api.d.ts +59 -5
- package/dist/plugins/plugin-api.js +6 -0
- package/dist/plugins/plugin-sdk.d.ts +13 -1
- package/dist/plugins/plugin-sdk.js +16 -1
- package/dist/plugins/plugin-sources.js +1 -0
- package/dist/plugins/registry.d.ts +4 -0
- package/dist/plugins/registry.js +6 -2
- package/dist/plugins/workspace.d.ts +5 -0
- package/dist/plugins/workspace.js +10 -2
- package/dist/study/blizzard-baseline.d.ts +76 -0
- package/dist/study/blizzard-baseline.js +137 -0
- package/dist/study/exemplar-report.d.ts +71 -0
- package/dist/study/exemplar-report.js +163 -0
- package/dist/study/find-places.d.ts +127 -0
- package/dist/study/find-places.js +306 -0
- package/dist/study/load-map-package.d.ts +3 -0
- package/dist/study/load-map-package.js +11 -0
- package/dist/study/map-study.d.ts +1 -0
- package/dist/study/map-study.js +3 -0
- package/dist/study/measure-lighting.d.ts +6 -0
- package/dist/study/measure-lighting.js +1 -1
- package/dist/study/measures.d.ts +225 -0
- package/dist/study/measures.js +366 -0
- package/dist/study/scaffold-style-pack.d.ts +58 -0
- package/dist/study/scaffold-style-pack.js +261 -0
- package/dist/study/study-exemplars.d.ts +67 -0
- package/dist/study/study-exemplars.js +133 -0
- package/dist/triggers/blueprint-triggers.d.ts +71 -11
- package/dist/triggers/blueprint-triggers.js +403 -48
- package/dist/triggers/kept-trigger-galaxy.d.ts +29 -0
- package/dist/triggers/kept-trigger-galaxy.js +103 -7
- package/dist/triggers/splice-map-script.d.ts +2 -0
- package/dist/triggers/splice-map-script.js +309 -8
- package/dist/triggers/write-triggers-xml.js +20 -5
- package/dist/ui/frame-path-check.d.ts +43 -4
- package/dist/ui/frame-path-check.js +121 -13
- package/dist/ui/frame-paths.d.ts +21 -1
- package/dist/ui/frame-paths.js +26 -6
- package/dist/ui/toast.d.ts +4 -5
- package/dist/ui/toast.js +6 -10
- package/examples/example-campaign/README.md +27 -0
- package/examples/example-campaign/missions/ashfall-relay/blueprint.json +11 -1
- package/examples/example-campaign/missions/ashfall-relay/triggers/ash-tremors.json +69 -0
- package/examples/example-campaign/missions/ashfall-relay/triggers/start-ash-tremors.json +31 -0
- package/package.json +3 -3
|
@@ -5,21 +5,23 @@ export declare const ElementId: z.ZodString;
|
|
|
5
5
|
export declare const ElementRef: z.ZodString;
|
|
6
6
|
/** A library id, as `<Library Id="…">` gives it and Galaxy names it (lib<id>_gf_…). */
|
|
7
7
|
export declare const LibraryId: z.ZodString;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* A reference in a map's GUI tree: a library's element as `<library>/<id>` (Ntve/00000136), or the
|
|
10
|
+
* map's own by its Id alone (a Kept or Blueprint function, as the Editor writes it with no Library).
|
|
11
|
+
*/
|
|
12
|
+
export declare const MapElementRef: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
13
|
+
/** A parameter's or return value's type, a library's. */
|
|
9
14
|
export declare const TypeSpecSchema: z.ZodObject<{
|
|
10
15
|
type: z.ZodString;
|
|
11
|
-
element: z.ZodOptional<z.
|
|
16
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
12
17
|
gameType: z.ZodOptional<z.ZodString>;
|
|
13
18
|
assetType: z.ZodOptional<z.ZodString>;
|
|
14
19
|
userType: z.ZodOptional<z.ZodString>;
|
|
15
20
|
}, z.core.$strict>;
|
|
16
|
-
/**
|
|
17
|
-
* A variable's type (`<VariableType>`): a parameter's or return value's type, and whether it is
|
|
18
|
-
* constant or an array, which only a variable is.
|
|
19
|
-
*/
|
|
21
|
+
/** A variable's type, a library's: a parameter's or return value's, and whether it is constant or an array, which only a variable is. */
|
|
20
22
|
export declare const VariableTypeSpecSchema: z.ZodObject<{
|
|
21
23
|
type: z.ZodString;
|
|
22
|
-
element: z.ZodOptional<z.
|
|
24
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
23
25
|
gameType: z.ZodOptional<z.ZodString>;
|
|
24
26
|
assetType: z.ZodOptional<z.ZodString>;
|
|
25
27
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -27,9 +29,32 @@ export declare const VariableTypeSpecSchema: z.ZodObject<{
|
|
|
27
29
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
28
30
|
size: z.ZodNumber;
|
|
29
31
|
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
-
variable: z.
|
|
32
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
31
33
|
}, z.core.$strict>]>>>;
|
|
32
34
|
}, z.core.$strict>;
|
|
35
|
+
/** The types of a map's own elements (a Mission Blueprint's): a preset type, structure or array size of the map's own by its Id alone. */
|
|
36
|
+
export declare const MAP_TYPES: {
|
|
37
|
+
TypeSpecSchema: z.ZodObject<{
|
|
38
|
+
type: z.ZodString;
|
|
39
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
40
|
+
gameType: z.ZodOptional<z.ZodString>;
|
|
41
|
+
assetType: z.ZodOptional<z.ZodString>;
|
|
42
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
VariableTypeSpecSchema: z.ZodObject<{
|
|
45
|
+
type: z.ZodString;
|
|
46
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
47
|
+
gameType: z.ZodOptional<z.ZodString>;
|
|
48
|
+
assetType: z.ZodOptional<z.ZodString>;
|
|
49
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
50
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
52
|
+
size: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
55
|
+
}, z.core.$strict>]>>>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
};
|
|
33
58
|
/** A type as the writers take it: a variable's, which a parameter's or return value's is without its constant and sizes. */
|
|
34
59
|
export type TypeSpec = z.infer<typeof VariableTypeSpecSchema>;
|
|
35
60
|
/** One dimension of an array variable's size. */
|
|
@@ -171,7 +196,7 @@ export declare const GuiVariableSchema: z.ZodObject<{
|
|
|
171
196
|
identifier: z.ZodOptional<z.ZodString>;
|
|
172
197
|
type: z.ZodObject<{
|
|
173
198
|
type: z.ZodString;
|
|
174
|
-
element: z.ZodOptional<z.
|
|
199
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
175
200
|
gameType: z.ZodOptional<z.ZodString>;
|
|
176
201
|
assetType: z.ZodOptional<z.ZodString>;
|
|
177
202
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -179,7 +204,7 @@ export declare const GuiVariableSchema: z.ZodObject<{
|
|
|
179
204
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
180
205
|
size: z.ZodNumber;
|
|
181
206
|
}, z.core.$strict>, z.ZodObject<{
|
|
182
|
-
variable: z.
|
|
207
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
183
208
|
}, z.core.$strict>]>>>;
|
|
184
209
|
}, z.core.$strict>;
|
|
185
210
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -188,15 +213,11 @@ export declare const GuiVariableSchema: z.ZodObject<{
|
|
|
188
213
|
readonly id: string;
|
|
189
214
|
} & GuiValue, unknown>>>;
|
|
190
215
|
}, z.core.$strict>;
|
|
191
|
-
/**
|
|
192
|
-
* A reference in a map's GUI tree: a library's element as `<library>/<id>` (Ntve/00000136), or the
|
|
193
|
-
* map's own by its Id alone (a Kept or Blueprint function, as the Editor writes it with no Library).
|
|
194
|
-
*/
|
|
195
|
-
export declare const MapElementRef: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
196
216
|
/**
|
|
197
217
|
* The GUI tree's schemas for a map's own elements (a Mission Blueprint's triggers): the map's own
|
|
198
218
|
* references are bare Ids, and a variable may be a library's global, or a member of a library's
|
|
199
|
-
* structure, as `<library>/<id>` (Cmpn/E5539606), as the Editor writes it with its Library
|
|
219
|
+
* structure, as `<library>/<id>` (Cmpn/E5539606), as the Editor writes it with its Library; a
|
|
220
|
+
* variable's type may name the map's own preset type, structure or constant by its Id.
|
|
200
221
|
*/
|
|
201
222
|
export declare const MAP_GUI: {
|
|
202
223
|
GuiValueSchema: z.ZodType<GuiValue, unknown, z.core.$ZodTypeInternals<GuiValue, unknown>>;
|
|
@@ -220,7 +241,7 @@ export declare const MAP_GUI: {
|
|
|
220
241
|
identifier: z.ZodOptional<z.ZodString>;
|
|
221
242
|
type: z.ZodObject<{
|
|
222
243
|
type: z.ZodString;
|
|
223
|
-
element: z.ZodOptional<z.
|
|
244
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
224
245
|
gameType: z.ZodOptional<z.ZodString>;
|
|
225
246
|
assetType: z.ZodOptional<z.ZodString>;
|
|
226
247
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -228,7 +249,7 @@ export declare const MAP_GUI: {
|
|
|
228
249
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
229
250
|
size: z.ZodNumber;
|
|
230
251
|
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
-
variable: z.
|
|
252
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
232
253
|
}, z.core.$strict>]>>>;
|
|
233
254
|
}, z.core.$strict>;
|
|
234
255
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -247,7 +268,7 @@ export declare const GuiBodySchema: z.ZodObject<{
|
|
|
247
268
|
identifier: z.ZodOptional<z.ZodString>;
|
|
248
269
|
type: z.ZodObject<{
|
|
249
270
|
type: z.ZodString;
|
|
250
|
-
element: z.ZodOptional<z.
|
|
271
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
251
272
|
gameType: z.ZodOptional<z.ZodString>;
|
|
252
273
|
assetType: z.ZodOptional<z.ZodString>;
|
|
253
274
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -255,7 +276,7 @@ export declare const GuiBodySchema: z.ZodObject<{
|
|
|
255
276
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
256
277
|
size: z.ZodNumber;
|
|
257
278
|
}, z.core.$strict>, z.ZodObject<{
|
|
258
|
-
variable: z.
|
|
279
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
259
280
|
}, z.core.$strict>]>>>;
|
|
260
281
|
}, z.core.$strict>;
|
|
261
282
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -280,7 +301,7 @@ export declare const LibraryParameterSchema: z.ZodObject<{
|
|
|
280
301
|
identifier: z.ZodOptional<z.ZodString>;
|
|
281
302
|
type: z.ZodObject<{
|
|
282
303
|
type: z.ZodString;
|
|
283
|
-
element: z.ZodOptional<z.
|
|
304
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
284
305
|
gameType: z.ZodOptional<z.ZodString>;
|
|
285
306
|
assetType: z.ZodOptional<z.ZodString>;
|
|
286
307
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -334,7 +355,7 @@ export declare const LibraryFunctionSchema: z.ZodObject<{
|
|
|
334
355
|
internal: z.ZodOptional<z.ZodBoolean>;
|
|
335
356
|
returns: z.ZodOptional<z.ZodObject<{
|
|
336
357
|
type: z.ZodString;
|
|
337
|
-
element: z.ZodOptional<z.
|
|
358
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
338
359
|
gameType: z.ZodOptional<z.ZodString>;
|
|
339
360
|
assetType: z.ZodOptional<z.ZodString>;
|
|
340
361
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -345,7 +366,7 @@ export declare const LibraryFunctionSchema: z.ZodObject<{
|
|
|
345
366
|
identifier: z.ZodOptional<z.ZodString>;
|
|
346
367
|
type: z.ZodObject<{
|
|
347
368
|
type: z.ZodString;
|
|
348
|
-
element: z.ZodOptional<z.
|
|
369
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
349
370
|
gameType: z.ZodOptional<z.ZodString>;
|
|
350
371
|
assetType: z.ZodOptional<z.ZodString>;
|
|
351
372
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -438,7 +459,7 @@ export declare const LibraryStructureSchema: z.ZodObject<{
|
|
|
438
459
|
identifier: z.ZodOptional<z.ZodString>;
|
|
439
460
|
type: z.ZodObject<{
|
|
440
461
|
type: z.ZodString;
|
|
441
|
-
element: z.ZodOptional<z.
|
|
462
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
442
463
|
gameType: z.ZodOptional<z.ZodString>;
|
|
443
464
|
assetType: z.ZodOptional<z.ZodString>;
|
|
444
465
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -446,7 +467,7 @@ export declare const LibraryStructureSchema: z.ZodObject<{
|
|
|
446
467
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
447
468
|
size: z.ZodNumber;
|
|
448
469
|
}, z.core.$strict>, z.ZodObject<{
|
|
449
|
-
variable: z.
|
|
470
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
450
471
|
}, z.core.$strict>]>>>;
|
|
451
472
|
}, z.core.$strict>;
|
|
452
473
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -523,7 +544,7 @@ export declare const LibraryInterfaceSchema: z.ZodObject<{
|
|
|
523
544
|
internal: z.ZodOptional<z.ZodBoolean>;
|
|
524
545
|
returns: z.ZodOptional<z.ZodObject<{
|
|
525
546
|
type: z.ZodString;
|
|
526
|
-
element: z.ZodOptional<z.
|
|
547
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
527
548
|
gameType: z.ZodOptional<z.ZodString>;
|
|
528
549
|
assetType: z.ZodOptional<z.ZodString>;
|
|
529
550
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -534,7 +555,7 @@ export declare const LibraryInterfaceSchema: z.ZodObject<{
|
|
|
534
555
|
identifier: z.ZodOptional<z.ZodString>;
|
|
535
556
|
type: z.ZodObject<{
|
|
536
557
|
type: z.ZodString;
|
|
537
|
-
element: z.ZodOptional<z.
|
|
558
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
538
559
|
gameType: z.ZodOptional<z.ZodString>;
|
|
539
560
|
assetType: z.ZodOptional<z.ZodString>;
|
|
540
561
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -587,7 +608,7 @@ export declare const LibraryInterfaceSchema: z.ZodObject<{
|
|
|
587
608
|
identifier: z.ZodOptional<z.ZodString>;
|
|
588
609
|
type: z.ZodObject<{
|
|
589
610
|
type: z.ZodString;
|
|
590
|
-
element: z.ZodOptional<z.
|
|
611
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
591
612
|
gameType: z.ZodOptional<z.ZodString>;
|
|
592
613
|
assetType: z.ZodOptional<z.ZodString>;
|
|
593
614
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -595,7 +616,7 @@ export declare const LibraryInterfaceSchema: z.ZodObject<{
|
|
|
595
616
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
596
617
|
size: z.ZodNumber;
|
|
597
618
|
}, z.core.$strict>, z.ZodObject<{
|
|
598
|
-
variable: z.
|
|
619
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
599
620
|
}, z.core.$strict>]>>>;
|
|
600
621
|
}, z.core.$strict>;
|
|
601
622
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -20,39 +20,55 @@ export const ElementId = z.string().regex(/^[0-9A-F]{8}$/, "An element id is eig
|
|
|
20
20
|
export const ElementRef = z.string().regex(/^[A-Za-z0-9]+\/[0-9A-F]{8}$/, "A reference is <library>/<id>, such as Ntve/00000136");
|
|
21
21
|
/** A library id, as `<Library Id="…">` gives it and Galaxy names it (lib<id>_gf_…). */
|
|
22
22
|
export const LibraryId = z.string().regex(/^[A-Za-z][A-Za-z0-9]*$/, "A library id is letters and digits, starting with a letter");
|
|
23
|
-
/** A parameter's, variable's or return value's type: `<Type Value>`, with the preset type, game link catalog and so on it names. */
|
|
24
|
-
export const TypeSpecSchema = z
|
|
25
|
-
.object({
|
|
26
|
-
type: z.string().min(1),
|
|
27
|
-
/** A preset type or structure (TypeElement), as `<library>/<id>`. */
|
|
28
|
-
element: ElementRef.optional(),
|
|
29
|
-
/** A game link's catalog (GameType), such as Character. */
|
|
30
|
-
gameType: z.string().min(1).optional(),
|
|
31
|
-
/** An asset's type (AssetType). */
|
|
32
|
-
assetType: z.string().min(1).optional(),
|
|
33
|
-
/** A user type (UserType). */
|
|
34
|
-
userType: z.string().min(1).optional(),
|
|
35
|
-
})
|
|
36
|
-
.strict();
|
|
37
23
|
/**
|
|
38
|
-
* A
|
|
39
|
-
*
|
|
24
|
+
* A reference in a map's GUI tree: a library's element as `<library>/<id>` (Ntve/00000136), or the
|
|
25
|
+
* map's own by its Id alone (a Kept or Blueprint function, as the Editor writes it with no Library).
|
|
40
26
|
*/
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
.min(1)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
export const MapElementRef = z.union([ElementRef, ElementId]);
|
|
28
|
+
/**
|
|
29
|
+
* A parameter's, variable's or return value's type (`<Type Value>`, with the preset type, game link
|
|
30
|
+
* catalog and so on it names), and a variable's (`<VariableType>`), which may also be constant or an
|
|
31
|
+
* array; with `Ref` the form its preset type, structure or array size names an element in: a
|
|
32
|
+
* library's always as `<library>/<id>`, a map's own by its Id alone (MapElementRef).
|
|
33
|
+
*/
|
|
34
|
+
function typeSchemas(Ref) {
|
|
35
|
+
const TypeSpecSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
type: z.string().min(1),
|
|
38
|
+
/** A preset type or structure (TypeElement), as `<library>/<id>` (a map's own by its Id). */
|
|
39
|
+
element: Ref.optional(),
|
|
40
|
+
/** A game link's catalog (GameType), such as Character. */
|
|
41
|
+
gameType: z.string().min(1).optional(),
|
|
42
|
+
/** An asset's type (AssetType). */
|
|
43
|
+
assetType: z.string().min(1).optional(),
|
|
44
|
+
/** A user type (UserType). */
|
|
45
|
+
userType: z.string().min(1).optional(),
|
|
46
|
+
})
|
|
47
|
+
.strict();
|
|
48
|
+
const VariableTypeSpecSchema = TypeSpecSchema.extend({
|
|
49
|
+
/** A constant variable's (`<Constant/>`): declared with its initial value, which nothing sets after. */
|
|
50
|
+
constant: z.boolean().optional(),
|
|
51
|
+
/**
|
|
52
|
+
* An array variable's size in each dimension, first to last (`<ArraySize Dim>`): a literal
|
|
53
|
+
* (`Value`), or a constant variable (`Type="Variable"`), as `<library>/<id>` (a map's own by its
|
|
54
|
+
* Id). Galaxy holds one more than each (`int[4]` for a size of 3, `[lib<id>_gv_<count> + 1]`).
|
|
55
|
+
*/
|
|
56
|
+
array: z
|
|
57
|
+
.array(z.union([z.object({ size: z.number().int().positive() }).strict(), z.object({ variable: Ref }).strict()]))
|
|
58
|
+
.min(1)
|
|
59
|
+
.optional(),
|
|
60
|
+
})
|
|
61
|
+
.strict()
|
|
62
|
+
.refine((type) => !(type.constant && type.array), "An array variable can't be constant: no Editor save has one");
|
|
63
|
+
return { TypeSpecSchema, VariableTypeSpecSchema };
|
|
64
|
+
}
|
|
65
|
+
const LIBRARY_TYPES = typeSchemas(ElementRef);
|
|
66
|
+
/** A parameter's or return value's type, a library's. */
|
|
67
|
+
export const TypeSpecSchema = LIBRARY_TYPES.TypeSpecSchema;
|
|
68
|
+
/** A variable's type, a library's: a parameter's or return value's, and whether it is constant or an array, which only a variable is. */
|
|
69
|
+
export const VariableTypeSpecSchema = LIBRARY_TYPES.VariableTypeSpecSchema;
|
|
70
|
+
/** The types of a map's own elements (a Mission Blueprint's): a preset type, structure or array size of the map's own by its Id alone. */
|
|
71
|
+
export const MAP_TYPES = typeSchemas(MapElementRef);
|
|
56
72
|
const FORMS = ["preset", "presetElement", "bits", "type", "call", "variable", "parameter", "trigger", "customScript", "expression"];
|
|
57
73
|
/** Exactly one value form: a literal is its `type` (with `value`, `valueId`, `typeInfo`, `gameType` and `context`), a set of bits its `presetElement`, its `bits` or both, the others one key each. */
|
|
58
74
|
function oneValue(value, context) {
|
|
@@ -74,9 +90,10 @@ function oneValue(value, context) {
|
|
|
74
90
|
* block slot or a preset takes: a library's always names its library (`<library>/<id>`, its own
|
|
75
91
|
* too), a map's names a library's and gives the map's own by Id alone (MapElementRef); and with
|
|
76
92
|
* `VariableRef` the form a variable (or a structure's member) takes: a library's own by Id alone, a
|
|
77
|
-
* map's own by Id or a library's global (and its structures' members) as `<library>/<id
|
|
93
|
+
* map's own by Id or a library's global (and its structures' members) as `<library>/<id>`; and
|
|
94
|
+
* with `VariableType` a variable's type.
|
|
78
95
|
*/
|
|
79
|
-
function guiSchemas(Ref, VariableRef) {
|
|
96
|
+
function guiSchemas(Ref, VariableRef, VariableType = VariableTypeSpecSchema) {
|
|
80
97
|
const valueShape = {
|
|
81
98
|
preset: Ref.optional(),
|
|
82
99
|
presetElement: Ref.optional(),
|
|
@@ -142,7 +159,7 @@ function guiSchemas(Ref, VariableRef) {
|
|
|
142
159
|
name: z.string(),
|
|
143
160
|
/** Its Galaxy name, when the Editor was given one; else from its name. */
|
|
144
161
|
identifier: z.string().min(1).optional(),
|
|
145
|
-
type:
|
|
162
|
+
type: VariableType,
|
|
146
163
|
/** Its initial value, when it has one. */
|
|
147
164
|
value: HeldValueSchema.optional(),
|
|
148
165
|
})
|
|
@@ -158,17 +175,13 @@ export const GuiStatementSchema = LIBRARY_GUI.GuiStatementSchema;
|
|
|
158
175
|
export const HeldValueSchema = LIBRARY_GUI.HeldValueSchema;
|
|
159
176
|
/** One of the function's own variables. */
|
|
160
177
|
export const GuiVariableSchema = LIBRARY_GUI.GuiVariableSchema;
|
|
161
|
-
/**
|
|
162
|
-
* A reference in a map's GUI tree: a library's element as `<library>/<id>` (Ntve/00000136), or the
|
|
163
|
-
* map's own by its Id alone (a Kept or Blueprint function, as the Editor writes it with no Library).
|
|
164
|
-
*/
|
|
165
|
-
export const MapElementRef = z.union([ElementRef, ElementId]);
|
|
166
178
|
/**
|
|
167
179
|
* The GUI tree's schemas for a map's own elements (a Mission Blueprint's triggers): the map's own
|
|
168
180
|
* references are bare Ids, and a variable may be a library's global, or a member of a library's
|
|
169
|
-
* structure, as `<library>/<id>` (Cmpn/E5539606), as the Editor writes it with its Library
|
|
181
|
+
* structure, as `<library>/<id>` (Cmpn/E5539606), as the Editor writes it with its Library; a
|
|
182
|
+
* variable's type may name the map's own preset type, structure or constant by its Id.
|
|
170
183
|
*/
|
|
171
|
-
export const MAP_GUI = guiSchemas(MapElementRef, MapElementRef);
|
|
184
|
+
export const MAP_GUI = guiSchemas(MapElementRef, MapElementRef, MAP_TYPES.VariableTypeSpecSchema);
|
|
172
185
|
/** A function's GUI body, as its source file in the mod's folder holds it. */
|
|
173
186
|
export const GuiBodySchema = z
|
|
174
187
|
.object({
|
|
@@ -2112,6 +2112,7 @@ declare const CoreBlueprintSchema: z.ZodObject<{
|
|
|
2112
2112
|
note: z.ZodOptional<z.ZodString>;
|
|
2113
2113
|
}, z.core.$strict>>>;
|
|
2114
2114
|
}, z.core.$strict>>;
|
|
2115
|
+
bankFixture: z.ZodOptional<z.ZodString>;
|
|
2115
2116
|
textures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2116
2117
|
texturePalette: z.ZodOptional<z.ZodObject<{
|
|
2117
2118
|
main: z.ZodString;
|
|
@@ -2712,7 +2713,7 @@ declare const CoreBlueprintSchema: z.ZodObject<{
|
|
|
2712
2713
|
identifier: z.ZodOptional<z.ZodString>;
|
|
2713
2714
|
type: z.ZodObject<{
|
|
2714
2715
|
type: z.ZodString;
|
|
2715
|
-
element: z.ZodOptional<z.
|
|
2716
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
2716
2717
|
gameType: z.ZodOptional<z.ZodString>;
|
|
2717
2718
|
assetType: z.ZodOptional<z.ZodString>;
|
|
2718
2719
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -2720,7 +2721,7 @@ declare const CoreBlueprintSchema: z.ZodObject<{
|
|
|
2720
2721
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2721
2722
|
size: z.ZodNumber;
|
|
2722
2723
|
}, z.core.$strict>, z.ZodObject<{
|
|
2723
|
-
variable: z.
|
|
2724
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
2724
2725
|
}, z.core.$strict>]>>>;
|
|
2725
2726
|
}, z.core.$strict>;
|
|
2726
2727
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -3923,6 +3924,7 @@ export declare function missionBlueprintSchema(plugins: PluginRegistry, catalog?
|
|
|
3923
3924
|
note: z.ZodOptional<z.ZodString>;
|
|
3924
3925
|
}, z.core.$strict>>>;
|
|
3925
3926
|
}, z.core.$strict>>;
|
|
3927
|
+
bankFixture: z.ZodOptional<z.ZodString>;
|
|
3926
3928
|
textures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3927
3929
|
texturePalette: z.ZodOptional<z.ZodObject<{
|
|
3928
3930
|
main: z.ZodString;
|
|
@@ -4492,7 +4494,7 @@ export declare function missionBlueprintSchema(plugins: PluginRegistry, catalog?
|
|
|
4492
4494
|
identifier: z.ZodOptional<z.ZodString>;
|
|
4493
4495
|
type: z.ZodObject<{
|
|
4494
4496
|
type: z.ZodString;
|
|
4495
|
-
element: z.ZodOptional<z.
|
|
4497
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
4496
4498
|
gameType: z.ZodOptional<z.ZodString>;
|
|
4497
4499
|
assetType: z.ZodOptional<z.ZodString>;
|
|
4498
4500
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -4500,7 +4502,7 @@ export declare function missionBlueprintSchema(plugins: PluginRegistry, catalog?
|
|
|
4500
4502
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
4501
4503
|
size: z.ZodNumber;
|
|
4502
4504
|
}, z.core.$strict>, z.ZodObject<{
|
|
4503
|
-
variable: z.
|
|
4505
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
4504
4506
|
}, z.core.$strict>]>>>;
|
|
4505
4507
|
}, z.core.$strict>;
|
|
4506
4508
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -6364,6 +6366,7 @@ export declare function missionBlueprintSchema(plugins: PluginRegistry, catalog?
|
|
|
6364
6366
|
note?: string | undefined;
|
|
6365
6367
|
}[];
|
|
6366
6368
|
} | undefined;
|
|
6369
|
+
bankFixture?: string | undefined;
|
|
6367
6370
|
textures?: string[] | undefined;
|
|
6368
6371
|
texturePalette?: {
|
|
6369
6372
|
main: string;
|
|
@@ -7764,6 +7767,7 @@ export declare function missionBlueprintSchema(plugins: PluginRegistry, catalog?
|
|
|
7764
7767
|
note?: string | undefined;
|
|
7765
7768
|
}[];
|
|
7766
7769
|
} | undefined;
|
|
7770
|
+
bankFixture?: string | undefined;
|
|
7767
7771
|
textures?: string[] | undefined;
|
|
7768
7772
|
texturePalette?: {
|
|
7769
7773
|
main: string;
|
|
@@ -8508,6 +8512,7 @@ export declare const MissionBlueprintSchema: z.ZodPipe<z.ZodObject<{
|
|
|
8508
8512
|
note: z.ZodOptional<z.ZodString>;
|
|
8509
8513
|
}, z.core.$strict>>>;
|
|
8510
8514
|
}, z.core.$strict>>;
|
|
8515
|
+
bankFixture: z.ZodOptional<z.ZodString>;
|
|
8511
8516
|
textures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8512
8517
|
texturePalette: z.ZodOptional<z.ZodObject<{
|
|
8513
8518
|
main: z.ZodString;
|
|
@@ -9077,7 +9082,7 @@ export declare const MissionBlueprintSchema: z.ZodPipe<z.ZodObject<{
|
|
|
9077
9082
|
identifier: z.ZodOptional<z.ZodString>;
|
|
9078
9083
|
type: z.ZodObject<{
|
|
9079
9084
|
type: z.ZodString;
|
|
9080
|
-
element: z.ZodOptional<z.
|
|
9085
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
9081
9086
|
gameType: z.ZodOptional<z.ZodString>;
|
|
9082
9087
|
assetType: z.ZodOptional<z.ZodString>;
|
|
9083
9088
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -9085,7 +9090,7 @@ export declare const MissionBlueprintSchema: z.ZodPipe<z.ZodObject<{
|
|
|
9085
9090
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
9086
9091
|
size: z.ZodNumber;
|
|
9087
9092
|
}, z.core.$strict>, z.ZodObject<{
|
|
9088
|
-
variable: z.
|
|
9093
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
9089
9094
|
}, z.core.$strict>]>>>;
|
|
9090
9095
|
}, z.core.$strict>;
|
|
9091
9096
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -10949,6 +10954,7 @@ export declare const MissionBlueprintSchema: z.ZodPipe<z.ZodObject<{
|
|
|
10949
10954
|
note?: string | undefined;
|
|
10950
10955
|
}[];
|
|
10951
10956
|
} | undefined;
|
|
10957
|
+
bankFixture?: string | undefined;
|
|
10952
10958
|
textures?: string[] | undefined;
|
|
10953
10959
|
texturePalette?: {
|
|
10954
10960
|
main: string;
|
|
@@ -12349,6 +12355,7 @@ export declare const MissionBlueprintSchema: z.ZodPipe<z.ZodObject<{
|
|
|
12349
12355
|
note?: string | undefined;
|
|
12350
12356
|
}[];
|
|
12351
12357
|
} | undefined;
|
|
12358
|
+
bankFixture?: string | undefined;
|
|
12352
12359
|
textures?: string[] | undefined;
|
|
12353
12360
|
texturePalette?: {
|
|
12354
12361
|
main: string;
|
|
@@ -1953,6 +1953,12 @@ const CoreBlueprintSchema = z
|
|
|
1953
1953
|
* `route-tests` and by `test_mission` before it starts the game. A generated map's only.
|
|
1954
1954
|
*/
|
|
1955
1955
|
tests: z.object({ routes: z.array(RouteTestSchema).default([]) }).strict().optional(),
|
|
1956
|
+
/**
|
|
1957
|
+
* A bank fixture (issue #55): a folder of `.SC2Bank` files in the Workspace, as a path from this
|
|
1958
|
+
* Blueprint's folder. `test_mission` copies its banks into the game's Banks folder for the run and puts the author's back when the
|
|
1959
|
+
* game quits. Without it a test game runs on the author's own banks.
|
|
1960
|
+
*/
|
|
1961
|
+
bankFixture: z.string().min(1).optional(),
|
|
1956
1962
|
/**
|
|
1957
1963
|
* Blend textures (CTerrainTex ids, up to 8) to use instead of the tileset's, also written as a
|
|
1958
1964
|
* map-local tileset override, e.g. Meinhoff's textures on MonlythEx1.
|
|
@@ -131,7 +131,7 @@ export declare const ModBlueprintSchema: z.ZodObject<{
|
|
|
131
131
|
internal: z.ZodOptional<z.ZodBoolean>;
|
|
132
132
|
returns: z.ZodOptional<z.ZodObject<{
|
|
133
133
|
type: z.ZodString;
|
|
134
|
-
element: z.ZodOptional<z.
|
|
134
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
135
135
|
gameType: z.ZodOptional<z.ZodString>;
|
|
136
136
|
assetType: z.ZodOptional<z.ZodString>;
|
|
137
137
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -142,7 +142,7 @@ export declare const ModBlueprintSchema: z.ZodObject<{
|
|
|
142
142
|
identifier: z.ZodOptional<z.ZodString>;
|
|
143
143
|
type: z.ZodObject<{
|
|
144
144
|
type: z.ZodString;
|
|
145
|
-
element: z.ZodOptional<z.
|
|
145
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
146
146
|
gameType: z.ZodOptional<z.ZodString>;
|
|
147
147
|
assetType: z.ZodOptional<z.ZodString>;
|
|
148
148
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -195,7 +195,7 @@ export declare const ModBlueprintSchema: z.ZodObject<{
|
|
|
195
195
|
identifier: z.ZodOptional<z.ZodString>;
|
|
196
196
|
type: z.ZodObject<{
|
|
197
197
|
type: z.ZodString;
|
|
198
|
-
element: z.ZodOptional<z.
|
|
198
|
+
element: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
|
|
199
199
|
gameType: z.ZodOptional<z.ZodString>;
|
|
200
200
|
assetType: z.ZodOptional<z.ZodString>;
|
|
201
201
|
userType: z.ZodOptional<z.ZodString>;
|
|
@@ -203,7 +203,7 @@ export declare const ModBlueprintSchema: z.ZodObject<{
|
|
|
203
203
|
array: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
204
204
|
size: z.ZodNumber;
|
|
205
205
|
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
-
variable: z.
|
|
206
|
+
variable: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
207
207
|
}, z.core.$strict>]>>>;
|
|
208
208
|
}, z.core.$strict>;
|
|
209
209
|
value: z.ZodOptional<z.ZodType<{
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/** A file of one session: its channel is the name after the stamp (`Alerts`, `ScriptError`, …). */
|
|
2
|
+
export type GameLogFile = {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly channel: string;
|
|
5
|
+
/** When the game made it, from its name. */
|
|
6
|
+
readonly createdAt: Date;
|
|
7
|
+
readonly modifiedAt: Date;
|
|
8
|
+
};
|
|
9
|
+
/** A crash or an error report's folder. */
|
|
10
|
+
export type GameCrash = {
|
|
11
|
+
readonly kind: "Crash" | "Error";
|
|
12
|
+
readonly folder: string;
|
|
13
|
+
/** The game's process id, from the folder's name: the way to know a crash is a game the tool started. */
|
|
14
|
+
readonly pid: number;
|
|
15
|
+
readonly at: Date;
|
|
16
|
+
/** The report file in the folder, if there is one. */
|
|
17
|
+
readonly report?: string;
|
|
18
|
+
};
|
|
19
|
+
export type GameSession = {
|
|
20
|
+
/** The earliest of its files. */
|
|
21
|
+
readonly startedAt: Date;
|
|
22
|
+
/** The latest a file of it was modified: the quit, for a game that quit. */
|
|
23
|
+
readonly endedAt: Date;
|
|
24
|
+
/** The game's command line, from a file header; absent when no file has a header. */
|
|
25
|
+
readonly parameters?: string;
|
|
26
|
+
readonly files: readonly GameLogFile[];
|
|
27
|
+
readonly crash?: GameCrash;
|
|
28
|
+
};
|
|
29
|
+
/** The channels whose lines are what went wrong. SystemInfo, Graphics and the rest only describe the machine. */
|
|
30
|
+
export declare const ERROR_CHANNELS: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Every session in a GameLogs folder, oldest first. Files are grouped in the order the game made
|
|
33
|
+
* them: a file joins the latest group that has no file of its channel yet and whose command line
|
|
34
|
+
* agrees (a file with no header, such as Text, agrees with any), else it starts a group. Time alone
|
|
35
|
+
* can't group them, since one session's files are made minutes or an hour apart. A crash or error
|
|
36
|
+
* folder is one session, its own files in it. Files of a game still running are read as they are.
|
|
37
|
+
*/
|
|
38
|
+
export declare function readGameSessions(folder: string): Promise<GameSession[]>;
|
|
39
|
+
/** Which sessions a tool run's own: started in the window, and either its map named in the command line or its game's crash. */
|
|
40
|
+
export type SessionSelection = {
|
|
41
|
+
/** Sessions started at or after this, with a little slack for the stamp's whole seconds. */
|
|
42
|
+
readonly after?: Date;
|
|
43
|
+
/** Sessions started before this. */
|
|
44
|
+
readonly before?: Date;
|
|
45
|
+
/** Any of these in the command line: the map's name, or `EditorTest.SC2Map` for a Test Document. */
|
|
46
|
+
readonly parameters?: readonly string[];
|
|
47
|
+
/** The processes of the games the tool started: a crash folder's `P<pid>` names one. */
|
|
48
|
+
readonly pids?: readonly number[];
|
|
49
|
+
/** Only the latest of those that match. */
|
|
50
|
+
readonly latest?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare function selectSessions(sessions: readonly GameSession[], selection: SessionSelection): GameSession[];
|
|
53
|
+
/** A distinct error in a session: its message (a trigger error and its `Near line` joined) and how many lines said it. */
|
|
54
|
+
export type SessionError = {
|
|
55
|
+
readonly message: string;
|
|
56
|
+
readonly count: number;
|
|
57
|
+
/** The channels that said it. */
|
|
58
|
+
readonly channels: readonly string[];
|
|
59
|
+
};
|
|
60
|
+
/** The messages of one file, repeats included, in order: its header skipped, a continuation line joined to its error. */
|
|
61
|
+
export declare function parseLogMessages(text: string): string[];
|
|
62
|
+
/** The distinct errors across a session's error channels, most frequent first. */
|
|
63
|
+
export declare function readSessionErrors(session: GameSession): Promise<SessionError[]>;
|