@scion-scxml/core-base 1.0.24 → 1.0.26
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/lib/helpers.js +5 -2
- package/lib/scion-core-base.js +9 -3
- package/package.json +2 -2
- package/.git +0 -1
- package/lib/.scion-core-base.js.swo +0 -0
package/lib/helpers.js
CHANGED
|
@@ -70,7 +70,8 @@ function initializeModel(rootState, opts){
|
|
|
70
70
|
}]
|
|
71
71
|
},
|
|
72
72
|
state
|
|
73
|
-
]
|
|
73
|
+
],
|
|
74
|
+
modelFnName: state.modelFnName
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -429,11 +430,13 @@ function getStateWithHigherSourceChildPriority(s1, s2) {
|
|
|
429
430
|
}
|
|
430
431
|
|
|
431
432
|
function initializeModelGeneratorFn(modelFn, opts, interpreter){
|
|
432
|
-
|
|
433
|
+
const model = modelFn.call(interpreter,
|
|
433
434
|
opts._x,
|
|
434
435
|
opts._x._sessionid,
|
|
435
436
|
opts._x._ioprocessors,
|
|
436
437
|
interpreter.isIn.bind(interpreter));
|
|
438
|
+
model.modelFnName = modelFn.name
|
|
439
|
+
return model
|
|
437
440
|
}
|
|
438
441
|
|
|
439
442
|
function deserializeSerializedConfiguration(serializedConfiguration,idToStateMap){
|
package/lib/scion-core-base.js
CHANGED
|
@@ -147,6 +147,7 @@ class BaseInterpreter extends EventEmitter {
|
|
|
147
147
|
this._isStepping = false;
|
|
148
148
|
|
|
149
149
|
this._scriptingContext = this.opts.interpreterScriptingContext || (this.opts.InterpreterScriptingContext ? new this.opts.InterpreterScriptingContext(this) : {});
|
|
150
|
+
this._scriptingContext._invokeMap = this.opts._invokeMap || this._scriptingContext._invokeMap;
|
|
150
151
|
|
|
151
152
|
this.opts.generateSessionid = this.opts.generateSessionid || BaseInterpreter.generateSessionid;
|
|
152
153
|
this.opts.sessionid = this.opts.sessionid || this.opts.generateSessionid();
|
|
@@ -1352,10 +1353,15 @@ class InterpreterScriptingContext{
|
|
|
1352
1353
|
var timeoutHandle = setTimeout(function(){
|
|
1353
1354
|
if (event.sendid) delete this._timeoutMap[event.sendid];
|
|
1354
1355
|
this._timeouts.delete(timeoutOptions);
|
|
1355
|
-
|
|
1356
|
-
|
|
1356
|
+
const parentSessionOpts = this._interpreter.opts.parentSession && this._interpreter.opts.parentSession.opts;
|
|
1357
|
+
const _doSend = this._interpreter.opts.doSend || BaseInterpreter.doSend;
|
|
1358
|
+
const sendAsync = typeof this._interpreter.opts.sendAsync === 'boolean' ?
|
|
1359
|
+
this._interpreter.opts.sendAsync :
|
|
1360
|
+
!!(parentSessionOpts && parentSessionOpts.sendAsync);
|
|
1361
|
+
if(_doSend){
|
|
1362
|
+
_doSend(session, event);
|
|
1357
1363
|
}else{
|
|
1358
|
-
session[
|
|
1364
|
+
session[sendAsync ? 'genAsync' : 'gen'](event);
|
|
1359
1365
|
}
|
|
1360
1366
|
}.bind(this), options.delay || 0);
|
|
1361
1367
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scion-scxml/core-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Provide BaseInterpreter class and helper functions to modules that implement Statechart interface.",
|
|
5
5
|
"main": "./lib/scion-core-base.js",
|
|
6
6
|
"directories": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"babel-preset-es2015": "^6.9.0",
|
|
40
40
|
"babelify": "^8.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ce920c0df2cbf1e96b0ebafa658c1019c43f81d7"
|
|
43
43
|
}
|
package/.git
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
gitdir: ../../../.git/modules/projects/libraries/core-base
|
|
Binary file
|