@astrale-os/kernel-dsl 1.0.0-beta.27 → 1.0.0-beta.28
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/dist/v1/addressing/ordering.d.ts +2 -2
- package/dist/v1/addressing/ordering.js +2 -4
- package/dist/v1/builder/index.d.ts +2 -0
- package/dist/v1/builder/index.js +1 -0
- package/dist/v1/builder/schema/rule.d.ts +316 -0
- package/dist/v1/builder/schema/rule.js +192 -0
- package/dist/v1/bundle/index.d.ts +2 -0
- package/dist/v1/bundle/index.js +1 -0
- package/dist/v1/bundle/rule.d.ts +14 -0
- package/dist/v1/bundle/rule.js +41 -0
- package/dist/v1/compiled/admission/diagnostic.d.ts +14 -0
- package/dist/v1/compiled/admission/diagnostic.js +6 -0
- package/dist/v1/compiled/admission/semantics/policy/callable.js +2 -3
- package/dist/v1/compiled/admission/semantics/policy/parity.js +8 -13
- package/dist/v1/compiled/admission/semantics/policy/pattern.js +3 -5
- package/dist/v1/compiled/admission/wire/policy.js +16 -11
- package/dist/v1/compiled/index.d.ts +2 -0
- package/dist/v1/compiled/index.js +1 -0
- package/dist/v1/compiled/rule.d.ts +49 -0
- package/dist/v1/compiled/rule.js +169 -0
- package/dist/v1/language/callable/admission.js +2 -1
- package/dist/v1/language/policy/analysis/branches.js +6 -7
- package/dist/v1/language/policy/analysis/budgets.js +8 -6
- package/dist/v1/language/policy/analysis/checks.js +5 -4
- package/dist/v1/language/policy/analysis/composition.js +2 -2
- package/dist/v1/language/policy/analysis/typing.js +3 -2
- package/dist/v1/language/policy/model/policy.d.ts +22 -0
- package/dist/v1/language/policy/model/policy.js +28 -4
- package/dist/v1/language/policy/normalization/normalize.js +33 -56
- package/dist/v1/language/value/evaluate/assertions.d.ts +2 -2
- package/dist/v1/language/value/evaluate/assertions.js +4 -34
- package/dist/v1/language/value/evaluate/evaluator.js +10 -15
- package/dist/v1/language/value/evaluate/validity.optimization.js +9 -14
- package/dist/v1/language/value/files.js +2 -1
- package/dist/v1/language/value/ordering.js +1 -3
- package/dist/v1/language/value/profile/canonicalize.js +1 -3
- package/dist/v1/language/value/syntax/walk.d.ts +2 -0
- package/dist/v1/language/value/syntax/walk.js +4 -0
- package/dist/v1/schema/compatibility/api.d.ts +2 -0
- package/dist/v1/schema/compatibility/api.js +1 -0
- package/dist/v1/schema/compatibility/rule.d.ts +13 -0
- package/dist/v1/schema/compatibility/rule.js +23 -0
- package/dist/v1/schema/enforcement/changes.d.ts +590 -0
- package/dist/v1/schema/enforcement/changes.js +566 -0
- package/dist/v1/schema/enforcement/derived.d.ts +236 -0
- package/dist/v1/schema/enforcement/derived.js +243 -0
- package/dist/v1/schema/enforcement/dispose.d.ts +308 -0
- package/dist/v1/schema/enforcement/dispose.js +275 -0
- package/dist/v1/schema/enforcement/facts.d.ts +89 -0
- package/dist/v1/schema/enforcement/facts.js +70 -0
- package/dist/v1/schema/enforcement/fields.d.ts +65 -0
- package/dist/v1/schema/enforcement/fields.js +36 -0
- package/dist/v1/schema/enforcement/index.d.ts +39 -0
- package/dist/v1/schema/enforcement/index.js +10 -0
- package/dist/v1/schema/enforcement/install.d.ts +1634 -0
- package/dist/v1/schema/enforcement/install.js +1223 -0
- package/dist/v1/schema/enforcement/lifecycle.d.ts +87 -0
- package/dist/v1/schema/enforcement/lifecycle.js +91 -0
- package/dist/v1/schema/enforcement/model.d.ts +253 -0
- package/dist/v1/schema/enforcement/model.js +1 -0
- package/dist/v1/schema/enforcement/obligations.d.ts +248 -0
- package/dist/v1/schema/enforcement/obligations.js +240 -0
- package/dist/v1/schema/enforcement/write.d.ts +1314 -0
- package/dist/v1/schema/enforcement/write.js +1017 -0
- package/dist/v1/schema/index.d.ts +1 -0
- package/dist/v1/schema/index.js +1 -0
- package/dist/v1/schema/resolution/origins.js +4 -7
- package/dist/v1/schema/rule.d.ts +4 -5
- package/dist/v1/schema/rule.js +19 -13
- package/dist/v1/schema/validation/policy/references.js +5 -11
- package/dist/v1/schema/validation/policy/uses.js +3 -8
- package/dist/value/canonical.d.ts +16 -1
- package/dist/value/canonical.js +90 -33
- package/dist/value/index.d.ts +2 -0
- package/dist/value/index.js +1 -0
- package/dist/value/rule.d.ts +12 -0
- package/dist/value/rule.js +50 -0
- package/package.json +5 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { WriteId } from './write.js';
|
|
2
|
+
/**
|
|
3
|
+
* What one stored fact is judged on, as a page of facts is read back or a Graph is admitted: each
|
|
4
|
+
* row is the code of a diagnostic a `GraphAdmissionError` carries.
|
|
5
|
+
*
|
|
6
|
+
* `surfaces` says who reads the code. `report`: the offender of a `facts` question names it, so a
|
|
7
|
+
* caller reads it in a migration report. `cause`: it is only the cause of the row that wraps it, an
|
|
8
|
+
* invalid observation, target or automatic value of a projection, and never leaves the Kernel.
|
|
9
|
+
*
|
|
10
|
+
* `kept` names the writes which keep such a fact from being stored. What a Property value is judged
|
|
11
|
+
* on is `values.RULES`, whose `DOMAIN_PROPERTY_*` and `VALUE_SCHEMA_INSTANCE_INVALID` an offender
|
|
12
|
+
* names too. A row with no `kept` states what the Kernel's own context answers, which no write
|
|
13
|
+
* reaches.
|
|
14
|
+
*/
|
|
15
|
+
export interface FactJudgement {
|
|
16
|
+
readonly statement: string;
|
|
17
|
+
readonly surfaces: 'report' | 'cause';
|
|
18
|
+
readonly kept?: readonly WriteId[];
|
|
19
|
+
}
|
|
20
|
+
export declare const FACTS: Readonly<{
|
|
21
|
+
readonly GRAPH_CLASS_UNKNOWN: {
|
|
22
|
+
readonly statement: 'A fact names a Class the Registry holds.';
|
|
23
|
+
readonly surfaces: 'report';
|
|
24
|
+
readonly kept: readonly ["CLASS_UNRESOLVED"];
|
|
25
|
+
};
|
|
26
|
+
readonly GRAPH_CLASS_KIND: {
|
|
27
|
+
readonly statement: 'A Node names a Node Class, and an Edge an Edge Class.';
|
|
28
|
+
readonly surfaces: 'report';
|
|
29
|
+
readonly kept: readonly ["CLASS_UNRESOLVED"];
|
|
30
|
+
};
|
|
31
|
+
readonly GRAPH_CLASS_ABSTRACT: {
|
|
32
|
+
readonly statement: 'A fact names a concrete Class.';
|
|
33
|
+
readonly surfaces: 'report';
|
|
34
|
+
readonly kept: readonly ["CLASS_ABSTRACT"];
|
|
35
|
+
};
|
|
36
|
+
readonly GRAPH_ENDPOINT_CLASS: {
|
|
37
|
+
readonly statement: 'Each endpoint of an Edge holds a Class its slot accepts. In a repair session, only an Edge of a Kernel Class is read for it.';
|
|
38
|
+
readonly surfaces: 'report';
|
|
39
|
+
readonly kept: readonly ["CREATED_NODE_NOT_ACCEPTED", "ENDPOINT_NOT_ACCEPTED"];
|
|
40
|
+
};
|
|
41
|
+
readonly EDGE_SELF: {
|
|
42
|
+
readonly statement: 'An Edge of a Class that forbids it joins two different Nodes.';
|
|
43
|
+
readonly surfaces: 'report';
|
|
44
|
+
readonly kept: readonly ["EDGE_ENDS_SAME_REFERENCE", "SELF_LOOP_FORMED"];
|
|
45
|
+
};
|
|
46
|
+
readonly GRAPH_FACT_INVALID: {
|
|
47
|
+
readonly statement: 'A fact holds a valid id, Class and portable Properties.';
|
|
48
|
+
readonly surfaces: 'cause';
|
|
49
|
+
readonly kept: readonly ["REQUEST_UNDECODABLE"];
|
|
50
|
+
};
|
|
51
|
+
readonly GRAPH_NODE_DUPLICATE: {
|
|
52
|
+
readonly statement: 'A NodeId names one Node.';
|
|
53
|
+
readonly surfaces: 'cause';
|
|
54
|
+
readonly kept: readonly ["NODE_EXISTS"];
|
|
55
|
+
};
|
|
56
|
+
readonly GRAPH_EDGE_DUPLICATE: {
|
|
57
|
+
readonly statement: 'An Edge key names one Edge.';
|
|
58
|
+
readonly surfaces: 'cause';
|
|
59
|
+
readonly kept: readonly ["EDGE_EXISTS"];
|
|
60
|
+
};
|
|
61
|
+
readonly GRAPH_NODE_NOT_UNIQUE: {
|
|
62
|
+
readonly statement: 'Two Nodes a unique tuple covers hold different values of it while every Property of it has a value.';
|
|
63
|
+
readonly surfaces: 'cause';
|
|
64
|
+
readonly kept: readonly ["NODE_KEY_DUPLICATED"];
|
|
65
|
+
};
|
|
66
|
+
readonly GRAPH_EDGE_NOT_UNIQUE: {
|
|
67
|
+
readonly statement: 'Two Edges a unique tuple covers hold different values of it while each of its fields is present.';
|
|
68
|
+
readonly surfaces: 'cause';
|
|
69
|
+
readonly kept: readonly ["EDGE_KEY_DUPLICATED"];
|
|
70
|
+
};
|
|
71
|
+
readonly GRAPH_PROPERTY_UNKNOWN: {
|
|
72
|
+
readonly statement: 'During a repair session, a fact of an application Class the session has not staged holds only Properties one side of the session declares.';
|
|
73
|
+
readonly surfaces: 'cause';
|
|
74
|
+
readonly kept: readonly ["PROPERTY_UNKNOWN"];
|
|
75
|
+
};
|
|
76
|
+
readonly GRAPH_CLASS_MISMATCH: {
|
|
77
|
+
readonly statement: 'The Registry answers for the Class it was asked about.';
|
|
78
|
+
readonly surfaces: 'cause';
|
|
79
|
+
};
|
|
80
|
+
readonly GRAPH_CLASS_INVALID: {
|
|
81
|
+
readonly statement: 'The Registry describes a Class by its kind, orientation and unique tuples.';
|
|
82
|
+
readonly surfaces: 'cause';
|
|
83
|
+
};
|
|
84
|
+
readonly GRAPH_CONTEXT_INVALID: {
|
|
85
|
+
readonly statement: 'The Registry answers with well-formed diagnostics.';
|
|
86
|
+
readonly surfaces: 'cause';
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
export type FactCode = keyof typeof FACTS;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { deepFreeze } from '../../language/freeze.js';
|
|
2
|
+
export const FACTS = deepFreeze({
|
|
3
|
+
GRAPH_CLASS_UNKNOWN: {
|
|
4
|
+
statement: 'A fact names a Class the Registry holds.',
|
|
5
|
+
surfaces: 'report',
|
|
6
|
+
kept: ['CLASS_UNRESOLVED'],
|
|
7
|
+
},
|
|
8
|
+
GRAPH_CLASS_KIND: {
|
|
9
|
+
statement: 'A Node names a Node Class, and an Edge an Edge Class.',
|
|
10
|
+
surfaces: 'report',
|
|
11
|
+
kept: ['CLASS_UNRESOLVED'],
|
|
12
|
+
},
|
|
13
|
+
GRAPH_CLASS_ABSTRACT: {
|
|
14
|
+
statement: 'A fact names a concrete Class.',
|
|
15
|
+
surfaces: 'report',
|
|
16
|
+
kept: ['CLASS_ABSTRACT'],
|
|
17
|
+
},
|
|
18
|
+
GRAPH_ENDPOINT_CLASS: {
|
|
19
|
+
statement: 'Each endpoint of an Edge holds a Class its slot accepts. In a repair session, only an Edge of a Kernel Class is read for it.',
|
|
20
|
+
surfaces: 'report',
|
|
21
|
+
kept: ['CREATED_NODE_NOT_ACCEPTED', 'ENDPOINT_NOT_ACCEPTED'],
|
|
22
|
+
},
|
|
23
|
+
EDGE_SELF: {
|
|
24
|
+
statement: 'An Edge of a Class that forbids it joins two different Nodes.',
|
|
25
|
+
surfaces: 'report',
|
|
26
|
+
kept: ['EDGE_ENDS_SAME_REFERENCE', 'SELF_LOOP_FORMED'],
|
|
27
|
+
},
|
|
28
|
+
GRAPH_FACT_INVALID: {
|
|
29
|
+
statement: 'A fact holds a valid id, Class and portable Properties.',
|
|
30
|
+
surfaces: 'cause',
|
|
31
|
+
kept: ['REQUEST_UNDECODABLE'],
|
|
32
|
+
},
|
|
33
|
+
GRAPH_NODE_DUPLICATE: {
|
|
34
|
+
statement: 'A NodeId names one Node.',
|
|
35
|
+
surfaces: 'cause',
|
|
36
|
+
kept: ['NODE_EXISTS'],
|
|
37
|
+
},
|
|
38
|
+
GRAPH_EDGE_DUPLICATE: {
|
|
39
|
+
statement: 'An Edge key names one Edge.',
|
|
40
|
+
surfaces: 'cause',
|
|
41
|
+
kept: ['EDGE_EXISTS'],
|
|
42
|
+
},
|
|
43
|
+
GRAPH_NODE_NOT_UNIQUE: {
|
|
44
|
+
statement: 'Two Nodes a unique tuple covers hold different values of it while every Property of it has a value.',
|
|
45
|
+
surfaces: 'cause',
|
|
46
|
+
kept: ['NODE_KEY_DUPLICATED'],
|
|
47
|
+
},
|
|
48
|
+
GRAPH_EDGE_NOT_UNIQUE: {
|
|
49
|
+
statement: 'Two Edges a unique tuple covers hold different values of it while each of its fields is present.',
|
|
50
|
+
surfaces: 'cause',
|
|
51
|
+
kept: ['EDGE_KEY_DUPLICATED'],
|
|
52
|
+
},
|
|
53
|
+
GRAPH_PROPERTY_UNKNOWN: {
|
|
54
|
+
statement: 'During a repair session, a fact of an application Class the session has not staged holds only Properties one side of the session declares.',
|
|
55
|
+
surfaces: 'cause',
|
|
56
|
+
kept: ['PROPERTY_UNKNOWN'],
|
|
57
|
+
},
|
|
58
|
+
GRAPH_CLASS_MISMATCH: {
|
|
59
|
+
statement: 'The Registry answers for the Class it was asked about.',
|
|
60
|
+
surfaces: 'cause',
|
|
61
|
+
},
|
|
62
|
+
GRAPH_CLASS_INVALID: {
|
|
63
|
+
statement: 'The Registry describes a Class by its kind, orientation and unique tuples.',
|
|
64
|
+
surfaces: 'cause',
|
|
65
|
+
},
|
|
66
|
+
GRAPH_CONTEXT_INVALID: {
|
|
67
|
+
statement: 'The Registry answers with well-formed diagnostics.',
|
|
68
|
+
surfaces: 'cause',
|
|
69
|
+
},
|
|
70
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { SchemaDiagnosticCode } from '../diagnostic.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the Kernel does with one field a Schema declares. `rows`: what the Kernel does to data about
|
|
4
|
+
* it is stated by the rows which name it, an abstention included. `accepted`: only the acceptance
|
|
5
|
+
* of a document reads it, under this rule. `through`: its rows name its parts, the fields of that
|
|
6
|
+
* prefix. `outside`: it belongs to another layer of the Kernel, which holds its own rules.
|
|
7
|
+
*/
|
|
8
|
+
export type FieldEnforcement = 'rows' | {
|
|
9
|
+
readonly accepted: SchemaDiagnosticCode;
|
|
10
|
+
} | {
|
|
11
|
+
readonly through: 'endpoint' | 'constraint';
|
|
12
|
+
} | {
|
|
13
|
+
readonly outside: 'authority' | 'calls' | 'presentation';
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Every field of every definition a Schema declares, classified. A field added to the DSL does not
|
|
17
|
+
* compile until it is classified here.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FIELDS: Readonly<{
|
|
20
|
+
readonly 'class.ref': 'rows';
|
|
21
|
+
readonly 'class.kind': 'rows';
|
|
22
|
+
readonly 'class.abstract': 'rows';
|
|
23
|
+
readonly 'class.inheritance': 'rows';
|
|
24
|
+
readonly 'class.orientation': 'rows';
|
|
25
|
+
readonly 'class.extends': 'rows';
|
|
26
|
+
readonly 'class.policies': {
|
|
27
|
+
readonly outside: 'authority';
|
|
28
|
+
};
|
|
29
|
+
readonly 'class.data': 'rows';
|
|
30
|
+
readonly 'class.endpoints': {
|
|
31
|
+
readonly through: 'endpoint';
|
|
32
|
+
};
|
|
33
|
+
readonly 'class.constraints': {
|
|
34
|
+
readonly through: 'constraint';
|
|
35
|
+
};
|
|
36
|
+
readonly 'class.unique': 'rows';
|
|
37
|
+
readonly 'class.properties': 'rows';
|
|
38
|
+
readonly 'class.methods': {
|
|
39
|
+
readonly outside: 'calls';
|
|
40
|
+
};
|
|
41
|
+
readonly 'class.description': {
|
|
42
|
+
readonly outside: 'presentation';
|
|
43
|
+
};
|
|
44
|
+
readonly 'class.icon': {
|
|
45
|
+
readonly outside: 'presentation';
|
|
46
|
+
};
|
|
47
|
+
readonly 'property.schema': 'rows';
|
|
48
|
+
readonly 'property.required': 'rows';
|
|
49
|
+
readonly 'property.auto': 'rows';
|
|
50
|
+
readonly 'property.immutable': 'rows';
|
|
51
|
+
readonly 'property.state': 'rows';
|
|
52
|
+
readonly 'property.description': {
|
|
53
|
+
readonly outside: 'presentation';
|
|
54
|
+
};
|
|
55
|
+
readonly 'endpoint.role': {
|
|
56
|
+
readonly accepted: 'DV_EDGE_ROLE';
|
|
57
|
+
};
|
|
58
|
+
readonly 'endpoint.accepts': 'rows';
|
|
59
|
+
readonly 'endpoint.onDelete': 'rows';
|
|
60
|
+
readonly 'endpoint.outgoing': 'rows';
|
|
61
|
+
readonly 'endpoint.incoming': 'rows';
|
|
62
|
+
readonly 'endpoint.incident': 'rows';
|
|
63
|
+
readonly 'constraint.noSelf': 'rows';
|
|
64
|
+
readonly 'constraint.acyclic': 'rows';
|
|
65
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { deepFreeze } from '../../language/freeze.js';
|
|
2
|
+
/**
|
|
3
|
+
* Every field of every definition a Schema declares, classified. A field added to the DSL does not
|
|
4
|
+
* compile until it is classified here.
|
|
5
|
+
*/
|
|
6
|
+
export const FIELDS = deepFreeze({
|
|
7
|
+
'class.ref': 'rows',
|
|
8
|
+
'class.kind': 'rows',
|
|
9
|
+
'class.abstract': 'rows',
|
|
10
|
+
'class.inheritance': 'rows',
|
|
11
|
+
'class.orientation': 'rows',
|
|
12
|
+
'class.extends': 'rows',
|
|
13
|
+
'class.policies': { outside: 'authority' },
|
|
14
|
+
'class.data': 'rows',
|
|
15
|
+
'class.endpoints': { through: 'endpoint' },
|
|
16
|
+
'class.constraints': { through: 'constraint' },
|
|
17
|
+
'class.unique': 'rows',
|
|
18
|
+
'class.properties': 'rows',
|
|
19
|
+
'class.methods': { outside: 'calls' },
|
|
20
|
+
'class.description': { outside: 'presentation' },
|
|
21
|
+
'class.icon': { outside: 'presentation' },
|
|
22
|
+
'property.schema': 'rows',
|
|
23
|
+
'property.required': 'rows',
|
|
24
|
+
'property.auto': 'rows',
|
|
25
|
+
'property.immutable': 'rows',
|
|
26
|
+
'property.state': 'rows',
|
|
27
|
+
'property.description': { outside: 'presentation' },
|
|
28
|
+
'endpoint.role': { accepted: 'DV_EDGE_ROLE' },
|
|
29
|
+
'endpoint.accepts': 'rows',
|
|
30
|
+
'endpoint.onDelete': 'rows',
|
|
31
|
+
'endpoint.outgoing': 'rows',
|
|
32
|
+
'endpoint.incoming': 'rows',
|
|
33
|
+
'endpoint.incident': 'rows',
|
|
34
|
+
'constraint.noSelf': 'rows',
|
|
35
|
+
'constraint.acyclic': 'rows',
|
|
36
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { InstallId } from './install.js';
|
|
2
|
+
import type { WriteId } from './write.js';
|
|
3
|
+
import { INSTALL } from './install.js';
|
|
4
|
+
import { WRITE } from './write.js';
|
|
5
|
+
export { CHANGES } from './changes.js';
|
|
6
|
+
export type { SchemaChange } from './changes.js';
|
|
7
|
+
export { DERIVED, RESOLVED_MEMBERS } from './derived.js';
|
|
8
|
+
export type { DerivedMeaning, ResolvedMember } from './derived.js';
|
|
9
|
+
export { DISPOSE } from './dispose.js';
|
|
10
|
+
export { FACTS } from './facts.js';
|
|
11
|
+
export type { FactJudgement } from './facts.js';
|
|
12
|
+
export { FIELDS } from './fields.js';
|
|
13
|
+
export type { FieldEnforcement } from './fields.js';
|
|
14
|
+
export { LIFECYCLE } from './lifecycle.js';
|
|
15
|
+
export { OBLIGATIONS, REQUIREMENTS, RESERVED_MIGRATION } from './obligations.js';
|
|
16
|
+
export type { ChangeRequirement, DataObligation, DeclaredField, DisposeEffectEnforcement, DisposeEnforcement, DisposeMode, DisposeRefusal, DisposeRefusalEnforcement, EnforcementLayer, EnforcementPhase, EnforcementScope, EnforcementSubject, InstallEnforcement, InstallRaise, InstallRefusal, KernelFact, LifecycleEnforcement, ObligationFamily, ObligationOperation, WriteAbstention, WriteEffectEnforcement, WriteEnforcement, WriteMode, WritePhase, WriteRefusal, WriteRefusalEnforcement, } from './model.js';
|
|
17
|
+
export { INSTALL, WRITE };
|
|
18
|
+
export type { InstallId };
|
|
19
|
+
/**
|
|
20
|
+
* The refusals of the planner: the rows it raises by name, which is why a refusal of the planner
|
|
21
|
+
* does not compile without one.
|
|
22
|
+
*/
|
|
23
|
+
export type PlanningId = {
|
|
24
|
+
[Id in WriteId]: (typeof WRITE)[Id] extends {
|
|
25
|
+
readonly refusal: {
|
|
26
|
+
readonly planner: true;
|
|
27
|
+
};
|
|
28
|
+
} ? Id : never;
|
|
29
|
+
}[WriteId];
|
|
30
|
+
/** The rows of one error of a schema change, which raises by naming them. */
|
|
31
|
+
type RaisedBy<Error extends 'plan' | 'projection'> = {
|
|
32
|
+
[Id in InstallId]: (typeof INSTALL)[Id] extends {
|
|
33
|
+
readonly raised: {
|
|
34
|
+
readonly error: Error;
|
|
35
|
+
};
|
|
36
|
+
} ? Id : never;
|
|
37
|
+
}[InstallId];
|
|
38
|
+
export type PlanRow = RaisedBy<'plan'>;
|
|
39
|
+
export type ProjectionRow = RaisedBy<'projection'>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { INSTALL } from './install.js';
|
|
2
|
+
import { WRITE } from './write.js';
|
|
3
|
+
export { CHANGES } from './changes.js';
|
|
4
|
+
export { DERIVED, RESOLVED_MEMBERS } from './derived.js';
|
|
5
|
+
export { DISPOSE } from './dispose.js';
|
|
6
|
+
export { FACTS } from './facts.js';
|
|
7
|
+
export { FIELDS } from './fields.js';
|
|
8
|
+
export { LIFECYCLE } from './lifecycle.js';
|
|
9
|
+
export { OBLIGATIONS, REQUIREMENTS, RESERVED_MIGRATION } from './obligations.js';
|
|
10
|
+
export { INSTALL, WRITE };
|