@dynamicweb/cli
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -107,2 +107,3 @@ import fetch from 'node-fetch'; | ||
} else { | ||
console.log(resolvedPath) | ||
let filesInDir = getFilesInDirectory(resolvedPath); | ||
@@ -116,3 +117,3 @@ await uploadFiles(env, user, filesInDir, argv.outPath, argv.createEmpty, argv.overwrite); | ||
function getFilesInDirectory(dirPath) { | ||
return fs.readdirSync(dirPath) | ||
return fs.statSync(dirPath).isFile() ? [ dirPath ] : fs.readdirSync(dirPath) | ||
.map(file => path.join(dirPath, file)) | ||
@@ -288,3 +289,3 @@ .filter(file => fs.statSync(file).isFile()); | ||
} | ||
return resolvedPath; | ||
return path.join(p.dir, resolvedPath); | ||
} | ||
@@ -291,0 +292,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Dynamicweb CLI is a commandline tool for interacting with Dynamicweb 10 solutions.", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"main": "bin/index.js", | ||
@@ -8,0 +8,0 @@ "files": [ |
50993
1104