@rootintf/protocol-2phw 0.7.1 → 1.0.28-api-0.8
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/README.md +1 -1
- package/dev.txt +7 -0
- package/dist/twoPhW.cjs.js +1225 -799
- package/dist/twoPhW.es.mjs +1218 -798
- package/jasmine.json +6 -6
- package/package.json +43 -42
- package/rollup.config.mjs +23 -23
- package/schema/definitions_2PhW.json +12 -0
- package/schema/schema_MsgEngage.json +20 -11
- package/schema/schema_MsgOptions.json +11 -10
- package/schema/schema_MsgWarp.json +21 -19
- package/schema/schema_Options_delay.json +16 -16
- package/src/EventLog-mem.mjs +136 -0
- package/src/ajv-gen-validate.cjs +39 -23
- package/src/twoPhW.mjs +813 -582
- package/src/validate-esm.mjs +1 -1
- package/tests/event-log-mem.spec.mjs +234 -0
- package/tests/twoPhW-new.spec.mjs +824 -173
- package/tests/twoPhW.test.mjs +175 -175
- package/schema/schema_Msg2PhW.json +0 -12
package/jasmine.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"spec_dir": "tests",
|
|
3
|
-
"spec_files": [
|
|
4
|
-
"**/*[sS]pec.?(m)js",
|
|
5
|
-
"!**/*nospec.js"
|
|
6
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"spec_dir": "tests",
|
|
3
|
+
"spec_files": [
|
|
4
|
+
"**/*[sS]pec.?(m)js",
|
|
5
|
+
"!**/*nospec.js"
|
|
6
|
+
]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rootintf/protocol-2phw",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/twoPhW.cjs.js",
|
|
6
|
-
"browser": "dist/twoPhW.es.mjs",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "node src/ajv-gen-validate.cjs && rollup --config",
|
|
9
|
-
"script": "node --experimental-json-modules tests/twoPhW.test.mjs",
|
|
10
|
-
"test": "jasmine --config=jasmine.json",
|
|
11
|
-
"clean": "del dist && del src/validate-esm.mjs && echo OK"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://gitlab.com/interface-x/npm-protocol-2PhW.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"metaverse",
|
|
19
|
-
"warp",
|
|
20
|
-
"protocol"
|
|
21
|
-
],
|
|
22
|
-
"author": "K.Nevelsteen, PhD",
|
|
23
|
-
"license": "ISC",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://gitlab.com/interface-x/npm-protocol-2PhW.git/-/issues"
|
|
26
|
-
},
|
|
27
|
-
"homepage": "https://gitlab.com/interface-x/npm-protocol-2PhW.git#readme",
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@knev/bitlogr": "^0.
|
|
30
|
-
"@rootintf/json-msg": "^
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@rollup/plugin-
|
|
35
|
-
"@rollup/plugin-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@rootintf/protocol-2phw",
|
|
3
|
+
"version": "1.0.28-api-0.8",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/twoPhW.cjs.js",
|
|
6
|
+
"browser": "dist/twoPhW.es.mjs",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "node src/ajv-gen-validate.cjs && rollup --config",
|
|
9
|
+
"script": "node --experimental-json-modules tests/twoPhW.test.mjs",
|
|
10
|
+
"test": "jasmine --config=jasmine.json",
|
|
11
|
+
"clean": "del-cli dist && del-cli src/validate-esm.mjs && echo OK"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://gitlab.com/interface-x/npm-protocol-2PhW.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"metaverse",
|
|
19
|
+
"warp",
|
|
20
|
+
"protocol"
|
|
21
|
+
],
|
|
22
|
+
"author": "K.Nevelsteen, PhD",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://gitlab.com/interface-x/npm-protocol-2PhW.git/-/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://gitlab.com/interface-x/npm-protocol-2PhW.git#readme",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@knev/bitlogr": "^2.0.11",
|
|
30
|
+
"@rootintf/json-msg": "^1.1.1",
|
|
31
|
+
"ajv": "^8.17.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
35
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
36
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
37
|
+
"ajv-cli": "^5.0.0",
|
|
38
|
+
"del-cli": "^6.0.0",
|
|
39
|
+
"jasmine": "^5.6.0",
|
|
40
|
+
"rollup": "^4.39.0",
|
|
41
|
+
"uuid": "^11.1.0"
|
|
42
|
+
}
|
|
43
|
+
}
|
package/rollup.config.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
3
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
4
|
-
import json from '@rollup/plugin-json';
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
{
|
|
8
|
-
input: 'src/twoPhW.mjs',
|
|
9
|
-
output: {
|
|
10
|
-
file: 'dist/twoPhW.es.mjs',
|
|
11
|
-
format: 'es'
|
|
12
|
-
},
|
|
13
|
-
plugins: [resolve(), commonjs(), json()]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
input: 'src/twoPhW.mjs',
|
|
17
|
-
output: {
|
|
18
|
-
file: 'dist/twoPhW.cjs.js',
|
|
19
|
-
format: 'cjs'
|
|
20
|
-
},
|
|
21
|
-
plugins: [resolve(), commonjs(), json()]
|
|
22
|
-
}
|
|
23
|
-
|
|
1
|
+
|
|
2
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
3
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
4
|
+
import json from '@rollup/plugin-json';
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
{
|
|
8
|
+
input: 'src/twoPhW.mjs',
|
|
9
|
+
output: {
|
|
10
|
+
file: 'dist/twoPhW.es.mjs',
|
|
11
|
+
format: 'es'
|
|
12
|
+
},
|
|
13
|
+
plugins: [resolve(), commonjs(), json()]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
input: 'src/twoPhW.mjs',
|
|
17
|
+
output: {
|
|
18
|
+
file: 'dist/twoPhW.cjs.js',
|
|
19
|
+
format: 'cjs'
|
|
20
|
+
},
|
|
21
|
+
plugins: [resolve(), commonjs(), json()]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
24
|
];
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "
|
|
3
|
-
"$schema": "
|
|
4
|
-
"type" : "object",
|
|
5
|
-
"required" : ["engage"],
|
|
6
|
-
"properties" : {
|
|
7
|
-
"engage" : {
|
|
8
|
-
"type" : "object",
|
|
9
|
-
"required" : ["
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
{
|
|
2
|
+
"$id" : "https://root-interface.se/protocols/2PhW/schema_MsgEngage",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
4
|
+
"type" : "object",
|
|
5
|
+
"required" : ["engage"],
|
|
6
|
+
"properties" : {
|
|
7
|
+
"engage" : {
|
|
8
|
+
"type" : "object",
|
|
9
|
+
"required" : [ "ok", "rtt_msec" ],
|
|
10
|
+
"properties": {
|
|
11
|
+
"ok" : {
|
|
12
|
+
"type" : "boolean"
|
|
13
|
+
},
|
|
14
|
+
"rtt_msec" : {
|
|
15
|
+
"type" : "integer"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"2PhW" : { "$ref": "definitions_2PhW#/definitions/2PhW" }
|
|
20
|
+
}
|
|
12
21
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "
|
|
3
|
-
"$schema": "
|
|
4
|
-
"type" : "object",
|
|
5
|
-
"required" : ["options"],
|
|
6
|
-
"properties" : {
|
|
7
|
-
"options" : {
|
|
8
|
-
"type" : "object"
|
|
9
|
-
}
|
|
10
|
-
|
|
1
|
+
{
|
|
2
|
+
"$id" : "https://root-interface.se/protocols/2PhW/schema_MsgOptions",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
4
|
+
"type" : "object",
|
|
5
|
+
"required" : ["options"],
|
|
6
|
+
"properties" : {
|
|
7
|
+
"options" : {
|
|
8
|
+
"type" : "object"
|
|
9
|
+
},
|
|
10
|
+
"2PhW" : { "$ref": "definitions_2PhW#/definitions/2PhW" }
|
|
11
|
+
}
|
|
11
12
|
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "
|
|
3
|
-
"$schema": "
|
|
4
|
-
"type" : "object",
|
|
5
|
-
"required" : ["warp"],
|
|
6
|
-
"properties" : {
|
|
7
|
-
"warp" : {
|
|
8
|
-
"type" : "object",
|
|
9
|
-
"required" : ["user", "hyperport"],
|
|
10
|
-
"properties": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
{
|
|
2
|
+
"$id" : "https://root-interface.se/protocols/2PhW/schema_MsgWarp",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
4
|
+
"type" : "object",
|
|
5
|
+
"required" : ["warp"],
|
|
6
|
+
"properties" : {
|
|
7
|
+
"warp" : {
|
|
8
|
+
"type" : "object",
|
|
9
|
+
"required" : ["id", "user", "hyperport", "ttl_msec"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"id" : { "$ref": "definitions_2PhW#/definitions/warp_id" },
|
|
12
|
+
"ttl_msec" : {
|
|
13
|
+
"type" : "integer"
|
|
14
|
+
},
|
|
15
|
+
"instantaneous" : {
|
|
16
|
+
"type" : "boolean"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"2PhW" : { "$ref": "definitions_2PhW#/definitions/2PhW" }
|
|
21
|
+
}
|
|
20
22
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "
|
|
3
|
-
"$schema": "
|
|
4
|
-
"type" : "object",
|
|
5
|
-
"required" : ["ttl_msec_incr"],
|
|
6
|
-
"properties" : {
|
|
7
|
-
"ttl_msec_incr" : {
|
|
8
|
-
"type" : "array",
|
|
9
|
-
"items": {
|
|
10
|
-
"type" : "integer"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"reason" : {
|
|
14
|
-
"type" : "string"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$id" : "https://root-interface.se/protocols/2PhW/schema_Options_delay",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
4
|
+
"type" : "object",
|
|
5
|
+
"required" : ["ttl_msec_incr"],
|
|
6
|
+
"properties" : {
|
|
7
|
+
"ttl_msec_incr" : {
|
|
8
|
+
"type" : "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type" : "integer"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"reason" : {
|
|
14
|
+
"type" : "string"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
17
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
|
|
2
|
+
import { LOGR } from '@knev/bitlogr';
|
|
3
|
+
|
|
4
|
+
//-------------------------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
let LOGR_= LOGR.get_instance();
|
|
7
|
+
const log_= LOGR_.log;
|
|
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
|
+
|
|
18
|
+
|
|
19
|
+
//-------------------------------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
class EventLog {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.arr_events = []; // In-memory event store
|
|
24
|
+
this.map_index_id = new Map(); // Map of id -> array of indices into arr_events; arr_events[idx]
|
|
25
|
+
this.map_timeouts = new Map(); // Store timeout references: idx -> timeout_id
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
addEvent(type, id, data, timeout_ms = null, timeout_callback = null) {
|
|
29
|
+
const evt = {
|
|
30
|
+
type,
|
|
31
|
+
dt: Date.now(),
|
|
32
|
+
id,
|
|
33
|
+
data,
|
|
34
|
+
timeout_id: null // Will store timeout reference if set
|
|
35
|
+
};
|
|
36
|
+
const idx = this.arr_events.push(evt) - 1; // More efficient than .length before push
|
|
37
|
+
|
|
38
|
+
let arr_indices = this.map_index_id.get(id);
|
|
39
|
+
if (! arr_indices) {
|
|
40
|
+
arr_indices = [];
|
|
41
|
+
this.map_index_id.set(id, arr_indices);
|
|
42
|
+
}
|
|
43
|
+
arr_indices.push(idx);
|
|
44
|
+
|
|
45
|
+
// Set timeout if specified
|
|
46
|
+
if (timeout_ms && timeout_callback) {
|
|
47
|
+
evt.timeout_id = setTimeout(() => {
|
|
48
|
+
if (this.map_timeouts.delete(idx)) {
|
|
49
|
+
evt.timeout_id = null;
|
|
50
|
+
timeout_callback(evt);
|
|
51
|
+
log_(l_.EVENTS, `Event DELETED[${idx}]: ${type}`, evt);
|
|
52
|
+
}
|
|
53
|
+
}, timeout_ms);
|
|
54
|
+
|
|
55
|
+
this.map_timeouts.set(idx, evt.timeout_id);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
log_(l_.EVENTS, `Event added[${idx}] @${Date(evt.dt).toISOString()}: ${type}`, evt);
|
|
59
|
+
return { idx, evt };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
cancelTimeout(idx) {
|
|
63
|
+
const timeout_id = this.map_timeouts.get(idx);
|
|
64
|
+
if (timeout_id) {
|
|
65
|
+
clearTimeout(timeout_id);
|
|
66
|
+
this.map_timeouts.delete(idx);
|
|
67
|
+
if (this.arr_events[idx])
|
|
68
|
+
this.arr_events[idx].timeout_id = null;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
cancelAllTimeouts() {
|
|
75
|
+
for (const [idx, timeout_id] of this.map_timeouts) {
|
|
76
|
+
clearTimeout(timeout_id);
|
|
77
|
+
if (this.arr_events[idx])
|
|
78
|
+
this.arr_events[idx].timeout_id = null;
|
|
79
|
+
}
|
|
80
|
+
this.map_timeouts.clear();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
getEventById(id, lookback_ms = null) {
|
|
84
|
+
const arr_indices = this.map_index_id.get(id);
|
|
85
|
+
if (!arr_indices?.length) return [];
|
|
86
|
+
|
|
87
|
+
const result = [];
|
|
88
|
+
const cutoff = lookback_ms !== null ? Date.now() - lookback_ms : -Infinity;
|
|
89
|
+
|
|
90
|
+
// Single loop with early cutoff
|
|
91
|
+
for (let i = arr_indices.length - 1; i >= 0; i--) {
|
|
92
|
+
const idx = arr_indices[i];
|
|
93
|
+
const evt = this.arr_events[idx];
|
|
94
|
+
if (evt.dt < cutoff)
|
|
95
|
+
break;
|
|
96
|
+
result.push({ idx, evt });
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return result; // Newest to oldest order
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// getRecentEvents(id, lookbackMs) {
|
|
103
|
+
// const cutoff = Date.now() - lookbackMs;
|
|
104
|
+
// return this.events.filter(e => e.id === id && e.dt >= cutoff);
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
getEvents(lookback_ms, predicate) {
|
|
108
|
+
const cutoff = Date.now() - lookback_ms;
|
|
109
|
+
const result = [];
|
|
110
|
+
|
|
111
|
+
// Iterate backwards from the end
|
|
112
|
+
for (let idx = this.arr_events.length - 1; idx >= 0; idx--) {
|
|
113
|
+
const evt = this.arr_events[idx];
|
|
114
|
+
if (evt.dt < cutoff) {
|
|
115
|
+
break; // Stop once we pass the cutoff
|
|
116
|
+
}
|
|
117
|
+
if (predicate(evt)) {
|
|
118
|
+
result.push({ idx, evt });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return result; // Newest to oldest order
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// setLogr(obj_logr) {
|
|
126
|
+
// this.logr.toggled = obj_logr;
|
|
127
|
+
// }
|
|
128
|
+
|
|
129
|
+
clear() {
|
|
130
|
+
this.cancelAllTimeouts(); // Clear all timeouts before clearing events
|
|
131
|
+
this.arr_events.length = 0;
|
|
132
|
+
this.map_index_id.clear();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { l_ as l, EventLog };
|
package/src/ajv-gen-validate.cjs
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
// and `#/definitions/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var json_definitions_2PhW_= require('../schema/definitions_2PhW.json');
|
|
4
|
+
var json_schema_msgWarp_= require('../schema/schema_MsgWarp.json');
|
|
5
|
+
var json_schema_msgEngage_= require('../schema/schema_MsgEngage.json');
|
|
6
|
+
var json_schema_msgOptions_= require('../schema/schema_MsgOptions.json');
|
|
7
|
+
var json_schema_options_delay_= require('../schema/schema_Options_delay.json');
|
|
8
|
+
|
|
9
|
+
// https://ajv.js.org/standalone.html
|
|
10
|
+
|
|
11
|
+
const fs = require("fs")
|
|
12
|
+
const path = require("path")
|
|
13
|
+
const Ajv2019 = require("ajv/dist/2019");
|
|
14
|
+
const standaloneCode = require("ajv/dist/standalone").default
|
|
15
|
+
|
|
16
|
+
// For ESM, the export name needs to be a valid export name, it can not be `export const #/definitions/Foo = ...;` so we
|
|
17
|
+
// need to provide a mapping between a valid name and the $id field. Below will generate
|
|
18
|
+
// `export const Foo = ...;export const Bar = ...;`
|
|
19
|
+
// This mapping would not have been needed if the `$ids` was just `Bar` and `Foo` instead of `#/definitions/Foo`
|
|
20
|
+
// and `#/definitions/Bar` respectfully
|
|
21
|
+
const ajv = new Ajv2019({
|
|
22
|
+
schemas: [
|
|
23
|
+
json_definitions_2PhW_,
|
|
24
|
+
json_schema_msgWarp_,
|
|
25
|
+
json_schema_msgEngage_,
|
|
26
|
+
json_schema_msgOptions_,
|
|
27
|
+
json_schema_options_delay_
|
|
28
|
+
],
|
|
29
|
+
code: {source: true, esm: true}
|
|
30
|
+
});
|
|
31
|
+
let moduleCode = standaloneCode(ajv, {
|
|
32
|
+
"definitions_2PhW": "https://root-interface.se/protocols/2PhW/definitions_2PhW",
|
|
33
|
+
"schema_MsgWarp": "https://root-interface.se/protocols/2PhW/schema_MsgWarp",
|
|
34
|
+
"schema_MsgEngage": "https://root-interface.se/protocols/2PhW/schema_MsgEngage",
|
|
35
|
+
"schema_MsgOptions": "https://root-interface.se/protocols/2PhW/schema_MsgOptions",
|
|
36
|
+
"schema_Options_delay": "https://root-interface.se/protocols/2PhW/schema_Options_delay",
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// Now you can write the module code to file
|
|
24
40
|
fs.writeFileSync(path.join(__dirname, "./validate-esm.mjs"), moduleCode)
|