Comparing version 0.5.12 to 0.5.13
@@ -75,3 +75,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var start, initialState, context, result, taskId, state; | ||
var start, context, result, taskId, state, mutation; | ||
var _a; | ||
@@ -82,3 +82,4 @@ return __generator(this, function (_b) { | ||
start = this.process.nodes[0]; | ||
initialState = { | ||
context = this.initContext({}); | ||
ctx.updateContextState(context, { | ||
id: null, | ||
@@ -95,4 +96,3 @@ created: null, | ||
events: [] | ||
}; | ||
context = this.initContext(initialState); | ||
}); | ||
return [4 /*yield*/, ctx.runWithContext(context, exports.automatNamespace, this.process.attributes.init, [initialData])]; | ||
@@ -108,5 +108,10 @@ case 1: | ||
state = _b.sent(); | ||
return [4 /*yield*/, this.emittNotifier(state)]; | ||
mutation = Journal_1.squashMutations(context.state, context.journal); | ||
mutation.message = 'start.init.running'; | ||
return [4 /*yield*/, this.modifier.addJournalEntry(__assign(__assign({}, mutation), { process_id: context.state.id }))]; | ||
case 3: | ||
_b.sent(); | ||
return [4 /*yield*/, this.emittNotifier(state)]; | ||
case 4: | ||
_b.sent(); | ||
return [2 /*return*/, state]; | ||
@@ -113,0 +118,0 @@ } |
@@ -81,3 +81,6 @@ "use strict"; | ||
var _loop_1 = function (path) { | ||
var duplicit = paths.find(function (p) { return path != p && path.startsWith(p); }); | ||
var numOfParts = path.split('.').length; | ||
var duplicit = paths.find(function (p) { | ||
return path != p && path === p.split('.').slice(0, numOfParts).join('.'); | ||
}); | ||
if (duplicit) { | ||
@@ -84,0 +87,0 @@ throw new Error("CHANGE_ERROR: duplicit paths: '" + path + "' and '" + duplicit + "'"); |
{ | ||
"name": "gent-core", | ||
"version": "0.5.12", | ||
"version": "0.5.13", | ||
"description": "Library for simple business processes implementation", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81847
1835