@keshavsoft/kschema-cli 1.12.4 → 1.12.5

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 (74) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/bin/v12/commands/express/steps/createProject.js +1 -0
  3. package/bin/v12/commands/express/steps/locateSource.js +1 -1
  4. package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/Schemas/LedgerNames.json +10 -0
  5. package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/Schemas/StockItems.json +6 -1
  6. package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/app.js +4 -0
  7. package/bin/v12/commands/express/template/v2/package-lock.json +834 -0
  8. package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/package.json +1 -1
  9. package/bin/v12/commands/express/template/v3/.env +8 -0
  10. package/bin/v12/commands/express/template/v3/.env.local +7 -0
  11. package/bin/v12/commands/express/template/v3/Api/routes.js +5 -0
  12. package/bin/v12/commands/express/template/v3/Config/Schemas/LedgerNames.json +60 -0
  13. package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v3/Config/Schemas}/StockItems.json +6 -1
  14. package/bin/v12/commands/express/template/v3/app.js +12 -0
  15. package/bin/v12/commands/express/template/v3/configLoader.js +6 -0
  16. package/bin/v12/commands/express/template/v3/package-lock.json +834 -0
  17. package/bin/v12/commands/express/template/v3/package.json +18 -0
  18. package/bin/v12/commands/express/template/v3/port.js +6 -0
  19. package/bin/v12/commands/express/template/v3/routes.js +5 -0
  20. package/bin/v12/commands/express/template/v3/server.js +11 -0
  21. package/bin/v12/commands/express.js +2 -6
  22. package/package.json +1 -1
  23. package/bin/v12/commands/express/steps/decideTemplate.js +0 -3
  24. package/bin/v7/commands/generateSamples.js +0 -21
  25. package/bin/v7/commands/init.js +0 -23
  26. package/bin/v7/commands/steps/announce.js +0 -3
  27. package/bin/v7/commands/steps/createProject.js +0 -6
  28. package/bin/v7/commands/steps/decideTemplate.js +0 -3
  29. package/bin/v7/commands/steps/locateDestination.js +0 -5
  30. package/bin/v7/commands/steps/locateSource.js +0 -14
  31. package/bin/v7/commands/template/baseTemplate.js +0 -11
  32. package/bin/v7/commands/template/basic/Data/LedgerNames.json +0 -6
  33. package/bin/v7/commands/template/basic/app.js +0 -4
  34. package/bin/v7/commands/template/basic/package-lock.json +0 -21
  35. package/bin/v7/commands/template/basic/package.json +0 -13
  36. package/bin/v7/commands/template/basic/read.js +0 -8
  37. package/bin/v7/commands/template/basic/write.js +0 -8
  38. package/bin/v7/commands/template/express/Config/Schemas/BillsTable.json +0 -166
  39. package/bin/v7/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
  40. package/bin/v7/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
  41. package/bin/v7/commands/template/express/Config/Schemas/StockItems.json +0 -45
  42. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
  43. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
  44. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
  45. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
  46. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
  47. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
  48. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
  49. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
  50. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
  51. package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
  52. package/bin/v7/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
  53. package/bin/v7/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
  54. package/bin/v7/commands/test.js +0 -36
  55. package/bin/v7/core/parseInput.js +0 -10
  56. package/bin/v7/core/resolveCommand.js +0 -12
  57. package/bin/v7/core/resolveFolderName.js +0 -17
  58. package/bin/v7/start.js +0 -23
  59. /package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/.env +0 -0
  60. /package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/.env.local +0 -0
  61. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/.vscode/launch.json +0 -0
  62. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/Schemas/BillsTable.json +0 -0
  63. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/Schemas/ItemsTable.json +0 -0
  64. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/api.json +0 -0
  65. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/schema.json +0 -0
  66. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/ui.json +0 -0
  67. /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/config.json +0 -0
  68. /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/.vscode/launch.json +0 -0
  69. /package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v3/Config/Schemas}/BillsTable.json +0 -0
  70. /package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v3/Config/Schemas}/ItemsTable.json +0 -0
  71. /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/api.json +0 -0
  72. /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/schema.json +0 -0
  73. /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/ui.json +0 -0
  74. /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/config.json +0 -0
@@ -11,7 +11,7 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@keshavsoft/kschema": "^1.6.1",
14
+ "@keshavsoft/kschema": "^1.17.8",
15
15
  "body-parser": "^2.2.0",
16
16
  "express": "^5.1.0"
17
17
  }
@@ -0,0 +1,8 @@
1
+ DataPath=Data
2
+ PORT=3000
3
+ VERSION= V3
4
+ TimeSpan=20
5
+ RepoType="GenWMailAndWs"
6
+ TablePath=Data/Ledgers.json
7
+ SchemaPath=Config/Schemas
8
+ KSSource=ConfigJson
@@ -0,0 +1,7 @@
1
+ DataPath=Data
2
+ PORT=3000
3
+ VERSION= V3
4
+ TimeSpan=20
5
+ RepoType="GenWMailAndWs"
6
+ TablePath=Data/Ledgers.json
7
+ SchemaPath=Config/Schemas
@@ -0,0 +1,5 @@
1
+ import express from 'express';
2
+
3
+ const router = express.Router();
4
+
5
+ export { router };
@@ -0,0 +1,60 @@
1
+ {
2
+ "tableName": "LedgerNames",
3
+ "columns": [
4
+ {
5
+ "field": "LedgerName",
6
+ "title": "LedgerName",
7
+ "unique": true,
8
+ "type": "text",
9
+ "isInput": true,
10
+ "isAutoFocus": true,
11
+ "defaultvalue": "KeshavSoft",
12
+ "isConsider": true
13
+ },
14
+ {
15
+ "field": "LedgerParentName",
16
+ "title": "LedgerParentName",
17
+ "type": "text",
18
+ "isInput": true,
19
+ "isConsider": true
20
+ },
21
+ {
22
+ "field": "LedgerType",
23
+ "title": "LedgerType",
24
+ "type": "text",
25
+ "isInput": true,
26
+ "isConsider": true
27
+ },
28
+ {
29
+ "field": "pk",
30
+ "title": "pk",
31
+ "primary": true
32
+ },
33
+ {
34
+ "field": "GstRegistrationType",
35
+ "title": "GstRegistrationType",
36
+ "isConsider": true
37
+ },
38
+ {
39
+ "field": "PartyGSTIN",
40
+ "title": "PartyGSTIN",
41
+ "isConsider": true
42
+ }
43
+ ],
44
+ "data": [],
45
+ "Vertical": [],
46
+ "DataTableOptions": {
47
+ "Header": {
48
+ "autoFocus": "LedgerName"
49
+ }
50
+ },
51
+ "NonSecured": {
52
+ "SubRoutes": [
53
+ "ShowAll",
54
+ "Insert",
55
+ "Pipe"
56
+ ]
57
+ },
58
+ "PrimarykeyTableNames": [],
59
+ "PrimarykeyTables": []
60
+ }
@@ -24,6 +24,11 @@
24
24
  "type": "text",
25
25
  "isInput": true,
26
26
  "isConsider": true
27
+ },
28
+ {
29
+ "field": "pk",
30
+ "title": "pk",
31
+ "primary": true
27
32
  }
28
33
  ],
29
34
  "data": [],
@@ -42,4 +47,4 @@
42
47
  },
43
48
  "PrimarykeyTableNames": [],
44
49
  "PrimarykeyTables": []
45
- }
50
+ }
@@ -0,0 +1,12 @@
1
+ import express from "express";
2
+
3
+ import loadConfig from "./configLoader.js";
4
+ import setupRoutes from "./routes.js";
5
+ import startServer from "./server.js";
6
+
7
+ loadConfig();
8
+
9
+ const app = express()
10
+
11
+ setupRoutes(app);
12
+ startServer(app);
@@ -0,0 +1,6 @@
1
+ import { kschema } from "@keshavsoft/kschema";
2
+ import configJson from './config.json' with { type: 'json' };
3
+
4
+ export default function loadConfig() {
5
+ kschema.loadConfig(configJson);
6
+ };