pubo-node 1.0.141 → 1.0.143

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.
@@ -31,37 +31,6 @@ var __importStar = this && this.__importStar || function (mod) {
31
31
  __setModuleDefault(result, mod);
32
32
  return result;
33
33
  };
34
- var __read = this && this.__read || function (o, n) {
35
- var m = typeof Symbol === "function" && o[Symbol.iterator];
36
- if (!m) return o;
37
- var i = m.call(o),
38
- r,
39
- ar = [],
40
- e;
41
- try {
42
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43
- } catch (error) {
44
- e = {
45
- error: error
46
- };
47
- } finally {
48
- try {
49
- if (r && !r.done && (m = i["return"])) m.call(i);
50
- } finally {
51
- if (e) throw e.error;
52
- }
53
- }
54
- return ar;
55
- };
56
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
57
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
58
- if (ar || !(i in from)) {
59
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
60
- ar[i] = from[i];
61
- }
62
- }
63
- return to.concat(ar || Array.prototype.slice.call(from));
64
- };
65
34
  Object.defineProperty(exports, "__esModule", {
66
35
  value: true
67
36
  });
@@ -69,25 +38,23 @@ exports.PuboFileSystem = void 0;
69
38
  var fs = __importStar(require("fs"));
70
39
  var callbackToPromise = function callbackToPromise(fn) {
71
40
  return function () {
72
- var args = [];
73
- for (var _i = 0; _i < arguments.length; _i++) {
74
- args[_i] = arguments[_i];
41
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42
+ args[_key] = arguments[_key];
75
43
  }
76
44
  return new Promise(function (resolve, reject) {
77
- fn.apply(void 0, __spreadArray(__spreadArray([], __read(args), false), [function (err) {
78
- var rest = [];
79
- for (var _i = 1; _i < arguments.length; _i++) {
80
- rest[_i - 1] = arguments[_i];
81
- }
45
+ fn.apply(void 0, args.concat([function (err) {
82
46
  if (err) {
83
47
  reject(err);
84
48
  }
49
+ for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
50
+ rest[_key2 - 1] = arguments[_key2];
51
+ }
85
52
  if (rest.length < 2) {
86
53
  resolve(rest[0]);
87
54
  } else {
88
- resolve(__spreadArray([], __read(rest), false));
55
+ resolve([].concat(rest));
89
56
  }
90
- }], false));
57
+ }]));
91
58
  });
92
59
  };
93
60
  };
@@ -1,184 +1,65 @@
1
1
  "use strict";
2
2
 
3
- var __assign = this && this.__assign || function () {
4
- __assign = Object.assign || function (t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
14
- function adopt(value) {
15
- return value instanceof P ? value : new P(function (resolve) {
16
- resolve(value);
17
- });
3
+ var _excluded = ["driver"],
4
+ _excluded2 = ["maxConnection"];
5
+ function _await(value, then, direct) {
6
+ if (direct) {
7
+ return then ? then(value) : value;
18
8
  }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- }
27
- function rejected(value) {
28
- try {
29
- step(generator["throw"](value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- }
34
- function step(result) {
35
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
36
- }
37
- step((generator = generator.apply(thisArg, _arguments || [])).next());
38
- });
39
- };
40
- var __generator = this && this.__generator || function (thisArg, body) {
41
- var _ = {
42
- label: 0,
43
- sent: function sent() {
44
- if (t[0] & 1) throw t[1];
45
- return t[1];
46
- },
47
- trys: [],
48
- ops: []
49
- },
50
- f,
51
- y,
52
- t,
53
- g;
54
- return g = {
55
- next: verb(0),
56
- "throw": verb(1),
57
- "return": verb(2)
58
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
59
- return this;
60
- }), g;
61
- function verb(n) {
62
- return function (v) {
63
- return step([n, v]);
64
- };
9
+ if (!value || !value.then) {
10
+ value = Promise.resolve(value);
65
11
  }
66
- function step(op) {
67
- if (f) throw new TypeError("Generator is already executing.");
68
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
69
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
70
- if (y = 0, t) op = [op[0] & 2, t.value];
71
- switch (op[0]) {
72
- case 0:
73
- case 1:
74
- t = op;
75
- break;
76
- case 4:
77
- _.label++;
78
- return {
79
- value: op[1],
80
- done: false
81
- };
82
- case 5:
83
- _.label++;
84
- y = op[1];
85
- op = [0];
86
- continue;
87
- case 7:
88
- op = _.ops.pop();
89
- _.trys.pop();
90
- continue;
91
- default:
92
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
93
- _ = 0;
94
- continue;
95
- }
96
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
97
- _.label = op[1];
98
- break;
99
- }
100
- if (op[0] === 6 && _.label < t[1]) {
101
- _.label = t[1];
102
- t = op;
103
- break;
104
- }
105
- if (t && _.label < t[2]) {
106
- _.label = t[2];
107
- _.ops.push(op);
108
- break;
109
- }
110
- if (t[2]) _.ops.pop();
111
- _.trys.pop();
112
- continue;
113
- }
114
- op = body.call(thisArg, _);
115
- } catch (e) {
116
- op = [6, e];
117
- y = 0;
118
- } finally {
119
- f = t = 0;
120
- }
121
- if (op[0] & 5) throw op[1];
122
- return {
123
- value: op[0] ? op[1] : void 0,
124
- done: true
125
- };
12
+ return then ? value.then(then) : value;
13
+ }
14
+ function _invoke(body, then) {
15
+ var result = body();
16
+ if (result && result.then) {
17
+ return result.then(then);
126
18
  }
127
- };
128
- var __rest = this && this.__rest || function (s, e) {
129
- var t = {};
130
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
131
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
132
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
19
+ return then(result);
20
+ }
21
+ function _empty() {}
22
+ function _awaitIgnored(value, direct) {
23
+ if (!direct) {
24
+ return value && value.then ? value.then(_empty) : Promise.resolve();
133
25
  }
134
- return t;
135
- };
136
- var __read = this && this.__read || function (o, n) {
137
- var m = typeof Symbol === "function" && o[Symbol.iterator];
138
- if (!m) return o;
139
- var i = m.call(o),
140
- r,
141
- ar = [],
142
- e;
143
- try {
144
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
145
- } catch (error) {
146
- e = {
147
- error: error
148
- };
149
- } finally {
150
- try {
151
- if (r && !r.done && (m = i["return"])) m.call(i);
152
- } finally {
153
- if (e) throw e.error;
26
+ }
27
+ function _async(f) {
28
+ return function () {
29
+ for (var args = [], i = 0; i < arguments.length; i++) {
30
+ args[i] = arguments[i];
154
31
  }
155
- }
156
- return ar;
157
- };
158
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
159
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
160
- if (ar || !(i in from)) {
161
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
162
- ar[i] = from[i];
32
+ try {
33
+ return Promise.resolve(f.apply(this, args));
34
+ } catch (e) {
35
+ return Promise.reject(e);
163
36
  }
164
- }
165
- return to.concat(ar || Array.prototype.slice.call(from));
166
- };
37
+ };
38
+ }
39
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
40
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
41
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
42
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
44
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
167
45
  Object.defineProperty(exports, "__esModule", {
168
46
  value: true
169
47
  });
170
48
  exports.FtpClientPool = exports.FtpClient = void 0;
171
49
  var pubo_utils_1 = require("pubo-utils");
172
- var FtpClient = /** @class */function () {
173
- function FtpClient(_a) {
174
- var driver = _a.driver,
175
- options = __rest(_a, ["driver"]);
50
+ var FtpClient = /*#__PURE__*/function () {
51
+ function FtpClient(_ref) {
52
+ var driver = _ref.driver,
53
+ options = _objectWithoutPropertiesLoose(_ref, _excluded);
54
+ this.driver = void 0;
55
+ this.options = void 0;
176
56
  this.state = {
177
57
  running: false,
178
58
  connected: false,
179
59
  destroyed: false,
180
60
  connecting: false
181
61
  };
62
+ this.client = void 0;
182
63
  this._len = 0;
183
64
  this.id = (0, pubo_utils_1.random)();
184
65
  this.put = this.bind('put');
@@ -188,171 +69,156 @@ var FtpClient = /** @class */function () {
188
69
  this.driver = driver;
189
70
  this.options = options;
190
71
  }
191
- Object.defineProperty(FtpClient.prototype, "len", {
192
- get: function get() {
193
- return this._len;
194
- },
195
- set: function set(n) {
196
- this._len = n;
197
- if (this._len < 1) {
198
- this.close();
199
- }
200
- },
201
- enumerable: false,
202
- configurable: true
203
- });
204
- FtpClient.prototype.connect = function () {
205
- return __awaiter(this, void 0, void 0, function () {
72
+ var _proto = FtpClient.prototype;
73
+ _proto.connect = function connect() {
74
+ try {
75
+ var _exit = false;
206
76
  var _this = this;
207
- return __generator(this, function (_a) {
208
- switch (_a.label) {
209
- case 0:
210
- if (!this.client) {
211
- this.client = new this.driver();
212
- }
213
- this.state.destroyed = false;
214
- if (!this.state.connecting) return [3 /*break*/, 2];
215
- return [4 /*yield*/, (0, pubo_utils_1.waitFor)(function () {
216
- return _this.state.connected;
217
- }, {
218
- checkTime: 1000,
219
- timeout: 10000
220
- })];
221
- case 1:
222
- _a.sent();
223
- return [2 /*return*/, 'connected'];
224
- case 2:
225
- this.state.connecting = true;
226
- return [2 /*return*/, new Promise(function (resolve, reject) {
227
- _this.client.once('ready', function () {
228
- _this.state.connected = true;
229
- resolve('connected');
230
- _this.state.connecting = false;
231
- });
232
- _this.client.once('error', function (err) {
233
- reject(err);
234
- _this.close();
235
- });
236
- _this.client.connect(__assign({}, _this.options));
237
- })];
77
+ if (!_this.client) {
78
+ _this.client = new _this.driver();
79
+ }
80
+ _this.state.destroyed = false;
81
+ return _await(_invoke(function () {
82
+ if (_this.state.connecting) {
83
+ return _await((0, pubo_utils_1.waitFor)(function () {
84
+ return _this.state.connected;
85
+ }, {
86
+ checkTime: 1000,
87
+ timeout: 10000
88
+ }), function () {
89
+ _exit = true;
90
+ return 'connected';
91
+ });
238
92
  }
239
- });
240
- });
93
+ }, function (_result) {
94
+ if (_exit) return _result;
95
+ _this.state.connecting = true;
96
+ return new Promise(function (resolve, reject) {
97
+ _this.client.once('ready', function () {
98
+ _this.state.connected = true;
99
+ resolve('connected');
100
+ _this.state.connecting = false;
101
+ });
102
+ _this.client.once('error', function (err) {
103
+ reject(err);
104
+ _this.close();
105
+ });
106
+ _this.client.connect(_extends({}, _this.options));
107
+ });
108
+ }));
109
+ } catch (e) {
110
+ return Promise.reject(e);
111
+ }
241
112
  };
242
- FtpClient.prototype.close = function () {
113
+ _proto.close = function close() {
243
114
  this.client.end();
244
115
  this.state.connected = false;
245
116
  this.state.destroyed = true;
246
117
  this.state.connecting = false;
247
118
  this.client = null;
248
119
  };
249
- FtpClient.prototype.run = function (_a) {
250
- var fn = _a.fn,
251
- args = _a.args;
252
- return __awaiter(this, void 0, void 0, function () {
253
- var _this = this;
254
- return __generator(this, function (_b) {
255
- switch (_b.label) {
256
- case 0:
257
- this.len += 1;
258
- if (!!this.state.connected) return [3 /*break*/, 2];
259
- return [4 /*yield*/, this.connect()];
260
- case 1:
261
- _b.sent();
262
- _b.label = 2;
263
- case 2:
264
- if (!this.state.running) return [3 /*break*/, 4];
265
- return [4 /*yield*/, (0, pubo_utils_1.waitFor)(function () {
266
- return !_this.state.running;
120
+ _proto.run = function run(_ref2) {
121
+ var fn = _ref2.fn,
122
+ args = _ref2.args;
123
+ try {
124
+ var _this2 = this;
125
+ _this2.len += 1;
126
+ return _await(_invoke(function () {
127
+ if (!_this2.state.connected) {
128
+ return _awaitIgnored(_this2.connect());
129
+ }
130
+ }, function () {
131
+ return _invoke(function () {
132
+ if (_this2.state.running) {
133
+ return _awaitIgnored((0, pubo_utils_1.waitFor)(function () {
134
+ return !_this2.state.running;
267
135
  }, {
268
136
  checkTime: 1000,
269
137
  timeout: 6000000
270
- })];
271
- case 3:
272
- _b.sent();
273
- _b.label = 4;
274
- case 4:
275
- this.state.running = true;
276
- return [2 /*return*/, new Promise(function (resolve, reject) {
277
- var _a;
278
- (_a = _this.client)[fn].apply(_a, __spreadArray(__spreadArray([], __read(args), false), [function (err, res) {
279
- if (err) {
280
- reject(err);
281
- } else {
282
- resolve(res);
283
- }
284
- }], false));
285
- })];
286
- }
138
+ }));
139
+ }
140
+ }, function () {
141
+ _this2.state.running = true;
142
+ return new Promise(function (resolve, reject) {
143
+ var _this2$client;
144
+ (_this2$client = _this2.client)[fn].apply(_this2$client, args.concat([function (err, res) {
145
+ if (err) {
146
+ reject(err);
147
+ } else {
148
+ resolve(res);
149
+ }
150
+ }]));
151
+ });
152
+ });
153
+ }));
154
+ } catch (e) {
155
+ return Promise.reject(e);
156
+ }
157
+ };
158
+ _proto.bind = function bind(fn) {
159
+ var _this3 = this;
160
+ return _async(function () {
161
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
162
+ args[_key] = arguments[_key];
163
+ }
164
+ return _await(_this3.run({
165
+ fn: fn,
166
+ args: args
167
+ }), function (res) {
168
+ _this3.state.running = false;
169
+ _this3.len -= 1;
170
+ return res;
287
171
  });
288
172
  });
289
173
  };
290
- FtpClient.prototype.bind = function (fn) {
291
- var _this = this;
292
- return function () {
293
- var args = [];
294
- for (var _i = 0; _i < arguments.length; _i++) {
295
- args[_i] = arguments[_i];
174
+ _proto.get = function get() {
175
+ try {
176
+ var _this4 = this;
177
+ var res = Buffer.alloc(0);
178
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
179
+ args[_key2] = arguments[_key2];
296
180
  }
297
- return __awaiter(_this, void 0, void 0, function () {
298
- var res;
299
- return __generator(this, function (_a) {
300
- switch (_a.label) {
301
- case 0:
302
- return [4 /*yield*/, this.run({
303
- fn: fn,
304
- args: args
305
- })];
306
- case 1:
307
- res = _a.sent();
308
- this.state.running = false;
309
- this.len -= 1;
310
- return [2 /*return*/, res];
311
- }
181
+ return _await(_this4.run({
182
+ fn: 'get',
183
+ args: args
184
+ }), function (stream) {
185
+ return new Promise(function (resolve) {
186
+ stream.on('data', function (chunk) {
187
+ res = Buffer.concat([res, chunk], res.byteLength + chunk.byteLength);
188
+ });
189
+ stream.on('end', function () {
190
+ resolve(res);
191
+ _this4.state.running = false;
192
+ _this4.len -= 1;
193
+ });
312
194
  });
313
195
  });
314
- };
315
- };
316
- FtpClient.prototype.get = function () {
317
- var args = [];
318
- for (var _i = 0; _i < arguments.length; _i++) {
319
- args[_i] = arguments[_i];
196
+ } catch (e) {
197
+ return Promise.reject(e);
320
198
  }
321
- return __awaiter(this, void 0, void 0, function () {
322
- var res, stream;
323
- var _this = this;
324
- return __generator(this, function (_a) {
325
- switch (_a.label) {
326
- case 0:
327
- res = Buffer.alloc(0);
328
- return [4 /*yield*/, this.run({
329
- fn: 'get',
330
- args: args
331
- })];
332
- case 1:
333
- stream = _a.sent();
334
- return [2 /*return*/, new Promise(function (resolve) {
335
- stream.on('data', function (chunk) {
336
- res = Buffer.concat([res, chunk], res.byteLength + chunk.byteLength);
337
- });
338
- stream.on('end', function () {
339
- resolve(res);
340
- _this.state.running = false;
341
- _this.len -= 1;
342
- });
343
- })];
344
- }
345
- });
346
- });
347
199
  };
200
+ _createClass(FtpClient, [{
201
+ key: "len",
202
+ get: function get() {
203
+ return this._len;
204
+ },
205
+ set: function set(n) {
206
+ this._len = n;
207
+ if (this._len < 1) {
208
+ this.close();
209
+ }
210
+ }
211
+ }]);
348
212
  return FtpClient;
349
213
  }();
350
214
  exports.FtpClient = FtpClient;
351
- var FtpClientPool = /** @class */function () {
352
- function FtpClientPool(_a) {
353
- var _b = _a.maxConnection,
354
- maxConnection = _b === void 0 ? 5 : _b,
355
- options = __rest(_a, ["maxConnection"]);
215
+ var FtpClientPool = /*#__PURE__*/function () {
216
+ function FtpClientPool(_ref3) {
217
+ var _ref3$maxConnection = _ref3.maxConnection,
218
+ maxConnection = _ref3$maxConnection === void 0 ? 5 : _ref3$maxConnection,
219
+ options = _objectWithoutPropertiesLoose(_ref3, _excluded2);
220
+ this.options = void 0;
221
+ this.maxConnection = void 0;
356
222
  this.pool = [];
357
223
  this.get = this.bind('get');
358
224
  this.put = this.bind('put');
@@ -362,14 +228,29 @@ var FtpClientPool = /** @class */function () {
362
228
  this.options = options;
363
229
  this.maxConnection = maxConnection;
364
230
  }
365
- Object.defineProperty(FtpClientPool.prototype, "len", {
231
+ var _proto2 = FtpClientPool.prototype;
232
+ _proto2.bind = function bind(fn) {
233
+ var _this5 = this;
234
+ return _async(function () {
235
+ var client = _this5.client;
236
+ return _await(client[fn].apply(client, arguments), function (res) {
237
+ if (client.len < 1) {
238
+ var index = _this5.pool.findIndex(function (item) {
239
+ return item.id === client.id;
240
+ });
241
+ _this5.pool.splice(index, 1);
242
+ }
243
+ return res;
244
+ });
245
+ });
246
+ };
247
+ _createClass(FtpClientPool, [{
248
+ key: "len",
366
249
  get: function get() {
367
250
  return this.pool.length;
368
- },
369
- enumerable: false,
370
- configurable: true
371
- });
372
- Object.defineProperty(FtpClientPool.prototype, "client", {
251
+ }
252
+ }, {
253
+ key: "client",
373
254
  get: function get() {
374
255
  if (this.pool.length < this.maxConnection) {
375
256
  var client = new FtpClient(this.options);
@@ -380,38 +261,8 @@ var FtpClientPool = /** @class */function () {
380
261
  return a.len - b.len;
381
262
  });
382
263
  return this.pool[0];
383
- },
384
- enumerable: false,
385
- configurable: true
386
- });
387
- FtpClientPool.prototype.bind = function (fn) {
388
- var _this = this;
389
- return function () {
390
- var args = [];
391
- for (var _i = 0; _i < arguments.length; _i++) {
392
- args[_i] = arguments[_i];
393
- }
394
- return __awaiter(_this, void 0, void 0, function () {
395
- var client, res, index;
396
- return __generator(this, function (_a) {
397
- switch (_a.label) {
398
- case 0:
399
- client = this.client;
400
- return [4 /*yield*/, client[fn].apply(client, __spreadArray([], __read(args), false))];
401
- case 1:
402
- res = _a.sent();
403
- if (client.len < 1) {
404
- index = this.pool.findIndex(function (item) {
405
- return item.id === client.id;
406
- });
407
- this.pool.splice(index, 1);
408
- }
409
- return [2 /*return*/, res];
410
- }
411
- });
412
- });
413
- };
414
- };
264
+ }
265
+ }]);
415
266
  return FtpClientPool;
416
267
  }();
417
268
  exports.FtpClientPool = FtpClientPool;