@twin.org/node-core 0.0.2-next.8 → 0.0.3-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/bootstrap.js +374 -0
- package/dist/es/bootstrap.js.map +1 -0
- package/dist/es/builders/engineEnvBuilder.js +1051 -0
- package/dist/es/builders/engineEnvBuilder.js.map +1 -0
- package/dist/es/builders/engineServerEnvBuilder.js +197 -0
- package/dist/es/builders/engineServerEnvBuilder.js.map +1 -0
- package/dist/es/builders/extensionsBuilder.js +100 -0
- package/dist/es/builders/extensionsBuilder.js.map +1 -0
- package/dist/es/defaults.js +9 -0
- package/dist/es/defaults.js.map +1 -0
- package/dist/es/identity.js +169 -0
- package/dist/es/identity.js.map +1 -0
- package/dist/es/index.js +23 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ICacheMetadata.js +4 -0
- package/dist/es/models/ICacheMetadata.js.map +1 -0
- package/dist/es/models/IEngineEnvironmentVariables.js +4 -0
- package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -0
- package/dist/es/models/IEngineServerEnvironmentVariables.js +2 -0
- package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -0
- package/dist/es/models/IModuleProtocol.js +2 -0
- package/dist/es/models/IModuleProtocol.js.map +1 -0
- package/dist/es/models/INodeEngineConfig.js +2 -0
- package/dist/es/models/INodeEngineConfig.js.map +1 -0
- package/dist/es/models/INodeEngineState.js +2 -0
- package/dist/es/models/INodeEngineState.js.map +1 -0
- package/dist/es/models/INodeEnvironmentVariables.js +2 -0
- package/dist/es/models/INodeEnvironmentVariables.js.map +1 -0
- package/dist/es/models/INodeOptions.js +2 -0
- package/dist/es/models/INodeOptions.js.map +1 -0
- package/dist/es/models/IProtocolHandlerResult.js +4 -0
- package/dist/es/models/IProtocolHandlerResult.js.map +1 -0
- package/dist/es/models/moduleProtocol.js +29 -0
- package/dist/es/models/moduleProtocol.js.map +1 -0
- package/dist/es/models/nodeExtensionMethods.js +2 -0
- package/dist/es/models/nodeExtensionMethods.js.map +1 -0
- package/dist/es/models/nodeFeatures.js +21 -0
- package/dist/es/models/nodeFeatures.js.map +1 -0
- package/dist/es/node.js +265 -0
- package/dist/es/node.js.map +1 -0
- package/dist/es/server.js +74 -0
- package/dist/es/server.js.map +1 -0
- package/dist/es/utils.js +418 -0
- package/dist/es/utils.js.map +1 -0
- package/dist/types/bootstrap.d.ts +27 -10
- package/dist/types/builders/engineEnvBuilder.d.ts +3 -2
- package/dist/types/builders/engineServerEnvBuilder.d.ts +4 -3
- package/dist/types/builders/extensionsBuilder.d.ts +32 -0
- package/dist/types/defaults.d.ts +6 -0
- package/dist/types/identity.d.ts +14 -0
- package/dist/types/index.d.ts +20 -11
- package/dist/types/models/ICacheMetadata.d.ts +17 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +132 -24
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +12 -3
- package/dist/types/models/IModuleProtocol.d.ts +18 -0
- package/dist/types/models/INodeEngineConfig.d.ts +6 -0
- package/dist/types/models/INodeEngineState.d.ts +22 -0
- package/dist/types/models/INodeEnvironmentVariables.d.ts +50 -10
- package/dist/types/models/INodeOptions.d.ts +14 -3
- package/dist/types/models/IProtocolHandlerResult.d.ts +13 -0
- package/dist/types/models/moduleProtocol.d.ts +29 -0
- package/dist/types/models/nodeExtensionMethods.d.ts +27 -0
- package/dist/types/models/nodeFeatures.d.ts +5 -5
- package/dist/types/node.d.ts +17 -7
- package/dist/types/server.d.ts +9 -6
- package/dist/types/utils.d.ts +87 -2
- package/docs/changelog.md +185 -0
- package/docs/detailed-guide.md +129 -0
- package/docs/reference/functions/bootstrap.md +1 -1
- package/docs/reference/functions/bootstrapAuth.md +1 -1
- package/docs/reference/functions/bootstrapBlobEncryption.md +1 -1
- package/docs/reference/functions/bootstrapContextIdHandlers.md +35 -0
- package/docs/reference/functions/bootstrapImmutableProofMethod.md +1 -1
- package/docs/reference/functions/{bootstrapNodeUser.md → bootstrapNodeAdminUser.md} +3 -3
- package/docs/reference/functions/{bootstrapNodeIdentity.md → bootstrapNodeId.md} +3 -3
- package/docs/reference/functions/bootstrapSynchronisedStorage.md +1 -1
- package/docs/reference/functions/bootstrapTenantId.md +35 -0
- package/docs/reference/functions/buildConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineConfiguration.md +8 -2
- package/docs/reference/functions/buildEngineServerConfiguration.md +9 -3
- package/docs/reference/functions/createModuleImportUrl.md +21 -0
- package/docs/reference/functions/directoryExists.md +19 -0
- package/docs/reference/functions/extensionsConfiguration.md +25 -0
- package/docs/reference/functions/extensionsInitialiseEngine.md +25 -0
- package/docs/reference/functions/extensionsInitialiseEngineServer.md +31 -0
- package/docs/reference/functions/getExtensionsCacheDir.md +31 -0
- package/docs/reference/functions/getFiles.md +19 -0
- package/docs/reference/functions/getSubFolders.md +19 -0
- package/docs/reference/functions/handleHttpsProtocol.md +49 -0
- package/docs/reference/functions/handleNpmProtocol.md +31 -0
- package/docs/reference/functions/hashUrl.md +19 -0
- package/docs/reference/functions/isCacheExpired.md +31 -0
- package/docs/reference/functions/overrideModuleImport.md +8 -2
- package/docs/reference/functions/parseModuleProtocol.md +19 -0
- package/docs/reference/functions/resolvePackageEntryPoint.md +32 -0
- package/docs/reference/functions/run.md +3 -3
- package/docs/reference/functions/shutdownExtensions.md +25 -0
- package/docs/reference/functions/start.md +11 -5
- package/docs/reference/index.md +36 -2
- package/docs/reference/interfaces/ICacheMetadata.md +27 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +255 -37
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1696 -5
- package/docs/reference/interfaces/IModuleProtocol.md +27 -0
- package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
- package/docs/reference/interfaces/INodeEngineState.md +39 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +609 -165
- package/docs/reference/interfaces/INodeOptions.md +27 -3
- package/docs/reference/interfaces/IProtocolHandlerResult.md +19 -0
- package/docs/reference/type-aliases/ModuleProtocol.md +5 -0
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +18 -0
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +24 -0
- package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +23 -0
- package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +10 -0
- package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +3 -0
- package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +3 -0
- package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
- package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +3 -0
- package/docs/reference/variables/ModuleProtocol.md +37 -0
- package/docs/reference/variables/NodeFeatures.md +8 -8
- package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
- package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
- package/locales/en.json +27 -9
- package/package.json +27 -9
- package/dist/cjs/index.cjs +0 -1910
- package/dist/esm/index.mjs +0 -1870
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { Coerce, Is } from "@twin.org/core";
|
|
5
|
+
import { AttestationComponentType, AttestationConnectorType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, AuthenticationGeneratorComponentType, BackgroundTaskConnectorType, BlobStorageComponentType, BlobStorageConnectorType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DataSpaceConnectorComponentType, DltConfigType, DocumentManagementComponentType, EngineTypeHelper, EntityStorageConnectorType, EventBusComponentType, EventBusConnectorType, FaucetConnectorType, FederatedCatalogueComponentType, IdentityComponentType, IdentityConnectorType, IdentityProfileComponentType, IdentityProfileConnectorType, IdentityResolverComponentType, IdentityResolverConnectorType, ImmutableProofComponentType, LoggingComponentType, LoggingConnectorType, MessagingAdminComponentType, MessagingComponentType, MessagingEmailConnectorType, MessagingPushNotificationConnectorType, MessagingSmsConnectorType, NftComponentType, NftConnectorType, RightsManagementDapComponentType, RightsManagementDarpComponentType, RightsManagementPapComponentType, RightsManagementPdpComponentType, RightsManagementPepComponentType, RightsManagementPipComponentType, RightsManagementPmpComponentType, RightsManagementPnapComponentType, RightsManagementPnpComponentType, RightsManagementPxpComponentType, SynchronisedStorageComponentType, TaskSchedulerComponentType, TelemetryComponentType, TelemetryConnectorType, TenantAdminComponentType, VaultConnectorType, VerifiableStorageComponentType, VerifiableStorageConnectorType, WalletConnectorType } from "@twin.org/engine-types";
|
|
6
|
+
import { DataAccessPointRestClient, PolicyNegotiationPointRestClient } from "@twin.org/rights-management-rest-client";
|
|
7
|
+
import { ATTESTATION_VERIFICATION_METHOD_ID, BLOB_STORAGE_ENCRYPTION_KEY_ID, IMMUTABLE_PROOF_VERIFICATION_METHOD_ID, SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID, VC_AUTHENTICATION_VERIFICATION_METHOD_ID } from "../defaults.js";
|
|
8
|
+
/**
|
|
9
|
+
* Build the engine core configuration from environment variables.
|
|
10
|
+
* @param envVars The environment variables.
|
|
11
|
+
* @param contextIdKeys The context ID keys.
|
|
12
|
+
* @returns The config for the core.
|
|
13
|
+
*/
|
|
14
|
+
export async function buildEngineConfiguration(envVars, contextIdKeys) {
|
|
15
|
+
if (Is.stringValue(envVars.storageFileRoot)) {
|
|
16
|
+
envVars.stateFilename ??= "engine-state.json";
|
|
17
|
+
envVars.storageFileRoot = path.resolve(envVars.storageFileRoot);
|
|
18
|
+
envVars.stateFilename = path.join(envVars.storageFileRoot, envVars.stateFilename);
|
|
19
|
+
}
|
|
20
|
+
const coreConfig = {
|
|
21
|
+
debug: Coerce.boolean(envVars.debug) ?? false,
|
|
22
|
+
types: {}
|
|
23
|
+
};
|
|
24
|
+
await configureTenant(coreConfig, envVars);
|
|
25
|
+
await configureEntityStorage(coreConfig, envVars);
|
|
26
|
+
await configureBlobStorage(coreConfig, envVars);
|
|
27
|
+
await configureVault(coreConfig, envVars);
|
|
28
|
+
await configureDlt(coreConfig, envVars);
|
|
29
|
+
await configureLogging(coreConfig, envVars);
|
|
30
|
+
await configureBackgroundTask(coreConfig, envVars);
|
|
31
|
+
await configureTaskScheduler(coreConfig, envVars);
|
|
32
|
+
await configureEventBus(coreConfig, envVars);
|
|
33
|
+
await configureTelemetry(coreConfig, envVars);
|
|
34
|
+
await configureMessaging(coreConfig, envVars);
|
|
35
|
+
await configureFaucet(coreConfig, envVars);
|
|
36
|
+
await configureWallet(coreConfig, envVars);
|
|
37
|
+
await configureNft(coreConfig, envVars);
|
|
38
|
+
await configureVerifiableStorage(coreConfig, envVars);
|
|
39
|
+
await configureIdentity(coreConfig, envVars);
|
|
40
|
+
await configureIdentityResolver(coreConfig, envVars);
|
|
41
|
+
await configureIdentityProfile(coreConfig, envVars);
|
|
42
|
+
await configureAttestation(coreConfig, envVars);
|
|
43
|
+
await configureDataProcessing(coreConfig, envVars);
|
|
44
|
+
await configureAuditableItemGraph(coreConfig, envVars);
|
|
45
|
+
await configureAuditableItemStream(coreConfig, envVars);
|
|
46
|
+
await configureDocumentManagement(coreConfig, envVars);
|
|
47
|
+
await configureVerifiableCredentialAuthentication(coreConfig, envVars);
|
|
48
|
+
await configureRightsManagement(coreConfig, envVars);
|
|
49
|
+
await configureSynchronisedStorage(coreConfig, envVars);
|
|
50
|
+
await configureFederatedCatalogue(coreConfig, envVars);
|
|
51
|
+
await configureDataSpaceConnector(coreConfig, envVars);
|
|
52
|
+
return coreConfig;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Configures the entity storage.
|
|
56
|
+
* @param coreConfig The core config.
|
|
57
|
+
* @param envVars The environment variables.
|
|
58
|
+
*/
|
|
59
|
+
async function configureEntityStorage(coreConfig, envVars) {
|
|
60
|
+
coreConfig.types ??= {};
|
|
61
|
+
coreConfig.types.entityStorageConnector ??= [];
|
|
62
|
+
const entityStorageConnectorTypes = envVars.entityStorageConnectorType?.split(",") ?? [];
|
|
63
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.Memory)) {
|
|
64
|
+
coreConfig.types.entityStorageConnector.push({
|
|
65
|
+
type: EntityStorageConnectorType.Memory
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.File)) {
|
|
69
|
+
coreConfig.types.entityStorageConnector.push({
|
|
70
|
+
type: EntityStorageConnectorType.File,
|
|
71
|
+
options: {
|
|
72
|
+
config: { directory: envVars.storageFileRoot ?? "" },
|
|
73
|
+
folderPrefix: envVars.entityStorageTablePrefix
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.AwsDynamoDb)) {
|
|
78
|
+
coreConfig.types.entityStorageConnector.push({
|
|
79
|
+
type: EntityStorageConnectorType.AwsDynamoDb,
|
|
80
|
+
options: {
|
|
81
|
+
config: {
|
|
82
|
+
region: envVars.awsDynamodbRegion ?? "",
|
|
83
|
+
authMode: envVars.awsDynamodbAuthMode,
|
|
84
|
+
accessKeyId: envVars.awsDynamodbAccessKeyId,
|
|
85
|
+
secretAccessKey: envVars.awsDynamodbSecretAccessKey,
|
|
86
|
+
endpoint: envVars.awsDynamodbEndpoint
|
|
87
|
+
},
|
|
88
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.AzureCosmosDb)) {
|
|
93
|
+
coreConfig.types.entityStorageConnector.push({
|
|
94
|
+
type: EntityStorageConnectorType.AzureCosmosDb,
|
|
95
|
+
options: {
|
|
96
|
+
config: {
|
|
97
|
+
endpoint: envVars.azureCosmosdbEndpoint ?? "",
|
|
98
|
+
key: envVars.azureCosmosdbKey ?? "",
|
|
99
|
+
databaseId: envVars.azureCosmosdbDatabaseId ?? "",
|
|
100
|
+
containerId: envVars.azureCosmosdbContainerId ?? ""
|
|
101
|
+
},
|
|
102
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.GcpFirestoreDb)) {
|
|
107
|
+
coreConfig.types.entityStorageConnector.push({
|
|
108
|
+
type: EntityStorageConnectorType.GcpFirestoreDb,
|
|
109
|
+
options: {
|
|
110
|
+
config: {
|
|
111
|
+
projectId: envVars.gcpFirestoreProjectId ?? "",
|
|
112
|
+
credentials: envVars.gcpFirestoreCredentials ?? "",
|
|
113
|
+
databaseId: envVars.gcpFirestoreDatabaseId ?? "",
|
|
114
|
+
collectionName: envVars.gcpFirestoreCollectionName ?? "",
|
|
115
|
+
endpoint: envVars.gcpFirestoreApiEndpoint ?? ""
|
|
116
|
+
},
|
|
117
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.ScyllaDb)) {
|
|
122
|
+
coreConfig.types.entityStorageConnector.push({
|
|
123
|
+
type: EntityStorageConnectorType.ScyllaDb,
|
|
124
|
+
options: {
|
|
125
|
+
config: {
|
|
126
|
+
hosts: envVars.scylladbHosts?.split(",") ?? [],
|
|
127
|
+
localDataCenter: envVars.scylladbLocalDataCenter ?? "",
|
|
128
|
+
keyspace: envVars.scylladbKeyspace ?? "",
|
|
129
|
+
port: Coerce.integer(envVars.scylladbPort)
|
|
130
|
+
},
|
|
131
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.MySqlDb)) {
|
|
136
|
+
coreConfig.types.entityStorageConnector.push({
|
|
137
|
+
type: EntityStorageConnectorType.MySqlDb,
|
|
138
|
+
options: {
|
|
139
|
+
config: {
|
|
140
|
+
host: envVars.mySqlHost ?? "",
|
|
141
|
+
port: Coerce.integer(envVars.mySqlPort),
|
|
142
|
+
user: envVars.mySqlUser ?? "",
|
|
143
|
+
password: envVars.mySqlPassword ?? "",
|
|
144
|
+
database: envVars.mySqlDatabase ?? ""
|
|
145
|
+
},
|
|
146
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.MongoDb)) {
|
|
151
|
+
coreConfig.types.entityStorageConnector.push({
|
|
152
|
+
type: EntityStorageConnectorType.MongoDb,
|
|
153
|
+
options: {
|
|
154
|
+
config: {
|
|
155
|
+
host: envVars.mongoDbHost ?? "",
|
|
156
|
+
port: Coerce.integer(envVars.mongoDbPort),
|
|
157
|
+
user: envVars.mongoDbUser ?? "",
|
|
158
|
+
password: envVars.mongoDbPassword ?? "",
|
|
159
|
+
database: envVars.mongoDbDatabase ?? ""
|
|
160
|
+
},
|
|
161
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.PostgreSql)) {
|
|
166
|
+
coreConfig.types.entityStorageConnector.push({
|
|
167
|
+
type: EntityStorageConnectorType.PostgreSql,
|
|
168
|
+
options: {
|
|
169
|
+
config: {
|
|
170
|
+
host: envVars.postgreSqlHost ?? "",
|
|
171
|
+
port: Coerce.integer(envVars.postgreSqlPort),
|
|
172
|
+
user: envVars.postgreSqlUser ?? "",
|
|
173
|
+
password: envVars.postgreSqlPassword ?? "",
|
|
174
|
+
database: envVars.postgreSqlDatabase ?? ""
|
|
175
|
+
},
|
|
176
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
const defaultEntityStorageConnectorType = envVars.entityStorageConnectorDefault ?? entityStorageConnectorTypes[0];
|
|
181
|
+
if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.Synchronised)) {
|
|
182
|
+
// For synchronised storage we use the default connector as the one we wrap for real DB operations
|
|
183
|
+
coreConfig.types.entityStorageConnector.push({
|
|
184
|
+
type: EntityStorageConnectorType.Synchronised,
|
|
185
|
+
options: {
|
|
186
|
+
entityStorageConnectorType: defaultEntityStorageConnectorType
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (Is.arrayValue(entityStorageConnectorTypes)) {
|
|
191
|
+
for (const config of coreConfig.types.entityStorageConnector) {
|
|
192
|
+
if (config.type === defaultEntityStorageConnectorType) {
|
|
193
|
+
config.isDefault = true;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Configures the blob storage.
|
|
201
|
+
* @param coreConfig The core config.
|
|
202
|
+
* @param envVars The environment variables.
|
|
203
|
+
*/
|
|
204
|
+
async function configureBlobStorage(coreConfig, envVars) {
|
|
205
|
+
coreConfig.types.blobStorageConnector ??= [];
|
|
206
|
+
const blobStorageConnectorTypes = envVars.blobStorageConnectorType?.split(",") ?? [];
|
|
207
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.Memory)) {
|
|
208
|
+
coreConfig.types.blobStorageConnector.push({
|
|
209
|
+
type: BlobStorageConnectorType.Memory
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.File)) {
|
|
213
|
+
coreConfig.types.blobStorageConnector.push({
|
|
214
|
+
type: BlobStorageConnectorType.File,
|
|
215
|
+
options: {
|
|
216
|
+
config: {
|
|
217
|
+
directory: Is.stringValue(envVars.storageFileRoot)
|
|
218
|
+
? path.join(envVars.storageFileRoot, "blob-storage")
|
|
219
|
+
: ""
|
|
220
|
+
},
|
|
221
|
+
storagePrefix: envVars.blobStoragePrefix
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.Ipfs)) {
|
|
226
|
+
coreConfig.types.blobStorageConnector.push({
|
|
227
|
+
type: BlobStorageConnectorType.Ipfs,
|
|
228
|
+
options: {
|
|
229
|
+
config: {
|
|
230
|
+
apiUrl: envVars.ipfsApiUrl ?? "",
|
|
231
|
+
bearerToken: envVars.ipfsBearerToken
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.AwsS3)) {
|
|
237
|
+
coreConfig.types.blobStorageConnector.push({
|
|
238
|
+
type: BlobStorageConnectorType.AwsS3,
|
|
239
|
+
options: {
|
|
240
|
+
config: {
|
|
241
|
+
region: envVars.awsS3Region ?? "",
|
|
242
|
+
bucketName: envVars.awsS3BucketName ?? "",
|
|
243
|
+
authMode: envVars.awsS3AuthMode,
|
|
244
|
+
accessKeyId: envVars.awsS3AccessKeyId,
|
|
245
|
+
secretAccessKey: envVars.awsS3SecretAccessKey,
|
|
246
|
+
endpoint: envVars.awsS3Endpoint
|
|
247
|
+
},
|
|
248
|
+
storagePrefix: envVars.blobStoragePrefix
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.AzureStorage)) {
|
|
253
|
+
coreConfig.types.blobStorageConnector.push({
|
|
254
|
+
type: BlobStorageConnectorType.AzureStorage,
|
|
255
|
+
options: {
|
|
256
|
+
config: {
|
|
257
|
+
accountName: envVars.azureStorageAccountName ?? "",
|
|
258
|
+
accountKey: envVars.azureStorageAccountKey ?? "",
|
|
259
|
+
containerName: envVars.azureStorageContainerName ?? "",
|
|
260
|
+
endpoint: envVars.azureStorageEndpoint ?? ""
|
|
261
|
+
},
|
|
262
|
+
storagePrefix: envVars.blobStoragePrefix
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.GcpStorage)) {
|
|
267
|
+
coreConfig.types.blobStorageConnector.push({
|
|
268
|
+
type: BlobStorageConnectorType.GcpStorage,
|
|
269
|
+
options: {
|
|
270
|
+
config: {
|
|
271
|
+
projectId: envVars.gcpStorageProjectId ?? "",
|
|
272
|
+
credentials: envVars.gcpStorageCredentials ?? "",
|
|
273
|
+
bucketName: envVars.gcpStorageBucketName ?? "",
|
|
274
|
+
apiEndpoint: envVars.gcpFirestoreApiEndpoint
|
|
275
|
+
},
|
|
276
|
+
storagePrefix: envVars.blobStoragePrefix
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
if (Is.arrayValue(blobStorageConnectorTypes)) {
|
|
281
|
+
const defaultStorageConnectorType = envVars.blobStorageConnectorDefault ?? blobStorageConnectorTypes[0];
|
|
282
|
+
for (const config of coreConfig.types.blobStorageConnector) {
|
|
283
|
+
if (config.type === defaultStorageConnectorType) {
|
|
284
|
+
config.isDefault = true;
|
|
285
|
+
}
|
|
286
|
+
// If this blob storage connector is the one to use for public access
|
|
287
|
+
// then add it as a feature
|
|
288
|
+
if (Is.stringValue(envVars.blobStorageConnectorPublic) &&
|
|
289
|
+
config.type === envVars.blobStorageConnectorPublic) {
|
|
290
|
+
config.features ??= [];
|
|
291
|
+
config.features.push("public");
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
if (coreConfig.types.blobStorageConnector.length > 0) {
|
|
297
|
+
coreConfig.types.blobStorageComponent ??= [];
|
|
298
|
+
coreConfig.types.blobStorageComponent.push({
|
|
299
|
+
type: BlobStorageComponentType.Service,
|
|
300
|
+
options: {
|
|
301
|
+
config: {
|
|
302
|
+
vaultKeyId: (envVars.blobStorageEnableEncryption ?? false)
|
|
303
|
+
? (envVars.blobStorageEncryptionKeyId ?? BLOB_STORAGE_ENCRYPTION_KEY_ID)
|
|
304
|
+
: undefined
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Configures the logging.
|
|
312
|
+
* @param coreConfig The core config.
|
|
313
|
+
* @param envVars The environment variables.
|
|
314
|
+
*/
|
|
315
|
+
async function configureLogging(coreConfig, envVars) {
|
|
316
|
+
coreConfig.types.loggingConnector ??= [];
|
|
317
|
+
const loggingConnectorTypes = (envVars.loggingConnector ?? "").split(",");
|
|
318
|
+
let additionalConnectorCount = 0;
|
|
319
|
+
for (const loggingConnector of loggingConnectorTypes) {
|
|
320
|
+
if (loggingConnector === LoggingConnectorType.Console) {
|
|
321
|
+
coreConfig.types.loggingConnector.push({
|
|
322
|
+
type: LoggingConnectorType.Console,
|
|
323
|
+
options: {
|
|
324
|
+
config: {
|
|
325
|
+
translateMessages: true,
|
|
326
|
+
hideGroups: true
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
additionalConnectorCount++;
|
|
331
|
+
}
|
|
332
|
+
else if (loggingConnector === LoggingConnectorType.EntityStorage) {
|
|
333
|
+
coreConfig.types.loggingConnector.push({
|
|
334
|
+
type: LoggingConnectorType.EntityStorage
|
|
335
|
+
});
|
|
336
|
+
additionalConnectorCount++;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
// If more than one logging connector, then we need to add a multi connector
|
|
340
|
+
// and set it as the default one
|
|
341
|
+
if (additionalConnectorCount > 1) {
|
|
342
|
+
coreConfig.types.loggingConnector.push({
|
|
343
|
+
type: LoggingConnectorType.Multi,
|
|
344
|
+
options: {
|
|
345
|
+
loggingConnectorTypes
|
|
346
|
+
},
|
|
347
|
+
isDefault: true
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
else if (additionalConnectorCount > 0) {
|
|
351
|
+
// If only one connector, then we set it as the default one
|
|
352
|
+
coreConfig.types.loggingConnector[coreConfig.types.loggingConnector.length - 1].isDefault =
|
|
353
|
+
true;
|
|
354
|
+
}
|
|
355
|
+
if (additionalConnectorCount > 0) {
|
|
356
|
+
coreConfig.types.loggingComponent ??= [];
|
|
357
|
+
// We set the isDefault flag so that other components will get this service by default
|
|
358
|
+
// and not the generic one from the engine core
|
|
359
|
+
coreConfig.types.loggingComponent.push({ type: LoggingComponentType.Service, isDefault: true });
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Configures the vault.
|
|
364
|
+
* @param coreConfig The core config.
|
|
365
|
+
* @param envVars The environment variables.
|
|
366
|
+
*/
|
|
367
|
+
async function configureVault(coreConfig, envVars) {
|
|
368
|
+
coreConfig.types.vaultConnector ??= [];
|
|
369
|
+
if (envVars.vaultConnector === VaultConnectorType.EntityStorage) {
|
|
370
|
+
coreConfig.types.vaultConnector.push({
|
|
371
|
+
type: VaultConnectorType.EntityStorage
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
else if (envVars.vaultConnector === VaultConnectorType.Hashicorp) {
|
|
375
|
+
coreConfig.types.vaultConnector.push({
|
|
376
|
+
type: VaultConnectorType.Hashicorp,
|
|
377
|
+
options: {
|
|
378
|
+
config: {
|
|
379
|
+
endpoint: envVars.hashicorpVaultEndpoint ?? "",
|
|
380
|
+
token: envVars.hashicorpVaultToken ?? ""
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Configures the background task.
|
|
388
|
+
* @param coreConfig The core config.
|
|
389
|
+
* @param envVars The environment variables.
|
|
390
|
+
*/
|
|
391
|
+
async function configureBackgroundTask(coreConfig, envVars) {
|
|
392
|
+
coreConfig.types.backgroundTaskConnector ??= [];
|
|
393
|
+
if (envVars.backgroundTaskConnector === BackgroundTaskConnectorType.EntityStorage) {
|
|
394
|
+
coreConfig.types.backgroundTaskConnector.push({
|
|
395
|
+
type: BackgroundTaskConnectorType.EntityStorage
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Configures the event bud.
|
|
401
|
+
* @param coreConfig The core config.
|
|
402
|
+
* @param envVars The environment variables.
|
|
403
|
+
*/
|
|
404
|
+
async function configureEventBus(coreConfig, envVars) {
|
|
405
|
+
coreConfig.types.eventBusConnector ??= [];
|
|
406
|
+
if (envVars.eventBusConnector === EventBusConnectorType.Local) {
|
|
407
|
+
coreConfig.types.eventBusConnector.push({
|
|
408
|
+
type: EventBusConnectorType.Local
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
if (coreConfig.types.eventBusConnector.length > 0) {
|
|
412
|
+
coreConfig.types.eventBusComponent ??= [];
|
|
413
|
+
coreConfig.types.eventBusComponent.push({ type: EventBusComponentType.Service });
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Configures the telemetry.
|
|
418
|
+
* @param coreConfig The core config.
|
|
419
|
+
* @param envVars The environment variables.
|
|
420
|
+
*/
|
|
421
|
+
async function configureTelemetry(coreConfig, envVars) {
|
|
422
|
+
coreConfig.types.telemetryConnector ??= [];
|
|
423
|
+
if (envVars.telemetryConnector === TelemetryConnectorType.EntityStorage) {
|
|
424
|
+
coreConfig.types.telemetryConnector.push({
|
|
425
|
+
type: TelemetryConnectorType.EntityStorage
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
if (coreConfig.types.telemetryConnector.length > 0) {
|
|
429
|
+
coreConfig.types.telemetryComponent ??= [];
|
|
430
|
+
coreConfig.types.telemetryComponent.push({ type: TelemetryComponentType.Service });
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Configures the tenant.
|
|
435
|
+
* @param coreConfig The core config.
|
|
436
|
+
* @param envVars The environment variables.
|
|
437
|
+
*/
|
|
438
|
+
async function configureTenant(coreConfig, envVars) {
|
|
439
|
+
if (Coerce.boolean(envVars.tenantEnabled) ?? false) {
|
|
440
|
+
coreConfig.types.tenantAdminComponent ??= [];
|
|
441
|
+
coreConfig.types.tenantAdminComponent.push({
|
|
442
|
+
type: TenantAdminComponentType.Service
|
|
443
|
+
});
|
|
444
|
+
coreConfig.types.tenantComponent ??= [];
|
|
445
|
+
coreConfig.types.tenantComponent.push({ type: TenantAdminComponentType.Service });
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Configures the messaging.
|
|
450
|
+
* @param coreConfig The core config.
|
|
451
|
+
* @param envVars The environment variables.
|
|
452
|
+
*/
|
|
453
|
+
async function configureMessaging(coreConfig, envVars) {
|
|
454
|
+
if (Coerce.boolean(envVars.messagingEnabled) ?? false) {
|
|
455
|
+
coreConfig.types.messagingEmailConnector ??= [];
|
|
456
|
+
coreConfig.types.messagingSmsConnector ??= [];
|
|
457
|
+
coreConfig.types.messagingPushNotificationConnector ??= [];
|
|
458
|
+
if (envVars.messagingEmailConnector === MessagingEmailConnectorType.EntityStorage) {
|
|
459
|
+
coreConfig.types.messagingEmailConnector.push({
|
|
460
|
+
type: MessagingEmailConnectorType.EntityStorage
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
else if (envVars.messagingEmailConnector === MessagingEmailConnectorType.Aws) {
|
|
464
|
+
coreConfig.types.messagingEmailConnector.push({
|
|
465
|
+
type: MessagingEmailConnectorType.Aws,
|
|
466
|
+
options: {
|
|
467
|
+
config: {
|
|
468
|
+
region: envVars.awsSesRegion ?? "",
|
|
469
|
+
authMode: envVars.awsSesAuthMode,
|
|
470
|
+
accessKeyId: envVars.awsSesAccessKeyId,
|
|
471
|
+
secretAccessKey: envVars.awsSesSecretAccessKey,
|
|
472
|
+
endpoint: envVars.awsSesEndpoint
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
if (envVars.messagingSmsConnector === MessagingSmsConnectorType.EntityStorage) {
|
|
478
|
+
coreConfig.types.messagingSmsConnector.push({
|
|
479
|
+
type: MessagingSmsConnectorType.EntityStorage
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
else if (envVars.messagingSmsConnector === MessagingSmsConnectorType.Aws) {
|
|
483
|
+
coreConfig.types.messagingSmsConnector.push({
|
|
484
|
+
type: MessagingSmsConnectorType.Aws,
|
|
485
|
+
options: {
|
|
486
|
+
config: {
|
|
487
|
+
region: envVars.awsSesRegion ?? "",
|
|
488
|
+
authMode: envVars.awsSesAuthMode,
|
|
489
|
+
accessKeyId: envVars.awsSesAccessKeyId,
|
|
490
|
+
secretAccessKey: envVars.awsSesSecretAccessKey,
|
|
491
|
+
endpoint: envVars.awsSesEndpoint
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
if (envVars.messagingPushNotificationConnector ===
|
|
497
|
+
MessagingPushNotificationConnectorType.EntityStorage) {
|
|
498
|
+
coreConfig.types.messagingPushNotificationConnector.push({
|
|
499
|
+
type: MessagingPushNotificationConnectorType.EntityStorage
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
else if (envVars.messagingPushNotificationConnector === MessagingPushNotificationConnectorType.Aws) {
|
|
503
|
+
coreConfig.types.messagingPushNotificationConnector.push({
|
|
504
|
+
type: MessagingPushNotificationConnectorType.Aws,
|
|
505
|
+
options: {
|
|
506
|
+
config: {
|
|
507
|
+
region: envVars.awsSesRegion ?? "",
|
|
508
|
+
authMode: envVars.awsSesAuthMode,
|
|
509
|
+
accessKeyId: envVars.awsSesAccessKeyId,
|
|
510
|
+
secretAccessKey: envVars.awsSesSecretAccessKey,
|
|
511
|
+
endpoint: envVars.awsSesEndpoint,
|
|
512
|
+
applicationsSettings: Is.json(envVars.awsMessagingPushNotificationApplications)
|
|
513
|
+
? JSON.parse(envVars.awsMessagingPushNotificationApplications)
|
|
514
|
+
: []
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
coreConfig.types.messagingAdminComponent ??= [];
|
|
520
|
+
coreConfig.types.messagingAdminComponent.push({
|
|
521
|
+
type: MessagingAdminComponentType.Service
|
|
522
|
+
});
|
|
523
|
+
coreConfig.types.messagingComponent ??= [];
|
|
524
|
+
coreConfig.types.messagingComponent.push({ type: MessagingComponentType.Service });
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Configures the faucet.
|
|
529
|
+
* @param coreConfig The core config.
|
|
530
|
+
* @param envVars The environment variables.
|
|
531
|
+
*/
|
|
532
|
+
async function configureFaucet(coreConfig, envVars) {
|
|
533
|
+
coreConfig.types.faucetConnector ??= [];
|
|
534
|
+
if (envVars.faucetConnector === FaucetConnectorType.EntityStorage) {
|
|
535
|
+
coreConfig.types.faucetConnector.push({
|
|
536
|
+
type: FaucetConnectorType.EntityStorage
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
else if (envVars.faucetConnector === FaucetConnectorType.Iota) {
|
|
540
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
541
|
+
coreConfig.types.faucetConnector.push({
|
|
542
|
+
type: FaucetConnectorType.Iota,
|
|
543
|
+
options: {
|
|
544
|
+
config: {
|
|
545
|
+
endpoint: envVars.iotaFaucetEndpoint ?? "",
|
|
546
|
+
clientOptions: dltConfig?.options?.config?.clientOptions ?? { url: "" },
|
|
547
|
+
network: dltConfig?.options?.config?.network ?? ""
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Configures the wallet.
|
|
555
|
+
* @param coreConfig The core config.
|
|
556
|
+
* @param envVars The environment variables.
|
|
557
|
+
*/
|
|
558
|
+
async function configureWallet(coreConfig, envVars) {
|
|
559
|
+
coreConfig.types.walletConnector ??= [];
|
|
560
|
+
if (envVars.walletConnector === WalletConnectorType.EntityStorage) {
|
|
561
|
+
coreConfig.types.walletConnector.push({
|
|
562
|
+
type: WalletConnectorType.EntityStorage
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
else if (envVars.walletConnector === WalletConnectorType.Iota) {
|
|
566
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
567
|
+
coreConfig.types.walletConnector.push({
|
|
568
|
+
type: WalletConnectorType.Iota,
|
|
569
|
+
options: {
|
|
570
|
+
config: dltConfig?.options?.config ?? {}
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Configures the NFT.
|
|
577
|
+
* @param coreConfig The core config.
|
|
578
|
+
* @param envVars The environment variables.
|
|
579
|
+
*/
|
|
580
|
+
async function configureNft(coreConfig, envVars) {
|
|
581
|
+
coreConfig.types.nftConnector ??= [];
|
|
582
|
+
if (envVars.nftConnector === NftConnectorType.EntityStorage) {
|
|
583
|
+
coreConfig.types.nftConnector.push({
|
|
584
|
+
type: NftConnectorType.EntityStorage
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
else if (envVars.nftConnector === NftConnectorType.Iota) {
|
|
588
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
589
|
+
coreConfig.types.nftConnector.push({
|
|
590
|
+
type: NftConnectorType.Iota,
|
|
591
|
+
options: {
|
|
592
|
+
config: dltConfig?.options?.config ?? {}
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
if (coreConfig.types.nftConnector.length > 0) {
|
|
597
|
+
coreConfig.types.nftComponent ??= [];
|
|
598
|
+
coreConfig.types.nftComponent.push({ type: NftComponentType.Service });
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Configures the verifiable storage.
|
|
603
|
+
* @param coreConfig The core config.
|
|
604
|
+
* @param envVars The environment variables.
|
|
605
|
+
*/
|
|
606
|
+
async function configureVerifiableStorage(coreConfig, envVars) {
|
|
607
|
+
coreConfig.types.verifiableStorageConnector ??= [];
|
|
608
|
+
if (envVars.verifiableStorageConnector === VerifiableStorageConnectorType.EntityStorage) {
|
|
609
|
+
coreConfig.types.verifiableStorageConnector.push({
|
|
610
|
+
type: VerifiableStorageConnectorType.EntityStorage
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
else if (envVars.verifiableStorageConnector === VerifiableStorageConnectorType.Iota) {
|
|
614
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
615
|
+
coreConfig.types.verifiableStorageConnector.push({
|
|
616
|
+
type: VerifiableStorageConnectorType.Iota,
|
|
617
|
+
options: {
|
|
618
|
+
config: dltConfig?.options?.config ?? {}
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
if (coreConfig.types.verifiableStorageConnector.length > 0) {
|
|
623
|
+
coreConfig.types.verifiableStorageComponent ??= [];
|
|
624
|
+
coreConfig.types.verifiableStorageComponent.push({
|
|
625
|
+
type: VerifiableStorageComponentType.Service
|
|
626
|
+
});
|
|
627
|
+
coreConfig.types.immutableProofComponent ??= [];
|
|
628
|
+
coreConfig.types.immutableProofComponent.push({
|
|
629
|
+
type: ImmutableProofComponentType.Service,
|
|
630
|
+
options: {
|
|
631
|
+
config: {
|
|
632
|
+
verificationMethodId: envVars.immutableProofVerificationMethodId ?? IMMUTABLE_PROOF_VERIFICATION_METHOD_ID
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Configures the identity.
|
|
640
|
+
* @param coreConfig The core config.
|
|
641
|
+
* @param envVars The environment variables.
|
|
642
|
+
*/
|
|
643
|
+
async function configureIdentity(coreConfig, envVars) {
|
|
644
|
+
coreConfig.types.identityConnector ??= [];
|
|
645
|
+
if (envVars.identityConnector === IdentityConnectorType.EntityStorage) {
|
|
646
|
+
coreConfig.types.identityConnector.push({
|
|
647
|
+
type: IdentityConnectorType.EntityStorage
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
else if (envVars.identityConnector === IdentityConnectorType.Iota) {
|
|
651
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
652
|
+
coreConfig.types.identityConnector.push({
|
|
653
|
+
type: IdentityConnectorType.Iota,
|
|
654
|
+
options: {
|
|
655
|
+
config: dltConfig?.options?.config ?? {}
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
if (coreConfig.types.identityConnector.length > 0) {
|
|
660
|
+
coreConfig.types.identityComponent ??= [];
|
|
661
|
+
coreConfig.types.identityComponent.push({ type: IdentityComponentType.Service });
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Configures the identity resolver.
|
|
666
|
+
* @param coreConfig The core config.
|
|
667
|
+
* @param envVars The environment variables.
|
|
668
|
+
*/
|
|
669
|
+
async function configureIdentityResolver(coreConfig, envVars) {
|
|
670
|
+
coreConfig.types.identityResolverConnector ??= [];
|
|
671
|
+
if (envVars.identityResolverConnector === IdentityResolverConnectorType.EntityStorage) {
|
|
672
|
+
coreConfig.types.identityResolverConnector.push({
|
|
673
|
+
type: IdentityResolverConnectorType.EntityStorage
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.Iota) {
|
|
677
|
+
const dltConfig = EngineTypeHelper.getConfigOfType(coreConfig, "dltConfig", DltConfigType.Iota);
|
|
678
|
+
coreConfig.types.identityResolverConnector.push({
|
|
679
|
+
type: IdentityResolverConnectorType.Iota,
|
|
680
|
+
options: {
|
|
681
|
+
config: dltConfig?.options?.config ?? {}
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.Universal) {
|
|
686
|
+
coreConfig.types.identityResolverConnector.push({
|
|
687
|
+
type: IdentityResolverConnectorType.Universal,
|
|
688
|
+
options: {
|
|
689
|
+
config: {
|
|
690
|
+
endpoint: envVars.universalResolverEndpoint ?? ""
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
if (coreConfig.types.identityResolverConnector.length > 0) {
|
|
696
|
+
coreConfig.types.identityResolverComponent ??= [];
|
|
697
|
+
coreConfig.types.identityResolverComponent.push({
|
|
698
|
+
type: IdentityResolverComponentType.Service
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Configures the identity profile.
|
|
704
|
+
* @param coreConfig The core config.
|
|
705
|
+
* @param envVars The environment variables.
|
|
706
|
+
*/
|
|
707
|
+
async function configureIdentityProfile(coreConfig, envVars) {
|
|
708
|
+
coreConfig.types.identityProfileConnector ??= [];
|
|
709
|
+
if (envVars.identityProfileConnector === IdentityConnectorType.EntityStorage) {
|
|
710
|
+
coreConfig.types.identityProfileConnector.push({
|
|
711
|
+
type: IdentityProfileConnectorType.EntityStorage
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
if (coreConfig.types.identityProfileConnector.length > 0) {
|
|
715
|
+
coreConfig.types.identityProfileComponent ??= [];
|
|
716
|
+
coreConfig.types.identityProfileComponent.push({ type: IdentityProfileComponentType.Service });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Configures the attestation.
|
|
721
|
+
* @param coreConfig The core config.
|
|
722
|
+
* @param envVars The environment variables.
|
|
723
|
+
*/
|
|
724
|
+
async function configureAttestation(coreConfig, envVars) {
|
|
725
|
+
coreConfig.types.attestationConnector ??= [];
|
|
726
|
+
if (envVars.attestationConnector === AttestationConnectorType.Nft) {
|
|
727
|
+
coreConfig.types.attestationConnector.push({
|
|
728
|
+
type: AttestationConnectorType.Nft
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
if (coreConfig.types.attestationConnector.length > 0) {
|
|
732
|
+
coreConfig.types.attestationComponent ??= [];
|
|
733
|
+
coreConfig.types.attestationComponent.push({
|
|
734
|
+
type: AttestationComponentType.Service,
|
|
735
|
+
options: {
|
|
736
|
+
config: {
|
|
737
|
+
verificationMethodId: envVars.attestationVerificationMethodId ?? ATTESTATION_VERIFICATION_METHOD_ID
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Configures the auditable item graph.
|
|
745
|
+
* @param coreConfig The core config.
|
|
746
|
+
* @param envVars The environment variables.
|
|
747
|
+
*/
|
|
748
|
+
async function configureAuditableItemGraph(coreConfig, envVars) {
|
|
749
|
+
if (Coerce.boolean(envVars.auditableItemGraphEnabled) ?? false) {
|
|
750
|
+
coreConfig.types.auditableItemGraphComponent ??= [];
|
|
751
|
+
coreConfig.types.auditableItemGraphComponent.push({
|
|
752
|
+
type: AuditableItemGraphComponentType.Service
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Configures the auditable item stream.
|
|
758
|
+
* @param coreConfig The core config.
|
|
759
|
+
* @param envVars The environment variables.
|
|
760
|
+
*/
|
|
761
|
+
async function configureAuditableItemStream(coreConfig, envVars) {
|
|
762
|
+
if (Coerce.boolean(envVars.auditableItemStreamEnabled) ?? false) {
|
|
763
|
+
coreConfig.types.auditableItemStreamComponent ??= [];
|
|
764
|
+
coreConfig.types.auditableItemStreamComponent.push({
|
|
765
|
+
type: AuditableItemStreamComponentType.Service
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Configures the data processing.
|
|
771
|
+
* @param coreConfig The core config.
|
|
772
|
+
* @param envVars The environment variables.
|
|
773
|
+
*/
|
|
774
|
+
async function configureDataProcessing(coreConfig, envVars) {
|
|
775
|
+
if (Coerce.boolean(envVars.dataProcessingEnabled) ?? false) {
|
|
776
|
+
coreConfig.types.dataProcessingComponent ??= [];
|
|
777
|
+
coreConfig.types.dataProcessingComponent.push({ type: DataProcessingComponentType.Service });
|
|
778
|
+
coreConfig.types.dataConverterConnector ??= [];
|
|
779
|
+
const converterConnectors = envVars.dataConverterConnectors?.split(",") ?? [];
|
|
780
|
+
for (const converterConnector of converterConnectors) {
|
|
781
|
+
if (converterConnector === DataConverterConnectorType.Json) {
|
|
782
|
+
coreConfig.types.dataConverterConnector.push({
|
|
783
|
+
type: DataConverterConnectorType.Json
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
else if (converterConnector === DataConverterConnectorType.Xml) {
|
|
787
|
+
coreConfig.types.dataConverterConnector.push({
|
|
788
|
+
type: DataConverterConnectorType.Xml
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
coreConfig.types.dataExtractorConnector ??= [];
|
|
793
|
+
const extractorConnectors = envVars.dataExtractorConnectors?.split(",") ?? [];
|
|
794
|
+
for (const extractorConnector of extractorConnectors) {
|
|
795
|
+
if (extractorConnector === DataExtractorConnectorType.JsonPath) {
|
|
796
|
+
coreConfig.types.dataExtractorConnector.push({
|
|
797
|
+
type: DataExtractorConnectorType.JsonPath
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Configures the document management.
|
|
805
|
+
* @param coreConfig The core config.
|
|
806
|
+
* @param envVars The environment variables.
|
|
807
|
+
*/
|
|
808
|
+
async function configureDocumentManagement(coreConfig, envVars) {
|
|
809
|
+
if (Coerce.boolean(envVars.documentManagementEnabled) ?? false) {
|
|
810
|
+
coreConfig.types.documentManagementComponent ??= [];
|
|
811
|
+
coreConfig.types.documentManagementComponent.push({
|
|
812
|
+
type: DocumentManagementComponentType.Service
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Configures the verifiable credential authentication.
|
|
818
|
+
* @param coreConfig The core config.
|
|
819
|
+
* @param envVars The environment variables.
|
|
820
|
+
*/
|
|
821
|
+
async function configureVerifiableCredentialAuthentication(coreConfig, envVars) {
|
|
822
|
+
if (Coerce.boolean(envVars.vcAuthenticationEnabled) ?? false) {
|
|
823
|
+
// Can only perform VC authentication if identity component is available
|
|
824
|
+
coreConfig.types.authenticationGeneratorComponent ??= [];
|
|
825
|
+
coreConfig.types.authenticationGeneratorComponent.push({
|
|
826
|
+
type: AuthenticationGeneratorComponentType.VerifiableCredential,
|
|
827
|
+
options: {
|
|
828
|
+
config: {
|
|
829
|
+
verificationMethodId: envVars.vcAuthenticationVerificationMethodId ?? VC_AUTHENTICATION_VERIFICATION_METHOD_ID
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
features: ["verifiable-credential"]
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Configures the rights management.
|
|
838
|
+
* @param coreConfig The core config.
|
|
839
|
+
* @param envVars The environment variables.
|
|
840
|
+
*/
|
|
841
|
+
async function configureRightsManagement(coreConfig, envVars) {
|
|
842
|
+
if (Coerce.boolean(envVars.rightsManagementEnabled) ?? false) {
|
|
843
|
+
coreConfig.types.rightsManagementPapComponent ??= [];
|
|
844
|
+
coreConfig.types.rightsManagementPapComponent.push({
|
|
845
|
+
type: RightsManagementPapComponentType.Service
|
|
846
|
+
});
|
|
847
|
+
coreConfig.types.rightsManagementPmpComponent ??= [];
|
|
848
|
+
coreConfig.types.rightsManagementPmpComponent.push({
|
|
849
|
+
type: RightsManagementPmpComponentType.Service
|
|
850
|
+
});
|
|
851
|
+
coreConfig.types.rightsManagementPipComponent ??= [];
|
|
852
|
+
coreConfig.types.rightsManagementPipComponent.push({
|
|
853
|
+
type: RightsManagementPipComponentType.Service,
|
|
854
|
+
options: {
|
|
855
|
+
informationModulesConfig: Is.arrayValue(envVars.rightsManagementInformationSources)
|
|
856
|
+
? envVars.rightsManagementInformationSources
|
|
857
|
+
: undefined
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
coreConfig.types.rightsManagementPxpComponent ??= [];
|
|
861
|
+
coreConfig.types.rightsManagementPxpComponent.push({
|
|
862
|
+
type: RightsManagementPxpComponentType.Service,
|
|
863
|
+
options: {
|
|
864
|
+
actionModulesConfig: Is.arrayValue(envVars.rightsManagementExecutionActions)
|
|
865
|
+
? envVars.rightsManagementExecutionActions
|
|
866
|
+
: undefined
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
coreConfig.types.rightsManagementPdpComponent ??= [];
|
|
870
|
+
coreConfig.types.rightsManagementPdpComponent.push({
|
|
871
|
+
type: RightsManagementPdpComponentType.Service,
|
|
872
|
+
options: {
|
|
873
|
+
arbiterModulesConfig: Is.arrayValue(envVars.rightsManagementArbiters)
|
|
874
|
+
? envVars.rightsManagementArbiters
|
|
875
|
+
: undefined
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
coreConfig.types.rightsManagementPepComponent ??= [];
|
|
879
|
+
coreConfig.types.rightsManagementPepComponent.push({
|
|
880
|
+
type: RightsManagementPepComponentType.Service,
|
|
881
|
+
options: {
|
|
882
|
+
processorModulesConfig: Is.arrayValue(envVars.rightsManagementEnforcementProcessors)
|
|
883
|
+
? envVars.rightsManagementEnforcementProcessors
|
|
884
|
+
: undefined
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
coreConfig.types.rightsManagementPnpComponent ??= [];
|
|
888
|
+
coreConfig.types.rightsManagementPnpComponent.push({
|
|
889
|
+
type: RightsManagementPnpComponentType.Service,
|
|
890
|
+
options: {
|
|
891
|
+
negotiatorModulesConfig: Is.arrayValue(envVars.rightsManagementNegotiators)
|
|
892
|
+
? envVars.rightsManagementNegotiators
|
|
893
|
+
: undefined,
|
|
894
|
+
requesterModulesConfig: Is.arrayValue(envVars.rightsManagementRequesters)
|
|
895
|
+
? envVars.rightsManagementRequesters
|
|
896
|
+
: undefined,
|
|
897
|
+
config: {
|
|
898
|
+
baseCallbackUrl: envVars.rightsManagementBaseCallbackUrl ?? "",
|
|
899
|
+
offers: Is.arrayValue(envVars.rightsManagementOffers)
|
|
900
|
+
? envVars.rightsManagementOffers
|
|
901
|
+
: [],
|
|
902
|
+
negotiationComponentCreator: async (url) => new PolicyNegotiationPointRestClient({ endpoint: url })
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
coreConfig.types.rightsManagementPnapComponent ??= [];
|
|
907
|
+
coreConfig.types.rightsManagementPnapComponent.push({
|
|
908
|
+
type: RightsManagementPnapComponentType.Service
|
|
909
|
+
});
|
|
910
|
+
coreConfig.types.rightsManagementDapComponent ??= [];
|
|
911
|
+
coreConfig.types.rightsManagementDapComponent.push({
|
|
912
|
+
type: RightsManagementDapComponentType.Service
|
|
913
|
+
});
|
|
914
|
+
coreConfig.types.rightsManagementDarpComponent ??= [];
|
|
915
|
+
coreConfig.types.rightsManagementDarpComponent.push({
|
|
916
|
+
type: RightsManagementDarpComponentType.Service,
|
|
917
|
+
options: {
|
|
918
|
+
config: {
|
|
919
|
+
dataAccessComponentCreator: async (url) => new DataAccessPointRestClient({ endpoint: url })
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Configures the task scheduler.
|
|
927
|
+
* @param coreConfig The core config.
|
|
928
|
+
* @param envVars The environment variables.
|
|
929
|
+
*/
|
|
930
|
+
async function configureTaskScheduler(coreConfig, envVars) {
|
|
931
|
+
if (Coerce.boolean(envVars.taskSchedulerEnabled) ?? false) {
|
|
932
|
+
coreConfig.types.taskSchedulerComponent ??= [];
|
|
933
|
+
coreConfig.types.taskSchedulerComponent.push({
|
|
934
|
+
type: TaskSchedulerComponentType.Service
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Configures the synchronised storage.
|
|
940
|
+
* @param coreConfig The core config.
|
|
941
|
+
* @param envVars The environment variables.
|
|
942
|
+
*/
|
|
943
|
+
async function configureSynchronisedStorage(coreConfig, envVars) {
|
|
944
|
+
if (Is.arrayValue(coreConfig.types.identityResolverComponent) &&
|
|
945
|
+
(Coerce.boolean(envVars.synchronisedStorageEnabled) ?? false)) {
|
|
946
|
+
// Check if the config provides a custom verifiable storage key id
|
|
947
|
+
let verifiableStorageKeyId = Coerce.string(envVars.synchronisedStorageVerifiableStorageKeyId);
|
|
948
|
+
if (!Is.stringValue(verifiableStorageKeyId)) {
|
|
949
|
+
// No custom key so default to the network setting
|
|
950
|
+
verifiableStorageKeyId = envVars.iotaNetwork;
|
|
951
|
+
}
|
|
952
|
+
coreConfig.types.synchronisedStorageComponent ??= [];
|
|
953
|
+
coreConfig.types.synchronisedStorageComponent.push({
|
|
954
|
+
type: SynchronisedStorageComponentType.Service,
|
|
955
|
+
options: {
|
|
956
|
+
config: {
|
|
957
|
+
verifiableStorageKeyId: verifiableStorageKeyId ?? "",
|
|
958
|
+
blobStorageEncryptionKeyId: envVars.synchronisedStorageBlobStorageEncryptionKeyId ??
|
|
959
|
+
SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID,
|
|
960
|
+
entityUpdateIntervalMinutes: Coerce.number(envVars.synchronisedStorageEntityUpdateIntervalMinutes),
|
|
961
|
+
consolidationIntervalMinutes: Coerce.number(envVars.synchronisedStorageConsolidationIntervalMinutes),
|
|
962
|
+
consolidationBatchSize: Coerce.number(envVars.synchronisedStorageConsolidationBatchSize),
|
|
963
|
+
maxConsolidations: Coerce.number(envVars.synchronisedStorageMaxConsolidations)
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
// If there is a trusted url set, we need to add a client
|
|
968
|
+
// and give it a feature of trusted so that when the synchronised
|
|
969
|
+
// storage is created it can pickup the correct component
|
|
970
|
+
if (Is.stringValue(envVars.synchronisedStorageTrustedUrl)) {
|
|
971
|
+
coreConfig.types.synchronisedStorageComponent.push({
|
|
972
|
+
type: SynchronisedStorageComponentType.RestClient,
|
|
973
|
+
options: {
|
|
974
|
+
endpoint: envVars.synchronisedStorageTrustedUrl
|
|
975
|
+
},
|
|
976
|
+
features: ["trusted"]
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Configures the federated catalogue.
|
|
983
|
+
* @param coreConfig The core config.
|
|
984
|
+
* @param envVars The environment variables.
|
|
985
|
+
*/
|
|
986
|
+
async function configureFederatedCatalogue(coreConfig, envVars) {
|
|
987
|
+
if (Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false) {
|
|
988
|
+
coreConfig.types.federatedCatalogueComponent ??= [];
|
|
989
|
+
coreConfig.types.federatedCatalogueComponent.push({
|
|
990
|
+
type: FederatedCatalogueComponentType.Service,
|
|
991
|
+
options: {
|
|
992
|
+
config: {
|
|
993
|
+
subResourceCacheTtlMs: Coerce.number(envVars.federatedCatalogueCacheTtlMs),
|
|
994
|
+
clearingHouseApproverList: Coerce.object(envVars.federatedCatalogueClearingHouseApproverList) ?? []
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Configures the data space connector.
|
|
1002
|
+
* @param coreConfig The core config.
|
|
1003
|
+
* @param envVars The environment variables.
|
|
1004
|
+
*/
|
|
1005
|
+
async function configureDataSpaceConnector(coreConfig, envVars) {
|
|
1006
|
+
if (Coerce.boolean(envVars.dataSpaceConnectorEnabled) ?? false) {
|
|
1007
|
+
coreConfig.types.dataSpaceConnectorComponent ??= [];
|
|
1008
|
+
coreConfig.types.dataSpaceConnectorComponent.push({
|
|
1009
|
+
type: DataSpaceConnectorComponentType.Service,
|
|
1010
|
+
options: {
|
|
1011
|
+
config: {
|
|
1012
|
+
retainActivityLogsFor: Coerce.number(envVars.dataSpaceConnectorRetainActivityLogsFor),
|
|
1013
|
+
activityLogsCleanUpInterval: Coerce.number(envVars.dataSpaceConnectorActivityLogsCleanUpInterval)
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Configures the DLT.
|
|
1021
|
+
* @param coreConfig The core config.
|
|
1022
|
+
* @param envVars The environment variables.
|
|
1023
|
+
*/
|
|
1024
|
+
async function configureDlt(coreConfig, envVars) {
|
|
1025
|
+
// Create centralized DLT configuration for IOTA if essential IOTA variables are set
|
|
1026
|
+
if (Is.stringValue(envVars.iotaNodeEndpoint) && Is.stringValue(envVars.iotaNetwork)) {
|
|
1027
|
+
coreConfig.types.dltConfig ??= [];
|
|
1028
|
+
const gasStationConfig = Is.stringValue(envVars.iotaGasStationEndpoint) &&
|
|
1029
|
+
Is.stringValue(envVars.iotaGasStationAuthToken)
|
|
1030
|
+
? {
|
|
1031
|
+
gasStationUrl: envVars.iotaGasStationEndpoint,
|
|
1032
|
+
gasStationAuthToken: envVars.iotaGasStationAuthToken
|
|
1033
|
+
}
|
|
1034
|
+
: undefined;
|
|
1035
|
+
coreConfig.types.dltConfig.push({
|
|
1036
|
+
type: DltConfigType.Iota,
|
|
1037
|
+
isDefault: true,
|
|
1038
|
+
options: {
|
|
1039
|
+
config: {
|
|
1040
|
+
clientOptions: {
|
|
1041
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
1042
|
+
},
|
|
1043
|
+
network: envVars.iotaNetwork ?? "",
|
|
1044
|
+
coinType: Coerce.number(envVars.iotaCoinType),
|
|
1045
|
+
gasStation: gasStationConfig
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
//# sourceMappingURL=engineEnvBuilder.js.map
|