@twin.org/node-core 0.0.2-next.2 → 0.0.2-next.21
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 +864 -391
- package/dist/esm/index.mjs +852 -394
- package/dist/types/bootstrap.d.ts +9 -9
- package/dist/types/builders/engineEnvBuilder.d.ts +1 -1
- package/dist/types/builders/engineServerEnvBuilder.d.ts +3 -2
- package/dist/types/builders/extensionsBuilder.d.ts +32 -0
- package/dist/types/defaults.d.ts +6 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +188 -24
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +12 -3
- package/dist/types/models/INodeEngineConfig.d.ts +6 -0
- package/dist/types/models/INodeEnvironmentVariables.d.ts +1 -2
- package/dist/types/models/INodeOptions.d.ts +6 -1
- package/dist/types/models/nodeExtensionMethods.d.ts +27 -0
- package/dist/types/models/nodeFeatures.d.ts +4 -0
- package/dist/types/node.d.ts +7 -2
- package/dist/types/server.d.ts +4 -2
- package/dist/types/utils.d.ts +24 -0
- package/docs/changelog.md +138 -0
- package/docs/reference/functions/{bootstrapAttestationMethod.md → bootstrapSynchronisedStorage.md} +3 -3
- package/docs/reference/functions/buildConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineServerConfiguration.md +9 -3
- 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/getFiles.md +19 -0
- package/docs/reference/functions/getSubFolders.md +19 -0
- package/docs/reference/functions/loadTextFile.md +19 -0
- package/docs/reference/functions/overrideModuleImport.md +17 -0
- package/docs/reference/functions/shutdownExtensions.md +25 -0
- package/docs/reference/functions/start.md +4 -4
- package/docs/reference/index.md +21 -1
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +374 -36
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1673 -5
- package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +643 -137
- package/docs/reference/interfaces/INodeOptions.md +14 -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/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/NodeFeatures.md +7 -1
- 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 +15 -7
- package/package.json +18 -2
|
@@ -85,6 +85,14 @@ The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.
|
|
|
85
85
|
|
|
86
86
|
***
|
|
87
87
|
|
|
88
|
+
### favIconFile?
|
|
89
|
+
|
|
90
|
+
> `optional` **favIconFile**: `string`
|
|
91
|
+
|
|
92
|
+
The path to the favicon, defaults to static/favicon.png.
|
|
93
|
+
|
|
94
|
+
***
|
|
95
|
+
|
|
88
96
|
### extendEnvVars()?
|
|
89
97
|
|
|
90
98
|
> `optional` **extendEnvVars**: (`envVars`) => `Promise`\<`void`\>
|
|
@@ -105,15 +113,19 @@ Method to extend the engine environment variables with any additional custom con
|
|
|
105
113
|
|
|
106
114
|
### extendConfig()?
|
|
107
115
|
|
|
108
|
-
> `optional` **extendConfig**: (`config`) => `Promise`\<`void`\>
|
|
116
|
+
> `optional` **extendConfig**: (`envVars`, `config`) => `Promise`\<`void`\>
|
|
109
117
|
|
|
110
118
|
Method to extend the engine configuration with any additional custom configuration.
|
|
111
119
|
|
|
112
120
|
#### Parameters
|
|
113
121
|
|
|
122
|
+
##### envVars
|
|
123
|
+
|
|
124
|
+
[`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
|
|
125
|
+
|
|
114
126
|
##### config
|
|
115
127
|
|
|
116
|
-
`
|
|
128
|
+
[`INodeEngineConfig`](INodeEngineConfig.md)
|
|
117
129
|
|
|
118
130
|
#### Returns
|
|
119
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`\>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Type Alias: NodeExtensionShutdownMethod()
|
|
2
|
+
|
|
3
|
+
> **NodeExtensionShutdownMethod** = () => `Promise`\<`void`\>
|
|
4
|
+
|
|
5
|
+
The type for the shutdown method of an extension module.
|
|
6
|
+
This is called when the engine is shutting down.
|
|
7
|
+
|
|
8
|
+
## Returns
|
|
9
|
+
|
|
10
|
+
`Promise`\<`void`\>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The features that can be enabled on the node.
|
|
6
6
|
|
|
7
|
-
## Type
|
|
7
|
+
## Type Declaration
|
|
8
8
|
|
|
9
9
|
### NodeIdentity
|
|
10
10
|
|
|
@@ -17,3 +17,9 @@ NodeIdentity - generates an identity for the node if not provided in config.
|
|
|
17
17
|
> `readonly` **NodeUser**: `"node-user"` = `"node-user"`
|
|
18
18
|
|
|
19
19
|
NodeUser - generates a user for the node if not provided in config.
|
|
20
|
+
|
|
21
|
+
### NodeWallet
|
|
22
|
+
|
|
23
|
+
> `readonly` **NodeWallet**: `"node-wallet"` = `"node-wallet"`
|
|
24
|
+
|
|
25
|
+
NodeWallet - generates a wallet for the node and funds it when there is a faucet available.
|
package/locales/en.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"error": {
|
|
3
3
|
"node": {
|
|
4
|
-
"storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file"
|
|
4
|
+
"storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file",
|
|
5
|
+
"extensionLoadingError": "Failed to load extension \"{extension}\""
|
|
5
6
|
}
|
|
6
7
|
},
|
|
7
8
|
"node": {
|
|
8
|
-
"terminateSignal": "Server terminating",
|
|
9
9
|
"generatingMnemonic": "Generating mnemonic \"{mnemonic}\"",
|
|
10
10
|
"storingMnemonic": "Storing mnemonic",
|
|
11
11
|
"existingMnemonic": "Mnemonic already exists",
|
|
@@ -19,16 +19,24 @@
|
|
|
19
19
|
"existingNodeUser": "Node user already exists \"{email}\"",
|
|
20
20
|
"creatingAuthKey": "Creating authentication key \"{keyName}\"",
|
|
21
21
|
"existingAuthKey": "Authentication key already exists \"{keyName}\"",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"existingImmutableProof": "Immutable proof verification method already exists \"{methodId}\"",
|
|
22
|
+
"addingVerificationMethod": "Adding {title} verification method \"{methodId}\"",
|
|
23
|
+
"existingVerificationMethod": "Verification method for {title} already exists \"{methodId}\"",
|
|
24
|
+
"addingBlobEncryptionKey": "Adding blob encryption key \"{keyName}\"",
|
|
26
25
|
"creatingBlobEncryptionKey": "Creating blob encryption key \"{keyName}\"",
|
|
26
|
+
"createdBlobEncryptionKey": "Created blob encryption key \"{keyName}\" with value \"{keyValue}\"",
|
|
27
27
|
"existingBlobEncryptionKey": "Blob encryption key already exists \"{keyName}\"",
|
|
28
|
+
"addingSynchronisedStorageBlobEncryptionKey": "Adding synchronised storage blob encryption key \"{keyName}\"",
|
|
29
|
+
"existingSynchronisedStorageBlobEncryptionKey": "Synchronised storage blob encryption key already exists \"{keyName}\"",
|
|
28
30
|
"creatingUserProfile": "Creating user profile \"{identity}\"",
|
|
29
31
|
"existingUserProfile": "User profile already exists \"{identity}\"",
|
|
30
32
|
"nodeIdentity": "Node identity \"{identity}\"",
|
|
31
33
|
"nodeAdminUserEmail": "Node Admin User Email \"{email}\"",
|
|
32
|
-
"nodeAdminUserPassword": "Node Admin User Password \"{password}\""
|
|
34
|
+
"nodeAdminUserPassword": "Node Admin User Password \"{password}\"",
|
|
35
|
+
"extensionLoading": "Loading Extension",
|
|
36
|
+
"extensionInitialisingEngine": "Initialising engine for extension \"{extension}\"",
|
|
37
|
+
"extensionInitialisingEngineServer": "Initialising engine server for extension \"{extension}\"",
|
|
38
|
+
"extensionShutdown": "Shutdown extension \"{extension}\"",
|
|
39
|
+
"extendingEngine": "Extending Engine",
|
|
40
|
+
"extendingEngineServer": "Extending Engine Server"
|
|
33
41
|
}
|
|
34
42
|
}
|
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.21",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/api-auth-entity-storage-service": "next",
|
|
18
|
+
"@twin.org/cli-core": "next",
|
|
18
19
|
"@twin.org/core": "next",
|
|
19
20
|
"@twin.org/crypto": "next",
|
|
21
|
+
"@twin.org/data-space-connector-models": "next",
|
|
20
22
|
"@twin.org/engine": "next",
|
|
21
23
|
"@twin.org/engine-core": "next",
|
|
22
24
|
"@twin.org/engine-models": "next",
|
|
@@ -26,9 +28,12 @@
|
|
|
26
28
|
"@twin.org/entity": "next",
|
|
27
29
|
"@twin.org/entity-storage-models": "next",
|
|
28
30
|
"@twin.org/identity-models": "next",
|
|
31
|
+
"@twin.org/modules": "next",
|
|
32
|
+
"@twin.org/rights-management-rest-client": "next",
|
|
33
|
+
"@twin.org/standards-w3c-odrl": "next",
|
|
29
34
|
"@twin.org/vault-models": "next",
|
|
30
35
|
"@twin.org/wallet-models": "next",
|
|
31
|
-
"dotenv": "17.2.
|
|
36
|
+
"dotenv": "17.2.2",
|
|
32
37
|
"schema-dts": "1.1.5"
|
|
33
38
|
},
|
|
34
39
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -48,5 +53,16 @@
|
|
|
48
53
|
"dist/types",
|
|
49
54
|
"locales",
|
|
50
55
|
"docs"
|
|
56
|
+
],
|
|
57
|
+
"keywords": [
|
|
58
|
+
"twin",
|
|
59
|
+
"trade",
|
|
60
|
+
"iota",
|
|
61
|
+
"framework",
|
|
62
|
+
"blockchain",
|
|
63
|
+
"node",
|
|
64
|
+
"core",
|
|
65
|
+
"foundation",
|
|
66
|
+
"utilities"
|
|
51
67
|
]
|
|
52
68
|
}
|