@twin.org/node-core 0.0.2-next.16 → 0.0.2-next.17
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 +182 -53
- package/dist/esm/index.mjs +173 -54
- package/dist/types/builders/engineServerEnvBuilder.d.ts +1 -1
- package/dist/types/builders/extensionsBuilder.d.ts +31 -0
- package/dist/types/defaults.d.ts +6 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +35 -14
- package/dist/types/models/INodeEngineConfig.d.ts +6 -0
- package/dist/types/models/INodeOptions.d.ts +2 -1
- package/dist/types/models/nodeExtensionMethods.d.ts +22 -0
- package/dist/types/node.d.ts +2 -2
- package/dist/types/server.d.ts +4 -2
- package/docs/changelog.md +8 -0
- package/docs/reference/functions/buildConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
- 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/shutdownExtensions.md +19 -0
- package/docs/reference/functions/start.md +4 -4
- package/docs/reference/index.md +14 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +73 -22
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +101 -30
- package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +101 -30
- package/docs/reference/interfaces/INodeOptions.md +6 -2
- 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/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/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
- package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
- package/package.json +12 -1
|
@@ -81,6 +81,18 @@ A prefix for all the table in entity-storage, can be empty.
|
|
|
81
81
|
|
|
82
82
|
***
|
|
83
83
|
|
|
84
|
+
### awsDynamodbAuthMode?
|
|
85
|
+
|
|
86
|
+
> `optional` **awsDynamodbAuthMode**: `string`
|
|
87
|
+
|
|
88
|
+
AWS DynamoDB auth mode, either credentials or pod.
|
|
89
|
+
|
|
90
|
+
#### Inherited from
|
|
91
|
+
|
|
92
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsDynamodbAuthMode`](IEngineServerEnvironmentVariables.md#awsdynamodbauthmode)
|
|
93
|
+
|
|
94
|
+
***
|
|
95
|
+
|
|
84
96
|
### awsDynamodbAccessKeyId?
|
|
85
97
|
|
|
86
98
|
> `optional` **awsDynamodbAccessKeyId**: `string`
|
|
@@ -575,15 +587,15 @@ A prefix for all the blobs in blob-storage, can be empty.
|
|
|
575
587
|
|
|
576
588
|
***
|
|
577
589
|
|
|
578
|
-
###
|
|
590
|
+
### awsS3Region?
|
|
579
591
|
|
|
580
|
-
> `optional` **
|
|
592
|
+
> `optional` **awsS3Region**: `string`
|
|
581
593
|
|
|
582
|
-
AWS S3
|
|
594
|
+
AWS S3 region.
|
|
583
595
|
|
|
584
596
|
#### Inherited from
|
|
585
597
|
|
|
586
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
598
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsS3Region`](IEngineServerEnvironmentVariables.md#awss3region)
|
|
587
599
|
|
|
588
600
|
***
|
|
589
601
|
|
|
@@ -599,27 +611,27 @@ AWS S3 bucket name.
|
|
|
599
611
|
|
|
600
612
|
***
|
|
601
613
|
|
|
602
|
-
###
|
|
614
|
+
### awsS3AuthMode?
|
|
603
615
|
|
|
604
|
-
> `optional` **
|
|
616
|
+
> `optional` **awsS3AuthMode**: `string`
|
|
605
617
|
|
|
606
|
-
AWS S3
|
|
618
|
+
AWS S3 auth mode, either credentials or pod, defaults to credentials.
|
|
607
619
|
|
|
608
620
|
#### Inherited from
|
|
609
621
|
|
|
610
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
622
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsS3AuthMode`](IEngineServerEnvironmentVariables.md#awss3authmode)
|
|
611
623
|
|
|
612
624
|
***
|
|
613
625
|
|
|
614
|
-
###
|
|
626
|
+
### awsS3AccessKeyId?
|
|
615
627
|
|
|
616
|
-
> `optional` **
|
|
628
|
+
> `optional` **awsS3AccessKeyId**: `string`
|
|
617
629
|
|
|
618
|
-
AWS S3
|
|
630
|
+
AWS S3 access key id.
|
|
619
631
|
|
|
620
632
|
#### Inherited from
|
|
621
633
|
|
|
622
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
634
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsS3AccessKeyId`](IEngineServerEnvironmentVariables.md#awss3accesskeyid)
|
|
623
635
|
|
|
624
636
|
***
|
|
625
637
|
|
|
@@ -635,6 +647,18 @@ AWS S3 secret access key.
|
|
|
635
647
|
|
|
636
648
|
***
|
|
637
649
|
|
|
650
|
+
### awsS3Endpoint?
|
|
651
|
+
|
|
652
|
+
> `optional` **awsS3Endpoint**: `string`
|
|
653
|
+
|
|
654
|
+
AWS S3 endpoint.
|
|
655
|
+
|
|
656
|
+
#### Inherited from
|
|
657
|
+
|
|
658
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsS3Endpoint`](IEngineServerEnvironmentVariables.md#awss3endpoint)
|
|
659
|
+
|
|
660
|
+
***
|
|
661
|
+
|
|
638
662
|
### azureStorageAccountKey?
|
|
639
663
|
|
|
640
664
|
> `optional` **azureStorageAccountKey**: `string`
|
|
@@ -840,39 +864,51 @@ Use the @json: prefix to specify the path to the JSON file.
|
|
|
840
864
|
|
|
841
865
|
***
|
|
842
866
|
|
|
843
|
-
###
|
|
867
|
+
### awsSesRegion?
|
|
844
868
|
|
|
845
|
-
> `optional` **
|
|
869
|
+
> `optional` **awsSesRegion**: `string`
|
|
846
870
|
|
|
847
|
-
AWS SES
|
|
871
|
+
AWS SES region.
|
|
848
872
|
|
|
849
873
|
#### Inherited from
|
|
850
874
|
|
|
851
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
875
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsSesRegion`](IEngineServerEnvironmentVariables.md#awssesregion)
|
|
852
876
|
|
|
853
877
|
***
|
|
854
878
|
|
|
855
|
-
###
|
|
879
|
+
### awsSesAuthMode?
|
|
856
880
|
|
|
857
|
-
> `optional` **
|
|
881
|
+
> `optional` **awsSesAuthMode**: `string`
|
|
858
882
|
|
|
859
|
-
AWS SES
|
|
883
|
+
AWS SES auth mode, either credentials or pod, defaults to credentials.
|
|
860
884
|
|
|
861
885
|
#### Inherited from
|
|
862
886
|
|
|
863
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
887
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsSesAuthMode`](IEngineServerEnvironmentVariables.md#awssesauthmode)
|
|
864
888
|
|
|
865
889
|
***
|
|
866
890
|
|
|
867
|
-
###
|
|
891
|
+
### awsSesSecretAccessKey?
|
|
868
892
|
|
|
869
|
-
> `optional` **
|
|
893
|
+
> `optional` **awsSesSecretAccessKey**: `string`
|
|
870
894
|
|
|
871
|
-
AWS SES
|
|
895
|
+
AWS SES secret access key.
|
|
872
896
|
|
|
873
897
|
#### Inherited from
|
|
874
898
|
|
|
875
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
899
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsSesSecretAccessKey`](IEngineServerEnvironmentVariables.md#awssessecretaccesskey)
|
|
900
|
+
|
|
901
|
+
***
|
|
902
|
+
|
|
903
|
+
### awsSesAccessKeyId?
|
|
904
|
+
|
|
905
|
+
> `optional` **awsSesAccessKeyId**: `string`
|
|
906
|
+
|
|
907
|
+
AWS SES access key id.
|
|
908
|
+
|
|
909
|
+
#### Inherited from
|
|
910
|
+
|
|
911
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`awsSesAccessKeyId`](IEngineServerEnvironmentVariables.md#awssesaccesskeyid)
|
|
876
912
|
|
|
877
913
|
***
|
|
878
914
|
|
|
@@ -1265,7 +1301,7 @@ Url which points to the api for a trusted synchronised storage node, not require
|
|
|
1265
1301
|
> `optional` **synchronisedStorageVerifiableStorageKeyId**: `string`
|
|
1266
1302
|
|
|
1267
1303
|
The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.
|
|
1268
|
-
This only required if using a custom verifiable storage item, otherwise it will default
|
|
1304
|
+
This only required if using a custom verifiable storage item, otherwise it will default to the network name.
|
|
1269
1305
|
|
|
1270
1306
|
#### Inherited from
|
|
1271
1307
|
|
|
@@ -1547,16 +1583,39 @@ Is the data space connector enabled, defaults to false.
|
|
|
1547
1583
|
|
|
1548
1584
|
***
|
|
1549
1585
|
|
|
1550
|
-
###
|
|
1586
|
+
### dataSpaceConnectorRetainActivityLogsFor?
|
|
1551
1587
|
|
|
1552
|
-
> `optional` **
|
|
1588
|
+
> `optional` **dataSpaceConnectorRetainActivityLogsFor**: `string`
|
|
1553
1589
|
|
|
1554
|
-
The
|
|
1555
|
-
|
|
1590
|
+
The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
|
|
1591
|
+
|
|
1592
|
+
#### Default
|
|
1593
|
+
|
|
1594
|
+
```ts
|
|
1595
|
+
10
|
|
1596
|
+
```
|
|
1556
1597
|
|
|
1557
1598
|
#### Inherited from
|
|
1558
1599
|
|
|
1559
|
-
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`
|
|
1600
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`dataSpaceConnectorRetainActivityLogsFor`](IEngineServerEnvironmentVariables.md#dataspaceconnectorretainactivitylogsfor)
|
|
1601
|
+
|
|
1602
|
+
***
|
|
1603
|
+
|
|
1604
|
+
### dataSpaceConnectorActivityLogsCleanUpInterval?
|
|
1605
|
+
|
|
1606
|
+
> `optional` **dataSpaceConnectorActivityLogsCleanUpInterval**: `string`
|
|
1607
|
+
|
|
1608
|
+
The interval for cleaning up the activity logs.
|
|
1609
|
+
|
|
1610
|
+
#### Default
|
|
1611
|
+
|
|
1612
|
+
```ts
|
|
1613
|
+
60
|
|
1614
|
+
```
|
|
1615
|
+
|
|
1616
|
+
#### Inherited from
|
|
1617
|
+
|
|
1618
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`dataSpaceConnectorActivityLogsCleanUpInterval`](IEngineServerEnvironmentVariables.md#dataspaceconnectoractivitylogscleanupinterval)
|
|
1560
1619
|
|
|
1561
1620
|
***
|
|
1562
1621
|
|
|
@@ -1585,6 +1644,18 @@ Defaults to node-authentication-assertion.
|
|
|
1585
1644
|
|
|
1586
1645
|
***
|
|
1587
1646
|
|
|
1647
|
+
### extensions?
|
|
1648
|
+
|
|
1649
|
+
> `optional` **extensions**: `string`
|
|
1650
|
+
|
|
1651
|
+
A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
|
|
1652
|
+
|
|
1653
|
+
#### Inherited from
|
|
1654
|
+
|
|
1655
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`extensions`](IEngineServerEnvironmentVariables.md#extensions)
|
|
1656
|
+
|
|
1657
|
+
***
|
|
1658
|
+
|
|
1588
1659
|
### port?
|
|
1589
1660
|
|
|
1590
1661
|
> `optional` **port**: `string`
|
|
@@ -113,15 +113,19 @@ Method to extend the engine environment variables with any additional custom con
|
|
|
113
113
|
|
|
114
114
|
### extendConfig()?
|
|
115
115
|
|
|
116
|
-
> `optional` **extendConfig**: (`config`) => `Promise`\<`void`\>
|
|
116
|
+
> `optional` **extendConfig**: (`envVars`, `config`) => `Promise`\<`void`\>
|
|
117
117
|
|
|
118
118
|
Method to extend the engine configuration with any additional custom configuration.
|
|
119
119
|
|
|
120
120
|
#### Parameters
|
|
121
121
|
|
|
122
|
+
##### envVars
|
|
123
|
+
|
|
124
|
+
[`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
|
|
125
|
+
|
|
122
126
|
##### config
|
|
123
127
|
|
|
124
|
-
`
|
|
128
|
+
[`INodeEngineConfig`](INodeEngineConfig.md)
|
|
125
129
|
|
|
126
130
|
#### Returns
|
|
127
131
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Type Alias: NodeExtensionInitialiseEngineMethod()
|
|
2
|
+
|
|
3
|
+
> **NodeExtensionInitialiseEngineMethod** = (`engineCore`) => `Promise`\<`void`\>
|
|
4
|
+
|
|
5
|
+
The type for the initialise engine method of an extension module.
|
|
6
|
+
This is called when the engine has been constructed but not yet started.
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
### engineCore
|
|
11
|
+
|
|
12
|
+
`IEngineCore`
|
|
13
|
+
|
|
14
|
+
The engine core instance.
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Type Alias: NodeExtensionInitialiseEngineServerMethod()
|
|
2
|
+
|
|
3
|
+
> **NodeExtensionInitialiseEngineServerMethod** = (`engineCore`, `engineServer`) => `Promise`\<`void`\>
|
|
4
|
+
|
|
5
|
+
The type for the initialise engine server method of an extension module.
|
|
6
|
+
This is called when the engine server has been constructed but not yet started.
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
### engineCore
|
|
11
|
+
|
|
12
|
+
`IEngineCore`
|
|
13
|
+
|
|
14
|
+
The engine core instance.
|
|
15
|
+
|
|
16
|
+
### engineServer
|
|
17
|
+
|
|
18
|
+
`IEngineServer`
|
|
19
|
+
|
|
20
|
+
The engine server instance.
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Type Alias: NodeExtensionInitialiseMethod()
|
|
2
|
+
|
|
3
|
+
> **NodeExtensionInitialiseMethod** = (`envVars`, `nodeEngineConfig`) => `Promise`\<`void`\>
|
|
4
|
+
|
|
5
|
+
The type for the initialise method of an extension module.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### envVars
|
|
10
|
+
|
|
11
|
+
[`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
|
|
12
|
+
|
|
13
|
+
The environment variables for the node.
|
|
14
|
+
|
|
15
|
+
### nodeEngineConfig
|
|
16
|
+
|
|
17
|
+
[`INodeEngineConfig`](../interfaces/INodeEngineConfig.md)
|
|
18
|
+
|
|
19
|
+
The node engine config.
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`Promise`\<`void`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node-core",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.17",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,5 +52,16 @@
|
|
|
52
52
|
"dist/types",
|
|
53
53
|
"locales",
|
|
54
54
|
"docs"
|
|
55
|
+
],
|
|
56
|
+
"keywords": [
|
|
57
|
+
"twin",
|
|
58
|
+
"trade",
|
|
59
|
+
"iota",
|
|
60
|
+
"framework",
|
|
61
|
+
"blockchain",
|
|
62
|
+
"node",
|
|
63
|
+
"core",
|
|
64
|
+
"foundation",
|
|
65
|
+
"utilities"
|
|
55
66
|
]
|
|
56
67
|
}
|