@twin.org/node-core 0.0.1-next.9 → 0.0.2-next.1
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 +1141 -53
- package/dist/esm/index.mjs +1141 -57
- package/dist/types/bootstrap.d.ts +9 -10
- package/dist/types/builders/engineEnvBuilder.d.ts +8 -0
- package/dist/types/builders/engineServerEnvBuilder.d.ts +13 -0
- package/dist/types/index.d.ts +6 -3
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +389 -0
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +49 -0
- package/dist/types/models/{INodeVariables.d.ts → INodeEnvironmentVariables.d.ts} +3 -3
- package/dist/types/models/{IRunOptions.d.ts → INodeOptions.d.ts} +17 -1
- package/dist/types/node.d.ts +22 -3
- package/dist/types/server.d.ts +7 -14
- package/dist/types/utils.d.ts +8 -2
- package/docs/changelog.md +68 -0
- package/docs/reference/functions/bootstrap.md +2 -2
- package/docs/reference/functions/bootstrapAttestationMethod.md +2 -2
- package/docs/reference/functions/bootstrapAuth.md +2 -2
- package/docs/reference/functions/bootstrapBlobEncryption.md +2 -2
- package/docs/reference/functions/bootstrapImmutableProofMethod.md +2 -2
- package/docs/reference/functions/bootstrapNodeIdentity.md +2 -2
- package/docs/reference/functions/bootstrapNodeUser.md +2 -2
- package/docs/reference/functions/buildConfiguration.md +30 -0
- package/docs/reference/functions/buildEngineConfiguration.md +19 -0
- package/docs/reference/functions/buildEngineServerConfiguration.md +37 -0
- package/docs/reference/functions/getFeatures.md +1 -1
- package/docs/reference/functions/loadJsonFile.md +25 -0
- package/docs/reference/functions/run.md +3 -3
- package/docs/reference/functions/start.md +9 -39
- package/docs/reference/index.md +8 -3
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +775 -0
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +95 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +1343 -0
- package/docs/reference/interfaces/{IRunOptions.md → INodeOptions.md} +38 -1
- package/locales/en.json +0 -1
- package/package.json +1 -1
- package/dist/types/models/INodeState.d.ts +0 -10
- package/docs/reference/interfaces/INodeState.md +0 -15
- package/docs/reference/interfaces/INodeVariables.md +0 -59
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Interface:
|
|
1
|
+
# Interface: INodeOptions
|
|
2
2
|
|
|
3
3
|
The options when running the node.
|
|
4
4
|
|
|
@@ -42,6 +42,25 @@ The prefix for environment variables, defaults to "TWIN_NODE_".
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
+
### configFilenames?
|
|
46
|
+
|
|
47
|
+
> `optional` **configFilenames**: `string`[]
|
|
48
|
+
|
|
49
|
+
A list of JSON files to load as configuration files.
|
|
50
|
+
The files will be loaded in the order they are provided, and the last one will
|
|
51
|
+
override any previous values.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### config?
|
|
56
|
+
|
|
57
|
+
> `optional` **config**: `IEngineConfig`
|
|
58
|
+
|
|
59
|
+
Provides the ability to have some initial custom configuration for the engine.
|
|
60
|
+
This will be merged with any configuration loaded from the environment variables.
|
|
61
|
+
|
|
62
|
+
***
|
|
63
|
+
|
|
45
64
|
### executionDirectory?
|
|
46
65
|
|
|
47
66
|
> `optional` **executionDirectory**: `string`
|
|
@@ -66,6 +85,24 @@ The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.
|
|
|
66
85
|
|
|
67
86
|
***
|
|
68
87
|
|
|
88
|
+
### extendEnvVars()?
|
|
89
|
+
|
|
90
|
+
> `optional` **extendEnvVars**: (`envVars`) => `Promise`\<`void`\>
|
|
91
|
+
|
|
92
|
+
Method to extend the engine environment variables with any additional custom configuration.
|
|
93
|
+
|
|
94
|
+
#### Parameters
|
|
95
|
+
|
|
96
|
+
##### envVars
|
|
97
|
+
|
|
98
|
+
[`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`Promise`\<`void`\>
|
|
103
|
+
|
|
104
|
+
***
|
|
105
|
+
|
|
69
106
|
### extendConfig()?
|
|
70
107
|
|
|
71
108
|
> `optional` **extendConfig**: (`config`) => `Promise`\<`void`\>
|
package/locales/en.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"error": {
|
|
3
3
|
"node": {
|
|
4
|
-
"noEnvVars": "There are no environment variables starting \"{prefix}\" the server will not start without them, please set them in the shell or create a .env file",
|
|
5
4
|
"storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file"
|
|
6
5
|
}
|
|
7
6
|
},
|
package/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Interface: INodeVariables
|
|
2
|
-
|
|
3
|
-
The environment variables for the node.
|
|
4
|
-
|
|
5
|
-
## Extends
|
|
6
|
-
|
|
7
|
-
- `IEngineEnvironmentVariables`.`IEngineServerEnvironmentVariables`
|
|
8
|
-
|
|
9
|
-
## Properties
|
|
10
|
-
|
|
11
|
-
### features?
|
|
12
|
-
|
|
13
|
-
> `optional` **features**: `string`
|
|
14
|
-
|
|
15
|
-
The features that are enabled on the node.
|
|
16
|
-
|
|
17
|
-
#### Default
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
[NodeFeatures.NodeIdentity]
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
***
|
|
24
|
-
|
|
25
|
-
### identity?
|
|
26
|
-
|
|
27
|
-
> `optional` **identity**: `string`
|
|
28
|
-
|
|
29
|
-
The identity of the node which, if empty and node-identity feature is enabled it will be generated.
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
|
-
### mnemonic?
|
|
34
|
-
|
|
35
|
-
> `optional` **mnemonic**: `string`
|
|
36
|
-
|
|
37
|
-
The mnemonic for the identity, if empty and node-identity feature is enabled it will be randomly generated.
|
|
38
|
-
|
|
39
|
-
***
|
|
40
|
-
|
|
41
|
-
### username?
|
|
42
|
-
|
|
43
|
-
> `optional` **username**: `string`
|
|
44
|
-
|
|
45
|
-
If the node-user feature is enabled, this will be the name of the user.
|
|
46
|
-
|
|
47
|
-
#### Default
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
admin@node
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### password?
|
|
56
|
-
|
|
57
|
-
> `optional` **password**: `string`
|
|
58
|
-
|
|
59
|
-
If the node-user feature is enabled, this will be the password of the user, if empty it will be randomly generated.
|