@dynamicweb/cli 1.0.9 → 1.0.10
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 +3 -2
- package/package.json +1 -1
package/bin/commands/files.js
CHANGED
|
@@ -104,6 +104,7 @@ async function handleFiles(argv) {
|
|
|
104
104
|
if (argv.recursive) {
|
|
105
105
|
await processDirectory(env, user, resolvedPath, argv.outPath, resolvedPath, argv.createEmpty, true, argv.overwrite);
|
|
106
106
|
} else {
|
|
107
|
+
console.log(resolvedPath)
|
|
107
108
|
let filesInDir = getFilesInDirectory(resolvedPath);
|
|
108
109
|
await uploadFiles(env, user, filesInDir, argv.outPath, argv.createEmpty, argv.overwrite);
|
|
109
110
|
}
|
|
@@ -112,7 +113,7 @@ async function handleFiles(argv) {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
function getFilesInDirectory(dirPath) {
|
|
115
|
-
return fs.readdirSync(dirPath)
|
|
116
|
+
return fs.statSync(dirPath).isFile() ? [ dirPath ] : fs.readdirSync(dirPath)
|
|
116
117
|
.map(file => path.join(dirPath, file))
|
|
117
118
|
.filter(file => fs.statSync(file).isFile());
|
|
118
119
|
}
|
|
@@ -283,7 +284,7 @@ export function resolveFilePath(filePath) {
|
|
|
283
284
|
console.log('Could not find any files with the name ' + filePath);
|
|
284
285
|
process.exit(1);
|
|
285
286
|
}
|
|
286
|
-
return resolvedPath;
|
|
287
|
+
return path.join(p.dir, resolvedPath);
|
|
287
288
|
}
|
|
288
289
|
|
|
289
290
|
function wildcardToRegExp(wildcard) {
|
package/package.json
CHANGED