process-graph 1.3.0 → 1.4.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/README.md +21 -19
- package/dist/bin.js +2 -2
- package/dist/cli.d.ts +54 -74
- package/dist/cli.js +4 -3
- package/dist/{dist-BI01yxFA.js → dist-C8zDuW-y.js} +254 -469
- package/dist/dist-DipyhCvb.js +4 -0
- package/dist/graphql-3DSUSUvL.d.ts +17 -0
- package/dist/{index-D06bcdfw.d.ts → index-4f4PVH7K.d.ts} +23 -2
- package/dist/index-Bb90VKMc.d.ts +71 -0
- package/dist/{index-hri2a13-.d.ts → index-Cp5selgs.d.ts} +2 -1
- package/dist/{graphql-BE7xm5dB.d.ts → index-Cs1CWlEg.d.ts} +1 -15
- package/dist/index-DoMIav3D.d.ts +118 -0
- package/dist/{index-9Au8pAmP.d.ts → index-LWdwpjZG.d.ts} +2 -21
- package/dist/{index-BC4tmAuQ.d.ts → index-RwwlDYZ7.d.ts} +1 -1
- package/dist/index.d.ts +23 -2
- package/dist/index.js +3 -2
- package/dist/layout.d.ts +1 -1
- package/dist/project-CP_ye6KI.js +27 -0
- package/dist/react-flow.d.ts +3 -3
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -24
- package/dist/schema-DVAttrJg.js +126 -0
- package/dist/source/github/node.d.ts +1 -1
- package/dist/source/github.d.ts +3 -2
- package/dist/source/github.js +38 -1
- package/dist/{source-D51N7K3A.js → source-lTKshktI.js} +2 -161
- package/dist/sync-CkaJO3OQ.js +213 -0
- package/dist/sync.d.ts +26 -0
- package/dist/sync.js +16 -0
- package/dist/ui.d.ts +2 -2
- package/dist/{version-Dagrkvwt.js → version-DMNBcTZ-.js} +1 -1
- package/dist/view-DTeNUhGG.js +392 -0
- package/package.json +13 -7
- package/dist/dist-81kTKnMq.js +0 -3
- package/dist/parse-C1Q1zsGt.js +0 -41
package/README.md
CHANGED
|
@@ -40,24 +40,25 @@ deriveStatuses(model, { submit: "done" }, facts); // Map { "submit" => "done", "
|
|
|
40
40
|
|
|
41
41
|
The package is built from the repository's internal packages, which are bundled into it and not published on their own; each internal package's README documents its functions and rules. Each subpath loads only the code it reaches.
|
|
42
42
|
|
|
43
|
-
| Import | What it is
|
|
44
|
-
| ------------------------------------ |
|
|
45
|
-
| `process-graph` | The model (`defineModel`, `parseModel`, `validate`), its projections and inverses, and the reasoning over a run (statuses, ready set, blocked-by, impact, what-if, critical path).
|
|
46
|
-
| `process-graph/layout` | `layout`: positions for a projected flowchart, swimlane or state machine, in the model's `views` shape, through elkjs.
|
|
47
|
-
| `process-graph/source/github` | The `GraphSource` port (contract, schemas, router, pagination and an in-memory fake) and the GitHub issues adapter, `createGitHubIssuesSource`.
|
|
48
|
-
| `process-graph/source/github/node` | `githubTokenFromEnvironment`: a token port reading `GITHUB_TOKEN` or the GitHub CLI's token.
|
|
49
|
-
| `process-graph/store` | The `GraphStore` port (contract, schemas, router, change feed, structural queries and an in-memory fake) and the SQLite store over any Drizzle SQLite database.
|
|
50
|
-
| `process-graph/store/node` | `openNodeGraphStore`: the SQLite store on Node's built-in `node:sqlite`; `prepareDataFile`: makes its data file and directory private before it opens.
|
|
51
|
-
| `process-graph/store/wasm` | `connectGraphStore`: connects a page to the store a dedicated worker serves.
|
|
52
|
-
| `process-graph/store/wasm/worker` | `serveGraphStoreInWorker`: serves the store from a dedicated worker on SQLite wasm and OPFS, shared between tabs with no special headers.
|
|
53
|
-
| `process-graph/
|
|
54
|
-
| `process-graph/
|
|
55
|
-
| `process-graph/ui
|
|
56
|
-
| `process-graph/ui/
|
|
57
|
-
| `process-graph/
|
|
58
|
-
| `process-graph/react-flow
|
|
59
|
-
| `process-graph/
|
|
60
|
-
| `process-graph/
|
|
43
|
+
| Import | What it is | Runs in |
|
|
44
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
|
|
45
|
+
| `process-graph` | The model (`defineModel`, `parseModel`, `validate`), its projections and inverses, each projected view as Mermaid, DOT or JSON text (`viewText`), and the reasoning over a run (statuses, ready set, blocked-by, impact, what-if, critical path). | Browser, Worker, Node |
|
|
46
|
+
| `process-graph/layout` | `layout`: positions for a projected flowchart, swimlane or state machine, in the model's `views` shape, through elkjs. | Browser, Worker, Node |
|
|
47
|
+
| `process-graph/source/github` | The `GraphSource` port (contract, schemas, router, pagination and an in-memory fake) and the GitHub issues adapter, `createGitHubIssuesSource`. | Browser, Worker, Node |
|
|
48
|
+
| `process-graph/source/github/node` | `githubTokenFromEnvironment`: a token port reading `GITHUB_TOKEN` or the GitHub CLI's token. | Node |
|
|
49
|
+
| `process-graph/store` | The `GraphStore` port (contract, schemas, router, change feed, structural queries and an in-memory fake) and the SQLite store over any Drizzle SQLite database. | Browser, Worker, Node |
|
|
50
|
+
| `process-graph/store/node` | `openNodeGraphStore`: the SQLite store on Node's built-in `node:sqlite`; `prepareDataFile`: makes its data file and directory private before it opens. | Node |
|
|
51
|
+
| `process-graph/store/wasm` | `connectGraphStore`: connects a page to the store a dedicated worker serves. | Browser |
|
|
52
|
+
| `process-graph/store/wasm/worker` | `serveGraphStoreInWorker`: serves the store from a dedicated worker on SQLite wasm and OPFS, shared between tabs with no special headers. | Dedicated worker |
|
|
53
|
+
| `process-graph/sync` | `syncScopes`: syncs sources into a store page by page, relations included, resumable from a checkpoint and narrowed by a typed filter. | Browser, Worker, Node |
|
|
54
|
+
| `process-graph/react` | Headless React hooks and unstyled components: follow a stored model, derive its run, project, filter and select. | Browser |
|
|
55
|
+
| `process-graph/ui` | Styled components over `process-graph/react`, the SVG sequence diagram and the theme contract with light and dark themes. | Browser |
|
|
56
|
+
| `process-graph/ui/theme` | The theme contract `vars`, `lightTheme`, `darkTheme`, `lightValues` and `darkValues` without the components, for a Vanilla Extract stylesheet that themes `process-graph/ui` without loading React. | Any |
|
|
57
|
+
| `process-graph/ui/style.css` | The compiled styles for `process-graph/ui`. | Browser |
|
|
58
|
+
| `process-graph/react-flow` | React Flow views of a flowchart, swimlane or state machine, laid out by `process-graph/layout`. | Browser |
|
|
59
|
+
| `process-graph/react-flow/style.css` | The compiled styles for `process-graph/react-flow`, React Flow's own included. | Browser |
|
|
60
|
+
| `process-graph/cli` | The command line as a library: `runCli` over injected ports, `nodePorts` for a Node process, each command's operation returning plain data, and `version`, this package's own. | Node |
|
|
61
|
+
| `process-graph/package.json` | The package's manifest, for reading its version or anything else it declares. | Any |
|
|
61
62
|
|
|
62
63
|
`zod` and `trilean`, which the root entry needs, are dependencies; a project with an install age gate exempts `trilean` and `trilean-regex` beside `process-graph` (see [Install](../../../README.md#install)). The libraries only other subpaths need are optional peer dependencies, so installing `process-graph` for its root entry pulls in nothing else; install the peers of each subpath you import beside it:
|
|
63
64
|
|
|
@@ -69,6 +70,7 @@ The package is built from the repository's internal packages, which are bundled
|
|
|
69
70
|
| `store/node` | `drizzle-orm` |
|
|
70
71
|
| `store/wasm` | `@orpc/client` |
|
|
71
72
|
| `store/wasm/worker` | `@orpc/contract`, `@orpc/server`, `drizzle-orm`, `@sqlite.org/sqlite-wasm` |
|
|
73
|
+
| `sync` | `@orpc/client` |
|
|
72
74
|
| `react` | `react` |
|
|
73
75
|
| `ui` | `react`, `@vanilla-extract/recipes`, `@vanilla-extract/css` (types) |
|
|
74
76
|
| `ui/theme` | `@vanilla-extract/css` (types) |
|
|
@@ -120,7 +122,7 @@ Run without them, the bin starts nothing: it names the missing peers and the com
|
|
|
120
122
|
|
|
121
123
|
## What is exported, and under which name
|
|
122
124
|
|
|
123
|
-
The root entry exports the model, projection and domain layers flat, under their own names, and the DAG layer as the namespace `dag`, in its entirety: `dag.buildDag`, `dag.topologicalLayers`, `dag.criticalPath`, `dag.CycleError` and the rest. The DAG layer is namespaced because its `criticalPath` has the same name as the domain's, which answers a different question (the heaviest chain through the work still ahead of a run, not through a bare node set). The whole layer is namespaced rather than only the colliding name, so a name added to a layer later cannot start colliding silently.
|
|
125
|
+
The root entry exports the model, projection, export and domain layers flat, under their own names, and the DAG layer as the namespace `dag`, in its entirety: `dag.buildDag`, `dag.topologicalLayers`, `dag.criticalPath`, `dag.CycleError` and the rest. The DAG layer is namespaced because its `criticalPath` has the same name as the domain's, which answers a different question (the heaviest chain through the work still ahead of a run, not through a bare node set). The whole layer is namespaced rather than only the colliding name, so a name added to a layer later cannot start colliding silently.
|
|
124
126
|
|
|
125
127
|
- A name is never shadowed. Two layers exporting the same name on one entry point is a compile error, and the unit tests compare each entry point's runtime exports with the layers it carries.
|
|
126
128
|
- Types follow the same rule as values: a model, projection or domain type is a flat import, a DAG type is `dag.Dag` and so on.
|
package/dist/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as exitCodes } from "./exit-codes-0ultCqdS.js";
|
|
3
|
-
import { t as version } from "./version-
|
|
3
|
+
import { t as version } from "./version-DMNBcTZ-.js";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/missing-peers.ts
|
|
6
6
|
/**
|
|
@@ -84,7 +84,7 @@ if (missing.length > 0) {
|
|
|
84
84
|
process.stderr.write(missingPeersMessage(missing, declaredPeers(), process.env.npm_config_user_agent));
|
|
85
85
|
process.exitCode = exitCodes.missingPeers;
|
|
86
86
|
} else {
|
|
87
|
-
const { runProcess } = await import("./dist-
|
|
87
|
+
const { runProcess } = await import("./dist-DipyhCvb.js");
|
|
88
88
|
process.exitCode = await runProcess({
|
|
89
89
|
name: "process-graph",
|
|
90
90
|
version
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { A as Facts, B as Status, _ as StatusRule, k as FactRecord, m as IncomingBasis, p as ArtefactBasis } from "./index-D4CnOhNf.js";
|
|
2
|
-
import { A as Transition, C as EventDef, D as Participant, I as OverlayStatus,
|
|
3
|
-
import {
|
|
2
|
+
import { A as Transition, C as EventDef, D as Participant, I as OverlayStatus, S as Element, _ as Model, o as Overlay, q as OpenIds, x as ArtefactDef } from "./index-Dvz_I_uQ.js";
|
|
3
|
+
import { P as SyncFilter, b as Gap, h as GraphSourceClient } from "./index-Cs1CWlEg.js";
|
|
4
4
|
import { ut as GraphStoreClient } from "./index-CR8xUK3S.js";
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
5
|
+
import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-3DSUSUvL.js";
|
|
6
|
+
import "./index-Cp5selgs.js";
|
|
7
|
+
import { F as Handoff, N as Flowchart, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-4f4PVH7K.js";
|
|
8
|
+
import { n as SourceLookup } from "./index-DoMIav3D.js";
|
|
9
|
+
import { a as flowchartToMermaid, c as swimlaneToMermaid, i as swimlaneToDot, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot } from "./index-Bb90VKMc.js";
|
|
7
10
|
import { ComputedValue } from "trilean";
|
|
8
11
|
//#region ../graph-cli/dist/exit-codes.d.ts
|
|
9
12
|
/**
|
|
@@ -263,6 +266,22 @@ interface WhyResult {
|
|
|
263
266
|
/** The element, then every unfinished need reached from it, in model order. */
|
|
264
267
|
readonly chain: readonly WhyLink[];
|
|
265
268
|
}
|
|
269
|
+
/** An element of a hierarchy walk, with how many `child-of` relations away it is. */
|
|
270
|
+
interface HierarchyLink extends ElementSummary {
|
|
271
|
+
readonly distance: number;
|
|
272
|
+
}
|
|
273
|
+
/** An element's sub-tasks: the elements related to it by `child-of`. */
|
|
274
|
+
interface ChildrenResult {
|
|
275
|
+
readonly element: ElementSummary;
|
|
276
|
+
/** Its direct children, in model order. */
|
|
277
|
+
readonly children: readonly ElementSummary[];
|
|
278
|
+
}
|
|
279
|
+
/** What an element is a sub-task of, up to the top of its hierarchy. */
|
|
280
|
+
interface AncestorsResult {
|
|
281
|
+
readonly element: ElementSummary;
|
|
282
|
+
/** Its parent, its parent's parent and so on, nearest first, each once with the fewest relations it takes to reach it. */
|
|
283
|
+
readonly ancestors: readonly HierarchyLink[];
|
|
284
|
+
}
|
|
266
285
|
/**
|
|
267
286
|
* The elements that are ready: not done, with every live need done.
|
|
268
287
|
* @param session - The store, model and facts.
|
|
@@ -301,13 +320,27 @@ export declare const handoffsOf: (session: GraphSession) => Promise<HandoffsResu
|
|
|
301
320
|
* @param id - The element asked about.
|
|
302
321
|
*/
|
|
303
322
|
export declare const why: (session: GraphSession, id: string) => Promise<WhyResult>;
|
|
323
|
+
/**
|
|
324
|
+
* An element's direct sub-tasks, from the `child-of` relations a sync keeps, as the store's hierarchy query answers.
|
|
325
|
+
* @param session - The store and model.
|
|
326
|
+
* @param id - The element asked about.
|
|
327
|
+
* @throws CliError with `notFound` when the model or the element does not exist.
|
|
328
|
+
*/
|
|
329
|
+
export declare const children: (session: GraphSession, id: string) => Promise<ChildrenResult>;
|
|
330
|
+
/**
|
|
331
|
+
* The elements an element is a sub-task of, nearest first, from the `child-of` relations a sync keeps, as the store's hierarchy query answers.
|
|
332
|
+
* @param session - The store and model.
|
|
333
|
+
* @param id - The element asked about.
|
|
334
|
+
* @throws CliError with `notFound` when the model or the element does not exist.
|
|
335
|
+
*/
|
|
336
|
+
export declare const ancestors: (session: GraphSession, id: string) => Promise<AncestorsResult>;
|
|
304
337
|
//#endregion
|
|
305
338
|
//#region ../graph-cli/dist/show.d.ts
|
|
306
339
|
/** The views `show` draws, as named on the command line. */
|
|
307
340
|
export declare const viewNames: readonly ["flowchart", "swimlane", "state", "sequence"];
|
|
308
341
|
/** One of the views `show` draws. */
|
|
309
342
|
type ViewName = (typeof viewNames)[number];
|
|
310
|
-
/** The formats `show` writes. */
|
|
343
|
+
/** The formats `show` writes, graph-export's, with JSON named first. */
|
|
311
344
|
export declare const formatNames: readonly ["json", "mermaid", "dot"];
|
|
312
345
|
/** One of the formats `show` writes. */
|
|
313
346
|
type FormatName = (typeof formatNames)[number];
|
|
@@ -348,13 +381,13 @@ type ShowResult = ProjectedView & {
|
|
|
348
381
|
*/
|
|
349
382
|
export declare const project: (model: Model<OpenIds>, request: Pick<ShowRequest, "view" | "subject" | "scenario">) => ProjectedView;
|
|
350
383
|
/**
|
|
351
|
-
* Writes a projected view as Mermaid or DOT source.
|
|
384
|
+
* Writes a projected view as Mermaid or DOT source, or as JSON, through graph-export's `viewText`, the writer the web app's downloads use too.
|
|
352
385
|
* @param model - The model, for participant labels.
|
|
353
386
|
* @param projected - The view.
|
|
354
|
-
* @param format - `mermaid` or `
|
|
355
|
-
* @returns The
|
|
387
|
+
* @param format - `mermaid`, `dot` or `json`.
|
|
388
|
+
* @returns The text.
|
|
356
389
|
*/
|
|
357
|
-
export declare const emit: (model: Model<OpenIds>, projected: ProjectedView, format:
|
|
390
|
+
export declare const emit: (model: Model<OpenIds>, projected: ProjectedView, format: FormatName) => string;
|
|
358
391
|
/**
|
|
359
392
|
* Draws the session's model as a view in a format.
|
|
360
393
|
* @param session - The store and model.
|
|
@@ -480,20 +513,20 @@ export declare const validateStored: (session: GraphSession) => Promise<Validate
|
|
|
480
513
|
export declare const validateDocument: (text: string) => ValidateResult;
|
|
481
514
|
//#endregion
|
|
482
515
|
//#region ../graph-cli/dist/sync.d.ts
|
|
483
|
-
/** Finds the source that serves scopes with an identifier prefix, such as `github`. */
|
|
484
|
-
type SourceLookup = (prefix: string) => GraphSourceClient | undefined;
|
|
485
516
|
/** What to sync. */
|
|
486
517
|
interface SyncRequest {
|
|
487
518
|
/** Source-qualified scope identifiers, such as `github:owner` or `github:owner/repo`, read in order. */
|
|
488
519
|
readonly scopes: readonly string[];
|
|
489
|
-
/** A cursor from an interrupted sync: the first source's sync continues after it. */
|
|
520
|
+
/** A cursor from an interrupted sync: the first source's sync continues after it. It is valid only with the filter it was issued under. */
|
|
490
521
|
readonly after?: string;
|
|
522
|
+
/** Narrows and orders what each scope lists, on the source's side. */
|
|
523
|
+
readonly filter?: SyncFilter;
|
|
491
524
|
}
|
|
492
525
|
/** Where a sync a source interrupted carries on, as data a host acts on; the command line renders it as the commands to run. */
|
|
493
526
|
interface SyncInterruption {
|
|
494
|
-
/** The request that continues the failing source: its scopes, after the cursor of the last page read from it, or from the start when none was read. */
|
|
527
|
+
/** The request that continues the failing source: its scopes and the sync's filter, after the cursor of the last page read from it, or from the start when none was read. */
|
|
495
528
|
readonly resume: SyncRequest;
|
|
496
|
-
/** The scopes of the sources after the failing one, which were not read; sync them afresh once `resume` has finished. */
|
|
529
|
+
/** The scopes of the sources after the failing one, which were not read; sync them afresh, under the same filter, once `resume` has finished. */
|
|
497
530
|
readonly remaining: readonly string[];
|
|
498
531
|
/** Whether pages read before the failure were written to the model. */
|
|
499
532
|
readonly saved: boolean;
|
|
@@ -516,83 +549,30 @@ export declare class SyncInterruptedError extends CliError implements SyncInterr
|
|
|
516
549
|
/** What a sync wrote. */
|
|
517
550
|
interface SyncResult {
|
|
518
551
|
readonly modelId: string;
|
|
519
|
-
/** The revision the write took. */
|
|
552
|
+
/** The revision the last write took. */
|
|
520
553
|
readonly revision: number;
|
|
521
|
-
/** The participants, activities and
|
|
554
|
+
/** The participants, activities, transitions and relations written, each counted once. */
|
|
522
555
|
readonly participants: number;
|
|
523
556
|
readonly activities: number;
|
|
524
557
|
readonly transitions: number;
|
|
558
|
+
readonly relations: number;
|
|
525
559
|
/** The parts of the scope the sources could not read, in the order they were met. */
|
|
526
560
|
readonly gaps: readonly Gap[];
|
|
527
561
|
}
|
|
528
562
|
/**
|
|
529
|
-
* Reads every page of the scopes from their sources and merges
|
|
563
|
+
* Reads every page of the scopes from their sources and merges each into the session's model as it is read, creating the model when the store has none: participants, bound activities, transitions, relations (sub-issues, assignees, repository membership) and run state. Records already in the model are replaced by identifier and the rest are kept, so syncing again refreshes what changed.
|
|
530
564
|
*
|
|
531
|
-
* When a source fails part way, the pages read before the failure are
|
|
565
|
+
* When a source fails part way, the pages read before the failure are already written, and the error carries where to carry on: the request that resumes the failing source after the cursor of its last page read, and the scopes of the sources not reached.
|
|
532
566
|
* @param session - The store and model.
|
|
533
567
|
* @param sources - The source for each identifier prefix.
|
|
534
|
-
* @param request - The scopes,
|
|
568
|
+
* @param request - The scopes, a cursor to resume after, and a filter.
|
|
535
569
|
* @returns What was written, and the gaps the sources reported.
|
|
536
570
|
* @throws CliError with `usage` for a scope with no source prefix, a prefix no source serves, or `after` with scopes of more than one source; and SyncInterruptedError, with the source's failure and where to carry on, when a source fails part way.
|
|
537
571
|
*/
|
|
538
572
|
export declare const sync: (session: GraphSession, sources: SourceLookup, request: SyncRequest) => Promise<SyncResult>;
|
|
539
573
|
//#endregion
|
|
540
|
-
//#region ../graph-cli/dist/emit/mermaid.d.ts
|
|
541
|
-
/**
|
|
542
|
-
* A flowchart as a Mermaid `flowchart`, top to bottom. Nodes are declared in the view's order, then edges, each with its guard as the edge label.
|
|
543
|
-
* @param view - The projected flowchart.
|
|
544
|
-
* @returns Mermaid source, ending with a line break.
|
|
545
|
-
*/
|
|
546
|
-
export declare const flowchartToMermaid: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
547
|
-
/**
|
|
548
|
-
* A swimlane as a Mermaid `flowchart`, left to right, with one subgraph per lane in the view's lane order (an empty lane is an empty subgraph, so it stays visible) and nodes with no actor outside every lane. Hand-offs, the edges that change lane, are drawn thick.
|
|
549
|
-
* @param view - The projected swimlane.
|
|
550
|
-
* @returns Mermaid source, ending with a line break.
|
|
551
|
-
*/
|
|
552
|
-
export declare const swimlaneToMermaid: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
553
|
-
/**
|
|
554
|
-
* A state machine as a Mermaid `stateDiagram-v2`. Initial and final pseudo-states are Mermaid's `[*]`; every other state is declared with its label. Each transition carries its event, guard and effect.
|
|
555
|
-
* @param view - The projected state machine.
|
|
556
|
-
* @returns Mermaid source, ending with a line break.
|
|
557
|
-
*/
|
|
558
|
-
export declare const stateMachineToMermaid: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
559
|
-
/**
|
|
560
|
-
* A sequence diagram as a Mermaid `sequenceDiagram`. Lifelines are declared in order of first appearance, labelled through `participantLabel`; messages follow in scenario order, wrapped in the fragments the projection drew (`alt` operands separated by `else`, `par` operands by `and`), each operand headed by its guard.
|
|
561
|
-
* @param view - The projected sequence diagram.
|
|
562
|
-
* @param participantLabel - The label of a lifeline's participant.
|
|
563
|
-
* @returns Mermaid source, ending with a line break.
|
|
564
|
-
*/
|
|
565
|
-
export declare const sequenceToMermaid: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region ../graph-cli/dist/emit/dot.d.ts
|
|
568
|
-
/**
|
|
569
|
-
* A flowchart as a Graphviz `digraph`, top to bottom. Nodes are named by their model identifiers, so the DOT source reads back to the model directly.
|
|
570
|
-
* @param view - The projected flowchart.
|
|
571
|
-
* @returns DOT source, ending with a line break.
|
|
572
|
-
*/
|
|
573
|
-
export declare const flowchartToDot: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
574
|
-
/**
|
|
575
|
-
* A swimlane as a Graphviz `digraph`, left to right, with one `cluster` subgraph per lane in the view's lane order and nodes with no actor outside every lane. An empty lane holds one invisible point so Graphviz still draws it. Hand-offs, the edges that change lane, are drawn bold.
|
|
576
|
-
* @param view - The projected swimlane.
|
|
577
|
-
* @returns DOT source, ending with a line break.
|
|
578
|
-
*/
|
|
579
|
-
export declare const swimlaneToDot: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
580
|
-
/**
|
|
581
|
-
* A state machine as a Graphviz `digraph`, left to right. Each transition is labelled with its event, guard and effect.
|
|
582
|
-
* @param view - The projected state machine.
|
|
583
|
-
* @returns DOT source, ending with a line break.
|
|
584
|
-
*/
|
|
585
|
-
export declare const stateMachineToDot: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
586
|
-
/**
|
|
587
|
-
* A sequence diagram as a Graphviz `digraph`. DOT has no sequence notation, so the diagram is drawn as a grid: a column per lifeline, headed by its participant's label, with one row per message in scenario order. Each message is an arrow across its row, numbered by its step and prefixed with the fragments around it (operator and guard, outermost first), since DOT cannot draw a box around arrows.
|
|
588
|
-
* @param view - The projected sequence diagram.
|
|
589
|
-
* @param participantLabel - The label of a lifeline's participant.
|
|
590
|
-
* @returns DOT source, ending with a line break.
|
|
591
|
-
*/
|
|
592
|
-
export declare const sequenceToDot: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
593
|
-
//#endregion
|
|
594
574
|
//#region src/version.d.ts
|
|
595
575
|
/** The version of the installed `process-graph` package, as its manifest names it. The bundler writes it in when the package is built, so reading it touches no file. */
|
|
596
576
|
export declare const version: string;
|
|
597
577
|
//#endregion
|
|
598
|
-
export type
|
|
578
|
+
export { type Addition, type AncestorsResult, type ArtefactState, type BlockedResult, type ChildrenResult, type CliPorts, type CyclesResult, type ElementStatus, type ElementSummary, type ExitCode, type FactsResult, type Failure, type FormatName, type GraphSession, type HandoffsResult, type HierarchyLink, type ImpactResult, type NodePortsOptions, type OpenedStore, type PathResult, type ProgramIdentity, type ProjectedView, type ReadyResult, type SetArtefactResult, type SetFactResult, type SetResult, type ShowRequest, type ShowResult, type SourceLookup, type StoredRun, type SyncInterruption, type SyncRequest, type SyncResult, type ValidateResult, type ValidationIssue, type ViewName, type WhyLink, type WhyResult, type Written, flowchartToDot, flowchartToMermaid, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, swimlaneToDot, swimlaneToMermaid };
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { a as stateMachineToDot, c as sequenceToMermaid, i as sequenceToDot, l as stateMachineToMermaid, o as swimlaneToDot, r as flowchartToDot, s as flowchartToMermaid, u as swimlaneToMermaid } from "./view-DTeNUhGG.js";
|
|
1
2
|
import { t as exitCodes } from "./exit-codes-0ultCqdS.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as version } from "./version-
|
|
4
|
-
export { CliError, SyncInterruptedError, add, artefactStates, blocked, cycles, defaultDataPath, defaultModelId, emit, exitCodes, factsOf, failureOf, findRun, flowchartToDot, flowchartToMermaid, formatNames, handoffsOf, impactOf, loadRun, nodePorts, packageVersion, path, project, ready, runCli, runFacts, runProcess, sequenceToDot, sequenceToMermaid, setArtefact, setFact, setState, show, stateMachineToDot, stateMachineToMermaid, swimlaneToDot, swimlaneToMermaid, sync, validateDocument, validateStored, version, viewNames, why };
|
|
3
|
+
import { A as setState, C as ready, D as factsOf, E as artefactStates, F as failureOf, M as loadRun, N as runFacts, O as setArtefact, P as CliError, S as path, T as add, _ as blocked, a as defaultModelId, b as handoffsOf, c as validateStored, d as project, f as show, g as ancestors, h as sync, i as runProcess, j as findRun, k as setFact, l as emit, m as SyncInterruptedError, n as nodePorts, o as runCli, p as viewNames, r as packageVersion, s as validateDocument, t as defaultDataPath, u as formatNames, v as children, w as why, x as impactOf, y as cycles } from "./dist-C8zDuW-y.js";
|
|
4
|
+
import { t as version } from "./version-DMNBcTZ-.js";
|
|
5
|
+
export { CliError, SyncInterruptedError, add, ancestors, artefactStates, blocked, children, cycles, defaultDataPath, defaultModelId, emit, exitCodes, factsOf, failureOf, findRun, flowchartToDot, flowchartToMermaid, formatNames, handoffsOf, impactOf, loadRun, nodePorts, packageVersion, path, project, ready, runCli, runFacts, runProcess, sequenceToDot, sequenceToMermaid, setArtefact, setFact, setState, show, stateMachineToDot, stateMachineToMermaid, swimlaneToDot, swimlaneToMermaid, sync, validateDocument, validateStored, version, viewNames, why };
|