@rootintf/protocol-subverseinfo 2.0.1-api.4 → 2.0.3-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootintf/protocol-subverseinfo",
3
- "version": "2.0.1-api.4",
3
+ "version": "2.0.3-api.4",
4
4
  "description": "",
5
5
  "main": "dist/subverseinfo.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "homepage": "https://gitlab.com/interface-x/npm-protocol-subverseinfo.git#readme",
26
26
  "dependencies": {
27
- "@knev/bitlogr": "^2.0.11",
28
- "@rootintf/json-msg": "^2.0.6",
27
+ "@knev/bitlogr": "^3.1.3",
28
+ "@rootintf/json-msg": "^2.1.6",
29
29
  "ajv": "^8.17.1",
30
30
  "uuid": "^11.0.3"
31
31
  },
@@ -7,28 +7,23 @@ import {
7
7
  } from './validate-esm.mjs';
8
8
 
9
9
  import { LOGR, l_LL } from '@knev/bitlogr';
10
- import { JSON_Msg, JSON_MsgEffect, l as l_json_msg_ } from '@rootintf/json-msg';
10
+ import { JSON_Msg, JSON_MsgEffect, logr as logr_ } from '@rootintf/json-msg';
11
11
 
12
- let LOGR_= LOGR.get_instance();
13
- const log_ = LOGR_.log;
12
+ const kstr_VERSION= "4";
13
+ // windows: $ certutil -hashfile schema/schema_Slogr_json_msg_.json Slogr_json_msg_ODO: needs to be a canonical text file: line endings, encoding, whitespace, sorting, redundant data, comments
14
+ const kstr_SubverseInfo_uri= "SubverseInfo:SHA256:f1fb09af477be5fbb7d014ff738fa62637680dacf0ca85ec76d2891518d6efaa";
14
15
 
15
- Object.assign(l_json_msg_, l_LL(l_json_msg_, 2)); // VALIDATION : 4
16
+ // TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
16
17
 
17
- const l_= {
18
- VALIDATION : 0b1 << 2, //4
19
- }
20
- LOGR_.labels= l_;
18
+ //-------------------------------------------------------------------------------------------------
21
19
 
22
- LOGR_.toggled= {
23
- // VALIDATION : true
24
- }
20
+ const LOGR_= LOGR.get_instance();
25
21
 
26
- const kstr_VERSION= "4";
27
- // windows: $ certutil -hashfile schema/schema_SubverseInfo.json SHA256
28
- // TODO: needs to be a canonical text file: line endings, encoding, whitespace, sorting, redundant data, comments
29
- const kstr_SubverseInfo_uri= "SubverseInfo:SHA256:f1fb09af477be5fbb7d014ff738fa62637680dacf0ca85ec76d2891518d6efaa";
22
+ const obj_labels_shift_= l_LL(logr_.lref.get(), 2); // VALIDATION : 4
23
+ logr_.lref.set(obj_labels_shift_);
24
+ const l_= logr_.l;
30
25
 
31
- // TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
26
+ //-------------------------------------------------------------------------------------------------
32
27
 
33
28
  // const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
34
29
 
@@ -45,7 +40,7 @@ var JSON_MsgSubverseInfo_query = (function() {
45
40
  // return false;
46
41
 
47
42
  if (! schema_SubverseInfo_query_(json)) {
48
- log_(l_.VALIDATION, () => ['schema_SubverseInfo_query_: validate: ', (schema_SubverseInfo_query_ as any).errors])
43
+ logr_.log(l_.VALIDATION, () => ['schema_SubverseInfo_query_: validate: ', (schema_SubverseInfo_query_ as any).errors])
49
44
  return false;
50
45
  }
51
46
 
@@ -80,7 +75,7 @@ var JSON_MsgSubverseInfo_subverse = (function() {
80
75
  return false;
81
76
 
82
77
  if (! schema_SubverseInfo_subverse_(json_msg)) {
83
- log_(l_.VALIDATION, () => ['JSON_SubverseInfo_expanse: validate: ', (schema_SubverseInfo_subverse_ as any).errors])
78
+ logr_.log(l_.VALIDATION, () => ['JSON_SubverseInfo_expanse: validate: ', (schema_SubverseInfo_subverse_ as any).errors])
84
79
  return false;
85
80
  }
86
81
  return true;
@@ -105,7 +100,7 @@ var JSON_MsgSubverseInfo_instances = (function() {
105
100
  return false;
106
101
 
107
102
  if (! schema_SubverseInfo_instances_(json_msg)) {
108
- log_(l_.VALIDATION, () => ['JSON_SubverseInfo_instances: validate: ', (schema_SubverseInfo_instances_ as any).errors])
103
+ logr_.log(l_.VALIDATION, () => ['JSON_SubverseInfo_instances: validate: ', (schema_SubverseInfo_instances_ as any).errors])
109
104
  return false;
110
105
  }
111
106
  return true;
@@ -119,5 +114,5 @@ export {
119
114
  JSON_MsgSubverseInfo_query,
120
115
  JSON_MsgSubverseInfo_subverse,
121
116
  JSON_MsgSubverseInfo_instances,
122
- l_ as l
117
+ logr_ as logr
123
118
  }
@@ -15,7 +15,7 @@ import {
15
15
  JSON_MsgSubverseInfo_query,
16
16
  JSON_MsgSubverseInfo_subverse,
17
17
  JSON_MsgSubverseInfo_instances,
18
- l as l_
18
+ logr as logr_
19
19
  } from '../dist/subverseinfo.es.mjs';
20
20
 
21
21
  import { LOGR, l_LL } from '@knev/bitlogr';
@@ -25,11 +25,13 @@ const kstr_VERSION = "4"
25
25
  //-------------------------------------------------------------------------------------------------
26
26
 
27
27
  const LOGR_= LOGR.get_instance();
28
+ const l_= logr_.l;
28
29
 
29
- LOGR_.labels= l_;
30
- LOGR_.toggled= {
30
+ console.log('const l_', l_.get());
31
+
32
+ LOGR_.toggle(l_, {
31
33
  // VALIDATION : true
32
- }
34
+ });
33
35
 
34
36
  //-------------------------------------------------------------------------------------------------
35
37
 
@@ -165,7 +167,7 @@ describe("Validate expanse;", function () {
165
167
  expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(false); // missing "name"
166
168
  });
167
169
 
168
- fit("create_with_msg_merge- json_MsgSubverseInfo_query_incomplete", function () {
170
+ it("create_with_msg_merge- json_MsgSubverseInfo_query_incomplete", function () {
169
171
  let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(json_MsgSubverseInfo_query_incomplete, {
170
172
  expanse : {
171
173
  subverse: {