@twin.org/engine 0.0.1-next.76 → 0.0.1-next.78
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
|
@@ -87,7 +87,7 @@ class EngineConfigHelper {
|
|
|
87
87
|
* @param engineConfig The engine configuration.
|
|
88
88
|
* @param entityTypeName The entity type name.
|
|
89
89
|
* @param entitySchema The entity schema.
|
|
90
|
-
* @param restPath The rest path to serve the entity storage from.
|
|
90
|
+
* @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
|
|
91
91
|
* @param options Additional options.
|
|
92
92
|
* @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
|
|
93
93
|
* @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
|
|
@@ -96,7 +96,6 @@ class EngineConfigHelper {
|
|
|
96
96
|
core.Guards.object(EngineConfigHelper.CLASS_NAME, "engineConfig", engineConfig);
|
|
97
97
|
core.Guards.stringValue(EngineConfigHelper.CLASS_NAME, "entityTypeName", entityTypeName);
|
|
98
98
|
core.Guards.object(EngineConfigHelper.CLASS_NAME, "entitySchema", entitySchema);
|
|
99
|
-
core.Guards.stringValue(EngineConfigHelper.CLASS_NAME, "restPath", restPath);
|
|
100
99
|
engineConfig.types.entityStorageComponent ??= [];
|
|
101
100
|
entity.EntitySchemaFactory.register(entityTypeName, () => entitySchema);
|
|
102
101
|
engineConfig.types.entityStorageComponent.push({
|
|
@@ -404,7 +403,9 @@ function configureBlobStorage(coreConfig, envVars) {
|
|
|
404
403
|
type: engineTypes.BlobStorageComponentType.Service,
|
|
405
404
|
options: {
|
|
406
405
|
config: {
|
|
407
|
-
vaultKeyId: envVars.
|
|
406
|
+
vaultKeyId: (envVars.blobStorageEnableEncryption ?? false)
|
|
407
|
+
? envVars.blobStorageEncryptionKey
|
|
408
|
+
: undefined
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
411
|
});
|
package/dist/esm/index.mjs
CHANGED
|
@@ -85,7 +85,7 @@ class EngineConfigHelper {
|
|
|
85
85
|
* @param engineConfig The engine configuration.
|
|
86
86
|
* @param entityTypeName The entity type name.
|
|
87
87
|
* @param entitySchema The entity schema.
|
|
88
|
-
* @param restPath The rest path to serve the entity storage from.
|
|
88
|
+
* @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
|
|
89
89
|
* @param options Additional options.
|
|
90
90
|
* @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
|
|
91
91
|
* @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
|
|
@@ -94,7 +94,6 @@ class EngineConfigHelper {
|
|
|
94
94
|
Guards.object(EngineConfigHelper.CLASS_NAME, "engineConfig", engineConfig);
|
|
95
95
|
Guards.stringValue(EngineConfigHelper.CLASS_NAME, "entityTypeName", entityTypeName);
|
|
96
96
|
Guards.object(EngineConfigHelper.CLASS_NAME, "entitySchema", entitySchema);
|
|
97
|
-
Guards.stringValue(EngineConfigHelper.CLASS_NAME, "restPath", restPath);
|
|
98
97
|
engineConfig.types.entityStorageComponent ??= [];
|
|
99
98
|
EntitySchemaFactory.register(entityTypeName, () => entitySchema);
|
|
100
99
|
engineConfig.types.entityStorageComponent.push({
|
|
@@ -402,7 +401,9 @@ function configureBlobStorage(coreConfig, envVars) {
|
|
|
402
401
|
type: BlobStorageComponentType.Service,
|
|
403
402
|
options: {
|
|
404
403
|
config: {
|
|
405
|
-
vaultKeyId: envVars.
|
|
404
|
+
vaultKeyId: (envVars.blobStorageEnableEncryption ?? false)
|
|
405
|
+
? envVars.blobStorageEncryptionKey
|
|
406
|
+
: undefined
|
|
406
407
|
}
|
|
407
408
|
}
|
|
408
409
|
});
|
|
@@ -13,12 +13,12 @@ export declare class EngineConfigHelper {
|
|
|
13
13
|
* @param engineConfig The engine configuration.
|
|
14
14
|
* @param entityTypeName The entity type name.
|
|
15
15
|
* @param entitySchema The entity schema.
|
|
16
|
-
* @param restPath The rest path to serve the entity storage from.
|
|
16
|
+
* @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
|
|
17
17
|
* @param options Additional options.
|
|
18
18
|
* @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
|
|
19
19
|
* @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
|
|
20
20
|
*/
|
|
21
|
-
static addCustomEntityStorage<T>(engineConfig: IEngineConfig, entityTypeName: string, entitySchema: IEntitySchema<T>, restPath
|
|
21
|
+
static addCustomEntityStorage<T>(engineConfig: IEngineConfig, entityTypeName: string, entitySchema: IEntitySchema<T>, restPath?: string, options?: {
|
|
22
22
|
includeNodeIdentity?: boolean;
|
|
23
23
|
includeUserIdentity?: true;
|
|
24
24
|
}): void;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @twin.org/engine - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.78](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.77...engine-v0.0.1-next.78) (2025-06-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* blob storage encryption settings ([63ee879](https://github.com/twinfoundation/engine/commit/63ee87904d2be205d8fe2fa11b536790a0d22082))
|
|
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.77 to 0.0.1-next.78
|
|
16
|
+
* @twin.org/engine-types bumped from 0.0.1-next.77 to 0.0.1-next.78
|
|
17
|
+
|
|
18
|
+
## [0.0.1-next.77](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.76...engine-v0.0.1-next.77) (2025-06-18)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* addCustomEntityStorage optional rest path ([55f42c5](https://github.com/twinfoundation/engine/commit/55f42c568945f010eb8883e27fb385d2c30eebff))
|
|
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.76 to 0.0.1-next.77
|
|
31
|
+
* @twin.org/engine-types bumped from 0.0.1-next.76 to 0.0.1-next.77
|
|
32
|
+
|
|
3
33
|
## [0.0.1-next.76](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.75...engine-v0.0.1-next.76) (2025-06-12)
|
|
4
34
|
|
|
5
35
|
|
|
@@ -24,7 +24,7 @@ Runtime name for the class.
|
|
|
24
24
|
|
|
25
25
|
### addCustomEntityStorage()
|
|
26
26
|
|
|
27
|
-
> `static` **addCustomEntityStorage**\<`T`\>(`engineConfig`, `entityTypeName`, `entitySchema`, `restPath
|
|
27
|
+
> `static` **addCustomEntityStorage**\<`T`\>(`engineConfig`, `entityTypeName`, `entitySchema`, `restPath?`, `options?`): `void`
|
|
28
28
|
|
|
29
29
|
Add a custom entity storage to the engine configuration.
|
|
30
30
|
|
|
@@ -54,11 +54,11 @@ The entity type name.
|
|
|
54
54
|
|
|
55
55
|
The entity schema.
|
|
56
56
|
|
|
57
|
-
##### restPath
|
|
57
|
+
##### restPath?
|
|
58
58
|
|
|
59
59
|
`string`
|
|
60
60
|
|
|
61
|
-
The rest path to serve the entity storage from.
|
|
61
|
+
The rest path to serve the entity storage from, leave undefined for no endpoints.
|
|
62
62
|
|
|
63
63
|
##### options?
|
|
64
64
|
|
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.78",
|
|
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.78",
|
|
19
|
+
"@twin.org/engine-types": "0.0.1-next.78",
|
|
20
20
|
"@twin.org/entity": "next"
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/cjs/index.cjs",
|