@twin.org/engine 0.0.1-next.72 → 0.0.1-next.74
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/cjs/index.cjs
CHANGED
|
@@ -66,6 +66,7 @@ class Engine extends engineCore.EngineCore {
|
|
|
66
66
|
this.addTypeInitialiser("dataExtractorConnector", this._context.config.types.dataExtractorConnector, "@twin.org/engine-types", "initialiseDataExtractorConnector");
|
|
67
67
|
this.addTypeInitialiser("dataProcessingComponent", this._context.config.types.dataProcessingComponent, "@twin.org/engine-types", "initialiseDataProcessingComponent");
|
|
68
68
|
this.addTypeInitialiser("documentManagementComponent", this._context.config.types.documentManagementComponent, "@twin.org/engine-types", "initialiseDocumentManagementComponent");
|
|
69
|
+
this.addTypeInitialiser("federatedCatalogueComponent", this._context.config.types.federatedCatalogueComponent, "@twin.org/engine-types", "initialiseFederatedCatalogueComponent");
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
@@ -152,6 +153,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
152
153
|
configureAuditableItemGraph(coreConfig);
|
|
153
154
|
configureAuditableItemStream(coreConfig);
|
|
154
155
|
configureDocumentManagement(coreConfig);
|
|
156
|
+
configureFederatedCatalogue(coreConfig, envVars);
|
|
155
157
|
return coreConfig;
|
|
156
158
|
}
|
|
157
159
|
/**
|
|
@@ -918,6 +920,25 @@ function configureDocumentManagement(coreConfig, envVars) {
|
|
|
918
920
|
});
|
|
919
921
|
}
|
|
920
922
|
}
|
|
923
|
+
/**
|
|
924
|
+
* Configures the federated catalogue.
|
|
925
|
+
* @param coreConfig The core config.
|
|
926
|
+
* @param envVars The environment variables.
|
|
927
|
+
*/
|
|
928
|
+
function configureFederatedCatalogue(coreConfig, envVars) {
|
|
929
|
+
if (core.Is.arrayValue(coreConfig.types.identityResolverComponent)) {
|
|
930
|
+
coreConfig.types.federatedCatalogueComponent ??= [];
|
|
931
|
+
coreConfig.types.federatedCatalogueComponent.push({
|
|
932
|
+
type: engineTypes.FederatedCatalogueComponentType.Service,
|
|
933
|
+
options: {
|
|
934
|
+
config: {
|
|
935
|
+
subResourceCacheTtlMs: core.Coerce.number(envVars.federatedCatalogueCacheTtlMs),
|
|
936
|
+
clearingHouseApproverList: core.Coerce.object(envVars.federatedCatalogueClearingHouseApproverList) ?? []
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}
|
|
921
942
|
|
|
922
943
|
exports.Engine = Engine;
|
|
923
944
|
exports.EngineConfigHelper = EngineConfigHelper;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EngineCore } from '@twin.org/engine-core';
|
|
2
2
|
import { Guards, StringHelper, Is, Coerce } from '@twin.org/core';
|
|
3
|
-
import { EntityStorageComponentType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, WalletConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityConnectorType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType } from '@twin.org/engine-types';
|
|
3
|
+
import { EntityStorageComponentType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, WalletConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityConnectorType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType, FederatedCatalogueComponentType } from '@twin.org/engine-types';
|
|
4
4
|
import { EntitySchemaFactory } from '@twin.org/entity';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
|
|
@@ -64,6 +64,7 @@ class Engine extends EngineCore {
|
|
|
64
64
|
this.addTypeInitialiser("dataExtractorConnector", this._context.config.types.dataExtractorConnector, "@twin.org/engine-types", "initialiseDataExtractorConnector");
|
|
65
65
|
this.addTypeInitialiser("dataProcessingComponent", this._context.config.types.dataProcessingComponent, "@twin.org/engine-types", "initialiseDataProcessingComponent");
|
|
66
66
|
this.addTypeInitialiser("documentManagementComponent", this._context.config.types.documentManagementComponent, "@twin.org/engine-types", "initialiseDocumentManagementComponent");
|
|
67
|
+
this.addTypeInitialiser("federatedCatalogueComponent", this._context.config.types.federatedCatalogueComponent, "@twin.org/engine-types", "initialiseFederatedCatalogueComponent");
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -150,6 +151,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
150
151
|
configureAuditableItemGraph(coreConfig);
|
|
151
152
|
configureAuditableItemStream(coreConfig);
|
|
152
153
|
configureDocumentManagement(coreConfig);
|
|
154
|
+
configureFederatedCatalogue(coreConfig, envVars);
|
|
153
155
|
return coreConfig;
|
|
154
156
|
}
|
|
155
157
|
/**
|
|
@@ -916,5 +918,24 @@ function configureDocumentManagement(coreConfig, envVars) {
|
|
|
916
918
|
});
|
|
917
919
|
}
|
|
918
920
|
}
|
|
921
|
+
/**
|
|
922
|
+
* Configures the federated catalogue.
|
|
923
|
+
* @param coreConfig The core config.
|
|
924
|
+
* @param envVars The environment variables.
|
|
925
|
+
*/
|
|
926
|
+
function configureFederatedCatalogue(coreConfig, envVars) {
|
|
927
|
+
if (Is.arrayValue(coreConfig.types.identityResolverComponent)) {
|
|
928
|
+
coreConfig.types.federatedCatalogueComponent ??= [];
|
|
929
|
+
coreConfig.types.federatedCatalogueComponent.push({
|
|
930
|
+
type: FederatedCatalogueComponentType.Service,
|
|
931
|
+
options: {
|
|
932
|
+
config: {
|
|
933
|
+
subResourceCacheTtlMs: Coerce.number(envVars.federatedCatalogueCacheTtlMs),
|
|
934
|
+
clearingHouseApproverList: Coerce.object(envVars.federatedCatalogueClearingHouseApproverList) ?? []
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
}
|
|
919
940
|
|
|
920
941
|
export { Engine, EngineConfigHelper, buildEngineConfiguration };
|
|
@@ -362,4 +362,12 @@ export interface IEngineEnvironmentVariables {
|
|
|
362
362
|
* The type of the default data extractor, can be a comma separated list: json-path.
|
|
363
363
|
*/
|
|
364
364
|
dataExtractorConnectors?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Federated catalog TTL for the cache.
|
|
367
|
+
*/
|
|
368
|
+
federatedCatalogueCacheTtlMs?: number;
|
|
369
|
+
/**
|
|
370
|
+
* Federated catalog clearing house approver list, stringified array of DIDs.
|
|
371
|
+
*/
|
|
372
|
+
federatedCatalogueClearingHouseApproverList?: string;
|
|
365
373
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @twin.org/engine - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.74](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.73...engine-v0.0.1-next.74) (2025-05-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add federated catalogue ([1b15dd0](https://github.com/twinfoundation/engine/commit/1b15dd059a11446457651c411a73145fab37f025))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/engine-core bumped from 0.0.1-next.73 to 0.0.1-next.74
|
|
16
|
+
* @twin.org/engine-types bumped from 0.0.1-next.73 to 0.0.1-next.74
|
|
17
|
+
|
|
18
|
+
## [0.0.1-next.73](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.72...engine-v0.0.1-next.73) (2025-05-22)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
* **engine:** Synchronize repo versions
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @twin.org/engine-core bumped from 0.0.1-next.72 to 0.0.1-next.73
|
|
31
|
+
* @twin.org/engine-types bumped from 0.0.1-next.72 to 0.0.1-next.73
|
|
32
|
+
|
|
3
33
|
## [0.0.1-next.72](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.71...engine-v0.0.1-next.72) (2025-05-06)
|
|
4
34
|
|
|
5
35
|
|
|
@@ -721,3 +721,19 @@ The type of the default data converters, can be a comma separated list: json, xm
|
|
|
721
721
|
> `optional` **dataExtractorConnectors**: `string`
|
|
722
722
|
|
|
723
723
|
The type of the default data extractor, can be a comma separated list: json-path.
|
|
724
|
+
|
|
725
|
+
***
|
|
726
|
+
|
|
727
|
+
### federatedCatalogueCacheTtlMs?
|
|
728
|
+
|
|
729
|
+
> `optional` **federatedCatalogueCacheTtlMs**: `number`
|
|
730
|
+
|
|
731
|
+
Federated catalog TTL for the cache.
|
|
732
|
+
|
|
733
|
+
***
|
|
734
|
+
|
|
735
|
+
### federatedCatalogueClearingHouseApproverList?
|
|
736
|
+
|
|
737
|
+
> `optional` **federatedCatalogueClearingHouseApproverList**: `string`
|
|
738
|
+
|
|
739
|
+
Federated catalog clearing house approver list, stringified array of DIDs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.74",
|
|
4
4
|
"description": "Engine implementation.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/engine-core": "0.0.1-next.
|
|
19
|
-
"@twin.org/engine-types": "0.0.1-next.
|
|
18
|
+
"@twin.org/engine-core": "0.0.1-next.74",
|
|
19
|
+
"@twin.org/engine-types": "0.0.1-next.74",
|
|
20
20
|
"@twin.org/entity": "next"
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/cjs/index.cjs",
|