@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.
Files changed (31) hide show
  1. package/dist/lib/browser/{chunk-537EXT24.mjs → chunk-NGW3R7QB.mjs} +165 -127
  2. package/dist/lib/browser/{chunk-537EXT24.mjs.map → chunk-NGW3R7QB.mjs.map} +3 -3
  3. package/dist/lib/browser/index.mjs +6 -1
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +1 -1
  7. package/dist/lib/node-esm/{chunk-4OIMGFCR.mjs → chunk-ECKTM5ZY.mjs} +165 -127
  8. package/dist/lib/node-esm/{chunk-4OIMGFCR.mjs.map → chunk-ECKTM5ZY.mjs.map} +3 -3
  9. package/dist/lib/node-esm/index.mjs +6 -1
  10. package/dist/lib/node-esm/index.mjs.map +3 -3
  11. package/dist/lib/node-esm/meta.json +1 -1
  12. package/dist/lib/node-esm/testing/index.mjs +1 -1
  13. package/dist/types/src/muxing/balancer.d.ts +1 -1
  14. package/dist/types/src/muxing/balancer.d.ts.map +1 -1
  15. package/dist/types/src/muxing/muxer.d.ts.map +1 -1
  16. package/dist/types/src/rpc-extension.d.ts.map +1 -1
  17. package/dist/types/src/teleport.d.ts.map +1 -1
  18. package/dist/types/src/testing/test-extension.d.ts.map +1 -1
  19. package/dist/types/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +14 -12
  21. package/src/control-extension.ts +2 -2
  22. package/src/muxing/balancer.test.ts +2 -1
  23. package/src/muxing/balancer.ts +1 -1
  24. package/src/muxing/framer.test.ts +2 -1
  25. package/src/muxing/muxer.test.ts +4 -3
  26. package/src/muxing/muxer.ts +1 -1
  27. package/src/rpc-extension.ts +1 -1
  28. package/src/teleport.test.ts +1 -1
  29. package/src/teleport.ts +1 -1
  30. package/src/testing/test-extension-with-streams.ts +1 -1
  31. 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.b97322e",
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.b97322e",
40
- "@dxos/context": "0.8.4-main.b97322e",
41
- "@dxos/debug": "0.8.4-main.b97322e",
42
- "@dxos/invariant": "0.8.4-main.b97322e",
43
- "@dxos/log": "0.8.4-main.b97322e",
44
- "@dxos/node-std": "0.8.4-main.b97322e",
45
- "@dxos/protocols": "0.8.4-main.b97322e",
46
- "@dxos/rpc": "0.8.4-main.b97322e",
47
- "@dxos/util": "0.8.4-main.b97322e",
48
- "@dxos/keys": "0.8.4-main.b97322e"
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.b97322e"
56
+ "@dxos/async": "0.8.4-main.f5c0578"
55
57
  },
56
58
  "publishConfig": {
57
59
  "access": "public"
@@ -2,14 +2,14 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { asyncTimeout, scheduleTaskInterval, TimeoutError as AsyncTimeoutError } from '@dxos/async';
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 { createProtoRpcPeer, type ProtoRpcPeer } from '@dxos/rpc';
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 { encodeChunk, decodeChunk, Balancer } from './balancer';
13
+ import { Balancer, decodeChunk, encodeChunk } from './balancer';
13
14
 
14
15
  class StuckableStream extends Duplex {
15
16
  public unstuck: Function | undefined;
@@ -4,7 +4,7 @@
4
4
 
5
5
  import varint from 'varint';
6
6
 
7
- import { type Trigger, Event } from '@dxos/async';
7
+ import { Event, type Trigger } from '@dxos/async';
8
8
  import { invariant } from '@dxos/invariant';
9
9
  import { log } from '@dxos/log';
10
10
 
@@ -3,8 +3,9 @@
3
3
  //
4
4
 
5
5
  import { pipeline } from 'node:stream';
6
+
6
7
  import randomBytes from 'randombytes';
7
- import { onTestFinished, describe, expect, test } from 'vitest';
8
+ import { describe, expect, onTestFinished, test } from 'vitest';
8
9
 
9
10
  import { sleep } from '@dxos/async';
10
11
 
@@ -2,10 +2,11 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { pipeline, Transform } from 'node:stream';
6
- import { onTestFinished, describe, expect, test } from 'vitest';
5
+ import { Transform, pipeline } from 'node:stream';
7
6
 
8
- import { latch, asyncTimeout } from '@dxos/async';
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';
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Duplex } from 'node:stream';
6
6
 
7
- import { scheduleTaskInterval, Event, Trigger, asyncTimeout } from '@dxos/async';
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';
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { invariant } from '@dxos/invariant';
6
- import { createProtoRpcPeer, type ProtoRpcPeer, type ProtoRpcPeerOptions } from '@dxos/rpc';
6
+ import { type ProtoRpcPeer, type ProtoRpcPeerOptions, createProtoRpcPeer } from '@dxos/rpc';
7
7
 
8
8
  import { type ExtensionContext, type TeleportExtension } from './teleport';
9
9
 
@@ -2,7 +2,7 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { onTestFinished, describe, expect, test } from 'vitest';
5
+ import { describe, expect, onTestFinished, test } from 'vitest';
6
6
 
7
7
  import { latch } from '@dxos/async';
8
8
  import { log } from '@dxos/log';
package/src/teleport.ts CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { type Duplex } from 'node:stream';
6
6
 
7
- import { runInContextAsync, synchronized, scheduleTask, type Event } from '@dxos/async';
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 { createProtoRpcPeer, type ProtoRpcPeer } from '@dxos/rpc';
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 { asyncTimeout, Trigger } from '@dxos/async';
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 { createProtoRpcPeer, type ProtoRpcPeer } from '@dxos/rpc';
10
+ import { type ProtoRpcPeer, createProtoRpcPeer } from '@dxos/rpc';
11
11
 
12
12
  import { type ExtensionContext, type TeleportExtension } from '../teleport';
13
13