backendless 6.5.9 → 6.6.0
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/README.md +4 -2
- package/backendless.d.ts +3 -1
- package/dist/backendless.js +8024 -8645
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +3 -3
- package/dist/backendless.min.js.LICENSE.txt +0 -398
- package/es/files/index.js +69 -34
- package/es/urls.js +5 -0
- package/lib/files/index.js +69 -34
- package/lib/urls.js +5 -0
- package/package.json +1 -1
- package/src/files/index.js +23 -12
- package/src/urls.js +4 -0
|
@@ -1,399 +1 @@
|
|
|
1
|
-
/*! ../helpers/regeneratorRuntime */
|
|
2
|
-
|
|
3
|
-
/*! ../transport */
|
|
4
|
-
|
|
5
|
-
/*! ./assertThisInitialized.js */
|
|
6
|
-
|
|
7
|
-
/*! ./client */
|
|
8
|
-
|
|
9
|
-
/*! ./config */
|
|
10
|
-
|
|
11
|
-
/*! ./constants */
|
|
12
|
-
|
|
13
|
-
/*! ./debug */
|
|
14
|
-
|
|
15
|
-
/*! ./getPrototypeOf.js */
|
|
16
|
-
|
|
17
|
-
/*! ./keys */
|
|
18
|
-
|
|
19
|
-
/*! ./listeners */
|
|
20
|
-
|
|
21
|
-
/*! ./manager */
|
|
22
|
-
|
|
23
|
-
/*! ./methods */
|
|
24
|
-
|
|
25
|
-
/*! ./on */
|
|
26
|
-
|
|
27
|
-
/*! ./polling */
|
|
28
|
-
|
|
29
|
-
/*! ./polling-jsonp */
|
|
30
|
-
|
|
31
|
-
/*! ./polling-xhr */
|
|
32
|
-
|
|
33
|
-
/*! ./scope-connector */
|
|
34
|
-
|
|
35
|
-
/*! ./session */
|
|
36
|
-
|
|
37
|
-
/*! ./setPrototypeOf.js */
|
|
38
|
-
|
|
39
|
-
/*! ./socket */
|
|
40
|
-
|
|
41
|
-
/*! ./subscriptions */
|
|
42
|
-
|
|
43
|
-
/*! ./superPropBase.js */
|
|
44
|
-
|
|
45
|
-
/*! ./transport */
|
|
46
|
-
|
|
47
|
-
/*! ./transports/index */
|
|
48
|
-
|
|
49
|
-
/*! ./typeof.js */
|
|
50
|
-
|
|
51
|
-
/*! ./url */
|
|
52
|
-
|
|
53
|
-
/*! ./utf8 */
|
|
54
|
-
|
|
55
|
-
/*! ./utils */
|
|
56
|
-
|
|
57
|
-
/*! ./websocket */
|
|
58
|
-
|
|
59
|
-
/*! @babel/runtime/helpers/applyDecoratedDescriptor */
|
|
60
|
-
|
|
61
|
-
/*! @babel/runtime/helpers/asyncToGenerator */
|
|
62
|
-
|
|
63
|
-
/*! @babel/runtime/helpers/classCallCheck */
|
|
64
|
-
|
|
65
|
-
/*! @babel/runtime/helpers/createClass */
|
|
66
|
-
|
|
67
|
-
/*! @babel/runtime/helpers/defineProperty */
|
|
68
|
-
|
|
69
|
-
/*! @babel/runtime/helpers/get */
|
|
70
|
-
|
|
71
|
-
/*! @babel/runtime/helpers/getPrototypeOf */
|
|
72
|
-
|
|
73
|
-
/*! @babel/runtime/helpers/inherits */
|
|
74
|
-
|
|
75
|
-
/*! @babel/runtime/helpers/interopRequireDefault */
|
|
76
|
-
|
|
77
|
-
/*! @babel/runtime/helpers/possibleConstructorReturn */
|
|
78
|
-
|
|
79
|
-
/*! @babel/runtime/helpers/typeof */
|
|
80
|
-
|
|
81
|
-
/*! @babel/runtime/regenerator */
|
|
82
|
-
|
|
83
|
-
/*! after */
|
|
84
|
-
|
|
85
|
-
/*! arraybuffer.slice */
|
|
86
|
-
|
|
87
|
-
/*! backendless-request */
|
|
88
|
-
|
|
89
|
-
/*! backo2 */
|
|
90
|
-
|
|
91
|
-
/*! base64-arraybuffer */
|
|
92
|
-
|
|
93
|
-
/*! blob */
|
|
94
|
-
|
|
95
|
-
/*! component-bind */
|
|
96
|
-
|
|
97
|
-
/*! component-emitter */
|
|
98
|
-
|
|
99
|
-
/*! component-inherit */
|
|
100
|
-
|
|
101
|
-
/*! debug */
|
|
102
|
-
|
|
103
|
-
/*! engine.io-client */
|
|
104
|
-
|
|
105
|
-
/*! engine.io-parser */
|
|
106
|
-
|
|
107
|
-
/*! has-binary2 */
|
|
108
|
-
|
|
109
|
-
/*! has-cors */
|
|
110
|
-
|
|
111
1
|
/*! https://mths.be/utf8js v2.1.2 by @mathias */
|
|
112
|
-
|
|
113
|
-
/*! indexof */
|
|
114
|
-
|
|
115
|
-
/*! isarray */
|
|
116
|
-
|
|
117
|
-
/*! ms */
|
|
118
|
-
|
|
119
|
-
/*! parseqs */
|
|
120
|
-
|
|
121
|
-
/*! parseuri */
|
|
122
|
-
|
|
123
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
124
|
-
|
|
125
|
-
/*! socket.io-client */
|
|
126
|
-
|
|
127
|
-
/*! socket.io-parser */
|
|
128
|
-
|
|
129
|
-
/*! to-array */
|
|
130
|
-
|
|
131
|
-
/*! ws */
|
|
132
|
-
|
|
133
|
-
/*! xmlhttprequest-ssl */
|
|
134
|
-
|
|
135
|
-
/*! yeast */
|
|
136
|
-
|
|
137
|
-
/*!********************!*\
|
|
138
|
-
!*** ws (ignored) ***!
|
|
139
|
-
\********************/
|
|
140
|
-
|
|
141
|
-
/*!**********************!*\
|
|
142
|
-
!*** ./src/index.js ***!
|
|
143
|
-
\**********************/
|
|
144
|
-
|
|
145
|
-
/*!**********************!*\
|
|
146
|
-
!*** ./src/utils.js ***!
|
|
147
|
-
\**********************/
|
|
148
|
-
|
|
149
|
-
/*!***********************!*\
|
|
150
|
-
!*** ./src/client.js ***!
|
|
151
|
-
\***********************/
|
|
152
|
-
|
|
153
|
-
/*!***********************!*\
|
|
154
|
-
!*** ./src/config.js ***!
|
|
155
|
-
\***********************/
|
|
156
|
-
|
|
157
|
-
/*!***********************!*\
|
|
158
|
-
!*** ./src/socket.js ***!
|
|
159
|
-
\***********************/
|
|
160
|
-
|
|
161
|
-
/*!************************!*\
|
|
162
|
-
!*** ./src/methods.js ***!
|
|
163
|
-
\************************/
|
|
164
|
-
|
|
165
|
-
/*!************************!*\
|
|
166
|
-
!*** ./src/session.js ***!
|
|
167
|
-
\************************/
|
|
168
|
-
|
|
169
|
-
/*!**************************!*\
|
|
170
|
-
!*** ./src/constants.js ***!
|
|
171
|
-
\**************************/
|
|
172
|
-
|
|
173
|
-
/*!**************************!*\
|
|
174
|
-
!*** ./src/listeners.js ***!
|
|
175
|
-
\**************************/
|
|
176
|
-
|
|
177
|
-
/*!******************************!*\
|
|
178
|
-
!*** ./src/socket-parser.js ***!
|
|
179
|
-
\******************************/
|
|
180
|
-
|
|
181
|
-
/*!******************************!*\
|
|
182
|
-
!*** ./src/subscriptions.js ***!
|
|
183
|
-
\******************************/
|
|
184
|
-
|
|
185
|
-
/*!********************************!*\
|
|
186
|
-
!*** ./src/scope-connector.js ***!
|
|
187
|
-
\********************************/
|
|
188
|
-
|
|
189
|
-
/*!**********************************!*\
|
|
190
|
-
!*** ./node_modules/ms/index.js ***!
|
|
191
|
-
\**********************************/
|
|
192
|
-
|
|
193
|
-
/*!************************************!*\
|
|
194
|
-
!*** ./node_modules/blob/index.js ***!
|
|
195
|
-
\************************************/
|
|
196
|
-
|
|
197
|
-
/*!*************************************!*\
|
|
198
|
-
!*** ./node_modules/after/index.js ***!
|
|
199
|
-
\*************************************/
|
|
200
|
-
|
|
201
|
-
/*!*************************************!*\
|
|
202
|
-
!*** ./node_modules/yeast/index.js ***!
|
|
203
|
-
\*************************************/
|
|
204
|
-
|
|
205
|
-
/*!**************************************!*\
|
|
206
|
-
!*** ./node_modules/backo2/index.js ***!
|
|
207
|
-
\**************************************/
|
|
208
|
-
|
|
209
|
-
/*!***************************************!*\
|
|
210
|
-
!*** ./node_modules/indexof/index.js ***!
|
|
211
|
-
\***************************************/
|
|
212
|
-
|
|
213
|
-
/*!***************************************!*\
|
|
214
|
-
!*** ./node_modules/isarray/index.js ***!
|
|
215
|
-
\***************************************/
|
|
216
|
-
|
|
217
|
-
/*!***************************************!*\
|
|
218
|
-
!*** ./node_modules/parseqs/index.js ***!
|
|
219
|
-
\***************************************/
|
|
220
|
-
|
|
221
|
-
/*!****************************************!*\
|
|
222
|
-
!*** ./node_modules/has-cors/index.js ***!
|
|
223
|
-
\****************************************/
|
|
224
|
-
|
|
225
|
-
/*!****************************************!*\
|
|
226
|
-
!*** ./node_modules/parseuri/index.js ***!
|
|
227
|
-
\****************************************/
|
|
228
|
-
|
|
229
|
-
/*!****************************************!*\
|
|
230
|
-
!*** ./node_modules/to-array/index.js ***!
|
|
231
|
-
\****************************************/
|
|
232
|
-
|
|
233
|
-
/*!*****************************************!*\
|
|
234
|
-
!*** ./node_modules/debug/src/debug.js ***!
|
|
235
|
-
\*****************************************/
|
|
236
|
-
|
|
237
|
-
/*!*******************************************!*\
|
|
238
|
-
!*** ./node_modules/debug/src/browser.js ***!
|
|
239
|
-
\*******************************************/
|
|
240
|
-
|
|
241
|
-
/*!*******************************************!*\
|
|
242
|
-
!*** ./node_modules/has-binary2/index.js ***!
|
|
243
|
-
\*******************************************/
|
|
244
|
-
|
|
245
|
-
/*!**********************************************!*\
|
|
246
|
-
!*** ./node_modules/component-bind/index.js ***!
|
|
247
|
-
\**********************************************/
|
|
248
|
-
|
|
249
|
-
/*!*************************************************!*\
|
|
250
|
-
!*** ./node_modules/arraybuffer.slice/index.js ***!
|
|
251
|
-
\*************************************************/
|
|
252
|
-
|
|
253
|
-
/*!*************************************************!*\
|
|
254
|
-
!*** ./node_modules/component-emitter/index.js ***!
|
|
255
|
-
\*************************************************/
|
|
256
|
-
|
|
257
|
-
/*!*************************************************!*\
|
|
258
|
-
!*** ./node_modules/component-inherit/index.js ***!
|
|
259
|
-
\*************************************************/
|
|
260
|
-
|
|
261
|
-
/*!*************************************************!*\
|
|
262
|
-
!*** ./node_modules/socket.io-client/lib/on.js ***!
|
|
263
|
-
\*************************************************/
|
|
264
|
-
|
|
265
|
-
/*!**************************************************!*\
|
|
266
|
-
!*** ./node_modules/socket.io-client/lib/url.js ***!
|
|
267
|
-
\**************************************************/
|
|
268
|
-
|
|
269
|
-
/*!***************************************************!*\
|
|
270
|
-
!*** ./node_modules/engine.io-parser/lib/keys.js ***!
|
|
271
|
-
\***************************************************/
|
|
272
|
-
|
|
273
|
-
/*!***************************************************!*\
|
|
274
|
-
!*** ./node_modules/engine.io-parser/lib/utf8.js ***!
|
|
275
|
-
\***************************************************/
|
|
276
|
-
|
|
277
|
-
/*!****************************************************!*\
|
|
278
|
-
!*** ./node_modules/@babel/runtime/helpers/get.js ***!
|
|
279
|
-
\****************************************************/
|
|
280
|
-
|
|
281
|
-
/*!****************************************************!*\
|
|
282
|
-
!*** ./node_modules/engine.io-client/lib/index.js ***!
|
|
283
|
-
\****************************************************/
|
|
284
|
-
|
|
285
|
-
/*!****************************************************!*\
|
|
286
|
-
!*** ./node_modules/socket.io-client/lib/index.js ***!
|
|
287
|
-
\****************************************************/
|
|
288
|
-
|
|
289
|
-
/*!*****************************************************!*\
|
|
290
|
-
!*** ./node_modules/engine.io-client/lib/socket.js ***!
|
|
291
|
-
\*****************************************************/
|
|
292
|
-
|
|
293
|
-
/*!*****************************************************!*\
|
|
294
|
-
!*** ./node_modules/socket.io-client/lib/socket.js ***!
|
|
295
|
-
\*****************************************************/
|
|
296
|
-
|
|
297
|
-
/*!******************************************************!*\
|
|
298
|
-
!*** ./node_modules/engine.io-parser/lib/browser.js ***!
|
|
299
|
-
\******************************************************/
|
|
300
|
-
|
|
301
|
-
/*!******************************************************!*\
|
|
302
|
-
!*** ./node_modules/socket.io-client/lib/manager.js ***!
|
|
303
|
-
\******************************************************/
|
|
304
|
-
|
|
305
|
-
/*!*******************************************************!*\
|
|
306
|
-
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
|
307
|
-
\*******************************************************/
|
|
308
|
-
|
|
309
|
-
/*!********************************************************!*\
|
|
310
|
-
!*** ./node_modules/engine.io-client/lib/transport.js ***!
|
|
311
|
-
\********************************************************/
|
|
312
|
-
|
|
313
|
-
/*!*********************************************************!*\
|
|
314
|
-
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
|
315
|
-
\*********************************************************/
|
|
316
|
-
|
|
317
|
-
/*!**********************************************************!*\
|
|
318
|
-
!*** ./node_modules/@babel/runtime/regenerator/index.js ***!
|
|
319
|
-
\**********************************************************/
|
|
320
|
-
|
|
321
|
-
/*!************************************************************!*\
|
|
322
|
-
!*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
|
|
323
|
-
\************************************************************/
|
|
324
|
-
|
|
325
|
-
/*!*************************************************************!*\
|
|
326
|
-
!*** ./node_modules/engine.io-client/lib/xmlhttprequest.js ***!
|
|
327
|
-
\*************************************************************/
|
|
328
|
-
|
|
329
|
-
/*!**************************************************************!*\
|
|
330
|
-
!*** ./node_modules/@babel/runtime/helpers/superPropBase.js ***!
|
|
331
|
-
\**************************************************************/
|
|
332
|
-
|
|
333
|
-
/*!***************************************************************!*\
|
|
334
|
-
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
|
335
|
-
\***************************************************************/
|
|
336
|
-
|
|
337
|
-
/*!***************************************************************!*\
|
|
338
|
-
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
|
339
|
-
\***************************************************************/
|
|
340
|
-
|
|
341
|
-
/*!***************************************************************!*\
|
|
342
|
-
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
|
343
|
-
\***************************************************************/
|
|
344
|
-
|
|
345
|
-
/*!***************************************************************!*\
|
|
346
|
-
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
|
347
|
-
\***************************************************************/
|
|
348
|
-
|
|
349
|
-
/*!***************************************************************!*\
|
|
350
|
-
!*** ./node_modules/engine.io-client/lib/transports/index.js ***!
|
|
351
|
-
\***************************************************************/
|
|
352
|
-
|
|
353
|
-
/*!*****************************************************************!*\
|
|
354
|
-
!*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
|
|
355
|
-
\*****************************************************************/
|
|
356
|
-
|
|
357
|
-
/*!*****************************************************************!*\
|
|
358
|
-
!*** ./node_modules/engine.io-client/lib/transports/polling.js ***!
|
|
359
|
-
\*****************************************************************/
|
|
360
|
-
|
|
361
|
-
/*!*******************************************************************!*\
|
|
362
|
-
!*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
|
|
363
|
-
\*******************************************************************/
|
|
364
|
-
|
|
365
|
-
/*!*******************************************************************!*\
|
|
366
|
-
!*** ./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js ***!
|
|
367
|
-
\*******************************************************************/
|
|
368
|
-
|
|
369
|
-
/*!*******************************************************************!*\
|
|
370
|
-
!*** ./node_modules/engine.io-client/lib/transports/websocket.js ***!
|
|
371
|
-
\*******************************************************************/
|
|
372
|
-
|
|
373
|
-
/*!*********************************************************************!*\
|
|
374
|
-
!*** ./node_modules/engine.io-client/lib/transports/polling-xhr.js ***!
|
|
375
|
-
\*********************************************************************/
|
|
376
|
-
|
|
377
|
-
/*!**********************************************************************!*\
|
|
378
|
-
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
|
379
|
-
\**********************************************************************/
|
|
380
|
-
|
|
381
|
-
/*!**********************************************************************!*\
|
|
382
|
-
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
|
383
|
-
\**********************************************************************/
|
|
384
|
-
|
|
385
|
-
/*!**********************************************************************!*\
|
|
386
|
-
!*** ./node_modules/backendless-request/dist/backendless-request.js ***!
|
|
387
|
-
\**********************************************************************/
|
|
388
|
-
|
|
389
|
-
/*!***********************************************************************!*\
|
|
390
|
-
!*** ./node_modules/engine.io-client/lib/transports/polling-jsonp.js ***!
|
|
391
|
-
\***********************************************************************/
|
|
392
|
-
|
|
393
|
-
/*!*************************************************************************!*\
|
|
394
|
-
!*** ./node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js ***!
|
|
395
|
-
\*************************************************************************/
|
|
396
|
-
|
|
397
|
-
/*!**************************************************************************!*\
|
|
398
|
-
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
|
399
|
-
\**************************************************************************/
|
package/es/files/index.js
CHANGED
|
@@ -571,27 +571,41 @@ var Files = /*#__PURE__*/function () {
|
|
|
571
571
|
return exists;
|
|
572
572
|
}()
|
|
573
573
|
}, {
|
|
574
|
-
key: "
|
|
574
|
+
key: "getFileCount",
|
|
575
575
|
value: function () {
|
|
576
|
-
var
|
|
576
|
+
var _getFileCount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(filesPath, pattern, sub, countDirectories) {
|
|
577
577
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
578
578
|
while (1) {
|
|
579
579
|
switch (_context11.prev = _context11.next) {
|
|
580
580
|
case 0:
|
|
581
|
-
if (!(!
|
|
581
|
+
if (!(!filesPath || typeof filesPath !== 'string')) {
|
|
582
582
|
_context11.next = 2;
|
|
583
583
|
break;
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
throw new Error('
|
|
586
|
+
throw new Error('"filesPath" must be provided and must be a string.');
|
|
587
587
|
|
|
588
588
|
case 2:
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
589
|
+
if (!(pattern && typeof pattern !== 'string')) {
|
|
590
|
+
_context11.next = 4;
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
throw new Error('Files Pattern must be provided and must be a string.');
|
|
593
595
|
|
|
594
596
|
case 4:
|
|
597
|
+
filesPath = _utils["default"].trimSlashesInPath(filesPath);
|
|
598
|
+
return _context11.abrupt("return", this.app.request.get({
|
|
599
|
+
url: this.app.urls.filePath(filesPath),
|
|
600
|
+
query: {
|
|
601
|
+
action: 'count',
|
|
602
|
+
pattern: pattern || '*',
|
|
603
|
+
sub: !!sub,
|
|
604
|
+
countDirectories: !!countDirectories
|
|
605
|
+
}
|
|
606
|
+
}));
|
|
607
|
+
|
|
608
|
+
case 6:
|
|
595
609
|
case "end":
|
|
596
610
|
return _context11.stop();
|
|
597
611
|
}
|
|
@@ -599,60 +613,81 @@ var Files = /*#__PURE__*/function () {
|
|
|
599
613
|
}, _callee11, this);
|
|
600
614
|
}));
|
|
601
615
|
|
|
602
|
-
function
|
|
603
|
-
return
|
|
616
|
+
function getFileCount(_x27, _x28, _x29, _x30) {
|
|
617
|
+
return _getFileCount.apply(this, arguments);
|
|
604
618
|
}
|
|
605
619
|
|
|
606
|
-
return
|
|
620
|
+
return getFileCount;
|
|
607
621
|
}()
|
|
608
622
|
}, {
|
|
609
|
-
key: "
|
|
623
|
+
key: "createDirectory",
|
|
610
624
|
value: function () {
|
|
611
|
-
var
|
|
625
|
+
var _createDirectory = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(directoryPath) {
|
|
612
626
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
613
627
|
while (1) {
|
|
614
628
|
switch (_context12.prev = _context12.next) {
|
|
615
629
|
case 0:
|
|
616
|
-
if (!(!
|
|
630
|
+
if (!(!directoryPath || typeof directoryPath !== 'string')) {
|
|
617
631
|
_context12.next = 2;
|
|
618
632
|
break;
|
|
619
633
|
}
|
|
620
634
|
|
|
621
|
-
throw new Error('"
|
|
635
|
+
throw new Error('Directory "path" must be provided and must be a string.');
|
|
622
636
|
|
|
623
637
|
case 2:
|
|
624
|
-
|
|
625
|
-
|
|
638
|
+
directoryPath = _utils["default"].trimSlashesInPath(directoryPath);
|
|
639
|
+
return _context12.abrupt("return", this.app.request.post({
|
|
640
|
+
url: this.app.urls.directoryPath(directoryPath)
|
|
641
|
+
}));
|
|
642
|
+
|
|
643
|
+
case 4:
|
|
644
|
+
case "end":
|
|
645
|
+
return _context12.stop();
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}, _callee12, this);
|
|
649
|
+
}));
|
|
650
|
+
|
|
651
|
+
function createDirectory(_x31) {
|
|
652
|
+
return _createDirectory.apply(this, arguments);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return createDirectory;
|
|
656
|
+
}()
|
|
657
|
+
}, {
|
|
658
|
+
key: "removeDirectory",
|
|
659
|
+
value: function () {
|
|
660
|
+
var _removeDirectory = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(directoryPath) {
|
|
661
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
662
|
+
while (1) {
|
|
663
|
+
switch (_context13.prev = _context13.next) {
|
|
664
|
+
case 0:
|
|
665
|
+
if (!(!directoryPath || typeof directoryPath !== 'string')) {
|
|
666
|
+
_context13.next = 2;
|
|
626
667
|
break;
|
|
627
668
|
}
|
|
628
669
|
|
|
629
|
-
throw new Error('
|
|
670
|
+
throw new Error('Directory "path" must be provided and must be a string.');
|
|
630
671
|
|
|
631
|
-
case
|
|
632
|
-
|
|
633
|
-
return
|
|
634
|
-
url: this.app.urls.filePath(
|
|
635
|
-
query: {
|
|
636
|
-
action: 'count',
|
|
637
|
-
pattern: pattern || '*',
|
|
638
|
-
sub: !!sub,
|
|
639
|
-
countDirectories: !!countDirectories
|
|
640
|
-
}
|
|
672
|
+
case 2:
|
|
673
|
+
directoryPath = _utils["default"].trimSlashesInPath(directoryPath);
|
|
674
|
+
return _context13.abrupt("return", this.app.request["delete"]({
|
|
675
|
+
url: this.app.urls.filePath(directoryPath)
|
|
641
676
|
}));
|
|
642
677
|
|
|
643
|
-
case
|
|
678
|
+
case 4:
|
|
644
679
|
case "end":
|
|
645
|
-
return
|
|
680
|
+
return _context13.stop();
|
|
646
681
|
}
|
|
647
682
|
}
|
|
648
|
-
},
|
|
683
|
+
}, _callee13, this);
|
|
649
684
|
}));
|
|
650
685
|
|
|
651
|
-
function
|
|
652
|
-
return
|
|
686
|
+
function removeDirectory(_x32) {
|
|
687
|
+
return _removeDirectory.apply(this, arguments);
|
|
653
688
|
}
|
|
654
689
|
|
|
655
|
-
return
|
|
690
|
+
return removeDirectory;
|
|
656
691
|
}()
|
|
657
692
|
}]);
|
|
658
693
|
return Files;
|
package/es/urls.js
CHANGED
|
@@ -314,6 +314,11 @@ var Urls = /*#__PURE__*/function () {
|
|
|
314
314
|
value: function filePath(path) {
|
|
315
315
|
return "".concat(this.files(), "/").concat(path);
|
|
316
316
|
}
|
|
317
|
+
}, {
|
|
318
|
+
key: "directoryPath",
|
|
319
|
+
value: function directoryPath(path) {
|
|
320
|
+
return "".concat(this.files(), "/").concat(path, "/");
|
|
321
|
+
}
|
|
317
322
|
}, {
|
|
318
323
|
key: "fileCopy",
|
|
319
324
|
value: function fileCopy() {
|