express-fix-any-js 1.24.2 → 1.24.4
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/v24/alterFile/start.js +15 -1
- package/bin/v24/fileNames.json +2 -1
- package/package.json +1 -1
|
@@ -7,7 +7,21 @@ const startFunc = ({ alterArray, inFileType, inTargetPath
|
|
|
7
7
|
}) => {
|
|
8
8
|
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
if (!inFileType in fileNamesJson) {
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
if (!"hookTo" in fileNamesJson[inFileType]) {
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
if (!"fileName" in fileNamesJson[fileNamesJson[hookTo]]) {
|
|
19
|
+
return false;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const jsFileName = fileNamesJson[fileNamesJson[hookTo]]?.fileName;
|
|
23
|
+
|
|
24
|
+
const localJsPath = path.join(inTargetPath, jsFileName);
|
|
11
25
|
|
|
12
26
|
let fileContent = fs.readFileSync(localJsPath, 'utf8');
|
|
13
27
|
|
package/bin/v24/fileNames.json
CHANGED