process-graph 1.3.0 → 2.0.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 +56 -76
- package/dist/cli.js +4 -3
- package/dist/{data-file-BVMxkTug.js → data-file-B8__c10l.js} +1 -1
- package/dist/dist-B0mKgR5B.js +4 -0
- package/dist/{dist-BI01yxFA.js → dist-BnymJpfk.js} +258 -473
- package/dist/graphql-CGWZ6USe.d.ts +17 -0
- package/dist/index-7nV7hCmv.d.ts +118 -0
- package/dist/{index-BC4tmAuQ.d.ts → index-B2p3mEJ3.d.ts} +2 -2
- package/dist/{index-9Au8pAmP.d.ts → index-C-ZNF81j.d.ts} +5 -24
- package/dist/{index-hri2a13-.d.ts → index-CiaCmQDP.d.ts} +2 -1
- package/dist/{graphql-BE7xm5dB.d.ts → index-CotF9Lhh.d.ts} +4 -45
- package/dist/index-DAevZqW-.d.ts +71 -0
- package/dist/{index-Dvz_I_uQ.d.ts → index-DYl6lZLe.d.ts} +29 -1
- package/dist/{index-D06bcdfw.d.ts → index-DluJZTbT.d.ts} +23 -2
- package/dist/{index-CR8xUK3S.d.ts → index-KhygugOP.d.ts} +6 -44
- package/dist/{index-D4CnOhNf.d.ts → index-wQnLXJmD.d.ts} +1 -1
- package/dist/index.d.ts +25 -4
- package/dist/index.js +4 -3
- package/dist/layout.d.ts +1 -1
- package/dist/project-CP_ye6KI.js +27 -0
- package/dist/react-flow.d.ts +5 -5
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -24
- package/dist/{router-Dk91O_9p.js → router-DzVcQ28U.js} +2 -2
- package/dist/{schema-BPT8fmfa.js → schema-CL95Lyni.js} +24 -13
- package/dist/schema-DMXa8gAZ.js +117 -0
- package/dist/source/github/node.d.ts +1 -1
- package/dist/source/github.d.ts +4 -3
- package/dist/source/github.js +39 -2
- package/dist/{source-D51N7K3A.js → source-DM4fLS5P.js} +2 -161
- package/dist/store/node.d.ts +1 -1
- package/dist/store/node.js +1 -1
- package/dist/store/wasm/worker.js +2 -2
- package/dist/store/wasm.d.ts +1 -1
- package/dist/{store-DKzvLGgl.js → store-CgweIG8J.js} +3 -12
- package/dist/store.d.ts +2 -2
- package/dist/store.js +3 -3
- 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 +4 -4
- package/dist/{version-Dagrkvwt.js → version-_UOnL566.js} +1 -1
- package/dist/view-DcktInd7.js +392 -0
- package/package.json +21 -15
- package/dist/dist-81kTKnMq.js +0 -3
- package/dist/parse-C1Q1zsGt.js +0 -41
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./index-CotF9Lhh.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region ../../adapters/graph/source-github-issues/dist/graphql.d.ts
|
|
4
|
+
/** GitHub's GraphQL endpoint. */
|
|
5
|
+
declare const githubGraphqlEndpoint = "https://api.github.com/graphql";
|
|
6
|
+
/**
|
|
7
|
+
* Supplies the token for requests about one owner's repositories, so different organisations can use different credentials. The token is only ever sent in the `Authorization` header; this adapter never logs or returns it.
|
|
8
|
+
* @param owner - The login of the account whose repositories or board the request reads, or `undefined` for a request about the token's own holder (the viewer and the organisations it belongs to), which no owner names.
|
|
9
|
+
* @param signal - The caller's abort signal.
|
|
10
|
+
* @returns The token.
|
|
11
|
+
* @throws GraphSourceError with `unauthorised` when no token can be had, with a message saying how to get one; any other error is reported by the adapter as `unauthorised` too, naming the token port and the owner, with that error as the cause.
|
|
12
|
+
*/
|
|
13
|
+
type GitHubTokenPort = (owner: string | undefined, signal: AbortSignal | undefined) => Promise<string>;
|
|
14
|
+
/** The part of `fetch` this adapter uses: one POST to the GraphQL endpoint. The global `fetch` satisfies it. */
|
|
15
|
+
type GraphqlFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GraphqlFetch as n, githubGraphqlEndpoint as r, GitHubTokenPort as t };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { N as SyncFilter, h as GraphSourceClient, y as Gap } from "./index-CotF9Lhh.js";
|
|
2
|
+
import { ct as GraphStoreClient } from "./index-KhygugOP.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region ../../core/graph/sync/dist/checkpoint.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Where a sync stopped: the model, every scope it was asked for in order, the filter it read them with, the prefix of the source to read next, and the cursor after the last page it wrote within that source's scopes (absent to read them from the start). Everything before it is in the store, so a sync started from it reads only what is left. A source's cursor is valid only with the scopes and filter it was issued for, which is why both are kept with it.
|
|
7
|
+
*/
|
|
8
|
+
declare const syncCheckpointSchema: z.ZodReadonly<z.ZodObject<{
|
|
9
|
+
modelId: z.ZodString;
|
|
10
|
+
scopes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
11
|
+
filter: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
12
|
+
states: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
13
|
+
open: "open";
|
|
14
|
+
done: "done";
|
|
15
|
+
}>>>>;
|
|
16
|
+
labels: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
17
|
+
order: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
18
|
+
field: z.ZodEnum<{
|
|
19
|
+
created: "created";
|
|
20
|
+
updated: "updated";
|
|
21
|
+
comments: "comments";
|
|
22
|
+
}>;
|
|
23
|
+
direction: z.ZodEnum<{
|
|
24
|
+
ascending: "ascending";
|
|
25
|
+
descending: "descending";
|
|
26
|
+
}>;
|
|
27
|
+
}, z.core.$strict>>>;
|
|
28
|
+
}, z.core.$strict>>>;
|
|
29
|
+
source: z.ZodString;
|
|
30
|
+
after: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
type SyncCheckpoint = z.infer<typeof syncCheckpointSchema>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../../core/graph/sync/dist/sync.d.ts
|
|
35
|
+
/** Finds the source that reads scopes with an identifier prefix, such as `github`, or nothing when no source does. */
|
|
36
|
+
type SourceLookup = (prefix: string) => GraphSourceClient | undefined;
|
|
37
|
+
/** The part of the `GraphStore` client a sync calls: loading the model it merges into and upserting each page. */
|
|
38
|
+
interface SyncStore {
|
|
39
|
+
readonly v1: {
|
|
40
|
+
readonly models: Pick<GraphStoreClient["v1"]["models"], "load">;
|
|
41
|
+
readonly items: Pick<GraphStoreClient["v1"]["items"], "upsert">;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** How far a sync has got. Each count is of distinct identifiers (relations by kind and both ends) written by this sync. */
|
|
45
|
+
interface SyncProgress {
|
|
46
|
+
/** Pages read and written. */
|
|
47
|
+
readonly pages: number;
|
|
48
|
+
/** The revision the last write took. */
|
|
49
|
+
readonly revision: number;
|
|
50
|
+
readonly participants: number;
|
|
51
|
+
/** Bound activities. */
|
|
52
|
+
readonly activities: number;
|
|
53
|
+
readonly transitions: number;
|
|
54
|
+
/** Relations: sub-issues to their parents, assignees, repositories to their owners. */
|
|
55
|
+
readonly relations: number;
|
|
56
|
+
/** The parts of the scope the sources could not read, in the order met. */
|
|
57
|
+
readonly gaps: readonly Gap[];
|
|
58
|
+
/** Where to resume; absent once every scope has been read. */
|
|
59
|
+
readonly checkpoint: SyncCheckpoint | undefined;
|
|
60
|
+
}
|
|
61
|
+
/** What to sync and where to. */
|
|
62
|
+
interface SyncRequest {
|
|
63
|
+
readonly store: SyncStore;
|
|
64
|
+
readonly sources: SourceLookup;
|
|
65
|
+
readonly modelId: string;
|
|
66
|
+
/** Source-qualified scopes, read in order, one source after another. */
|
|
67
|
+
readonly scopes: readonly string[];
|
|
68
|
+
/** Narrows and orders what each scope lists. It is recorded in every checkpoint, since a cursor is valid only with the filter it was issued under. */
|
|
69
|
+
readonly filter?: SyncFilter | undefined;
|
|
70
|
+
/** A checkpoint from an interrupted sync of the same model, scopes and filter: the sync carries on from it. */
|
|
71
|
+
readonly resume?: SyncCheckpoint | undefined;
|
|
72
|
+
/** Ends the sync between or during reads; what was written stays written. */
|
|
73
|
+
readonly signal?: AbortSignal | undefined;
|
|
74
|
+
/** Called after every page is written, with the progress so far. */
|
|
75
|
+
readonly onProgress?: ((progress: SyncProgress) => void) | undefined;
|
|
76
|
+
}
|
|
77
|
+
/** Thrown when a scope names a source no reader serves. */
|
|
78
|
+
declare class UnknownSourceError extends Error {
|
|
79
|
+
/** The source prefix no reader serves. */
|
|
80
|
+
readonly prefix: string;
|
|
81
|
+
/**
|
|
82
|
+
* @param prefix - The source prefix no reader serves.
|
|
83
|
+
*/
|
|
84
|
+
constructor(prefix: string);
|
|
85
|
+
}
|
|
86
|
+
/** Where a sync a source interrupted carries on, as data. */
|
|
87
|
+
interface SyncInterruption {
|
|
88
|
+
/** The checkpoint that continues the failing source: its prefix, after the cursor of the last page read from it, or from the start of its scopes when none was read. */
|
|
89
|
+
readonly resume: SyncCheckpoint;
|
|
90
|
+
/** The scopes of the sources after the failing one, which were not read. */
|
|
91
|
+
readonly remaining: readonly string[];
|
|
92
|
+
/** Whether this sync wrote any pages before the failure. */
|
|
93
|
+
readonly saved: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Thrown by `syncScopes` when a source fails while it is being read: opening its stream or reading a page. Its message is the source's, its cause is what the source threw, and where to carry on is data in `resume` and `remaining`. A failure of the store, or of the request itself (an unknown source, a malformed scope), is thrown as it is.
|
|
97
|
+
*/
|
|
98
|
+
declare class InterruptedSyncError extends Error implements SyncInterruption {
|
|
99
|
+
readonly resume: SyncCheckpoint;
|
|
100
|
+
readonly remaining: readonly string[];
|
|
101
|
+
readonly saved: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @param interruption - Where the sync carries on.
|
|
104
|
+
* @param cause - What the source threw.
|
|
105
|
+
*/
|
|
106
|
+
constructor(interruption: SyncInterruption, cause: unknown);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Reads the scopes from their sources page by page and merges each page into the stored model as soon as it is read: participants, bound activities, transitions, relations and run state. Progress is kept as it is made, so a sync that is cancelled, rate limited or interrupted leaves everything it read in the store, and a checkpoint to carry on from.
|
|
110
|
+
*
|
|
111
|
+
* A store rejects a write that leaves a transition or a relation naming an element or participant the model lacks, and a source may report a dependency or a sub-issue whose other end a later page brings. A transition or relation is therefore held back until the model has both of its ends, and written with the page that completes it. One whose end never arrives is written with the last page, where the store's rejection says which reference is missing.
|
|
112
|
+
* @param request - The store, sources, model, scopes, an optional filter and checkpoint, the signal and a progress listener.
|
|
113
|
+
* @returns The final progress, with no checkpoint.
|
|
114
|
+
* @throws InvalidScopeError for a scope that names no source; UnknownSourceError for a scope whose source no reader serves; an Error for a checkpoint naming a source none of the scopes use, and for a sync of no scopes; InterruptedSyncError, after the pages before it are written, when a source fails while it is read, an abort included; and whatever the store throws.
|
|
115
|
+
*/
|
|
116
|
+
declare const syncScopes: (request: SyncRequest) => Promise<SyncProgress>;
|
|
117
|
+
//#endregion
|
|
118
|
+
export { SyncRequest as a, syncScopes as c, SyncProgress as i, SyncCheckpoint as l, SourceLookup as n, SyncStore as o, SyncInterruption as r, UnknownSourceError as s, InterruptedSyncError as t, syncCheckpointSchema as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as Views, Y as IdSpace } from "./index-DYl6lZLe.js";
|
|
2
|
+
import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-DluJZTbT.js";
|
|
3
3
|
//#region ../../core/graph/layout/dist/engine.d.ts
|
|
4
4
|
/** A box with a fixed size, which the engine places. */
|
|
5
5
|
interface EngineLeaf {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as Facts, B as Status, C as CriticalPath, _ as StatusRule, d as StatusExplanation, u as ChainLink } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { A as Facts, B as Status, C as CriticalPath, _ as StatusRule, d as StatusExplanation, u as ChainLink } from "./index-wQnLXJmD.js";
|
|
2
|
+
import { M as Projection, T as Element, Y as IdSpace, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
|
|
3
|
+
import { G as StoredModel, ct as GraphStoreClient } from "./index-KhygugOP.js";
|
|
4
|
+
import { a as ProjectedView } from "./index-DluJZTbT.js";
|
|
5
5
|
import { KeyboardEvent, ReactElement, ReactNode, RefCallback } from "react";
|
|
6
6
|
//#region ../../ui/graph/react/dist/run.d.ts
|
|
7
7
|
/**
|
|
@@ -114,25 +114,6 @@ declare const stepWeight: () => number;
|
|
|
114
114
|
declare const useCriticalPath: <I extends IdSpace>(run: Run<I>, weight?: (id: I["element"]) => number) => CriticalPath<I["element"]>;
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region ../../ui/graph/react/dist/projection.d.ts
|
|
117
|
-
/** The view each projection notation produces. */
|
|
118
|
-
interface ViewsByNotation<I extends IdSpace> {
|
|
119
|
-
readonly flowchart: Flowchart<I>;
|
|
120
|
-
readonly swimlane: Swimlane<I>;
|
|
121
|
-
readonly stateMachine: StateMachine<I>;
|
|
122
|
-
readonly sequence: SequenceDiagram<I>;
|
|
123
|
-
}
|
|
124
|
-
/** A projection request together with the view it produced, discriminated by notation. */
|
|
125
|
-
type ProjectedView<I extends IdSpace> = { readonly [N in keyof ViewsByNotation<I>]: {
|
|
126
|
-
readonly notation: N;
|
|
127
|
-
readonly view: ViewsByNotation<I>[N];
|
|
128
|
-
}; }[keyof ViewsByNotation<I>];
|
|
129
|
-
/**
|
|
130
|
-
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
131
|
-
* @param model - The model to project.
|
|
132
|
-
* @param projection - One of the model's declared projections, or one built the same way.
|
|
133
|
-
* @returns The notation and its view.
|
|
134
|
-
*/
|
|
135
|
-
declare const project: <I extends IdSpace>(model: Model<I>, projection: Projection<I>) => ProjectedView<I>;
|
|
136
117
|
/**
|
|
137
118
|
* A model's view in one notation, projected again only when the model or the projection changes.
|
|
138
119
|
* @param model - The model to project.
|
|
@@ -418,4 +399,4 @@ interface DetailPanelProps<I extends IdSpace> {
|
|
|
418
399
|
*/
|
|
419
400
|
declare const DetailPanel: <I extends IdSpace>(props: DetailPanelProps<I>) => ReactElement;
|
|
420
401
|
//#endregion
|
|
421
|
-
export {
|
|
402
|
+
export { useModel as $, ElementFilter as A, useElementFilter as B, ruleDescriptions as C, SelectionContainerProps as D, GraphSelectionOptions as E, emptyFilter as F, useBlockers as G, BlockedChain as H, filterElements as I, useReadySet as J, useCriticalPath as K, filterOptions as L, FilterOption as M, FilterOptions as N, SelectionItemProps as O, actorsOf as P, ModelState as Q, matchesFilter as R, elementLabel as S, GraphSelection as T, stepWeight as U, useProjection as V, useBlockedChain as W, useWhyStatus as X, useStatuses as Y, ModelClient as Z, ElementCardPart as _, FilterPanelPart as a, StatusBadge as b, LegendPart as c, LanePart as d, Run as et, LaneProps as f, ElementCard as g, TransitionItemProps as h, FilterPanel as i, ElementFilterState as j, useGraphSelection as k, LegendProps as l, TransitionItemPart as m, DetailPanelPart as n, FilterPanelProps as o, TransitionItem as p, useImpact as q, DetailPanelProps as r, Legend as s, DetailPanel as t, noFacts as tt, Lane as u, ElementCardProps as v, statusLabels as w, StatusBadgeProps as x, NamedElement as y, sourceScope as z };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as GraphSourcePager } from "./index-CotF9Lhh.js";
|
|
2
|
+
import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-CGWZ6USe.js";
|
|
2
3
|
//#region ../../adapters/graph/source-github-issues/dist/source.d.ts
|
|
3
4
|
/** What the GitHub issues source needs. */
|
|
4
5
|
interface GitHubIssuesSourceOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { X as OpenIds, a as BoundActivitySchema, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { ContractRouterClient, InitialInputSchema, ProcedureContract, RouterContract, eventIterator } from "@orpc/contract";
|
|
4
4
|
import { ContractedRouter, DefaultInitialContext } from "@orpc/server";
|
|
@@ -88,21 +88,6 @@ declare const transitionSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
88
88
|
}, z.core.$strip>], "kind">>;
|
|
89
89
|
effect: z.ZodExactOptional<z.ZodString>;
|
|
90
90
|
}, z.core.$strict>>;
|
|
91
|
-
/**
|
|
92
|
-
* An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional, and it equals `id`: the source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
|
|
93
|
-
*/
|
|
94
|
-
declare const boundActivitySchema: z.ZodReadonly<z.ZodObject<{
|
|
95
|
-
kind: z.ZodLiteral<"activity">;
|
|
96
|
-
id: z.ZodString;
|
|
97
|
-
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
98
|
-
label: z.ZodString;
|
|
99
|
-
actor: z.ZodExactOptional<z.ZodString>;
|
|
100
|
-
action: z.ZodExactOptional<z.ZodString>;
|
|
101
|
-
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
102
|
-
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
103
|
-
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
104
|
-
source: z.ZodString;
|
|
105
|
-
}, z.core.$strict>>;
|
|
106
91
|
/** The relation kinds a source reports beside the model's transitions. */
|
|
107
92
|
declare const relationKinds: readonly ["child-of", "assigned-to", "part-of"];
|
|
108
93
|
/**
|
|
@@ -131,7 +116,7 @@ declare const gapSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
131
116
|
message: z.ZodString;
|
|
132
117
|
}, z.core.$strict>>;
|
|
133
118
|
/**
|
|
134
|
-
* One page of a sync: bound activities, the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
|
|
119
|
+
* One page of a sync: bound activities (graph-schema's `boundActivitySchema`), the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
|
|
135
120
|
*
|
|
136
121
|
* `next` is the cursor to resume after this page. It is absent on the last page.
|
|
137
122
|
*/
|
|
@@ -145,18 +130,7 @@ declare const syncPageSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
145
130
|
entity: "entity";
|
|
146
131
|
}>;
|
|
147
132
|
}, z.core.$strict>>>>;
|
|
148
|
-
activities: z.ZodReadonly<z.ZodArray<
|
|
149
|
-
kind: z.ZodLiteral<"activity">;
|
|
150
|
-
id: z.ZodString;
|
|
151
|
-
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
152
|
-
label: z.ZodString;
|
|
153
|
-
actor: z.ZodExactOptional<z.ZodString>;
|
|
154
|
-
action: z.ZodExactOptional<z.ZodString>;
|
|
155
|
-
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
156
|
-
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
157
|
-
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
158
|
-
source: z.ZodString;
|
|
159
|
-
}, z.core.$strict>>>>;
|
|
133
|
+
activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
|
|
160
134
|
transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
161
135
|
id: z.ZodString;
|
|
162
136
|
source: z.ZodString;
|
|
@@ -361,7 +335,6 @@ declare const sourceDescriptionSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
361
335
|
}, z.core.$strict>>;
|
|
362
336
|
/** Why a request was rejected as malformed. */
|
|
363
337
|
declare const badRequestReasons: readonly ["invalid-cursor", "invalid-scope"];
|
|
364
|
-
type BoundActivity = z.infer<typeof boundActivitySchema>;
|
|
365
338
|
type SourceParticipant = z.infer<typeof participantSchema>;
|
|
366
339
|
type SourceTransition = z.infer<typeof transitionSchema>;
|
|
367
340
|
type Relation = z.infer<typeof relationSchema>;
|
|
@@ -615,18 +588,4 @@ interface FakeGraphSourceOptions {
|
|
|
615
588
|
*/
|
|
616
589
|
declare const createFakeGraphSource: (options: FakeGraphSourceOptions) => GraphSourcePager;
|
|
617
590
|
//#endregion
|
|
618
|
-
|
|
619
|
-
/** GitHub's GraphQL endpoint. */
|
|
620
|
-
declare const githubGraphqlEndpoint = "https://api.github.com/graphql";
|
|
621
|
-
/**
|
|
622
|
-
* Supplies the token for requests about one owner's repositories, so different organisations can use different credentials. The token is only ever sent in the `Authorization` header; this adapter never logs or returns it.
|
|
623
|
-
* @param owner - The login of the account whose repositories or board the request reads, or `undefined` for a request about the token's own holder (the viewer and the organisations it belongs to), which no owner names.
|
|
624
|
-
* @param signal - The caller's abort signal.
|
|
625
|
-
* @returns The token.
|
|
626
|
-
* @throws GraphSourceError with `unauthorised` when no token can be had, with a message saying how to get one; any other error is reported by the adapter as `unauthorised` too, naming the token port and the owner, with that error as the cause.
|
|
627
|
-
*/
|
|
628
|
-
type GitHubTokenPort = (owner: string | undefined, signal: AbortSignal | undefined) => Promise<string>;
|
|
629
|
-
/** The part of `fetch` this adapter uses: one POST to the GraphQL endpoint. The global `fetch` satisfies it. */
|
|
630
|
-
type GraphqlFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
631
|
-
//#endregion
|
|
632
|
-
export { scopeRootsInputSchema as $, ScopeEntry as A, badRequestReasons as B, Gap as C, Relation as D, OrderField as E, SourceParticipant as F, orderDirections as G, filterStates as H, SourceTransition as I, relationKinds as J, orderFields as K, SyncFilter as L, ScopeListingInput as M, ScopeRootsInput as N, RelationKind as O, SourceDescription as P, scopeListingSchema as Q, SyncInput as R, FilterState as S, OrderDirection as T, gapReasons as U, boundActivitySchema as V, gapSchema as W, scopeChildrenInputSchema as X, relationSchema as Y, scopeEntrySchema as Z, GraphSourceFailure as _, FakePage as a, BadRequestReason as b, assembleSync as c, GraphSourceRouter as d, sourceDescriptionSchema as et, GraphSourceScopes as f, GraphSourceError as g, createGraphSourceRouter as h, FakeGraphSourceOptions as i, transitionSchema as it, ScopeListing as j, ScopeChildrenInput as k, ChildrenRequest as l, PageRequest as m, GraphqlFetch as n, syncInputSchema as nt, createFakeGraphSource as o, ListingRequest as p, participantSchema as q, githubGraphqlEndpoint as r, syncPageSchema as rt, AssembledSync as s, GitHubTokenPort as t, syncFilterSchema as tt, GraphSourcePager as u, GraphSourceClient as v, GapReason as w, BoundActivity as x, graphSourceContract as y, SyncPage as z };
|
|
591
|
+
export { transitionSchema as $, SourceDescription as A, orderDirections as B, Relation as C, ScopeListing as D, ScopeEntry as E, SyncPage as F, scopeChildrenInputSchema as G, participantSchema as H, badRequestReasons as I, scopeRootsInputSchema as J, scopeEntrySchema as K, filterStates as L, SourceTransition as M, SyncFilter as N, ScopeListingInput as O, SyncInput as P, syncPageSchema as Q, gapReasons as R, OrderField as S, ScopeChildrenInput as T, relationKinds as U, orderFields as V, relationSchema as W, syncFilterSchema as X, sourceDescriptionSchema as Y, syncInputSchema as Z, BadRequestReason as _, assembleSync as a, GapReason as b, GraphSourceRouter as c, PageRequest as d, createGraphSourceRouter as f, graphSourceContract as g, GraphSourceClient as h, AssembledSync as i, SourceParticipant as j, ScopeRootsInput as k, GraphSourceScopes as l, GraphSourceFailure as m, FakePage as n, ChildrenRequest as o, GraphSourceError as p, scopeListingSchema as q, createFakeGraphSource as r, GraphSourcePager as s, FakeGraphSourceOptions as t, ListingRequest as u, FilterState as v, RelationKind as w, OrderDirection as x, Gap as y, gapSchema as z };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { X as OpenIds, Y as IdSpace, b as Model } from "./index-DYl6lZLe.js";
|
|
2
|
+
import { N as Flowchart, a as ProjectedView, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-DluJZTbT.js";
|
|
3
|
+
//#region ../../core/graph/export/dist/view.d.ts
|
|
4
|
+
/** The text formats a view is written in: Mermaid, Graphviz DOT, and the projection itself as JSON. */
|
|
5
|
+
declare const exportFormats: readonly ["mermaid", "dot", "json"];
|
|
6
|
+
/** One of the text formats a view is written in. */
|
|
7
|
+
type ExportFormat = (typeof exportFormats)[number];
|
|
8
|
+
/**
|
|
9
|
+
* A projected view as text: Mermaid or Graphviz DOT source, or the projection as JSON indented by two spaces and ending in a line break, with every control, format, separator, unassigned and private-use character in it written as a JSON `\u` escape (see `terminalJson`), so the text shows nothing hidden or reordered wherever it is saved or printed and parses back to exactly the projection. This is the one writer of a view's text, so the command line's `show` and a download from the web app give the same text for the same view.
|
|
10
|
+
* @param model - The model the view was projected from, for the labels of a sequence diagram's participants.
|
|
11
|
+
* @param projected - The view, as graph-projection's `project` gives it.
|
|
12
|
+
* @param format - The format to write.
|
|
13
|
+
* @returns The text.
|
|
14
|
+
*/
|
|
15
|
+
declare const viewText: (model: Model<OpenIds>, projected: ProjectedView<OpenIds>, format: ExportFormat) => string;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../core/graph/export/dist/mermaid.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* 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.
|
|
20
|
+
* @param view - The projected flowchart.
|
|
21
|
+
* @returns Mermaid source, ending with a line break.
|
|
22
|
+
*/
|
|
23
|
+
declare const flowchartToMermaid: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @param view - The projected swimlane.
|
|
27
|
+
* @returns Mermaid source, ending with a line break.
|
|
28
|
+
*/
|
|
29
|
+
declare const swimlaneToMermaid: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
30
|
+
/**
|
|
31
|
+
* 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.
|
|
32
|
+
* @param view - The projected state machine.
|
|
33
|
+
* @returns Mermaid source, ending with a line break.
|
|
34
|
+
*/
|
|
35
|
+
declare const stateMachineToMermaid: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
* @param view - The projected sequence diagram.
|
|
39
|
+
* @param participantLabel - The label of a lifeline's participant.
|
|
40
|
+
* @returns Mermaid source, ending with a line break.
|
|
41
|
+
*/
|
|
42
|
+
declare const sequenceToMermaid: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region ../../core/graph/export/dist/dot.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* 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.
|
|
47
|
+
* @param view - The projected flowchart.
|
|
48
|
+
* @returns DOT source, ending with a line break.
|
|
49
|
+
*/
|
|
50
|
+
declare const flowchartToDot: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
51
|
+
/**
|
|
52
|
+
* 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.
|
|
53
|
+
* @param view - The projected swimlane.
|
|
54
|
+
* @returns DOT source, ending with a line break.
|
|
55
|
+
*/
|
|
56
|
+
declare const swimlaneToDot: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
57
|
+
/**
|
|
58
|
+
* A state machine as a Graphviz `digraph`, left to right. Each transition is labelled with its event, guard and effect.
|
|
59
|
+
* @param view - The projected state machine.
|
|
60
|
+
* @returns DOT source, ending with a line break.
|
|
61
|
+
*/
|
|
62
|
+
declare const stateMachineToDot: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
* @param view - The projected sequence diagram.
|
|
66
|
+
* @param participantLabel - The label of a lifeline's participant.
|
|
67
|
+
* @returns DOT source, ending with a line break.
|
|
68
|
+
*/
|
|
69
|
+
declare const sequenceToDot: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { flowchartToMermaid as a, swimlaneToMermaid as c, viewText as d, swimlaneToDot as i, ExportFormat as l, sequenceToDot as n, sequenceToMermaid as o, stateMachineToDot as r, stateMachineToMermaid as s, flowchartToDot as t, exportFormats as u };
|
|
@@ -486,6 +486,34 @@ interface ModelSchema extends z.ZodReadonly<typeof modelObjectSchema> {
|
|
|
486
486
|
* Every object is strict. The inferred type is exactly `Model<OpenIds>`, which a type-level test pins in both directions.
|
|
487
487
|
*/
|
|
488
488
|
declare const modelSchema: ModelSchema;
|
|
489
|
+
/** The strict object schema inside `boundActivitySchema`, before it is made read-only. */
|
|
490
|
+
declare const boundActivityObjectSchema: z.ZodObject<{
|
|
491
|
+
kind: z.ZodLiteral<"activity">;
|
|
492
|
+
id: z.ZodString;
|
|
493
|
+
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
494
|
+
label: z.ZodString;
|
|
495
|
+
actor: z.ZodExactOptional<z.ZodString>;
|
|
496
|
+
action: z.ZodExactOptional<z.ZodString>;
|
|
497
|
+
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
498
|
+
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
499
|
+
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
500
|
+
source: z.ZodString;
|
|
501
|
+
}, z.core.$strict>;
|
|
502
|
+
/**
|
|
503
|
+
* The type of `boundActivitySchema`, declared by name for the same reason as `ModelSchema`: a consumer's declaration file that embeds the schema, such as a source page's or a store's item list, refers to `BoundActivitySchema` rather than writing out the activity with trilean's JSON value inline.
|
|
504
|
+
*/
|
|
505
|
+
interface BoundActivitySchema extends z.ZodReadonly<typeof boundActivityObjectSchema> {
|
|
506
|
+
/** The strict object schema inside, whose `shape` holds each field's own schema. */
|
|
507
|
+
readonly unwrap: () => typeof boundActivityObjectSchema;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* An activity bound to the external record it stands for: the model's `activity` element with `source` required, where the model leaves it optional, and equal to `id`. The source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
|
|
511
|
+
*
|
|
512
|
+
* This is the one definition of a bound activity: a source's sync page and a store's upserted items both use it, so what a source emits is exactly what a store accepts.
|
|
513
|
+
*/
|
|
514
|
+
declare const boundActivitySchema: BoundActivitySchema;
|
|
515
|
+
/** An activity bound to the external record it stands for, as `boundActivitySchema` parses it. */
|
|
516
|
+
type BoundActivity = z.output<BoundActivitySchema>;
|
|
489
517
|
//#endregion
|
|
490
518
|
//#region ../../core/graph/schema/dist/parse.d.ts
|
|
491
519
|
/** A problem found while loading a model: a shape violation located by JSON pointer, or a rule `validate` reports. */
|
|
@@ -518,4 +546,4 @@ declare class ModelParseError extends Error {
|
|
|
518
546
|
*/
|
|
519
547
|
declare const parseModel: (input: unknown) => Model<OpenIds>;
|
|
520
548
|
//#endregion
|
|
521
|
-
export {
|
|
549
|
+
export { Participant as A, ParticipantKind as B, ActionDef as C, Extensions as D, EventDef as E, ElementKind as F, notations as G, elementKinds as H, FragmentOperator as I, pseudoRoles as J, overlayStatuses as K, MessageMode as L, Projection as M, Transition as N, Fragment as O, Views as P, Notation as R, defineModel as S, Element as T, fragmentOperators as U, PseudoRole as V, messageModes as W, OpenIds as X, IdSpace as Y, validate as _, BoundActivitySchema as a, Model as b, modelSchema as c, OverlayParseError as d, overlaySchema as f, IssueCode as g, Issue as h, BoundActivity as i, Point as j, FragmentOperand as k, Overlay as l, validateOverlay as m, ModelParseError as n, ModelSchema as o, parseOverlay as p, participantKinds as q, parseModel as r, boundActivitySchema as s, ModelIssue as t, OverlayIssue as u, inputsOf as v, ArtefactDef as w, ModelParts as x, outputsOf as y, OverlayStatus as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as FragmentOperator, L as MessageMode, M as Projection, N as Transition, R as Notation, T as Element, V as PseudoRole, Y as IdSpace, b as Model } from "./index-DYl6lZLe.js";
|
|
2
2
|
//#region ../../core/graph/projection/dist/loss.d.ts
|
|
3
3
|
/** What an element that a notation cannot draw is: an element kind, or the role of a pseudo-state. A `message` element is one only when the notation would fold it but folding it would multiply edges. */
|
|
4
4
|
type UnrepresentedKind = "activity" | "decision" | "state" | "message" | PseudoRole;
|
|
@@ -345,6 +345,27 @@ declare const confirmChanges: <I extends IdSpace>(diff: ModelDiff<I>, accept: (c
|
|
|
345
345
|
*/
|
|
346
346
|
declare const applyModelDiff: <I extends IdSpace>(model: Model<I>, diff: ModelDiff<I>) => Model<I>;
|
|
347
347
|
//#endregion
|
|
348
|
+
//#region ../../core/graph/projection/dist/project.d.ts
|
|
349
|
+
/** The view each projection notation produces. */
|
|
350
|
+
interface ViewsByNotation<I extends IdSpace> {
|
|
351
|
+
readonly flowchart: Flowchart<I>;
|
|
352
|
+
readonly swimlane: Swimlane<I>;
|
|
353
|
+
readonly stateMachine: StateMachine<I>;
|
|
354
|
+
readonly sequence: SequenceDiagram<I>;
|
|
355
|
+
}
|
|
356
|
+
/** A projection request together with the view it produced, discriminated by notation. */
|
|
357
|
+
type ProjectedView<I extends IdSpace> = { readonly [N in keyof ViewsByNotation<I>]: {
|
|
358
|
+
readonly notation: N;
|
|
359
|
+
readonly view: ViewsByNotation<I>[N];
|
|
360
|
+
}; }[keyof ViewsByNotation<I>];
|
|
361
|
+
/**
|
|
362
|
+
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
363
|
+
* @param model - The model to project.
|
|
364
|
+
* @param projection - One of the model's declared projections, or one built the same way.
|
|
365
|
+
* @returns The notation and its view.
|
|
366
|
+
*/
|
|
367
|
+
declare const project: <I extends IdSpace>(model: Model<I>, projection: Projection<I>) => ProjectedView<I>;
|
|
368
|
+
//#endregion
|
|
348
369
|
//#region ../../core/graph/projection/dist/inverse-flowchart.d.ts
|
|
349
370
|
/**
|
|
350
371
|
* The inverse of `toFlowchart`: what an edited flowchart changes in the model, matched by element and transition id.
|
|
@@ -401,4 +422,4 @@ declare const diffStateMachine: <I extends IdSpace>(model: Model<I>, edited: Rea
|
|
|
401
422
|
*/
|
|
402
423
|
declare const diffSequence: <I extends IdSpace>(model: Model<I>, scenario: readonly I["transition"][], edited: Readonly<Pick<SequenceDiagram<I>, "messages">>) => ModelDiff<I>;
|
|
403
424
|
//#endregion
|
|
404
|
-
export {
|
|
425
|
+
export { toSwimlane as A, toSequence as C, toStateMachine as D, StateMachineTransition as E, Handoff as F, handoffs as I, Loss as L, FlowNode as M, Flowchart as N, Lane as O, toFlowchart as P, UnrepresentedElement as R, SequenceOperand as S, StateMachineState as T, applyModelDiff as _, ProjectedView as a, SequenceItem as b, Addressing as c, Ends as d, EventChange as f, UnconfirmedChangeError as g, TransitionFieldChange as h, diffSwimlane as i, FlowEdge as j, Swimlane as k, Change as l, TransitionChange as m, diffStateMachine as n, ViewsByNotation as o, ModelDiff as p, diffFlowchart as r, project as s, diffSequence as t, ElementChange as u, confirmChanges as v, StateMachine as w, SequenceMessage as x, SequenceDiagram as y, UnrepresentedKind as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as FactRecord } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { k as FactRecord } from "./index-wQnLXJmD.js";
|
|
2
|
+
import { X as OpenIds, a as BoundActivitySchema, b as Model, h as Issue, l as Overlay, o as ModelSchema } from "./index-DYl6lZLe.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ContractRouterClient } from "@orpc/contract";
|
|
5
5
|
import { ContractedRouter } from "@orpc/server";
|
|
@@ -320,18 +320,7 @@ declare const graphStoreContract: {
|
|
|
320
320
|
entity: "entity";
|
|
321
321
|
}>;
|
|
322
322
|
}, z.core.$strict>>>>;
|
|
323
|
-
activities: z.ZodReadonly<z.ZodArray<
|
|
324
|
-
kind: z.ZodLiteral<"activity">;
|
|
325
|
-
id: z.ZodString;
|
|
326
|
-
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
327
|
-
label: z.ZodString;
|
|
328
|
-
actor: z.ZodExactOptional<z.ZodString>;
|
|
329
|
-
action: z.ZodExactOptional<z.ZodString>;
|
|
330
|
-
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
331
|
-
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
332
|
-
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
333
|
-
source: z.ZodString;
|
|
334
|
-
}, z.core.$strict>>>>;
|
|
323
|
+
activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
|
|
335
324
|
transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
336
325
|
id: z.ZodString;
|
|
337
326
|
source: z.ZodString;
|
|
@@ -672,21 +661,6 @@ declare const modelIdSchema: z.ZodString;
|
|
|
672
661
|
* A position in the store's history. Every change to any model takes the next revision from one store-wide sequence, so revisions only grow, a model's revision is the revision of its last change, and a model deleted and saved again never reuses an earlier one.
|
|
673
662
|
*/
|
|
674
663
|
declare const revisionSchema: z.ZodInt;
|
|
675
|
-
/**
|
|
676
|
-
* An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional: a bound item's identity is its source record, and the source-qualified identifier is its element id.
|
|
677
|
-
*/
|
|
678
|
-
declare const boundActivitySchema: z.ZodReadonly<z.ZodObject<{
|
|
679
|
-
kind: z.ZodLiteral<"activity">;
|
|
680
|
-
id: z.ZodString;
|
|
681
|
-
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
682
|
-
label: z.ZodString;
|
|
683
|
-
actor: z.ZodExactOptional<z.ZodString>;
|
|
684
|
-
action: z.ZodExactOptional<z.ZodString>;
|
|
685
|
-
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
686
|
-
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
687
|
-
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
688
|
-
source: z.ZodString;
|
|
689
|
-
}, z.core.$strict>>;
|
|
690
664
|
/** The relation kinds a store keeps beside a model, the same kinds a source reports. */
|
|
691
665
|
declare const relationKinds: readonly ["child-of", "assigned-to", "part-of"];
|
|
692
666
|
/**
|
|
@@ -702,7 +676,7 @@ declare const relationSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
702
676
|
to: z.ZodString;
|
|
703
677
|
}, z.core.$strict>>;
|
|
704
678
|
/**
|
|
705
|
-
* Items read from a source, to be merged into a stored model by identifier. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
|
|
679
|
+
* Items read from a source, to be merged into a stored model by identifier. Activities are graph-schema's `boundActivitySchema`, the same schema a source's sync page uses, so a page's items pass unchanged. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
|
|
706
680
|
*/
|
|
707
681
|
declare const boundItemsSchema: z.ZodReadonly<z.ZodObject<{
|
|
708
682
|
participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
@@ -714,18 +688,7 @@ declare const boundItemsSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
714
688
|
entity: "entity";
|
|
715
689
|
}>;
|
|
716
690
|
}, z.core.$strict>>>>;
|
|
717
|
-
activities: z.ZodReadonly<z.ZodArray<
|
|
718
|
-
kind: z.ZodLiteral<"activity">;
|
|
719
|
-
id: z.ZodString;
|
|
720
|
-
extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
|
|
721
|
-
label: z.ZodString;
|
|
722
|
-
actor: z.ZodExactOptional<z.ZodString>;
|
|
723
|
-
action: z.ZodExactOptional<z.ZodString>;
|
|
724
|
-
affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
725
|
-
consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
726
|
-
produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
727
|
-
source: z.ZodString;
|
|
728
|
-
}, z.core.$strict>>>>;
|
|
691
|
+
activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
|
|
729
692
|
transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
730
693
|
id: z.ZodString;
|
|
731
694
|
source: z.ZodString;
|
|
@@ -1012,7 +975,6 @@ declare const issueSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
1012
975
|
}, z.core.$strict>>;
|
|
1013
976
|
type ModelId = z.infer<typeof modelIdSchema>;
|
|
1014
977
|
type Revision = z.infer<typeof revisionSchema>;
|
|
1015
|
-
type BoundActivity = z.infer<typeof boundActivitySchema>;
|
|
1016
978
|
type BoundItems = z.infer<typeof boundItemsSchema>;
|
|
1017
979
|
type Relation = z.infer<typeof relationSchema>;
|
|
1018
980
|
type RelationKind = (typeof relationKinds)[number];
|
|
@@ -1387,4 +1349,4 @@ type GraphStoreRouter = ContractedRouter<typeof graphStoreContract, object>;
|
|
|
1387
1349
|
*/
|
|
1388
1350
|
declare const createFakeGraphStore: () => GraphStore;
|
|
1389
1351
|
//#endregion
|
|
1390
|
-
export {
|
|
1352
|
+
export { modelIdSchema as $, defaultSubscriptionCapacity as A, Relation as B, ElementRequest as C, ChangeFeedOptions as D, ChangeFeed as E, FactChange as F, StoredModel as G, Revision as H, FactClearing as I, factChangeSchema as J, boundItemsSchema as K, ModelId as L, GraphStoreFailure as M, BoundItems as N, ChangeSubscription as O, ChangeKind as P, issueSchema as Q, ModelSummary as R, overlayWithin as S, ModelRequest as T, StoreChange as U, RelationKind as V, StoredFacts as W, factNameSchema as X, factClearingSchema as Y, factRecordSchema as Z, mergeFacts as _, blockedChainOf as a, storeChangeSchema as at, emptyModel as b, structureOf as c, GraphStoreClient as ct, descendantsOf as d, modelSummarySchema as et, mergeRelations as f, factsWithin as g, factIssues as h, Structure as i, revisionSchema as it, GraphStoreError as j, SubscribeOptions as k, ancestorsOf as l, graphStoreContract as lt, relationsWithin as m, GraphStoreRouter as n, relationKinds as nt, impactOf as o, storedFactsSchema as ot, relationIssues as p, changeKinds as q, createGraphStoreRouter as r, relationSchema as rt, readyOf as s, storedModelSchema as st, createFakeGraphStore as t, reachSchema as tt, childrenOf as u, withoutFacts as v, GraphStore as w, mergeBoundItems as x, checkStored as y, Reach as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Y as IdSpace, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
|
|
2
2
|
import { ComputedValue, ExpressionNode, JsonValue, PredicateNode, Resolution } from "trilean";
|
|
3
3
|
//#region ../../core/graph/domain/dist/status.d.ts
|
|
4
4
|
/** The derived states of an element, in the order the derivation considers them. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as Facts, B as Status, C as CriticalPath, D as UnknownReference, E as NodeId, F as evaluateBranches, I as factNamesIn, L as factsFrom, M as artefactKey, N as elementStatusKey, O as buildDag, P as emptyFactRecord, R as layeredFacts, S as loopTransitions, T as Dag, V as statuses, _ as StatusRule, a as criticalPath, b as controlDag, c as unmetOutputs, d as StatusExplanation, f as explainStatus, g as StatusBasis, h as ProducerBasis, i as blockedBy, j as UnsupportedConditionError, k as FactRecord, l as whatIfDone, m as IncomingBasis, n as UnmetOutput, o as impact, p as ArtefactBasis, r as WhatIf, s as readySet, t as StatusChange, u as ChainLink, v as deriveStatuses, w as criticalPath$1, x as illegalCycles, y as statusRules, z as Branch } from "./index-
|
|
2
|
-
import { A as
|
|
3
|
-
import { A as
|
|
1
|
+
import { A as Facts, B as Status, C as CriticalPath, D as UnknownReference, E as NodeId, F as evaluateBranches, I as factNamesIn, L as factsFrom, M as artefactKey, N as elementStatusKey, O as buildDag, P as emptyFactRecord, R as layeredFacts, S as loopTransitions, T as Dag, V as statuses, _ as StatusRule, a as criticalPath, b as controlDag, c as unmetOutputs, d as StatusExplanation, f as explainStatus, g as StatusBasis, h as ProducerBasis, i as blockedBy, j as UnsupportedConditionError, k as FactRecord, l as whatIfDone, m as IncomingBasis, n as UnmetOutput, o as impact, p as ArtefactBasis, r as WhatIf, s as readySet, t as StatusChange, u as ChainLink, v as deriveStatuses, w as criticalPath$1, x as illegalCycles, y as statusRules, z as Branch } from "./index-wQnLXJmD.js";
|
|
2
|
+
import { A as Participant, B as ParticipantKind, C as ActionDef, D as Extensions, E as EventDef, F as ElementKind, G as notations, H as elementKinds, I as FragmentOperator, J as pseudoRoles, K as overlayStatuses, L as MessageMode, M as Projection, N as Transition, O as Fragment, P as Views, R as Notation, S as defineModel, T as Element, U as fragmentOperators, V as PseudoRole, W as messageModes, X as OpenIds, Y as IdSpace, _ as validate, a as BoundActivitySchema, b as Model, c as modelSchema, d as OverlayParseError, f as overlaySchema, g as IssueCode, h as Issue, i as BoundActivity, j as Point, k as FragmentOperand, l as Overlay, m as validateOverlay, n as ModelParseError, o as ModelSchema, p as parseOverlay, q as participantKinds, r as parseModel, s as boundActivitySchema, t as ModelIssue, u as OverlayIssue, v as inputsOf, w as ArtefactDef, x as ModelParts, y as outputsOf, z as OverlayStatus } from "./index-DYl6lZLe.js";
|
|
3
|
+
import { A as toSwimlane, C as toSequence, D as toStateMachine, E as StateMachineTransition, F as Handoff, I as handoffs, L as Loss, M as FlowNode, N as Flowchart, O as Lane, P as toFlowchart, R as UnrepresentedElement, S as SequenceOperand, T as StateMachineState, _ as applyModelDiff, a as ProjectedView, b as SequenceItem, c as Addressing, d as Ends, f as EventChange, g as UnconfirmedChangeError, h as TransitionFieldChange, i as diffSwimlane, j as FlowEdge, k as Swimlane, l as Change, m as TransitionChange, n as diffStateMachine, o as ViewsByNotation, p as ModelDiff, r as diffFlowchart, s as project, t as diffSequence, u as ElementChange, v as confirmChanges, w as StateMachine, x as SequenceMessage, y as SequenceDiagram, z as UnrepresentedKind } from "./index-DluJZTbT.js";
|
|
4
|
+
import { a as flowchartToMermaid, c as swimlaneToMermaid, d as viewText, i as swimlaneToDot, l as ExportFormat, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot, u as exportFormats } from "./index-DAevZqW-.js";
|
|
4
5
|
//#region ../../core/graph/dag/dist/errors.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* Thrown when an operation that is only defined on an acyclic graph is given one that contains a cycle.
|
|
@@ -108,4 +109,24 @@ declare namespace index_d_exports {
|
|
|
108
109
|
export { CriticalPath, CycleError, Dag, NodeId, TopologicalLayers, UnknownNodeError, UnknownReference, ancestorsOf, buildDag, criticalPath$1 as criticalPath, descendantsOf, findCycles, immediateDominators, stronglyConnectedComponents, topologicalLayers, transitiveReduction };
|
|
109
110
|
}
|
|
110
111
|
//#endregion
|
|
111
|
-
export
|
|
112
|
+
//#region ../../core/graph/export/dist/terminal-text.d.ts
|
|
113
|
+
/**
|
|
114
|
+
* Whether a character is one of the unsafe ones (see `unsafeCharacters`).
|
|
115
|
+
* @param character - One character: one code point, which may be two UTF-16 code units.
|
|
116
|
+
* @returns Whether it must be escaped.
|
|
117
|
+
*/
|
|
118
|
+
export declare const isUnsafeCharacter: (character: string) => boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Text made safe to write to a terminal. Each unsafe character (see `unsafeCharacters`) is written as the visible escape `\u{<hex>}` of its code point, such as `\u{1b}` for ESC, `\u{202e}` for a right-to-left override or `\u{e0041}` for a tag character, so nothing is lost and nothing acts on the terminal. Line feed, tab, the zero-width joiners and every other character, accented letters, CJK, Arabic and emoji included, pass through. A literal `\u{...}` already in the text is left as it is, so the escaped form is for reading, not for reversing.
|
|
121
|
+
* @param text - The text as written.
|
|
122
|
+
* @returns The text with every unsafe character escaped.
|
|
123
|
+
*/
|
|
124
|
+
export declare const terminalText: (text: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* A value as JSON that is also safe to write to a terminal. `JSON.stringify` escapes the C0 controls but writes every other unsafe character (see `unsafeCharacters`) as it is; this writes those as `\u` escapes too, a surrogate pair for a code point beyond the Basic Multilingual Plane, which leaves the JSON, and every value parsed from it, exactly the same.
|
|
127
|
+
* @param value - The value to write.
|
|
128
|
+
* @returns The JSON text, indented by two spaces and ending in a line break.
|
|
129
|
+
*/
|
|
130
|
+
export declare const terminalJson: (value: unknown) => string;
|
|
131
|
+
//#endregion
|
|
132
|
+
export { type ActionDef, type Addressing, type ArtefactBasis, type ArtefactDef, type BoundActivity, type BoundActivitySchema, type Branch, type ChainLink, type Change, type Element, type ElementChange, type ElementKind, type Ends, type EventChange, type EventDef, type ExportFormat, type Extensions, type FactRecord, type Facts, type FlowEdge, type FlowNode, type Flowchart, type Fragment, type FragmentOperand, type FragmentOperator, type Handoff, type IdSpace, type IncomingBasis, type Issue, type IssueCode, type Lane, type Loss, type MessageMode, type Model, type ModelDiff, type ModelIssue, ModelParseError, type ModelParts, type ModelSchema, type Notation, type OpenIds, type Overlay, type OverlayIssue, OverlayParseError, type OverlayStatus, type Participant, type ParticipantKind, type Point, type ProducerBasis, type ProjectedView, type Projection, type PseudoRole, type SequenceDiagram, type SequenceItem, type SequenceMessage, type SequenceOperand, type StateMachine, type StateMachineState, type StateMachineTransition, type Status, type StatusBasis, type StatusChange, type StatusExplanation, type StatusRule, type Swimlane, type Transition, type TransitionChange, type TransitionFieldChange, UnconfirmedChangeError, type UnmetOutput, type UnrepresentedElement, type UnrepresentedKind, UnsupportedConditionError, type Views, type ViewsByNotation, type WhatIf, applyModelDiff, artefactKey, blockedBy, boundActivitySchema, confirmChanges, controlDag, criticalPath, index_d_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
|