foldkit-surface 0.14.0 → 0.15.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 +205 -6
- package/dist/closure.d.ts +75 -0
- package/dist/closure.d.ts.map +1 -0
- package/dist/closure.js +95 -0
- package/dist/closure.js.map +1 -0
- package/dist/graph.d.ts +238 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +350 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +56 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -23
- package/dist/index.js.map +1 -1
- package/dist/messageTags.d.ts +9 -0
- package/dist/messageTags.d.ts.map +1 -0
- package/dist/messageTags.js +14 -0
- package/dist/messageTags.js.map +1 -0
- package/dist/text.d.ts +6 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +8 -0
- package/dist/text.js.map +1 -0
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Optic, Option, Result, Schema } from "effect";
|
|
2
|
-
import { Metadata, Metadata as Metadata$1, MetadataKey, MetadataSummary, MetadataSummary as MetadataSummary$1, MetadataTypeId } from "foldkit-metadata";
|
|
2
|
+
import { Evidence, Metadata, Metadata as Metadata$1, MetadataKey, MetadataSummary, MetadataSummary as MetadataSummary$1, MetadataTypeId } from "foldkit-metadata";
|
|
3
|
+
import { Closure, ClosureProjection, ClosureViolation } from "./closure.js";
|
|
4
|
+
import { Breaker, ContractLaws, ContractLaws as ContractLaws$1, Graph, GraphEdge, GraphFacts, GraphNode, GraphOptions, GraphSpace } from "./graph.js";
|
|
3
5
|
import { Diagnostic, Diagnostics, ReportDiagnostic } from "./diagnostics.js";
|
|
4
6
|
import { CacheOptions, CachePolicy, CacheStore, CachedRead, PageCacheStore, PageReads, WorkersCache, WorkersKv, cachePolicy, maxAgeSeconds, shorterPolicy } from "./edgeCache.js";
|
|
5
7
|
import { Html, HtmlBuilder } from "foldkit/html";
|
|
@@ -124,8 +126,8 @@ export interface WritableProjection<Model, Fields extends Schema.Struct.Fields>
|
|
|
124
126
|
}
|
|
125
127
|
type OfSelection<F extends Schema.Struct.Fields> = { readonly [K in keyof F]?: true | Projection<Schema.Schema.Type<F[K]>, unknown>; };
|
|
126
128
|
type OfValue<F extends Schema.Struct.Fields, Sel> = { readonly [K in keyof Sel & keyof F]: Sel[K] extends true ? Schema.Schema.Type<F[K]> : Sel[K] extends Projection<any, infer V> ? V : never; };
|
|
127
|
-
type EntryValue<E> = E extends Projection<any, infer V> ? V : E extends ModelRef<any, infer V> ? V : never;
|
|
128
|
-
type EntryRoot<E> = E extends Projection<infer R, any> ? R : E extends ModelRef<infer R, any> ? R : never;
|
|
129
|
+
type EntryValue<E> = E extends Projection<any, infer V> ? V : E extends ModelRef<any, infer V> ? V : E extends ModeledDerived<any, infer V> ? V : never;
|
|
130
|
+
type EntryRoot<E> = E extends Projection<infer R, any> ? R : E extends ModelRef<infer R, any> ? R : E extends ModeledDerived<infer R, any> ? R : never;
|
|
129
131
|
type EntryRoots<Entries> = { readonly [K in keyof Entries]: EntryRoot<Entries[K]>; };
|
|
130
132
|
/** `true` when the union has more than one member. Used to reject mixed roots. */
|
|
131
133
|
type IsUnion<T, U = T> = [T] extends [never] ? false : T extends unknown ? [U] extends [T] ? false : true : never;
|
|
@@ -135,9 +137,13 @@ export interface Derived<Root, Value> {
|
|
|
135
137
|
readonly dependencies: DependencyTree;
|
|
136
138
|
readonly read: (root: Root) => Value;
|
|
137
139
|
}
|
|
140
|
+
/** A `Derived` that names the Schema of its value (`derive`'s `Model` option), so a `Projection.struct` can hold it. */
|
|
141
|
+
export interface ModeledDerived<Root, Value> extends Derived<Root, Value> {
|
|
142
|
+
readonly Model: Schema.Codec<Value, unknown>;
|
|
143
|
+
}
|
|
138
144
|
export declare const Projection: {
|
|
139
145
|
of: <F extends Schema.Struct.Fields>(schema: Schema.Struct<F>) => <const Sel extends OfSelection<F>>(selection: Sel) => Projection<Schema.Struct.Type<F>, OfValue<F, Sel>>;
|
|
140
|
-
struct: <const Entries extends Record<string, Projection<any, any> | ModelRef<any, any>>>(entries: Entries & (IsUnion<EntryRoots<Entries>[keyof Entries]> extends true ? never : unknown)) => Projection<EntryRoot<Entries[keyof Entries]>, StructValue<Entries>>;
|
|
146
|
+
struct: <const Entries extends Record<string, Projection<any, any> | ModelRef<any, any> | ModeledDerived<any, any>>>(entries: Entries & (IsUnion<EntryRoots<Entries>[keyof Entries]> extends true ? never : unknown)) => Projection<EntryRoot<Entries[keyof Entries]>, StructValue<Entries>>;
|
|
141
147
|
/**
|
|
142
148
|
* Maps a Projection over an array: `array(p): Projection<ReadonlyArray<Root>,
|
|
143
149
|
* ReadonlyArray<Value>>`. Nesting is explicit (an array of arrays stays an
|
|
@@ -174,6 +180,11 @@ export declare const Projection: {
|
|
|
174
180
|
* `import.meta.env?.DEV === true`, as `Remote.make`'s `verifyPredictions` takes it;
|
|
175
181
|
* it doubles the work, so leave it off in production.
|
|
176
182
|
*
|
|
183
|
+
* `Model`, the Schema of the value, makes the result a `ModeledDerived`, which
|
|
184
|
+
* a `Projection.struct` takes as an entry: the struct reads the memoized
|
|
185
|
+
* value, and the Surface checks it against `Model`. A Derived plans no
|
|
186
|
+
* requirements, whatever `on` holds.
|
|
187
|
+
*
|
|
177
188
|
* @example
|
|
178
189
|
* ```ts
|
|
179
190
|
* const shown = Projection.derive([App.model.todos, App.model.filter], (model: Model) =>
|
|
@@ -182,11 +193,19 @@ export declare const Projection: {
|
|
|
182
193
|
* // In the view: shown.read(model)
|
|
183
194
|
* ```
|
|
184
195
|
*/
|
|
185
|
-
derive:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
196
|
+
derive: {
|
|
197
|
+
<Root, Value>(on: ReadonlyArray<ModelRef<Root, any> | {
|
|
198
|
+
readonly dependencies: DependencyTree;
|
|
199
|
+
}>, derive: (root: Root) => Value, options: {
|
|
200
|
+
readonly verify?: boolean | undefined;
|
|
201
|
+
readonly Model: Schema.Codec<Value, unknown>;
|
|
202
|
+
}): ModeledDerived<Root, Value>;
|
|
203
|
+
<Root, Value>(on: ReadonlyArray<ModelRef<Root, any> | {
|
|
204
|
+
readonly dependencies: DependencyTree;
|
|
205
|
+
}>, derive: (root: Root) => Value, options?: {
|
|
206
|
+
readonly verify?: boolean | undefined;
|
|
207
|
+
}): Derived<Root, Value>;
|
|
208
|
+
};
|
|
190
209
|
/**
|
|
191
210
|
* Derives a writable projection from generated Model field references:
|
|
192
211
|
* `Projection.pick(App.model.todos, App.model.selectedTodoId)` infers
|
|
@@ -236,6 +255,8 @@ export interface Surface<Root, Model, Message, Params> {
|
|
|
236
255
|
readonly Params: ParamsSchema<Params>;
|
|
237
256
|
readonly Message: Schema.Schema<Message>;
|
|
238
257
|
readonly messages: readonly unknown[];
|
|
258
|
+
/** Declared `closed: true`: `Closure.violations` tests it in a walk. */
|
|
259
|
+
readonly closed: boolean;
|
|
239
260
|
readonly projection: (params: Params) => Projection<Root, Model>;
|
|
240
261
|
}
|
|
241
262
|
/**
|
|
@@ -401,6 +422,7 @@ export interface Application<Root, F extends Schema.Struct.Fields, Cases extends
|
|
|
401
422
|
readonly params: ParamsOf<Params>;
|
|
402
423
|
}) => Shape;
|
|
403
424
|
readonly messages?: Ms;
|
|
425
|
+
readonly closed?: boolean;
|
|
404
426
|
}) => Surface<Root, ModelOf<Root, Shape>, MsgOf<Ms>, ParamsOf<Params>>;
|
|
405
427
|
/**
|
|
406
428
|
* This application made runnable, once its update exists: the same
|
|
@@ -586,6 +608,11 @@ export declare const Surface: {
|
|
|
586
608
|
readonly params: Params;
|
|
587
609
|
}) => Projection<Root, Model>;
|
|
588
610
|
readonly messages?: Ms;
|
|
611
|
+
/**
|
|
612
|
+
* The projection after a Message in `messages` depends only on the projection before and
|
|
613
|
+
* the Message, and no other Message changes it; `Closure.violations` tests both.
|
|
614
|
+
*/
|
|
615
|
+
readonly closed?: boolean;
|
|
589
616
|
}) => Surface<Root, Model, MsgOf<Ms>, Params>;
|
|
590
617
|
read: <Root, Model, Message, Params>(surface: Surface<Root, Model, Message, Params>, root: Root, ...params: ParamsArgument<Params>) => Model;
|
|
591
618
|
/**
|
|
@@ -634,6 +661,15 @@ export interface Contract {
|
|
|
634
661
|
readonly messages: readonly string[];
|
|
635
662
|
/** What interpreters attached to the contract's reads, as text. */
|
|
636
663
|
readonly metadata: readonly MetadataSummary$1[];
|
|
664
|
+
/** A Surface declared `closed: true`; absent for any other contract. */
|
|
665
|
+
readonly closed?: true;
|
|
666
|
+
/**
|
|
667
|
+
* The laws the contract holds and the transitions that can break them, as
|
|
668
|
+
* the declarations themselves: `Graph.of` derives their nodes and edges
|
|
669
|
+
* when asked, so a page that never imports `Graph` carries none of that code. Absent
|
|
670
|
+
* for a contract with none.
|
|
671
|
+
*/
|
|
672
|
+
readonly laws?: ContractLaws$1 | undefined;
|
|
637
673
|
}
|
|
638
674
|
/**
|
|
639
675
|
* How one integration joins an application, as data and pure functions: the
|
|
@@ -677,7 +713,8 @@ export interface Module<Root, F extends Schema.Struct.Fields, Cases extends Reco
|
|
|
677
713
|
readonly contracts: readonly Contract[];
|
|
678
714
|
}
|
|
679
715
|
export interface Finding {
|
|
680
|
-
|
|
716
|
+
/** The last four are `Graph.validate`'s, over the laws; the rest are `Module.validate`'s. */
|
|
717
|
+
readonly rule: 'foreign-contract' | 'duplicate-name' | 'ownership-overlap' | 'message-claimed-twice' | 'unknown-path' | 'unknown-message' | 'law-unwitnessed' | 'evidence-unmatched' | 'level-declared-twice' | 'transition-declared-twice';
|
|
681
718
|
/** `kind:name` of each contract involved. */
|
|
682
719
|
readonly contracts: readonly string[];
|
|
683
720
|
readonly message: string;
|
|
@@ -694,7 +731,7 @@ export interface ModuleManifest {
|
|
|
694
731
|
readonly fields: readonly string[];
|
|
695
732
|
readonly messages: readonly string[];
|
|
696
733
|
readonly ownership: readonly Ownership[];
|
|
697
|
-
readonly contracts: readonly Omit<Contract, 'owner'>[];
|
|
734
|
+
readonly contracts: readonly Omit<Contract, 'owner' | 'laws'>[];
|
|
698
735
|
readonly findings: readonly Finding[];
|
|
699
736
|
}
|
|
700
737
|
/** A value `Module.make` accepts: a contract, a value carrying one, or a Surface without params. */
|
|
@@ -719,7 +756,8 @@ export declare const Module: {
|
|
|
719
756
|
* Cross-contract invariants the types cannot express: a contract from another
|
|
720
757
|
* application, a duplicate `kind:name`, two owners of overlapping Model paths,
|
|
721
758
|
* a Message recorded by two replication contracts, and a path or Message the
|
|
722
|
-
* application does not declare.
|
|
759
|
+
* application does not declare. The rules over the contracts' laws are
|
|
760
|
+
* `Graph.validate`'s.
|
|
723
761
|
*/
|
|
724
762
|
validate: (module: Module<any, any, any>) => readonly Finding[];
|
|
725
763
|
/**
|
|
@@ -728,13 +766,17 @@ export declare const Module: {
|
|
|
728
766
|
* given Module, so it can be committed and diffed.
|
|
729
767
|
*/
|
|
730
768
|
manifest: (module: Module<any, any, any>) => ModuleManifest;
|
|
731
|
-
/**
|
|
769
|
+
/**
|
|
770
|
+
* The manifest as Markdown: the ownership tree, a table of contracts, and
|
|
771
|
+
* findings. `Graph.toMarkdown` writes the laws.
|
|
772
|
+
*/
|
|
732
773
|
toMarkdown: (module: Module<any, any, any>) => string;
|
|
733
774
|
/**
|
|
734
775
|
* The manifest as a Mermaid flowchart: Model fields in a subgraph, one node
|
|
735
776
|
* per contract, a solid edge for ownership and a dotted edge for observation.
|
|
777
|
+
* `Graph.toMermaid` draws the laws.
|
|
736
778
|
*/
|
|
737
779
|
toMermaid: (module: Module<any, any, any>) => string;
|
|
738
780
|
};
|
|
739
|
-
export { type CacheOptions, type CachePolicy, CacheStore, CachedRead, type Diagnostic, Diagnostics, Metadata, type MetadataKey, type MetadataSummary, MetadataTypeId, type PageCacheStore, PageReads, type ReportDiagnostic, type WorkersCache, type WorkersKv, cachePolicy, maxAgeSeconds, shorterPolicy };
|
|
781
|
+
export { type Breaker, type CacheOptions, type CachePolicy, CacheStore, CachedRead, Closure, type ClosureProjection, ClosureViolation, type ContractLaws, type Diagnostic, Diagnostics, Evidence, Graph, GraphEdge, type GraphFacts, GraphNode, type GraphOptions, type GraphSpace, Metadata, type MetadataKey, type MetadataSummary, MetadataTypeId, type PageCacheStore, PageReads, type ReportDiagnostic, type WorkersCache, type WorkersKv, cachePolicy, maxAgeSeconds, shorterPolicy };
|
|
740
782
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Metadata","MetadataSummary","ManagedResourceEntry"],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Metadata","MetadataSummary","ContractLaws","ManagedResourceEntry"],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAmEa;;iBAGI,MAAM,MAAM,OAAO;;WAEzB,QAAQ,OAAO,MAAM,OAAO;WAC5B,OAAO,MAAM,SAAS,MAAM;;WAE5B;WACA,MAAM,MAAM,SAAS;WACrB,MAAM,MAAM,MAAM,OAAO,UAAU;;;;;;;WAOnC,SAAS,MAAM,MAAM,KAAK,OAAO,UAAU,UAAU;;;;;;iBAO/C,SAAS,MAAM,OAAO;YAC3B,YAAY,MAAM,MAAM,OAAO;;;;;;;iBAQ1B,SACf,MACA,OACA,6BACA,2BACQ,SAAS,MAAM,OAAO;YACpB,YAAY,MAAM,MAAM,OAAO;aAC9B,KAAK;;aAEL;;;qBAmBA;;;;;EAKX,YAAY,MAAM,OAAK,QACb,OAAO,OAAO,QAAM,OACrB,MAAM,SAAS,MAAM,QAAM,mCAEjC,SAAS,MAAM;;;;;;EAclB,QAAQ;cAAsB;KAAoB,KAAO,MAAI,SAAS;;EAGtE,KAAE,mBAAoB,SAAS;;YAIrB,QAAQ,MAAM,UAAU,OAAO,OAAO,sBACtC,WAAW,aAAa,QAAQ,MAAM,EAAE,IAAI;;iBAIvC,QAAQ,MAA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AAeC,MAAqB,OAAO;;WAG/C,WAAW;;;iBAIL,OACf,MACA,UAAU,OAAO,OAAO,QACxB,cAAc,eAAe,OAAO,OAAO;WAElC,KAAK,SAAS,MAAM,GAAG;WACvB,oBAAoB;;iBAGd;;WAEN;;WAYA;WACA;;;iBAIM;WACN;WACA;aAAkB;aAAuB;;;iBAGnC;WACN;WACA;WACA,oBAAoB;WACpB,oBAAoB,KAAK;WACzB,mBAAmB;;;YAIlB,WAAW,QACnB;WACW,UAAU;IACrB,QAAQ;;;;;;;;;;;qBAkCC;EACX,OAAO,MAAM,UAAU,OAAO,OAAO,QAAQ,cAAc,eAAe,OAAO,OAAO,SAAO,KACxF,SAAS,MAAM,GAAG,QAAM,iBACb,WAAW,YAC1B,OAAO,MAAM,GAAG;;EAGnB,MAAM,MAAM,UAAU,OAAO,OAAO,QAAQ,cAAc,eAAe,OAAO,OAAO,SAAO,QACpF,OAAO,MAAM,GAAG,WAAM,gBACX,WAAW,YAC7B,OAAO,MAAM,GAAG;;;;;;;;EAYnB,WAAQ,QAAW,mCAAiC;;;;;;EA6EpD,WAAQ,QAAW,0BAAwB;;;;;EA6B3C,aAAU,QAAW;;;;;;EAiCrB,YAAS,QAAW"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Equal, Optic, Option, Predicate, Result, Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import { hasTagIn, messageTag, messageTags } from "./messageTags.js";
|
|
3
|
+
import { Evidence, Metadata, Metadata as Metadata$1, MetadataTypeId } from "foldkit-metadata";
|
|
4
|
+
import { labelOf, pathText, tableCell } from "./text.js";
|
|
5
|
+
import { Closure, ClosureViolation } from "./closure.js";
|
|
6
|
+
import { Graph, GraphEdge, GraphNode } from "./graph.js";
|
|
3
7
|
import { Diagnostics } from "./diagnostics.js";
|
|
4
8
|
import { CacheStore, CachedRead, PageReads, cachePolicy, maxAgeSeconds, shorterPolicy } from "./edgeCache.js";
|
|
5
9
|
// src/index.ts
|
|
@@ -51,15 +55,6 @@ function propertyReader(root, key) {
|
|
|
51
55
|
function optionalReader(value) {
|
|
52
56
|
return value === void 0 ? Option.none() : Option.some(value);
|
|
53
57
|
}
|
|
54
|
-
/** Reads the tag off a Foldkit Message constructor without constructing one. */
|
|
55
|
-
const messageTag = (constructor) => {
|
|
56
|
-
const literal = constructor.fields?._tag?.ast?.literal;
|
|
57
|
-
return typeof literal === "string" ? literal : void 0;
|
|
58
|
-
};
|
|
59
|
-
/** Whether a Message, of an application this cannot name, has one of `tags`. */
|
|
60
|
-
const hasTagIn = (tags, message) => Predicate.hasProperty(message, "_tag") && typeof message._tag === "string" && tags.has(message._tag);
|
|
61
|
-
/** The tags of the Messages a Surface lists in `messages`. */
|
|
62
|
-
const messageTags = (surface) => surface.messages.map(messageTag).filter((tag) => tag !== void 0);
|
|
63
58
|
function makeTree(schema, path, optic, get, optional = false, set, owner) {
|
|
64
59
|
const erasedOptic = optic;
|
|
65
60
|
const setFocus = set ?? ((root, value) => optic.replace(value, root));
|
|
@@ -193,9 +188,10 @@ const Projection = {
|
|
|
193
188
|
dependencies.push(focus.dependency);
|
|
194
189
|
readers.push([key, focus.get]);
|
|
195
190
|
} else {
|
|
191
|
+
if (entry.Model === void 0) throw new Error(`Projection.struct: "${key}" is a Derived with no Model. Pass the Schema of its value: Projection.derive(on, derive, { Model }).`);
|
|
196
192
|
picked[key] = entry.Model;
|
|
197
193
|
dependencies.push(...entry.dependencies);
|
|
198
|
-
metadata.push(entry.metadata);
|
|
194
|
+
if ("metadata" in entry) metadata.push(entry.metadata);
|
|
199
195
|
nesteds.push(entry);
|
|
200
196
|
readers.push([key, entry.read]);
|
|
201
197
|
}
|
|
@@ -255,6 +251,11 @@ const Projection = {
|
|
|
255
251
|
* `import.meta.env?.DEV === true`, as `Remote.make`'s `verifyPredictions` takes it;
|
|
256
252
|
* it doubles the work, so leave it off in production.
|
|
257
253
|
*
|
|
254
|
+
* `Model`, the Schema of the value, makes the result a `ModeledDerived`, which
|
|
255
|
+
* a `Projection.struct` takes as an entry: the struct reads the memoized
|
|
256
|
+
* value, and the Surface checks it against `Model`. A Derived plans no
|
|
257
|
+
* requirements, whatever `on` holds.
|
|
258
|
+
*
|
|
258
259
|
* @example
|
|
259
260
|
* ```ts
|
|
260
261
|
* const shown = Projection.derive([App.model.todos, App.model.filter], (model: Model) =>
|
|
@@ -263,13 +264,14 @@ const Projection = {
|
|
|
263
264
|
* // In the view: shown.read(model)
|
|
264
265
|
* ```
|
|
265
266
|
*/
|
|
266
|
-
derive: (on, derive, options = {}) => {
|
|
267
|
+
derive: ((on, derive, options = {}) => {
|
|
267
268
|
if (on.length === 0) throw new Error("Projection.derive: it names nothing it reads, so nothing could tell it to work the value out again. Name field references, or Projections built from them.");
|
|
268
269
|
const parts = on.map((entry) => RefTypeId in entry ? { dependencies: [entry[RefTypeId].dependency] } : entry);
|
|
269
270
|
const dependencies = mergeDependencies(parts.flatMap((part) => part.dependencies));
|
|
270
271
|
const always = parts.some(unnamed);
|
|
271
272
|
let last;
|
|
272
273
|
const derived = {
|
|
274
|
+
...options.Model === void 0 ? {} : { Model: options.Model },
|
|
273
275
|
dependencies,
|
|
274
276
|
read: (root) => {
|
|
275
277
|
const values = dependencies.map((path) => valueAt(root, path));
|
|
@@ -286,7 +288,7 @@ const Projection = {
|
|
|
286
288
|
};
|
|
287
289
|
if (always) readsUnnamed.add(derived);
|
|
288
290
|
return derived;
|
|
289
|
-
},
|
|
291
|
+
}),
|
|
290
292
|
/**
|
|
291
293
|
* Derives a writable projection from generated Model field references:
|
|
292
294
|
* `Projection.pick(App.model.todos, App.model.selectedTodoId)` infers
|
|
@@ -385,7 +387,8 @@ function application(config) {
|
|
|
385
387
|
const shape = surfaceConfig.model(context);
|
|
386
388
|
return isProjection(shape) ? shape : Projection.struct(shape);
|
|
387
389
|
},
|
|
388
|
-
messages: surfaceConfig.messages
|
|
390
|
+
messages: surfaceConfig.messages,
|
|
391
|
+
closed: surfaceConfig.closed
|
|
389
392
|
});
|
|
390
393
|
const made = {
|
|
391
394
|
...scope,
|
|
@@ -618,6 +621,7 @@ const Surface = {
|
|
|
618
621
|
Params: config.Params,
|
|
619
622
|
Message: Schema.Never,
|
|
620
623
|
messages: config.messages ?? [],
|
|
624
|
+
closed: config.closed ?? false,
|
|
621
625
|
projection
|
|
622
626
|
};
|
|
623
627
|
},
|
|
@@ -656,7 +660,8 @@ const Surface = {
|
|
|
656
660
|
owns: [],
|
|
657
661
|
observes: projection.dependencies,
|
|
658
662
|
messages: messageTags(surface),
|
|
659
|
-
metadata: Metadata$1.summarize(projection.metadata)
|
|
663
|
+
metadata: Metadata$1.summarize(projection.metadata),
|
|
664
|
+
...surface.closed ? { closed: true } : {}
|
|
660
665
|
};
|
|
661
666
|
},
|
|
662
667
|
/**
|
|
@@ -673,10 +678,8 @@ const Surface = {
|
|
|
673
678
|
};
|
|
674
679
|
}
|
|
675
680
|
};
|
|
676
|
-
const label =
|
|
677
|
-
|
|
678
|
-
const tableCell = (text) => text.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\r\n?|\n/g, " ");
|
|
679
|
-
const pathKey = (path) => path.join(".");
|
|
681
|
+
const label = labelOf;
|
|
682
|
+
const pathKey = pathText;
|
|
680
683
|
const isPrefix = (prefix, path) => prefix.length <= path.length && prefix.every((segment, index) => segment === path[index]);
|
|
681
684
|
const toContract = (item) => "contract" in item ? item.contract : "projection" in item ? Surface.contract(item, void 0) : item;
|
|
682
685
|
const applicationTags = (app) => Object.entries(app.Message).filter(([key, value]) => messageTag(value) === key).map(([key]) => key);
|
|
@@ -706,7 +709,8 @@ const Module = {
|
|
|
706
709
|
* Cross-contract invariants the types cannot express: a contract from another
|
|
707
710
|
* application, a duplicate `kind:name`, two owners of overlapping Model paths,
|
|
708
711
|
* a Message recorded by two replication contracts, and a path or Message the
|
|
709
|
-
* application does not declare.
|
|
712
|
+
* application does not declare. The rules over the contracts' laws are
|
|
713
|
+
* `Graph.validate`'s.
|
|
710
714
|
*/
|
|
711
715
|
validate: (module) => {
|
|
712
716
|
const findings = [];
|
|
@@ -793,11 +797,14 @@ const Module = {
|
|
|
793
797
|
fields: Object.keys(module.app.Model.fields),
|
|
794
798
|
messages: applicationTags(module.app),
|
|
795
799
|
ownership,
|
|
796
|
-
contracts: module.contracts.map(({ owner: _owner, ...rest }) => rest),
|
|
800
|
+
contracts: module.contracts.map(({ owner: _owner, laws: _laws, ...rest }) => rest),
|
|
797
801
|
findings: Module.validate(module)
|
|
798
802
|
};
|
|
799
803
|
},
|
|
800
|
-
/**
|
|
804
|
+
/**
|
|
805
|
+
* The manifest as Markdown: the ownership tree, a table of contracts, and
|
|
806
|
+
* findings. `Graph.toMarkdown` writes the laws.
|
|
807
|
+
*/
|
|
801
808
|
toMarkdown: (module) => {
|
|
802
809
|
const manifest = Module.manifest(module);
|
|
803
810
|
const lines = ["```text", "Model"];
|
|
@@ -818,6 +825,7 @@ const Module = {
|
|
|
818
825
|
/**
|
|
819
826
|
* The manifest as a Mermaid flowchart: Model fields in a subgraph, one node
|
|
820
827
|
* per contract, a solid edge for ownership and a dotted edge for observation.
|
|
828
|
+
* `Graph.toMermaid` draws the laws.
|
|
821
829
|
*/
|
|
822
830
|
toMermaid: (module) => {
|
|
823
831
|
const manifest = Module.manifest(module);
|
|
@@ -842,6 +850,6 @@ const Module = {
|
|
|
842
850
|
return lines.join("\n");
|
|
843
851
|
}
|
|
844
852
|
};
|
|
845
|
-
export { Action, CacheStore, CachedRead, Diagnostics, MessageSet, Metadata, MetadataTypeId, ModelRef, Module, PageReads, Projection, RefTypeId, Surface, cachePolicy, maxAgeSeconds, shorterPolicy };
|
|
853
|
+
export { Action, CacheStore, CachedRead, Closure, ClosureViolation, Diagnostics, Evidence, Graph, GraphEdge, GraphNode, MessageSet, Metadata, MetadataTypeId, ModelRef, Module, PageReads, Projection, RefTypeId, Surface, cachePolicy, maxAgeSeconds, shorterPolicy };
|
|
846
854
|
|
|
847
855
|
//# sourceMappingURL=index.js.map
|