strictr 0.5.2 → 0.5.3
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.
|
@@ -33,20 +33,16 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
return result;
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
37
|
const os = __importStar(require("node:os"));
|
|
41
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
42
38
|
const convertFilesToObjects = (files) => {
|
|
43
39
|
const platform = os.platform();
|
|
44
40
|
const separator = 'win32' === platform ? '\\' : '/';
|
|
45
|
-
return
|
|
41
|
+
return files.map((f) => {
|
|
46
42
|
var _a;
|
|
47
|
-
const parts =
|
|
43
|
+
const parts = f.split(separator);
|
|
48
44
|
const name = (_a = parts.pop()) !== null && _a !== void 0 ? _a : '';
|
|
49
|
-
const path =
|
|
45
|
+
const path = parts.join(separator);
|
|
50
46
|
const full = path + separator + name;
|
|
51
47
|
return { name, path, full };
|
|
52
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.files.to.objects.js","sourceRoot":"","sources":["../../src/functions/convert.files.to.objects.ts"],"names":[],"mappings":";AACA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"convert.files.to.objects.js","sourceRoot":"","sources":["../../src/functions/convert.files.to.objects.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,4CAA8B;AAI9B,MAAM,qBAAqB,GAAa,CAAC,KAAe,EAAgB,EAAE;IACzE,MAAM,QAAQ,GAAW,EAAE,CAAC,QAAQ,EAAE,CAAC;IACvC,MAAM,SAAS,GAAW,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAE5D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAS,EAAc,EAAE;;QAC1C,MAAM,KAAK,GAAa,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAW,MAAA,KAAK,CAAC,GAAG,EAAE,mCAAI,EAAE,CAAC;QACvC,MAAM,IAAI,GAAW,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAW,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;QAC7C,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.config.js","sourceRoot":"","sources":["../../src/functions/get.config.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,uCAAyB;AACzB,gDAAwB;
|
|
1
|
+
{"version":3,"file":"get.config.js","sourceRoot":"","sources":["../../src/functions/get.config.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,uCAAyB;AACzB,gDAAwB;AAIxB,MAAM,gBAAgB,GAAa,GAAW,EAAE;IAC/C,OAAO;QACN,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;KAC5B,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,SAAS,GAAa,CAAC,IAAY,EAAE,UAAkB,EAAU,EAAE;IACxE,MAAM,aAAa,GAAW,gBAAgB,EAAE,CAAC;IACjD,MAAM,UAAU,GAAW,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAGvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAEhC,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,UAAU,GAAoB,OAAO,CAAC,UAAU,CAAC,CAAC;QAExD,uCAAW,aAAa,GAAK,UAAU,EAAE;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,aAAa,CAAC;IACtB,CAAC;AACF,CAAC,CAAC;AACF,kBAAe,SAAS,CAAC"}
|
|
@@ -33,30 +33,26 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
return result;
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
37
|
const fs = __importStar(require("fs"));
|
|
41
38
|
const path = __importStar(require("path"));
|
|
42
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
43
39
|
const getFilesListing = (root) => {
|
|
44
40
|
const supportedExtensions = ['.js', '.ts'];
|
|
45
41
|
let files = [];
|
|
46
42
|
const children = fs.readdirSync(root);
|
|
47
|
-
const subfiles =
|
|
48
|
-
|
|
43
|
+
const subfiles = children.filter((child) => !fs.lstatSync(path.join(root, child)).isDirectory());
|
|
44
|
+
subfiles.forEach((file) => {
|
|
49
45
|
const fileExt = path.extname(file);
|
|
50
46
|
if (supportedExtensions.includes(fileExt.toLowerCase())) {
|
|
51
47
|
files.push(path.join(root, file));
|
|
52
48
|
}
|
|
53
49
|
});
|
|
54
|
-
const subfolders =
|
|
55
|
-
|
|
50
|
+
const subfolders = children.filter((child) => fs.lstatSync(path.join(root, child)).isDirectory());
|
|
51
|
+
subfolders.forEach((folder) => {
|
|
56
52
|
const folderFullPath = path.join(root, folder);
|
|
57
|
-
files =
|
|
53
|
+
files = files.concat(getFilesListing(folderFullPath));
|
|
58
54
|
});
|
|
59
|
-
return
|
|
55
|
+
return files.sort();
|
|
60
56
|
};
|
|
61
57
|
exports.default = getFilesListing;
|
|
62
58
|
//# sourceMappingURL=get.files.listing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.files.listing.js","sourceRoot":"","sources":["../../src/functions/get.files.listing.ts"],"names":[],"mappings":";AACA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"get.files.listing.js","sourceRoot":"","sources":["../../src/functions/get.files.listing.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,eAAe,GAAa,CAAC,IAAY,EAAY,EAAE;IAC5D,MAAM,mBAAmB,GAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAErD,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAa,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEhD,MAAM,QAAQ,GAAa,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5H,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAY,EAAQ,EAAE;QACvC,MAAM,OAAO,GAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YACzD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACnC,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAa,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7H,UAAU,CAAC,OAAO,CAAC,CAAC,MAAc,EAAQ,EAAE;QAC3C,MAAM,cAAc,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvD,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|