@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.
@@ -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
@@ -2,7 +2,7 @@
2
2
  "name": "@dynamicweb/cli",
3
3
  "type": "module",
4
4
  "description": "Dynamicweb CLI is a commandline tool for interacting with Dynamicweb 10 solutions.",
5
- "version": "1.0.3",
5
+ "version": "1.0.5",
6
6
  "main": "bin/index.js",
7
7
  "files": [
8
8
  "bin/*"