@rootintf/protocol-2phw 1.3.3-api.1 → 2.1.5-api.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.
- package/dist/EventLog-mem.d.mts +2 -5
- package/dist/twoPhW.cjs.js +640 -414
- package/dist/twoPhW.d.ts +31 -31
- package/dist/twoPhW.es.mjs +640 -414
- package/package.json +6 -6
- package/schema/schema_2PhW.json +1 -1
- package/src/EventLog-mem.mjs +9 -15
- package/src/index.ts +1 -1
- package/src/twoPhW.ts +110 -110
- package/src/validate-esm.mjs +1 -1
- package/tests/event-log-mem.spec.mjs +9 -4
- package/tests/twoPhW-new.spec.mjs +74 -55
- package/dist/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rootintf/protocol-2phw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.5-api.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/twoPhW.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,10 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://gitlab.com/interface-x/npm-protocol-2PhW.git#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@knev/bitlogr": "^
|
|
31
|
-
"@rootintf/json-msg": "^
|
|
32
|
-
"ajv": "^8.17.1"
|
|
33
|
-
"tslib": "^2.8.1"
|
|
30
|
+
"@knev/bitlogr": "^3.1.3",
|
|
31
|
+
"@rootintf/json-msg": "^2.1.6",
|
|
32
|
+
"ajv": "^8.17.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -41,8 +40,9 @@
|
|
|
41
40
|
"@types/node": "^24.10.1",
|
|
42
41
|
"ajv-cli": "^5.0.0",
|
|
43
42
|
"del-cli": "^7.0.0",
|
|
44
|
-
"jasmine": "^5.
|
|
43
|
+
"jasmine": "^5.13.0",
|
|
45
44
|
"rollup": "^4.53.3",
|
|
45
|
+
"tslib": "^2.8.1",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"uuid": "^13.0.0"
|
|
48
48
|
}
|
package/schema/schema_2PhW.json
CHANGED
package/src/EventLog-mem.mjs
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import { LOGR } from '@knev/bitlogr';
|
|
2
|
+
import { LOGR, l_array } from '@knev/bitlogr';
|
|
3
3
|
|
|
4
4
|
//-------------------------------------------------------------------------------------------------
|
|
5
5
|
|
|
6
6
|
let LOGR_= LOGR.get_instance();
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const l_= {
|
|
10
|
-
EVENTS : 0b1 << 0,
|
|
11
|
-
TIMEOUTS : 0b1 << 1,
|
|
12
|
-
}
|
|
13
|
-
LOGR_.labels= l_;
|
|
14
|
-
// LOGR_.toggled= {
|
|
15
|
-
// EVENTS : 1
|
|
16
|
-
// }
|
|
17
|
-
|
|
7
|
+
const logr_= LOGR_.create({ labels: l_array(['LOG_EVENTS', 'TIMEOUTS']) });
|
|
8
|
+
const l_= logr_.l;
|
|
18
9
|
|
|
19
10
|
//-------------------------------------------------------------------------------------------------
|
|
20
11
|
|
|
@@ -48,7 +39,7 @@ class EventLog {
|
|
|
48
39
|
if (this.map_timeouts.delete(idx)) {
|
|
49
40
|
evt.timeout_id = null;
|
|
50
41
|
timeout_callback({idx, evt});
|
|
51
|
-
|
|
42
|
+
logr_.log(l_.LOG_EVENTS, () => [`Event DELETED[${idx}]: ${type}`, evt]);
|
|
52
43
|
}
|
|
53
44
|
}, timeout_ms);
|
|
54
45
|
|
|
@@ -58,7 +49,7 @@ class EventLog {
|
|
|
58
49
|
// the error "toISOString is not a function" occurs because Date(evt.dt) is not doing what you expect.
|
|
59
50
|
// When you pass a number to the Date constructor without using new, it doesn’t return a Date object—it returns a string. Specifically, it’s equivalent to new Date(evt.dt).toString().
|
|
60
51
|
// Date(evt.dt).toISOString() -> new Date(evt.dt).toISOString()
|
|
61
|
-
|
|
52
|
+
logr_.log(l_.LOG_EVENTS, () => [`Event added[${idx}] @${new Date(evt.dt).toISOString()}: ${type}`, evt]);
|
|
62
53
|
return { idx, evt };
|
|
63
54
|
}
|
|
64
55
|
|
|
@@ -136,4 +127,7 @@ class EventLog {
|
|
|
136
127
|
}
|
|
137
128
|
}
|
|
138
129
|
|
|
139
|
-
export {
|
|
130
|
+
export {
|
|
131
|
+
EventLog,
|
|
132
|
+
logr_ as logr
|
|
133
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
// export * from '@rootintf/json-msg'; // Re-export
|