@twin.org/node-core 0.9.2-next.2 → 0.9.2-next.3
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/builders/engineEnvBuilder.js +7 -1
- package/dist/es/builders/engineEnvBuilder.js.map +1 -1
- package/dist/es/cli.js +2 -2
- package/dist/es/cli.js.map +1 -1
- package/dist/es/commands/{bootstrapLegacy.js → bootstrapDev.js} +25 -24
- package/dist/es/commands/bootstrapDev.js.map +1 -0
- package/dist/es/index.js +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/{IBootstrapLegacyEnvironmentVariables.js → IBootstrapDevEnvironmentVariables.js} +1 -1
- package/dist/es/models/IBootstrapDevEnvironmentVariables.js.map +1 -0
- package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
- package/dist/es/models/IEnvironmentVariables.js.map +1 -1
- package/dist/es/models/{bootstrapLegacyEnvironmentVariableKeys.js → bootstrapDevEnvironmentVariableKeys.js} +6 -6
- package/dist/es/models/bootstrapDevEnvironmentVariableKeys.js.map +1 -0
- package/dist/es/models/engineEnvironmentVariableKeys.js +1 -0
- package/dist/es/models/engineEnvironmentVariableKeys.js.map +1 -1
- package/dist/es/node.js +3 -3
- package/dist/es/node.js.map +1 -1
- package/dist/types/commands/{bootstrapLegacy.d.ts → bootstrapDev.d.ts} +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/models/{IBootstrapLegacyEnvironmentVariables.d.ts → IBootstrapDevEnvironmentVariables.d.ts} +2 -2
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +4 -0
- package/dist/types/models/IEnvironmentVariables.d.ts +2 -2
- package/dist/types/models/bootstrapDevEnvironmentVariableKeys.d.ts +4 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/functions/buildConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
- package/docs/reference/functions/start.md +1 -1
- package/docs/reference/index.md +1 -1
- package/docs/reference/interfaces/{IBootstrapLegacyEnvironmentVariables.md → IBootstrapDevEnvironmentVariables.md} +2 -2
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +8 -0
- package/docs/reference/type-aliases/IEnvironmentVariables.md +1 -1
- package/locales/en.json +5 -5
- package/package.json +1 -1
- package/dist/es/commands/bootstrapLegacy.js.map +0 -1
- package/dist/es/models/IBootstrapLegacyEnvironmentVariables.js.map +0 -1
- package/dist/es/models/bootstrapLegacyEnvironmentVariableKeys.js.map +0 -1
- package/dist/types/models/bootstrapLegacyEnvironmentVariableKeys.d.ts +0 -4
package/dist/es/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,sDAAsD,EAAE,MAAM,kDAAkD,CAAC;AAC1H,OAAO,EAAE,oDAAoD,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,oDAAoD,EAAE,MAAM,gDAAgD,CAAC;A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BAAkB,CAAC,CAAC;IAC7D,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;IACvD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,6BAA6B,CAAC,kBAAkB,CAAC,CAAC;IAClD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,mCAAmC,CAAC,kBAAkB,CAAC,CAAC;IACxD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;IAChD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;IACvD,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;AACxD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ContextIdStore } from \"@twin.org/context\";\nimport { Coerce, GeneralError, I18n, Is, StringHelper } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport * as dotenv from \"dotenv\";\nimport { getCommandDefinitionBootstrapLegacy } from \"./commands/bootstrapLegacy.js\";\nimport { getCommandDefinitionHelp } from \"./commands/help.js\";\nimport { getCommandDefinitionIdentityCreate } from \"./commands/identityCreate.js\";\nimport { getCommandDefinitionIdentityImport } from \"./commands/identityImports.js\";\nimport { getCommandDefinitionIdentityList } from \"./commands/identityList.js\";\nimport { getCommandDefinitionIdentityResolve } from \"./commands/identityResolve.js\";\nimport { getCommandDefinitionIdentityVerifiableCredentialCreate } from \"./commands/identityVerifiableCredentialCreate.js\";\nimport { getCommandDefinitionIdentityVerificationMethodCreate } from \"./commands/identityVerificationMethodCreate.js\";\nimport { getCommandDefinitionIdentityVerificationMethodImport } from \"./commands/identityVerificationMethodImport.js\";\nimport { getCommandDefinitionNodeIdentityGet } from \"./commands/nodeIdentityGet.js\";\nimport { getCommandDefinitionNodeIdentitySet } from \"./commands/nodeIdentitySet.js\";\nimport { getCommandDefinitionNodeOrgIdGet } from \"./commands/nodeOrgIdGet.js\";\nimport { getCommandDefinitionNodeOrgIdSet } from \"./commands/nodeOrgIdSet.js\";\nimport { getCommandDefinitionOrgUsersList } from \"./commands/orgUsersList.js\";\nimport { getCommandDefinitionRemoveTenantOrgAlias } from \"./commands/removeTenantOrgAlias.js\";\nimport { getCommandDefinitionTenantCreate } from \"./commands/tenantCreate.js\";\nimport { getCommandDefinitionTenantGet } from \"./commands/tenantGet.js\";\nimport { getCommandDefinitionTenantImport } from \"./commands/tenantImport.js\";\nimport { getCommandDefinitionTenantList } from \"./commands/tenantList.js\";\nimport { getCommandDefinitionTenantListByOrg } from \"./commands/tenantListByOrg.js\";\nimport { getCommandDefinitionTenantOrgIdSet } from \"./commands/tenantOrgIdSet.js\";\nimport { getCommandDefinitionTenantUpdate } from \"./commands/tenantUpdate.js\";\nimport { getCommandDefinitionUserCreate } from \"./commands/userCreate.js\";\nimport { getCommandDefinitionUserGet } from \"./commands/userGet.js\";\nimport { getCommandDefinitionUserUpdate } from \"./commands/userUpdate.js\";\nimport { getCommandDefinitionVaultKeyCreate } from \"./commands/vaultKeyCreate.js\";\nimport { getCommandDefinitionVaultKeyImport } from \"./commands/vaultKeyImport.js\";\nimport type { CliCommandParamType } from \"./models/cliCommandParamType.js\";\nimport type { ICliArgs } from \"./models/ICliArgs.js\";\nimport type { ICliCommand } from \"./models/ICliCommand.js\";\nimport type { ICliCommandDefinition } from \"./models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"./models/IEnvironmentVariables.js\";\n\nconst commandDefinitions: { [id: string]: ICliCommandDefinition } = {};\n\n/**\n * Parse command line arguments.\n * @param args The command line arguments.\n * @returns The parsed command line arguments.\n */\nexport function parseCommandLineArgs(args?: string[]): ICliArgs {\n\tlet nodePath;\n\tlet scriptPath;\n\tlet options:\n\t\t| {\n\t\t\t\tkey: string;\n\t\t\t\tvalue: string;\n\t\t }[]\n\t\t| undefined;\n\n\tif (Is.arrayValue(args)) {\n\t\tif (args.length > 0) {\n\t\t\tnodePath = args[0];\n\t\t}\n\t\tif (args.length > 1) {\n\t\t\tscriptPath = args[1];\n\t\t}\n\t\tif (args.length > 2) {\n\t\t\toptions = [];\n\n\t\t\tfor (let i = 2; i < args.length; i++) {\n\t\t\t\tconst arg = args[i];\n\t\t\t\tconst equalIndex = arg.indexOf(\"=\");\n\t\t\t\tif (equalIndex > 0) {\n\t\t\t\t\tconst key = arg.slice(0, equalIndex).trim();\n\t\t\t\t\tconst value = arg.slice(equalIndex + 1).trim();\n\t\t\t\t\tif (key.startsWith(\"--\")) {\n\t\t\t\t\t\toptions.push({ key: key.slice(2), value });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toptions.push({ key: arg, value: \"\" });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnodePath,\n\t\tscriptPath,\n\t\toptions\n\t};\n}\n\n/**\n * Construct the CLI command from the parsed arguments.\n * @param processEnv The environment variables from the process.\n * @param cliArgs The parsed CLI arguments.\n * @returns The constructed CLI command.\n * @throws GeneralError if the command is missing.\n */\nexport function constructCliCommand(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\tcliArgs: ICliArgs\n): ICliCommand | undefined {\n\tif (Is.arrayValue(cliArgs.options)) {\n\t\tconst command = cliArgs.options[0];\n\n\t\t// If the first option is --help, we can display help for all commands\n\t\tif (command.key === \"--help\") {\n\t\t\treturn {\n\t\t\t\tdefinition: commandDefinitions.help,\n\t\t\t\tparams: {}\n\t\t\t};\n\t\t}\n\n\t\t// In cases where no command but env-prefix is provided, we just return\n\t\tif (command.key === \"env-prefix\") {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tlet resolvedKey = command.key;\n\t\tif (!commandDefinitions[resolvedKey]) {\n\t\t\tconst aliasEntry = Object.entries(commandDefinitions).find(([, def]) =>\n\t\t\t\tdef.aliases?.includes(command.key)\n\t\t\t);\n\t\t\tif (aliasEntry) {\n\t\t\t\tresolvedKey = aliasEntry[0];\n\t\t\t\tCLIDisplay.warning(\n\t\t\t\t\tI18n.formatMessage(\"node.cli.commands.deprecatedAlias\", {\n\t\t\t\t\t\talias: command.key,\n\t\t\t\t\t\tcommand: resolvedKey\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliCommandMissing\", { command: command.key });\n\t\t\t}\n\t\t}\n\n\t\t// We have a valid command, check for --help for that command\n\t\tconst hasHelp = cliArgs.options.find(option => option.key === \"--help\");\n\t\tif (hasHelp) {\n\t\t\treturn {\n\t\t\t\tdefinition: commandDefinitions.help,\n\t\t\t\tparams: {\n\t\t\t\t\tcommand: resolvedKey\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tprocessEnvOptions(processEnv, cliArgs.options);\n\n\t\tconst cliParams: { [id: string]: CliCommandParamType } = {};\n\t\tconst allParamKeys = cliArgs.options\n\t\t\t.map(option => option.key)\n\t\t\t.filter(key => key !== command.key);\n\n\t\tfor (const commandDefParam of commandDefinitions[resolvedKey].params) {\n\t\t\tconst foundParamIndex =\n\t\t\t\tcliArgs.options?.findIndex(option => option.key === commandDefParam.key) ?? -1;\n\t\t\tconst foundParam = foundParamIndex >= 0 ? cliArgs.options?.[foundParamIndex] : undefined;\n\n\t\t\tlet paramValue;\n\t\t\tif (commandDefParam.type === \"number\") {\n\t\t\t\tparamValue = Coerce.number(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t} else if (commandDefParam.type === \"boolean\") {\n\t\t\t\tparamValue = Coerce.boolean(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t} else {\n\t\t\t\tparamValue = Coerce.string(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t}\n\n\t\t\tconst required = commandDefParam.required ?? true;\n\t\t\tif (Is.empty(paramValue) && required) {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliCommandParamMissing\", {\n\t\t\t\t\tcommand: command.key,\n\t\t\t\t\tparam: commandDefParam.key\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!Is.empty(paramValue)) {\n\t\t\t\tcliParams[StringHelper.camelCase(commandDefParam.key)] = paramValue;\n\t\t\t}\n\n\t\t\tif (foundParamIndex >= 0) {\n\t\t\t\tconst paramIndex = allParamKeys.indexOf(commandDefParam.key);\n\t\t\t\tif (paramIndex >= 0) {\n\t\t\t\t\tallParamKeys.splice(paramIndex, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (allParamKeys.length > 0) {\n\t\t\tthrow new GeneralError(\"node\", \"cliCommandParamExtra\", {\n\t\t\t\tcommand: command.key,\n\t\t\t\tparams: allParamKeys.join(\", \")\n\t\t\t});\n\t\t}\n\n\t\tif (commandDefinitions[resolvedKey].params.find(param => param.key === \"output-env-prefix\")) {\n\t\t\tcliParams.outputEnvPrefix = (Coerce.string(cliParams.outputEnvPrefix) ?? \"\").toUpperCase();\n\t\t\tcliParams.outputEnvPrefix =\n\t\t\t\tcliParams.outputEnvPrefix.length > 0 && !cliParams.outputEnvPrefix.endsWith(\"_\")\n\t\t\t\t\t? `${cliParams.outputEnvPrefix}_`\n\t\t\t\t\t: cliParams.outputEnvPrefix;\n\t\t}\n\n\t\treturn {\n\t\t\tdefinition: commandDefinitions[resolvedKey],\n\t\t\tparams: cliParams\n\t\t};\n\t}\n}\n\n/**\n * Execute the CLI command.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param cliCommand The CLI command to execute.\n */\nexport async function executeCommand(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables,\n\tcliCommand: ICliCommand\n): Promise<void> {\n\tconst requiresEngineStarted = cliCommand.definition.requiresEngineStarted ?? true;\n\n\ttry {\n\t\tif (requiresEngineStarted) {\n\t\t\tawait engineCore.start(true);\n\t\t}\n\n\t\tCLIDisplay.value(\n\t\t\tI18n.formatMessage(\"node.cli.commands.command\"),\n\t\t\tcliCommand.definition.command\n\t\t);\n\t\tfor (const paramKey in cliCommand.params) {\n\t\t\tCLIDisplay.value(paramKey, Coerce.string(cliCommand.params[paramKey]), 1);\n\t\t}\n\t\tCLIDisplay.break();\n\n\t\tawait ContextIdStore.run(engineCore.getContextIds() ?? {}, async () => {\n\t\t\tawait cliCommand.definition.action(engineCore, envVars, cliCommand.params);\n\t\t});\n\t} catch (error) {\n\t\tCLIDisplay.spinnerStop();\n\n\t\tthrow error;\n\t} finally {\n\t\tif (requiresEngineStarted) {\n\t\t\tCLIDisplay.break();\n\t\t\tawait engineCore.stop();\n\t\t}\n\t}\n}\n\n/**\n * Load the env files and process the options.\n * @param processEnv The environment variables from the process.\n * @param options The options.\n * @returns The substituted options, mutated in place with env variable values resolved.\n * @throws GeneralError if an env file has errors.\n */\nexport function processEnvOptions(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: {\n\t\tkey: string;\n\t\tvalue: string;\n\t}[]\n): void {\n\tconst inputEnv = options.find(option => option.key === \"load-env\")?.value;\n\n\tif (Is.stringValue(inputEnv)) {\n\t\tconst envFiles = inputEnv.split(\",\").map(f => f.trim());\n\t\tfor (const envFile of envFiles) {\n\t\t\tconst output = dotenv.config({\n\t\t\t\tpath: envFile,\n\t\t\t\tquiet: true\n\t\t\t});\n\n\t\t\tif (output.error) {\n\t\t\t\tthrow output.error;\n\t\t\t}\n\n\t\t\tif (Is.objectValue(output.parsed)) {\n\t\t\t\tfor (const key in output.parsed) {\n\t\t\t\t\tprocessEnv[key] = output.parsed[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn substituteEnvOptions(processEnv, options);\n}\n\n/**\n * Process options and replace any env variables with their values.\n * @param processEnv The environment variables from the process.\n * @param options The options.\n * @throws GeneralError if an env variable is missing.\n */\nexport function substituteEnvOptions(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: {\n\t\tkey: string;\n\t\tvalue: string;\n\t}[]\n): void {\n\tfor (const option of options) {\n\t\tif (option.value.startsWith(\"!\")) {\n\t\t\tconst envVar = processEnv[option.value.slice(1)];\n\t\t\tif (!Is.stringValue(envVar)) {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliEnvVarMissing\", { envVar: option.value.slice(1) });\n\t\t\t}\n\t\t\toption.value = envVar;\n\t\t}\n\t}\n}\n\n/**\n * Register all built-in CLI command definitions into the shared command map.\n */\nexport function registerCommands(): void {\n\tgetCommandDefinitionHelp(commandDefinitions);\n\tgetCommandDefinitionBootstrapLegacy(commandDefinitions);\n\tgetCommandDefinitionIdentityCreate(commandDefinitions);\n\tgetCommandDefinitionIdentityImport(commandDefinitions);\n\tgetCommandDefinitionIdentityList(commandDefinitions);\n\tgetCommandDefinitionIdentityResolve(commandDefinitions);\n\tgetCommandDefinitionIdentityVerificationMethodCreate(commandDefinitions);\n\tgetCommandDefinitionIdentityVerificationMethodImport(commandDefinitions);\n\tgetCommandDefinitionIdentityVerifiableCredentialCreate(commandDefinitions);\n\tgetCommandDefinitionNodeIdentityGet(commandDefinitions);\n\tgetCommandDefinitionNodeIdentitySet(commandDefinitions);\n\tgetCommandDefinitionOrgUsersList(commandDefinitions);\n\tgetCommandDefinitionRemoveTenantOrgAlias(commandDefinitions);\n\tgetCommandDefinitionNodeOrgIdGet(commandDefinitions);\n\tgetCommandDefinitionNodeOrgIdSet(commandDefinitions);\n\tgetCommandDefinitionTenantOrgIdSet(commandDefinitions);\n\tgetCommandDefinitionTenantCreate(commandDefinitions);\n\tgetCommandDefinitionTenantGet(commandDefinitions);\n\tgetCommandDefinitionTenantImport(commandDefinitions);\n\tgetCommandDefinitionTenantList(commandDefinitions);\n\tgetCommandDefinitionTenantListByOrg(commandDefinitions);\n\tgetCommandDefinitionTenantUpdate(commandDefinitions);\n\tgetCommandDefinitionUserCreate(commandDefinitions);\n\tgetCommandDefinitionUserGet(commandDefinitions);\n\tgetCommandDefinitionUserUpdate(commandDefinitions);\n\tgetCommandDefinitionVaultKeyCreate(commandDefinitions);\n\tgetCommandDefinitionVaultKeyImport(commandDefinitions);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,sDAAsD,EAAE,MAAM,kDAAkD,CAAC;AAC1H,OAAO,EAAE,oDAAoD,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,oDAAoD,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;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,CAAC,CAAC;IAClD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,mCAAmC,CAAC,kBAAkB,CAAC,CAAC;IACxD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC;IACrD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;IAChD,8BAA8B,CAAC,kBAAkB,CAAC,CAAC;IACnD,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;IACvD,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;AACxD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ContextIdStore } from \"@twin.org/context\";\nimport { Coerce, GeneralError, I18n, Is, StringHelper } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport * as dotenv from \"dotenv\";\nimport { getCommandDefinitionBootstrapDev } from \"./commands/bootstrapDev.js\";\nimport { getCommandDefinitionHelp } from \"./commands/help.js\";\nimport { getCommandDefinitionIdentityCreate } from \"./commands/identityCreate.js\";\nimport { getCommandDefinitionIdentityImport } from \"./commands/identityImports.js\";\nimport { getCommandDefinitionIdentityList } from \"./commands/identityList.js\";\nimport { getCommandDefinitionIdentityResolve } from \"./commands/identityResolve.js\";\nimport { getCommandDefinitionIdentityVerifiableCredentialCreate } from \"./commands/identityVerifiableCredentialCreate.js\";\nimport { getCommandDefinitionIdentityVerificationMethodCreate } from \"./commands/identityVerificationMethodCreate.js\";\nimport { getCommandDefinitionIdentityVerificationMethodImport } from \"./commands/identityVerificationMethodImport.js\";\nimport { getCommandDefinitionNodeIdentityGet } from \"./commands/nodeIdentityGet.js\";\nimport { getCommandDefinitionNodeIdentitySet } from \"./commands/nodeIdentitySet.js\";\nimport { getCommandDefinitionNodeOrgIdGet } from \"./commands/nodeOrgIdGet.js\";\nimport { getCommandDefinitionNodeOrgIdSet } from \"./commands/nodeOrgIdSet.js\";\nimport { getCommandDefinitionOrgUsersList } from \"./commands/orgUsersList.js\";\nimport { getCommandDefinitionRemoveTenantOrgAlias } from \"./commands/removeTenantOrgAlias.js\";\nimport { getCommandDefinitionTenantCreate } from \"./commands/tenantCreate.js\";\nimport { getCommandDefinitionTenantGet } from \"./commands/tenantGet.js\";\nimport { getCommandDefinitionTenantImport } from \"./commands/tenantImport.js\";\nimport { getCommandDefinitionTenantList } from \"./commands/tenantList.js\";\nimport { getCommandDefinitionTenantListByOrg } from \"./commands/tenantListByOrg.js\";\nimport { getCommandDefinitionTenantOrgIdSet } from \"./commands/tenantOrgIdSet.js\";\nimport { getCommandDefinitionTenantUpdate } from \"./commands/tenantUpdate.js\";\nimport { getCommandDefinitionUserCreate } from \"./commands/userCreate.js\";\nimport { getCommandDefinitionUserGet } from \"./commands/userGet.js\";\nimport { getCommandDefinitionUserUpdate } from \"./commands/userUpdate.js\";\nimport { getCommandDefinitionVaultKeyCreate } from \"./commands/vaultKeyCreate.js\";\nimport { getCommandDefinitionVaultKeyImport } from \"./commands/vaultKeyImport.js\";\nimport type { CliCommandParamType } from \"./models/cliCommandParamType.js\";\nimport type { ICliArgs } from \"./models/ICliArgs.js\";\nimport type { ICliCommand } from \"./models/ICliCommand.js\";\nimport type { ICliCommandDefinition } from \"./models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"./models/IEnvironmentVariables.js\";\n\nconst commandDefinitions: { [id: string]: ICliCommandDefinition } = {};\n\n/**\n * Parse command line arguments.\n * @param args The command line arguments.\n * @returns The parsed command line arguments.\n */\nexport function parseCommandLineArgs(args?: string[]): ICliArgs {\n\tlet nodePath;\n\tlet scriptPath;\n\tlet options:\n\t\t| {\n\t\t\t\tkey: string;\n\t\t\t\tvalue: string;\n\t\t }[]\n\t\t| undefined;\n\n\tif (Is.arrayValue(args)) {\n\t\tif (args.length > 0) {\n\t\t\tnodePath = args[0];\n\t\t}\n\t\tif (args.length > 1) {\n\t\t\tscriptPath = args[1];\n\t\t}\n\t\tif (args.length > 2) {\n\t\t\toptions = [];\n\n\t\t\tfor (let i = 2; i < args.length; i++) {\n\t\t\t\tconst arg = args[i];\n\t\t\t\tconst equalIndex = arg.indexOf(\"=\");\n\t\t\t\tif (equalIndex > 0) {\n\t\t\t\t\tconst key = arg.slice(0, equalIndex).trim();\n\t\t\t\t\tconst value = arg.slice(equalIndex + 1).trim();\n\t\t\t\t\tif (key.startsWith(\"--\")) {\n\t\t\t\t\t\toptions.push({ key: key.slice(2), value });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toptions.push({ key: arg, value: \"\" });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnodePath,\n\t\tscriptPath,\n\t\toptions\n\t};\n}\n\n/**\n * Construct the CLI command from the parsed arguments.\n * @param processEnv The environment variables from the process.\n * @param cliArgs The parsed CLI arguments.\n * @returns The constructed CLI command.\n * @throws GeneralError if the command is missing.\n */\nexport function constructCliCommand(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\tcliArgs: ICliArgs\n): ICliCommand | undefined {\n\tif (Is.arrayValue(cliArgs.options)) {\n\t\tconst command = cliArgs.options[0];\n\n\t\t// If the first option is --help, we can display help for all commands\n\t\tif (command.key === \"--help\") {\n\t\t\treturn {\n\t\t\t\tdefinition: commandDefinitions.help,\n\t\t\t\tparams: {}\n\t\t\t};\n\t\t}\n\n\t\t// In cases where no command but env-prefix is provided, we just return\n\t\tif (command.key === \"env-prefix\") {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tlet resolvedKey = command.key;\n\t\tif (!commandDefinitions[resolvedKey]) {\n\t\t\tconst aliasEntry = Object.entries(commandDefinitions).find(([, def]) =>\n\t\t\t\tdef.aliases?.includes(command.key)\n\t\t\t);\n\t\t\tif (aliasEntry) {\n\t\t\t\tresolvedKey = aliasEntry[0];\n\t\t\t\tCLIDisplay.warning(\n\t\t\t\t\tI18n.formatMessage(\"node.cli.commands.deprecatedAlias\", {\n\t\t\t\t\t\talias: command.key,\n\t\t\t\t\t\tcommand: resolvedKey\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliCommandMissing\", { command: command.key });\n\t\t\t}\n\t\t}\n\n\t\t// We have a valid command, check for --help for that command\n\t\tconst hasHelp = cliArgs.options.find(option => option.key === \"--help\");\n\t\tif (hasHelp) {\n\t\t\treturn {\n\t\t\t\tdefinition: commandDefinitions.help,\n\t\t\t\tparams: {\n\t\t\t\t\tcommand: resolvedKey\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tprocessEnvOptions(processEnv, cliArgs.options);\n\n\t\tconst cliParams: { [id: string]: CliCommandParamType } = {};\n\t\tconst allParamKeys = cliArgs.options\n\t\t\t.map(option => option.key)\n\t\t\t.filter(key => key !== command.key);\n\n\t\tfor (const commandDefParam of commandDefinitions[resolvedKey].params) {\n\t\t\tconst foundParamIndex =\n\t\t\t\tcliArgs.options?.findIndex(option => option.key === commandDefParam.key) ?? -1;\n\t\t\tconst foundParam = foundParamIndex >= 0 ? cliArgs.options?.[foundParamIndex] : undefined;\n\n\t\t\tlet paramValue;\n\t\t\tif (commandDefParam.type === \"number\") {\n\t\t\t\tparamValue = Coerce.number(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t} else if (commandDefParam.type === \"boolean\") {\n\t\t\t\tparamValue = Coerce.boolean(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t} else {\n\t\t\t\tparamValue = Coerce.string(foundParam?.value ?? commandDefParam.defaultValue);\n\t\t\t}\n\n\t\t\tconst required = commandDefParam.required ?? true;\n\t\t\tif (Is.empty(paramValue) && required) {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliCommandParamMissing\", {\n\t\t\t\t\tcommand: command.key,\n\t\t\t\t\tparam: commandDefParam.key\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!Is.empty(paramValue)) {\n\t\t\t\tcliParams[StringHelper.camelCase(commandDefParam.key)] = paramValue;\n\t\t\t}\n\n\t\t\tif (foundParamIndex >= 0) {\n\t\t\t\tconst paramIndex = allParamKeys.indexOf(commandDefParam.key);\n\t\t\t\tif (paramIndex >= 0) {\n\t\t\t\t\tallParamKeys.splice(paramIndex, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (allParamKeys.length > 0) {\n\t\t\tthrow new GeneralError(\"node\", \"cliCommandParamExtra\", {\n\t\t\t\tcommand: command.key,\n\t\t\t\tparams: allParamKeys.join(\", \")\n\t\t\t});\n\t\t}\n\n\t\tif (commandDefinitions[resolvedKey].params.find(param => param.key === \"output-env-prefix\")) {\n\t\t\tcliParams.outputEnvPrefix = (Coerce.string(cliParams.outputEnvPrefix) ?? \"\").toUpperCase();\n\t\t\tcliParams.outputEnvPrefix =\n\t\t\t\tcliParams.outputEnvPrefix.length > 0 && !cliParams.outputEnvPrefix.endsWith(\"_\")\n\t\t\t\t\t? `${cliParams.outputEnvPrefix}_`\n\t\t\t\t\t: cliParams.outputEnvPrefix;\n\t\t}\n\n\t\treturn {\n\t\t\tdefinition: commandDefinitions[resolvedKey],\n\t\t\tparams: cliParams\n\t\t};\n\t}\n}\n\n/**\n * Execute the CLI command.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param cliCommand The CLI command to execute.\n */\nexport async function executeCommand(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables,\n\tcliCommand: ICliCommand\n): Promise<void> {\n\tconst requiresEngineStarted = cliCommand.definition.requiresEngineStarted ?? true;\n\n\ttry {\n\t\tif (requiresEngineStarted) {\n\t\t\tawait engineCore.start(true);\n\t\t}\n\n\t\tCLIDisplay.value(\n\t\t\tI18n.formatMessage(\"node.cli.commands.command\"),\n\t\t\tcliCommand.definition.command\n\t\t);\n\t\tfor (const paramKey in cliCommand.params) {\n\t\t\tCLIDisplay.value(paramKey, Coerce.string(cliCommand.params[paramKey]), 1);\n\t\t}\n\t\tCLIDisplay.break();\n\n\t\tawait ContextIdStore.run(engineCore.getContextIds() ?? {}, async () => {\n\t\t\tawait cliCommand.definition.action(engineCore, envVars, cliCommand.params);\n\t\t});\n\t} catch (error) {\n\t\tCLIDisplay.spinnerStop();\n\n\t\tthrow error;\n\t} finally {\n\t\tif (requiresEngineStarted) {\n\t\t\tCLIDisplay.break();\n\t\t\tawait engineCore.stop();\n\t\t}\n\t}\n}\n\n/**\n * Load the env files and process the options.\n * @param processEnv The environment variables from the process.\n * @param options The options.\n * @returns The substituted options, mutated in place with env variable values resolved.\n * @throws GeneralError if an env file has errors.\n */\nexport function processEnvOptions(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: {\n\t\tkey: string;\n\t\tvalue: string;\n\t}[]\n): void {\n\tconst inputEnv = options.find(option => option.key === \"load-env\")?.value;\n\n\tif (Is.stringValue(inputEnv)) {\n\t\tconst envFiles = inputEnv.split(\",\").map(f => f.trim());\n\t\tfor (const envFile of envFiles) {\n\t\t\tconst output = dotenv.config({\n\t\t\t\tpath: envFile,\n\t\t\t\tquiet: true\n\t\t\t});\n\n\t\t\tif (output.error) {\n\t\t\t\tthrow output.error;\n\t\t\t}\n\n\t\t\tif (Is.objectValue(output.parsed)) {\n\t\t\t\tfor (const key in output.parsed) {\n\t\t\t\t\tprocessEnv[key] = output.parsed[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn substituteEnvOptions(processEnv, options);\n}\n\n/**\n * Process options and replace any env variables with their values.\n * @param processEnv The environment variables from the process.\n * @param options The options.\n * @throws GeneralError if an env variable is missing.\n */\nexport function substituteEnvOptions(\n\tprocessEnv: {\n\t\t[id: string]: string;\n\t},\n\toptions: {\n\t\tkey: string;\n\t\tvalue: string;\n\t}[]\n): void {\n\tfor (const option of options) {\n\t\tif (option.value.startsWith(\"!\")) {\n\t\t\tconst envVar = processEnv[option.value.slice(1)];\n\t\t\tif (!Is.stringValue(envVar)) {\n\t\t\t\tthrow new GeneralError(\"node\", \"cliEnvVarMissing\", { envVar: option.value.slice(1) });\n\t\t\t}\n\t\t\toption.value = envVar;\n\t\t}\n\t}\n}\n\n/**\n * Register all built-in CLI command definitions into the shared command map.\n */\nexport function registerCommands(): void {\n\tgetCommandDefinitionHelp(commandDefinitions);\n\tgetCommandDefinitionBootstrapDev(commandDefinitions);\n\tgetCommandDefinitionIdentityCreate(commandDefinitions);\n\tgetCommandDefinitionIdentityImport(commandDefinitions);\n\tgetCommandDefinitionIdentityList(commandDefinitions);\n\tgetCommandDefinitionIdentityResolve(commandDefinitions);\n\tgetCommandDefinitionIdentityVerificationMethodCreate(commandDefinitions);\n\tgetCommandDefinitionIdentityVerificationMethodImport(commandDefinitions);\n\tgetCommandDefinitionIdentityVerifiableCredentialCreate(commandDefinitions);\n\tgetCommandDefinitionNodeIdentityGet(commandDefinitions);\n\tgetCommandDefinitionNodeIdentitySet(commandDefinitions);\n\tgetCommandDefinitionOrgUsersList(commandDefinitions);\n\tgetCommandDefinitionRemoveTenantOrgAlias(commandDefinitions);\n\tgetCommandDefinitionNodeOrgIdGet(commandDefinitions);\n\tgetCommandDefinitionNodeOrgIdSet(commandDefinitions);\n\tgetCommandDefinitionTenantOrgIdSet(commandDefinitions);\n\tgetCommandDefinitionTenantCreate(commandDefinitions);\n\tgetCommandDefinitionTenantGet(commandDefinitions);\n\tgetCommandDefinitionTenantImport(commandDefinitions);\n\tgetCommandDefinitionTenantList(commandDefinitions);\n\tgetCommandDefinitionTenantListByOrg(commandDefinitions);\n\tgetCommandDefinitionTenantUpdate(commandDefinitions);\n\tgetCommandDefinitionUserCreate(commandDefinitions);\n\tgetCommandDefinitionUserGet(commandDefinitions);\n\tgetCommandDefinitionUserUpdate(commandDefinitions);\n\tgetCommandDefinitionVaultKeyCreate(commandDefinitions);\n\tgetCommandDefinitionVaultKeyImport(commandDefinitions);\n}\n"]}
|
|
@@ -6,43 +6,44 @@ import { identityVerificationMethodCreate } from "./identityVerificationMethodCr
|
|
|
6
6
|
import { tenantCreate } from "./tenantCreate.js";
|
|
7
7
|
import { userCreate } from "./userCreate.js";
|
|
8
8
|
import { vaultKeyCreate } from "./vaultKeyCreate.js";
|
|
9
|
-
const COMMAND_NAME = "bootstrap-
|
|
9
|
+
const COMMAND_NAME = "bootstrap-dev";
|
|
10
10
|
/**
|
|
11
11
|
* Get the command definition parameters.
|
|
12
12
|
* @param commandDefinitions The registered command definitions.
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function getCommandDefinitionBootstrapDev(commandDefinitions) {
|
|
15
15
|
commandDefinitions[COMMAND_NAME] = {
|
|
16
16
|
command: COMMAND_NAME,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
aliases: ["bootstrap-legacy"],
|
|
18
|
+
description: I18n.formatMessage("node.cli.commands.bootstrap-dev.description"),
|
|
19
|
+
example: I18n.formatMessage("node.cli.commands.bootstrap-dev.example"),
|
|
19
20
|
requiresNodeIdentity: false,
|
|
20
21
|
requiresOrgIdentity: false,
|
|
21
22
|
params: [
|
|
22
23
|
{
|
|
23
24
|
key: "env-prefix",
|
|
24
25
|
type: "string",
|
|
25
|
-
description: I18n.formatMessage("node.cli.commands.bootstrap-
|
|
26
|
+
description: I18n.formatMessage("node.cli.commands.bootstrap-dev.params.env-prefix.description"),
|
|
26
27
|
required: false
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
key: "load-env",
|
|
30
31
|
type: "string",
|
|
31
|
-
description: I18n.formatMessage("node.cli.commands.bootstrap-
|
|
32
|
+
description: I18n.formatMessage("node.cli.commands.bootstrap-dev.params.load-env.description"),
|
|
32
33
|
required: false
|
|
33
34
|
}
|
|
34
35
|
],
|
|
35
|
-
action: async (engineCore, envVars, params) =>
|
|
36
|
+
action: async (engineCore, envVars, params) => bootstrapDev(engineCore, envVars, params)
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
|
-
* Command for
|
|
40
|
+
* Command for development bootstrap.
|
|
40
41
|
* @param engineCore The engine core.
|
|
41
42
|
* @param envVars The environment variables for the node.
|
|
42
43
|
* @param params The parameters for the command.
|
|
43
44
|
* @returns A promise that resolves when the bootstrap sequence has completed.
|
|
44
45
|
*/
|
|
45
|
-
export async function
|
|
46
|
+
export async function bootstrapDev(engineCore, envVars, params) {
|
|
46
47
|
const features = (envVars.features ?? "admin-user,wallet")
|
|
47
48
|
.split(",")
|
|
48
49
|
.map(f => f.trim())
|
|
@@ -54,10 +55,10 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
54
55
|
let organizationId = tenantEnabled ? undefined : state.nodeOrganizationId;
|
|
55
56
|
let tenant;
|
|
56
57
|
if (features.length === 0) {
|
|
57
|
-
throw new GeneralError("
|
|
58
|
+
throw new GeneralError("bootstrapDev", "noFeaturesEnabled");
|
|
58
59
|
}
|
|
59
60
|
CLIDisplay.break();
|
|
60
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
61
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.nodeIdentityCreate"));
|
|
61
62
|
const nodeIdentity = await identityCreate(engineCore, envVars, {
|
|
62
63
|
identity: nodeId,
|
|
63
64
|
mnemonic: envVars.nodeMnemonic,
|
|
@@ -66,7 +67,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
66
67
|
});
|
|
67
68
|
nodeId = nodeIdentity.did;
|
|
68
69
|
CLIDisplay.break();
|
|
69
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
70
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.nodeAuthKeyCreate"));
|
|
70
71
|
await vaultKeyCreate(engineCore, envVars, {
|
|
71
72
|
identity: nodeId,
|
|
72
73
|
keyType: "Ed25519",
|
|
@@ -78,7 +79,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
78
79
|
// The trust verification method is always added to the organisation identities.
|
|
79
80
|
await ContextIdStore.run({ [ContextIdKeys.Node]: nodeId }, async () => {
|
|
80
81
|
CLIDisplay.break();
|
|
81
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
82
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.organisationCreate"));
|
|
82
83
|
if (tenantEnabled) {
|
|
83
84
|
const existingTenant = Is.stringValue(envVars.tenantId)
|
|
84
85
|
? await resolveTenantById(engineCore, envVars.tenantId)
|
|
@@ -92,7 +93,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
92
93
|
});
|
|
93
94
|
organizationId = organisation.did;
|
|
94
95
|
CLIDisplay.break();
|
|
95
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
96
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.trustVerificationMethodCreate"));
|
|
96
97
|
await identityVerificationMethodCreate(engineCore, envVars, {
|
|
97
98
|
identity: organisation.did,
|
|
98
99
|
verificationMethodType: "assertionMethod",
|
|
@@ -101,7 +102,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
101
102
|
});
|
|
102
103
|
if (Coerce.boolean(envVars.blobStorageEnableEncryption) ?? false) {
|
|
103
104
|
CLIDisplay.break();
|
|
104
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
105
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.blobStorageKeyCreate"));
|
|
105
106
|
await vaultKeyCreate(engineCore, envVars, {
|
|
106
107
|
identity: organizationId,
|
|
107
108
|
keyType: "ChaCha20Poly1305",
|
|
@@ -112,7 +113,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
112
113
|
const defaultAttestationConnectorType = engineCore.getRegisteredInstanceTypeOptional("attestationConnector");
|
|
113
114
|
if (!Is.empty(defaultAttestationConnectorType)) {
|
|
114
115
|
CLIDisplay.break();
|
|
115
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
116
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.attestationMethodCreate"));
|
|
116
117
|
await identityVerificationMethodCreate(engineCore, envVars, {
|
|
117
118
|
identity: organizationId,
|
|
118
119
|
verificationMethodType: "assertionMethod",
|
|
@@ -123,7 +124,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
123
124
|
const defaultImmutableProofComponentType = engineCore.getRegisteredInstanceTypeOptional("immutableProofComponent");
|
|
124
125
|
if (!Is.empty(defaultImmutableProofComponentType)) {
|
|
125
126
|
CLIDisplay.break();
|
|
126
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
127
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.immutableProofMethodCreate"));
|
|
127
128
|
await identityVerificationMethodCreate(engineCore, envVars, {
|
|
128
129
|
identity: organizationId,
|
|
129
130
|
verificationMethodType: "assertionMethod",
|
|
@@ -135,7 +136,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
135
136
|
// organisation without a tenant lookup.
|
|
136
137
|
if (!tenantEnabled && !Is.stringValue(state.nodeOrganizationId)) {
|
|
137
138
|
CLIDisplay.break();
|
|
138
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
139
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.nodeOrganizationIdSet"));
|
|
139
140
|
state.nodeOrganizationId = organisation.did;
|
|
140
141
|
engineCore.setStateDirty();
|
|
141
142
|
CLIDisplay.done();
|
|
@@ -155,7 +156,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
155
156
|
// Still empty so create a new tenant for the node and associate it with the organisation.
|
|
156
157
|
if (Is.empty(tenant)) {
|
|
157
158
|
CLIDisplay.break();
|
|
158
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
159
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.nodeTenantCreate"));
|
|
159
160
|
const tenantDetails = await tenantCreate(engineCore, envVars, {
|
|
160
161
|
tenantId: envVars.tenantId,
|
|
161
162
|
apiKey: envVars.tenantApiKey,
|
|
@@ -177,7 +178,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
177
178
|
let userDid = adminUser?.userIdentity;
|
|
178
179
|
if (Is.empty(adminUser)) {
|
|
179
180
|
CLIDisplay.break();
|
|
180
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
181
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.adminIdentityCreate"));
|
|
181
182
|
const result = await identityCreate(engineCore, envVars, {
|
|
182
183
|
identity: envVars.adminUserIdentity,
|
|
183
184
|
mnemonic: envVars.adminUserMnemonic,
|
|
@@ -186,7 +187,7 @@ export async function bootstrapLegacy(engineCore, envVars, params) {
|
|
|
186
187
|
userDid = result.did;
|
|
187
188
|
}
|
|
188
189
|
CLIDisplay.break();
|
|
189
|
-
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
190
|
+
CLIDisplay.section(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.adminUserCreate"));
|
|
190
191
|
await userCreate(engineCore, envVars, {
|
|
191
192
|
userIdentity: userDid,
|
|
192
193
|
organizationIdentity: orgDid,
|
|
@@ -230,7 +231,7 @@ async function resolveOrganizationDid(engineCore, tenantEnabled, tenantId) {
|
|
|
230
231
|
return state.nodeOrganizationId;
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
|
-
throw new GeneralError("
|
|
234
|
+
throw new GeneralError("bootstrapDev", "organizationNotSet");
|
|
234
235
|
}
|
|
235
236
|
/**
|
|
236
237
|
* Resolve the default tenant id for re-bootstrap when multi-tenancy is enabled.
|
|
@@ -264,7 +265,7 @@ async function resolveDefaultTenant(engineCore) {
|
|
|
264
265
|
cursor = result.cursor;
|
|
265
266
|
} while (Is.stringValue(cursor));
|
|
266
267
|
if (!Is.empty(firstTenant)) {
|
|
267
|
-
CLIDisplay.value(I18n.formatMessage("node.cli.commands.bootstrap-
|
|
268
|
+
CLIDisplay.value(I18n.formatMessage("node.cli.commands.bootstrap-dev.labels.tenantFallback"), firstTenant.id);
|
|
268
269
|
}
|
|
269
270
|
return firstTenant;
|
|
270
271
|
}
|
|
@@ -309,4 +310,4 @@ async function resolveTenantById(engineCore, tenantId) {
|
|
|
309
310
|
return undefined;
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
|
-
//# sourceMappingURL=
|
|
313
|
+
//# sourceMappingURL=bootstrapDev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrapDev.js","sourceRoot":"","sources":["../../../src/commands/bootstrapDev.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAMrD,MAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAAC,kBAEhD;IACA,kBAAkB,CAAC,YAAY,CAAC,GAAG;QAClC,OAAO,EAAE,YAAY;QACrB,OAAO,E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CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAdminComponent } from \"@twin.org/api-auth-entity-storage-models\";\nimport type { ITenantAdminComponent } from \"@twin.org/api-models\";\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ContextIdKeys, ContextIdStore } from \"@twin.org/context\";\nimport { Coerce, ComponentFactory, GeneralError, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport { identityCreate } from \"./identityCreate.js\";\nimport { identityVerificationMethodCreate } from \"./identityVerificationMethodCreate.js\";\nimport { tenantCreate } from \"./tenantCreate.js\";\nimport { userCreate } from \"./userCreate.js\";\nimport { vaultKeyCreate } from \"./vaultKeyCreate.js\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"../models/IEnvironmentVariables.js\";\nimport type { INodeEngineConfig } from \"../models/INodeEngineConfig.js\";\nimport type { INodeEngineState } from \"../models/INodeEngineState.js\";\n\nconst COMMAND_NAME = \"bootstrap-dev\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionBootstrapDev(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\taliases: [\"bootstrap-legacy\"],\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.bootstrap-dev.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.bootstrap-dev.example\"),\n\t\trequiresNodeIdentity: false,\n\t\trequiresOrgIdentity: false,\n\t\tparams: [\n\t\t\t{\n\t\t\t\tkey: \"env-prefix\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.bootstrap-dev.params.env-prefix.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"load-env\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.bootstrap-dev.params.load-env.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t}\n\t\t],\n\t\taction: async (engineCore, envVars, params) => bootstrapDev(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for development bootstrap.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @returns A promise that resolves when the bootstrap sequence has completed.\n */\nexport async function bootstrapDev(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\tenvVars: IEnvironmentVariables,\n\tparams: {}\n): Promise<void> {\n\tconst features = (envVars.features ?? \"admin-user,wallet\")\n\t\t.split(\",\")\n\t\t.map(f => f.trim())\n\t\t.filter(f => f.length > 0);\n\n\tconst state = engineCore.getState();\n\tconst requireWallet = features.includes(\"wallet\");\n\tconst tenantEnabled = Coerce.boolean(envVars.tenantEnabled) ?? false;\n\tlet nodeId = state.nodeId ?? envVars.nodeIdentity;\n\tlet organizationId = tenantEnabled ? undefined : state.nodeOrganizationId;\n\tlet tenant: { id: string; organizationId: string } | undefined;\n\n\tif (features.length === 0) {\n\t\tthrow new GeneralError(\"bootstrapDev\", \"noFeaturesEnabled\");\n\t}\n\n\tCLIDisplay.break();\n\tCLIDisplay.section(\n\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.nodeIdentityCreate\")\n\t);\n\n\tconst nodeIdentity = await identityCreate(engineCore, envVars, {\n\t\tidentity: nodeId,\n\t\tmnemonic: envVars.nodeMnemonic,\n\t\tfundWallet: requireWallet,\n\t\tnodeId: true\n\t});\n\n\tnodeId = nodeIdentity.did;\n\n\tCLIDisplay.break();\n\tCLIDisplay.section(\n\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.nodeAuthKeyCreate\")\n\t);\n\tawait vaultKeyCreate(engineCore, envVars, {\n\t\tidentity: nodeId,\n\t\tkeyType: \"Ed25519\",\n\t\tkeyId: envVars.authSigningKeyId,\n\t\toverwriteMode: \"skip\"\n\t});\n\n\t// Always create the organisation identity first so it can be associated with\n\t// the tenant (multi-tenant) or the node (single-tenant) immediately after.\n\t// The trust verification method is always added to the organisation identities.\n\tawait ContextIdStore.run({ [ContextIdKeys.Node]: nodeId }, async () => {\n\t\tCLIDisplay.break();\n\t\tCLIDisplay.section(\n\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.organisationCreate\")\n\t\t);\n\n\t\tif (tenantEnabled) {\n\t\t\tconst existingTenant = Is.stringValue(envVars.tenantId)\n\t\t\t\t? await resolveTenantById(engineCore, envVars.tenantId)\n\t\t\t\t: await resolveDefaultTenant(engineCore);\n\t\t\torganizationId = existingTenant?.organizationId;\n\t\t}\n\n\t\tconst organisation = await identityCreate(engineCore, envVars, {\n\t\t\tidentity: organizationId ?? envVars.organizationIdentity,\n\t\t\tmnemonic: envVars.organizationMnemonic,\n\t\t\tfundWallet: requireWallet\n\t\t});\n\t\torganizationId = organisation.did;\n\n\t\tCLIDisplay.break();\n\t\tCLIDisplay.section(\n\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.trustVerificationMethodCreate\")\n\t\t);\n\t\tawait identityVerificationMethodCreate(engineCore, envVars, {\n\t\t\tidentity: organisation.did,\n\t\t\tverificationMethodType: \"assertionMethod\",\n\t\t\tverificationMethodId: envVars.trustVerificationMethodId,\n\t\t\toverwriteMode: \"skip\"\n\t\t});\n\n\t\tif (Coerce.boolean(envVars.blobStorageEnableEncryption) ?? false) {\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.section(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.blobStorageKeyCreate\")\n\t\t\t);\n\t\t\tawait vaultKeyCreate(engineCore, envVars, {\n\t\t\t\tidentity: organizationId,\n\t\t\t\tkeyType: \"ChaCha20Poly1305\",\n\t\t\t\tkeyId: envVars.blobStorageEncryptionKeyId,\n\t\t\t\toverwriteMode: \"skip\"\n\t\t\t});\n\t\t}\n\n\t\tconst defaultAttestationConnectorType =\n\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"attestationConnector\");\n\t\tif (!Is.empty(defaultAttestationConnectorType)) {\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.section(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.attestationMethodCreate\")\n\t\t\t);\n\t\t\tawait identityVerificationMethodCreate(engineCore, envVars, {\n\t\t\t\tidentity: organizationId,\n\t\t\t\tverificationMethodType: \"assertionMethod\",\n\t\t\t\tverificationMethodId: envVars.attestationVerificationMethodId,\n\t\t\t\toverwriteMode: \"skip\"\n\t\t\t});\n\t\t}\n\n\t\tconst defaultImmutableProofComponentType =\n\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"immutableProofComponent\");\n\n\t\tif (!Is.empty(defaultImmutableProofComponentType)) {\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.section(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.immutableProofMethodCreate\")\n\t\t\t);\n\t\t\tawait identityVerificationMethodCreate(engineCore, envVars, {\n\t\t\t\tidentity: organizationId,\n\t\t\t\tverificationMethodType: \"assertionMethod\",\n\t\t\t\tverificationMethodId: envVars.immutableProofVerificationMethodId,\n\t\t\t\toverwriteMode: \"skip\"\n\t\t\t});\n\t\t}\n\n\t\t// In single-tenant mode, record the org DID in state so the node can resolve its\n\t\t// organisation without a tenant lookup.\n\t\tif (!tenantEnabled && !Is.stringValue(state.nodeOrganizationId)) {\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.section(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.nodeOrganizationIdSet\")\n\t\t\t);\n\t\t\tstate.nodeOrganizationId = organisation.did;\n\t\t\tengineCore.setStateDirty();\n\t\t\tCLIDisplay.done();\n\t\t}\n\t});\n\n\tif (tenantEnabled) {\n\t\tawait ContextIdStore.run({ [ContextIdKeys.Node]: nodeId }, async () => {\n\t\t\t// Resolve an existing tenant so a re-run does not create a duplicate.\n\t\t\t// When a specific tenant ID is configured, look it up directly;\n\t\t\t// otherwise search for the first tenant labelled \"Tenant\".\n\t\t\tif (Is.stringValue(envVars.tenantId)) {\n\t\t\t\ttenant = await resolveTenantById(engineCore, envVars.tenantId);\n\t\t\t} else {\n\t\t\t\ttenant = await resolveDefaultTenant(engineCore);\n\t\t\t}\n\n\t\t\t// Still empty so create a new tenant for the node and associate it with the organisation.\n\t\t\tif (Is.empty(tenant)) {\n\t\t\t\tCLIDisplay.break();\n\t\t\t\tCLIDisplay.section(\n\t\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.nodeTenantCreate\")\n\t\t\t\t);\n\t\t\t\tconst tenantDetails = await tenantCreate(engineCore, envVars, {\n\t\t\t\t\ttenantId: envVars.tenantId,\n\t\t\t\t\tapiKey: envVars.tenantApiKey,\n\t\t\t\t\tlabel: \"Tenant\",\n\t\t\t\t\torganizationId\n\t\t\t\t});\n\n\t\t\t\ttenant = {\n\t\t\t\t\tid: tenantDetails.tenantId,\n\t\t\t\t\torganizationId: organizationId ?? tenantDetails.organizationId ?? \"\"\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}\n\n\tif (features.includes(\"admin-user\")) {\n\t\tawait ContextIdStore.run(\n\t\t\t{ [ContextIdKeys.Node]: nodeId, [ContextIdKeys.Tenant]: tenant?.id },\n\t\t\tasync () => {\n\t\t\t\tconst orgDid = await resolveOrganizationDid(engineCore, tenantEnabled, tenant?.id);\n\t\t\t\tconst effectiveAdminEmail =\n\t\t\t\t\tenvVars.adminUserName ?? `admin@${tenantEnabled ? \"tenant\" : \"node\"}`;\n\t\t\t\tconst adminUser = await resolveDefaultAdminUser(engineCore, effectiveAdminEmail);\n\t\t\t\tlet userDid = adminUser?.userIdentity;\n\n\t\t\t\tif (Is.empty(adminUser)) {\n\t\t\t\t\tCLIDisplay.break();\n\t\t\t\t\tCLIDisplay.section(\n\t\t\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.adminIdentityCreate\")\n\t\t\t\t\t);\n\t\t\t\t\tconst result = await identityCreate(engineCore, envVars, {\n\t\t\t\t\t\tidentity: envVars.adminUserIdentity,\n\t\t\t\t\t\tmnemonic: envVars.adminUserMnemonic,\n\t\t\t\t\t\tcontroller: orgDid\n\t\t\t\t\t});\n\n\t\t\t\t\tuserDid = result.did;\n\t\t\t\t}\n\n\t\t\t\tCLIDisplay.break();\n\t\t\t\tCLIDisplay.section(\n\t\t\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.adminUserCreate\")\n\t\t\t\t);\n\t\t\t\tawait userCreate(engineCore, envVars, {\n\t\t\t\t\tuserIdentity: userDid,\n\t\t\t\t\torganizationIdentity: orgDid,\n\t\t\t\t\ttenantId: tenant?.id,\n\t\t\t\t\temail: envVars.adminUserName ?? `admin@${tenantEnabled ? \"tenant\" : \"node\"}`,\n\t\t\t\t\tpassword: envVars.adminUserPassword,\n\t\t\t\t\tscope:\n\t\t\t\t\t\tenvVars.adminUserScope ??\n\t\t\t\t\t\t(tenantEnabled ? [\"tenant-admin\", \"user-admin\"] : [\"user-admin\"]).join(\",\"),\n\t\t\t\t\tgivenName: tenantEnabled ? \"Tenant\" : \"Node\",\n\t\t\t\t\tfamilyName: \"Admin\",\n\t\t\t\t\toverwriteMode: \"skip\"\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n}\n\n/**\n * Resolve the organisation DID from node state (single-tenant) or the tenant entry (multi-tenant).\n * @param engineCore The engine core.\n * @param tenantEnabled Whether multi-tenancy is enabled.\n * @param tenantId The active tenant ID (multi-tenant only).\n * @returns The organisation DID.\n * @throws GeneralError if the organisation has not been associated yet.\n * @internal\n */\nasync function resolveOrganizationDid(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\ttenantEnabled: boolean,\n\ttenantId: string | undefined\n): Promise<string> {\n\tif (tenantEnabled) {\n\t\tif (Is.stringValue(tenantId)) {\n\t\t\tconst tenantAdminComponentType =\n\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\t\t\tif (Is.stringValue(tenantAdminComponentType)) {\n\t\t\t\tconst tenantAdminComponent =\n\t\t\t\t\tComponentFactory.get<ITenantAdminComponent>(tenantAdminComponentType);\n\t\t\t\tconst tenant = await tenantAdminComponent.get(tenantId);\n\t\t\t\tif (Is.stringValue(tenant.organizationId)) {\n\t\t\t\t\treturn tenant.organizationId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst state = engineCore.getState();\n\t\tif (Is.stringValue(state.nodeOrganizationId)) {\n\t\t\treturn state.nodeOrganizationId;\n\t\t}\n\t}\n\n\tthrow new GeneralError(\"bootstrapDev\", \"organizationNotSet\");\n}\n\n/**\n * Resolve the default tenant id for re-bootstrap when multi-tenancy is enabled.\n * @param engineCore The engine core.\n * @returns The tenant id if one exists in storage.\n * @internal\n */\nasync function resolveDefaultTenant(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>\n): Promise<{ id: string; organizationId: string } | undefined> {\n\tconst tenantAdminServiceComponentType =\n\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\n\tif (!Is.stringValue(tenantAdminServiceComponentType)) {\n\t\treturn undefined;\n\t}\n\n\tconst tenantAdminService = ComponentFactory.get<ITenantAdminComponent>(\n\t\ttenantAdminServiceComponentType\n\t);\n\n\tlet cursor: string | undefined;\n\tlet firstTenant: { id: string; organizationId: string } | undefined;\n\n\tdo {\n\t\tconst result = await tenantAdminService.query(\n\t\t\tundefined,\n\t\t\t[\"id\", \"organizationId\", \"label\"],\n\t\t\tcursor\n\t\t);\n\t\tconst nodeTenant = result.tenants.find(tenant => tenant.label === \"Tenant\");\n\t\tif (nodeTenant) {\n\t\t\treturn {\n\t\t\t\tid: nodeTenant.id,\n\t\t\t\torganizationId: nodeTenant.organizationId ?? \"\"\n\t\t\t};\n\t\t}\n\n\t\tif (Is.empty(firstTenant) && Is.arrayValue(result.tenants)) {\n\t\t\tfirstTenant = {\n\t\t\t\tid: result.tenants[0].id,\n\t\t\t\torganizationId: result.tenants[0].organizationId ?? \"\"\n\t\t\t};\n\t\t}\n\n\t\tcursor = result.cursor;\n\t} while (Is.stringValue(cursor));\n\n\tif (!Is.empty(firstTenant)) {\n\t\tCLIDisplay.value(\n\t\t\tI18n.formatMessage(\"node.cli.commands.bootstrap-dev.labels.tenantFallback\"),\n\t\t\tfirstTenant.id\n\t\t);\n\t}\n\n\treturn firstTenant;\n}\n\n/**\n * Resolve the admin user by email for idempotent re-bootstrap.\n * @param engineCore The engine core.\n * @param email The email address of the admin user to look up.\n * @returns The admin user if one exists in storage.\n * @internal\n */\nasync function resolveDefaultAdminUser(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\temail: string\n): Promise<{ email: string; userIdentity: string; organizationIdentity: string } | undefined> {\n\tconst defaultAuthenticationAdminComponentType = engineCore.getRegisteredInstanceType(\n\t\t\"authenticationAdminComponent\"\n\t);\n\tconst authenticationAdminComponent = ComponentFactory.get<IAuthenticationAdminComponent>(\n\t\tdefaultAuthenticationAdminComponentType\n\t);\n\n\ttry {\n\t\treturn await authenticationAdminComponent.get(email);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Resolve a tenant by its specific ID for idempotent re-bootstrap.\n * @param engineCore The engine core.\n * @param tenantId The tenant ID to look up.\n * @returns The tenant if found, otherwise undefined.\n * @internal\n */\nasync function resolveTenantById(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\ttenantId: string\n): Promise<{ id: string; organizationId: string } | undefined> {\n\tconst tenantAdminServiceComponentType =\n\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\n\tif (!Is.stringValue(tenantAdminServiceComponentType)) {\n\t\treturn undefined;\n\t}\n\n\tconst tenantAdminService = ComponentFactory.get<ITenantAdminComponent>(\n\t\ttenantAdminServiceComponentType\n\t);\n\n\ttry {\n\t\tconst found = await tenantAdminService.get(tenantId);\n\t\treturn {\n\t\t\tid: found.id,\n\t\t\torganizationId: found.organizationId ?? \"\"\n\t\t};\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export * from "./builders/extensionsBuilder.js";
|
|
|
6
6
|
export * from "./cli.js";
|
|
7
7
|
export * from "./defaults.js";
|
|
8
8
|
export * from "./models/cliCommandParamType.js";
|
|
9
|
-
export * from "./models/
|
|
9
|
+
export * from "./models/IBootstrapDevEnvironmentVariables.js";
|
|
10
10
|
export * from "./models/ICacheMetadata.js";
|
|
11
11
|
export * from "./models/ICliArgs.js";
|
|
12
12
|
export * from "./models/ICliCommand.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iDAAiD,CAAC;AAChE,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./builders/engineEnvBuilder.js\";\nexport * from \"./builders/engineServerEnvBuilder.js\";\nexport * from \"./builders/extensionsBuilder.js\";\nexport * from \"./cli.js\";\nexport * from \"./defaults.js\";\nexport * from \"./models/cliCommandParamType.js\";\nexport * from \"./models/IBootstrapDevEnvironmentVariables.js\";\nexport * from \"./models/ICacheMetadata.js\";\nexport * from \"./models/ICliArgs.js\";\nexport * from \"./models/ICliCommand.js\";\nexport * from \"./models/ICliCommandDefinition.js\";\nexport * from \"./models/ICliCommandDefinitionParam.js\";\nexport * from \"./models/IEngineEnvironmentVariables.js\";\nexport * from \"./models/IEngineServerEnvironmentVariables.js\";\nexport * from \"./models/IEnvironmentVariables.js\";\nexport * from \"./models/IModuleProtocol.js\";\nexport * from \"./models/INodeEngineConfig.js\";\nexport * from \"./models/INodeEngineState.js\";\nexport * from \"./models/INodeEnvironmentVariables.js\";\nexport * from \"./models/INodeOptions.js\";\nexport * from \"./models/IProtocolHandlerResult.js\";\nexport * from \"./models/moduleProtocol.js\";\nexport * from \"./models/nodeExtensionInitialiseEngineMethod.js\";\nexport * from \"./models/nodeExtensionInitialiseEngineServerMethod.js\";\nexport * from \"./models/nodeExtensionInitialiseMethod.js\";\nexport * from \"./models/nodeExtensionShutdownMethod.js\";\nexport * from \"./node.js\";\nexport * from \"./start.js\";\nexport * from \"./utils.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBootstrapDevEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IBootstrapDevEnvironmentVariables.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The environment variables for the bootstrap development command.\n */\nexport interface IBootstrapDevEnvironmentVariables {\n\t/**\n\t * The features that are enabled on the node.\n\t * @default []\n\t */\n\tfeatures?: string;\n\n\t/**\n\t * The identity of the node which, if empty and node-identity feature is enabled it will be generated.\n\t */\n\tnodeIdentity?: string;\n\n\t/**\n\t * The mnemonic for the node identity, if empty it will be randomly generated.\n\t */\n\tnodeMnemonic?: string;\n\n\t/**\n\t * A tenant id to use as a default for the node.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * A tenant api key to use as a default for the node.\n\t */\n\ttenantApiKey?: string;\n\n\t/**\n\t * The organisation identity. If not provided it will be generated.\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The mnemonic for the organisation identity, if empty it will be randomly generated.\n\t */\n\torganizationMnemonic?: string;\n\n\t/**\n\t * If the admin-user feature is enabled, this will be the identity of the user. If not provided it will be generated.\n\t */\n\tadminUserIdentity?: string;\n\n\t/**\n\t * The mnemonic for the admin user, if empty it will be randomly generated.\n\t */\n\tadminUserMnemonic?: string;\n\n\t/**\n\t * If the admin-user feature is enabled, this will be the name of the user.\n\t * @default admin@node\n\t */\n\tadminUserName?: string;\n\n\t/**\n\t * If the admin-user feature is enabled, this will be the password of the user. If empty it will be randomly generated.\n\t */\n\tadminUserPassword?: string;\n\n\t/**\n\t * If the admin-user feature is enabled, this is a comma-separated list of scopes for the user.\n\t * @default tenant-admin,user-admin (when tenant enabled) or user-admin (when tenant disabled)\n\t */\n\tadminUserScope?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEngineEnvironmentVariables.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The engine core environment variables.\n */\nexport interface IEngineEnvironmentVariables {\n\t/**\n\t * Start the engine in debug mode.\n\t */\n\tdebug?: string;\n\n\t/**\n\t * Start the engine in silent mode.\n\t */\n\tsilent?: string;\n\n\t/**\n\t * Controls how unrecognised TWIN_* environment variables are handled at startup.\n\t * \"error\" (default): throws a startup error, allowing CI and production deployments\n\t * to hard-fail on misconfigured or misspelled variable names.\n\t * \"warn\": logs a warning and continues.\n\t * \"ignore\": skips validation entirely.\n\t * Any other value is rejected at startup.\n\t * @default \"error\"\n\t */\n\tstrictEnv?: string;\n\n\t/**\n\t * Comma-separated list of raw environment variable names to exempt from the unknown-key check.\n\t * Use this to allowlist variables introduced by custom extensions that are not part of the\n\t * core interface, e.g. TWIN_MY_EXTENSION_SECRET.\n\t */\n\tenvAllowList?: string;\n\n\t/**\n\t * The root directory for storing items like state file.\n\t */\n\tstorageFileRoot?: string;\n\n\t/**\n\t * The name of the state file.\n\t */\n\tstateFilename?: string;\n\n\t/**\n\t * Is multi-tenant support enabled, defaults to false.\n\t */\n\ttenantEnabled?: string;\n\n\t/**\n\t * Enable schema migration, defaults to true.\n\t */\n\tschemaMigrationEnabled?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql\n\t */\n\tentityStorageConnectorType?: string;\n\n\t/**\n\t * The default entity storage connector to use, defaults to the first one in the list.\n\t */\n\tentityStorageConnectorDefault?: string;\n\n\t/**\n\t * A prefix for all the table in entity-storage, can be empty.\n\t */\n\tentityStorageTablePrefix?: string;\n\n\t/**\n\t * AWS DynamoDB auth mode, either credentials or pod.\n\t */\n\tawsDynamodbAuthMode?: string;\n\n\t/**\n\t * AWS Dynamo DB access key id.\n\t */\n\tawsDynamodbAccessKeyId?: string;\n\n\t/**\n\t * AWS Dynamo DB Endpoint if running local instance.\n\t */\n\tawsDynamodbEndpoint?: string;\n\n\t/**\n\t * AWS Dynamo DB region.\n\t */\n\tawsDynamodbRegion?: string;\n\n\t/**\n\t * AWS Dynamo DB secret access key.\n\t */\n\tawsDynamodbSecretAccessKey?: string;\n\n\t/**\n\t * AWS Dynamo DB connection timeout in milliseconds.\n\t */\n\tawsDynamodbConnectionTimeout?: string;\n\n\t/**\n\t * Azure Cosmos DB key.\n\t */\n\tazureCosmosdbKey?: string;\n\n\t/**\n\t * Azure Cosmos DB container id.\n\t */\n\tazureCosmosdbContainerId?: string;\n\n\t/**\n\t * Azure Cosmos DB database id.\n\t */\n\tazureCosmosdbDatabaseId?: string;\n\n\t/**\n\t * Azure Cosmos DB endpoint.\n\t */\n\tazureCosmosdbEndpoint?: string;\n\n\t/**\n\t * GCP Firestore collection name.\n\t */\n\tgcpFirestoreCollectionName?: string;\n\n\t/**\n\t * GCP Firestore credentials.\n\t */\n\tgcpFirestoreCredentials?: string;\n\n\t/**\n\t * GCP Firestore database id.\n\t */\n\tgcpFirestoreDatabaseId?: string;\n\n\t/**\n\t * GCP Firestore endpoint.\n\t */\n\tgcpFirestoreEndpoint?: string;\n\n\t/**\n\t * GCP Firestore project id.\n\t */\n\tgcpFirestoreProjectId?: string;\n\n\t/**\n\t * ScyllaDB hosts as comma separated string.\n\t */\n\tscylladbHosts?: string;\n\n\t/**\n\t * ScyllaDB keyspace.\n\t */\n\tscylladbKeyspace?: string;\n\n\t/**\n\t * ScyllaDB local data center.\n\t */\n\tscylladbLocalDataCenter?: string;\n\n\t/**\n\t * ScyllaDB port.\n\t */\n\tscylladbPort?: string;\n\n\t/**\n\t * MySQL host.\n\t */\n\tmySqlHost?: string;\n\n\t/**\n\t * MySQL port.\n\t */\n\tmySqlPort?: number;\n\n\t/**\n\t * MySQL username.\n\t */\n\tmySqlUser?: string;\n\n\t/**\n\t * MySQL password.\n\t */\n\tmySqlPassword?: string;\n\n\t/**\n\t * MySQL Database.\n\t */\n\tmySqlDatabase?: string;\n\n\t/**\n\t * MongoDB host.\n\t */\n\tmongoDbHost?: string;\n\n\t/**\n\t * MongoDB port.\n\t */\n\tmongoDbPort?: number;\n\n\t/**\n\t * MongoDB username.\n\t */\n\tmongoDbUser?: string;\n\n\t/**\n\t * MongoDB password.\n\t */\n\tmongoDbPassword?: string;\n\n\t/**\n\t * MongoDB Database.\n\t */\n\tmongoDbDatabase?: string;\n\n\t/**\n\t * PostgreSQl host.\n\t */\n\tpostgreSqlHost?: string;\n\n\t/**\n\t * PostgreSQl port.\n\t */\n\tpostgreSqlPort?: number;\n\n\t/**\n\t * PostgreSQl username.\n\t */\n\tpostgreSqlUser?: string;\n\n\t/**\n\t * PostgreSQl password.\n\t */\n\tpostgreSqlPassword?: string;\n\n\t/**\n\t * PostgreSQl Database.\n\t */\n\tpostgreSqlDatabase?: string;\n\n\t/**\n\t * The security token for accessing IPFS API.\n\t */\n\tipfsBearerToken?: string;\n\n\t/**\n\t * The url for accessing IPFS API.\n\t */\n\tipfsApiUrl?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.\n\t */\n\tblobStorageConnectorType?: string;\n\n\t/**\n\t * The default blob storage connector to use, defaults to the first one in the list.\n\t */\n\tblobStorageConnectorDefault?: string;\n\n\t/**\n\t * Enable encryption for the blob storage.\n\t */\n\tblobStorageEnableEncryption?: string;\n\n\t/**\n\t * The id of the encryption key for the blob storage.\n\t */\n\tblobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * A prefix for all the blobs in blob-storage, can be empty.\n\t */\n\tblobStoragePrefix?: string;\n\n\t/**\n\t * AWS S3 region.\n\t */\n\tawsS3Region?: string;\n\n\t/**\n\t * AWS S3 bucket name.\n\t */\n\tawsS3BucketName?: string;\n\n\t/**\n\t * AWS S3 auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsS3AuthMode?: string;\n\n\t/**\n\t * AWS S3 access key id.\n\t */\n\tawsS3AccessKeyId?: string;\n\n\t/**\n\t * AWS S3 secret access key.\n\t */\n\tawsS3SecretAccessKey?: string;\n\n\t/**\n\t * AWS S3 endpoint.\n\t */\n\tawsS3Endpoint?: string;\n\n\t/**\n\t * Azure Storage account key.\n\t */\n\tazureStorageAccountKey?: string;\n\n\t/**\n\t * Azure Storage account name.\n\t */\n\tazureStorageAccountName?: string;\n\n\t/**\n\t * Azure Storage container.\n\t */\n\tazureStorageContainerName?: string;\n\n\t/**\n\t * Azure Storage endpoint.\n\t */\n\tazureStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage bucket.\n\t */\n\tgcpStorageBucketName?: string;\n\n\t/**\n\t * GCP Storage credentials.\n\t */\n\tgcpStorageCredentials?: string;\n\n\t/**\n\t * GCP Storage endpoint.\n\t */\n\tgcpStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage project id.\n\t */\n\tgcpStorageProjectId?: string;\n\n\t/**\n\t * The type of the default vault connector: entity-storage, hashicorp.\n\t */\n\tvaultConnector?: string;\n\n\t/**\n\t * Prefix to prepend to entries in the vault.\n\t */\n\tvaultPrefix?: string;\n\n\t/**\n\t * Hashicorp Vault token.\n\t */\n\thashicorpVaultToken?: string;\n\n\t/**\n\t * Hashicorp Vault endpoint.\n\t */\n\thashicorpVaultEndpoint?: string;\n\n\t/**\n\t * The type of logging task connector, can be a comma separated list: console, entity-storage, otel, file.\n\t */\n\tloggingConnector?: string;\n\n\t/**\n\t * The batch size for the logging task, set to 1 for no batching.\n\t */\n\tloggingBatchSize?: string;\n\n\t/**\n\t * The batch flush interval in seconds for the logging task, how often to flush the logs when using batching, defaults to 5 seconds.\n\t */\n\tloggingBatchFlushInterval?: string;\n\n\t/**\n\t * Delete log entries older than this many minutes for the entity-storage logging connector.\n\t * Set to 0 to disable age-based retention.\n\t * @default 2880 (2 days)\n\t */\n\tloggingRetainFor?: string;\n\n\t/**\n\t * Keep at most this many log entries for the entity-storage logging connector.\n\t * Set to 0 to disable count-based retention.\n\t * @default 10000\n\t */\n\tloggingMaxEntries?: string;\n\n\t/**\n\t * How often the retention cleanup task runs in minutes for the entity-storage logging connector.\n\t * Set to 0 to disable periodic cleanup.\n\t * @default 5\n\t */\n\tloggingRetentionInterval?: string;\n\n\t/**\n\t * Maximum number of entries deleted per cleanup batch for the entity-storage logging connector.\n\t * Keeping this value smaller helps avoid spikes in database load.\n\t * @default 1000\n\t */\n\tloggingRetentionBatchSize?: string;\n\n\t/**\n\t * A list of components to exclude from logging, can be a comma separated list of component Class names e.g. \"ComponentA,ComponentB\".\n\t */\n\tloggingSilentComponents?: string;\n\n\t/**\n\t * The directory to write log files into when using the file logging connector. Required when TWIN_LOGGING_CONNECTOR includes \"file\".\n\t */\n\tloggingFileDirectory?: string;\n\n\t/**\n\t * The log filename when using the file logging connector, defaults to \"app.log\".\n\t */\n\tloggingFileFilename?: string;\n\n\t/**\n\t * The maximum log file size in bytes before rotation when using the file logging connector, defaults to 10485760 (10 MB). Set to 0 or negative to disable rotation.\n\t */\n\tloggingFileMaxFileSizeBytes?: string;\n\n\t/**\n\t * The number of rotated log files to retain when using the file logging connector, defaults to 5. Set to 0 or negative to keep all rotated files.\n\t */\n\tloggingFileMaxRetainedFiles?: string;\n\n\t/**\n\t * The name of the OpenTelemetry logger, only required if using open-telemetry as logging connector, defaults to twin-logging.\n\t */\n\topenTelemetryLoggingLoggerName?: string;\n\n\t/**\n\t * The version of the OpenTelemetry logger, only required if using open-telemetry as logging connector, defaults to 1.0.0.\n\t */\n\topenTelemetryLoggingLoggerVersion?: string;\n\n\t/**\n\t * The OTLP endpoint URL for the OpenTelemetry logging exporter, required when using open-telemetry as logging connector, e.g. http://localhost:4318/v1/logs.\n\t */\n\topenTelemetryLoggingPrometheusEndpoint?: string;\n\n\t/**\n\t * The log record processor to use for the OpenTelemetry logging exporter, either batch or simple, defaults to batch.\n\t */\n\topenTelemetryLoggingProcessor?: string;\n\n\t/**\n\t * The type of event bus connector: local.\n\t */\n\teventBusConnector?: string;\n\n\t/**\n\t * The type of event bus component: service.\n\t */\n\teventBusComponent?: string;\n\n\t/**\n\t * Are the messaging components enabled, defaults to false.\n\t */\n\tmessagingEnabled?: string;\n\n\t/**\n\t * AWS SES region.\n\t */\n\tawsSesRegion?: string;\n\n\t/**\n\t * AWS SES auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsSesAuthMode?: string;\n\n\t/**\n\t * AWS SES secret access key.\n\t */\n\tawsSesSecretAccessKey?: string;\n\n\t/**\n\t * AWS SES access key id.\n\t */\n\tawsSesAccessKeyId?: string;\n\n\t/**\n\t * AWS SES endpoint.\n\t */\n\tawsSesEndpoint?: string;\n\n\t/**\n\t * The applications for the push notifications reference a separate json with @json: prefix.\n\t */\n\tawsMessagingPushNotificationApplications?: string;\n\n\t/**\n\t * The type of messaging email connector: entity-storage, aws.\n\t */\n\tmessagingEmailConnector?: string;\n\n\t/**\n\t * The type of messaging sms connector: entity-storage, aws.\n\t */\n\tmessagingSmsConnector?: string;\n\n\t/**\n\t * The type of messaging push notification connector: entity-storage, aws.\n\t */\n\tmessagingPushNotificationConnector?: string;\n\n\t/**\n\t * The type of telemetry connector: entity-storage.\n\t */\n\ttelemetryConnector?: string;\n\n\t/**\n\t * The name of the Open Telemetry meter to use, only required if using open-telemetry as telemetry connector, defaults to twin-node.\n\t */\n\topenTelemetryMeterName?: string;\n\n\t/**\n\t * The version of the Open Telemetry metrics specification to use, only required if using open-telemetry as telemetry connector, defaults to 1.0.0.\n\t */\n\topenTelemetryMeterVersion?: string;\n\n\t/**\n\t * The type of Open Telemetry metric reader to use, only required if using open-telemetry as telemetry connector, values: prometheus.\n\t */\n\topenTelemetryReader?: string;\n\n\t/**\n\t * The port to use for the Open Telemetry Prometheus metrics server, only required if using open-telemetry as telemetry connector and prometheus as reader, defaults to 9464.\n\t */\n\topenTelemetryPrometheusPort?: string;\n\n\t/**\n\t * Polling interval in seconds for the telemetry metrics collector. Defaults to 60.\n\t */\n\ttelemetryMetricsCollectorInterval?: string;\n\n\t/**\n\t * The type of telemetry metrics producers, can be a comma separated list: system, process.\n\t */\n\ttelemetryMetricsProducers?: string;\n\n\t/**\n\t * Maximum number of values retained per telemetry metric (count-based history cap). Defaults to 1440.\n\t */\n\ttelemetryMetricsProducerMaxHistory?: string;\n\n\t/**\n\t * The type of faucet connector: entity-storage, iota.\n\t */\n\tfaucetConnector?: string;\n\n\t/**\n\t * The type of wallet connector: entity-storage, iota.\n\t */\n\twalletConnector?: string;\n\n\t/**\n\t * The type of NFT connector: entity-storage, iota.\n\t */\n\tnftConnector?: string;\n\n\t/**\n\t * The NFT deployed package id, for custom deployments.\n\t */\n\tnftPackageId?: string;\n\n\t/**\n\t * The type of notarization connector: entity-storage, iota.\n\t */\n\tnotarizationConnector?: string;\n\n\t/**\n\t * The type of identity connector: entity-storage, iota.\n\t */\n\tidentityConnector?: string;\n\n\t/**\n\t * The index of the wallet address to use, defaults to 0.\n\t */\n\tidentityWalletAddressIndex?: string;\n\n\t/**\n\t * The TTL in milliseconds for caching resolved DIDs when using the IOTA identity connector. Omit to use the connector default.\n\t */\n\tidentityDidResolutionCacheTtlMs?: string;\n\n\t/**\n\t * The type of identity resolver connector: entity-storage, iota.\n\t */\n\tidentityResolverConnector?: string;\n\n\t/**\n\t * IOTA Faucet Endpoint.\n\t */\n\tiotaFaucetEndpoint?: string;\n\n\t/**\n\t * IOTA Node Endpoint.\n\t */\n\tiotaNodeEndpoint?: string;\n\n\t/**\n\t * IOTA network.\n\t */\n\tiotaNetwork?: string;\n\n\t/**\n\t * IOTA coin type.\n\t */\n\tiotaCoinType?: string;\n\n\t/**\n\t * IOTA gas budget, in nanos.\n\t */\n\tiotaGasBudget?: string;\n\n\t/**\n\t * IOTA gas reservation duration, in seconds.\n\t */\n\tiotaGasReservationDuration?: string;\n\n\t/**\n\t * IOTA Explorer Endpoint.\n\t */\n\tiotaExplorerEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Endpoint.\n\t */\n\tiotaGasStationEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Authentication Token.\n\t */\n\tiotaGasStationAuthToken?: string;\n\n\t/**\n\t * The IOTA Identity deployed package id, for custom deployments.\n\t */\n\tiotaIdentityPackageId?: string;\n\n\t/**\n\t * Universal Resolver Endpoint.\n\t */\n\tuniversalResolverEndpoint?: string;\n\n\t/**\n\t * The type of identity profile connector: entity-storage.\n\t */\n\tidentityProfileConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with immutable proofs.\n\t */\n\timmutableProofVerificationMethodId?: string;\n\n\t/**\n\t * The number of times to retry a proof task when it fails, 0 to disable retries.\n\t * @default 5\n\t */\n\timmutableProofTaskRetryCount?: number;\n\n\t/**\n\t * The interval in seconds to wait between proof task retries.\n\t * @default 5\n\t */\n\timmutableProofTaskRetryInterval?: number;\n\n\t/**\n\t * The time in minutes to retain the record of a failed proof task.\n\t * Set to -1 to retain failures forever.\n\t * @default 10080\n\t */\n\timmutableProofTaskFailureRetainFor?: number;\n\n\t/**\n\t * The type of attestation connector: entity-storage, iota.\n\t */\n\tattestationConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with attestation.\n\t */\n\tattestationVerificationMethodId?: string;\n\n\t/**\n\t * Is the data processing enabled, defaults to false.\n\t */\n\tdataProcessingEnabled?: string;\n\n\t/**\n\t * The type of the default data converters, can be a comma separated list: json, xml.\n\t */\n\tdataConverterConnectors?: string;\n\n\t/**\n\t * The type of the default data extractor, can be a comma separated list: json-path.\n\t */\n\tdataExtractorConnectors?: string;\n\n\t/**\n\t * Enable the task scheduler regardless of which other components are active, defaults to false.\n\t */\n\ttaskSchedulerEnabled?: string;\n\n\t/**\n\t * Is the auditable item graph enabled, defaults to false.\n\t */\n\tauditableItemGraphEnabled?: string;\n\n\t/**\n\t * Is the auditable item stream enabled, defaults to false.\n\t */\n\tauditableItemStreamEnabled?: string;\n\n\t/**\n\t * Is the document management enabled, defaults to false.\n\t */\n\tdocumentManagementEnabled?: string;\n\n\t/**\n\t * Enable the federated catalogue, defaults to false, automatically enabled if remote endpoint, filters or dataspace is enabled.\n\t */\n\tfederatedCatalogueEnabled?: string;\n\n\t/**\n\t * Federated catalog filters, command separated list of filters to add.\n\t */\n\tfederatedCatalogueFilters?: string;\n\n\t/**\n\t * Federated catalog remote endpoint, if set will use a REST client instead of local service.\n\t */\n\tfederatedCatalogueRemoteEndpoint?: string;\n\n\t/**\n\t * The path prefix used by the federated catalogue REST client when forwarding requests to the remote endpoint, defaults to \"federated-catalogue\".\n\t */\n\tfederatedCatalogueRestClientPathPrefix?: string;\n\n\t/**\n\t * The trust generators to add to the factory, comma separated list.\n\t */\n\ttrustGenerators?: string;\n\n\t/**\n\t * The trust verifiers to add to the factory, comma separated list.\n\t */\n\ttrustVerifiers?: string;\n\n\t/**\n\t * The verification method to use for trust identities.\n\t * Defaults to trust-assertion.\n\t */\n\ttrustVerificationMethodId?: string;\n\n\t/**\n\t * The trust time to live for generating JWTs in seconds.\n\t * Defaults to undefined for never expiring.\n\t */\n\ttrustJwtTtl?: string;\n\n\t/**\n\t * The allow lists for the trust identity verifier, comma separated list of identities.\n\t */\n\ttrustIdentitiesAllow?: string;\n\n\t/**\n\t * The deny lists for the trust identity verifier, comma separated list of identities.\n\t */\n\ttrustIdentitiesDeny?: string;\n\n\t/**\n\t * Path under which the rights management service is mounted (single source\n\t * of truth). The same value drives:\n\t * - the server route mount (via engine config)\n\t * - the PNP service's callback URL builder (`buildCallbackUrl`)\n\t * - the PNP rest-client's pathPrefix (consumer side)\n\t * Defaults to `rights-management`. Set when deploying behind a reverse proxy\n\t * with path rewriting, K8s ingress with path-based routing, or any custom\n\t * mount point.\n\t */\n\trightsManagementCallbackPath?: string;\n\n\t/**\n\t * The rights management policy information sources to add to the factory.\n\t */\n\trightsManagementPolicyInformationSources?: string;\n\n\t/**\n\t * The rights management policy negotiators sources to add to the factory.\n\t */\n\trightsManagementPolicyNegotiators?: string;\n\n\t/**\n\t * The rights management policy requesters to add to the factory.\n\t */\n\trightsManagementPolicyRequesters?: string;\n\n\t/**\n\t * The rights management policy execution actions to add to the factory.\n\t */\n\trightsManagementPolicyExecutionActions?: string;\n\n\t/**\n\t * The rights management policy enforcement processors to add to the factory.\n\t */\n\trightsManagementPolicyEnforcementProcessors?: string;\n\n\t/**\n\t * The rights management policy arbiters to add to the factory.\n\t */\n\trightsManagementPolicyArbiters?: string;\n\n\t/**\n\t * The rights management policy obligation enforcers to add to the factory.\n\t */\n\trightsManagementPolicyObligationEnforcers?: string;\n\n\t/**\n\t * Is the dataspace enabled, defaults to false.\n\t */\n\tdataspaceEnabled?: string;\n\n\t/**\n\t * The length of time to retain the activity logs for in seconds, set to -1 to keep forever.\n\t * @default 600\n\t */\n\tdataspaceRetainActivityLogsFor?: string;\n\n\t/**\n\t * The interval in seconds for cleaning up the activity logs.\n\t * @default 3600\n\t */\n\tdataspaceActivityLogsCleanupInterval?: string;\n\n\t/**\n\t * Base route path for the data plane service (path only, not full URL).\n\t * Combined with the public origin to form the `dataAddress.endpoint` sent to PULL consumers\n\t * and the inbox URL sent to PUSH providers.\n\t *\n\t * This must be the mount-point prefix of the data plane routes, NOT a specific route path.\n\t * Do NOT append sub-paths such as `/entities` or `/inbox` — those are appended automatically\n\t * by each transfer handler and by the data plane REST client.\n\t *\n\t * REQUIRED if PULL or PUSH transfers are supported.\n\t * If not specified, PULL and PUSH transfers will not be available.\n\t *\n\t * Example: \"dataspace\"\n\t */\n\tdataspaceDataPlanePath?: string;\n\n\t/**\n\t * Whether the provider immediately starts a transfer once it has been requested.\n\t * When false the transfer stays in REQUESTED until the provider explicitly calls transferStarted.\n\t * @default false\n\t */\n\tdataspaceAutoStartTransfers?: string;\n\n\t/**\n\t * How long in seconds a negotiation may sit without progress before it is treated as timed out.\n\t * @default 30\n\t */\n\tdataspaceStalledNegotiationTimeout?: string;\n\n\t/**\n\t * How long in seconds a consumer-initiated transfer may sit in REQUESTED without the provider\n\t * progressing it before it is treated as timed out.\n\t * @default 30\n\t */\n\tdataspaceStalledTransferTimeout?: string;\n\n\t/**\n\t * Path under which the dataspace control plane is mounted (path only, not full URL).\n\t * This must match the control-plane REST mount, as it is combined with the public\n\t * origin to build the consumer's advertised callback address.\n\t * @default \"dataspace-control-plane\"\n\t */\n\tdataspaceCallbackPath?: string;\n\n\t/**\n\t * Are the health components enabled, defaults to false.\n\t */\n\thealthEnabled?: string;\n\n\t/**\n\t * The interval in seconds for performing health checks, defaults to 60.\n\t */\n\thealthInterval?: string;\n\n\t/**\n\t * The interval in seconds for performing health checks at startup, defaults to 2.\n\t * This allows components that take a long time to initialize to be healthy before the first health check is performed.\n\t */\n\thealthStartupInterval?: string;\n\n\t/**\n\t * The type of the automation action to create, comma separate for more than one connector.\n\t * values: fetch\n\t */\n\tautomationActionTypes?: string;\n\n\t/**\n\t * The default mutex timeout in milliseconds, used when no component-specific timeout is set, defaults to 5000 if omitted.\n\t */\n\tmutexTimeoutMsDefault?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the auditable item graph component.\n\t */\n\tauditableItemGraphMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the auditable item stream component.\n\t */\n\tauditableItemStreamMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the federated catalogue component.\n\t */\n\tfederatedCatalogueMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the document management component.\n\t */\n\tdocumentManagementMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the logging component.\n\t */\n\tloggingMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the memory entity storage connector.\n\t */\n\tentityStorageMemoryMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the file entity storage connector.\n\t */\n\tentityStorageFileMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the rights management component.\n\t */\n\trightsManagementMutexTimeout?: string;\n\n\t/**\n\t * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.\n\t */\n\textensions?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IEngineEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEngineEnvironmentVariables.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The engine core environment variables.\n */\nexport interface IEngineEnvironmentVariables {\n\t/**\n\t * Start the engine in debug mode.\n\t */\n\tdebug?: string;\n\n\t/**\n\t * Start the engine in silent mode.\n\t */\n\tsilent?: string;\n\n\t/**\n\t * Controls how unrecognised TWIN_* environment variables are handled at startup.\n\t * \"error\" (default): throws a startup error, allowing CI and production deployments\n\t * to hard-fail on misconfigured or misspelled variable names.\n\t * \"warn\": logs a warning and continues.\n\t * \"ignore\": skips validation entirely.\n\t * Any other value is rejected at startup.\n\t * @default \"error\"\n\t */\n\tstrictEnv?: string;\n\n\t/**\n\t * Comma-separated list of raw environment variable names to exempt from the unknown-key check.\n\t * Use this to allowlist variables introduced by custom extensions that are not part of the\n\t * core interface, e.g. TWIN_MY_EXTENSION_SECRET.\n\t */\n\tenvAllowList?: string;\n\n\t/**\n\t * The root directory for storing items like state file.\n\t */\n\tstorageFileRoot?: string;\n\n\t/**\n\t * The name of the state file.\n\t */\n\tstateFilename?: string;\n\n\t/**\n\t * Is multi-tenant support enabled, defaults to false.\n\t */\n\ttenantEnabled?: string;\n\n\t/**\n\t * Enable schema migration, defaults to true.\n\t */\n\tschemaMigrationEnabled?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql\n\t */\n\tentityStorageConnectorType?: string;\n\n\t/**\n\t * The default entity storage connector to use, defaults to the first one in the list.\n\t */\n\tentityStorageConnectorDefault?: string;\n\n\t/**\n\t * A prefix for all the table in entity-storage, can be empty.\n\t */\n\tentityStorageTablePrefix?: string;\n\n\t/**\n\t * AWS DynamoDB auth mode, either credentials or pod.\n\t */\n\tawsDynamodbAuthMode?: string;\n\n\t/**\n\t * AWS Dynamo DB access key id.\n\t */\n\tawsDynamodbAccessKeyId?: string;\n\n\t/**\n\t * AWS Dynamo DB Endpoint if running local instance.\n\t */\n\tawsDynamodbEndpoint?: string;\n\n\t/**\n\t * AWS Dynamo DB region.\n\t */\n\tawsDynamodbRegion?: string;\n\n\t/**\n\t * AWS Dynamo DB secret access key.\n\t */\n\tawsDynamodbSecretAccessKey?: string;\n\n\t/**\n\t * AWS Dynamo DB connection timeout in milliseconds.\n\t */\n\tawsDynamodbConnectionTimeout?: string;\n\n\t/**\n\t * Azure Cosmos DB key.\n\t */\n\tazureCosmosdbKey?: string;\n\n\t/**\n\t * Azure Cosmos DB container id.\n\t */\n\tazureCosmosdbContainerId?: string;\n\n\t/**\n\t * Azure Cosmos DB database id.\n\t */\n\tazureCosmosdbDatabaseId?: string;\n\n\t/**\n\t * Azure Cosmos DB endpoint.\n\t */\n\tazureCosmosdbEndpoint?: string;\n\n\t/**\n\t * GCP Firestore collection name.\n\t */\n\tgcpFirestoreCollectionName?: string;\n\n\t/**\n\t * GCP Firestore credentials.\n\t */\n\tgcpFirestoreCredentials?: string;\n\n\t/**\n\t * GCP Firestore database id.\n\t */\n\tgcpFirestoreDatabaseId?: string;\n\n\t/**\n\t * GCP Firestore endpoint.\n\t */\n\tgcpFirestoreEndpoint?: string;\n\n\t/**\n\t * GCP Firestore project id.\n\t */\n\tgcpFirestoreProjectId?: string;\n\n\t/**\n\t * ScyllaDB hosts as comma separated string.\n\t */\n\tscylladbHosts?: string;\n\n\t/**\n\t * ScyllaDB keyspace.\n\t */\n\tscylladbKeyspace?: string;\n\n\t/**\n\t * ScyllaDB local data center.\n\t */\n\tscylladbLocalDataCenter?: string;\n\n\t/**\n\t * ScyllaDB port.\n\t */\n\tscylladbPort?: string;\n\n\t/**\n\t * MySQL host.\n\t */\n\tmySqlHost?: string;\n\n\t/**\n\t * MySQL port.\n\t */\n\tmySqlPort?: number;\n\n\t/**\n\t * MySQL username.\n\t */\n\tmySqlUser?: string;\n\n\t/**\n\t * MySQL password.\n\t */\n\tmySqlPassword?: string;\n\n\t/**\n\t * MySQL Database.\n\t */\n\tmySqlDatabase?: string;\n\n\t/**\n\t * MongoDB host.\n\t */\n\tmongoDbHost?: string;\n\n\t/**\n\t * MongoDB port.\n\t */\n\tmongoDbPort?: number;\n\n\t/**\n\t * MongoDB username.\n\t */\n\tmongoDbUser?: string;\n\n\t/**\n\t * MongoDB password.\n\t */\n\tmongoDbPassword?: string;\n\n\t/**\n\t * MongoDB Database.\n\t */\n\tmongoDbDatabase?: string;\n\n\t/**\n\t * PostgreSQl host.\n\t */\n\tpostgreSqlHost?: string;\n\n\t/**\n\t * PostgreSQl port.\n\t */\n\tpostgreSqlPort?: number;\n\n\t/**\n\t * PostgreSQl username.\n\t */\n\tpostgreSqlUser?: string;\n\n\t/**\n\t * PostgreSQl password.\n\t */\n\tpostgreSqlPassword?: string;\n\n\t/**\n\t * PostgreSQl Database.\n\t */\n\tpostgreSqlDatabase?: string;\n\n\t/**\n\t * The security token for accessing IPFS API.\n\t */\n\tipfsBearerToken?: string;\n\n\t/**\n\t * The url for accessing IPFS API.\n\t */\n\tipfsApiUrl?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.\n\t */\n\tblobStorageConnectorType?: string;\n\n\t/**\n\t * The default blob storage connector to use, defaults to the first one in the list.\n\t */\n\tblobStorageConnectorDefault?: string;\n\n\t/**\n\t * Enable encryption for the blob storage.\n\t */\n\tblobStorageEnableEncryption?: string;\n\n\t/**\n\t * The id of the encryption key for the blob storage.\n\t */\n\tblobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * A prefix for all the blobs in blob-storage, can be empty.\n\t */\n\tblobStoragePrefix?: string;\n\n\t/**\n\t * AWS S3 region.\n\t */\n\tawsS3Region?: string;\n\n\t/**\n\t * AWS S3 bucket name.\n\t */\n\tawsS3BucketName?: string;\n\n\t/**\n\t * AWS S3 auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsS3AuthMode?: string;\n\n\t/**\n\t * AWS S3 access key id.\n\t */\n\tawsS3AccessKeyId?: string;\n\n\t/**\n\t * AWS S3 secret access key.\n\t */\n\tawsS3SecretAccessKey?: string;\n\n\t/**\n\t * AWS S3 endpoint.\n\t */\n\tawsS3Endpoint?: string;\n\n\t/**\n\t * Azure Storage account key.\n\t */\n\tazureStorageAccountKey?: string;\n\n\t/**\n\t * Azure Storage account name.\n\t */\n\tazureStorageAccountName?: string;\n\n\t/**\n\t * Azure Storage container.\n\t */\n\tazureStorageContainerName?: string;\n\n\t/**\n\t * Azure Storage endpoint.\n\t */\n\tazureStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage bucket.\n\t */\n\tgcpStorageBucketName?: string;\n\n\t/**\n\t * GCP Storage credentials.\n\t */\n\tgcpStorageCredentials?: string;\n\n\t/**\n\t * GCP Storage endpoint.\n\t */\n\tgcpStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage project id.\n\t */\n\tgcpStorageProjectId?: string;\n\n\t/**\n\t * The type of the default vault connector: entity-storage, hashicorp.\n\t */\n\tvaultConnector?: string;\n\n\t/**\n\t * Prefix to prepend to entries in the vault.\n\t */\n\tvaultPrefix?: string;\n\n\t/**\n\t * Hashicorp Vault token.\n\t */\n\thashicorpVaultToken?: string;\n\n\t/**\n\t * Hashicorp Vault endpoint.\n\t */\n\thashicorpVaultEndpoint?: string;\n\n\t/**\n\t * The type of logging task connector, can be a comma separated list: console, entity-storage, otel, file.\n\t */\n\tloggingConnector?: string;\n\n\t/**\n\t * The batch size for the logging task, set to 1 for no batching.\n\t */\n\tloggingBatchSize?: string;\n\n\t/**\n\t * The batch flush interval in seconds for the logging task, how often to flush the logs when using batching, defaults to 5 seconds.\n\t */\n\tloggingBatchFlushInterval?: string;\n\n\t/**\n\t * Delete log entries older than this many minutes for the entity-storage logging connector.\n\t * Set to 0 to disable age-based retention.\n\t * @default 2880 (2 days)\n\t */\n\tloggingRetainFor?: string;\n\n\t/**\n\t * Keep at most this many log entries for the entity-storage logging connector.\n\t * Set to 0 to disable count-based retention.\n\t * @default 10000\n\t */\n\tloggingMaxEntries?: string;\n\n\t/**\n\t * How often the retention cleanup task runs in minutes for the entity-storage logging connector.\n\t * Set to 0 to disable periodic cleanup.\n\t * @default 5\n\t */\n\tloggingRetentionInterval?: string;\n\n\t/**\n\t * Maximum number of entries deleted per cleanup batch for the entity-storage logging connector.\n\t * Keeping this value smaller helps avoid spikes in database load.\n\t * @default 1000\n\t */\n\tloggingRetentionBatchSize?: string;\n\n\t/**\n\t * A list of components to exclude from logging, can be a comma separated list of component Class names e.g. \"ComponentA,ComponentB\".\n\t */\n\tloggingSilentComponents?: string;\n\n\t/**\n\t * The directory to write log files into when using the file logging connector. Required when TWIN_LOGGING_CONNECTOR includes \"file\".\n\t */\n\tloggingFileDirectory?: string;\n\n\t/**\n\t * The log filename when using the file logging connector, defaults to \"app.log\".\n\t */\n\tloggingFileFilename?: string;\n\n\t/**\n\t * The maximum log file size in bytes before rotation when using the file logging connector, defaults to 10485760 (10 MB). Set to 0 or negative to disable rotation.\n\t */\n\tloggingFileMaxFileSizeBytes?: string;\n\n\t/**\n\t * The number of rotated log files to retain when using the file logging connector, defaults to 5. Set to 0 or negative to keep all rotated files.\n\t */\n\tloggingFileMaxRetainedFiles?: string;\n\n\t/**\n\t * The name of the OpenTelemetry logger, only required if using open-telemetry as logging connector, defaults to twin-logging.\n\t */\n\topenTelemetryLoggingLoggerName?: string;\n\n\t/**\n\t * The version of the OpenTelemetry logger, only required if using open-telemetry as logging connector, defaults to 1.0.0.\n\t */\n\topenTelemetryLoggingLoggerVersion?: string;\n\n\t/**\n\t * The OTLP endpoint URL for the OpenTelemetry logging exporter, required when using open-telemetry as logging connector, e.g. http://localhost:4318/v1/logs.\n\t */\n\topenTelemetryLoggingPrometheusEndpoint?: string;\n\n\t/**\n\t * The log record processor to use for the OpenTelemetry logging exporter, either batch or simple, defaults to batch.\n\t */\n\topenTelemetryLoggingProcessor?: string;\n\n\t/**\n\t * The type of event bus connector: local.\n\t */\n\teventBusConnector?: string;\n\n\t/**\n\t * The type of event bus component: service.\n\t */\n\teventBusComponent?: string;\n\n\t/**\n\t * Are the messaging components enabled, defaults to false.\n\t */\n\tmessagingEnabled?: string;\n\n\t/**\n\t * AWS SES region.\n\t */\n\tawsSesRegion?: string;\n\n\t/**\n\t * AWS SES auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsSesAuthMode?: string;\n\n\t/**\n\t * AWS SES secret access key.\n\t */\n\tawsSesSecretAccessKey?: string;\n\n\t/**\n\t * AWS SES access key id.\n\t */\n\tawsSesAccessKeyId?: string;\n\n\t/**\n\t * AWS SES endpoint.\n\t */\n\tawsSesEndpoint?: string;\n\n\t/**\n\t * The applications for the push notifications reference a separate json with @json: prefix.\n\t */\n\tawsMessagingPushNotificationApplications?: string;\n\n\t/**\n\t * The type of messaging email connector: entity-storage, aws.\n\t */\n\tmessagingEmailConnector?: string;\n\n\t/**\n\t * The type of messaging sms connector: entity-storage, aws.\n\t */\n\tmessagingSmsConnector?: string;\n\n\t/**\n\t * The type of messaging push notification connector: entity-storage, aws.\n\t */\n\tmessagingPushNotificationConnector?: string;\n\n\t/**\n\t * The type of telemetry connector: entity-storage.\n\t */\n\ttelemetryConnector?: string;\n\n\t/**\n\t * The name of the Open Telemetry meter to use, only required if using open-telemetry as telemetry connector, defaults to twin-node.\n\t */\n\topenTelemetryMeterName?: string;\n\n\t/**\n\t * The version of the Open Telemetry metrics specification to use, only required if using open-telemetry as telemetry connector, defaults to 1.0.0.\n\t */\n\topenTelemetryMeterVersion?: string;\n\n\t/**\n\t * The type of Open Telemetry metric reader to use, only required if using open-telemetry as telemetry connector, values: prometheus.\n\t */\n\topenTelemetryReader?: string;\n\n\t/**\n\t * The port to use for the Open Telemetry Prometheus metrics server, only required if using open-telemetry as telemetry connector and prometheus as reader, defaults to 9464.\n\t */\n\topenTelemetryPrometheusPort?: string;\n\n\t/**\n\t * Polling interval in seconds for the telemetry metrics collector. Defaults to 60.\n\t */\n\ttelemetryMetricsCollectorInterval?: string;\n\n\t/**\n\t * The type of telemetry metrics producers, can be a comma separated list: system, process.\n\t */\n\ttelemetryMetricsProducers?: string;\n\n\t/**\n\t * Maximum number of values retained per telemetry metric (count-based history cap). Defaults to 1440.\n\t */\n\ttelemetryMetricsProducerMaxHistory?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the telemetry connector.\n\t */\n\ttelemetryMutexTimeout?: string;\n\n\t/**\n\t * The type of faucet connector: entity-storage, iota.\n\t */\n\tfaucetConnector?: string;\n\n\t/**\n\t * The type of wallet connector: entity-storage, iota.\n\t */\n\twalletConnector?: string;\n\n\t/**\n\t * The type of NFT connector: entity-storage, iota.\n\t */\n\tnftConnector?: string;\n\n\t/**\n\t * The NFT deployed package id, for custom deployments.\n\t */\n\tnftPackageId?: string;\n\n\t/**\n\t * The type of notarization connector: entity-storage, iota.\n\t */\n\tnotarizationConnector?: string;\n\n\t/**\n\t * The type of identity connector: entity-storage, iota.\n\t */\n\tidentityConnector?: string;\n\n\t/**\n\t * The index of the wallet address to use, defaults to 0.\n\t */\n\tidentityWalletAddressIndex?: string;\n\n\t/**\n\t * The TTL in milliseconds for caching resolved DIDs when using the IOTA identity connector. Omit to use the connector default.\n\t */\n\tidentityDidResolutionCacheTtlMs?: string;\n\n\t/**\n\t * The type of identity resolver connector: entity-storage, iota.\n\t */\n\tidentityResolverConnector?: string;\n\n\t/**\n\t * IOTA Faucet Endpoint.\n\t */\n\tiotaFaucetEndpoint?: string;\n\n\t/**\n\t * IOTA Node Endpoint.\n\t */\n\tiotaNodeEndpoint?: string;\n\n\t/**\n\t * IOTA network.\n\t */\n\tiotaNetwork?: string;\n\n\t/**\n\t * IOTA coin type.\n\t */\n\tiotaCoinType?: string;\n\n\t/**\n\t * IOTA gas budget, in nanos.\n\t */\n\tiotaGasBudget?: string;\n\n\t/**\n\t * IOTA gas reservation duration, in seconds.\n\t */\n\tiotaGasReservationDuration?: string;\n\n\t/**\n\t * IOTA Explorer Endpoint.\n\t */\n\tiotaExplorerEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Endpoint.\n\t */\n\tiotaGasStationEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Authentication Token.\n\t */\n\tiotaGasStationAuthToken?: string;\n\n\t/**\n\t * The IOTA Identity deployed package id, for custom deployments.\n\t */\n\tiotaIdentityPackageId?: string;\n\n\t/**\n\t * Universal Resolver Endpoint.\n\t */\n\tuniversalResolverEndpoint?: string;\n\n\t/**\n\t * The type of identity profile connector: entity-storage.\n\t */\n\tidentityProfileConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with immutable proofs.\n\t */\n\timmutableProofVerificationMethodId?: string;\n\n\t/**\n\t * The number of times to retry a proof task when it fails, 0 to disable retries.\n\t * @default 5\n\t */\n\timmutableProofTaskRetryCount?: number;\n\n\t/**\n\t * The interval in seconds to wait between proof task retries.\n\t * @default 5\n\t */\n\timmutableProofTaskRetryInterval?: number;\n\n\t/**\n\t * The time in minutes to retain the record of a failed proof task.\n\t * Set to -1 to retain failures forever.\n\t * @default 10080\n\t */\n\timmutableProofTaskFailureRetainFor?: number;\n\n\t/**\n\t * The type of attestation connector: entity-storage, iota.\n\t */\n\tattestationConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with attestation.\n\t */\n\tattestationVerificationMethodId?: string;\n\n\t/**\n\t * Is the data processing enabled, defaults to false.\n\t */\n\tdataProcessingEnabled?: string;\n\n\t/**\n\t * The type of the default data converters, can be a comma separated list: json, xml.\n\t */\n\tdataConverterConnectors?: string;\n\n\t/**\n\t * The type of the default data extractor, can be a comma separated list: json-path.\n\t */\n\tdataExtractorConnectors?: string;\n\n\t/**\n\t * Enable the task scheduler regardless of which other components are active, defaults to false.\n\t */\n\ttaskSchedulerEnabled?: string;\n\n\t/**\n\t * Is the auditable item graph enabled, defaults to false.\n\t */\n\tauditableItemGraphEnabled?: string;\n\n\t/**\n\t * Is the auditable item stream enabled, defaults to false.\n\t */\n\tauditableItemStreamEnabled?: string;\n\n\t/**\n\t * Is the document management enabled, defaults to false.\n\t */\n\tdocumentManagementEnabled?: string;\n\n\t/**\n\t * Enable the federated catalogue, defaults to false, automatically enabled if remote endpoint, filters or dataspace is enabled.\n\t */\n\tfederatedCatalogueEnabled?: string;\n\n\t/**\n\t * Federated catalog filters, command separated list of filters to add.\n\t */\n\tfederatedCatalogueFilters?: string;\n\n\t/**\n\t * Federated catalog remote endpoint, if set will use a REST client instead of local service.\n\t */\n\tfederatedCatalogueRemoteEndpoint?: string;\n\n\t/**\n\t * The path prefix used by the federated catalogue REST client when forwarding requests to the remote endpoint, defaults to \"federated-catalogue\".\n\t */\n\tfederatedCatalogueRestClientPathPrefix?: string;\n\n\t/**\n\t * The trust generators to add to the factory, comma separated list.\n\t */\n\ttrustGenerators?: string;\n\n\t/**\n\t * The trust verifiers to add to the factory, comma separated list.\n\t */\n\ttrustVerifiers?: string;\n\n\t/**\n\t * The verification method to use for trust identities.\n\t * Defaults to trust-assertion.\n\t */\n\ttrustVerificationMethodId?: string;\n\n\t/**\n\t * The trust time to live for generating JWTs in seconds.\n\t * Defaults to undefined for never expiring.\n\t */\n\ttrustJwtTtl?: string;\n\n\t/**\n\t * The allow lists for the trust identity verifier, comma separated list of identities.\n\t */\n\ttrustIdentitiesAllow?: string;\n\n\t/**\n\t * The deny lists for the trust identity verifier, comma separated list of identities.\n\t */\n\ttrustIdentitiesDeny?: string;\n\n\t/**\n\t * Path under which the rights management service is mounted (single source\n\t * of truth). The same value drives:\n\t * - the server route mount (via engine config)\n\t * - the PNP service's callback URL builder (`buildCallbackUrl`)\n\t * - the PNP rest-client's pathPrefix (consumer side)\n\t * Defaults to `rights-management`. Set when deploying behind a reverse proxy\n\t * with path rewriting, K8s ingress with path-based routing, or any custom\n\t * mount point.\n\t */\n\trightsManagementCallbackPath?: string;\n\n\t/**\n\t * The rights management policy information sources to add to the factory.\n\t */\n\trightsManagementPolicyInformationSources?: string;\n\n\t/**\n\t * The rights management policy negotiators sources to add to the factory.\n\t */\n\trightsManagementPolicyNegotiators?: string;\n\n\t/**\n\t * The rights management policy requesters to add to the factory.\n\t */\n\trightsManagementPolicyRequesters?: string;\n\n\t/**\n\t * The rights management policy execution actions to add to the factory.\n\t */\n\trightsManagementPolicyExecutionActions?: string;\n\n\t/**\n\t * The rights management policy enforcement processors to add to the factory.\n\t */\n\trightsManagementPolicyEnforcementProcessors?: string;\n\n\t/**\n\t * The rights management policy arbiters to add to the factory.\n\t */\n\trightsManagementPolicyArbiters?: string;\n\n\t/**\n\t * The rights management policy obligation enforcers to add to the factory.\n\t */\n\trightsManagementPolicyObligationEnforcers?: string;\n\n\t/**\n\t * Is the dataspace enabled, defaults to false.\n\t */\n\tdataspaceEnabled?: string;\n\n\t/**\n\t * The length of time to retain the activity logs for in seconds, set to -1 to keep forever.\n\t * @default 600\n\t */\n\tdataspaceRetainActivityLogsFor?: string;\n\n\t/**\n\t * The interval in seconds for cleaning up the activity logs.\n\t * @default 3600\n\t */\n\tdataspaceActivityLogsCleanupInterval?: string;\n\n\t/**\n\t * Base route path for the data plane service (path only, not full URL).\n\t * Combined with the public origin to form the `dataAddress.endpoint` sent to PULL consumers\n\t * and the inbox URL sent to PUSH providers.\n\t *\n\t * This must be the mount-point prefix of the data plane routes, NOT a specific route path.\n\t * Do NOT append sub-paths such as `/entities` or `/inbox` — those are appended automatically\n\t * by each transfer handler and by the data plane REST client.\n\t *\n\t * REQUIRED if PULL or PUSH transfers are supported.\n\t * If not specified, PULL and PUSH transfers will not be available.\n\t *\n\t * Example: \"dataspace\"\n\t */\n\tdataspaceDataPlanePath?: string;\n\n\t/**\n\t * Whether the provider immediately starts a transfer once it has been requested.\n\t * When false the transfer stays in REQUESTED until the provider explicitly calls transferStarted.\n\t * @default false\n\t */\n\tdataspaceAutoStartTransfers?: string;\n\n\t/**\n\t * How long in seconds a negotiation may sit without progress before it is treated as timed out.\n\t * @default 30\n\t */\n\tdataspaceStalledNegotiationTimeout?: string;\n\n\t/**\n\t * How long in seconds a consumer-initiated transfer may sit in REQUESTED without the provider\n\t * progressing it before it is treated as timed out.\n\t * @default 30\n\t */\n\tdataspaceStalledTransferTimeout?: string;\n\n\t/**\n\t * Path under which the dataspace control plane is mounted (path only, not full URL).\n\t * This must match the control-plane REST mount, as it is combined with the public\n\t * origin to build the consumer's advertised callback address.\n\t * @default \"dataspace-control-plane\"\n\t */\n\tdataspaceCallbackPath?: string;\n\n\t/**\n\t * Are the health components enabled, defaults to false.\n\t */\n\thealthEnabled?: string;\n\n\t/**\n\t * The interval in seconds for performing health checks, defaults to 60.\n\t */\n\thealthInterval?: string;\n\n\t/**\n\t * The interval in seconds for performing health checks at startup, defaults to 2.\n\t * This allows components that take a long time to initialize to be healthy before the first health check is performed.\n\t */\n\thealthStartupInterval?: string;\n\n\t/**\n\t * The type of the automation action to create, comma separate for more than one connector.\n\t * values: fetch\n\t */\n\tautomationActionTypes?: string;\n\n\t/**\n\t * The default mutex timeout in milliseconds, used when no component-specific timeout is set, defaults to 5000 if omitted.\n\t */\n\tmutexTimeoutMsDefault?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the auditable item graph component.\n\t */\n\tauditableItemGraphMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the auditable item stream component.\n\t */\n\tauditableItemStreamMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the federated catalogue component.\n\t */\n\tfederatedCatalogueMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the document management component.\n\t */\n\tdocumentManagementMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the logging component.\n\t */\n\tloggingMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the memory entity storage connector.\n\t */\n\tentityStorageMemoryMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the file entity storage connector.\n\t */\n\tentityStorageFileMutexTimeout?: string;\n\n\t/**\n\t * The mutex timeout in milliseconds for the rights management component.\n\t */\n\trightsManagementMutexTimeout?: string;\n\n\t/**\n\t * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.\n\t */\n\textensions?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEnvironmentVariables.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"IEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEnvironmentVariables.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBootstrapDevEnvironmentVariables } from \"./IBootstrapDevEnvironmentVariables.js\";\nimport type { IEngineEnvironmentVariables } from \"./IEngineEnvironmentVariables.js\";\nimport type { IEngineServerEnvironmentVariables } from \"./IEngineServerEnvironmentVariables.js\";\nimport type { INodeEnvironmentVariables } from \"./INodeEnvironmentVariables.js\";\n\n/**\n * The environment variables.\n */\nexport type IEnvironmentVariables = IBootstrapDevEnvironmentVariables &\n\tINodeEnvironmentVariables &\n\tIEngineEnvironmentVariables &\n\tIEngineServerEnvironmentVariables;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Mapped type exhaustiveness check: TypeScript requires every key of
|
|
2
|
-
// Required<
|
|
2
|
+
// Required<IBootstrapDevEnvironmentVariables> to appear here with value `true`.
|
|
3
3
|
// Removing a key → compile error ("Property X is missing").
|
|
4
4
|
// Adding an invented key → compile error ("Object literal may only specify known properties").
|
|
5
|
-
const
|
|
6
|
-
//
|
|
5
|
+
const bootstrapDevEnvironmentVariableKeysInternal = {
|
|
6
|
+
// IBootstrapDevEnvironmentVariables
|
|
7
7
|
features: true,
|
|
8
8
|
nodeIdentity: true,
|
|
9
9
|
nodeMnemonic: true,
|
|
@@ -18,7 +18,7 @@ const bootstrapLegacyEnvironmentVariableKeysInternal = {
|
|
|
18
18
|
adminUserScope: true
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* The set of camelCase property names that are valid
|
|
21
|
+
* The set of camelCase property names that are valid IBootstrapDevEnvironmentVariables keys.
|
|
22
22
|
*/
|
|
23
|
-
export const
|
|
24
|
-
//# sourceMappingURL=
|
|
23
|
+
export const BOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS = new Set(Object.keys(bootstrapDevEnvironmentVariableKeysInternal));
|
|
24
|
+
//# sourceMappingURL=bootstrapDevEnvironmentVariableKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrapDevEnvironmentVariableKeys.js","sourceRoot":"","sources":["../../../src/models/bootstrapDevEnvironmentVariableKeys.ts"],"names":[],"mappings":"AAIA,qEAAqE;AACrE,gFAAgF;AAChF,4DAA4D;AAC5D,+FAA+F;AAC/F,MAAM,2CAA2C,GAE7C;IACH,oCAAoC;IACpC,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,oBAAoB,EAAE,IAAI;IAC1B,oBAAoB,EAAE,IAAI;IAC1B,iBAAiB,EAAE,IAAI;IACvB,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;IACnB,iBAAiB,EAAE,IAAI;IACvB,cAAc,EAAE,IAAI;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAwB,IAAI,GAAG,CAClF,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CACxD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBootstrapDevEnvironmentVariables } from \"./IBootstrapDevEnvironmentVariables.js\";\n\n// Mapped type exhaustiveness check: TypeScript requires every key of\n// Required<IBootstrapDevEnvironmentVariables> to appear here with value `true`.\n// Removing a key → compile error (\"Property X is missing\").\n// Adding an invented key → compile error (\"Object literal may only specify known properties\").\nconst bootstrapDevEnvironmentVariableKeysInternal: {\n\t[K in keyof Required<IBootstrapDevEnvironmentVariables>]: true;\n} = {\n\t// IBootstrapDevEnvironmentVariables\n\tfeatures: true,\n\tnodeIdentity: true,\n\tnodeMnemonic: true,\n\ttenantId: true,\n\ttenantApiKey: true,\n\torganizationIdentity: true,\n\torganizationMnemonic: true,\n\tadminUserIdentity: true,\n\tadminUserMnemonic: true,\n\tadminUserName: true,\n\tadminUserPassword: true,\n\tadminUserScope: true\n};\n\n/**\n * The set of camelCase property names that are valid IBootstrapDevEnvironmentVariables keys.\n */\nexport const BOOTSTRAP_DEV_ENVIRONMENT_VARIABLE_KEYS: ReadonlySet<string> = new Set(\n\tObject.keys(bootstrapDevEnvironmentVariableKeysInternal)\n);\n"]}
|
|
@@ -134,6 +134,7 @@ const engineEnvironmentVariableKeysInternal = {
|
|
|
134
134
|
telemetryMetricsCollectorInterval: true,
|
|
135
135
|
telemetryMetricsProducers: true,
|
|
136
136
|
telemetryMetricsProducerMaxHistory: true,
|
|
137
|
+
telemetryMutexTimeout: true,
|
|
137
138
|
// DLT / identity
|
|
138
139
|
faucetConnector: true,
|
|
139
140
|
walletConnector: true,
|