@twin.org/node-core 0.9.5-next.2 â 0.10.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/node.js +1 -1
- package/dist/es/node.js.map +1 -1
- package/docs/changelog.md +195 -0
- package/package.json +1 -1
package/dist/es/node.js
CHANGED
|
@@ -33,7 +33,7 @@ export async function run(nodeOptions, args) {
|
|
|
33
33
|
nodeOptions ??= {};
|
|
34
34
|
const serverInfo = {
|
|
35
35
|
name: nodeOptions?.serverName ?? "TWIN Node",
|
|
36
|
-
version: nodeOptions?.serverVersion ?? "0.
|
|
36
|
+
version: nodeOptions?.serverVersion ?? "0.10.1-next.1" // x-release-please-version
|
|
37
37
|
};
|
|
38
38
|
CLIDisplay.header(serverInfo.name, serverInfo.version, "đŠī¸ ");
|
|
39
39
|
if (!Is.stringValue(nodeOptions?.executionDirectory)) {
|
package/dist/es/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAInF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC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AAC;gBAED,wFAAwF;gBACxF,IAAI,CAAC;oBACJ,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAChC,qBAAqB,CAAC,kBAAkB,EAAE,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,EAC7E,cAAc,CACd,CAAC;oBAEF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;oBAC3D,MAAM,QAAQ,GAAG,MAAM,wBAAwB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;oBACzE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBACvD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;oBAC5C,IAAI,MAAM,EAAE,CAAC;wBACZ,YAAY,GAAG,UAAU,CAAC;oBAC3B,CAAC;gBACF,CAAC;gBAAC,MAAM,CAAC;oBACR,4CAA4C;gBAC7C,CAAC;gBACD,MAAM;YACP,CAAC;QACF,CAAC;QAED,0CAA0C;QAC1C,IAAI,YAAY,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;YACjE,WAAW,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;YACjC,OAAO;gBACN,MAAM;gBACN,UAAU,EAAE,KAAK;aACjB,CAAC;QACH,CAAC;QAED,OAAO;YACN,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport type { IServerInfo } from \"@twin.org/api-models\";\nimport { CLIDisplay, CLIUtils } from \"@twin.org/cli-core\";\nimport { Coerce, EnvHelper, GeneralError, Guards, I18n, Is } from \"@twin.org/core\";\nimport type { Engine } from \"@twin.org/engine\";\nimport type { EngineServer } from \"@twin.org/engine-server\";\nimport type { IEngineServerConfig } from \"@twin.org/engine-server-types\";\nimport { ModuleHelper } from \"@twin.org/modules\";\nimport * as dotenv from \"dotenv\";\nimport { buildEngineConfiguration } from \"./builders/engineEnvBuilder.js\";\nimport { buildEngineServerConfiguration } from \"./builders/engineServerEnvBuilder.js\";\nimport { extensionsConfiguration } from \"./builders/extensionsBuilder.js\";\nimport { commaSeparatedListToArray } from \"./builders/helper/envHelpers.js\";\nimport { constructCliCommand, parseCommandLineArgs, registerCommands } from \"./cli.js\";\nimport { getEnvDefaults } from \"./defaults.js\";\nimport { BOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS } from \"./models/bootstrapDevEnvironmentVariableKeys.js\";\nimport { DEPRECATED_ENVIRONMENT_VARIABLE_KEYS } from \"./models/deprecatedEnvironmentVariableKeys.js\";\nimport { ENGINE_ENVIRONMENT_VARIABLE_KEYS } from \"./models/engineEnvironmentVariableKeys.js\";\nimport { ENGINE_SERVER_ENVIRONMENT_VARIABLE_KEYS } from \"./models/engineServerEnvironmentVariableKeys.js\";\nimport type { IEnvironmentVariables } from \"./models/IEnvironmentVariables.js\";\nimport type { INodeEngineConfig } from \"./models/INodeEngineConfig.js\";\nimport type { INodeEngineState } from \"./models/INodeEngineState.js\";\nimport type { INodeOptions } from \"./models/INodeOptions.js\";\nimport { ModuleProtocol } from \"./models/moduleProtocol.js\";\nimport { NODE_ENVIRONMENT_VARIABLE_KEYS } from \"./models/nodeEnvironmentVariableKeys.js\";\nimport { start } from \"./start.js\";\nimport {\n\tcreateModuleImportUrl,\n\tfileExists,\n\tgetExecutionDirectory,\n\tgetExtensionsCacheDir,\n\tgetScriptDirectory,\n\thandleHttpsProtocol,\n\thandleNpmProtocol,\n\tinitialiseLocales,\n\tloadJsonFile,\n\tloadTextFile,\n\tparseModuleProtocol,\n\tresolvePackageEntryPoint\n} from \"./utils.js\";\n\nconst moduleCache: { [id: string]: unknown } = {};\n\n/**\n * Run the node.\n * @param nodeOptions Optional configuration options for running the server.\n * @param args Optional command line arguments.\n * @returns A promise that resolves when the server is started containing a shutdown method.\n */\nexport async function run(\n\tnodeOptions?: INodeOptions,\n\targs?: string[]\n): Promise<\n\t| {\n\t\t\tengine: Engine<IEngineServerConfig, INodeEngineState>;\n\t\t\tserver: EngineServer;\n\t\t\tshutdown: () => Promise<void>;\n\t }\n\t| undefined\n> {\n\tlet showErrorDetails = true;\n\tlet debugEnabled = true;\n\ttry {\n\t\tnodeOptions ??= {};\n\n\t\tconst serverInfo: IServerInfo = {\n\t\t\tname: nodeOptions?.serverName ?? \"TWIN Node\",\n\t\t\tversion: nodeOptions?.serverVersion ?? \"0.9.5-next.2\" // x-release-please-version\n\t\t};\n\n\t\tCLIDisplay.header(serverInfo.name, serverInfo.version, \"đŠī¸ \");\n\n\t\tif (!Is.stringValue(nodeOptions?.executionDirectory)) {\n\t\t\tnodeOptions.executionDirectory = getExecutionDirectory();\n\t\t}\n\t\tCLIDisplay.value(\"Execution Directory\", nodeOptions.executionDirectory);\n\n\t\tif (!Is.stringValue(nodeOptions?.scriptDirectory)) {\n\t\t\tnodeOptions.scriptDirectory = getScriptDirectory(args);\n\t\t}\n\t\tCLIDisplay.value(\"Script Directory\", nodeOptions.scriptDirectory);\n\n\t\tnodeOptions.localesDirectory =\n\t\t\tnodeOptions?.localesDirectory ??\n\t\t\tpath.resolve(path.join(nodeOptions.scriptDirectory, \"dist\", \"locales\"));\n\n\t\tCLIDisplay.value(\"Locales Directory\", nodeOptions.localesDirectory);\n\t\tawait initialiseLocales(nodeOptions.localesDirectory);\n\n\t\tnodeOptions.envPrefix ??= \"TWIN_\";\n\n\t\toverrideModuleImport(nodeOptions.executionDirectory ?? \"\");\n\n\t\tconst commandLineArgs = parseCommandLineArgs(args);\n\n\t\tconst hasEnvPrefix = commandLineArgs.options?.find(option => option.key === \"env-prefix\");\n\t\tif (hasEnvPrefix) {\n\t\t\tnodeOptions.envPrefix = Coerce.string(hasEnvPrefix.value) ?? nodeOptions.envPrefix;\n\t\t}\n\n\t\tCLIDisplay.value(\"Environment Variable Prefix\", nodeOptions.envPrefix);\n\n\t\t// This is the only location in the code base that should access process.env directly\n\t\t// So we can safely disable the linting rule here.\n\t\tlet finalEnvVars =\n\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\tprocess.env as {\n\t\t\t\t[id: string]: string;\n\t\t\t};\n\n\t\tif (Is.objectValue(nodeOptions?.envVars)) {\n\t\t\tfinalEnvVars = {\n\t\t\t\t...finalEnvVars,\n\t\t\t\t...nodeOptions.envVars\n\t\t\t};\n\t\t}\n\n\t\tfinalEnvVars = {\n\t\t\t...getEnvDefaults(nodeOptions.envPrefix),\n\t\t\t...finalEnvVars\n\t\t};\n\n\t\tlet cliCommand;\n\t\tif (Is.arrayValue(commandLineArgs.options)) {\n\t\t\tregisterCommands();\n\t\t\tcliCommand = constructCliCommand(finalEnvVars, commandLineArgs);\n\t\t}\n\n\t\tif (Is.object(cliCommand)) {\n\t\t\tfinalEnvVars[`${nodeOptions.envPrefix}SILENT`] ??= \"true\";\n\t\t} else {\n\t\t\tif (Is.empty(nodeOptions?.openApiSpecFile)) {\n\t\t\t\tconst specFile = path.resolve(\n\t\t\t\t\tpath.join(nodeOptions.scriptDirectory ?? \"\", \"docs\", \"open-api\", \"spec.json\")\n\t\t\t\t);\n\t\t\t\tif (await fileExists(specFile)) {\n\t\t\t\t\tnodeOptions ??= {};\n\t\t\t\t\tnodeOptions.openApiSpecFile = specFile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (Is.stringValue(nodeOptions.openApiSpecFile)) {\n\t\t\t\tCLIDisplay.value(\"OpenAPI Spec File\", nodeOptions.openApiSpecFile);\n\t\t\t}\n\n\t\t\tif (Is.empty(nodeOptions?.favIconFile)) {\n\t\t\t\tconst favIconFile = path.resolve(\n\t\t\t\t\tpath.join(nodeOptions.scriptDirectory ?? \"\", \"static\", \"favicon.png\")\n\t\t\t\t);\n\t\t\t\tif (await fileExists(favIconFile)) {\n\t\t\t\t\tnodeOptions ??= {};\n\t\t\t\t\tnodeOptions.favIconFile = favIconFile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (Is.stringValue(nodeOptions.favIconFile)) {\n\t\t\t\tCLIDisplay.value(\"Favicon File\", nodeOptions.favIconFile);\n\t\t\t}\n\t\t}\n\n\t\tconst { nodeEngineConfig, nodeEnvVars, availableContextIdKeys } = await buildConfiguration(\n\t\t\tfinalEnvVars,\n\t\t\tnodeOptions,\n\t\t\tserverInfo\n\t\t);\n\n\t\tdebugEnabled = Coerce.boolean(nodeEnvVars.debug) ?? debugEnabled;\n\n\t\tCLIDisplay.break();\n\n\t\tconst startResult = await start(\n\t\t\tnodeOptions,\n\t\t\tnodeEngineConfig,\n\t\t\tnodeEnvVars,\n\t\t\tcliCommand,\n\t\t\tavailableContextIdKeys\n\t\t);\n\n\t\tif (Is.notEmpty(startResult)) {\n\t\t\tshowErrorDetails = false;\n\n\t\t\tlet isShuttingDown = false;\n\t\t\tfor (const signal of [\"SIGHUP\", \"SIGINT\", \"SIGTERM\"]) {\n\t\t\t\tprocess.on(signal, async () => {\n\t\t\t\t\tif (!isShuttingDown) {\n\t\t\t\t\t\tisShuttingDown = true;\n\t\t\t\t\t\tCLIDisplay.value(\"Terminate Signal\", signal);\n\t\t\t\t\t\tawait startResult.shutdown();\n\t\t\t\t\t\tprocess.exit(0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn startResult;\n\t} catch (err) {\n\t\tif (nodeOptions?.disableProcessExitOnFailure ?? false) {\n\t\t\tthrow err;\n\t\t}\n\n\t\tif (showErrorDetails) {\n\t\t\tCLIDisplay.error(err, true, { includeAdditional: true, includeStack: debugEnabled });\n\t\t}\n\n\t\t// eslint-disable-next-line unicorn/no-process-exit\n\t\tprocess.exit(1);\n\t}\n}\n\n/**\n * Test whether a camelCase key matches an entry in a pattern set.\n * Entries ending with \"*\" are treated as prefix patterns; all others require an exact match.\n * @param camelKey The camelCase key to test.\n * @param patternSet The set of exact keys and/or wildcard patterns (e.g. \"restPath*\").\n * @returns True if the key matches any entry.\n */\nfunction matchesPatternSet(\n\tcamelKey: string,\n\tpatternSet: ReadonlySet<string> | Set<string>\n): boolean {\n\tif (patternSet.has(camelKey)) {\n\t\treturn true;\n\t}\n\tfor (const pattern of patternSet) {\n\t\tif (pattern.endsWith(\"*\") && camelKey.startsWith(pattern.slice(0, -1))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Report any environment variables which are still recognised but no longer used.\n * @param envVars The already-converted camelCase env variables.\n * @param prefix The prefix used for the environment variables (e.g. \"TWIN_\").\n */\nfunction warnDeprecatedEnvVarKeys(\n\tenvVars: { [id: string]: string | unknown },\n\tprefix: string\n): void {\n\tfor (const camelKey of Object.keys(envVars)) {\n\t\tconst replacements = DEPRECATED_ENVIRONMENT_VARIABLE_KEYS.get(camelKey);\n\t\tif (!Is.undefined(replacements)) {\n\t\t\tconst key = EnvHelper.jsonKeyToEnvVarKey(camelKey, prefix);\n\n\t\t\tif (Is.arrayValue(replacements)) {\n\t\t\t\tCLIDisplay.warning(\n\t\t\t\t\tI18n.formatMessage(\"warn.node.deprecatedEnvVar\", {\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\treplacements: replacements\n\t\t\t\t\t\t\t.map(replacement => EnvHelper.jsonKeyToEnvVarKey(replacement, prefix))\n\t\t\t\t\t\t\t.join(\", \")\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tCLIDisplay.warning(I18n.formatMessage(\"warn.node.deprecatedEnvVarNoReplacement\", { key }));\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Validate that every key in envVars maps to a recognised property.\n * All unknown keys are collected, then reported together as a single error or warning.\n * Raw env var names listed in the allow list (e.g. TWIN_MY_EXTENSION_SECRET, TWIN_REST_PATH_*) are always accepted.\n * Wildcard patterns ending with * are supported in both allow sets and the allow list.\n * @param envVars The already-converted camelCase env variables.\n * @param prefix The prefix used for the environment variables (e.g. \"TWIN_\").\n * @param allowSets An array of sets of allowed keys and/or wildcard patterns.\n * @throws GeneralError If any unknown env var properties are found and strict mode is \"error\", or if the strict mode value is invalid.\n */\nfunction validateEnvVarKeys(\n\tenvVars: { [id: string]: string | unknown },\n\tprefix: string,\n\tallowSets: ReadonlySet<string>[]\n): void {\n\tconst mode = Is.stringValue(envVars.strictEnv) ? envVars.strictEnv : \"error\";\n\tGuards.arrayOneOf(\"node\", `${prefix}STRICT_ENV`, mode, [\"error\", \"warn\", \"ignore\"]);\n\n\tif (mode === \"ignore\") {\n\t\treturn;\n\t}\n\n\tconst customSet = new Set(\n\t\tcommaSeparatedListToArray<string>(envVars.envAllowList as string).map(k =>\n\t\t\tEnvHelper.envVarKeyToJsonKey(k.trim(), prefix)\n\t\t)\n\t);\n\n\tconst unknown = Object.keys(envVars)\n\t\t.filter(\n\t\t\tcamelKey =>\n\t\t\t\t!allowSets.some(set => matchesPatternSet(camelKey, set)) &&\n\t\t\t\t!matchesPatternSet(camelKey, customSet) &&\n\t\t\t\t!DEPRECATED_ENVIRONMENT_VARIABLE_KEYS.has(camelKey)\n\t\t)\n\t\t.map(camelKey => EnvHelper.jsonKeyToEnvVarKey(camelKey, prefix));\n\n\tif (unknown.length > 0) {\n\t\tif (mode === \"error\") {\n\t\t\tthrow new GeneralError(\"node\", \"unknownEnvVars\", { keys: unknown.join(\", \"), prefix });\n\t\t}\n\t\tCLIDisplay.warning(\n\t\t\tI18n.formatMessage(\"warn.node.unknownEnvVars\", { keys: unknown.join(\", \"), prefix })\n\t\t);\n\t}\n}\n\n/**\n * Build the configuration for the TWIN Node.\n * @param processEnv The environment variables from the process.\n * @param options The options for running the server.\n * @param serverInfo The server information.\n * @returns A promise that resolves to the engine server configuration, environment prefix, environment variables,\n * and options.\n */\nexport async function buildConfiguration(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: INodeOptions,\n\tserverInfo: IServerInfo\n): Promise<{\n\tnodeEnvVars: IEnvironmentVariables & { [id: string]: string | unknown };\n\tnodeEngineConfig: INodeEngineConfig;\n\tavailableContextIdKeys: { key: string; requiredHandlerFeatures: string[] }[];\n}> {\n\tconst availableContextIdKeys: { key: string; requiredHandlerFeatures: string[] }[] = [];\n\n\tlet defaultEnvOnly = false;\n\tif (Is.empty(options?.envFilenames)) {\n\t\tconst envFile = path.resolve(path.join(options.executionDirectory ?? \"\", \".env\"));\n\t\tCLIDisplay.value(\"Default Environment File\", envFile);\n\t\toptions ??= {};\n\t\toptions.envFilenames = [envFile];\n\t\tdefaultEnvOnly = true;\n\t}\n\n\tif (Is.arrayValue(options?.envFilenames)) {\n\t\tconst output = dotenv.config({\n\t\t\tpath: options?.envFilenames,\n\t\t\tquiet: true\n\t\t});\n\n\t\t// We don't want to throw an error if the default environment file is not found.\n\t\t// Only if we have custom environment files.\n\t\tif (!defaultEnvOnly && output.error) {\n\t\t\tthrow output.error;\n\t\t}\n\n\t\tif (Is.objectValue(output.parsed)) {\n\t\t\tfor (const [key, value] of Object.entries(output.parsed)) {\n\t\t\t\t// Only set environment variables that are not already set in\n\t\t\t\t// the process environment or provided via options.envVars\n\t\t\t\tprocessEnv[key] ??= value;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst envVars = EnvHelper.envToJson<{ [id: string]: string | unknown }>(\n\t\tprocessEnv,\n\t\toptions.envPrefix ?? \"\"\n\t);\n\n\twarnDeprecatedEnvVarKeys(envVars, options.envPrefix ?? \"\");\n\n\tvalidateEnvVarKeys(envVars, options.envPrefix ?? \"\", [\n\t\tENGINE_ENVIRONMENT_VARIABLE_KEYS,\n\t\tENGINE_SERVER_ENVIRONMENT_VARIABLE_KEYS,\n\t\tNODE_ENVIRONMENT_VARIABLE_KEYS,\n\t\tBOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS\n\t]);\n\n\t// Expand any environment variables that use the @file: syntax\n\tconst keys = Object.keys(envVars);\n\tfor (const key of keys) {\n\t\tif (\n\t\t\tIs.stringValue(envVars[key]) &&\n\t\t\t(envVars[key].startsWith(\"@text:\") || envVars[key].startsWith(\"@json:\"))\n\t\t) {\n\t\t\tconst filePath = envVars[key].slice(6).trim();\n\t\t\tconst embeddedFile = path.resolve(path.join(options.executionDirectory ?? \"\", filePath));\n\n\t\t\tif (envVars[key].startsWith(\"@text:\")) {\n\t\t\t\tCLIDisplay.value(`Expanding Environment Variable: ${key} from text file`, embeddedFile);\n\t\t\t\tenvVars[key] = await loadTextFile(embeddedFile);\n\t\t\t} else if (envVars[key].startsWith(\"@json:\")) {\n\t\t\t\tCLIDisplay.value(`Expanding Environment Variable: ${key} from JSON file`, embeddedFile);\n\t\t\t\tenvVars[key] = await loadJsonFile(embeddedFile);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Extend the environment variables with any additional custom configuration.\n\tif (Is.function(options?.extendEnvVars)) {\n\t\tCLIDisplay.task(\"Extending Environment Variables\");\n\t\tawait options.extendEnvVars(envVars);\n\t}\n\n\t// Build the engine configuration from the environment variables.\n\tconst coreConfig = await buildEngineConfiguration(envVars);\n\tconst engineServerConfig = await buildEngineServerConfiguration(\n\t\tenvVars,\n\t\tavailableContextIdKeys,\n\t\tcoreConfig,\n\t\tserverInfo,\n\t\toptions?.openApiSpecFile,\n\t\toptions?.favIconFile\n\t);\n\n\t// Merge any custom configuration provided in the options.\n\tif (Is.arrayValue(options?.configFilenames)) {\n\t\tfor (const configFile of options.configFilenames) {\n\t\t\tCLIDisplay.value(\"Loading Configuration File\", configFile);\n\t\t\tconst configFilePath = path.resolve(path.join(options.executionDirectory ?? \"\", configFile));\n\t\t\tconst config = await loadJsonFile(configFilePath);\n\t\t\tObject.assign(engineServerConfig, config);\n\t\t}\n\t}\n\n\tif (Is.objectValue(options?.config)) {\n\t\tCLIDisplay.task(\"Merging Custom Configuration\");\n\t\tObject.assign(engineServerConfig, options.config);\n\t}\n\n\t// Merge any custom configuration provided in the options.\n\tif (Is.function(options?.extendConfig)) {\n\t\tCLIDisplay.task(\"Extending Configuration\");\n\t\tawait options.extendConfig(envVars, engineServerConfig);\n\t}\n\n\tconst nodeEngineConfig = await extensionsConfiguration(envVars, engineServerConfig);\n\n\treturn { nodeEngineConfig, nodeEnvVars: envVars, availableContextIdKeys };\n}\n\n/**\n * Override module imports to support protocol-based loading (npm:, https:) and local files.\n * @param executionDirectory The execution directory for resolving local module paths.\n * @param envVars The environment variables containing extension configuration (optional, uses defaults if not provided).\n */\nexport function overrideModuleImport(\n\texecutionDirectory: string,\n\tenvVars?: IEnvironmentVariables\n): void {\n\tconst maxSizeMb = Coerce.number(envVars?.extensionsMaxSizeMb) ?? 10;\n\tconst cacheDirectory = envVars?.extensionsCacheDirectory;\n\n\tModuleHelper.overrideImport(async moduleName => {\n\t\tif (moduleCache[moduleName]) {\n\t\t\treturn {\n\t\t\t\tmodule: moduleCache[moduleName],\n\t\t\t\tuseDefault: false\n\t\t\t};\n\t\t}\n\n\t\tconst parsed = parseModuleProtocol(moduleName);\n\t\tlet resolvedPath: string | undefined;\n\n\t\tswitch (parsed.protocol) {\n\t\t\tcase ModuleProtocol.Npm: {\n\t\t\t\tconst result = await handleNpmProtocol(\n\t\t\t\t\tparsed.identifier,\n\t\t\t\t\texecutionDirectory,\n\t\t\t\t\tcacheDirectory\n\t\t\t\t);\n\t\t\t\tresolvedPath = result.resolvedPath;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Https: {\n\t\t\t\tconst result = await handleHttpsProtocol(\n\t\t\t\t\tparsed.identifier,\n\t\t\t\t\texecutionDirectory,\n\t\t\t\t\tmaxSizeMb,\n\t\t\t\t\tcacheDirectory,\n\t\t\t\t\tenvVars?.extensionsCacheTtlHours,\n\t\t\t\t\tenvVars?.extensionsForceRefresh\n\t\t\t\t);\n\t\t\t\tresolvedPath = result.resolvedPath;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Http: {\n\t\t\t\tthrow new GeneralError(\"node\", \"insecureProtocol\", { protocol: ModuleProtocol.Http });\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Local: {\n\t\t\t\tlet localFilename = path.resolve(moduleName);\n\n\t\t\t\tlet exists = await fileExists(localFilename);\n\t\t\t\tif (!exists) {\n\t\t\t\t\tlocalFilename = path.resolve(executionDirectory, moduleName);\n\t\t\t\t\texists = await fileExists(localFilename);\n\t\t\t\t}\n\n\t\t\t\tif (exists) {\n\t\t\t\t\tresolvedPath = localFilename;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Default: {\n\t\t\t\ttry {\n\t\t\t\t\tconst packagePath = await CLIUtils.findPackageRoot(moduleName, executionDirectory);\n\t\t\t\t\tif (Is.stringValue(packagePath)) {\n\t\t\t\t\t\tconst mainFile = await resolvePackageEntryPoint(packagePath, moduleName);\n\t\t\t\t\t\tconst modulePath = path.resolve(packagePath, mainFile);\n\t\t\t\t\t\tconst exists = await fileExists(modulePath);\n\t\t\t\t\t\tif (exists) {\n\t\t\t\t\t\t\tresolvedPath = modulePath;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// Continue to fallback resolution\n\t\t\t\t}\n\n\t\t\t\t// Fallback: resolve from npm protocol cache directory (installed via handleNpmProtocol)\n\t\t\t\ttry {\n\t\t\t\t\tconst cacheNpmRoot = path.resolve(\n\t\t\t\t\t\tgetExtensionsCacheDir(executionDirectory, ModuleProtocol.Npm, cacheDirectory),\n\t\t\t\t\t\t\"node_modules\"\n\t\t\t\t\t);\n\n\t\t\t\t\tconst packagePath = path.resolve(cacheNpmRoot, moduleName);\n\t\t\t\t\tconst mainFile = await resolvePackageEntryPoint(packagePath, moduleName);\n\t\t\t\t\tconst modulePath = path.resolve(packagePath, mainFile);\n\t\t\t\t\tconst exists = await fileExists(modulePath);\n\t\t\t\t\tif (exists) {\n\t\t\t\t\t\tresolvedPath = modulePath;\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// No cached resolution either; fall through\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Common module loading and caching logic\n\t\tif (resolvedPath) {\n\t\t\tconst module = await import(createModuleImportUrl(resolvedPath));\n\t\t\tmoduleCache[moduleName] = module;\n\t\t\treturn {\n\t\t\t\tmodule,\n\t\t\t\tuseDefault: false\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tmodule: undefined,\n\t\t\tuseDefault: true\n\t\t};\n\t});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAInF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,uCAAuC,EAAE,MAAM,iDAAiD,CAAC;AAC1G,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAA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E,UAAU,CAAC,CAAC;oBAC3D,MAAM,QAAQ,GAAG,MAAM,wBAAwB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;oBACzE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBACvD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;oBAC5C,IAAI,MAAM,EAAE,CAAC;wBACZ,YAAY,GAAG,UAAU,CAAC;oBAC3B,CAAC;gBACF,CAAC;gBAAC,MAAM,CAAC;oBACR,4CAA4C;gBAC7C,CAAC;gBACD,MAAM;YACP,CAAC;QACF,CAAC;QAED,0CAA0C;QAC1C,IAAI,YAAY,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;YACjE,WAAW,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;YACjC,OAAO;gBACN,MAAM;gBACN,UAAU,EAAE,KAAK;aACjB,CAAC;QACH,CAAC;QAED,OAAO;YACN,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport type { IServerInfo } from \"@twin.org/api-models\";\nimport { CLIDisplay, CLIUtils } from \"@twin.org/cli-core\";\nimport { Coerce, EnvHelper, GeneralError, Guards, I18n, Is } from \"@twin.org/core\";\nimport type { Engine } from \"@twin.org/engine\";\nimport type { EngineServer } from \"@twin.org/engine-server\";\nimport type { IEngineServerConfig } from \"@twin.org/engine-server-types\";\nimport { ModuleHelper } from \"@twin.org/modules\";\nimport * as dotenv from \"dotenv\";\nimport { buildEngineConfiguration } from \"./builders/engineEnvBuilder.js\";\nimport { buildEngineServerConfiguration } from \"./builders/engineServerEnvBuilder.js\";\nimport { extensionsConfiguration } from \"./builders/extensionsBuilder.js\";\nimport { commaSeparatedListToArray } from \"./builders/helper/envHelpers.js\";\nimport { constructCliCommand, parseCommandLineArgs, registerCommands } from \"./cli.js\";\nimport { getEnvDefaults } from \"./defaults.js\";\nimport { BOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS } from \"./models/bootstrapDevEnvironmentVariableKeys.js\";\nimport { DEPRECATED_ENVIRONMENT_VARIABLE_KEYS } from \"./models/deprecatedEnvironmentVariableKeys.js\";\nimport { ENGINE_ENVIRONMENT_VARIABLE_KEYS } from \"./models/engineEnvironmentVariableKeys.js\";\nimport { ENGINE_SERVER_ENVIRONMENT_VARIABLE_KEYS } from \"./models/engineServerEnvironmentVariableKeys.js\";\nimport type { IEnvironmentVariables } from \"./models/IEnvironmentVariables.js\";\nimport type { INodeEngineConfig } from \"./models/INodeEngineConfig.js\";\nimport type { INodeEngineState } from \"./models/INodeEngineState.js\";\nimport type { INodeOptions } from \"./models/INodeOptions.js\";\nimport { ModuleProtocol } from \"./models/moduleProtocol.js\";\nimport { NODE_ENVIRONMENT_VARIABLE_KEYS } from \"./models/nodeEnvironmentVariableKeys.js\";\nimport { start } from \"./start.js\";\nimport {\n\tcreateModuleImportUrl,\n\tfileExists,\n\tgetExecutionDirectory,\n\tgetExtensionsCacheDir,\n\tgetScriptDirectory,\n\thandleHttpsProtocol,\n\thandleNpmProtocol,\n\tinitialiseLocales,\n\tloadJsonFile,\n\tloadTextFile,\n\tparseModuleProtocol,\n\tresolvePackageEntryPoint\n} from \"./utils.js\";\n\nconst moduleCache: { [id: string]: unknown } = {};\n\n/**\n * Run the node.\n * @param nodeOptions Optional configuration options for running the server.\n * @param args Optional command line arguments.\n * @returns A promise that resolves when the server is started containing a shutdown method.\n */\nexport async function run(\n\tnodeOptions?: INodeOptions,\n\targs?: string[]\n): Promise<\n\t| {\n\t\t\tengine: Engine<IEngineServerConfig, INodeEngineState>;\n\t\t\tserver: EngineServer;\n\t\t\tshutdown: () => Promise<void>;\n\t }\n\t| undefined\n> {\n\tlet showErrorDetails = true;\n\tlet debugEnabled = true;\n\ttry {\n\t\tnodeOptions ??= {};\n\n\t\tconst serverInfo: IServerInfo = {\n\t\t\tname: nodeOptions?.serverName ?? \"TWIN Node\",\n\t\t\tversion: nodeOptions?.serverVersion ?? \"0.10.1-next.1\" // x-release-please-version\n\t\t};\n\n\t\tCLIDisplay.header(serverInfo.name, serverInfo.version, \"đŠī¸ \");\n\n\t\tif (!Is.stringValue(nodeOptions?.executionDirectory)) {\n\t\t\tnodeOptions.executionDirectory = getExecutionDirectory();\n\t\t}\n\t\tCLIDisplay.value(\"Execution Directory\", nodeOptions.executionDirectory);\n\n\t\tif (!Is.stringValue(nodeOptions?.scriptDirectory)) {\n\t\t\tnodeOptions.scriptDirectory = getScriptDirectory(args);\n\t\t}\n\t\tCLIDisplay.value(\"Script Directory\", nodeOptions.scriptDirectory);\n\n\t\tnodeOptions.localesDirectory =\n\t\t\tnodeOptions?.localesDirectory ??\n\t\t\tpath.resolve(path.join(nodeOptions.scriptDirectory, \"dist\", \"locales\"));\n\n\t\tCLIDisplay.value(\"Locales Directory\", nodeOptions.localesDirectory);\n\t\tawait initialiseLocales(nodeOptions.localesDirectory);\n\n\t\tnodeOptions.envPrefix ??= \"TWIN_\";\n\n\t\toverrideModuleImport(nodeOptions.executionDirectory ?? \"\");\n\n\t\tconst commandLineArgs = parseCommandLineArgs(args);\n\n\t\tconst hasEnvPrefix = commandLineArgs.options?.find(option => option.key === \"env-prefix\");\n\t\tif (hasEnvPrefix) {\n\t\t\tnodeOptions.envPrefix = Coerce.string(hasEnvPrefix.value) ?? nodeOptions.envPrefix;\n\t\t}\n\n\t\tCLIDisplay.value(\"Environment Variable Prefix\", nodeOptions.envPrefix);\n\n\t\t// This is the only location in the code base that should access process.env directly\n\t\t// So we can safely disable the linting rule here.\n\t\tlet finalEnvVars =\n\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\tprocess.env as {\n\t\t\t\t[id: string]: string;\n\t\t\t};\n\n\t\tif (Is.objectValue(nodeOptions?.envVars)) {\n\t\t\tfinalEnvVars = {\n\t\t\t\t...finalEnvVars,\n\t\t\t\t...nodeOptions.envVars\n\t\t\t};\n\t\t}\n\n\t\tfinalEnvVars = {\n\t\t\t...getEnvDefaults(nodeOptions.envPrefix),\n\t\t\t...finalEnvVars\n\t\t};\n\n\t\tlet cliCommand;\n\t\tif (Is.arrayValue(commandLineArgs.options)) {\n\t\t\tregisterCommands();\n\t\t\tcliCommand = constructCliCommand(finalEnvVars, commandLineArgs);\n\t\t}\n\n\t\tif (Is.object(cliCommand)) {\n\t\t\tfinalEnvVars[`${nodeOptions.envPrefix}SILENT`] ??= \"true\";\n\t\t} else {\n\t\t\tif (Is.empty(nodeOptions?.openApiSpecFile)) {\n\t\t\t\tconst specFile = path.resolve(\n\t\t\t\t\tpath.join(nodeOptions.scriptDirectory ?? \"\", \"docs\", \"open-api\", \"spec.json\")\n\t\t\t\t);\n\t\t\t\tif (await fileExists(specFile)) {\n\t\t\t\t\tnodeOptions ??= {};\n\t\t\t\t\tnodeOptions.openApiSpecFile = specFile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (Is.stringValue(nodeOptions.openApiSpecFile)) {\n\t\t\t\tCLIDisplay.value(\"OpenAPI Spec File\", nodeOptions.openApiSpecFile);\n\t\t\t}\n\n\t\t\tif (Is.empty(nodeOptions?.favIconFile)) {\n\t\t\t\tconst favIconFile = path.resolve(\n\t\t\t\t\tpath.join(nodeOptions.scriptDirectory ?? \"\", \"static\", \"favicon.png\")\n\t\t\t\t);\n\t\t\t\tif (await fileExists(favIconFile)) {\n\t\t\t\t\tnodeOptions ??= {};\n\t\t\t\t\tnodeOptions.favIconFile = favIconFile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (Is.stringValue(nodeOptions.favIconFile)) {\n\t\t\t\tCLIDisplay.value(\"Favicon File\", nodeOptions.favIconFile);\n\t\t\t}\n\t\t}\n\n\t\tconst { nodeEngineConfig, nodeEnvVars, availableContextIdKeys } = await buildConfiguration(\n\t\t\tfinalEnvVars,\n\t\t\tnodeOptions,\n\t\t\tserverInfo\n\t\t);\n\n\t\tdebugEnabled = Coerce.boolean(nodeEnvVars.debug) ?? debugEnabled;\n\n\t\tCLIDisplay.break();\n\n\t\tconst startResult = await start(\n\t\t\tnodeOptions,\n\t\t\tnodeEngineConfig,\n\t\t\tnodeEnvVars,\n\t\t\tcliCommand,\n\t\t\tavailableContextIdKeys\n\t\t);\n\n\t\tif (Is.notEmpty(startResult)) {\n\t\t\tshowErrorDetails = false;\n\n\t\t\tlet isShuttingDown = false;\n\t\t\tfor (const signal of [\"SIGHUP\", \"SIGINT\", \"SIGTERM\"]) {\n\t\t\t\tprocess.on(signal, async () => {\n\t\t\t\t\tif (!isShuttingDown) {\n\t\t\t\t\t\tisShuttingDown = true;\n\t\t\t\t\t\tCLIDisplay.value(\"Terminate Signal\", signal);\n\t\t\t\t\t\tawait startResult.shutdown();\n\t\t\t\t\t\tprocess.exit(0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn startResult;\n\t} catch (err) {\n\t\tif (nodeOptions?.disableProcessExitOnFailure ?? false) {\n\t\t\tthrow err;\n\t\t}\n\n\t\tif (showErrorDetails) {\n\t\t\tCLIDisplay.error(err, true, { includeAdditional: true, includeStack: debugEnabled });\n\t\t}\n\n\t\t// eslint-disable-next-line unicorn/no-process-exit\n\t\tprocess.exit(1);\n\t}\n}\n\n/**\n * Test whether a camelCase key matches an entry in a pattern set.\n * Entries ending with \"*\" are treated as prefix patterns; all others require an exact match.\n * @param camelKey The camelCase key to test.\n * @param patternSet The set of exact keys and/or wildcard patterns (e.g. \"restPath*\").\n * @returns True if the key matches any entry.\n */\nfunction matchesPatternSet(\n\tcamelKey: string,\n\tpatternSet: ReadonlySet<string> | Set<string>\n): boolean {\n\tif (patternSet.has(camelKey)) {\n\t\treturn true;\n\t}\n\tfor (const pattern of patternSet) {\n\t\tif (pattern.endsWith(\"*\") && camelKey.startsWith(pattern.slice(0, -1))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Report any environment variables which are still recognised but no longer used.\n * @param envVars The already-converted camelCase env variables.\n * @param prefix The prefix used for the environment variables (e.g. \"TWIN_\").\n */\nfunction warnDeprecatedEnvVarKeys(\n\tenvVars: { [id: string]: string | unknown },\n\tprefix: string\n): void {\n\tfor (const camelKey of Object.keys(envVars)) {\n\t\tconst replacements = DEPRECATED_ENVIRONMENT_VARIABLE_KEYS.get(camelKey);\n\t\tif (!Is.undefined(replacements)) {\n\t\t\tconst key = EnvHelper.jsonKeyToEnvVarKey(camelKey, prefix);\n\n\t\t\tif (Is.arrayValue(replacements)) {\n\t\t\t\tCLIDisplay.warning(\n\t\t\t\t\tI18n.formatMessage(\"warn.node.deprecatedEnvVar\", {\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\treplacements: replacements\n\t\t\t\t\t\t\t.map(replacement => EnvHelper.jsonKeyToEnvVarKey(replacement, prefix))\n\t\t\t\t\t\t\t.join(\", \")\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tCLIDisplay.warning(I18n.formatMessage(\"warn.node.deprecatedEnvVarNoReplacement\", { key }));\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Validate that every key in envVars maps to a recognised property.\n * All unknown keys are collected, then reported together as a single error or warning.\n * Raw env var names listed in the allow list (e.g. TWIN_MY_EXTENSION_SECRET, TWIN_REST_PATH_*) are always accepted.\n * Wildcard patterns ending with * are supported in both allow sets and the allow list.\n * @param envVars The already-converted camelCase env variables.\n * @param prefix The prefix used for the environment variables (e.g. \"TWIN_\").\n * @param allowSets An array of sets of allowed keys and/or wildcard patterns.\n * @throws GeneralError If any unknown env var properties are found and strict mode is \"error\", or if the strict mode value is invalid.\n */\nfunction validateEnvVarKeys(\n\tenvVars: { [id: string]: string | unknown },\n\tprefix: string,\n\tallowSets: ReadonlySet<string>[]\n): void {\n\tconst mode = Is.stringValue(envVars.strictEnv) ? envVars.strictEnv : \"error\";\n\tGuards.arrayOneOf(\"node\", `${prefix}STRICT_ENV`, mode, [\"error\", \"warn\", \"ignore\"]);\n\n\tif (mode === \"ignore\") {\n\t\treturn;\n\t}\n\n\tconst customSet = new Set(\n\t\tcommaSeparatedListToArray<string>(envVars.envAllowList as string).map(k =>\n\t\t\tEnvHelper.envVarKeyToJsonKey(k.trim(), prefix)\n\t\t)\n\t);\n\n\tconst unknown = Object.keys(envVars)\n\t\t.filter(\n\t\t\tcamelKey =>\n\t\t\t\t!allowSets.some(set => matchesPatternSet(camelKey, set)) &&\n\t\t\t\t!matchesPatternSet(camelKey, customSet) &&\n\t\t\t\t!DEPRECATED_ENVIRONMENT_VARIABLE_KEYS.has(camelKey)\n\t\t)\n\t\t.map(camelKey => EnvHelper.jsonKeyToEnvVarKey(camelKey, prefix));\n\n\tif (unknown.length > 0) {\n\t\tif (mode === \"error\") {\n\t\t\tthrow new GeneralError(\"node\", \"unknownEnvVars\", { keys: unknown.join(\", \"), prefix });\n\t\t}\n\t\tCLIDisplay.warning(\n\t\t\tI18n.formatMessage(\"warn.node.unknownEnvVars\", { keys: unknown.join(\", \"), prefix })\n\t\t);\n\t}\n}\n\n/**\n * Build the configuration for the TWIN Node.\n * @param processEnv The environment variables from the process.\n * @param options The options for running the server.\n * @param serverInfo The server information.\n * @returns A promise that resolves to the engine server configuration, environment prefix, environment variables,\n * and options.\n */\nexport async function buildConfiguration(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: INodeOptions,\n\tserverInfo: IServerInfo\n): Promise<{\n\tnodeEnvVars: IEnvironmentVariables & { [id: string]: string | unknown };\n\tnodeEngineConfig: INodeEngineConfig;\n\tavailableContextIdKeys: { key: string; requiredHandlerFeatures: string[] }[];\n}> {\n\tconst availableContextIdKeys: { key: string; requiredHandlerFeatures: string[] }[] = [];\n\n\tlet defaultEnvOnly = false;\n\tif (Is.empty(options?.envFilenames)) {\n\t\tconst envFile = path.resolve(path.join(options.executionDirectory ?? \"\", \".env\"));\n\t\tCLIDisplay.value(\"Default Environment File\", envFile);\n\t\toptions ??= {};\n\t\toptions.envFilenames = [envFile];\n\t\tdefaultEnvOnly = true;\n\t}\n\n\tif (Is.arrayValue(options?.envFilenames)) {\n\t\tconst output = dotenv.config({\n\t\t\tpath: options?.envFilenames,\n\t\t\tquiet: true\n\t\t});\n\n\t\t// We don't want to throw an error if the default environment file is not found.\n\t\t// Only if we have custom environment files.\n\t\tif (!defaultEnvOnly && output.error) {\n\t\t\tthrow output.error;\n\t\t}\n\n\t\tif (Is.objectValue(output.parsed)) {\n\t\t\tfor (const [key, value] of Object.entries(output.parsed)) {\n\t\t\t\t// Only set environment variables that are not already set in\n\t\t\t\t// the process environment or provided via options.envVars\n\t\t\t\tprocessEnv[key] ??= value;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst envVars = EnvHelper.envToJson<{ [id: string]: string | unknown }>(\n\t\tprocessEnv,\n\t\toptions.envPrefix ?? \"\"\n\t);\n\n\twarnDeprecatedEnvVarKeys(envVars, options.envPrefix ?? \"\");\n\n\tvalidateEnvVarKeys(envVars, options.envPrefix ?? \"\", [\n\t\tENGINE_ENVIRONMENT_VARIABLE_KEYS,\n\t\tENGINE_SERVER_ENVIRONMENT_VARIABLE_KEYS,\n\t\tNODE_ENVIRONMENT_VARIABLE_KEYS,\n\t\tBOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS\n\t]);\n\n\t// Expand any environment variables that use the @file: syntax\n\tconst keys = Object.keys(envVars);\n\tfor (const key of keys) {\n\t\tif (\n\t\t\tIs.stringValue(envVars[key]) &&\n\t\t\t(envVars[key].startsWith(\"@text:\") || envVars[key].startsWith(\"@json:\"))\n\t\t) {\n\t\t\tconst filePath = envVars[key].slice(6).trim();\n\t\t\tconst embeddedFile = path.resolve(path.join(options.executionDirectory ?? \"\", filePath));\n\n\t\t\tif (envVars[key].startsWith(\"@text:\")) {\n\t\t\t\tCLIDisplay.value(`Expanding Environment Variable: ${key} from text file`, embeddedFile);\n\t\t\t\tenvVars[key] = await loadTextFile(embeddedFile);\n\t\t\t} else if (envVars[key].startsWith(\"@json:\")) {\n\t\t\t\tCLIDisplay.value(`Expanding Environment Variable: ${key} from JSON file`, embeddedFile);\n\t\t\t\tenvVars[key] = await loadJsonFile(embeddedFile);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Extend the environment variables with any additional custom configuration.\n\tif (Is.function(options?.extendEnvVars)) {\n\t\tCLIDisplay.task(\"Extending Environment Variables\");\n\t\tawait options.extendEnvVars(envVars);\n\t}\n\n\t// Build the engine configuration from the environment variables.\n\tconst coreConfig = await buildEngineConfiguration(envVars);\n\tconst engineServerConfig = await buildEngineServerConfiguration(\n\t\tenvVars,\n\t\tavailableContextIdKeys,\n\t\tcoreConfig,\n\t\tserverInfo,\n\t\toptions?.openApiSpecFile,\n\t\toptions?.favIconFile\n\t);\n\n\t// Merge any custom configuration provided in the options.\n\tif (Is.arrayValue(options?.configFilenames)) {\n\t\tfor (const configFile of options.configFilenames) {\n\t\t\tCLIDisplay.value(\"Loading Configuration File\", configFile);\n\t\t\tconst configFilePath = path.resolve(path.join(options.executionDirectory ?? \"\", configFile));\n\t\t\tconst config = await loadJsonFile(configFilePath);\n\t\t\tObject.assign(engineServerConfig, config);\n\t\t}\n\t}\n\n\tif (Is.objectValue(options?.config)) {\n\t\tCLIDisplay.task(\"Merging Custom Configuration\");\n\t\tObject.assign(engineServerConfig, options.config);\n\t}\n\n\t// Merge any custom configuration provided in the options.\n\tif (Is.function(options?.extendConfig)) {\n\t\tCLIDisplay.task(\"Extending Configuration\");\n\t\tawait options.extendConfig(envVars, engineServerConfig);\n\t}\n\n\tconst nodeEngineConfig = await extensionsConfiguration(envVars, engineServerConfig);\n\n\treturn { nodeEngineConfig, nodeEnvVars: envVars, availableContextIdKeys };\n}\n\n/**\n * Override module imports to support protocol-based loading (npm:, https:) and local files.\n * @param executionDirectory The execution directory for resolving local module paths.\n * @param envVars The environment variables containing extension configuration (optional, uses defaults if not provided).\n */\nexport function overrideModuleImport(\n\texecutionDirectory: string,\n\tenvVars?: IEnvironmentVariables\n): void {\n\tconst maxSizeMb = Coerce.number(envVars?.extensionsMaxSizeMb) ?? 10;\n\tconst cacheDirectory = envVars?.extensionsCacheDirectory;\n\n\tModuleHelper.overrideImport(async moduleName => {\n\t\tif (moduleCache[moduleName]) {\n\t\t\treturn {\n\t\t\t\tmodule: moduleCache[moduleName],\n\t\t\t\tuseDefault: false\n\t\t\t};\n\t\t}\n\n\t\tconst parsed = parseModuleProtocol(moduleName);\n\t\tlet resolvedPath: string | undefined;\n\n\t\tswitch (parsed.protocol) {\n\t\t\tcase ModuleProtocol.Npm: {\n\t\t\t\tconst result = await handleNpmProtocol(\n\t\t\t\t\tparsed.identifier,\n\t\t\t\t\texecutionDirectory,\n\t\t\t\t\tcacheDirectory\n\t\t\t\t);\n\t\t\t\tresolvedPath = result.resolvedPath;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Https: {\n\t\t\t\tconst result = await handleHttpsProtocol(\n\t\t\t\t\tparsed.identifier,\n\t\t\t\t\texecutionDirectory,\n\t\t\t\t\tmaxSizeMb,\n\t\t\t\t\tcacheDirectory,\n\t\t\t\t\tenvVars?.extensionsCacheTtlHours,\n\t\t\t\t\tenvVars?.extensionsForceRefresh\n\t\t\t\t);\n\t\t\t\tresolvedPath = result.resolvedPath;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Http: {\n\t\t\t\tthrow new GeneralError(\"node\", \"insecureProtocol\", { protocol: ModuleProtocol.Http });\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Local: {\n\t\t\t\tlet localFilename = path.resolve(moduleName);\n\n\t\t\t\tlet exists = await fileExists(localFilename);\n\t\t\t\tif (!exists) {\n\t\t\t\t\tlocalFilename = path.resolve(executionDirectory, moduleName);\n\t\t\t\t\texists = await fileExists(localFilename);\n\t\t\t\t}\n\n\t\t\t\tif (exists) {\n\t\t\t\t\tresolvedPath = localFilename;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase ModuleProtocol.Default: {\n\t\t\t\ttry {\n\t\t\t\t\tconst packagePath = await CLIUtils.findPackageRoot(moduleName, executionDirectory);\n\t\t\t\t\tif (Is.stringValue(packagePath)) {\n\t\t\t\t\t\tconst mainFile = await resolvePackageEntryPoint(packagePath, moduleName);\n\t\t\t\t\t\tconst modulePath = path.resolve(packagePath, mainFile);\n\t\t\t\t\t\tconst exists = await fileExists(modulePath);\n\t\t\t\t\t\tif (exists) {\n\t\t\t\t\t\t\tresolvedPath = modulePath;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// Continue to fallback resolution\n\t\t\t\t}\n\n\t\t\t\t// Fallback: resolve from npm protocol cache directory (installed via handleNpmProtocol)\n\t\t\t\ttry {\n\t\t\t\t\tconst cacheNpmRoot = path.resolve(\n\t\t\t\t\t\tgetExtensionsCacheDir(executionDirectory, ModuleProtocol.Npm, cacheDirectory),\n\t\t\t\t\t\t\"node_modules\"\n\t\t\t\t\t);\n\n\t\t\t\t\tconst packagePath = path.resolve(cacheNpmRoot, moduleName);\n\t\t\t\t\tconst mainFile = await resolvePackageEntryPoint(packagePath, moduleName);\n\t\t\t\t\tconst modulePath = path.resolve(packagePath, mainFile);\n\t\t\t\t\tconst exists = await fileExists(modulePath);\n\t\t\t\t\tif (exists) {\n\t\t\t\t\t\tresolvedPath = modulePath;\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// No cached resolution either; fall through\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Common module loading and caching logic\n\t\tif (resolvedPath) {\n\t\t\tconst module = await import(createModuleImportUrl(resolvedPath));\n\t\t\tmoduleCache[moduleName] = module;\n\t\t\treturn {\n\t\t\t\tmodule,\n\t\t\t\tuseDefault: false\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tmodule: undefined,\n\t\t\tuseDefault: true\n\t\t};\n\t});\n}\n"]}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,200 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1-next.1](https://github.com/iotaledger/twin-node/compare/node-core-v0.10.1-next.0...node-core-v0.10.1-next.1) (2026-09-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add additional env vars ([#328](https://github.com/iotaledger/twin-node/issues/328)) ([6ca8718](https://github.com/iotaledger/twin-node/commit/6ca87184bc4d78829c957ea055d3c281aca6cf9f))
|
|
9
|
+
* add automation ([cfc63b4](https://github.com/iotaledger/twin-node/commit/cfc63b465c139280f696877df21d54dc6a065a7e))
|
|
10
|
+
* add background task max dispatch count ([f0965a0](https://github.com/iotaledger/twin-node/commit/f0965a004dc0e0a856fc0fe1e58330f84e09aa3b))
|
|
11
|
+
* add CLI commands and remove automated bootstrap code ([#69](https://github.com/iotaledger/twin-node/issues/69)) ([6e40933](https://github.com/iotaledger/twin-node/commit/6e40933d8bb820b380e1074fc88feeedca0ef7d9))
|
|
12
|
+
* add context id features ([#53](https://github.com/iotaledger/twin-node/issues/53)) ([827adf5](https://github.com/iotaledger/twin-node/commit/827adf52cb87fca53cec52b27e67f7a9dba2c088))
|
|
13
|
+
* add dataspace endpoint tests for app-datasets, transfers, and data plane ([#213](https://github.com/iotaledger/twin-node/issues/213)) ([5641a78](https://github.com/iotaledger/twin-node/commit/5641a781bf17a1914912f3162116d7c5f5c0dca2))
|
|
14
|
+
* add dsp sweep vars ([#340](https://github.com/iotaledger/twin-node/issues/340)) ([5487c13](https://github.com/iotaledger/twin-node/commit/5487c13197fcd386206ec37f9f342c55ec5b1176))
|
|
15
|
+
* add extensions support ([476d5a8](https://github.com/iotaledger/twin-node/commit/476d5a864026a2f78e5b02bc9eb81359777a4a45))
|
|
16
|
+
* add immutable proof task worker idle timeout env var ([#409](https://github.com/iotaledger/twin-node/issues/409)) ([12a524e](https://github.com/iotaledger/twin-node/commit/12a524e44d353cbfa690e522c139ec7083baefab))
|
|
17
|
+
* add isDefault flag to logging connectors ([358e839](https://github.com/iotaledger/twin-node/commit/358e8394819dab9832d3a9ebfac74b897b7d5f40))
|
|
18
|
+
* add logging otel ([2adf4e4](https://github.com/iotaledger/twin-node/commit/2adf4e44fd2ef4cce43f354da2187719c72cc3cd))
|
|
19
|
+
* add module cache and improve resolution ([482be05](https://github.com/iotaledger/twin-node/commit/482be056c37a598033250ea8a7288a33cf3470b4))
|
|
20
|
+
* add mutex settings ([#222](https://github.com/iotaledger/twin-node/issues/222)) ([492c55f](https://github.com/iotaledger/twin-node/commit/492c55f67d5f70c2a4a27dfdb2700a644ee87955))
|
|
21
|
+
* add new endpoints ([cc6e30d](https://github.com/iotaledger/twin-node/commit/cc6e30d85f7ed8018697462a7100e5c2f4e8f407))
|
|
22
|
+
* add notarization ([#121](https://github.com/iotaledger/twin-node/issues/121)) ([b2a11df](https://github.com/iotaledger/twin-node/commit/b2a11df92c7b5026f73f08a018c0586ebe008e92))
|
|
23
|
+
* add obligation enforcers and multi instance support ([#89](https://github.com/iotaledger/twin-node/issues/89)) ([d81af99](https://github.com/iotaledger/twin-node/commit/d81af99b8c4db6e9a1370b7065bf6d9d222c71ed))
|
|
24
|
+
* add outlook connector ([cf7ee0b](https://github.com/iotaledger/twin-node/commit/cf7ee0b73042cb33e693f3677386ca94567bb6e4))
|
|
25
|
+
* add rights management components ([0fc6293](https://github.com/iotaledger/twin-node/commit/0fc629332db24494bd73003625c7bf3f939a2597))
|
|
26
|
+
* add standalone federated catalogue example config and endpoint tests ([#235](https://github.com/iotaledger/twin-node/issues/235)) ([ffb51dd](https://github.com/iotaledger/twin-node/commit/ffb51ddda5188c2f21b8ce65343b39a28f4eee4b))
|
|
27
|
+
* add support for dynamodb connection timeout ([63051b0](https://github.com/iotaledger/twin-node/commit/63051b0d22138079115dfac921e7f0c45eaad34e))
|
|
28
|
+
* add tenant override ([#337](https://github.com/iotaledger/twin-node/issues/337)) ([b4ea765](https://github.com/iotaledger/twin-node/commit/b4ea7656e2557c19053365dd5d4af14d0d945cd5))
|
|
29
|
+
* add tracing ([#344](https://github.com/iotaledger/twin-node/issues/344)) ([4fa71cd](https://github.com/iotaledger/twin-node/commit/4fa71cd0eafd7d708df15c8f0a85323fecd05561))
|
|
30
|
+
* add tracing console connector ([#373](https://github.com/iotaledger/twin-node/issues/373)) ([fb36cb8](https://github.com/iotaledger/twin-node/commit/fb36cb8bebc2e8c1b94fa332cead8283ca5d636a))
|
|
31
|
+
* add tracing support ([a4986fc](https://github.com/iotaledger/twin-node/commit/a4986fc4af603ee461ec8d18ff502dddbc43edec))
|
|
32
|
+
* add trust and rights management plugin support ([cdeb504](https://github.com/iotaledger/twin-node/commit/cdeb504ee5986a347466162b9afa781645b4a54c))
|
|
33
|
+
* add trust ttl ([#73](https://github.com/iotaledger/twin-node/issues/73)) ([911cee7](https://github.com/iotaledger/twin-node/commit/911cee771bba490143bb1574ca8360f7cf8baa1a))
|
|
34
|
+
* add validate-locales ([1a19dcb](https://github.com/iotaledger/twin-node/commit/1a19dcb005c2f0e3103e290db28c48a3464094cb))
|
|
35
|
+
* add vault prefix configuration ([#75](https://github.com/iotaledger/twin-node/issues/75)) ([1d4afb1](https://github.com/iotaledger/twin-node/commit/1d4afb1b1a8aa60795898eeb9e7f5153c279527d))
|
|
36
|
+
* add well-known endpoint ([38cbab2](https://github.com/iotaledger/twin-node/commit/38cbab20631666d3bae8b0b5ae346a3488148b1d))
|
|
37
|
+
* adding npm and https protocols to load extensions ([#45](https://github.com/iotaledger/twin-node/issues/45)) ([33940b7](https://github.com/iotaledger/twin-node/commit/33940b7e771a0c5af32c18d442deb26a8631fd02))
|
|
38
|
+
* additional cli commands ([#269](https://github.com/iotaledger/twin-node/issues/269)) ([c9e7c93](https://github.com/iotaledger/twin-node/commit/c9e7c939aedfceed9cbe501f2dc936e84289ed62))
|
|
39
|
+
* additional env vars and validation ([#324](https://github.com/iotaledger/twin-node/issues/324)) ([6b01e8c](https://github.com/iotaledger/twin-node/commit/6b01e8c10f9aa7181f51f13534d8164db3e7322d))
|
|
40
|
+
* additional options for enabling components ([e13d772](https://github.com/iotaledger/twin-node/commit/e13d7721a0dd7143d456fff246622cbe63dbd0f1))
|
|
41
|
+
* additional route logging env vars ([7152c88](https://github.com/iotaledger/twin-node/commit/7152c887c3ba76778e2d9e68ba57198b8d81d802))
|
|
42
|
+
* additional stop interlock ([b3a2757](https://github.com/iotaledger/twin-node/commit/b3a2757325af0e7b258a9f97f1b52e86087e6301))
|
|
43
|
+
* align node module with dataspace rename and control plane integâĻ ([#95](https://github.com/iotaledger/twin-node/issues/95)) ([8129868](https://github.com/iotaledger/twin-node/commit/812986886fb5d779dd380956c4e6cc47c2d73530))
|
|
44
|
+
* auth fix ([a8e59e9](https://github.com/iotaledger/twin-node/commit/a8e59e947735180c9edee041f87af5e1e125e3c6))
|
|
45
|
+
* authentication services ([#118](https://github.com/iotaledger/twin-node/issues/118)) ([311a7f8](https://github.com/iotaledger/twin-node/commit/311a7f882db1e50a83e94d2dae32fefc68debb47))
|
|
46
|
+
* bootstrap legacy skip ([469d950](https://github.com/iotaledger/twin-node/commit/469d9505bd0497c271ba291641f63786200cb548))
|
|
47
|
+
* bootstrap-legacy rename ([#310](https://github.com/iotaledger/twin-node/issues/310)) ([53af8a2](https://github.com/iotaledger/twin-node/commit/53af8a2e797e90bb601416215247cd8649dd6220))
|
|
48
|
+
* bump [@twin](https://github.com/twin).org/* to latest next ([#172](https://github.com/iotaledger/twin-node/issues/172)) ([45862d5](https://github.com/iotaledger/twin-node/commit/45862d555e4958f1c12da357817b7b87642d7aba))
|
|
49
|
+
* bump dependencies ([#216](https://github.com/iotaledger/twin-node/issues/216)) ([a005824](https://github.com/iotaledger/twin-node/commit/a005824fe3e4a734543f613d8a7cc1275fec4572))
|
|
50
|
+
* cache the npm root to increase startup speed ([f10ea9e](https://github.com/iotaledger/twin-node/commit/f10ea9e22cc202f320df5fb21507b886c1f7345b))
|
|
51
|
+
* cli tenant-token command ([#177](https://github.com/iotaledger/twin-node/issues/177)) ([b3f68a4](https://github.com/iotaledger/twin-node/commit/b3f68a4972d065e865372230c078b4657dfabc1a))
|
|
52
|
+
* clone mode ([#360](https://github.com/iotaledger/twin-node/issues/360)) ([8bb56fb](https://github.com/iotaledger/twin-node/commit/8bb56fb6a4b138c2ff0d1267d1be4f8c24f492a6))
|
|
53
|
+
* component update ([9a3fdab](https://github.com/iotaledger/twin-node/commit/9a3fdab250e0dc8b8aa52479d5c72517de8d6c0f))
|
|
54
|
+
* component update ([8bf10da](https://github.com/iotaledger/twin-node/commit/8bf10da2e3e29f22afddd9cb55a26f343555e106))
|
|
55
|
+
* configure web server body limits from the environment ([#356](https://github.com/iotaledger/twin-node/issues/356)) ([f196ad3](https://github.com/iotaledger/twin-node/commit/f196ad368559515184e37a99d6876570074ebcd5))
|
|
56
|
+
* configure which factories receive tracing facades ([#412](https://github.com/iotaledger/twin-node/issues/412)) ([da56bcb](https://github.com/iotaledger/twin-node/commit/da56bcbeba04d1091b3cd237624951c31ff9c185))
|
|
57
|
+
* custom plugin timeout ([#395](https://github.com/iotaledger/twin-node/issues/395)) ([d4a33ba](https://github.com/iotaledger/twin-node/commit/d4a33ba10a54c6dfab0b845b386201ac326df88a))
|
|
58
|
+
* custom REST paths ([#99](https://github.com/iotaledger/twin-node/issues/99)) ([dcab1b2](https://github.com/iotaledger/twin-node/commit/dcab1b2b23c13b4c9f39c3c1c67284f56e732bd1))
|
|
59
|
+
* dataspace plane path ([#272](https://github.com/iotaledger/twin-node/issues/272)) ([5998eeb](https://github.com/iotaledger/twin-node/commit/5998eeb6fa1392ae753eb6bafeccefa1fb690573))
|
|
60
|
+
* don't override existing env vars with env files ([ebccac2](https://github.com/iotaledger/twin-node/commit/ebccac297c3156076f17c246a8abd994f8f20e61))
|
|
61
|
+
* dspace well-known endpoint test ([615bf55](https://github.com/iotaledger/twin-node/commit/615bf55de9e05ed410ed18348735cf4d6f392fe7))
|
|
62
|
+
* email ingestion ([#379](https://github.com/iotaledger/twin-node/issues/379)) ([12da79d](https://github.com/iotaledger/twin-node/commit/12da79dc9b167e288c555d4f1909a61c190eee4d))
|
|
63
|
+
* endpoints-runner ([#153](https://github.com/iotaledger/twin-node/issues/153)) ([cca42d0](https://github.com/iotaledger/twin-node/commit/cca42d07d6655d401c909308e8b73606fef05248))
|
|
64
|
+
* enhanced cli commands ([#288](https://github.com/iotaledger/twin-node/issues/288)) ([479fb34](https://github.com/iotaledger/twin-node/commit/479fb3448c493a134aee35b69ae39458e493a4ad))
|
|
65
|
+
* env var simplification ([460b0f2](https://github.com/iotaledger/twin-node/commit/460b0f20a73cb482f7443af502f261d5f9d01759))
|
|
66
|
+
* env var validation ([#243](https://github.com/iotaledger/twin-node/issues/243)) ([569945a](https://github.com/iotaledger/twin-node/commit/569945a751eb52d008a681777a3cba881af1b9a4))
|
|
67
|
+
* env vars consistency ([1823b7a](https://github.com/iotaledger/twin-node/commit/1823b7aeae5dc7484861534b851080afda64d869))
|
|
68
|
+
* env-prefix option and user-update cli command ([#83](https://github.com/iotaledger/twin-node/issues/83)) ([fc48efa](https://github.com/iotaledger/twin-node/commit/fc48efa7ad72173def048170c3afb5eeb9f1b292))
|
|
69
|
+
* envListToArray use explicitly default value ([#401](https://github.com/iotaledger/twin-node/issues/401)) ([25f6ede](https://github.com/iotaledger/twin-node/commit/25f6ede762916a986e61b28124076aa87fd4a15c))
|
|
70
|
+
* eslint migration to flat config ([080db74](https://github.com/iotaledger/twin-node/commit/080db746390230f78725d214bc957da2efee9eb1))
|
|
71
|
+
* expose gasBudget and gasReservationDuration as configurable env vars ([#286](https://github.com/iotaledger/twin-node/issues/286)) ([d678b27](https://github.com/iotaledger/twin-node/commit/d678b27d629930a6ce85eeab9caf89d1187c3461))
|
|
72
|
+
* federated catalogue trust mode ([#194](https://github.com/iotaledger/twin-node/issues/194)) ([c18e6fb](https://github.com/iotaledger/twin-node/commit/c18e6fbe0014eb5faf8084d16169d86f3d3b23a6))
|
|
73
|
+
* file logging config ([#287](https://github.com/iotaledger/twin-node/issues/287)) ([a567b25](https://github.com/iotaledger/twin-node/commit/a567b253cbb8b9af872bb0e494c013212f4f55a2))
|
|
74
|
+
* first metrics in the core and app for testing ([#139](https://github.com/iotaledger/twin-node/issues/139)) ([abe17bb](https://github.com/iotaledger/twin-node/commit/abe17bb9a6261dcb7fd46253221182fbb1dc2259))
|
|
75
|
+
* health and url transformer ([#131](https://github.com/iotaledger/twin-node/issues/131)) ([3658903](https://github.com/iotaledger/twin-node/commit/36589036b9bea120880fc395b0d123a89032cf40))
|
|
76
|
+
* health exclude config ([#403](https://github.com/iotaledger/twin-node/issues/403)) ([646024b](https://github.com/iotaledger/twin-node/commit/646024b0ebe0f6f11630da2ab4b48e9ea6c2970b))
|
|
77
|
+
* identity profile information source ([dbb53d1](https://github.com/iotaledger/twin-node/commit/dbb53d145f517070d864f37650a6dbc1f3e9c3a8))
|
|
78
|
+
* immutable proof config ([#307](https://github.com/iotaledger/twin-node/issues/307)) ([9257495](https://github.com/iotaledger/twin-node/commit/92574953329647756aa6ab4cca80b1707e14a33f))
|
|
79
|
+
* immutable proof gate and additional config ([#157](https://github.com/iotaledger/twin-node/issues/157)) ([1d1fbb7](https://github.com/iotaledger/twin-node/commit/1d1fbb7c53525af848761dc25b42e9e676929972))
|
|
80
|
+
* improve bootstrapping and shutdown behaviour ([#66](https://github.com/iotaledger/twin-node/issues/66)) ([65b3452](https://github.com/iotaledger/twin-node/commit/65b345240334bfff48b52e136cc486cd7ac7f290))
|
|
81
|
+
* improve error handling for extensions and logging ([bd84fde](https://github.com/iotaledger/twin-node/commit/bd84fde67e5a9db6ac66730397992401ca52e88c))
|
|
82
|
+
* improve node logging ([63d6ea6](https://github.com/iotaledger/twin-node/commit/63d6ea661c2c76985d98addb8d905ad6f0c7f164))
|
|
83
|
+
* improve node logging ([c25b9c6](https://github.com/iotaledger/twin-node/commit/c25b9c6779bdb76f341df072c39b4c2fae4565a3))
|
|
84
|
+
* improved cli commands ([#206](https://github.com/iotaledger/twin-node/issues/206)) ([cf00850](https://github.com/iotaledger/twin-node/commit/cf0085023a66e187aaaaf3889128c845c73a1faf))
|
|
85
|
+
* migration options ([#293](https://github.com/iotaledger/twin-node/issues/293)) ([91acc88](https://github.com/iotaledger/twin-node/commit/91acc881f665be0177b2e895e2810dd4d6145105))
|
|
86
|
+
* migration testing ([#199](https://github.com/iotaledger/twin-node/issues/199)) ([97a731c](https://github.com/iotaledger/twin-node/commit/97a731c520d66ab0588d80987a0f88d388ce51ae))
|
|
87
|
+
* multi-tenant env wiring, trust auto-enable, tenant-token vault key, engine-driven callbackPath ([#128](https://github.com/iotaledger/twin-node/issues/128)) ([0de4d35](https://github.com/iotaledger/twin-node/commit/0de4d356fb2f825afae5469005d475700f510ee4))
|
|
88
|
+
* new tenant auth mechanisms ([#168](https://github.com/iotaledger/twin-node/issues/168)) ([686f111](https://github.com/iotaledger/twin-node/commit/686f1118e79e6f26a8dc72a5e9172584057f4518))
|
|
89
|
+
* organization identifiers ([#203](https://github.com/iotaledger/twin-node/issues/203)) ([1a6b176](https://github.com/iotaledger/twin-node/commit/1a6b1760d9f8e43a769407668426c70e1c8e1aa8))
|
|
90
|
+
* pool env vars ([#331](https://github.com/iotaledger/twin-node/issues/331)) ([338ea61](https://github.com/iotaledger/twin-node/commit/338ea612b37aa4d15971c8a09def47bee9395d0c))
|
|
91
|
+
* publish nightly soak reports as a web-hosted dashboard ([#378](https://github.com/iotaledger/twin-node/issues/378)) ([e6984f9](https://github.com/iotaledger/twin-node/commit/e6984f9183e50b78e10de2124b94e3c22c7306ca))
|
|
92
|
+
* refactor testing ([fc28140](https://github.com/iotaledger/twin-node/commit/fc28140c6a398d31e092752ef53fa490da167794))
|
|
93
|
+
* register task scheduler when immutable proof is enabled ([#320](https://github.com/iotaledger/twin-node/issues/320)) ([b1d9c81](https://github.com/iotaledger/twin-node/commit/b1d9c81e0ec267292c6eaba8a6228eff1c41a9f0))
|
|
94
|
+
* remove dap and darp ([36c3ffb](https://github.com/iotaledger/twin-node/commit/36c3ffb31af65a0e3025859dab675efeee043155))
|
|
95
|
+
* remove hosting component ([#219](https://github.com/iotaledger/twin-node/issues/219)) ([fb2fea4](https://github.com/iotaledger/twin-node/commit/fb2fea46f57aab9252ee1491499e84b8ad46533e))
|
|
96
|
+
* remove mutex timeout from logger ([e5a5407](https://github.com/iotaledger/twin-node/commit/e5a540725fa97b523f88589f582501f41b982d5b))
|
|
97
|
+
* remove old mutex timeouts ([fe6444a](https://github.com/iotaledger/twin-node/commit/fe6444af1a2e53cf6bce8517dbb8352e8b07bb31))
|
|
98
|
+
* remove set-tenant ([#186](https://github.com/iotaledger/twin-node/issues/186)) ([1fc1909](https://github.com/iotaledger/twin-node/commit/1fc1909e6335dea51dfec3bb91fba4badaa9790a))
|
|
99
|
+
* rest metrics ([#341](https://github.com/iotaledger/twin-node/issues/341)) ([ebec573](https://github.com/iotaledger/twin-node/commit/ebec5736bb66adfd97f7d73912bec1ce7392e5f8))
|
|
100
|
+
* separate script directory from exec directory ([f6bb4db](https://github.com/iotaledger/twin-node/commit/f6bb4dbea1f1e200e0640fa154c6997ef99c99b4))
|
|
101
|
+
* silent telemetry and tracing options ([#351](https://github.com/iotaledger/twin-node/issues/351)) ([3a5752f](https://github.com/iotaledger/twin-node/commit/3a5752fc0bf8a028b3ebfc34878524ac799fb81e))
|
|
102
|
+
* support public origin and hosting service ([#77](https://github.com/iotaledger/twin-node/issues/77)) ([3b9039f](https://github.com/iotaledger/twin-node/commit/3b9039fcba7f7038c06f8fd6a5ccc9fdbbf535b3))
|
|
103
|
+
* telemetry and deprecated variables ([198f43f](https://github.com/iotaledger/twin-node/commit/198f43fd2d94e2f6721924365b73c0af3020e31d))
|
|
104
|
+
* telemetry batching ([#347](https://github.com/iotaledger/twin-node/issues/347)) ([5d5b0a9](https://github.com/iotaledger/twin-node/commit/5d5b0a91396298fe774ae26193b0595875cd118a))
|
|
105
|
+
* telemetry tracing multi ([#357](https://github.com/iotaledger/twin-node/issues/357)) ([b6412ac](https://github.com/iotaledger/twin-node/commit/b6412ac3141a94a0f9f7d1dd391451ac9247e862))
|
|
106
|
+
* tenant-id in user create and update ([#148](https://github.com/iotaledger/twin-node/issues/148)) ([1143e30](https://github.com/iotaledger/twin-node/commit/1143e30fb0d2056d113367d0c5ea251f07695da1))
|
|
107
|
+
* typescript 6 update ([ce2e3ca](https://github.com/iotaledger/twin-node/commit/ce2e3ca5219587709f7b9cf6c65909b48fba11b5))
|
|
108
|
+
* update background tasks and add fedcat filters ([1fd297e](https://github.com/iotaledger/twin-node/commit/1fd297e29f60b5bb3909638b68e326c5b0e2d77d))
|
|
109
|
+
* update components ([a2643b9](https://github.com/iotaledger/twin-node/commit/a2643b9ce7e338e4853237a6daba7fa58d9fc5c8))
|
|
110
|
+
* update components ([35cdfdc](https://github.com/iotaledger/twin-node/commit/35cdfdcba2b52599b4db3afd8c9e6dd17468b21e))
|
|
111
|
+
* update context usage ([2215440](https://github.com/iotaledger/twin-node/commit/2215440801dea3955885b6579ad9b98b7a5d87ea))
|
|
112
|
+
* update dependencies ([34a5d51](https://github.com/iotaledger/twin-node/commit/34a5d5100140f6e642e8aaa1b4da5304b8ce6f0a))
|
|
113
|
+
* update dependencies ([64c8ea8](https://github.com/iotaledger/twin-node/commit/64c8ea8c8b5e918f7ad419c4e3b8d08faf5e3fdd))
|
|
114
|
+
* update dependencies ([aab05b5](https://github.com/iotaledger/twin-node/commit/aab05b552152a208a504fb9a080603f1990d4f79))
|
|
115
|
+
* update dependencies ([6cb3d3a](https://github.com/iotaledger/twin-node/commit/6cb3d3a63f7b976f80074ddecfba034b7e92f919))
|
|
116
|
+
* update dependencies ([#178](https://github.com/iotaledger/twin-node/issues/178)) ([0d346ec](https://github.com/iotaledger/twin-node/commit/0d346ec57f43f418b73fe71fcd2b187d769a53e9))
|
|
117
|
+
* update dependencies ([#316](https://github.com/iotaledger/twin-node/issues/316)) ([f3fe328](https://github.com/iotaledger/twin-node/commit/f3fe3281a80f34763c923eacca58364273a550b7))
|
|
118
|
+
* update docs ([61e5a00](https://github.com/iotaledger/twin-node/commit/61e5a004089a0c11ec03e354b076604ecdeb4817))
|
|
119
|
+
* update document management components ([ed2c065](https://github.com/iotaledger/twin-node/commit/ed2c065a5030a7233f3623818d7325d85654ef0d))
|
|
120
|
+
* update engine ([a40b377](https://github.com/iotaledger/twin-node/commit/a40b37726c3b61c6bb40265ec0006d1071ffac7e))
|
|
121
|
+
* update engine ([4b438e2](https://github.com/iotaledger/twin-node/commit/4b438e22c27d784ee6cc964b7cb4401e9699ab16))
|
|
122
|
+
* update engine dependency ([db290df](https://github.com/iotaledger/twin-node/commit/db290df3b18374f7d86da575c6048657b98c355b))
|
|
123
|
+
* update engine dependency ([3494c31](https://github.com/iotaledger/twin-node/commit/3494c3144fd5ce6d3a9f2936c7890ab36795aeaa))
|
|
124
|
+
* update for livez endpoint ([9fc2e6a](https://github.com/iotaledger/twin-node/commit/9fc2e6ade38b3ec9591399a633d02b1e5fe07910))
|
|
125
|
+
* update framework components ([4bee2b9](https://github.com/iotaledger/twin-node/commit/4bee2b9d3651df09b8550a9ed226be1b46031854))
|
|
126
|
+
* update logging retention units in config ([0b9bb69](https://github.com/iotaledger/twin-node/commit/0b9bb696db0722f6b33e37e1ebd1f4d6ffbcf7cc))
|
|
127
|
+
* update order of logging ([2161938](https://github.com/iotaledger/twin-node/commit/2161938c969b18e4678459a69090287e5ccdb404))
|
|
128
|
+
* update order of logging ([b295f31](https://github.com/iotaledger/twin-node/commit/b295f315f7c5b611d229d9e5314d414da05828b9))
|
|
129
|
+
* update rights management ([5c992c6](https://github.com/iotaledger/twin-node/commit/5c992c6b0d72f3eeaa39ee267e096d9a3f477f4e))
|
|
130
|
+
* update rights management components ([176a0d6](https://github.com/iotaledger/twin-node/commit/176a0d611f88360fc845ae233b26ee0b43d7cb23))
|
|
131
|
+
* update rights management dependencies ([97ad02e](https://github.com/iotaledger/twin-node/commit/97ad02e4b74cfe5e722f74da2fc2229bbf004c0a))
|
|
132
|
+
* update tests ([f15bc1f](https://github.com/iotaledger/twin-node/commit/f15bc1fb9fc1a7a9b6611ad42591d9c02e078cfb))
|
|
133
|
+
* update tests ([633797e](https://github.com/iotaledger/twin-node/commit/633797e3c4766ad7e47c472c153456c60e1a6ba2))
|
|
134
|
+
* update to latest engine ([00d4974](https://github.com/iotaledger/twin-node/commit/00d4974f9cfb02bf48505cfb4af4a7aba1df4b3d))
|
|
135
|
+
* updated context id features ([ef7be07](https://github.com/iotaledger/twin-node/commit/ef7be07d44dccdeacf10f90cb4ffde0303faa6fa))
|
|
136
|
+
* updating linting ([feacd17](https://github.com/iotaledger/twin-node/commit/feacd178bb025bcd29a0ae6e4b8e79f23a989169))
|
|
137
|
+
* use core env helpers ([568fbc5](https://github.com/iotaledger/twin-node/commit/568fbc53906b022bc8465ffb941a160075d88e96))
|
|
138
|
+
* use features instead of disableNodeIdentity ([2e6109b](https://github.com/iotaledger/twin-node/commit/2e6109bd1de825e0f5396fc120d99ad7b3929852))
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* bootstrap legacy fails on second run ([c0a4e6d](https://github.com/iotaledger/twin-node/commit/c0a4e6d6f8d1bf385412a22fed2a0974e219abaa))
|
|
144
|
+
* bootstrap vault key skip logic ([#112](https://github.com/iotaledger/twin-node/issues/112)) ([4084368](https://github.com/iotaledger/twin-node/commit/4084368f0762c3a1b8e214ac30f5545297c88ea6))
|
|
145
|
+
* bump [@twin](https://github.com/twin).org deps to next.30 stack, fix node-core route snapshot ([#159](https://github.com/iotaledger/twin-node/issues/159)) ([73ad77f](https://github.com/iotaledger/twin-node/commit/73ad77f862050cb8dfcf42c484332bdacf026092))
|
|
146
|
+
* example typo for vault-key-create ([eed5844](https://github.com/iotaledger/twin-node/commit/eed58448b8e6d057fa964822d337cb2898d5bb54))
|
|
147
|
+
* immutable proof requirements ([2940579](https://github.com/iotaledger/twin-node/commit/29405798b24053c017adaaf08a2537ea6b1c8d0f))
|
|
148
|
+
* improve calculation of execution directory ([106d65d](https://github.com/iotaledger/twin-node/commit/106d65d7ad5524e2e147b681d68f9476c024cfaa))
|
|
149
|
+
* only register DID context keys when nodeIdentityEnabled is true ([#140](https://github.com/iotaledger/twin-node/issues/140)) ([21f1c10](https://github.com/iotaledger/twin-node/commit/21f1c107adbd715518414f7255ead970b809b4b3))
|
|
150
|
+
* optional private key in identity create ([325ebd8](https://github.com/iotaledger/twin-node/commit/325ebd859d95b3078107e76f1806cded078a0ce1))
|
|
151
|
+
* org identity verification methods ([18f158b](https://github.com/iotaledger/twin-node/commit/18f158b2f63930e20e94437c17ed43421771a458))
|
|
152
|
+
* recover tenant id on bootstrap-legacy restart when TENANT_ID is unset ([#198](https://github.com/iotaledger/twin-node/issues/198)) ([d9451e1](https://github.com/iotaledger/twin-node/commit/d9451e188fe4fd20d5cfd0408b0dc226ddf25cd8))
|
|
153
|
+
* register dataspace control plane rest client as multi-instance ([#191](https://github.com/iotaledger/twin-node/issues/191)) ([4548f5c](https://github.com/iotaledger/twin-node/commit/4548f5c6e7f1d65fd147e502e57d5686e60e5195))
|
|
154
|
+
* set dataspace control-plane callbackPath in node env builder ([#237](https://github.com/iotaledger/twin-node/issues/237)) ([2eac214](https://github.com/iotaledger/twin-node/commit/2eac21438e9f4b4a0bf84f30ebc864bd424aac35))
|
|
155
|
+
* 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))
|
|
156
|
+
* support load-env for tenant-token cli command ([34059c0](https://github.com/iotaledger/twin-node/commit/34059c052a685decdd689beb16d2b250e9a83643))
|
|
157
|
+
* synchronised storage construction ([#102](https://github.com/iotaledger/twin-node/issues/102)) ([58b61e9](https://github.com/iotaledger/twin-node/commit/58b61e9a67f499a35bea17e5d2dc6a1efc2cb893))
|
|
158
|
+
* test endpoints ([2b83ed0](https://github.com/iotaledger/twin-node/commit/2b83ed0d4f1da473a525a95202e01d9680c7d26c))
|
|
159
|
+
* test with latest dependencies ([91123b7](https://github.com/iotaledger/twin-node/commit/91123b71d0e7b51700a5d5452b2a0c9fc5c5256e))
|
|
160
|
+
* update dependencies ([#279](https://github.com/iotaledger/twin-node/issues/279)) ([2c0de07](https://github.com/iotaledger/twin-node/commit/2c0de07a15541e73612ba5bd62f4f566e4efca34))
|
|
161
|
+
* use async getStore in tests ([2189df4](https://github.com/iotaledger/twin-node/commit/2189df49a57637ba8effdee50965473f0a814c6c))
|
|
162
|
+
* wire includeErrorStack debug flag into auth and tenant processor configs ([#313](https://github.com/iotaledger/twin-node/issues/313)) ([3c69c51](https://github.com/iotaledger/twin-node/commit/3c69c51bfdd65305efe2fbe9da508e684a4245d1))
|
|
163
|
+
|
|
164
|
+
## [0.10.0](https://github.com/iotaledger/twin-node/compare/node-core-v0.10.0...node-core-v0.10.0) (2026-09-16)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Features
|
|
168
|
+
|
|
169
|
+
* add auth admin component ([1661e57](https://github.com/iotaledger/twin-node/commit/1661e57a699d5cf9ebde333e3cbc3aaea89d7c9c))
|
|
170
|
+
* add extend engine and server methods ([ec09c7e](https://github.com/iotaledger/twin-node/commit/ec09c7eb882d9f5797f2fd372e96cad1a3716f59))
|
|
171
|
+
* add extend engine and server methods ([0136a6f](https://github.com/iotaledger/twin-node/commit/0136a6f3f4e1a82b1427ee9618b8a17c79bc7fda))
|
|
172
|
+
* additional run options ([c35e5bb](https://github.com/iotaledger/twin-node/commit/c35e5bbb8a80fe6a36628d41f64585b3723d9ad7))
|
|
173
|
+
* additional startup logging ([0740293](https://github.com/iotaledger/twin-node/commit/0740293b366032f2907046603abf587c9c324aff))
|
|
174
|
+
* improve default options and spec ([b538721](https://github.com/iotaledger/twin-node/commit/b538721902e7f65021d2715148ba59409ccce035))
|
|
175
|
+
* improve error reporting ([fcd39a1](https://github.com/iotaledger/twin-node/commit/fcd39a18da2a6ce33965a99ca5f2f36f4aba712f))
|
|
176
|
+
* initial commit ([522f1e5](https://github.com/iotaledger/twin-node/commit/522f1e515348f9b1dd1eeb3170b1249e2b0b5371))
|
|
177
|
+
* migrate env config from engine to node ([5da29b8](https://github.com/iotaledger/twin-node/commit/5da29b8d714495308320d237a68e84355bba2b47))
|
|
178
|
+
* node app use JavaScript ([14fe08c](https://github.com/iotaledger/twin-node/commit/14fe08cb760dd885a5dac9056a4d5dbc3d61df64))
|
|
179
|
+
* release to production ([6319a38](https://github.com/iotaledger/twin-node/commit/6319a38490a2c2809622f8acd170cb92bfa06942))
|
|
180
|
+
* release to production ([4f44403](https://github.com/iotaledger/twin-node/commit/4f444039832edce8fae562baa7c900ccdc2181da))
|
|
181
|
+
* release to production ([2d96e37](https://github.com/iotaledger/twin-node/commit/2d96e3737bd9663bc0d1171c2ff2c7f8b2ab01bb))
|
|
182
|
+
* release to production ([#253](https://github.com/iotaledger/twin-node/issues/253)) ([230efd0](https://github.com/iotaledger/twin-node/commit/230efd0f99af6114e707999b4c1a83a391cc1741))
|
|
183
|
+
* release to production ([#300](https://github.com/iotaledger/twin-node/issues/300)) ([4d2b09f](https://github.com/iotaledger/twin-node/commit/4d2b09f92c7815ad3fe48d54eca0972fefc782f7))
|
|
184
|
+
* release to production ([#364](https://github.com/iotaledger/twin-node/issues/364)) ([dbba3db](https://github.com/iotaledger/twin-node/commit/dbba3dbf3d9efb858b0ea28aaf88378964fcf08e))
|
|
185
|
+
* release to production ([#383](https://github.com/iotaledger/twin-node/issues/383)) ([5d29105](https://github.com/iotaledger/twin-node/commit/5d29105355f85011f9a338ba5069162a0b008849))
|
|
186
|
+
* release to production ([#406](https://github.com/iotaledger/twin-node/issues/406)) ([98ba03e](https://github.com/iotaledger/twin-node/commit/98ba03e70eabbdceca9c5cbfaa01ea5076e5b2a7))
|
|
187
|
+
* release to production [skip ci] ([#417](https://github.com/iotaledger/twin-node/issues/417)) ([37ef5fb](https://github.com/iotaledger/twin-node/commit/37ef5fb19f71399c11146bd1ee6e7c7d844cec00))
|
|
188
|
+
* update dependencies ([9d25f16](https://github.com/iotaledger/twin-node/commit/9d25f16f1d554cd38f3bec28fdf7f8fff892ceaf))
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* adding a condition to verify if the password exists when bootstrapping ([6030a42](https://github.com/iotaledger/twin-node/commit/6030a42bdaf581678d96932fd0b809396bf7b8b0))
|
|
194
|
+
* adding a condition to verify if the password exists when bootstrapping ([c66f396](https://github.com/iotaledger/twin-node/commit/c66f396717394161a7647d1f08b3d87729d96e96))
|
|
195
|
+
* broken docs ([61479fd](https://github.com/iotaledger/twin-node/commit/61479fd618f766d22c5aafec5277e1a89e22b453))
|
|
196
|
+
* pr comments [#1](https://github.com/iotaledger/twin-node/issues/1) ([66e795b](https://github.com/iotaledger/twin-node/commit/66e795b16c372ab131ec1de30085aee90e4dbbd0))
|
|
197
|
+
|
|
3
198
|
## [0.9.5-next.2](https://github.com/iotaledger/twin-node/compare/node-core-v0.9.5-next.1...node-core-v0.9.5-next.2) (2026-09-16)
|
|
4
199
|
|
|
5
200
|
|