@twin.org/engine-types 0.0.3-next.8 → 0.0.3-next.9

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.
@@ -25,6 +25,7 @@ export async function initialiseImmutableProofComponent(engineCore, context, ins
25
25
  component = new ImmutableProofService({
26
26
  verifiableStorageType: engineCore.getRegisteredInstanceType("verifiableStorageConnector"),
27
27
  identityConnectorType: engineCore.getRegisteredInstanceType("identityConnector"),
28
+ loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
28
29
  backgroundTaskComponentType: engineCore.getRegisteredInstanceType("backgroundTaskComponent"),
29
30
  eventBusComponentType: engineCore.getRegisteredInstanceTypeOptional("eventBusComponent"),
30
31
  ...instanceConfig.options
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProof.js","sourceRoot":"","sources":["../../../src/components/immutableProof.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAEN,qBAAqB,EACrB,UAAU,IAAI,wBAAwB,EACtC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACtD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAM7C,IAAI,SAA+C,CAAC;IACpD,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,OAAO,EAAE,CAAC;QACjE,wBAAwB,EAAE,CAAC;QAE3B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,+BAA+B,oBAEvD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;YACpE,aAAa,CAAC,IAAI;YAClB,aAAa,CAAC,MAAM;SACpB,CAAC,CACF,CAAC;QAEF,SAAS,GAAG,IAAI,qBAAqB,CAAC;YACrC,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,4BAA4B,CAAC;YACzF,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;YAChF,2BAA2B,EAAE,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;YAC5F,qBAAqB,EAAE,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;YACxF,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,4BAAyC,CAAC;IACvD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport type { IImmutableProofComponent } from \"@twin.org/immutable-proof-models\";\nimport { ImmutableProofRestClient } from \"@twin.org/immutable-proof-rest-client\";\nimport {\n\ttype ImmutableProof,\n\tImmutableProofService,\n\tinitSchema as initSchemaImmutableProof\n} from \"@twin.org/immutable-proof-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { ImmutableProofComponentConfig } from \"../models/config/immutableProofComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { ImmutableProofComponentType } from \"../models/types/immutableProofComponentType.js\";\n\n/**\n * Initialise the immutable proof component.\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 async function initialiseImmutableProofComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: ImmutableProofComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IImmutableProofComponent | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === ImmutableProofComponentType.Service) {\n\t\tinitSchemaImmutableProof();\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.immutableProofEntityStorageType,\n\t\t\tnameof<ImmutableProof>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\tContextIdKeys.Node,\n\t\t\t\tContextIdKeys.Tenant\n\t\t\t])\n\t\t);\n\n\t\tcomponent = new ImmutableProofService({\n\t\t\tverifiableStorageType: engineCore.getRegisteredInstanceType(\"verifiableStorageConnector\"),\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\teventBusComponentType: engineCore.getRegisteredInstanceTypeOptional(\"eventBusComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(ImmutableProofService);\n\t} else if (instanceConfig.type === ImmutableProofComponentType.RestClient) {\n\t\tcomponent = new ImmutableProofRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ImmutableProofRestClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"immutableProof.js","sourceRoot":"","sources":["../../../src/components/immutableProof.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAEN,qBAAqB,EACrB,UAAU,IAAI,wBAAwB,EACtC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACtD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAM7C,IAAI,SAA+C,CAAC;IACpD,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,OAAO,EAAE,CAAC;QACjE,wBAAwB,EAAE,CAAC;QAE3B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,+BAA+B,oBAEvD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;YACpE,aAAa,CAAC,IAAI;YAClB,aAAa,CAAC,MAAM;SACpB,CAAC,CACF,CAAC;QAEF,SAAS,GAAG,IAAI,qBAAqB,CAAC;YACrC,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,4BAA4B,CAAC;YACzF,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;YAChF,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,2BAA2B,EAAE,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;YAC5F,qBAAqB,EAAE,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;YACxF,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,4BAAyC,CAAC;IACvD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport type { IImmutableProofComponent } from \"@twin.org/immutable-proof-models\";\nimport { ImmutableProofRestClient } from \"@twin.org/immutable-proof-rest-client\";\nimport {\n\ttype ImmutableProof,\n\tImmutableProofService,\n\tinitSchema as initSchemaImmutableProof\n} from \"@twin.org/immutable-proof-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { ImmutableProofComponentConfig } from \"../models/config/immutableProofComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { ImmutableProofComponentType } from \"../models/types/immutableProofComponentType.js\";\n\n/**\n * Initialise the immutable proof component.\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 async function initialiseImmutableProofComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: ImmutableProofComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IImmutableProofComponent | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === ImmutableProofComponentType.Service) {\n\t\tinitSchemaImmutableProof();\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.immutableProofEntityStorageType,\n\t\t\tnameof<ImmutableProof>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\tContextIdKeys.Node,\n\t\t\t\tContextIdKeys.Tenant\n\t\t\t])\n\t\t);\n\n\t\tcomponent = new ImmutableProofService({\n\t\t\tverifiableStorageType: engineCore.getRegisteredInstanceType(\"verifiableStorageConnector\"),\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\teventBusComponentType: engineCore.getRegisteredInstanceTypeOptional(\"eventBusComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(ImmutableProofService);\n\t} else if (instanceConfig.type === ImmutableProofComponentType.RestClient) {\n\t\tcomponent = new ImmutableProofRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ImmutableProofRestClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
package/docs/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @twin.org/engine-types - Changelog
2
2
 
3
+ ## [0.0.3-next.9](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.3-next.8...engine-types-v0.0.3-next.9) (2026-01-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * inject logging into immutable proof ([#60](https://github.com/twinfoundation/engine/issues/60)) ([8d0bc86](https://github.com/twinfoundation/engine/commit/8d0bc86c01502e9c9031471834ee3da824c18b27))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-core bumped from 0.0.3-next.8 to 0.0.3-next.9
16
+ * @twin.org/engine-models bumped from 0.0.3-next.8 to 0.0.3-next.9
17
+
3
18
  ## [0.0.3-next.8](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.3-next.7...engine-types-v0.0.3-next.8) (2026-01-06)
4
19
 
5
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.3-next.8",
3
+ "version": "0.0.3-next.9",
4
4
  "description": "Types to use in an engine.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,8 +54,8 @@
54
54
  "@twin.org/document-management-models": "next",
55
55
  "@twin.org/document-management-rest-client": "next",
56
56
  "@twin.org/document-management-service": "next",
57
- "@twin.org/engine-core": "0.0.3-next.8",
58
- "@twin.org/engine-models": "0.0.3-next.8",
57
+ "@twin.org/engine-core": "0.0.3-next.9",
58
+ "@twin.org/engine-models": "0.0.3-next.9",
59
59
  "@twin.org/entity": "next",
60
60
  "@twin.org/entity-storage-connector-cosmosdb": "next",
61
61
  "@twin.org/entity-storage-connector-dynamodb": "next",