deltafold 0.1.0 → 0.2.1
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 +96 -1
- package/dist/changelog.d.ts +10 -10
- package/dist/changelog.js +4 -4
- package/dist/changelog.js.map +1 -1
- package/dist/{document-BZcZo9nr.js → document-HfPyYxEd.js} +20 -20
- package/dist/{document-BZcZo9nr.js.map → document-HfPyYxEd.js.map} +1 -1
- package/dist/{document-DWHsgywm.d.ts → document-gtXeGFJR.d.ts} +41 -41
- package/dist/{document-DWHsgywm.d.ts.map → document-gtXeGFJR.d.ts.map} +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.js +2 -2
- package/dist/html.js.map +1 -1
- package/dist/index.d.ts +681 -102
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +908 -235
- package/dist/index.js.map +1 -1
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +2 -2
- package/dist/markdown.js.map +1 -1
- package/dist/{mdast-DiRsYwPU.js → mdast-Oqkh0Gs1.js} +2 -2
- package/dist/{mdast-DiRsYwPU.js.map → mdast-Oqkh0Gs1.js.map} +1 -1
- package/dist/{package-BfBYnaCz.d.ts → package-CA5R57IC.d.ts} +117 -112
- package/dist/{package-BfBYnaCz.d.ts.map → package-CA5R57IC.d.ts.map} +1 -1
- package/package.json +3 -3
- package/src/features/documents/changelog.ts +8 -8
- package/src/features/documents/document.ts +39 -39
- package/src/features/documents/index.ts +2 -2
- package/src/features/execution/executor.ts +631 -272
- package/src/features/execution/handler.ts +205 -84
- package/src/features/execution/interaction.ts +174 -0
- package/src/features/execution/observation.ts +489 -0
- package/src/features/execution/observer.ts +395 -0
- package/src/features/execution/promise-callback.ts +76 -0
- package/src/features/package.ts +3 -3
- package/src/features/planning/history.ts +10 -10
- package/src/features/planning/identifiers.ts +7 -4
- package/src/features/planning/resolve-error.ts +13 -13
- package/src/features/planning/resolve.ts +11 -4
- package/src/features/planning/rewrite.ts +1 -1
- package/src/features/planning/validate.ts +1 -1
- package/src/foundation/action.ts +17 -17
- package/src/foundation/change.ts +10 -10
- package/src/foundation/instruction.ts +5 -5
- package/src/foundation/migration.ts +12 -12
- package/src/foundation/plan.ts +23 -18
- package/src/foundation/rule.ts +6 -6
- package/src/foundation/shortcut.ts +6 -6
- package/src/foundation/version.ts +6 -6
- package/src/index.ts +15 -11
- package/src/renderers/html.ts +1 -1
- package/src/renderers/markdown.ts +1 -1
|
@@ -4,7 +4,7 @@ type Scalar = string | number | boolean | bigint;
|
|
|
4
4
|
/**
|
|
5
5
|
* Literal prose.
|
|
6
6
|
*
|
|
7
|
-
* @since
|
|
7
|
+
* @since 0.0.1
|
|
8
8
|
*/
|
|
9
9
|
type Text = {
|
|
10
10
|
readonly _tag: "Text";
|
|
@@ -13,13 +13,13 @@ type Text = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Prose content: text and action mentions.
|
|
15
15
|
*
|
|
16
|
-
* @since
|
|
16
|
+
* @since 0.0.1
|
|
17
17
|
*/
|
|
18
18
|
type Prose = ReadonlyArray<Text | Ref>;
|
|
19
19
|
/**
|
|
20
20
|
* Values accepted inside prose templates.
|
|
21
21
|
*
|
|
22
|
-
* @since
|
|
22
|
+
* @since 0.0.1
|
|
23
23
|
*/
|
|
24
24
|
type ProseValue = Scalar | Ref;
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ type ProseValue = Scalar | Ref;
|
|
|
27
27
|
* occurrence; when optimization removes the action, the block leaves the resolved guide
|
|
28
28
|
* with it.
|
|
29
29
|
*
|
|
30
|
-
* @since
|
|
30
|
+
* @since 0.0.1
|
|
31
31
|
*/
|
|
32
32
|
type Instruction<A extends Any$6 = Any$6> = {
|
|
33
33
|
readonly _tag: "Instruction";
|
|
@@ -44,7 +44,7 @@ type Instruction<A extends Any$6 = Any$6> = {
|
|
|
44
44
|
* `;
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
-
* @since
|
|
47
|
+
* @since 0.0.1
|
|
48
48
|
*/
|
|
49
49
|
declare const instruction: <A extends Any$6>(action: A) => (strings: TemplateStringsArray, ...values: ReadonlyArray<ProseValue>) => Instruction<A>;
|
|
50
50
|
declare namespace action_d_exports {
|
|
@@ -53,7 +53,7 @@ declare namespace action_d_exports {
|
|
|
53
53
|
/**
|
|
54
54
|
* Describes one kind of consumer-owned operation and its payload.
|
|
55
55
|
*
|
|
56
|
-
* @since
|
|
56
|
+
* @since 0.0.1
|
|
57
57
|
*/
|
|
58
58
|
type Kind<P> = {
|
|
59
59
|
readonly _tag: "ActionKind";
|
|
@@ -66,7 +66,7 @@ type Kind<P> = {
|
|
|
66
66
|
* One concrete instruction. Its `id` identifies the instruction across plans, handler
|
|
67
67
|
* bindings, rules, and reports.
|
|
68
68
|
*
|
|
69
|
-
* @since
|
|
69
|
+
* @since 0.0.1
|
|
70
70
|
*/
|
|
71
71
|
type Action<Id extends string = string, P = unknown> = {
|
|
72
72
|
readonly _tag: "Action";
|
|
@@ -79,13 +79,13 @@ type Action<Id extends string = string, P = unknown> = {
|
|
|
79
79
|
/**
|
|
80
80
|
* Any action instance.
|
|
81
81
|
*
|
|
82
|
-
* @since
|
|
82
|
+
* @since 0.0.1
|
|
83
83
|
*/
|
|
84
84
|
type Any$6 = Action<string, any>;
|
|
85
85
|
/**
|
|
86
86
|
* A mention of an action in prose. It does not declare an occurrence.
|
|
87
87
|
*
|
|
88
|
-
* @since
|
|
88
|
+
* @since 0.0.1
|
|
89
89
|
*/
|
|
90
90
|
type Ref = {
|
|
91
91
|
readonly _tag: "ActionRef";
|
|
@@ -94,7 +94,7 @@ type Ref = {
|
|
|
94
94
|
/**
|
|
95
95
|
* Children run one after another.
|
|
96
96
|
*
|
|
97
|
-
* @since
|
|
97
|
+
* @since 0.0.1
|
|
98
98
|
*/
|
|
99
99
|
type Sequence$1<A extends Any$6 = Any$6> = {
|
|
100
100
|
readonly _tag: "Sequence";
|
|
@@ -105,14 +105,14 @@ type Sequence$1<A extends Any$6 = Any$6> = {
|
|
|
105
105
|
/**
|
|
106
106
|
* How many branches of a parallel group may run at the same time.
|
|
107
107
|
*
|
|
108
|
-
* @since
|
|
108
|
+
* @since 0.0.1
|
|
109
109
|
*/
|
|
110
110
|
type Concurrency = number | "unbounded";
|
|
111
111
|
/**
|
|
112
112
|
* Branches are independent of each other and may run concurrently. The group asserts
|
|
113
113
|
* that independence; the concurrency limit only controls scheduling.
|
|
114
114
|
*
|
|
115
|
-
* @since
|
|
115
|
+
* @since 0.0.1
|
|
116
116
|
*/
|
|
117
117
|
type Parallel$1<A extends Any$6 = Any$6> = {
|
|
118
118
|
readonly _tag: "Parallel";
|
|
@@ -124,13 +124,13 @@ type Parallel$1<A extends Any$6 = Any$6> = {
|
|
|
124
124
|
/**
|
|
125
125
|
* A node that declares action occurrences.
|
|
126
126
|
*
|
|
127
|
-
* @since
|
|
127
|
+
* @since 0.0.1
|
|
128
128
|
*/
|
|
129
129
|
type Step$1<A extends Any$6 = Any$6> = A | Instruction<A> | Sequence$1<A> | Parallel$1<A>;
|
|
130
130
|
/**
|
|
131
131
|
* Extracts the action instances declared by a step.
|
|
132
132
|
*
|
|
133
|
-
* @since
|
|
133
|
+
* @since 0.0.1
|
|
134
134
|
*/
|
|
135
135
|
type ActionsOf$5<S> = S extends Action<infer Id, infer P> ? Action<Id, P> : S extends Instruction<infer A> ? A : S extends Sequence$1<infer A> ? A : S extends Parallel$1<infer A> ? A : never;
|
|
136
136
|
/**
|
|
@@ -149,7 +149,7 @@ type ActionsOf$5<S> = S extends Action<infer Id, infer P> ? Action<Id, P> : S ex
|
|
|
149
149
|
* });
|
|
150
150
|
* ```
|
|
151
151
|
*
|
|
152
|
-
* @since
|
|
152
|
+
* @since 0.0.1
|
|
153
153
|
*/
|
|
154
154
|
declare const define$1: <P>(kind: string, options?: {
|
|
155
155
|
readonly describe?: (payload: P) => string;
|
|
@@ -157,31 +157,31 @@ declare const define$1: <P>(kind: string, options?: {
|
|
|
157
157
|
/**
|
|
158
158
|
* Mentions an action in prose without declaring another occurrence.
|
|
159
159
|
*
|
|
160
|
-
* @since
|
|
160
|
+
* @since 0.0.1
|
|
161
161
|
*/
|
|
162
162
|
declare const ref: (action: Any$6) => Ref;
|
|
163
163
|
/**
|
|
164
164
|
* Declares steps that run one after another.
|
|
165
165
|
*
|
|
166
|
-
* @since
|
|
166
|
+
* @since 0.0.1
|
|
167
167
|
*/
|
|
168
168
|
declare const sequence: <const S extends ReadonlyArray<Step$1>>(children: S) => Sequence$1<ActionsOf$5<S[number]>>;
|
|
169
169
|
/**
|
|
170
170
|
* Declares independent branches that may run concurrently. Each branch can be a single
|
|
171
171
|
* step or a sequence.
|
|
172
172
|
*
|
|
173
|
-
* @since
|
|
173
|
+
* @since 0.0.1
|
|
174
174
|
*/
|
|
175
175
|
declare const parallel: <const S extends ReadonlyArray<Step$1>>(branches: S, options?: {
|
|
176
176
|
readonly concurrency?: Concurrency;
|
|
177
177
|
}) => Parallel$1<ActionsOf$5<S[number]>>;
|
|
178
|
-
/** @since
|
|
178
|
+
/** @since 0.0.1 */
|
|
179
179
|
declare const isAction: (value: unknown) => value is Any$6;
|
|
180
|
-
/** @since
|
|
180
|
+
/** @since 0.0.1 */
|
|
181
181
|
declare const isRef: (value: unknown) => value is Ref;
|
|
182
|
-
/** @since
|
|
182
|
+
/** @since 0.0.1 */
|
|
183
183
|
declare const isSequence: (value: unknown) => value is Sequence$1;
|
|
184
|
-
/** @since
|
|
184
|
+
/** @since 0.0.1 */
|
|
185
185
|
declare const isParallel: (value: unknown) => value is Parallel$1;
|
|
186
186
|
declare namespace change_d_exports {
|
|
187
187
|
export { Any$5 as Any, Change, Definition, Describe, Metadata, NoMetadata, Relations, define, isChange, make$5 as make };
|
|
@@ -189,12 +189,12 @@ declare namespace change_d_exports {
|
|
|
189
189
|
/**
|
|
190
190
|
* The metadata of a change whose shape is not known statically.
|
|
191
191
|
*
|
|
192
|
-
* @since
|
|
192
|
+
* @since 0.0.1
|
|
193
193
|
*/
|
|
194
194
|
type Metadata = {
|
|
195
195
|
readonly [field: string]: unknown;
|
|
196
196
|
};
|
|
197
|
-
/** @since
|
|
197
|
+
/** @since 0.0.1 */
|
|
198
198
|
type NoMetadata = {
|
|
199
199
|
readonly [field: string]: undefined;
|
|
200
200
|
};
|
|
@@ -205,7 +205,7 @@ type NoMetadata = {
|
|
|
205
205
|
* deltafold does not interpret `metadata`. Consumers choose its fields, such as a
|
|
206
206
|
* classification or a breaking flag, and what they mean.
|
|
207
207
|
*
|
|
208
|
-
* @since
|
|
208
|
+
* @since 0.0.1
|
|
209
209
|
*/
|
|
210
210
|
type Change<M extends object = Metadata> = {
|
|
211
211
|
readonly _tag: "Change";
|
|
@@ -222,13 +222,13 @@ type Change<M extends object = Metadata> = {
|
|
|
222
222
|
* A change whose metadata type is not known statically. Its metadata is an object, so
|
|
223
223
|
* reading a field requires narrowing first.
|
|
224
224
|
*
|
|
225
|
-
* @since
|
|
225
|
+
* @since 0.0.1
|
|
226
226
|
*/
|
|
227
227
|
type Any$5 = Change<object>;
|
|
228
228
|
/**
|
|
229
229
|
* Relationships to other changes.
|
|
230
230
|
*
|
|
231
|
-
* @since
|
|
231
|
+
* @since 0.0.1
|
|
232
232
|
*/
|
|
233
233
|
type Relations = {
|
|
234
234
|
readonly reverts?: ReadonlyArray<Any$5>;
|
|
@@ -237,7 +237,7 @@ type Relations = {
|
|
|
237
237
|
/**
|
|
238
238
|
* Takes the description as a tagged template and returns the change.
|
|
239
239
|
*
|
|
240
|
-
* @since
|
|
240
|
+
* @since 0.0.1
|
|
241
241
|
*/
|
|
242
242
|
type Describe<M extends object> = (strings: TemplateStringsArray, ...values: ReadonlyArray<Scalar>) => Change<M>;
|
|
243
243
|
/**
|
|
@@ -254,14 +254,14 @@ type Describe<M extends object> = (strings: TemplateStringsArray, ...values: Rea
|
|
|
254
254
|
* `;
|
|
255
255
|
* ```
|
|
256
256
|
*
|
|
257
|
-
* @since
|
|
257
|
+
* @since 0.0.1
|
|
258
258
|
*/
|
|
259
259
|
declare function make$5(id: string): Describe<NoMetadata>;
|
|
260
260
|
declare function make$5<const M extends object>(id: string, metadata: M, relations?: Relations): Describe<M>;
|
|
261
261
|
/**
|
|
262
262
|
* Makes changes that share one metadata shape.
|
|
263
263
|
*
|
|
264
|
-
* @since
|
|
264
|
+
* @since 0.0.1
|
|
265
265
|
*/
|
|
266
266
|
type Definition<M extends object> = {
|
|
267
267
|
readonly make: (id: string, metadata: M, relations?: Relations) => Describe<M>;
|
|
@@ -283,15 +283,15 @@ type Definition<M extends object> = {
|
|
|
283
283
|
* `;
|
|
284
284
|
* ```
|
|
285
285
|
*
|
|
286
|
-
* @since
|
|
286
|
+
* @since 0.0.1
|
|
287
287
|
*/
|
|
288
288
|
declare const define: <M extends object>() => Definition<M>;
|
|
289
|
-
/** @since
|
|
289
|
+
/** @since 0.0.1 */
|
|
290
290
|
declare const isChange: (value: unknown) => value is Change;
|
|
291
291
|
declare namespace version_d_exports {
|
|
292
292
|
export { Options$1 as Options, Release, Version, isVersion, make$4 as make, withMetadata };
|
|
293
293
|
}
|
|
294
|
-
/** @since
|
|
294
|
+
/** @since 0.0.1 */
|
|
295
295
|
type Version<C extends Any$5 = Any$5> = {
|
|
296
296
|
readonly _tag: "Version";
|
|
297
297
|
readonly id: string;
|
|
@@ -304,7 +304,7 @@ type Version<C extends Any$5 = Any$5> = {
|
|
|
304
304
|
/** The changes that shipped in this release. */
|
|
305
305
|
readonly changes: ReadonlyArray<C>;
|
|
306
306
|
};
|
|
307
|
-
/** @since
|
|
307
|
+
/** @since 0.0.1 */
|
|
308
308
|
type Options$1<C extends Any$5 = Any$5> = {
|
|
309
309
|
readonly previous?: Version;
|
|
310
310
|
readonly changes: ReadonlyArray<C>;
|
|
@@ -318,16 +318,16 @@ type Options$1<C extends Any$5 = Any$5> = {
|
|
|
318
318
|
* const v100 = Version.make("1.0.0", { previous: v0, changes: [timeoutRenamed] });
|
|
319
319
|
* ```
|
|
320
320
|
*
|
|
321
|
-
* @since
|
|
321
|
+
* @since 0.0.1
|
|
322
322
|
*/
|
|
323
323
|
declare const make$4: <C extends Any$5 = never>(id: string, options: Options$1<C>) => Version<C>;
|
|
324
|
-
/** @since
|
|
324
|
+
/** @since 0.0.1 */
|
|
325
325
|
declare const isVersion: (value: unknown) => value is Version;
|
|
326
326
|
/**
|
|
327
327
|
* Release metadata attached to a version by release tooling. It does not modify the
|
|
328
328
|
* version registered in history.
|
|
329
329
|
*
|
|
330
|
-
* @since
|
|
330
|
+
* @since 0.0.1
|
|
331
331
|
*/
|
|
332
332
|
type Release<M> = {
|
|
333
333
|
readonly _tag: "Release";
|
|
@@ -345,7 +345,7 @@ type Release<M> = {
|
|
|
345
345
|
* });
|
|
346
346
|
* ```
|
|
347
347
|
*
|
|
348
|
-
* @since
|
|
348
|
+
* @since 0.0.1
|
|
349
349
|
*/
|
|
350
350
|
declare const withMetadata: <const M>(version: Version, metadata: M) => Release<M>;
|
|
351
351
|
declare namespace migration_d_exports {
|
|
@@ -354,16 +354,16 @@ declare namespace migration_d_exports {
|
|
|
354
354
|
/**
|
|
355
355
|
* Prose, mentions, and occurrence-declaring steps in template order.
|
|
356
356
|
*
|
|
357
|
-
* @since
|
|
357
|
+
* @since 0.0.1
|
|
358
358
|
*/
|
|
359
359
|
type Content<A extends Any$6 = Any$6> = ReadonlyArray<Text | Ref | Step$1<A>>;
|
|
360
360
|
/**
|
|
361
361
|
* Values accepted in migration templates.
|
|
362
362
|
*
|
|
363
|
-
* @since
|
|
363
|
+
* @since 0.0.1
|
|
364
364
|
*/
|
|
365
365
|
type Interpolation = Scalar | Ref | Step$1;
|
|
366
|
-
/** @since
|
|
366
|
+
/** @since 0.0.1 */
|
|
367
367
|
type Migration<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
368
368
|
readonly _tag: "Migration";
|
|
369
369
|
readonly id: string;
|
|
@@ -384,29 +384,29 @@ type Migration<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
|
384
384
|
/**
|
|
385
385
|
* Any migration.
|
|
386
386
|
*
|
|
387
|
-
* @since
|
|
387
|
+
* @since 0.0.1
|
|
388
388
|
*/
|
|
389
389
|
type Any$4 = Migration<any>;
|
|
390
390
|
/**
|
|
391
391
|
* The action instances a migration can contribute to a plan.
|
|
392
392
|
*
|
|
393
|
-
* @since
|
|
393
|
+
* @since 0.0.1
|
|
394
394
|
*/
|
|
395
395
|
type ActionsOf$4<M> = M extends Migration<infer A> ? A : never;
|
|
396
396
|
/**
|
|
397
397
|
* The changes a migration addresses.
|
|
398
398
|
*
|
|
399
|
-
* @since
|
|
399
|
+
* @since 0.0.1
|
|
400
400
|
*/
|
|
401
401
|
type ChangesOf$2<M> = M extends Migration<any, infer C> ? C : never;
|
|
402
|
-
/** @since
|
|
402
|
+
/** @since 0.0.1 */
|
|
403
403
|
type Options<C extends Any$5 = Any$5> = {
|
|
404
404
|
readonly from: Version;
|
|
405
405
|
readonly to: Version;
|
|
406
406
|
readonly addresses?: ReadonlyArray<C>;
|
|
407
407
|
readonly cost?: number;
|
|
408
408
|
};
|
|
409
|
-
/** @since
|
|
409
|
+
/** @since 0.0.1 */
|
|
410
410
|
declare const isMigration: (value: unknown) => value is Any$4;
|
|
411
411
|
/**
|
|
412
412
|
* Declares a migration between exact versions. Interpolated actions, instruction blocks,
|
|
@@ -425,10 +425,10 @@ declare const isMigration: (value: unknown) => value is Any$4;
|
|
|
425
425
|
* `;
|
|
426
426
|
* ```
|
|
427
427
|
*
|
|
428
|
-
* @since
|
|
428
|
+
* @since 0.0.1
|
|
429
429
|
*/
|
|
430
430
|
declare const make$3: <C extends Any$5 = never>(id: string, options: Options<C>) => <const V extends ReadonlyArray<Interpolation>>(strings: TemplateStringsArray, ...values: V) => Migration<ActionsOf$5<V[number]>, C>;
|
|
431
|
-
/** @since
|
|
431
|
+
/** @since 0.0.1 */
|
|
432
432
|
type NoopOptions<C extends Any$5 = Any$5> = Options<C> & {
|
|
433
433
|
/** Also declares the reverse transition as zero-work. */
|
|
434
434
|
readonly reversible?: boolean;
|
|
@@ -438,7 +438,7 @@ type NoopOptions<C extends Any$5 = Any$5> = Options<C> & {
|
|
|
438
438
|
* like any migration. Do not use it to hide missing support for changes that need
|
|
439
439
|
* instructions.
|
|
440
440
|
*
|
|
441
|
-
* @since
|
|
441
|
+
* @since 0.0.1
|
|
442
442
|
*/
|
|
443
443
|
declare const noop: <C extends Any$5 = never>(id: string, options: NoopOptions<C>) => Migration<never, C>;
|
|
444
444
|
/**
|
|
@@ -455,7 +455,7 @@ declare const noop: <C extends Any$5 = never>(id: string, options: NoopOptions<C
|
|
|
455
455
|
* `;
|
|
456
456
|
* ```
|
|
457
457
|
*
|
|
458
|
-
* @since
|
|
458
|
+
* @since 0.0.1
|
|
459
459
|
*/
|
|
460
460
|
declare const withRevert: <A extends Any$6, C extends Any$5>(migration: Migration<A, C>) => <const V extends ReadonlyArray<Interpolation>>(strings: TemplateStringsArray, ...values: V) => Migration<A | ActionsOf$5<V[number]>, C>;
|
|
461
461
|
declare namespace rule_d_exports {
|
|
@@ -465,10 +465,10 @@ declare namespace rule_d_exports {
|
|
|
465
465
|
* What a rule matches: an action instance, or a parallel group matched by its branch
|
|
466
466
|
* structure. Matching a parallel group is an explicit structural rule.
|
|
467
467
|
*
|
|
468
|
-
* @since
|
|
468
|
+
* @since 0.0.1
|
|
469
469
|
*/
|
|
470
470
|
type Pattern = Any$6 | Parallel$1;
|
|
471
|
-
/** @since
|
|
471
|
+
/** @since 0.0.1 */
|
|
472
472
|
type Rule<A extends Any$6 = Any$6> = {
|
|
473
473
|
readonly _tag: "Rule";
|
|
474
474
|
readonly id: string;
|
|
@@ -479,13 +479,13 @@ type Rule<A extends Any$6 = Any$6> = {
|
|
|
479
479
|
/**
|
|
480
480
|
* Any rule.
|
|
481
481
|
*
|
|
482
|
-
* @since
|
|
482
|
+
* @since 0.0.1
|
|
483
483
|
*/
|
|
484
484
|
type Any$3 = Rule<any>;
|
|
485
485
|
/**
|
|
486
486
|
* The action instances a rule can contribute to a plan.
|
|
487
487
|
*
|
|
488
|
-
* @since
|
|
488
|
+
* @since 0.0.1
|
|
489
489
|
*/
|
|
490
490
|
type ActionsOf$3<R> = R extends Rule<infer A> ? A : never;
|
|
491
491
|
/**
|
|
@@ -510,18 +510,18 @@ type ActionsOf$3<R> = R extends Rule<infer A> ? A : never;
|
|
|
510
510
|
* });
|
|
511
511
|
* ```
|
|
512
512
|
*
|
|
513
|
-
* @since
|
|
513
|
+
* @since 0.0.1
|
|
514
514
|
*/
|
|
515
515
|
declare const replace: <A extends Any$6 = never>(id: string, options: {
|
|
516
516
|
readonly match: ReadonlyArray<Pattern>;
|
|
517
517
|
readonly replacement: ReadonlyArray<Step$1<A>>;
|
|
518
518
|
}) => Rule<A>;
|
|
519
|
-
/** @since
|
|
519
|
+
/** @since 0.0.1 */
|
|
520
520
|
declare const isRule: (value: unknown) => value is Any$3;
|
|
521
521
|
declare namespace shortcut_d_exports {
|
|
522
522
|
export { ActionsOf$2 as ActionsOf, Any$2 as Any, ChangesOf$1 as ChangesOf, Shortcut, isShortcut, make$2 as make };
|
|
523
523
|
}
|
|
524
|
-
/** @since
|
|
524
|
+
/** @since 0.0.1 */
|
|
525
525
|
type Shortcut<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
526
526
|
readonly _tag: "Shortcut";
|
|
527
527
|
readonly id: string;
|
|
@@ -537,19 +537,19 @@ type Shortcut<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
|
537
537
|
/**
|
|
538
538
|
* Any shortcut.
|
|
539
539
|
*
|
|
540
|
-
* @since
|
|
540
|
+
* @since 0.0.1
|
|
541
541
|
*/
|
|
542
542
|
type Any$2 = Shortcut<any>;
|
|
543
543
|
/**
|
|
544
544
|
* The action instances a shortcut can contribute to a plan.
|
|
545
545
|
*
|
|
546
|
-
* @since
|
|
546
|
+
* @since 0.0.1
|
|
547
547
|
*/
|
|
548
548
|
type ActionsOf$2<S> = S extends Shortcut<infer A> ? A : never;
|
|
549
549
|
/**
|
|
550
550
|
* The changes addressed by a shortcut's migrations.
|
|
551
551
|
*
|
|
552
|
-
* @since
|
|
552
|
+
* @since 0.0.1
|
|
553
553
|
*/
|
|
554
554
|
type ChangesOf$1<S> = S extends Shortcut<any, infer C> ? C : never;
|
|
555
555
|
/**
|
|
@@ -566,7 +566,7 @@ type ChangesOf$1<S> = S extends Shortcut<any, infer C> ? C : never;
|
|
|
566
566
|
* });
|
|
567
567
|
* ```
|
|
568
568
|
*
|
|
569
|
-
* @since
|
|
569
|
+
* @since 0.0.1
|
|
570
570
|
*/
|
|
571
571
|
declare const make$2: <A extends Any$6, C extends Any$5 = never>(id: string, options: {
|
|
572
572
|
readonly from: Version;
|
|
@@ -575,7 +575,7 @@ declare const make$2: <A extends Any$6, C extends Any$5 = never>(id: string, opt
|
|
|
575
575
|
readonly migrations: ReadonlyArray<Migration<A, C>>;
|
|
576
576
|
readonly cost?: number;
|
|
577
577
|
}) => Shortcut<A, C>;
|
|
578
|
-
/** @since
|
|
578
|
+
/** @since 0.0.1 */
|
|
579
579
|
declare const isShortcut: (value: unknown) => value is Any$2;
|
|
580
580
|
declare namespace plan_d_exports {
|
|
581
581
|
export { ActionsOf$1 as ActionsOf, Any$1 as Any, Coverage, Direction, Explanation, GuideItem, Hop, Node, Occurrence, Origin, Parallel, Plan, RequestDirection, Route, Sequence, Step, isEmpty, withRuntimeCoverage };
|
|
@@ -583,13 +583,13 @@ declare namespace plan_d_exports {
|
|
|
583
583
|
/**
|
|
584
584
|
* Which side of a migration runs.
|
|
585
585
|
*
|
|
586
|
-
* @since
|
|
586
|
+
* @since 0.0.1
|
|
587
587
|
*/
|
|
588
588
|
type Direction = "forward" | "revert";
|
|
589
589
|
/**
|
|
590
590
|
* How an occurrence entered the plan.
|
|
591
591
|
*
|
|
592
|
-
* @since
|
|
592
|
+
* @since 0.0.1
|
|
593
593
|
*/
|
|
594
594
|
type Origin = {
|
|
595
595
|
readonly _tag: "Declared";
|
|
@@ -604,7 +604,7 @@ type Origin = {
|
|
|
604
604
|
* it combines the migration, direction, and action identifiers, or the rule and the
|
|
605
605
|
* replaced occurrences for a replacement.
|
|
606
606
|
*
|
|
607
|
-
* @since
|
|
607
|
+
* @since 0.0.1
|
|
608
608
|
*/
|
|
609
609
|
type Occurrence<A extends Any$6 = Any$6> = {
|
|
610
610
|
readonly _tag: "Occurrence";
|
|
@@ -622,12 +622,12 @@ type Occurrence<A extends Any$6 = Any$6> = {
|
|
|
622
622
|
readonly instruction: Instruction | undefined;
|
|
623
623
|
readonly origin: Origin;
|
|
624
624
|
};
|
|
625
|
-
/** @since
|
|
625
|
+
/** @since 0.0.1 */
|
|
626
626
|
type Sequence<A extends Any$6 = Any$6> = {
|
|
627
627
|
readonly _tag: "Sequence";
|
|
628
628
|
readonly children: ReadonlyArray<Node<A>>;
|
|
629
629
|
};
|
|
630
|
-
/** @since
|
|
630
|
+
/** @since 0.0.1 */
|
|
631
631
|
type Parallel<A extends Any$6 = Any$6> = {
|
|
632
632
|
readonly _tag: "Parallel";
|
|
633
633
|
readonly branches: ReadonlyArray<Node<A>>;
|
|
@@ -636,13 +636,13 @@ type Parallel<A extends Any$6 = Any$6> = {
|
|
|
636
636
|
/**
|
|
637
637
|
* The declared execution structure.
|
|
638
638
|
*
|
|
639
|
-
* @since
|
|
639
|
+
* @since 0.0.1
|
|
640
640
|
*/
|
|
641
641
|
type Node<A extends Any$6 = Any$6> = Occurrence<A> | Sequence<A> | Parallel<A>;
|
|
642
642
|
/**
|
|
643
643
|
* Resolved prose for a guide. Occurrences render as their instruction or description.
|
|
644
644
|
*
|
|
645
|
-
* @since
|
|
645
|
+
* @since 0.0.1
|
|
646
646
|
*/
|
|
647
647
|
type GuideItem<A extends Any$6 = Any$6> = Text | Ref | {
|
|
648
648
|
readonly _tag: "Occurrence";
|
|
@@ -657,10 +657,15 @@ type GuideItem<A extends Any$6 = Any$6> = Text | Ref | {
|
|
|
657
657
|
* One migration in the route. Steps are sequential barriers: a step starts only after
|
|
658
658
|
* the previous step completed.
|
|
659
659
|
*
|
|
660
|
-
* @since
|
|
660
|
+
* @since 0.0.1
|
|
661
661
|
*/
|
|
662
662
|
type Step<A extends Any$6 = Any$6> = {
|
|
663
663
|
readonly _tag: "Step";
|
|
664
|
+
/**
|
|
665
|
+
* Identifies the migration side within the route: the migration identifier, followed by
|
|
666
|
+
* `/revert` for a reverse migration. Declared occurrence identifiers start with it.
|
|
667
|
+
*/
|
|
668
|
+
readonly id: string;
|
|
664
669
|
readonly migration: Any$4;
|
|
665
670
|
readonly direction: Direction;
|
|
666
671
|
readonly from: Version;
|
|
@@ -677,7 +682,7 @@ type Step<A extends Any$6 = Any$6> = {
|
|
|
677
682
|
/**
|
|
678
683
|
* Why the plan differs from the declared migrations.
|
|
679
684
|
*
|
|
680
|
-
* @since
|
|
685
|
+
* @since 0.0.1
|
|
681
686
|
*/
|
|
682
687
|
type Explanation = {
|
|
683
688
|
readonly _tag: "Rewrite";
|
|
@@ -693,7 +698,7 @@ type Explanation = {
|
|
|
693
698
|
/**
|
|
694
699
|
* A hop in a route: the migrations between two versions, or a shortcut.
|
|
695
700
|
*
|
|
696
|
-
* @since
|
|
701
|
+
* @since 0.0.1
|
|
697
702
|
*/
|
|
698
703
|
type Hop = {
|
|
699
704
|
readonly _tag: "Migrations";
|
|
@@ -713,7 +718,7 @@ type Hop = {
|
|
|
713
718
|
readonly to: Version;
|
|
714
719
|
readonly shortcut: Any$2;
|
|
715
720
|
};
|
|
716
|
-
/** @since
|
|
721
|
+
/** @since 0.0.1 */
|
|
717
722
|
type Route = {
|
|
718
723
|
/**
|
|
719
724
|
* Identifies the route for explicit selection: version identifiers joined by `>`,
|
|
@@ -726,21 +731,21 @@ type Route = {
|
|
|
726
731
|
/**
|
|
727
732
|
* How the requested target relates to the source in release ancestry.
|
|
728
733
|
*
|
|
729
|
-
* @since
|
|
734
|
+
* @since 0.0.1
|
|
730
735
|
*/
|
|
731
736
|
type RequestDirection = "none" | "upgrade" | "downgrade" | "cross-branch";
|
|
732
737
|
/**
|
|
733
738
|
* When executors check handler coverage. Static plans also expose uncovered actions in
|
|
734
739
|
* the execution's type.
|
|
735
740
|
*
|
|
736
|
-
* @since
|
|
741
|
+
* @since 0.0.1
|
|
737
742
|
*/
|
|
738
743
|
type Coverage = "static" | "runtime";
|
|
739
744
|
/**
|
|
740
745
|
* A resolved, optimized route between two versions. Every step stays traceable to its
|
|
741
746
|
* migration and the changes that migration addresses.
|
|
742
747
|
*
|
|
743
|
-
* @since
|
|
748
|
+
* @since 0.0.1
|
|
744
749
|
*/
|
|
745
750
|
type Plan<A extends Any$6 = Any$6, C extends Coverage = "static", Ch extends Any$5 = Any$5> = {
|
|
746
751
|
readonly _tag: "Plan";
|
|
@@ -763,19 +768,19 @@ type Plan<A extends Any$6 = Any$6, C extends Coverage = "static", Ch extends Any
|
|
|
763
768
|
/**
|
|
764
769
|
* Any plan.
|
|
765
770
|
*
|
|
766
|
-
* @since
|
|
771
|
+
* @since 0.0.1
|
|
767
772
|
*/
|
|
768
773
|
type Any$1 = Plan<any, any>;
|
|
769
774
|
/**
|
|
770
775
|
* The action instances of a plan.
|
|
771
776
|
*
|
|
772
|
-
* @since
|
|
777
|
+
* @since 0.0.1
|
|
773
778
|
*/
|
|
774
779
|
type ActionsOf$1<P> = P extends Plan<infer A, any> ? A : never;
|
|
775
780
|
/**
|
|
776
781
|
* Whether the plan has no action occurrences. An empty plan is valid.
|
|
777
782
|
*
|
|
778
|
-
* @since
|
|
783
|
+
* @since 0.0.1
|
|
779
784
|
*/
|
|
780
785
|
declare const isEmpty: (plan: Any$1) => boolean;
|
|
781
786
|
/**
|
|
@@ -783,13 +788,13 @@ declare const isEmpty: (plan: Any$1) => boolean;
|
|
|
783
788
|
* loaded plans whose action union is not known statically. Executors still reject
|
|
784
789
|
* missing handlers before any action body runs.
|
|
785
790
|
*
|
|
786
|
-
* @since
|
|
791
|
+
* @since 0.0.1
|
|
787
792
|
*/
|
|
788
793
|
declare const withRuntimeCoverage: <A extends Any$6, Ch extends Any$5>(plan: Plan<A, Coverage, Ch>) => Plan<A, "runtime", Ch>;
|
|
789
794
|
/**
|
|
790
795
|
* A problem in a history's declarations.
|
|
791
796
|
*
|
|
792
|
-
* @since
|
|
797
|
+
* @since 0.0.1
|
|
793
798
|
*/
|
|
794
799
|
type Issue = {
|
|
795
800
|
readonly _tag: "DuplicateVersion" | "UnregisteredVersion" | "AncestryCycle" | "ConflictingChange" | "ConflictingAction" | "DuplicateMigration" | "DuplicateEdge" | "SelfMigration" | "EmptyMigration" | "DuplicateOccurrence" | "DuplicateRule" | "InvalidRule" | "DuplicateShortcut" | "InvalidShortcut";
|
|
@@ -800,7 +805,7 @@ type Issue = {
|
|
|
800
805
|
/**
|
|
801
806
|
* A candidate route, summarized for diagnostics and explicit selection.
|
|
802
807
|
*
|
|
803
|
-
* @since
|
|
808
|
+
* @since 0.0.1
|
|
804
809
|
*/
|
|
805
810
|
type RouteSummary = {
|
|
806
811
|
/** Pass this as the `route` option to select the route. */
|
|
@@ -816,7 +821,7 @@ type RouteSummary = {
|
|
|
816
821
|
/**
|
|
817
822
|
* An ancestry hop with no declared route in the requested direction.
|
|
818
823
|
*
|
|
819
|
-
* @since
|
|
824
|
+
* @since 0.0.1
|
|
820
825
|
*/
|
|
821
826
|
type Blocker = {
|
|
822
827
|
readonly from: string;
|
|
@@ -829,7 +834,7 @@ declare const InvalidHistory_base: new <A extends Record<string, any> = {}>(args
|
|
|
829
834
|
/**
|
|
830
835
|
* The history's declarations are invalid. Resolution needs a valid history.
|
|
831
836
|
*
|
|
832
|
-
* @since
|
|
837
|
+
* @since 0.0.1
|
|
833
838
|
*/
|
|
834
839
|
declare class InvalidHistory extends InvalidHistory_base<{
|
|
835
840
|
readonly issues: ReadonlyArray<Issue>;
|
|
@@ -839,7 +844,7 @@ declare class InvalidHistory extends InvalidHistory_base<{
|
|
|
839
844
|
declare const UnknownVersion_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
840
845
|
readonly _tag: "UnknownVersion";
|
|
841
846
|
} & Readonly<A>;
|
|
842
|
-
/** @since
|
|
847
|
+
/** @since 0.0.1 */
|
|
843
848
|
declare class UnknownVersion extends UnknownVersion_base<{
|
|
844
849
|
readonly version: string;
|
|
845
850
|
readonly known: ReadonlyArray<string>;
|
|
@@ -853,7 +858,7 @@ declare const UnsupportedRoute_base: new <A extends Record<string, any> = {}>(ar
|
|
|
853
858
|
* No declared route connects the versions. This never means that no work is needed:
|
|
854
859
|
* declare `Migration.noop` for a supported zero-work transition.
|
|
855
860
|
*
|
|
856
|
-
* @since
|
|
861
|
+
* @since 0.0.1
|
|
857
862
|
*/
|
|
858
863
|
declare class UnsupportedRoute extends UnsupportedRoute_base<{
|
|
859
864
|
readonly from: string;
|
|
@@ -873,7 +878,7 @@ declare const AmbiguousRoute_base: new <A extends Record<string, any> = {}>(args
|
|
|
873
878
|
/**
|
|
874
879
|
* Several routes connect the versions and no selection or policy chose one.
|
|
875
880
|
*
|
|
876
|
-
* @since
|
|
881
|
+
* @since 0.0.1
|
|
877
882
|
*/
|
|
878
883
|
declare class AmbiguousRoute extends AmbiguousRoute_base<{
|
|
879
884
|
readonly from: string;
|
|
@@ -889,7 +894,7 @@ declare const UnknownRoute_base: new <A extends Record<string, any> = {}>(args:
|
|
|
889
894
|
/**
|
|
890
895
|
* The `route` option names no candidate route.
|
|
891
896
|
*
|
|
892
|
-
* @since
|
|
897
|
+
* @since 0.0.1
|
|
893
898
|
*/
|
|
894
899
|
declare class UnknownRoute extends UnknownRoute_base<{
|
|
895
900
|
readonly route: string;
|
|
@@ -903,7 +908,7 @@ declare const RewriteCycle_base: new <A extends Record<string, any> = {}>(args:
|
|
|
903
908
|
/**
|
|
904
909
|
* Rules rewrite a sequence back into itself.
|
|
905
910
|
*
|
|
906
|
-
* @since
|
|
911
|
+
* @since 0.0.1
|
|
907
912
|
*/
|
|
908
913
|
declare class RewriteCycle extends RewriteCycle_base<{
|
|
909
914
|
readonly route: string;
|
|
@@ -918,7 +923,7 @@ declare const ConflictingRewrites_base: new <A extends Record<string, any> = {}>
|
|
|
918
923
|
/**
|
|
919
924
|
* Rules can produce different results depending on which applies first.
|
|
920
925
|
*
|
|
921
|
-
* @since
|
|
926
|
+
* @since 0.0.1
|
|
922
927
|
*/
|
|
923
928
|
declare class ConflictingRewrites extends ConflictingRewrites_base<{
|
|
924
929
|
readonly route: string;
|
|
@@ -936,7 +941,7 @@ declare const RewriteLimitExceeded_base: new <A extends Record<string, any> = {}
|
|
|
936
941
|
* Optimization explored too many states or chained too many rule applications, for
|
|
937
942
|
* example because a rule keeps growing the sequence.
|
|
938
943
|
*
|
|
939
|
-
* @since
|
|
944
|
+
* @since 0.0.1
|
|
940
945
|
*/
|
|
941
946
|
declare class RewriteLimitExceeded extends RewriteLimitExceeded_base<{
|
|
942
947
|
readonly route: string;
|
|
@@ -951,7 +956,7 @@ declare const TooManyRoutes_base: new <A extends Record<string, any> = {}>(args:
|
|
|
951
956
|
/**
|
|
952
957
|
* More candidate routes exist than the resolver enumerates.
|
|
953
958
|
*
|
|
954
|
-
* @since
|
|
959
|
+
* @since 0.0.1
|
|
955
960
|
*/
|
|
956
961
|
declare class TooManyRoutes extends TooManyRoutes_base<{
|
|
957
962
|
readonly from: string;
|
|
@@ -960,14 +965,14 @@ declare class TooManyRoutes extends TooManyRoutes_base<{
|
|
|
960
965
|
}> {
|
|
961
966
|
get message(): string;
|
|
962
967
|
}
|
|
963
|
-
/** @since
|
|
968
|
+
/** @since 0.0.1 */
|
|
964
969
|
type RewriteError = RewriteCycle | ConflictingRewrites | RewriteLimitExceeded;
|
|
965
970
|
/**
|
|
966
971
|
* Why a plan could not be resolved. `UnsupportedRoute` lists the reachable versions, the
|
|
967
972
|
* closest ones by release ancestry, and blockers. `AmbiguousRoute` lists the candidate
|
|
968
973
|
* routes: pass one as `route`, or choose a `policy`.
|
|
969
974
|
*
|
|
970
|
-
* @since
|
|
975
|
+
* @since 0.0.1
|
|
971
976
|
*/
|
|
972
977
|
type ResolveError = InvalidHistory | UnknownVersion | UnsupportedRoute | AmbiguousRoute | UnknownRoute | TooManyRoutes | RewriteError;
|
|
973
978
|
/**
|
|
@@ -980,10 +985,10 @@ type ResolveError = InvalidHistory | UnknownVersion | UnsupportedRoute | Ambiguo
|
|
|
980
985
|
* `cost`; a shortcut costs its declared `cost` or the total of its migrations.
|
|
981
986
|
* - `prefer-shortcuts`: a route through a shortcut over the route the shortcut replaces.
|
|
982
987
|
*
|
|
983
|
-
* @since
|
|
988
|
+
* @since 0.0.1
|
|
984
989
|
*/
|
|
985
990
|
type RoutePolicy = "fewest-actions" | "fewest-migrations" | "lowest-cost" | "prefer-shortcuts";
|
|
986
|
-
/** @since
|
|
991
|
+
/** @since 0.0.1 */
|
|
987
992
|
type ResolveOptions = {
|
|
988
993
|
readonly from: Version | string;
|
|
989
994
|
readonly to: Version | string;
|
|
@@ -995,7 +1000,7 @@ type ResolveOptions = {
|
|
|
995
1000
|
/**
|
|
996
1001
|
* A reachable destination and the identifiers of its candidate routes.
|
|
997
1002
|
*
|
|
998
|
-
* @since
|
|
1003
|
+
* @since 0.0.1
|
|
999
1004
|
*/
|
|
1000
1005
|
type Destination = {
|
|
1001
1006
|
readonly version: Version;
|
|
@@ -1010,7 +1015,7 @@ type Destination = {
|
|
|
1010
1015
|
declare namespace history_d_exports {
|
|
1011
1016
|
export { ActionsOf, AmbiguousRoute, Any, Blocker, ChangesOf, ConflictingRewrites, Destination, History, InvalidHistory, Issue, ResolveError, ResolveOptions, RewriteCycle, RewriteError, RewriteLimitExceeded, RoutePolicy, RouteSummary, TooManyRoutes, UnknownRoute, UnknownVersion, UnsupportedRoute, downgrades, isHistory, make$1 as make, resolve, upgrades, validate };
|
|
1012
1017
|
}
|
|
1013
|
-
/** @since
|
|
1018
|
+
/** @since 0.0.1 */
|
|
1014
1019
|
type History<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
1015
1020
|
readonly _tag: "History";
|
|
1016
1021
|
readonly versions: ReadonlyArray<Version>;
|
|
@@ -1025,19 +1030,19 @@ type History<A extends Any$6 = Any$6, C extends Any$5 = Any$5> = {
|
|
|
1025
1030
|
/**
|
|
1026
1031
|
* Any history.
|
|
1027
1032
|
*
|
|
1028
|
-
* @since
|
|
1033
|
+
* @since 0.0.1
|
|
1029
1034
|
*/
|
|
1030
1035
|
type Any = History<any>;
|
|
1031
1036
|
/**
|
|
1032
1037
|
* Every action instance that a plan resolved from the history can contain.
|
|
1033
1038
|
*
|
|
1034
|
-
* @since
|
|
1039
|
+
* @since 0.0.1
|
|
1035
1040
|
*/
|
|
1036
1041
|
type ActionsOf<H> = H extends History<infer A> ? A : never;
|
|
1037
1042
|
/**
|
|
1038
1043
|
* Every change that a plan resolved from the history can list in `changes`.
|
|
1039
1044
|
*
|
|
1040
|
-
* @since
|
|
1045
|
+
* @since 0.0.1
|
|
1041
1046
|
*/
|
|
1042
1047
|
type ChangesOf<H> = H extends History<any, infer C> ? C : never;
|
|
1043
1048
|
/**
|
|
@@ -1047,7 +1052,7 @@ type ChangesOf<H> = H extends History<any, infer C> ? C : never;
|
|
|
1047
1052
|
* `make` does not throw. Use `History.validate` to list declaration issues;
|
|
1048
1053
|
* resolution fails with `InvalidHistory` when there are any.
|
|
1049
1054
|
*
|
|
1050
|
-
* @since
|
|
1055
|
+
* @since 0.0.1
|
|
1051
1056
|
*/
|
|
1052
1057
|
declare const make$1: <const M extends ReadonlyArray<Any$4>, const R extends ReadonlyArray<Any$3> = [], const S extends ReadonlyArray<Any$2> = []>(declarations: {
|
|
1053
1058
|
readonly versions: ReadonlyArray<Version>;
|
|
@@ -1055,12 +1060,12 @@ declare const make$1: <const M extends ReadonlyArray<Any$4>, const R extends Rea
|
|
|
1055
1060
|
readonly rules?: R;
|
|
1056
1061
|
readonly shortcuts?: S;
|
|
1057
1062
|
}) => History<ActionsOf$4<M[number]> | ActionsOf$3<R[number]> | ActionsOf$2<S[number]>, ChangesOf$2<M[number]> | ChangesOf$1<S[number]>>;
|
|
1058
|
-
/** @since
|
|
1063
|
+
/** @since 0.0.1 */
|
|
1059
1064
|
declare const isHistory: (value: unknown) => value is Any;
|
|
1060
1065
|
/**
|
|
1061
1066
|
* Lists declaration issues in a deterministic order. An empty list means valid.
|
|
1062
1067
|
*
|
|
1063
|
-
* @since
|
|
1068
|
+
* @since 0.0.1
|
|
1064
1069
|
*/
|
|
1065
1070
|
declare const validate: (history: Any) => ReadonlyArray<Issue>;
|
|
1066
1071
|
/**
|
|
@@ -1076,13 +1081,13 @@ declare const validate: (history: Any) => ReadonlyArray<Issue>;
|
|
|
1076
1081
|
* if (Result.isSuccess(result)) console.log(result.success.route.id);
|
|
1077
1082
|
* ```
|
|
1078
1083
|
*
|
|
1079
|
-
* @since
|
|
1084
|
+
* @since 0.0.1
|
|
1080
1085
|
*/
|
|
1081
1086
|
declare const resolve: <A extends Any$6, C extends Any$5>(history: History<A, C>, options: ResolveOptions) => Result.Result<Plan<A, "static", C>, ResolveError>;
|
|
1082
1087
|
/**
|
|
1083
1088
|
* Destinations reachable by upgrade from a version, with their candidate routes.
|
|
1084
1089
|
*
|
|
1085
|
-
* @since
|
|
1090
|
+
* @since 0.0.1
|
|
1086
1091
|
*/
|
|
1087
1092
|
declare const upgrades: (history: Any, options: {
|
|
1088
1093
|
readonly from: Version | string;
|
|
@@ -1090,7 +1095,7 @@ declare const upgrades: (history: Any, options: {
|
|
|
1090
1095
|
/**
|
|
1091
1096
|
* Destinations reachable by downgrade from a version, with their candidate routes.
|
|
1092
1097
|
*
|
|
1093
|
-
* @since
|
|
1098
|
+
* @since 0.0.1
|
|
1094
1099
|
*/
|
|
1095
1100
|
declare const downgrades: (history: Any, options: {
|
|
1096
1101
|
readonly from: Version | string;
|
|
@@ -1098,7 +1103,7 @@ declare const downgrades: (history: Any, options: {
|
|
|
1098
1103
|
declare namespace package_d_exports {
|
|
1099
1104
|
export { Package, isPackage, make };
|
|
1100
1105
|
}
|
|
1101
|
-
/** @since
|
|
1106
|
+
/** @since 0.0.1 */
|
|
1102
1107
|
type Package<A extends Any$6 = Any$6> = {
|
|
1103
1108
|
readonly _tag: "Package";
|
|
1104
1109
|
/** The name of the modeled package, for example `@acme/widgets`. */
|
|
@@ -1114,12 +1119,12 @@ type Package<A extends Any$6 = Any$6> = {
|
|
|
1114
1119
|
* export const widgets = Package.make("@acme/widgets", { history });
|
|
1115
1120
|
* ```
|
|
1116
1121
|
*
|
|
1117
|
-
* @since
|
|
1122
|
+
* @since 0.0.1
|
|
1118
1123
|
*/
|
|
1119
1124
|
declare const make: <A extends Any$6>(name: string, options: {
|
|
1120
1125
|
readonly history: History<A>;
|
|
1121
1126
|
}) => Package<A>;
|
|
1122
|
-
/** @since
|
|
1127
|
+
/** @since 0.0.1 */
|
|
1123
1128
|
declare const isPackage: (value: unknown) => value is Package<any>;
|
|
1124
|
-
export {
|
|
1125
|
-
//# sourceMappingURL=package-
|
|
1129
|
+
export { change_d_exports as _, Direction as a, plan_d_exports as c, migration_d_exports as d, Release as f, Change as g, Any$5 as h, Coverage as i, shortcut_d_exports as l, version_d_exports as m, package_d_exports as n, Occurrence as o, Version as p, history_d_exports as r, Plan as s, Package as t, rule_d_exports as u, Any$6 as v, action_d_exports as y };
|
|
1130
|
+
//# sourceMappingURL=package-CA5R57IC.d.ts.map
|