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