@mtcute/test 0.26.3 → 0.27.1
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/crypto.js +8 -0
- package/package.json +7 -7
- package/transport.d.ts +1 -1
package/crypto.js
CHANGED
|
@@ -61,9 +61,17 @@ async function defaultTestCryptoProvider(source = DEFAULT_ENTROPY) {
|
|
|
61
61
|
function testCryptoProvider(c) {
|
|
62
62
|
beforeAll(() => c.initialize?.());
|
|
63
63
|
function gzipSyncWrap(data) {
|
|
64
|
+
if (process.env.TEST_ENV === "browser") {
|
|
65
|
+
data._isBuffer = true;
|
|
66
|
+
return new Uint8Array(gzipSync(data));
|
|
67
|
+
}
|
|
64
68
|
return gzipSync(data);
|
|
65
69
|
}
|
|
66
70
|
function inflateSyncWrap(data) {
|
|
71
|
+
if (process.env.TEST_ENV === "browser") {
|
|
72
|
+
data._isBuffer = true;
|
|
73
|
+
return new Uint8Array(inflateSync(data));
|
|
74
|
+
}
|
|
67
75
|
return inflateSync(data);
|
|
68
76
|
}
|
|
69
77
|
it("should calculate sha1", () => {
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtcute/test",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.1",
|
|
5
5
|
"description": "Test utilities for mtcute",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"long": "5.2.3",
|
|
9
|
-
"@fuman/utils": "0.0.
|
|
10
|
-
"@fuman/net": "0.0.
|
|
9
|
+
"@fuman/utils": "0.0.17",
|
|
10
|
+
"@fuman/net": "0.0.17"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@mtcute/core": "^0.
|
|
14
|
-
"@mtcute/node": "^0.
|
|
15
|
-
"@mtcute/tl": "
|
|
16
|
-
"@mtcute/web": "^0.
|
|
13
|
+
"@mtcute/core": "^0.27.1",
|
|
14
|
+
"@mtcute/node": "^0.27.1",
|
|
15
|
+
"@mtcute/tl": "218.0.1",
|
|
16
|
+
"@mtcute/web": "^0.27.1",
|
|
17
17
|
"vitest": "*"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
package/transport.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BasicDcOption } from '@mtcute/core/utils.js';
|
|
2
1
|
import { IPacketCodec, ITelegramConnection, TelegramTransport } from '@mtcute/core';
|
|
2
|
+
import { BasicDcOption } from '@mtcute/core/utils.js';
|
|
3
3
|
export declare class StubTelegramTransport implements TelegramTransport {
|
|
4
4
|
readonly params: {
|
|
5
5
|
packetCodec?: () => IPacketCodec;
|