@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/v9/start.js DELETED
@@ -1,63 +0,0 @@
1
- import parseInput from "./core/parseInput.js";
2
- import resolveCommand from "./core/resolveCommand.js";
3
-
4
- /*
5
- KSchema CLI – Entry Flow
6
-
7
- 1. Read user input from terminal (parseInput)
8
- 2. If no command → show usage (first-time user safety)
9
- 3. If help flags → show usage (quick guidance)
10
- 4. Resolve command dynamically (no hardcoding logic)
11
- 5. If command not found → inform + guide back to usage
12
- 6. Execute command with parsed input
13
-
14
- Goal:
15
- - Zero confusion for user
16
- - Single source of truth (showUsage)
17
- - Easy to extend (just add commands, no core changes)
18
- */
19
-
20
- const run = async () => {
21
- const input = parseInput();
22
-
23
- if (!input.cmd) return showUsage();
24
-
25
- if (input.cmd === "--help" || input.cmd === "-h" || input.cmd === "help") return showUsage();
26
-
27
- const command = resolveCommand(input.cmd);
28
-
29
- if (!command) return (console.log(`Unknown command: ${input.cmd}\n`), showUsage());
30
-
31
- await command(input);
32
- };
33
-
34
- export default run;
35
-
36
- const showUsage = () => {
37
- const g = "\x1b[32m";
38
- const y = "\x1b[33m";
39
- const c = "\x1b[36m";
40
- const gray = "\x1b[90m";
41
- const r = "\x1b[0m";
42
-
43
- console.log(`
44
- ${c}🚀 KSchema CLI v1.9.3${r}
45
-
46
- ${y}Usage:${r}
47
- ${g}npx @keshavsoft/kschema-cli${r} <command> [options]
48
-
49
- // inside showUsage()
50
- ${y}Commands:${r}
51
- ${g}init${r} 🛠 Initialize a new schema setup
52
- ${g}test${r} ✅ Run schema validations/tests
53
- ${g}generate-samples${r} 📦 Generate sample schema files
54
-
55
- ${y}Examples:${r}
56
- ${gray}npx @keshavsoft/kschema-cli init${r}
57
- ${gray}npx @keshavsoft/kschema-cli test users${r}
58
-
59
- ${y}Tip:${r}
60
- 💡 npm i -g @keshavsoft/kschema-cli
61
- ${g}kschema${r} <command>
62
- `);
63
- };
package/dev.md DELETED
@@ -1,74 +0,0 @@
1
- # @keshavsoft/kschema
2
-
3
- A minimal config store for loading and accessing JSON configuration across your application.
4
-
5
- ---
6
-
7
- ## 🚀 Installation
8
-
9
- ```bash
10
- npm install @keshavsoft/kschema
11
- ```
12
-
13
- ---
14
-
15
- ## 📦 Usage
16
-
17
- ```js
18
- import { loadConfig, getConfig } from "@keshavsoft/kschema";
19
-
20
- loadConfig({ name: "test" });
21
-
22
- console.log(getConfig());
23
- ```
24
-
25
- ---
26
-
27
- ## 🧠 API
28
-
29
- ### loadConfig(config)
30
-
31
- Loads the configuration into memory.
32
-
33
- * `config` → Object
34
-
35
- ---
36
-
37
- ### getConfig()
38
-
39
- Returns the loaded configuration.
40
-
41
- * Throws error if config is not loaded
42
-
43
- ---
44
-
45
- ## ⚠️ Notes
46
-
47
- * Config is stored in-memory
48
- * Must call `loadConfig` before `getConfig`
49
-
50
- ---
51
-
52
- ## 📌 Example
53
-
54
- ```js
55
- loadConfig({ user: "keshav" });
56
-
57
- const data = getConfig();
58
-
59
- console.log(data.user); // keshav
60
- ```
61
-
62
- ---
63
-
64
- ## 🛠 Future Scope
65
-
66
- * Validation support
67
- * Config updates
68
- * Remote config loading
69
-
70
- ---
71
-
72
- ## 👨‍💻 Author
73
-
74
- KeshavSoft