apn-app-manager 2.2.0 → 2.2.1
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/package.json
CHANGED
|
@@ -366,11 +366,11 @@ function formatSelectedFilesLog() {
|
|
|
366
366
|
for (const key of Object.keys(context)) {
|
|
367
367
|
if (key.includes("Path") && !util.isBlank(context[key])) {
|
|
368
368
|
if (!Array.isArray(context[key])) {
|
|
369
|
-
selectedFilesMap[key] = path.relative(cons.curDir, context[key]);
|
|
369
|
+
selectedFilesMap[key] = util.normalizeFilePath(path.relative(cons.curDir, context[key]));
|
|
370
370
|
} else {
|
|
371
371
|
let filePaths = [];
|
|
372
372
|
context[key].forEach(filePath => {
|
|
373
|
-
filePaths.push(path.relative(cons.curDir, filePath));
|
|
373
|
+
filePaths.push(util.normalizeFilePath(path.relative(cons.curDir, filePath)));
|
|
374
374
|
});
|
|
375
375
|
selectedFilesMap[key] = lodash.sortBy(filePaths);
|
|
376
376
|
}
|
|
@@ -24,7 +24,7 @@ function selectFile(promptText, fileTypes, optional, multiple, ignoreFiles, leve
|
|
|
24
24
|
let files = [];
|
|
25
25
|
util.handleDirFiles(cons.curDir, fileTypes, levelsToParse, 1, function (filePath) {
|
|
26
26
|
if (!lodash.includes(ignoreFiles, filePath)) {
|
|
27
|
-
files.push(path.relative(cons.curDir, filePath));
|
|
27
|
+
files.push(util.normalizeFilePath(path.relative(cons.curDir, filePath)));
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
if (multiple) {
|
package/src/util.js
CHANGED
|
@@ -405,6 +405,11 @@ module.exports = {
|
|
|
405
405
|
|
|
406
406
|
// Returns true if in test mode
|
|
407
407
|
isTestMode: isTestMode,
|
|
408
|
+
|
|
409
|
+
// Normalizes a file path to always use forward slashes
|
|
410
|
+
normalizeFilePath: function (filePath) {
|
|
411
|
+
return filePath.replace(/\\/g, "/");
|
|
412
|
+
},
|
|
408
413
|
};
|
|
409
414
|
|
|
410
415
|
// ---------------------------------------------------
|
|
@@ -447,7 +452,7 @@ function str(strings, ...keys) {
|
|
|
447
452
|
|
|
448
453
|
// Loops through a directory with a callback function
|
|
449
454
|
function handleDir(dirName, filesOnly, fileTypes, levelsToParse, startAtLevel, parseLevel, callback) {
|
|
450
|
-
const contents = fs.readdirSync(dirName, "utf8", true);
|
|
455
|
+
const contents = fs.readdirSync(dirName, "utf8", true).sort();
|
|
451
456
|
contents.forEach(content => {
|
|
452
457
|
const contentPath = path.resolve(dirName, content);
|
|
453
458
|
const isFile = fs.statSync(contentPath).isFile();
|