@twin.org/node-core 0.0.3-next.5 → 0.0.3-next.50
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 +3 -1
- package/dist/es/builders/engineEnvBuilder.js +463 -195
- package/dist/es/builders/engineEnvBuilder.js.map +1 -1
- package/dist/es/builders/engineServerEnvBuilder.js +89 -32
- package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
- package/dist/es/builders/extensionsBuilder.js.map +1 -1
- package/dist/es/cli.js +247 -0
- package/dist/es/cli.js.map +1 -0
- package/dist/es/commands/bootstrapLegacy.js +178 -0
- package/dist/es/commands/bootstrapLegacy.js.map +1 -0
- package/dist/es/commands/help.js +85 -0
- package/dist/es/commands/help.js.map +1 -0
- package/dist/es/commands/identityCreate.js +326 -0
- package/dist/es/commands/identityCreate.js.map +1 -0
- package/dist/es/commands/identityImports.js +81 -0
- package/dist/es/commands/identityImports.js.map +1 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js +145 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodCreate.js +227 -0
- package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodImport.js +125 -0
- package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
- package/dist/es/commands/nodeSetIdentity.js +63 -0
- package/dist/es/commands/nodeSetIdentity.js.map +1 -0
- package/dist/es/commands/tenantCreate.js +137 -0
- package/dist/es/commands/tenantCreate.js.map +1 -0
- package/dist/es/commands/tenantImport.js +95 -0
- package/dist/es/commands/tenantImport.js.map +1 -0
- package/dist/es/commands/tenantToken.js +97 -0
- package/dist/es/commands/tenantToken.js.map +1 -0
- package/dist/es/commands/tenantUpdate.js +93 -0
- package/dist/es/commands/tenantUpdate.js.map +1 -0
- package/dist/es/commands/userCreate.js +239 -0
- package/dist/es/commands/userCreate.js.map +1 -0
- package/dist/es/commands/userUpdate.js +154 -0
- package/dist/es/commands/userUpdate.js.map +1 -0
- package/dist/es/commands/vaultKeyCreate.js +190 -0
- package/dist/es/commands/vaultKeyCreate.js.map +1 -0
- package/dist/es/commands/vaultKeyImport.js +103 -0
- package/dist/es/commands/vaultKeyImport.js.map +1 -0
- package/dist/es/defaults.js +18 -2
- package/dist/es/defaults.js.map +1 -1
- package/dist/es/index.js +11 -4
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/ICliArgs.js +4 -0
- package/dist/es/models/ICliArgs.js.map +1 -0
- package/dist/es/models/ICliCommand.js +2 -0
- package/dist/es/models/ICliCommand.js.map +1 -0
- package/dist/es/models/ICliCommandDefinition.js +2 -0
- package/dist/es/models/ICliCommandDefinition.js.map +1 -0
- package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
- package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
- package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
- package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
- package/dist/es/models/INodeEngineState.js.map +1 -1
- package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
- package/dist/es/models/INodeOptions.js.map +1 -1
- package/dist/es/models/cliCommandParamType.js +4 -0
- package/dist/es/models/cliCommandParamType.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseEngineMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseEngineMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionShutdownMethod.js +4 -0
- package/dist/es/models/nodeExtensionShutdownMethod.js.map +1 -0
- package/dist/es/node.js +86 -39
- package/dist/es/node.js.map +1 -1
- package/dist/es/{server.js → start.js} +72 -27
- package/dist/es/start.js.map +1 -0
- package/dist/es/utils.js +21 -25
- package/dist/es/utils.js.map +1 -1
- package/dist/types/builders/engineEnvBuilder.d.ts +67 -1
- package/dist/types/builders/engineServerEnvBuilder.d.ts +11 -2
- package/dist/types/cli.d.ts +56 -0
- package/dist/types/commands/bootstrapLegacy.d.ts +66 -0
- package/dist/types/commands/help.d.ts +23 -0
- package/dist/types/commands/identityCreate.d.ts +39 -0
- package/dist/types/commands/identityImports.d.ts +24 -0
- package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
- package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
- package/dist/types/commands/identityVerificationMethodImport.d.ts +31 -0
- package/dist/types/commands/nodeSetIdentity.d.ts +22 -0
- package/dist/types/commands/tenantCreate.d.ts +38 -0
- package/dist/types/commands/tenantImport.d.ts +26 -0
- package/dist/types/commands/tenantToken.d.ts +28 -0
- package/dist/types/commands/tenantUpdate.d.ts +26 -0
- package/dist/types/commands/userCreate.d.ts +51 -0
- package/dist/types/commands/userUpdate.d.ts +40 -0
- package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
- package/dist/types/commands/vaultKeyImport.d.ts +28 -0
- package/dist/types/defaults.d.ts +10 -2
- package/dist/types/index.d.ts +11 -4
- package/dist/types/models/ICliArgs.d.ts +20 -0
- package/dist/types/models/ICliCommand.d.ts +17 -0
- package/dist/types/models/ICliCommandDefinition.d.ts +41 -0
- package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +125 -100
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +8 -0
- package/dist/types/models/INodeEngineState.d.ts +0 -12
- package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
- package/dist/types/models/INodeOptions.d.ts +6 -2
- package/dist/types/models/cliCommandParamType.d.ts +4 -0
- package/dist/types/models/nodeExtensionInitialiseEngineMethod.d.ts +7 -0
- package/dist/types/models/nodeExtensionInitialiseEngineServerMethod.d.ts +8 -0
- package/dist/types/models/nodeExtensionInitialiseMethod.d.ts +8 -0
- package/dist/types/models/nodeExtensionShutdownMethod.d.ts +5 -0
- package/dist/types/node.d.ts +5 -4
- package/dist/types/{server.d.ts → start.d.ts} +4 -2
- package/dist/types/utils.d.ts +6 -8
- package/docs/changelog.md +604 -178
- package/docs/examples.md +99 -1
- package/docs/reference/functions/buildConfiguration.md +1 -1
- package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
- package/docs/reference/functions/constructCliCommand.md +27 -0
- package/docs/reference/functions/executeCommand.md +29 -0
- package/docs/reference/functions/getEnvDefaults.md +19 -0
- package/docs/reference/functions/getScriptDirectory.md +19 -0
- package/docs/reference/functions/isAuthEntityStorageRequired.md +20 -0
- package/docs/reference/functions/isAutomationRequired.md +20 -0
- package/docs/reference/functions/isBackgroundTasksRequired.md +20 -0
- package/docs/reference/functions/isFederatedCatalogueRequired.md +20 -0
- package/docs/reference/functions/isImmutableProofRequired.md +20 -0
- package/docs/reference/functions/isRightsManagementRequired.md +23 -0
- package/docs/reference/functions/isTaskSchedulerRequired.md +20 -0
- package/docs/reference/functions/isTelemetryRequired.md +20 -0
- package/docs/reference/functions/isTrustRequired.md +20 -0
- package/docs/reference/functions/isUrlTransformerRequired.md +20 -0
- package/docs/reference/functions/parseCommandLineArgs.md +19 -0
- package/docs/reference/functions/processEnvOptions.md +27 -0
- package/docs/reference/functions/registerCommands.md +9 -0
- package/docs/reference/functions/resolvePackageEntryPoint.md +2 -2
- package/docs/reference/functions/run.md +8 -2
- package/docs/reference/functions/start.md +9 -3
- package/docs/reference/functions/substituteEnvOptions.md +25 -0
- package/docs/reference/index.md +26 -14
- package/docs/reference/interfaces/ICacheMetadata.md +3 -3
- package/docs/reference/interfaces/ICliArgs.md +35 -0
- package/docs/reference/interfaces/ICliCommand.md +23 -0
- package/docs/reference/interfaces/ICliCommandDefinition.md +87 -0
- package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +405 -372
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +527 -450
- package/docs/reference/interfaces/IModuleProtocol.md +3 -3
- package/docs/reference/interfaces/INodeEngineState.md +2 -26
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +545 -544
- package/docs/reference/interfaces/INodeOptions.md +44 -36
- package/docs/reference/interfaces/IProtocolHandlerResult.md +2 -2
- package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +1 -1
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +1 -1
- package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +1 -1
- package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +1 -1
- package/docs/reference/variables/ModuleProtocol.md +5 -5
- package/docs/reference/variables/TRUST_VERIFICATION_METHOD_ID.md +3 -0
- package/docs/reference/variables/URL_TRANSFORMER_ENCRYPTION_KEY_ID.md +3 -0
- package/locales/en.json +605 -30
- package/package.json +10 -6
- package/dist/es/bootstrap.js +0 -366
- package/dist/es/bootstrap.js.map +0 -1
- package/dist/es/identity.js +0 -182
- package/dist/es/identity.js.map +0 -1
- package/dist/es/models/nodeExtensionMethods.js +0 -2
- package/dist/es/models/nodeExtensionMethods.js.map +0 -1
- package/dist/es/models/nodeFeatures.js +0 -21
- package/dist/es/models/nodeFeatures.js.map +0 -1
- package/dist/es/server.js.map +0 -1
- package/dist/types/bootstrap.d.ts +0 -68
- package/dist/types/identity.d.ts +0 -14
- package/dist/types/models/nodeExtensionMethods.d.ts +0 -27
- package/dist/types/models/nodeFeatures.d.ts +0 -21
- package/docs/detailed-guide.md +0 -129
- package/docs/reference/functions/bootstrap.md +0 -29
- package/docs/reference/functions/bootstrapAuth.md +0 -35
- package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
- package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
- package/docs/reference/functions/bootstrapNodeAdminUser.md +0 -35
- package/docs/reference/functions/bootstrapNodeId.md +0 -35
- package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
- package/docs/reference/functions/bootstrapTenantId.md +0 -35
- package/docs/reference/functions/getFeatures.md +0 -19
- package/docs/reference/type-aliases/NodeFeatures.md +0 -5
- package/docs/reference/variables/NodeFeatures.md +0 -25
- package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +0 -3
- package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +0 -3
|
@@ -6,6 +6,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
6
6
|
* Start the engine in debug mode.
|
|
7
7
|
*/
|
|
8
8
|
debug?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Start the engine in silent mode.
|
|
11
|
+
*/
|
|
12
|
+
silent?: string;
|
|
9
13
|
/**
|
|
10
14
|
* The root directory for storing items like state file.
|
|
11
15
|
*/
|
|
@@ -15,17 +19,13 @@ export interface IEngineEnvironmentVariables {
|
|
|
15
19
|
*/
|
|
16
20
|
stateFilename?: string;
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Does the node have a unique ID, defaults to true.
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
nodeIdentityEnabled?: string;
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
tenantId?: string;
|
|
25
|
-
/**
|
|
26
|
-
* A tenant api key to use as a default for the node.
|
|
26
|
+
* Is multi-tenant support enabled, defaults to false.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
tenantEnabled?: string;
|
|
29
29
|
/**
|
|
30
30
|
* The type of the entity storage to create, comma separate for more than one connector.
|
|
31
31
|
* values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
|
|
@@ -192,10 +192,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
192
192
|
* The default blob storage connector to use, defaults to the first one in the list.
|
|
193
193
|
*/
|
|
194
194
|
blobStorageConnectorDefault?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Blog storage connector which has public access.
|
|
197
|
-
*/
|
|
198
|
-
blobStorageConnectorPublic?: string;
|
|
199
195
|
/**
|
|
200
196
|
* Enable encryption for the blob storage.
|
|
201
197
|
*/
|
|
@@ -204,11 +200,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
204
200
|
* The id of the encryption key for the blob storage.
|
|
205
201
|
*/
|
|
206
202
|
blobStorageEncryptionKeyId?: string;
|
|
207
|
-
/**
|
|
208
|
-
* A symmetric encryption key for the blob storage, should be ChaCha20Poly1305 in base64 format.
|
|
209
|
-
* If encryption is enabled but a key is not provided one will be generated.
|
|
210
|
-
*/
|
|
211
|
-
blobStorageSymmetricEncryptionKey?: string;
|
|
212
203
|
/**
|
|
213
204
|
* A prefix for all the blobs in blob-storage, can be empty.
|
|
214
205
|
*/
|
|
@@ -273,6 +264,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
273
264
|
* The type of the default vault connector: entity-storage, hashicorp.
|
|
274
265
|
*/
|
|
275
266
|
vaultConnector?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Prefix to prepend to entries in the vault.
|
|
269
|
+
*/
|
|
270
|
+
vaultPrefix?: string;
|
|
276
271
|
/**
|
|
277
272
|
* Hashicorp Vault token.
|
|
278
273
|
*/
|
|
@@ -285,10 +280,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
285
280
|
* The type of logging task connector, can be a comma separated list: console, entity-storage.
|
|
286
281
|
*/
|
|
287
282
|
loggingConnector?: string;
|
|
288
|
-
/**
|
|
289
|
-
* The type of background task connector: entity-storage.
|
|
290
|
-
*/
|
|
291
|
-
backgroundTaskConnector?: string;
|
|
292
283
|
/**
|
|
293
284
|
* The type of event bus connector: local.
|
|
294
285
|
*/
|
|
@@ -322,7 +313,7 @@ export interface IEngineEnvironmentVariables {
|
|
|
322
313
|
*/
|
|
323
314
|
awsSesEndpoint?: string;
|
|
324
315
|
/**
|
|
325
|
-
* The applications for the push notifications
|
|
316
|
+
* The applications for the push notifications reference a separate json with @json: prefix.
|
|
326
317
|
*/
|
|
327
318
|
awsMessagingPushNotificationApplications?: string;
|
|
328
319
|
/**
|
|
@@ -341,6 +332,34 @@ export interface IEngineEnvironmentVariables {
|
|
|
341
332
|
* The type of telemetry connector: entity-storage.
|
|
342
333
|
*/
|
|
343
334
|
telemetryConnector?: string;
|
|
335
|
+
/**
|
|
336
|
+
* The name of the Open Telemetry meter to use, only required if using open-telemetry as telemetry connector, defaults to twin-node.
|
|
337
|
+
*/
|
|
338
|
+
openTelemetryMeterName?: string;
|
|
339
|
+
/**
|
|
340
|
+
* The version of the Open Telemetry metrics specification to use, only required if using open-telemetry as telemetry connector, defaults to 1.0.0.
|
|
341
|
+
*/
|
|
342
|
+
openTelemetryMeterVersion?: string;
|
|
343
|
+
/**
|
|
344
|
+
* The type of Open Telemetry metric reader to use, only required if using open-telemetry as telemetry connector, values: prometheus.
|
|
345
|
+
*/
|
|
346
|
+
openTelemetryReader?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The port to use for the Open Telemetry Prometheus metrics server, only required if using open-telemetry as telemetry connector and prometheus as reader, defaults to 9464.
|
|
349
|
+
*/
|
|
350
|
+
openTelemetryPrometheusPort?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Polling interval in seconds for the telemetry metrics collector. Defaults to 60.
|
|
353
|
+
*/
|
|
354
|
+
telemetryMetricsCollectorIntervalSeconds?: string;
|
|
355
|
+
/**
|
|
356
|
+
* The type of telemetry metrics producers, can be a comma separated list: system, process.
|
|
357
|
+
*/
|
|
358
|
+
telemetryMetricsProducers?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Maximum number of values retained per telemetry metric (count-based history cap). Defaults to 1440.
|
|
361
|
+
*/
|
|
362
|
+
telemetryMetricsProducerMaxHistory?: string;
|
|
344
363
|
/**
|
|
345
364
|
* The type of faucet connector: entity-storage, iota.
|
|
346
365
|
*/
|
|
@@ -353,18 +372,26 @@ export interface IEngineEnvironmentVariables {
|
|
|
353
372
|
* The type of NFT connector: entity-storage, iota.
|
|
354
373
|
*/
|
|
355
374
|
nftConnector?: string;
|
|
375
|
+
/**
|
|
376
|
+
* The NFT deployed package id, for custom deployments.
|
|
377
|
+
*/
|
|
378
|
+
nftPackageId?: string;
|
|
379
|
+
/**
|
|
380
|
+
* The type of notarization connector: entity-storage, iota.
|
|
381
|
+
*/
|
|
382
|
+
notarizationConnector?: string;
|
|
356
383
|
/**
|
|
357
384
|
* The type of identity connector: entity-storage, iota.
|
|
358
385
|
*/
|
|
359
386
|
identityConnector?: string;
|
|
360
387
|
/**
|
|
361
|
-
* The
|
|
388
|
+
* The index of the wallet address to use, defaults to 0.
|
|
362
389
|
*/
|
|
363
|
-
|
|
390
|
+
identityWalletAddressIndex?: string;
|
|
364
391
|
/**
|
|
365
|
-
* The type of
|
|
392
|
+
* The type of identity resolver connector: entity-storage, iota.
|
|
366
393
|
*/
|
|
367
|
-
|
|
394
|
+
identityResolverConnector?: string;
|
|
368
395
|
/**
|
|
369
396
|
* IOTA Faucet Endpoint.
|
|
370
397
|
*/
|
|
@@ -393,6 +420,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
393
420
|
* IOTA Gas Station Authentication Token.
|
|
394
421
|
*/
|
|
395
422
|
iotaGasStationAuthToken?: string;
|
|
423
|
+
/**
|
|
424
|
+
* The IOTA Identity deployed package id, for custom deployments.
|
|
425
|
+
*/
|
|
426
|
+
iotaIdentityPackageId?: string;
|
|
396
427
|
/**
|
|
397
428
|
* Universal Resolver Endpoint.
|
|
398
429
|
*/
|
|
@@ -438,131 +469,125 @@ export interface IEngineEnvironmentVariables {
|
|
|
438
469
|
*/
|
|
439
470
|
documentManagementEnabled?: string;
|
|
440
471
|
/**
|
|
441
|
-
*
|
|
472
|
+
* Enable the federated catalogue, defaults to false, automatically enabled if remote endpoint, filters or dataspace is enabled.
|
|
442
473
|
*/
|
|
443
|
-
|
|
474
|
+
federatedCatalogueEnabled?: string;
|
|
444
475
|
/**
|
|
445
|
-
*
|
|
476
|
+
* Federated catalog filters, command separated list of filters to add.
|
|
446
477
|
*/
|
|
447
|
-
|
|
478
|
+
federatedCatalogueFilters?: string;
|
|
448
479
|
/**
|
|
449
|
-
*
|
|
450
|
-
* This only required if using a custom verifiable storage item, otherwise it will default to the network name.
|
|
480
|
+
* Federated catalog remote endpoint, if set will use a REST client instead of local service.
|
|
451
481
|
*/
|
|
452
|
-
|
|
482
|
+
federatedCatalogueRemoteEndpoint?: string;
|
|
453
483
|
/**
|
|
454
|
-
* The
|
|
455
|
-
* Only required for trusted nodes, as regular nodes will request from the trusted nodes.
|
|
456
|
-
* Defaults to synchronised-storage-blob-encryption
|
|
484
|
+
* The trust generators to add to the factory, comma separated list.
|
|
457
485
|
*/
|
|
458
|
-
|
|
486
|
+
trustGenerators?: string;
|
|
459
487
|
/**
|
|
460
|
-
* The
|
|
461
|
-
* Only required for trusted nodes, as regular nodes will not write encrypted data.
|
|
488
|
+
* The trust verifiers to add to the factory, comma separated list.
|
|
462
489
|
*/
|
|
463
|
-
|
|
490
|
+
trustVerifiers?: string;
|
|
464
491
|
/**
|
|
465
|
-
*
|
|
466
|
-
*
|
|
492
|
+
* The verification method to use for trust identities.
|
|
493
|
+
* Defaults to trust-assertion.
|
|
467
494
|
*/
|
|
468
|
-
|
|
495
|
+
trustVerificationMethodId?: string;
|
|
469
496
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
497
|
+
* The trust time to live for generating JWTs.
|
|
498
|
+
* Defaults to undefined for never expiring.
|
|
472
499
|
*/
|
|
473
|
-
|
|
500
|
+
trustJwtTtlSeconds?: string;
|
|
474
501
|
/**
|
|
475
|
-
* The
|
|
476
|
-
* @default 1000
|
|
502
|
+
* The allow lists for the trust identity verifier, comma separated list of identities.
|
|
477
503
|
*/
|
|
478
|
-
|
|
504
|
+
trustIdentitiesAllow?: string;
|
|
479
505
|
/**
|
|
480
|
-
* The
|
|
481
|
-
* @default 5
|
|
506
|
+
* The deny lists for the trust identity verifier, comma separated list of identities.
|
|
482
507
|
*/
|
|
483
|
-
|
|
508
|
+
trustIdentitiesDeny?: string;
|
|
484
509
|
/**
|
|
485
|
-
*
|
|
510
|
+
* Path under which the rights management service is mounted (single source
|
|
511
|
+
* of truth). The same value drives:
|
|
512
|
+
* - the server route mount (via engine config)
|
|
513
|
+
* - the PNP service's callback URL builder (`buildCallbackUrl`)
|
|
514
|
+
* - the PNP rest-client's pathPrefix (consumer side)
|
|
515
|
+
* Defaults to `rights-management`. Set when deploying behind a reverse proxy
|
|
516
|
+
* with path rewriting, K8s ingress with path-based routing, or any custom
|
|
517
|
+
* mount point.
|
|
486
518
|
*/
|
|
487
|
-
|
|
519
|
+
rightsManagementCallbackPath?: string;
|
|
488
520
|
/**
|
|
489
|
-
*
|
|
521
|
+
* The rights management policy information sources to add to the factory.
|
|
490
522
|
*/
|
|
491
|
-
|
|
523
|
+
rightsManagementPolicyInformationSources?: string;
|
|
492
524
|
/**
|
|
493
|
-
*
|
|
525
|
+
* The rights management policy negotiators sources to add to the factory.
|
|
494
526
|
*/
|
|
495
|
-
|
|
527
|
+
rightsManagementPolicyNegotiators?: string;
|
|
496
528
|
/**
|
|
497
|
-
*
|
|
529
|
+
* The rights management policy requesters to add to the factory.
|
|
498
530
|
*/
|
|
499
|
-
|
|
531
|
+
rightsManagementPolicyRequesters?: string;
|
|
500
532
|
/**
|
|
501
|
-
*
|
|
533
|
+
* The rights management policy execution actions to add to the factory.
|
|
502
534
|
*/
|
|
503
|
-
|
|
535
|
+
rightsManagementPolicyExecutionActions?: string;
|
|
504
536
|
/**
|
|
505
|
-
* The rights management
|
|
506
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
537
|
+
* The rights management policy enforcement processors to add to the factory.
|
|
507
538
|
*/
|
|
508
|
-
|
|
539
|
+
rightsManagementPolicyEnforcementProcessors?: string;
|
|
509
540
|
/**
|
|
510
|
-
* The rights management
|
|
511
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
541
|
+
* The rights management policy arbiters to add to the factory.
|
|
512
542
|
*/
|
|
513
|
-
|
|
543
|
+
rightsManagementPolicyArbiters?: string;
|
|
514
544
|
/**
|
|
515
|
-
* The rights management
|
|
516
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
545
|
+
* The rights management policy obligation enforcers to add to the factory.
|
|
517
546
|
*/
|
|
518
|
-
|
|
547
|
+
rightsManagementPolicyObligationEnforcers?: string;
|
|
519
548
|
/**
|
|
520
|
-
*
|
|
521
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
549
|
+
* Is the dataspace enabled, defaults to false.
|
|
522
550
|
*/
|
|
523
|
-
|
|
551
|
+
dataspaceEnabled?: string;
|
|
524
552
|
/**
|
|
525
|
-
* The
|
|
526
|
-
*
|
|
527
|
-
*/
|
|
528
|
-
rightsManagementEnforcementProcessors?: string;
|
|
529
|
-
/**
|
|
530
|
-
* The rights management configuration which includes the arbiter modules to load.
|
|
531
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
553
|
+
* The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
|
|
554
|
+
* @default 10
|
|
532
555
|
*/
|
|
533
|
-
|
|
556
|
+
dataspaceRetainActivityLogsFor?: string;
|
|
534
557
|
/**
|
|
535
|
-
* The
|
|
536
|
-
*
|
|
558
|
+
* The interval for cleaning up the activity logs.
|
|
559
|
+
* @default 60
|
|
537
560
|
*/
|
|
538
|
-
|
|
561
|
+
dataspaceActivityLogsCleanUpInterval?: string;
|
|
539
562
|
/**
|
|
540
|
-
*
|
|
563
|
+
* The data plane path for PULL transfers (path only, not full URL).
|
|
564
|
+
* Will be combined with public origin from hosting component.
|
|
565
|
+
* Required if PULL transfers should be supported.
|
|
566
|
+
* Example: "dataspace/entities"
|
|
541
567
|
*/
|
|
542
|
-
|
|
568
|
+
dataspaceDataPlanePath?: string;
|
|
543
569
|
/**
|
|
544
|
-
*
|
|
570
|
+
* Are the health components enabled, defaults to false.
|
|
545
571
|
*/
|
|
546
|
-
|
|
572
|
+
healthEnabled?: string;
|
|
547
573
|
/**
|
|
548
|
-
* The
|
|
549
|
-
* @default 10
|
|
574
|
+
* The interval in seconds for performing health checks, defaults to 60.
|
|
550
575
|
*/
|
|
551
|
-
|
|
576
|
+
healthIntervalSeconds?: string;
|
|
552
577
|
/**
|
|
553
|
-
* The interval for
|
|
554
|
-
*
|
|
578
|
+
* The interval in seconds for performing health checks at startup, defaults to 2.
|
|
579
|
+
* This allows components that take a long time to initialize to be healthy before the first health check is performed.
|
|
555
580
|
*/
|
|
556
|
-
|
|
581
|
+
healthStartupIntervalSeconds?: string;
|
|
557
582
|
/**
|
|
558
|
-
*
|
|
583
|
+
* The id of the key in the vault to use for encrypting parameters in url transformer.
|
|
559
584
|
*/
|
|
560
|
-
|
|
585
|
+
urlTransformerEncryptionKeyId?: string;
|
|
561
586
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
587
|
+
* The type of the automation action to create, comma separate for more than one connector.
|
|
588
|
+
* values: fetch
|
|
564
589
|
*/
|
|
565
|
-
|
|
590
|
+
automationActionTypes?: string;
|
|
566
591
|
/**
|
|
567
592
|
* A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
|
|
568
593
|
*/
|
|
@@ -27,6 +27,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
|
|
|
27
27
|
* The CORS headers to expose.
|
|
28
28
|
*/
|
|
29
29
|
httpExposedHeaders?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The public origin URL for the API e.g. https://api.example.com:1234
|
|
32
|
+
*/
|
|
33
|
+
publicOrigin?: string;
|
|
30
34
|
/**
|
|
31
35
|
* The type of auth admin processor to use on the API: entity-storage.
|
|
32
36
|
*/
|
|
@@ -39,6 +43,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
|
|
|
39
43
|
* The id of the key in the vault to use for signing in auth operations.
|
|
40
44
|
*/
|
|
41
45
|
authSigningKeyId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The id of the key in the vault to use for encrypting hosting parameters in auth operations.
|
|
48
|
+
*/
|
|
49
|
+
hostingParamEncryptionKeyId?: string;
|
|
42
50
|
/**
|
|
43
51
|
* Additional MIME type processors to include, comma separated.
|
|
44
52
|
*/
|
|
@@ -7,16 +7,4 @@ export interface INodeEngineState extends IEngineState {
|
|
|
7
7
|
* The identity for the node.
|
|
8
8
|
*/
|
|
9
9
|
nodeId?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The tenant id for the node.
|
|
12
|
-
*/
|
|
13
|
-
nodeTenantId?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The identity for the organization.
|
|
16
|
-
*/
|
|
17
|
-
nodeOrganizationId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* The identity for the admin user.
|
|
20
|
-
*/
|
|
21
|
-
nodeAdminUserId?: string;
|
|
22
10
|
}
|
|
@@ -3,44 +3,6 @@ import type { IEngineServerEnvironmentVariables } from "./IEngineServerEnvironme
|
|
|
3
3
|
* The environment variables for the node.
|
|
4
4
|
*/
|
|
5
5
|
export interface INodeEnvironmentVariables extends IEngineServerEnvironmentVariables {
|
|
6
|
-
/**
|
|
7
|
-
* The features that are enabled on the node.
|
|
8
|
-
* @default []
|
|
9
|
-
*/
|
|
10
|
-
features?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The identity of the node which, if empty and node-identity feature is enabled it will be generated.
|
|
13
|
-
*/
|
|
14
|
-
nodeIdentity?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The mnemonic for the identity, if empty and node-identity feature is enabled it will be randomly generated.
|
|
17
|
-
*/
|
|
18
|
-
nodeMnemonic?: string;
|
|
19
|
-
/**
|
|
20
|
-
* If the node-admin-user feature is enabled, this will be the organization of the user, if one is not provided it will be generated
|
|
21
|
-
*/
|
|
22
|
-
organizationIdentity?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The mnemonic for the organization, if empty and node-admin-user feature is enabled it will be randomly generated.
|
|
25
|
-
*/
|
|
26
|
-
organizationMnemonic?: string;
|
|
27
|
-
/**
|
|
28
|
-
* If the node-admin-user feature is enabled, this will be the identity of the user, if one is not provided it will be generated
|
|
29
|
-
*/
|
|
30
|
-
adminUserIdentity?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The mnemonic for the admin user, if empty and node-admin-user feature is enabled it will be randomly generated.
|
|
33
|
-
*/
|
|
34
|
-
adminUserMnemonic?: string;
|
|
35
|
-
/**
|
|
36
|
-
* If the node-admin-user feature is enabled, this will be the name of the user.
|
|
37
|
-
* @default admin@node
|
|
38
|
-
*/
|
|
39
|
-
adminUserName?: string;
|
|
40
|
-
/**
|
|
41
|
-
* If the node-admin-user feature is enabled, this will be the password of the user, if empty it will be randomly generated.
|
|
42
|
-
*/
|
|
43
|
-
adminUserPassword?: string;
|
|
44
6
|
/**
|
|
45
7
|
* Maximum size in MB for HTTPS extensions downloads.
|
|
46
8
|
* @default 10
|
|
@@ -7,8 +7,8 @@ import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface INodeOptions {
|
|
9
9
|
/**
|
|
10
|
-
* The name of the server, defaults to "TWIN Node
|
|
11
|
-
* @default "TWIN Node
|
|
10
|
+
* The name of the server, defaults to "TWIN Node".
|
|
11
|
+
* @default "TWIN Node"
|
|
12
12
|
*/
|
|
13
13
|
serverName?: string;
|
|
14
14
|
/**
|
|
@@ -40,6 +40,10 @@ export interface INodeOptions {
|
|
|
40
40
|
* This will be merged with any configuration loaded from the environment variables.
|
|
41
41
|
*/
|
|
42
42
|
config?: IEngineConfig;
|
|
43
|
+
/**
|
|
44
|
+
* The directory to override the script location, defaults to location of index.js.
|
|
45
|
+
*/
|
|
46
|
+
scriptDirectory?: string;
|
|
43
47
|
/**
|
|
44
48
|
* The directory to override the execution location, defaults to process directory.
|
|
45
49
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
/**
|
|
3
|
+
* The type for the initialise engine method of an extension module.
|
|
4
|
+
* This is called when the engine has been constructed but not yet started.
|
|
5
|
+
* @param engineCore The engine core instance.
|
|
6
|
+
*/
|
|
7
|
+
export type NodeExtensionInitialiseEngineMethod = (engineCore: IEngineCore) => Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IEngineCore, IEngineServer } from "@twin.org/engine-models";
|
|
2
|
+
/**
|
|
3
|
+
* The type for the initialise engine server method of an extension module.
|
|
4
|
+
* This is called when the engine server has been constructed but not yet started.
|
|
5
|
+
* @param engineCore The engine core instance.
|
|
6
|
+
* @param engineServer The engine server instance.
|
|
7
|
+
*/
|
|
8
|
+
export type NodeExtensionInitialiseEngineServerMethod = (engineCore: IEngineCore, engineServer: IEngineServer) => Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INodeEngineConfig } from "./INodeEngineConfig.js";
|
|
2
|
+
import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
|
|
3
|
+
/**
|
|
4
|
+
* The type for the initialise method of an extension module.
|
|
5
|
+
* @param envVars The environment variables for the node.
|
|
6
|
+
* @param nodeEngineConfig The node engine config.
|
|
7
|
+
*/
|
|
8
|
+
export type NodeExtensionInitialiseMethod = (envVars: INodeEnvironmentVariables, nodeEngineConfig: INodeEngineConfig) => Promise<void>;
|
package/dist/types/node.d.ts
CHANGED
|
@@ -7,17 +7,18 @@ import type { INodeEngineState } from "./models/INodeEngineState.js";
|
|
|
7
7
|
import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
|
|
8
8
|
import type { INodeOptions } from "./models/INodeOptions.js";
|
|
9
9
|
/**
|
|
10
|
-
* Run the TWIN Node
|
|
10
|
+
* Run the TWIN Node.
|
|
11
11
|
* @param nodeOptions Optional configuration options for running the server.
|
|
12
|
+
* @param args Optional command line arguments.
|
|
12
13
|
* @returns A promise that resolves when the server is started containing a shutdown method.
|
|
13
14
|
*/
|
|
14
|
-
export declare function run(nodeOptions?: INodeOptions): Promise<{
|
|
15
|
+
export declare function run(nodeOptions?: INodeOptions, args?: string[]): Promise<{
|
|
15
16
|
engine: Engine<IEngineServerConfig, INodeEngineState>;
|
|
16
17
|
server: EngineServer;
|
|
17
18
|
shutdown: () => Promise<void>;
|
|
18
19
|
} | undefined>;
|
|
19
20
|
/**
|
|
20
|
-
* Build the configuration for the TWIN Node
|
|
21
|
+
* Build the configuration for the TWIN Node.
|
|
21
22
|
* @param processEnv The environment variables from the process.
|
|
22
23
|
* @param options The options for running the server.
|
|
23
24
|
* @param serverInfo The server information.
|
|
@@ -33,7 +34,7 @@ export declare function buildConfiguration(processEnv: {
|
|
|
33
34
|
nodeEngineConfig: INodeEngineConfig;
|
|
34
35
|
availableContextIdKeys: {
|
|
35
36
|
key: string;
|
|
36
|
-
|
|
37
|
+
requiredHandlerFeatures: string[];
|
|
37
38
|
}[];
|
|
38
39
|
}>;
|
|
39
40
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Engine } from "@twin.org/engine";
|
|
2
2
|
import { EngineServer } from "@twin.org/engine-server";
|
|
3
3
|
import type { IEngineServerConfig } from "@twin.org/engine-server-types";
|
|
4
|
+
import type { ICliCommand } from "./models/ICliCommand.js";
|
|
4
5
|
import type { INodeEngineConfig } from "./models/INodeEngineConfig.js";
|
|
5
6
|
import type { INodeEngineState } from "./models/INodeEngineState.js";
|
|
6
7
|
import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
|
|
@@ -10,12 +11,13 @@ import type { INodeOptions } from "./models/INodeOptions.js";
|
|
|
10
11
|
* @param nodeOptions Optional run options for the engine server.
|
|
11
12
|
* @param nodeEngineConfig The configuration for the engine server.
|
|
12
13
|
* @param envVars The environment variables.
|
|
14
|
+
* @param cliCommand The constructed CLI command (optional).
|
|
13
15
|
* @param availableContextIdKeys The context ID keys available for operation.
|
|
14
16
|
* @returns The engine server.
|
|
15
17
|
*/
|
|
16
|
-
export declare function start(nodeOptions: INodeOptions | undefined, nodeEngineConfig: INodeEngineConfig, envVars: INodeEnvironmentVariables, availableContextIdKeys?: {
|
|
18
|
+
export declare function start(nodeOptions: INodeOptions | undefined, nodeEngineConfig: INodeEngineConfig, envVars: INodeEnvironmentVariables, cliCommand?: ICliCommand, availableContextIdKeys?: {
|
|
17
19
|
key: string;
|
|
18
|
-
|
|
20
|
+
requiredHandlerFeatures: string[];
|
|
19
21
|
}[]): Promise<{
|
|
20
22
|
engine: Engine<IEngineServerConfig, INodeEngineState>;
|
|
21
23
|
server: EngineServer;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { IModuleProtocol } from "./models/IModuleProtocol.js";
|
|
2
|
-
import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
|
|
3
2
|
import type { IProtocolHandlerResult } from "./models/IProtocolHandlerResult.js";
|
|
4
3
|
import { ModuleProtocol } from "./models/moduleProtocol.js";
|
|
5
|
-
import { NodeFeatures } from "./models/nodeFeatures.js";
|
|
6
4
|
/**
|
|
7
5
|
* Initialise the locales for the application.
|
|
8
6
|
* @param localesDirectory The directory containing the locales.
|
|
@@ -13,6 +11,12 @@ export declare function initialiseLocales(localesDirectory: string): Promise<voi
|
|
|
13
11
|
* @returns The execution directory.
|
|
14
12
|
*/
|
|
15
13
|
export declare function getExecutionDirectory(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get the directory where the script is located.
|
|
16
|
+
* @param args The command line arguments.
|
|
17
|
+
* @returns The execution directory.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getScriptDirectory(args?: string[]): string;
|
|
16
20
|
/**
|
|
17
21
|
* Does the specified file exist.
|
|
18
22
|
* @param filename The filename to check for existence.
|
|
@@ -49,12 +53,6 @@ export declare function loadTextFile(filename: string): Promise<string>;
|
|
|
49
53
|
* @returns The contents of the JSON file or null if it could not be loaded.
|
|
50
54
|
*/
|
|
51
55
|
export declare function loadJsonFile<T>(filename: string): Promise<T>;
|
|
52
|
-
/**
|
|
53
|
-
* Get the features that are enabled on the node.
|
|
54
|
-
* @param env The environment variables for the node.
|
|
55
|
-
* @returns The features that are enabled on the node.
|
|
56
|
-
*/
|
|
57
|
-
export declare function getFeatures(env: INodeEnvironmentVariables): NodeFeatures[];
|
|
58
56
|
/**
|
|
59
57
|
* Parse the protocol from a module name.
|
|
60
58
|
* @param moduleName The module name to parse.
|