@typeonce/effect-machine-devtools 0.23.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.
- package/LICENSE +21 -0
- package/NOTICE +3 -0
- package/README.md +81 -0
- package/dist/DevServer.d.ts +42 -0
- package/dist/DevServer.d.ts.map +1 -0
- package/dist/DevServer.js +28 -0
- package/dist/DevServer.js.map +1 -0
- package/dist/DevToolsProtocol.d.ts +954 -0
- package/dist/DevToolsProtocol.d.ts.map +1 -0
- package/dist/DevToolsProtocol.js +96 -0
- package/dist/DevToolsProtocol.js.map +1 -0
- package/dist/MachineDocument.d.ts +396 -0
- package/dist/MachineDocument.d.ts.map +1 -0
- package/dist/MachineDocument.js +172 -0
- package/dist/MachineDocument.js.map +1 -0
- package/dist/MachineRegistry.d.ts +349 -0
- package/dist/MachineRegistry.d.ts.map +1 -0
- package/dist/MachineRegistry.js +46 -0
- package/dist/MachineRegistry.js.map +1 -0
- package/dist/MachineSimulator.d.ts +169 -0
- package/dist/MachineSimulator.d.ts.map +1 -0
- package/dist/MachineSimulator.js +98 -0
- package/dist/MachineSimulator.js.map +1 -0
- package/dist/ProjectInspector.d.ts +116 -0
- package/dist/ProjectInspector.d.ts.map +1 -0
- package/dist/ProjectInspector.js +82 -0
- package/dist/ProjectInspector.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +23 -0
- package/dist/bin.js.map +1 -0
- package/dist/client/assets/index-BGOhE3Ng.css +1 -0
- package/dist/client/assets/index-DiqGhsGR.js +14 -0
- package/dist/client/index.html +14 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/devServer.d.ts +9 -0
- package/dist/internal/devServer.d.ts.map +1 -0
- package/dist/internal/devServer.js +119 -0
- package/dist/internal/devServer.js.map +1 -0
- package/dist/internal/evaluationWorker.d.ts +3 -0
- package/dist/internal/evaluationWorker.d.ts.map +1 -0
- package/dist/internal/evaluationWorker.js +69 -0
- package/dist/internal/evaluationWorker.js.map +1 -0
- package/dist/internal/evaluationWorkerBootstrap.d.ts +2 -0
- package/dist/internal/evaluationWorkerBootstrap.d.ts.map +1 -0
- package/dist/internal/evaluationWorkerBootstrap.js +21 -0
- package/dist/internal/evaluationWorkerBootstrap.js.map +1 -0
- package/dist/internal/machineDocument.d.ts +4 -0
- package/dist/internal/machineDocument.d.ts.map +1 -0
- package/dist/internal/machineDocument.js +122 -0
- package/dist/internal/machineDocument.js.map +1 -0
- package/dist/internal/machineRegistry.d.ts +12 -0
- package/dist/internal/machineRegistry.d.ts.map +1 -0
- package/dist/internal/machineRegistry.js +97 -0
- package/dist/internal/machineRegistry.js.map +1 -0
- package/dist/internal/machineSimulator.d.ts +5 -0
- package/dist/internal/machineSimulator.d.ts.map +1 -0
- package/dist/internal/machineSimulator.js +156 -0
- package/dist/internal/machineSimulator.js.map +1 -0
- package/dist/internal/projectInspector.d.ts +11 -0
- package/dist/internal/projectInspector.d.ts.map +1 -0
- package/dist/internal/projectInspector.js +150 -0
- package/dist/internal/projectInspector.js.map +1 -0
- package/index.html +13 -0
- package/package.json +69 -0
- package/src/DevServer.ts +45 -0
- package/src/DevToolsProtocol.ts +146 -0
- package/src/MachineDocument.ts +264 -0
- package/src/MachineRegistry.ts +69 -0
- package/src/MachineSimulator.ts +154 -0
- package/src/ProjectInspector.ts +140 -0
- package/src/bin.ts +56 -0
- package/src/index.ts +20 -0
- package/src/internal/browser/example-machine.ts +134 -0
- package/src/internal/browser/machine-index.ts +81 -0
- package/src/internal/browser/main.ts +42 -0
- package/src/internal/browser/styles.css +817 -0
- package/src/internal/browser/text-tree.ts +214 -0
- package/src/internal/browser/visualizer-app.ts +659 -0
- package/src/internal/browser/visualizer-model.ts +173 -0
- package/src/internal/browser/visualizer.ts +31 -0
- package/src/internal/devServer.ts +171 -0
- package/src/internal/evaluationWorker.ts +138 -0
- package/src/internal/evaluationWorkerBootstrap.js +21 -0
- package/src/internal/machineDocument.ts +138 -0
- package/src/internal/machineRegistry.ts +128 -0
- package/src/internal/machineSimulator.ts +199 -0
- package/src/internal/projectInspector.ts +226 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-effect-free, best-effort simulation over a machine document.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.23.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
|
+
import * as internal from "./internal/machineSimulator.js";
|
|
8
|
+
/**
|
|
9
|
+
* Serializable state of a simulation session.
|
|
10
|
+
*
|
|
11
|
+
* @category schemas
|
|
12
|
+
* @since 0.23.0
|
|
13
|
+
*/
|
|
14
|
+
export const Snapshot = Schema.Struct({
|
|
15
|
+
step: Schema.Natural,
|
|
16
|
+
activePaths: Schema.Array(Schema.String),
|
|
17
|
+
candidateEvents: Schema.Array(Schema.String)
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Runtime behavior deliberately skipped by a best-effort step.
|
|
21
|
+
*
|
|
22
|
+
* @category schemas
|
|
23
|
+
* @since 0.23.0
|
|
24
|
+
*/
|
|
25
|
+
export const Note = Schema.Literals([
|
|
26
|
+
"runtime-effects-skipped",
|
|
27
|
+
"state-updates-skipped",
|
|
28
|
+
"reentry-lifecycles-skipped",
|
|
29
|
+
"automatic-transitions-skipped"
|
|
30
|
+
]);
|
|
31
|
+
const ResultFields = {
|
|
32
|
+
event: Schema.String,
|
|
33
|
+
transitionIds: Schema.Array(Schema.String),
|
|
34
|
+
session: Snapshot
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A topologically deterministic step.
|
|
38
|
+
*
|
|
39
|
+
* @category schemas
|
|
40
|
+
* @since 0.23.0
|
|
41
|
+
*/
|
|
42
|
+
export const Applied = Schema.Struct({
|
|
43
|
+
...ResultFields,
|
|
44
|
+
_tag: Schema.tag("Applied"),
|
|
45
|
+
notes: Schema.Array(Note)
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* An event with no registration in the current active configuration.
|
|
49
|
+
*
|
|
50
|
+
* @category schemas
|
|
51
|
+
* @since 0.23.0
|
|
52
|
+
*/
|
|
53
|
+
export const Blocked = Schema.Struct({
|
|
54
|
+
...ResultFields,
|
|
55
|
+
_tag: Schema.tag("Blocked"),
|
|
56
|
+
reason: Schema.Literal("event-not-enabled")
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* A step whose topology depends on runtime behavior the document cannot safely
|
|
60
|
+
* evaluate.
|
|
61
|
+
*
|
|
62
|
+
* @category schemas
|
|
63
|
+
* @since 0.23.0
|
|
64
|
+
*/
|
|
65
|
+
export const Indeterminate = Schema.Struct({
|
|
66
|
+
...ResultFields,
|
|
67
|
+
_tag: Schema.tag("Indeterminate"),
|
|
68
|
+
reason: Schema.Literals([
|
|
69
|
+
"multiple-transitions",
|
|
70
|
+
"declinable-transition",
|
|
71
|
+
"conditional-branches",
|
|
72
|
+
"history-target",
|
|
73
|
+
"choice-target",
|
|
74
|
+
"missing-target"
|
|
75
|
+
])
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* @category schemas
|
|
79
|
+
* @since 0.23.0
|
|
80
|
+
*/
|
|
81
|
+
export const StepResult = Schema.Union([Applied, Blocked, Indeterminate]);
|
|
82
|
+
/**
|
|
83
|
+
* Starts from the captured snapshot when present, otherwise from the static
|
|
84
|
+
* initial topology.
|
|
85
|
+
*
|
|
86
|
+
* @category constructors
|
|
87
|
+
* @since 0.23.0
|
|
88
|
+
*/
|
|
89
|
+
export const start = internal.start;
|
|
90
|
+
/**
|
|
91
|
+
* Sends an event without running user code. `Applied` means the active topology
|
|
92
|
+
* is statically known; its notes list runtime behavior that was skipped.
|
|
93
|
+
*
|
|
94
|
+
* @category combinators
|
|
95
|
+
* @since 0.23.0
|
|
96
|
+
*/
|
|
97
|
+
export const send = internal.send;
|
|
98
|
+
//# sourceMappingURL=M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;CAC5C,CAAC,CAAA;AAQF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,GAAG,YAAY;IACf,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;QACtB,sBAAsB;QACtB,uBAAuB;QACvB,sBAAsB;QACtB,gBAAgB;QAChB,eAAe;QACf,gBAAgB;KACjB,CAAC;CACH,CAAC,CAAA;AAQF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;AAQzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAA2D,QAAQ,CAAC,KAAK,CAAA;AAE3F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAoD,QAAQ,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery and isolated evaluation of Effect Machine definitions in a project.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.23.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import type * as DevToolsProtocol from "./DevToolsProtocol.js";
|
|
10
|
+
/**
|
|
11
|
+
* A source module containing at least one `.handle(...)` machine definition.
|
|
12
|
+
*
|
|
13
|
+
* @category schemas
|
|
14
|
+
* @since 0.23.0
|
|
15
|
+
*/
|
|
16
|
+
export declare const Candidate: Schema.Struct<{
|
|
17
|
+
readonly file: Schema.String;
|
|
18
|
+
readonly exportNames: Schema.$Array<Schema.String>;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* @category models
|
|
22
|
+
* @since 0.23.0
|
|
23
|
+
*/
|
|
24
|
+
export type Candidate = Schema.Schema.Type<typeof Candidate>;
|
|
25
|
+
/**
|
|
26
|
+
* Options shared by discovery and inspection.
|
|
27
|
+
*
|
|
28
|
+
* Include and exclude entries are glob patterns relative to `root`.
|
|
29
|
+
*
|
|
30
|
+
* @category models
|
|
31
|
+
* @since 0.23.0
|
|
32
|
+
*/
|
|
33
|
+
export interface InspectOptions {
|
|
34
|
+
readonly root: string;
|
|
35
|
+
readonly include?: string | undefined;
|
|
36
|
+
readonly exclude?: ReadonlyArray<string> | undefined;
|
|
37
|
+
readonly revision?: number | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Last-known machine candidates. A syntactically incomplete source file is
|
|
40
|
+
* evaluated with this identity so the registry can retain its document.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
readonly retainedCandidates?: ReadonlyArray<Candidate> | undefined;
|
|
45
|
+
}
|
|
46
|
+
declare const DiscoveryError_base: Schema.Class<DiscoveryError, Schema.Struct<{
|
|
47
|
+
readonly _tag: Schema.tag<"DiscoveryError">;
|
|
48
|
+
readonly message: Schema.String;
|
|
49
|
+
readonly cause: Schema.optional<Schema.Defect>;
|
|
50
|
+
}>, import("effect/Cause").YieldableError>;
|
|
51
|
+
/**
|
|
52
|
+
* A typed failure while reading or parsing the project source tree.
|
|
53
|
+
*
|
|
54
|
+
* @category errors
|
|
55
|
+
* @since 0.23.0
|
|
56
|
+
*/
|
|
57
|
+
export declare class DiscoveryError extends DiscoveryError_base {
|
|
58
|
+
}
|
|
59
|
+
declare const EvaluationError_base: Schema.Class<EvaluationError, Schema.Struct<{
|
|
60
|
+
readonly _tag: Schema.tag<"EvaluationError">;
|
|
61
|
+
readonly message: Schema.String;
|
|
62
|
+
readonly cause: Schema.optional<Schema.Defect>;
|
|
63
|
+
}>, import("effect/Cause").YieldableError>;
|
|
64
|
+
/**
|
|
65
|
+
* A typed failure in the isolated evaluator itself. Failures in individual
|
|
66
|
+
* project modules are returned as `DevToolsProtocol.Failed` values instead.
|
|
67
|
+
*
|
|
68
|
+
* @category errors
|
|
69
|
+
* @since 0.23.0
|
|
70
|
+
*/
|
|
71
|
+
export declare class EvaluationError extends EvaluationError_base {
|
|
72
|
+
}
|
|
73
|
+
declare const ProjectInspector_base: Context.ServiceClass<ProjectInspector, "@typeonce/effect-machine-devtools/ProjectInspector", {
|
|
74
|
+
readonly discover: (options: InspectOptions) => Effect.Effect<ReadonlyArray<Candidate>, DiscoveryError>;
|
|
75
|
+
readonly evaluate: (candidates: ReadonlyArray<Candidate>, options: InspectOptions) => Effect.Effect<ReadonlyArray<DevToolsProtocol.MachineResult>, EvaluationError>;
|
|
76
|
+
readonly inspect: (options: InspectOptions) => Effect.Effect<ReadonlyArray<DevToolsProtocol.MachineResult>, DiscoveryError | EvaluationError>;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* Service for locating and evaluating machine modules.
|
|
80
|
+
*
|
|
81
|
+
* @category services
|
|
82
|
+
* @since 0.23.0
|
|
83
|
+
*/
|
|
84
|
+
export declare class ProjectInspector extends ProjectInspector_base {
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Discovers machine candidates with the configured inspector.
|
|
88
|
+
*
|
|
89
|
+
* @category combinators
|
|
90
|
+
* @since 0.23.0
|
|
91
|
+
*/
|
|
92
|
+
export declare const discover: (options: InspectOptions) => Effect.Effect<ReadonlyArray<Candidate>, DiscoveryError, ProjectInspector>;
|
|
93
|
+
/**
|
|
94
|
+
* Evaluates machine candidates with the configured inspector.
|
|
95
|
+
*
|
|
96
|
+
* @category combinators
|
|
97
|
+
* @since 0.23.0
|
|
98
|
+
*/
|
|
99
|
+
export declare const evaluate: (candidates: ReadonlyArray<Candidate>, options: InspectOptions) => Effect.Effect<ReadonlyArray<DevToolsProtocol.MachineResult>, EvaluationError, ProjectInspector>;
|
|
100
|
+
/**
|
|
101
|
+
* Discovers and evaluates every machine candidate in a project.
|
|
102
|
+
*
|
|
103
|
+
* @category combinators
|
|
104
|
+
* @since 0.23.0
|
|
105
|
+
*/
|
|
106
|
+
export declare const inspect: (options: InspectOptions) => Effect.Effect<ReadonlyArray<DevToolsProtocol.MachineResult>, DiscoveryError | EvaluationError, ProjectInspector>;
|
|
107
|
+
/**
|
|
108
|
+
* Node-backed inspector layer. Each inspection evaluates candidates inside a
|
|
109
|
+
* fresh worker so a broken project module cannot corrupt the long-lived host.
|
|
110
|
+
*
|
|
111
|
+
* @category layers
|
|
112
|
+
* @since 0.23.0
|
|
113
|
+
*/
|
|
114
|
+
export declare const layer: import("effect/Layer").Layer<ProjectInspector, never, never>;
|
|
115
|
+
export {};
|
|
116
|
+
//# sourceMappingURL=ProjectInspector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectInspector.d.ts","sourceRoot":"","sources":["../src/ProjectInspector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAG9D;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;EAGpB,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,kBAAk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CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery and isolated evaluation of Effect Machine definitions in a project.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.23.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import * as internal from "./internal/projectInspector.js";
|
|
10
|
+
/**
|
|
11
|
+
* A source module containing at least one `.handle(...)` machine definition.
|
|
12
|
+
*
|
|
13
|
+
* @category schemas
|
|
14
|
+
* @since 0.23.0
|
|
15
|
+
*/
|
|
16
|
+
export const Candidate = Schema.Struct({
|
|
17
|
+
file: Schema.String,
|
|
18
|
+
exportNames: Schema.Array(Schema.String)
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* A typed failure while reading or parsing the project source tree.
|
|
22
|
+
*
|
|
23
|
+
* @category errors
|
|
24
|
+
* @since 0.23.0
|
|
25
|
+
*/
|
|
26
|
+
export class DiscoveryError extends Schema.Error("@typeonce/effect-machine-devtools/ProjectInspector/DiscoveryError")({
|
|
27
|
+
_tag: Schema.tag("DiscoveryError"),
|
|
28
|
+
message: Schema.String,
|
|
29
|
+
cause: Schema.optional(Schema.Defect())
|
|
30
|
+
}) {
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A typed failure in the isolated evaluator itself. Failures in individual
|
|
34
|
+
* project modules are returned as `DevToolsProtocol.Failed` values instead.
|
|
35
|
+
*
|
|
36
|
+
* @category errors
|
|
37
|
+
* @since 0.23.0
|
|
38
|
+
*/
|
|
39
|
+
export class EvaluationError extends Schema.Error("@typeonce/effect-machine-devtools/ProjectInspector/EvaluationError")({
|
|
40
|
+
_tag: Schema.tag("EvaluationError"),
|
|
41
|
+
message: Schema.String,
|
|
42
|
+
cause: Schema.optional(Schema.Defect())
|
|
43
|
+
}) {
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Service for locating and evaluating machine modules.
|
|
47
|
+
*
|
|
48
|
+
* @category services
|
|
49
|
+
* @since 0.23.0
|
|
50
|
+
*/
|
|
51
|
+
export class ProjectInspector extends Context.Service()("@typeonce/effect-machine-devtools/ProjectInspector") {
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Discovers machine candidates with the configured inspector.
|
|
55
|
+
*
|
|
56
|
+
* @category combinators
|
|
57
|
+
* @since 0.23.0
|
|
58
|
+
*/
|
|
59
|
+
export const discover = (options) => Effect.flatMap(ProjectInspector, (inspector) => inspector.discover(options));
|
|
60
|
+
/**
|
|
61
|
+
* Evaluates machine candidates with the configured inspector.
|
|
62
|
+
*
|
|
63
|
+
* @category combinators
|
|
64
|
+
* @since 0.23.0
|
|
65
|
+
*/
|
|
66
|
+
export const evaluate = (candidates, options) => Effect.flatMap(ProjectInspector, (inspector) => inspector.evaluate(candidates, options));
|
|
67
|
+
/**
|
|
68
|
+
* Discovers and evaluates every machine candidate in a project.
|
|
69
|
+
*
|
|
70
|
+
* @category combinators
|
|
71
|
+
* @since 0.23.0
|
|
72
|
+
*/
|
|
73
|
+
export const inspect = (options) => Effect.flatMap(ProjectInspector, (inspector) => inspector.inspect(options));
|
|
74
|
+
/**
|
|
75
|
+
* Node-backed inspector layer. Each inspection evaluates candidates inside a
|
|
76
|
+
* fresh worker so a broken project module cannot corrupt the long-lived host.
|
|
77
|
+
*
|
|
78
|
+
* @category layers
|
|
79
|
+
* @since 0.23.0
|
|
80
|
+
*/
|
|
81
|
+
export const layer = internal.layer({ ProjectInspector, DiscoveryError, EvaluationError });
|
|
82
|
+
//# sourceMappingURL=ProjectInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectInspector.js","sourceRoot":"","sources":["../src/ProjectInspector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM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OAAuB,EAC0E,EAAE,CACnG,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAA;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,OAAuB,EAI7C,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;AAEhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAA"}
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
|
|
3
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as Command from "effect/unstable/cli/Command";
|
|
7
|
+
import * as Flag from "effect/unstable/cli/Flag";
|
|
8
|
+
import PackageJson from "../package.json" with { type: "json" };
|
|
9
|
+
import * as DevServer from "./DevServer.js";
|
|
10
|
+
import * as MachineRegistry from "./MachineRegistry.js";
|
|
11
|
+
import * as ProjectInspector from "./ProjectInspector.js";
|
|
12
|
+
const root = Flag.directory("root", { mustExist: true }).pipe(Flag.withDescription("Project root to inspect"), Flag.withDefault(process.cwd()));
|
|
13
|
+
const include = Flag.string("include").pipe(Flag.withDescription("Machine source glob relative to the project root"), Flag.withDefault("**/src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"));
|
|
14
|
+
const host = Flag.string("host").pipe(Flag.withDescription("Host for the local visualizer"), Flag.withDefault("127.0.0.1"));
|
|
15
|
+
const port = Flag.integer("port").pipe(Flag.withDescription("Port for the local visualizer"), Flag.withDefault(5173));
|
|
16
|
+
const open = Flag.boolean("open").pipe(Flag.withDescription("Open the visualizer in the default browser"), Flag.withDefault(false));
|
|
17
|
+
const watchPolling = Flag.boolean("watch-polling").pipe(Flag.withDescription("Use polling instead of native file-system events"), Flag.withDefault(false));
|
|
18
|
+
const cli = Command.make("effect-machine", { root, include, host, port, open, watchPolling }).pipe(Command.withDescription("Inspect Effect Machine definitions in a live local visualizer"), Command.withHandler(({ host, include, open, port, root, watchPolling }) => {
|
|
19
|
+
const RegistryLayer = MachineRegistry.layer({ root, include }).pipe(Layer.provideMerge(ProjectInspector.layer));
|
|
20
|
+
return DevServer.run({ root, host, port, open, watchPolling }).pipe(Effect.provide(RegistryLayer));
|
|
21
|
+
}));
|
|
22
|
+
Command.run(cli, { version: PackageJson.version }).pipe(Effect.provide(NodeServices.layer), NodeRuntime.runMain);
|
|
23
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAA;AAChE,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAA;AAClE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAA;AAChD,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAC/D,OAAO,KAAK,SAAS,MAAM,gBAA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AAgB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,IAAI,CAChG,OAAO,CAAC,eAAe,CAAC,+DAA+D,CAAC,EACxF,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE;IACxE,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CACjE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAC3C,CAAA;IACD,OAAO,SAAS,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAA;AACpG,CAAC,CAAC,CACH,CAAA;AAED,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CACrD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,WAAW,CAAC,OAAO,CACpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:#e8eaed;font-synthesis:none;text-rendering:optimizelegibility;--surface:#0f1114;--surface-raised:#14171b;--line:#292d34;--line-soft:#20242a;--muted:#8e949e;--accent:#75a7ff;--accent-bg:#4b7dff2e;--orange:#f0a35b;background:#0b0c0e;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#app{min-width:320px;min-height:100%;margin:0}body{background:#0b0c0e}.devtools-shell{grid-template-columns:220px minmax(0,1fr);min-height:100vh;display:grid}.machine-index{border-right:1px solid var(--line);background:#0d0f12;min-width:0;height:100vh;padding:8px 0;overflow:auto}.machine-row{color:#c9cdd2;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:0;grid-template-columns:8px minmax(0,1fr);gap:3px 8px;width:100%;padding:10px 12px;display:grid}.machine-row:hover,.machine-row:focus-visible{color:#fff;background:#171a1f;outline:none}.machine-row.is-selected{color:#fff;background:#4b7dff2e}.machine-row-status{background:#646b75;border-radius:50%;grid-row:1;align-self:center;width:6px;height:6px}.machine-row-status.status-ready{background:#67c894}.machine-row-status.status-partial{background:var(--orange)}.machine-row-status.status-error{background:#df6964}.machine-row-label,.machine-row-file{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.machine-row-label{grid-column:2;font:600 12px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.machine-row-file{color:#727983;grid-column:2;font:10px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.machine-index-empty{color:#646b75;padding:12px;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.machine-view{min-width:0}.registry-empty,.connection-failure{color:#7f8690;align-content:start;gap:7px;min-height:100vh;padding:28px;font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;display:grid}.registry-empty strong{color:#d4d7dc;font-size:13px}.connection-failure{color:#e4b4b1}button{font:inherit}.app-shell,.workspace{min-height:100vh}.workspace{grid-template-columns:minmax(420px,1fr) minmax(380px,46%);height:100vh;display:grid}.tree-panel{border-right:1px solid var(--line);flex-direction:column;min-width:0;height:100vh;display:flex;overflow:hidden}.diagnostics{border-bottom:1px solid var(--line);background:#121418}.diagnostic{color:#aeb4bd;flex-wrap:wrap;align-items:center;gap:8px;min-height:36px;padding:8px 16px;font-size:11px;display:flex}.diagnostic+.diagnostic{border-top:1px solid var(--line-soft)}.badge-warning{color:#e9c89f;background:#f0a35b21}.badge-error{color:#f2aaa7;background:#e0595424}.toolbar{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:2px;min-height:46px;padding:7px 16px;display:flex}.toolbar-actions,.runtime-summary{align-items:center;display:flex}.toolbar-actions{gap:2px}.runtime-summary{color:#7f8690;gap:7px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.runtime-dot{background:#555c65;border-radius:50%;width:6px;height:6px}.runtime-dot.has-snapshot{background:var(--accent)}.toolbar-button{color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:4px;padding:6px 9px;font-size:12px}.toolbar-button:not(:disabled):hover,.toolbar-button:not(:disabled):focus-visible{color:#fff;background:#1b1e23;outline:none}.toolbar-button:disabled{color:#50545c;cursor:default}.topology-tree{flex:1;min-height:0;padding:23px 18px 34px;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:auto}.machine-id{color:#fff;margin:0 8px 16px;font-weight:700}.enabled-events{border-bottom:1px solid var(--line-soft);flex-wrap:wrap;align-items:center;gap:6px;min-height:32px;margin:0 8px 14px;padding-bottom:13px;display:flex}.enabled-events-label,.enabled-events-empty{color:#6f7680;font-size:10px}.enabled-events-label{text-transform:uppercase;margin-right:3px}.simulation-feedback{color:#7f99c4;margin:-5px 8px 14px;font:10px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.simulation-feedback[data-status=indeterminate]{color:#d9ae7e}.simulation-feedback[data-status=blocked]{color:#d58d89}.enabled-events[hidden],.simulation-feedback[hidden]{display:none}.event-button{color:#aeb5bf;cursor:pointer;background:#1b1f25;border:0;border-radius:3px;padding:4px 7px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.event-button:hover,.event-button:focus-visible,.event-button.is-selected{color:#d9e6ff;background:#4b7dff38;outline:none}.topology-node{background:0 0}.topology-empty{color:#7f8690;gap:7px;max-width:420px;margin:26px 8px;font:12px/1.6 Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;display:grid}.topology-empty strong{color:#d4d7dc;font:600 13px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.topology-node.is-selected{background:var(--accent-bg)}.state-row{width:100%;min-height:38px;padding:6px 8px 6px calc(8px + var(--depth) * 22px);color:#d7d9dc;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;background:0 0;border:0;grid-template-columns:14px 10px minmax(90px,auto) 1fr;align-items:center;gap:8px;display:grid}.state-row:hover,.state-row:focus-visible{color:#fff;background:#1b1e23;outline:none}.state-row[aria-selected=true],.topology-node.is-selected>.state-row{color:#fff}.topology-node.is-related-target>.state-row{background:#4b7dff17}.topology-node.is-related-source>.state-row{background:#ac68e014}.topology-node.is-related-update>.state-row{background:#f0a35b14}.state-disclosure{color:#737a84;font-size:11px}.state-status{border:1px solid #686f78;border-radius:50%;width:7px;height:7px}.state-status.is-active{border-color:var(--accent);background:var(--accent);box-shadow:0 0 0 3px #75a7ff1a}.state-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.state-markers,.inspector-eyebrow,.card-title,.card-flags,.branch-main{align-items:center;gap:6px;display:flex}.state-markers{justify-self:end}.badge{color:#a8afb8;letter-spacing:.02em;white-space:nowrap;background:#20242a;border-radius:3px;align-items:center;min-height:18px;padding:2px 6px;font:600 10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;display:inline-flex}.badge-active{color:#b9d2ff;background:#4b7dff38}.badge-initial{color:#e9c89f;background:#f0a35b21}.badge-trigger{color:#b9d2ff;background:#4b7dff29}.badge-condition{color:#d9b8ef;background:#ac68e026}.badge-activity{color:#a8ddc4;background:#4eb58324}.badge-count{color:#858c96;background:0 0}.inspector{background:var(--surface);min-width:0;height:100vh;padding:28px;overflow:auto}.failure-shell{color:#d6d8dc;background:#0b0c0e;align-content:start;gap:12px;min-height:100vh;padding:32px;display:grid}.failure-kind{color:#f2aaa7;letter-spacing:.08em;text-transform:uppercase;font:600 10px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.failure-shell h1{margin:0;font:600 18px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.failure-shell pre{color:#e4b4b1;white-space:pre-wrap;background:#151112;border-left:2px solid #a54743;max-width:900px;margin:4px 0 0;padding:14px 16px;font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:auto}.failure-shell p{color:#7f8690;margin:0;font-size:12px}.inspector-empty{max-width:420px;color:var(--muted)}.inspector-empty-kind{color:var(--orange);letter-spacing:.08em;text-transform:uppercase;font:600 10px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.inspector-empty h2,.inspector-header h2{color:#f1f2f4;overflow-wrap:anywhere;margin:9px 0 0;font:600 18px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.inspector-empty p,.section-empty,.empty-inline{color:var(--muted);font-size:12px;line-height:1.6}.inspector-header{border-bottom:1px solid var(--line);padding-bottom:24px}.state-annotations{margin-top:18px}.state-annotations p{color:#aeb4bd;margin:7px 0 0;font-size:12px;line-height:1.6}.state-annotations .state-documentation{color:#7f8690;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.breadcrumbs{flex-wrap:wrap;align-items:center;gap:5px;min-width:0;margin-bottom:16px;display:flex}.breadcrumb-separator{color:#555c65}.state-link{color:#9bbfff;overflow-wrap:anywhere;text-align:left;cursor:pointer;background:0 0;border:0;max-width:100%;padding:0;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.state-link:hover,.state-link:focus-visible{color:#d5e4ff;outline:none;text-decoration:underline}.metadata{grid-template-columns:minmax(74px,auto) minmax(0,1fr);gap:8px 16px;margin:20px 0 0;font-size:11px;display:grid}.metadata dt{color:#727983}.metadata dd{color:#d2d5da;overflow-wrap:anywhere;min-width:0;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.inspector-section{margin-top:28px}.section-heading{justify-content:space-between;align-items:center;margin-bottom:11px;display:flex}.section-heading h3{color:#c9cdd2;margin:0;font-size:12px;font-weight:650}.section-count{color:#737a84;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.inspection-card{border:1px solid var(--line-soft);background:var(--surface-raised);margin-top:8px}.card-header{justify-content:space-between;align-items:center;gap:12px;min-height:42px;padding:10px 12px;display:flex}.transition-source{color:#727983;align-items:baseline;gap:12px;padding:0 12px 10px;font-size:11px;display:flex}.card-title{min-width:0}.card-title strong{color:#e2e4e7;overflow-wrap:anywhere;font:600 12px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.branch-list{border-top:1px solid var(--line-soft)}.branch-row{padding:11px 12px 13px}.branch-row+.branch-row{border-top:1px solid var(--line-soft)}.branch-main{min-width:0}.branch-arrow{color:var(--accent)}.branch-target{color:#d7d9dc;overflow-wrap:anywhere;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.branch-row .metadata,.activity-card .metadata,.incoming-card .metadata{margin-top:10px}.incoming-card{padding-bottom:12px}.incoming-card .metadata{padding:0 12px}.branch-updates{grid-template-columns:minmax(74px,auto) minmax(0,1fr);gap:8px 16px;margin-top:9px;font-size:11px;display:grid}.branch-updates-label{color:#727983}.branch-updates .state-link+.state-link{grid-column:2}.activity-card{padding-bottom:12px}.activity-card .metadata{padding:0 12px}@media (width<=900px){.devtools-shell{grid-template-columns:1fr}.machine-index{border-right:0;border-bottom:1px solid var(--line);height:auto;min-height:54px;padding:0;display:flex;overflow-x:auto}.machine-row{flex:none;width:min(220px,70vw)}.workspace{grid-template-columns:1fr;height:auto}.tree-panel{border-right:0;border-bottom:1px solid var(--line);height:58vh;min-height:58vh}.inspector{height:auto;min-height:42vh}}@media (width<=600px){.toolbar{align-items:flex-start;padding-inline:10px}.toolbar-actions{flex-wrap:wrap;justify-content:flex-end}.runtime-summary{padding-top:8px}.topology-tree,.inspector{padding-inline:14px}.state-markers .badge-count{display:none}}@media (prefers-reduced-motion:no-preference){.state-row,.toolbar-button{transition:color .12s,background-color .12s}}
|