@rxova/journey-core 0.3.0 → 0.5.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.
@@ -0,0 +1,150 @@
1
+ import type { JourneyPersistenceOptions } from "./persistence.types";
2
+ import type { JourneyTransition } from "./transitions.types";
3
+ export type JourneyTerminal = "COMPLETE" | "TERMINATED";
4
+ export declare const JOURNEY_STATUS: {
5
+ readonly RUNNING: "running";
6
+ readonly COMPLETE: "complete";
7
+ readonly TERMINATED: "terminated";
8
+ };
9
+ export type JourneyStatus = (typeof JOURNEY_STATUS)[keyof typeof JOURNEY_STATUS];
10
+ export declare const JOURNEY_WILDCARD: "*";
11
+ export declare const JOURNEY_EVENT: {
12
+ readonly GO_TO_STEP_BY_ID: "goToStepById";
13
+ };
14
+ export type JourneyBuiltInEvent = (typeof JOURNEY_EVENT)[keyof typeof JOURNEY_EVENT];
15
+ export type JourneyBuiltInFrom = typeof JOURNEY_WILDCARD;
16
+ export type JourneyDefaultEventType = "goToNextStep" | "goToPreviousStep" | "terminateJourney" | "completeJourney";
17
+ export declare const JOURNEY_ASYNC_PHASE: {
18
+ readonly IDLE: "idle";
19
+ readonly EVALUATING_WHEN: "evaluating-when";
20
+ readonly RUNNING_EFFECT: "running-effect";
21
+ readonly ERROR: "error";
22
+ };
23
+ export type JourneyAsyncPhase = (typeof JOURNEY_ASYNC_PHASE)[keyof typeof JOURNEY_ASYNC_PHASE];
24
+ export type JourneyStepAsyncState = {
25
+ phase: JourneyAsyncPhase;
26
+ eventType: string | null;
27
+ transitionId: string | null;
28
+ error: unknown | null;
29
+ };
30
+ export type JourneyAsyncState<TStepId extends string> = {
31
+ isLoading: boolean;
32
+ byStep: Record<TStepId, JourneyStepAsyncState>;
33
+ };
34
+ export type JourneyBaseEvent = {
35
+ type: string;
36
+ payload?: unknown;
37
+ };
38
+ export type JourneyEventPayloadMap<TEventType extends string> = Partial<Record<TEventType | JourneyBuiltInEvent, unknown>>;
39
+ export type JourneyPayloadFor<TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>, TEvent extends TEventType | JourneyBuiltInEvent> = TEvent extends keyof TPayloadMap ? TPayloadMap[TEvent] : unknown;
40
+ type JourneyPayloadForDefaultEvent<TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>, TDefaultEvent extends JourneyDefaultEventType> = JourneyPayloadFor<TEventType | TDefaultEvent, TPayloadMap & JourneyEventPayloadMap<TDefaultEvent>, TDefaultEvent>;
41
+ export type JourneyGoToEvent<TStepId extends string, TPayload = unknown> = {
42
+ type: (typeof JOURNEY_EVENT)["GO_TO_STEP_BY_ID"];
43
+ stepId: TStepId;
44
+ payload?: TPayload;
45
+ };
46
+ export type JourneyEvent<TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = JourneyGoToEvent<TStepId, JourneyPayloadFor<TEventType, TPayloadMap, (typeof JOURNEY_EVENT)["GO_TO_STEP_BY_ID"]>> | {
47
+ [TType in TEventType]: {
48
+ type: TType;
49
+ payload?: JourneyPayloadFor<TEventType, TPayloadMap, TType>;
50
+ };
51
+ }[TEventType];
52
+ export type JourneyStepDefinition<TStepMeta = unknown> = {
53
+ meta?: TStepMeta;
54
+ } & Record<string, unknown>;
55
+ export type JourneySnapshot<TContext, TStepId extends string, TStepMeta = unknown> = {
56
+ currentStepId: TStepId;
57
+ history: {
58
+ timeline: readonly TStepId[];
59
+ index: number;
60
+ };
61
+ context: TContext;
62
+ visited: Record<TStepId, boolean>;
63
+ stepMeta: Record<TStepId, TStepMeta>;
64
+ status: JourneyStatus;
65
+ async: JourneyAsyncState<TStepId>;
66
+ };
67
+ export type JourneyDefinition<TContext, TStepId extends string = string, TEventType extends string = JourneyDefaultEventType, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>, TStepMeta = unknown> = {
68
+ initial: TStepId;
69
+ context: TContext;
70
+ steps: Record<TStepId, JourneyStepDefinition<TStepMeta>>;
71
+ transitions: readonly JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>[];
72
+ };
73
+ export type JourneyMachineOptions<TContext, TStepId extends string, TStepMeta = unknown> = {
74
+ persistence?: JourneyPersistenceOptions<TContext, TStepId, TStepMeta>;
75
+ };
76
+ export type JourneySendResult<TContext, TStepId extends string, TStepMeta = unknown> = {
77
+ transitioned: boolean;
78
+ transitionId?: string;
79
+ snapshot: JourneySnapshot<TContext, TStepId, TStepMeta>;
80
+ };
81
+ export type JourneyObservationEvent<TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>, TStepMeta = unknown> = {
82
+ type: "transition.start";
83
+ from: TStepId;
84
+ event: JourneyEvent<TStepId, TEventType, TPayloadMap>;
85
+ timestamp: number;
86
+ } | {
87
+ type: "transition.success";
88
+ from: TStepId;
89
+ to: TStepId | JourneyTerminal;
90
+ eventType: string;
91
+ transitionId: string | null;
92
+ timestamp: number;
93
+ } | {
94
+ type: "transition.error";
95
+ from: TStepId;
96
+ eventType: string;
97
+ transitionId: string | null;
98
+ error: unknown;
99
+ timestamp: number;
100
+ } | {
101
+ type: "step.exit";
102
+ stepId: TStepId;
103
+ timestamp: number;
104
+ } | {
105
+ type: "step.enter";
106
+ stepId: TStepId;
107
+ timestamp: number;
108
+ } | {
109
+ type: "journey.complete";
110
+ stepId: TStepId;
111
+ timestamp: number;
112
+ } | {
113
+ type: "journey.close";
114
+ stepId: TStepId;
115
+ timestamp: number;
116
+ } | {
117
+ type: "navigation.previous";
118
+ from: TStepId;
119
+ to: TStepId;
120
+ requestedSteps: number;
121
+ appliedSteps: number;
122
+ timestamp: number;
123
+ } | {
124
+ type: "navigation.lastVisited";
125
+ from: TStepId;
126
+ to: TStepId;
127
+ timestamp: number;
128
+ } | {
129
+ type: "metadata.updated";
130
+ stepId: TStepId;
131
+ previous: TStepMeta;
132
+ next: TStepMeta;
133
+ timestamp: number;
134
+ };
135
+ export type JourneyMachine<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>, TStepMeta = unknown> = {
136
+ getSnapshot: () => JourneySnapshot<TContext, TStepId, TStepMeta>;
137
+ send: (event: JourneyEvent<TStepId, TEventType, TPayloadMap>) => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
138
+ goToNextStep: () => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
139
+ terminateJourney: (payload?: JourneyPayloadForDefaultEvent<TEventType, TPayloadMap, "terminateJourney">) => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
140
+ completeJourney: (payload?: JourneyPayloadForDefaultEvent<TEventType, TPayloadMap, "completeJourney">) => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
141
+ goToPreviousStep: (steps?: number) => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
142
+ goToLastVisitedStep: () => Promise<JourneySendResult<TContext, TStepId, TStepMeta>>;
143
+ updateContext: (updater: (context: TContext) => TContext) => JourneySnapshot<TContext, TStepId, TStepMeta>;
144
+ updateStepMetadata: (stepId: TStepId, updater: (metadata: TStepMeta) => TStepMeta) => JourneySnapshot<TContext, TStepId, TStepMeta>;
145
+ clearStepError: (stepId?: TStepId) => JourneySnapshot<TContext, TStepId, TStepMeta>;
146
+ resetMachine: () => JourneySnapshot<TContext, TStepId, TStepMeta>;
147
+ subscribe: (listener: () => void) => () => void;
148
+ subscribeEvent: (listener: (event: JourneyObservationEvent<TStepId, TEventType, TPayloadMap, TStepMeta>) => void) => () => void;
149
+ };
150
+ export {};
@@ -0,0 +1,41 @@
1
+ import type { JourneyStatus } from "./journey.types";
2
+ export type JourneyPersistedSnapshot<TContext, TStepId extends string, TStepMeta = unknown> = {
3
+ currentStepId: TStepId;
4
+ history: {
5
+ timeline: readonly TStepId[];
6
+ index: number;
7
+ };
8
+ context: TContext;
9
+ status: JourneyStatus;
10
+ visited: Record<TStepId, boolean>;
11
+ stepMeta: Record<TStepId, TStepMeta>;
12
+ };
13
+ export type JourneyPersistedState<TContext, TStepId extends string, TStepMeta = unknown> = {
14
+ version: number;
15
+ snapshot: JourneyPersistedSnapshot<TContext, TStepId, TStepMeta>;
16
+ };
17
+ export type JourneyStorage = {
18
+ getItem: (key: string) => string | null;
19
+ setItem: (key: string, value: string) => void;
20
+ removeItem: (key: string) => void;
21
+ };
22
+ export type JourneyPersistenceOptions<TContext, TStepId extends string, TStepMeta = unknown> = {
23
+ key: string;
24
+ storage?: JourneyStorage;
25
+ version?: number;
26
+ clearOnReset?: boolean;
27
+ serialize?: (value: JourneyPersistedState<TContext, TStepId, TStepMeta>) => string;
28
+ deserialize?: (value: string) => unknown;
29
+ migrate?: (value: unknown, persistedVersion: number) => JourneyPersistedSnapshot<TContext, TStepId, TStepMeta>;
30
+ onError?: (error: unknown) => void;
31
+ };
32
+ export type ResolvedPersistence<TContext, TStepId extends string, TStepMeta> = {
33
+ key: string;
34
+ storage: JourneyStorage;
35
+ version: number;
36
+ clearOnReset: boolean;
37
+ serialize: (value: JourneyPersistedState<TContext, TStepId, TStepMeta>) => string;
38
+ deserialize: (value: string) => unknown;
39
+ migrate?: (value: unknown, persistedVersion: number) => JourneyPersistedSnapshot<TContext, TStepId, TStepMeta>;
40
+ onError?: (error: unknown) => void;
41
+ };
@@ -0,0 +1,47 @@
1
+ import type { JOURNEY_EVENT, JourneyBuiltInFrom, JourneyEvent, JourneyEventPayloadMap, JourneyTerminal } from "./journey.types";
2
+ export type JourneyTransitionArgs<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
3
+ context: TContext;
4
+ from: TStepId;
5
+ timeline: readonly TStepId[];
6
+ index: number;
7
+ event: JourneyEvent<TStepId, TEventType, TPayloadMap>;
8
+ };
9
+ export type JourneyTransitionTarget<TStepId extends string> = TStepId | JourneyTerminal;
10
+ type JourneyTransitionConfig<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
11
+ id?: string;
12
+ from: TStepId | JourneyBuiltInFrom;
13
+ when?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => boolean | Promise<boolean>;
14
+ effect?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => TContext | void | Promise<TContext | void>;
15
+ };
16
+ export type JourneyEventTransition<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = (JourneyTransitionConfig<TContext, TStepId, TEventType, TPayloadMap> & {
17
+ event: Exclude<TEventType, "completeJourney" | "terminateJourney">;
18
+ to: JourneyTransitionTarget<TStepId>;
19
+ }) | (JourneyTransitionConfig<TContext, TStepId, TEventType, TPayloadMap> & {
20
+ event: Extract<TEventType, "completeJourney" | "terminateJourney">;
21
+ to?: never;
22
+ });
23
+ export type JourneyGoToStepTransition<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = JourneyTransitionConfig<TContext, TStepId, TEventType, TPayloadMap> & {
24
+ event: (typeof JOURNEY_EVENT)["GO_TO_STEP_BY_ID"];
25
+ to: TStepId;
26
+ };
27
+ export type JourneyTransition<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = JourneyEventTransition<TContext, TStepId, TEventType, TPayloadMap> | JourneyGoToStepTransition<TContext, TStepId, TEventType, TPayloadMap>;
28
+ export type TransitionConfig<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = {
29
+ id?: string;
30
+ effect?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => TContext | void | Promise<TContext | void>;
31
+ };
32
+ export type TransitionBranch<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = TransitionConfig<TContext, TStepId, TEventType, TPayloadMap> & {
33
+ to: JourneyTransitionTarget<TStepId>;
34
+ when?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => boolean | Promise<boolean>;
35
+ };
36
+ export type StandardEventBuilder<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = {
37
+ to: (to: JourneyTransitionTarget<TStepId>, config?: TransitionConfig<TContext, TStepId, TEventType, TPayloadMap>) => JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>;
38
+ choose: (...branches: Array<TransitionBranch<TContext, TStepId, TEventType, TPayloadMap>>) => JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>[];
39
+ };
40
+ export type CompleteJourneyEventBuilder<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = {
41
+ complete: (config?: TransitionConfig<TContext, TStepId, TEventType, TPayloadMap>) => JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>;
42
+ };
43
+ export type TerminateJourneyEventBuilder<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = {
44
+ terminate: (config?: TransitionConfig<TContext, TStepId, TEventType, TPayloadMap>) => JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>;
45
+ };
46
+ export type EventBuilder<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>> = TEventType extends "completeJourney" ? CompleteJourneyEventBuilder<TContext, TStepId, TEventType, TPayloadMap> : TEventType extends "terminateJourney" ? TerminateJourneyEventBuilder<TContext, TStepId, TEventType, TPayloadMap> : StandardEventBuilder<TContext, TStepId, TEventType, TPayloadMap>;
47
+ export {};
package/dist/types.d.ts CHANGED
@@ -1,139 +1 @@
1
- export declare const JOURNEY_TERMINAL: {
2
- readonly COMPLETE: "COMPLETE";
3
- readonly CLOSE: "CLOSE";
4
- };
5
- export type JourneyTerminal = (typeof JOURNEY_TERMINAL)[keyof typeof JOURNEY_TERMINAL];
6
- export declare const JOURNEY_STATUS: {
7
- readonly RUNNING: "running";
8
- readonly COMPLETE: "complete";
9
- readonly CLOSED: "closed";
10
- };
11
- export type JourneyStatus = (typeof JOURNEY_STATUS)[keyof typeof JOURNEY_STATUS];
12
- export declare const HISTORY_TARGET: "__HISTORY__";
13
- export declare const JOURNEY_WILDCARD: "*";
14
- export declare const JOURNEY_EVENT: {
15
- readonly GO_TO: "goTo";
16
- };
17
- export type JourneyBuiltInEvent = (typeof JOURNEY_EVENT)[keyof typeof JOURNEY_EVENT];
18
- export type JourneyBuiltInFrom = typeof JOURNEY_WILDCARD;
19
- export declare const JOURNEY_ASYNC_PHASE: {
20
- readonly IDLE: "idle";
21
- readonly EVALUATING_WHEN: "evaluating-when";
22
- readonly RUNNING_EFFECT: "running-effect";
23
- readonly ERROR: "error";
24
- };
25
- export type JourneyAsyncPhase = (typeof JOURNEY_ASYNC_PHASE)[keyof typeof JOURNEY_ASYNC_PHASE];
26
- export type JourneyStepAsyncState = {
27
- phase: JourneyAsyncPhase;
28
- eventType: string | null;
29
- transitionId: string | null;
30
- error: unknown | null;
31
- };
32
- export type JourneyAsyncState<TStepId extends string> = {
33
- isLoading: boolean;
34
- byStep: Record<TStepId, JourneyStepAsyncState>;
35
- };
36
- export type JourneyBaseEvent = {
37
- type: string;
38
- payload?: unknown;
39
- };
40
- export type JourneyEventPayloadMap<TEventType extends string> = Partial<Record<TEventType | JourneyBuiltInEvent, unknown>>;
41
- export type JourneyPayloadFor<TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType>, TEvent extends TEventType | JourneyBuiltInEvent> = TEvent extends keyof TPayloadMap ? TPayloadMap[TEvent] : unknown;
42
- export type JourneyGoToEvent<TStepId extends string, TPayload = unknown> = {
43
- type: (typeof JOURNEY_EVENT)["GO_TO"];
44
- to: TStepId;
45
- payload?: TPayload;
46
- };
47
- export type JourneyEvent<TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = JourneyGoToEvent<TStepId, JourneyPayloadFor<TEventType, TPayloadMap, (typeof JOURNEY_EVENT)["GO_TO"]>> | {
48
- [TType in TEventType]: {
49
- type: TType;
50
- payload?: JourneyPayloadFor<TEventType, TPayloadMap, TType>;
51
- };
52
- }[TEventType];
53
- export type JourneyTransitionArgs<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
54
- context: TContext;
55
- from: TStepId;
56
- history: readonly TStepId[];
57
- event: JourneyEvent<TStepId, TEventType, TPayloadMap>;
58
- };
59
- export type JourneyTransitionTarget<TStepId extends string> = TStepId | JourneyTerminal | typeof HISTORY_TARGET;
60
- export type JourneyTransition<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
61
- id?: string;
62
- from: TStepId | JourneyBuiltInFrom;
63
- event: TEventType | (typeof JOURNEY_EVENT)["GO_TO"];
64
- to: JourneyTransitionTarget<TStepId>;
65
- when?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => boolean | Promise<boolean>;
66
- effect?: (args: JourneyTransitionArgs<TContext, TStepId, TEventType, TPayloadMap>) => TContext | void | Promise<TContext | void>;
67
- };
68
- export type JourneySnapshot<TContext, TStepId extends string> = {
69
- current: TStepId;
70
- context: TContext;
71
- history: readonly TStepId[];
72
- visited: readonly TStepId[];
73
- status: JourneyStatus;
74
- async: JourneyAsyncState<TStepId>;
75
- };
76
- export type JourneyPersistedSnapshot<TContext, TStepId extends string> = {
77
- current: TStepId;
78
- context: TContext;
79
- history: readonly TStepId[];
80
- status: JourneyStatus;
81
- visited: readonly TStepId[];
82
- };
83
- export type JourneyPersistedState<TContext, TStepId extends string> = {
84
- version: number;
85
- snapshot: JourneyPersistedSnapshot<TContext, TStepId>;
86
- };
87
- export type JourneyHistoryOverflowReason = "auto" | "hydrate" | "manual";
88
- export type JourneyHistoryOverflow<TStepId extends string> = {
89
- previous: readonly TStepId[];
90
- next: readonly TStepId[];
91
- trimmed: readonly TStepId[];
92
- maxHistory: number | null;
93
- reason: JourneyHistoryOverflowReason;
94
- };
95
- export type JourneyHistoryOptions<TStepId extends string> = {
96
- maxHistory?: number | null;
97
- onOverflow?: (info: JourneyHistoryOverflow<TStepId>) => void;
98
- };
99
- export type JourneyStorage = {
100
- getItem: (key: string) => string | null;
101
- setItem: (key: string, value: string) => void;
102
- removeItem: (key: string) => void;
103
- };
104
- export type JourneyPersistenceOptions<TContext, TStepId extends string> = {
105
- key: string;
106
- storage?: JourneyStorage;
107
- version?: number;
108
- clearOnReset?: boolean;
109
- serialize?: (value: JourneyPersistedState<TContext, TStepId>) => string;
110
- deserialize?: (value: string) => unknown;
111
- migrate?: (value: unknown, persistedVersion: number) => JourneyPersistedSnapshot<TContext, TStepId>;
112
- onError?: (error: unknown) => void;
113
- };
114
- export type JourneyDefinition<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
115
- initial: TStepId;
116
- context: TContext;
117
- steps: Record<TStepId, unknown>;
118
- transitions: readonly JourneyTransition<TContext, TStepId, TEventType, TPayloadMap>[];
119
- };
120
- export type JourneyMachineOptions<TContext, TStepId extends string> = {
121
- persistence?: JourneyPersistenceOptions<TContext, TStepId>;
122
- history?: JourneyHistoryOptions<TStepId>;
123
- };
124
- export type JourneySendResult<TContext, TStepId extends string> = {
125
- transitioned: boolean;
126
- transitionId?: string;
127
- snapshot: JourneySnapshot<TContext, TStepId>;
128
- };
129
- export type JourneyMachine<TContext, TStepId extends string, TEventType extends string, TPayloadMap extends JourneyEventPayloadMap<TEventType> = Record<never, never>> = {
130
- getSnapshot: () => JourneySnapshot<TContext, TStepId>;
131
- send: (event: JourneyEvent<TStepId, TEventType, TPayloadMap>) => Promise<JourneySendResult<TContext, TStepId>>;
132
- updateContext: (updater: (context: TContext) => TContext) => JourneySnapshot<TContext, TStepId>;
133
- clearStepError: (stepId?: TStepId) => JourneySnapshot<TContext, TStepId>;
134
- reset: () => JourneySnapshot<TContext, TStepId>;
135
- trimHistory: (maxHistory?: number | null) => JourneySnapshot<TContext, TStepId>;
136
- clearHistory: () => JourneySnapshot<TContext, TStepId>;
137
- subscribe: (listener: () => void) => () => void;
138
- };
139
- //# sourceMappingURL=types.d.ts.map
1
+ export * from "./types/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxova/journey-core",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Journey core state machine.",
5
5
  "keywords": [
6
6
  "journey",
@@ -19,7 +19,8 @@
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/rxova/journey.git"
22
+ "url": "git+https://github.com/rxova/journey.git",
23
+ "directory": "packages/core"
23
24
  },
24
25
  "publishConfig": {
25
26
  "access": "public"
@@ -51,12 +52,13 @@
51
52
  "name": "core/createJourneyMachine",
52
53
  "path": "dist/index.js",
53
54
  "import": "{ createJourneyMachine }",
54
- "limit": "3 kB"
55
+ "limit": "4 kB"
55
56
  }
56
57
  ],
57
58
  "scripts": {
58
59
  "build": "pnpm run clean && node ./scripts/build.mjs && tsc -p tsconfig.build.json && node ../../scripts/copy-types.mjs dist",
59
- "clean": "rm -rf dist",
60
+ "clean": "rm -rf dist tsconfig.build.tsbuildinfo",
61
+ "coverage": "pnpm --workspace-root vitest run --coverage --coverage.include=packages/core/src/** --coverage.reporter=text-summary",
60
62
  "typecheck": "tsc --noEmit -p tsconfig.json",
61
63
  "publint": "publint",
62
64
  "attw": "attw --pack .",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACv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AO,GAAG,QAAQ,EAChE,WAAW,SAAS,sBAAsB,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAE7E,SAAS,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,EACtE,UAAU,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,KACjD,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAkY3D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EAIrB,eAAe,EAEhB,MAAM,SAAS,CAAC;AA4GjB;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,QAAQ,EAAE,OAAO,SAAS,MAAM,EAAE,MAAM;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;CACpD;;2BA0C6B,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC;gCAlC3B,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC;;CA0GtE,CAAC"}
@@ -1 +0,0 @@
1
- {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.full.d.ts","../src/types.ts","../src/machine-helpers.ts","../src/persistence.ts","../src/machine.ts","../src/index.ts"],"fileIdsList":[[52,54,55],[52],[52,53,54],[52,53]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"0282259a9b4880387d809220971a0128142022c12658af02f5f7192da18114e7","signature":"b9dc4534a8b8abf7a231fdee9aeba909fe6a5d9d8ffc64336eb662c28164af1c"},{"version":"fe1063af7b4570276eaff494ec43b2096643c189acb1ab1af1378d049545155d","signature":"b8ba6d3320b991b5963822da9a59899f73addad8024074ba18c44a42a8df66c1"},{"version":"f31cd9847f04512bbe3a77d4094f75782b21917e540a151d3458a2667c93765d","signature":"64a4320c603b4e6640d2813fd4817ab65f14fe57327373634a10ddc0016b6435"},{"version":"045c2e73eb112bd2caa2c45d75a0ef39814bd69a757de167128cc19edb949d16","signature":"3d3e7b4efbe8891f0b0f37b832ce6adf587b32c4de869b557c2e2613d5363a65"},{"version":"6a2076fef6db705767a4ecbc9128e84718f9d0977ac8062b58f69751b7ed39e3","signature":"bdd8041fa7979a7f7a52eea92f4ecafc4155db4f964e0339b57ea05ca57afb8d"}],"root":[[52,56]],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"exactOptionalPropertyTypes":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"tsBuildInfoFile":"./tsconfig.build.tsbuildinfo"},"referencedMap":[[56,1],[53,2],[55,3],[54,4]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEvF,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF,eAAO,MAAM,cAAc,EAAG,aAAsB,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAG,GAAY,CAAC;AAE7C,eAAO,MAAM,aAAa;;CAEhB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AACrF,MAAM,MAAM,kBAAkB,GAAG,OAAO,gBAAgB,CAAC;AAEzD,eAAO,MAAM,mB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