jssm 5.45.0 → 5.45.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.45.0",
3
+ "version": "5.45.2",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },
@@ -116,8 +116,7 @@
116
116
  "text_audit": "^0.9.3",
117
117
  "ts-jest": "^27.0.7",
118
118
  "typedoc": "^0.22.15",
119
- "typescript": "^4.1.3",
120
- "viz.js": "^1.7.1"
119
+ "typescript": "^4.1.3"
121
120
  },
122
121
  "dependencies": {
123
122
  "reduce-to-639-1": "^1.0.4"
package/src/ts/jssm.ts CHANGED
@@ -39,7 +39,7 @@ import {
39
39
 
40
40
  import { parse } from './jssm-dot'; // TODO FIXME WHARGARBL this could be post-typed
41
41
 
42
- import { version } from './version'; // replaced from package.js in build // TODO FIXME currently broken
42
+ import { version } from './version'; // replaced from package.js in build
43
43
 
44
44
 
45
45
 
@@ -230,7 +230,7 @@ function compile_rule_transition_step<mDT>(
230
230
  to : string,
231
231
  this_se : JssmCompileSe,
232
232
  next_se : JssmCompileSe
233
- ) : Array< JssmTransition<mDT> > { // todo flow describe the parser representation of a transition step extension
233
+ ) : Array< JssmTransition<mDT> > { // todo typescript describe the parser representation of a transition step extension
234
234
 
235
235
  const edges : Array< JssmTransition<mDT> > = [];
236
236
 
@@ -261,13 +261,13 @@ function compile_rule_transition_step<mDT>(
261
261
 
262
262
 
263
263
 
264
- function compile_rule_handle_transition(rule: JssmCompileSeStart<StateType>): any { // TODO FIXME no any // todo flow describe the parser representation of a transition
264
+ function compile_rule_handle_transition(rule: JssmCompileSeStart<StateType>): any { // TODO FIXME no any // todo typescript describe the parser representation of a transition
265
265
  return compile_rule_transition_step([], rule.from, rule.se.to, rule.se, rule.se.se);
266
266
  }
267
267
 
268
268
 
269
269
 
270
- function compile_rule_handler(rule: JssmCompileSeStart<StateType>): JssmCompileRule { // todo flow describe the output of the parser
270
+ function compile_rule_handler(rule: JssmCompileSeStart<StateType>): JssmCompileRule {
271
271
 
272
272
  if (rule.key === 'transition') {
273
273
  return { agg_as: 'transition', val: compile_rule_handle_transition(rule) };
@@ -306,7 +306,7 @@ function compile_rule_handler(rule: JssmCompileSeStart<StateType>): JssmCompileR
306
306
 
307
307
 
308
308
 
309
- function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT> { // todo flow describe the output of the parser
309
+ function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT> {
310
310
 
311
311
  const results : {
312
312
  graph_layout : Array< JssmLayout >,
@@ -610,7 +610,7 @@ class Machine<mDT> {
610
610
 
611
611
 
612
612
  // forward mapping first by action name
613
- let actionMap: Map<StateType, number> = this._actions.get(tr.action); // TODO FIXME ?Map equiv
613
+ let actionMap: Map<StateType, number> = this._actions.get(tr.action);
614
614
  if (!(actionMap)) {
615
615
  actionMap = new Map();
616
616
  this._actions.set(tr.action, actionMap);
@@ -624,7 +624,7 @@ class Machine<mDT> {
624
624
 
625
625
 
626
626
  // reverse mapping first by state origin name
627
- let rActionMap: Map<StateType, number> = this._reverse_actions.get(tr.from); // TODO FIXME ?Map equiv
627
+ let rActionMap: Map<StateType, number> = this._reverse_actions.get(tr.from);
628
628
  if (!(rActionMap)) {
629
629
  rActionMap = new Map();
630
630
  this._reverse_actions.set(tr.from, rActionMap);
@@ -1056,7 +1056,10 @@ class Machine<mDT> {
1056
1056
  }
1057
1057
  }
1058
1058
 
1059
+
1060
+
1059
1061
  transition(newState: StateType, newData?: mDT): boolean {
1062
+
1060
1063
  // todo whargarbl implement hooks
1061
1064
  // todo whargarbl implement data stuff
1062
1065
  // todo major incomplete whargarbl comeback
@@ -1092,8 +1095,12 @@ class Machine<mDT> {
1092
1095
 
1093
1096
  }
1094
1097
 
1098
+
1099
+
1095
1100
  // can leave machine in inconsistent state. generally do not use
1101
+
1096
1102
  force_transition(newState: StateType, newData?: mDT): boolean {
1103
+
1097
1104
  // todo whargarbl implement hooks
1098
1105
  // todo whargarbl implement data stuff
1099
1106
  // todo major incomplete whargarbl comeback
@@ -1145,14 +1152,12 @@ class Machine<mDT> {
1145
1152
  }
1146
1153
 
1147
1154
  valid_action(action: StateType, _newData?: mDT): boolean { // todo comeback unignore newData
1148
- // todo whargarbl implement hooks
1149
1155
  // todo whargarbl implement data stuff
1150
1156
  // todo major incomplete whargarbl comeback
1151
1157
  return this.current_action_for(action) !== undefined;
1152
1158
  }
1153
1159
 
1154
1160
  valid_transition(newState: StateType, _newData?: mDT): boolean { // todo comeback unignore newData
1155
- // todo whargarbl implement hooks
1156
1161
  // todo whargarbl implement data stuff
1157
1162
  // todo major incomplete whargarbl comeback
1158
1163
  const transition_for: JssmTransition<mDT> = this.lookup_transition_for(this.state(), newState);
@@ -1165,7 +1170,6 @@ class Machine<mDT> {
1165
1170
  }
1166
1171
 
1167
1172
  valid_force_transition(newState: StateType, _newData?: mDT): boolean { // todo comeback unignore newData
1168
- // todo whargarbl implement hooks
1169
1173
  // todo whargarbl implement data stuff
1170
1174
  // todo major incomplete whargarbl comeback
1171
1175
  return (this.lookup_transition_for(this.state(), newState) !== undefined);
package/src/ts/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
 
2
- const version: string = "5.45.0";
2
+ const version: string = "5.45.2";
3
3
  export { version };