@living-architecture/riviere-builder 0.5.28 → 0.6.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/dist/domain/builder-facade.d.ts +171 -0
- package/dist/domain/builder-facade.d.ts.map +1 -0
- package/dist/domain/builder-facade.js +211 -0
- package/dist/domain/builder-graph.d.ts +10 -0
- package/dist/domain/builder-graph.d.ts.map +1 -0
- package/dist/domain/construction/builder-assertions.d.ts.map +1 -0
- package/dist/{builder-assertions.js → domain/construction/builder-assertions.js} +1 -1
- package/dist/domain/construction/builder-internals.d.ts.map +1 -0
- package/dist/{builder-internals.js → domain/construction/builder-internals.js} +1 -1
- package/dist/{errors.d.ts → domain/construction/construction-errors.d.ts} +1 -10
- package/dist/domain/construction/construction-errors.d.ts.map +1 -0
- package/dist/{errors.js → domain/construction/construction-errors.js} +0 -18
- package/dist/{types.d.ts → domain/construction/construction-types.d.ts} +2 -63
- package/dist/domain/construction/construction-types.d.ts.map +1 -0
- package/dist/domain/construction/construction-types.js +1 -0
- package/dist/domain/construction/graph-construction.d.ts +19 -0
- package/dist/domain/construction/graph-construction.d.ts.map +1 -0
- package/dist/domain/construction/graph-construction.js +154 -0
- package/dist/{deduplicate.d.ts → domain/enrichment/deduplicate-transitions.d.ts} +1 -2
- package/dist/domain/enrichment/deduplicate-transitions.d.ts.map +1 -0
- package/dist/{deduplicate.js → domain/enrichment/deduplicate-transitions.js} +0 -4
- package/dist/domain/enrichment/enrichment-errors.d.ts +6 -0
- package/dist/domain/enrichment/enrichment-errors.d.ts.map +1 -0
- package/dist/domain/enrichment/enrichment-errors.js +10 -0
- package/dist/domain/enrichment/enrichment-types.d.ts +9 -0
- package/dist/domain/enrichment/enrichment-types.d.ts.map +1 -0
- package/dist/domain/enrichment/enrichment-types.js +1 -0
- package/dist/domain/enrichment/graph-enrichment.d.ts +8 -0
- package/dist/domain/enrichment/graph-enrichment.d.ts.map +1 -0
- package/dist/domain/enrichment/graph-enrichment.js +39 -0
- package/dist/domain/enrichment/merge-behavior.d.ts.map +1 -0
- package/dist/{merge-behavior.js → domain/enrichment/merge-behavior.js} +1 -1
- package/dist/{component-suggestion.d.ts → domain/error-recovery/component-suggestion.d.ts} +2 -2
- package/dist/domain/error-recovery/component-suggestion.d.ts.map +1 -0
- package/dist/{component-suggestion.js → domain/error-recovery/component-suggestion.js} +2 -2
- package/dist/domain/error-recovery/match-types.d.ts +21 -0
- package/dist/domain/error-recovery/match-types.d.ts.map +1 -0
- package/dist/domain/error-recovery/match-types.js +1 -0
- package/dist/domain/error-recovery/near-match.d.ts +8 -0
- package/dist/domain/error-recovery/near-match.d.ts.map +1 -0
- package/dist/domain/error-recovery/near-match.js +10 -0
- package/dist/domain/index.d.ts +6 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +5 -0
- package/dist/domain/inspection/graph-inspection.d.ts +14 -0
- package/dist/domain/inspection/graph-inspection.d.ts.map +1 -0
- package/dist/domain/inspection/graph-inspection.js +23 -0
- package/dist/{inspection.d.ts → domain/inspection/inspection-functions.d.ts} +2 -2
- package/dist/domain/inspection/inspection-functions.d.ts.map +1 -0
- package/dist/domain/inspection/inspection-types.d.ts +23 -0
- package/dist/domain/inspection/inspection-types.d.ts.map +1 -0
- package/dist/domain/inspection/inspection-types.js +1 -0
- package/dist/domain/linking/graph-linking.d.ts +10 -0
- package/dist/domain/linking/graph-linking.d.ts.map +1 -0
- package/dist/domain/linking/graph-linking.js +35 -0
- package/dist/domain/linking/linking-types.d.ts +15 -0
- package/dist/domain/linking/linking-types.d.ts.map +1 -0
- package/dist/domain/linking/linking-types.js +1 -0
- package/dist/domain/riviere-builder.d.ts +21 -0
- package/dist/domain/riviere-builder.d.ts.map +1 -0
- package/dist/domain/riviere-builder.js +73 -0
- package/dist/platform/domain/collection-utils/deduplicate-strings.d.ts +2 -0
- package/dist/platform/domain/collection-utils/deduplicate-strings.d.ts.map +1 -0
- package/dist/platform/domain/collection-utils/deduplicate-strings.js +4 -0
- package/dist/platform/domain/text-similarity/string-similarity.d.ts.map +1 -0
- package/package.json +10 -10
- package/dist/builder-assertions.d.ts.map +0 -1
- package/dist/builder-internals.d.ts.map +0 -1
- package/dist/builder-test-fixtures.d.ts +0 -7
- package/dist/builder-test-fixtures.d.ts.map +0 -1
- package/dist/builder-test-fixtures.js +0 -26
- package/dist/builder.d.ts +0 -479
- package/dist/builder.d.ts.map +0 -1
- package/dist/builder.js +0 -734
- package/dist/component-suggestion.d.ts.map +0 -1
- package/dist/deduplicate.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/inspection.d.ts.map +0 -1
- package/dist/merge-behavior.d.ts.map +0 -1
- package/dist/string-similarity.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- /package/dist/{types.js → domain/builder-graph.js} +0 -0
- /package/dist/{builder-assertions.d.ts → domain/construction/builder-assertions.d.ts} +0 -0
- /package/dist/{builder-internals.d.ts → domain/construction/builder-internals.d.ts} +0 -0
- /package/dist/{merge-behavior.d.ts → domain/enrichment/merge-behavior.d.ts} +0 -0
- /package/dist/{inspection.js → domain/inspection/inspection-functions.js} +0 -0
- /package/dist/{string-similarity.d.ts → platform/domain/text-similarity/string-similarity.d.ts} +0 -0
- /package/dist/{string-similarity.js → platform/domain/text-similarity/string-similarity.js} +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { APIComponent, CustomComponent, DomainOpComponent, EventComponent, EventHandlerComponent, ExternalLink, Link, RiviereGraph, SourceInfo, UIComponent, UseCaseComponent } from '@living-architecture/riviere-schema';
|
|
2
|
+
import type { ValidationResult } from '@living-architecture/riviere-query';
|
|
3
|
+
import type { APIInput, BuilderOptions, CustomInput, CustomTypeInput, DomainInput, DomainOpInput, EventHandlerInput, EventInput, UIInput, UseCaseInput } from './construction/construction-types';
|
|
4
|
+
import type { EnrichmentInput } from './enrichment/enrichment-types';
|
|
5
|
+
import type { NearMatchMismatch, NearMatchOptions, NearMatchQuery, NearMatchResult } from './error-recovery/match-types';
|
|
6
|
+
import type { BuilderStats, BuilderWarning } from './inspection/inspection-types';
|
|
7
|
+
import type { ExternalLinkInput, LinkInput } from './linking/linking-types';
|
|
8
|
+
export type { APIInput, BuilderOptions, BuilderStats, BuilderWarning, CustomInput, CustomTypeInput, DomainInput, DomainOpInput, EnrichmentInput, EventHandlerInput, EventInput, ExternalLinkInput, LinkInput, NearMatchMismatch, NearMatchOptions, NearMatchQuery, NearMatchResult, UIInput, UseCaseInput, };
|
|
9
|
+
/**
|
|
10
|
+
* Programmatically construct Riviere architecture graphs.
|
|
11
|
+
*
|
|
12
|
+
* Thin facade preserving the flat public API while delegating
|
|
13
|
+
* to focused domain classes internally.
|
|
14
|
+
*/
|
|
15
|
+
export declare class RiviereBuilder {
|
|
16
|
+
private readonly delegate;
|
|
17
|
+
private constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Restores a builder from a previously serialized graph.
|
|
20
|
+
*
|
|
21
|
+
* @param graph - A valid RiviereGraph to resume from
|
|
22
|
+
* @returns A new RiviereBuilder with the graph state restored
|
|
23
|
+
*/
|
|
24
|
+
static resume(graph: RiviereGraph): RiviereBuilder;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new builder with initial configuration.
|
|
27
|
+
*
|
|
28
|
+
* @param options - Configuration including sources and domains
|
|
29
|
+
* @returns A new RiviereBuilder instance
|
|
30
|
+
*/
|
|
31
|
+
static new(options: BuilderOptions): RiviereBuilder;
|
|
32
|
+
/**
|
|
33
|
+
* Adds an additional source repository to the graph.
|
|
34
|
+
*
|
|
35
|
+
* @param source - Source repository information
|
|
36
|
+
*/
|
|
37
|
+
addSource(source: SourceInfo): void;
|
|
38
|
+
/**
|
|
39
|
+
* Adds a new domain to the graph.
|
|
40
|
+
*
|
|
41
|
+
* @param input - Domain name and description
|
|
42
|
+
*/
|
|
43
|
+
addDomain(input: DomainInput): void;
|
|
44
|
+
/**
|
|
45
|
+
* Adds a UI component to the graph.
|
|
46
|
+
*
|
|
47
|
+
* @param input - UI component properties
|
|
48
|
+
* @returns The created UI component
|
|
49
|
+
*/
|
|
50
|
+
addUI(input: UIInput): UIComponent;
|
|
51
|
+
/**
|
|
52
|
+
* Adds an API component to the graph.
|
|
53
|
+
*
|
|
54
|
+
* @param input - API component properties
|
|
55
|
+
* @returns The created API component
|
|
56
|
+
*/
|
|
57
|
+
addApi(input: APIInput): APIComponent;
|
|
58
|
+
/**
|
|
59
|
+
* Adds a UseCase component to the graph.
|
|
60
|
+
*
|
|
61
|
+
* @param input - UseCase component properties
|
|
62
|
+
* @returns The created UseCase component
|
|
63
|
+
*/
|
|
64
|
+
addUseCase(input: UseCaseInput): UseCaseComponent;
|
|
65
|
+
/**
|
|
66
|
+
* Adds a DomainOp component to the graph.
|
|
67
|
+
*
|
|
68
|
+
* @param input - DomainOp component properties
|
|
69
|
+
* @returns The created DomainOp component
|
|
70
|
+
*/
|
|
71
|
+
addDomainOp(input: DomainOpInput): DomainOpComponent;
|
|
72
|
+
/**
|
|
73
|
+
* Adds an Event component to the graph.
|
|
74
|
+
*
|
|
75
|
+
* @param input - Event component properties
|
|
76
|
+
* @returns The created Event component
|
|
77
|
+
*/
|
|
78
|
+
addEvent(input: EventInput): EventComponent;
|
|
79
|
+
/**
|
|
80
|
+
* Adds an EventHandler component to the graph.
|
|
81
|
+
*
|
|
82
|
+
* @param input - EventHandler component properties
|
|
83
|
+
* @returns The created EventHandler component
|
|
84
|
+
*/
|
|
85
|
+
addEventHandler(input: EventHandlerInput): EventHandlerComponent;
|
|
86
|
+
/**
|
|
87
|
+
* Defines a custom component type for the graph.
|
|
88
|
+
*
|
|
89
|
+
* @param input - Custom type definition
|
|
90
|
+
*/
|
|
91
|
+
defineCustomType(input: CustomTypeInput): void;
|
|
92
|
+
/**
|
|
93
|
+
* Adds a Custom component to the graph.
|
|
94
|
+
*
|
|
95
|
+
* @param input - Custom component properties
|
|
96
|
+
* @returns The created Custom component
|
|
97
|
+
*/
|
|
98
|
+
addCustom(input: CustomInput): CustomComponent;
|
|
99
|
+
/**
|
|
100
|
+
* Enriches a DomainOp component with additional domain details.
|
|
101
|
+
*
|
|
102
|
+
* @param id - The component ID to enrich
|
|
103
|
+
* @param enrichment - State changes and business rules to add
|
|
104
|
+
*/
|
|
105
|
+
enrichComponent(id: string, enrichment: EnrichmentInput): void;
|
|
106
|
+
/**
|
|
107
|
+
* Finds components similar to a query for error recovery.
|
|
108
|
+
*
|
|
109
|
+
* @param query - Search criteria including partial ID, name, type, or domain
|
|
110
|
+
* @param options - Optional matching thresholds and limits
|
|
111
|
+
* @returns Array of similar components with similarity scores
|
|
112
|
+
*/
|
|
113
|
+
nearMatches(query: NearMatchQuery, options?: NearMatchOptions): NearMatchResult[];
|
|
114
|
+
/**
|
|
115
|
+
* Creates a link between two components in the graph.
|
|
116
|
+
*
|
|
117
|
+
* @param input - Link properties including source, target, and type
|
|
118
|
+
* @returns The created link
|
|
119
|
+
*/
|
|
120
|
+
link(input: LinkInput): Link;
|
|
121
|
+
/**
|
|
122
|
+
* Creates a link from a component to an external system.
|
|
123
|
+
*
|
|
124
|
+
* @param input - External link properties including target system info
|
|
125
|
+
* @returns The created external link
|
|
126
|
+
*/
|
|
127
|
+
linkExternal(input: ExternalLinkInput): ExternalLink;
|
|
128
|
+
/**
|
|
129
|
+
* Returns non-fatal issues found in the graph.
|
|
130
|
+
*
|
|
131
|
+
* @returns Array of warning objects with type and message
|
|
132
|
+
*/
|
|
133
|
+
warnings(): BuilderWarning[];
|
|
134
|
+
/**
|
|
135
|
+
* Returns statistics about the current graph state.
|
|
136
|
+
*
|
|
137
|
+
* @returns Counts of components by type, domains, and links
|
|
138
|
+
*/
|
|
139
|
+
stats(): BuilderStats;
|
|
140
|
+
/**
|
|
141
|
+
* Runs full validation on the graph.
|
|
142
|
+
*
|
|
143
|
+
* @returns Validation result with valid flag and error details
|
|
144
|
+
*/
|
|
145
|
+
validate(): ValidationResult;
|
|
146
|
+
/**
|
|
147
|
+
* Returns IDs of components with no incoming or outgoing links.
|
|
148
|
+
*
|
|
149
|
+
* @returns Array of orphaned component IDs
|
|
150
|
+
*/
|
|
151
|
+
orphans(): string[];
|
|
152
|
+
/**
|
|
153
|
+
* Returns a RiviereQuery instance for the current graph state.
|
|
154
|
+
*
|
|
155
|
+
* @returns RiviereQuery instance for the current graph
|
|
156
|
+
*/
|
|
157
|
+
query(): import('@living-architecture/riviere-query').RiviereQuery;
|
|
158
|
+
/**
|
|
159
|
+
* Serializes the current graph state as a JSON string.
|
|
160
|
+
*
|
|
161
|
+
* @returns JSON string representation of the graph
|
|
162
|
+
*/
|
|
163
|
+
serialize(): string;
|
|
164
|
+
/**
|
|
165
|
+
* Validates and returns the completed graph.
|
|
166
|
+
*
|
|
167
|
+
* @returns Valid RiviereGraph object
|
|
168
|
+
*/
|
|
169
|
+
build(): RiviereGraph;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=builder-facade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-facade.d.ts","sourceRoot":"","sources":["../../src/domain/builder-facade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,WAAW,EACX,eAAe,EACf,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,OAAO,EACP,YAAY,EACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EACV,i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;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAI9C;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe;IAI9C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI;IAI9D;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,EAAE;IAIjF;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAI5B;;;;;OAKG;IACH,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY;IAIpD;;;;OAIG;IACH,QAAQ,IAAI,cAAc,EAAE;IAI5B;;;;OAIG;IACH,KAAK,IAAI,YAAY;IAIrB;;;;OAIG;IACH,QAAQ,IAAI,gBAAgB;IAI5B;;;;OAIG;IACH,OAAO,IAAI,MAAM,EAAE;IAInB;;;;OAIG;IACH,KAAK,IAAI,OAAO,oCAAoC,EAAE,YAAY;IAIlE;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;;OAIG;IACH,KAAK,IAAI,YAAY;CAGtB"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { RiviereBuilder as DomainBuilder } from './riviere-builder';
|
|
2
|
+
/**
|
|
3
|
+
* Programmatically construct Riviere architecture graphs.
|
|
4
|
+
*
|
|
5
|
+
* Thin facade preserving the flat public API while delegating
|
|
6
|
+
* to focused domain classes internally.
|
|
7
|
+
*/
|
|
8
|
+
export class RiviereBuilder {
|
|
9
|
+
delegate;
|
|
10
|
+
constructor(delegate) {
|
|
11
|
+
this.delegate = delegate;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Restores a builder from a previously serialized graph.
|
|
15
|
+
*
|
|
16
|
+
* @param graph - A valid RiviereGraph to resume from
|
|
17
|
+
* @returns A new RiviereBuilder with the graph state restored
|
|
18
|
+
*/
|
|
19
|
+
static resume(graph) {
|
|
20
|
+
return new RiviereBuilder(DomainBuilder.resume(graph));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new builder with initial configuration.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Configuration including sources and domains
|
|
26
|
+
* @returns A new RiviereBuilder instance
|
|
27
|
+
*/
|
|
28
|
+
static new(options) {
|
|
29
|
+
return new RiviereBuilder(DomainBuilder.new(options));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Adds an additional source repository to the graph.
|
|
33
|
+
*
|
|
34
|
+
* @param source - Source repository information
|
|
35
|
+
*/
|
|
36
|
+
addSource(source) {
|
|
37
|
+
this.delegate.construction.addSource(source);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Adds a new domain to the graph.
|
|
41
|
+
*
|
|
42
|
+
* @param input - Domain name and description
|
|
43
|
+
*/
|
|
44
|
+
addDomain(input) {
|
|
45
|
+
this.delegate.construction.addDomain(input);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Adds a UI component to the graph.
|
|
49
|
+
*
|
|
50
|
+
* @param input - UI component properties
|
|
51
|
+
* @returns The created UI component
|
|
52
|
+
*/
|
|
53
|
+
addUI(input) {
|
|
54
|
+
return this.delegate.construction.addUI(input);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Adds an API component to the graph.
|
|
58
|
+
*
|
|
59
|
+
* @param input - API component properties
|
|
60
|
+
* @returns The created API component
|
|
61
|
+
*/
|
|
62
|
+
addApi(input) {
|
|
63
|
+
return this.delegate.construction.addApi(input);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Adds a UseCase component to the graph.
|
|
67
|
+
*
|
|
68
|
+
* @param input - UseCase component properties
|
|
69
|
+
* @returns The created UseCase component
|
|
70
|
+
*/
|
|
71
|
+
addUseCase(input) {
|
|
72
|
+
return this.delegate.construction.addUseCase(input);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Adds a DomainOp component to the graph.
|
|
76
|
+
*
|
|
77
|
+
* @param input - DomainOp component properties
|
|
78
|
+
* @returns The created DomainOp component
|
|
79
|
+
*/
|
|
80
|
+
addDomainOp(input) {
|
|
81
|
+
return this.delegate.construction.addDomainOp(input);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Adds an Event component to the graph.
|
|
85
|
+
*
|
|
86
|
+
* @param input - Event component properties
|
|
87
|
+
* @returns The created Event component
|
|
88
|
+
*/
|
|
89
|
+
addEvent(input) {
|
|
90
|
+
return this.delegate.construction.addEvent(input);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Adds an EventHandler component to the graph.
|
|
94
|
+
*
|
|
95
|
+
* @param input - EventHandler component properties
|
|
96
|
+
* @returns The created EventHandler component
|
|
97
|
+
*/
|
|
98
|
+
addEventHandler(input) {
|
|
99
|
+
return this.delegate.construction.addEventHandler(input);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Defines a custom component type for the graph.
|
|
103
|
+
*
|
|
104
|
+
* @param input - Custom type definition
|
|
105
|
+
*/
|
|
106
|
+
defineCustomType(input) {
|
|
107
|
+
this.delegate.construction.defineCustomType(input);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Adds a Custom component to the graph.
|
|
111
|
+
*
|
|
112
|
+
* @param input - Custom component properties
|
|
113
|
+
* @returns The created Custom component
|
|
114
|
+
*/
|
|
115
|
+
addCustom(input) {
|
|
116
|
+
return this.delegate.construction.addCustom(input);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Enriches a DomainOp component with additional domain details.
|
|
120
|
+
*
|
|
121
|
+
* @param id - The component ID to enrich
|
|
122
|
+
* @param enrichment - State changes and business rules to add
|
|
123
|
+
*/
|
|
124
|
+
enrichComponent(id, enrichment) {
|
|
125
|
+
this.delegate.enrichment.enrichComponent(id, enrichment);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Finds components similar to a query for error recovery.
|
|
129
|
+
*
|
|
130
|
+
* @param query - Search criteria including partial ID, name, type, or domain
|
|
131
|
+
* @param options - Optional matching thresholds and limits
|
|
132
|
+
* @returns Array of similar components with similarity scores
|
|
133
|
+
*/
|
|
134
|
+
nearMatches(query, options) {
|
|
135
|
+
return this.delegate.errorRecovery.findNearMatches(query, options);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Creates a link between two components in the graph.
|
|
139
|
+
*
|
|
140
|
+
* @param input - Link properties including source, target, and type
|
|
141
|
+
* @returns The created link
|
|
142
|
+
*/
|
|
143
|
+
link(input) {
|
|
144
|
+
return this.delegate.linking.link(input);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Creates a link from a component to an external system.
|
|
148
|
+
*
|
|
149
|
+
* @param input - External link properties including target system info
|
|
150
|
+
* @returns The created external link
|
|
151
|
+
*/
|
|
152
|
+
linkExternal(input) {
|
|
153
|
+
return this.delegate.linking.linkExternal(input);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns non-fatal issues found in the graph.
|
|
157
|
+
*
|
|
158
|
+
* @returns Array of warning objects with type and message
|
|
159
|
+
*/
|
|
160
|
+
warnings() {
|
|
161
|
+
return this.delegate.inspection.warnings();
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns statistics about the current graph state.
|
|
165
|
+
*
|
|
166
|
+
* @returns Counts of components by type, domains, and links
|
|
167
|
+
*/
|
|
168
|
+
stats() {
|
|
169
|
+
return this.delegate.inspection.stats();
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Runs full validation on the graph.
|
|
173
|
+
*
|
|
174
|
+
* @returns Validation result with valid flag and error details
|
|
175
|
+
*/
|
|
176
|
+
validate() {
|
|
177
|
+
return this.delegate.inspection.validate();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns IDs of components with no incoming or outgoing links.
|
|
181
|
+
*
|
|
182
|
+
* @returns Array of orphaned component IDs
|
|
183
|
+
*/
|
|
184
|
+
orphans() {
|
|
185
|
+
return this.delegate.inspection.orphans();
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns a RiviereQuery instance for the current graph state.
|
|
189
|
+
*
|
|
190
|
+
* @returns RiviereQuery instance for the current graph
|
|
191
|
+
*/
|
|
192
|
+
query() {
|
|
193
|
+
return this.delegate.inspection.query();
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Serializes the current graph state as a JSON string.
|
|
197
|
+
*
|
|
198
|
+
* @returns JSON string representation of the graph
|
|
199
|
+
*/
|
|
200
|
+
serialize() {
|
|
201
|
+
return this.delegate.serialize();
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Validates and returns the completed graph.
|
|
205
|
+
*
|
|
206
|
+
* @returns Valid RiviereGraph object
|
|
207
|
+
*/
|
|
208
|
+
build() {
|
|
209
|
+
return this.delegate.build();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomTypeDefinition, ExternalLink, GraphMetadata, RiviereGraph, SourceInfo } from '@living-architecture/riviere-schema';
|
|
2
|
+
export interface BuilderMetadata extends Omit<GraphMetadata, 'sources' | 'customTypes'> {
|
|
3
|
+
sources: SourceInfo[];
|
|
4
|
+
customTypes: Record<string, CustomTypeDefinition>;
|
|
5
|
+
}
|
|
6
|
+
export interface BuilderGraph extends Omit<RiviereGraph, 'metadata' | 'externalLinks'> {
|
|
7
|
+
metadata: BuilderMetadata;
|
|
8
|
+
externalLinks: ExternalLink[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=builder-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-graph.d.ts","sourceRoot":"","sources":["../../src/domain/builder-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,qCAAqC,CAAA;AAE5C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,aAAa,CAAC;IACrF,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,eAAe,CAAC;IACpF,QAAQ,EAAE,eAAe,CAAA;IACzB,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-assertions.d.ts","sourceRoot":"","sources":["../../../src/domain/construction/builder-assertions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAAE,cAAc,EACrC,MAAM,qCAAqC,CAAA;AAO5C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAIhG;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACjD,cAAc,EAAE,MAAM,GACrB,IAAI,CAKN;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACjD,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC5C,IAAI,CAaN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomTypeNotFoundError, DomainNotFoundError, MissingRequiredPropertiesError, } from './errors';
|
|
1
|
+
import { CustomTypeNotFoundError, DomainNotFoundError, MissingRequiredPropertiesError, } from './construction-errors';
|
|
2
2
|
export function assertDomainExists(domains, domain) {
|
|
3
3
|
if (!domains[domain]) {
|
|
4
4
|
throw new DomainNotFoundError(domain);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-internals.d.ts","sourceRoot":"","sources":["../../../src/domain/construction/builder-internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,oBAAoB,EACpB,cAAc,EACf,MAAM,qCAAqC,CAAA;AAS5C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,CAGR;AAED,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,KAAK,CAEvF;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EACvC,MAAM,EAAE,MAAM,GACb,IAAI,CAEN;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACjD,cAAc,EAAE,MAAM,GACrB,IAAI,CAEN;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACjD,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC5C,IAAI,CAEN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentId } from '@living-architecture/riviere-schema';
|
|
2
|
-
import { createSourceNotFoundError } from '
|
|
2
|
+
import { createSourceNotFoundError } from '../error-recovery/component-suggestion';
|
|
3
3
|
import { assertCustomTypeExists, assertDomainExists, assertRequiredPropertiesProvided, } from './builder-assertions';
|
|
4
4
|
export function generateComponentId(domain, module, type, name) {
|
|
5
5
|
const nameSegment = name.toLowerCase().replaceAll(/\s+/g, '-');
|
|
@@ -20,11 +20,6 @@ export declare class ComponentNotFoundError extends Error {
|
|
|
20
20
|
readonly suggestions: string[];
|
|
21
21
|
constructor(componentId: string, suggestions?: string[]);
|
|
22
22
|
}
|
|
23
|
-
export declare class InvalidEnrichmentTargetError extends Error {
|
|
24
|
-
readonly componentId: string;
|
|
25
|
-
readonly componentType: string;
|
|
26
|
-
constructor(componentId: string, componentType: string);
|
|
27
|
-
}
|
|
28
23
|
export declare class CustomTypeAlreadyDefinedError extends Error {
|
|
29
24
|
readonly typeName: string;
|
|
30
25
|
constructor(typeName: string);
|
|
@@ -47,8 +42,4 @@ export declare class BuildValidationError extends Error {
|
|
|
47
42
|
readonly validationMessages: string[];
|
|
48
43
|
constructor(messages: string[]);
|
|
49
44
|
}
|
|
50
|
-
|
|
51
|
-
readonly directory: string;
|
|
52
|
-
constructor(directory: string);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
45
|
+
//# sourceMappingURL=construction-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-errors.d.ts","sourceRoot":"","sources":["../../../src/domain/construction/construction-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;gBAEnB,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;CAU3D;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;gBAEhB,WAAW,EAAE,MAAM;CAKhC;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA;gBAElB,WAAW,EAAE,MAAM,EAAE,WAAW,GAAE,MAAM,EAAO;CAW5D;AAED,qBAAa,6BAA8B,SAAQ,KAAK;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;gBAEb,QAAQ,EAAE,MAAM;CAK7B;AAED,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA;gBAElB,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;CAM1D;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,MAAM,EAAE,MAAM;CAI3B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;;CAK7C;AAED,qBAAa,mBAAoB,SAAQ,KAAK;;CAK7C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAA;gBAEzB,QAAQ,EAAE,MAAM,EAAE;CAK/B"}
|
|
@@ -49,16 +49,6 @@ export class ComponentNotFoundError extends Error {
|
|
|
49
49
|
this.suggestions = suggestions;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
export class InvalidEnrichmentTargetError extends Error {
|
|
53
|
-
componentId;
|
|
54
|
-
componentType;
|
|
55
|
-
constructor(componentId, componentType) {
|
|
56
|
-
super(`Only DomainOp components can be enriched. '${componentId}' is type '${componentType}'`);
|
|
57
|
-
this.name = 'InvalidEnrichmentTargetError';
|
|
58
|
-
this.componentId = componentId;
|
|
59
|
-
this.componentType = componentType;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
52
|
export class CustomTypeAlreadyDefinedError extends Error {
|
|
63
53
|
typeName;
|
|
64
54
|
constructor(typeName) {
|
|
@@ -103,11 +93,3 @@ export class BuildValidationError extends Error {
|
|
|
103
93
|
this.validationMessages = messages;
|
|
104
94
|
}
|
|
105
95
|
}
|
|
106
|
-
export class DirectoryNotFoundError extends Error {
|
|
107
|
-
directory;
|
|
108
|
-
constructor(directory) {
|
|
109
|
-
super(`Directory does not exist: ${directory}`);
|
|
110
|
-
this.name = 'DirectoryNotFoundError';
|
|
111
|
-
this.directory = directory;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiType,
|
|
1
|
+
import type { ApiType, CustomPropertyDefinition, DomainMetadata, HttpMethod, OperationBehavior, OperationSignature, SourceInfo, SourceLocation, StateTransition, SystemType } from '@living-architecture/riviere-schema';
|
|
2
2
|
export interface BuilderOptions {
|
|
3
3
|
name?: string;
|
|
4
4
|
description?: string;
|
|
@@ -87,65 +87,4 @@ export interface CustomInput {
|
|
|
87
87
|
sourceLocation: SourceLocation;
|
|
88
88
|
metadata?: Record<string, unknown>;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
from: string;
|
|
92
|
-
to: string;
|
|
93
|
-
type?: LinkType;
|
|
94
|
-
}
|
|
95
|
-
export interface ExternalLinkInput {
|
|
96
|
-
from: string;
|
|
97
|
-
target: ExternalTarget;
|
|
98
|
-
type?: LinkType;
|
|
99
|
-
description?: string;
|
|
100
|
-
sourceLocation?: SourceLocation;
|
|
101
|
-
metadata?: Record<string, unknown>;
|
|
102
|
-
}
|
|
103
|
-
export interface NearMatchQuery {
|
|
104
|
-
name: string;
|
|
105
|
-
type?: ComponentType;
|
|
106
|
-
domain?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface NearMatchMismatch {
|
|
109
|
-
field: 'type' | 'domain';
|
|
110
|
-
expected: string;
|
|
111
|
-
actual: string;
|
|
112
|
-
}
|
|
113
|
-
export interface NearMatchResult {
|
|
114
|
-
component: import('@living-architecture/riviere-schema').Component;
|
|
115
|
-
score: number;
|
|
116
|
-
mismatch?: NearMatchMismatch | undefined;
|
|
117
|
-
}
|
|
118
|
-
export interface NearMatchOptions {
|
|
119
|
-
threshold?: number;
|
|
120
|
-
limit?: number;
|
|
121
|
-
}
|
|
122
|
-
export interface BuilderStats {
|
|
123
|
-
componentCount: number;
|
|
124
|
-
componentsByType: {
|
|
125
|
-
UI: number;
|
|
126
|
-
API: number;
|
|
127
|
-
UseCase: number;
|
|
128
|
-
DomainOp: number;
|
|
129
|
-
Event: number;
|
|
130
|
-
EventHandler: number;
|
|
131
|
-
Custom: number;
|
|
132
|
-
};
|
|
133
|
-
linkCount: number;
|
|
134
|
-
externalLinkCount: number;
|
|
135
|
-
domainCount: number;
|
|
136
|
-
}
|
|
137
|
-
export type WarningCode = 'ORPHAN_COMPONENT' | 'UNUSED_DOMAIN';
|
|
138
|
-
export interface BuilderWarning {
|
|
139
|
-
code: WarningCode;
|
|
140
|
-
message: string;
|
|
141
|
-
componentId?: string;
|
|
142
|
-
domainName?: string;
|
|
143
|
-
}
|
|
144
|
-
export interface EnrichmentInput {
|
|
145
|
-
entity?: string;
|
|
146
|
-
stateChanges?: StateTransition[];
|
|
147
|
-
businessRules?: string[];
|
|
148
|
-
behavior?: OperationBehavior;
|
|
149
|
-
signature?: OperationSignature;
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=types.d.ts.map
|
|
90
|
+
//# sourceMappingURL=construction-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-types.d.ts","sourceRoot":"","sources":["../../../src/domain/construction/construction-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,wBAAwB,EACxB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,eAAe,EACf,UAAU,EACX,MAAM,qCAAqC,CAAA;AAE5C,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAA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,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { APIComponent, CustomComponent, DomainOpComponent, EventComponent, EventHandlerComponent, SourceInfo, UIComponent, UseCaseComponent } from '@living-architecture/riviere-schema';
|
|
2
|
+
import type { BuilderGraph } from '../builder-graph';
|
|
3
|
+
import type { APIInput, CustomInput, CustomTypeInput, DomainInput, DomainOpInput, EventHandlerInput, EventInput, UIInput, UseCaseInput } from './construction-types';
|
|
4
|
+
export declare class GraphConstruction {
|
|
5
|
+
private readonly graph;
|
|
6
|
+
constructor(graph: BuilderGraph);
|
|
7
|
+
addSource(source: SourceInfo): void;
|
|
8
|
+
addDomain(input: DomainInput): void;
|
|
9
|
+
addUI(input: UIInput): UIComponent;
|
|
10
|
+
addApi(input: APIInput): APIComponent;
|
|
11
|
+
addUseCase(input: UseCaseInput): UseCaseComponent;
|
|
12
|
+
addDomainOp(input: DomainOpInput): DomainOpComponent;
|
|
13
|
+
addEvent(input: EventInput): EventComponent;
|
|
14
|
+
addEventHandler(input: EventHandlerInput): EventHandlerComponent;
|
|
15
|
+
defineCustomType(input: CustomTypeInput): void;
|
|
16
|
+
addCustom(input: CustomInput): CustomComponent;
|
|
17
|
+
private registerComponent;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=graph-construction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-construction.d.ts","sourceRoot":"","sources":["../../../src/domain/construction/graph-construction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,eAAe,EACf,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,OAAO,EACP,YAAY,EACb,MAAM,sBAAsB,CAAA;AAa7B,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;gBAExB,KAAK,EAAE,YAAY;IAI/B,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAInC,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAWnC,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;IAiBlC,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,YAAY;IAoBrC,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,gBAAgB;IAgBjD,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,iBAAiB;IAsBpD,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc;IAkB3C,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,qBAAqB;IAiBhE,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAc9C,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe;IAwB9C,OAAO,CAAC,iBAAiB;CAO1B"}
|