express-fix-any-js 1.17.2 → 1.17.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.
@@ -2,8 +2,7 @@ import fs from "fs";
2
2
 
3
3
  import path from "path";
4
4
 
5
- import forImportLine from "./forImportLine/index.js";
6
- import forUseLine from "./forUseLine/index.js";
5
+ import fileNamesJson from '../fileNames.json' with {type: 'json'};
7
6
 
8
7
  const alterEndPointsJs = ({ filePath, inTableName }) => {
9
8
  try {
@@ -24,19 +23,11 @@ const startFunc = ({ inTableName, inFileType, jsFilePath,
24
23
  }) => {
25
24
  let fromInternal;
26
25
 
27
- switch (inFileType) {
28
- case "fromEndPointsJs":
26
+ fromInternal = alterEndPointsJs({
27
+ filePath: path.join(inTargetPath, fileNamesJson[inFileType]),
28
+ inTableName
29
+ });
29
30
 
30
- fromInternal = alterEndPointsJs({
31
- filePath: path.join(inTargetPath, "end-points.js"),
32
- inTableName
33
- });
34
-
35
- break;
36
-
37
- default:
38
- break;
39
- };
40
31
 
41
32
  return fromInternal;
42
33
  };
@@ -0,0 +1,6 @@
1
+ {
2
+ "fromAppJs": "app.js",
3
+ "fromRoutesJs": "routes.js",
4
+ "fromRoutesJsEnd": "routes.js",
5
+ "fromEndPointsJs": "end-points.js"
6
+ }
package/bin/v17/start.js CHANGED
@@ -2,7 +2,7 @@ import hookFolder from "./hookFolder/start.js";
2
2
  import addTableName from "./addTableName/start.js";
3
3
 
4
4
  const startFunc = ({ inFolderNameToInsert, inFileType, jsFilePath,
5
- inAlterType, inTargetPath, inTableName
5
+ inAlterType = "hookFolder", inTargetPath, inTableName
6
6
  }) => {
7
7
  let fromInternal;
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-fix-any-js",
3
- "version": "1.17.2",
3
+ "version": "1.17.4",
4
4
  "description": "CLI to build for appjs, the endpoints",
5
5
  "keywords": [
6
6
  "cli",