@twin.org/node-core 0.9.1-next.3 → 0.9.1-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/es/cli.js +41 -12
  2. package/dist/es/cli.js.map +1 -1
  3. package/dist/es/commands/help.js +4 -0
  4. package/dist/es/commands/help.js.map +1 -1
  5. package/dist/es/commands/identityCreate.js +3 -3
  6. package/dist/es/commands/identityCreate.js.map +1 -1
  7. package/dist/es/commands/identityList.js +65 -0
  8. package/dist/es/commands/identityList.js.map +1 -0
  9. package/dist/es/commands/identityResolve.js +83 -0
  10. package/dist/es/commands/identityResolve.js.map +1 -0
  11. package/dist/es/commands/nodeIdentityGet.js +68 -0
  12. package/dist/es/commands/nodeIdentityGet.js.map +1 -0
  13. package/dist/es/commands/{nodeSetIdentity.js → nodeIdentitySet.js} +16 -15
  14. package/dist/es/commands/nodeIdentitySet.js.map +1 -0
  15. package/dist/es/commands/nodeOrgIdGet.js +54 -0
  16. package/dist/es/commands/nodeOrgIdGet.js.map +1 -0
  17. package/dist/es/commands/{setNodeOrgId.js → nodeOrgIdSet.js} +14 -13
  18. package/dist/es/commands/nodeOrgIdSet.js.map +1 -0
  19. package/dist/es/commands/orgUsersList.js +94 -0
  20. package/dist/es/commands/orgUsersList.js.map +1 -0
  21. package/dist/es/commands/tenantGet.js +68 -0
  22. package/dist/es/commands/tenantGet.js.map +1 -0
  23. package/dist/es/commands/tenantList.js +69 -0
  24. package/dist/es/commands/tenantList.js.map +1 -0
  25. package/dist/es/commands/tenantListByOrg.js +80 -0
  26. package/dist/es/commands/tenantListByOrg.js.map +1 -0
  27. package/dist/es/commands/{setTenantOrgId.js → tenantOrgIdSet.js} +16 -15
  28. package/dist/es/commands/tenantOrgIdSet.js.map +1 -0
  29. package/dist/es/commands/userGet.js +77 -0
  30. package/dist/es/commands/userGet.js.map +1 -0
  31. package/dist/es/models/ICliCommandDefinition.js.map +1 -1
  32. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  33. package/dist/es/node.js +1 -1
  34. package/dist/es/node.js.map +1 -1
  35. package/dist/types/commands/identityList.d.ts +17 -0
  36. package/dist/types/commands/identityResolve.d.ts +22 -0
  37. package/dist/types/commands/nodeIdentityGet.d.ts +20 -0
  38. package/dist/types/commands/{nodeSetIdentity.d.ts → nodeIdentitySet.d.ts} +2 -2
  39. package/dist/types/commands/nodeOrgIdGet.d.ts +19 -0
  40. package/dist/types/commands/{setNodeOrgId.d.ts → nodeOrgIdSet.d.ts} +2 -2
  41. package/dist/types/commands/orgUsersList.d.ts +27 -0
  42. package/dist/types/commands/tenantGet.d.ts +22 -0
  43. package/dist/types/commands/tenantList.d.ts +22 -0
  44. package/dist/types/commands/tenantListByOrg.d.ts +22 -0
  45. package/dist/types/commands/{setTenantOrgId.d.ts → tenantOrgIdSet.d.ts} +2 -2
  46. package/dist/types/commands/userGet.d.ts +24 -0
  47. package/dist/types/models/ICliCommandDefinition.d.ts +4 -0
  48. package/dist/types/models/IEngineEnvironmentVariables.d.ts +12 -4
  49. package/docs/changelog.md +14 -0
  50. package/docs/reference/interfaces/ICliCommandDefinition.md +8 -0
  51. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +12 -4
  52. package/locales/en.json +225 -13
  53. package/package.json +1 -1
  54. package/dist/es/commands/nodeSetIdentity.js.map +0 -1
  55. package/dist/es/commands/setNodeOrgId.js.map +0 -1
  56. package/dist/es/commands/setTenantOrgId.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenantList.js","sourceRoot":"","sources":["../../../src/commands/tenantList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAK1E,MAAM,YAAY,GAAG,aAAa,CAAC;AAEnC;;;GAGG;AACH,MAAM,UAAU,8B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A Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ITenantAdminComponent } from \"@twin.org/api-models\";\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ComponentFactory, GeneralError, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"../models/IEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"tenant-list\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionTenantList(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.tenant-list.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.tenant-list.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.tenant-list.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.tenant-list.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) => tenantList(engineCore, envVars)\n\t};\n}\n\n/**\n * Command for listing all tenants.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @returns The list of tenants.\n */\nexport async function tenantList(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables\n): Promise<{ id: string; apiKey: string; organizationId: string; label: string }[]> {\n\tconst type = engineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\n\tif (!Is.stringValue(type)) {\n\t\tthrow new GeneralError(\"tenantList\", \"tenantAdminComponentNotRegistered\");\n\t}\n\n\tconst tenantAdminComponent = ComponentFactory.get<ITenantAdminComponent>(type);\n\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.tenant-list.labels.listing\"));\n\n\tconst result: { id: string; apiKey: string; organizationId: string; label: string }[] = [];\n\tlet cursor: string | undefined;\n\n\tdo {\n\t\tconst page = await tenantAdminComponent.query(undefined, undefined, cursor);\n\t\tfor (const tenant of page.tenants) {\n\t\t\tresult.push({\n\t\t\t\tid: tenant.id,\n\t\t\t\tapiKey: tenant.apiKey,\n\t\t\t\torganizationId: tenant.organizationId ?? \"\",\n\t\t\t\tlabel: tenant.label ?? \"\"\n\t\t\t});\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list.labels.tenantId\"),\n\t\t\t\ttenant.id\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list.labels.apiKey\"),\n\t\t\t\ttenant.apiKey,\n\t\t\t\t1\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list.labels.organizationId\"),\n\t\t\t\ttenant.organizationId ?? \"\",\n\t\t\t\t1\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list.labels.label\"),\n\t\t\t\ttenant.label ?? \"\",\n\t\t\t\t1\n\t\t\t);\n\t\t}\n\t\tcursor = page.cursor;\n\t} while (Is.stringValue(cursor));\n\n\tCLIDisplay.break();\n\tCLIDisplay.value(\n\t\tI18n.formatMessage(\"node.cli.commands.tenant-list.labels.count\"),\n\t\tresult.length.toString()\n\t);\n\n\tCLIDisplay.done();\n\n\treturn result;\n}\n"]}
@@ -0,0 +1,80 @@
1
+ import { CLIDisplay } from "@twin.org/cli-core";
2
+ import { ComponentFactory, GeneralError, I18n, Is } from "@twin.org/core";
3
+ import { ComparisonOperator } from "@twin.org/entity";
4
+ import { Did } from "@twin.org/identity-models";
5
+ const COMMAND_NAME = "tenant-list-by-org";
6
+ /**
7
+ * Get the command definition parameters.
8
+ * @param commandDefinitions The registered command definitions.
9
+ */
10
+ export function getCommandDefinitionTenantListByOrg(commandDefinitions) {
11
+ commandDefinitions[COMMAND_NAME] = {
12
+ command: COMMAND_NAME,
13
+ description: I18n.formatMessage("node.cli.commands.tenant-list-by-org.description"),
14
+ example: I18n.formatMessage("node.cli.commands.tenant-list-by-org.example"),
15
+ requiresNodeIdentity: false,
16
+ requiresOrgIdentity: false,
17
+ params: [
18
+ {
19
+ key: "env-prefix",
20
+ type: "string",
21
+ description: I18n.formatMessage("node.cli.commands.tenant-list-by-org.params.env-prefix.description"),
22
+ required: false
23
+ },
24
+ {
25
+ key: "org-id",
26
+ type: "string",
27
+ extendedType: "did",
28
+ description: I18n.formatMessage("node.cli.commands.tenant-list-by-org.params.org-id.description"),
29
+ required: true
30
+ },
31
+ {
32
+ key: "load-env",
33
+ type: "string",
34
+ description: I18n.formatMessage("node.cli.commands.tenant-list-by-org.params.load-env.description"),
35
+ required: false
36
+ }
37
+ ],
38
+ action: async (engineCore, envVars, params) => tenantListByOrg(engineCore, envVars, params)
39
+ };
40
+ }
41
+ /**
42
+ * Command for listing all tenants associated with an organization DID.
43
+ * @param engineCore The engine core.
44
+ * @param envVars The environment variables for the node.
45
+ * @param params The parameters for the command.
46
+ * @param params.orgId The organization DID to filter by.
47
+ * @returns The matching tenants.
48
+ */
49
+ export async function tenantListByOrg(engineCore, envVars, params) {
50
+ Did.guard("tenantListByOrg", "org-id", params.orgId);
51
+ const type = engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent");
52
+ if (!Is.stringValue(type)) {
53
+ throw new GeneralError("tenantListByOrg", "tenantAdminComponentNotRegistered");
54
+ }
55
+ const tenantAdminComponent = ComponentFactory.get(type);
56
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.listing"));
57
+ const result = [];
58
+ let cursor;
59
+ do {
60
+ const page = await tenantAdminComponent.query({
61
+ property: "organizationId",
62
+ value: params.orgId,
63
+ comparison: ComparisonOperator.Equals
64
+ }, undefined, cursor);
65
+ for (const tenant of page.tenants) {
66
+ result.push(tenant);
67
+ CLIDisplay.break();
68
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.tenantId"), tenant.id);
69
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.apiKey"), tenant.apiKey, 1);
70
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.organizationId"), tenant.organizationId ?? "", 1);
71
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.label"), tenant.label ?? "", 1);
72
+ }
73
+ cursor = page.cursor;
74
+ } while (Is.stringValue(cursor));
75
+ CLIDisplay.break();
76
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.tenant-list-by-org.labels.count"), result.length.toString());
77
+ CLIDisplay.done();
78
+ return result;
79
+ }
80
+ //# sourceMappingURL=tenantListByOrg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenantListByOrg.js","sourceRoot":"","sources":["../../../src/commands/tenantListByOrg.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CAAC,kBAEnD;I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AK,CACf,IAAI,CAAC,aAAa,CAAC,mDAAmD,CAAC,EACvE,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CACxB,CAAC;IAEF,UAAU,CAAC,IAAI,EAAE,CAAC;IAElB,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ITenantAdminComponent, ITenant } from \"@twin.org/api-models\";\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ComponentFactory, GeneralError, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport { ComparisonOperator } from \"@twin.org/entity\";\nimport { Did } from \"@twin.org/identity-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"../models/IEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"tenant-list-by-org\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionTenantListByOrg(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.tenant-list-by-org.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.tenant-list-by-org.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.tenant-list-by-org.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: \"org-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\textendedType: \"did\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.tenant-list-by-org.params.org-id.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\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.tenant-list-by-org.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) => tenantListByOrg(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for listing all tenants associated with an organization DID.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @param params.orgId The organization DID to filter by.\n * @returns The matching tenants.\n */\nexport async function tenantListByOrg(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables,\n\tparams: {\n\t\torgId?: string;\n\t}\n): Promise<ITenant[]> {\n\tDid.guard(\"tenantListByOrg\", \"org-id\", params.orgId);\n\n\tconst type = engineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\n\tif (!Is.stringValue(type)) {\n\t\tthrow new GeneralError(\"tenantListByOrg\", \"tenantAdminComponentNotRegistered\");\n\t}\n\n\tconst tenantAdminComponent = ComponentFactory.get<ITenantAdminComponent>(type);\n\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.listing\"));\n\n\tconst result: ITenant[] = [];\n\tlet cursor: string | undefined;\n\n\tdo {\n\t\tconst page = await tenantAdminComponent.query(\n\t\t\t{\n\t\t\t\tproperty: \"organizationId\",\n\t\t\t\tvalue: params.orgId,\n\t\t\t\tcomparison: ComparisonOperator.Equals\n\t\t\t},\n\t\t\tundefined,\n\t\t\tcursor\n\t\t);\n\t\tfor (const tenant of page.tenants) {\n\t\t\tresult.push(tenant);\n\t\t\tCLIDisplay.break();\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.tenantId\"),\n\t\t\t\ttenant.id\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.apiKey\"),\n\t\t\t\ttenant.apiKey,\n\t\t\t\t1\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.organizationId\"),\n\t\t\t\ttenant.organizationId ?? \"\",\n\t\t\t\t1\n\t\t\t);\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.label\"),\n\t\t\t\ttenant.label ?? \"\",\n\t\t\t\t1\n\t\t\t);\n\t\t}\n\t\tcursor = page.cursor;\n\t} while (Is.stringValue(cursor));\n\n\tCLIDisplay.break();\n\tCLIDisplay.value(\n\t\tI18n.formatMessage(\"node.cli.commands.tenant-list-by-org.labels.count\"),\n\t\tresult.length.toString()\n\t);\n\n\tCLIDisplay.done();\n\n\treturn result;\n}\n"]}
@@ -1,47 +1,48 @@
1
1
  import { CLIDisplay } from "@twin.org/cli-core";
2
2
  import { ComponentFactory, GeneralError, Guards, I18n, Is } from "@twin.org/core";
3
3
  import { Did } from "@twin.org/identity-models";
4
- const COMMAND_NAME = "set-tenant-org-id";
4
+ const COMMAND_NAME = "tenant-org-id-set";
5
5
  /**
6
6
  * Get the command definition parameters.
7
7
  * @param commandDefinitions The registered command definitions.
8
8
  */
9
- export function getCommandDefinitionSetTenantOrgId(commandDefinitions) {
9
+ export function getCommandDefinitionTenantOrgIdSet(commandDefinitions) {
10
10
  commandDefinitions[COMMAND_NAME] = {
11
11
  command: COMMAND_NAME,
12
- description: I18n.formatMessage("node.cli.commands.set-tenant-org-id.description"),
13
- example: I18n.formatMessage("node.cli.commands.set-tenant-org-id.example"),
12
+ aliases: ["set-tenant-org-id"],
13
+ description: I18n.formatMessage("node.cli.commands.tenant-org-id-set.description"),
14
+ example: I18n.formatMessage("node.cli.commands.tenant-org-id-set.example"),
14
15
  requiresNodeIdentity: false,
15
16
  requiresOrgIdentity: false,
16
17
  params: [
17
18
  {
18
19
  key: "env-prefix",
19
20
  type: "string",
20
- description: I18n.formatMessage("node.cli.commands.set-tenant-org-id.params.env-prefix.description"),
21
+ description: I18n.formatMessage("node.cli.commands.tenant-org-id-set.params.env-prefix.description"),
21
22
  required: false
22
23
  },
23
24
  {
24
25
  key: "tenant-id",
25
26
  type: "string",
26
27
  extendedType: "hex(32)",
27
- description: I18n.formatMessage("node.cli.commands.set-tenant-org-id.params.tenant-id.description"),
28
+ description: I18n.formatMessage("node.cli.commands.tenant-org-id-set.params.tenant-id.description"),
28
29
  required: true
29
30
  },
30
31
  {
31
32
  key: "organization-id",
32
33
  type: "string",
33
34
  extendedType: "did",
34
- description: I18n.formatMessage("node.cli.commands.set-tenant-org-id.params.organization-id.description"),
35
+ description: I18n.formatMessage("node.cli.commands.tenant-org-id-set.params.organization-id.description"),
35
36
  required: true
36
37
  },
37
38
  {
38
39
  key: "load-env",
39
40
  type: "string",
40
- description: I18n.formatMessage("node.cli.commands.set-tenant-org-id.params.load-env.description"),
41
+ description: I18n.formatMessage("node.cli.commands.tenant-org-id-set.params.load-env.description"),
41
42
  required: false
42
43
  }
43
44
  ],
44
- action: async (engineCore, envVars, params) => setTenantOrgId(engineCore, envVars, params)
45
+ action: async (engineCore, envVars, params) => tenantOrgIdSet(engineCore, envVars, params)
45
46
  };
46
47
  }
47
48
  /**
@@ -53,14 +54,14 @@ export function getCommandDefinitionSetTenantOrgId(commandDefinitions) {
53
54
  * @param params.organizationId The organization ID to set.
54
55
  * @returns A promise that resolves when the tenant organization ID has been stored.
55
56
  */
56
- export async function setTenantOrgId(engineCore, envVars, params) {
57
- Guards.stringHexLength("setTenantOrgId", "tenant-id", params.tenantId, 32);
58
- Did.guard("setTenantOrgId", "organizationId", params.organizationId);
59
- CLIDisplay.task(I18n.formatMessage("node.cli.commands.set-tenant-org-id.labels.updating"));
57
+ export async function tenantOrgIdSet(engineCore, envVars, params) {
58
+ Guards.stringHexLength("tenantOrgIdSet", "tenant-id", params.tenantId, 32);
59
+ Did.guard("tenantOrgIdSet", "organizationId", params.organizationId);
60
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.tenant-org-id-set.labels.updating"));
60
61
  CLIDisplay.spinnerStart();
61
62
  await applyOrganizationIdToTenant(engineCore, params.tenantId, params.organizationId);
62
63
  CLIDisplay.spinnerStop();
63
- CLIDisplay.task(I18n.formatMessage("node.cli.commands.set-tenant-org-id.labels.stored"));
64
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.tenant-org-id-set.labels.stored"));
64
65
  CLIDisplay.done();
65
66
  }
66
67
  /**
@@ -96,4 +97,4 @@ export async function applyOrganizationIdToTenant(engineCore, tenantId, newOrgan
96
97
  CLIDisplay.done();
97
98
  }
98
99
  }
99
- //# sourceMappingURL=setTenantOrgId.js.map
100
+ //# sourceMappingURL=tenantOrgIdSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenantOrgIdSet.js","sourceRoot":"","sources":["../../../src/commands/tenantOrgIdSet.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,kBAElD;IACA,kBAAkB,CAAC,YAAY,CAAC,GAAG;QAClC,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,CAAC,mBAAmB,CAAC;QAC9B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,iDAAiD,CAAC;QAClF,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,6CAA6C,CAAC;QAC1E,oBAAoB,EAAE,KAAK;QAC3B,mBAAmB,EAAE,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stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ITenantAdminComponent } from \"@twin.org/api-models\";\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ComponentFactory, GeneralError, Guards, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport { Did } from \"@twin.org/identity-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"../models/IEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"tenant-org-id-set\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionTenantOrgIdSet(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\taliases: [\"set-tenant-org-id\"],\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.tenant-org-id-set.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.tenant-org-id-set.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.tenant-org-id-set.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: \"tenant-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\textendedType: \"hex(32)\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.tenant-org-id-set.params.tenant-id.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"organization-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\textendedType: \"did\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.tenant-org-id-set.params.organization-id.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\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.tenant-org-id-set.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) => tenantOrgIdSet(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for setting the organization ID on a tenant.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @param params.tenantId The tenant ID to update.\n * @param params.organizationId The organization ID to set.\n * @returns A promise that resolves when the tenant organization ID has been stored.\n */\nexport async function tenantOrgIdSet(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables,\n\tparams: {\n\t\ttenantId?: string;\n\t\torganizationId?: string;\n\t}\n): Promise<void> {\n\tGuards.stringHexLength(\"tenantOrgIdSet\", \"tenant-id\", params.tenantId, 32);\n\n\tDid.guard(\"tenantOrgIdSet\", \"organizationId\", params.organizationId);\n\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.tenant-org-id-set.labels.updating\"));\n\tCLIDisplay.spinnerStart();\n\n\tawait applyOrganizationIdToTenant(engineCore, params.tenantId, params.organizationId);\n\n\tCLIDisplay.spinnerStop();\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.tenant-org-id-set.labels.stored\"));\n\n\tCLIDisplay.done();\n}\n\n/**\n * Apply a new organization ID to a tenant.\n * @param engineCore The engine core used to look up the tenantAdminComponent.\n * @param tenantId The ID of the tenant to update.\n * @param newOrganizationId The new organization DID to set.\n * @param options Optional display and behaviour overrides.\n * @param options.sectionLabel When set, emits a CLI section header before and done marker after.\n * @param options.required When false, returns silently when the component is not registered (default true).\n * @returns A promise that resolves when the tenant record has been updated.\n * @throws GeneralError if the component is required but not registered.\n */\nexport async function applyOrganizationIdToTenant(\n\tengineCore: IEngineCore,\n\ttenantId: string,\n\tnewOrganizationId: string,\n\toptions?: { sectionLabel?: string; required?: boolean }\n): Promise<void> {\n\tconst type = engineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\");\n\n\tif (!Is.stringValue(type)) {\n\t\tif (options?.required ?? true) {\n\t\t\tthrow new GeneralError(\"applyOrganizationIdToTenant\", \"tenantAdminComponentNotRegistered\");\n\t\t}\n\t\treturn;\n\t}\n\n\tif (Is.stringValue(options?.sectionLabel)) {\n\t\tCLIDisplay.break();\n\t\tCLIDisplay.section(options.sectionLabel);\n\t}\n\n\tconst tenantAdminComponent = ComponentFactory.get<ITenantAdminComponent>(type);\n\n\tconst tenant = await tenantAdminComponent.get(tenantId);\n\tawait tenantAdminComponent.update({\n\t\t...tenant,\n\t\torganizationId: newOrganizationId\n\t});\n\n\tif (Is.stringValue(options?.sectionLabel)) {\n\t\tCLIDisplay.done();\n\t}\n}\n"]}
@@ -0,0 +1,77 @@
1
+ import { CLIDisplay } from "@twin.org/cli-core";
2
+ import { ContextIdKeys, ContextIdStore } from "@twin.org/context";
3
+ import { Coerce, ComponentFactory, GeneralError, Guards, I18n, Is } from "@twin.org/core";
4
+ const COMMAND_NAME = "user-get";
5
+ /**
6
+ * Get the command definition parameters.
7
+ * @param commandDefinitions The registered command definitions.
8
+ */
9
+ export function getCommandDefinitionUserGet(commandDefinitions) {
10
+ commandDefinitions[COMMAND_NAME] = {
11
+ command: COMMAND_NAME,
12
+ description: I18n.formatMessage("node.cli.commands.user-get.description"),
13
+ example: I18n.formatMessage("node.cli.commands.user-get.example"),
14
+ requiresNodeIdentity: false,
15
+ requiresOrgIdentity: false,
16
+ params: [
17
+ {
18
+ key: "env-prefix",
19
+ type: "string",
20
+ description: I18n.formatMessage("node.cli.commands.user-get.params.env-prefix.description"),
21
+ required: false
22
+ },
23
+ {
24
+ key: "email",
25
+ type: "string",
26
+ extendedType: "email",
27
+ description: I18n.formatMessage("node.cli.commands.user-get.params.email.description")
28
+ },
29
+ {
30
+ key: "tenant-id",
31
+ type: "string",
32
+ extendedType: "hex(32)",
33
+ description: I18n.formatMessage("node.cli.commands.user-get.params.tenant-id.description"),
34
+ required: false
35
+ },
36
+ {
37
+ key: "load-env",
38
+ type: "string",
39
+ description: I18n.formatMessage("node.cli.commands.user-get.params.load-env.description"),
40
+ required: false
41
+ }
42
+ ],
43
+ action: async (engineCore, envVars, params) => userGet(engineCore, envVars, params)
44
+ };
45
+ }
46
+ /**
47
+ * Command for retrieving a single user by email address.
48
+ * @param engineCore The engine core.
49
+ * @param envVars The environment variables for the node.
50
+ * @param params The parameters for the command.
51
+ * @param params.email The email address of the user to retrieve.
52
+ * @param params.tenantId The tenant ID (multi-tenant mode only).
53
+ * @returns The user record.
54
+ */
55
+ export async function userGet(engineCore, envVars, params) {
56
+ Guards.email("userGet", "email", params.email);
57
+ if (Is.stringValue(params.tenantId)) {
58
+ Guards.stringHexLength("userGet", "tenant-id", params.tenantId, 32);
59
+ }
60
+ else if (Coerce.boolean(envVars.tenantEnabled) ?? false) {
61
+ throw new GeneralError("userGet", "tenantIdRequired");
62
+ }
63
+ const defaultAuthenticationAdminComponentType = engineCore.getRegisteredInstanceType("authenticationAdminComponent");
64
+ const authenticationAdminComponent = ComponentFactory.get(defaultAuthenticationAdminComponentType);
65
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.user-get.labels.retrieving"));
66
+ const currentContextIds = (await ContextIdStore.getContextIds()) ?? {};
67
+ const user = await ContextIdStore.run({ ...currentContextIds, [ContextIdKeys.Tenant]: params.tenantId }, async () => authenticationAdminComponent.get(params.email ?? ""));
68
+ CLIDisplay.break();
69
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.user-get.labels.email"), user.email);
70
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.user-get.labels.identity"), user.userIdentity ?? "", 1);
71
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.user-get.labels.organization"), user.organizationIdentity ?? "", 1);
72
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.user-get.labels.scope"), (user.scope ?? []).join(", "), 1);
73
+ CLIDisplay.break();
74
+ CLIDisplay.done();
75
+ return user;
76
+ }
77
+ //# sourceMappingURL=userGet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userGet.js","sourceRoot":"","sources":["../../../src/commands/userGet.ts"],"names":[],"mappings":"AAMA,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,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAK1F,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,kBAE3C;IACA,kBAAkB,CAAC,YAAY,CAAC,GAAG;QAClC,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,wCAAwC,CAAC;QACzE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;QACjE,oBAAoB,EAAE,KAAK;QAC3B,mBAAmB,EAAE,KAAK;QAC1B,MAAM,EAAE;YACP;gBACC,GAAG,EAAE,YAAY;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,0DAA0D,CAAC;gBAC3F,QAAQ,EAAE,KAAK;aACf;YACD;gBACC,GAAG,EAAE,OAAO;gBACZ,IAAI,EAAE,QAAQ;gBACd,YAAY,EAAE,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,qDAAqD,CAAC;aACtF;YACD;gBACC,GAAG,EAAE,WAAW;gBAChB,IAAI,EAAE,QAAQ;gBACd,YAAY,EAAE,SAAS;gBACvB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,yDAAy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GAAG,iBAAiB,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE,EACjE,KAAK,IAAI,EAAE,CAAC,4BAA4B,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAChE,CAAC;IAEF,UAAU,CAAC,KAAK,EAAE,CAAC;IACnB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,yCAAyC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5F,UAAU,CAAC,KAAK,CACf,IAAI,CAAC,aAAa,CAAC,4CAA4C,CAAC,EAChE,IAAI,CAAC,YAAY,IAAI,EAAE,EACvB,CAAC,CACD,CAAC;IACF,UAAU,CAAC,KAAK,CACf,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC,EACpE,IAAI,CAAC,oBAAoB,IAAI,EAAE,EAC/B,CAAC,CACD,CAAC;IACF,UAAU,CAAC,KAAK,CACf,IAAI,CAAC,aAAa,CAAC,yCAAyC,CAAC,EAC7D,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,CAAC,CACD,CAAC;IACF,UAAU,CAAC,KAAK,EAAE,CAAC;IAEnB,UAAU,CAAC,IAAI,EAAE,CAAC;IAElB,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tIAuthenticationAdminComponent,\n\tIAuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-models\";\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { ContextIdKeys, ContextIdStore } from \"@twin.org/context\";\nimport { Coerce, ComponentFactory, GeneralError, Guards, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { IEnvironmentVariables } from \"../models/IEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"user-get\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionUserGet(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.user-get.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.user-get.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(\"node.cli.commands.user-get.params.env-prefix.description\"),\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"email\",\n\t\t\t\ttype: \"string\",\n\t\t\t\textendedType: \"email\",\n\t\t\t\tdescription: I18n.formatMessage(\"node.cli.commands.user-get.params.email.description\")\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"tenant-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\textendedType: \"hex(32)\",\n\t\t\t\tdescription: I18n.formatMessage(\"node.cli.commands.user-get.params.tenant-id.description\"),\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(\"node.cli.commands.user-get.params.load-env.description\"),\n\t\t\t\trequired: false\n\t\t\t}\n\t\t],\n\t\taction: async (engineCore, envVars, params) => userGet(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for retrieving a single user by email address.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @param params.email The email address of the user to retrieve.\n * @param params.tenantId The tenant ID (multi-tenant mode only).\n * @returns The user record.\n */\nexport async function userGet(\n\tengineCore: IEngineCore,\n\tenvVars: IEnvironmentVariables,\n\tparams: {\n\t\temail?: string;\n\t\ttenantId?: string;\n\t}\n): Promise<IAuthenticationUser> {\n\tGuards.email(\"userGet\", \"email\", params.email);\n\tif (Is.stringValue(params.tenantId)) {\n\t\tGuards.stringHexLength(\"userGet\", \"tenant-id\", params.tenantId, 32);\n\t} else if (Coerce.boolean(envVars.tenantEnabled) ?? false) {\n\t\tthrow new GeneralError(\"userGet\", \"tenantIdRequired\");\n\t}\n\n\tconst defaultAuthenticationAdminComponentType = engineCore.getRegisteredInstanceType(\n\t\t\"authenticationAdminComponent\"\n\t);\n\tconst authenticationAdminComponent = ComponentFactory.get<IAuthenticationAdminComponent>(\n\t\tdefaultAuthenticationAdminComponentType\n\t);\n\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.user-get.labels.retrieving\"));\n\n\tconst currentContextIds = (await ContextIdStore.getContextIds()) ?? {};\n\tconst user = await ContextIdStore.run(\n\t\t{ ...currentContextIds, [ContextIdKeys.Tenant]: params.tenantId },\n\t\tasync () => authenticationAdminComponent.get(params.email ?? \"\")\n\t);\n\n\tCLIDisplay.break();\n\tCLIDisplay.value(I18n.formatMessage(\"node.cli.commands.user-get.labels.email\"), user.email);\n\tCLIDisplay.value(\n\t\tI18n.formatMessage(\"node.cli.commands.user-get.labels.identity\"),\n\t\tuser.userIdentity ?? \"\",\n\t\t1\n\t);\n\tCLIDisplay.value(\n\t\tI18n.formatMessage(\"node.cli.commands.user-get.labels.organization\"),\n\t\tuser.organizationIdentity ?? \"\",\n\t\t1\n\t);\n\tCLIDisplay.value(\n\t\tI18n.formatMessage(\"node.cli.commands.user-get.labels.scope\"),\n\t\t(user.scope ?? []).join(\", \"),\n\t\t1\n\t);\n\tCLIDisplay.break();\n\n\tCLIDisplay.done();\n\n\treturn user;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ICliCommandDefinition.js","sourceRoot":"","sources":["../../../src/models/ICliCommandDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport type { CliCommandParamType } from \"./cliCommandParamType.js\";\nimport type { ICliCommandDefinitionParam } from \"./ICliCommandDefinitionParam.js\";\nimport type { IEnvironmentVariables } from \"./IEnvironmentVariables.js\";\n\n/**\n * Static definition of a CLI command including its name, parameters, and execution action.\n */\nexport interface ICliCommandDefinition {\n\t/**\n\t * The command name.\n\t */\n\tcommand: string;\n\n\t/**\n\t * The command description.\n\t */\n\tdescription: string;\n\n\t/**\n\t * An example invocation string shown in help output.\n\t */\n\texample: string;\n\n\t/**\n\t * The params available for the command.\n\t */\n\tparams: ICliCommandDefinitionParam[];\n\n\t/**\n\t * The method to execute for the command.\n\t */\n\taction: (\n\t\tengineCore: IEngineCore,\n\t\tenvVars: IEnvironmentVariables,\n\t\tparams: { [id: string]: CliCommandParamType }\n\t) => Promise<unknown>;\n\n\t/**\n\t * Indicates whether the engine needs to be started before executing the command.\n\t * @default true\n\t */\n\trequiresEngineStarted?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the node identity to be set if configured to use.\n\t * @default true\n\t */\n\trequiresNodeIdentity?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the organization identity to be set.\n\t * @default true\n\t */\n\trequiresOrgIdentity?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ICliCommandDefinition.js","sourceRoot":"","sources":["../../../src/models/ICliCommandDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport type { CliCommandParamType } from \"./cliCommandParamType.js\";\nimport type { ICliCommandDefinitionParam } from \"./ICliCommandDefinitionParam.js\";\nimport type { IEnvironmentVariables } from \"./IEnvironmentVariables.js\";\n\n/**\n * Static definition of a CLI command including its name, parameters, and execution action.\n */\nexport interface ICliCommandDefinition {\n\t/**\n\t * The command name.\n\t */\n\tcommand: string;\n\n\t/**\n\t * The command description.\n\t */\n\tdescription: string;\n\n\t/**\n\t * An example invocation string shown in help output.\n\t */\n\texample: string;\n\n\t/**\n\t * The params available for the command.\n\t */\n\tparams: ICliCommandDefinitionParam[];\n\n\t/**\n\t * Deprecated names that resolve to this command with a warning.\n\t */\n\taliases?: string[];\n\n\t/**\n\t * The method to execute for the command.\n\t */\n\taction: (\n\t\tengineCore: IEngineCore,\n\t\tenvVars: IEnvironmentVariables,\n\t\tparams: { [id: string]: CliCommandParamType }\n\t) => Promise<unknown>;\n\n\t/**\n\t * Indicates whether the engine needs to be started before executing the command.\n\t * @default true\n\t */\n\trequiresEngineStarted?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the node identity to be set if configured to use.\n\t * @default true\n\t */\n\trequiresNodeIdentity?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the organization identity to be set.\n\t * @default true\n\t */\n\trequiresOrgIdentity?: boolean;\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 * 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.\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 * 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 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 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 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 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 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 * The data plane path for PULL transfers (path only, not full URL).\n\t * Will be combined with public origin.\n\t * Required if PULL transfers should be supported.\n\t * Example: \"dataspace/entities\"\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 * 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.\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 * 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 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 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 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 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 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"]}
package/dist/es/node.js CHANGED
@@ -33,7 +33,7 @@ export async function run(nodeOptions, args) {
33
33
  nodeOptions ??= {};
34
34
  const serverInfo = {
35
35
  name: nodeOptions?.serverName ?? "TWIN Node",
36
- version: nodeOptions?.serverVersion ?? "0.9.1-next.3" // x-release-please-version
36
+ version: nodeOptions?.serverVersion ?? "0.9.1-next.5" // x-release-please-version
37
37
  };
38
38
  CLIDisplay.header(serverInfo.name, serverInfo.version, "🌩️ ");
39
39
  if (!Is.stringValue(nodeOptions?.executionDirectory)) {