libshv-js 7.1.11 → 7.1.13
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/chainpack.js +4 -4
- package/dist/cpon.js +5 -5
- package/dist/rpcvalue.js +1 -1
- package/dist/ws-client.js +1 -1
- package/package.json +3 -3
package/dist/chainpack.js
CHANGED
|
@@ -91,13 +91,13 @@ class ChainPackReader {
|
|
|
91
91
|
}
|
|
92
92
|
const key = this.read();
|
|
93
93
|
const val = this.read();
|
|
94
|
-
if ((
|
|
95
|
-
(
|
|
96
|
-
(
|
|
94
|
+
if ((typeof key === 'string' && map[rpcvalue_1.shvMapType] === 'metamap') ||
|
|
95
|
+
(typeof key === 'number' && map[rpcvalue_1.shvMapType] === 'metamap') ||
|
|
96
|
+
(typeof key === 'string' && map[rpcvalue_1.shvMapType] === 'map')) {
|
|
97
97
|
map[key] = val;
|
|
98
98
|
// eslint-disable-next-line unicorn/no-duplicate-if-branches -- the type system needs this branch
|
|
99
99
|
}
|
|
100
|
-
else if (
|
|
100
|
+
else if (typeof key === 'number' && map[rpcvalue_1.shvMapType] === 'imap') {
|
|
101
101
|
map[key] = val;
|
|
102
102
|
}
|
|
103
103
|
else {
|
package/dist/cpon.js
CHANGED
|
@@ -100,16 +100,16 @@ class CponReader {
|
|
|
100
100
|
}
|
|
101
101
|
this.skipWhitespace();
|
|
102
102
|
const val = this.read();
|
|
103
|
-
if (
|
|
103
|
+
if (typeof key === 'string' && map[rpcvalue_1.shvMapType] === 'metamap') {
|
|
104
104
|
map[key] = val;
|
|
105
105
|
}
|
|
106
|
-
else if (
|
|
106
|
+
else if ((typeof key === 'number' || key instanceof rpcvalue_1.UInt) && map[rpcvalue_1.shvMapType] === 'metamap') {
|
|
107
107
|
map[Number(key)] = val;
|
|
108
108
|
}
|
|
109
|
-
else if (
|
|
109
|
+
else if (typeof key === 'string' && map[rpcvalue_1.shvMapType] === 'map') {
|
|
110
110
|
map[key] = val;
|
|
111
111
|
}
|
|
112
|
-
else if (
|
|
112
|
+
else if ((typeof key === 'number' || key instanceof rpcvalue_1.UInt) && map[rpcvalue_1.shvMapType] === 'imap') {
|
|
113
113
|
map[Number(key)] = val;
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
@@ -133,7 +133,7 @@ class CponReader {
|
|
|
133
133
|
b = this.ctx.peekByte();
|
|
134
134
|
// console.log("CHAR:", b, String.fromCodePoint(b));
|
|
135
135
|
// [0-9+-]
|
|
136
|
-
if (
|
|
136
|
+
if (b === 43 || b === 45 || (b >= 48 && b <= 57)) {
|
|
137
137
|
return implReturn(this.readNumber());
|
|
138
138
|
}
|
|
139
139
|
if (b === '"'.codePointAt(0)) {
|
package/dist/rpcvalue.js
CHANGED
package/dist/ws-client.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libshv-js",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.13",
|
|
4
4
|
"description": "Typescript implementation of libshv",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@typescript-eslint/parser": "^8.56.1",
|
|
41
41
|
"@eslint/js": "^10.0.1",
|
|
42
42
|
"eslint": "^10.0.0",
|
|
43
|
-
"eslint-config-xo": "^0.
|
|
43
|
+
"eslint-config-xo": "^1.0.0",
|
|
44
44
|
"eslint-formatter-unix": "^9.0.1",
|
|
45
|
-
"eslint-plugin-unicorn": "^
|
|
45
|
+
"eslint-plugin-unicorn": "^73.0.0",
|
|
46
46
|
"typescript": "^6.0.2",
|
|
47
47
|
"typescript-eslint": "^8.46.1"
|
|
48
48
|
}
|