@rootintf/protocol-2phw 0.6.9 → 0.6.11

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.
@@ -89,7 +89,7 @@ var jsonMsg_cjs = {};
89
89
 
90
90
  Object.defineProperty(jsonMsg_cjs, '__esModule', { value: true });
91
91
 
92
- const validate_Msg = validate10;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate10.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.referer !== undefined){const _errs3 = errors;if(typeof data.referer !== "string"){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.dt !== undefined){const _errs5 = errors;if(typeof data.dt !== "string"){validate10.errors = [{instancePath:instancePath+"/dt",schemaPath:"#/properties/dt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}const validate_Msg_msg = validate11;function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data._msg === undefined) && (missing0 = "_msg")){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}const validate_MsgAck = validate12;function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.ack === undefined) && (missing0 = "ack")){validate12.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.ack !== undefined){let data0 = data.ack;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.ok === undefined) && (missing1 = "ok")){validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.ok !== undefined){if(typeof data0.ok !== "boolean"){validate12.errors = [{instancePath:instancePath+"/ack/ok",schemaPath:"#/properties/ack/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}
92
+ const validate_Msg = validate10;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate10.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.referer !== undefined){let data1 = data.referer;const _errs3 = errors;{if(Array.isArray(data1)){if(data1.length > 2){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"}];return false;}else {if(data1.length < 2){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"}];return false;}else {var valid1 = true;const len0 = data1.length;for(let i0=0; i0<len0; i0++){const _errs5 = errors;if(typeof data1[i0] !== "string"){validate10.errors = [{instancePath:instancePath+"/referer/" + i0,schemaPath:"#/properties/referer/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;if(!valid1){break;}}}}}else {validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.dt !== undefined){const _errs7 = errors;if(typeof data.dt !== "string"){validate10.errors = [{instancePath:instancePath+"/dt",schemaPath:"#/properties/dt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}const validate_Msg_msg = validate11;function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data._msg === undefined) && (missing0 = "_msg")){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}const validate_MsgAck = validate12;function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.ack === undefined) && (missing0 = "ack")){validate12.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.ack !== undefined){let data0 = data.ack;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.ok === undefined) && (missing1 = "ok")){validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.ok !== undefined){if(typeof data0.ok !== "boolean"){validate12.errors = [{instancePath:instancePath+"/ack/ok",schemaPath:"#/properties/ack/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}
93
93
 
94
94
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
95
95
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -479,6 +479,11 @@ var JSON_MsgAckWarp = (function() {
479
479
  // json_msgAckWarp._msg= _msg;
480
480
  // return json_msgAckWarp;
481
481
  // }
482
+ create_with_msgOk : function(json_msgWarp, b_ok= true) {
483
+ const json_msgAck= JSON_MsgAck_1.create_with_msgOk(json_msgWarp, b_ok);
484
+ json_msgAck["2PhW"]= k_VERSION;
485
+ return json_msgAck;
486
+ },
482
487
  create_with_msgExpired : function( json_msgWarp ) {
483
488
  const json_msgAck= JSON_MsgAck_1.create_with_msgExpired( json_msgWarp );
484
489
  json_msgAck["2PhW"]= k_VERSION;
@@ -505,6 +510,16 @@ var JSON_MsgAckEngage = (function() {
505
510
  // json_msgAckEngage._msg= _msg;
506
511
  // return json_msgAckEngage;
507
512
  // }
513
+ create_with_msgOk : function(json_msgEngage, b_ok= true) {
514
+ const json_msgAck= JSON_MsgAck_1.create_with_msgOk(json_msgEngage, b_ok);
515
+ json_msgAck["2PhW"]= k_VERSION;
516
+ return json_msgAck;
517
+ },
518
+ create_with_msgExpired : function( json_msgEngage ) {
519
+ const json_msgAck= JSON_MsgAck_1.create_with_msgExpired( json_msgEngage );
520
+ json_msgAck["2PhW"]= k_VERSION;
521
+ return json_msgAck;
522
+ },
508
523
  validate : function(json) {
509
524
  if (! validate_Msg2PhW(json)) {
510
525
  LOGR_.log(l_.VALIDATION, 'JSON_MsgAckEngage: validate_Msg2PhW_: ', validate_Msg2PhW.errors);
@@ -85,7 +85,7 @@ var jsonMsg_cjs = {};
85
85
 
86
86
  Object.defineProperty(jsonMsg_cjs, '__esModule', { value: true });
87
87
 
88
- const validate_Msg = validate10;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate10.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.referer !== undefined){const _errs3 = errors;if(typeof data.referer !== "string"){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.dt !== undefined){const _errs5 = errors;if(typeof data.dt !== "string"){validate10.errors = [{instancePath:instancePath+"/dt",schemaPath:"#/properties/dt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}const validate_Msg_msg = validate11;function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data._msg === undefined) && (missing0 = "_msg")){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}const validate_MsgAck = validate12;function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.ack === undefined) && (missing0 = "ack")){validate12.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.ack !== undefined){let data0 = data.ack;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.ok === undefined) && (missing1 = "ok")){validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.ok !== undefined){if(typeof data0.ok !== "boolean"){validate12.errors = [{instancePath:instancePath+"/ack/ok",schemaPath:"#/properties/ack/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}
88
+ const validate_Msg = validate10;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate10.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.referer !== undefined){let data1 = data.referer;const _errs3 = errors;{if(Array.isArray(data1)){if(data1.length > 2){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"}];return false;}else {if(data1.length < 2){validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"}];return false;}else {var valid1 = true;const len0 = data1.length;for(let i0=0; i0<len0; i0++){const _errs5 = errors;if(typeof data1[i0] !== "string"){validate10.errors = [{instancePath:instancePath+"/referer/" + i0,schemaPath:"#/properties/referer/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;if(!valid1){break;}}}}}else {validate10.errors = [{instancePath:instancePath+"/referer",schemaPath:"#/properties/referer/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.dt !== undefined){const _errs7 = errors;if(typeof data.dt !== "string"){validate10.errors = [{instancePath:instancePath+"/dt",schemaPath:"#/properties/dt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}const validate_Msg_msg = validate11;function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data._msg === undefined) && (missing0 = "_msg")){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}const validate_MsgAck = validate12;function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.ack === undefined) && (missing0 = "ack")){validate12.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.ack !== undefined){let data0 = data.ack;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.ok === undefined) && (missing1 = "ok")){validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.ok !== undefined){if(typeof data0.ok !== "boolean"){validate12.errors = [{instancePath:instancePath+"/ack/ok",schemaPath:"#/properties/ack/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate12.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}
89
89
 
90
90
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
91
91
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -475,6 +475,11 @@ var JSON_MsgAckWarp = (function() {
475
475
  // json_msgAckWarp._msg= _msg;
476
476
  // return json_msgAckWarp;
477
477
  // }
478
+ create_with_msgOk : function(json_msgWarp, b_ok= true) {
479
+ const json_msgAck= JSON_MsgAck_1.create_with_msgOk(json_msgWarp, b_ok);
480
+ json_msgAck["2PhW"]= k_VERSION;
481
+ return json_msgAck;
482
+ },
478
483
  create_with_msgExpired : function( json_msgWarp ) {
479
484
  const json_msgAck= JSON_MsgAck_1.create_with_msgExpired( json_msgWarp );
480
485
  json_msgAck["2PhW"]= k_VERSION;
@@ -501,6 +506,16 @@ var JSON_MsgAckEngage = (function() {
501
506
  // json_msgAckEngage._msg= _msg;
502
507
  // return json_msgAckEngage;
503
508
  // }
509
+ create_with_msgOk : function(json_msgEngage, b_ok= true) {
510
+ const json_msgAck= JSON_MsgAck_1.create_with_msgOk(json_msgEngage, b_ok);
511
+ json_msgAck["2PhW"]= k_VERSION;
512
+ return json_msgAck;
513
+ },
514
+ create_with_msgExpired : function( json_msgEngage ) {
515
+ const json_msgAck= JSON_MsgAck_1.create_with_msgExpired( json_msgEngage );
516
+ json_msgAck["2PhW"]= k_VERSION;
517
+ return json_msgAck;
518
+ },
504
519
  validate : function(json) {
505
520
  if (! validate_Msg2PhW(json)) {
506
521
  LOGR_.log(l_.VALIDATION, 'JSON_MsgAckEngage: validate_Msg2PhW_: ', validate_Msg2PhW.errors);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootintf/protocol-2phw",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "description": "",
5
5
  "main": "dist/twoPhW.cjs.js",
6
6
  "browser": "dist/twoPhW.es.mjs",
@@ -27,7 +27,7 @@
27
27
  "homepage": "https://gitlab.com/interface-x/npm-protocol-2PhW.git#readme",
28
28
  "dependencies": {
29
29
  "@knev/bitlogr": "^0.2.4",
30
- "@rootintf/json-msg": "^0.1.0"
30
+ "@rootintf/json-msg": "^0.2.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@rollup/plugin-commonjs": "^23.0.0",
package/src/twoPhW.mjs CHANGED
@@ -170,6 +170,11 @@ var JSON_MsgAckWarp = (function() {
170
170
  // json_msgAckWarp._msg= _msg;
171
171
  // return json_msgAckWarp;
172
172
  // }
173
+ create_with_msgOk : function(json_msgWarp, b_ok= true) {
174
+ const json_msgAck= JSON_MsgAck.create_with_msgOk(json_msgWarp, b_ok);
175
+ json_msgAck["2PhW"]= k_VERSION;
176
+ return json_msgAck;
177
+ },
173
178
  create_with_msgExpired : function( json_msgWarp ) {
174
179
  const json_msgAck= JSON_MsgAck.create_with_msgExpired( json_msgWarp )
175
180
  json_msgAck["2PhW"]= k_VERSION;
@@ -196,6 +201,16 @@ var JSON_MsgAckEngage = (function() {
196
201
  // json_msgAckEngage._msg= _msg;
197
202
  // return json_msgAckEngage;
198
203
  // }
204
+ create_with_msgOk : function(json_msgEngage, b_ok= true) {
205
+ const json_msgAck= JSON_MsgAck.create_with_msgOk(json_msgEngage, b_ok);
206
+ json_msgAck["2PhW"]= k_VERSION;
207
+ return json_msgAck;
208
+ },
209
+ create_with_msgExpired : function( json_msgEngage ) {
210
+ const json_msgAck= JSON_MsgAck.create_with_msgExpired( json_msgEngage )
211
+ json_msgAck["2PhW"]= k_VERSION;
212
+ return json_msgAck;
213
+ },
199
214
  validate : function(json) {
200
215
  if (! validate_Msg2PhW_(json)) {
201
216
  LOGR_.log(l_.VALIDATION, 'JSON_MsgAckEngage: validate_Msg2PhW_: ', validate_Msg2PhW_.errors)
@@ -15,7 +15,7 @@ console.log('str_uuid_ID_= ' + str_uuid_ID_);
15
15
 
16
16
  const json_msgWarp_ = {
17
17
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
18
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
18
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
19
19
  dt: "2022-10-28T06:26:19.692Z",
20
20
  warp: {
21
21
  user: {},
@@ -27,7 +27,7 @@ const json_msgWarp_ = {
27
27
 
28
28
  const json_msgEngage_ = {
29
29
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
30
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
30
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
31
31
  dt: "2022-10-28T06:26:19.692Z",
32
32
  engage: {
33
33
  user: {},
@@ -38,7 +38,7 @@ const json_msgEngage_ = {
38
38
 
39
39
  const json_msgAckWarp_str_ = {
40
40
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
41
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
41
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
42
42
  dt: "2022-10-28T06:26:19.692Z",
43
43
  ack: {
44
44
  "ok" : true,
@@ -49,7 +49,7 @@ const json_msgAckWarp_str_ = {
49
49
 
50
50
  const json_msgAckWarp_obj_ = {
51
51
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
52
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
52
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
53
53
  dt: "2022-10-28T06:26:19.692Z",
54
54
  ack: {
55
55
  "ok" : true,
@@ -60,7 +60,7 @@ const json_msgAckWarp_obj_ = {
60
60
 
61
61
  const json_msgAckEngage_ = {
62
62
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
63
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
63
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
64
64
  dt: "2022-10-28T06:26:19.692Z",
65
65
  ack: {
66
66
  "ok" : false,
@@ -71,7 +71,7 @@ const json_msgAckEngage_ = {
71
71
 
72
72
  const json_msgOptions_ = {
73
73
  id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
74
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
74
+ referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
75
75
  dt: "2022-10-28T06:26:19.692Z",
76
76
  options: {
77
77
  },
@@ -14,11 +14,11 @@ import { TwoPhW, JSON_MsgOptions, JSON_MsgWarp, JSON_MsgEngage, l as l_2PhW } fr
14
14
 
15
15
  console.log('l_2PhW', l_2PhW, Object.keys(l_2PhW).length);
16
16
 
17
- const recv_str_uuid_ID_ = uuidv4();
18
- console.log('recv_str_uuid_ID_= ' + recv_str_uuid_ID_);
17
+ const recv_referer_= [ "recv", uuidv4()];
18
+ console.log('recv_referer_= ' + recv_referer_);
19
19
 
20
- const send_str_uuid_ID_ = uuidv4();
21
- console.log('send_str_uuid_ID_= ' + send_str_uuid_ID_);
20
+ const send_referer_= [ "send", uuidv4()];
21
+ console.log('send_referer_= ' + send_referer_);
22
22
 
23
23
  var twoPhW_recv_= new TwoPhW();
24
24
  var twoPhW_send_= new TwoPhW();
@@ -102,37 +102,37 @@ function callback_Abort_()
102
102
 
103
103
  //-------------------------------------------------------------------------------------------------
104
104
 
105
- const json_Warp_ = {
106
- id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
107
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
108
- dt: "2022-10-28T06:26:19.692Z",
109
- warp: {
110
- user: {},
111
- hyperport: {},
112
- ttl_msec: 4000
113
- },
114
- "2PhW" : "0.6"
115
- }
116
-
117
- const json_Engage_ = {
118
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
119
- dt: "2022-10-28T06:26:19.692Z",
120
- engage: {
121
- id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
122
- user: {},
123
- hyperport: {}
124
- }
125
- }
126
-
127
- const json_msgWarp_= twoPhW_send_.create_MsgWarp_out(recv_str_uuid_ID_, { "user": "user"}, { "hyperport" : "hyperport" }, 4000);
128
- json_msgWarp_.referer= send_str_uuid_ID_;
105
+ // const json_Warp_ = {
106
+ // id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
107
+ // referer: "af9447e3-4b36-424f-8d07-976a9216a298",
108
+ // dt: "2022-10-28T06:26:19.692Z",
109
+ // warp: {
110
+ // user: {},
111
+ // hyperport: {},
112
+ // ttl_msec: 4000
113
+ // },
114
+ // "2PhW" : "0.6"
115
+ // }
116
+
117
+ // const json_Engage_ = {
118
+ // referer: "af9447e3-4b36-424f-8d07-976a9216a298",
119
+ // dt: "2022-10-28T06:26:19.692Z",
120
+ // engage: {
121
+ // id: "f5d6c2b8-1481-49b2-882c-262bb1c9ef8c",
122
+ // user: {},
123
+ // hyperport: {}
124
+ // }
125
+ // }
126
+
127
+ const json_msgWarp_= twoPhW_send_.create_MsgWarp_out(uuidv4(), { "user": "user"}, { "hyperport" : "hyperport" }, 4000);
128
+ json_msgWarp_.referer= send_referer_;
129
129
 
130
130
  const ttl_warp= json_msgWarp_.warp.ttl_msec;
131
131
 
132
132
  const json_msgOptions= JSON_MsgOptions.create_with_msg_options(json_msgWarp_, {
133
133
  "ttl_msec_incr" : [ ttl_warp, 3000 ]
134
134
  });
135
- json_msgOptions.referer= recv_str_uuid_ID_;
135
+ json_msgOptions.referer= recv_referer_;
136
136
 
137
137
  // https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
138
138
  await new Promise(r => setTimeout(r, 1500));
@@ -145,23 +145,23 @@ twoPhW_send_.handler_msg(json_msgOptions);
145
145
 
146
146
  //-------------------------------------------------------------------------------------------------
147
147
 
148
- const json_Ack_str_ = {
149
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
150
- dt: "2022-10-28T06:26:19.692Z",
151
- ack: {
152
- "ok" : true,
153
- "_msg" : JSON.stringify( json_Warp_ )
154
- }
155
- }
156
-
157
- const json_Ack_obj_ = {
158
- referer: "af9447e3-4b36-424f-8d07-976a9216a298",
159
- dt: "2022-10-28T06:26:19.692Z",
160
- ack: {
161
- "ok" : true,
162
- "_msg" : json_Warp_.warp
163
- }
164
- }
148
+ // const json_Ack_str_ = {
149
+ // referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
150
+ // dt: "2022-10-28T06:26:19.692Z",
151
+ // ack: {
152
+ // "ok" : true,
153
+ // "_msg" : JSON.stringify( json_Warp_ )
154
+ // }
155
+ // }
156
+
157
+ // const json_Ack_obj_ = {
158
+ // referer: ["twoPhW", "af9447e3-4b36-424f-8d07-976a9216a298"],
159
+ // dt: "2022-10-28T06:26:19.692Z",
160
+ // ack: {
161
+ // "ok" : true,
162
+ // "_msg" : json_Warp_.warp
163
+ // }
164
+ // }
165
165
 
166
166
  // twoPhW.handler_msg(json_Ack_str_);
167
167