@dynamicweb/cli 1.0.3 → 1.0.4
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/bin/commands/files.js +5 -2
- package/package.json +1 -1
package/bin/commands/files.js
CHANGED
|
@@ -194,6 +194,7 @@ async function download(env, user, dirPath, outPath, recursive, outname, raw, ia
|
|
|
194
194
|
let excludeDirectories = '';
|
|
195
195
|
if (!iamstupid) {
|
|
196
196
|
excludeDirectories = 'system/log';
|
|
197
|
+
console.log(dirPath)
|
|
197
198
|
if (dirPath === 'cache.net') {
|
|
198
199
|
return;
|
|
199
200
|
}
|
|
@@ -213,7 +214,8 @@ async function download(env, user, dirPath, outPath, recursive, outname, raw, ia
|
|
|
213
214
|
console.log('Downloading', dirPath === '/.' ? 'Base' : dirPath, 'Recursive=' + recursive);
|
|
214
215
|
|
|
215
216
|
let filename;
|
|
216
|
-
|
|
217
|
+
console.log(data)
|
|
218
|
+
console.log(`${env.protocol}://${env.host}/Admin/Api/${endpoint}`)
|
|
217
219
|
fetch(`${env.protocol}://${env.host}/Admin/Api/${endpoint}`, {
|
|
218
220
|
method: 'POST',
|
|
219
221
|
body: JSON.stringify(data),
|
|
@@ -274,7 +276,7 @@ export async function uploadFiles(env, user, localFilePaths, destinationPath, cr
|
|
|
274
276
|
console.log(localPath)
|
|
275
277
|
form.append('files', fs.createReadStream(path.resolve(localPath)));
|
|
276
278
|
});
|
|
277
|
-
let res = await fetch(`${env.protocol}://${env.host}/Admin/Api/Upload?` + new URLSearchParams({"createEmptyFiles": createEmpty}), {
|
|
279
|
+
let res = await fetch(`${env.protocol}://${env.host}/Admin/Api/Upload?` + new URLSearchParams({"createEmptyFiles": createEmpty, "createMissingDirectories": true}), {
|
|
278
280
|
method: 'POST',
|
|
279
281
|
body: form,
|
|
280
282
|
headers: {
|
|
@@ -288,6 +290,7 @@ export async function uploadFiles(env, user, localFilePaths, destinationPath, cr
|
|
|
288
290
|
}
|
|
289
291
|
else {
|
|
290
292
|
console.log(res)
|
|
293
|
+
console.log(res.json())
|
|
291
294
|
return;
|
|
292
295
|
}
|
|
293
296
|
}
|
package/package.json
CHANGED