node-opcua-json 0.9.0 → 0.13.0

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/dist2/index.d.ts CHANGED
@@ -33,4 +33,5 @@ export * from "./json_basic_encoding_decoding_int64";
33
33
  export * from "./json_basic_encoding_decoding_nodeid";
34
34
  export * from "./json_basic_encoding_decoding_statuscode";
35
35
  export * from "./json_basic_encoding_decoding_extension_object";
36
+ export * from "./json_basic_encoding_body_functor";
36
37
  export { opcuaJsonEncodeExtensionObject, opcuaJsonDecodeExtensionObject } from "./json_basic_encoding_decoding_extension_object";
package/dist2/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 114: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 449: (__unused_webpack_module, exports, __nccwpck_require__) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: !0 }),
6
6
  (exports.decodeOPCUA_JSON = exports.decodeOPCUA_JSONOld = void 0);
7
7
  const node_opcua_nodeid_1 = __nccwpck_require__(791),
8
8
  node_opcua_factory_1 = __nccwpck_require__(745),
9
- json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(889);
9
+ json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(822);
10
10
  (exports.decodeOPCUA_JSONOld = function (dataType, pojo) {
11
11
  const Constructor = (0, node_opcua_factory_1.getStandardDataTypeFactory)().findConstructorForDataType(
12
12
  (0, node_opcua_nodeid_1.resolveNodeId)(dataType)
@@ -23,7 +23,7 @@
23
23
  );
24
24
  });
25
25
  },
26
- 370: function (__unused_webpack_module, exports, __nccwpck_require__) {
26
+ 629: function (__unused_webpack_module, exports, __nccwpck_require__) {
27
27
  var __createBinding =
28
28
  (this && this.__createBinding) ||
29
29
  (Object.create
@@ -54,7 +54,7 @@
54
54
  exports.opcuaJsonDecodeVariant =
55
55
  exports.opcuaJsonEncodeVariant =
56
56
  void 0);
57
- var json_basic_encoding_decoding_variant_1 = __nccwpck_require__(349);
57
+ var json_basic_encoding_decoding_variant_1 = __nccwpck_require__(768);
58
58
  Object.defineProperty(exports, "opcuaJsonEncodeVariant", {
59
59
  enumerable: !0,
60
60
  get: function () {
@@ -67,7 +67,7 @@
67
67
  return json_basic_encoding_decoding_variant_1.opcuaJsonDecodeVariant;
68
68
  },
69
69
  });
70
- var json_basic_encoding_decoding_data_value_1 = __nccwpck_require__(373);
70
+ var json_basic_encoding_decoding_data_value_1 = __nccwpck_require__(466);
71
71
  Object.defineProperty(exports, "opcuaJsonEncodeDataValue", {
72
72
  enumerable: !0,
73
73
  get: function () {
@@ -86,16 +86,17 @@
86
86
  return json_basic_encoding_decoding_data_value_1.opcuaJsonEncodeDataValueMQTT;
87
87
  },
88
88
  }),
89
- __exportStar(__nccwpck_require__(114), exports),
90
- __exportStar(__nccwpck_require__(720), exports),
91
- __exportStar(__nccwpck_require__(182), exports),
92
- __exportStar(__nccwpck_require__(510), exports),
93
- __exportStar(__nccwpck_require__(275), exports),
94
- __exportStar(__nccwpck_require__(376), exports),
95
- __exportStar(__nccwpck_require__(937), exports),
96
- __exportStar(__nccwpck_require__(720), exports),
97
- __exportStar(__nccwpck_require__(889), exports);
98
- var json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(889);
89
+ __exportStar(__nccwpck_require__(449), exports),
90
+ __exportStar(__nccwpck_require__(797), exports),
91
+ __exportStar(__nccwpck_require__(393), exports),
92
+ __exportStar(__nccwpck_require__(550), exports),
93
+ __exportStar(__nccwpck_require__(800), exports),
94
+ __exportStar(__nccwpck_require__(456), exports),
95
+ __exportStar(__nccwpck_require__(219), exports),
96
+ __exportStar(__nccwpck_require__(797), exports),
97
+ __exportStar(__nccwpck_require__(822), exports),
98
+ __exportStar(__nccwpck_require__(932), exports);
99
+ var json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(822);
99
100
  Object.defineProperty(exports, "opcuaJsonEncodeExtensionObject", {
100
101
  enumerable: !0,
101
102
  get: function () {
@@ -109,20 +110,20 @@
109
110
  },
110
111
  });
111
112
  },
112
- 694: (__unused_webpack_module, exports, __nccwpck_require__) => {
113
+ 932: (__unused_webpack_module, exports, __nccwpck_require__) => {
113
114
  Object.defineProperty(exports, "__esModule", { value: !0 }),
114
115
  (exports.bodyDecodeFunctor = exports.bodyEncodeFunctor = void 0);
115
116
  const node_opcua_variant_1 = __nccwpck_require__(298),
116
- json_basic_encoding_decoding_byte_string_1 = __nccwpck_require__(182),
117
- json_basic_encoding_decoding_data_value_1 = __nccwpck_require__(373),
118
- json_basic_encoding_decoding_date_time_1 = __nccwpck_require__(818),
119
- json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(889),
120
- json_basic_encoding_decoding_int64_1 = __nccwpck_require__(376),
121
- json_basic_encoding_decoding_localizedtext_1 = __nccwpck_require__(510),
122
- json_basic_encoding_decoding_nodeid_1 = __nccwpck_require__(937),
123
- json_basic_encoding_decoding_qualifiedname_1 = __nccwpck_require__(275),
124
- json_basic_encoding_decoding_statuscode_1 = __nccwpck_require__(720),
125
- json_basic_encoding_decoding_variant_1 = __nccwpck_require__(349);
117
+ json_basic_encoding_decoding_byte_string_1 = __nccwpck_require__(393),
118
+ json_basic_encoding_decoding_data_value_1 = __nccwpck_require__(466),
119
+ json_basic_encoding_decoding_date_time_1 = __nccwpck_require__(888),
120
+ json_basic_encoding_decoding_extension_object_1 = __nccwpck_require__(822),
121
+ json_basic_encoding_decoding_int64_1 = __nccwpck_require__(456),
122
+ json_basic_encoding_decoding_localizedtext_1 = __nccwpck_require__(550),
123
+ json_basic_encoding_decoding_nodeid_1 = __nccwpck_require__(219),
124
+ json_basic_encoding_decoding_qualifiedname_1 = __nccwpck_require__(800),
125
+ json_basic_encoding_decoding_statuscode_1 = __nccwpck_require__(797),
126
+ json_basic_encoding_decoding_variant_1 = __nccwpck_require__(768);
126
127
  (exports.bodyEncodeFunctor = function (dataType) {
127
128
  switch (dataType) {
128
129
  case node_opcua_variant_1.DataType.Null:
@@ -212,7 +213,7 @@
212
213
  }
213
214
  });
214
215
  },
215
- 182: (__unused_webpack_module, exports) => {
216
+ 393: (__unused_webpack_module, exports) => {
216
217
  Object.defineProperty(exports, "__esModule", { value: !0 }),
217
218
  (exports.opcuaJsonDecodeByteString = exports.opcuaJsonEncodeByteString = void 0),
218
219
  (exports.opcuaJsonEncodeByteString = function (byteString, reversible = !1, namespaceArray) {
@@ -222,14 +223,14 @@
222
223
  return pojo ? Buffer.from(pojo, "base64") : null;
223
224
  });
224
225
  },
225
- 373: (__unused_webpack_module, exports, __nccwpck_require__) => {
226
+ 466: (__unused_webpack_module, exports, __nccwpck_require__) => {
226
227
  Object.defineProperty(exports, "__esModule", { value: !0 }),
227
228
  (exports.opcuaJsonDecodeDataValue = exports.opcuaJsonEncodeDataValue = exports.opcuaJsonEncodeDataValueMQTT = void 0);
228
229
  const node_opcua_data_value_1 = __nccwpck_require__(146),
229
230
  node_opcua_variant_1 = __nccwpck_require__(298),
230
231
  node_opcua_types_1 = __nccwpck_require__(196),
231
- json_basic_encoding_decoding_variant_1 = __nccwpck_require__(349),
232
- json_basic_encoding_decoding_statuscode_1 = __nccwpck_require__(720);
232
+ json_basic_encoding_decoding_variant_1 = __nccwpck_require__(768),
233
+ json_basic_encoding_decoding_statuscode_1 = __nccwpck_require__(797);
233
234
  (exports.opcuaJsonEncodeDataValueMQTT = function (dataValue, mask) {
234
235
  if (mask === node_opcua_types_1.DataSetFieldContentMask.None)
235
236
  return (0, json_basic_encoding_decoding_variant_1.opcuaJsonEncodeVariant)(dataValue.value, !0);
@@ -291,7 +292,7 @@
291
292
  );
292
293
  });
293
294
  },
294
- 818: (__unused_webpack_module, exports) => {
295
+ 888: (__unused_webpack_module, exports) => {
295
296
  Object.defineProperty(exports, "__esModule", { value: !0 }),
296
297
  (exports.opcuaJsonDecodeDateTime = exports.opcuaJsonEncodeDateTime = void 0),
297
298
  (exports.opcuaJsonEncodeDateTime = function (date, reversible = !1, namespaceArray) {
@@ -301,7 +302,7 @@
301
302
  return "string" == typeof pojo ? new Date(pojo) : pojo;
302
303
  });
303
304
  },
304
- 889: (__unused_webpack_module, exports, __nccwpck_require__) => {
305
+ 822: (__unused_webpack_module, exports, __nccwpck_require__) => {
305
306
  Object.defineProperty(exports, "__esModule", { value: !0 }),
306
307
  (exports.opcuaJsonDecodeExtensionObject =
307
308
  exports.opcuaJsonEncodeExtensionObject =
@@ -313,8 +314,8 @@
313
314
  node_opcua_numeric_range_1 = __nccwpck_require__(138),
314
315
  node_opcua_debug_1 = __nccwpck_require__(647),
315
316
  node_opcua_factory_1 = __nccwpck_require__(745),
316
- json_basic_encoding_body_functor_1 = __nccwpck_require__(694),
317
- json_basic_encoding_decoding_nodeid_1 = __nccwpck_require__(937),
317
+ json_basic_encoding_body_functor_1 = __nccwpck_require__(932),
318
+ json_basic_encoding_decoding_nodeid_1 = __nccwpck_require__(219),
318
319
  errorLog = (0, node_opcua_debug_1.make_errorLog)("JSON");
319
320
  function originalName(name) {
320
321
  return name[0].toUpperCase() + name.slice(1);
@@ -454,7 +455,7 @@
454
455
  (exports.opcuaJsonEncodeExtensionObject = opcuaJsonEncodeExtensionObject),
455
456
  (exports.opcuaJsonDecodeExtensionObject = opcuaJsonDecodeExtensionObject);
456
457
  },
457
- 376: (__unused_webpack_module, exports) => {
458
+ 456: (__unused_webpack_module, exports) => {
458
459
  Object.defineProperty(exports, "__esModule", { value: !0 }),
459
460
  (exports.opcuaJsonDecodeUInt64 =
460
461
  exports.opcuaJsonDecodeInt64 =
@@ -487,7 +488,7 @@
487
488
  return [Number(r / shiftHigh), Number(r % shiftHigh)];
488
489
  });
489
490
  },
490
- 510: (__unused_webpack_module, exports, __nccwpck_require__) => {
491
+ 550: (__unused_webpack_module, exports, __nccwpck_require__) => {
491
492
  Object.defineProperty(exports, "__esModule", { value: !0 }),
492
493
  (exports.opcuaJsonDecodeLocalizedText = exports.opcuaJsonEncodeLocalizedText = void 0);
493
494
  const node_opcua_data_model_1 = __nccwpck_require__(626);
@@ -505,7 +506,7 @@
505
506
  : new node_opcua_data_model_1.LocalizedText();
506
507
  });
507
508
  },
508
- 937: (__unused_webpack_module, exports, __nccwpck_require__) => {
509
+ 219: (__unused_webpack_module, exports, __nccwpck_require__) => {
509
510
  Object.defineProperty(exports, "__esModule", { value: !0 }),
510
511
  (exports.opcuaJsonDecodeNodeId = exports.opcuaJsonEncodeNodeId = void 0);
511
512
  const node_opcua_nodeid_1 = __nccwpck_require__(791);
@@ -577,7 +578,7 @@
577
578
  return new node_opcua_nodeid_1.NodeId(identifierType, value, namespace);
578
579
  });
579
580
  },
580
- 275: (__unused_webpack_module, exports, __nccwpck_require__) => {
581
+ 800: (__unused_webpack_module, exports, __nccwpck_require__) => {
581
582
  Object.defineProperty(exports, "__esModule", { value: !0 }),
582
583
  (exports.opcuaJsonDecodeQualifiedName = exports.opcuaJsonEncodeQualifiedName = void 0);
583
584
  const node_opcua_data_model_1 = __nccwpck_require__(626);
@@ -596,7 +597,7 @@
596
597
  return new node_opcua_data_model_1.QualifiedName({ name: pojo.Name, namespaceIndex: namespaceIndex });
597
598
  });
598
599
  },
599
- 720: (__unused_webpack_module, exports, __nccwpck_require__) => {
600
+ 797: (__unused_webpack_module, exports, __nccwpck_require__) => {
600
601
  Object.defineProperty(exports, "__esModule", { value: !0 }),
601
602
  (exports.opcuaJsonDecodeStatusCode = exports.opcuaJsonEncodeStatusCode = void 0);
602
603
  const node_opcua_status_code_1 = __nccwpck_require__(912);
@@ -614,11 +615,11 @@
614
615
  : node_opcua_status_code_1.StatusCodes.Good;
615
616
  });
616
617
  },
617
- 349: (__unused_webpack_module, exports, __nccwpck_require__) => {
618
+ 768: (__unused_webpack_module, exports, __nccwpck_require__) => {
618
619
  Object.defineProperty(exports, "__esModule", { value: !0 }),
619
620
  (exports.opcuaJsonDecodeVariant = exports.opcuaJsonEncodeVariant = void 0);
620
621
  const node_opcua_variant_1 = __nccwpck_require__(298),
621
- json_basic_encoding_body_functor_1 = __nccwpck_require__(694);
622
+ json_basic_encoding_body_functor_1 = __nccwpck_require__(932);
622
623
  function body(variant, reversible, namespaceArray) {
623
624
  const f = (0, json_basic_encoding_body_functor_1.bodyEncodeFunctor)(variant.dataType);
624
625
  if (variant.arrayType === node_opcua_variant_1.VariantArrayType.Scalar)
@@ -660,7 +661,11 @@
660
661
  value: value,
661
662
  });
662
663
  }
663
- return new node_opcua_variant_1.Variant({ dataType: dataType, value: f(pojo.Body, builder) });
664
+ return new node_opcua_variant_1.Variant({
665
+ dataType: dataType,
666
+ arrayType: node_opcua_variant_1.VariantArrayType.Scalar,
667
+ value: f(pojo.Body, builder),
668
+ });
664
669
  });
665
670
  },
666
671
  626: (module) => {
@@ -705,6 +710,6 @@
705
710
  return module.exports;
706
711
  }
707
712
  __nccwpck_require__.ab = __dirname + "/";
708
- var __webpack_exports__ = __nccwpck_require__(370);
713
+ var __webpack_exports__ = __nccwpck_require__(629);
709
714
  module.exports = __webpack_exports__;
710
715
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-json",
3
- "version": "0.9.0",
3
+ "version": "0.13.0",
4
4
  "description": "OPCUA JSON encoder/decoder for node-opcua",
5
5
  "author": "Etienne Rossignon <etienne.rossignon@sterfive.com>",
6
6
  "homepage": "https://support.sterfive.com",
@@ -15,20 +15,23 @@
15
15
  "url": "git@gitlab.sterfive.fr:sterfive/node-opcua-pubsub.git"
16
16
  },
17
17
  "peerDependencies": {
18
- "node-opcua-basic-types": "2.57.0",
19
- "node-opcua-binary-stream": "2.55.0",
20
- "node-opcua-buffer-utils": "2.55.0",
21
- "node-opcua-data-model": "2.57.0",
22
- "node-opcua-data-value": "2.57.0",
23
- "node-opcua-date-time": "2.55.0",
24
- "node-opcua-extension-object": "2.57.0",
25
- "node-opcua-factory": "2.57.0",
26
- "node-opcua-nodeid": "2.55.0",
27
- "node-opcua-numeric-range": "2.57.0",
28
- "node-opcua-status-code": "2.56.0",
29
- "node-opcua-types": "2.57.0",
30
- "node-opcua-variant": "2.57.0"
18
+ "node-opcua-basic-types": ">=2.62.6",
19
+ "node-opcua-binary-stream": ">=2.62.5",
20
+ "node-opcua-buffer-utils": ">=2.62.5",
21
+ "node-opcua-data-model": ">=2.62.6",
22
+ "node-opcua-data-value": ">=2.62.6",
23
+ "node-opcua-date-time": ">=2.62.6",
24
+ "node-opcua-extension-object": ">=2.62.6",
25
+ "node-opcua-factory": ">=2.62.6",
26
+ "node-opcua-nodeid": ">=2.62.6",
27
+ "node-opcua-numeric-range": ">=2.62.6",
28
+ "node-opcua-status-code": ">=2.62.5",
29
+ "node-opcua-types": ">=2.62.6",
30
+ "node-opcua-variant": ">=2.62.6"
31
31
  },
32
32
  "gitHead": "092c80425fdaf5de81462ce7a225842dfbd13708",
33
+ "dependencies": {
34
+ "@types/aws-iot-device-sdk": "^2.2.3"
35
+ },
33
36
  "scripts": {}
34
37
  }