@twin.org/node-core 0.0.1-next.8 → 0.0.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 +1168 -70
- package/dist/esm/index.mjs +1169 -74
- 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 +5 -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 +49 -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/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 +7 -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 +14 -14
- package/package.json +15 -15
- 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
|
},
|
|
@@ -13,20 +12,21 @@
|
|
|
13
12
|
"fundingWallet": "Funding wallet \"{address}\"",
|
|
14
13
|
"fundedWallet": "Wallet already funded",
|
|
15
14
|
"generatingNodeIdentity": "Generating node identity",
|
|
16
|
-
"existingNodeIdentity": "Node identity already exists",
|
|
15
|
+
"existingNodeIdentity": "Node identity already exists \"{identity}\"",
|
|
16
|
+
"createdNodeIdentity": "Node identity created \"{identity}\"",
|
|
17
17
|
"identityExplorer": "Identity explorer \"{url}\"",
|
|
18
|
-
"creatingNodeUser": "Creating node user",
|
|
19
|
-
"existingNodeUser": "Node user already exists",
|
|
20
|
-
"creatingAuthKey": "Creating authentication key",
|
|
21
|
-
"existingAuthKey": "Authentication key already exists",
|
|
22
|
-
"addingAttestation": "Adding attestation verification method",
|
|
23
|
-
"existingAttestation": "Attestation verification method already exists",
|
|
24
|
-
"addingImmutableProof": "Adding immutable proof verification method",
|
|
25
|
-
"existingImmutableProof": "Immutable proof verification method already exists",
|
|
26
|
-
"creatingBlobEncryptionKey": "Creating blob encryption key",
|
|
27
|
-
"existingBlobEncryptionKey": "Blob encryption key already exists",
|
|
28
|
-
"creatingUserProfile": "Creating user profile",
|
|
29
|
-
"existingUserProfile": "User profile already exists",
|
|
18
|
+
"creatingNodeUser": "Creating node user \"{email}\"",
|
|
19
|
+
"existingNodeUser": "Node user already exists \"{email}\"",
|
|
20
|
+
"creatingAuthKey": "Creating authentication key \"{keyName}\"",
|
|
21
|
+
"existingAuthKey": "Authentication key already exists \"{keyName}\"",
|
|
22
|
+
"addingAttestation": "Adding attestation verification method \"{methodId}\"",
|
|
23
|
+
"existingAttestation": "Attestation verification method already exists \"{methodId}\"",
|
|
24
|
+
"addingImmutableProof": "Adding immutable proof verification method \"{methodId}\"",
|
|
25
|
+
"existingImmutableProof": "Immutable proof verification method already exists \"{methodId}\"",
|
|
26
|
+
"creatingBlobEncryptionKey": "Creating blob encryption key \"{keyName}\"",
|
|
27
|
+
"existingBlobEncryptionKey": "Blob encryption key already exists \"{keyName}\"",
|
|
28
|
+
"creatingUserProfile": "Creating user profile \"{identity}\"",
|
|
29
|
+
"existingUserProfile": "User profile already exists \"{identity}\"",
|
|
30
30
|
"nodeIdentity": "Node identity \"{identity}\"",
|
|
31
31
|
"nodeAdminUserEmail": "Node Admin User Email \"{email}\"",
|
|
32
32
|
"nodeAdminUserPassword": "Node Admin User Password \"{password}\""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node-core",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-auth-entity-storage-service": "next",
|
|
18
|
-
"@twin.org/core": "
|
|
19
|
-
"@twin.org/crypto": "
|
|
20
|
-
"@twin.org/engine": "next",
|
|
21
|
-
"@twin.org/engine-core": "next",
|
|
22
|
-
"@twin.org/engine-models": "next",
|
|
23
|
-
"@twin.org/engine-server": "next",
|
|
24
|
-
"@twin.org/engine-server-types": "next",
|
|
25
|
-
"@twin.org/engine-types": "next",
|
|
26
|
-
"@twin.org/entity": "
|
|
27
|
-
"@twin.org/entity-storage-models": "
|
|
28
|
-
"@twin.org/identity-models": "
|
|
29
|
-
"@twin.org/vault-models": "
|
|
30
|
-
"@twin.org/wallet-models": "
|
|
17
|
+
"@twin.org/api-auth-entity-storage-service": "^0.0.2-next.1",
|
|
18
|
+
"@twin.org/core": "^0.0.1",
|
|
19
|
+
"@twin.org/crypto": "^0.0.1",
|
|
20
|
+
"@twin.org/engine": "^0.0.2-next.1",
|
|
21
|
+
"@twin.org/engine-core": "^0.0.2-next.1",
|
|
22
|
+
"@twin.org/engine-models": "^0.0.2-next.1",
|
|
23
|
+
"@twin.org/engine-server": "^0.0.2-next.1",
|
|
24
|
+
"@twin.org/engine-server-types": "^0.0.2-next.1",
|
|
25
|
+
"@twin.org/engine-types": "^0.0.2-next.1",
|
|
26
|
+
"@twin.org/entity": "^0.0.1",
|
|
27
|
+
"@twin.org/entity-storage-models": "^0.0.1",
|
|
28
|
+
"@twin.org/identity-models": "^0.0.1",
|
|
29
|
+
"@twin.org/vault-models": "^0.0.1",
|
|
30
|
+
"@twin.org/wallet-models": "^0.0.1",
|
|
31
31
|
"dotenv": "16.5.0",
|
|
32
32
|
"schema-dts": "1.1.5"
|
|
33
33
|
},
|
|
@@ -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.
|