@thi.ng/system 3.0.12 → 3.1.1

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**: 2024-03-07T20:40:47Z
3
+ - **Last updated**: 2024-03-13T14:04:31Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.1.0) (2024-03-09)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add start/stop logging ([97af706](https://github.com/thi-ng/umbrella/commit/97af706))
17
+
12
18
  ### [3.0.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/system@3.0.3) (2024-02-16)
13
19
 
14
20
  #### ♻️ Refactoring
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/system",
3
- "version": "3.0.12",
3
+ "version": "3.1.1",
4
4
  "description": "Minimal and explicit dependency-injection & lifecycle container for stateful app components",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,16 +39,16 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.9.29",
43
- "@thi.ng/dgraph": "^2.1.105",
44
- "@thi.ng/logger": "^3.0.5"
42
+ "@thi.ng/api": "^8.9.30",
43
+ "@thi.ng/dgraph": "^2.1.106",
44
+ "@thi.ng/logger": "^3.0.6"
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.40.1",
48
- "esbuild": "^0.20.0",
47
+ "@microsoft/api-extractor": "^7.42.3",
48
+ "esbuild": "^0.20.1",
49
49
  "rimraf": "^5.0.5",
50
- "typedoc": "^0.25.7",
51
- "typescript": "^5.3.3"
50
+ "typedoc": "^0.25.12",
51
+ "typescript": "^5.4.2"
52
52
  },
53
53
  "keywords": [
54
54
  "clojure",
@@ -85,5 +85,5 @@
85
85
  "thi.ng": {
86
86
  "year": 2020
87
87
  },
88
- "gitHead": "69100942474942f7446ac645d59d91e7dfc352f9\n"
88
+ "gitHead": "7f3fcbd6c0462b0ce45afa141fe163d1f297fd51\n"
89
89
  }
package/system.js CHANGED
@@ -45,10 +45,13 @@ class System {
45
45
  for (let i = 0; i < topo.length; i++) {
46
46
  const id = topo[i];
47
47
  const comp = this.components[id];
48
- if (comp.start && !await comp.start(this)) {
49
- LOGGER.warn(`error starting component: ${String(id)}`);
50
- await this.__stop(topo, i);
51
- return false;
48
+ if (comp.start) {
49
+ LOGGER.debug("starting:", id);
50
+ if (!await comp.start(this)) {
51
+ LOGGER.warn(`error starting component: ${String(id)}`);
52
+ await this.__stop(topo, i);
53
+ return false;
54
+ }
52
55
  }
53
56
  }
54
57
  return true;
@@ -84,9 +87,12 @@ class System {
84
87
  for (let i = n; i-- > 0; ) {
85
88
  const id = topo[i];
86
89
  const comp = this.components[id];
87
- if (comp.stop && !await comp.stop(this)) {
88
- LOGGER.warn(`error stopping component: ${String(id)}`);
89
- result = false;
90
+ if (comp.stop) {
91
+ LOGGER.debug("stopping:", id);
92
+ if (!await comp.stop(this)) {
93
+ LOGGER.warn(`error stopping component: ${String(id)}`);
94
+ result = false;
95
+ }
90
96
  }
91
97
  }
92
98
  return result;