termdock 1.4.236 → 1.4.237
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.
|
@@ -138,9 +138,9 @@ export async function connectCollaborationRpc(identity, peer, endpoint, receive)
|
|
|
138
138
|
await rpc.request({ type: 'collaboration-connect' });
|
|
139
139
|
}
|
|
140
140
|
catch (error) {
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
if (!(error instanceof Error) || !['
|
|
141
|
+
// Older servers may lack duplex support; ordinary requests remain gated.
|
|
142
|
+
// Missing peer authorization must reconnect after enrollment completes.
|
|
143
|
+
if (!(error instanceof Error) || !['UNKNOWN_PACKET', 'COLLABORATION_UPGRADE_REQUIRED'].includes(error.message)) {
|
|
144
144
|
rpc.close();
|
|
145
145
|
throw error;
|
|
146
146
|
}
|
|
@@ -108,7 +108,7 @@ export class CollaborationService {
|
|
|
108
108
|
throw new Error('PAIRING_EXPIRED_OR_INVALID');
|
|
109
109
|
validateCollaborationNode(invitation.node);
|
|
110
110
|
this.setOrigin(origin);
|
|
111
|
-
const rpc = await this.options.connect(invitation.node);
|
|
111
|
+
const rpc = await (this.options.pairConnect ?? this.options.connect)(invitation.node);
|
|
112
112
|
try {
|
|
113
113
|
await rpc.request({ type: 'collaboration-service', action: 'pair', code: invitation.code, node: this.node() });
|
|
114
114
|
this.remember(invitation.node);
|
package/dist/server/entry.js
CHANGED
|
@@ -554,7 +554,8 @@ export function startServer(options = {}) {
|
|
|
554
554
|
app.locals.collaborationNode = { serviceId: runtime.serviceId, ...(caFingerprint256 ? { caFingerprint256 } : {}) };
|
|
555
555
|
collaborationService = new CollaborationService({ file: path.join(homedir(), '.termdock', 'federation', 'collaboration-services.json'),
|
|
556
556
|
store: collaborationStore, transport: collaborationTransport, node: () => app.locals.collaborationNode,
|
|
557
|
-
sessions: collaborationDirectorySessions, reverse: reverseCollaboration, connect: connectPeer
|
|
557
|
+
sessions: collaborationDirectorySessions, reverse: reverseCollaboration, connect: connectPeer,
|
|
558
|
+
pairConnect: peer => connectCollaborationRpc(runtime.identity, peer) });
|
|
558
559
|
app.locals.collaborationService = collaborationService;
|
|
559
560
|
collaborationService.start();
|
|
560
561
|
server.once('close', () => collaborationService?.close());
|
package/package.json
CHANGED
package/runtime-manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "termdock",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.237",
|
|
5
5
|
"runtimeProtocolVersion": 1,
|
|
6
6
|
"minimumDesktopVersion": "1.4.46",
|
|
7
7
|
"nodeMajor": 22,
|
|
8
8
|
"dependencyHash": "sha256-K4KyYJuVoQDpZsBM8ZX1Rw3MddOxAzVdp/cPm0iGZz0=",
|
|
9
|
-
"serverBundleHash": "sha256-
|
|
9
|
+
"serverBundleHash": "sha256-nRIwkH5+bg0aR08alnrQVcN5Q10duk4wtzWPNtdJAFU=",
|
|
10
10
|
"clientBundleHash": "sha256-trS+ETMzb9TMz5LAjLxWuftR8zROhre6jdKGsnMbg60=",
|
|
11
11
|
"entrypoint": "dist/server/cli.js",
|
|
12
12
|
"clientEntrypoint": "dist/client/index.html"
|