@thi.ng/system 3.1.46 → 3.1.48

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-02-19T20:59:58Z
3
+ - **Last updated**: 2025-02-21T21:54:17Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -11,6 +11,14 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
11
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
12
  and/or version bumps of transitive dependencies.
13
13
 
14
+ ### [3.1.47](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.1.47) (2025-02-21)
15
+
16
+ #### ♻️ Refactoring
17
+
18
+ - switch use of `Promise` to `MaybePromise` ([59b3ae1](https://github.com/thi-ng/umbrella/commit/59b3ae1))
19
+ - update `ILifeCycle` and `ComponentFactory` to not require async
20
+ - update tests
21
+
14
22
  ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.1.0) (2024-03-09)
15
23
 
16
24
  #### 🚀 Features
package/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Fn, Keys } from "@thi.ng/api";
1
+ import type { Fn, Keys, MaybePromise } from "@thi.ng/api";
2
2
  import type { System } from "./system.js";
3
3
  export interface ILifecycle<T extends SystemMap<T> = any> {
4
4
  /**
@@ -15,7 +15,7 @@ export interface ILifecycle<T extends SystemMap<T> = any> {
15
15
  * components will be stopped (see {@link ILifecycle.stop}) in reverse
16
16
  * order.
17
17
  */
18
- start?(sys: System<T>): Promise<boolean>;
18
+ start?(sys: System<T>): MaybePromise<boolean>;
19
19
  /**
20
20
  * Similar to {@link ILifecycle.start} but for stopping components.
21
21
  *
@@ -23,7 +23,7 @@ export interface ILifecycle<T extends SystemMap<T> = any> {
23
23
  * {@link ILifecycle.start}, returning false will **not** stop the shutdown
24
24
  * of other components.
25
25
  */
26
- stop?(sys: System<T>): Promise<boolean>;
26
+ stop?(sys: System<T>): MaybePromise<boolean>;
27
27
  [id: string]: any;
28
28
  }
29
29
  /**
@@ -34,7 +34,7 @@ export type SystemMap<T> = Record<Keys<T>, ILifecycle>;
34
34
  /**
35
35
  * Async system component initialization function.
36
36
  */
37
- export type ComponentFactory<T extends SystemMap<T>> = Fn<T, Promise<ILifecycle>>;
37
+ export type ComponentFactory<T extends SystemMap<T>> = Fn<T, MaybePromise<ILifecycle>>;
38
38
  export interface SystemSpec<T extends SystemMap<T>> {
39
39
  /**
40
40
  * Async system component initialization function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/system",
3
- "version": "3.1.46",
3
+ "version": "3.1.48",
4
4
  "description": "Minimal and explicit dependency-injection & lifecycle container for stateful app components",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@thi.ng/api": "^8.11.21",
46
- "@thi.ng/dgraph": "^2.1.149",
46
+ "@thi.ng/dgraph": "^2.1.151",
47
47
  "@thi.ng/logger": "^3.1.2"
48
48
  },
49
49
  "devDependencies": {
@@ -88,5 +88,5 @@
88
88
  "thi.ng": {
89
89
  "year": 2020
90
90
  },
91
- "gitHead": "bee617702ac61d093465b967f8f973dc566faa6b\n"
91
+ "gitHead": "5084790092321b8654373237225c5f428f092782\n"
92
92
  }