@genesislcap/foundation-state-machine 14.434.0 → 14.436.0

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.
@@ -5,4 +5,12 @@ export * from './guards';
5
5
  export * from './inputs';
6
6
  export * from './machine';
7
7
  export * from './state';
8
+ /**
9
+ * Re-exports of the xstate primitives a consumer needs to author a machine
10
+ * alongside `AbstractMachine`. Re-exported here so consumers depend only on
11
+ * `@genesislcap/foundation-state-machine` and the xstate version stays
12
+ * encapsulated in this package.
13
+ */
14
+ export { assign, createMachine, fromPromise, fromCallback } from 'xstate';
15
+ export type { AnyEventObject, EventObject, InterpreterOptions, MachineContext as XMachineContext, ParameterizedObject, ProvidedActor, StateMachine, StateValue, StateValueFrom, } from 'xstate';
8
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AAExB;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC1E,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,cAAc,IAAI,eAAe,EACjC,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,GACf,MAAM,QAAQ,CAAC"}
@@ -5,3 +5,10 @@ export * from './guards';
5
5
  export * from './inputs';
6
6
  export * from './machine';
7
7
  export * from './state';
8
+ /**
9
+ * Re-exports of the xstate primitives a consumer needs to author a machine
10
+ * alongside `AbstractMachine`. Re-exported here so consumers depend only on
11
+ * `@genesislcap/foundation-state-machine` and the xstate version stays
12
+ * encapsulated in this package.
13
+ */
14
+ export { assign, createMachine, fromPromise, fromCallback } from 'xstate';
@@ -3,9 +3,11 @@ import { AnyActorContext } from 'xstate';
3
3
  import { AnyActorRef } from 'xstate';
4
4
  import { AnyEventObject } from 'xstate';
5
5
  import { AnyState } from 'xstate';
6
+ import { assign } from 'xstate';
6
7
  import { Assigner } from 'xstate';
7
8
  import { BindingObserver } from '@microsoft/fast-element';
8
9
  import { Container } from '@microsoft/fast-foundation';
10
+ import { createMachine } from 'xstate';
9
11
  import { DelayExpr } from 'xstate';
10
12
  import { DoneInvokeEvent } from 'xstate';
11
13
  import { ErrorDetailMap } from '@genesislcap/foundation-utils';
@@ -13,34 +15,36 @@ import { ErrorEvent as ErrorEvent_2 } from 'xstate';
13
15
  import { ErrorMap } from '@genesislcap/foundation-utils';
14
16
  import { EventObject } from 'xstate';
15
17
  import { ExecutionContext } from '@microsoft/fast-element';
18
+ import { fromCallback } from 'xstate';
19
+ import { fromPromise } from 'xstate';
16
20
  import type { IBackoffFactory } from 'cockatiel';
17
21
  import { ICancellationContext } from 'cockatiel';
18
22
  import { IMergedPolicy } from 'cockatiel';
19
23
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
20
24
  import type { InternalMachineImplementations } from 'xstate';
21
25
  import type { InterpreterFrom } from 'xstate';
22
- import type { InterpreterOptions } from 'xstate';
26
+ import { InterpreterOptions } from 'xstate';
23
27
  import type { IRetryBackoffContext } from 'cockatiel';
24
28
  import { IRetryContext } from 'cockatiel';
25
29
  import { Logger } from '@genesislcap/foundation-logger';
26
- import { MachineContext as MachineContext_2 } from 'xstate';
27
30
  import { Message } from '@genesislcap/foundation-comms';
28
31
  import type { NoInfer as NoInfer_2 } from 'xstate';
29
32
  import { ParameterizedObject } from 'xstate';
30
33
  import { PropertyAssigner } from 'xstate';
31
- import type { ProvidedActor } from 'xstate';
34
+ import { ProvidedActor } from 'xstate';
32
35
  import type { ResolveTypegenMeta } from 'xstate';
33
36
  import { RetryPolicy } from 'cockatiel';
34
37
  import { SendExpr } from 'xstate';
35
38
  import type { State } from 'xstate';
36
- import type { StateMachine } from 'xstate';
39
+ import { StateMachine } from 'xstate';
37
40
  import type { StateNodeConfig } from 'xstate';
38
- import type { StateValue } from 'xstate';
39
- import type { StateValueFrom } from 'xstate';
41
+ import { StateValue } from 'xstate';
42
+ import { StateValueFrom } from 'xstate';
40
43
  import { StatusCodes } from 'http-status-codes';
41
44
  import { TimeoutPolicy } from 'cockatiel';
42
45
  import type { TypegenDisabled } from 'xstate';
43
46
  import { UnifiedArg } from 'xstate';
47
+ import { MachineContext as XMachineContext } from 'xstate';
44
48
 
45
49
  /**
46
50
  * AbstractMachine base class.
@@ -125,6 +129,8 @@ export declare abstract class AbstractMachine<TContext extends MachineContext, T
125
129
  abstract getFromContainer(): this;
126
130
  }
127
131
 
132
+ export { AnyEventObject }
133
+
128
134
  /**
129
135
  * APIError.
130
136
  * @remarks
@@ -153,6 +159,8 @@ export declare function assertEvent<TEvent extends EventObject = EventObject>(ev
153
159
  type: TEvent['type'];
154
160
  }>;
155
161
 
162
+ export { assign }
163
+
156
164
  /**
157
165
  * Creates an error state node.
158
166
  *
@@ -176,6 +184,8 @@ export declare const createErrorStateNode: (key: string, metaContent?: string, f
176
184
  */
177
185
  export declare const createFetchPolicy: (maxAttempts?: number, retryCodes?: StatusCodes[] | number[], backoff?: IBackoffFactory<IRetryBackoffContext<unknown>>, timeoutDuration?: number, logEvents?: boolean) => IMergedPolicy<IRetryContext & ICancellationContext, never, [RetryPolicy, TimeoutPolicy]>;
178
186
 
187
+ export { createMachine }
188
+
179
189
  /**
180
190
  * Creates an extractor that applies a deserializer to the extracted response data.
181
191
  * @param deserializer - The deserializer to apply.
@@ -259,17 +269,17 @@ export declare const errorWorkflowInput: (key: string) => ({ context }: {
259
269
  * @public
260
270
  */
261
271
  export declare const escalateError: {
262
- (_: ActionArgs<MachineContext_2, EventObject, ParameterizedObject>): void;
272
+ (_: ActionArgs<XMachineContext, EventObject, ParameterizedObject>): void;
263
273
  type: string;
264
- to: string | AnyActorRef | ((args: UnifiedArg<MachineContext_2, EventObject>) => string | AnyActorRef);
274
+ to: string | AnyActorRef | ((args: UnifiedArg<XMachineContext, EventObject>) => string | AnyActorRef);
265
275
  event: any;
266
276
  id: string | undefined;
267
- delay: string | number | DelayExpr<MachineContext_2, EventObject>;
277
+ delay: string | number | DelayExpr<XMachineContext, EventObject>;
268
278
  resolve: (actorContext: AnyActorContext, state: AnyState, args: ActionArgs<any, any>, { to, event: eventOrExpr, id, delay }: {
269
- to: AnyActorRef | string | ((args: UnifiedArg<MachineContext_2, EventObject>) => AnyActorRef | string);
270
- event: EventObject | SendExpr<MachineContext_2, EventObject, EventObject>;
279
+ to: AnyActorRef | string | ((args: UnifiedArg<XMachineContext, EventObject>) => AnyActorRef | string);
280
+ event: EventObject | SendExpr<XMachineContext, EventObject, EventObject>;
271
281
  id: string | undefined;
272
- delay: string | number | DelayExpr<MachineContext_2, EventObject> | undefined;
282
+ delay: string | number | DelayExpr<XMachineContext, EventObject> | undefined;
273
283
  }) => (AnyState | {
274
284
  to: AnyActorRef;
275
285
  event: EventObject;
@@ -284,6 +294,8 @@ export declare const escalateError: {
284
294
  }) => void;
285
295
  };
286
296
 
297
+ export { EventObject }
298
+
287
299
  /**
288
300
  * FetchConfig interface.
289
301
  * @public
@@ -396,6 +408,10 @@ export declare type FetchMachineOutput<TData = any> = Partial<Pick<FetchMachineC
396
408
  data: TData;
397
409
  };
398
410
 
411
+ export { fromCallback }
412
+
413
+ export { fromPromise }
414
+
399
415
  /**
400
416
  * GenesisServerError.
401
417
  * @remarks
@@ -425,6 +441,8 @@ export declare class GenesisServerError extends Error {
425
441
  */
426
442
  export declare const getBindArgs: <TTarget = any>(...args: unknown[]) => TargetBinding<TTarget>;
427
443
 
444
+ export { InterpreterOptions }
445
+
428
446
  /**
429
447
  * isAbortError.
430
448
  * @public
@@ -807,7 +825,7 @@ export declare interface Machine<TContext extends MachineContext, TEvent extends
807
825
  *
808
826
  * @public
809
827
  */
810
- export declare interface MachineContext extends MachineContext_2 {
828
+ export declare interface MachineContext extends XMachineContext {
811
829
  /**
812
830
  * A `ErrorMap` of errors that may have occurred during the machine's workflows.
813
831
  */
@@ -838,6 +856,10 @@ export declare class NetworkError extends Error {
838
856
  constructor(url: string, message?: string);
839
857
  }
840
858
 
859
+ export { ParameterizedObject }
860
+
861
+ export { ProvidedActor }
862
+
841
863
  /**
842
864
  * ResponseDataExtractor type.
843
865
  * @remarks
@@ -871,9 +893,9 @@ export declare type ResponseOkChecker = (response: Response) => boolean;
871
893
  * @public
872
894
  */
873
895
  export declare const setError: {
874
- (_: ActionArgs<MachineContext_2, EventObject, ParameterizedObject>): void;
896
+ (_: ActionArgs<XMachineContext, EventObject, ParameterizedObject>): void;
875
897
  type: string;
876
- assignment: Assigner<MachineContext_2, EventObject> | PropertyAssigner<MachineContext_2, EventObject>;
898
+ assignment: Assigner<XMachineContext, EventObject> | PropertyAssigner<XMachineContext, EventObject>;
877
899
  resolve: (actorContext: AnyActorContext, state: AnyState, actionArgs: ActionArgs<any, any>, { assignment }: {
878
900
  assignment: Assigner<any, any> | PropertyAssigner<any, any>;
879
901
  }) => AnyState[];
@@ -890,14 +912,20 @@ export declare const setError: {
890
912
  * @public
891
913
  */
892
914
  export declare const setErrorByKey: (key: string) => {
893
- (_: ActionArgs<MachineContext_2, EventObject, ParameterizedObject>): void;
915
+ (_: ActionArgs<XMachineContext, EventObject, ParameterizedObject>): void;
894
916
  type: string;
895
- assignment: Assigner<MachineContext_2, EventObject> | PropertyAssigner<MachineContext_2, EventObject>;
917
+ assignment: Assigner<XMachineContext, EventObject> | PropertyAssigner<XMachineContext, EventObject>;
896
918
  resolve: (actorContext: AnyActorContext, state: AnyState, actionArgs: ActionArgs<any, any>, { assignment }: {
897
919
  assignment: Assigner<any, any> | PropertyAssigner<any, any>;
898
920
  }) => AnyState[];
899
921
  };
900
922
 
923
+ export { StateMachine }
924
+
925
+ export { StateValue }
926
+
927
+ export { StateValueFrom }
928
+
901
929
  /**
902
930
  * @typeParam TReturn - The return type.
903
931
  * @param value - The bound value.
@@ -931,4 +959,6 @@ export declare interface TargetSubscriber<TTarget = any, TReturn = any> {
931
959
  handleChange: SubscriberChangeHandler<TTarget, TReturn>;
932
960
  }
933
961
 
962
+ export { XMachineContext }
963
+
934
964
  export { }
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.434.0",
4
+ "version": "14.436.0",
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.434.0",
58
- "@genesislcap/genx": "14.434.0",
59
- "@genesislcap/rollup-builder": "14.434.0",
60
- "@genesislcap/ts-builder": "14.434.0",
61
- "@genesislcap/uvu-playwright-builder": "14.434.0",
62
- "@genesislcap/vite-builder": "14.434.0",
63
- "@genesislcap/webpack-builder": "14.434.0"
57
+ "@genesislcap/foundation-testing": "14.436.0",
58
+ "@genesislcap/genx": "14.436.0",
59
+ "@genesislcap/rollup-builder": "14.436.0",
60
+ "@genesislcap/ts-builder": "14.436.0",
61
+ "@genesislcap/uvu-playwright-builder": "14.436.0",
62
+ "@genesislcap/vite-builder": "14.436.0",
63
+ "@genesislcap/webpack-builder": "14.436.0"
64
64
  },
65
65
  "dependencies": {
66
- "@genesislcap/foundation-comms": "14.434.0",
67
- "@genesislcap/foundation-logger": "14.434.0",
68
- "@genesislcap/foundation-utils": "14.434.0",
66
+ "@genesislcap/foundation-comms": "14.436.0",
67
+ "@genesislcap/foundation-logger": "14.436.0",
68
+ "@genesislcap/foundation-utils": "14.436.0",
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": "ba7b16060050e905ef549b8eed08d67fe4e732d2"
83
+ "gitHead": "87ef9b53cc5f3030651cbc3126bd26f07ffd6819"
84
84
  }