xshell 1.0.210 → 1.0.212
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/package.json +2 -2
- package/server.js +1 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"undici": "^7.1.0",
|
|
109
109
|
"vinyl": "^3.0.0",
|
|
110
110
|
"vinyl-fs": "^4.0.0",
|
|
111
|
-
"webpack": "^5.97.
|
|
111
|
+
"webpack": "^5.97.1",
|
|
112
112
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
113
113
|
"ws": "^8.18.0"
|
|
114
114
|
},
|
package/server.js
CHANGED
|
@@ -160,7 +160,6 @@ export class Server {
|
|
|
160
160
|
this.remote.funcs = {
|
|
161
161
|
...this.remote.funcs,
|
|
162
162
|
subscribe_stdio: ({ id }, websocket) => {
|
|
163
|
-
console.log(t('已订阅 stdio'));
|
|
164
163
|
const subscriber = async (chunk) => {
|
|
165
164
|
// send 时有可能 websocket 连接断开,抛异常,为防止循环调用 (console.error -> stdio subscriber -> throw error -> console.error)
|
|
166
165
|
// 这里只能忽略错误
|
|
@@ -174,10 +173,8 @@ export class Server {
|
|
|
174
173
|
const closer = subscriber.closer = () => {
|
|
175
174
|
const length = this.stdio_subscribers.length;
|
|
176
175
|
const stdio_subscribers_ = this.stdio_subscribers.filter(s => s !== subscriber);
|
|
177
|
-
if (stdio_subscribers_.length !== length)
|
|
178
|
-
console.log('由于 websocket 连接关闭,stdio 订阅被关闭');
|
|
176
|
+
if (stdio_subscribers_.length !== length)
|
|
179
177
|
this.stdio_subscribers = stdio_subscribers_;
|
|
180
|
-
}
|
|
181
178
|
};
|
|
182
179
|
this.stdio_subscribers.push(subscriber);
|
|
183
180
|
websocket.addEventListener('close', closer, { once: true });
|
|
@@ -192,7 +189,6 @@ export class Server {
|
|
|
192
189
|
else
|
|
193
190
|
return true;
|
|
194
191
|
});
|
|
195
|
-
console.log(t('已取消订阅 stdio'));
|
|
196
192
|
return [];
|
|
197
193
|
},
|
|
198
194
|
};
|