definition-generator-framework 2.0.0 → 2.0.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/dist/index.js CHANGED
@@ -30,7 +30,7 @@ Path: '${t.location.path}', Line: '${t.location.line}'\r
30
30
  `).join(`\r
31
31
  `)}])}};var $t=class{constructor(t,e,i){u.setup(t,e,i);}setScriptInput(t,e){u.setScriptInput(t,e);}setEventInput(t,e){u.setEventInput(t,e);}addCustomScriptTestCase(t,e,i){u.addCustomScriptTestCase(e,i,t);}addCustomEventTestCase(t,e,i){u.addCustomEventTestCase(e,i,t);}},u=class{static{this.ɗbr=new Map;}static{this.ɗw=new Map;}static{this.ɗbt=new Map;}static{this.ɗy=new Map;}static get scriptSimulatorFunctionsConstructor(){if(!this.ɗbs)throw new Error("ScriptSimulatorFunctionsConstructor is not set");return this.ɗbs}static get eventSimulatorFunctionsConstructor(){if(!this.ɗx)throw new Error("ScriptSimulatorFunctionsConstructor is not set");return this.ɗx}static get richTextTags(){return this.ɗbp}static get isInitialized(){return this.ɗbs&&this.ɗx&&this.ɗbp!==void 0}static setup(t,e,i){this.ɗbs=t,this.ɗx=e,this.ɗbp=i;}static getScriptInput(t){return this.ɗbr.get(t)}static getEventInput(t){return this.ɗw.get(t)}static getCustomScriptTestCases(){return Array.from(this.ɗbt.values())}static getCustomEventTestCases(){return Array.from(this.ɗy.values())}static isCustomScriptTestCase(t){return this.ɗbt.has(t.script)}static isCustomEventTestCase(t){return this.ɗy.has(t.script)}static setScriptInput(t,e){if(this.ɗbr.has(t))throw new Error(`Script input for ${t} already set`);this.ɗbr.set(t,e);}static setEventInput(t,e){if(this.ɗw.has(t))throw new Error(`Event input for ${t} already set`);this.ɗw.set(t,e);}static addCustomScriptTestCase(t,e,i){let r={testDefinition:{script:t,cases:[e]},customMessage:`Prebuild Test Case:
32
32
  ${i}`};this.ɗbt.set(t,r);}static addCustomEventTestCase(t,e,i){let r={testDefinition:{script:t,cases:[e]},customMessage:`Prebuild Test Case:
33
- ${i}`};this.ɗy.set(t,r);}};var ut=class{static convert(t){let e=false,i=t.indexOf('"');for(;i>=0;){let r=e?'"</b>':'<b>"';t=t.substring(0,i)+r+t.substring(i+1),e=!e,i=t.indexOf('"',i+r.length);}if(e)throw new Error("Quote is not closed.");return scriptEngineLib.RichTextValidator.validate(t,u.richTextTags),t}};var ht=()=>h__default.default.string().custom(n=>({type:"command",value:n})),gt=n=>h__default.default.object().keys({branchByCondition:h__default.default.array().items(h__default.default.object().keys({condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()})).custom((t,e)=>{let i=t.length;if(i>1){for(let r=0;r<i-1;r++)if(t[r].condition===void 0)throw new Error(`Element at index ${r} must have "condition"`)}else if(i===1&&t[0].condition===void 0)throw new Error('Single element must have "condition"');return t})}).custom(t=>({type:"branchByCondition",value:t.branchByCondition})),Bt=n=>h__default.default.object().keys({branchByPlayerChoice:h__default.default.array().items(h__default.default.object().keys({text:h__default.default.string().min(2).required(),condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByPlayerChoice",value:t.branchByPlayerChoice})),yt=n=>h__default.default.object().keys({branchByChance:h__default.default.array().items(h__default.default.object().keys({label:h__default.default.string().optional(),weight:h__default.default.number().integer().min(1).max(100).required(),condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByChance",value:t.branchByChance})),Ht=()=>h__default.default.object().min(1).max(1).custom(n=>{let t=Object.keys(n);if(t.length!==1)throw new Error("object must have exactly one key/value pair");let e=t[0],i=n[e];if(typeof i!="string")throw new Error("value must be a string");return i=ut.convert(i),{type:"dialog",value:{text:i,speaker:e}}});var Rt=new Set,ye=()=>h__default.default.object().keys({jumpTo:h__default.default.string().lazyReference("SCRIPT").required()}).custom(n=>({type:"jumpTo",value:n.jumpTo})),It="ScriptActionsSchema",Se=()=>h__default.default.array().items(h__default.default.alternatives().conditional(h__default.default.string(),{then:ht()}).conditional(h__default.default.object({jumpTo:h__default.default.exist()}).unknown(),{then:ye()}).conditional(h__default.default.object({branchByChance:h__default.default.exist()}).unknown(),{then:yt(It)}).conditional(h__default.default.object({branchByCondition:h__default.default.exist()}).unknown(),{then:gt(It)}).conditional(h__default.default.object({branchByPlayerChoice:h__default.default.exist()}).unknown(),{then:h__default.default.forbidden().messages({"any.unknown":"branchByPlayerChoice is not allowed in scripts"})}).conditional(h__default.default.object().min(1).max(1).unknown(),{then:h__default.default.forbidden().messages({"any.unknown":"dialogs are not allowed in scripts"})}).error(n=>n.map(t=>{if(t.code==="alternatives.any"){let e="command, jumpToScript, branchByCondition, branchByChance";t.message=`${t.local.label} does not match any of the allowed types: ${e}`;}return t}))).custom(n=>{let t=false,e=false;if(n.forEach(i=>{e?t=true:(i.type==="branchByCondition"||i.type==="branchByChance")&&(e=true);}),t)throw new Error("There should not be any command after branching.");return n}).id(It);exports.ScriptComponent=class v extends g{async process(t,e){await e.addFile({path:"/_premade/script-engine-definitions/scripts.ts",preText:'import { ScriptDefinition } from "script-engine-lib";',variableName:"ScriptDefinitions",variableType:"Readonly<Record<string, ScriptDefinition>>",variable:helpersLib.JsonHelper.arrayToObject(t,"id")});}};exports.ScriptComponent=w([T({componentName:"SCRIPT",keyName:"id",validationSchema:h__default.default.object().keys({id:h__default.default.string().unique(Rt).required(),actions:Se().min(1).required()}).required()})],exports.ScriptComponent);var A=class{constructor(t,e,i){this.ɗad=e;this.ɗba=i;this.ɗbu=new scriptEngineLib.ScriptTestSimulator(t);}runTests(t,e){let i=[];return t.forEach(r=>{let o=false;r.cases.forEach((s,a)=>{if(!o){let p=new scriptEngineLib.JSEngine(new this.ɗad(r.scriptInput),{});try{this.ɗbu.simulateScript(r.script,p,s.actionsBeforeTesting);}catch(c){let d=this.ɗbj(c,r,a,e);i.push(d),o=true;}}});}),i}printErrors(t,e){t.length===0&&this.ɗbu.getUnvisitedBranchLocations().forEach(i=>e.addError({description:"Event branch is not reaced by any of the combinations during the tests.",location:this.ɗba.getLocationOfDefinition(i.scriptId,i.path)})),t.forEach(i=>e.addError(i));}ɗbj(t,e,i,r){if(t instanceof scriptEngineLib.SimulationError)return {description:e.customMessage?e.customMessage+`
33
+ ${i}`};this.ɗy.set(t,r);}};var ut=class{static convert(t){let e=false,i=t.indexOf('"');for(;i>=0;){let r=e?'"</b>':'<b>"';t=t.substring(0,i)+r+t.substring(i+1),e=!e,i=t.indexOf('"',i+r.length);}if(e)throw new Error("Quote is not closed.");return scriptEngineLib.RichTextValidator.validate(t,u.richTextTags),t}};var ht=()=>h__default.default.string().custom(n=>({type:"command",value:n})),gt=n=>h__default.default.object().keys({branchByCondition:h__default.default.array().items(h__default.default.object().keys({condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()})).custom((t,e)=>{let i=t.length;if(i>1){for(let r=0;r<i-1;r++)if(t[r].condition===void 0)throw new Error(`Element at index ${r} must have "condition"`)}else if(i===1&&t[0].condition===void 0)throw new Error('Single element must have "condition"');return t})}).custom(t=>({type:"branchByCondition",value:t.branchByCondition})),Bt=n=>h__default.default.object().keys({branchByPlayerChoice:h__default.default.array().items(h__default.default.object().keys({text:h__default.default.string().min(2).required(),condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByPlayerChoice",value:t.branchByPlayerChoice})),yt=n=>h__default.default.object().keys({branchByChance:h__default.default.array().items(h__default.default.object().keys({label:h__default.default.string().optional(),weight:h__default.default.number().integer().min(1).max(100).required(),condition:h__default.default.string().optional(),actions:h__default.default.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByChance",value:t.branchByChance})),Ht=()=>h__default.default.object().min(1).max(1).custom(n=>{let t=Object.keys(n);if(t.length!==1)throw new Error("object must have exactly one key/value pair");let e=t[0],i=n[e];if(typeof i!="string")throw new Error("value must be a string");return i=ut.convert(i),{type:"dialog",value:{text:i,speaker:e}}});var Rt=new Set,ye=()=>h__default.default.object().keys({jumpTo:h__default.default.string().lazyReference("SCRIPT").required()}).custom(n=>({type:"jumpTo",value:n.jumpTo})),It="ScriptActionsSchema",Se=()=>h__default.default.array().items(h__default.default.alternatives().conditional(h__default.default.string(),{then:ht()}).conditional(h__default.default.object({jumpTo:h__default.default.exist()}).unknown(),{then:ye()}).conditional(h__default.default.object({branchByChance:h__default.default.exist()}).unknown(),{then:yt(It)}).conditional(h__default.default.object({branchByCondition:h__default.default.exist()}).unknown(),{then:gt(It)}).conditional(h__default.default.object({branchByPlayerChoice:h__default.default.exist()}).unknown(),{then:h__default.default.forbidden().messages({"any.unknown":"branchByPlayerChoice is not allowed in scripts"})}).conditional(h__default.default.object().min(1).max(1).unknown(),{then:h__default.default.forbidden().messages({"any.unknown":"dialogs are not allowed in scripts"})}).error(n=>n.map(t=>{if(t.code==="alternatives.any"){let e="command, jumpToScript, branchByCondition, branchByChance";t.message=`${t.local.label} does not match any of the allowed types: ${e}`;}return t}))).custom(n=>{let t=false,e=false;if(n.forEach(i=>{e?t=true:(i.type==="branchByCondition"||i.type==="branchByChance")&&(e=true);}),t)throw new Error("There should not be any command after branching.");return n}).id(It);exports.ScriptComponent=class v extends g{async process(t,e){await e.addFile({path:"/_premade/script-engine-definitions/scripts.ts",preText:'import { ScriptDefinition } from "script-engine-lib";',variableName:"ScriptDefinitions",variableType:"Readonly<Record<string, ScriptDefinition>>",variable:helpersLib.JsonHelper.arrayToObject(t,"id")});}};exports.ScriptComponent=w([T({componentName:"SCRIPT",keyName:"id",validationSchema:h__default.default.object().keys({id:h__default.default.string().unique(Rt).required(),actions:Se().default([]).optional()}).required()})],exports.ScriptComponent);var A=class{constructor(t,e,i){this.ɗad=e;this.ɗba=i;this.ɗbu=new scriptEngineLib.ScriptTestSimulator(t);}runTests(t,e){let i=[];return t.forEach(r=>{let o=false;r.cases.forEach((s,a)=>{if(!o){let p=new scriptEngineLib.JSEngine(new this.ɗad(r.scriptInput),{});try{this.ɗbu.simulateScript(r.script,p,s.actionsBeforeTesting);}catch(c){let d=this.ɗbj(c,r,a,e);i.push(d),o=true;}}});}),i}printErrors(t,e){t.length===0&&this.ɗbu.getUnvisitedBranchLocations().forEach(i=>e.addError({description:"Event branch is not reaced by any of the combinations during the tests.",location:this.ɗba.getLocationOfDefinition(i.scriptId,i.path)})),t.forEach(i=>e.addError(i));}ɗbj(t,e,i,r){if(t instanceof scriptEngineLib.SimulationError)return {description:e.customMessage?e.customMessage+`
34
34
  `+t.message:t.message,location:this.ɗba.getLocationOfDefinition(t.location.scriptId,t.location.path)};if(t instanceof scriptEngineLib.ActionsBeforeTestingError){let o=e.customMessage?e.customMessage+`
35
35
  `+t.message:t.message,s=this.ɗba.getLocationOfTestDefinition(e.testDefinitionRef,["cases",`${i}`,"actionsBeforeTesting",`${t.actionIndex}`]);return {description:o,location:s}}else if(t instanceof scriptEngineLib.BranchingBeforeTestingError){let o=this.ɗba.getLocationOfTestDefinition(e.testDefinitionRef,[]),s=`Running the test: ${r.convertLocationInFileToLink(o)}
36
36
 
package/dist/index.mjs CHANGED
@@ -30,7 +30,7 @@ Path: '${t.location.path}', Line: '${t.location.line}'\r
30
30
  `).join(`\r
31
31
  `)}])}};var $t=class{constructor(t,e,i){u.setup(t,e,i);}setScriptInput(t,e){u.setScriptInput(t,e);}setEventInput(t,e){u.setEventInput(t,e);}addCustomScriptTestCase(t,e,i){u.addCustomScriptTestCase(e,i,t);}addCustomEventTestCase(t,e,i){u.addCustomEventTestCase(e,i,t);}},u=class{static{this.ɗbr=new Map;}static{this.ɗw=new Map;}static{this.ɗbt=new Map;}static{this.ɗy=new Map;}static get scriptSimulatorFunctionsConstructor(){if(!this.ɗbs)throw new Error("ScriptSimulatorFunctionsConstructor is not set");return this.ɗbs}static get eventSimulatorFunctionsConstructor(){if(!this.ɗx)throw new Error("ScriptSimulatorFunctionsConstructor is not set");return this.ɗx}static get richTextTags(){return this.ɗbp}static get isInitialized(){return this.ɗbs&&this.ɗx&&this.ɗbp!==void 0}static setup(t,e,i){this.ɗbs=t,this.ɗx=e,this.ɗbp=i;}static getScriptInput(t){return this.ɗbr.get(t)}static getEventInput(t){return this.ɗw.get(t)}static getCustomScriptTestCases(){return Array.from(this.ɗbt.values())}static getCustomEventTestCases(){return Array.from(this.ɗy.values())}static isCustomScriptTestCase(t){return this.ɗbt.has(t.script)}static isCustomEventTestCase(t){return this.ɗy.has(t.script)}static setScriptInput(t,e){if(this.ɗbr.has(t))throw new Error(`Script input for ${t} already set`);this.ɗbr.set(t,e);}static setEventInput(t,e){if(this.ɗw.has(t))throw new Error(`Event input for ${t} already set`);this.ɗw.set(t,e);}static addCustomScriptTestCase(t,e,i){let r={testDefinition:{script:t,cases:[e]},customMessage:`Prebuild Test Case:
32
32
  ${i}`};this.ɗbt.set(t,r);}static addCustomEventTestCase(t,e,i){let r={testDefinition:{script:t,cases:[e]},customMessage:`Prebuild Test Case:
33
- ${i}`};this.ɗy.set(t,r);}};var ut=class{static convert(t){let e=false,i=t.indexOf('"');for(;i>=0;){let r=e?'"</b>':'<b>"';t=t.substring(0,i)+r+t.substring(i+1),e=!e,i=t.indexOf('"',i+r.length);}if(e)throw new Error("Quote is not closed.");return RichTextValidator.validate(t,u.richTextTags),t}};var ht=()=>h.string().custom(n=>({type:"command",value:n})),gt=n=>h.object().keys({branchByCondition:h.array().items(h.object().keys({condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()})).custom((t,e)=>{let i=t.length;if(i>1){for(let r=0;r<i-1;r++)if(t[r].condition===void 0)throw new Error(`Element at index ${r} must have "condition"`)}else if(i===1&&t[0].condition===void 0)throw new Error('Single element must have "condition"');return t})}).custom(t=>({type:"branchByCondition",value:t.branchByCondition})),Bt=n=>h.object().keys({branchByPlayerChoice:h.array().items(h.object().keys({text:h.string().min(2).required(),condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByPlayerChoice",value:t.branchByPlayerChoice})),yt=n=>h.object().keys({branchByChance:h.array().items(h.object().keys({label:h.string().optional(),weight:h.number().integer().min(1).max(100).required(),condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByChance",value:t.branchByChance})),Ht=()=>h.object().min(1).max(1).custom(n=>{let t=Object.keys(n);if(t.length!==1)throw new Error("object must have exactly one key/value pair");let e=t[0],i=n[e];if(typeof i!="string")throw new Error("value must be a string");return i=ut.convert(i),{type:"dialog",value:{text:i,speaker:e}}});var Rt=new Set,ye=()=>h.object().keys({jumpTo:h.string().lazyReference("SCRIPT").required()}).custom(n=>({type:"jumpTo",value:n.jumpTo})),It="ScriptActionsSchema",Se=()=>h.array().items(h.alternatives().conditional(h.string(),{then:ht()}).conditional(h.object({jumpTo:h.exist()}).unknown(),{then:ye()}).conditional(h.object({branchByChance:h.exist()}).unknown(),{then:yt(It)}).conditional(h.object({branchByCondition:h.exist()}).unknown(),{then:gt(It)}).conditional(h.object({branchByPlayerChoice:h.exist()}).unknown(),{then:h.forbidden().messages({"any.unknown":"branchByPlayerChoice is not allowed in scripts"})}).conditional(h.object().min(1).max(1).unknown(),{then:h.forbidden().messages({"any.unknown":"dialogs are not allowed in scripts"})}).error(n=>n.map(t=>{if(t.code==="alternatives.any"){let e="command, jumpToScript, branchByCondition, branchByChance";t.message=`${t.local.label} does not match any of the allowed types: ${e}`;}return t}))).custom(n=>{let t=false,e=false;if(n.forEach(i=>{e?t=true:(i.type==="branchByCondition"||i.type==="branchByChance")&&(e=true);}),t)throw new Error("There should not be any command after branching.");return n}).id(It),v=class extends g{async process(t,e){await e.addFile({path:"/_premade/script-engine-definitions/scripts.ts",preText:'import { ScriptDefinition } from "script-engine-lib";',variableName:"ScriptDefinitions",variableType:"Readonly<Record<string, ScriptDefinition>>",variable:JsonHelper.arrayToObject(t,"id")});}};v=w([T({componentName:"SCRIPT",keyName:"id",validationSchema:h.object().keys({id:h.string().unique(Rt).required(),actions:Se().min(1).required()}).required()})],v);var A=class{constructor(t,e,i){this.ɗad=e;this.ɗba=i;this.ɗbu=new ScriptTestSimulator(t);}runTests(t,e){let i=[];return t.forEach(r=>{let o=false;r.cases.forEach((s,a)=>{if(!o){let p=new JSEngine(new this.ɗad(r.scriptInput),{});try{this.ɗbu.simulateScript(r.script,p,s.actionsBeforeTesting);}catch(c){let d=this.ɗbj(c,r,a,e);i.push(d),o=true;}}});}),i}printErrors(t,e){t.length===0&&this.ɗbu.getUnvisitedBranchLocations().forEach(i=>e.addError({description:"Event branch is not reaced by any of the combinations during the tests.",location:this.ɗba.getLocationOfDefinition(i.scriptId,i.path)})),t.forEach(i=>e.addError(i));}ɗbj(t,e,i,r){if(t instanceof SimulationError)return {description:e.customMessage?e.customMessage+`
33
+ ${i}`};this.ɗy.set(t,r);}};var ut=class{static convert(t){let e=false,i=t.indexOf('"');for(;i>=0;){let r=e?'"</b>':'<b>"';t=t.substring(0,i)+r+t.substring(i+1),e=!e,i=t.indexOf('"',i+r.length);}if(e)throw new Error("Quote is not closed.");return RichTextValidator.validate(t,u.richTextTags),t}};var ht=()=>h.string().custom(n=>({type:"command",value:n})),gt=n=>h.object().keys({branchByCondition:h.array().items(h.object().keys({condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()})).custom((t,e)=>{let i=t.length;if(i>1){for(let r=0;r<i-1;r++)if(t[r].condition===void 0)throw new Error(`Element at index ${r} must have "condition"`)}else if(i===1&&t[0].condition===void 0)throw new Error('Single element must have "condition"');return t})}).custom(t=>({type:"branchByCondition",value:t.branchByCondition})),Bt=n=>h.object().keys({branchByPlayerChoice:h.array().items(h.object().keys({text:h.string().min(2).required(),condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByPlayerChoice",value:t.branchByPlayerChoice})),yt=n=>h.object().keys({branchByChance:h.array().items(h.object().keys({label:h.string().optional(),weight:h.number().integer().min(1).max(100).required(),condition:h.string().optional(),actions:h.link("#"+n).default([]).optional()}))}).custom(t=>({type:"branchByChance",value:t.branchByChance})),Ht=()=>h.object().min(1).max(1).custom(n=>{let t=Object.keys(n);if(t.length!==1)throw new Error("object must have exactly one key/value pair");let e=t[0],i=n[e];if(typeof i!="string")throw new Error("value must be a string");return i=ut.convert(i),{type:"dialog",value:{text:i,speaker:e}}});var Rt=new Set,ye=()=>h.object().keys({jumpTo:h.string().lazyReference("SCRIPT").required()}).custom(n=>({type:"jumpTo",value:n.jumpTo})),It="ScriptActionsSchema",Se=()=>h.array().items(h.alternatives().conditional(h.string(),{then:ht()}).conditional(h.object({jumpTo:h.exist()}).unknown(),{then:ye()}).conditional(h.object({branchByChance:h.exist()}).unknown(),{then:yt(It)}).conditional(h.object({branchByCondition:h.exist()}).unknown(),{then:gt(It)}).conditional(h.object({branchByPlayerChoice:h.exist()}).unknown(),{then:h.forbidden().messages({"any.unknown":"branchByPlayerChoice is not allowed in scripts"})}).conditional(h.object().min(1).max(1).unknown(),{then:h.forbidden().messages({"any.unknown":"dialogs are not allowed in scripts"})}).error(n=>n.map(t=>{if(t.code==="alternatives.any"){let e="command, jumpToScript, branchByCondition, branchByChance";t.message=`${t.local.label} does not match any of the allowed types: ${e}`;}return t}))).custom(n=>{let t=false,e=false;if(n.forEach(i=>{e?t=true:(i.type==="branchByCondition"||i.type==="branchByChance")&&(e=true);}),t)throw new Error("There should not be any command after branching.");return n}).id(It),v=class extends g{async process(t,e){await e.addFile({path:"/_premade/script-engine-definitions/scripts.ts",preText:'import { ScriptDefinition } from "script-engine-lib";',variableName:"ScriptDefinitions",variableType:"Readonly<Record<string, ScriptDefinition>>",variable:JsonHelper.arrayToObject(t,"id")});}};v=w([T({componentName:"SCRIPT",keyName:"id",validationSchema:h.object().keys({id:h.string().unique(Rt).required(),actions:Se().default([]).optional()}).required()})],v);var A=class{constructor(t,e,i){this.ɗad=e;this.ɗba=i;this.ɗbu=new ScriptTestSimulator(t);}runTests(t,e){let i=[];return t.forEach(r=>{let o=false;r.cases.forEach((s,a)=>{if(!o){let p=new JSEngine(new this.ɗad(r.scriptInput),{});try{this.ɗbu.simulateScript(r.script,p,s.actionsBeforeTesting);}catch(c){let d=this.ɗbj(c,r,a,e);i.push(d),o=true;}}});}),i}printErrors(t,e){t.length===0&&this.ɗbu.getUnvisitedBranchLocations().forEach(i=>e.addError({description:"Event branch is not reaced by any of the combinations during the tests.",location:this.ɗba.getLocationOfDefinition(i.scriptId,i.path)})),t.forEach(i=>e.addError(i));}ɗbj(t,e,i,r){if(t instanceof SimulationError)return {description:e.customMessage?e.customMessage+`
34
34
  `+t.message:t.message,location:this.ɗba.getLocationOfDefinition(t.location.scriptId,t.location.path)};if(t instanceof ActionsBeforeTestingError){let o=e.customMessage?e.customMessage+`
35
35
  `+t.message:t.message,s=this.ɗba.getLocationOfTestDefinition(e.testDefinitionRef,["cases",`${i}`,"actionsBeforeTesting",`${t.actionIndex}`]);return {description:o,location:s}}else if(t instanceof BranchingBeforeTestingError){let o=this.ɗba.getLocationOfTestDefinition(e.testDefinitionRef,[]),s=`Running the test: ${r.convertLocationInFileToLink(o)}
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "definition-generator-framework",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Definition Generator Framework",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {