kschema-fs-api-gen-post-actions 1.10.4 → 1.11.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 (194) hide show
  1. package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/InsertGenPk/template/v2}/insertGenPk.js +2 -2
  2. package/bin/v11/tasks/actions/InsertGenPk/template/v2/rest.http +8 -0
  3. package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/InsertGenPk/template/v2}/service.js +1 -8
  4. package/bin/v11/tasks/actions/WithMail/steps/createActionFolder.js +31 -0
  5. package/bin/v11/tasks/actions/WithMail/steps/generateRestIfRequested.js +43 -0
  6. package/bin/{v9 → v11}/tasks/actions/WithMail/steps/resolveFolderName.js +1 -1
  7. package/bin/v11/tasks/actions/WithMail/steps/showLog.js +9 -0
  8. package/bin/v11/tasks/actions/WithMail/steps/updateEndPointsJs.js +34 -0
  9. package/bin/v11/tasks/actions/withMail.js +81 -0
  10. package/package.json +1 -1
  11. package/bin/v9/tasks/actions/WithMail/actions.json +0 -26
  12. package/bin/v9/tasks/actions/WithMail/steps/createHttpFile.js +0 -12
  13. package/bin/v9/tasks/actions/WithMail/steps/updateEndPointsJs.js +0 -16
  14. package/bin/v9/tasks/actions/WithMail/template/v1/controller.js +0 -28
  15. package/bin/v9/tasks/actions/WithMail/template/v1/service.js +0 -44
  16. package/bin/v9/tasks/actions/WithMail/template/v2/controller.js +0 -24
  17. package/bin/v9/tasks/actions/WithMail/template/v2/middleware.js +0 -19
  18. package/bin/v9/tasks/actions/WithMail/template/v2/rest.http +0 -7
  19. package/bin/v9/tasks/actions/WithMail/template/v2/service.js +0 -18
  20. package/bin/v9/tasks/actions/WithMail/template/v3/Mail/sendMailCC.js +0 -45
  21. package/bin/v9/tasks/actions/WithMail/template/v3/Mail/welcome.html +0 -213
  22. package/bin/v9/tasks/actions/WithMail/template/v3/errors.js +0 -11
  23. package/bin/v9/tasks/actions/WithMail/template/v3/middleware.js +0 -19
  24. package/bin/v9/tasks/actions/WithMail/template/v3/rest.http +0 -7
  25. package/bin/v9/tasks/actions/WithMail/template/v4/Mail/sendMailCC.js +0 -45
  26. package/bin/v9/tasks/actions/WithMail/template/v4/Mail/welcome.html +0 -213
  27. package/bin/v9/tasks/actions/WithMail/template/v4/errors.js +0 -11
  28. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/buildMutate.js +0 -32
  29. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/buildQuery.js +0 -32
  30. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/file/read.js +0 -7
  31. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/file/write.js +0 -5
  32. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validate.js +0 -27
  33. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validateHelper.js +0 -27
  34. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/default.js +0 -5
  35. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/enum.js +0 -7
  36. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/length.js +0 -11
  37. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/minMax.js +0 -11
  38. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/pattern.js +0 -8
  39. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/required.js +0 -5
  40. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/type.js +0 -15
  41. package/bin/v9/tasks/actions/WithMail/template/v4/helpers-/validators/unique.js +0 -8
  42. package/bin/v9/tasks/actions/WithMail/template/v4/middleware.js +0 -19
  43. package/bin/v9/tasks/actions/withMail.js +0 -60
  44. /package/bin/{v9 → v11}/core/createFolder.js +0 -0
  45. /package/bin/{v9 → v11}/core/parseInput.js +0 -0
  46. /package/bin/{v9 → v11}/core/resolveCommand.js +0 -0
  47. /package/bin/{v9 → v11}/core/showUsage.js +0 -0
  48. /package/bin/{v9 → v11}/start.js +0 -0
  49. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/actions.json +0 -0
  50. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/common/readFile.js +0 -0
  51. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/common/writeFile.js +0 -0
  52. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateImports/buildImport.js +0 -0
  53. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateImports/checkDuplicate.js +0 -0
  54. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateImports/findInsertIndex.js +0 -0
  55. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateImports/index.js +0 -0
  56. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateUse/buildUseLine.js +0 -0
  57. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateUse/checkDuplicate.js +0 -0
  58. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateUse/findInsertIndex.js +0 -0
  59. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/UpdateRoutesJs/updateUse/index.js +0 -0
  60. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/announce.js +0 -0
  61. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/createFolder.js +0 -0
  62. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/decideTemplate.js +0 -0
  63. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/locateDestination.js +0 -0
  64. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/locateSource.js +0 -0
  65. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/resolveFolderName.js +0 -0
  66. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/updateAppJs.js +0 -0
  67. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/steps/updateEndPointsFile.js +0 -0
  68. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/config/getSchema.js +0 -0
  69. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/controller.js +0 -0
  70. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/errors.js +0 -0
  71. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/getData.js +0 -0
  72. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/getSchema.js +0 -0
  73. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/buildMutate.js +0 -0
  74. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/buildQuery.js +0 -0
  75. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/file/read.js +0 -0
  76. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/file/write.js +0 -0
  77. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/pkHelper.js +0 -0
  78. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validate.js +0 -0
  79. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validateHelper.js +0 -0
  80. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/default.js +0 -0
  81. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/enum.js +0 -0
  82. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/length.js +0 -0
  83. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/minMax.js +0 -0
  84. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/pattern.js +0 -0
  85. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/required.js +0 -0
  86. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/type.js +0 -0
  87. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/helpers/validators/unique.js +0 -0
  88. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/insertBase.js +0 -0
  89. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/insertGenPk.js +0 -0
  90. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/middleware.js +0 -0
  91. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/rest.http +0 -0
  92. /package/bin/{v9 → v11}/tasks/actions/InsertAsIs/template/v1/service.js +0 -0
  93. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/actions.json +0 -0
  94. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/common/readFile.js +0 -0
  95. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/common/writeFile.js +0 -0
  96. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/buildImport.js +0 -0
  97. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/checkDuplicate.js +0 -0
  98. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/findInsertIndex.js +0 -0
  99. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateImports/index.js +0 -0
  100. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/buildUseLine.js +0 -0
  101. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/checkDuplicate.js +0 -0
  102. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/findInsertIndex.js +0 -0
  103. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/UpdateRoutesJs/updateUse/index.js +0 -0
  104. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/announce.js +0 -0
  105. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/createFolder.js +0 -0
  106. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/decideTemplate.js +0 -0
  107. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/locateDestination.js +0 -0
  108. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/locateSource.js +0 -0
  109. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/resolveFolderName.js +0 -0
  110. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/updateAppJs.js +0 -0
  111. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/steps/updateEndPointsFile.js +0 -0
  112. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/config/getSchema.js +0 -0
  113. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/controller.js +0 -0
  114. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/errors.js +0 -0
  115. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/getData.js +0 -0
  116. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/getSchema.js +0 -0
  117. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/buildMutate.js +0 -0
  118. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/buildQuery.js +0 -0
  119. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/file/read.js +0 -0
  120. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/file/write.js +0 -0
  121. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/pkHelper.js +0 -0
  122. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validate.js +0 -0
  123. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validateHelper.js +0 -0
  124. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/default.js +0 -0
  125. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/enum.js +0 -0
  126. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/length.js +0 -0
  127. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/minMax.js +0 -0
  128. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/pattern.js +0 -0
  129. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/required.js +0 -0
  130. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/type.js +0 -0
  131. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/helpers/validators/unique.js +0 -0
  132. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/insertBase.js +0 -0
  133. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/insertGenPk.js +0 -0
  134. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/middleware.js +0 -0
  135. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/rest.http +0 -0
  136. /package/bin/{v9 → v11}/tasks/actions/InsertGenPk/template/v1/service.js +0 -0
  137. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2}/config/getSchema.js +0 -0
  138. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2}/controller.js +0 -0
  139. /package/bin/{v9/tasks/actions/WithMail/template/v1 → v11/tasks/actions/InsertGenPk/template/v2}/errors.js +0 -0
  140. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2/helpers}/getData.js +0 -0
  141. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2/helpers}/getSchema.js +0 -0
  142. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2}/helpers/pkHelper.js +0 -0
  143. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/InsertGenPk/template/v2}/insertBase.js +0 -0
  144. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/common/readFile.js +0 -0
  145. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/common/writeFile.js +0 -0
  146. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/buildImport.js +0 -0
  147. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/checkDuplicate.js +0 -0
  148. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/findInsertIndex.js +0 -0
  149. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateImports/index.js +0 -0
  150. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/buildUseLine.js +0 -0
  151. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/checkDuplicate.js +0 -0
  152. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/findInsertIndex.js +0 -0
  153. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/UpdateRoutesJs/updateUse/index.js +0 -0
  154. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/announce.js +0 -0
  155. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/createFolder.js +0 -0
  156. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/decideTemplate.js +0 -0
  157. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/locateDestination.js +0 -0
  158. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/locateSource.js +0 -0
  159. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/updateAppJs.js +0 -0
  160. /package/bin/{v9 → v11}/tasks/actions/WithMail/steps/updateEndPointsFile.js +0 -0
  161. /package/bin/{v9/tasks/actions/WithMail/template/v2 → v11/tasks/actions/WithMail/template/v1}/Mail/sendMailCC.js +0 -0
  162. /package/bin/{v9/tasks/actions/WithMail/template/v2 → v11/tasks/actions/WithMail/template/v1}/Mail/welcome.html +0 -0
  163. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/config/getSchema.js +0 -0
  164. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/controller.js +0 -0
  165. /package/bin/{v9/tasks/actions/WithMail/template/v2 → v11/tasks/actions/WithMail/template/v1}/errors.js +0 -0
  166. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/getData.js +0 -0
  167. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/getSchema.js +0 -0
  168. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/helpers/pkHelper.js +0 -0
  169. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/buildMutate.js +0 -0
  170. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/buildQuery.js +0 -0
  171. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/file/read.js +0 -0
  172. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/file/write.js +0 -0
  173. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/helpers-/pkHelper.js +0 -0
  174. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validate.js +0 -0
  175. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validateHelper.js +0 -0
  176. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/default.js +0 -0
  177. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/enum.js +0 -0
  178. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/length.js +0 -0
  179. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/minMax.js +0 -0
  180. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/pattern.js +0 -0
  181. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/required.js +0 -0
  182. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/type.js +0 -0
  183. /package/bin/{v9/tasks/actions/WithMail/template/v3/helpers → v11/tasks/actions/WithMail/template/v1/helpers-}/validators/unique.js +0 -0
  184. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/insertBase.js +0 -0
  185. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/WithMail/template/v1}/insertGenPk.js +0 -0
  186. /package/bin/{v9 → v11}/tasks/actions/WithMail/template/v1/middleware.js +0 -0
  187. /package/bin/{v9/tasks/actions/WithMail/template/v4 → v11/tasks/actions/WithMail/template/v1}/rest.http +0 -0
  188. /package/bin/{v9/tasks/actions/WithMail/template/v3 → v11/tasks/actions/WithMail/template/v1}/service.js +0 -0
  189. /package/bin/{v9 → v11}/tasks/actions/insertAsIs.js +0 -0
  190. /package/bin/{v9 → v11}/tasks/actions/insertGenPk.js +0 -0
  191. /package/bin/{v9 → v11}/tasks/core/createFolder.js +0 -0
  192. /package/bin/{v9 → v11}/tasks/core/parseInput.js +0 -0
  193. /package/bin/{v9 → v11}/tasks/core/resolveCommand.js +0 -0
  194. /package/bin/{v9 → v11}/tasks/core/showUsage.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import insertBase from "./insertBase.js";
2
- import getData from "./getData.js";
3
- import getSchema from "./getSchema.js";
2
+ import getData from "./helpers/getData.js";
3
+ import getSchema from "./helpers/getSchema.js";
4
4
  import { getPrimaryKey, attachPrimaryKey } from "./helpers/pkHelper.js";
5
5
 
6
6
  const validateInput = ({ record }) => {
@@ -0,0 +1,8 @@
1
+ POST http://localhost:3000/api/v1/StockItems/withMail
2
+ Content-Type: application/json
3
+
4
+ {
5
+ "StockItemName": "Item1",
6
+ "StockGstApplicable": "",
7
+ "StockBaseUnits": ""
8
+ }
@@ -1,16 +1,9 @@
1
1
  import insertGenPk from "./insertGenPk.js";
2
- import sendMail from "./Mail/sendMailCC.js";
3
2
 
4
3
  const startFunc = async ({ inRequestBody, inTablePath, inConfigPath }) => {
5
4
  const insertedPk = await insertGenPk({ inRequestBody, inTablePath, inConfigPath });
6
5
 
7
- const info = await sendMail();
8
-
9
- return await {
10
- insertedPk,
11
- isMailSent: info.accepted.length > 0 &&
12
- info.rejected.length === 0
13
- };
6
+ return insertedPk;
14
7
  };
15
8
 
16
9
  export { startFunc };
@@ -0,0 +1,31 @@
1
+ import { createFolder } from "../../../../core/createFolder.js";
2
+ import { showLog } from "./showLog.js";
3
+
4
+ export const createActionFolder = ({
5
+ source,
6
+ destination,
7
+ isAnnounce,
8
+ checkBeforeCreate,
9
+ showLog: isShowLog
10
+ }) => {
11
+ showLog({
12
+ enabled: isShowLog,
13
+ message: "Copying WithMail template.",
14
+ data: { source, destination }
15
+ });
16
+
17
+ const response = createFolder({
18
+ source,
19
+ destination,
20
+ isAnnounce,
21
+ checkBeforeCreate
22
+ });
23
+
24
+ showLog({
25
+ enabled: isShowLog,
26
+ message: response.KTF ? "Template copy completed." : "Template copy skipped.",
27
+ data: response
28
+ });
29
+
30
+ return response;
31
+ };
@@ -0,0 +1,43 @@
1
+ import path from "path";
2
+ import generateRest from "kschema-fs-api-gen-rest";
3
+ import { showLog } from "./showLog.js";
4
+
5
+ export const generateRestIfRequested = ({
6
+ inGenerateRest,
7
+ toConfigPath,
8
+ inTargetPath,
9
+ toPath,
10
+ resolvedFolderName,
11
+ isShowLog
12
+ }) => {
13
+ if (!inGenerateRest) {
14
+ showLog({
15
+ enabled: isShowLog,
16
+ message: "REST generation not requested."
17
+ });
18
+
19
+ return;
20
+ };
21
+
22
+ const restTargetPath = path.join(toPath, resolvedFolderName);
23
+
24
+ showLog({
25
+ enabled: isShowLog,
26
+ message: "Generating REST files.",
27
+ data: { toConfigPath, inTargetPath, toPath: restTargetPath }
28
+ });
29
+
30
+ const response = generateRest({
31
+ toConfigPath,
32
+ inTargetPath,
33
+ toPath: restTargetPath
34
+ });
35
+
36
+ showLog({
37
+ enabled: isShowLog,
38
+ message: "REST generation completed.",
39
+ data: response
40
+ });
41
+
42
+ return response;
43
+ };
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
 
3
- export default function resolveFolderName({ name, inDefaultFolderName = "WithMail" }) {
3
+ export default function resolveFolderName({ name, inDefaultFolderName = "InsertGenPk" }) {
4
4
  const defaultFolderName = inDefaultFolderName;
5
5
 
6
6
  // case 1: force new → timestamp
@@ -0,0 +1,9 @@
1
+ export const showLog = ({ enabled, message, data }) => {
2
+ if (!enabled) return;
3
+
4
+ console.log(`[withMail] ${message}`);
5
+
6
+ if (data === undefined) return;
7
+
8
+ console.log(data);
9
+ };
@@ -0,0 +1,34 @@
1
+ import path from "path";
2
+ import fixEndpointsJs from "express-fix-endpoints-post-js";
3
+ import { showLog } from "./showLog.js";
4
+
5
+ export const updateEndPointsJs = async ({
6
+ toPath,
7
+ cmd,
8
+ inFolderName,
9
+ showLog: isShowLog
10
+ }) => {
11
+ const endPointsJsPath = path.join(toPath, "end-points.js");
12
+
13
+ showLog({
14
+ enabled: isShowLog,
15
+ message: "Updating end-points.js for body parsing.",
16
+ data: { endPointsJsPath, cmd, inFolderName }
17
+ });
18
+
19
+ const response = await fixEndpointsJs({
20
+ endPointsJsPath,
21
+ showLog: isShowLog,
22
+ inActionName: cmd,
23
+ inFolderName,
24
+ inGetType: "bodyParse"
25
+ });
26
+
27
+ showLog({
28
+ enabled: isShowLog,
29
+ message: "end-points.js update completed.",
30
+ data: response
31
+ });
32
+
33
+ return response;
34
+ };
@@ -0,0 +1,81 @@
1
+ import { locateSource } from "./WithMail/steps/locateSource.js";
2
+ import { locateDestination } from "./WithMail/steps/locateDestination.js";
3
+ import { announce } from "./WithMail/steps/announce.js";
4
+ import resolveFolderName from "./WithMail/steps/resolveFolderName.js";
5
+ import { createActionFolder } from "./WithMail/steps/createActionFolder.js";
6
+ import { updateEndPointsJs } from "./WithMail/steps/updateEndPointsJs.js";
7
+ import { generateRestIfRequested } from "./WithMail/steps/generateRestIfRequested.js";
8
+ import { showLog as writeLog } from "./WithMail/steps/showLog.js";
9
+
10
+ const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreate = true,
11
+ toConfigPath, inTargetPath, inFolderName, inGenerateRest = false, showLog = false
12
+ }) => {
13
+ writeLog({
14
+ enabled: showLog,
15
+ message: "Starting WithMail action.",
16
+ data: { cmd, toPath, inFolderName, inGenerateRest }
17
+ });
18
+
19
+ const resolvedFolderName = resolveFolderName({
20
+ name: cmd
21
+ });
22
+
23
+ if (resolvedFolderName.KTF === false) {
24
+ writeLog({
25
+ enabled: showLog,
26
+ message: "Folder name validation failed.",
27
+ data: resolvedFolderName
28
+ });
29
+
30
+ console.log(resolvedFolderName.KReason);
31
+
32
+ return;
33
+ };
34
+
35
+ const source = locateSource();
36
+ const destination = locateDestination({
37
+ inResolvedFolderName: resolvedFolderName,
38
+ toPath
39
+ });
40
+
41
+ writeLog({
42
+ enabled: showLog,
43
+ message: "Resolved source and destination.",
44
+ data: { source, destination }
45
+ });
46
+
47
+ const createFolderResponse = createActionFolder({
48
+ source, destination,
49
+ isAnnounce, checkBeforeCreate, showLog
50
+ });
51
+
52
+ if (createFolderResponse.KTF) {
53
+ await updateEndPointsJs({
54
+ toPath,
55
+ cmd,
56
+ inFolderName,
57
+ showLog
58
+ });
59
+
60
+ generateRestIfRequested({
61
+ inGenerateRest,
62
+ toConfigPath,
63
+ inTargetPath,
64
+ toPath,
65
+ resolvedFolderName,
66
+ isShowLog: showLog
67
+ });
68
+ };
69
+
70
+ if (isAnnounce) announce({ inResolvedFolderName: resolvedFolderName });
71
+
72
+ writeLog({
73
+ enabled: showLog,
74
+ message: "WithMail action completed.",
75
+ data: { resolvedFolderName }
76
+ });
77
+
78
+ return resolvedFolderName;
79
+ };
80
+
81
+ export default startFunc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kschema-fs-api-gen-post-actions",
3
- "version": "1.10.4",
3
+ "version": "1.11.2",
4
4
  "description": "start from end points js, generate post methods",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,26 +0,0 @@
1
- {
2
- "cmd": "WithMail",
3
- "file": "withMail",
4
- "exportFile": "WithMail",
5
- "group": "PostMethods",
6
- "description": "Generate WithMail POST action",
7
- "endPointsJs": {
8
- "importLines": {
9
- "toInsertLine": "import funcFromWithMail from './WithMail/controller.js';",
10
- "duplicationCheck": "from './WithMail/controller.js'",
11
- "insertAfter": [
12
- "import funcFrom",
13
- "import express"
14
- ]
15
- },
16
- "useLines": {
17
- "toInsertLine1": "router.get('/WithMail', (req, res) => funcFromWithMail({ res, inTablePath: tablePath }));",
18
- "toInsertLine": "router.post('/WithMail', express.json(), (req, res) => funcFromWithMail({ req, res, inTablePath: tablePath, inConfigPath: configPath }));",
19
- "duplicationCheck": "router.use('/WithMail'",
20
- "insertAfter": [
21
- "router.",
22
- "const router = "
23
- ]
24
- }
25
- }
26
- }
@@ -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
- };
@@ -1,28 +0,0 @@
1
- import { startFunc as Service } from "./service.js";
2
- import { ConflictError, StorageError } from "./errors.js";
3
-
4
- const postFunc = async ({ req, res, inTablePath }) => {
5
- try {
6
- const inRequestBody = req.body;
7
-
8
- const fromService = await Service({ inRequestBody, inTablePath });
9
-
10
- if (!fromService) {
11
- return res.status(400).send("Validation failed");
12
- };
13
-
14
- res.type("text/plain").send(fromService);
15
- } catch (err) {
16
-
17
- if (err instanceof ConflictError)
18
- return res.status(409).send(err.message);
19
-
20
- if (err instanceof StorageError)
21
- return res.status(500).send("Failed to persist data");
22
-
23
- console.error(err);
24
- res.status(500).send("Unexpected error");
25
- }
26
- };
27
-
28
- export default postFunc;
@@ -1,44 +0,0 @@
1
- import fs from "fs";
2
- import Ajv from "ajv";
3
-
4
- import { JSONFilePreset } from 'lowdb/node'
5
-
6
- const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
7
-
8
- const schema = {
9
- type: "object",
10
- properties: {
11
- LedgerName: { type: "string" }
12
- },
13
- required: ["LedgerName"],
14
- additionalProperties: true
15
- };
16
-
17
- const startFunc = async ({ inRequestBody, inTablePath }) => {
18
- return await insertData({ inTablePath, inRequestBody });
19
- };
20
-
21
- const insertData = async ({ inTablePath, inRequestBody }) => {
22
- const db = await JSONFilePreset(inTablePath, []);
23
-
24
- await db.read();
25
-
26
- const validate = ajv.compile(schema);
27
- const valid = validate(inRequestBody)
28
- // if (!valid) return false;
29
- if (!valid) {
30
- console.log(validate.errors);
31
- return false;
32
- };
33
-
34
- const maxPk = db.data.reduce((a, b) => Math.max(a, b.pk || 0), 0);
35
- const newPk = maxPk + 1;
36
-
37
- db.data.push({ ...inRequestBody, pk: newPk });
38
-
39
- await db.write();
40
-
41
- return await newPk;
42
- };
43
-
44
- export { startFunc };
@@ -1,24 +0,0 @@
1
- import { startFunc as Service } from "./service.js";
2
- import { ConflictError, StorageError } from "./errors.js";
3
-
4
- const postFunc = async ({ req, res, inTableName }) => {
5
- try {
6
- const inRequestBody = req.body;
7
-
8
- const fromService = await Service({ inRequestBody, inTableName });
9
-
10
- res.type("application/json").send(fromService);
11
- } catch (err) {
12
-
13
- if (err instanceof ConflictError)
14
- return res.status(409).send(err.message);
15
-
16
- if (err instanceof StorageError)
17
- return res.status(500).send("Failed to persist data");
18
-
19
- console.error(err);
20
- res.status(500).send("Unexpected error");
21
- }
22
- };
23
-
24
- export { postFunc };
@@ -1,19 +0,0 @@
1
- const StartFunc = (req, res, next) => {
2
- const LocalBody = req.body;
3
-
4
- if (!LocalBody || Object.keys(LocalBody).length === 0) {
5
- return res.status(400).send("Request body should not be empty.");
6
- }
7
-
8
- if (Array.isArray(LocalBody)) {
9
- return res.status(400).send("Remove The Array From The Body.");
10
- }
11
-
12
- if (typeof LocalBody === 'object' && Object.keys(LocalBody).length === 0) {
13
- return res.status(400).send("Request body should not be an empty object.");
14
- }
15
-
16
- next();
17
- };
18
-
19
- export { StartFunc };
@@ -1,7 +0,0 @@
1
-
2
- POST http://localhost:3000/Api/V1/StockItems/Insert
3
- Content-Type: application/json
4
-
5
- {
6
- "StockItemName": "Coke 250 ml"
7
- }
@@ -1,18 +0,0 @@
1
- import { kschema } from "@keshavsoft/kschema";
2
- import sendMail from "./Mail/sendMailCC.js";
3
-
4
- const startFunc = async ({ inRequestBody, inTableName }) => {
5
- const tableName = inTableName;
6
-
7
- const insertedPk = await kschema.table(tableName).mutate.insertGenPk(inRequestBody);
8
-
9
- const info = await sendMail();
10
-
11
- return await {
12
- insertedPk,
13
- isMailSent: info.accepted.length > 0 &&
14
- info.rejected.length === 0
15
- };
16
- };
17
-
18
- export { startFunc };
@@ -1,45 +0,0 @@
1
- import nodemailer from "nodemailer";
2
- import dotenv from 'dotenv';
3
- import fs from "fs";
4
-
5
- dotenv.config();
6
-
7
- let startFunc = async () => {
8
-
9
- if ("KS_MAIL_ID" in process.env === false) {
10
- console.log("KS_MAIL_ID not found in .env file");
11
- return await false;
12
- };
13
-
14
- if ("KS_MAIL_PASSWORD" in process.env === false) {
15
- console.log("KS_MAIL_PASSWORD not found in .env file");
16
- return await false;
17
- };
18
-
19
- if ("KS_TO_MAIL_ID" in process.env === false) {
20
- console.log("KS_TO_MAIL_ID not found in .env file");
21
- return await false;
22
- };
23
-
24
- const LocalFromSendMail = jFTransporterForGoogle.sendMail({
25
- from: `"KeshavSoft" ${process.env.KS_MAIL_ID}`,
26
- to: `${process.env.KS_TO_MAIL_ID}`,
27
- subject: `Hello ✔`,
28
- text: "16",
29
- html: ""
30
- });
31
-
32
- return await LocalFromSendMail;
33
- };
34
-
35
- let jFTransporterForGoogle = nodemailer.createTransport({
36
- host: "smtp.gmail.com",
37
- port: 587,
38
- secure: false,
39
- auth: {
40
- user: process.env.KS_MAIL_ID,
41
- pass: process.env.KS_MAIL_PASSWORD
42
- }
43
- });
44
-
45
- export default startFunc;