bdy 1.17.10-dev → 1.17.12-dev
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/distTs/package.json
CHANGED
|
@@ -225,6 +225,7 @@ class Agent extends events_1.default {
|
|
|
225
225
|
if (this.tunnelsUpdating)
|
|
226
226
|
return;
|
|
227
227
|
this.tunnelsUpdating = true;
|
|
228
|
+
const hasTunnels = this.tunnels.length > 0;
|
|
228
229
|
try {
|
|
229
230
|
const tt = [...this.tunnels];
|
|
230
231
|
tt.forEach((tunnel) => {
|
|
@@ -257,7 +258,7 @@ class Agent extends events_1.default {
|
|
|
257
258
|
// do nothing
|
|
258
259
|
}
|
|
259
260
|
this.tunnelsUpdating = false;
|
|
260
|
-
if (!this.service && !tunnels.length) {
|
|
261
|
+
if (!this.service && hasTunnels && !this.tunnels.length) {
|
|
261
262
|
output_1.default.exitError(texts_1.ERR_TUNNEL_REMOVED);
|
|
262
263
|
}
|
|
263
264
|
}
|
|
@@ -159,6 +159,8 @@ const addEntryToZip = (dirPath, zip, entry) => {
|
|
|
159
159
|
let name = (0, path_1.join)(entry.parentPath.replace(dirPath, ''), entry.name);
|
|
160
160
|
if (isDir)
|
|
161
161
|
name += '/';
|
|
162
|
+
else
|
|
163
|
+
name = name.replace(/^\//, '');
|
|
162
164
|
const file = new fflate_1.default.AsyncZipDeflate(name, {
|
|
163
165
|
level: 9,
|
|
164
166
|
});
|
|
@@ -214,16 +216,13 @@ const createZip = (dirPath, zipPath, entries, onEntry) => {
|
|
|
214
216
|
ws.close();
|
|
215
217
|
reject(err);
|
|
216
218
|
}
|
|
219
|
+
else if (final) {
|
|
220
|
+
ws.end(data, () => {
|
|
221
|
+
resolve();
|
|
222
|
+
});
|
|
223
|
+
}
|
|
217
224
|
else {
|
|
218
225
|
ws.write(data);
|
|
219
|
-
if (final) {
|
|
220
|
-
ws.close((err) => {
|
|
221
|
-
if (err)
|
|
222
|
-
reject(err);
|
|
223
|
-
else
|
|
224
|
-
resolve();
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
226
|
}
|
|
228
227
|
});
|
|
229
228
|
addEntriesToZip(dirPath, zip, entries, onEntry)
|
|
@@ -231,6 +230,7 @@ const createZip = (dirPath, zipPath, entries, onEntry) => {
|
|
|
231
230
|
zip.end();
|
|
232
231
|
})
|
|
233
232
|
.catch((err) => {
|
|
233
|
+
wasError = true;
|
|
234
234
|
ws.close(() => {
|
|
235
235
|
reject(err);
|
|
236
236
|
});
|