@rootintf/json-msg 3.0.5 → 4.0.2-api.4
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/json-msg.cjs.js +8 -8
- package/dist/json-msg.es.mjs +8 -8
- package/dist/json_msg+ack.d.ts +6 -6
- package/package.json +58 -58
package/dist/json-msg.cjs.js
CHANGED
|
@@ -47,7 +47,7 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
47
47
|
}
|
|
48
48
|
} validate18.errors = vErrors; return errors === 0; }
|
|
49
49
|
validate18.evaluated = { "props": { "id": true, "dt": true }, "dynamicProps": false, "dynamicItems": false };
|
|
50
|
-
const
|
|
50
|
+
const schema_Eff = validate19;
|
|
51
51
|
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
|
|
52
52
|
evaluated0.props = undefined;
|
|
53
53
|
} if (evaluated0.dynamicItems) {
|
|
@@ -190,7 +190,7 @@ var JSON_Msg = (function () {
|
|
|
190
190
|
// }
|
|
191
191
|
};
|
|
192
192
|
})();
|
|
193
|
-
var
|
|
193
|
+
var JSON_Eff = (function () {
|
|
194
194
|
return {
|
|
195
195
|
create_with_cause_merge: function (msg_cause, json) {
|
|
196
196
|
const _cause = msg_cause;
|
|
@@ -199,9 +199,9 @@ var JSON_Efkt = (function () {
|
|
|
199
199
|
validate: function (json) {
|
|
200
200
|
if (!JSON_Msg.validate(json))
|
|
201
201
|
return false;
|
|
202
|
-
const b_valid =
|
|
202
|
+
const b_valid = schema_Eff(json);
|
|
203
203
|
if (!b_valid)
|
|
204
|
-
logr_.log(l_.VALIDATION, () => ['
|
|
204
|
+
logr_.log(l_.VALIDATION, () => ['JSON_Eff: validate: ', schema_Eff.errors]);
|
|
205
205
|
return b_valid;
|
|
206
206
|
}
|
|
207
207
|
};
|
|
@@ -209,14 +209,14 @@ var JSON_Efkt = (function () {
|
|
|
209
209
|
var JSON_Ack = (function () {
|
|
210
210
|
return {
|
|
211
211
|
create_with_cause_Ok: function (msg_cause, b_ok = true) {
|
|
212
|
-
return
|
|
212
|
+
return JSON_Eff.create_with_cause_merge(msg_cause, {
|
|
213
213
|
ack: {
|
|
214
214
|
"ok": b_ok,
|
|
215
215
|
},
|
|
216
216
|
});
|
|
217
217
|
},
|
|
218
218
|
create_with_cause_Expired: function (msg_cause) {
|
|
219
|
-
return
|
|
219
|
+
return JSON_Eff.create_with_cause_merge(msg_cause, {
|
|
220
220
|
ack: {
|
|
221
221
|
"ok": false,
|
|
222
222
|
"expired": true
|
|
@@ -224,7 +224,7 @@ var JSON_Ack = (function () {
|
|
|
224
224
|
});
|
|
225
225
|
},
|
|
226
226
|
validate: function (json) {
|
|
227
|
-
if (!
|
|
227
|
+
if (!JSON_Eff.validate(json))
|
|
228
228
|
return false;
|
|
229
229
|
const b_valid = schema_Ack(json);
|
|
230
230
|
if (!b_valid)
|
|
@@ -235,6 +235,6 @@ var JSON_Ack = (function () {
|
|
|
235
235
|
})();
|
|
236
236
|
|
|
237
237
|
exports.JSON_Ack = JSON_Ack;
|
|
238
|
-
exports.
|
|
238
|
+
exports.JSON_Eff = JSON_Eff;
|
|
239
239
|
exports.JSON_Msg = JSON_Msg;
|
|
240
240
|
exports.logr = logr_;
|
package/dist/json-msg.es.mjs
CHANGED
|
@@ -45,7 +45,7 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
45
45
|
}
|
|
46
46
|
} validate18.errors = vErrors; return errors === 0; }
|
|
47
47
|
validate18.evaluated = { "props": { "id": true, "dt": true }, "dynamicProps": false, "dynamicItems": false };
|
|
48
|
-
const
|
|
48
|
+
const schema_Eff = validate19;
|
|
49
49
|
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
|
|
50
50
|
evaluated0.props = undefined;
|
|
51
51
|
} if (evaluated0.dynamicItems) {
|
|
@@ -188,7 +188,7 @@ var JSON_Msg = (function () {
|
|
|
188
188
|
// }
|
|
189
189
|
};
|
|
190
190
|
})();
|
|
191
|
-
var
|
|
191
|
+
var JSON_Eff = (function () {
|
|
192
192
|
return {
|
|
193
193
|
create_with_cause_merge: function (msg_cause, json) {
|
|
194
194
|
const _cause = msg_cause;
|
|
@@ -197,9 +197,9 @@ var JSON_Efkt = (function () {
|
|
|
197
197
|
validate: function (json) {
|
|
198
198
|
if (!JSON_Msg.validate(json))
|
|
199
199
|
return false;
|
|
200
|
-
const b_valid =
|
|
200
|
+
const b_valid = schema_Eff(json);
|
|
201
201
|
if (!b_valid)
|
|
202
|
-
logr_.log(l_.VALIDATION, () => ['
|
|
202
|
+
logr_.log(l_.VALIDATION, () => ['JSON_Eff: validate: ', schema_Eff.errors]);
|
|
203
203
|
return b_valid;
|
|
204
204
|
}
|
|
205
205
|
};
|
|
@@ -207,14 +207,14 @@ var JSON_Efkt = (function () {
|
|
|
207
207
|
var JSON_Ack = (function () {
|
|
208
208
|
return {
|
|
209
209
|
create_with_cause_Ok: function (msg_cause, b_ok = true) {
|
|
210
|
-
return
|
|
210
|
+
return JSON_Eff.create_with_cause_merge(msg_cause, {
|
|
211
211
|
ack: {
|
|
212
212
|
"ok": b_ok,
|
|
213
213
|
},
|
|
214
214
|
});
|
|
215
215
|
},
|
|
216
216
|
create_with_cause_Expired: function (msg_cause) {
|
|
217
|
-
return
|
|
217
|
+
return JSON_Eff.create_with_cause_merge(msg_cause, {
|
|
218
218
|
ack: {
|
|
219
219
|
"ok": false,
|
|
220
220
|
"expired": true
|
|
@@ -222,7 +222,7 @@ var JSON_Ack = (function () {
|
|
|
222
222
|
});
|
|
223
223
|
},
|
|
224
224
|
validate: function (json) {
|
|
225
|
-
if (!
|
|
225
|
+
if (!JSON_Eff.validate(json))
|
|
226
226
|
return false;
|
|
227
227
|
const b_valid = schema_Ack(json);
|
|
228
228
|
if (!b_valid)
|
|
@@ -232,4 +232,4 @@ var JSON_Ack = (function () {
|
|
|
232
232
|
};
|
|
233
233
|
})();
|
|
234
234
|
|
|
235
|
-
export { JSON_Ack,
|
|
235
|
+
export { JSON_Ack, JSON_Eff, JSON_Msg, logr_ as logr };
|
package/dist/json_msg+ack.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ interface JSON_Msg {
|
|
|
4
4
|
referer: unknown;
|
|
5
5
|
dt: string;
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
7
|
+
interface JSON_Eff extends JSON_Msg {
|
|
8
8
|
_cause: JSON_Msg;
|
|
9
9
|
}
|
|
10
|
-
interface JSON_Ack extends
|
|
10
|
+
interface JSON_Ack extends JSON_Eff {
|
|
11
11
|
ack: {
|
|
12
12
|
ok: boolean;
|
|
13
13
|
expired?: boolean;
|
|
@@ -17,13 +17,13 @@ declare var JSON_Msg: {
|
|
|
17
17
|
merge: <T extends object>(json: T) => JSON_Msg & T;
|
|
18
18
|
validate: (json: unknown) => json is JSON_Msg;
|
|
19
19
|
};
|
|
20
|
-
declare var
|
|
21
|
-
create_with_cause_merge: <T extends object>(msg_cause: JSON_Msg, json: T) =>
|
|
22
|
-
validate: (json: unknown) => json is
|
|
20
|
+
declare var JSON_Eff: {
|
|
21
|
+
create_with_cause_merge: <T extends object>(msg_cause: JSON_Msg, json: T) => JSON_Eff & T;
|
|
22
|
+
validate: (json: unknown) => json is JSON_Eff;
|
|
23
23
|
};
|
|
24
24
|
declare var JSON_Ack: {
|
|
25
25
|
create_with_cause_Ok: (msg_cause: JSON_Msg, b_ok?: boolean) => JSON_Ack;
|
|
26
26
|
create_with_cause_Expired: (msg_cause: JSON_Msg) => JSON_Ack;
|
|
27
27
|
validate: (json: unknown) => json is JSON_Ack;
|
|
28
28
|
};
|
|
29
|
-
export { JSON_Msg,
|
|
29
|
+
export { JSON_Msg, JSON_Eff, JSON_Ack, logr_ as logr };
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rootintf/json-msg",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/json-msg.cjs.js",
|
|
6
|
-
"module": "dist/json-msg.es.mjs",
|
|
7
|
-
"browser": "dist/json-msg.es.mjs",
|
|
8
|
-
"types": "dist/json_msg+ack.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/json_msg+ack.d.ts",
|
|
12
|
-
"import": "./dist/json-msg.es.mjs",
|
|
13
|
-
"require": "./dist/json-msg.cjs.js"
|
|
14
|
-
},
|
|
15
|
-
"./package.json": "./package.json"
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist/json-msg.cjs.js",
|
|
19
|
-
"dist/json-msg.es.mjs",
|
|
20
|
-
"dist/json_msg+ack.d.ts"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "node src/ajv-gen-validate.cjs && rollup --config",
|
|
24
|
-
"script": "node --experimental-json-modules tests/json-msg.test.mjs",
|
|
25
|
-
"test": "jasmine --config=jasmine.json",
|
|
26
|
-
"clean": "del-cli dist && del-cli src/validate-esm.mjs && echo OK"
|
|
27
|
-
},
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://gitlab.com/interface-x/npm-json-msg.git"
|
|
31
|
-
},
|
|
32
|
-
"keywords": [
|
|
33
|
-
"json"
|
|
34
|
-
],
|
|
35
|
-
"author": "K.Nevelsteen, PhD",
|
|
36
|
-
"license": "ISC",
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://gitlab.com/interface-x/npm-json-msg.git/-/issues"
|
|
39
|
-
},
|
|
40
|
-
"homepage": "https://gitlab.com/interface-x/npm-json-msg.git#readme",
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@knev/bitlogr": "^3.4.8",
|
|
43
|
-
"ajv": "^8.17.1",
|
|
44
|
-
"uuid": "^14.0.1"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@rollup/plugin-commonjs": "^29.0.0",
|
|
48
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
50
|
-
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
-
"@types/node": "^24.10.1",
|
|
52
|
-
"del-cli": "^7.0.0",
|
|
53
|
-
"jasmine": "^6.3.0",
|
|
54
|
-
"rollup": "^4.53.3",
|
|
55
|
-
"tslib": "^2.8.1",
|
|
56
|
-
"typescript": "^5.9.3"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@rootintf/json-msg",
|
|
3
|
+
"version": "4.0.2-api.4",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/json-msg.cjs.js",
|
|
6
|
+
"module": "dist/json-msg.es.mjs",
|
|
7
|
+
"browser": "dist/json-msg.es.mjs",
|
|
8
|
+
"types": "dist/json_msg+ack.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/json_msg+ack.d.ts",
|
|
12
|
+
"import": "./dist/json-msg.es.mjs",
|
|
13
|
+
"require": "./dist/json-msg.cjs.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/json-msg.cjs.js",
|
|
19
|
+
"dist/json-msg.es.mjs",
|
|
20
|
+
"dist/json_msg+ack.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "node src/ajv-gen-validate.cjs && rollup --config",
|
|
24
|
+
"script": "node --experimental-json-modules tests/json-msg.test.mjs",
|
|
25
|
+
"test": "jasmine --config=jasmine.json",
|
|
26
|
+
"clean": "del-cli dist && del-cli src/validate-esm.mjs && echo OK"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://gitlab.com/interface-x/npm-json-msg.git"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"json"
|
|
34
|
+
],
|
|
35
|
+
"author": "K.Nevelsteen, PhD",
|
|
36
|
+
"license": "ISC",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://gitlab.com/interface-x/npm-json-msg.git/-/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://gitlab.com/interface-x/npm-json-msg.git#readme",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@knev/bitlogr": "^3.4.8",
|
|
43
|
+
"ajv": "^8.17.1",
|
|
44
|
+
"uuid": "^14.0.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
48
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
50
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
+
"@types/node": "^24.10.1",
|
|
52
|
+
"del-cli": "^7.0.0",
|
|
53
|
+
"jasmine": "^6.3.0",
|
|
54
|
+
"rollup": "^4.53.3",
|
|
55
|
+
"tslib": "^2.8.1",
|
|
56
|
+
"typescript": "^5.9.3"
|
|
57
|
+
}
|
|
58
|
+
}
|