kschema-fs-api-gen-post-actions 1.9.2 → 1.9.3

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.
@@ -13,7 +13,7 @@ import resolveFolderName from "./InsertAsIs/steps/resolveFolderName.js";
13
13
  import actions from "./InsertAsIs/actions.json" with { type: "json" };
14
14
 
15
15
  const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreate = true,
16
- toConfigPath, inTargetPath, inFolderName
16
+ toConfigPath, inTargetPath, inFolderName, inGenerateRest = false
17
17
  }) => {
18
18
 
19
19
  const matched = actions;
@@ -47,10 +47,12 @@ const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreat
47
47
  inActionName: cmd, inFolderName
48
48
  });
49
49
 
50
- generateRest({
51
- toConfigPath, inTargetPath,
52
- toPath: path.join(localToPath, resolvedFolderName),
53
- });
50
+ if (inGenerateRest) {
51
+ generateRest({
52
+ toConfigPath, inTargetPath,
53
+ toPath: path.join(localToPath, resolvedFolderName),
54
+ });
55
+ };
54
56
  };
55
57
 
56
58
  if (isAnnounce) announce({ inResolvedFolderName: resolvedFolderName });
@@ -13,7 +13,7 @@ import resolveFolderName from "./InsertGenPk/steps/resolveFolderName.js";
13
13
  import actions from "./InsertGenPk/actions.json" with { type: "json" };
14
14
 
15
15
  const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreate = true,
16
- toConfigPath, inTargetPath, inFolderName
16
+ toConfigPath, inTargetPath, inFolderName, inGenerateRest = false
17
17
  }) => {
18
18
 
19
19
  const matched = actions;
@@ -47,10 +47,12 @@ const startFunc = async ({ cmd = "", toPath, isAnnounce = true, checkBeforeCreat
47
47
  inActionName: cmd, inFolderName, inGetType: "bodyParse"
48
48
  });
49
49
 
50
- generateRest({
51
- toConfigPath, inTargetPath,
52
- toPath: path.join(localToPath, resolvedFolderName),
53
- });
50
+ if (inGenerateRest) {
51
+ generateRest({
52
+ toConfigPath, inTargetPath,
53
+ toPath: path.join(localToPath, resolvedFolderName),
54
+ });
55
+ };
54
56
  };
55
57
 
56
58
  if (isAnnounce) announce({ inResolvedFolderName: resolvedFolderName });
package/index.js CHANGED
@@ -17,25 +17,25 @@ const withMail = async ({ toPath }) => {
17
17
  });
18
18
  };
19
19
 
20
- const insertGenPk = async ({ toPath, showLog, toConfigPath, inTargetPath }) => {
20
+ const insertGenPk = async ({ toPath, showLog, toConfigPath, inTargetPath, inGenerateRest }) => {
21
21
  const commandToSend = "insertGenPk";
22
22
 
23
23
  const commandFunction = await load(commandToSend);
24
24
  // console.log(" ...args :", args);
25
25
  await commandFunction({
26
26
  toPath, cmd: commandToSend, toConfigPath, inTargetPath,
27
- inFolderName: commandToSend
27
+ inFolderName: commandToSend, inGenerateRest
28
28
  });
29
29
  };
30
30
 
31
- const insertAsIs = async ({ toPath, showLog, toConfigPath, inTargetPath }) => {
31
+ const insertAsIs = async ({ toPath, showLog, toConfigPath, inTargetPath, inGenerateRest }) => {
32
32
  const commandToSend = "insertAsIs";
33
33
 
34
34
  const commandFunction = await load(commandToSend);
35
35
  // console.log(" ...args :", args);
36
36
  await commandFunction({
37
37
  toPath, cmd: commandToSend, toConfigPath, inTargetPath,
38
- inFolderName: commandToSend
38
+ inFolderName: commandToSend, inGenerateRest
39
39
  });
40
40
  };
41
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kschema-fs-api-gen-post-actions",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "start from end points js, generate post methods",
5
5
  "keywords": [
6
6
  "cli",