script-engine-lib 0.4.2 → 1.0.0-rc0
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/index.d.mts +191 -0
- package/dist/index.d.ts +191 -5
- package/dist/index.js +21 -29
- package/dist/index.mjs +21 -0
- package/package.json +56 -47
- package/src/index.ts +10 -0
- package/.eslintrc.js +0 -212
- package/.vscode/launch.json +0 -15
- package/.vscode/settings.json +0 -15
- package/dist/decorators/action-before-testing.d.ts +0 -2
- package/dist/decorators/action-before-testing.js +0 -23
- package/dist/decorators/action-before-testing.js.map +0 -1
- package/dist/decorators/action-before-testing.test.d.ts +0 -1
- package/dist/decorators/action-before-testing.test.js +0 -82
- package/dist/decorators/action-before-testing.test.js.map +0 -1
- package/dist/engine/script-engine.d.ts +0 -35
- package/dist/engine/script-engine.js +0 -175
- package/dist/engine/script-engine.js.map +0 -1
- package/dist/engine/script-engine.test.d.ts +0 -1
- package/dist/engine/script-engine.test.js +0 -1277
- package/dist/engine/script-engine.test.js.map +0 -1
- package/dist/engine/story-engine.d.ts +0 -35
- package/dist/engine/story-engine.js +0 -175
- package/dist/engine/story-engine.js.map +0 -1
- package/dist/engine/story-engine.test.d.ts +0 -1
- package/dist/engine/story-engine.test.js +0 -1277
- package/dist/engine/story-engine.test.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts +0 -51
- package/dist/interfaces.js +0 -27
- package/dist/interfaces.js.map +0 -1
- package/dist/simulator/decorators.d.ts +0 -2
- package/dist/simulator/decorators.js +0 -23
- package/dist/simulator/decorators.js.map +0 -1
- package/dist/simulator/decorators.test.d.ts +0 -1
- package/dist/simulator/decorators.test.js +0 -81
- package/dist/simulator/decorators.test.js.map +0 -1
- package/dist/simulator/event-branches-map.d.ts +0 -16
- package/dist/simulator/event-branches-map.js +0 -114
- package/dist/simulator/event-branches-map.js.map +0 -1
- package/dist/simulator/event-branches-map.test.d.ts +0 -1
- package/dist/simulator/event-branches-map.test.js +0 -120
- package/dist/simulator/event-branches-map.test.js.map +0 -1
- package/dist/simulator/event-test-simulator.d.ts +0 -42
- package/dist/simulator/event-test-simulator.js +0 -373
- package/dist/simulator/event-test-simulator.js.map +0 -1
- package/dist/simulator/event-test-simulator.test.d.ts +0 -1
- package/dist/simulator/event-test-simulator.test.js +0 -1960
- package/dist/simulator/event-test-simulator.test.js.map +0 -1
- package/dist/simulator/execution-history.d.ts +0 -6
- package/dist/simulator/execution-history.js +0 -22
- package/dist/simulator/execution-history.js.map +0 -1
- package/dist/simulator/helpers/event-branches-map.d.ts +0 -16
- package/dist/simulator/helpers/event-branches-map.js +0 -114
- package/dist/simulator/helpers/event-branches-map.js.map +0 -1
- package/dist/simulator/helpers/event-branches-map.test.d.ts +0 -1
- package/dist/simulator/helpers/event-branches-map.test.js +0 -120
- package/dist/simulator/helpers/event-branches-map.test.js.map +0 -1
- package/dist/simulator/helpers/execution-history.d.ts +0 -6
- package/dist/simulator/helpers/execution-history.js +0 -22
- package/dist/simulator/helpers/execution-history.js.map +0 -1
- package/dist/simulator/helpers/script-branches-map.d.ts +0 -16
- package/dist/simulator/helpers/script-branches-map.js +0 -114
- package/dist/simulator/helpers/script-branches-map.js.map +0 -1
- package/dist/simulator/helpers/script-branches-map.test.d.ts +0 -1
- package/dist/simulator/helpers/script-branches-map.test.js +0 -120
- package/dist/simulator/helpers/script-branches-map.test.js.map +0 -1
- package/dist/simulator/script-test-simulator.d.ts +0 -42
- package/dist/simulator/script-test-simulator.js +0 -373
- package/dist/simulator/script-test-simulator.js.map +0 -1
- package/dist/simulator/script-test-simulator.test.d.ts +0 -1
- package/dist/simulator/script-test-simulator.test.js +0 -2013
- package/dist/simulator/script-test-simulator.test.js.map +0 -1
- package/dist/structured-text/index.d.ts +0 -9
- package/dist/structured-text/index.js +0 -8
- package/dist/structured-text/index.js.map +0 -1
- package/dist/structured-text/rich-text-separator.d.ts +0 -48
- package/dist/structured-text/rich-text-separator.js +0 -146
- package/dist/structured-text/rich-text-separator.js.map +0 -1
- package/dist/structured-text/rich-text-separator.test.d.ts +0 -1
- package/dist/structured-text/rich-text-separator.test.js +0 -166
- package/dist/structured-text/rich-text-separator.test.js.map +0 -1
- package/dist/structured-text/rich-text-validator.d.ts +0 -19
- package/dist/structured-text/rich-text-validator.js +0 -73
- package/dist/structured-text/rich-text-validator.js.map +0 -1
- package/dist/structured-text/rich-text-validator.test.d.ts +0 -1
- package/dist/structured-text/rich-text-validator.test.js +0 -59
- package/dist/structured-text/rich-text-validator.test.js.map +0 -1
- package/dist/test.spec.js.map +0 -1
- package/dist/test.test.d.ts +0 -1
- package/dist/test.test.js +0 -9
- package/dist/test.test.js.map +0 -1
- package/tsconfig.json +0 -24
- package/vitest.config.ts +0 -1
package/src/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ActionBeforeTesting } from './decorators/action-before-testing';
|
|
2
|
+
export * from './interfaces';
|
|
3
|
+
export { JSEngine, JSEngineFunction } from './js-engine/js-engine';
|
|
4
|
+
export { ScriptEngine, ScriptEngineFunctions, ScriptEngineOptions, ScriptEngineState } from './script-engine/script-engine';
|
|
5
|
+
export {
|
|
6
|
+
ScriptEngineSimulatorFunctions,
|
|
7
|
+
ScriptTestSimulator,
|
|
8
|
+
ScriptTestSimulatorOptions
|
|
9
|
+
} from './simulator/script-test-simulator';
|
|
10
|
+
export * from './structured-text';
|
package/.eslintrc.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es6: true,
|
|
5
|
-
node: true
|
|
6
|
-
},
|
|
7
|
-
extends: [
|
|
8
|
-
'eslint:recommended',
|
|
9
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
10
|
-
'plugin:@typescript-eslint/recommended',
|
|
11
|
-
'plugin:import/recommended',
|
|
12
|
-
'plugin:import/electron',
|
|
13
|
-
'plugin:import/typescript',
|
|
14
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
15
|
-
'plugin:@typescript-eslint/recommended',
|
|
16
|
-
'prettier'
|
|
17
|
-
],
|
|
18
|
-
parser: '@typescript-eslint/parser',
|
|
19
|
-
parserOptions: {
|
|
20
|
-
sourceType: 'module'
|
|
21
|
-
},
|
|
22
|
-
root: true,
|
|
23
|
-
env: {
|
|
24
|
-
node: true,
|
|
25
|
-
jest: true
|
|
26
|
-
},
|
|
27
|
-
plugins: ['@typescript-eslint', '@typescript-eslint/eslint-plugin', 'no-null', 'simple-import-sort'],
|
|
28
|
-
ignorePatterns: ['**/*.js', 'vite.config.ts', 'out/**/*', 'dist/**/*', 'node_modules/**/*'],
|
|
29
|
-
rules: {
|
|
30
|
-
'simple-import-sort/imports': [
|
|
31
|
-
'error',
|
|
32
|
-
{
|
|
33
|
-
groups: [
|
|
34
|
-
// External libraries (node_modules packages)
|
|
35
|
-
['^[a-z]'],
|
|
36
|
-
// Local imports (relative imports starting with .)
|
|
37
|
-
['^\\.\\.', '^\\./']
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
'simple-import-sort/exports': 'error',
|
|
42
|
-
'no-null/no-null': 2,
|
|
43
|
-
'comma-dangle': ['error', 'never'],
|
|
44
|
-
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
45
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
46
|
-
'@typescript-eslint/ban-types': 'error',
|
|
47
|
-
'@typescript-eslint/consistent-type-definitions': 'error',
|
|
48
|
-
'@typescript-eslint/dot-notation': 'off',
|
|
49
|
-
'@typescript-eslint/explicit-function-return-type': [
|
|
50
|
-
"warn",
|
|
51
|
-
{ "allowExpressions": true }
|
|
52
|
-
],
|
|
53
|
-
'@typescript-eslint/explicit-member-accessibility': [
|
|
54
|
-
'off',
|
|
55
|
-
{
|
|
56
|
-
accessibility: 'explicit'
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
|
60
|
-
'@typescript-eslint/indent': ['error', 2],
|
|
61
|
-
'@typescript-eslint/interface-name-prefix': 'off',
|
|
62
|
-
'@typescript-eslint/member-delimiter-style': [
|
|
63
|
-
'error',
|
|
64
|
-
{
|
|
65
|
-
multiline: {
|
|
66
|
-
delimiter: 'semi',
|
|
67
|
-
requireLast: true
|
|
68
|
-
},
|
|
69
|
-
singleline: {
|
|
70
|
-
delimiter: 'semi',
|
|
71
|
-
requireLast: false
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
'@typescript-eslint/naming-convention': [
|
|
76
|
-
'error',
|
|
77
|
-
{
|
|
78
|
-
selector: 'variable',
|
|
79
|
-
modifiers: ['const'],
|
|
80
|
-
format: ['PascalCase', 'UPPER_CASE']
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
selector: 'variable',
|
|
84
|
-
modifiers: [],
|
|
85
|
-
format: ['camelCase'],
|
|
86
|
-
leadingUnderscore: 'allow',
|
|
87
|
-
trailingUnderscore: 'forbid'
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
'@typescript-eslint/no-array-constructor': 'error',
|
|
91
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
92
|
-
'@typescript-eslint/no-empty-interface': 'error',
|
|
93
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
94
|
-
'@typescript-eslint/no-extra-non-null-assertion': 'error',
|
|
95
|
-
'@typescript-eslint/no-inferrable-types': [
|
|
96
|
-
'error',
|
|
97
|
-
{
|
|
98
|
-
ignoreParameters: true,
|
|
99
|
-
ignoreProperties: true
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
'@typescript-eslint/no-misused-new': 'error',
|
|
103
|
-
'@typescript-eslint/no-namespace': 'error',
|
|
104
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
105
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
106
|
-
'@typescript-eslint/no-this-alias': 'error',
|
|
107
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
108
|
-
'@typescript-eslint/no-unused-vars': [
|
|
109
|
-
'error',
|
|
110
|
-
{
|
|
111
|
-
args: 'none',
|
|
112
|
-
vars: 'all',
|
|
113
|
-
varsIgnorePattern: '^_',
|
|
114
|
-
caughtErrors: 'all',
|
|
115
|
-
caughtErrorsIgnorePattern: '^_',
|
|
116
|
-
ignoreRestSiblings: true
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
'@typescript-eslint/no-var-requires': 'error',
|
|
120
|
-
'@typescript-eslint/prefer-as-const': 'error',
|
|
121
|
-
'@typescript-eslint/prefer-function-type': 'error',
|
|
122
|
-
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
123
|
-
'@typescript-eslint/quotes': ['error', 'single', { allowTemplateLiterals: true }],
|
|
124
|
-
'@typescript-eslint/semi': ['error', 'always'],
|
|
125
|
-
'@typescript-eslint/triple-slash-reference': 'error',
|
|
126
|
-
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
127
|
-
'@typescript-eslint/unified-signatures': 'error',
|
|
128
|
-
'@typescript-eslint/no-shadow': 'warn',
|
|
129
|
-
'arrow-body-style': 'error',
|
|
130
|
-
'arrow-parens': [2, 'as-needed'],
|
|
131
|
-
'brace-style': ['error', '1tbs'],
|
|
132
|
-
'constructor-super': 'error',
|
|
133
|
-
curly: 'error',
|
|
134
|
-
'eol-last': 'error',
|
|
135
|
-
eqeqeq: ['error', 'smart'],
|
|
136
|
-
'guard-for-in': 'off',
|
|
137
|
-
'id-blacklist': 'off',
|
|
138
|
-
'id-match': 'off',
|
|
139
|
-
'max-len': [
|
|
140
|
-
'error',
|
|
141
|
-
{
|
|
142
|
-
code: 130,
|
|
143
|
-
ignoreUrls: true,
|
|
144
|
-
ignoreRegExpLiterals: true,
|
|
145
|
-
ignoreStrings: true,
|
|
146
|
-
ignoreTemplateLiterals: true,
|
|
147
|
-
ignoreComments: true
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
'no-array-constructor': 'off',
|
|
151
|
-
'no-bitwise': 'error',
|
|
152
|
-
'no-caller': 'error',
|
|
153
|
-
'no-console': [
|
|
154
|
-
'error',
|
|
155
|
-
{
|
|
156
|
-
allow: [
|
|
157
|
-
'log',
|
|
158
|
-
'warn',
|
|
159
|
-
'dir',
|
|
160
|
-
'timeLog',
|
|
161
|
-
'assert',
|
|
162
|
-
'clear',
|
|
163
|
-
'count',
|
|
164
|
-
'countReset',
|
|
165
|
-
'group',
|
|
166
|
-
'groupEnd',
|
|
167
|
-
'table',
|
|
168
|
-
'info',
|
|
169
|
-
'dirxml',
|
|
170
|
-
'error',
|
|
171
|
-
'groupCollapsed',
|
|
172
|
-
'Console',
|
|
173
|
-
'profile',
|
|
174
|
-
'profileEnd',
|
|
175
|
-
'timeStamp',
|
|
176
|
-
'context'
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
'no-debugger': 'error',
|
|
181
|
-
'no-empty': 'off',
|
|
182
|
-
'no-empty-function': 'off',
|
|
183
|
-
'no-eval': 'error',
|
|
184
|
-
'no-fallthrough': 'error',
|
|
185
|
-
'no-new-wrappers': 'error',
|
|
186
|
-
'no-restricted-imports': 'error',
|
|
187
|
-
'no-shadow': 'off',
|
|
188
|
-
'no-throw-literal': 'error',
|
|
189
|
-
'no-trailing-spaces': 'error',
|
|
190
|
-
'no-undef-init': 'error',
|
|
191
|
-
'no-underscore-dangle': 'off',
|
|
192
|
-
'no-unused-labels': 'error',
|
|
193
|
-
'no-unused-vars': 'off',
|
|
194
|
-
'no-var': 'error',
|
|
195
|
-
'prefer-const': 'off',
|
|
196
|
-
radix: 'off',
|
|
197
|
-
semi: [
|
|
198
|
-
'error',
|
|
199
|
-
'always',
|
|
200
|
-
{
|
|
201
|
-
omitLastInOneLineBlock: true
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
'spaced-comment': [
|
|
205
|
-
'error',
|
|
206
|
-
'always',
|
|
207
|
-
{
|
|
208
|
-
markers: ['/']
|
|
209
|
-
}
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
};
|
package/.vscode/launch.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"configurations": [
|
|
3
|
-
{
|
|
4
|
-
"name": "Unit Tests",
|
|
5
|
-
"type": "node",
|
|
6
|
-
"request": "launch",
|
|
7
|
-
"autoAttachChildProcesses": true,
|
|
8
|
-
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
|
|
9
|
-
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
|
|
10
|
-
"args": ["run"],
|
|
11
|
-
"smartStep": true,
|
|
12
|
-
"console": "integratedTerminal"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"javascript.preferences.importModuleSpecifier": "relative",
|
|
3
|
-
"typescript.preferences.importModuleSpecifier": "relative",
|
|
4
|
-
"workbench.activityBar.location": "top",
|
|
5
|
-
"window.zoomLevel": 0,
|
|
6
|
-
"editor.stickyScroll.enabled": false,
|
|
7
|
-
"workbench.tree.enableStickyScroll": false,
|
|
8
|
-
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
|
|
9
|
-
"editor.wrappingIndent": "indent",
|
|
10
|
-
"editor.codeActionsOnSave": {
|
|
11
|
-
"source.organizeImports": "always"
|
|
12
|
-
},
|
|
13
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
14
|
-
"typescript.enablePromptUseWorkspaceTsdk": true
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionBeforeTesting = exports.ActionBeforeTestingFlag = void 0;
|
|
4
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
5
|
-
exports.ActionBeforeTestingFlag = 'actionsBeforeTesting';
|
|
6
|
-
function ActionBeforeTesting() {
|
|
7
|
-
return function (_, propertyKey, descriptor) {
|
|
8
|
-
let originalFunction = descriptor.value;
|
|
9
|
-
helpers_lib_1.JSEngine.setAsJSEngineFunction(originalFunction);
|
|
10
|
-
descriptor.value = function (...args) {
|
|
11
|
-
let hasFlag = Reflect.getOwnMetadata(exports.ActionBeforeTestingFlag, this);
|
|
12
|
-
if (hasFlag) {
|
|
13
|
-
return originalFunction.apply(this, args);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
throw new Error(`"${String(propertyKey)}(...)" can only be called at "actions before testing".`);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
helpers_lib_1.MetaDataHelper.carryMetaDataOfFunction(originalFunction, descriptor.value);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.ActionBeforeTesting = ActionBeforeTesting;
|
|
23
|
-
//# sourceMappingURL=action-before-testing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-before-testing.js","sourceRoot":"","sources":["../../src/decorators/action-before-testing.ts"],"names":[],"mappings":";;;AAAA,6CAAuD;AAE1C,QAAA,uBAAuB,GAAG,sBAAsB,CAAC;AAE9D,SAAgB,mBAAmB;IACjC,OAAO,UAAU,CAAU,EAAE,WAAmB,EAAE,UAA8B;QAC9E,IAAI,gBAAgB,GAAG,UAAU,CAAC,KAAK,CAAC;QACxC,sBAAQ,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;QAEjD,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAW;YACzC,IAAI,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,+BAAuB,EAAE,IAAI,CAAC,CAAC;YACpE,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,wDAAwD,CAAC,CAAC;YACnG,CAAC;QACH,CAAC,CAAC;QAEF,4BAAc,CAAC,uBAAuB,CAAC,gBAAgB,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC;AAhBD,kDAgBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
13
|
-
const vitest_1 = require("vitest");
|
|
14
|
-
const script_test_simulator_1 = require("../simulator/script-test-simulator");
|
|
15
|
-
const action_before_testing_1 = require("./action-before-testing");
|
|
16
|
-
let SampleFunctions = class SampleFunctions extends script_test_simulator_1.ScriptEngineSimulatorFunctions {
|
|
17
|
-
onPlayerChoice(choices) { }
|
|
18
|
-
onDialog(text, speaker) { }
|
|
19
|
-
onEnd() { }
|
|
20
|
-
onScriptBranchingEnd() { }
|
|
21
|
-
exclusive() { }
|
|
22
|
-
sayHi(message) { }
|
|
23
|
-
};
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, action_before_testing_1.ActionBeforeTesting)(),
|
|
26
|
-
__metadata("design:type", Function),
|
|
27
|
-
__metadata("design:paramtypes", []),
|
|
28
|
-
__metadata("design:returntype", void 0)
|
|
29
|
-
], SampleFunctions.prototype, "exclusive", null);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, action_before_testing_1.ActionBeforeTesting)(),
|
|
32
|
-
__metadata("design:type", Function),
|
|
33
|
-
__metadata("design:paramtypes", [String]),
|
|
34
|
-
__metadata("design:returntype", void 0)
|
|
35
|
-
], SampleFunctions.prototype, "sayHi", null);
|
|
36
|
-
SampleFunctions = __decorate([
|
|
37
|
-
(0, helpers_lib_1.AutoValidate)({ allowReadingNonExistantProperties: true })
|
|
38
|
-
], SampleFunctions);
|
|
39
|
-
(0, vitest_1.describe)('ScriptTestSimulator', () => {
|
|
40
|
-
let functions;
|
|
41
|
-
(0, vitest_1.beforeEach)(() => {
|
|
42
|
-
functions = new SampleFunctions();
|
|
43
|
-
});
|
|
44
|
-
(0, vitest_1.test)('sample 1 - valid call', () => {
|
|
45
|
-
let actionsBeforeTesting = [{ type: 'command', value: 'exclusive()' }];
|
|
46
|
-
let scripts = [
|
|
47
|
-
{
|
|
48
|
-
id: 'script1',
|
|
49
|
-
actions: [{ type: 'command', value: 'a = 1' }]
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
let simulator = new script_test_simulator_1.ScriptTestSimulator(scripts);
|
|
53
|
-
let jsEngine = new helpers_lib_1.JSEngine(functions, {});
|
|
54
|
-
(0, vitest_1.expect)(() => simulator.simulateScript(scripts[0], jsEngine, actionsBeforeTesting)).not.toThrow();
|
|
55
|
-
});
|
|
56
|
-
(0, vitest_1.test)('sample 2 - call during execution error', () => {
|
|
57
|
-
let scripts = [
|
|
58
|
-
{
|
|
59
|
-
id: 'script1',
|
|
60
|
-
actions: [{ type: 'command', value: 'exclusive()' }]
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
let simulator = new script_test_simulator_1.ScriptTestSimulator(scripts);
|
|
64
|
-
let jsEngine = new helpers_lib_1.JSEngine(functions, {});
|
|
65
|
-
(0, vitest_1.expect)(() => simulator.simulateScript(scripts[0], jsEngine, [])).toThrow('"exclusive(...)" can only be called at "actions before testing"');
|
|
66
|
-
});
|
|
67
|
-
(0, vitest_1.test)('sample 3 - wrong parameter count error', () => {
|
|
68
|
-
let scripts = [
|
|
69
|
-
{
|
|
70
|
-
id: 'script1',
|
|
71
|
-
actions: [{ type: 'command', value: 'exclusive("a")' }]
|
|
72
|
-
}
|
|
73
|
-
];
|
|
74
|
-
let simulator = new script_test_simulator_1.ScriptTestSimulator(scripts);
|
|
75
|
-
let jsEngine = new helpers_lib_1.JSEngine(functions, {});
|
|
76
|
-
(0, vitest_1.expect)(() => simulator.simulateScript(scripts[0], jsEngine, [])).toThrow('Error: Unexpected argument has sent to exclusive. Expected: 0, Received: 1');
|
|
77
|
-
});
|
|
78
|
-
(0, vitest_1.test)('sample 4 - preserve parameter count', () => {
|
|
79
|
-
(0, vitest_1.expect)(functions.sayHi.length).toBe(1);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=action-before-testing.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-before-testing.test.js","sourceRoot":"","sources":["../../src/decorators/action-before-testing.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6CAAqD;AACrD,mCAA4D;AAG5D,8EAAyG;AACzG,mEAA8D;AAG9D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,sDAA8B;IAC1D,cAAc,CAAC,OAA0B,IAAS,CAAC;IACnD,QAAQ,CAAC,IAAY,EAAE,OAAe,IAAS,CAAC;IAChD,KAAK,KAAU,CAAC;IAChB,oBAAoB,KAAU,CAAC;IAG/B,SAAS,KAAU,CAAC;IAGpB,KAAK,CAAC,OAAe,IAAS,CAAC;CAChC,CAAA;AAJC;IAD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B,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,QAAQ,GAAG,IAAI,sBAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAE3C,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CACtE,iEAAiE,CAClE,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,wCAAwC,EAAE,GAAG,EAAE;QAClD,IAAI,OAAO,GAAuB;YAChC;gBACE,EAAE,EAAE,SAAS;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;aACxD;SACF,CAAC;QAEF,IAAI,SAAS,GAAG,IAAI,2CAAmB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,QAAQ,GAAG,IAAI,sBAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAE3C,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CACtE,4EAA4E,CAC7E,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,qCAAqC,EAAE,GAAG,EAAE;QAC/C,IAAA,eAAM,EAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ScriptDefinition } from '../interfaces';
|
|
2
|
-
export interface ScriptEngineOptions {
|
|
3
|
-
readonly manualTestingMode?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare abstract class ScriptEngineFunctions {
|
|
6
|
-
abstract onPlayerChoice(choices: readonly string[]): void;
|
|
7
|
-
abstract onDialog(text: string, speaker: string): void;
|
|
8
|
-
}
|
|
9
|
-
export declare enum ScriptEngineState {
|
|
10
|
-
idle = "idle",
|
|
11
|
-
running = "running",
|
|
12
|
-
waitingForPlayerChoice = "waitingForPlayerChoice"
|
|
13
|
-
}
|
|
14
|
-
export declare class ScriptEngine<ScriptFunctions extends ScriptEngineFunctions> {
|
|
15
|
-
private scriptDefinitions;
|
|
16
|
-
private jsEngine;
|
|
17
|
-
private stack;
|
|
18
|
-
private playerBranchingChoices;
|
|
19
|
-
private manualTestingMode;
|
|
20
|
-
get variables(): {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
get state(): ScriptEngineState;
|
|
24
|
-
private get running();
|
|
25
|
-
constructor(scriptDefinitions: Readonly<Record<string, ScriptDefinition>>, functions: ScriptFunctions, variables: {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
}, options?: ScriptEngineOptions);
|
|
28
|
-
start(scriptId: string): void;
|
|
29
|
-
next(): void;
|
|
30
|
-
playerChoice(choice: number): void;
|
|
31
|
-
private jumpTo;
|
|
32
|
-
private executeAction;
|
|
33
|
-
private insertActionsToStack;
|
|
34
|
-
private validateReservedFunctions;
|
|
35
|
-
}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScriptEngine = exports.ScriptEngineState = exports.ScriptEngineFunctions = void 0;
|
|
4
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
5
|
-
class ScriptEngineFunctions {
|
|
6
|
-
}
|
|
7
|
-
exports.ScriptEngineFunctions = ScriptEngineFunctions;
|
|
8
|
-
var ScriptEngineState;
|
|
9
|
-
(function (ScriptEngineState) {
|
|
10
|
-
ScriptEngineState["idle"] = "idle";
|
|
11
|
-
ScriptEngineState["running"] = "running";
|
|
12
|
-
ScriptEngineState["waitingForPlayerChoice"] = "waitingForPlayerChoice";
|
|
13
|
-
})(ScriptEngineState || (exports.ScriptEngineState = ScriptEngineState = {}));
|
|
14
|
-
class ScriptEngine {
|
|
15
|
-
get variables() {
|
|
16
|
-
return this.jsEngine.variables;
|
|
17
|
-
}
|
|
18
|
-
get state() {
|
|
19
|
-
if (this.playerBranchingChoices) {
|
|
20
|
-
return ScriptEngineState.waitingForPlayerChoice;
|
|
21
|
-
}
|
|
22
|
-
else if (this.running) {
|
|
23
|
-
return ScriptEngineState.running;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return ScriptEngineState.idle;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
get running() {
|
|
30
|
-
return !this.stack.isEmpty;
|
|
31
|
-
}
|
|
32
|
-
constructor(scriptDefinitions, functions, variables, options) {
|
|
33
|
-
this.stack = new helpers_lib_1.Stack();
|
|
34
|
-
this.manualTestingMode = false;
|
|
35
|
-
this.validateReservedFunctions(functions);
|
|
36
|
-
this.manualTestingMode = options?.manualTestingMode ? true : false;
|
|
37
|
-
this.scriptDefinitions = scriptDefinitions;
|
|
38
|
-
this.jsEngine = new helpers_lib_1.JSEngine(functions, variables);
|
|
39
|
-
}
|
|
40
|
-
start(scriptId) {
|
|
41
|
-
if (!this.stack.isEmpty) {
|
|
42
|
-
throw new Error(`ScriptEngine: Existing script haven't been concluded yet.`);
|
|
43
|
-
}
|
|
44
|
-
this.jumpTo(scriptId);
|
|
45
|
-
}
|
|
46
|
-
next() {
|
|
47
|
-
if (this.stack.isEmpty) {
|
|
48
|
-
throw new Error(`ScriptEngine: There is no active script to iterate.`);
|
|
49
|
-
}
|
|
50
|
-
if (this.state !== ScriptEngineState.running) {
|
|
51
|
-
throw new Error(`ScriptEngine: The engine is not in running state. Next action cannot be executed. State: ${this.state}`);
|
|
52
|
-
}
|
|
53
|
-
let action = this.stack.pop();
|
|
54
|
-
this.executeAction(action);
|
|
55
|
-
}
|
|
56
|
-
playerChoice(choice) {
|
|
57
|
-
if (!this.playerBranchingChoices) {
|
|
58
|
-
throw new Error(`ScriptEngine: No player branching choices available.`);
|
|
59
|
-
}
|
|
60
|
-
let selectedActions = this.playerBranchingChoices[choice];
|
|
61
|
-
if (!selectedActions) {
|
|
62
|
-
throw new Error(`ScriptEngine: Invalid player choice.`);
|
|
63
|
-
}
|
|
64
|
-
this.insertActionsToStack(selectedActions);
|
|
65
|
-
this.playerBranchingChoices = undefined;
|
|
66
|
-
if (this.running) {
|
|
67
|
-
this.next();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
jumpTo(scriptId) {
|
|
71
|
-
let scriptDefinition = this.scriptDefinitions[scriptId];
|
|
72
|
-
if (!scriptDefinition) {
|
|
73
|
-
throw new Error(`ScriptEngine: Script definition not found: ${scriptId}`);
|
|
74
|
-
}
|
|
75
|
-
this.insertActionsToStack(scriptDefinition.actions);
|
|
76
|
-
}
|
|
77
|
-
executeAction(action) {
|
|
78
|
-
switch (action.type) {
|
|
79
|
-
case 'command':
|
|
80
|
-
this.jsEngine.execute(action.value);
|
|
81
|
-
break;
|
|
82
|
-
case 'dialog': {
|
|
83
|
-
let dialogItem = action.value;
|
|
84
|
-
this.jsEngine.functions.onDialog(this.jsEngine.string(dialogItem.text), dialogItem.speaker);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
case 'jumpTo': {
|
|
88
|
-
this.jumpTo(action.value);
|
|
89
|
-
if (this.running) {
|
|
90
|
-
this.next();
|
|
91
|
-
}
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
case 'branchByCondition': {
|
|
95
|
-
let branches = action.value;
|
|
96
|
-
let selectedBranch = branches.find(branch => {
|
|
97
|
-
if (branch.condition) {
|
|
98
|
-
return this.jsEngine.boolean(branch.condition);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
if (!selectedBranch) {
|
|
105
|
-
throw new Error(`ScriptEngine: No branch is fulfilled the condition in branchByCondition action.`);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
this.insertActionsToStack(selectedBranch.actions);
|
|
109
|
-
}
|
|
110
|
-
if (this.running) {
|
|
111
|
-
this.next();
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
case 'branchByChance': {
|
|
116
|
-
let validBranches = action.value.filter(branch => {
|
|
117
|
-
if (branch.condition) {
|
|
118
|
-
return this.jsEngine.boolean(branch.condition);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
if (validBranches.length === 0) {
|
|
125
|
-
throw new Error(`ScriptEngine: No branch is fulfilled the condition in branchByChance action.`);
|
|
126
|
-
}
|
|
127
|
-
else if (this.manualTestingMode) {
|
|
128
|
-
this.playerBranchingChoices = validBranches.map(branch => branch.actions);
|
|
129
|
-
this.jsEngine.functions.onPlayerChoice(validBranches.map((branch, index) => branch.label ?? `Anonymous ${index}`));
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
let selectedActions = helpers_lib_1.Random.pickRandomElementWithWeight(validBranches.map(branch => ({
|
|
133
|
-
value: branch.actions,
|
|
134
|
-
weight: helpers_lib_1.Comparator.isString(branch.weight) ? this.jsEngine.number(branch.weight) : branch.weight
|
|
135
|
-
})));
|
|
136
|
-
this.insertActionsToStack(selectedActions);
|
|
137
|
-
if (this.running) {
|
|
138
|
-
this.next();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
case 'branchByPlayerChoice': {
|
|
144
|
-
let validBranches = action.value.filter(branch => {
|
|
145
|
-
if (branch.condition) {
|
|
146
|
-
return this.jsEngine.boolean(branch.condition);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
if (validBranches.length === 0) {
|
|
153
|
-
throw new Error(`ScriptEngine: No branch is fulfilled the condition in branchByPlayerChoice action.`);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
this.playerBranchingChoices = validBranches.map(branch => branch.actions);
|
|
157
|
-
this.jsEngine.functions.onPlayerChoice(validBranches.map(branch => this.jsEngine.string(branch.text)));
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
default:
|
|
162
|
-
throw new Error(`ScriptEngine: Unknown action type: ${action.type}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
insertActionsToStack(actions) {
|
|
166
|
-
this.stack.add(...actions);
|
|
167
|
-
}
|
|
168
|
-
validateReservedFunctions(functions) {
|
|
169
|
-
if (helpers_lib_1.JSEngine.isJSEngineFunction(functions.onPlayerChoice)) {
|
|
170
|
-
throw new Error(`ScriptEngine: onPlayerChoice function shall not be decorated as a JSEngineFunction.`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
exports.ScriptEngine = ScriptEngine;
|
|
175
|
-
//# sourceMappingURL=script-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"script-engine.js","sourceRoot":"","sources":["../../src/engine/script-engine.ts"],"names":[],"mappings":";;;AAAA,6CAAkE;AAelE,MAAsB,qBAAqB;CAG1C;AAHD,sDAGC;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,sEAAiD,CAAA;AACnD,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,MAAa,YAAY;IASvB,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;IACjC,CAAC;IAED,IAAI,KAAK;QACP,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAChC,OAAO,iBAAiB,CAAC,sBAAsB,CAAC;QAClD,CAAC;aAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,i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