@twin.org/engine-server-types 0.0.3-next.49 → 0.0.3-next.50
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/components/authentication.js +0 -1
- package/dist/es/components/authentication.js.map +1 -1
- package/dist/es/components/restRouteProcessor.js +7 -6
- package/dist/es/components/restRouteProcessor.js.map +1 -1
- package/dist/es/components/socketRouteProcessor.js +7 -6
- package/dist/es/components/socketRouteProcessor.js.map +1 -1
- package/dist/es/models/config/restRouteProcessorConfig.js.map +1 -1
- package/dist/es/models/config/socketRouteProcessorConfig.js.map +1 -1
- package/dist/es/models/types/restRouteProcessorType.js +4 -0
- package/dist/es/models/types/restRouteProcessorType.js.map +1 -1
- package/dist/es/models/types/socketRouteProcessorType.js +4 -0
- package/dist/es/models/types/socketRouteProcessorType.js.map +1 -1
- package/dist/types/models/config/restRouteProcessorConfig.d.ts +4 -1
- package/dist/types/models/config/socketRouteProcessorConfig.d.ts +4 -1
- package/dist/types/models/types/restRouteProcessorType.d.ts +4 -0
- package/dist/types/models/types/socketRouteProcessorType.d.ts +4 -0
- package/docs/changelog.md +15 -0
- package/docs/reference/interfaces/IEngineServerConfig.md +15 -9
- package/docs/reference/type-aliases/RestRouteProcessorConfig.md +1 -1
- package/docs/reference/type-aliases/SocketRouteProcessorConfig.md +1 -1
- package/docs/reference/variables/RestRouteProcessorType.md +6 -0
- package/docs/reference/variables/SocketRouteProcessorType.md +6 -0
- package/package.json +3 -3
|
@@ -25,7 +25,6 @@ export function initialiseAuthenticationComponent(engineCore, context, instanceC
|
|
|
25
25
|
]));
|
|
26
26
|
return new EntityStorageAuthenticationService(EngineTypeHelper.mergeConfig({
|
|
27
27
|
vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
|
|
28
|
-
urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent"),
|
|
29
28
|
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent"),
|
|
30
29
|
authenticationAuditServiceType: engineCore.getRegisteredInstanceTypeOptional("authenticationAuditComponent"),
|
|
31
30
|
authenticationRateServiceType: engineCore.getRegisteredInstanceType("authenticationRateComponent")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAC;AACtG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAMnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAA4C,EAC5C,OAAgD,EAChD,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,aAAa,EAAE,CAAC;QACvE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,2BAA2B,EAAE,CAAC;YAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,qBAAqB,wBAE3C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YACF,OAAO,IAAI,kCAAkC,CAC5C,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAC;AACtG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAMnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAA4C,EAC5C,OAAgD,EAChD,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,aAAa,EAAE,CAAC;QACvE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,2BAA2B,EAAE,CAAC;YAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,qBAAqB,wBAE3C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YACF,OAAO,IAAI,kCAAkC,CAC5C,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,wBAAwB,EACvB,UAAU,CAAC,iCAAiC,CAAC,sBAAsB,CAAC;gBACrE,8BAA8B,EAAE,UAAU,CAAC,iCAAiC,CAC3E,8BAA8B,CAC9B;gBACD,6BAA6B,EAAE,UAAU,CAAC,yBAAyB,CAClE,6BAA6B,CAC7B;aACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,0CAAsD,CAAC;IACxE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qCAAqC,CACxC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,8CAAyD,CAAC;IAC3E,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntityStorageAuthenticationRestClient } from \"@twin.org/api-auth-entity-storage-rest-client\";\nimport {\n\tEntityStorageAuthenticationService,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { AuthenticationComponentConfig } from \"../models/config/authenticationComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationComponentType } from \"../models/types/authenticationComponentType.js\";\n\n/**\n * Initialise the authentication.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseAuthenticationComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationComponentConfig\n): EngineTypeInitialiserReturn<AuthenticationComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationComponentType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\tnameof<AuthenticationUser>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new EntityStorageAuthenticationService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthenticationAuditServiceType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"authenticationAuditComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationRateServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationRateComponent\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(EntityStorageAuthenticationService);\n\t} else if (instanceConfig.type === AuthenticationComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageAuthenticationRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(EntityStorageAuthenticationRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { AuthHeaderProcessor, initSchema as initSchemaAuthEntityStorage } from "@twin.org/api-auth-entity-storage-service";
|
|
4
4
|
import { RestRouteProcessorFactory } from "@twin.org/api-models";
|
|
5
5
|
import { ContextIdProcessor, LoggingProcessor, RestRouteProcessor, StaticContextIdProcessor } from "@twin.org/api-processors";
|
|
6
|
-
import { initSchema as initSchemaTenantProcessor, TenantProcessor } from "@twin.org/api-tenant-processor";
|
|
6
|
+
import { initSchema as initSchemaTenantProcessor, TenantProcessor, SingleTenantProcessor } from "@twin.org/api-tenant-processor";
|
|
7
7
|
import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
|
|
8
8
|
import { EngineTypeHelper, initialiseEntityStorageConnector } from "@twin.org/engine-types";
|
|
9
9
|
import { RestRouteProcessorType } from "../models/types/restRouteProcessorType.js";
|
|
@@ -26,7 +26,6 @@ export function initialiseRestRouteProcessorComponent(engineCore, context, insta
|
|
|
26
26
|
]));
|
|
27
27
|
return new AuthHeaderProcessor(EngineTypeHelper.mergeConfig({
|
|
28
28
|
vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
|
|
29
|
-
urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent"),
|
|
30
29
|
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent")
|
|
31
30
|
}, createConfig.options));
|
|
32
31
|
};
|
|
@@ -34,7 +33,7 @@ export function initialiseRestRouteProcessorComponent(engineCore, context, insta
|
|
|
34
33
|
}
|
|
35
34
|
else if (instanceConfig.type === RestRouteProcessorType.Logging) {
|
|
36
35
|
createComponent = (createConfig) => new LoggingProcessor(EngineTypeHelper.mergeConfig({
|
|
37
|
-
loggingComponentType: engineCore.
|
|
36
|
+
loggingComponentType: engineCore.getRegisteredLoggerType("LoggingProcessor")
|
|
38
37
|
}, createConfig.options));
|
|
39
38
|
instanceTypeName = "logging-processor";
|
|
40
39
|
}
|
|
@@ -57,12 +56,14 @@ export function initialiseRestRouteProcessorComponent(engineCore, context, insta
|
|
|
57
56
|
ContextIdKeys.Node,
|
|
58
57
|
ContextIdKeys.Tenant
|
|
59
58
|
]));
|
|
60
|
-
return new TenantProcessor(EngineTypeHelper.mergeConfig(
|
|
61
|
-
urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent")
|
|
62
|
-
}, createConfig.options));
|
|
59
|
+
return new TenantProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
63
60
|
};
|
|
64
61
|
instanceTypeName = "tenant-processor";
|
|
65
62
|
}
|
|
63
|
+
else if (instanceConfig.type === RestRouteProcessorType.SingleTenant) {
|
|
64
|
+
createComponent = (createConfig) => new SingleTenantProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
65
|
+
instanceTypeName = "single-tenant-processor";
|
|
66
|
+
}
|
|
66
67
|
return {
|
|
67
68
|
createComponent: createComponent,
|
|
68
69
|
instanceTypeName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,UAAU,IAAI,yBAAyB,EACvC,eAAe,
|
|
1
|
+
{"version":3,"file":"restRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\nimport { RestRouteProcessorFactory } from \"@twin.org/api-models\";\nimport {\n\tContextIdProcessor,\n\tLoggingProcessor,\n\tRestRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@twin.org/api-processors\";\nimport {\n\tinitSchema as initSchemaTenantProcessor,\n\tTenantProcessor,\n\tSingleTenantProcessor,\n\ttype Tenant\n} from \"@twin.org/api-tenant-processor\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { RestRouteProcessorConfig } from \"../models/config/restRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { RestRouteProcessorType } from \"../models/types/restRouteProcessorType.js\";\n\n/**\n * Initialise the rest route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseRestRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: RestRouteProcessorConfig\n): EngineTypeInitialiserReturn<RestRouteProcessorConfig, typeof RestRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RestRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\tnameof<AuthenticationUser>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(nameof(LoggingProcessor))\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.RestRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew RestRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(RestRouteProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaTenantProcessor();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.tenantEntityStorageType,\n\t\t\t\tnameof<Tenant>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(TenantProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SingleTenantProcessor);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: RestRouteProcessorFactory\n\t};\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { AuthHeaderProcessor, initSchema as initSchemaAuthEntityStorage } from "@twin.org/api-auth-entity-storage-service";
|
|
4
4
|
import { SocketRouteProcessorFactory } from "@twin.org/api-models";
|
|
5
5
|
import { LoggingProcessor, ContextIdProcessor, SocketRouteProcessor, StaticContextIdProcessor } from "@twin.org/api-processors";
|
|
6
|
-
import { initSchema as initSchemaTenantProcessor, TenantProcessor } from "@twin.org/api-tenant-processor";
|
|
6
|
+
import { initSchema as initSchemaTenantProcessor, SingleTenantProcessor, TenantProcessor } from "@twin.org/api-tenant-processor";
|
|
7
7
|
import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
|
|
8
8
|
import { EngineTypeHelper, initialiseEntityStorageConnector } from "@twin.org/engine-types";
|
|
9
9
|
import { SocketRouteProcessorType } from "../models/types/socketRouteProcessorType.js";
|
|
@@ -26,7 +26,6 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
26
26
|
]));
|
|
27
27
|
return new AuthHeaderProcessor(EngineTypeHelper.mergeConfig({
|
|
28
28
|
vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
|
|
29
|
-
urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent"),
|
|
30
29
|
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent")
|
|
31
30
|
}, createConfig.options));
|
|
32
31
|
};
|
|
@@ -34,7 +33,7 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
34
33
|
}
|
|
35
34
|
else if (instanceConfig.type === SocketRouteProcessorType.Logging) {
|
|
36
35
|
createComponent = (createConfig) => new LoggingProcessor(EngineTypeHelper.mergeConfig({
|
|
37
|
-
loggingComponentType: engineCore.
|
|
36
|
+
loggingComponentType: engineCore.getRegisteredLoggerType("LoggingProcessor")
|
|
38
37
|
}, createConfig.options));
|
|
39
38
|
instanceTypeName = "logging-processor";
|
|
40
39
|
}
|
|
@@ -57,12 +56,14 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
57
56
|
ContextIdKeys.Node,
|
|
58
57
|
ContextIdKeys.Tenant
|
|
59
58
|
]));
|
|
60
|
-
return new TenantProcessor(EngineTypeHelper.mergeConfig(
|
|
61
|
-
urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent")
|
|
62
|
-
}, createConfig.options));
|
|
59
|
+
return new TenantProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
63
60
|
};
|
|
64
61
|
instanceTypeName = "tenant-processor";
|
|
65
62
|
}
|
|
63
|
+
else if (instanceConfig.type === SocketRouteProcessorType.SingleTenant) {
|
|
64
|
+
createComponent = (createConfig) => new SingleTenantProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
65
|
+
instanceTypeName = "single-tenant-processor";
|
|
66
|
+
}
|
|
66
67
|
return {
|
|
67
68
|
createComponent: createComponent,
|
|
68
69
|
instanceTypeName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,UAAU,IAAI,yBAAyB,EAEvC,eAAe,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,UAAU,uCAAuC,CACtD,UAA4C,EAC5C,OAAgD,EAChD,cAA0C;IAE1C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,UAAU,EAAE,CAAC;QACjE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,2BAA2B,EAAE,CAAC;YAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,qBAAqB,wBAE3C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YAEF,OAAO,IAAI,mBAAmB,CAC7B,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,
|
|
1
|
+
{"version":3,"file":"socketRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,UAAU,IAAI,yBAAyB,EAEvC,qBAAqB,EACrB,eAAe,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,UAAU,uCAAuC,CACtD,UAA4C,EAC5C,OAAgD,EAChD,cAA0C;IAE1C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,UAAU,EAAE,CAAC;QACjE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,2BAA2B,EAAE,CAAC;YAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,qBAAqB,wBAE3C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YAEF,OAAO,IAAI,mBAAmB,CAC7B,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,wBAAwB,EACvB,UAAU,CAAC,iCAAiC,CAAC,sBAAsB,CAAC;aACrE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,0BAAuC,CAAC;IACzD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,OAAO,EAAE,CAAC;QACrE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,gBAAgB,CACnB,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,uBAAuB,oBAA0B;SAClF,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,sBAAoC,CAAC;IACtD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,SAAS,EAAE,CAAC;QACvE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,kBAAkB,CACrB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,yBAAsC,CAAC;IACxD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,eAAe,EAAE,CAAC;QAC7E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,wBAAwB,CAC3B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,gCAA4C,CAAC;IAC9D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,WAAW,EAAE,CAAC;QACzE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,oBAAoB,CACvB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,2BAAwC,CAAC;IAC1D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,yBAAyB,EAAE,CAAC;YAC5B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,uBAAuB,YAE7C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YACF,OAAO,IAAI,eAAe,CACzB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,qBAAmC,CAAC;IACrD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,YAAY,EAAE,CAAC;QAC1E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qBAAqB,CACxB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,4BAAyC,CAAC;IAC3D,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\nimport { SocketRouteProcessorFactory } from \"@twin.org/api-models\";\nimport {\n\tLoggingProcessor,\n\tContextIdProcessor,\n\tSocketRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@twin.org/api-processors\";\nimport {\n\tinitSchema as initSchemaTenantProcessor,\n\ttype Tenant,\n\tSingleTenantProcessor,\n\tTenantProcessor\n} from \"@twin.org/api-tenant-processor\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { SocketRouteProcessorConfig } from \"../models/config/socketRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { SocketRouteProcessorType } from \"../models/types/socketRouteProcessorType.js\";\n\n/**\n * Initialise the socket route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): EngineTypeInitialiserReturn<SocketRouteProcessorConfig, typeof SocketRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\tnameof<AuthenticationUser>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(nameof(LoggingProcessor))\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SocketRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SocketRouteProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaTenantProcessor();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.tenantEntityStorageType,\n\t\t\t\tnameof<Tenant>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(TenantProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SingleTenantProcessor);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type {
|
|
1
|
+
{"version":3,"file":"restRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@twin.org/api-tenant-processor\";\nimport type { RestRouteProcessorType } from \"../types/restRouteProcessorType.js\";\n\n/**\n * REST route processor config types.\n */\nexport type RestRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.RestRoute;\n\t\t\toptions?: IRestRouteProcessorConstructorOptions;\n\t };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type {
|
|
1
|
+
{"version":3,"file":"socketRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@twin.org/api-tenant-processor\";\nimport type { SocketRouteProcessorType } from \"../types/socketRouteProcessorType.js\";\n\n/**\n * Socket route processor config types.\n */\nexport type SocketRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SocketRoute;\n\t\t\toptions?: ISocketRouteProcessorConstructorOptions;\n\t };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessorType.js","sourceRoot":"","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,wBAAwB,EAAE,4BAA4B;IAEtD;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,SAAS,EAAE,YAAY;CACd,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * REST route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RestRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Auth verifiable credential.\n\t */\n\tAuthVerifiableCredential: \"auth-verifiable-credential\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * REST Route.\n\t */\n\tRestRoute: \"rest-route\"\n} as const;\n\n/**\n * REST route processor types.\n */\nexport type RestRouteProcessorType =\n\t(typeof RestRouteProcessorType)[keyof typeof RestRouteProcessorType];\n"]}
|
|
1
|
+
{"version":3,"file":"restRouteProcessorType.js","sourceRoot":"","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,wBAAwB,EAAE,4BAA4B;IAEtD;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,SAAS,EAAE,YAAY;CACd,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * REST route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RestRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Auth verifiable credential.\n\t */\n\tAuthVerifiableCredential: \"auth-verifiable-credential\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Single Tenant.\n\t */\n\tSingleTenant: \"single-tenant\",\n\n\t/**\n\t * REST Route.\n\t */\n\tRestRoute: \"rest-route\"\n} as const;\n\n/**\n * REST route processor types.\n */\nexport type RestRouteProcessorType =\n\t(typeof RestRouteProcessorType)[keyof typeof RestRouteProcessorType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessorType.js","sourceRoot":"","sources":["../../../../src/models/types/socketRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,wBAAwB,EAAE,4BAA4B;IAEtD;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Socket route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SocketRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Auth verifiable credential.\n\t */\n\tAuthVerifiableCredential: \"auth-verifiable-credential\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Socket Route.\n\t */\n\tSocketRoute: \"socket-route\"\n} as const;\n\n/**\n * Socket route processor types.\n */\nexport type SocketRouteProcessorType =\n\t(typeof SocketRouteProcessorType)[keyof typeof SocketRouteProcessorType];\n"]}
|
|
1
|
+
{"version":3,"file":"socketRouteProcessorType.js","sourceRoot":"","sources":["../../../../src/models/types/socketRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,wBAAwB,EAAE,4BAA4B;IAEtD;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Socket route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SocketRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Auth verifiable credential.\n\t */\n\tAuthVerifiableCredential: \"auth-verifiable-credential\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Single Tenant.\n\t */\n\tSingleTenant: \"single-tenant\",\n\n\t/**\n\t * Socket Route.\n\t */\n\tSocketRoute: \"socket-route\"\n} as const;\n\n/**\n * Socket route processor types.\n */\nexport type SocketRouteProcessorType =\n\t(typeof SocketRouteProcessorType)[keyof typeof SocketRouteProcessorType];\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
2
|
import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, IRestRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
|
|
3
|
-
import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
3
|
+
import type { ISingleTenantProcessorConstructorOptions, ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
4
4
|
import type { RestRouteProcessorType } from "../types/restRouteProcessorType.js";
|
|
5
5
|
/**
|
|
6
6
|
* REST route processor config types.
|
|
@@ -20,6 +20,9 @@ export type RestRouteProcessorConfig = {
|
|
|
20
20
|
} | {
|
|
21
21
|
type: typeof RestRouteProcessorType.Tenant;
|
|
22
22
|
options?: ITenantProcessorConstructorOptions;
|
|
23
|
+
} | {
|
|
24
|
+
type: typeof RestRouteProcessorType.SingleTenant;
|
|
25
|
+
options?: ISingleTenantProcessorConstructorOptions;
|
|
23
26
|
} | {
|
|
24
27
|
type: typeof RestRouteProcessorType.RestRoute;
|
|
25
28
|
options?: IRestRouteProcessorConstructorOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
2
|
import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, ISocketRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
|
|
3
|
-
import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
3
|
+
import type { ISingleTenantProcessorConstructorOptions, ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
4
4
|
import type { SocketRouteProcessorType } from "../types/socketRouteProcessorType.js";
|
|
5
5
|
/**
|
|
6
6
|
* Socket route processor config types.
|
|
@@ -20,6 +20,9 @@ export type SocketRouteProcessorConfig = {
|
|
|
20
20
|
} | {
|
|
21
21
|
type: typeof SocketRouteProcessorType.Tenant;
|
|
22
22
|
options?: ITenantProcessorConstructorOptions;
|
|
23
|
+
} | {
|
|
24
|
+
type: typeof SocketRouteProcessorType.SingleTenant;
|
|
25
|
+
options?: ISingleTenantProcessorConstructorOptions;
|
|
23
26
|
} | {
|
|
24
27
|
type: typeof SocketRouteProcessorType.SocketRoute;
|
|
25
28
|
options?: ISocketRouteProcessorConstructorOptions;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.50](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.49...engine-server-types-v0.0.3-next.50) (2026-06-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* organization identifiers ([#152](https://github.com/iotaledger/twin-engine/issues/152)) ([d8e6d51](https://github.com/iotaledger/twin-engine/commit/d8e6d5147f402f0fe17b445efd8ae97db0c36adb))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/engine-models bumped from 0.0.3-next.49 to 0.0.3-next.50
|
|
16
|
+
* @twin.org/engine-types bumped from 0.0.3-next.49 to 0.0.3-next.50
|
|
17
|
+
|
|
3
18
|
## [0.0.3-next.49](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.48...engine-server-types-v0.0.3-next.49) (2026-06-09)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -44,6 +44,18 @@ false
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
+
### silentLoggers? {#silentloggers}
|
|
48
|
+
|
|
49
|
+
> `optional` **silentLoggers?**: `string`[]
|
|
50
|
+
|
|
51
|
+
The loggers to disable output for.
|
|
52
|
+
|
|
53
|
+
#### Inherited from
|
|
54
|
+
|
|
55
|
+
`IEngineConfig.silentLoggers`
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
47
59
|
### web? {#web}
|
|
48
60
|
|
|
49
61
|
> `optional` **web?**: `IWebServerOptions`
|
|
@@ -198,12 +210,6 @@ Automation action options which can be overridden by individual components by sp
|
|
|
198
210
|
|
|
199
211
|
Health component options which can be overridden by individual components by specifying types other than default.
|
|
200
212
|
|
|
201
|
-
##### urlTransformerComponent?
|
|
202
|
-
|
|
203
|
-
> `optional` **urlTransformerComponent?**: `IEngineCoreTypeConfig`\<`UrlTransformerComponentConfig`\>[]
|
|
204
|
-
|
|
205
|
-
URL transformer component options which can be overridden by individual components by specifying types other than default.
|
|
206
|
-
|
|
207
213
|
##### vaultConnector?
|
|
208
214
|
|
|
209
215
|
> `optional` **vaultConnector?**: `IEngineCoreTypeConfig`\<`VaultConnectorConfig`\>[]
|
|
@@ -474,11 +480,11 @@ Dataspace control plane component options which can be overridden by individual
|
|
|
474
480
|
|
|
475
481
|
Dataspace data plane component options which can be overridden by individual components by specifying types other than default.
|
|
476
482
|
|
|
477
|
-
#####
|
|
483
|
+
##### platformComponent?
|
|
478
484
|
|
|
479
|
-
> `optional` **
|
|
485
|
+
> `optional` **platformComponent?**: `IEngineCoreTypeConfig`\<`PlatformComponentConfig`\>[]
|
|
480
486
|
|
|
481
|
-
|
|
487
|
+
Platform component options which can be overridden by individual components by specifying types other than default.
|
|
482
488
|
|
|
483
489
|
##### tenantAdminComponent?
|
|
484
490
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: RestRouteProcessorConfig
|
|
2
2
|
|
|
3
|
-
> **RestRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/RestRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/RestRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/RestRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/RestRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/RestRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`RestRoute`](../variables/RestRouteProcessorType.md#restroute); `options?`: `IRestRouteProcessorConstructorOptions`; \}
|
|
3
|
+
> **RestRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/RestRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/RestRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/RestRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/RestRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/RestRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SingleTenant`](../variables/RestRouteProcessorType.md#singletenant); `options?`: `ISingleTenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`RestRoute`](../variables/RestRouteProcessorType.md#restroute); `options?`: `IRestRouteProcessorConstructorOptions`; \}
|
|
4
4
|
|
|
5
5
|
REST route processor config types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: SocketRouteProcessorConfig
|
|
2
2
|
|
|
3
|
-
> **SocketRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/SocketRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/SocketRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/SocketRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/SocketRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/SocketRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SocketRoute`](../variables/SocketRouteProcessorType.md#socketroute); `options?`: `ISocketRouteProcessorConstructorOptions`; \}
|
|
3
|
+
> **SocketRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/SocketRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/SocketRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/SocketRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/SocketRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/SocketRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SingleTenant`](../variables/SocketRouteProcessorType.md#singletenant); `options?`: `ISingleTenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SocketRoute`](../variables/SocketRouteProcessorType.md#socketroute); `options?`: `ISocketRouteProcessorConstructorOptions`; \}
|
|
4
4
|
|
|
5
5
|
Socket route processor config types.
|
|
@@ -42,6 +42,12 @@ Static Context ID.
|
|
|
42
42
|
|
|
43
43
|
Tenant.
|
|
44
44
|
|
|
45
|
+
### SingleTenant {#singletenant}
|
|
46
|
+
|
|
47
|
+
> `readonly` **SingleTenant**: `"single-tenant"` = `"single-tenant"`
|
|
48
|
+
|
|
49
|
+
Single Tenant.
|
|
50
|
+
|
|
45
51
|
### RestRoute {#restroute}
|
|
46
52
|
|
|
47
53
|
> `readonly` **RestRoute**: `"rest-route"` = `"rest-route"`
|
|
@@ -42,6 +42,12 @@ Static Context ID.
|
|
|
42
42
|
|
|
43
43
|
Tenant.
|
|
44
44
|
|
|
45
|
+
### SingleTenant {#singletenant}
|
|
46
|
+
|
|
47
|
+
> `readonly` **SingleTenant**: `"single-tenant"` = `"single-tenant"`
|
|
48
|
+
|
|
49
|
+
Single Tenant.
|
|
50
|
+
|
|
45
51
|
### SocketRoute {#socketroute}
|
|
46
52
|
|
|
47
53
|
> `readonly` **SocketRoute**: `"socket-route"` = `"socket-route"`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine-server-types",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.50",
|
|
4
4
|
"description": "Server-focused component types and configuration models for API routing and hosting.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@twin.org/api-tenant-processor": "next",
|
|
26
26
|
"@twin.org/context": "next",
|
|
27
27
|
"@twin.org/core": "next",
|
|
28
|
-
"@twin.org/engine-models": "0.0.3-next.
|
|
29
|
-
"@twin.org/engine-types": "0.0.3-next.
|
|
28
|
+
"@twin.org/engine-models": "0.0.3-next.50",
|
|
29
|
+
"@twin.org/engine-types": "0.0.3-next.50",
|
|
30
30
|
"@twin.org/entity": "next",
|
|
31
31
|
"@twin.org/nameof": "next"
|
|
32
32
|
},
|