@twin.org/node-core 0.0.3-next.66 → 0.0.3-next.67

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 (108) hide show
  1. package/dist/es/builders/engineEnvBuilder.js +21 -19
  2. package/dist/es/builders/engineEnvBuilder.js.map +1 -1
  3. package/dist/es/builders/engineServerEnvBuilder.js +1 -0
  4. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
  5. package/dist/es/builders/extensionsBuilder.js.map +1 -1
  6. package/dist/es/cli.js.map +1 -1
  7. package/dist/es/commands/bootstrapLegacy.js +2 -1
  8. package/dist/es/commands/bootstrapLegacy.js.map +1 -1
  9. package/dist/es/commands/help.js.map +1 -1
  10. package/dist/es/commands/identityCreate.js.map +1 -1
  11. package/dist/es/commands/identityImports.js.map +1 -1
  12. package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -1
  13. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -1
  14. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -1
  15. package/dist/es/commands/nodeSetIdentity.js.map +1 -1
  16. package/dist/es/commands/removeTenantOrgAlias.js.map +1 -1
  17. package/dist/es/commands/setNodeOrgId.js.map +1 -1
  18. package/dist/es/commands/setTenantOrgId.js.map +1 -1
  19. package/dist/es/commands/tenantCreate.js.map +1 -1
  20. package/dist/es/commands/tenantImport.js.map +1 -1
  21. package/dist/es/commands/tenantUpdate.js.map +1 -1
  22. package/dist/es/commands/userCreate.js.map +1 -1
  23. package/dist/es/commands/userUpdate.js.map +1 -1
  24. package/dist/es/commands/vaultKeyCreate.js.map +1 -1
  25. package/dist/es/commands/vaultKeyImport.js.map +1 -1
  26. package/dist/es/index.js +2 -0
  27. package/dist/es/index.js.map +1 -1
  28. package/dist/es/models/IBootstrapLegacyEnvironmentVariables.js +4 -0
  29. package/dist/es/models/IBootstrapLegacyEnvironmentVariables.js.map +1 -0
  30. package/dist/es/models/ICliCommandDefinition.js.map +1 -1
  31. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  32. package/dist/es/models/IEngineServerEnvironmentVariables.js +2 -0
  33. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
  34. package/dist/es/models/IEnvironmentVariables.js +2 -0
  35. package/dist/es/models/IEnvironmentVariables.js.map +1 -0
  36. package/dist/es/models/INodeEnvironmentVariables.js +2 -0
  37. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
  38. package/dist/es/models/INodeOptions.js.map +1 -1
  39. package/dist/es/models/bootstrapLegacyEnvironmentVariableKeys.js +24 -0
  40. package/dist/es/models/bootstrapLegacyEnvironmentVariableKeys.js.map +1 -0
  41. package/dist/es/models/engineEnvironmentVariableKeys.js +202 -0
  42. package/dist/es/models/engineEnvironmentVariableKeys.js.map +1 -0
  43. package/dist/es/models/engineServerEnvironmentVariableKeys.js +35 -0
  44. package/dist/es/models/engineServerEnvironmentVariableKeys.js.map +1 -0
  45. package/dist/es/models/nodeEnvironmentVariableKeys.js +18 -0
  46. package/dist/es/models/nodeEnvironmentVariableKeys.js.map +1 -0
  47. package/dist/es/models/nodeExtensionInitialiseMethod.js.map +1 -1
  48. package/dist/es/node.js +94 -2
  49. package/dist/es/node.js.map +1 -1
  50. package/dist/es/start.js.map +1 -1
  51. package/dist/types/builders/engineServerEnvBuilder.d.ts +3 -3
  52. package/dist/types/builders/extensionsBuilder.d.ts +5 -5
  53. package/dist/types/cli.d.ts +2 -2
  54. package/dist/types/commands/bootstrapLegacy.d.ts +2 -49
  55. package/dist/types/commands/help.d.ts +2 -2
  56. package/dist/types/commands/identityCreate.d.ts +2 -2
  57. package/dist/types/commands/identityImports.d.ts +2 -2
  58. package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +2 -2
  59. package/dist/types/commands/identityVerificationMethodCreate.d.ts +2 -2
  60. package/dist/types/commands/identityVerificationMethodImport.d.ts +2 -2
  61. package/dist/types/commands/nodeSetIdentity.d.ts +2 -2
  62. package/dist/types/commands/removeTenantOrgAlias.d.ts +2 -2
  63. package/dist/types/commands/setNodeOrgId.d.ts +2 -2
  64. package/dist/types/commands/setTenantOrgId.d.ts +2 -2
  65. package/dist/types/commands/tenantCreate.d.ts +2 -2
  66. package/dist/types/commands/tenantImport.d.ts +2 -2
  67. package/dist/types/commands/tenantUpdate.d.ts +2 -2
  68. package/dist/types/commands/userCreate.d.ts +2 -2
  69. package/dist/types/commands/userUpdate.d.ts +2 -2
  70. package/dist/types/commands/vaultKeyCreate.d.ts +2 -2
  71. package/dist/types/commands/vaultKeyImport.d.ts +2 -2
  72. package/dist/types/index.d.ts +2 -0
  73. package/dist/types/models/IBootstrapLegacyEnvironmentVariables.d.ts +56 -0
  74. package/dist/types/models/ICliCommandDefinition.d.ts +2 -2
  75. package/dist/types/models/IEngineEnvironmentVariables.d.ts +39 -22
  76. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +1 -2
  77. package/dist/types/models/IEnvironmentVariables.d.ts +8 -0
  78. package/dist/types/models/INodeEnvironmentVariables.d.ts +1 -2
  79. package/dist/types/models/INodeOptions.d.ts +3 -3
  80. package/dist/types/models/bootstrapLegacyEnvironmentVariableKeys.d.ts +4 -0
  81. package/dist/types/models/engineEnvironmentVariableKeys.d.ts +4 -0
  82. package/dist/types/models/engineServerEnvironmentVariableKeys.d.ts +7 -0
  83. package/dist/types/models/nodeEnvironmentVariableKeys.d.ts +5 -0
  84. package/dist/types/models/nodeExtensionInitialiseMethod.d.ts +2 -2
  85. package/dist/types/node.d.ts +3 -3
  86. package/dist/types/start.d.ts +3 -2
  87. package/docs/changelog.md +12 -0
  88. package/docs/reference/functions/buildConfiguration.md +2 -2
  89. package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
  90. package/docs/reference/functions/executeCommand.md +1 -1
  91. package/docs/reference/functions/extensionsConfiguration.md +1 -1
  92. package/docs/reference/functions/extensionsInitialiseEngine.md +1 -1
  93. package/docs/reference/functions/extensionsInitialiseEngineServer.md +1 -1
  94. package/docs/reference/functions/isAuthEntityStorageRequired.md +1 -1
  95. package/docs/reference/functions/overrideModuleImport.md +1 -1
  96. package/docs/reference/functions/shutdownExtensions.md +1 -1
  97. package/docs/reference/functions/start.md +1 -1
  98. package/docs/reference/index.md +2 -0
  99. package/docs/reference/interfaces/IBootstrapLegacyEnvironmentVariables.md +117 -0
  100. package/docs/reference/interfaces/ICliCommandDefinition.md +1 -1
  101. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +71 -40
  102. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +0 -1954
  103. package/docs/reference/interfaces/INodeEnvironmentVariables.md +0 -2130
  104. package/docs/reference/interfaces/INodeOptions.md +2 -2
  105. package/docs/reference/type-aliases/IEnvironmentVariables.md +5 -0
  106. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +1 -1
  107. package/locales/en.json +7 -1
  108. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { IEngineCore } from "@twin.org/engine-models";
2
2
  import type { CliCommandParamType } from "./cliCommandParamType.js";
3
3
  import type { ICliCommandDefinitionParam } from "./ICliCommandDefinitionParam.js";
4
- import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
4
+ import type { IEnvironmentVariables } from "./IEnvironmentVariables.js";
5
5
  /**
6
6
  * Static definition of a CLI command including its name, parameters, and execution action.
7
7
  */
@@ -25,7 +25,7 @@ export interface ICliCommandDefinition {
25
25
  /**
26
26
  * The method to execute for the command.
27
27
  */
28
- action: (engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
28
+ action: (engineCore: IEngineCore, envVars: IEnvironmentVariables, params: {
29
29
  [id: string]: CliCommandParamType;
30
30
  }) => Promise<unknown>;
31
31
  /**
@@ -10,6 +10,22 @@ export interface IEngineEnvironmentVariables {
10
10
  * Start the engine in silent mode.
11
11
  */
12
12
  silent?: string;
13
+ /**
14
+ * Controls how unrecognised TWIN_* environment variables are handled at startup.
15
+ * "error" (default): throws a startup error, allowing CI and production deployments
16
+ * to hard-fail on misconfigured or misspelled variable names.
17
+ * "warn": logs a warning and continues.
18
+ * "ignore": skips validation entirely.
19
+ * Any other value is rejected at startup.
20
+ * @default "error"
21
+ */
22
+ strictEnv?: string;
23
+ /**
24
+ * Comma-separated list of raw environment variable names to exempt from the unknown-key check.
25
+ * Use this to allowlist variables introduced by custom extensions that are not part of the
26
+ * core interface, e.g. TWIN_MY_EXTENSION_SECRET.
27
+ */
28
+ envAllowList?: string;
13
29
  /**
14
30
  * The root directory for storing items like state file.
15
31
  */
@@ -56,9 +72,9 @@ export interface IEngineEnvironmentVariables {
56
72
  */
57
73
  awsDynamodbSecretAccessKey?: string;
58
74
  /**
59
- * AWS Dynamo DB connection timeout.
75
+ * AWS Dynamo DB connection timeout in milliseconds.
60
76
  */
61
- awsDynamodbConnectionTimeoutMs?: string;
77
+ awsDynamodbConnectionTimeout?: string;
62
78
  /**
63
79
  * Azure Cosmos DB key.
64
80
  */
@@ -283,7 +299,7 @@ export interface IEngineEnvironmentVariables {
283
299
  /**
284
300
  * The batch flush interval in seconds for the logging task, how often to flush the logs when using batching, defaults to 5 seconds.
285
301
  */
286
- loggingBatchFlushIntervalSeconds?: string;
302
+ loggingBatchFlushInterval?: string;
287
303
  /**
288
304
  * A list of components to exclude from logging, can be a comma separated list of component Class names e.g. "ComponentA,ComponentB".
289
305
  */
@@ -359,7 +375,7 @@ export interface IEngineEnvironmentVariables {
359
375
  /**
360
376
  * Polling interval in seconds for the telemetry metrics collector. Defaults to 60.
361
377
  */
362
- telemetryMetricsCollectorIntervalSeconds?: string;
378
+ telemetryMetricsCollectorInterval?: string;
363
379
  /**
364
380
  * The type of telemetry metrics producers, can be a comma separated list: system, process.
365
381
  */
@@ -506,10 +522,10 @@ export interface IEngineEnvironmentVariables {
506
522
  */
507
523
  trustVerificationMethodId?: string;
508
524
  /**
509
- * The trust time to live for generating JWTs.
525
+ * The trust time to live for generating JWTs in seconds.
510
526
  * Defaults to undefined for never expiring.
511
527
  */
512
- trustJwtTtlSeconds?: string;
528
+ trustJwtTtl?: string;
513
529
  /**
514
530
  * The allow lists for the trust identity verifier, comma separated list of identities.
515
531
  */
@@ -562,13 +578,13 @@ export interface IEngineEnvironmentVariables {
562
578
  */
563
579
  dataspaceEnabled?: string;
564
580
  /**
565
- * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
566
- * @default 10
581
+ * The length of time to retain the activity logs for in seconds, set to -1 to keep forever.
582
+ * @default 600
567
583
  */
568
584
  dataspaceRetainActivityLogsFor?: string;
569
585
  /**
570
- * The interval in minutes for cleaning up the activity logs.
571
- * @default 60
586
+ * The interval in seconds for cleaning up the activity logs.
587
+ * @default 3600
572
588
  */
573
589
  dataspaceActivityLogsCleanupInterval?: string;
574
590
  /**
@@ -585,12 +601,12 @@ export interface IEngineEnvironmentVariables {
585
601
  */
586
602
  dataspaceAutoStartTransfers?: string;
587
603
  /**
588
- * How long in minutes a negotiation may sit without progress before it is treated as timed out.
604
+ * How long in seconds a negotiation may sit without progress before it is treated as timed out.
589
605
  * @default 30
590
606
  */
591
607
  dataspaceStalledNegotiationTimeout?: string;
592
608
  /**
593
- * How long in minutes a consumer-initiated transfer may sit in REQUESTED without the provider
609
+ * How long in seconds a consumer-initiated transfer may sit in REQUESTED without the provider
594
610
  * progressing it before it is treated as timed out.
595
611
  * @default 30
596
612
  */
@@ -599,6 +615,7 @@ export interface IEngineEnvironmentVariables {
599
615
  * Path under which the dataspace control plane is mounted (path only, not full URL).
600
616
  * This must match the control-plane REST mount, as it is combined with the public
601
617
  * origin to build the consumer's advertised callback address.
618
+ * @default "dataspace-control-plane"
602
619
  */
603
620
  dataspaceCallbackPath?: string;
604
621
  /**
@@ -608,12 +625,12 @@ export interface IEngineEnvironmentVariables {
608
625
  /**
609
626
  * The interval in seconds for performing health checks, defaults to 60.
610
627
  */
611
- healthIntervalSeconds?: string;
628
+ healthInterval?: string;
612
629
  /**
613
630
  * The interval in seconds for performing health checks at startup, defaults to 2.
614
631
  * This allows components that take a long time to initialize to be healthy before the first health check is performed.
615
632
  */
616
- healthStartupIntervalSeconds?: string;
633
+ healthStartupInterval?: string;
617
634
  /**
618
635
  * The type of the automation action to create, comma separate for more than one connector.
619
636
  * values: fetch
@@ -626,35 +643,35 @@ export interface IEngineEnvironmentVariables {
626
643
  /**
627
644
  * The mutex timeout in milliseconds for the auditable item graph component.
628
645
  */
629
- auditableItemGraphMutexTimeoutMs?: string;
646
+ auditableItemGraphMutexTimeout?: string;
630
647
  /**
631
648
  * The mutex timeout in milliseconds for the auditable item stream component.
632
649
  */
633
- auditableItemStreamMutexTimeoutMs?: string;
650
+ auditableItemStreamMutexTimeout?: string;
634
651
  /**
635
652
  * The mutex timeout in milliseconds for the federated catalogue component.
636
653
  */
637
- federatedCatalogueMutexTimeoutMs?: string;
654
+ federatedCatalogueMutexTimeout?: string;
638
655
  /**
639
656
  * The mutex timeout in milliseconds for the document management component.
640
657
  */
641
- documentManagementMutexTimeoutMs?: string;
658
+ documentManagementMutexTimeout?: string;
642
659
  /**
643
660
  * The mutex timeout in milliseconds for the logging component.
644
661
  */
645
- loggingMutexTimeoutMs?: string;
662
+ loggingMutexTimeout?: string;
646
663
  /**
647
664
  * The mutex timeout in milliseconds for the memory entity storage connector.
648
665
  */
649
- entityStorageMemoryMutexTimeoutMs?: string;
666
+ entityStorageMemoryMutexTimeout?: string;
650
667
  /**
651
668
  * The mutex timeout in milliseconds for the file entity storage connector.
652
669
  */
653
- entityStorageFileMutexTimeoutMs?: string;
670
+ entityStorageFileMutexTimeout?: string;
654
671
  /**
655
672
  * The mutex timeout in milliseconds for the rights management component.
656
673
  */
657
- rightsManagementMutexTimeoutMs?: string;
674
+ rightsManagementMutexTimeout?: string;
658
675
  /**
659
676
  * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
660
677
  */
@@ -1,8 +1,7 @@
1
- import type { IEngineEnvironmentVariables } from "./IEngineEnvironmentVariables.js";
2
1
  /**
3
2
  * The engine server environment variables.
4
3
  */
5
- export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVariables {
4
+ export interface IEngineServerEnvironmentVariables {
6
5
  /**
7
6
  * The port to serve the API from.
8
7
  */
@@ -0,0 +1,8 @@
1
+ import type { IBootstrapLegacyEnvironmentVariables } from "./IBootstrapLegacyEnvironmentVariables.js";
2
+ import type { IEngineEnvironmentVariables } from "./IEngineEnvironmentVariables.js";
3
+ import type { IEngineServerEnvironmentVariables } from "./IEngineServerEnvironmentVariables.js";
4
+ import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
5
+ /**
6
+ * The environment variables.
7
+ */
8
+ export type IEnvironmentVariables = IBootstrapLegacyEnvironmentVariables & INodeEnvironmentVariables & IEngineEnvironmentVariables & IEngineServerEnvironmentVariables;
@@ -1,8 +1,7 @@
1
- import type { IEngineServerEnvironmentVariables } from "./IEngineServerEnvironmentVariables.js";
2
1
  /**
3
2
  * The environment variables for the node.
4
3
  */
5
- export interface INodeEnvironmentVariables extends IEngineServerEnvironmentVariables {
4
+ export interface INodeEnvironmentVariables {
6
5
  /**
7
6
  * Maximum size in MB for HTTPS extensions downloads.
8
7
  * @default 10
@@ -1,7 +1,7 @@
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 { IEnvironmentVariables } from "./IEnvironmentVariables.js";
3
4
  import type { INodeEngineConfig } from "./INodeEngineConfig.js";
4
- import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
5
5
  /**
6
6
  * The options when running the node.
7
7
  */
@@ -63,11 +63,11 @@ export interface INodeOptions {
63
63
  /**
64
64
  * Method to extend the engine environment variables with any additional custom configuration.
65
65
  */
66
- extendEnvVars?: (envVars: INodeEnvironmentVariables) => Promise<void>;
66
+ extendEnvVars?: (envVars: IEnvironmentVariables) => Promise<void>;
67
67
  /**
68
68
  * Method to extend the engine configuration with any additional custom configuration.
69
69
  */
70
- extendConfig?: (envVars: INodeEnvironmentVariables, config: INodeEngineConfig) => Promise<void>;
70
+ extendConfig?: (envVars: IEnvironmentVariables, config: INodeEngineConfig) => Promise<void>;
71
71
  /**
72
72
  * Method to extend the engine with any additional options.
73
73
  */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The set of camelCase property names that are valid IBootstrapLegacyEnvironmentVariables keys.
3
+ */
4
+ export declare const BOOTSTRAP_LEGACY_ENVIRONMENT_VARIABLE_KEYS: ReadonlySet<string>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The set of camelCase property names that are valid IEngineEnvironmentVariables keys.
3
+ */
4
+ export declare const ENGINE_ENVIRONMENT_VARIABLE_KEYS: ReadonlySet<string>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The set of camelCase property names (and wildcard patterns ending with *) that are valid
3
+ * IEngineServerEnvironmentVariables keys.
4
+ * Used at startup to detect unrecognised TWIN_* environment variables (typos, stale names).
5
+ * The "restPath*" entry covers dynamic TWIN_REST_PATH_<COMPONENT_TYPE> variables.
6
+ */
7
+ export declare const ENGINE_SERVER_ENVIRONMENT_VARIABLE_KEYS: ReadonlySet<string>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The set of camelCase property names that are valid INodeEnvironmentVariables keys.
3
+ * Used at startup to detect unrecognised TWIN_* environment variables (typos, stale names).
4
+ */
5
+ export declare const NODE_ENVIRONMENT_VARIABLE_KEYS: ReadonlySet<string>;
@@ -1,9 +1,9 @@
1
+ import type { IEnvironmentVariables } from "./IEnvironmentVariables.js";
1
2
  import type { INodeEngineConfig } from "./INodeEngineConfig.js";
2
- import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
3
3
  /**
4
4
  * The type for the initialise method of an extension module.
5
5
  * @param envVars The environment variables for the node.
6
6
  * @param nodeEngineConfig The node engine config.
7
7
  * @returns A promise that resolves when the extension configuration initialisation is complete.
8
8
  */
9
- export type NodeExtensionInitialiseMethod = (envVars: INodeEnvironmentVariables, nodeEngineConfig: INodeEngineConfig) => Promise<void>;
9
+ export type NodeExtensionInitialiseMethod = (envVars: IEnvironmentVariables, nodeEngineConfig: INodeEngineConfig) => Promise<void>;
@@ -2,9 +2,9 @@ import type { IServerInfo } from "@twin.org/api-models";
2
2
  import type { Engine } from "@twin.org/engine";
3
3
  import type { EngineServer } from "@twin.org/engine-server";
4
4
  import type { IEngineServerConfig } from "@twin.org/engine-server-types";
5
+ import type { IEnvironmentVariables } from "./models/IEnvironmentVariables.js";
5
6
  import type { INodeEngineConfig } from "./models/INodeEngineConfig.js";
6
7
  import type { INodeEngineState } from "./models/INodeEngineState.js";
7
- import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
8
8
  import type { INodeOptions } from "./models/INodeOptions.js";
9
9
  /**
10
10
  * Run the TWIN Node.
@@ -28,7 +28,7 @@ export declare function run(nodeOptions?: INodeOptions, args?: string[]): Promis
28
28
  export declare function buildConfiguration(processEnv: {
29
29
  [id: string]: string;
30
30
  }, options: INodeOptions, serverInfo: IServerInfo): Promise<{
31
- nodeEnvVars: INodeEnvironmentVariables & {
31
+ nodeEnvVars: IEnvironmentVariables & {
32
32
  [id: string]: string | unknown;
33
33
  };
34
34
  nodeEngineConfig: INodeEngineConfig;
@@ -42,4 +42,4 @@ export declare function buildConfiguration(processEnv: {
42
42
  * @param executionDirectory The execution directory for resolving local module paths.
43
43
  * @param envVars The environment variables containing extension configuration (optional, uses defaults if not provided).
44
44
  */
45
- export declare function overrideModuleImport(executionDirectory: string, envVars?: INodeEnvironmentVariables): void;
45
+ export declare function overrideModuleImport(executionDirectory: string, envVars?: IEnvironmentVariables): void;
@@ -2,9 +2,10 @@ import { Engine } from "@twin.org/engine";
2
2
  import { EngineServer } from "@twin.org/engine-server";
3
3
  import type { IEngineServerConfig } from "@twin.org/engine-server-types";
4
4
  import type { ICliCommand } from "./models/ICliCommand.js";
5
+ import type { IEngineEnvironmentVariables } from "./models/IEngineEnvironmentVariables.js";
6
+ import type { IEnvironmentVariables } from "./models/IEnvironmentVariables.js";
5
7
  import type { INodeEngineConfig } from "./models/INodeEngineConfig.js";
6
8
  import type { INodeEngineState } from "./models/INodeEngineState.js";
7
- import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
8
9
  import type { INodeOptions } from "./models/INodeOptions.js";
9
10
  /**
10
11
  * Start the engine server.
@@ -15,7 +16,7 @@ import type { INodeOptions } from "./models/INodeOptions.js";
15
16
  * @param availableContextIdKeys The context ID keys available for operation.
16
17
  * @returns The engine server.
17
18
  */
18
- export declare function start(nodeOptions: INodeOptions | undefined, nodeEngineConfig: INodeEngineConfig, envVars: INodeEnvironmentVariables, cliCommand?: ICliCommand, availableContextIdKeys?: {
19
+ export declare function start(nodeOptions: INodeOptions | undefined, nodeEngineConfig: INodeEngineConfig, envVars: IEnvironmentVariables & IEngineEnvironmentVariables, cliCommand?: ICliCommand, availableContextIdKeys?: {
19
20
  key: string;
20
21
  requiredHandlerFeatures: string[];
21
22
  }[]): Promise<{
package/docs/changelog.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.67](https://github.com/iotaledger/twin-node/compare/node-core-v0.0.3-next.66...node-core-v0.0.3-next.67) (2026-06-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * env var validation ([#243](https://github.com/iotaledger/twin-node/issues/243)) ([569945a](https://github.com/iotaledger/twin-node/commit/569945a751eb52d008a681777a3cba881af1b9a4))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * stalled timeout now is provided in seconds ([#241](https://github.com/iotaledger/twin-node/issues/241)) ([ebd827d](https://github.com/iotaledger/twin-node/commit/ebd827d02a9a4f8ad4f4c84d064d02831ef015cb))
14
+
3
15
  ## [0.0.3-next.66](https://github.com/iotaledger/twin-node/compare/node-core-v0.0.3-next.65...node-core-v0.0.3-next.66) (2026-06-23)
4
16
 
5
17
 
@@ -1,6 +1,6 @@
1
1
  # Function: buildConfiguration()
2
2
 
3
- > **buildConfiguration**(`processEnv`, `options`, `serverInfo`): `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `availableContextIdKeys`: `object`[]; \}\>
3
+ > **buildConfiguration**(`processEnv`, `options`, `serverInfo`): `Promise`\<\{ `nodeEnvVars`: [`IBootstrapLegacyEnvironmentVariables`](../interfaces/IBootstrapLegacyEnvironmentVariables.md) & [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & [`IEngineEnvironmentVariables`](../interfaces/IEngineEnvironmentVariables.md) & [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `availableContextIdKeys`: `object`[]; \}\>
4
4
 
5
5
  Build the configuration for the TWIN Node.
6
6
 
@@ -24,7 +24,7 @@ The server information.
24
24
 
25
25
  ## Returns
26
26
 
27
- `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `availableContextIdKeys`: `object`[]; \}\>
27
+ `Promise`\<\{ `nodeEnvVars`: [`IBootstrapLegacyEnvironmentVariables`](../interfaces/IBootstrapLegacyEnvironmentVariables.md) & [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & [`IEngineEnvironmentVariables`](../interfaces/IEngineEnvironmentVariables.md) & [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `availableContextIdKeys`: `object`[]; \}\>
28
28
 
29
29
  A promise that resolves to the engine server configuration, environment prefix, environment variables,
30
30
  and options.
@@ -8,7 +8,7 @@ Handles the configuration of the server.
8
8
 
9
9
  ### envVars
10
10
 
11
- [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md) & `object`
11
+ [`IBootstrapLegacyEnvironmentVariables`](../interfaces/IBootstrapLegacyEnvironmentVariables.md) & [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & [`IEngineEnvironmentVariables`](../interfaces/IEngineEnvironmentVariables.md) & [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md) & `object`
12
12
 
13
13
  The environment variables for the engine server.
14
14
 
@@ -14,7 +14,7 @@ The engine core.
14
14
 
15
15
  ### envVars
16
16
 
17
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
17
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
18
18
 
19
19
  The environment variables for the node.
20
20
 
@@ -8,7 +8,7 @@ Handles the configuration of the extensions.
8
8
 
9
9
  ### envVars
10
10
 
11
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
11
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
12
12
 
13
13
  The environment variables for the node.
14
14
 
@@ -8,7 +8,7 @@ Handles the initialisation of the extensions when the engine has been constructe
8
8
 
9
9
  ### envVars
10
10
 
11
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
11
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
12
12
 
13
13
  The environment variables for the node.
14
14
 
@@ -8,7 +8,7 @@ Handles the initialisation of the extensions when the engine server has been con
8
8
 
9
9
  ### envVars
10
10
 
11
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
11
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
12
12
 
13
13
  The environment variables for the node.
14
14
 
@@ -9,7 +9,7 @@ Returns true when any component that depends on the authentication entity storag
9
9
 
10
10
  ### envVars
11
11
 
12
- [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md)
12
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
13
13
 
14
14
  The environment variables.
15
15
 
@@ -14,7 +14,7 @@ The execution directory for resolving local module paths.
14
14
 
15
15
  ### envVars?
16
16
 
17
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
17
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
18
18
 
19
19
  The environment variables containing extension configuration (optional, uses defaults if not provided).
20
20
 
@@ -8,7 +8,7 @@ Handles the shutdown of the extensions.
8
8
 
9
9
  ### envVars
10
10
 
11
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
11
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
12
12
 
13
13
  The environment variables for the node.
14
14
 
@@ -20,7 +20,7 @@ The configuration for the engine server.
20
20
 
21
21
  ### envVars
22
22
 
23
- [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
23
+ [`IBootstrapLegacyEnvironmentVariables`](../interfaces/IBootstrapLegacyEnvironmentVariables.md) & [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & [`IEngineEnvironmentVariables`](../interfaces/IEngineEnvironmentVariables.md) & [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md)
24
24
 
25
25
  The environment variables.
26
26
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Interfaces
4
4
 
5
+ - [IBootstrapLegacyEnvironmentVariables](interfaces/IBootstrapLegacyEnvironmentVariables.md)
5
6
  - [ICacheMetadata](interfaces/ICacheMetadata.md)
6
7
  - [ICliArgs](interfaces/ICliArgs.md)
7
8
  - [ICliCommand](interfaces/ICliCommand.md)
@@ -18,6 +19,7 @@
18
19
 
19
20
  ## Type Aliases
20
21
 
22
+ - [IEnvironmentVariables](type-aliases/IEnvironmentVariables.md)
21
23
  - [CliCommandParamType](type-aliases/CliCommandParamType.md)
22
24
  - [ModuleProtocol](type-aliases/ModuleProtocol.md)
23
25
  - [NodeExtensionInitialiseEngineMethod](type-aliases/NodeExtensionInitialiseEngineMethod.md)
@@ -0,0 +1,117 @@
1
+ # Interface: IBootstrapLegacyEnvironmentVariables
2
+
3
+ The environment variables for the bootstrap legacy.
4
+
5
+ ## Properties
6
+
7
+ ### features? {#features}
8
+
9
+ > `optional` **features?**: `string`
10
+
11
+ The features that are enabled on the node.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ []
17
+ ```
18
+
19
+ ***
20
+
21
+ ### nodeIdentity? {#nodeidentity}
22
+
23
+ > `optional` **nodeIdentity?**: `string`
24
+
25
+ The identity of the node which, if empty and node-identity feature is enabled it will be generated.
26
+
27
+ ***
28
+
29
+ ### nodeMnemonic? {#nodemnemonic}
30
+
31
+ > `optional` **nodeMnemonic?**: `string`
32
+
33
+ The mnemonic for the node identity, if empty it will be randomly generated.
34
+
35
+ ***
36
+
37
+ ### tenantId? {#tenantid}
38
+
39
+ > `optional` **tenantId?**: `string`
40
+
41
+ A tenant id to use as a default for the node.
42
+
43
+ ***
44
+
45
+ ### tenantApiKey? {#tenantapikey}
46
+
47
+ > `optional` **tenantApiKey?**: `string`
48
+
49
+ A tenant api key to use as a default for the node.
50
+
51
+ ***
52
+
53
+ ### organizationIdentity? {#organizationidentity}
54
+
55
+ > `optional` **organizationIdentity?**: `string`
56
+
57
+ The organisation identity. If not provided it will be generated.
58
+
59
+ ***
60
+
61
+ ### organizationMnemonic? {#organizationmnemonic}
62
+
63
+ > `optional` **organizationMnemonic?**: `string`
64
+
65
+ The mnemonic for the organisation identity, if empty it will be randomly generated.
66
+
67
+ ***
68
+
69
+ ### adminUserIdentity? {#adminuseridentity}
70
+
71
+ > `optional` **adminUserIdentity?**: `string`
72
+
73
+ If the admin-user feature is enabled, this will be the identity of the user. If not provided it will be generated.
74
+
75
+ ***
76
+
77
+ ### adminUserMnemonic? {#adminusermnemonic}
78
+
79
+ > `optional` **adminUserMnemonic?**: `string`
80
+
81
+ The mnemonic for the admin user, if empty it will be randomly generated.
82
+
83
+ ***
84
+
85
+ ### adminUserName? {#adminusername}
86
+
87
+ > `optional` **adminUserName?**: `string`
88
+
89
+ If the admin-user feature is enabled, this will be the name of the user.
90
+
91
+ #### Default
92
+
93
+ ```ts
94
+ admin@node
95
+ ```
96
+
97
+ ***
98
+
99
+ ### adminUserPassword? {#adminuserpassword}
100
+
101
+ > `optional` **adminUserPassword?**: `string`
102
+
103
+ If the admin-user feature is enabled, this will be the password of the user. If empty it will be randomly generated.
104
+
105
+ ***
106
+
107
+ ### adminUserScope? {#adminuserscope}
108
+
109
+ > `optional` **adminUserScope?**: `string`
110
+
111
+ If the admin-user feature is enabled, this is a comma-separated list of scopes for the user.
112
+
113
+ #### Default
114
+
115
+ ```ts
116
+ tenant-admin,user-admin (when tenant enabled) or user-admin (when tenant disabled)
117
+ ```
@@ -50,7 +50,7 @@ The method to execute for the command.
50
50
 
51
51
  ##### envVars
52
52
 
53
- [`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
53
+ [`IEnvironmentVariables`](../type-aliases/IEnvironmentVariables.md)
54
54
 
55
55
  ##### params
56
56