@dxos/teleport 0.8.4-main.b97322e → 0.8.4-main.f5c0578
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/lib/browser/{chunk-537EXT24.mjs → chunk-NGW3R7QB.mjs} +165 -127
- package/dist/lib/browser/{chunk-537EXT24.mjs.map → chunk-NGW3R7QB.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +6 -1
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node-esm/{chunk-4OIMGFCR.mjs → chunk-ECKTM5ZY.mjs} +165 -127
- package/dist/lib/node-esm/{chunk-4OIMGFCR.mjs.map → chunk-ECKTM5ZY.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +6 -1
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/types/src/muxing/balancer.d.ts +1 -1
- package/dist/types/src/muxing/balancer.d.ts.map +1 -1
- package/dist/types/src/muxing/muxer.d.ts.map +1 -1
- package/dist/types/src/rpc-extension.d.ts.map +1 -1
- package/dist/types/src/teleport.d.ts.map +1 -1
- package/dist/types/src/testing/test-extension.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -12
- package/src/control-extension.ts +2 -2
- package/src/muxing/balancer.test.ts +2 -1
- package/src/muxing/balancer.ts +1 -1
- package/src/muxing/framer.test.ts +2 -1
- package/src/muxing/muxer.test.ts +4 -3
- package/src/muxing/muxer.ts +1 -1
- package/src/rpc-extension.ts +1 -1
- package/src/teleport.test.ts +1 -1
- package/src/teleport.ts +1 -1
- package/src/testing/test-extension-with-streams.ts +1 -1
- package/src/testing/test-extension.ts +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dxos/teleport",
|
3
|
-
"version": "0.8.4-main.
|
3
|
+
"version": "0.8.4-main.f5c0578",
|
4
4
|
"description": "Stream muxer.",
|
5
5
|
"homepage": "https://dxos.org",
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
@@ -10,11 +10,13 @@
|
|
10
10
|
"type": "module",
|
11
11
|
"exports": {
|
12
12
|
".": {
|
13
|
+
"source": "./src/index.ts",
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
16
17
|
},
|
17
18
|
"./testing": {
|
19
|
+
"source": "./src/testing/index.ts",
|
18
20
|
"types": "./dist/types/src/testing/index.d.ts",
|
19
21
|
"browser": "./dist/lib/browser/testing/index.mjs",
|
20
22
|
"node": "./dist/lib/node-esm/testing/index.mjs"
|
@@ -36,22 +38,22 @@
|
|
36
38
|
],
|
37
39
|
"dependencies": {
|
38
40
|
"randombytes": "^2.1.0",
|
39
|
-
"@dxos/async": "0.8.4-main.
|
40
|
-
"@dxos/context": "0.8.4-main.
|
41
|
-
"@dxos/
|
42
|
-
"@dxos/
|
43
|
-
"@dxos/
|
44
|
-
"@dxos/
|
45
|
-
"@dxos/protocols": "0.8.4-main.
|
46
|
-
"@dxos/
|
47
|
-
"@dxos/
|
48
|
-
"@dxos/
|
41
|
+
"@dxos/async": "0.8.4-main.f5c0578",
|
42
|
+
"@dxos/context": "0.8.4-main.f5c0578",
|
43
|
+
"@dxos/invariant": "0.8.4-main.f5c0578",
|
44
|
+
"@dxos/debug": "0.8.4-main.f5c0578",
|
45
|
+
"@dxos/keys": "0.8.4-main.f5c0578",
|
46
|
+
"@dxos/log": "0.8.4-main.f5c0578",
|
47
|
+
"@dxos/protocols": "0.8.4-main.f5c0578",
|
48
|
+
"@dxos/node-std": "0.8.4-main.f5c0578",
|
49
|
+
"@dxos/rpc": "0.8.4-main.f5c0578",
|
50
|
+
"@dxos/util": "0.8.4-main.f5c0578"
|
49
51
|
},
|
50
52
|
"devDependencies": {
|
51
53
|
"@types/randombytes": "^2.0.0",
|
52
54
|
"@types/varint": "6.0.0",
|
53
55
|
"varint": "6.0.0",
|
54
|
-
"@dxos/async": "0.8.4-main.
|
56
|
+
"@dxos/async": "0.8.4-main.f5c0578"
|
55
57
|
},
|
56
58
|
"publishConfig": {
|
57
59
|
"access": "public"
|
package/src/control-extension.ts
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
// Copyright 2023 DXOS.org
|
3
3
|
//
|
4
4
|
|
5
|
-
import {
|
5
|
+
import { TimeoutError as AsyncTimeoutError, asyncTimeout, scheduleTaskInterval } from '@dxos/async';
|
6
6
|
import { Context } from '@dxos/context';
|
7
7
|
import { type PublicKey } from '@dxos/keys';
|
8
8
|
import { log } from '@dxos/log';
|
9
9
|
import { RpcClosedError } from '@dxos/protocols';
|
10
10
|
import { schema } from '@dxos/protocols/proto';
|
11
11
|
import { type ControlService } from '@dxos/protocols/proto/dxos/mesh/teleport/control';
|
12
|
-
import {
|
12
|
+
import { type ProtoRpcPeer, createProtoRpcPeer } from '@dxos/rpc';
|
13
13
|
import { Callback } from '@dxos/util';
|
14
14
|
|
15
15
|
import { type ExtensionContext, type TeleportExtension } from './teleport';
|
@@ -3,13 +3,14 @@
|
|
3
3
|
//
|
4
4
|
|
5
5
|
import { Duplex, pipeline } from 'node:stream';
|
6
|
+
|
6
7
|
import randomBytes from 'randombytes';
|
7
8
|
import varint from 'varint';
|
8
9
|
import { describe, expect, test } from 'vitest';
|
9
10
|
|
10
11
|
import { Trigger, sleep } from '@dxos/async';
|
11
12
|
|
12
|
-
import {
|
13
|
+
import { Balancer, decodeChunk, encodeChunk } from './balancer';
|
13
14
|
|
14
15
|
class StuckableStream extends Duplex {
|
15
16
|
public unstuck: Function | undefined;
|
package/src/muxing/balancer.ts
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
//
|
4
4
|
|
5
5
|
import { pipeline } from 'node:stream';
|
6
|
+
|
6
7
|
import randomBytes from 'randombytes';
|
7
|
-
import {
|
8
|
+
import { describe, expect, onTestFinished, test } from 'vitest';
|
8
9
|
|
9
10
|
import { sleep } from '@dxos/async';
|
10
11
|
|
package/src/muxing/muxer.test.ts
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
// Copyright 2022 DXOS.org
|
3
3
|
//
|
4
4
|
|
5
|
-
import {
|
6
|
-
import { onTestFinished, describe, expect, test } from 'vitest';
|
5
|
+
import { Transform, pipeline } from 'node:stream';
|
7
6
|
|
8
|
-
import {
|
7
|
+
import { describe, expect, onTestFinished, test } from 'vitest';
|
8
|
+
|
9
|
+
import { asyncTimeout, latch } from '@dxos/async';
|
9
10
|
import { schema } from '@dxos/protocols/proto';
|
10
11
|
import { type TestService } from '@dxos/protocols/proto/example/testing/rpc';
|
11
12
|
import { createProtoRpcPeer } from '@dxos/rpc';
|
package/src/muxing/muxer.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import { Duplex } from 'node:stream';
|
6
6
|
|
7
|
-
import {
|
7
|
+
import { Event, Trigger, asyncTimeout, scheduleTaskInterval } from '@dxos/async';
|
8
8
|
import { Context } from '@dxos/context';
|
9
9
|
import { failUndefined } from '@dxos/debug';
|
10
10
|
import { invariant } from '@dxos/invariant';
|
package/src/rpc-extension.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
//
|
4
4
|
|
5
5
|
import { invariant } from '@dxos/invariant';
|
6
|
-
import {
|
6
|
+
import { type ProtoRpcPeer, type ProtoRpcPeerOptions, createProtoRpcPeer } from '@dxos/rpc';
|
7
7
|
|
8
8
|
import { type ExtensionContext, type TeleportExtension } from './teleport';
|
9
9
|
|
package/src/teleport.test.ts
CHANGED
package/src/teleport.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import { type Duplex } from 'node:stream';
|
6
6
|
|
7
|
-
import {
|
7
|
+
import { type Event, runInContextAsync, scheduleTask, synchronized } from '@dxos/async';
|
8
8
|
import { Context } from '@dxos/context';
|
9
9
|
import { failUndefined } from '@dxos/debug';
|
10
10
|
import { invariant } from '@dxos/invariant';
|
@@ -10,7 +10,7 @@ import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { log } from '@dxos/log';
|
11
11
|
import { schema } from '@dxos/protocols/proto';
|
12
12
|
import { type TestServiceWithStreams } from '@dxos/protocols/proto/example/testing/rpc';
|
13
|
-
import {
|
13
|
+
import { type ProtoRpcPeer, createProtoRpcPeer } from '@dxos/rpc';
|
14
14
|
|
15
15
|
import { type ExtensionContext, type TeleportExtension } from '../teleport';
|
16
16
|
|
@@ -2,12 +2,12 @@
|
|
2
2
|
// Copyright 2022 DXOS.org
|
3
3
|
//
|
4
4
|
|
5
|
-
import {
|
5
|
+
import { Trigger, asyncTimeout } from '@dxos/async';
|
6
6
|
import { invariant } from '@dxos/invariant';
|
7
7
|
import { log } from '@dxos/log';
|
8
8
|
import { schema } from '@dxos/protocols/proto';
|
9
9
|
import { type TestService } from '@dxos/protocols/proto/example/testing/rpc';
|
10
|
-
import {
|
10
|
+
import { type ProtoRpcPeer, createProtoRpcPeer } from '@dxos/rpc';
|
11
11
|
|
12
12
|
import { type ExtensionContext, type TeleportExtension } from '../teleport';
|
13
13
|
|