@dxos/teleport 0.3.9-main.b7e6a67 → 0.3.9-main.c7cd0ec
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-2FV5BKLH.mjs → chunk-L2L2STAG.mjs} +102 -62
- package/dist/lib/browser/chunk-L2L2STAG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-GK3YA6TG.cjs → chunk-SJ6CXLWF.cjs} +93 -60
- package/dist/lib/node/chunk-SJ6CXLWF.cjs.map +7 -0
- package/dist/lib/node/index.cjs +11 -11
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +6 -6
- package/dist/lib/node/testing/index.cjs.map +1 -1
- package/dist/types/src/muxing/muxer.d.ts +5 -1
- package/dist/types/src/muxing/muxer.d.ts.map +1 -1
- package/dist/types/src/teleport.d.ts +3 -1
- package/dist/types/src/teleport.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/muxing/muxer.ts +29 -17
- package/src/teleport.ts +13 -2
- package/src/testing/test-builder.ts +1 -1
- package/dist/lib/browser/chunk-2FV5BKLH.mjs.map +0 -7
- package/dist/lib/node/chunk-GK3YA6TG.cjs.map +0 -7
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_SJ6CXLWF_exports = {};
|
|
30
|
+
__export(chunk_SJ6CXLWF_exports, {
|
|
31
31
|
Framer: () => Framer,
|
|
32
32
|
Muxer: () => Muxer,
|
|
33
33
|
Teleport: () => Teleport,
|
|
@@ -39,7 +39,7 @@ __export(chunk_GK3YA6TG_exports, {
|
|
|
39
39
|
decodeFrame: () => decodeFrame,
|
|
40
40
|
encodeFrame: () => encodeFrame
|
|
41
41
|
});
|
|
42
|
-
module.exports = __toCommonJS(
|
|
42
|
+
module.exports = __toCommonJS(chunk_SJ6CXLWF_exports);
|
|
43
43
|
var import_node_stream = require("node:stream");
|
|
44
44
|
var import_invariant = require("@dxos/invariant");
|
|
45
45
|
var import_keys = require("@dxos/keys");
|
|
@@ -578,6 +578,16 @@ var decodeChunk = (data, withLength) => {
|
|
|
578
578
|
chunk
|
|
579
579
|
};
|
|
580
580
|
};
|
|
581
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
582
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
583
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
584
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
585
|
+
else
|
|
586
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
587
|
+
if (d = decorators[i])
|
|
588
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
589
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
590
|
+
}
|
|
581
591
|
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/mesh/teleport/src/muxing/muxer.ts";
|
|
582
592
|
var Command = import_protocols3.schema.getCodecForType("dxos.mesh.muxer.Command");
|
|
583
593
|
var DEFAULT_SEND_COMMAND_TIMEOUT = 6e4;
|
|
@@ -605,6 +615,12 @@ var Muxer = class {
|
|
|
605
615
|
await this._handleCommand(Command.decode(msg));
|
|
606
616
|
});
|
|
607
617
|
}
|
|
618
|
+
setSessionId(sessionId) {
|
|
619
|
+
this._sessionId = sessionId;
|
|
620
|
+
}
|
|
621
|
+
get sessionIdString() {
|
|
622
|
+
return this._sessionId ? this._sessionId.truncate() : "none";
|
|
623
|
+
}
|
|
608
624
|
/**
|
|
609
625
|
* Creates a duplex Node.js-style stream.
|
|
610
626
|
* The remote peer is expected to call `createStream` with the same tag.
|
|
@@ -618,7 +634,7 @@ var Muxer = class {
|
|
|
618
634
|
});
|
|
619
635
|
(0, import_invariant4.invariant)(!channel.push, `Channel already open: ${tag}`, {
|
|
620
636
|
F: __dxlog_file4,
|
|
621
|
-
L:
|
|
637
|
+
L: 151,
|
|
622
638
|
S: this,
|
|
623
639
|
A: [
|
|
624
640
|
"!channel.push",
|
|
@@ -637,7 +653,15 @@ var Muxer = class {
|
|
|
637
653
|
stream.push(data);
|
|
638
654
|
};
|
|
639
655
|
channel.destroy = (err) => {
|
|
640
|
-
|
|
656
|
+
if (err) {
|
|
657
|
+
if (stream.listeners("error").length > 0) {
|
|
658
|
+
stream.destroy(err);
|
|
659
|
+
} else {
|
|
660
|
+
stream.destroy();
|
|
661
|
+
}
|
|
662
|
+
} else {
|
|
663
|
+
stream.destroy();
|
|
664
|
+
}
|
|
641
665
|
};
|
|
642
666
|
try {
|
|
643
667
|
await this._sendCommand({
|
|
@@ -666,7 +690,7 @@ var Muxer = class {
|
|
|
666
690
|
});
|
|
667
691
|
(0, import_invariant4.invariant)(!channel.push, `Channel already open: ${tag}`, {
|
|
668
692
|
F: __dxlog_file4,
|
|
669
|
-
L:
|
|
693
|
+
L: 211,
|
|
670
694
|
S: this,
|
|
671
695
|
A: [
|
|
672
696
|
"!channel.push",
|
|
@@ -690,7 +714,7 @@ var Muxer = class {
|
|
|
690
714
|
subscribe: (cb) => {
|
|
691
715
|
(0, import_invariant4.invariant)(!callback, "Only one subscriber is allowed", {
|
|
692
716
|
F: __dxlog_file4,
|
|
693
|
-
L:
|
|
717
|
+
L: 233,
|
|
694
718
|
S: this,
|
|
695
719
|
A: [
|
|
696
720
|
"!callback",
|
|
@@ -723,7 +747,7 @@ var Muxer = class {
|
|
|
723
747
|
if (this._destroying) {
|
|
724
748
|
(0, import_log5.log)("already destroying, ignoring graceful close request", void 0, {
|
|
725
749
|
F: __dxlog_file4,
|
|
726
|
-
L:
|
|
750
|
+
L: 266,
|
|
727
751
|
S: this,
|
|
728
752
|
C: (f, a) => f(...a)
|
|
729
753
|
});
|
|
@@ -732,7 +756,7 @@ var Muxer = class {
|
|
|
732
756
|
if (this._closing) {
|
|
733
757
|
(0, import_log5.log)("already closing, ignoring graceful close request", void 0, {
|
|
734
758
|
F: __dxlog_file4,
|
|
735
|
-
L:
|
|
759
|
+
L: 270,
|
|
736
760
|
S: this,
|
|
737
761
|
C: (f, a) => f(...a)
|
|
738
762
|
});
|
|
@@ -748,29 +772,20 @@ var Muxer = class {
|
|
|
748
772
|
err: err2
|
|
749
773
|
}, {
|
|
750
774
|
F: __dxlog_file4,
|
|
751
|
-
L:
|
|
775
|
+
L: 285,
|
|
752
776
|
S: this,
|
|
753
777
|
C: (f, a) => f(...a)
|
|
754
778
|
});
|
|
755
|
-
await this.
|
|
779
|
+
await this._dispose(err2);
|
|
756
780
|
});
|
|
757
|
-
await
|
|
758
|
-
new Promise((_resolve, reject) => {
|
|
759
|
-
setTimeout(() => {
|
|
760
|
-
reject(new import_protocols3.TimeoutError("gracefully closing muxer"));
|
|
761
|
-
}, GRACEFUL_CLOSE_TIMEOUT);
|
|
762
|
-
}),
|
|
763
|
-
(async () => {
|
|
764
|
-
await this.dispose(err);
|
|
765
|
-
})()
|
|
766
|
-
]);
|
|
781
|
+
await (0, import_async4.asyncTimeout)(this._dispose(err), GRACEFUL_CLOSE_TIMEOUT, new import_protocols3.TimeoutError("gracefully closing muxer"));
|
|
767
782
|
}
|
|
768
783
|
// force close without confirmation
|
|
769
784
|
async destroy(err) {
|
|
770
785
|
if (this._destroying) {
|
|
771
786
|
(0, import_log5.log)("already destroying, ignoring destroy request", void 0, {
|
|
772
787
|
F: __dxlog_file4,
|
|
773
|
-
L:
|
|
788
|
+
L: 298,
|
|
774
789
|
S: this,
|
|
775
790
|
C: (f, a) => f(...a)
|
|
776
791
|
});
|
|
@@ -781,7 +796,7 @@ var Muxer = class {
|
|
|
781
796
|
if (this._closing) {
|
|
782
797
|
(0, import_log5.log)("destroy cancelling graceful close", void 0, {
|
|
783
798
|
F: __dxlog_file4,
|
|
784
|
-
L:
|
|
799
|
+
L: 304,
|
|
785
800
|
S: this,
|
|
786
801
|
C: (f, a) => f(...a)
|
|
787
802
|
});
|
|
@@ -796,29 +811,29 @@ var Muxer = class {
|
|
|
796
811
|
err: err2
|
|
797
812
|
}, {
|
|
798
813
|
F: __dxlog_file4,
|
|
799
|
-
L:
|
|
814
|
+
L: 317,
|
|
800
815
|
S: this,
|
|
801
816
|
C: (f, a) => f(...a)
|
|
802
817
|
});
|
|
803
818
|
});
|
|
804
819
|
}
|
|
805
|
-
this.
|
|
820
|
+
this._dispose(err).catch((err2) => {
|
|
806
821
|
(0, import_log5.log)("error disposing after destroy", {
|
|
807
822
|
err: err2
|
|
808
823
|
}, {
|
|
809
824
|
F: __dxlog_file4,
|
|
810
|
-
L:
|
|
825
|
+
L: 322,
|
|
811
826
|
S: this,
|
|
812
827
|
C: (f, a) => f(...a)
|
|
813
828
|
});
|
|
814
829
|
});
|
|
815
830
|
}
|
|
816
831
|
// complete the termination, graceful or otherwise
|
|
817
|
-
async
|
|
832
|
+
async _dispose(err) {
|
|
818
833
|
if (this._disposed) {
|
|
819
834
|
(0, import_log5.log)("already destroyed, ignoring dispose request", void 0, {
|
|
820
835
|
F: __dxlog_file4,
|
|
821
|
-
L:
|
|
836
|
+
L: 330,
|
|
822
837
|
S: this,
|
|
823
838
|
C: (f, a) => f(...a)
|
|
824
839
|
});
|
|
@@ -830,6 +845,7 @@ var Muxer = class {
|
|
|
830
845
|
channel.destroy?.(err);
|
|
831
846
|
}
|
|
832
847
|
this._disposed = true;
|
|
848
|
+
await this._emitStats();
|
|
833
849
|
this.afterClosed.emit(err);
|
|
834
850
|
this._channelsByLocalId.clear();
|
|
835
851
|
this._channelsByTag.clear();
|
|
@@ -840,7 +856,7 @@ var Muxer = class {
|
|
|
840
856
|
cmd
|
|
841
857
|
}, {
|
|
842
858
|
F: __dxlog_file4,
|
|
843
|
-
L:
|
|
859
|
+
L: 353,
|
|
844
860
|
S: this,
|
|
845
861
|
C: (f, a) => f(...a)
|
|
846
862
|
});
|
|
@@ -850,15 +866,15 @@ var Muxer = class {
|
|
|
850
866
|
if (!this._closing) {
|
|
851
867
|
(0, import_log5.log)("received peer close, initiating my own graceful close", void 0, {
|
|
852
868
|
F: __dxlog_file4,
|
|
853
|
-
L:
|
|
869
|
+
L: 359,
|
|
854
870
|
S: this,
|
|
855
871
|
C: (f, a) => f(...a)
|
|
856
872
|
});
|
|
857
|
-
await this.close();
|
|
873
|
+
await this.close(new Error("received peer close"));
|
|
858
874
|
} else {
|
|
859
875
|
(0, import_log5.log)("received close from peer, already closing", void 0, {
|
|
860
876
|
F: __dxlog_file4,
|
|
861
|
-
L:
|
|
877
|
+
L: 362,
|
|
862
878
|
S: this,
|
|
863
879
|
C: (f, a) => f(...a)
|
|
864
880
|
});
|
|
@@ -887,7 +903,7 @@ var Muxer = class {
|
|
|
887
903
|
tag: stream.tag
|
|
888
904
|
}, {
|
|
889
905
|
F: __dxlog_file4,
|
|
890
|
-
L:
|
|
906
|
+
L: 391,
|
|
891
907
|
S: this,
|
|
892
908
|
C: (f, a) => f(...a)
|
|
893
909
|
});
|
|
@@ -902,7 +918,7 @@ var Muxer = class {
|
|
|
902
918
|
cmd
|
|
903
919
|
}, {
|
|
904
920
|
F: __dxlog_file4,
|
|
905
|
-
L:
|
|
921
|
+
L: 400,
|
|
906
922
|
S: this,
|
|
907
923
|
C: (f, a) => f(...a)
|
|
908
924
|
});
|
|
@@ -950,7 +966,7 @@ var Muxer = class {
|
|
|
950
966
|
threshold: MAX_SAFE_FRAME_SIZE
|
|
951
967
|
}, {
|
|
952
968
|
F: __dxlog_file4,
|
|
953
|
-
L:
|
|
969
|
+
L: 441,
|
|
954
970
|
S: this,
|
|
955
971
|
C: (f, a) => f(...a)
|
|
956
972
|
});
|
|
@@ -1025,7 +1041,10 @@ var Muxer = class {
|
|
|
1025
1041
|
this.statsUpdated.emit(this._lastStats);
|
|
1026
1042
|
}
|
|
1027
1043
|
};
|
|
1028
|
-
|
|
1044
|
+
_ts_decorate([
|
|
1045
|
+
import_log5.logInfo
|
|
1046
|
+
], Muxer.prototype, "sessionIdString", null);
|
|
1047
|
+
function _ts_decorate2(decorators, target, key, desc) {
|
|
1029
1048
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1030
1049
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1031
1050
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1045,7 +1064,7 @@ var Teleport = class {
|
|
|
1045
1064
|
void this.destroy(err).catch(() => {
|
|
1046
1065
|
import_log2.log.error("Error during destroy", err, {
|
|
1047
1066
|
F: __dxlog_file5,
|
|
1048
|
-
L:
|
|
1067
|
+
L: 39,
|
|
1049
1068
|
S: this,
|
|
1050
1069
|
C: (f, a) => f(...a)
|
|
1051
1070
|
});
|
|
@@ -1060,7 +1079,7 @@ var Teleport = class {
|
|
|
1060
1079
|
this._aborting = false;
|
|
1061
1080
|
(0, import_invariant2.invariant)(typeof initiator === "boolean", void 0, {
|
|
1062
1081
|
F: __dxlog_file5,
|
|
1063
|
-
L:
|
|
1082
|
+
L: 56,
|
|
1064
1083
|
S: this,
|
|
1065
1084
|
A: [
|
|
1066
1085
|
"typeof initiator === 'boolean'",
|
|
@@ -1069,7 +1088,7 @@ var Teleport = class {
|
|
|
1069
1088
|
});
|
|
1070
1089
|
(0, import_invariant2.invariant)(import_keys2.PublicKey.isPublicKey(localPeerId), void 0, {
|
|
1071
1090
|
F: __dxlog_file5,
|
|
1072
|
-
L:
|
|
1091
|
+
L: 57,
|
|
1073
1092
|
S: this,
|
|
1074
1093
|
A: [
|
|
1075
1094
|
"PublicKey.isPublicKey(localPeerId)",
|
|
@@ -1078,7 +1097,7 @@ var Teleport = class {
|
|
|
1078
1097
|
});
|
|
1079
1098
|
(0, import_invariant2.invariant)(import_keys2.PublicKey.isPublicKey(remotePeerId), void 0, {
|
|
1080
1099
|
F: __dxlog_file5,
|
|
1081
|
-
L:
|
|
1100
|
+
L: 58,
|
|
1082
1101
|
S: this,
|
|
1083
1102
|
A: [
|
|
1084
1103
|
"PublicKey.isPublicKey(remotePeerId)",
|
|
@@ -1097,13 +1116,13 @@ var Teleport = class {
|
|
|
1097
1116
|
}
|
|
1098
1117
|
import_log2.log.info("abort teleport due to onTimeout in ControlExtension", void 0, {
|
|
1099
1118
|
F: __dxlog_file5,
|
|
1100
|
-
L:
|
|
1119
|
+
L: 71,
|
|
1101
1120
|
S: this,
|
|
1102
1121
|
C: (f, a) => f(...a)
|
|
1103
1122
|
});
|
|
1104
1123
|
this.abort(new import_protocols.TimeoutError("control extension")).catch((err) => import_log2.log.catch(err, void 0, {
|
|
1105
1124
|
F: __dxlog_file5,
|
|
1106
|
-
L:
|
|
1125
|
+
L: 72,
|
|
1107
1126
|
S: this,
|
|
1108
1127
|
C: (f, a) => f(...a)
|
|
1109
1128
|
}));
|
|
@@ -1114,13 +1133,13 @@ var Teleport = class {
|
|
|
1114
1133
|
name
|
|
1115
1134
|
}, {
|
|
1116
1135
|
F: __dxlog_file5,
|
|
1117
|
-
L:
|
|
1136
|
+
L: 80,
|
|
1118
1137
|
S: this,
|
|
1119
1138
|
C: (f, a) => f(...a)
|
|
1120
1139
|
});
|
|
1121
1140
|
(0, import_invariant2.invariant)(!this._remoteExtensions.has(name), "Remote extension already exists", {
|
|
1122
1141
|
F: __dxlog_file5,
|
|
1123
|
-
L:
|
|
1142
|
+
L: 81,
|
|
1124
1143
|
S: this,
|
|
1125
1144
|
A: [
|
|
1126
1145
|
"!this._remoteExtensions.has(name)",
|
|
@@ -1141,7 +1160,7 @@ var Teleport = class {
|
|
|
1141
1160
|
if (this._destroying || this._aborting) {
|
|
1142
1161
|
(0, import_log2.log)("destroy teleport due to muxer stream close, skipping due to already destroying/aborting", void 0, {
|
|
1143
1162
|
F: __dxlog_file5,
|
|
1144
|
-
L:
|
|
1163
|
+
L: 97,
|
|
1145
1164
|
S: this,
|
|
1146
1165
|
C: (f, a) => f(...a)
|
|
1147
1166
|
});
|
|
@@ -1164,12 +1183,15 @@ var Teleport = class {
|
|
|
1164
1183
|
channels: stats.channels
|
|
1165
1184
|
}, {
|
|
1166
1185
|
F: __dxlog_file5,
|
|
1167
|
-
L:
|
|
1186
|
+
L: 110,
|
|
1168
1187
|
S: this,
|
|
1169
1188
|
C: (f, a) => f(...a)
|
|
1170
1189
|
});
|
|
1171
1190
|
});
|
|
1172
1191
|
}
|
|
1192
|
+
get sessionIdString() {
|
|
1193
|
+
return this._sessionId ? this._sessionId.truncate() : "none";
|
|
1194
|
+
}
|
|
1173
1195
|
get stream() {
|
|
1174
1196
|
return this._muxer.stream;
|
|
1175
1197
|
}
|
|
@@ -1179,10 +1201,18 @@ var Teleport = class {
|
|
|
1179
1201
|
/**
|
|
1180
1202
|
* Blocks until the handshake is complete.
|
|
1181
1203
|
*/
|
|
1182
|
-
async open() {
|
|
1204
|
+
async open(sessionId = import_keys2.PublicKey.random()) {
|
|
1205
|
+
this._sessionId = sessionId;
|
|
1206
|
+
(0, import_log2.log)("open", void 0, {
|
|
1207
|
+
F: __dxlog_file5,
|
|
1208
|
+
L: 144,
|
|
1209
|
+
S: this,
|
|
1210
|
+
C: (f, a) => f(...a)
|
|
1211
|
+
});
|
|
1183
1212
|
this._setExtension("dxos.mesh.teleport.control", this._control);
|
|
1184
1213
|
await this._openExtension("dxos.mesh.teleport.control");
|
|
1185
1214
|
this._open = true;
|
|
1215
|
+
this._muxer.setSessionId(sessionId);
|
|
1186
1216
|
}
|
|
1187
1217
|
async close(err) {
|
|
1188
1218
|
await this.destroy(err);
|
|
@@ -1202,7 +1232,7 @@ var Teleport = class {
|
|
|
1202
1232
|
} catch (err2) {
|
|
1203
1233
|
import_log2.log.catch(err2, void 0, {
|
|
1204
1234
|
F: __dxlog_file5,
|
|
1205
|
-
L:
|
|
1235
|
+
L: 173,
|
|
1206
1236
|
S: this,
|
|
1207
1237
|
C: (f, a) => f(...a)
|
|
1208
1238
|
});
|
|
@@ -1225,7 +1255,7 @@ var Teleport = class {
|
|
|
1225
1255
|
} catch (err2) {
|
|
1226
1256
|
import_log2.log.catch(err2, void 0, {
|
|
1227
1257
|
F: __dxlog_file5,
|
|
1228
|
-
L:
|
|
1258
|
+
L: 197,
|
|
1229
1259
|
S: this,
|
|
1230
1260
|
C: (f, a) => f(...a)
|
|
1231
1261
|
});
|
|
@@ -1241,7 +1271,7 @@ var Teleport = class {
|
|
|
1241
1271
|
name
|
|
1242
1272
|
}, {
|
|
1243
1273
|
F: __dxlog_file5,
|
|
1244
|
-
L:
|
|
1274
|
+
L: 209,
|
|
1245
1275
|
S: this,
|
|
1246
1276
|
C: (f, a) => f(...a)
|
|
1247
1277
|
});
|
|
@@ -1265,7 +1295,7 @@ var Teleport = class {
|
|
|
1265
1295
|
_setExtension(extensionName, extension) {
|
|
1266
1296
|
(0, import_invariant2.invariant)(!extensionName.includes("/"), "Invalid extension name", {
|
|
1267
1297
|
F: __dxlog_file5,
|
|
1268
|
-
L:
|
|
1298
|
+
L: 233,
|
|
1269
1299
|
S: this,
|
|
1270
1300
|
A: [
|
|
1271
1301
|
"!extensionName.includes('/')",
|
|
@@ -1274,7 +1304,7 @@ var Teleport = class {
|
|
|
1274
1304
|
});
|
|
1275
1305
|
(0, import_invariant2.invariant)(!this._extensions.has(extensionName), "Extension already exists", {
|
|
1276
1306
|
F: __dxlog_file5,
|
|
1277
|
-
L:
|
|
1307
|
+
L: 234,
|
|
1278
1308
|
S: this,
|
|
1279
1309
|
A: [
|
|
1280
1310
|
"!this._extensions.has(extensionName)",
|
|
@@ -1288,7 +1318,7 @@ var Teleport = class {
|
|
|
1288
1318
|
extensionName
|
|
1289
1319
|
}, {
|
|
1290
1320
|
F: __dxlog_file5,
|
|
1291
|
-
L:
|
|
1321
|
+
L: 239,
|
|
1292
1322
|
S: this,
|
|
1293
1323
|
C: (f, a) => f(...a)
|
|
1294
1324
|
});
|
|
@@ -1300,7 +1330,7 @@ var Teleport = class {
|
|
|
1300
1330
|
createPort: async (channelName, opts) => {
|
|
1301
1331
|
(0, import_invariant2.invariant)(!channelName.includes("/"), "Invalid channel name", {
|
|
1302
1332
|
F: __dxlog_file5,
|
|
1303
|
-
L:
|
|
1333
|
+
L: 247,
|
|
1304
1334
|
S: this,
|
|
1305
1335
|
A: [
|
|
1306
1336
|
"!channelName.includes('/')",
|
|
@@ -1312,7 +1342,7 @@ var Teleport = class {
|
|
|
1312
1342
|
createStream: async (channelName, opts) => {
|
|
1313
1343
|
(0, import_invariant2.invariant)(!channelName.includes("/"), "Invalid channel name", {
|
|
1314
1344
|
F: __dxlog_file5,
|
|
1315
|
-
L:
|
|
1345
|
+
L: 251,
|
|
1316
1346
|
S: this,
|
|
1317
1347
|
A: [
|
|
1318
1348
|
"!channelName.includes('/')",
|
|
@@ -1332,16 +1362,19 @@ var Teleport = class {
|
|
|
1332
1362
|
extensionName
|
|
1333
1363
|
}, {
|
|
1334
1364
|
F: __dxlog_file5,
|
|
1335
|
-
L:
|
|
1365
|
+
L: 262,
|
|
1336
1366
|
S: this,
|
|
1337
1367
|
C: (f, a) => f(...a)
|
|
1338
1368
|
});
|
|
1339
1369
|
}
|
|
1340
1370
|
};
|
|
1341
|
-
|
|
1371
|
+
_ts_decorate2([
|
|
1372
|
+
import_log2.logInfo
|
|
1373
|
+
], Teleport.prototype, "sessionIdString", null);
|
|
1374
|
+
_ts_decorate2([
|
|
1342
1375
|
import_async.synchronized
|
|
1343
1376
|
], Teleport.prototype, "abort", null);
|
|
1344
|
-
|
|
1377
|
+
_ts_decorate2([
|
|
1345
1378
|
import_async.synchronized
|
|
1346
1379
|
], Teleport.prototype, "destroy", null);
|
|
1347
1380
|
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/core/mesh/teleport/src/testing/test-builder.ts";
|
|
@@ -1486,7 +1519,7 @@ var TestPeer = class {
|
|
|
1486
1519
|
""
|
|
1487
1520
|
]
|
|
1488
1521
|
});
|
|
1489
|
-
await connection.teleport.open();
|
|
1522
|
+
await connection.teleport.open(import_keys.PublicKey.random());
|
|
1490
1523
|
await this.onOpen(connection);
|
|
1491
1524
|
}
|
|
1492
1525
|
async closeConnection(connection) {
|
|
@@ -1907,4 +1940,4 @@ var TestExtensionWithStreams = class {
|
|
|
1907
1940
|
decodeFrame,
|
|
1908
1941
|
encodeFrame
|
|
1909
1942
|
});
|
|
1910
|
-
//# sourceMappingURL=chunk-
|
|
1943
|
+
//# sourceMappingURL=chunk-SJ6CXLWF.cjs.map
|