@twin.org/node-core 0.0.2-next.25 → 0.0.2-next.27

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 (107) hide show
  1. package/README.md +1 -1
  2. package/dist/es/bootstrap.js +374 -0
  3. package/dist/es/bootstrap.js.map +1 -0
  4. package/dist/es/builders/engineEnvBuilder.js +1051 -0
  5. package/dist/es/builders/engineEnvBuilder.js.map +1 -0
  6. package/dist/es/builders/engineServerEnvBuilder.js +197 -0
  7. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -0
  8. package/dist/es/builders/extensionsBuilder.js +100 -0
  9. package/dist/es/builders/extensionsBuilder.js.map +1 -0
  10. package/dist/es/defaults.js +9 -0
  11. package/dist/es/defaults.js.map +1 -0
  12. package/dist/es/identity.js +169 -0
  13. package/dist/es/identity.js.map +1 -0
  14. package/dist/es/index.js +23 -0
  15. package/dist/es/index.js.map +1 -0
  16. package/dist/es/models/ICacheMetadata.js +4 -0
  17. package/dist/es/models/ICacheMetadata.js.map +1 -0
  18. package/dist/es/models/IEngineEnvironmentVariables.js +4 -0
  19. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -0
  20. package/dist/es/models/IEngineServerEnvironmentVariables.js +2 -0
  21. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -0
  22. package/dist/es/models/IModuleProtocol.js +2 -0
  23. package/dist/es/models/IModuleProtocol.js.map +1 -0
  24. package/dist/es/models/INodeEngineConfig.js +2 -0
  25. package/dist/es/models/INodeEngineConfig.js.map +1 -0
  26. package/dist/es/models/INodeEngineState.js +2 -0
  27. package/dist/es/models/INodeEngineState.js.map +1 -0
  28. package/dist/es/models/INodeEnvironmentVariables.js +2 -0
  29. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -0
  30. package/dist/es/models/INodeOptions.js +2 -0
  31. package/dist/es/models/INodeOptions.js.map +1 -0
  32. package/dist/es/models/IProtocolHandlerResult.js +4 -0
  33. package/dist/es/models/IProtocolHandlerResult.js.map +1 -0
  34. package/dist/es/models/moduleProtocol.js +29 -0
  35. package/dist/es/models/moduleProtocol.js.map +1 -0
  36. package/dist/es/models/nodeExtensionMethods.js +2 -0
  37. package/dist/es/models/nodeExtensionMethods.js.map +1 -0
  38. package/dist/es/models/nodeFeatures.js +21 -0
  39. package/dist/es/models/nodeFeatures.js.map +1 -0
  40. package/dist/es/node.js +265 -0
  41. package/dist/es/node.js.map +1 -0
  42. package/dist/es/server.js +74 -0
  43. package/dist/es/server.js.map +1 -0
  44. package/dist/es/utils.js +418 -0
  45. package/dist/es/utils.js.map +1 -0
  46. package/dist/types/bootstrap.d.ts +27 -10
  47. package/dist/types/builders/engineEnvBuilder.d.ts +3 -2
  48. package/dist/types/builders/engineServerEnvBuilder.d.ts +3 -2
  49. package/dist/types/builders/extensionsBuilder.d.ts +2 -2
  50. package/dist/types/identity.d.ts +14 -0
  51. package/dist/types/index.d.ts +20 -15
  52. package/dist/types/models/ICacheMetadata.d.ts +17 -0
  53. package/dist/types/models/IEngineEnvironmentVariables.d.ts +12 -5
  54. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +1 -1
  55. package/dist/types/models/IModuleProtocol.d.ts +18 -0
  56. package/dist/types/models/INodeEngineState.d.ts +22 -0
  57. package/dist/types/models/INodeEnvironmentVariables.d.ts +49 -8
  58. package/dist/types/models/INodeOptions.d.ts +13 -3
  59. package/dist/types/models/IProtocolHandlerResult.d.ts +13 -0
  60. package/dist/types/models/moduleProtocol.d.ts +29 -0
  61. package/dist/types/models/nodeExtensionMethods.d.ts +2 -2
  62. package/dist/types/models/nodeFeatures.d.ts +5 -5
  63. package/dist/types/node.d.ts +17 -7
  64. package/dist/types/server.d.ts +7 -6
  65. package/dist/types/utils.d.ts +69 -2
  66. package/docs/changelog.md +7 -0
  67. package/docs/detailed-guide.md +129 -0
  68. package/docs/reference/functions/bootstrap.md +1 -1
  69. package/docs/reference/functions/bootstrapAuth.md +1 -1
  70. package/docs/reference/functions/bootstrapBlobEncryption.md +1 -1
  71. package/docs/reference/functions/bootstrapContextIdHandlers.md +35 -0
  72. package/docs/reference/functions/bootstrapImmutableProofMethod.md +1 -1
  73. package/docs/reference/functions/{bootstrapNodeUser.md → bootstrapNodeAdminUser.md} +3 -3
  74. package/docs/reference/functions/{bootstrapNodeIdentity.md → bootstrapNodeId.md} +3 -3
  75. package/docs/reference/functions/bootstrapSynchronisedStorage.md +1 -1
  76. package/docs/reference/functions/bootstrapTenantId.md +35 -0
  77. package/docs/reference/functions/buildConfiguration.md +2 -2
  78. package/docs/reference/functions/buildEngineConfiguration.md +7 -1
  79. package/docs/reference/functions/buildEngineServerConfiguration.md +7 -1
  80. package/docs/reference/functions/createModuleImportUrl.md +21 -0
  81. package/docs/reference/functions/getExtensionsCacheDir.md +31 -0
  82. package/docs/reference/functions/handleHttpsProtocol.md +49 -0
  83. package/docs/reference/functions/handleNpmProtocol.md +31 -0
  84. package/docs/reference/functions/hashUrl.md +19 -0
  85. package/docs/reference/functions/isCacheExpired.md +31 -0
  86. package/docs/reference/functions/overrideModuleImport.md +8 -2
  87. package/docs/reference/functions/parseModuleProtocol.md +19 -0
  88. package/docs/reference/functions/resolvePackageEntryPoint.md +32 -0
  89. package/docs/reference/functions/run.md +3 -3
  90. package/docs/reference/functions/start.md +8 -2
  91. package/docs/reference/index.md +18 -2
  92. package/docs/reference/interfaces/ICacheMetadata.md +27 -0
  93. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +24 -9
  94. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +36 -13
  95. package/docs/reference/interfaces/IModuleProtocol.md +27 -0
  96. package/docs/reference/interfaces/INodeEngineConfig.md +430 -0
  97. package/docs/reference/interfaces/INodeEngineState.md +39 -0
  98. package/docs/reference/interfaces/INodeEnvironmentVariables.md +149 -24
  99. package/docs/reference/interfaces/INodeOptions.md +21 -1
  100. package/docs/reference/interfaces/IProtocolHandlerResult.md +19 -0
  101. package/docs/reference/type-aliases/ModuleProtocol.md +5 -0
  102. package/docs/reference/variables/ModuleProtocol.md +37 -0
  103. package/docs/reference/variables/NodeFeatures.md +7 -7
  104. package/locales/en.json +20 -8
  105. package/package.json +40 -8
  106. package/dist/cjs/index.cjs +0 -2232
  107. package/dist/esm/index.mjs +0 -2179
@@ -1,6 +1,6 @@
1
- # Function: bootstrapNodeUser()
1
+ # Function: bootstrapNodeAdminUser()
2
2
 
3
- > **bootstrapNodeUser**(`engineCore`, `context`, `envVars`, `features`): `Promise`\<`void`\>
3
+ > **bootstrapNodeAdminUser**(`engineCore`, `context`, `envVars`, `features`): `Promise`\<`void`\>
4
4
 
5
5
  Bootstrap the user.
6
6
 
@@ -14,7 +14,7 @@ The engine core for the node.
14
14
 
15
15
  ### context
16
16
 
17
- `IEngineCoreContext`\<`IEngineServerConfig`, `IEngineState`\>
17
+ `IEngineCoreContext`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>
18
18
 
19
19
  The context for the node.
20
20
 
@@ -1,6 +1,6 @@
1
- # Function: bootstrapNodeIdentity()
1
+ # Function: bootstrapNodeId()
2
2
 
3
- > **bootstrapNodeIdentity**(`engineCore`, `context`, `envVars`, `features`): `Promise`\<`void`\>
3
+ > **bootstrapNodeId**(`engineCore`, `context`, `envVars`, `features`): `Promise`\<`void`\>
4
4
 
5
5
  Bootstrap the node creating any necessary resources.
6
6
 
@@ -14,7 +14,7 @@ The engine core for the node.
14
14
 
15
15
  ### context
16
16
 
17
- `IEngineCoreContext`\<`IEngineServerConfig`, `IEngineState`\>
17
+ `IEngineCoreContext`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>
18
18
 
19
19
  The context for the node.
20
20
 
@@ -14,7 +14,7 @@ The engine core for the node.
14
14
 
15
15
  ### context
16
16
 
17
- `IEngineCoreContext`\<`IEngineServerConfig`, `IEngineState`\>
17
+ `IEngineCoreContext`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>
18
18
 
19
19
  The context for the node.
20
20
 
@@ -0,0 +1,35 @@
1
+ # Function: bootstrapTenantId()
2
+
3
+ > **bootstrapTenantId**(`engineCore`, `context`, `envVars`, `features`): `Promise`\<`void`\>
4
+
5
+ Bootstrap the node creating any necessary resources.
6
+
7
+ ## Parameters
8
+
9
+ ### engineCore
10
+
11
+ `IEngineCore`
12
+
13
+ The engine core for the node.
14
+
15
+ ### context
16
+
17
+ `IEngineCoreContext`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>
18
+
19
+ The context for the node.
20
+
21
+ ### envVars
22
+
23
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
24
+
25
+ The environment variables for the node.
26
+
27
+ ### features
28
+
29
+ [`NodeFeatures`](../type-aliases/NodeFeatures.md)[]
30
+
31
+ The features that are enabled on the node. The features that are enabled on the node.
32
+
33
+ ## Returns
34
+
35
+ `Promise`\<`void`\>
@@ -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); \}\>
3
+ > **buildConfiguration**(`processEnv`, `options`, `serverInfo`): `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `contextIdKeys`: `string`[]; \}\>
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`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); \}\>
27
+ `Promise`\<\{ `nodeEnvVars`: [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md) & `object`; `nodeEngineConfig`: [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md); `contextIdKeys`: `string`[]; \}\>
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`): `Promise`\<`IEngineConfig`\>
3
+ > **buildEngineConfiguration**(`envVars`, `contextIdKeys`): `Promise`\<`IEngineConfig`\>
4
4
 
5
5
  Build the engine core configuration from environment variables.
6
6
 
@@ -12,6 +12,12 @@ Build the engine core configuration from environment variables.
12
12
 
13
13
  The environment variables.
14
14
 
15
+ ### contextIdKeys
16
+
17
+ `string`[]
18
+
19
+ The context ID keys.
20
+
15
21
  ## Returns
16
22
 
17
23
  `Promise`\<`IEngineConfig`\>
@@ -1,6 +1,6 @@
1
1
  # Function: buildEngineServerConfiguration()
2
2
 
3
- > **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `Promise`\<`IEngineServerConfig`\>
3
+ > **buildEngineServerConfiguration**(`envVars`, `contextIdKeys`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`, `favIconPath?`): `Promise`\<`IEngineServerConfig`\>
4
4
 
5
5
  Handles the configuration of the server.
6
6
 
@@ -12,6 +12,12 @@ Handles the configuration of the server.
12
12
 
13
13
  The environment variables for the engine server.
14
14
 
15
+ ### contextIdKeys
16
+
17
+ `string`[]
18
+
19
+ The context ID keys.
20
+
15
21
  ### coreEngineConfig
16
22
 
17
23
  `IEngineCoreConfig`
@@ -0,0 +1,21 @@
1
+ # Function: createModuleImportUrl()
2
+
3
+ > **createModuleImportUrl**(`filePath`): `string`
4
+
5
+ Convert a file path to an import-compatible URL for cross-platform module loading.
6
+ On Windows, adds the 'file://' protocol prefix required for dynamic imports.
7
+ On other platforms, returns the path unchanged.
8
+
9
+ ## Parameters
10
+
11
+ ### filePath
12
+
13
+ `string`
14
+
15
+ The absolute file path to convert.
16
+
17
+ ## Returns
18
+
19
+ `string`
20
+
21
+ A URL string compatible with dynamic import().
@@ -0,0 +1,31 @@
1
+ # Function: getExtensionsCacheDir()
2
+
3
+ > **getExtensionsCacheDir**(`executionDirectory`, `protocol`, `cacheDirectory?`): `string`
4
+
5
+ Get the extensions cache directory.
6
+
7
+ ## Parameters
8
+
9
+ ### executionDirectory
10
+
11
+ `string`
12
+
13
+ The execution directory.
14
+
15
+ ### protocol
16
+
17
+ [`ModuleProtocol`](../type-aliases/ModuleProtocol.md)
18
+
19
+ The protocol type for subdirectory organization.
20
+
21
+ ### cacheDirectory?
22
+
23
+ `string`
24
+
25
+ The cache directory base path.
26
+
27
+ ## Returns
28
+
29
+ `string`
30
+
31
+ The cache directory path.
@@ -0,0 +1,49 @@
1
+ # Function: handleHttpsProtocol()
2
+
3
+ > **handleHttpsProtocol**(`url`, `executionDirectory`, `maxSizeMb`, `cacheDirectory?`, `ttlHours?`, `forceRefresh?`): `Promise`\<[`IProtocolHandlerResult`](../interfaces/IProtocolHandlerResult.md)\>
4
+
5
+ Handle the https: protocol by downloading the module if needed.
6
+
7
+ ## Parameters
8
+
9
+ ### url
10
+
11
+ `string`
12
+
13
+ The HTTPS URL to download from.
14
+
15
+ ### executionDirectory
16
+
17
+ `string`
18
+
19
+ The execution directory.
20
+
21
+ ### maxSizeMb
22
+
23
+ `number`
24
+
25
+ The maximum size in MB for the download.
26
+
27
+ ### cacheDirectory?
28
+
29
+ `string`
30
+
31
+ The cache directory base path.
32
+
33
+ ### ttlHours?
34
+
35
+ `number`
36
+
37
+ TTL in hours for cache expiration.
38
+
39
+ ### forceRefresh?
40
+
41
+ `boolean`
42
+
43
+ Whether to force refresh the cache.
44
+
45
+ ## Returns
46
+
47
+ `Promise`\<[`IProtocolHandlerResult`](../interfaces/IProtocolHandlerResult.md)\>
48
+
49
+ The resolved path to the downloaded module.
@@ -0,0 +1,31 @@
1
+ # Function: handleNpmProtocol()
2
+
3
+ > **handleNpmProtocol**(`packageName`, `executionDirectory`, `cacheDirectory?`): `Promise`\<[`IProtocolHandlerResult`](../interfaces/IProtocolHandlerResult.md)\>
4
+
5
+ Handle the npm: protocol by installing the package if needed.
6
+
7
+ ## Parameters
8
+
9
+ ### packageName
10
+
11
+ `string`
12
+
13
+ The npm package name (without npm: prefix).
14
+
15
+ ### executionDirectory
16
+
17
+ `string`
18
+
19
+ The execution directory.
20
+
21
+ ### cacheDirectory?
22
+
23
+ `string`
24
+
25
+ The cache directory base path.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<[`IProtocolHandlerResult`](../interfaces/IProtocolHandlerResult.md)\>
30
+
31
+ The resolved path to the installed module.
@@ -0,0 +1,19 @@
1
+ # Function: hashUrl()
2
+
3
+ > **hashUrl**(`url`): `string`
4
+
5
+ Hash a URL to create a safe filename.
6
+
7
+ ## Parameters
8
+
9
+ ### url
10
+
11
+ `string`
12
+
13
+ The URL to hash.
14
+
15
+ ## Returns
16
+
17
+ `string`
18
+
19
+ A hashed filename safe for the filesystem.
@@ -0,0 +1,31 @@
1
+ # Function: isCacheExpired()
2
+
3
+ > **isCacheExpired**(`metadataPath`, `ttlHours`, `forceRefresh`): `Promise`\<`boolean`\>
4
+
5
+ Check if a cached file has expired based on TTL and force refresh settings.
6
+
7
+ ## Parameters
8
+
9
+ ### metadataPath
10
+
11
+ `string`
12
+
13
+ Path to the cache metadata file.
14
+
15
+ ### ttlHours
16
+
17
+ `number`
18
+
19
+ Time to live in hours.
20
+
21
+ ### forceRefresh
22
+
23
+ `boolean`
24
+
25
+ Whether to force refresh regardless of TTL.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`boolean`\>
30
+
31
+ True if the cache is expired or should be refreshed.
@@ -1,8 +1,8 @@
1
1
  # Function: overrideModuleImport()
2
2
 
3
- > **overrideModuleImport**(`executionDirectory`): `void`
3
+ > **overrideModuleImport**(`executionDirectory`, `envVars?`): `void`
4
4
 
5
- Override module imports to use local files where possible.
5
+ Override module imports to support protocol-based loading (npm:, https:) and local files.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -12,6 +12,12 @@ Override module imports to use local files where possible.
12
12
 
13
13
  The execution directory for resolving local module paths.
14
14
 
15
+ ### envVars?
16
+
17
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
18
+
19
+ The environment variables containing extension configuration (optional, uses defaults if not provided).
20
+
15
21
  ## Returns
16
22
 
17
23
  `void`
@@ -0,0 +1,19 @@
1
+ # Function: parseModuleProtocol()
2
+
3
+ > **parseModuleProtocol**(`moduleName`): [`IModuleProtocol`](../interfaces/IModuleProtocol.md)
4
+
5
+ Parse the protocol from a module name.
6
+
7
+ ## Parameters
8
+
9
+ ### moduleName
10
+
11
+ `string`
12
+
13
+ The module name to parse.
14
+
15
+ ## Returns
16
+
17
+ [`IModuleProtocol`](../interfaces/IModuleProtocol.md)
18
+
19
+ The parsed protocol information.
@@ -0,0 +1,32 @@
1
+ # Function: resolvePackageEntryPoint()
2
+
3
+ > **resolvePackageEntryPoint**(`packagePath`, `packageName`, `fallback`): `Promise`\<`string`\>
4
+
5
+ Resolve the main entry point from a package directory using Node.js resolution with fallback.
6
+ Uses require.resolve() when possible for standard Node.js behavior, with manual fallback.
7
+
8
+ ## Parameters
9
+
10
+ ### packagePath
11
+
12
+ `string`
13
+
14
+ The absolute path to the package directory.
15
+
16
+ ### packageName
17
+
18
+ `string`
19
+
20
+ The package name for require.resolve().
21
+
22
+ ### fallback
23
+
24
+ `string` = `"index.js"`
25
+
26
+ The fallback file name if no entry point is found.
27
+
28
+ ## Returns
29
+
30
+ `Promise`\<`string`\>
31
+
32
+ The resolved entry point file name (relative to package directory).
@@ -1,6 +1,6 @@
1
1
  # Function: run()
2
2
 
3
- > **run**(`nodeOptions?`): `Promise`\<`void`\>
3
+ > **run**(`nodeOptions?`): `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
4
4
 
5
5
  Run the TWIN Node server.
6
6
 
@@ -14,6 +14,6 @@ Optional configuration options for running the server.
14
14
 
15
15
  ## Returns
16
16
 
17
- `Promise`\<`void`\>
17
+ `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
18
18
 
19
- A promise that resolves when the server is started.
19
+ A promise that resolves when the server is started containing a shutdown method.
@@ -1,6 +1,6 @@
1
1
  # Function: start()
2
2
 
3
- > **start**(`nodeOptions`, `nodeEngineConfig`, `envVars`): `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
3
+ > **start**(`nodeOptions`, `nodeEngineConfig`, `envVars`, `contextIdKeys?`): `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
4
4
 
5
5
  Start the engine server.
6
6
 
@@ -24,8 +24,14 @@ The configuration for the engine server.
24
24
 
25
25
  The environment variables.
26
26
 
27
+ ### contextIdKeys?
28
+
29
+ `string`[]
30
+
31
+ The context ID keys.
32
+
27
33
  ## Returns
28
34
 
29
- `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, `IEngineState`\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
35
+ `Promise`\<`undefined` \| \{ `engine`: `Engine`\<`IEngineServerConfig`, [`INodeEngineState`](../interfaces/INodeEngineState.md)\>; `server`: `EngineServer`; `shutdown`: () => `Promise`\<`void`\>; \}\>
30
36
 
31
37
  The engine server.
@@ -2,14 +2,19 @@
2
2
 
3
3
  ## Interfaces
4
4
 
5
+ - [ICacheMetadata](interfaces/ICacheMetadata.md)
5
6
  - [IEngineEnvironmentVariables](interfaces/IEngineEnvironmentVariables.md)
6
7
  - [IEngineServerEnvironmentVariables](interfaces/IEngineServerEnvironmentVariables.md)
8
+ - [IModuleProtocol](interfaces/IModuleProtocol.md)
7
9
  - [INodeEngineConfig](interfaces/INodeEngineConfig.md)
10
+ - [INodeEngineState](interfaces/INodeEngineState.md)
8
11
  - [INodeEnvironmentVariables](interfaces/INodeEnvironmentVariables.md)
9
12
  - [INodeOptions](interfaces/INodeOptions.md)
13
+ - [IProtocolHandlerResult](interfaces/IProtocolHandlerResult.md)
10
14
 
11
15
  ## Type Aliases
12
16
 
17
+ - [ModuleProtocol](type-aliases/ModuleProtocol.md)
13
18
  - [NodeExtensionInitialiseMethod](type-aliases/NodeExtensionInitialiseMethod.md)
14
19
  - [NodeExtensionInitialiseEngineMethod](type-aliases/NodeExtensionInitialiseEngineMethod.md)
15
20
  - [NodeExtensionInitialiseEngineServerMethod](type-aliases/NodeExtensionInitialiseEngineServerMethod.md)
@@ -24,13 +29,16 @@
24
29
  - [SYNCHRONISED\_STORAGE\_BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID](variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md)
25
30
  - [VC\_AUTHENTICATION\_VERIFICATION\_METHOD\_ID](variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md)
26
31
  - [AUTH\_SIGNING\_KEY\_ID](variables/AUTH_SIGNING_KEY_ID.md)
32
+ - [ModuleProtocol](variables/ModuleProtocol.md)
27
33
  - [NodeFeatures](variables/NodeFeatures.md)
28
34
 
29
35
  ## Functions
30
36
 
31
37
  - [bootstrap](functions/bootstrap.md)
32
- - [bootstrapNodeIdentity](functions/bootstrapNodeIdentity.md)
33
- - [bootstrapNodeUser](functions/bootstrapNodeUser.md)
38
+ - [bootstrapContextIdHandlers](functions/bootstrapContextIdHandlers.md)
39
+ - [bootstrapNodeId](functions/bootstrapNodeId.md)
40
+ - [bootstrapTenantId](functions/bootstrapTenantId.md)
41
+ - [bootstrapNodeAdminUser](functions/bootstrapNodeAdminUser.md)
34
42
  - [bootstrapImmutableProofMethod](functions/bootstrapImmutableProofMethod.md)
35
43
  - [bootstrapBlobEncryption](functions/bootstrapBlobEncryption.md)
36
44
  - [bootstrapAuth](functions/bootstrapAuth.md)
@@ -54,3 +62,11 @@
54
62
  - [loadTextFile](functions/loadTextFile.md)
55
63
  - [loadJsonFile](functions/loadJsonFile.md)
56
64
  - [getFeatures](functions/getFeatures.md)
65
+ - [parseModuleProtocol](functions/parseModuleProtocol.md)
66
+ - [hashUrl](functions/hashUrl.md)
67
+ - [getExtensionsCacheDir](functions/getExtensionsCacheDir.md)
68
+ - [handleNpmProtocol](functions/handleNpmProtocol.md)
69
+ - [isCacheExpired](functions/isCacheExpired.md)
70
+ - [handleHttpsProtocol](functions/handleHttpsProtocol.md)
71
+ - [resolvePackageEntryPoint](functions/resolvePackageEntryPoint.md)
72
+ - [createModuleImportUrl](functions/createModuleImportUrl.md)
@@ -0,0 +1,27 @@
1
+ # Interface: ICacheMetadata
2
+
3
+ Metadata for cached HTTPS extensions.
4
+
5
+ ## Properties
6
+
7
+ ### downloadedAt
8
+
9
+ > **downloadedAt**: `number`
10
+
11
+ Timestamp when the file was downloaded.
12
+
13
+ ***
14
+
15
+ ### url
16
+
17
+ > **url**: `string`
18
+
19
+ Original URL of the cached file.
20
+
21
+ ***
22
+
23
+ ### size
24
+
25
+ > **size**: `number`
26
+
27
+ Size of the cached file in bytes.
@@ -32,6 +32,30 @@ The name of the state file.
32
32
 
33
33
  ***
34
34
 
35
+ ### tenantEnabled?
36
+
37
+ > `optional` **tenantEnabled**: `string`
38
+
39
+ Is multi-tenant support enabled, defaults to false.
40
+
41
+ ***
42
+
43
+ ### tenantId?
44
+
45
+ > `optional` **tenantId**: `string`
46
+
47
+ A tenant id to use as a default for the node.
48
+
49
+ ***
50
+
51
+ ### tenantApiKey?
52
+
53
+ > `optional` **tenantApiKey**: `string`
54
+
55
+ A tenant api key to use as a default for the node.
56
+
57
+ ***
58
+
35
59
  ### entityStorageConnectorType?
36
60
 
37
61
  > `optional` **entityStorageConnectorType**: `string`
@@ -571,15 +595,6 @@ Are the messaging components enabled, defaults to false.
571
595
 
572
596
  ***
573
597
 
574
- ### messagingTemplates?
575
-
576
- > `optional` **messagingTemplates**: `string`
577
-
578
- An initial set of templates for the messages.
579
- Use the @json: prefix to specify the path to the JSON file.
580
-
581
- ***
582
-
583
598
  ### awsSesRegion?
584
599
 
585
600
  > `optional` **awsSesRegion**: `string`
@@ -48,6 +48,42 @@ The name of the state file.
48
48
 
49
49
  ***
50
50
 
51
+ ### tenantEnabled?
52
+
53
+ > `optional` **tenantEnabled**: `string`
54
+
55
+ Is multi-tenant support enabled, defaults to false.
56
+
57
+ #### Inherited from
58
+
59
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`tenantEnabled`](IEngineEnvironmentVariables.md#tenantenabled)
60
+
61
+ ***
62
+
63
+ ### tenantId?
64
+
65
+ > `optional` **tenantId**: `string`
66
+
67
+ A tenant id to use as a default for the node.
68
+
69
+ #### Inherited from
70
+
71
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`tenantId`](IEngineEnvironmentVariables.md#tenantid)
72
+
73
+ ***
74
+
75
+ ### tenantApiKey?
76
+
77
+ > `optional` **tenantApiKey**: `string`
78
+
79
+ A tenant api key to use as a default for the node.
80
+
81
+ #### Inherited from
82
+
83
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`tenantApiKey`](IEngineEnvironmentVariables.md#tenantapikey)
84
+
85
+ ***
86
+
51
87
  ### entityStorageConnectorType?
52
88
 
53
89
  > `optional` **entityStorageConnectorType**: `string`
@@ -855,19 +891,6 @@ Are the messaging components enabled, defaults to false.
855
891
 
856
892
  ***
857
893
 
858
- ### messagingTemplates?
859
-
860
- > `optional` **messagingTemplates**: `string`
861
-
862
- An initial set of templates for the messages.
863
- Use the @json: prefix to specify the path to the JSON file.
864
-
865
- #### Inherited from
866
-
867
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`messagingTemplates`](IEngineEnvironmentVariables.md#messagingtemplates)
868
-
869
- ***
870
-
871
894
  ### awsSesRegion?
872
895
 
873
896
  > `optional` **awsSesRegion**: `string`
@@ -0,0 +1,27 @@
1
+ # Interface: IModuleProtocol
2
+
3
+ The parsed module protocol information.
4
+
5
+ ## Properties
6
+
7
+ ### protocol
8
+
9
+ > **protocol**: [`ModuleProtocol`](../type-aliases/ModuleProtocol.md)
10
+
11
+ The protocol type.
12
+
13
+ ***
14
+
15
+ ### identifier
16
+
17
+ > **identifier**: `string`
18
+
19
+ The identifier after the protocol (or the original if no protocol).
20
+
21
+ ***
22
+
23
+ ### original
24
+
25
+ > **original**: `string`
26
+
27
+ The original module string.