@twin.org/node-core 0.0.2-next.14 → 0.0.2-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +239 -186
- package/dist/esm/index.mjs +240 -190
- package/dist/types/builders/engineEnvBuilder.d.ts +1 -1
- package/dist/types/builders/engineServerEnvBuilder.d.ts +1 -1
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +49 -8
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +2 -5
- package/dist/types/models/INodeEnvironmentVariables.d.ts +1 -2
- package/dist/types/utils.d.ts +18 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/functions/buildEngineConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineServerConfiguration.md +2 -2
- package/docs/reference/functions/directoryExists.md +19 -0
- package/docs/reference/functions/getFiles.md +19 -0
- package/docs/reference/functions/getSubFolders.md +19 -0
- package/docs/reference/index.md +3 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +94 -13
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1583 -10
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +252 -143
- package/package.json +2 -2
|
@@ -5,4 +5,4 @@ import type { IEngineEnvironmentVariables } from "../models/IEngineEnvironmentVa
|
|
|
5
5
|
* @param envVars The environment variables.
|
|
6
6
|
* @returns The config for the core.
|
|
7
7
|
*/
|
|
8
|
-
export declare function buildEngineConfiguration(envVars: IEngineEnvironmentVariables): IEngineConfig
|
|
8
|
+
export declare function buildEngineConfiguration(envVars: IEngineEnvironmentVariables): Promise<IEngineConfig>;
|
|
@@ -11,4 +11,4 @@ import type { IEngineServerEnvironmentVariables } from "../models/IEngineServerE
|
|
|
11
11
|
* @param favIconPath The path to the favicon.
|
|
12
12
|
* @returns The the config for the core and the server.
|
|
13
13
|
*/
|
|
14
|
-
export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo, openApiSpecPath?: string, favIconPath?: string): IEngineServerConfig
|
|
14
|
+
export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo, openApiSpecPath?: string, favIconPath?: string): Promise<IEngineServerConfig>;
|
|
@@ -274,25 +274,46 @@ export interface IEngineEnvironmentVariables {
|
|
|
274
274
|
*/
|
|
275
275
|
eventBusComponent?: string;
|
|
276
276
|
/**
|
|
277
|
-
*
|
|
277
|
+
* Are the messaging components enabled, defaults to false.
|
|
278
278
|
*/
|
|
279
|
-
|
|
279
|
+
messagingEnabled?: string;
|
|
280
280
|
/**
|
|
281
|
-
*
|
|
281
|
+
* An initial set of templates for the messages.
|
|
282
|
+
* Use the @json: prefix to specify the path to the JSON file.
|
|
282
283
|
*/
|
|
283
|
-
|
|
284
|
+
messagingTemplates?: string;
|
|
284
285
|
/**
|
|
285
|
-
*
|
|
286
|
+
* AWS SES secret access key.
|
|
286
287
|
*/
|
|
287
|
-
|
|
288
|
+
awsSesSecretAccessKey?: string;
|
|
289
|
+
/**
|
|
290
|
+
* AWS SES access key id.
|
|
291
|
+
*/
|
|
292
|
+
awsSesAccessKeyId?: string;
|
|
293
|
+
/**
|
|
294
|
+
* AWS SES region.
|
|
295
|
+
*/
|
|
296
|
+
awsSesRegion?: string;
|
|
297
|
+
/**
|
|
298
|
+
* AWS SES endpoint.
|
|
299
|
+
*/
|
|
300
|
+
awsSesEndpoint?: string;
|
|
288
301
|
/**
|
|
289
302
|
* The applications for the push notifications JSON stringified array of IAwsApplicationSettings.
|
|
290
303
|
*/
|
|
291
304
|
awsMessagingPushNotificationApplications?: string;
|
|
292
305
|
/**
|
|
293
|
-
* The type of messaging
|
|
306
|
+
* The type of messaging email connector: entity-storage, aws.
|
|
307
|
+
*/
|
|
308
|
+
messagingEmailConnector?: string;
|
|
309
|
+
/**
|
|
310
|
+
* The type of messaging sms connector: entity-storage, aws.
|
|
311
|
+
*/
|
|
312
|
+
messagingSmsConnector?: string;
|
|
313
|
+
/**
|
|
314
|
+
* The type of messaging push notification connector: entity-storage, aws.
|
|
294
315
|
*/
|
|
295
|
-
|
|
316
|
+
messagingPushNotificationConnector?: string;
|
|
296
317
|
/**
|
|
297
318
|
* The type of telemetry connector: entity-storage.
|
|
298
319
|
*/
|
|
@@ -369,6 +390,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
369
390
|
* The identity verification method id to use with attestation.
|
|
370
391
|
*/
|
|
371
392
|
attestationVerificationMethodId?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Is the data processing enabled, defaults to false.
|
|
395
|
+
*/
|
|
396
|
+
dataProcessingEnabled?: string;
|
|
372
397
|
/**
|
|
373
398
|
* The type of the default data converters, can be a comma separated list: json, xml.
|
|
374
399
|
*/
|
|
@@ -377,6 +402,18 @@ export interface IEngineEnvironmentVariables {
|
|
|
377
402
|
* The type of the default data extractor, can be a comma separated list: json-path.
|
|
378
403
|
*/
|
|
379
404
|
dataExtractorConnectors?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Is the auditable item graph enabled, defaults to false.
|
|
407
|
+
*/
|
|
408
|
+
auditableItemGraphEnabled?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Is the auditable item stream enabled, defaults to false.
|
|
411
|
+
*/
|
|
412
|
+
auditableItemStreamEnabled?: string;
|
|
413
|
+
/**
|
|
414
|
+
* Is the document management enabled, defaults to false.
|
|
415
|
+
*/
|
|
416
|
+
documentManagementEnabled?: string;
|
|
380
417
|
/**
|
|
381
418
|
* Is the synchronised storage enabled, defaults to false.
|
|
382
419
|
*/
|
|
@@ -489,6 +526,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
489
526
|
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
490
527
|
*/
|
|
491
528
|
dataSpaceConnectorApps?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Enable verifiable credential authentication for the API.
|
|
531
|
+
*/
|
|
532
|
+
vcAuthenticationEnabled?: string;
|
|
492
533
|
/**
|
|
493
534
|
* Verifiable credential assertion for node to node communication.
|
|
494
535
|
* Defaults to node-authentication-assertion.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { IEngineEnvironmentVariables } from "./IEngineEnvironmentVariables";
|
|
1
2
|
/**
|
|
2
3
|
* The engine server environment variables.
|
|
3
4
|
*/
|
|
4
|
-
export interface IEngineServerEnvironmentVariables {
|
|
5
|
+
export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVariables {
|
|
5
6
|
/**
|
|
6
7
|
* The port to serve the API from.
|
|
7
8
|
*/
|
|
@@ -42,10 +43,6 @@ export interface IEngineServerEnvironmentVariables {
|
|
|
42
43
|
* Additional MIME type processors to include, comma separated.
|
|
43
44
|
*/
|
|
44
45
|
mimeTypeProcessors?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Enable to the route processor for verifiable credentials.
|
|
47
|
-
*/
|
|
48
|
-
enableVerifiableCredentialRouteProcessors?: string;
|
|
49
46
|
/**
|
|
50
47
|
* Disable Node Identity route processors.
|
|
51
48
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { IEngineEnvironmentVariables } from "./IEngineEnvironmentVariables";
|
|
2
1
|
import type { IEngineServerEnvironmentVariables } from "./IEngineServerEnvironmentVariables";
|
|
3
2
|
/**
|
|
4
3
|
* The environment variables for the node.
|
|
5
4
|
*/
|
|
6
|
-
export interface INodeEnvironmentVariables extends
|
|
5
|
+
export interface INodeEnvironmentVariables extends IEngineServerEnvironmentVariables {
|
|
7
6
|
/**
|
|
8
7
|
* The features that are enabled on the node.
|
|
9
8
|
* @default [NodeFeatures.NodeIdentity]
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -16,6 +16,24 @@ export declare function getExecutionDirectory(): string;
|
|
|
16
16
|
* @returns True if the file exists.
|
|
17
17
|
*/
|
|
18
18
|
export declare function fileExists(filename: string): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Does the specified directory exist.
|
|
21
|
+
* @param directory The directory to check for existence.
|
|
22
|
+
* @returns True if the directory exists.
|
|
23
|
+
*/
|
|
24
|
+
export declare function directoryExists(directory: string): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the sub folders for the folder.
|
|
27
|
+
* @param directory The directory to get the sub folders.
|
|
28
|
+
* @returns The list of sub folders.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getSubFolders(directory: string): Promise<string[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get the files in the directory.
|
|
33
|
+
* @param directory The directory to get the files from.
|
|
34
|
+
* @returns The list of files in the directory.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getFiles(directory: string): Promise<string[]>;
|
|
19
37
|
/**
|
|
20
38
|
* Load the text file.
|
|
21
39
|
* @param filename The filename of the text file to load.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.16](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.15...node-core-v0.0.2-next.16) (2025-09-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update framework components ([4bee2b9](https://github.com/twinfoundation/node/commit/4bee2b9d3651df09b8550a9ed226be1b46031854))
|
|
9
|
+
|
|
10
|
+
## [0.0.2-next.15](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.14...node-core-v0.0.2-next.15) (2025-09-26)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* additional options for enabling components ([e13d772](https://github.com/twinfoundation/node/commit/e13d7721a0dd7143d456fff246622cbe63dbd0f1))
|
|
16
|
+
|
|
3
17
|
## [0.0.2-next.14](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.13...node-core-v0.0.2-next.14) (2025-09-25)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Function: buildEngineConfiguration()
|
|
2
2
|
|
|
3
|
-
> **buildEngineConfiguration**(`envVars`): `IEngineConfig
|
|
3
|
+
> **buildEngineConfiguration**(`envVars`): `Promise`\<`IEngineConfig`\>
|
|
4
4
|
|
|
5
5
|
Build the engine core configuration from environment variables.
|
|
6
6
|
|
|
@@ -14,6 +14,6 @@ The environment variables.
|
|
|
14
14
|
|
|
15
15
|
## Returns
|
|
16
16
|
|
|
17
|
-
`IEngineConfig
|
|
17
|
+
`Promise`\<`IEngineConfig`\>
|
|
18
18
|
|
|
19
19
|
The config for the core.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Function: buildEngineServerConfiguration()
|
|
2
2
|
|
|
3
|
-
> **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `IEngineServerConfig
|
|
3
|
+
> **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `Promise`\<`IEngineServerConfig`\>
|
|
4
4
|
|
|
5
5
|
Handles the configuration of the server.
|
|
6
6
|
|
|
@@ -38,6 +38,6 @@ The path to the favicon.
|
|
|
38
38
|
|
|
39
39
|
## Returns
|
|
40
40
|
|
|
41
|
-
`IEngineServerConfig
|
|
41
|
+
`Promise`\<`IEngineServerConfig`\>
|
|
42
42
|
|
|
43
43
|
The the config for the core and the server.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: directoryExists()
|
|
2
|
+
|
|
3
|
+
> **directoryExists**(`directory`): `Promise`\<`boolean`\>
|
|
4
|
+
|
|
5
|
+
Does the specified directory exist.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### directory
|
|
10
|
+
|
|
11
|
+
`string`
|
|
12
|
+
|
|
13
|
+
The directory to check for existence.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`Promise`\<`boolean`\>
|
|
18
|
+
|
|
19
|
+
True if the directory exists.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: getFiles()
|
|
2
|
+
|
|
3
|
+
> **getFiles**(`directory`): `Promise`\<`string`[]\>
|
|
4
|
+
|
|
5
|
+
Get the files in the directory.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### directory
|
|
10
|
+
|
|
11
|
+
`string`
|
|
12
|
+
|
|
13
|
+
The directory to get the files from.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`Promise`\<`string`[]\>
|
|
18
|
+
|
|
19
|
+
The list of files in the directory.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: getSubFolders()
|
|
2
|
+
|
|
3
|
+
> **getSubFolders**(`directory`): `Promise`\<`string`[]\>
|
|
4
|
+
|
|
5
|
+
Get the sub folders for the folder.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### directory
|
|
10
|
+
|
|
11
|
+
`string`
|
|
12
|
+
|
|
13
|
+
The directory to get the sub folders.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`Promise`\<`string`[]\>
|
|
18
|
+
|
|
19
|
+
The list of sub folders.
|
package/docs/reference/index.md
CHANGED
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
- [initialiseLocales](functions/initialiseLocales.md)
|
|
34
34
|
- [getExecutionDirectory](functions/getExecutionDirectory.md)
|
|
35
35
|
- [fileExists](functions/fileExists.md)
|
|
36
|
+
- [directoryExists](functions/directoryExists.md)
|
|
37
|
+
- [getSubFolders](functions/getSubFolders.md)
|
|
38
|
+
- [getFiles](functions/getFiles.md)
|
|
36
39
|
- [loadTextFile](functions/loadTextFile.md)
|
|
37
40
|
- [loadJsonFile](functions/loadJsonFile.md)
|
|
38
41
|
- [getFeatures](functions/getFeatures.md)
|
|
@@ -4,7 +4,7 @@ The engine core environment variables.
|
|
|
4
4
|
|
|
5
5
|
## Extended by
|
|
6
6
|
|
|
7
|
-
- [`
|
|
7
|
+
- [`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md)
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
@@ -547,27 +547,52 @@ The type of event bus component: service.
|
|
|
547
547
|
|
|
548
548
|
***
|
|
549
549
|
|
|
550
|
-
###
|
|
550
|
+
### messagingEnabled?
|
|
551
551
|
|
|
552
|
-
> `optional` **
|
|
552
|
+
> `optional` **messagingEnabled**: `string`
|
|
553
553
|
|
|
554
|
-
|
|
554
|
+
Are the messaging components enabled, defaults to false.
|
|
555
555
|
|
|
556
556
|
***
|
|
557
557
|
|
|
558
|
-
###
|
|
558
|
+
### messagingTemplates?
|
|
559
559
|
|
|
560
|
-
> `optional` **
|
|
560
|
+
> `optional` **messagingTemplates**: `string`
|
|
561
561
|
|
|
562
|
-
|
|
562
|
+
An initial set of templates for the messages.
|
|
563
|
+
Use the @json: prefix to specify the path to the JSON file.
|
|
563
564
|
|
|
564
565
|
***
|
|
565
566
|
|
|
566
|
-
###
|
|
567
|
+
### awsSesSecretAccessKey?
|
|
567
568
|
|
|
568
|
-
> `optional` **
|
|
569
|
+
> `optional` **awsSesSecretAccessKey**: `string`
|
|
569
570
|
|
|
570
|
-
|
|
571
|
+
AWS SES secret access key.
|
|
572
|
+
|
|
573
|
+
***
|
|
574
|
+
|
|
575
|
+
### awsSesAccessKeyId?
|
|
576
|
+
|
|
577
|
+
> `optional` **awsSesAccessKeyId**: `string`
|
|
578
|
+
|
|
579
|
+
AWS SES access key id.
|
|
580
|
+
|
|
581
|
+
***
|
|
582
|
+
|
|
583
|
+
### awsSesRegion?
|
|
584
|
+
|
|
585
|
+
> `optional` **awsSesRegion**: `string`
|
|
586
|
+
|
|
587
|
+
AWS SES region.
|
|
588
|
+
|
|
589
|
+
***
|
|
590
|
+
|
|
591
|
+
### awsSesEndpoint?
|
|
592
|
+
|
|
593
|
+
> `optional` **awsSesEndpoint**: `string`
|
|
594
|
+
|
|
595
|
+
AWS SES endpoint.
|
|
571
596
|
|
|
572
597
|
***
|
|
573
598
|
|
|
@@ -579,11 +604,27 @@ The applications for the push notifications JSON stringified array of IAwsApplic
|
|
|
579
604
|
|
|
580
605
|
***
|
|
581
606
|
|
|
582
|
-
###
|
|
607
|
+
### messagingEmailConnector?
|
|
608
|
+
|
|
609
|
+
> `optional` **messagingEmailConnector**: `string`
|
|
610
|
+
|
|
611
|
+
The type of messaging email connector: entity-storage, aws.
|
|
612
|
+
|
|
613
|
+
***
|
|
614
|
+
|
|
615
|
+
### messagingSmsConnector?
|
|
616
|
+
|
|
617
|
+
> `optional` **messagingSmsConnector**: `string`
|
|
618
|
+
|
|
619
|
+
The type of messaging sms connector: entity-storage, aws.
|
|
620
|
+
|
|
621
|
+
***
|
|
622
|
+
|
|
623
|
+
### messagingPushNotificationConnector?
|
|
583
624
|
|
|
584
|
-
> `optional` **
|
|
625
|
+
> `optional` **messagingPushNotificationConnector**: `string`
|
|
585
626
|
|
|
586
|
-
The type of messaging
|
|
627
|
+
The type of messaging push notification connector: entity-storage, aws.
|
|
587
628
|
|
|
588
629
|
***
|
|
589
630
|
|
|
@@ -739,6 +780,14 @@ The identity verification method id to use with attestation.
|
|
|
739
780
|
|
|
740
781
|
***
|
|
741
782
|
|
|
783
|
+
### dataProcessingEnabled?
|
|
784
|
+
|
|
785
|
+
> `optional` **dataProcessingEnabled**: `string`
|
|
786
|
+
|
|
787
|
+
Is the data processing enabled, defaults to false.
|
|
788
|
+
|
|
789
|
+
***
|
|
790
|
+
|
|
742
791
|
### dataConverterConnectors?
|
|
743
792
|
|
|
744
793
|
> `optional` **dataConverterConnectors**: `string`
|
|
@@ -755,6 +804,30 @@ The type of the default data extractor, can be a comma separated list: json-path
|
|
|
755
804
|
|
|
756
805
|
***
|
|
757
806
|
|
|
807
|
+
### auditableItemGraphEnabled?
|
|
808
|
+
|
|
809
|
+
> `optional` **auditableItemGraphEnabled**: `string`
|
|
810
|
+
|
|
811
|
+
Is the auditable item graph enabled, defaults to false.
|
|
812
|
+
|
|
813
|
+
***
|
|
814
|
+
|
|
815
|
+
### auditableItemStreamEnabled?
|
|
816
|
+
|
|
817
|
+
> `optional` **auditableItemStreamEnabled**: `string`
|
|
818
|
+
|
|
819
|
+
Is the auditable item stream enabled, defaults to false.
|
|
820
|
+
|
|
821
|
+
***
|
|
822
|
+
|
|
823
|
+
### documentManagementEnabled?
|
|
824
|
+
|
|
825
|
+
> `optional` **documentManagementEnabled**: `string`
|
|
826
|
+
|
|
827
|
+
Is the document management enabled, defaults to false.
|
|
828
|
+
|
|
829
|
+
***
|
|
830
|
+
|
|
758
831
|
### synchronisedStorageEnabled?
|
|
759
832
|
|
|
760
833
|
> `optional` **synchronisedStorageEnabled**: `string`
|
|
@@ -983,6 +1056,14 @@ Use the @json: prefix to specify the path to the JSON configuration file.
|
|
|
983
1056
|
|
|
984
1057
|
***
|
|
985
1058
|
|
|
1059
|
+
### vcAuthenticationEnabled?
|
|
1060
|
+
|
|
1061
|
+
> `optional` **vcAuthenticationEnabled**: `string`
|
|
1062
|
+
|
|
1063
|
+
Enable verifiable credential authentication for the API.
|
|
1064
|
+
|
|
1065
|
+
***
|
|
1066
|
+
|
|
986
1067
|
### vcAuthenticationVerificationMethodId?
|
|
987
1068
|
|
|
988
1069
|
> `optional` **vcAuthenticationVerificationMethodId**: `string`
|