definition-generator-framework 1.9.10 → 1.9.12
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.ts +2 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/pre-made-components/events/1-event.d.ts +6 -0
- package/dist/pre-made-components/events/1-event.js +154 -0
- package/dist/pre-made-components/events/1-event.js.map +1 -0
- package/dist/pre-made-components/events/2-event-test.d.ts +2 -0
- package/dist/pre-made-components/events/2-event-test.js +137 -0
- package/dist/pre-made-components/events/2-event-test.js.map +1 -0
- package/dist/setup.d.ts +1 -0
- package/dist/setup.js +10 -0
- package/dist/setup.js.map +1 -0
- package/package.json +5 -4
- package/package.json.bak +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -5,3 +5,5 @@ export { ErrorLog, LocationInFile, Output } from './framework/interfaces';
|
|
|
5
5
|
export { ValidatedSpriteUrl } from './helpers/validator/custom-validators/sprite.custom-validator';
|
|
6
6
|
export { JoiCustomValidators } from './helpers/validator/joi-custom-validators';
|
|
7
7
|
export { Validator } from './helpers/validator/validator';
|
|
8
|
+
export { EventComponent } from './pre-made-components/events/1-event';
|
|
9
|
+
export { EventTestComponent } from './pre-made-components/events/2-event-test';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Validator = exports.JoiCustomValidators = exports.DefinitionStore = exports.DefinitionGeneratorDecorator = exports.DefinitionGenerator = exports.SingleDefinitionComponent = exports.DefinitionComponentDecorator = exports.DefinitionComponent = void 0;
|
|
3
|
+
exports.EventTestComponent = exports.EventComponent = exports.Validator = exports.JoiCustomValidators = exports.DefinitionStore = exports.DefinitionGeneratorDecorator = exports.DefinitionGenerator = exports.SingleDefinitionComponent = exports.DefinitionComponentDecorator = exports.DefinitionComponent = void 0;
|
|
4
|
+
require('./setup');
|
|
4
5
|
var definition_component_1 = require("./decorators/definition-component");
|
|
5
6
|
Object.defineProperty(exports, "DefinitionComponent", { enumerable: true, get: function () { return definition_component_1.DefinitionComponent; } });
|
|
6
7
|
Object.defineProperty(exports, "DefinitionComponentDecorator", { enumerable: true, get: function () { return definition_component_1.DefinitionComponentDecorator; } });
|
|
@@ -14,4 +15,8 @@ var joi_custom_validators_1 = require("./helpers/validator/joi-custom-validators
|
|
|
14
15
|
Object.defineProperty(exports, "JoiCustomValidators", { enumerable: true, get: function () { return joi_custom_validators_1.JoiCustomValidators; } });
|
|
15
16
|
var validator_1 = require("./helpers/validator/validator");
|
|
16
17
|
Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return validator_1.Validator; } });
|
|
18
|
+
var _1_event_1 = require("./pre-made-components/events/1-event");
|
|
19
|
+
Object.defineProperty(exports, "EventComponent", { enumerable: true, get: function () { return _1_event_1.EventComponent; } });
|
|
20
|
+
var _2_event_test_1 = require("./pre-made-components/events/2-event-test");
|
|
21
|
+
Object.defineProperty(exports, "EventTestComponent", { enumerable: true, get: function () { return _2_event_test_1.EventTestComponent; } });
|
|
17
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0EAK2C;AAJzC,2HAAA,mBAAmB,OAAA;AAEnB,oIAAA,4BAA4B,OAAA;AAC5B,iIAAA,yBAAyB,OAAA;AAE3B,0EAAsG;AAA7F,2HAAA,mBAAmB,OAAA;AAAE,oIAAA,4BAA4B,OAAA;AAC1D,iEAA+D;AAAtD,mHAAA,eAAe,OAAA;AAGxB,mFAAgF;AAAvE,4HAAA,mBAAmB,OAAA;AAC5B,2DAA0D;AAAjD,sGAAA,SAAS,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,CAAC,SAAS,CAAC,CAAC;AAEnB,0EAK2C;AAJzC,2HAAA,mBAAmB,OAAA;AAEnB,oIAAA,4BAA4B,OAAA;AAC5B,iIAAA,yBAAyB,OAAA;AAE3B,0EAAsG;AAA7F,2HAAA,mBAAmB,OAAA;AAAE,oIAAA,4BAA4B,OAAA;AAC1D,iEAA+D;AAAtD,mHAAA,eAAe,OAAA;AAGxB,mFAAgF;AAAvE,4HAAA,mBAAmB,OAAA;AAC5B,2DAA0D;AAAjD,sGAAA,SAAS,OAAA;AAClB,iEAAsE;AAA7D,0GAAA,cAAc,OAAA;AACvB,2EAA+E;AAAtE,mHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventDefinition } from 'story-engine-lib';
|
|
2
|
+
import { DefinitionComponent } from '../../decorators/definition-component';
|
|
3
|
+
import { Output } from '../../framework/interfaces';
|
|
4
|
+
export declare class EventComponent extends DefinitionComponent<EventDefinition> {
|
|
5
|
+
process(definitions: EventDefinition[], output: Output): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EventComponent = void 0;
|
|
13
|
+
const helpers_lib_1 = require("helpers-lib");
|
|
14
|
+
const joi_1 = __importDefault(require("joi"));
|
|
15
|
+
const definition_component_1 = require("../../decorators/definition-component");
|
|
16
|
+
// ---- Conditions ----
|
|
17
|
+
const ActionCommandSchema = () => joi_1.default.string().custom(value => ({
|
|
18
|
+
type: 'command',
|
|
19
|
+
value: value
|
|
20
|
+
}));
|
|
21
|
+
// ---- Branches ----
|
|
22
|
+
const JumpToEventSchema = joi_1.default.object()
|
|
23
|
+
.keys({
|
|
24
|
+
jumpToEvent: joi_1.default.string().lazyReference('EVENT').required()
|
|
25
|
+
})
|
|
26
|
+
.custom(value => ({
|
|
27
|
+
type: 'jumpToEvent',
|
|
28
|
+
value: value.jumpToEvent
|
|
29
|
+
}));
|
|
30
|
+
const BranchByConditionSchema = joi_1.default.object()
|
|
31
|
+
.keys({
|
|
32
|
+
branchByCondition: joi_1.default.array()
|
|
33
|
+
.items(joi_1.default.object().keys({
|
|
34
|
+
condition: joi_1.default.string().optional(),
|
|
35
|
+
actions: joi_1.default.link('#EventActionsSchema').default([]).optional()
|
|
36
|
+
}))
|
|
37
|
+
.custom((array, helpers) => {
|
|
38
|
+
let length = array.length;
|
|
39
|
+
if (length > 1) {
|
|
40
|
+
for (let i = 0; i < length - 1; i++) {
|
|
41
|
+
if (array[i].condition === undefined) {
|
|
42
|
+
throw new Error(`Element at index ${i} must have "condition"`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (length === 1) {
|
|
47
|
+
if (array[0].condition === undefined) {
|
|
48
|
+
throw new Error('Single element must have "condition"');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return array;
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
.custom(value => ({
|
|
55
|
+
type: 'branchByCondition',
|
|
56
|
+
value: value.branchByCondition
|
|
57
|
+
}));
|
|
58
|
+
const BranchByPlayerChoiceSchema = joi_1.default.object()
|
|
59
|
+
.keys({
|
|
60
|
+
branchByPlayerChoice: joi_1.default.array().items(joi_1.default.object().keys({
|
|
61
|
+
text: joi_1.default.string().min(2).required(),
|
|
62
|
+
condition: joi_1.default.string().optional(),
|
|
63
|
+
actions: joi_1.default.link('#EventActionsSchema').default([]).optional()
|
|
64
|
+
}))
|
|
65
|
+
})
|
|
66
|
+
.custom(value => ({
|
|
67
|
+
type: 'branchByPlayerChoice',
|
|
68
|
+
value: value.branchByPlayerChoice
|
|
69
|
+
}));
|
|
70
|
+
const BranchByChanceSchema = joi_1.default.object()
|
|
71
|
+
.keys({
|
|
72
|
+
branchByChance: joi_1.default.array().items(joi_1.default.object().keys({
|
|
73
|
+
label: joi_1.default.string().required(),
|
|
74
|
+
weight: joi_1.default.number().integer().min(1).max(100).required(),
|
|
75
|
+
condition: joi_1.default.string().optional(),
|
|
76
|
+
actions: joi_1.default.link('#EventActionsSchema').default([]).optional()
|
|
77
|
+
}))
|
|
78
|
+
})
|
|
79
|
+
.custom(value => ({
|
|
80
|
+
type: 'branchByChance',
|
|
81
|
+
value: value.branchByChance
|
|
82
|
+
}));
|
|
83
|
+
// -----
|
|
84
|
+
const ActionsSchema = () => joi_1.default.array()
|
|
85
|
+
.items(joi_1.default.alternatives()
|
|
86
|
+
.conditional(joi_1.default.string(), {
|
|
87
|
+
then: ActionCommandSchema()
|
|
88
|
+
})
|
|
89
|
+
.conditional(joi_1.default.object({ jumpToEvent: joi_1.default.exist() }).unknown(), {
|
|
90
|
+
then: JumpToEventSchema
|
|
91
|
+
})
|
|
92
|
+
.conditional(joi_1.default.object({ branchByChance: joi_1.default.exist() }).unknown(), {
|
|
93
|
+
then: BranchByChanceSchema
|
|
94
|
+
})
|
|
95
|
+
.conditional(joi_1.default.object({ branchByCondition: joi_1.default.exist() }).unknown(), {
|
|
96
|
+
then: BranchByConditionSchema
|
|
97
|
+
})
|
|
98
|
+
.conditional(joi_1.default.object({ branchByPlayerChoice: joi_1.default.exist() }).unknown(), {
|
|
99
|
+
then: BranchByPlayerChoiceSchema
|
|
100
|
+
})
|
|
101
|
+
.error(errors => errors.map(error => {
|
|
102
|
+
if (error.code === 'alternatives.any') {
|
|
103
|
+
let allowedTypes = '["command", "jumpToEvent", "branchByCondition", "branchByPlayerChoice", "branchByChance"]';
|
|
104
|
+
error.message = `${error.local.label} does not match any of the allowed types: ${allowedTypes}`;
|
|
105
|
+
}
|
|
106
|
+
return error;
|
|
107
|
+
})))
|
|
108
|
+
.custom((array) => {
|
|
109
|
+
let commandFoundAfterBranching = false;
|
|
110
|
+
let branchingFound = false;
|
|
111
|
+
array.forEach(action => {
|
|
112
|
+
if (branchingFound) {
|
|
113
|
+
commandFoundAfterBranching = true;
|
|
114
|
+
}
|
|
115
|
+
else if (action.type === 'jumpToEvent' ||
|
|
116
|
+
action.type === 'branchByCondition' ||
|
|
117
|
+
action.type === 'branchByPlayerChoice' ||
|
|
118
|
+
action.type === 'branchByChance') {
|
|
119
|
+
branchingFound = true;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
if (commandFoundAfterBranching) {
|
|
123
|
+
throw new Error('There should not be any command after branching.');
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return array;
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
.id('EventActionsSchema');
|
|
130
|
+
let EventComponent = class EventComponent extends definition_component_1.DefinitionComponent {
|
|
131
|
+
async process(definitions, output) {
|
|
132
|
+
await output.addFile({
|
|
133
|
+
path: '/premade-components/events.ts',
|
|
134
|
+
preText: `import { EventDefinition } from "story-engine-lib";`,
|
|
135
|
+
variableName: 'EventDefinitions',
|
|
136
|
+
variableType: 'Readonly<Record<string, EventDefinition>>',
|
|
137
|
+
variable: helpers_lib_1.JsonHelper.arrayToObject(definitions, 'id')
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
exports.EventComponent = EventComponent;
|
|
142
|
+
exports.EventComponent = EventComponent = __decorate([
|
|
143
|
+
(0, definition_component_1.DefinitionComponentDecorator)({
|
|
144
|
+
componentName: 'EVENT',
|
|
145
|
+
keyName: 'id',
|
|
146
|
+
validationSchema: joi_1.default.object()
|
|
147
|
+
.keys({
|
|
148
|
+
id: joi_1.default.string().required(),
|
|
149
|
+
actions: ActionsSchema().min(1).required()
|
|
150
|
+
})
|
|
151
|
+
.required()
|
|
152
|
+
})
|
|
153
|
+
], EventComponent);
|
|
154
|
+
//# sourceMappingURL=1-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-event.js","sourceRoot":"","sources":["../../../src/pre-made-components/events/1-event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyC;AACzC,8CAAsB;AAGtB,gFAA0G;AAG1G,uBAAuB;AACvB,MAAM,mBAAmB,GAAG,GAAe,EAAE,CAC3C,aAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,KAAK;CACb,CAAC,CAAC,CAAC;AAEN,qBAAqB;AACrB,MAAM,iBAAiB,GAAG,aAAG,CAAC,MAAM,EAAE;KACnC,IAAI,CAAC;IACJ,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC;KACD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,KAAK,CAAC,WAAW;CACzB,CAAC,CAAC,CAAC;AAEN,MAAM,uBAAuB,GAAG,aAAG,CAAC,MAAM,EAAE;KACzC,IAAI,CAAC;IACJ,iBAAiB,EAAE,aAAG,CAAC,KAAK,EAAE;SAC3B,KAAK,CACJ,aAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;QAChB,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,aAAG,CAAC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mB;YACnC,MAAM,CAAC,IAAI,KAAK,sBAAsB;YACtC,MAAM,CAAC,IAAI,KAAK,gBAAgB,EAChC,CAAC;YACD,cAAc,GAAG,IAAI,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,0BAA0B,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;KACD,EAAE,CAAC,oBAAoB,CAAC,CAAC;AAYvB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,0CAAoC;IACtE,KAAK,CAAC,OAAO,CAAC,WAA8B,EAAE,MAAc;QAC1D,MAAM,MAAM,CAAC,OAAO,CAAC;YACnB,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,qDAAqD;YAC9D,YAAY,EAAE,kBAAkB;YAChC,YAAY,EAAE,2CAA2C;YACzD,QAAQ,EAAE,wBAAU,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAVY,wCAAc;yBAAd,cAAc;IAV1B,IAAA,mDAA4B,EAAC;QAC5B,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE,IAAI;QACb,gBAAgB,EAAE,aAAG,CAAC,MAAM,EAAE;aAC3B,IAAI,CAAC;YACJ,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAC3C,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;GACW,cAAc,CAU1B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DefinitionComponentClassType } from '../../decorators/definition-component';
|
|
2
|
+
export declare function EventTestComponent<EventSimulatorFunctions extends object>(EventSimulatorFunctionsConstructor: new (...args: any[]) => EventSimulatorFunctions): DefinitionComponentClassType<any>;
|
|
@@ -0,0 +1,137 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EventTestComponent = void 0;
|
|
13
|
+
const helpers_lib_1 = require("helpers-lib");
|
|
14
|
+
const joi_1 = __importDefault(require("joi"));
|
|
15
|
+
const story_engine_lib_1 = require("story-engine-lib");
|
|
16
|
+
const definition_component_1 = require("../../decorators/definition-component");
|
|
17
|
+
const definition_store_1 = require("../../framework/definition-store");
|
|
18
|
+
const _1_event_1 = require("./1-event");
|
|
19
|
+
const CommandEventSchema = joi_1.default.string().custom(value => ({
|
|
20
|
+
type: 'command',
|
|
21
|
+
value: value
|
|
22
|
+
}));
|
|
23
|
+
const RunEventSchema = joi_1.default.object()
|
|
24
|
+
.keys({
|
|
25
|
+
runEvent: joi_1.default.string().reference(_1_event_1.EventComponent).required()
|
|
26
|
+
})
|
|
27
|
+
.custom(value => ({
|
|
28
|
+
type: 'runEvent',
|
|
29
|
+
value: value.runEvent
|
|
30
|
+
}));
|
|
31
|
+
const EventTestActionSchema = () => joi_1.default.array()
|
|
32
|
+
.items(joi_1.default.alternatives()
|
|
33
|
+
.conditional(joi_1.default.string(), {
|
|
34
|
+
then: CommandEventSchema
|
|
35
|
+
})
|
|
36
|
+
.conditional(joi_1.default.object({ runEvent: joi_1.default.exist() }).unknown(), {
|
|
37
|
+
then: RunEventSchema
|
|
38
|
+
}))
|
|
39
|
+
.min(1);
|
|
40
|
+
function EventTestComponent(EventSimulatorFunctionsConstructor) {
|
|
41
|
+
var EventTest_1;
|
|
42
|
+
let EventTest = EventTest_1 = class EventTest extends definition_component_1.DefinitionComponent {
|
|
43
|
+
async process(definitions, output) {
|
|
44
|
+
let eventTestSimulator = this.createEventTestSimulator();
|
|
45
|
+
let runtimeErrors = this.runTests(definitions, eventTestSimulator, output);
|
|
46
|
+
this.printErrors(runtimeErrors, eventTestSimulator, output);
|
|
47
|
+
}
|
|
48
|
+
createEventTestSimulator() {
|
|
49
|
+
let allEvents = definition_store_1.DefinitionStore.getDefinitions(_1_event_1.EventComponent);
|
|
50
|
+
return new story_engine_lib_1.EventTestSimulator(allEvents);
|
|
51
|
+
}
|
|
52
|
+
runTests(testDefinitions, eventTestSimulator, output) {
|
|
53
|
+
let errorLogs = [];
|
|
54
|
+
testDefinitions.forEach(testDefinition => {
|
|
55
|
+
let event = definition_store_1.DefinitionStore.getDefinitionOrFail(_1_event_1.EventComponent, testDefinition.event);
|
|
56
|
+
let errorEncountered = false;
|
|
57
|
+
testDefinition.cases.forEach((testCase, testCaseIndex) => {
|
|
58
|
+
if (!errorEncountered) {
|
|
59
|
+
let jsEngine = new helpers_lib_1.JSEngine(new EventSimulatorFunctionsConstructor(), {});
|
|
60
|
+
try {
|
|
61
|
+
eventTestSimulator.simulateEvent(event, jsEngine, testCase.actionsBeforeTesting);
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
let errorLog = this.prepareErrorLog(e, testDefinition, testCaseIndex, output);
|
|
65
|
+
errorLogs.push(errorLog);
|
|
66
|
+
errorEncountered = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
return errorLogs;
|
|
72
|
+
}
|
|
73
|
+
prepareErrorLog(e, testDefinition, testCaseIndex, output) {
|
|
74
|
+
if (e instanceof story_engine_lib_1.SimulationError) {
|
|
75
|
+
return {
|
|
76
|
+
description: e.message,
|
|
77
|
+
location: definition_store_1.DefinitionStore.getLocationInFileById(_1_event_1.EventComponent, e.location.eventId, e.location.path)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
else if (e instanceof story_engine_lib_1.ActionsBeforeTestingError) {
|
|
81
|
+
let executedActionLocation = definition_store_1.DefinitionStore.getLocationInFile(EventTest_1, testDefinition, [
|
|
82
|
+
'cases',
|
|
83
|
+
`${testCaseIndex}`,
|
|
84
|
+
'actionsBeforeTesting',
|
|
85
|
+
`${e.actionIndex}`
|
|
86
|
+
]);
|
|
87
|
+
return {
|
|
88
|
+
description: e.message,
|
|
89
|
+
location: executedActionLocation
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
else if (e instanceof story_engine_lib_1.BranchingBeforeTestingError) {
|
|
93
|
+
let testLocation = definition_store_1.DefinitionStore.getLocationInFile(EventTest_1, testDefinition, []);
|
|
94
|
+
let executionHistoryAddition = `Running the test: ${output.convertLocationInFileToLink(testLocation)}\n\n`;
|
|
95
|
+
let executionHistoryStart = e.message.indexOf('\n', e.message.indexOf('Execution history')) + 1;
|
|
96
|
+
let fullMessage = e.message.slice(0, executionHistoryStart) + executionHistoryAddition + e.message.slice(executionHistoryStart);
|
|
97
|
+
return {
|
|
98
|
+
description: fullMessage,
|
|
99
|
+
location: definition_store_1.DefinitionStore.getLocationInFileById(_1_event_1.EventComponent, e.location.eventId, e.location.path)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
throw e;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
printErrors(runtimeErrors, eventTestSimulator, output) {
|
|
107
|
+
if (runtimeErrors.length === 0) {
|
|
108
|
+
eventTestSimulator.getUnvisitedBranchLocations().forEach(location => output.addError({
|
|
109
|
+
description: `Event branch is not reaced by any of the combinations during the tests.`,
|
|
110
|
+
location: definition_store_1.DefinitionStore.getLocationInFileById(_1_event_1.EventComponent, location.eventId, location.path)
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
runtimeErrors.forEach(error => output.addError(error));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
EventTest = EventTest_1 = __decorate([
|
|
117
|
+
(0, definition_component_1.DefinitionComponentDecorator)({
|
|
118
|
+
componentName: 'EVENT-TEST',
|
|
119
|
+
keyName: 'id',
|
|
120
|
+
validationSchema: joi_1.default.object()
|
|
121
|
+
.keys({
|
|
122
|
+
event: joi_1.default.string().reference(_1_event_1.EventComponent).required(),
|
|
123
|
+
cases: joi_1.default.array()
|
|
124
|
+
.items(joi_1.default.object()
|
|
125
|
+
.keys({
|
|
126
|
+
actionsBeforeTesting: EventTestActionSchema().default([]).optional()
|
|
127
|
+
})
|
|
128
|
+
.required())
|
|
129
|
+
.required()
|
|
130
|
+
})
|
|
131
|
+
.required()
|
|
132
|
+
})
|
|
133
|
+
], EventTest);
|
|
134
|
+
return EventTest;
|
|
135
|
+
}
|
|
136
|
+
exports.EventTestComponent = EventTestComponent;
|
|
137
|
+
//# sourceMappingURL=2-event-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2-event-test.js","sourceRoot":"","sources":["../../../src/pre-made-components/events/2-event-test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAuC;AACvC,8CAAsB;AACtB,uDAA+H;AAE/H,gFAI+C;AAC/C,uEAAmE;AAEnE,wCAA2C;AAkB3C,MAAM,kBAAkB,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,KAAK;CACb,CAAC,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,aAAG,C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AAC,EAAE,CAAC;gBAC/B,kBAAkB,CAAC,2BAA2B,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAClE,MAAM,CAAC,QAAQ,CAAC;oBACd,WAAW,EAAE,yEAAyE;oBACtF,QAAQ,EAAE,kCAAe,CAAC,qBAAqB,CAAC,yBAAc,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC;iBACjG,CAAC,CACH,CAAC;YACJ,CAAC;YAED,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,CAAC;KACF,CAAA;IA5FK,SAAS;QAlBd,IAAA,mDAA4B,EAAC;YAC5B,aAAa,EAAE,YAAY;YAC3B,OAAO,EAAE,IAAI;YACb,gBAAgB,EAAE,aAAG,CAAC,MAAM,EAAE;iBAC3B,IAAI,CAAC;gBACJ,KAAK,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,yBAAc,CAAC,CAAC,QAAQ,EAAE;gBACxD,KAAK,EAAE,aAAG,CAAC,KAAK,EAAE;qBACf,KAAK,CACJ,aAAG,CAAC,MAAM,EAAE;qBACT,IAAI,CAAC;oBACJ,oBAAoB,EAAE,qBAAqB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;iBACrE,CAAC;qBACD,QAAQ,EAAE,CACd;qBACA,QAAQ,EAAE;aACd,CAAC;iBACD,QAAQ,EAAE;SACd,CAAC;OACI,SAAS,CA4Fd;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AApHD,gDAoHC"}
|
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/setup.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
const joi_custom_validators_1 = require("./helpers/validator/joi-custom-validators");
|
|
9
|
+
joi_custom_validators_1.JoiCustomValidators.decorate(joi_1.default, fs_1.default);
|
|
10
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,8CAAsB;AACtB,qFAAgF;AAChF,2CAAmB,CAAC,QAAQ,CAAC,aAAG,EAAE,YAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "definition-generator-framework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.12",
|
|
4
4
|
"description": "Definition Generator Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "git+https://github.com/sefabaser/definition-generator-framework.git"
|
|
12
12
|
},
|
|
13
13
|
"author": "sefabaser",
|
|
14
|
-
"license": "
|
|
14
|
+
"license": "UNLICENSED",
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/sefabaser/definition-generator-framework/issues"
|
|
17
17
|
},
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
"postpack": "mv package.json.bak package.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"helpers-lib": "1.
|
|
38
|
+
"helpers-lib": "1.11.0",
|
|
39
39
|
"image-size": "1.1.1",
|
|
40
40
|
"joi": "17.11.0",
|
|
41
|
-
"prettier": "3.3.3"
|
|
41
|
+
"prettier": "3.3.3",
|
|
42
|
+
"story-engine-lib": "0.0.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@types/glob": "8.1.0",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "definition-generator-framework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.12",
|
|
4
4
|
"description": "Definition Generator Framework",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "git+https://github.com/sefabaser/definition-generator-framework.git"
|
|
12
12
|
},
|
|
13
13
|
"author": "sefabaser",
|
|
14
|
-
"license": "
|
|
14
|
+
"license": "UNLICENSED",
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/sefabaser/definition-generator-framework/issues"
|
|
17
17
|
},
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
"postpack": "mv package.json.bak package.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"helpers-lib": "1.
|
|
38
|
+
"helpers-lib": "1.11.0",
|
|
39
39
|
"image-size": "1.1.1",
|
|
40
40
|
"joi": "17.11.0",
|
|
41
|
-
"prettier": "3.3.3"
|
|
41
|
+
"prettier": "3.3.3",
|
|
42
|
+
"story-engine-lib": "0.0.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@types/glob": "8.1.0",
|