webgal-parser 4.3.13 → 4.4.4

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.
Files changed (51) hide show
  1. package/build/cjs/config/scriptConfig.d.ts +1 -1
  2. package/build/cjs/configParser/configParser.d.ts +1 -0
  3. package/build/cjs/index.d.ts +5 -2
  4. package/build/cjs/index.js +1148 -17042
  5. package/build/cjs/interface/sceneInterface.d.ts +3 -1
  6. package/build/cjs/parser4/index.d.ts +1 -0
  7. package/build/cjs/scriptParser/subSceneScanner.d.ts +1 -1
  8. package/build/es/config/scriptConfig.d.ts +1 -1
  9. package/build/es/configParser/configParser.d.ts +1 -0
  10. package/build/es/index.d.ts +5 -2
  11. package/build/es/index.js +1147 -17043
  12. package/build/es/interface/sceneInterface.d.ts +3 -1
  13. package/build/es/parser4/index.d.ts +1 -0
  14. package/build/es/scriptParser/subSceneScanner.d.ts +1 -1
  15. package/build/types/config/scriptConfig.d.ts +6 -0
  16. package/build/types/configParser/configParser.d.ts +1 -0
  17. package/build/types/index.d.ts +13 -0
  18. package/build/types/interface/assets.d.ts +12 -0
  19. package/build/types/interface/runtimeInterface.d.ts +9 -0
  20. package/build/types/interface/sceneInterface.d.ts +96 -0
  21. package/build/types/parser4/index.d.ts +1 -0
  22. package/build/types/sceneParser.d.ts +14 -0
  23. package/build/types/scriptParser/argsParser.d.ts +9 -0
  24. package/build/types/scriptParser/assetsScanner.d.ts +9 -0
  25. package/build/types/scriptParser/commandParser.d.ts +9 -0
  26. package/build/types/scriptParser/contentParser.d.ts +9 -0
  27. package/build/types/scriptParser/scriptParser.d.ts +9 -0
  28. package/build/types/scriptParser/subSceneScanner.d.ts +7 -0
  29. package/build/umd/index.global.js +1776 -0
  30. package/package.json +40 -35
  31. package/src/config/scriptConfig.ts +46 -44
  32. package/src/configParser/configParser.ts +60 -0
  33. package/src/index.ts +42 -25
  34. package/src/interface/assets.ts +12 -12
  35. package/src/interface/runtimeInterface.ts +9 -9
  36. package/src/interface/sceneInterface.ts +103 -101
  37. package/src/parser4/index.ts +158 -0
  38. package/src/sceneParser.ts +47 -47
  39. package/src/scriptParser/argsParser.ts +68 -62
  40. package/src/scriptParser/assetsScanner.ts +72 -72
  41. package/src/scriptParser/commandParser.ts +57 -57
  42. package/src/scriptParser/contentParser.ts +66 -66
  43. package/src/scriptParser/scriptParser.ts +87 -87
  44. package/src/scriptParser/subSceneScanner.ts +23 -23
  45. package/.babelrc +0 -14
  46. package/build/cjs/index.js.map +0 -1
  47. package/build/es/index.js.map +0 -1
  48. package/rollup.config.js +0 -48
  49. package/test/parser.test.ts +0 -130
  50. package/tsconfig.json +0 -29
  51. package/tsconfig.node.json +0 -10
package/package.json CHANGED
@@ -1,35 +1,40 @@
1
- {
2
- "name": "webgal-parser",
3
- "version": "4.3.13",
4
- "description": "WebGAL script parser",
5
- "scripts": {
6
- "test": "vitest",
7
- "build": "rimraf -rf ./build && rollup --config"
8
- },
9
- "module": "./build/es/index.js",
10
- "main": "./build/cjs/index.js",
11
- "author": "Mahiru <Mahiru_@outlook.com>",
12
- "license": "MPL-2.0",
13
- "dependencies": {
14
- "cloudlogjs": "^1.0.11",
15
- "lodash": "^4.17.21"
16
- },
17
- "devDependencies": {
18
- "@rollup/plugin-commonjs": "^23.0.2",
19
- "@rollup/plugin-json": "^5.0.1",
20
- "@rollup/plugin-node-resolve": "^15.0.1",
21
- "@rollup/plugin-typescript": "^9.0.2",
22
- "@types/lodash": "^4.14.189",
23
- "@types/node": "^18.14.0",
24
- "rollup": "^3.3.0",
25
- "rollup-plugin-babel": "^4.4.0",
26
- "rollup-plugin-dts": "^5.0.0",
27
- "rollup-plugin-terser": "^7.0.2",
28
- "rollup-plugin-typescript2": "^0.34.1",
29
- "ts-node": "^10.9.1",
30
- "tslib": "^2.4.1",
31
- "typescript": "^4.9.3",
32
- "vitest": "^0.28.5"
33
- },
34
- "type": "module"
35
- }
1
+ {
2
+ "name": "webgal-parser",
3
+ "version": "4.4.4",
4
+ "description": "WebGAL script parser",
5
+ "scripts": {
6
+ "test": "vitest",
7
+ "coverage": "vitest run --coverage",
8
+ "build": "rimraf -rf ./build && rollup --config",
9
+ "debug": "tsx test/debug.ts"
10
+ },
11
+ "types": "./build/types/index.d.ts",
12
+ "module": "./build/es/index.js",
13
+ "main": "./build/cjs/index.js",
14
+ "author": "Mahiru <Mahiru_@outlook.com>",
15
+ "license": "MPL-2.0",
16
+ "dependencies": {
17
+ "chevrotain": "^10.5.0",
18
+ "cloudlogjs": "^1.0.11",
19
+ "lodash": "^4.17.21",
20
+ "tsx": "^3.12.7"
21
+ },
22
+ "devDependencies": {
23
+ "@rollup/plugin-commonjs": "^23.0.2",
24
+ "@rollup/plugin-json": "^5.0.1",
25
+ "@rollup/plugin-node-resolve": "^15.0.1",
26
+ "@rollup/plugin-typescript": "^9.0.2",
27
+ "@types/lodash": "^4.14.189",
28
+ "@types/node": "^18.14.0",
29
+ "@vitest/coverage-c8": "^0.28.5",
30
+ "rollup": "^3.3.0",
31
+ "rollup-plugin-babel": "^4.4.0",
32
+ "rollup-plugin-terser": "^7.0.2",
33
+ "rollup-plugin-typescript2": "^0.34.1",
34
+ "ts-node": "^10.9.1",
35
+ "tslib": "^2.4.1",
36
+ "typescript": "^4.9.3",
37
+ "vitest": "^0.28.5"
38
+ },
39
+ "type": "module"
40
+ }
@@ -1,44 +1,46 @@
1
- import { commandType } from '../interface/sceneInterface';
2
-
3
- export const SCRIPT_CONFIG = [
4
- { scriptString: 'intro', scriptType: commandType.intro },
5
- { scriptString: 'changeBg', scriptType: commandType.changeBg },
6
- { scriptString: 'changeFigure', scriptType: commandType.changeFigure },
7
- { scriptString: 'miniAvatar', scriptType: commandType.miniAvatar },
8
- { scriptString: 'changeScene', scriptType: commandType.changeScene },
9
- { scriptString: 'choose', scriptType: commandType.choose},
10
- { scriptString: 'end', scriptType: commandType.end },
11
- { scriptString: 'bgm', scriptType: commandType.bgm },
12
- { scriptString: 'playVideo', scriptType: commandType.video },
13
- {
14
- scriptString: 'setComplexAnimation',
15
- scriptType: commandType.setComplexAnimation,
16
- },
17
- { scriptString: 'setFilter', scriptType: commandType.setFilter },
18
- { scriptString: 'pixiInit', scriptType: commandType.pixiInit },
19
- { scriptString: 'pixiPerform', scriptType: commandType.pixi },
20
- { scriptString: 'label', scriptType: commandType.label},
21
- { scriptString: 'jumpLabel', scriptType: commandType.jumpLabel},
22
- { scriptString: 'setVar', scriptType: commandType.setVar },
23
- { scriptString: 'callScene', scriptType: commandType.callScene },
24
- { scriptString: 'showVars', scriptType: commandType.showVars },
25
- { scriptString: 'unlockCg', scriptType: commandType.unlockCg },
26
- { scriptString: 'unlockBgm', scriptType: commandType.unlockBgm },
27
- { scriptString: 'say', scriptType: commandType.say },
28
- { scriptString: 'filmMode', scriptType: commandType.filmMode },
29
- { scriptString: 'callScene', scriptType: commandType.callScene },
30
- { scriptString: 'setTextbox', scriptType: commandType.setTextbox},
31
- { scriptString: 'setAnimation', scriptType: commandType.setAnimation },
32
- ];
33
- export const ADD_NEXT_ARG_LIST = [
34
- commandType.bgm,
35
- commandType.pixi,
36
- commandType.pixiInit,
37
- commandType.label,
38
- commandType.if,
39
- commandType.miniAvatar,
40
- commandType.setVar,
41
- commandType.unlockBgm,
42
- commandType.unlockCg,
43
- commandType.filmMode,
44
- ];
1
+ import { commandType } from "../interface/sceneInterface";
2
+
3
+ export const SCRIPT_CONFIG = [
4
+ { scriptString: 'intro', scriptType: commandType.intro },
5
+ { scriptString: 'changeBg', scriptType: commandType.changeBg },
6
+ { scriptString: 'changeFigure', scriptType: commandType.changeFigure },
7
+ { scriptString: 'miniAvatar', scriptType: commandType.miniAvatar },
8
+ { scriptString: 'changeScene', scriptType: commandType.changeScene },
9
+ { scriptString: 'choose', scriptType: commandType.choose},
10
+ { scriptString: 'end', scriptType: commandType.end },
11
+ { scriptString: 'bgm', scriptType: commandType.bgm },
12
+ { scriptString: 'playVideo', scriptType: commandType.video },
13
+ {
14
+ scriptString: 'setComplexAnimation',
15
+ scriptType: commandType.setComplexAnimation,
16
+ },
17
+ { scriptString: 'setFilter', scriptType: commandType.setFilter },
18
+ { scriptString: 'pixiInit', scriptType: commandType.pixiInit },
19
+ { scriptString: 'pixiPerform', scriptType: commandType.pixi },
20
+ { scriptString: 'label', scriptType: commandType.label},
21
+ { scriptString: 'jumpLabel', scriptType: commandType.jumpLabel},
22
+ { scriptString: 'setVar', scriptType: commandType.setVar },
23
+ { scriptString: 'callScene', scriptType: commandType.callScene },
24
+ { scriptString: 'showVars', scriptType: commandType.showVars },
25
+ { scriptString: 'unlockCg', scriptType: commandType.unlockCg },
26
+ { scriptString: 'unlockBgm', scriptType: commandType.unlockBgm },
27
+ { scriptString: 'say', scriptType: commandType.say },
28
+ { scriptString: 'filmMode', scriptType: commandType.filmMode },
29
+ { scriptString: 'callScene', scriptType: commandType.callScene },
30
+ { scriptString: 'setTextbox', scriptType: commandType.setTextbox},
31
+ { scriptString: 'setAnimation', scriptType: commandType.setAnimation },
32
+ { scriptString: 'playEffect', scriptType: commandType.playEffect },
33
+ ];
34
+ export const ADD_NEXT_ARG_LIST = [
35
+ commandType.bgm,
36
+ commandType.pixi,
37
+ commandType.pixiInit,
38
+ commandType.label,
39
+ commandType.if,
40
+ commandType.miniAvatar,
41
+ commandType.setVar,
42
+ commandType.unlockBgm,
43
+ commandType.unlockCg,
44
+ commandType.filmMode,
45
+ commandType.playEffect,
46
+ ];
@@ -0,0 +1,60 @@
1
+ import {argsParser} from "../scriptParser/argsParser";
2
+
3
+ interface IOptionItem{
4
+ key:string;
5
+ value:string | number | boolean;
6
+ }
7
+ interface IConfigItem{
8
+ command:string;
9
+ args:string[]
10
+ options:IOptionItem[];
11
+ }
12
+
13
+ export type WebgalConfig = IConfigItem[]
14
+
15
+
16
+ function configLineParser(inputLine:string):IConfigItem{
17
+ const options:Array<IOptionItem> = [];
18
+ let command: string;
19
+
20
+ let newSentenceRaw = inputLine.split(";")[0];
21
+ if (newSentenceRaw === "") {
22
+ // 注释提前返回
23
+ return {
24
+ command:'',
25
+ args:[],
26
+ options:[]
27
+ };
28
+ }
29
+ // 截取命令
30
+ const getCommandResult = /:/.exec(newSentenceRaw);
31
+
32
+ // 没有command
33
+ if (getCommandResult === null) {
34
+ command = '';
35
+ } else {
36
+ command = newSentenceRaw.substring(0, getCommandResult.index);
37
+ // 划分命令区域和content区域
38
+ newSentenceRaw = newSentenceRaw.substring(getCommandResult.index + 1, newSentenceRaw.length);
39
+ }
40
+ // 截取 Options 区域
41
+ const getOptionsResult = / -/.exec(newSentenceRaw);
42
+ // 获取到参数
43
+ if (getOptionsResult) {
44
+ const optionsRaw = newSentenceRaw.substring(getOptionsResult.index, newSentenceRaw.length);
45
+ newSentenceRaw = newSentenceRaw.substring(0, getOptionsResult.index);
46
+ for (const e of argsParser(optionsRaw, (name,_)=>{return name})) {
47
+ options.push(e);
48
+ }
49
+ }
50
+ return {
51
+ command,
52
+ args:newSentenceRaw.split('|').map(e=>e.trim()).filter(e=>e!==''),
53
+ options
54
+ };
55
+ }
56
+
57
+ export function configParser(configText:string):WebgalConfig{
58
+ const configLines = configText.replaceAll(`\r`,'').split('\n');
59
+ return configLines.map(e=>configLineParser(e)).filter(e=>e.command!=='');
60
+ }
package/src/index.ts CHANGED
@@ -1,25 +1,42 @@
1
- import { commandType, IAsset } from "./interface/sceneInterface";
2
- import { fileType } from "./interface/assets";
3
- import { sceneParser } from "./sceneParser";
4
-
5
- export default class SceneParser {
6
-
7
- private readonly assetsPrefetcher;
8
- private readonly assetSetter;
9
- private readonly ADD_NEXT_ARG_LIST;
10
- private readonly SCRIPT_CONFIG;
11
-
12
- constructor(assetsPrefetcher: ((assetList: Array<IAsset>) => void),
13
- assetSetter: (fileName: string, assetType: fileType) => string,
14
- ADD_NEXT_ARG_LIST: Array<commandType>, SCRIPT_CONFIG: Array<any>) {
15
- this.assetsPrefetcher = assetsPrefetcher;
16
- this.assetSetter = assetSetter;
17
- this.ADD_NEXT_ARG_LIST = ADD_NEXT_ARG_LIST;
18
- this.SCRIPT_CONFIG = SCRIPT_CONFIG;
19
- }
20
-
21
- parse(rawScene: string, sceneName: string, sceneUrl: string
22
- ) {
23
- return sceneParser(rawScene, sceneName, sceneUrl, this.assetsPrefetcher, this.assetSetter, this.ADD_NEXT_ARG_LIST, this.SCRIPT_CONFIG);
24
- }
25
- }
1
+ import {commandType, IAsset} from "./interface/sceneInterface";
2
+ import {fileType} from "./interface/assets";
3
+ import {sceneParser} from "./sceneParser";
4
+ import {ADD_NEXT_ARG_LIST, SCRIPT_CONFIG} from "./config/scriptConfig";
5
+ import {configParser, WebgalConfig} from "./configParser/configParser";
6
+
7
+ export default class SceneParser {
8
+
9
+ private readonly assetsPrefetcher;
10
+ private readonly assetSetter;
11
+ private readonly ADD_NEXT_ARG_LIST;
12
+ private readonly SCRIPT_CONFIG;
13
+
14
+ constructor(assetsPrefetcher: ((assetList: Array<IAsset>) => void),
15
+ assetSetter: (fileName: string, assetType: fileType) => string,
16
+ ADD_NEXT_ARG_LIST: Array<number>, SCRIPT_CONFIG: Array<any>) {
17
+ this.assetsPrefetcher = assetsPrefetcher;
18
+ this.assetSetter = assetSetter;
19
+ this.ADD_NEXT_ARG_LIST = ADD_NEXT_ARG_LIST;
20
+ this.SCRIPT_CONFIG = SCRIPT_CONFIG;
21
+ }
22
+
23
+ parse(rawScene: string, sceneName: string, sceneUrl: string
24
+ ) {
25
+ return sceneParser(rawScene, sceneName, sceneUrl, this.assetsPrefetcher, this.assetSetter, this.ADD_NEXT_ARG_LIST, this.SCRIPT_CONFIG);
26
+ }
27
+
28
+ parseConfig(configText: string) {
29
+ return configParser(configText)
30
+ }
31
+
32
+ stringifyConfig(config: WebgalConfig) {
33
+ return config
34
+ .reduce(
35
+ (previousValue, curr) =>
36
+ (previousValue + `${curr.command}:${curr.args.join('|')}${curr.options.length <= 0 ? '' : curr.options.reduce((p, c) => (p + ' -' + c.key + '=' + c.value), '')};\n`),
37
+ ''
38
+ )
39
+ }
40
+ }
41
+
42
+ export {ADD_NEXT_ARG_LIST, SCRIPT_CONFIG};
@@ -1,12 +1,12 @@
1
- /**
2
- * 内置资源类型的枚举
3
- */
4
- export enum fileType {
5
- background,
6
- bgm,
7
- figure,
8
- scene,
9
- tex,
10
- vocal,
11
- video,
12
- }
1
+ /**
2
+ * 内置资源类型的枚举
3
+ */
4
+ export enum fileType {
5
+ background,
6
+ bgm,
7
+ figure,
8
+ scene,
9
+ tex,
10
+ vocal,
11
+ video,
12
+ }
@@ -1,9 +1,9 @@
1
- /**
2
- * 子场景结束后回到父场景的入口
3
- * @interface sceneEntry
4
- */
5
- export interface sceneEntry {
6
- sceneName: string; // 场景名称
7
- sceneUrl: string; // 场景url
8
- continueLine: number; // 继续原场景的行号
9
- }
1
+ /**
2
+ * 子场景结束后回到父场景的入口
3
+ * @interface sceneEntry
4
+ */
5
+ export interface sceneEntry {
6
+ sceneName: string; // 场景名称
7
+ sceneUrl: string; // 场景url
8
+ continueLine: number; // 继续原场景的行号
9
+ }
@@ -1,101 +1,103 @@
1
- /**
2
- * 语句类型
3
- */
4
- import { sceneEntry } from "./runtimeInterface";
5
- import { fileType } from "./assets";
6
-
7
- export enum commandType {
8
- say, // 对话
9
- changeBg, // 更改背景
10
- changeFigure, // 更改立绘
11
- bgm, // 更改背景音乐
12
- video, // 播放视频
13
- pixi, // pixi演出
14
- pixiInit, // pixi初始化
15
- intro, // 黑屏文字演示
16
- miniAvatar, // 小头像
17
- changeScene, // 切换场景
18
- choose, // 分支选择
19
- end, // 结束游戏
20
- setComplexAnimation, // 动画演出
21
- setFilter, // 设置效果
22
- label, // 标签
23
- jumpLabel, // 跳转标签
24
- chooseLabel, // 选择标签
25
- setVar, // 设置变量
26
- if, // 条件跳转
27
- callScene, // 调用场景
28
- showVars,
29
- unlockCg,
30
- unlockBgm,
31
- filmMode,
32
- setTextbox,
33
- setAnimation,
34
- playEffect,
35
- setTempAnimation,
36
- comment
37
- }
38
-
39
- /**
40
- * 单个参数接口
41
- * @interface arg
42
- */
43
- export interface arg {
44
- key: string; // 参数键
45
- value: string | boolean | number; // 参数值
46
- }
47
-
48
- /**
49
- * 资源接口
50
- * @interface IAsset
51
- */
52
- export interface IAsset {
53
- name: string; // 资源名称
54
- type: fileType; // 资源类型
55
- url: string; // 资源url
56
- lineNumber: number; // 触发资源语句的行号
57
- }
58
-
59
- /**
60
- * 单条语句接口
61
- * @interface ISentence
62
- */
63
- export interface ISentence {
64
- command: commandType; // 语句类型
65
- commandRaw: string; // 命令的原始内容,方便调试
66
- content: string; // 语句内容
67
- args: Array<arg>; // 参数列表
68
- sentenceAssets: Array<IAsset>; // 语句携带的资源列表
69
- subScene: Array<string>; // 语句包含子场景列表
70
- }
71
-
72
- /**
73
- * 场景接口
74
- * @interface IScene
75
- */
76
- export interface IScene {
77
- sceneName: string; // 场景名称
78
- sceneUrl: string; // 场景url
79
- sentenceList: Array<ISentence>; // 语句列表
80
- assetsList: Array<IAsset>; // 资源列表
81
- subSceneList: Array<string>; // 子场景的url列表
82
- }
83
-
84
- /**
85
- * 当前的场景数据
86
- * @interface ISceneData
87
- */
88
- export interface ISceneData {
89
- currentSentenceId: number; // 当前语句ID
90
- sceneStack: Array<sceneEntry>; // 场景栈
91
- currentScene: IScene; // 当前场景数据
92
- }
93
-
94
- /**
95
- * 处理后的命令接口
96
- * @interface parsedCommand
97
- */
98
- export interface parsedCommand {
99
- type: commandType;
100
- additionalArgs: Array<arg>;
101
- }
1
+ /**
2
+ * 语句类型
3
+ */
4
+ import {sceneEntry} from "./runtimeInterface";
5
+ import {fileType} from "./assets";
6
+
7
+ export enum commandType {
8
+ say, // 对话
9
+ changeBg, // 更改背景
10
+ changeFigure, // 更改立绘
11
+ bgm, // 更改背景音乐
12
+ video, // 播放视频
13
+ pixi, // pixi演出
14
+ pixiInit, // pixi初始化
15
+ intro, // 黑屏文字演示
16
+ miniAvatar, // 小头像
17
+ changeScene, // 切换场景
18
+ choose, // 分支选择
19
+ end, // 结束游戏
20
+ setComplexAnimation, // 动画演出
21
+ setFilter, // 设置效果
22
+ label, // 标签
23
+ jumpLabel, // 跳转标签
24
+ chooseLabel, // 选择标签
25
+ setVar, // 设置变量
26
+ if, // 条件跳转
27
+ callScene, // 调用场景
28
+ showVars,
29
+ unlockCg,
30
+ unlockBgm,
31
+ filmMode,
32
+ setTextbox,
33
+ setAnimation,
34
+ playEffect,
35
+ setTempAnimation,
36
+ comment,
37
+ setTransform,
38
+ setTransition,
39
+ }
40
+
41
+ /**
42
+ * 单个参数接口
43
+ * @interface arg
44
+ */
45
+ export interface arg {
46
+ key: string; // 参数键
47
+ value: string | boolean | number; // 参数值
48
+ }
49
+
50
+ /**
51
+ * 资源接口
52
+ * @interface IAsset
53
+ */
54
+ export interface IAsset {
55
+ name: string; // 资源名称
56
+ type: fileType; // 资源类型
57
+ url: string; // 资源url
58
+ lineNumber: number; // 触发资源语句的行号
59
+ }
60
+
61
+ /**
62
+ * 单条语句接口
63
+ * @interface ISentence
64
+ */
65
+ export interface ISentence {
66
+ command: commandType; // 语句类型
67
+ commandRaw: string; // 命令的原始内容,方便调试
68
+ content: string; // 语句内容
69
+ args: Array<arg>; // 参数列表
70
+ sentenceAssets: Array<IAsset>; // 语句携带的资源列表
71
+ subScene: Array<string>; // 语句包含子场景列表
72
+ }
73
+
74
+ /**
75
+ * 场景接口
76
+ * @interface IScene
77
+ */
78
+ export interface IScene {
79
+ sceneName: string; // 场景名称
80
+ sceneUrl: string; // 场景url
81
+ sentenceList: Array<ISentence>; // 语句列表
82
+ assetsList: Array<IAsset>; // 资源列表
83
+ subSceneList: Array<string>; // 子场景的url列表
84
+ }
85
+
86
+ /**
87
+ * 当前的场景数据
88
+ * @interface ISceneData
89
+ */
90
+ export interface ISceneData {
91
+ currentSentenceId: number; // 当前语句ID
92
+ sceneStack: Array<sceneEntry>; // 场景栈
93
+ currentScene: IScene; // 当前场景数据
94
+ }
95
+
96
+ /**
97
+ * 处理后的命令接口
98
+ * @interface parsedCommand
99
+ */
100
+ export interface parsedCommand {
101
+ type: commandType;
102
+ additionalArgs: Array<arg>;
103
+ }