@keshavsoft/kschema-cli 1.12.7 → 1.12.9

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 (191) hide show
  1. package/bin/cli.js +1 -1
  2. package/bin/v12/commands/exportCommands/tally.js +9 -0
  3. package/bin/v12/commands/tally/steps/locateSource.js +3 -1
  4. package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/Config/schema.json +2 -2
  5. package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/Insert/rest.http +12 -12
  6. package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/end-points.js +4 -4
  7. package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/Config/schema.json +2 -2
  8. package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/Insert/rest.http +13 -13
  9. package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/end-points.js +4 -4
  10. package/bin/v12/commands/tally/template/v3/Api/V1/LedgerNames/Config/schema.json +2 -2
  11. package/bin/v12/commands/tally/template/v3/Api/V1/LedgerNames/end-points.js +2 -2
  12. package/bin/v12/commands/tally/template/v3/Api/V1/StockItems/Config/schema.json +2 -2
  13. package/bin/v12/commands/tally/template/v3/Api/V1/StockItems/end-points.js +2 -2
  14. package/bin/v12/commands/tally/template/v3/Api/V1/routes.js +8 -8
  15. package/bin/v12/commands/tally/template/v3/Api/routes.js +2 -2
  16. package/bin/v12/commands/tally/template/v3/FromTally/V1/StockItems/Config/schema.json +2 -2
  17. package/bin/v12/commands/tally/template/v3/FromTally/V1/routes.js +2 -2
  18. package/bin/v12/commands/tally/template/v3/app.js +4 -4
  19. package/index.js +10 -2
  20. package/package.json +7 -1
  21. package/CHANGELOG.md +0 -67
  22. package/bin/v10/commands/generateSamples.js +0 -26
  23. package/bin/v10/commands/init.js +0 -23
  24. package/bin/v10/commands/steps/announce.js +0 -3
  25. package/bin/v10/commands/steps/createProject.js +0 -6
  26. package/bin/v10/commands/steps/decideTemplate.js +0 -3
  27. package/bin/v10/commands/steps/locateDestination.js +0 -5
  28. package/bin/v10/commands/steps/locateSource.js +0 -14
  29. package/bin/v10/commands/template/baseTemplate.js +0 -11
  30. package/bin/v10/commands/template/basic/.vscode/launch.json +0 -12
  31. package/bin/v10/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
  32. package/bin/v10/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
  33. package/bin/v10/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
  34. package/bin/v10/commands/template/basic/Config/Schemas/StockItems.json +0 -45
  35. package/bin/v10/commands/template/basic/Config/api.json +0 -8
  36. package/bin/v10/commands/template/basic/Config/schema.json +0 -8
  37. package/bin/v10/commands/template/basic/Config/ui.json +0 -8
  38. package/bin/v10/commands/template/basic/Data/BillsTable.json +0 -165
  39. package/bin/v10/commands/template/basic/Data/ItemsTable.json +0 -200
  40. package/bin/v10/commands/template/basic/Data/LedgerNames.json +0 -6
  41. package/bin/v10/commands/template/basic/Data/StockItems.json +0 -45
  42. package/bin/v10/commands/template/basic/app.js +0 -4
  43. package/bin/v10/commands/template/basic/config.json +0 -4
  44. package/bin/v10/commands/template/basic/package-lock.json +0 -21
  45. package/bin/v10/commands/template/basic/package.json +0 -14
  46. package/bin/v10/commands/template/basic/read.js +0 -8
  47. package/bin/v10/commands/template/basic/write.js +0 -8
  48. package/bin/v10/commands/template/express/.env +0 -8
  49. package/bin/v10/commands/template/express/.env.local +0 -7
  50. package/bin/v10/commands/template/express/.vscode/launch.json +0 -12
  51. package/bin/v10/commands/template/express/Config/Schemas/BillsTable.json +0 -166
  52. package/bin/v10/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
  53. package/bin/v10/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
  54. package/bin/v10/commands/template/express/Config/Schemas/StockItems.json +0 -45
  55. package/bin/v10/commands/template/express/Config/api.json +0 -8
  56. package/bin/v10/commands/template/express/Config/schema.json +0 -8
  57. package/bin/v10/commands/template/express/Config/ui.json +0 -8
  58. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
  59. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
  60. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
  61. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
  62. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
  63. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
  64. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
  65. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
  66. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
  67. package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
  68. package/bin/v10/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
  69. package/bin/v10/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
  70. package/bin/v10/commands/template/express/app.js +0 -33
  71. package/bin/v10/commands/template/express/config.json +0 -4
  72. package/bin/v10/commands/template/express/package.json +0 -18
  73. package/bin/v10/commands/test.js +0 -36
  74. package/bin/v10/core/parseInput.js +0 -10
  75. package/bin/v10/core/resolveCommand.js +0 -14
  76. package/bin/v10/core/resolveFolderName.js +0 -17
  77. package/bin/v10/core/showUsage.js +0 -42
  78. package/bin/v10/start.js +0 -22
  79. package/bin/v8/commands/generateSamples.js +0 -25
  80. package/bin/v8/commands/init.js +0 -23
  81. package/bin/v8/commands/steps/announce.js +0 -3
  82. package/bin/v8/commands/steps/createProject.js +0 -6
  83. package/bin/v8/commands/steps/decideTemplate.js +0 -3
  84. package/bin/v8/commands/steps/locateDestination.js +0 -5
  85. package/bin/v8/commands/steps/locateSource.js +0 -14
  86. package/bin/v8/commands/template/baseTemplate.js +0 -11
  87. package/bin/v8/commands/template/basic/.vscode/launch.json +0 -12
  88. package/bin/v8/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
  89. package/bin/v8/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
  90. package/bin/v8/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
  91. package/bin/v8/commands/template/basic/Config/Schemas/StockItems.json +0 -45
  92. package/bin/v8/commands/template/basic/Config/api.json +0 -8
  93. package/bin/v8/commands/template/basic/Config/schema.json +0 -8
  94. package/bin/v8/commands/template/basic/Config/ui.json +0 -8
  95. package/bin/v8/commands/template/basic/Data/BillsTable.json +0 -165
  96. package/bin/v8/commands/template/basic/Data/ItemsTable.json +0 -200
  97. package/bin/v8/commands/template/basic/Data/LedgerNames.json +0 -6
  98. package/bin/v8/commands/template/basic/Data/StockItems.json +0 -45
  99. package/bin/v8/commands/template/basic/app.js +0 -4
  100. package/bin/v8/commands/template/basic/config.json +0 -4
  101. package/bin/v8/commands/template/basic/package-lock.json +0 -21
  102. package/bin/v8/commands/template/basic/package.json +0 -13
  103. package/bin/v8/commands/template/basic/read.js +0 -8
  104. package/bin/v8/commands/template/basic/write.js +0 -8
  105. package/bin/v8/commands/template/express/.env +0 -8
  106. package/bin/v8/commands/template/express/.env.local +0 -7
  107. package/bin/v8/commands/template/express/.vscode/launch.json +0 -12
  108. package/bin/v8/commands/template/express/Config/Schemas/BillsTable.json +0 -166
  109. package/bin/v8/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
  110. package/bin/v8/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
  111. package/bin/v8/commands/template/express/Config/Schemas/StockItems.json +0 -45
  112. package/bin/v8/commands/template/express/Config/api.json +0 -8
  113. package/bin/v8/commands/template/express/Config/schema.json +0 -8
  114. package/bin/v8/commands/template/express/Config/ui.json +0 -8
  115. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
  116. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
  117. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
  118. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
  119. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
  120. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
  121. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
  122. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
  123. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
  124. package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
  125. package/bin/v8/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
  126. package/bin/v8/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
  127. package/bin/v8/commands/template/express/app.js +0 -33
  128. package/bin/v8/commands/template/express/config.json +0 -4
  129. package/bin/v8/commands/template/express/package.json +0 -18
  130. package/bin/v8/commands/test.js +0 -36
  131. package/bin/v8/core/parseInput.js +0 -10
  132. package/bin/v8/core/resolveCommand.js +0 -12
  133. package/bin/v8/core/resolveFolderName.js +0 -17
  134. package/bin/v8/start.js +0 -23
  135. package/bin/v9/commands/generateSamples.js +0 -26
  136. package/bin/v9/commands/init.js +0 -23
  137. package/bin/v9/commands/steps/announce.js +0 -3
  138. package/bin/v9/commands/steps/createProject.js +0 -6
  139. package/bin/v9/commands/steps/decideTemplate.js +0 -3
  140. package/bin/v9/commands/steps/locateDestination.js +0 -5
  141. package/bin/v9/commands/steps/locateSource.js +0 -14
  142. package/bin/v9/commands/template/baseTemplate.js +0 -11
  143. package/bin/v9/commands/template/basic/.vscode/launch.json +0 -12
  144. package/bin/v9/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
  145. package/bin/v9/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
  146. package/bin/v9/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
  147. package/bin/v9/commands/template/basic/Config/Schemas/StockItems.json +0 -45
  148. package/bin/v9/commands/template/basic/Config/api.json +0 -8
  149. package/bin/v9/commands/template/basic/Config/schema.json +0 -8
  150. package/bin/v9/commands/template/basic/Config/ui.json +0 -8
  151. package/bin/v9/commands/template/basic/Data/BillsTable.json +0 -165
  152. package/bin/v9/commands/template/basic/Data/ItemsTable.json +0 -200
  153. package/bin/v9/commands/template/basic/Data/LedgerNames.json +0 -6
  154. package/bin/v9/commands/template/basic/Data/StockItems.json +0 -45
  155. package/bin/v9/commands/template/basic/app.js +0 -4
  156. package/bin/v9/commands/template/basic/config.json +0 -4
  157. package/bin/v9/commands/template/basic/package-lock.json +0 -21
  158. package/bin/v9/commands/template/basic/package.json +0 -13
  159. package/bin/v9/commands/template/basic/read.js +0 -8
  160. package/bin/v9/commands/template/basic/write.js +0 -8
  161. package/bin/v9/commands/template/express/.env +0 -8
  162. package/bin/v9/commands/template/express/.env.local +0 -7
  163. package/bin/v9/commands/template/express/.vscode/launch.json +0 -12
  164. package/bin/v9/commands/template/express/Config/Schemas/BillsTable.json +0 -166
  165. package/bin/v9/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
  166. package/bin/v9/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
  167. package/bin/v9/commands/template/express/Config/Schemas/StockItems.json +0 -45
  168. package/bin/v9/commands/template/express/Config/api.json +0 -8
  169. package/bin/v9/commands/template/express/Config/schema.json +0 -8
  170. package/bin/v9/commands/template/express/Config/ui.json +0 -8
  171. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
  172. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
  173. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
  174. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
  175. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
  176. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
  177. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
  178. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
  179. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
  180. package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
  181. package/bin/v9/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
  182. package/bin/v9/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
  183. package/bin/v9/commands/template/express/app.js +0 -33
  184. package/bin/v9/commands/template/express/config.json +0 -4
  185. package/bin/v9/commands/template/express/package.json +0 -18
  186. package/bin/v9/commands/test.js +0 -36
  187. package/bin/v9/core/parseInput.js +0 -10
  188. package/bin/v9/core/resolveCommand.js +0 -14
  189. package/bin/v9/core/resolveFolderName.js +0 -17
  190. package/bin/v9/start.js +0 -63
  191. package/dev.md +0 -74
package/bin/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import getLatestVersion from "./core/getLatestVersion.js";
4
4
  import loadRunner from "./core/loadRunner.js";
@@ -0,0 +1,9 @@
1
+ import fs from "fs";
2
+
3
+ import { locateSource } from "../tally/steps/locateSource.js";
4
+
5
+ export default (inDestination) => {
6
+ const source = locateSource();
7
+
8
+ fs.cpSync(source, inDestination, { recursive: true });
9
+ };
@@ -4,11 +4,13 @@ import { fileURLToPath } from "url";
4
4
  const __filename = fileURLToPath(import.meta.url);
5
5
  const __dirname = path.dirname(__filename);
6
6
 
7
+ const sourceVersion = "v3";
8
+
7
9
  export const locateSource = () => {
8
10
  return path.join(
9
11
  __dirname,
10
12
  "..",
11
13
  "template",
12
- "v2"
14
+ sourceVersion
13
15
  );
14
16
  };
@@ -1,3 +1,3 @@
1
- {
2
- "tableName": "BillsTable.json"
1
+ {
2
+ "tableName": "BillsTable.json"
3
3
  }
@@ -1,12 +1,12 @@
1
-
2
- POST http://localhost:3000/Api/V1/BillsTable/Insert
3
- Content-Type: application/json
4
-
5
- {
6
- "LedgerName": "",
7
- "LedgerParentName": "",
8
- "LedgerGST": "",
9
- "InvoiceNo": "",
10
- "InvoiceDate": "",
11
- "InvoiceStateCode": ""
12
- }
1
+
2
+ POST http://localhost:3000/Api/V1/BillsTable/Insert
3
+ Content-Type: application/json
4
+
5
+ {
6
+ "LedgerName": "",
7
+ "LedgerParentName": "",
8
+ "LedgerGST": "",
9
+ "InvoiceNo": "",
10
+ "InvoiceDate": "",
11
+ "InvoiceStateCode": ""
12
+ }
@@ -1,11 +1,11 @@
1
- import express from 'express';
2
- import { postFunc } from "./Insert/controller.js";
1
+ import express from 'express';
2
+ import { postFunc } from "./Insert/controller.js";
3
3
  import { findFunc } from "./Find/controller.js";
4
4
 
5
5
  const tableName = "BillsTable";
6
6
 
7
- const router = express.Router();
8
- router.get('/Find/:pk', (req, res) => findFunc({ req, res, inTableName: tableName }));
7
+ const router = express.Router();
8
+ router.get('/Find/:pk', (req, res) => findFunc({ req, res, inTableName: tableName }));
9
9
  router.post('/Insert', express.json(), (req, res) => postFunc({ req, res, inTableName: tableName }));
10
10
 
11
11
  export { router };
@@ -1,3 +1,3 @@
1
- {
2
- "tableName": "ItemsTable.json"
1
+ {
2
+ "tableName": "ItemsTable.json"
3
3
  }
@@ -1,13 +1,13 @@
1
-
2
- POST http://localhost:3000/Api/V1/ItemsTable/Insert
3
- Content-Type: application/json
4
-
5
- {
6
- "StockItemName": "",
7
- "Rate": "",
8
- "Qty": "",
9
- "Amount": "",
10
- "TaxPer": "",
11
- "Uom": "",
12
- "ParentPk": ""
13
- }
1
+
2
+ POST http://localhost:3000/Api/V1/ItemsTable/Insert
3
+ Content-Type: application/json
4
+
5
+ {
6
+ "StockItemName": "",
7
+ "Rate": "",
8
+ "Qty": "",
9
+ "Amount": "",
10
+ "TaxPer": "",
11
+ "Uom": "",
12
+ "ParentPk": ""
13
+ }
@@ -1,11 +1,11 @@
1
- import express from 'express';
2
- import { filterColumnsFunc } from "./FilterColumns/controller.js";
1
+ import express from 'express';
2
+ import { filterColumnsFunc } from "./FilterColumns/controller.js";
3
3
  import { postFunc } from "./Insert/controller.js";
4
4
 
5
5
  const tableName = "ItemsTable";
6
6
 
7
- const router = express.Router();
8
- router.post('/Insert', express.json(), (req, res) => postFunc({ req, res, inTableName: tableName }));
7
+ const router = express.Router();
8
+ router.post('/Insert', express.json(), (req, res) => postFunc({ req, res, inTableName: tableName }));
9
9
  router.get('/FilterColumns', (req, res) => filterColumnsFunc({ req, res, inTableName: tableName }));
10
10
 
11
11
  export { router };
@@ -1,3 +1,3 @@
1
- {
2
- "tableName": "LedgerNames.json"
1
+ {
2
+ "tableName": "LedgerNames.json"
3
3
  }
@@ -1,9 +1,9 @@
1
- import express from 'express';
1
+ import express from 'express';
2
2
  import { getFunc } from "./ShowAll/controller.js";
3
3
 
4
4
  const tableName = "LedgerNames";
5
5
 
6
- const router = express.Router();
6
+ const router = express.Router();
7
7
  router.get('/ShowAll', (req, res) => getFunc({ res, inTableName : tableName}));
8
8
 
9
9
  export { router };
@@ -1,3 +1,3 @@
1
- {
2
- "tableName": "StockItems.json"
1
+ {
2
+ "tableName": "StockItems.json"
3
3
  }
@@ -1,9 +1,9 @@
1
- import express from 'express';
1
+ import express from 'express';
2
2
  import { getFunc } from "./ShowAll/controller.js";
3
3
 
4
4
  const tableName = "StockItems";
5
5
 
6
- const router = express.Router();
6
+ const router = express.Router();
7
7
  router.get('/ShowAll', (req, res) => getFunc({ res, inTableName : tableName}));
8
8
 
9
9
  export { router };
@@ -1,13 +1,13 @@
1
- import express from 'express';
2
- import { router as routerFromLedgerNames } from "./LedgerNames/end-points.js";
3
- import { router as routerFromStockItems } from "./StockItems/end-points.js";
4
- import { router as routerFromBillsTable } from "./BillsTable/end-points.js";
1
+ import express from 'express';
2
+ import { router as routerFromLedgerNames } from "./LedgerNames/end-points.js";
3
+ import { router as routerFromStockItems } from "./StockItems/end-points.js";
4
+ import { router as routerFromBillsTable } from "./BillsTable/end-points.js";
5
5
  import { router as routerFromItemsTable } from "./ItemsTable/end-points.js";
6
6
 
7
7
  const router = express.Router();
8
- router.use('/LedgerNames', routerFromLedgerNames);
9
- router.use('/StockItems', routerFromStockItems);
10
- router.use('/BillsTable', routerFromBillsTable);
11
- router.use('/ItemsTable', routerFromItemsTable);
8
+ router.use('/LedgerNames', routerFromLedgerNames);
9
+ router.use('/StockItems', routerFromStockItems);
10
+ router.use('/BillsTable', routerFromBillsTable);
11
+ router.use('/ItemsTable', routerFromItemsTable);
12
12
 
13
13
  export { router };
@@ -1,7 +1,7 @@
1
- import express from 'express';
1
+ import express from 'express';
2
2
  import { router as routerFromV1 } from "./V1/routes.js";
3
3
 
4
4
  const router = express.Router();
5
- router.use('/V1', routerFromV1);
5
+ router.use('/V1', routerFromV1);
6
6
 
7
7
  export { router };
@@ -1,3 +1,3 @@
1
- {
2
- "tableName": "StockItems.json"
1
+ {
2
+ "tableName": "StockItems.json"
3
3
  }
@@ -1,11 +1,11 @@
1
1
  import express from 'express';
2
2
 
3
- import { router as routerFromLedgerNames } from "./LedgerNames/end-points.js";
3
+ import { router as routerFromLedgerNames } from "./LedgerNames/end-points.js";
4
4
  import { router as routerFromStockItems } from "./StockItems/end-points.js";
5
5
 
6
6
  const router = express.Router();
7
7
 
8
8
  router.use('/LedgerNames', routerFromLedgerNames);
9
- router.use('/StockItems', routerFromStockItems);
9
+ router.use('/StockItems', routerFromStockItems);
10
10
 
11
11
  export { router };
@@ -6,14 +6,14 @@ import loadConfig from "./configLoader.js";
6
6
  import setupRoutes from "./routes.js";
7
7
  import startServer from "./server.js";
8
8
 
9
- import { router as routerFromFromTally } from "./FromTally/routes.js";
10
- import { router as routerFromApi } from "./Api/routes.js";
9
+ import { router as routerFromFromTally } from "./FromTally/routes.js";
10
+ import { router as routerFromApi } from "./Api/routes.js";
11
11
  import { router as routerFromV7 } from "./V7/routes.js";
12
12
 
13
13
  loadConfig();
14
14
 
15
- const app = express()
16
- app.use("/V7", routerFromV7);
15
+ const app = express()
16
+ app.use("/V7", routerFromV7);
17
17
  app.use("/Api", routerFromApi);
18
18
 
19
19
  app.use("/FromTally", routerFromFromTally);
package/index.js CHANGED
@@ -1,2 +1,10 @@
1
- export { default as init } from "./bin/v12/commands/exportCommands/init.js";
2
- export { default as express } from "./bin/v12/commands/exportCommands/express.js";
1
+ import getLatestVersion from "./bin/core/getLatestVersion.js";
2
+
3
+ const load = async (cmd) => {
4
+ const v = getLatestVersion();
5
+ return (await import(`./bin/${v}/commands/exportCommands/${cmd}.js`)).default;
6
+ };
7
+
8
+ export const express = async (...a) => (await load("express"))(...a);
9
+ export const init = async (...a) => (await load("init"))(...a);
10
+ export const tally = async (...a) => (await load("tally"))(...a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keshavsoft/kschema-cli",
3
- "version": "1.12.7",
3
+ "version": "1.12.9",
4
4
  "description": "CLI to scaffold projects using templates",
5
5
  "keywords": [
6
6
  "cli",
@@ -19,6 +19,12 @@
19
19
  "bin": {
20
20
  "kschema-cli": "./bin/cli.js"
21
21
  },
22
+ "files": [
23
+ "bin/",
24
+ "index.js",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
22
28
  "homepage": "https://cli.keshavsoft.com",
23
29
  "repository": {
24
30
  "type": "git",
package/CHANGELOG.md DELETED
@@ -1,67 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on Keep a Changelog.
6
-
7
- ---
8
-
9
- ## [1.3.1] - 2026-04-21
10
-
11
- ### Added
12
- - Initial release of `@keshavsoft/kschema-cli`
13
- - CLI command: `kschema init <template> [projectName]`
14
- - Template support:
15
- - basic
16
- - express
17
- - Auto project generation using file copy
18
- - Auto folder naming when projectName not provided:
19
- - `kschema-<template>-<timestamp>`
20
- - Modular command structure (`init`, `test`)
21
- - Version-based CLI execution (`cliVersion` support)
22
-
23
- ### Notes
24
- - Designed as a wrapper over kschema ecosystem
25
- - Focused on simplicity and fast project setup
26
-
27
- ## [1.4.1] - 2026-04-23
28
-
29
- ### Added
30
- - made auto code, no cliversion in package, major change
31
-
32
- ## [1.5.2] - 2026-04-23
33
-
34
- ### Added
35
- - new cli added generateSamples dependant on kschema npm
36
-
37
- ## [1.5.3] - 2026-04-23
38
-
39
- - cli perfect with samples also, only kschema version need to change
40
-
41
- ## [1.11.1] - 2026-05-01
42
-
43
- - express added
44
-
45
- ## [1.12.1] - 2026-05-01
46
-
47
- - started exporting also, along with cli
48
-
49
- ## [1.12.2] - 2026-05-01
50
-
51
- - export init and express perfect
52
-
53
- ## [1.12.4] - 2026-05-01
54
-
55
- - express template perfect need to test
56
-
57
- ## [1.12.5] - 2026-05-02
58
-
59
- - express started workin on v3
60
-
61
- ## [1.12.6] - 2026-05-02
62
-
63
- - tally perfect till masters
64
-
65
- ## [1.12.7] - 2026-05-05
66
-
67
- - tally v3 perfect with voucher post
@@ -1,26 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- import { exampleSchema } from "@keshavsoft/kschema";
5
- import { baseTemplate } from "./template/baseTemplate.js";
6
-
7
- export default ({ args }) => {
8
- const OUTPUT_DIR = path.resolve(process.cwd(), "samples");
9
-
10
- if (!fs.existsSync(OUTPUT_DIR)) {
11
- fs.mkdirSync(OUTPUT_DIR, { recursive: true });
12
- };
13
-
14
- Object.entries(exampleSchema).forEach(([intent, methods]) => {
15
- Object.entries(methods).forEach(([key, meta]) => {
16
- if (Array.isArray(meta)) {
17
- const finalCode = baseTemplate({
18
- body: meta.join("\r\n"),
19
- inTableName: args[0]
20
- });
21
-
22
- fs.writeFileSync(path.join(OUTPUT_DIR, `${intent}_${key}.js`), finalCode);
23
- };
24
- });
25
- });
26
- };
@@ -1,23 +0,0 @@
1
- import { decideTemplate } from "./steps/decideTemplate.js";
2
-
3
- import { locateSource } from "./steps/locateSource.js";
4
- import { locateDestination } from "./steps/locateDestination.js";
5
- import { createProject } from "./steps/createProject.js";
6
- import { announce } from "./steps/announce.js";
7
-
8
- import resolveFolderName from "../core/resolveFolderName.js";
9
-
10
- export default ({ template, folderName }) => {
11
- const finalTemplate = decideTemplate({ inTemplate: template });
12
-
13
- const resolvedFolderName = resolveFolderName({
14
- name: folderName
15
- });
16
-
17
- const source = locateSource({ template: finalTemplate });
18
- const destination = locateDestination({ inResolvedFolderName: resolvedFolderName });
19
-
20
- createProject({ source, destination });
21
-
22
- announce({ inResolvedFolderName: resolvedFolderName });
23
- };
@@ -1,3 +0,0 @@
1
- export const announce = ({ inResolvedFolderName }) => {
2
- console.log(`[keshavsoft] Project created: ${inResolvedFolderName}`);
3
- };
@@ -1,6 +0,0 @@
1
- import fs from "fs";
2
-
3
- export const createProject = ({ source, destination }) => {
4
- fs.mkdirSync(destination, { recursive: true });
5
- fs.cpSync(source, destination, { recursive: true });
6
- };
@@ -1,3 +0,0 @@
1
- export const decideTemplate = ({ inTemplate }) => {
2
- return inTemplate || "basic";
3
- };
@@ -1,5 +0,0 @@
1
- import path from "path";
2
-
3
- export const locateDestination = ({ inResolvedFolderName }) => {
4
- return path.join(process.cwd(), inResolvedFolderName);
5
- };
@@ -1,14 +0,0 @@
1
- import path from "path";
2
- import { fileURLToPath } from "url";
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = path.dirname(__filename);
6
-
7
- export const locateSource = ({ template }) => {
8
- return path.join(
9
- __dirname,
10
- "..",
11
- "template",
12
- template === "express" ? "express" : "basic"
13
- );
14
- };
@@ -1,11 +0,0 @@
1
- export const baseTemplate = ({ body, inTableName = "SampleTable" }) => `
2
- import { kschema } from "@keshavsoft/kschema";
3
-
4
- import configJson from "../config.json" with { type: "json" };
5
-
6
- kschema.loadConfig(configJson);
7
-
8
- const table = kschema.table("${inTableName}");
9
-
10
- ${body}
11
- `;
@@ -1,12 +0,0 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "type": "node",
6
- "request": "launch",
7
- "name": "Debug App",
8
- "program": "${workspaceFolder}/app.js",
9
- "envFile": "${workspaceFolder}/.env"
10
- }
11
- ]
12
- }
@@ -1,165 +0,0 @@
1
- {
2
- "tableName": "BillsTable",
3
- "columns": [
4
- {
5
- "field": "LedgerName",
6
- "title": "LedgerName",
7
- "type": "text",
8
- "isInput": false,
9
- "isAutoFocus": true,
10
- "WidthOptions": {
11
- "inPx": 200
12
- },
13
- "defaultvalue": "Keshav",
14
- "isDataList": true,
15
- "dataListId": "LedgerNames",
16
- "isConsider": true
17
- },
18
- {
19
- "field": "LedgerParentName",
20
- "title": "LedgerParentName",
21
- "type": "text",
22
- "isInput": true,
23
- "WidthOptions": {
24
- "inPx": 200
25
- },
26
- "isConsider": true,
27
- "showInUi": false
28
- },
29
- {
30
- "field": "LedgerGST",
31
- "title": "LedgerGST",
32
- "type": "text",
33
- "isInput": true,
34
- "isAutoFocus": true,
35
- "WidthOptions": {
36
- "inPx": 200
37
- },
38
- "isConsider": true,
39
- "showInUi": false
40
- },
41
- {
42
- "field": "InvoiceNo",
43
- "title": "InvoiceNo",
44
- "type": "number",
45
- "isInput": true,
46
- "WidthOptions": {
47
- "inPx": 200
48
- },
49
- "isConsider": true
50
- },
51
- {
52
- "field": "InvoiceDate",
53
- "title": "InvoiceDate",
54
- "isDate": true,
55
- "type": "date",
56
- "WidthOptions": {
57
- "inPx": 200
58
- },
59
- "defaultvalue": "today",
60
- "isConsider": true
61
- },
62
- {
63
- "field": "InvoiceStateCode",
64
- "title": "InvoiceStateCode",
65
- "defaultvalue": "37",
66
- "isInput": true,
67
- "WidthOptions": {
68
- "inPx": 200
69
- },
70
- "isConsider": true,
71
- "showInUi": false
72
- },
73
- {
74
- "field": "pk",
75
- "title": "pk",
76
- "primary": true
77
- }
78
- ],
79
- "data": [],
80
- "Vertical": [
81
- {
82
- "field": "LedgerName",
83
- "title": "LedgerName",
84
- "type": "text",
85
- "isInput": false,
86
- "isAutoFocus": true,
87
- "WidthOptions": {
88
- "inPx": 200
89
- },
90
- "defaultvalue": "Keshav",
91
- "isDataList": true,
92
- "dataListId": "LedgerNames"
93
- },
94
- {
95
- "field": "LedgerParentName",
96
- "title": "LedgerParentName",
97
- "type": "text",
98
- "isInput": true,
99
- "WidthOptions": {
100
- "inPx": 200
101
- }
102
- },
103
- {
104
- "field": "LedgerGST",
105
- "title": "LedgerGST",
106
- "type": "text",
107
- "isInput": true,
108
- "isAutoFocus": true,
109
- "WidthOptions": {
110
- "inPx": 200
111
- }
112
- },
113
- {
114
- "field": "InvoiceNo",
115
- "title": "InvoiceNo",
116
- "type": "number",
117
- "isInput": true,
118
- "WidthOptions": {
119
- "inPx": 200
120
- }
121
- },
122
- {
123
- "field": "InvoiceDate",
124
- "title": "InvoiceDate",
125
- "isDate": true,
126
- "type": "date",
127
- "WidthOptions": {
128
- "inPx": 200
129
- },
130
- "defaultvalue": "today"
131
- },
132
- {
133
- "field": "InvoiceStateCode",
134
- "title": "InvoiceStateCode",
135
- "defaultvalue": "37",
136
- "isInput": true,
137
- "WidthOptions": {
138
- "inPx": 200
139
- }
140
- }
141
- ],
142
- "DataTableOptions": {
143
- "Header": {
144
- "autoFocus": "LedgerName"
145
- }
146
- },
147
- "ForeignkeyTables": [
148
- "ItemsTable"
149
- ],
150
- "DependantTables": [
151
- "LedgerNames"
152
- ],
153
- "NonSecured": {
154
- "SubRoutes": [
155
- "ShowAll",
156
- "Insert",
157
- "Find",
158
- "InsertAndReturnPk",
159
- "FindWithForeignData",
160
- "InsertToTally"
161
- ]
162
- },
163
- "PrimarykeyTableNames": [],
164
- "PrimarykeyTables": []
165
- }