@3sixty/engine 0.20.0-next.0 → 0.20.0-next.2

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.
@@ -79,6 +79,16 @@
79
79
  "module": "@3sixty/engine-types",
80
80
  "method": "initialiseMetricsCollectorComponent"
81
81
  },
82
+ {
83
+ "type": "authorizationConnector",
84
+ "module": "@3sixty/engine-types",
85
+ "method": "initialiseAuthorizationConnector"
86
+ },
87
+ {
88
+ "type": "authorizationComponent",
89
+ "module": "@3sixty/engine-types",
90
+ "method": "initialiseAuthorizationComponent"
91
+ },
82
92
  {
83
93
  "type": "automationComponent",
84
94
  "module": "@3sixty/engine-types",
@@ -1 +1 @@
1
- {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AAI1E,OAAO,oBAAoB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE1F;;GAEG;AACH,MAAM,OAAO,MAGX,SAAQ,UAAgB;IACzB;;OAEG;IACI,MAAM,CAAU,UAAU,YAA4B;IAE7D;;;OAGG;IACH,YAAY,OAAkC;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAChC,CAAC;IAED;;;OAGG;IACK,uBAAuB;QAC9B,KAAK,MAAM,WAAW,IAAI,oBAAoB,EAAE,CAAC;YAChD,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACnF,CAAC;IACF,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EngineCore, type IEngineCoreOptions } from \"@3sixty/engine-core\";\nimport type { IEngineState } from \"@3sixty/engine-models\";\nimport type { IEngineConfig } from \"@3sixty/engine-types\";\nimport { nameof } from \"@3sixty/nameof\";\nimport coreTypeInitialisers from \"./data/coreTypeInitialisers.json\" with { type: \"json\" };\n\n/**\n * The engine with built in types.\n */\nexport class Engine<\n\tC extends IEngineConfig = IEngineConfig,\n\tS extends IEngineState = IEngineState\n> extends EngineCore<C, S> {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<Engine>();\n\n\t/**\n\t * Create a new instance of Engine.\n\t * @param options The options for the engine.\n\t */\n\tconstructor(options?: IEngineCoreOptions<C, S>) {\n\t\tsuper(options);\n\n\t\tthis.addCoreTypeInitialisers();\n\t}\n\n\t/**\n\t * Add the core type initializers.\n\t * @internal\n\t */\n\tprivate addCoreTypeInitialisers(): void {\n\t\tfor (const initializer of coreTypeInitialisers) {\n\t\t\tthis.addTypeInitialiser(initializer.type, initializer.module, initializer.method);\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"engine.js","sources":["../../src/engine.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AAI1E,OAAO,oBAAoB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE1F;;GAEG;AACH,MAAM,OAAO,MAGX,SAAQ,UAAgB;IACzB;;OAEG;IACI,MAAM,CAAU,UAAU,GAAW,QAAQ,CAAC;IAErD;;;OAGG;IACH,YAAY,OAAkC;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAChC,CAAC;IAED;;;OAGG;IACK,uBAAuB;QAC9B,KAAK,MAAM,WAAW,IAAI,oBAAoB,EAAE,CAAC;YAChD,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACnF,CAAC;IACF,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EngineCore, type IEngineCoreOptions } from \"@3sixty/engine-core\";\nimport type { IEngineState } from \"@3sixty/engine-models\";\nimport type { IEngineConfig } from \"@3sixty/engine-types\";\n\nimport coreTypeInitialisers from \"./data/coreTypeInitialisers.json\" with { type: \"json\" };\n\n/**\n * The engine with built in types.\n */\nexport class Engine<\n\tC extends IEngineConfig = IEngineConfig,\n\tS extends IEngineState = IEngineState\n> extends EngineCore<C, S> {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = \"Engine\";\n\n\t/**\n\t * Create a new instance of Engine.\n\t * @param options The options for the engine.\n\t */\n\tconstructor(options?: IEngineCoreOptions<C, S>) {\n\t\tsuper(options);\n\n\t\tthis.addCoreTypeInitialisers();\n\t}\n\n\t/**\n\t * Add the core type initializers.\n\t * @internal\n\t */\n\tprivate addCoreTypeInitialisers(): void {\n\t\tfor (const initializer of coreTypeInitialisers) {\n\t\t\tthis.addTypeInitialiser(initializer.type, initializer.module, initializer.method);\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./engine.js\";\nexport * from \"./utils/engineConfigHelper.js\";\n"]}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./engine.js\";\nexport * from \"./utils/engineConf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,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Guards, Is, StringHelper } from \"@3sixty/core\";\nimport { EntityStorageComponentType, type IEngineConfig } from \"@3sixty/engine-types\";\nimport { EntitySchemaFactory, type IEntitySchema } from \"@3sixty/entity\";\nimport { nameof } from \"@3sixty/nameof\";\n\n/**\n * Helper methods for engine config.\n */\nexport class EngineConfigHelper {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<EngineConfigHelper>();\n\n\t/**\n\t * Add a custom entity storage to the engine configuration.\n\t * @param engineConfig The engine configuration.\n\t * @param entityTypeName The entity type name.\n\t * @param entitySchema The entity schema.\n\t * @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.\n\t * @param partitionContextIds The context ids to use for partitioning, leave undefined to partition by whichever of the node and tenant keys are registered with the engine when it starts.\n\t */\n\tpublic static addCustomEntityStorage<T>(\n\t\tengineConfig: IEngineConfig,\n\t\tentityTypeName: string,\n\t\tentitySchema: IEntitySchema<T>,\n\t\trestPath?: string,\n\t\tpartitionContextIds?: string[]\n\t): void {\n\t\tGuards.object<IEngineConfig>(EngineConfigHelper.CLASS_NAME, nameof(engineConfig), engineConfig);\n\t\tGuards.stringValue(EngineConfigHelper.CLASS_NAME, nameof(entityTypeName), entityTypeName);\n\t\tGuards.object<IEntitySchema>(EngineConfigHelper.CLASS_NAME, nameof(entitySchema), entitySchema);\n\n\t\tengineConfig.types.entityStorageComponent ??= [];\n\n\t\tEntitySchemaFactory.register(entityTypeName, () => entitySchema);\n\n\t\tengineConfig.types.entityStorageComponent.push({\n\t\t\ttype: EntityStorageComponentType.Service,\n\t\t\toptions: {\n\t\t\t\tentityStorageType: entityTypeName,\n\t\t\t\tpartitionContextIds\n\t\t\t},\n\t\t\toverrideInstanceType: StringHelper.kebabCase(entityTypeName),\n\t\t\trestPath: Is.stringValue(restPath) ? restPath : undefined\n\t\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AAC,CAAC,SAAS;SACzD,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Guards, Is, StringHelper } from \"@3sixty/core\";\nimport { EntityStorageComponentType, type IEngineConfig } from \"@3sixty/engine-types\";\nimport { EntitySchemaFactory, type IEntitySchema } from \"@3sixty/entity\";\n\n\n/**\n * Helper methods for engine config.\n */\nexport class EngineConfigHelper {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = \"EngineConfigHelper\";\n\n\t/**\n\t * Add a custom entity storage to the engine configuration.\n\t * @param engineConfig The engine configuration.\n\t * @param entityTypeName The entity type name.\n\t * @param entitySchema The entity schema.\n\t * @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.\n\t * @param partitionContextIds The context ids to use for partitioning, leave undefined to partition by whichever of the node and tenant keys are registered with the engine when it starts.\n\t */\n\tpublic static addCustomEntityStorage<T>(\n\t\tengineConfig: IEngineConfig,\n\t\tentityTypeName: string,\n\t\tentitySchema: IEntitySchema<T>,\n\t\trestPath?: string,\n\t\tpartitionContextIds?: string[]\n\t): void {\n\t\tGuards.object<IEngineConfig>(EngineConfigHelper.CLASS_NAME, \"engineConfig\", engineConfig);\n\t\tGuards.stringValue(EngineConfigHelper.CLASS_NAME, \"entityTypeName\", entityTypeName);\n\t\tGuards.object<IEntitySchema>(EngineConfigHelper.CLASS_NAME, \"entitySchema\", entitySchema);\n\n\t\tengineConfig.types.entityStorageComponent ??= [];\n\n\t\tEntitySchemaFactory.register(entityTypeName, () => entitySchema);\n\n\t\tengineConfig.types.entityStorageComponent.push({\n\t\t\ttype: EntityStorageComponentType.Service,\n\t\t\toptions: {\n\t\t\t\tentityStorageType: entityTypeName,\n\t\t\t\tpartitionContextIds\n\t\t\t},\n\t\t\toverrideInstanceType: StringHelper.kebabCase(entityTypeName),\n\t\t\trestPath: Is.stringValue(restPath) ? restPath : undefined\n\t\t});\n\t}\n}\n"]}
package/docs/changelog.md CHANGED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ ## [0.20.0-next.2](https://github.com/3sixtyglobal/engine/compare/engine-v0.20.0-next.1...engine-v0.20.0-next.2) (2026-10-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * add authorization ([#23](https://github.com/3sixtyglobal/engine/issues/23)) ([9815628](https://github.com/3sixtyglobal/engine/commit/9815628a7ef6cd79d1b7789c465447c7b29d90a8))
9
+ * updated ts compile ([2bfa964](https://github.com/3sixtyglobal/engine/commit/2bfa9642a97b35ee609c5e19d8bfe0571a1a6319))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @3sixty/engine-core bumped from 0.20.0-next.1 to 0.20.0-next.2
17
+ * @3sixty/engine-models bumped from 0.20.0-next.1 to 0.20.0-next.2
18
+ * @3sixty/engine-types bumped from 0.20.0-next.1 to 0.20.0-next.2
19
+
20
+ ## [0.20.0-next.1](https://github.com/3sixtyglobal/engine/compare/engine-v0.20.0-next.0...engine-v0.20.0-next.1) (2026-10-21)
21
+
22
+
23
+ ### Features
24
+
25
+ * publish packages under the [@3sixty](https://github.com/3sixty) namespace ([d94be8e](https://github.com/3sixtyglobal/engine/commit/d94be8e189d9f53e383bba47599623ef961eca44))
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @3sixty/engine-core bumped from 0.20.0-next.0 to 0.20.0-next.1
33
+ * @3sixty/engine-models bumped from 0.20.0-next.0 to 0.20.0-next.1
34
+ * @3sixty/engine-types bumped from 0.20.0-next.0 to 0.20.0-next.1
@@ -8,11 +8,11 @@ The engine with built in types.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### C
11
+ ### C {#c}
12
12
 
13
13
  `C` *extends* `IEngineConfig` = `IEngineConfig`
14
14
 
15
- ### S
15
+ ### S {#s}
16
16
 
17
17
  `S` *extends* `IEngineState` = `IEngineState`
18
18
 
@@ -30,7 +30,7 @@ Add a custom entity storage to the engine configuration.
30
30
 
31
31
  #### Type Parameters
32
32
 
33
- ##### T
33
+ ##### T {#t}
34
34
 
35
35
  `T`
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3sixty/engine",
3
- "version": "0.20.0-next.0",
3
+ "version": "0.20.0-next.2",
4
4
  "description": "Ready-to-use engine runtime that preloads built-in type initialisers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,11 +14,10 @@
14
14
  "node": ">=24.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@3sixty/context": "next",
18
17
  "@3sixty/core": "next",
19
- "@3sixty/engine-core": "0.20.0-next.0",
20
- "@3sixty/engine-models": "0.20.0-next.0",
21
- "@3sixty/engine-types": "0.20.0-next.0",
18
+ "@3sixty/engine-core": "0.20.0-next.2",
19
+ "@3sixty/engine-models": "0.20.0-next.2",
20
+ "@3sixty/engine-types": "0.20.0-next.2",
22
21
  "@3sixty/entity": "next",
23
22
  "@3sixty/nameof": "next"
24
23
  },