aact 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/index.mjs +489 -138
- package/dist/index.d.mts +60 -4
- package/dist/index.d.ts +60 -4
- package/dist/index.mjs +22 -21
- package/dist/shared/{aact.Dqryafrg.mjs → aact.mCX-x14V.mjs} +214 -82
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -29,6 +29,16 @@ interface ArchitectureModel {
|
|
|
29
29
|
readonly allContainers: Container[];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
declare const EXTERNAL_SYSTEM_TYPE = "System_Ext";
|
|
33
|
+
declare const SYSTEM_TYPE = "System";
|
|
34
|
+
declare const CONTAINER_TYPE = "Container";
|
|
35
|
+
declare const CONTAINER_DB_TYPE = "ContainerDb";
|
|
36
|
+
declare const COMPONENT_TYPE = "Component";
|
|
37
|
+
declare const BOUNDARY_TYPE = "Boundary";
|
|
38
|
+
declare const SYSTEM_BOUNDARY_TYPE = "System_Boundary";
|
|
39
|
+
declare const CONTAINER_BOUNDARY_TYPE = "Container_Boundary";
|
|
40
|
+
declare const PERSON_TYPE = "Person";
|
|
41
|
+
|
|
32
42
|
interface Section {
|
|
33
43
|
readonly name: string;
|
|
34
44
|
readonly prod_value: string;
|
|
@@ -60,12 +70,18 @@ interface DatabasesInfo {
|
|
|
60
70
|
count: number;
|
|
61
71
|
consumes: number;
|
|
62
72
|
}
|
|
63
|
-
|
|
73
|
+
interface AnalyzeOptions {
|
|
74
|
+
apiTechnologies?: string[];
|
|
75
|
+
externalType?: string;
|
|
76
|
+
dbType?: string;
|
|
77
|
+
}
|
|
78
|
+
declare const analyzeArchitecture: (model: ArchitectureModel, options?: AnalyzeOptions) => AnalyzedArchitecture;
|
|
64
79
|
|
|
65
80
|
declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
66
81
|
readonly source: v.StrictObjectSchema<{
|
|
67
82
|
readonly type: v.PicklistSchema<["plantuml", "structurizr"], undefined>;
|
|
68
83
|
readonly path: v.StringSchema<undefined>;
|
|
84
|
+
readonly writePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
69
85
|
}, undefined>;
|
|
70
86
|
readonly rules: v.OptionalSchema<v.StrictObjectSchema<{
|
|
71
87
|
readonly acl: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
@@ -84,6 +100,7 @@ declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
|
84
100
|
}, undefined>], undefined>, undefined>;
|
|
85
101
|
readonly dbPerService: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
86
102
|
dbType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
103
|
+
ownerTags: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
87
104
|
}, undefined>], undefined>, undefined>;
|
|
88
105
|
readonly cohesion: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
89
106
|
externalType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -92,6 +109,7 @@ declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
|
92
109
|
readonly stableDependencies: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
93
110
|
externalType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
94
111
|
}, undefined>], undefined>, undefined>;
|
|
112
|
+
readonly commonReuse: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
95
113
|
}, undefined>, undefined>;
|
|
96
114
|
readonly generate: v.OptionalSchema<v.StrictObjectSchema<{
|
|
97
115
|
readonly kubernetes: v.OptionalSchema<v.StrictObjectSchema<{
|
|
@@ -136,12 +154,30 @@ interface LoadDeployConfigsOptions {
|
|
|
136
154
|
}
|
|
137
155
|
declare const loadMicroserviceDeployConfigs: (options?: LoadDeployConfigsOptions) => Promise<DeployConfig[]>;
|
|
138
156
|
|
|
139
|
-
|
|
157
|
+
interface KubernetesMapOptions {
|
|
158
|
+
envWhitelist?: (string | RegExp)[];
|
|
159
|
+
envNamePartsToCleanup?: (string | RegExp)[];
|
|
160
|
+
}
|
|
161
|
+
declare const mapFromConfigs: (deployConfigs: DeployConfig[], options?: KubernetesMapOptions) => DeployConfig[];
|
|
162
|
+
|
|
163
|
+
declare const PLANTUML_CONTAINER = "Container";
|
|
164
|
+
declare const PLANTUML_CONTAINER_DB = "ContainerDb";
|
|
165
|
+
declare const PLANTUML_SYSTEM_EXT = "System_Ext";
|
|
166
|
+
declare const PLANTUML_SYSTEM = "System";
|
|
167
|
+
declare const PLANTUML_PERSON = "Person";
|
|
168
|
+
declare const PLANTUML_COMPONENT = "Component";
|
|
169
|
+
declare const PLANTUML_SYSTEM_BOUNDARY = "System_Boundary";
|
|
170
|
+
declare const PLANTUML_CONTAINER_BOUNDARY = "Container_Boundary";
|
|
171
|
+
declare const PLANTUML_BOUNDARY = "Boundary";
|
|
140
172
|
|
|
141
173
|
declare const loadPlantumlElements: (filePath: string) => Promise<UMLElement[]>;
|
|
142
174
|
|
|
143
175
|
declare const mapContainersFromPlantumlElements: (elements: UMLElement[]) => ArchitectureModel;
|
|
144
176
|
|
|
177
|
+
declare const STRUCTURIZR_LOCATION_EXTERNAL = "External";
|
|
178
|
+
declare const STRUCTURIZR_INTERACTION_ASYNC = "Asynchronous";
|
|
179
|
+
declare const STRUCTURIZR_TAG_ASYNC = "async";
|
|
180
|
+
|
|
145
181
|
interface StructurizrWorkspace {
|
|
146
182
|
id?: number;
|
|
147
183
|
name: string;
|
|
@@ -155,11 +191,16 @@ interface StructurizrModel {
|
|
|
155
191
|
people?: StructurizrPerson[];
|
|
156
192
|
softwareSystems?: StructurizrSoftwareSystem[];
|
|
157
193
|
}
|
|
194
|
+
interface StructurizrProperties {
|
|
195
|
+
"structurizr.dsl.identifier"?: string;
|
|
196
|
+
[key: string]: string | undefined;
|
|
197
|
+
}
|
|
158
198
|
interface StructurizrPerson {
|
|
159
199
|
id: string;
|
|
160
200
|
name: string;
|
|
161
201
|
description?: string;
|
|
162
202
|
tags?: string;
|
|
203
|
+
properties?: StructurizrProperties;
|
|
163
204
|
relationships?: StructurizrRelationship[];
|
|
164
205
|
}
|
|
165
206
|
interface StructurizrSoftwareSystem {
|
|
@@ -168,6 +209,7 @@ interface StructurizrSoftwareSystem {
|
|
|
168
209
|
description?: string;
|
|
169
210
|
location?: "External" | "Internal" | "Unspecified";
|
|
170
211
|
tags?: string;
|
|
212
|
+
properties?: StructurizrProperties;
|
|
171
213
|
containers?: StructurizrContainer[];
|
|
172
214
|
relationships?: StructurizrRelationship[];
|
|
173
215
|
}
|
|
@@ -177,6 +219,7 @@ interface StructurizrContainer {
|
|
|
177
219
|
description?: string;
|
|
178
220
|
technology?: string;
|
|
179
221
|
tags?: string;
|
|
222
|
+
properties?: StructurizrProperties;
|
|
180
223
|
components?: StructurizrComponent[];
|
|
181
224
|
relationships?: StructurizrRelationship[];
|
|
182
225
|
}
|
|
@@ -186,6 +229,7 @@ interface StructurizrComponent {
|
|
|
186
229
|
description?: string;
|
|
187
230
|
technology?: string;
|
|
188
231
|
tags?: string;
|
|
232
|
+
properties?: StructurizrProperties;
|
|
189
233
|
relationships?: StructurizrRelationship[];
|
|
190
234
|
}
|
|
191
235
|
interface StructurizrRelationship {
|
|
@@ -202,6 +246,15 @@ declare const loadStructurizrWorkspace: (filePath: string) => Promise<Structuriz
|
|
|
202
246
|
declare const mapContainersFromStructurizr: (workspace: StructurizrWorkspace) => ArchitectureModel;
|
|
203
247
|
declare const loadStructurizrElements: (filePath: string) => Promise<ArchitectureModel>;
|
|
204
248
|
|
|
249
|
+
interface SourceSyntax {
|
|
250
|
+
containerPattern(name: string): string;
|
|
251
|
+
containerDecl(name: string, label: string, tags?: string): string;
|
|
252
|
+
relationPattern(from: string, to: string): string;
|
|
253
|
+
relationDecl(from: string, to: string, tech?: string, tags?: string): string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare const structurizrDslSyntax: SourceSyntax;
|
|
257
|
+
|
|
205
258
|
interface Violation {
|
|
206
259
|
container: string;
|
|
207
260
|
message: string;
|
|
@@ -228,6 +281,8 @@ interface CohesionOptions {
|
|
|
228
281
|
}
|
|
229
282
|
declare const checkCohesion: (model: ArchitectureModel, options?: CohesionOptions) => Violation[];
|
|
230
283
|
|
|
284
|
+
declare const checkCommonReuse: (model: ArchitectureModel) => Violation[];
|
|
285
|
+
|
|
231
286
|
interface CrudOptions {
|
|
232
287
|
repoTags?: string[];
|
|
233
288
|
dbType?: string;
|
|
@@ -236,6 +291,7 @@ declare const checkCrud: (containers: Container[], options?: CrudOptions) => Vio
|
|
|
236
291
|
|
|
237
292
|
interface DbPerServiceOptions {
|
|
238
293
|
dbType?: string;
|
|
294
|
+
ownerTags?: string[];
|
|
239
295
|
}
|
|
240
296
|
declare const checkDbPerService: (containers: Container[], options?: DbPerServiceOptions) => Violation[];
|
|
241
297
|
|
|
@@ -244,5 +300,5 @@ interface StableDependenciesOptions {
|
|
|
244
300
|
}
|
|
245
301
|
declare const checkStableDependencies: (containers: Container[], options?: StableDependenciesOptions) => Violation[];
|
|
246
302
|
|
|
247
|
-
export { AactConfigSchema, analyzeArchitecture, checkAcl, checkAcyclic, checkApiGateway, checkCohesion, checkCrud, checkDbPerService, checkStableDependencies, defineConfig, generateKubernetes, generatePlantumlFromModel, loadMicroserviceDeployConfigs, loadPlantumlElements, loadStructurizrElements, loadStructurizrWorkspace, mapContainersFromPlantumlElements, mapContainersFromStructurizr, mapFromConfigs };
|
|
248
|
-
export type { AactConfig, AclOptions, AnalysisReport, AnalyzedArchitecture, ApiGatewayOptions, ArchitectureModel, Boundary, BoundaryAnalysis, CohesionOptions, Container, CouplingRelation, CrudOptions, DbPerServiceOptions, DeployConfig, EnvValue, KubernetesGenerateOptions, KubernetesOutput, LoadDeployConfigsOptions, PlantumlFromModelOptions, Relation, Section, StableDependenciesOptions, StructurizrComponent, StructurizrContainer, StructurizrModel, StructurizrPerson, StructurizrRelationship, StructurizrSoftwareSystem, StructurizrWorkspace, Violation };
|
|
303
|
+
export { AactConfigSchema, BOUNDARY_TYPE, COMPONENT_TYPE, CONTAINER_BOUNDARY_TYPE, CONTAINER_DB_TYPE, CONTAINER_TYPE, EXTERNAL_SYSTEM_TYPE, PERSON_TYPE, PLANTUML_BOUNDARY, PLANTUML_COMPONENT, PLANTUML_CONTAINER, PLANTUML_CONTAINER_BOUNDARY, PLANTUML_CONTAINER_DB, PLANTUML_PERSON, PLANTUML_SYSTEM, PLANTUML_SYSTEM_BOUNDARY, PLANTUML_SYSTEM_EXT, STRUCTURIZR_INTERACTION_ASYNC, STRUCTURIZR_LOCATION_EXTERNAL, STRUCTURIZR_TAG_ASYNC, SYSTEM_BOUNDARY_TYPE, SYSTEM_TYPE, analyzeArchitecture, checkAcl, checkAcyclic, checkApiGateway, checkCohesion, checkCommonReuse, checkCrud, checkDbPerService, checkStableDependencies, defineConfig, generateKubernetes, generatePlantumlFromModel, loadMicroserviceDeployConfigs, loadPlantumlElements, loadStructurizrElements, loadStructurizrWorkspace, mapContainersFromPlantumlElements, mapContainersFromStructurizr, mapFromConfigs, structurizrDslSyntax };
|
|
304
|
+
export type { AactConfig, AclOptions, AnalysisReport, AnalyzeOptions, AnalyzedArchitecture, ApiGatewayOptions, ArchitectureModel, Boundary, BoundaryAnalysis, CohesionOptions, Container, CouplingRelation, CrudOptions, DbPerServiceOptions, DeployConfig, EnvValue, KubernetesGenerateOptions, KubernetesMapOptions, KubernetesOutput, LoadDeployConfigsOptions, PlantumlFromModelOptions, Relation, Section, StableDependenciesOptions, StructurizrComponent, StructurizrContainer, StructurizrModel, StructurizrPerson, StructurizrProperties, StructurizrRelationship, StructurizrSoftwareSystem, StructurizrWorkspace, Violation };
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,16 @@ interface ArchitectureModel {
|
|
|
29
29
|
readonly allContainers: Container[];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
declare const EXTERNAL_SYSTEM_TYPE = "System_Ext";
|
|
33
|
+
declare const SYSTEM_TYPE = "System";
|
|
34
|
+
declare const CONTAINER_TYPE = "Container";
|
|
35
|
+
declare const CONTAINER_DB_TYPE = "ContainerDb";
|
|
36
|
+
declare const COMPONENT_TYPE = "Component";
|
|
37
|
+
declare const BOUNDARY_TYPE = "Boundary";
|
|
38
|
+
declare const SYSTEM_BOUNDARY_TYPE = "System_Boundary";
|
|
39
|
+
declare const CONTAINER_BOUNDARY_TYPE = "Container_Boundary";
|
|
40
|
+
declare const PERSON_TYPE = "Person";
|
|
41
|
+
|
|
32
42
|
interface Section {
|
|
33
43
|
readonly name: string;
|
|
34
44
|
readonly prod_value: string;
|
|
@@ -60,12 +70,18 @@ interface DatabasesInfo {
|
|
|
60
70
|
count: number;
|
|
61
71
|
consumes: number;
|
|
62
72
|
}
|
|
63
|
-
|
|
73
|
+
interface AnalyzeOptions {
|
|
74
|
+
apiTechnologies?: string[];
|
|
75
|
+
externalType?: string;
|
|
76
|
+
dbType?: string;
|
|
77
|
+
}
|
|
78
|
+
declare const analyzeArchitecture: (model: ArchitectureModel, options?: AnalyzeOptions) => AnalyzedArchitecture;
|
|
64
79
|
|
|
65
80
|
declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
66
81
|
readonly source: v.StrictObjectSchema<{
|
|
67
82
|
readonly type: v.PicklistSchema<["plantuml", "structurizr"], undefined>;
|
|
68
83
|
readonly path: v.StringSchema<undefined>;
|
|
84
|
+
readonly writePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
69
85
|
}, undefined>;
|
|
70
86
|
readonly rules: v.OptionalSchema<v.StrictObjectSchema<{
|
|
71
87
|
readonly acl: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
@@ -84,6 +100,7 @@ declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
|
84
100
|
}, undefined>], undefined>, undefined>;
|
|
85
101
|
readonly dbPerService: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
86
102
|
dbType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
103
|
+
ownerTags: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
87
104
|
}, undefined>], undefined>, undefined>;
|
|
88
105
|
readonly cohesion: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
89
106
|
externalType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -92,6 +109,7 @@ declare const AactConfigSchema: v.StrictObjectSchema<{
|
|
|
92
109
|
readonly stableDependencies: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
93
110
|
externalType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
94
111
|
}, undefined>], undefined>, undefined>;
|
|
112
|
+
readonly commonReuse: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
95
113
|
}, undefined>, undefined>;
|
|
96
114
|
readonly generate: v.OptionalSchema<v.StrictObjectSchema<{
|
|
97
115
|
readonly kubernetes: v.OptionalSchema<v.StrictObjectSchema<{
|
|
@@ -136,12 +154,30 @@ interface LoadDeployConfigsOptions {
|
|
|
136
154
|
}
|
|
137
155
|
declare const loadMicroserviceDeployConfigs: (options?: LoadDeployConfigsOptions) => Promise<DeployConfig[]>;
|
|
138
156
|
|
|
139
|
-
|
|
157
|
+
interface KubernetesMapOptions {
|
|
158
|
+
envWhitelist?: (string | RegExp)[];
|
|
159
|
+
envNamePartsToCleanup?: (string | RegExp)[];
|
|
160
|
+
}
|
|
161
|
+
declare const mapFromConfigs: (deployConfigs: DeployConfig[], options?: KubernetesMapOptions) => DeployConfig[];
|
|
162
|
+
|
|
163
|
+
declare const PLANTUML_CONTAINER = "Container";
|
|
164
|
+
declare const PLANTUML_CONTAINER_DB = "ContainerDb";
|
|
165
|
+
declare const PLANTUML_SYSTEM_EXT = "System_Ext";
|
|
166
|
+
declare const PLANTUML_SYSTEM = "System";
|
|
167
|
+
declare const PLANTUML_PERSON = "Person";
|
|
168
|
+
declare const PLANTUML_COMPONENT = "Component";
|
|
169
|
+
declare const PLANTUML_SYSTEM_BOUNDARY = "System_Boundary";
|
|
170
|
+
declare const PLANTUML_CONTAINER_BOUNDARY = "Container_Boundary";
|
|
171
|
+
declare const PLANTUML_BOUNDARY = "Boundary";
|
|
140
172
|
|
|
141
173
|
declare const loadPlantumlElements: (filePath: string) => Promise<UMLElement[]>;
|
|
142
174
|
|
|
143
175
|
declare const mapContainersFromPlantumlElements: (elements: UMLElement[]) => ArchitectureModel;
|
|
144
176
|
|
|
177
|
+
declare const STRUCTURIZR_LOCATION_EXTERNAL = "External";
|
|
178
|
+
declare const STRUCTURIZR_INTERACTION_ASYNC = "Asynchronous";
|
|
179
|
+
declare const STRUCTURIZR_TAG_ASYNC = "async";
|
|
180
|
+
|
|
145
181
|
interface StructurizrWorkspace {
|
|
146
182
|
id?: number;
|
|
147
183
|
name: string;
|
|
@@ -155,11 +191,16 @@ interface StructurizrModel {
|
|
|
155
191
|
people?: StructurizrPerson[];
|
|
156
192
|
softwareSystems?: StructurizrSoftwareSystem[];
|
|
157
193
|
}
|
|
194
|
+
interface StructurizrProperties {
|
|
195
|
+
"structurizr.dsl.identifier"?: string;
|
|
196
|
+
[key: string]: string | undefined;
|
|
197
|
+
}
|
|
158
198
|
interface StructurizrPerson {
|
|
159
199
|
id: string;
|
|
160
200
|
name: string;
|
|
161
201
|
description?: string;
|
|
162
202
|
tags?: string;
|
|
203
|
+
properties?: StructurizrProperties;
|
|
163
204
|
relationships?: StructurizrRelationship[];
|
|
164
205
|
}
|
|
165
206
|
interface StructurizrSoftwareSystem {
|
|
@@ -168,6 +209,7 @@ interface StructurizrSoftwareSystem {
|
|
|
168
209
|
description?: string;
|
|
169
210
|
location?: "External" | "Internal" | "Unspecified";
|
|
170
211
|
tags?: string;
|
|
212
|
+
properties?: StructurizrProperties;
|
|
171
213
|
containers?: StructurizrContainer[];
|
|
172
214
|
relationships?: StructurizrRelationship[];
|
|
173
215
|
}
|
|
@@ -177,6 +219,7 @@ interface StructurizrContainer {
|
|
|
177
219
|
description?: string;
|
|
178
220
|
technology?: string;
|
|
179
221
|
tags?: string;
|
|
222
|
+
properties?: StructurizrProperties;
|
|
180
223
|
components?: StructurizrComponent[];
|
|
181
224
|
relationships?: StructurizrRelationship[];
|
|
182
225
|
}
|
|
@@ -186,6 +229,7 @@ interface StructurizrComponent {
|
|
|
186
229
|
description?: string;
|
|
187
230
|
technology?: string;
|
|
188
231
|
tags?: string;
|
|
232
|
+
properties?: StructurizrProperties;
|
|
189
233
|
relationships?: StructurizrRelationship[];
|
|
190
234
|
}
|
|
191
235
|
interface StructurizrRelationship {
|
|
@@ -202,6 +246,15 @@ declare const loadStructurizrWorkspace: (filePath: string) => Promise<Structuriz
|
|
|
202
246
|
declare const mapContainersFromStructurizr: (workspace: StructurizrWorkspace) => ArchitectureModel;
|
|
203
247
|
declare const loadStructurizrElements: (filePath: string) => Promise<ArchitectureModel>;
|
|
204
248
|
|
|
249
|
+
interface SourceSyntax {
|
|
250
|
+
containerPattern(name: string): string;
|
|
251
|
+
containerDecl(name: string, label: string, tags?: string): string;
|
|
252
|
+
relationPattern(from: string, to: string): string;
|
|
253
|
+
relationDecl(from: string, to: string, tech?: string, tags?: string): string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare const structurizrDslSyntax: SourceSyntax;
|
|
257
|
+
|
|
205
258
|
interface Violation {
|
|
206
259
|
container: string;
|
|
207
260
|
message: string;
|
|
@@ -228,6 +281,8 @@ interface CohesionOptions {
|
|
|
228
281
|
}
|
|
229
282
|
declare const checkCohesion: (model: ArchitectureModel, options?: CohesionOptions) => Violation[];
|
|
230
283
|
|
|
284
|
+
declare const checkCommonReuse: (model: ArchitectureModel) => Violation[];
|
|
285
|
+
|
|
231
286
|
interface CrudOptions {
|
|
232
287
|
repoTags?: string[];
|
|
233
288
|
dbType?: string;
|
|
@@ -236,6 +291,7 @@ declare const checkCrud: (containers: Container[], options?: CrudOptions) => Vio
|
|
|
236
291
|
|
|
237
292
|
interface DbPerServiceOptions {
|
|
238
293
|
dbType?: string;
|
|
294
|
+
ownerTags?: string[];
|
|
239
295
|
}
|
|
240
296
|
declare const checkDbPerService: (containers: Container[], options?: DbPerServiceOptions) => Violation[];
|
|
241
297
|
|
|
@@ -244,5 +300,5 @@ interface StableDependenciesOptions {
|
|
|
244
300
|
}
|
|
245
301
|
declare const checkStableDependencies: (containers: Container[], options?: StableDependenciesOptions) => Violation[];
|
|
246
302
|
|
|
247
|
-
export { AactConfigSchema, analyzeArchitecture, checkAcl, checkAcyclic, checkApiGateway, checkCohesion, checkCrud, checkDbPerService, checkStableDependencies, defineConfig, generateKubernetes, generatePlantumlFromModel, loadMicroserviceDeployConfigs, loadPlantumlElements, loadStructurizrElements, loadStructurizrWorkspace, mapContainersFromPlantumlElements, mapContainersFromStructurizr, mapFromConfigs };
|
|
248
|
-
export type { AactConfig, AclOptions, AnalysisReport, AnalyzedArchitecture, ApiGatewayOptions, ArchitectureModel, Boundary, BoundaryAnalysis, CohesionOptions, Container, CouplingRelation, CrudOptions, DbPerServiceOptions, DeployConfig, EnvValue, KubernetesGenerateOptions, KubernetesOutput, LoadDeployConfigsOptions, PlantumlFromModelOptions, Relation, Section, StableDependenciesOptions, StructurizrComponent, StructurizrContainer, StructurizrModel, StructurizrPerson, StructurizrRelationship, StructurizrSoftwareSystem, StructurizrWorkspace, Violation };
|
|
303
|
+
export { AactConfigSchema, BOUNDARY_TYPE, COMPONENT_TYPE, CONTAINER_BOUNDARY_TYPE, CONTAINER_DB_TYPE, CONTAINER_TYPE, EXTERNAL_SYSTEM_TYPE, PERSON_TYPE, PLANTUML_BOUNDARY, PLANTUML_COMPONENT, PLANTUML_CONTAINER, PLANTUML_CONTAINER_BOUNDARY, PLANTUML_CONTAINER_DB, PLANTUML_PERSON, PLANTUML_SYSTEM, PLANTUML_SYSTEM_BOUNDARY, PLANTUML_SYSTEM_EXT, STRUCTURIZR_INTERACTION_ASYNC, STRUCTURIZR_LOCATION_EXTERNAL, STRUCTURIZR_TAG_ASYNC, SYSTEM_BOUNDARY_TYPE, SYSTEM_TYPE, analyzeArchitecture, checkAcl, checkAcyclic, checkApiGateway, checkCohesion, checkCommonReuse, checkCrud, checkDbPerService, checkStableDependencies, defineConfig, generateKubernetes, generatePlantumlFromModel, loadMicroserviceDeployConfigs, loadPlantumlElements, loadStructurizrElements, loadStructurizrWorkspace, mapContainersFromPlantumlElements, mapContainersFromStructurizr, mapFromConfigs, structurizrDslSyntax };
|
|
304
|
+
export type { AactConfig, AclOptions, AnalysisReport, AnalyzeOptions, AnalyzedArchitecture, ApiGatewayOptions, ArchitectureModel, Boundary, BoundaryAnalysis, CohesionOptions, Container, CouplingRelation, CrudOptions, DbPerServiceOptions, DeployConfig, EnvValue, KubernetesGenerateOptions, KubernetesMapOptions, KubernetesOutput, LoadDeployConfigsOptions, PlantumlFromModelOptions, Relation, Section, StableDependenciesOptions, StructurizrComponent, StructurizrContainer, StructurizrModel, StructurizrPerson, StructurizrProperties, StructurizrRelationship, StructurizrSoftwareSystem, StructurizrWorkspace, Violation };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AactConfigSchema, a as
|
|
1
|
+
export { A as AactConfigSchema, B as BOUNDARY_TYPE, C as COMPONENT_TYPE, a as CONTAINER_BOUNDARY_TYPE, b as CONTAINER_DB_TYPE, c as CONTAINER_TYPE, E as EXTERNAL_SYSTEM_TYPE, P as PERSON_TYPE, d as PLANTUML_BOUNDARY, e as PLANTUML_COMPONENT, f as PLANTUML_CONTAINER, g as PLANTUML_CONTAINER_BOUNDARY, h as PLANTUML_CONTAINER_DB, i as PLANTUML_PERSON, j as PLANTUML_SYSTEM, k as PLANTUML_SYSTEM_BOUNDARY, l as PLANTUML_SYSTEM_EXT, S as STRUCTURIZR_INTERACTION_ASYNC, m as STRUCTURIZR_LOCATION_EXTERNAL, n as STRUCTURIZR_TAG_ASYNC, o as SYSTEM_BOUNDARY_TYPE, p as SYSTEM_TYPE, q as analyzeArchitecture, r as checkAcl, s as checkAcyclic, t as checkApiGateway, u as checkCohesion, v as checkCommonReuse, w as checkCrud, x as checkDbPerService, y as checkStableDependencies, z as defineConfig, D as generateKubernetes, F as generatePlantumlFromModel, G as loadPlantumlElements, H as loadStructurizrElements, I as loadStructurizrWorkspace, J as mapContainersFromPlantumlElements, K as mapContainersFromStructurizr, L as structurizrDslSyntax } from './shared/aact.mCX-x14V.mjs';
|
|
2
2
|
import fs from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import YAML from 'yaml';
|
|
@@ -35,24 +35,25 @@ const loadMicroserviceDeployConfigs = async (options) => {
|
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
const DEFAULT_ENV_WHITELIST = [
|
|
39
|
+
"BASE_URL",
|
|
40
|
+
"PROTOCOL",
|
|
41
|
+
"_TOPIC",
|
|
42
|
+
"__BaseAddress",
|
|
43
|
+
"__Endpoint",
|
|
44
|
+
"__SmtpServer",
|
|
45
|
+
"QueueName"
|
|
46
|
+
];
|
|
47
|
+
const DEFAULT_ENV_CLEANUP = [
|
|
48
|
+
"_BASE_URL",
|
|
49
|
+
"_API",
|
|
50
|
+
"_CLIENT",
|
|
51
|
+
"_PROTOCOL",
|
|
52
|
+
/_KAFKA_(?:[A-Z]+_)+TOPIC/
|
|
53
|
+
];
|
|
54
|
+
const mapFromConfig = (deployConfig, options) => {
|
|
55
|
+
const envWhitelist = options?.envWhitelist ?? DEFAULT_ENV_WHITELIST;
|
|
56
|
+
const envNamePartsToCleanup = options?.envNamePartsToCleanup ?? DEFAULT_ENV_CLEANUP;
|
|
56
57
|
const synonymes = /* @__PURE__ */ new Map([]);
|
|
57
58
|
const environment = deployConfig?.environment ?? {};
|
|
58
59
|
const envKeys = Object.keys(environment);
|
|
@@ -84,8 +85,8 @@ const mapFromConfig = (deployConfig) => {
|
|
|
84
85
|
deployConfig.sections = sections;
|
|
85
86
|
return deployConfig;
|
|
86
87
|
};
|
|
87
|
-
const mapFromConfigs = (deployConfigs) => {
|
|
88
|
-
return deployConfigs.map(mapFromConfig).sort((a, b) => a.name.localeCompare(b.name));
|
|
88
|
+
const mapFromConfigs = (deployConfigs, options) => {
|
|
89
|
+
return deployConfigs.map((c) => mapFromConfig(c, options)).sort((a, b) => a.name.localeCompare(b.name));
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
export { loadMicroserviceDeployConfigs, mapFromConfigs };
|