libshv-js 3.0.1 → 3.1.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/.github/workflows/test.yml +4 -4
- package/.xo-config.json +1 -0
- package/package.json +1 -1
- package/src/chainpack.ts +3 -3
- package/src/cpon.ts +2 -2
- package/src/rpcmessage.ts +3 -3
- package/src/ws-client.ts +4 -4
- package/test.ts +3 -3
- package/tsconfig.json +2 -3
package/.xo-config.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"n/file-extension-in-import": "off",
|
|
24
24
|
"promise-function-async": "off",
|
|
25
25
|
"default-case": "off",
|
|
26
|
+
"import/extensions": "off",
|
|
26
27
|
"prefer-promise-reject-errors": "off",
|
|
27
28
|
"eslint-disable-next-line prefer-promise-reject-errors": "off",
|
|
28
29
|
"unicorn/explicit-length-check": "off",
|
package/package.json
CHANGED
package/src/chainpack.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {utf8ToString} from './cpon
|
|
2
|
-
import {type RpcValue, type RpcValueType, type DateTime, Decimal, Double, IMap, Int, MetaMap, RpcValueWithMetaData, ShvMap, UInt, withOffset} from './rpcvalue
|
|
3
|
-
import {UnpackContext, PackContext} from './cpcontext
|
|
1
|
+
import {utf8ToString} from './cpon';
|
|
2
|
+
import {type RpcValue, type RpcValueType, type DateTime, Decimal, Double, IMap, Int, MetaMap, RpcValueWithMetaData, ShvMap, UInt, withOffset} from './rpcvalue';
|
|
3
|
+
import {UnpackContext, PackContext} from './cpcontext';
|
|
4
4
|
|
|
5
5
|
enum PackingSchema {
|
|
6
6
|
IntThreshold = 64,
|
package/src/cpon.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {type RpcValue, type RpcValueType, type DateTime, type List, Decimal, Double, IMap, Int, MetaMap, RpcValueWithMetaData, ShvMap, UInt, withOffset} from './rpcvalue
|
|
2
|
-
import {PackContext, UnpackContext} from './cpcontext
|
|
1
|
+
import {type RpcValue, type RpcValueType, type DateTime, type List, Decimal, Double, IMap, Int, MetaMap, RpcValueWithMetaData, ShvMap, UInt, withOffset} from './rpcvalue';
|
|
2
|
+
import {PackContext, UnpackContext} from './cpcontext';
|
|
3
3
|
|
|
4
4
|
const hexify = (byte: number) => {
|
|
5
5
|
if (byte < 10) {
|
package/src/rpcmessage.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {IMap, Int, MetaMap, type RpcValue, RpcValueWithMetaData} from './rpcvalue
|
|
2
|
-
import {toCpon} from './cpon
|
|
3
|
-
import {toChainPack} from './chainpack
|
|
1
|
+
import {IMap, Int, MetaMap, type RpcValue, RpcValueWithMetaData} from './rpcvalue';
|
|
2
|
+
import {toCpon} from './cpon';
|
|
3
|
+
import {toChainPack} from './chainpack';
|
|
4
4
|
|
|
5
5
|
const TagRequestId = 8;
|
|
6
6
|
const TagShvPath = 9;
|
package/src/ws-client.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {ChainPackReader, ChainpackProtocolType, ChainPackWriter} from './chainpack
|
|
2
|
-
import {type CponReader, CponProtocolType
|
|
3
|
-
import {ERROR_MESSAGE, ErrorCode, ERROR_CODE,
|
|
4
|
-
import {type RpcValue, type Null, Int, IMap, ShvMap} from './rpcvalue
|
|
1
|
+
import {ChainPackReader, ChainpackProtocolType, ChainPackWriter} from './chainpack';
|
|
2
|
+
import {type CponReader, CponProtocolType} from './cpon';
|
|
3
|
+
import {ERROR_MESSAGE, ErrorCode, ERROR_CODE, RpcMessage, type RpcResponse, MethodCallTimeout} from './rpcmessage';
|
|
4
|
+
import {type RpcValue, type Null, Int, IMap, ShvMap} from './rpcvalue';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TIMEOUT = 5000;
|
|
7
7
|
|
package/test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {toChainPack, fromChainPack} from './src/chainpack
|
|
2
|
-
import {toCpon, fromCpon} from './src/cpon
|
|
3
|
-
import {type DateTime} from './src/rpcvalue
|
|
1
|
+
import {toChainPack, fromChainPack} from './src/chainpack';
|
|
2
|
+
import {toCpon, fromCpon} from './src/cpon';
|
|
3
|
+
import {type DateTime} from './src/rpcvalue';
|
|
4
4
|
|
|
5
5
|
const checkEq = (e1: string | number, e2: string | number) => {
|
|
6
6
|
if (e1 !== e2) {
|
package/tsconfig.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
36
36
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
37
37
|
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
38
|
-
"allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
39
38
|
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
40
39
|
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
41
40
|
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
@@ -91,8 +90,8 @@
|
|
|
91
90
|
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
92
91
|
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
93
92
|
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
94
|
+
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
96
95
|
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
97
96
|
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
98
97
|
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|