kschema-fs-api-gen-post-actions 1.7.4 → 1.8.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.
Files changed (117) hide show
  1. package/bin/{v6 → v8}/tasks/actions/insertGenPk.js +6 -13
  2. package/package.json +3 -2
  3. package/bin/v6/tasks/actions/WithMail/steps/createHttpFile.js +0 -12
  4. package/bin/v6/tasks/actions/WithMail/steps/updateEndPointsJs.js +0 -16
  5. /package/bin/{v6 → v8}/core/createFolder.js +0 -0
  6. /package/bin/{v6 → v8}/core/parseInput.js +0 -0
  7. /package/bin/{v6 → v8}/core/resolveCommand.js +0 -0
  8. /package/bin/{v6 → v8}/core/showUsage.js +0 -0
  9. /package/bin/{v6 → v8}/start.js +0 -0
  10. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/actions.json +0 -0
  11. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/common/readFile.js +0 -0
  12. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/common/writeFile.js +0 -0
  13. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/buildImport.js +0 -0
  14. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/checkDuplicate.js +0 -0
  15. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/findInsertIndex.js +0 -0
  16. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/index.js +0 -0
  17. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/buildUseLine.js +0 -0
  18. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/checkDuplicate.js +0 -0
  19. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/findInsertIndex.js +0 -0
  20. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/index.js +0 -0
  21. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/announce.js +0 -0
  22. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/createFolder.js +0 -0
  23. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/decideTemplate.js +0 -0
  24. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/locateDestination.js +0 -0
  25. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/locateSource.js +0 -0
  26. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/resolveFolderName.js +0 -0
  27. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/updateAppJs.js +0 -0
  28. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/steps/updateEndPointsFile.js +0 -0
  29. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/config/getSchema.js +0 -0
  30. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/controller.js +0 -0
  31. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/errors.js +0 -0
  32. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/getData.js +0 -0
  33. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/getSchema.js +0 -0
  34. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/buildMutate.js +0 -0
  35. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/buildQuery.js +0 -0
  36. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/file/read.js +0 -0
  37. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/file/write.js +0 -0
  38. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/pkHelper.js +0 -0
  39. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validate.js +0 -0
  40. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validateHelper.js +0 -0
  41. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/default.js +0 -0
  42. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/enum.js +0 -0
  43. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/length.js +0 -0
  44. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/minMax.js +0 -0
  45. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/pattern.js +0 -0
  46. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/required.js +0 -0
  47. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/type.js +0 -0
  48. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/helpers/validators/unique.js +0 -0
  49. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/insertBase.js +0 -0
  50. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/insertGenPk.js +0 -0
  51. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/middleware.js +0 -0
  52. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/rest.http +0 -0
  53. /package/bin/{v6 → v8}/tasks/actions/InsertGenPk/template/v1/service.js +0 -0
  54. /package/bin/{v6 → v8}/tasks/actions/WithMail/actions.json +0 -0
  55. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/common/readFile.js +0 -0
  56. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/common/writeFile.js +0 -0
  57. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/buildImport.js +0 -0
  58. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/checkDuplicate.js +0 -0
  59. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/findInsertIndex.js +0 -0
  60. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/index.js +0 -0
  61. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/buildUseLine.js +0 -0
  62. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/checkDuplicate.js +0 -0
  63. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/findInsertIndex.js +0 -0
  64. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/index.js +0 -0
  65. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/announce.js +0 -0
  66. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/createFolder.js +0 -0
  67. /package/bin/{v6/tasks/actions/InsertGenPk → v8/tasks/actions/WithMail}/steps/createHttpFile.js +0 -0
  68. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/decideTemplate.js +0 -0
  69. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/locateDestination.js +0 -0
  70. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/locateSource.js +0 -0
  71. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/resolveFolderName.js +0 -0
  72. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/updateAppJs.js +0 -0
  73. /package/bin/{v6 → v8}/tasks/actions/WithMail/steps/updateEndPointsFile.js +0 -0
  74. /package/bin/{v6/tasks/actions/InsertGenPk → v8/tasks/actions/WithMail}/steps/updateEndPointsJs.js +0 -0
  75. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v1/controller.js +0 -0
  76. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v1/errors.js +0 -0
  77. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v1/middleware.js +0 -0
  78. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v1/service.js +0 -0
  79. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/Mail/sendMailCC.js +0 -0
  80. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/Mail/welcome.html +0 -0
  81. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/controller.js +0 -0
  82. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/errors.js +0 -0
  83. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/middleware.js +0 -0
  84. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/rest.http +0 -0
  85. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v2/service.js +0 -0
  86. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/Mail/sendMailCC.js +0 -0
  87. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/Mail/welcome.html +0 -0
  88. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/config/getSchema.js +0 -0
  89. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/controller.js +0 -0
  90. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/errors.js +0 -0
  91. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/getData.js +0 -0
  92. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/getSchema.js +0 -0
  93. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/buildMutate.js +0 -0
  94. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/buildQuery.js +0 -0
  95. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/file/read.js +0 -0
  96. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/file/write.js +0 -0
  97. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/pkHelper.js +0 -0
  98. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validate.js +0 -0
  99. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validateHelper.js +0 -0
  100. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/default.js +0 -0
  101. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/enum.js +0 -0
  102. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/length.js +0 -0
  103. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/minMax.js +0 -0
  104. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/pattern.js +0 -0
  105. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/required.js +0 -0
  106. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/type.js +0 -0
  107. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/helpers/validators/unique.js +0 -0
  108. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/insertBase.js +0 -0
  109. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/insertGenPk.js +0 -0
  110. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/middleware.js +0 -0
  111. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/rest.http +0 -0
  112. /package/bin/{v6 → v8}/tasks/actions/WithMail/template/v3/service.js +0 -0
  113. /package/bin/{v6 → v8}/tasks/actions/withMail.js +0 -0
  114. /package/bin/{v6 → v8}/tasks/core/createFolder.js +0 -0
  115. /package/bin/{v6 → v8}/tasks/core/parseInput.js +0 -0
  116. /package/bin/{v6 → v8}/tasks/core/resolveCommand.js +0 -0
  117. /package/bin/{v6 → v8}/tasks/core/showUsage.js +0 -0
@@ -1,21 +1,19 @@
1
1
  import path from "path";
2
- import fixEndpointsJs from "express-fix-any-js";
2
+ // import fixEndpointsJs from "express-fix-any-js";
3
3
  import generateRest from "kschema-fs-api-gen-rest";
4
+ import fixEndpointsJs from "express-fix-endpoints-js";
4
5
 
5
6
  import { locateSource } from "./InsertGenPk/steps/locateSource.js";
6
7
  import { locateDestination } from "./InsertGenPk/steps/locateDestination.js";
7
8
  import { createFolder } from "../../core/createFolder.js";
8
9
 
9
- import updateEndPointsJs from "./InsertGenPk/steps/updateEndPointsJs.js";
10
- // import createHttpFile from "./InsertGenPk/steps/createHttpFile.js";
11
-
12
10
  import { announce } from "./InsertGenPk/steps/announce.js";
13
11
 
14
12
  import resolveFolderName from "./InsertGenPk/steps/resolveFolderName.js";
15
13
  import actions from "./InsertGenPk/actions.json" with { type: "json" };
16
14
 
17
15
  const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreate = true,
18
- toConfigPath
16
+ toConfigPath, inTargetPath
19
17
  }) => {
20
18
 
21
19
  const matched = actions;
@@ -45,17 +43,12 @@ const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreat
45
43
 
46
44
  if (createFolderResponse.KTF) {
47
45
  const fromEndPointsJs = await fixEndpointsJs({
48
- jsFilePath: path.join(localToPath, "end-points.js"),
49
- inCheckLines: matched.endPointsJs
46
+ endPointsJsPath: path.join(localToPath, "end-points.js"),
47
+ inActionName: cmd
50
48
  });
51
49
 
52
- // createHttpFile({
53
- // inTargetPath: path.join(localToPath, resolvedFolderName),
54
- // toPath: process.cwd()
55
- // });
56
-
57
50
  generateRest({
58
- toConfigPath,
51
+ toConfigPath, inTargetPath,
59
52
  toPath: path.join(localToPath, resolvedFolderName),
60
53
  });
61
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kschema-fs-api-gen-post-actions",
3
- "version": "1.7.4",
3
+ "version": "1.8.2",
4
4
  "description": "start from end points js, generate post methods",
5
5
  "keywords": [
6
6
  "cli",
@@ -11,7 +11,8 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "express-fix-any-js": "^1.2.3",
14
- "kschema-fs-api-gen-rest": "^1.4.2"
14
+ "kschema-fs-api-gen-rest": "^1.4.2",
15
+ "express-fix-endpoints-js": "^1.12.3"
15
16
  },
16
17
  "type": "module",
17
18
  "exports": {
@@ -1,12 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- const createHttpFile = ({ inTargetPath, toPath }) => {
5
- const relative = inTargetPath.replace(toPath, "").replace(/\\/g, "/");
6
-
7
- const content = `GET http://localhost:3000${relative}`;
8
-
9
- fs.writeFileSync(path.join(inTargetPath, "rest.http"), content);
10
- };
11
-
12
- export default createHttpFile;
@@ -1,16 +0,0 @@
1
- import updateImports from "./UpdateRoutesJs/updateImports/index.js";
2
- import updateAppUse from "./UpdateRoutesJs/updateUse/index.js";
3
-
4
- const funcName = "getFunc";
5
-
6
- export default ({ appJsPath, endpoint }) => {
7
- updateImports({
8
- appJsPath, endpoint,
9
- inFuncName: funcName
10
- });
11
-
12
- updateAppUse({
13
- appJsPath, endpoint,
14
- inFuncName: funcName
15
- });
16
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes