@twin.org/node-core 0.0.3-next.4 → 0.0.3-next.40
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 +443 -126
- 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 +199 -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 +327 -0
- package/dist/es/commands/identityCreate.js.map +1 -0
- package/dist/es/commands/identityImports.js +82 -0
- package/dist/es/commands/identityImports.js.map +1 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js +146 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodCreate.js +228 -0
- package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodImport.js +126 -0
- package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
- package/dist/es/commands/nodeSetIdentity.js +64 -0
- package/dist/es/commands/nodeSetIdentity.js.map +1 -0
- package/dist/es/commands/nodeSetTenant.js +68 -0
- package/dist/es/commands/nodeSetTenant.js.map +1 -0
- package/dist/es/commands/tenantCreate.js +139 -0
- package/dist/es/commands/tenantCreate.js.map +1 -0
- package/dist/es/commands/tenantImport.js +97 -0
- package/dist/es/commands/tenantImport.js.map +1 -0
- package/dist/es/commands/tenantUpdate.js +94 -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 +191 -0
- package/dist/es/commands/vaultKeyCreate.js.map +1 -0
- package/dist/es/commands/vaultKeyImport.js +104 -0
- package/dist/es/commands/vaultKeyImport.js.map +1 -0
- package/dist/es/defaults.js +19 -1
- 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/start.js +139 -0
- package/dist/es/start.js.map +1 -0
- package/dist/es/utils.js +12 -22
- package/dist/es/utils.js.map +1 -1
- package/dist/types/builders/engineEnvBuilder.d.ts +64 -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/nodeSetTenant.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/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 -1
- 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 +46 -0
- package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +117 -60
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +8 -0
- package/dist/types/models/INodeEngineState.d.ts +0 -8
- 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 +532 -176
- 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 +20 -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 -13
- 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 +101 -0
- package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +420 -311
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +545 -368
- package/docs/reference/interfaces/IModuleProtocol.md +3 -3
- package/docs/reference/interfaces/INodeEngineState.md +4 -20
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +551 -450
- 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 +600 -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 +0 -81
- 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/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +0 -3
|
@@ -4,31 +4,31 @@ The options when running the node.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### serverName?
|
|
7
|
+
### serverName? {#servername}
|
|
8
8
|
|
|
9
|
-
> `optional` **serverName
|
|
9
|
+
> `optional` **serverName?**: `string`
|
|
10
10
|
|
|
11
|
-
The name of the server, defaults to "TWIN Node
|
|
11
|
+
The name of the server, defaults to "TWIN Node".
|
|
12
12
|
|
|
13
13
|
#### Default
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
"TWIN Node
|
|
16
|
+
"TWIN Node"
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### serverVersion?
|
|
21
|
+
### serverVersion? {#serverversion}
|
|
22
22
|
|
|
23
|
-
> `optional` **serverVersion
|
|
23
|
+
> `optional` **serverVersion?**: `string`
|
|
24
24
|
|
|
25
25
|
The version of the server, defaults to the current version.
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### envVars?
|
|
29
|
+
### envVars? {#envvars}
|
|
30
30
|
|
|
31
|
-
> `optional` **envVars
|
|
31
|
+
> `optional` **envVars?**: `object`
|
|
32
32
|
|
|
33
33
|
Additional environment variables to set.
|
|
34
34
|
|
|
@@ -38,25 +38,25 @@ Additional environment variables to set.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### envFilenames?
|
|
41
|
+
### envFilenames? {#envfilenames}
|
|
42
42
|
|
|
43
|
-
> `optional` **envFilenames
|
|
43
|
+
> `optional` **envFilenames?**: `string`[]
|
|
44
44
|
|
|
45
45
|
Additional environment variable filenames to load, defaults to .env.
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
49
|
-
### envPrefix?
|
|
49
|
+
### envPrefix? {#envprefix}
|
|
50
50
|
|
|
51
|
-
> `optional` **envPrefix
|
|
51
|
+
> `optional` **envPrefix?**: `string`
|
|
52
52
|
|
|
53
53
|
The prefix for environment variables, defaults to "TWIN_".
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### configFilenames?
|
|
57
|
+
### configFilenames? {#configfilenames}
|
|
58
58
|
|
|
59
|
-
> `optional` **configFilenames
|
|
59
|
+
> `optional` **configFilenames?**: `string`[]
|
|
60
60
|
|
|
61
61
|
A list of JSON files to load as configuration files.
|
|
62
62
|
The files will be loaded in the order they are provided, and the last one will
|
|
@@ -64,50 +64,58 @@ override any previous values.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### config?
|
|
67
|
+
### config? {#config}
|
|
68
68
|
|
|
69
|
-
> `optional` **config
|
|
69
|
+
> `optional` **config?**: `IEngineConfig`
|
|
70
70
|
|
|
71
71
|
Provides the ability to have some initial custom configuration for the engine.
|
|
72
72
|
This will be merged with any configuration loaded from the environment variables.
|
|
73
73
|
|
|
74
74
|
***
|
|
75
75
|
|
|
76
|
-
###
|
|
76
|
+
### scriptDirectory? {#scriptdirectory}
|
|
77
77
|
|
|
78
|
-
> `optional` **
|
|
78
|
+
> `optional` **scriptDirectory?**: `string`
|
|
79
|
+
|
|
80
|
+
The directory to override the script location, defaults to location of index.js.
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### executionDirectory? {#executiondirectory}
|
|
85
|
+
|
|
86
|
+
> `optional` **executionDirectory?**: `string`
|
|
79
87
|
|
|
80
88
|
The directory to override the execution location, defaults to process directory.
|
|
81
89
|
|
|
82
90
|
***
|
|
83
91
|
|
|
84
|
-
### localesDirectory?
|
|
92
|
+
### localesDirectory? {#localesdirectory}
|
|
85
93
|
|
|
86
|
-
> `optional` **localesDirectory
|
|
94
|
+
> `optional` **localesDirectory?**: `string`
|
|
87
95
|
|
|
88
96
|
The directory to override the locales directory, defaults to the locales directory.
|
|
89
97
|
|
|
90
98
|
***
|
|
91
99
|
|
|
92
|
-
### openApiSpecFile?
|
|
100
|
+
### openApiSpecFile? {#openapispecfile}
|
|
93
101
|
|
|
94
|
-
> `optional` **openApiSpecFile
|
|
102
|
+
> `optional` **openApiSpecFile?**: `string`
|
|
95
103
|
|
|
96
104
|
The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.
|
|
97
105
|
|
|
98
106
|
***
|
|
99
107
|
|
|
100
|
-
### favIconFile?
|
|
108
|
+
### favIconFile? {#faviconfile}
|
|
101
109
|
|
|
102
|
-
> `optional` **favIconFile
|
|
110
|
+
> `optional` **favIconFile?**: `string`
|
|
103
111
|
|
|
104
112
|
The path to the favicon, defaults to static/favicon.png.
|
|
105
113
|
|
|
106
114
|
***
|
|
107
115
|
|
|
108
|
-
### extendEnvVars
|
|
116
|
+
### extendEnvVars? {#extendenvvars}
|
|
109
117
|
|
|
110
|
-
> `optional` **extendEnvVars
|
|
118
|
+
> `optional` **extendEnvVars?**: (`envVars`) => `Promise`\<`void`\>
|
|
111
119
|
|
|
112
120
|
Method to extend the engine environment variables with any additional custom configuration.
|
|
113
121
|
|
|
@@ -123,9 +131,9 @@ Method to extend the engine environment variables with any additional custom con
|
|
|
123
131
|
|
|
124
132
|
***
|
|
125
133
|
|
|
126
|
-
### extendConfig
|
|
134
|
+
### extendConfig? {#extendconfig}
|
|
127
135
|
|
|
128
|
-
> `optional` **extendConfig
|
|
136
|
+
> `optional` **extendConfig?**: (`envVars`, `config`) => `Promise`\<`void`\>
|
|
129
137
|
|
|
130
138
|
Method to extend the engine configuration with any additional custom configuration.
|
|
131
139
|
|
|
@@ -145,9 +153,9 @@ Method to extend the engine configuration with any additional custom configurati
|
|
|
145
153
|
|
|
146
154
|
***
|
|
147
155
|
|
|
148
|
-
### extendEngine
|
|
156
|
+
### extendEngine? {#extendengine}
|
|
149
157
|
|
|
150
|
-
> `optional` **extendEngine
|
|
158
|
+
> `optional` **extendEngine?**: (`engine`) => `Promise`\<`void`\>
|
|
151
159
|
|
|
152
160
|
Method to extend the engine with any additional options.
|
|
153
161
|
|
|
@@ -163,9 +171,9 @@ Method to extend the engine with any additional options.
|
|
|
163
171
|
|
|
164
172
|
***
|
|
165
173
|
|
|
166
|
-
### extendEngineServer
|
|
174
|
+
### extendEngineServer? {#extendengineserver}
|
|
167
175
|
|
|
168
|
-
> `optional` **extendEngineServer
|
|
176
|
+
> `optional` **extendEngineServer?**: (`engineServer`) => `Promise`\<`void`\>
|
|
169
177
|
|
|
170
178
|
Method to extend the engine server with any additional options.
|
|
171
179
|
|
|
@@ -181,17 +189,17 @@ Method to extend the engine server with any additional options.
|
|
|
181
189
|
|
|
182
190
|
***
|
|
183
191
|
|
|
184
|
-
### stateStorage?
|
|
192
|
+
### stateStorage? {#statestorage}
|
|
185
193
|
|
|
186
|
-
> `optional` **stateStorage
|
|
194
|
+
> `optional` **stateStorage?**: `IEngineStateStorage`\<`IEngineState`\>
|
|
187
195
|
|
|
188
196
|
The state storage to use for the engine.
|
|
189
197
|
If not provided, a default file-based state storage will be used.
|
|
190
198
|
|
|
191
199
|
***
|
|
192
200
|
|
|
193
|
-
### disableProcessExitOnFailure?
|
|
201
|
+
### disableProcessExitOnFailure? {#disableprocessexitonfailure}
|
|
194
202
|
|
|
195
|
-
> `optional` **disableProcessExitOnFailure
|
|
203
|
+
> `optional` **disableProcessExitOnFailure?**: `boolean`
|
|
196
204
|
|
|
197
205
|
Disables process.exit calls on fatal errors and throws instead.
|
|
@@ -4,7 +4,7 @@ The result from a protocol handler.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### resolvedPath
|
|
7
|
+
### resolvedPath {#resolvedpath}
|
|
8
8
|
|
|
9
9
|
> **resolvedPath**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The resolved path to the module file.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### cached
|
|
15
|
+
### cached {#cached}
|
|
16
16
|
|
|
17
17
|
> **cached**: `boolean`
|
|
18
18
|
|
|
@@ -6,31 +6,31 @@ The protocol types for modules.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### Local
|
|
9
|
+
### Local {#local}
|
|
10
10
|
|
|
11
11
|
> `readonly` **Local**: `"local"` = `"local"`
|
|
12
12
|
|
|
13
13
|
Local module (starts with . or / or file://).
|
|
14
14
|
|
|
15
|
-
### Npm
|
|
15
|
+
### Npm {#npm}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Npm**: `"npm"` = `"npm"`
|
|
18
18
|
|
|
19
19
|
NPM package (starts with npm:).
|
|
20
20
|
|
|
21
|
-
### Https
|
|
21
|
+
### Https {#https}
|
|
22
22
|
|
|
23
23
|
> `readonly` **Https**: `"https"` = `"https"`
|
|
24
24
|
|
|
25
25
|
HTTPS URL (starts with https://).
|
|
26
26
|
|
|
27
|
-
### Http
|
|
27
|
+
### Http {#http}
|
|
28
28
|
|
|
29
29
|
> `readonly` **Http**: `"http"` = `"http"`
|
|
30
30
|
|
|
31
31
|
HTTP URL (starts with http://).
|
|
32
32
|
|
|
33
|
-
### Default
|
|
33
|
+
### Default {#default}
|
|
34
34
|
|
|
35
35
|
> `readonly` **Default**: `"default"` = `"default"`
|
|
36
36
|
|