@genesislcap/foundation-state-machine 14.488.2-GENC-1351.9 → 14.488.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.
|
@@ -157,13 +157,6 @@ export interface Machine<TContext extends MachineContext, TEvent extends EventOb
|
|
|
157
157
|
* Stop the machine.
|
|
158
158
|
*/
|
|
159
159
|
stop(): void;
|
|
160
|
-
/**
|
|
161
|
-
* Capture a JSON-serialisable snapshot of the running machine — its state
|
|
162
|
-
* value, context (minus the framework's non-serialisable error plumbing), and
|
|
163
|
-
* any child actors — suitable for persistence. Pass it back via
|
|
164
|
-
* `start({ state })` to resume the machine in the exact same place.
|
|
165
|
-
*/
|
|
166
|
-
getPersistedSnapshot(): unknown;
|
|
167
160
|
/**
|
|
168
161
|
* Recreate the internal machine with the provided implementations.
|
|
169
162
|
*
|
|
@@ -328,8 +321,6 @@ export declare abstract class AbstractMachine<TContext extends MachineContext, T
|
|
|
328
321
|
start(options?: InterpreterOptions<typeof this.machine>): void;
|
|
329
322
|
/** {@inheritDoc Machine.stop} */
|
|
330
323
|
stop(): void;
|
|
331
|
-
/** {@inheritDoc Machine.getPersistedSnapshot} */
|
|
332
|
-
getPersistedSnapshot(): unknown;
|
|
333
324
|
/**
|
|
334
325
|
* @internal
|
|
335
326
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/core/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EACL,eAAe,EAEf,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,8BAA8B,EAC9B,eAAe,EACf,kBAAkB,EAClB,cAAc,IAAI,eAAe,EACjC,OAAO,EACP,mBAAmB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,EACN,kBAAkB,EAClB,IAAI,CACL;IAYH,oCAAoC;IACpC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC;IAOlD,mCAAmC;IACnC,MAAM,CAAC,GAAG,EAAE,MAAM;IAOlB,+CAA+C;IAC/C,kBAAkB,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,CAAC,EAAE;IAU5D,iCAAiC;IACjC,IAAI,CAAC,KAAK,EAAE,MAAM;IAIlB,wCAAwC;IACxC,WAAW,GAAI,OAAO,WAAW,CAAC,MAAM,CAAC,UAEvC;IAEF,oCAAoC;IACpC,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,MAAM,IAAI,EAC/C,wBAAwB,CAAC,EAAE,wBAAwB,CAAC,OAAO,CAAC,GAAG,SAAS,EACxE,iBAAiB,GAAE,OAAe,EAClC,OAAO,GAAE,gBAA0C,GAClD,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;IAc1C,6CAA6C;IAC7C,QAAQ,CAAC,gBAAgB,IAAI,IAAI;CAClC"}
|
package/dist/esm/core/machine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
2
|
import { createErrorMap } from '@genesislcap/foundation-utils';
|
|
3
3
|
import { defaultExecutionContext, observable, Observable, } from '@microsoft/fast-element';
|
|
4
4
|
import { Container } from '@microsoft/fast-foundation';
|
|
@@ -27,21 +27,6 @@ export class AbstractMachine {
|
|
|
27
27
|
this.stopActor();
|
|
28
28
|
this.unsubscribe();
|
|
29
29
|
}
|
|
30
|
-
/** {@inheritDoc Machine.getPersistedSnapshot} */
|
|
31
|
-
getPersistedSnapshot() {
|
|
32
|
-
var _a, _b, _c;
|
|
33
|
-
if (!this.actor) {
|
|
34
|
-
throw new Error('Call start() before getPersistedSnapshot()');
|
|
35
|
-
}
|
|
36
|
-
const persisted = (_b = (_a = this.actor).getPersistedState) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
37
|
-
if (!persisted) {
|
|
38
|
-
return persisted;
|
|
39
|
-
}
|
|
40
|
-
// Strip the non-serialisable error plumbing (an ErrorMap of live functions);
|
|
41
|
-
// it is re-created fresh on restore — see interpret().
|
|
42
|
-
const _d = (_c = persisted.context) !== null && _c !== void 0 ? _c : {}, { errors: _errors, error: _error } = _d, context = __rest(_d, ["errors", "error"]);
|
|
43
|
-
return Object.assign(Object.assign({}, persisted), { context });
|
|
44
|
-
}
|
|
45
30
|
/**
|
|
46
31
|
* @internal
|
|
47
32
|
*/
|
|
@@ -56,15 +41,7 @@ export class AbstractMachine {
|
|
|
56
41
|
this.startingState = options === null || options === void 0 ? void 0 : options.state;
|
|
57
42
|
this.startingContext = (options.input
|
|
58
43
|
? Object.assign(Object.assign({}, contextWithErrors), options.input) : contextWithErrors);
|
|
59
|
-
|
|
60
|
-
// context and ignores `input`, so re-establish the (non-serialised) error
|
|
61
|
-
// plumbing here — forcing `errors`/`error` to win over the snapshot — and
|
|
62
|
-
// default `children` so xstate's restoreState (`Object.keys(state.children)`)
|
|
63
|
-
// doesn't choke on a snapshot captured without it.
|
|
64
|
-
const persistedState = options === null || options === void 0 ? void 0 : options.state;
|
|
65
|
-
const restoreState = persistedState
|
|
66
|
-
? Object.assign(Object.assign({ children: {} }, persistedState), { context: Object.assign(Object.assign({}, persistedState.context), contextWithErrors) }) : undefined;
|
|
67
|
-
this.actor = interpret(this.machine, Object.assign(Object.assign({}, options), { input: this.startingContext, state: (restoreState !== null && restoreState !== void 0 ? restoreState : this.startingState) }));
|
|
44
|
+
this.actor = interpret(this.machine, Object.assign(Object.assign({}, options), { input: this.startingContext, state: this.startingState }));
|
|
68
45
|
this.snapshot = this.actor.getSnapshot();
|
|
69
46
|
this.state = this.snapshot.value;
|
|
70
47
|
this.context = this.snapshot.context;
|
|
@@ -103,13 +80,13 @@ export class AbstractMachine {
|
|
|
103
80
|
* @internal
|
|
104
81
|
*/
|
|
105
82
|
applySnapshot(snapshot = this.actor.getSnapshot()) {
|
|
106
|
-
var _a
|
|
83
|
+
var _a;
|
|
107
84
|
this.snapshot = snapshot;
|
|
108
85
|
this.state = this.snapshot.value;
|
|
109
86
|
this.context = this.snapshot.context;
|
|
110
87
|
this.meta = this.snapshot.meta;
|
|
111
88
|
this.errors = this.context.errors;
|
|
112
|
-
this.error = (_a = this.context.error) !== null && _a !== void 0 ? _a :
|
|
89
|
+
this.error = (_a = this.context.error) !== null && _a !== void 0 ? _a : this.errors.lastError;
|
|
113
90
|
}
|
|
114
91
|
/**
|
|
115
92
|
* @internal
|
|
@@ -801,37 +801,6 @@
|
|
|
801
801
|
"isAbstract": false,
|
|
802
802
|
"name": "getMetaValuesByKey"
|
|
803
803
|
},
|
|
804
|
-
{
|
|
805
|
-
"kind": "Method",
|
|
806
|
-
"canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#getPersistedSnapshot:member(1)",
|
|
807
|
-
"docComment": "/**\n * Capture a JSON-serialisable snapshot of the running machine — its state value, context (minus the framework's non-serialisable error plumbing), and any child actors — suitable for persistence. Pass it back via `start({ state })` to resume the machine in the exact same place.\n */\n",
|
|
808
|
-
"excerptTokens": [
|
|
809
|
-
{
|
|
810
|
-
"kind": "Content",
|
|
811
|
-
"text": "getPersistedSnapshot(): "
|
|
812
|
-
},
|
|
813
|
-
{
|
|
814
|
-
"kind": "Content",
|
|
815
|
-
"text": "unknown"
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
"kind": "Content",
|
|
819
|
-
"text": ";"
|
|
820
|
-
}
|
|
821
|
-
],
|
|
822
|
-
"isStatic": false,
|
|
823
|
-
"returnTypeTokenRange": {
|
|
824
|
-
"startIndex": 1,
|
|
825
|
-
"endIndex": 2
|
|
826
|
-
},
|
|
827
|
-
"releaseTag": "Public",
|
|
828
|
-
"isProtected": false,
|
|
829
|
-
"overloadIndex": 1,
|
|
830
|
-
"parameters": [],
|
|
831
|
-
"isOptional": false,
|
|
832
|
-
"isAbstract": false,
|
|
833
|
-
"name": "getPersistedSnapshot"
|
|
834
|
-
},
|
|
835
804
|
{
|
|
836
805
|
"kind": "Method",
|
|
837
806
|
"canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#hasTag:member(1)",
|
|
@@ -5256,34 +5225,6 @@
|
|
|
5256
5225
|
],
|
|
5257
5226
|
"name": "getMetaValuesByKey"
|
|
5258
5227
|
},
|
|
5259
|
-
{
|
|
5260
|
-
"kind": "MethodSignature",
|
|
5261
|
-
"canonicalReference": "@genesislcap/foundation-state-machine!Machine#getPersistedSnapshot:member(1)",
|
|
5262
|
-
"docComment": "/**\n * Capture a JSON-serialisable snapshot of the running machine — its state value, context (minus the framework's non-serialisable error plumbing), and any child actors — suitable for persistence. Pass it back via `start({ state })` to resume the machine in the exact same place.\n */\n",
|
|
5263
|
-
"excerptTokens": [
|
|
5264
|
-
{
|
|
5265
|
-
"kind": "Content",
|
|
5266
|
-
"text": "getPersistedSnapshot(): "
|
|
5267
|
-
},
|
|
5268
|
-
{
|
|
5269
|
-
"kind": "Content",
|
|
5270
|
-
"text": "unknown"
|
|
5271
|
-
},
|
|
5272
|
-
{
|
|
5273
|
-
"kind": "Content",
|
|
5274
|
-
"text": ";"
|
|
5275
|
-
}
|
|
5276
|
-
],
|
|
5277
|
-
"isOptional": false,
|
|
5278
|
-
"returnTypeTokenRange": {
|
|
5279
|
-
"startIndex": 1,
|
|
5280
|
-
"endIndex": 2
|
|
5281
|
-
},
|
|
5282
|
-
"releaseTag": "Public",
|
|
5283
|
-
"overloadIndex": 1,
|
|
5284
|
-
"parameters": [],
|
|
5285
|
-
"name": "getPersistedSnapshot"
|
|
5286
|
-
},
|
|
5287
5228
|
{
|
|
5288
5229
|
"kind": "MethodSignature",
|
|
5289
5230
|
"canonicalReference": "@genesislcap/foundation-state-machine!Machine#hasTag:member(1)",
|
|
@@ -87,8 +87,6 @@ export declare abstract class AbstractMachine<TContext extends MachineContext, T
|
|
|
87
87
|
start(options?: InterpreterOptions<typeof AbstractMachine.machine>): void;
|
|
88
88
|
/** {@inheritDoc Machine.stop} */
|
|
89
89
|
stop(): void;
|
|
90
|
-
/** {@inheritDoc Machine.getPersistedSnapshot} */
|
|
91
|
-
getPersistedSnapshot(): unknown;
|
|
92
90
|
/**
|
|
93
91
|
* @internal
|
|
94
92
|
*/
|
|
@@ -688,13 +686,6 @@ export declare interface Machine<TContext extends MachineContext, TEvent extends
|
|
|
688
686
|
* Stop the machine.
|
|
689
687
|
*/
|
|
690
688
|
stop(): void;
|
|
691
|
-
/**
|
|
692
|
-
* Capture a JSON-serialisable snapshot of the running machine — its state
|
|
693
|
-
* value, context (minus the framework's non-serialisable error plumbing), and
|
|
694
|
-
* any child actors — suitable for persistence. Pass it back via
|
|
695
|
-
* `start({ state })` to resume the machine in the exact same place.
|
|
696
|
-
*/
|
|
697
|
-
getPersistedSnapshot(): unknown;
|
|
698
689
|
/**
|
|
699
690
|
* Recreate the internal machine with the provided implementations.
|
|
700
691
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-state-machine",
|
|
3
3
|
"description": "Genesis Foundation State Machine",
|
|
4
|
-
"version": "14.488.2
|
|
4
|
+
"version": "14.488.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@genesislcap/foundation-testing": "14.488.2
|
|
58
|
-
"@genesislcap/genx": "14.488.2
|
|
59
|
-
"@genesislcap/rollup-builder": "14.488.2
|
|
60
|
-
"@genesislcap/ts-builder": "14.488.2
|
|
61
|
-
"@genesislcap/uvu-playwright-builder": "14.488.2
|
|
62
|
-
"@genesislcap/vite-builder": "14.488.2
|
|
63
|
-
"@genesislcap/webpack-builder": "14.488.2
|
|
57
|
+
"@genesislcap/foundation-testing": "14.488.2",
|
|
58
|
+
"@genesislcap/genx": "14.488.2",
|
|
59
|
+
"@genesislcap/rollup-builder": "14.488.2",
|
|
60
|
+
"@genesislcap/ts-builder": "14.488.2",
|
|
61
|
+
"@genesislcap/uvu-playwright-builder": "14.488.2",
|
|
62
|
+
"@genesislcap/vite-builder": "14.488.2",
|
|
63
|
+
"@genesislcap/webpack-builder": "14.488.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@genesislcap/foundation-comms": "14.488.2
|
|
67
|
-
"@genesislcap/foundation-logger": "14.488.2
|
|
68
|
-
"@genesislcap/foundation-utils": "14.488.2
|
|
66
|
+
"@genesislcap/foundation-comms": "14.488.2",
|
|
67
|
+
"@genesislcap/foundation-logger": "14.488.2",
|
|
68
|
+
"@genesislcap/foundation-utils": "14.488.2",
|
|
69
69
|
"@microsoft/fast-element": "1.14.0",
|
|
70
70
|
"@microsoft/fast-foundation": "2.50.0",
|
|
71
71
|
"cockatiel": "^3.1.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "babd82759de2896aaec4b630259c716b59afb1b3"
|
|
84
84
|
}
|