mulesoft-anypoint-cli-agent-fabric-plugin 1.0.8 → 1.0.10
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/commands/agent-network/project/build.d.ts +0 -4
- package/dist/commands/agent-network/project/build.js +21 -138
- package/dist/commands/agent-network/project/build.js.map +1 -1
- package/dist/commands/agent-network/project/create.js +32 -25
- package/dist/commands/agent-network/project/create.js.map +1 -1
- package/dist/commands/agent-network/project/deploy.d.ts +2 -36
- package/dist/commands/agent-network/project/deploy.js +117 -506
- package/dist/commands/agent-network/project/deploy.js.map +1 -1
- package/dist/commands/agent-network/project/publish.d.ts +0 -1
- package/dist/commands/agent-network/project/publish.js +26 -94
- package/dist/commands/agent-network/project/publish.js.map +1 -1
- package/dist/commands/agent-network/setup/dependencies.js +2 -1
- package/dist/commands/agent-network/setup/dependencies.js.map +1 -1
- package/dist/commands/agent-network/setup/gateways.js +23 -19
- package/dist/commands/agent-network/setup/gateways.js.map +1 -1
- package/dist/errors/base-error.d.ts +10 -0
- package/dist/errors/base-error.js +42 -13
- package/dist/errors/base-error.js.map +1 -1
- package/dist/errors/error-factory.d.ts +19 -6
- package/dist/errors/error-factory.js +122 -32
- package/dist/errors/error-factory.js.map +1 -1
- package/dist/helpers/dependency-manager.js +1 -6
- package/dist/helpers/dependency-manager.js.map +1 -1
- package/dist/helpers/policy-helper.d.ts +66 -3
- package/dist/helpers/policy-helper.js +152 -11
- package/dist/helpers/policy-helper.js.map +1 -1
- package/dist/helpers/project/api-project-dependency-fetcher.d.ts +3 -0
- package/dist/helpers/project/api-project-dependency-fetcher.js +17 -7
- package/dist/helpers/project/api-project-dependency-fetcher.js.map +1 -1
- package/dist/helpers/project/templates.js +2 -1
- package/dist/helpers/project/templates.js.map +1 -1
- package/dist/helpers/request-utils.d.ts +3 -0
- package/dist/helpers/request-utils.js +11 -0
- package/dist/helpers/request-utils.js.map +1 -0
- package/dist/helpers/types.d.ts +1 -1
- package/dist/helpers/utils.d.ts +17 -4
- package/dist/helpers/utils.js +64 -22
- package/dist/helpers/utils.js.map +1 -1
- package/dist/types/agent-network.d.ts +90 -61
- package/dist/types/agent-network.js +6 -1
- package/dist/types/agent-network.js.map +1 -1
- package/dist/types/types.d.ts +64 -4
- package/dist/utils/builders/agent-builder.d.ts +11 -0
- package/dist/utils/builders/agent-builder.js +79 -0
- package/dist/utils/builders/agent-builder.js.map +1 -0
- package/dist/utils/builders/broker-builder.d.ts +22 -0
- package/dist/utils/builders/broker-builder.js +292 -0
- package/dist/utils/builders/broker-builder.js.map +1 -0
- package/dist/utils/builders/builder.d.ts +9 -0
- package/dist/utils/builders/builder.js +110 -0
- package/dist/utils/builders/builder.js.map +1 -0
- package/dist/utils/builders/connections-builder.d.ts +25 -0
- package/dist/utils/builders/connections-builder.js +232 -0
- package/dist/utils/builders/connections-builder.js.map +1 -0
- package/dist/utils/builders/llm-builder.d.ts +12 -0
- package/dist/utils/builders/llm-builder.js +64 -0
- package/dist/utils/builders/llm-builder.js.map +1 -0
- package/dist/utils/builders/mcp-builder.d.ts +12 -0
- package/dist/utils/builders/mcp-builder.js +48 -0
- package/dist/utils/builders/mcp-builder.js.map +1 -0
- package/dist/utils/builders/network-builder.d.ts +13 -0
- package/dist/utils/builders/network-builder.js +77 -0
- package/dist/utils/builders/network-builder.js.map +1 -0
- package/dist/utils/builders/path.d.ts +12 -0
- package/dist/utils/builders/path.js +35 -0
- package/dist/utils/builders/path.js.map +1 -0
- package/dist/utils/builders/policies-factory.d.ts +8 -0
- package/dist/utils/builders/policies-factory.js +255 -0
- package/dist/utils/builders/policies-factory.js.map +1 -0
- package/dist/utils/builders/project-builder-impl.d.ts +233 -0
- package/dist/utils/builders/project-builder-impl.js +552 -0
- package/dist/utils/builders/project-builder-impl.js.map +1 -0
- package/dist/utils/builders/project-builder.d.ts +313 -0
- package/dist/utils/builders/project-builder.js +76 -0
- package/dist/utils/builders/project-builder.js.map +1 -0
- package/dist/utils/builders/space-serializer.d.ts +18 -0
- package/dist/utils/builders/space-serializer.js +239 -0
- package/dist/utils/builders/space-serializer.js.map +1 -0
- package/dist/utils/constants.d.ts +3 -1
- package/dist/utils/constants.js +6 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/exchange.d.ts +7 -1
- package/dist/utils/exchange.js +90 -2
- package/dist/utils/exchange.js.map +1 -1
- package/dist/utils/facets/abstract-facet.d.ts +34 -0
- package/dist/utils/facets/abstract-facet.js +50 -0
- package/dist/utils/facets/abstract-facet.js.map +1 -0
- package/dist/utils/facets/api-instance-facet.d.ts +16 -0
- package/dist/utils/facets/api-instance-facet.js +274 -0
- package/dist/utils/facets/api-instance-facet.js.map +1 -0
- package/dist/utils/facets/asset-facet.d.ts +11 -0
- package/dist/utils/facets/asset-facet.js +151 -0
- package/dist/utils/facets/asset-facet.js.map +1 -0
- package/dist/utils/facets/connection-facet.d.ts +16 -0
- package/dist/utils/facets/connection-facet.js +277 -0
- package/dist/utils/facets/connection-facet.js.map +1 -0
- package/dist/utils/facets/facets.d.ts +7 -0
- package/dist/utils/facets/facets.js +55 -0
- package/dist/utils/facets/facets.js.map +1 -0
- package/dist/utils/facets/mule-application-facet.d.ts +21 -0
- package/dist/utils/facets/mule-application-facet.js +284 -0
- package/dist/utils/facets/mule-application-facet.js.map +1 -0
- package/dist/utils/files.d.ts +1 -1
- package/dist/utils/files.js +9 -16
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/gateway.d.ts +4 -0
- package/dist/utils/gateway.js +32 -0
- package/dist/utils/gateway.js.map +1 -1
- package/dist/utils/logger.d.ts +15 -0
- package/dist/utils/logger.js +46 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/promise/promiseCreator.d.ts +8 -0
- package/dist/utils/promise/promiseCreator.js +19 -0
- package/dist/utils/promise/promiseCreator.js.map +1 -0
- package/dist/utils/uris.d.ts +1 -0
- package/dist/utils/uris.js +12 -3
- package/dist/utils/uris.js.map +1 -1
- package/dist/utils/variables.d.ts +15 -4
- package/dist/utils/variables.js +102 -0
- package/dist/utils/variables.js.map +1 -1
- package/package.json +1 -1
- package/dist/utils/api-instance-builder.d.ts +0 -28
- package/dist/utils/api-instance-builder.js +0 -464
- package/dist/utils/api-instance-builder.js.map +0 -1
- package/dist/utils/asset-builder.d.ts +0 -28
- package/dist/utils/asset-builder.js +0 -248
- package/dist/utils/asset-builder.js.map +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ExchangeDescriptor, GatewayDetails, GAV, RuntimeTargetSpace, Variable, Variables } from '../../types/types';
|
|
3
|
+
import { Session } from 'anypoint-cli-command';
|
|
4
|
+
import { Properties } from '../../types/agent-network';
|
|
5
|
+
export type Space = {
|
|
6
|
+
components: {
|
|
7
|
+
[key: string]: Component;
|
|
8
|
+
};
|
|
9
|
+
variables: {
|
|
10
|
+
[key: string]: SpaceVariable;
|
|
11
|
+
};
|
|
12
|
+
gav: GAV;
|
|
13
|
+
};
|
|
14
|
+
export type Component = {
|
|
15
|
+
id: string;
|
|
16
|
+
version: string;
|
|
17
|
+
assets: {
|
|
18
|
+
[key: string]: Asset;
|
|
19
|
+
};
|
|
20
|
+
apiInstances: {
|
|
21
|
+
[key: string]: APIInstance;
|
|
22
|
+
};
|
|
23
|
+
muleApplications: {
|
|
24
|
+
[key: string]: MuleApplication;
|
|
25
|
+
};
|
|
26
|
+
connections: {
|
|
27
|
+
[key: string]: Connection;
|
|
28
|
+
};
|
|
29
|
+
clients: {
|
|
30
|
+
[key: string]: Client;
|
|
31
|
+
};
|
|
32
|
+
dependencies: string[];
|
|
33
|
+
};
|
|
34
|
+
export type SpaceVariable = Variable & {
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
export type ConnectionReference = {
|
|
38
|
+
asset: GAV;
|
|
39
|
+
type: string;
|
|
40
|
+
connectionId?: string;
|
|
41
|
+
};
|
|
42
|
+
export type Dependency = GAV & {
|
|
43
|
+
classifier?: string;
|
|
44
|
+
packaging?: string;
|
|
45
|
+
};
|
|
46
|
+
export type ExternalInstance = {
|
|
47
|
+
name: string;
|
|
48
|
+
url: string;
|
|
49
|
+
};
|
|
50
|
+
export type Asset = {
|
|
51
|
+
type?: string;
|
|
52
|
+
assetId: string;
|
|
53
|
+
name: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
dependencies?: Dependency[];
|
|
56
|
+
externalInstances?: ExternalInstance[];
|
|
57
|
+
files: {
|
|
58
|
+
[key: string]: Uint8Array;
|
|
59
|
+
};
|
|
60
|
+
properties?: Record<string, string>;
|
|
61
|
+
main?: string;
|
|
62
|
+
tags?: string[];
|
|
63
|
+
};
|
|
64
|
+
type APIInstanceMetadata = {
|
|
65
|
+
connectionId: string;
|
|
66
|
+
source: string;
|
|
67
|
+
protectionDirection?: InstanceProtectionDirection;
|
|
68
|
+
};
|
|
69
|
+
export type APIInstance = {
|
|
70
|
+
id: string;
|
|
71
|
+
type: string;
|
|
72
|
+
asset: GAV | string;
|
|
73
|
+
label: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
tags?: string[];
|
|
76
|
+
inboundPolicies: PolicyBinding[];
|
|
77
|
+
outboundPolicies: PolicyBinding[];
|
|
78
|
+
path: string;
|
|
79
|
+
upstreamUrl?: string;
|
|
80
|
+
metadata?: APIInstanceMetadata;
|
|
81
|
+
requiredVariables?: string[];
|
|
82
|
+
};
|
|
83
|
+
export declare function isGAV(value: any): value is GAV;
|
|
84
|
+
export type MuleApplication = {
|
|
85
|
+
id: string;
|
|
86
|
+
asset: GAV;
|
|
87
|
+
variables?: Variables;
|
|
88
|
+
properties?: Record<string, string>;
|
|
89
|
+
securedProperties?: Record<string, string>;
|
|
90
|
+
muleVersion?: string;
|
|
91
|
+
tracingEnabled?: boolean;
|
|
92
|
+
connections: ConnectionReference[];
|
|
93
|
+
};
|
|
94
|
+
export type Connection = {
|
|
95
|
+
id: string;
|
|
96
|
+
type: string;
|
|
97
|
+
asset: GAV;
|
|
98
|
+
label: string;
|
|
99
|
+
description?: string;
|
|
100
|
+
upstreamUrl: string;
|
|
101
|
+
endpointPath: string;
|
|
102
|
+
tags?: string[];
|
|
103
|
+
metadata?: {
|
|
104
|
+
connectionId: string;
|
|
105
|
+
source: string;
|
|
106
|
+
};
|
|
107
|
+
inboundPolicies: PolicyBinding[];
|
|
108
|
+
outboundPolicies: PolicyBinding[];
|
|
109
|
+
};
|
|
110
|
+
export type Client = {
|
|
111
|
+
id: string;
|
|
112
|
+
description?: string;
|
|
113
|
+
applicationUrl?: string;
|
|
114
|
+
redirectUri?: string;
|
|
115
|
+
};
|
|
116
|
+
export type PolicyBinding = {
|
|
117
|
+
policyRef: GAV;
|
|
118
|
+
configuration: Record<string, any>;
|
|
119
|
+
};
|
|
120
|
+
export interface SpaceBuilder {
|
|
121
|
+
addComponent(id: string): ComponentBuilder;
|
|
122
|
+
getComponent(id: string): ComponentBuilder | undefined;
|
|
123
|
+
searchAsset(assetId: string): AssetBuilder | undefined;
|
|
124
|
+
addVariable(id: string): VariableBuilder;
|
|
125
|
+
build(): Space;
|
|
126
|
+
}
|
|
127
|
+
export interface VariableBuilder {
|
|
128
|
+
defaultValue(value: string): VariableBuilder;
|
|
129
|
+
description(description: string): VariableBuilder;
|
|
130
|
+
secured(sec: boolean): VariableBuilder;
|
|
131
|
+
build(): SpaceVariable;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A component represents a set of aspects or facets that are linked together.
|
|
135
|
+
* The facets can be assets, API instances, mule applications, connections, etc.
|
|
136
|
+
*/
|
|
137
|
+
export interface ComponentBuilder {
|
|
138
|
+
/**
|
|
139
|
+
* The version is at the component level, so all the assets and facets inside the component share the same version.
|
|
140
|
+
* @param version
|
|
141
|
+
*/
|
|
142
|
+
version(version: string): ComponentBuilder;
|
|
143
|
+
addAsset(id: string): AssetBuilder;
|
|
144
|
+
getAsset(id: string): AssetBuilder | undefined;
|
|
145
|
+
addAPIInstance(id: string, assetId: string): APIInstanceBuilder;
|
|
146
|
+
getAPIInstance(id: string): APIInstanceBuilder | undefined;
|
|
147
|
+
addMuleDeployment(id: string): MuleDeploymentBuilder;
|
|
148
|
+
addConnection(id: string, assetGAV: GAV): ConnectionBuilder;
|
|
149
|
+
addClient(id: string): ClientBuilder;
|
|
150
|
+
addComponentDependency(componentID: string): ComponentBuilder;
|
|
151
|
+
build(): Component;
|
|
152
|
+
}
|
|
153
|
+
export interface ClientBuilder {
|
|
154
|
+
build(): Client;
|
|
155
|
+
description(description: string): ClientBuilder;
|
|
156
|
+
applicationUrl(url: string): ClientBuilder;
|
|
157
|
+
redirectUri(uri: string): ClientBuilder;
|
|
158
|
+
}
|
|
159
|
+
export interface AssetBuilder {
|
|
160
|
+
getFile(classifier: string, extension: string): Uint8Array | undefined;
|
|
161
|
+
type(type: string): AssetBuilder;
|
|
162
|
+
addFile(classifier: string, extension: string, content: Uint8Array): AssetBuilder;
|
|
163
|
+
addExternalInstance(name: string, url: string): AssetBuilder;
|
|
164
|
+
dependency(dependency: GAV): AssetBuilder;
|
|
165
|
+
description(description: string): AssetBuilder;
|
|
166
|
+
assetId(assetId: string): AssetBuilder;
|
|
167
|
+
name(name: string): AssetBuilder;
|
|
168
|
+
tags(tags: string[]): AssetBuilder;
|
|
169
|
+
properties(properties: Record<string, string>): AssetBuilder;
|
|
170
|
+
main(main: string): AssetBuilder;
|
|
171
|
+
build(): Asset;
|
|
172
|
+
}
|
|
173
|
+
export type StageResult<T> = {
|
|
174
|
+
success: boolean;
|
|
175
|
+
result?: T;
|
|
176
|
+
error?: Error;
|
|
177
|
+
};
|
|
178
|
+
export interface StageResultRegistry {
|
|
179
|
+
withComponent(componentId: string): StageResultRegistry;
|
|
180
|
+
withVariable(variableId: string, value: string): StageResultRegistry;
|
|
181
|
+
withResult<T>(componentId: string, result: StageResult<T>): StageResultRegistry;
|
|
182
|
+
getResult<T>(componentId: string): Promise<StageResult<T> | undefined>;
|
|
183
|
+
getVariable(variableId: string): string | undefined;
|
|
184
|
+
getVariables(): Record<string, string>;
|
|
185
|
+
}
|
|
186
|
+
export interface APIInstanceBuilder {
|
|
187
|
+
type(type: string): APIInstanceBuilder;
|
|
188
|
+
label(label: string): APIInstanceBuilder;
|
|
189
|
+
description(description: string): APIInstanceBuilder;
|
|
190
|
+
tags(tags: string[]): APIInstanceBuilder;
|
|
191
|
+
path(path: string): APIInstanceBuilder;
|
|
192
|
+
upstreamUrl(upstreamUrl: string): APIInstanceBuilder;
|
|
193
|
+
metadata(metadata: APIInstanceMetadata): APIInstanceBuilder;
|
|
194
|
+
inboundPolicies(policyBindings: PolicyBinding[]): APIInstanceBuilder;
|
|
195
|
+
outboundPolicies(policyBindings: PolicyBinding[]): APIInstanceBuilder;
|
|
196
|
+
build(): APIInstance;
|
|
197
|
+
}
|
|
198
|
+
export interface MuleDeploymentBuilder {
|
|
199
|
+
asset(gav: GAV): MuleDeploymentBuilder;
|
|
200
|
+
properties(properties: Record<string, string>): MuleDeploymentBuilder;
|
|
201
|
+
securedProperties(securedProperties: Record<string, string>): MuleDeploymentBuilder;
|
|
202
|
+
variables(variables: Variables): MuleDeploymentBuilder;
|
|
203
|
+
muleVersion(version: string): MuleDeploymentBuilder;
|
|
204
|
+
tracing(enabled: boolean): MuleDeploymentBuilder;
|
|
205
|
+
requiresConnection(asset: GAV, type: string, connectionId?: string): MuleDeploymentBuilder;
|
|
206
|
+
build(): MuleApplication;
|
|
207
|
+
}
|
|
208
|
+
export interface ConnectionBuilder {
|
|
209
|
+
asset(assetGav: GAV): ConnectionBuilder;
|
|
210
|
+
type(type: string): ConnectionBuilder;
|
|
211
|
+
label(label: string): ConnectionBuilder;
|
|
212
|
+
description(description: string): ConnectionBuilder;
|
|
213
|
+
tags(tags: string[]): ConnectionBuilder;
|
|
214
|
+
upstreamUrl(upstreamUrl: string): ConnectionBuilder;
|
|
215
|
+
endpointPath(endpointPath: string): ConnectionBuilder;
|
|
216
|
+
metadata(metadata: APIInstanceMetadata): ConnectionBuilder;
|
|
217
|
+
inboundPolicies(policyBindings: PolicyBinding[]): ConnectionBuilder;
|
|
218
|
+
outboundPolicies(policyBindings: PolicyBinding[]): ConnectionBuilder;
|
|
219
|
+
build(): Connection;
|
|
220
|
+
}
|
|
221
|
+
export interface ANProcessor {
|
|
222
|
+
handles(path: BasePath, model: any): boolean;
|
|
223
|
+
build(model: any, path: BasePath, context: ProjectContext, space: SpaceBuilder): void;
|
|
224
|
+
deployments(model: any, path: BasePath, context: ProjectContext, space: SpaceBuilder): void;
|
|
225
|
+
}
|
|
226
|
+
export declare const Phases: {
|
|
227
|
+
readonly Build: "build";
|
|
228
|
+
readonly Deployment: "deployment";
|
|
229
|
+
};
|
|
230
|
+
export type Phase = typeof Phases[keyof typeof Phases];
|
|
231
|
+
export declare const InstanceProtectionDirection: {
|
|
232
|
+
readonly Ingress: "ingress";
|
|
233
|
+
readonly Egress: "egress";
|
|
234
|
+
};
|
|
235
|
+
export type InstanceProtectionDirection = typeof InstanceProtectionDirection[keyof typeof InstanceProtectionDirection];
|
|
236
|
+
export declare class ProjectContext {
|
|
237
|
+
exchangeJson: ExchangeDescriptor;
|
|
238
|
+
projectDir: string;
|
|
239
|
+
isWindows: boolean;
|
|
240
|
+
targetDir: string;
|
|
241
|
+
anypointLowerEnv: boolean;
|
|
242
|
+
cacheDir: string;
|
|
243
|
+
debugMode: boolean;
|
|
244
|
+
forceUpdate: boolean;
|
|
245
|
+
mulesoftOrg: string;
|
|
246
|
+
req: AxiosInstance;
|
|
247
|
+
constructor(exchangeJson: ExchangeDescriptor, targetDir: string, isWindows: boolean, projectDir: string, anypointLowerEnv: boolean, cacheDir: string, debugMode: boolean, forceUpdate: boolean, mulesoftOrg: string, req: AxiosInstance);
|
|
248
|
+
exchangeDescriptor(): ExchangeDescriptor;
|
|
249
|
+
}
|
|
250
|
+
export declare abstract class BasePath {
|
|
251
|
+
segments: string[];
|
|
252
|
+
constructor(segments: string[]);
|
|
253
|
+
abstract child(segment: string): BasePath;
|
|
254
|
+
abstract isRootPath(): boolean;
|
|
255
|
+
abstract componentName(): string | null;
|
|
256
|
+
abstract isAgent(): boolean;
|
|
257
|
+
abstract isLLMProvider(): boolean;
|
|
258
|
+
abstract isMCPServer(): boolean;
|
|
259
|
+
abstract isConnection(): boolean;
|
|
260
|
+
}
|
|
261
|
+
export declare const Stages: {
|
|
262
|
+
readonly Publication: "publication";
|
|
263
|
+
readonly Deployment: "deployment";
|
|
264
|
+
};
|
|
265
|
+
export type Stage = typeof Stages[keyof typeof Stages];
|
|
266
|
+
export type Gateways = {
|
|
267
|
+
ingress: GatewayDetails;
|
|
268
|
+
egress: GatewayDetails;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* StageContext represents the immutable result object containing all context
|
|
272
|
+
* information needed for stage execution (publication or deployment).
|
|
273
|
+
*/
|
|
274
|
+
export declare class StageContext {
|
|
275
|
+
readonly req: AxiosInstance;
|
|
276
|
+
readonly properties: Properties;
|
|
277
|
+
readonly anypointLowerEnv: boolean;
|
|
278
|
+
readonly debugMode: boolean;
|
|
279
|
+
readonly json: boolean;
|
|
280
|
+
readonly host: string;
|
|
281
|
+
readonly disableTracing: boolean;
|
|
282
|
+
readonly dontWait: boolean;
|
|
283
|
+
readonly maxRetries: number;
|
|
284
|
+
readonly requestTimeout: number;
|
|
285
|
+
readonly environmentId: string;
|
|
286
|
+
readonly organizationId: string;
|
|
287
|
+
readonly gateways: Gateways | undefined;
|
|
288
|
+
readonly runtimeTarget: RuntimeTargetSpace | undefined;
|
|
289
|
+
readonly stageResultRegistry: StageResultRegistry;
|
|
290
|
+
readonly mulesoftOrg: string;
|
|
291
|
+
readonly updateAPISource: boolean;
|
|
292
|
+
constructor(req: AxiosInstance, gateways?: Gateways, runtimeTarget?: RuntimeTargetSpace, properties?: Properties, anypointLowerEnv?: boolean, debugMode?: boolean, disableTracing?: boolean, dontWait?: boolean, json?: boolean, maxRetries?: number, requestTimeout?: number, host?: string, environmentId?: string, organizationId?: string, mulesoftOrg?: string, updateAPISource?: boolean);
|
|
293
|
+
}
|
|
294
|
+
export interface StageContextBuilder {
|
|
295
|
+
withProperties(properties: Properties): StageContextBuilder;
|
|
296
|
+
withTracingDisabled(disableTracing: boolean): StageContextBuilder;
|
|
297
|
+
withDontWait(dontWait: boolean): StageContextBuilder;
|
|
298
|
+
withMaxRetries(maxRetries: number): StageContextBuilder;
|
|
299
|
+
withRequestTimeout(requestTimeout: number): StageContextBuilder;
|
|
300
|
+
withFlags(flags: Record<string, string | boolean | number>): StageContextBuilder;
|
|
301
|
+
withGateways(gateways: Gateways): StageContextBuilder;
|
|
302
|
+
withRuntimeTarget(runtimeTarget: RuntimeTargetSpace): StageContextBuilder;
|
|
303
|
+
withSession(session: Session): StageContextBuilder;
|
|
304
|
+
build(): StageContext;
|
|
305
|
+
}
|
|
306
|
+
export interface Facet {
|
|
307
|
+
id(): string;
|
|
308
|
+
waitForDependencies(component: Component, stage: Stage, context: StageContext): Promise<void>;
|
|
309
|
+
prepareStage(stage: Stage, space: Space, stageResultRegistry: StageResultRegistry): void;
|
|
310
|
+
deployStage<T>(component: Component, space: Space, context: StageContext): Promise<StageResult<T>[]>;
|
|
311
|
+
publishStage(component: Component, space: Space, context: StageContext): any;
|
|
312
|
+
}
|
|
313
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StageContext = exports.Stages = exports.BasePath = exports.ProjectContext = exports.InstanceProtectionDirection = exports.Phases = exports.isGAV = void 0;
|
|
4
|
+
const project_builder_impl_1 = require("./project-builder-impl");
|
|
5
|
+
const request_utils_1 = require("../../helpers/request-utils");
|
|
6
|
+
function isGAV(value) {
|
|
7
|
+
return (value &&
|
|
8
|
+
typeof value === 'object' &&
|
|
9
|
+
'groupId' in value &&
|
|
10
|
+
'assetId' in value &&
|
|
11
|
+
'version' in value);
|
|
12
|
+
}
|
|
13
|
+
exports.isGAV = isGAV;
|
|
14
|
+
exports.Phases = {
|
|
15
|
+
Build: 'build',
|
|
16
|
+
Deployment: 'deployment',
|
|
17
|
+
};
|
|
18
|
+
exports.InstanceProtectionDirection = {
|
|
19
|
+
Ingress: 'ingress',
|
|
20
|
+
Egress: 'egress',
|
|
21
|
+
};
|
|
22
|
+
class ProjectContext {
|
|
23
|
+
constructor(exchangeJson, targetDir, isWindows, projectDir, anypointLowerEnv, cacheDir, debugMode, forceUpdate, mulesoftOrg, req) {
|
|
24
|
+
this.exchangeJson = exchangeJson;
|
|
25
|
+
this.targetDir = targetDir;
|
|
26
|
+
this.isWindows = isWindows;
|
|
27
|
+
this.projectDir = projectDir;
|
|
28
|
+
this.anypointLowerEnv = anypointLowerEnv;
|
|
29
|
+
this.cacheDir = cacheDir;
|
|
30
|
+
this.debugMode = debugMode;
|
|
31
|
+
this.forceUpdate = forceUpdate;
|
|
32
|
+
this.mulesoftOrg = mulesoftOrg;
|
|
33
|
+
this.req = req;
|
|
34
|
+
}
|
|
35
|
+
exchangeDescriptor() {
|
|
36
|
+
return this.exchangeJson;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ProjectContext = ProjectContext;
|
|
40
|
+
class BasePath {
|
|
41
|
+
constructor(segments) {
|
|
42
|
+
this.segments = segments;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.BasePath = BasePath;
|
|
46
|
+
exports.Stages = {
|
|
47
|
+
Publication: 'publication',
|
|
48
|
+
Deployment: 'deployment',
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* StageContext represents the immutable result object containing all context
|
|
52
|
+
* information needed for stage execution (publication or deployment).
|
|
53
|
+
*/
|
|
54
|
+
class StageContext {
|
|
55
|
+
constructor(req, gateways, runtimeTarget, properties = { properties: {}, securedProperties: {} }, anypointLowerEnv = false, debugMode = false, disableTracing = false, dontWait = false, json = false, maxRetries = 3, requestTimeout = request_utils_1.DEFAULT_REQUEST_TIMEOUT, host = '', environmentId = '', organizationId = '', mulesoftOrg = '', updateAPISource = false) {
|
|
56
|
+
this.req = req;
|
|
57
|
+
this.properties = properties;
|
|
58
|
+
this.anypointLowerEnv = anypointLowerEnv;
|
|
59
|
+
this.debugMode = debugMode;
|
|
60
|
+
this.disableTracing = disableTracing;
|
|
61
|
+
this.dontWait = dontWait;
|
|
62
|
+
this.json = json;
|
|
63
|
+
this.host = host;
|
|
64
|
+
this.maxRetries = maxRetries;
|
|
65
|
+
this.requestTimeout = requestTimeout;
|
|
66
|
+
this.environmentId = environmentId;
|
|
67
|
+
this.organizationId = organizationId;
|
|
68
|
+
this.gateways = gateways;
|
|
69
|
+
this.runtimeTarget = runtimeTarget;
|
|
70
|
+
this.stageResultRegistry = new project_builder_impl_1.DefaultStageResultRegistry();
|
|
71
|
+
this.mulesoftOrg = mulesoftOrg;
|
|
72
|
+
this.updateAPISource = updateAPISource;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.StageContext = StageContext;
|
|
76
|
+
//# sourceMappingURL=project-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-builder.js","sourceRoot":"","sources":["../../../src/utils/builders/project-builder.ts"],"names":[],"mappings":";;;AAUA,iEAAiE;AACjE,+DAAmE;AAqEnE,SAAgB,KAAK,CAAC,KAAU;IAC9B,OAAO,CACL,KAAK;QACD,OAAO,KAAK,KAAK,QAAQ;QACzB,SAAS,IAAI,KAAK;QAClB,SAAS,IAAI,KAAK;QAClB,SAAS,IAAI,KAAK,CACvB,CAAA;AACH,CAAC;AARD,sBAQC;AAiOY,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;CAChB,CAAA;AAGG,QAAA,2BAA2B,GAAG;IACzC,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAA;AAGV,MAAa,cAAc;IAYvB,YAAY,YAAgC,EAC1C,SAAiB,EACjB,SAAkB,EAClB,UAAkB,EAClB,g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eAAe,GAAG,KAAK;QAEvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,mBAAmB,GAAG,IAAI,iDAA0B,EAAE,CAAA;QAC3D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;CACJ;AAvDD,oCAuDC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Space } from './project-builder';
|
|
2
|
+
export declare class SpaceSerializer {
|
|
3
|
+
private static readonly NetworkDir;
|
|
4
|
+
private static readonly AssetsDir;
|
|
5
|
+
private static readonly InstancesDir;
|
|
6
|
+
private static readonly ConnectionsDir;
|
|
7
|
+
private static readonly MuleAppsDir;
|
|
8
|
+
private static readonly ClientsDir;
|
|
9
|
+
private static readonly FilesDir;
|
|
10
|
+
private static readonly InstanceJson;
|
|
11
|
+
private static readonly ConnectionJson;
|
|
12
|
+
private static readonly ClientJson;
|
|
13
|
+
private static readonly MuleAppDeploymentJson;
|
|
14
|
+
private readonly targetDir;
|
|
15
|
+
constructor(targetDir: string);
|
|
16
|
+
emit(space: Space): void;
|
|
17
|
+
load(): Space | undefined;
|
|
18
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpaceSerializer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
7
|
+
const constants_1 = require("../../helpers/project/constants");
|
|
8
|
+
class SpaceSerializer {
|
|
9
|
+
constructor(targetDir) {
|
|
10
|
+
this.targetDir = targetDir;
|
|
11
|
+
}
|
|
12
|
+
emit(space) {
|
|
13
|
+
fs.removeSync(this.targetDir);
|
|
14
|
+
const targetSpace = (0, node_path_1.join)(this.targetDir, SpaceSerializer.NetworkDir);
|
|
15
|
+
fs.mkdirpSync(targetSpace);
|
|
16
|
+
const spaceExchange = {
|
|
17
|
+
...space.gav,
|
|
18
|
+
metadata: {
|
|
19
|
+
variables: {
|
|
20
|
+
...space.variables,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
fs.writeFileSync((0, node_path_1.join)(targetSpace, constants_1.DESCRIPTOR_FILE), JSON.stringify(spaceExchange, null, 2));
|
|
25
|
+
for (const pair of Object.entries(space.components)) {
|
|
26
|
+
const componentDir = (0, node_path_1.join)(targetSpace, pair[0]);
|
|
27
|
+
const component = pair[1];
|
|
28
|
+
for (const pair of Object.entries(component.assets)) {
|
|
29
|
+
const assetsDir = (0, node_path_1.join)(componentDir, SpaceSerializer.AssetsDir, pair[0]);
|
|
30
|
+
fs.mkdirpSync(assetsDir);
|
|
31
|
+
const asset = pair[1];
|
|
32
|
+
const files = asset.files;
|
|
33
|
+
const filesDir = (0, node_path_1.join)(assetsDir, SpaceSerializer.FilesDir);
|
|
34
|
+
fs.mkdirpSync(filesDir);
|
|
35
|
+
for (const filePair of Object.entries(files)) {
|
|
36
|
+
fs.writeFileSync((0, node_path_1.join)(filesDir, filePair[0]), filePair[1]);
|
|
37
|
+
}
|
|
38
|
+
const exchangeJson = {
|
|
39
|
+
assetId: asset.assetId,
|
|
40
|
+
// should we support inherit?
|
|
41
|
+
// version: component.version,
|
|
42
|
+
// groupId: space.gav.groupId,
|
|
43
|
+
groupId: space.gav.groupId,
|
|
44
|
+
version: component.version,
|
|
45
|
+
description: asset.description || '',
|
|
46
|
+
tags: asset.tags || [],
|
|
47
|
+
name: asset.name,
|
|
48
|
+
type: asset.type,
|
|
49
|
+
...(asset.main ? { main: asset.main } : {}),
|
|
50
|
+
dependencies: asset.dependencies || [],
|
|
51
|
+
externalInstances: asset.externalInstances || [],
|
|
52
|
+
metadata: {
|
|
53
|
+
properties: asset.properties || {},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
fs.writeFileSync((0, node_path_1.join)(assetsDir, constants_1.DESCRIPTOR_FILE), JSON.stringify(exchangeJson, null, 2));
|
|
57
|
+
}
|
|
58
|
+
for (const pair of Object.entries(component.apiInstances)) {
|
|
59
|
+
const instancesDir = (0, node_path_1.join)(componentDir, SpaceSerializer.InstancesDir, pair[0]);
|
|
60
|
+
fs.mkdirpSync(instancesDir);
|
|
61
|
+
const asset = pair[1];
|
|
62
|
+
fs.writeFileSync((0, node_path_1.join)(instancesDir, SpaceSerializer.InstanceJson), JSON.stringify(asset, null, 2));
|
|
63
|
+
}
|
|
64
|
+
for (const pair of Object.entries(component.connections)) {
|
|
65
|
+
const connectionsDir = (0, node_path_1.join)(componentDir, SpaceSerializer.ConnectionsDir, pair[0]);
|
|
66
|
+
fs.mkdirpSync(connectionsDir);
|
|
67
|
+
const asset = pair[1];
|
|
68
|
+
fs.writeFileSync((0, node_path_1.join)(connectionsDir, SpaceSerializer.ConnectionJson), JSON.stringify(asset, null, 2));
|
|
69
|
+
}
|
|
70
|
+
for (const pair of Object.entries(component.muleApplications)) {
|
|
71
|
+
const muleApplicationsDir = (0, node_path_1.join)(componentDir, SpaceSerializer.MuleAppsDir, pair[0]);
|
|
72
|
+
fs.mkdirpSync(muleApplicationsDir);
|
|
73
|
+
const asset = pair[1];
|
|
74
|
+
fs.writeFileSync((0, node_path_1.join)(muleApplicationsDir, SpaceSerializer.MuleAppDeploymentJson), JSON.stringify(asset, null, 2));
|
|
75
|
+
}
|
|
76
|
+
for (const pair of Object.entries(component.clients)) {
|
|
77
|
+
const clientsDir = (0, node_path_1.join)(componentDir, SpaceSerializer.ClientsDir, pair[0]);
|
|
78
|
+
fs.mkdirpSync(clientsDir);
|
|
79
|
+
const asset = pair[1];
|
|
80
|
+
fs.writeFileSync((0, node_path_1.join)(clientsDir, SpaceSerializer.ClientJson), JSON.stringify(asset, null, 2));
|
|
81
|
+
}
|
|
82
|
+
const exchangeJson = {
|
|
83
|
+
groupId: space.gav.groupId,
|
|
84
|
+
assetId: component.id,
|
|
85
|
+
version: component.version,
|
|
86
|
+
dependencies: component.dependencies,
|
|
87
|
+
};
|
|
88
|
+
fs.writeFileSync((0, node_path_1.join)(componentDir, constants_1.DESCRIPTOR_FILE), JSON.stringify(exchangeJson, null, 2));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
load() {
|
|
92
|
+
const spaceDir = (0, node_path_1.join)(this.targetDir, SpaceSerializer.NetworkDir);
|
|
93
|
+
if (!fs.pathExistsSync(spaceDir)) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
const exchangePath = (0, node_path_1.join)(spaceDir, constants_1.DESCRIPTOR_FILE);
|
|
97
|
+
const spaceExchange = fs.pathExistsSync(exchangePath) ? JSON.parse(fs.readFileSync(exchangePath, 'utf8')) : {};
|
|
98
|
+
const gav = {
|
|
99
|
+
groupId: spaceExchange.groupId || '',
|
|
100
|
+
assetId: spaceExchange.assetId || '',
|
|
101
|
+
version: spaceExchange.version || '',
|
|
102
|
+
};
|
|
103
|
+
const variables = (spaceExchange.metadata && spaceExchange.metadata.variables) ? spaceExchange.metadata.variables : {};
|
|
104
|
+
const components = {};
|
|
105
|
+
const compEntries = fs.readdirSync(spaceDir);
|
|
106
|
+
for (const compName of compEntries) {
|
|
107
|
+
const compPath = (0, node_path_1.join)(spaceDir, compName);
|
|
108
|
+
if (!fs.statSync(compPath).isDirectory()) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// skip if this directory is the space exchange (shouldn't be) or hidden
|
|
112
|
+
if (compName === '' || compName.startsWith('.')) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const componentExchangePath = (0, node_path_1.join)(compPath, constants_1.DESCRIPTOR_FILE);
|
|
116
|
+
const componentExchange = fs.pathExistsSync(componentExchangePath) ? JSON.parse(fs.readFileSync(componentExchangePath, 'utf8')) : {};
|
|
117
|
+
const component = {
|
|
118
|
+
id: componentExchange.assetId,
|
|
119
|
+
version: componentExchange.version,
|
|
120
|
+
assets: {},
|
|
121
|
+
apiInstances: {},
|
|
122
|
+
muleApplications: {},
|
|
123
|
+
connections: {},
|
|
124
|
+
clients: {},
|
|
125
|
+
dependencies: componentExchange.dependencies,
|
|
126
|
+
};
|
|
127
|
+
// assets
|
|
128
|
+
const assetsBase = (0, node_path_1.join)(compPath, SpaceSerializer.AssetsDir);
|
|
129
|
+
if (fs.pathExistsSync(assetsBase) && fs.statSync(assetsBase).isDirectory()) {
|
|
130
|
+
for (const assetDirName of fs.readdirSync(assetsBase)) {
|
|
131
|
+
const assetDir = (0, node_path_1.join)(assetsBase, assetDirName);
|
|
132
|
+
if (!fs.statSync(assetDir).isDirectory()) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const assetExchangePath = (0, node_path_1.join)(assetDir, constants_1.DESCRIPTOR_FILE);
|
|
136
|
+
const assetExchange = fs.pathExistsSync(assetExchangePath) ? JSON.parse(fs.readFileSync(assetExchangePath, 'utf8')) : {};
|
|
137
|
+
const filesDir = (0, node_path_1.join)(assetDir, SpaceSerializer.FilesDir);
|
|
138
|
+
const files = {};
|
|
139
|
+
if (fs.pathExistsSync(filesDir) && fs.statSync(filesDir).isDirectory()) {
|
|
140
|
+
for (const f of fs.readdirSync(filesDir)) {
|
|
141
|
+
const filePath = (0, node_path_1.join)(filesDir, f);
|
|
142
|
+
if (fs.statSync(filePath).isFile()) {
|
|
143
|
+
files[f] = fs.readFileSync(filePath);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const asset = {
|
|
148
|
+
type: assetExchange.type,
|
|
149
|
+
assetId: assetExchange.assetId || assetDirName,
|
|
150
|
+
name: assetExchange.name || assetExchange.assetId || assetDirName,
|
|
151
|
+
description: assetExchange.description || undefined,
|
|
152
|
+
dependencies: assetExchange.dependencies || undefined,
|
|
153
|
+
externalInstances: assetExchange.externalInstances || undefined,
|
|
154
|
+
files: files,
|
|
155
|
+
properties: assetExchange.metadata ? assetExchange.metadata.properties || undefined : undefined,
|
|
156
|
+
main: assetExchange.main || undefined,
|
|
157
|
+
tags: assetExchange.tags || undefined,
|
|
158
|
+
};
|
|
159
|
+
component.assets[assetDirName] = asset;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// API instances
|
|
163
|
+
const instancesBase = (0, node_path_1.join)(compPath, SpaceSerializer.InstancesDir);
|
|
164
|
+
if (fs.pathExistsSync(instancesBase) && fs.statSync(instancesBase).isDirectory()) {
|
|
165
|
+
for (const instName of fs.readdirSync(instancesBase)) {
|
|
166
|
+
const instDir = (0, node_path_1.join)(instancesBase, instName);
|
|
167
|
+
if (!fs.statSync(instDir).isDirectory()) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
const instPath = (0, node_path_1.join)(instDir, SpaceSerializer.InstanceJson);
|
|
171
|
+
if (fs.pathExistsSync(instPath)) {
|
|
172
|
+
component.apiInstances[instName] = JSON.parse(fs.readFileSync(instPath, 'utf8'));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// connections
|
|
177
|
+
const connectionsBase = (0, node_path_1.join)(compPath, SpaceSerializer.ConnectionsDir);
|
|
178
|
+
if (fs.pathExistsSync(connectionsBase) && fs.statSync(connectionsBase).isDirectory()) {
|
|
179
|
+
for (const connName of fs.readdirSync(connectionsBase)) {
|
|
180
|
+
const connDir = (0, node_path_1.join)(connectionsBase, connName);
|
|
181
|
+
if (!fs.statSync(connDir).isDirectory()) {
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
const connPath = (0, node_path_1.join)(connDir, SpaceSerializer.ConnectionJson);
|
|
185
|
+
if (fs.pathExistsSync(connPath)) {
|
|
186
|
+
component.connections[connName] = JSON.parse(fs.readFileSync(connPath, 'utf8'));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// mule applications
|
|
191
|
+
const muleBase = (0, node_path_1.join)(compPath, SpaceSerializer.MuleAppsDir);
|
|
192
|
+
if (fs.pathExistsSync(muleBase) && fs.statSync(muleBase).isDirectory()) {
|
|
193
|
+
for (const muleName of fs.readdirSync(muleBase)) {
|
|
194
|
+
const muleDir = (0, node_path_1.join)(muleBase, muleName);
|
|
195
|
+
if (!fs.statSync(muleDir).isDirectory()) {
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
const mulePath = (0, node_path_1.join)(muleDir, SpaceSerializer.MuleAppDeploymentJson);
|
|
199
|
+
if (fs.pathExistsSync(mulePath)) {
|
|
200
|
+
component.muleApplications[muleName] = JSON.parse(fs.readFileSync(mulePath, 'utf8'));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// clients
|
|
205
|
+
const clientsBase = (0, node_path_1.join)(compPath, SpaceSerializer.ClientsDir);
|
|
206
|
+
if (fs.pathExistsSync(clientsBase) && fs.statSync(clientsBase).isDirectory()) {
|
|
207
|
+
for (const clientName of fs.readdirSync(clientsBase)) {
|
|
208
|
+
const clientDir = (0, node_path_1.join)(clientsBase, clientName);
|
|
209
|
+
if (!fs.statSync(clientDir).isDirectory()) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const clientPath = (0, node_path_1.join)(clientDir, SpaceSerializer.ClientJson);
|
|
213
|
+
if (fs.pathExistsSync(clientPath)) {
|
|
214
|
+
component.clients[clientName] = JSON.parse(fs.readFileSync(clientPath, 'utf8'));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
components[compName] = component;
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
components,
|
|
222
|
+
variables,
|
|
223
|
+
gav,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.SpaceSerializer = SpaceSerializer;
|
|
228
|
+
SpaceSerializer.NetworkDir = 'network';
|
|
229
|
+
SpaceSerializer.AssetsDir = 'assets';
|
|
230
|
+
SpaceSerializer.InstancesDir = 'instances';
|
|
231
|
+
SpaceSerializer.ConnectionsDir = 'connections';
|
|
232
|
+
SpaceSerializer.MuleAppsDir = 'mule-applications';
|
|
233
|
+
SpaceSerializer.ClientsDir = 'clients';
|
|
234
|
+
SpaceSerializer.FilesDir = 'files';
|
|
235
|
+
SpaceSerializer.InstanceJson = 'instance.json';
|
|
236
|
+
SpaceSerializer.ConnectionJson = 'connection.json';
|
|
237
|
+
SpaceSerializer.ClientJson = 'client.json';
|
|
238
|
+
SpaceSerializer.MuleAppDeploymentJson = 'application-deployment.json';
|
|
239
|
+
//# sourceMappingURL=space-serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-serializer.js","sourceRoot":"","sources":["../../../src/utils/builders/space-serializer.ts"],"names":[],"mappings":";;;;AAAA,yCAA8B;AAE9B,qDAA8B;AAC9B,+DAA+D;AAE/D,MAAa,eAAe;IAc1B,YAAY,SAAiB;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,IAAI,CAAC,KAAY;QACf,EAAE,CAAC,UAAU,CAAC,I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