@twin.org/node-core 0.0.2-next.15 → 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.
Files changed (42) hide show
  1. package/dist/cjs/index.cjs +360 -160
  2. package/dist/esm/index.mjs +351 -164
  3. package/dist/types/builders/engineEnvBuilder.d.ts +1 -1
  4. package/dist/types/builders/engineServerEnvBuilder.d.ts +2 -2
  5. package/dist/types/builders/extensionsBuilder.d.ts +31 -0
  6. package/dist/types/defaults.d.ts +6 -0
  7. package/dist/types/index.d.ts +4 -0
  8. package/dist/types/models/IEngineEnvironmentVariables.d.ts +60 -18
  9. package/dist/types/models/INodeEngineConfig.d.ts +6 -0
  10. package/dist/types/models/INodeOptions.d.ts +2 -1
  11. package/dist/types/models/nodeExtensionMethods.d.ts +22 -0
  12. package/dist/types/node.d.ts +2 -2
  13. package/dist/types/server.d.ts +4 -2
  14. package/dist/types/utils.d.ts +18 -0
  15. package/docs/changelog.md +15 -0
  16. package/docs/reference/functions/buildConfiguration.md +2 -2
  17. package/docs/reference/functions/buildEngineConfiguration.md +2 -2
  18. package/docs/reference/functions/buildEngineServerConfiguration.md +3 -3
  19. package/docs/reference/functions/directoryExists.md +19 -0
  20. package/docs/reference/functions/extensionsConfiguration.md +25 -0
  21. package/docs/reference/functions/extensionsInitialiseEngine.md +25 -0
  22. package/docs/reference/functions/extensionsInitialiseEngineServer.md +31 -0
  23. package/docs/reference/functions/getFiles.md +19 -0
  24. package/docs/reference/functions/getSubFolders.md +19 -0
  25. package/docs/reference/functions/shutdownExtensions.md +19 -0
  26. package/docs/reference/functions/start.md +4 -4
  27. package/docs/reference/index.md +17 -0
  28. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +118 -26
  29. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +166 -34
  30. package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
  31. package/docs/reference/interfaces/INodeEnvironmentVariables.md +166 -34
  32. package/docs/reference/interfaces/INodeOptions.md +6 -2
  33. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +18 -0
  34. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +24 -0
  35. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +23 -0
  36. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +3 -0
  37. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +3 -0
  38. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  39. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +3 -0
  40. package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  41. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
  42. package/package.json +13 -2
@@ -5,4 +5,4 @@ import type { IEngineEnvironmentVariables } from "../models/IEngineEnvironmentVa
5
5
  * @param envVars The environment variables.
6
6
  * @returns The config for the core.
7
7
  */
8
- export declare function buildEngineConfiguration(envVars: IEngineEnvironmentVariables): IEngineConfig;
8
+ export declare function buildEngineConfiguration(envVars: IEngineEnvironmentVariables): Promise<IEngineConfig>;
@@ -9,6 +9,6 @@ import type { IEngineServerEnvironmentVariables } from "../models/IEngineServerE
9
9
  * @param serverInfo The server information.
10
10
  * @param openApiSpecPath The path to the open api spec.
11
11
  * @param favIconPath The path to the favicon.
12
- * @returns The the config for the core and the server.
12
+ * @returns The config for the core and the server.
13
13
  */
14
- export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo, openApiSpecPath?: string, favIconPath?: string): IEngineServerConfig;
14
+ export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo, openApiSpecPath?: string, favIconPath?: string): Promise<IEngineServerConfig>;
@@ -0,0 +1,31 @@
1
+ import type { IEngineCore, IEngineServer } from "@twin.org/engine-models";
2
+ import type { INodeEngineConfig } from "../models/INodeEngineConfig";
3
+ import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables";
4
+ /**
5
+ * Handles the configuration of the extensions.
6
+ * @param envVars The environment variables for the node.
7
+ * @param nodeEngineConfig The node engine config.
8
+ * @returns The config for the core and the server.
9
+ */
10
+ export declare function extensionsConfiguration(envVars: INodeEnvironmentVariables, nodeEngineConfig: INodeEngineConfig): Promise<INodeEngineConfig>;
11
+ /**
12
+ * Handles the initialisation of the extensions when the engine has been constructed.
13
+ * @param envVars The environment variables for the node.
14
+ * @param engineCore The engine core instance.
15
+ * @returns Nothing.
16
+ */
17
+ export declare function extensionsInitialiseEngine(envVars: INodeEnvironmentVariables, engineCore: IEngineCore): Promise<void>;
18
+ /**
19
+ * Handles the initialisation of the extensions when the engine server has been constructed.
20
+ * @param envVars The environment variables for the node.
21
+ * @param engineCore The engine core instance.
22
+ * @param engineServer The engine server instance.
23
+ * @returns Nothing.
24
+ */
25
+ export declare function extensionsInitialiseEngineServer(envVars: INodeEnvironmentVariables, engineCore: IEngineCore, engineServer: IEngineServer): Promise<void>;
26
+ /**
27
+ * Handles the shutdown of the extensions.
28
+ * @param envVars The environment variables for the node.
29
+ * @returns Nothing.
30
+ */
31
+ export declare function shutdownExtensions(envVars: INodeEnvironmentVariables): Promise<void>;
@@ -0,0 +1,6 @@
1
+ export declare const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion";
2
+ export declare const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
3
+ export declare const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
4
+ export declare const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID = "synchronised-storage-blob-encryption";
5
+ export declare const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "node-authentication-assertion";
6
+ export declare const AUTH_SIGNING_KEY_ID = "auth-signing";
@@ -1,10 +1,14 @@
1
1
  export * from "./bootstrap";
2
2
  export * from "./builders/engineEnvBuilder";
3
3
  export * from "./builders/engineServerEnvBuilder";
4
+ export * from "./builders/extensionsBuilder";
5
+ export * from "./defaults";
4
6
  export * from "./models/IEngineEnvironmentVariables";
5
7
  export * from "./models/IEngineServerEnvironmentVariables";
8
+ export * from "./models/INodeEngineConfig";
6
9
  export * from "./models/INodeEnvironmentVariables";
7
10
  export * from "./models/INodeOptions";
11
+ export * from "./models/nodeExtensionMethods";
8
12
  export * from "./models/nodeFeatures";
9
13
  export * from "./node";
10
14
  export * from "./server";
@@ -27,6 +27,10 @@ export interface IEngineEnvironmentVariables {
27
27
  * A prefix for all the table in entity-storage, can be empty.
28
28
  */
29
29
  entityStorageTablePrefix?: string;
30
+ /**
31
+ * AWS DynamoDB auth mode, either credentials or pod.
32
+ */
33
+ awsDynamodbAuthMode?: string;
30
34
  /**
31
35
  * AWS Dynamo DB access key id.
32
36
  */
@@ -194,25 +198,29 @@ export interface IEngineEnvironmentVariables {
194
198
  */
195
199
  blobStoragePrefix?: string;
196
200
  /**
197
- * AWS S3 access key id.
201
+ * AWS S3 region.
198
202
  */
199
- awsS3AccessKeyId?: string;
203
+ awsS3Region?: string;
200
204
  /**
201
205
  * AWS S3 bucket name.
202
206
  */
203
207
  awsS3BucketName?: string;
204
208
  /**
205
- * AWS S3 endpoint.
209
+ * AWS S3 auth mode, either credentials or pod, defaults to credentials.
206
210
  */
207
- awsS3Endpoint?: string;
211
+ awsS3AuthMode?: string;
208
212
  /**
209
- * AWS S3 region.
213
+ * AWS S3 access key id.
210
214
  */
211
- awsS3Region?: string;
215
+ awsS3AccessKeyId?: string;
212
216
  /**
213
217
  * AWS S3 secret access key.
214
218
  */
215
219
  awsS3SecretAccessKey?: string;
220
+ /**
221
+ * AWS S3 endpoint.
222
+ */
223
+ awsS3Endpoint?: string;
216
224
  /**
217
225
  * Azure Storage account key.
218
226
  */
@@ -274,25 +282,50 @@ export interface IEngineEnvironmentVariables {
274
282
  */
275
283
  eventBusComponent?: string;
276
284
  /**
277
- * The type of messaging email connector: entity-storage, aws.
285
+ * Are the messaging components enabled, defaults to false.
278
286
  */
279
- messagingEmailConnector?: string;
287
+ messagingEnabled?: string;
280
288
  /**
281
- * The type of messaging sms connector: entity-storage, aws.
289
+ * An initial set of templates for the messages.
290
+ * Use the @json: prefix to specify the path to the JSON file.
282
291
  */
283
- messagingSmsConnector?: string;
292
+ messagingTemplates?: string;
284
293
  /**
285
- * The type of messaging push notification connector: entity-storage, aws.
294
+ * AWS SES region.
286
295
  */
287
- messagingPushNotificationConnector?: string;
296
+ awsSesRegion?: string;
297
+ /**
298
+ * AWS SES auth mode, either credentials or pod, defaults to credentials.
299
+ */
300
+ awsSesAuthMode?: string;
301
+ /**
302
+ * AWS SES secret access key.
303
+ */
304
+ awsSesSecretAccessKey?: string;
305
+ /**
306
+ * AWS SES access key id.
307
+ */
308
+ awsSesAccessKeyId?: string;
309
+ /**
310
+ * AWS SES endpoint.
311
+ */
312
+ awsSesEndpoint?: string;
288
313
  /**
289
314
  * The applications for the push notifications JSON stringified array of IAwsApplicationSettings.
290
315
  */
291
316
  awsMessagingPushNotificationApplications?: string;
292
317
  /**
293
- * The type of messaging component: service.
318
+ * The type of messaging email connector: entity-storage, aws.
294
319
  */
295
- messagingComponent?: string;
320
+ messagingEmailConnector?: string;
321
+ /**
322
+ * The type of messaging sms connector: entity-storage, aws.
323
+ */
324
+ messagingSmsConnector?: string;
325
+ /**
326
+ * The type of messaging push notification connector: entity-storage, aws.
327
+ */
328
+ messagingPushNotificationConnector?: string;
296
329
  /**
297
330
  * The type of telemetry connector: entity-storage.
298
331
  */
@@ -403,7 +436,7 @@ export interface IEngineEnvironmentVariables {
403
436
  synchronisedStorageTrustedUrl?: string;
404
437
  /**
405
438
  * The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.
406
- * This only required if using a custom verifiable storage item, otherwise it will default the the network name.
439
+ * This only required if using a custom verifiable storage item, otherwise it will default to the network name.
407
440
  */
408
441
  synchronisedStorageVerifiableStorageKeyId?: string;
409
442
  /**
@@ -501,10 +534,15 @@ export interface IEngineEnvironmentVariables {
501
534
  */
502
535
  dataSpaceConnectorEnabled?: string;
503
536
  /**
504
- * The application configuration for the data space connector.
505
- * Use the @json: prefix to specify the path to the JSON configuration file.
537
+ * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
538
+ * @default 10
506
539
  */
507
- dataSpaceConnectorApps?: string;
540
+ dataSpaceConnectorRetainActivityLogsFor?: string;
541
+ /**
542
+ * The interval for cleaning up the activity logs.
543
+ * @default 60
544
+ */
545
+ dataSpaceConnectorActivityLogsCleanUpInterval?: string;
508
546
  /**
509
547
  * Enable verifiable credential authentication for the API.
510
548
  */
@@ -514,4 +552,8 @@ export interface IEngineEnvironmentVariables {
514
552
  * Defaults to node-authentication-assertion.
515
553
  */
516
554
  vcAuthenticationVerificationMethodId?: string;
555
+ /**
556
+ * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
557
+ */
558
+ extensions?: string;
517
559
  }
@@ -0,0 +1,6 @@
1
+ import type { IEngineServerConfig } from "@twin.org/engine-server-types";
2
+ /**
3
+ * The config for the node.
4
+ */
5
+ export interface INodeEngineConfig extends IEngineServerConfig {
6
+ }
@@ -1,5 +1,6 @@
1
1
  import type { IEngineCore, IEngineServer, IEngineStateStorage } from "@twin.org/engine-models";
2
2
  import type { IEngineConfig } from "@twin.org/engine-types";
3
+ import type { INodeEngineConfig } from "./INodeEngineConfig";
3
4
  import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables";
4
5
  /**
5
6
  * The options when running the node.
@@ -56,7 +57,7 @@ export interface INodeOptions {
56
57
  /**
57
58
  * Method to extend the engine configuration with any additional custom configuration.
58
59
  */
59
- extendConfig?: (config: IEngineConfig) => Promise<void>;
60
+ extendConfig?: (envVars: INodeEnvironmentVariables, config: INodeEngineConfig) => Promise<void>;
60
61
  /**
61
62
  * Method to extend the engine with any additional options.
62
63
  */
@@ -0,0 +1,22 @@
1
+ import type { IEngineCore, IEngineServer } from "@twin.org/engine-models";
2
+ import type { INodeEngineConfig } from "./INodeEngineConfig";
3
+ import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables";
4
+ /**
5
+ * The type for the initialise method of an extension module.
6
+ * @param envVars The environment variables for the node.
7
+ * @param nodeEngineConfig The node engine config.
8
+ */
9
+ export type NodeExtensionInitialiseMethod = (envVars: INodeEnvironmentVariables, nodeEngineConfig: INodeEngineConfig) => Promise<void>;
10
+ /**
11
+ * The type for the initialise engine method of an extension module.
12
+ * This is called when the engine has been constructed but not yet started.
13
+ * @param engineCore The engine core instance.
14
+ */
15
+ export type NodeExtensionInitialiseEngineMethod = (engineCore: IEngineCore) => Promise<void>;
16
+ /**
17
+ * The type for the initialise engine server method of an extension module.
18
+ * This is called when the engine server has been constructed but not yet started.
19
+ * @param engineCore The engine core instance.
20
+ * @param engineServer The engine server instance.
21
+ */
22
+ export type NodeExtensionInitialiseEngineServerMethod = (engineCore: IEngineCore, engineServer: IEngineServer) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { IServerInfo } from "@twin.org/api-models";
2
- import type { IEngineServerConfig } from "@twin.org/engine-server-types";
2
+ import type { INodeEngineConfig } from "./models/INodeEngineConfig";
3
3
  import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables";
4
4
  import type { INodeOptions } from "./models/INodeOptions";
5
5
  /**
@@ -22,7 +22,7 @@ export declare function buildConfiguration(processEnv: {
22
22
  nodeEnvVars: INodeEnvironmentVariables & {
23
23
  [id: string]: string | unknown;
24
24
  };
25
- engineServerConfig: IEngineServerConfig;
25
+ nodeEngineConfig: INodeEngineConfig;
26
26
  }>;
27
27
  /**
28
28
  * Override module imports to use local files where possible.
@@ -2,16 +2,18 @@ import { Engine } from "@twin.org/engine";
2
2
  import { type IEngineState } from "@twin.org/engine-models";
3
3
  import { EngineServer } from "@twin.org/engine-server";
4
4
  import type { IEngineServerConfig } from "@twin.org/engine-server-types";
5
+ import type { INodeEngineConfig } from "./models/INodeEngineConfig";
5
6
  import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables";
6
7
  import type { INodeOptions } from "./models/INodeOptions";
7
8
  /**
8
9
  * Start the engine server.
9
10
  * @param nodeOptions Optional run options for the engine server.
10
- * @param engineServerConfig The configuration for the engine server.
11
+ * @param nodeEngineConfig The configuration for the engine server.
11
12
  * @param envVars The environment variables.
12
13
  * @returns The engine server.
13
14
  */
14
- export declare function start(nodeOptions: INodeOptions | undefined, engineServerConfig: IEngineServerConfig, envVars: INodeEnvironmentVariables): Promise<{
15
+ export declare function start(nodeOptions: INodeOptions | undefined, nodeEngineConfig: INodeEngineConfig, envVars: INodeEnvironmentVariables): Promise<{
15
16
  engine: Engine<IEngineServerConfig, IEngineState>;
16
17
  server: EngineServer;
18
+ shutdown: () => Promise<void>;
17
19
  } | undefined>;
@@ -16,6 +16,24 @@ export declare function getExecutionDirectory(): string;
16
16
  * @returns True if the file exists.
17
17
  */
18
18
  export declare function fileExists(filename: string): Promise<boolean>;
19
+ /**
20
+ * Does the specified directory exist.
21
+ * @param directory The directory to check for existence.
22
+ * @returns True if the directory exists.
23
+ */
24
+ export declare function directoryExists(directory: string): Promise<boolean>;
25
+ /**
26
+ * Get the sub folders for the folder.
27
+ * @param directory The directory to get the sub folders.
28
+ * @returns The list of sub folders.
29
+ */
30
+ export declare function getSubFolders(directory: string): Promise<string[]>;
31
+ /**
32
+ * Get the files in the directory.
33
+ * @param directory The directory to get the files from.
34
+ * @returns The list of files in the directory.
35
+ */
36
+ export declare function getFiles(directory: string): Promise<string[]>;
19
37
  /**
20
38
  * Load the text file.
21
39
  * @param filename The filename of the text file to load.
package/docs/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @twin.org/node-core - Changelog
2
2
 
3
+ ## [0.0.2-next.17](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.16...node-core-v0.0.2-next.17) (2025-10-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * add extensions support ([476d5a8](https://github.com/twinfoundation/node/commit/476d5a864026a2f78e5b02bc9eb81359777a4a45))
9
+ * updating linting ([feacd17](https://github.com/twinfoundation/node/commit/feacd178bb025bcd29a0ae6e4b8e79f23a989169))
10
+
11
+ ## [0.0.2-next.16](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.15...node-core-v0.0.2-next.16) (2025-09-29)
12
+
13
+
14
+ ### Features
15
+
16
+ * update framework components ([4bee2b9](https://github.com/twinfoundation/node/commit/4bee2b9d3651df09b8550a9ed226be1b46031854))
17
+
3
18
  ## [0.0.2-next.15](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.14...node-core-v0.0.2-next.15) (2025-09-26)
4
19
 
5
20
 
@@ -1,6 +1,6 @@
1
1
  # Function: buildConfiguration()
2
2
 
3
- > **buildConfiguration**(`processEnv`, `options`, `serverInfo`): `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `engineServerConfig`: `IEngineServerConfig`; \}\>
3
+ > **buildConfiguration**(`processEnv`, `options`, `serverInfo`): `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); \}\>
4
4
 
5
5
  Build the configuration for the TWIN Node server.
6
6
 
@@ -24,7 +24,7 @@ The server information.
24
24
 
25
25
  ## Returns
26
26
 
27
- `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `engineServerConfig`: `IEngineServerConfig`; \}\>
27
+ `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); \}\>
28
28
 
29
29
  A promise that resolves to the engine server configuration, environment prefix, environment variables,
30
30
  and options.
@@ -1,6 +1,6 @@
1
1
  # Function: buildEngineConfiguration()
2
2
 
3
- > **buildEngineConfiguration**(`envVars`): `IEngineConfig`
3
+ > **buildEngineConfiguration**(`envVars`): `Promise`\<`IEngineConfig`\>
4
4
 
5
5
  Build the engine core configuration from environment variables.
6
6
 
@@ -14,6 +14,6 @@ The environment variables.
14
14
 
15
15
  ## Returns
16
16
 
17
- `IEngineConfig`
17
+ `Promise`\<`IEngineConfig`\>
18
18
 
19
19
  The config for the core.
@@ -1,6 +1,6 @@
1
1
  # Function: buildEngineServerConfiguration()
2
2
 
3
- > **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `IEngineServerConfig`
3
+ > **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `Promise`\<`IEngineServerConfig`\>
4
4
 
5
5
  Handles the configuration of the server.
6
6
 
@@ -38,6 +38,6 @@ The path to the favicon.
38
38
 
39
39
  ## Returns
40
40
 
41
- `IEngineServerConfig`
41
+ `Promise`\<`IEngineServerConfig`\>
42
42
 
43
- The the config for the core and the server.
43
+ The config for the core and the server.
@@ -0,0 +1,19 @@
1
+ # Function: directoryExists()
2
+
3
+ > **directoryExists**(`directory`): `Promise`\<`boolean`\>
4
+
5
+ Does the specified directory exist.
6
+
7
+ ## Parameters
8
+
9
+ ### directory
10
+
11
+ `string`
12
+
13
+ The directory to check for existence.
14
+
15
+ ## Returns
16
+
17
+ `Promise`\<`boolean`\>
18
+
19
+ True if the directory exists.
@@ -0,0 +1,25 @@
1
+ # Function: extensionsConfiguration()
2
+
3
+ > **extensionsConfiguration**(`envVars`, `nodeEngineConfig`): `Promise`\<[`INodeEngineConfig`](../interfaces/INodeEngineConfig.md)\>
4
+
5
+ Handles the configuration of the extensions.
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`\<[`INodeEngineConfig`](../interfaces/INodeEngineConfig.md)\>
24
+
25
+ The config for the core and the server.
@@ -0,0 +1,25 @@
1
+ # Function: extensionsInitialiseEngine()
2
+
3
+ > **extensionsInitialiseEngine**(`envVars`, `engineCore`): `Promise`\<`void`\>
4
+
5
+ Handles the initialisation of the extensions when the engine has been constructed.
6
+
7
+ ## Parameters
8
+
9
+ ### envVars
10
+
11
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
12
+
13
+ The environment variables for the node.
14
+
15
+ ### engineCore
16
+
17
+ `IEngineCore`
18
+
19
+ The engine core instance.
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`void`\>
24
+
25
+ Nothing.
@@ -0,0 +1,31 @@
1
+ # Function: extensionsInitialiseEngineServer()
2
+
3
+ > **extensionsInitialiseEngineServer**(`envVars`, `engineCore`, `engineServer`): `Promise`\<`void`\>
4
+
5
+ Handles the initialisation of the extensions when the engine server has been constructed.
6
+
7
+ ## Parameters
8
+
9
+ ### envVars
10
+
11
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
12
+
13
+ The environment variables for the node.
14
+
15
+ ### engineCore
16
+
17
+ `IEngineCore`
18
+
19
+ The engine core instance.
20
+
21
+ ### engineServer
22
+
23
+ `IEngineServer`
24
+
25
+ The engine server instance.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`void`\>
30
+
31
+ Nothing.
@@ -0,0 +1,19 @@
1
+ # Function: getFiles()
2
+
3
+ > **getFiles**(`directory`): `Promise`\<`string`[]\>
4
+
5
+ Get the files in the directory.
6
+
7
+ ## Parameters
8
+
9
+ ### directory
10
+
11
+ `string`
12
+
13
+ The directory to get the files from.
14
+
15
+ ## Returns
16
+
17
+ `Promise`\<`string`[]\>
18
+
19
+ The list of files in the directory.
@@ -0,0 +1,19 @@
1
+ # Function: getSubFolders()
2
+
3
+ > **getSubFolders**(`directory`): `Promise`\<`string`[]\>
4
+
5
+ Get the sub folders for the folder.
6
+
7
+ ## Parameters
8
+
9
+ ### directory
10
+
11
+ `string`
12
+
13
+ The directory to get the sub folders.
14
+
15
+ ## Returns
16
+
17
+ `Promise`\<`string`[]\>
18
+
19
+ The list of sub folders.
@@ -0,0 +1,19 @@
1
+ # Function: shutdownExtensions()
2
+
3
+ > **shutdownExtensions**(`envVars`): `Promise`\<`void`\>
4
+
5
+ Handles the shutdown of the extensions.
6
+
7
+ ## Parameters
8
+
9
+ ### envVars
10
+
11
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
12
+
13
+ The environment variables for the node.
14
+
15
+ ## Returns
16
+
17
+ `Promise`\<`void`\>
18
+
19
+ Nothing.
@@ -1,6 +1,6 @@
1
1
  # Function: start()
2
2
 
3
- > **start**(`nodeOptions`, `engineServerConfig`, `envVars`): `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; \}\>
3
+ > **start**(`nodeOptions`, `nodeEngineConfig`, `envVars`): `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
4
4
 
5
5
  Start the engine server.
6
6
 
@@ -12,9 +12,9 @@ Optional run options for the engine server.
12
12
 
13
13
  `undefined` | [`INodeOptions`](../interfaces/INodeOptions.md)
14
14
 
15
- ### engineServerConfig
15
+ ### nodeEngineConfig
16
16
 
17
- `IEngineServerConfig`
17
+ [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md)
18
18
 
19
19
  The configuration for the engine server.
20
20
 
@@ -26,6 +26,6 @@ The environment variables.
26
26
 
27
27
  ## Returns
28
28
 
29
- `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; \}\>
29
+ `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
30
30
 
31
31
  The engine server.
@@ -4,15 +4,25 @@
4
4
 
5
5
  - [IEngineEnvironmentVariables](interfaces/IEngineEnvironmentVariables.md)
6
6
  - [IEngineServerEnvironmentVariables](interfaces/IEngineServerEnvironmentVariables.md)
7
+ - [INodeEngineConfig](interfaces/INodeEngineConfig.md)
7
8
  - [INodeEnvironmentVariables](interfaces/INodeEnvironmentVariables.md)
8
9
  - [INodeOptions](interfaces/INodeOptions.md)
9
10
 
10
11
  ## Type Aliases
11
12
 
13
+ - [NodeExtensionInitialiseMethod](type-aliases/NodeExtensionInitialiseMethod.md)
14
+ - [NodeExtensionInitialiseEngineMethod](type-aliases/NodeExtensionInitialiseEngineMethod.md)
15
+ - [NodeExtensionInitialiseEngineServerMethod](type-aliases/NodeExtensionInitialiseEngineServerMethod.md)
12
16
  - [NodeFeatures](type-aliases/NodeFeatures.md)
13
17
 
14
18
  ## Variables
15
19
 
20
+ - [ATTESTATION\_VERIFICATION\_METHOD\_ID](variables/ATTESTATION_VERIFICATION_METHOD_ID.md)
21
+ - [IMMUTABLE\_PROOF\_VERIFICATION\_METHOD\_ID](variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md)
22
+ - [BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID](variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md)
23
+ - [SYNCHRONISED\_STORAGE\_BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID](variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md)
24
+ - [VC\_AUTHENTICATION\_VERIFICATION\_METHOD\_ID](variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md)
25
+ - [AUTH\_SIGNING\_KEY\_ID](variables/AUTH_SIGNING_KEY_ID.md)
16
26
  - [NodeFeatures](variables/NodeFeatures.md)
17
27
 
18
28
  ## Functions
@@ -26,6 +36,10 @@
26
36
  - [bootstrapSynchronisedStorage](functions/bootstrapSynchronisedStorage.md)
27
37
  - [buildEngineConfiguration](functions/buildEngineConfiguration.md)
28
38
  - [buildEngineServerConfiguration](functions/buildEngineServerConfiguration.md)
39
+ - [extensionsConfiguration](functions/extensionsConfiguration.md)
40
+ - [extensionsInitialiseEngine](functions/extensionsInitialiseEngine.md)
41
+ - [extensionsInitialiseEngineServer](functions/extensionsInitialiseEngineServer.md)
42
+ - [shutdownExtensions](functions/shutdownExtensions.md)
29
43
  - [run](functions/run.md)
30
44
  - [buildConfiguration](functions/buildConfiguration.md)
31
45
  - [overrideModuleImport](functions/overrideModuleImport.md)
@@ -33,6 +47,9 @@
33
47
  - [initialiseLocales](functions/initialiseLocales.md)
34
48
  - [getExecutionDirectory](functions/getExecutionDirectory.md)
35
49
  - [fileExists](functions/fileExists.md)
50
+ - [directoryExists](functions/directoryExists.md)
51
+ - [getSubFolders](functions/getSubFolders.md)
52
+ - [getFiles](functions/getFiles.md)
36
53
  - [loadTextFile](functions/loadTextFile.md)
37
54
  - [loadJsonFile](functions/loadJsonFile.md)
38
55
  - [getFeatures](functions/getFeatures.md)