@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
@@ -1,206 +0,0 @@
1
- {
2
- "tableName": "ItemsTable",
3
- "columns": [
4
- {
5
- "field": "StockItemName",
6
- "title": "StockItemName",
7
- "unique": false,
8
- "type": "text",
9
- "isInput": false,
10
- "isAutoFocus": true,
11
- "WidthOptions": {
12
- "inPx": 300
13
- },
14
- "isDataList": true,
15
- "dataListId": "StockItems",
16
- "isConsider": true,
17
- "showInUi": true
18
- },
19
- {
20
- "field": "Rate",
21
- "title": "Rate",
22
- "unique": false,
23
- "type": "number",
24
- "isNumber": true,
25
- "ShowTotal": false,
26
- "footerFormatter": "",
27
- "showRupee": true,
28
- "align": "right",
29
- "WidthOptions": {
30
- "inPx": 250
31
- },
32
- "isConsider": true,
33
- "showInUi": true
34
- },
35
- {
36
- "field": "Qty",
37
- "title": "Qty",
38
- "unique": false,
39
- "type": "number",
40
- "isNumber": true,
41
- "ShowTotal": true,
42
- "footerFormatter": "TotalFormatter",
43
- "showRupee": false,
44
- "WidthOptions": {
45
- "inPx": 200
46
- },
47
- "isConsider": true,
48
- "showInUi": true
49
- },
50
- {
51
- "field": "Amount",
52
- "title": "Amount",
53
- "unique": false,
54
- "type": "number",
55
- "isNumber": true,
56
- "ShowTotal": true,
57
- "footerFormatter": "TotalFormatter",
58
- "enterCal": "Rate*Qty",
59
- "showRupee": true,
60
- "align": "right",
61
- "WidthOptions": {
62
- "inPx": 250
63
- },
64
- "isConsider": true,
65
- "showInUi": false
66
- },
67
- {
68
- "field": "TaxPer",
69
- "title": "TaxPer",
70
- "unique": false,
71
- "type": "number",
72
- "isNumber": true,
73
- "defaultvalue": 18,
74
- "isConsider": true,
75
- "showInUi": true
76
- },
77
- {
78
- "field": "Uom",
79
- "title": "Uom",
80
- "unique": false,
81
- "type": "number",
82
- "isNumber": true,
83
- "defaultvalue": 18,
84
- "isConsider": true,
85
- "showInUi": true
86
- },
87
- {
88
- "field": "ParentPk",
89
- "title": "ParentPk",
90
- "unique": false,
91
- "isConsider": true,
92
- "showInUi": true
93
- }
94
- ],
95
- "data": [
96
- {
97
- "ItemName": "Coke-Mts-5%",
98
- "Rate": "100",
99
- "Qty": "10",
100
- "Amount": "2000",
101
- "TaxPer": "5",
102
- "Uom": "Mts",
103
- "pk": 1,
104
- "ParentPk": "1"
105
- }
106
- ],
107
- "Vertical": [
108
- {
109
- "field": "StockItemName",
110
- "title": "StockItemName",
111
- "unique": false,
112
- "type": "text",
113
- "isInput": false,
114
- "isAutoFocus": true,
115
- "WidthOptions": {
116
- "inPx": 300
117
- },
118
- "isDataList": true,
119
- "dataListId": "StockItems"
120
- },
121
- {
122
- "field": "Rate",
123
- "title": "Rate",
124
- "unique": false,
125
- "type": "number",
126
- "isNumber": true,
127
- "ShowTotal": false,
128
- "footerFormatter": "",
129
- "showRupee": true,
130
- "align": "right",
131
- "WidthOptions": {
132
- "inPx": 250
133
- }
134
- },
135
- {
136
- "field": "Qty",
137
- "title": "Qty",
138
- "unique": false,
139
- "type": "number",
140
- "isNumber": true,
141
- "ShowTotal": true,
142
- "footerFormatter": "TotalFormatter",
143
- "showRupee": false,
144
- "WidthOptions": {
145
- "inPx": 200
146
- }
147
- },
148
- {
149
- "field": "Amount",
150
- "title": "Amount",
151
- "unique": false,
152
- "type": "number",
153
- "isNumber": true,
154
- "ShowTotal": true,
155
- "footerFormatter": "TotalFormatter",
156
- "showRupee": true,
157
- "align": "right",
158
- "WidthOptions": {
159
- "inPx": 250
160
- }
161
- },
162
- {
163
- "field": "TaxPer",
164
- "title": "TaxPer",
165
- "unique": false,
166
- "type": "number",
167
- "isNumber": true,
168
- "defaultvalue": 18,
169
- "isConsider": true,
170
- "showInUi": true
171
- },
172
- {
173
- "field": "Uom",
174
- "title": "Uom",
175
- "unique": false,
176
- "type": "number",
177
- "isNumber": true,
178
- "defaultvalue": 18,
179
- "isConsider": true,
180
- "showInUi": true
181
- }
182
- ],
183
- "DataTableOptions": {
184
- "Header": {
185
- "autoFocus": "StockItemName"
186
- }
187
- },
188
- "NonSecured": {
189
- "SubRoutes": [
190
- "ShowAll",
191
- "Insert",
192
- "InsertAndReturnPk",
193
- "InsertWithDefaults"
194
- ]
195
- },
196
- "DependantTables": [
197
- "StockItems"
198
- ],
199
- "ForeignkeyTables": [
200
- "BillsTable"
201
- ],
202
- "PrimarykeyTableNames": [
203
- "BillsTable"
204
- ],
205
- "PrimarykeyTables": []
206
- }
@@ -1,50 +0,0 @@
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
- "data": [],
35
- "Vertical": [],
36
- "DataTableOptions": {
37
- "Header": {
38
- "autoFocus": "LedgerName"
39
- }
40
- },
41
- "NonSecured": {
42
- "SubRoutes": [
43
- "ShowAll",
44
- "Insert",
45
- "Pipe"
46
- ]
47
- },
48
- "PrimarykeyTableNames": [],
49
- "PrimarykeyTables": []
50
- }
@@ -1,45 +0,0 @@
1
- {
2
- "tableName": "StockItems",
3
- "columns": [
4
- {
5
- "field": "StockItemName",
6
- "title": "StockItemName",
7
- "unique": true,
8
- "type": "text",
9
- "isInput": true,
10
- "isAutoFocus": true,
11
- "defaultvalue": "KeshavSoft",
12
- "isConsider": true
13
- },
14
- {
15
- "field": "StockItemReservedName",
16
- "title": "StockItemReservedName",
17
- "type": "text",
18
- "isInput": true,
19
- "isConsider": true
20
- },
21
- {
22
- "field": "StockItemType",
23
- "title": "StockItemType",
24
- "type": "text",
25
- "isInput": true,
26
- "isConsider": true
27
- }
28
- ],
29
- "data": [],
30
- "Vertical": [],
31
- "DataTableOptions": {
32
- "Header": {
33
- "autoFocus": "StockItemName"
34
- }
35
- },
36
- "NonSecured": {
37
- "SubRoutes": [
38
- "ShowAll",
39
- "Pipe",
40
- "Insert"
41
- ]
42
- },
43
- "PrimarykeyTableNames": [],
44
- "PrimarykeyTables": []
45
- }
@@ -1,8 +0,0 @@
1
- {
2
- "Tables": [
3
- "BillsTable",
4
- "ItemsTable",
5
- "LedgerNames",
6
- "StockItems"
7
- ]
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "Tables": [
3
- "BillsTable",
4
- "ItemsTable",
5
- "LedgerNames",
6
- "StockItems"
7
- ]
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "Tables": [
3
- "BillsTable",
4
- "ItemsTable",
5
- "LedgerNames",
6
- "StockItems"
7
- ]
8
- }
@@ -1,6 +0,0 @@
1
- import { CONFIG } from "./config.js";
2
- import { run } from "./utils.js";
3
-
4
- export function buildProject() {
5
- run("npm run NonSec", CONFIG.COMMON_REPO_PATH);
6
- }
@@ -1,12 +0,0 @@
1
- import path from "path";
2
-
3
- export const CONFIG = {
4
- PUBLIC_DIR: "Public",
5
- VERSION_PREFIX: "V",
6
- SCHEMA_FILE: "ui.json",
7
- SCHEMA_FOLDER: "Schemas",
8
- COMMON_REPO: "VoltUiGulpV1",
9
- COMMON_REPO_GIT: "https://github.com/keshavsoft/VoltUiGulpV1"
10
- };
11
-
12
- CONFIG.COMMON_REPO_PATH = path.join("..", CONFIG.COMMON_REPO);
@@ -1,29 +0,0 @@
1
- import { getNextVersion, createVersionFolder } from "./version.js";
2
- import { prepareRepo } from "./repo.js";
3
- import { readSchemas, injectSchema } from "./schema.js";
4
- import { buildProject } from "./build.js";
5
- import { publishSchema } from "./publish.js";
6
-
7
- function processSchema(versionPath, schema) {
8
- console.log(`\nProcessing ${schema}`);
9
- injectSchema(schema);
10
- buildProject();
11
- publishSchema(versionPath, schema);
12
- console.log(`Done with ${schema}`);
13
- }
14
-
15
- function main() {
16
- const version = getNextVersion();
17
- console.log("Next Version:", version);
18
-
19
- const versionPath = createVersionFolder(version);
20
-
21
- prepareRepo();
22
-
23
- const schemas = readSchemas();
24
- schemas.forEach(s => processSchema(versionPath, s));
25
-
26
- console.log("\n✔ All schemas processed successfully");
27
- }
28
-
29
- main();
@@ -1,22 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { CONFIG } from "./config.js";
4
- import { ensureDir, copyRecursive } from "./utils.js";
5
-
6
- export function publishSchema(versionPath, schemaFile) {
7
- const schemaName = path.parse(schemaFile).name;
8
- const targetDir = path.join(versionPath, schemaName);
9
- const unProtectedDir = path.join(targetDir, "UnProtected");
10
-
11
- ensureDir(unProtectedDir);
12
-
13
- copyRecursive(
14
- path.join(CONFIG.COMMON_REPO_PATH, "dist"),
15
- unProtectedDir
16
- );
17
-
18
- fs.copyFileSync(
19
- path.join(CONFIG.COMMON_REPO_PATH, "Menu", "index.html"),
20
- path.join(targetDir, "index.html")
21
- );
22
- }
@@ -1,20 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { CONFIG } from "./config.js";
4
- import { run } from "./utils.js";
5
-
6
- export function prepareRepo() {
7
- if (!fs.existsSync(CONFIG.COMMON_REPO_PATH)) {
8
- console.log(`${CONFIG.COMMON_REPO} not found. Cloning...`);
9
- run(`git clone ${CONFIG.COMMON_REPO_GIT} ${CONFIG.COMMON_REPO_PATH}`);
10
- }
11
-
12
- if (!fs.existsSync(path.join(CONFIG.COMMON_REPO_PATH, "node_modules"))) {
13
- console.log("Installing dependencies...");
14
- run("npm install", CONFIG.COMMON_REPO_PATH);
15
- }
16
-
17
- if (fs.existsSync(".env")) {
18
- fs.copyFileSync(".env", path.join(CONFIG.COMMON_REPO_PATH, ".env"));
19
- }
20
- }
@@ -1,16 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { CONFIG } from "./config.js";
4
-
5
- export function readSchemas() {
6
- const uiJson = fs.readFileSync(CONFIG.SCHEMA_FILE);
7
- const parsed = JSON.parse(uiJson);
8
- return parsed.Tables || [];
9
- }
10
-
11
- export function injectSchema(schemaFile) {
12
- fs.copyFileSync(
13
- path.join(CONFIG.SCHEMA_FOLDER, `${schemaFile}.json`),
14
- path.join(CONFIG.COMMON_REPO_PATH, "schema.json")
15
- );
16
- }
@@ -1,26 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { execSync } from "child_process";
4
-
5
- export function run(cmd, cwd = process.cwd()) {
6
- console.log(`> ${cmd}`);
7
- execSync(cmd, { stdio: "inherit", cwd });
8
- }
9
-
10
- export function ensureDir(dir) {
11
- fs.mkdirSync(dir, { recursive: true });
12
- }
13
-
14
- export function copyRecursive(src, dest) {
15
- fs.readdirSync(src, { withFileTypes: true }).forEach(entry => {
16
- const srcPath = path.join(src, entry.name);
17
- const destPath = path.join(dest, entry.name);
18
-
19
- if (entry.isDirectory()) {
20
- ensureDir(destPath);
21
- copyRecursive(srcPath, destPath);
22
- } else {
23
- fs.copyFileSync(srcPath, destPath);
24
- }
25
- });
26
- }
@@ -1,25 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { CONFIG } from "./config.js";
4
- import { ensureDir } from "./utils.js";
5
-
6
- export function getNextVersion() {
7
- let max = 0;
8
-
9
- if (fs.existsSync(CONFIG.PUBLIC_DIR)) {
10
- fs.readdirSync(CONFIG.PUBLIC_DIR, { withFileTypes: true })
11
- .filter(d => d.isDirectory() && d.name.startsWith(CONFIG.VERSION_PREFIX))
12
- .forEach(d => {
13
- const n = parseInt(d.name.replace(CONFIG.VERSION_PREFIX, ""), 10);
14
- if (!isNaN(n) && n > max) max = n;
15
- });
16
- }
17
-
18
- return `${CONFIG.VERSION_PREFIX}${max + 1}`;
19
- };
20
-
21
- export function createVersionFolder(version) {
22
- const versionPath = path.join(CONFIG.PUBLIC_DIR, version);
23
- ensureDir(versionPath);
24
- return versionPath;
25
- }
@@ -1,166 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { execSync } from "child_process";
4
-
5
- /* ================= CONFIG ================= */
6
- const CONFIG = {
7
- PUBLIC_DIR: "Public",
8
- VERSION_PREFIX: "V",
9
- SCHEMA_FILE: "ui.json",
10
- SCHEMA_FOLDER: "Schemas",
11
- COMMON_REPO: "VoltUiGulpV1",
12
- COMMON_REPO_GIT: "https://github.com/keshavsoft/VoltUiGulpV1"
13
- };
14
-
15
- CONFIG.COMMON_REPO_PATH = path.join("..", CONFIG.COMMON_REPO);
16
- /* ========================================== */
17
-
18
- /* ---------- GENERIC ---------- */
19
- const Utils = {
20
- run(cmd, cwd = process.cwd()) {
21
- console.log(`> ${cmd}`);
22
- execSync(cmd, { stdio: "inherit", cwd });
23
- },
24
-
25
- ensureDir(dir) {
26
- fs.mkdirSync(dir, { recursive: true });
27
- },
28
-
29
- copyRecursive(src, dest) {
30
- fs.readdirSync(src, { withFileTypes: true }).forEach(entry => {
31
- const srcPath = path.join(src, entry.name);
32
- const destPath = path.join(dest, entry.name);
33
-
34
- if (entry.isDirectory()) {
35
- this.ensureDir(destPath);
36
- this.copyRecursive(srcPath, destPath);
37
- } else {
38
- fs.copyFileSync(srcPath, destPath);
39
- }
40
- });
41
- }
42
- };
43
-
44
- /* ---------- VERSION (Release Manager) ---------- */
45
- const Version = {
46
- getNext() {
47
- let max = 0;
48
-
49
- if (fs.existsSync(CONFIG.PUBLIC_DIR)) {
50
- fs.readdirSync(CONFIG.PUBLIC_DIR, { withFileTypes: true })
51
- .filter(d => d.isDirectory() && d.name.startsWith(CONFIG.VERSION_PREFIX))
52
- .forEach(d => {
53
- const n = parseInt(d.name.replace(CONFIG.VERSION_PREFIX, ""), 10);
54
- if (!isNaN(n) && n > max) max = n;
55
- });
56
- }
57
-
58
- return `${CONFIG.VERSION_PREFIX}${max + 1}`;
59
- },
60
-
61
- createFolder(version) {
62
- const versionPath = path.join(CONFIG.PUBLIC_DIR, version);
63
- Utils.ensureDir(versionPath);
64
- return versionPath;
65
- }
66
- };
67
-
68
- /* ---------- REPO (Installer) ---------- */
69
- const Repo = {
70
- ensureCloned() {
71
- if (!fs.existsSync(CONFIG.COMMON_REPO_PATH)) {
72
- console.log(`${CONFIG.COMMON_REPO} not found. Cloning...`);
73
- Utils.run(`git clone ${CONFIG.COMMON_REPO_GIT} ${CONFIG.COMMON_REPO_PATH}`);
74
- }
75
- },
76
-
77
- ensureDependencies() {
78
- if (!fs.existsSync(path.join(CONFIG.COMMON_REPO_PATH, "node_modules"))) {
79
- console.log("Installing dependencies...");
80
- Utils.run("npm install", CONFIG.COMMON_REPO_PATH);
81
- }
82
- },
83
-
84
- copyEnv() {
85
- if (fs.existsSync(".env")) {
86
- fs.copyFileSync(".env", path.join(CONFIG.COMMON_REPO_PATH, ".env"));
87
- }
88
- },
89
-
90
- prepare() {
91
- this.ensureCloned();
92
- this.ensureDependencies();
93
- this.copyEnv();
94
- }
95
- };
96
-
97
- /* ---------- SCHEMA (Data Supplier) ---------- */
98
- const Schema = {
99
- readAll() {
100
- const uiJson = fs.readFileSync(CONFIG.SCHEMA_FILE);
101
- const parsed = JSON.parse(uiJson);
102
- return parsed.Tables || [];
103
- },
104
-
105
- inject(schemaFile) {
106
- fs.copyFileSync(
107
- path.join(CONFIG.SCHEMA_FOLDER, `${schemaFile}.json`),
108
- path.join(CONFIG.COMMON_REPO_PATH, "schema.json")
109
- );
110
- }
111
- };
112
-
113
- /* ---------- BUILD (Compiler) ---------- */
114
- const Build = {
115
- run() {
116
- Utils.run("npm run NonSec", CONFIG.COMMON_REPO_PATH);
117
- }
118
- };
119
-
120
- /* ---------- PUBLISH (Deployer) ---------- */
121
- const Publish = {
122
- schema(versionPath, schemaFile) {
123
- const schemaName = path.parse(schemaFile).name;
124
- const targetDir = path.join(versionPath, schemaName);
125
- const unProtectedDir = path.join(targetDir, "UnProtected");
126
-
127
- Utils.ensureDir(unProtectedDir);
128
-
129
- Utils.copyRecursive(
130
- path.join(CONFIG.COMMON_REPO_PATH, "dist"),
131
- unProtectedDir
132
- );
133
-
134
- fs.copyFileSync(
135
- path.join(CONFIG.COMMON_REPO_PATH, "Menu", "index.html"),
136
- path.join(targetDir, "index.html")
137
- );
138
- }
139
- };
140
-
141
- /* ---------- ORCHESTRATOR (Boss) ---------- */
142
- const App = {
143
- processSchema(versionPath, schemaFile) {
144
- console.log(`\nProcessing ${schemaFile}`);
145
- Schema.inject(schemaFile);
146
- Build.run();
147
- Publish.schema(versionPath, schemaFile);
148
- console.log(`Done with ${schemaFile}`);
149
- },
150
-
151
- run() {
152
- const version = Version.getNext();
153
- console.log("Next Version:", version);
154
-
155
- const versionPath = Version.createFolder(version);
156
-
157
- Repo.prepare();
158
-
159
- const schemas = Schema.readAll();
160
- schemas.forEach(schema => this.processSchema(versionPath, schema));
161
-
162
- console.log("\n✔ All schemas processed successfully");
163
- }
164
- };
165
-
166
- App.run();