express-fix-any-js 1.24.1 → 1.24.2

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.
@@ -1,6 +1,18 @@
1
1
  {
2
- "fromAppJs": "app.js",
3
- "fromRoutesJs": "routes.js",
4
- "fromRoutesJsEnd": "routes.js",
5
- "fromEndPointsJs": "end-points.js"
2
+ "fromAppJs": {
3
+ "fileName": "app.js",
4
+ "temporaryValue": "routerFrom"
5
+ },
6
+ "fromRoutesJs": {
7
+ "fileName": "routes.js",
8
+ "temporaryValue": "routerFrom"
9
+ },
10
+ "fromRoutesJsEnd": {
11
+ "fileName": "routes.js",
12
+ "temporaryValue": "routerFrom"
13
+ },
14
+ "fromEndPointsJs": {
15
+ "fileName": "end-points.js",
16
+ "temporaryValue": "funcFrom"
17
+ }
6
18
  }
@@ -11,7 +11,7 @@ const startFunc = ({ inParts, inFileType, inTargetPath,
11
11
  }) => {
12
12
 
13
13
  try {
14
- const localJsPath = path.join(inTargetPath, fileNamesJson[inFileType]);
14
+ const localJsPath = path.join(inTargetPath, fileNamesJson[inFileType]?.fileName);
15
15
 
16
16
  const fileContent = fs.readFileSync(localJsPath, 'utf8');
17
17
 
@@ -1,17 +1,19 @@
1
1
  import forImportLine from "./forImportLine/index.js";
2
2
 
3
- const startFunc = ({ inValue, temporaryValue, OutValue,
3
+ import fileNamesJson from '../fileNames.json' with {type: 'json'};
4
+
5
+ const startFunc = ({ inValue, OutValue,
4
6
  inFileType, inTargetPath }) => {
5
7
 
6
8
  const fromImportLine = forImportLine({
7
9
  inFileType, regexKey: "import",
8
10
  templateKey: "importRegex",
9
11
  inTargetPath, presentKey: "importLines",
10
- inParts: [temporaryValue, inValue]
12
+ inParts: [`${fileNamesJson[inFileType]?.temporaryValue}${inValue}`, inValue]
11
13
  });
12
14
 
13
15
  const fromUseLine = forImportLine({
14
- inParts: [temporaryValue, OutValue],
16
+ inParts: [`${fileNamesJson[inFileType]?.temporaryValue}${inValue}`, OutValue],
15
17
  inFileType, regexKey: "consumption",
16
18
  templateKey: "consumptionRegex",
17
19
  inTargetPath, presentKey: "useLines"
package/bin/v24/start.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import hookFolder from "./hookFolder/start.js";
2
2
  import alterFile from "./alterFile/start.js";
3
3
 
4
- const startFunc = ({ inValue, temporaryValue, OutValue,
4
+ const startFunc = ({ inValue, OutValue,
5
5
  inFileType, jsFilePath, inTargetPath, alterArray }) => {
6
6
 
7
7
  let fromInternal;
8
8
  let fromAlterFile;
9
9
 
10
- if (inValue && temporaryValue && OutValue) {
10
+ if (inValue && OutValue) {
11
11
  fromInternal = hookFolder({
12
- inValue, temporaryValue, OutValue,
12
+ inValue, OutValue,
13
13
  inFileType, inTargetPath
14
14
  });
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-fix-any-js",
3
- "version": "1.24.1",
3
+ "version": "1.24.2",
4
4
  "description": "CLI to build for appjs, the endpoints",
5
5
  "keywords": [
6
6
  "cli",