@keshavsoft/kschema-cli 1.12.3 → 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.
- package/CHANGELOG.md +5 -1
- package/bin/v12/commands/express/steps/createProject.js +1 -0
- package/bin/v12/commands/express/steps/locateSource.js +2 -1
- package/bin/{v7/commands/template/basic → v12/commands/express/template/v1}/Config/Schemas/LedgerNames.json +10 -0
- package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v1/Config/Schemas}/StockItems.json +6 -1
- package/bin/v12/commands/express/template/{package.json → v1/package.json} +1 -1
- package/bin/v12/commands/express/template/v2/Config/Schemas/LedgerNames.json +60 -0
- package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/Schemas/StockItems.json +6 -1
- package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/app.js +4 -0
- package/bin/v12/commands/express/template/v2/package-lock.json +834 -0
- package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/package.json +1 -1
- package/bin/v12/commands/express/template/v3/.env +8 -0
- package/bin/v12/commands/express/template/v3/.env.local +7 -0
- package/bin/v12/commands/express/template/v3/Api/routes.js +5 -0
- package/bin/v12/commands/express/template/v3/Config/Schemas/BillsTable.json +165 -0
- package/bin/v12/commands/express/template/v3/Config/Schemas/ItemsTable.json +200 -0
- package/bin/v12/commands/express/template/v3/Config/Schemas/LedgerNames.json +60 -0
- package/bin/v12/commands/express/template/v3/Config/Schemas/StockItems.json +50 -0
- package/bin/v12/commands/express/template/v3/app.js +12 -0
- package/bin/v12/commands/express/template/v3/configLoader.js +6 -0
- package/bin/v12/commands/express/template/v3/package-lock.json +834 -0
- package/bin/v12/commands/express/template/v3/package.json +18 -0
- package/bin/v12/commands/express/template/v3/port.js +6 -0
- package/bin/v12/commands/express/template/v3/routes.js +5 -0
- package/bin/v12/commands/express/template/v3/server.js +11 -0
- package/bin/v12/commands/express.js +2 -6
- package/package.json +1 -1
- package/bin/v12/commands/express/steps/decideTemplate.js +0 -3
- package/bin/v12/commands/express/template/Config/Schemas/BillsTable.json +0 -166
- package/bin/v12/commands/express/template/Config/Schemas/ItemsTable.json +0 -206
- package/bin/v12/commands/express/template/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v12/commands/express/template/Config/Schemas/StockItems.json +0 -45
- package/bin/v7/commands/generateSamples.js +0 -21
- package/bin/v7/commands/init.js +0 -23
- package/bin/v7/commands/steps/announce.js +0 -3
- package/bin/v7/commands/steps/createProject.js +0 -6
- package/bin/v7/commands/steps/decideTemplate.js +0 -3
- package/bin/v7/commands/steps/locateDestination.js +0 -5
- package/bin/v7/commands/steps/locateSource.js +0 -14
- package/bin/v7/commands/template/baseTemplate.js +0 -11
- package/bin/v7/commands/template/basic/Data/LedgerNames.json +0 -6
- package/bin/v7/commands/template/basic/app.js +0 -4
- package/bin/v7/commands/template/basic/package-lock.json +0 -21
- package/bin/v7/commands/template/basic/package.json +0 -13
- package/bin/v7/commands/template/basic/read.js +0 -8
- package/bin/v7/commands/template/basic/write.js +0 -8
- package/bin/v7/commands/template/express/Config/Schemas/BillsTable.json +0 -166
- package/bin/v7/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
- package/bin/v7/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v7/commands/template/express/Config/Schemas/StockItems.json +0 -45
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
- package/bin/v7/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
- package/bin/v7/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
- package/bin/v7/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
- package/bin/v7/commands/test.js +0 -36
- package/bin/v7/core/parseInput.js +0 -10
- package/bin/v7/core/resolveCommand.js +0 -12
- package/bin/v7/core/resolveFolderName.js +0 -17
- package/bin/v7/start.js +0 -23
- /package/bin/v12/commands/express/template/{.env → v1/.env} +0 -0
- /package/bin/v12/commands/express/template/{.env.local → v1/.env.local} +0 -0
- /package/bin/v12/commands/express/template/{.vscode → v1/.vscode}/launch.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v1}/Config/Schemas/BillsTable.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v1}/Config/Schemas/ItemsTable.json +0 -0
- /package/bin/v12/commands/express/template/{Config → v1/Config}/api.json +0 -0
- /package/bin/v12/commands/express/template/{Config → v1/Config}/schema.json +0 -0
- /package/bin/v12/commands/express/template/{Config → v1/Config}/ui.json +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/build.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/config.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/main.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/publish.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/repo.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/schema.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/utils.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/Builder/version.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/buildAndCopy.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/NonSecured/latestVersion.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/Secured/buildProtected.js +0 -0
- /package/bin/v12/commands/express/template/{ForFrontEnd → v1/ForFrontEnd}/Secured/latestVersion.js +0 -0
- /package/bin/v12/commands/express/template/{app.js → v1/app.js} +0 -0
- /package/bin/v12/commands/express/template/{config.json → v1/config.json} +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/.env +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v2}/.env.local +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/.vscode/launch.json +0 -0
- /package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v2/Config/Schemas}/BillsTable.json +0 -0
- /package/bin/{v7/commands/template/basic/Data → v12/commands/express/template/v2/Config/Schemas}/ItemsTable.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/api.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/schema.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/Config/ui.json +0 -0
- /package/bin/{v7/commands/template/basic → v12/commands/express/template/v2}/config.json +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/.vscode/launch.json +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/api.json +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/schema.json +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/Config/ui.json +0 -0
- /package/bin/{v7/commands/template/express → v12/commands/express/template/v3}/config.json +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "KeshavSoft",
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "app.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"start": "node --env-file=.env app.js"
|
|
10
|
+
},
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@keshavsoft/kschema": "^1.17.8",
|
|
15
|
+
"body-parser": "^2.2.0",
|
|
16
|
+
"express": "^5.1.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import http from "http";
|
|
2
|
+
import normalizePort from "./port.js";
|
|
3
|
+
|
|
4
|
+
export default function startServer(app) {
|
|
5
|
+
const port = normalizePort(process.env.PORT || 3000);
|
|
6
|
+
const server = http.createServer(app);
|
|
7
|
+
|
|
8
|
+
server.listen(port, () => {
|
|
9
|
+
console.log(`http://localhost:${port}`);
|
|
10
|
+
});
|
|
11
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { decideTemplate } from "./express/steps/decideTemplate.js";
|
|
2
|
-
|
|
3
1
|
import { locateSource } from "./express/steps/locateSource.js";
|
|
4
2
|
import { locateDestination } from "./express/steps/locateDestination.js";
|
|
5
3
|
import { createProject } from "./express/steps/createProject.js";
|
|
@@ -7,14 +5,12 @@ import { announce } from "./express/steps/announce.js";
|
|
|
7
5
|
|
|
8
6
|
import resolveFolderName from "../core/resolveFolderName.js";
|
|
9
7
|
|
|
10
|
-
export default ({
|
|
11
|
-
const finalTemplate = decideTemplate({ inTemplate: template });
|
|
12
|
-
|
|
8
|
+
export default ({ folderName =""}) => {
|
|
13
9
|
const resolvedFolderName = resolveFolderName({
|
|
14
10
|
name: folderName
|
|
15
11
|
});
|
|
16
12
|
|
|
17
|
-
const source = locateSource(
|
|
13
|
+
const source = locateSource();
|
|
18
14
|
const destination = locateDestination({ inResolvedFolderName: resolvedFolderName });
|
|
19
15
|
|
|
20
16
|
createProject({ source, destination });
|
package/package.json
CHANGED
|
@@ -1,166 +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
|
-
"data": [
|
|
75
|
-
{
|
|
76
|
-
"LedgerName": "KeshavSoft",
|
|
77
|
-
"InvoiceDate": "20260324",
|
|
78
|
-
"pk": 16
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"Vertical": [
|
|
82
|
-
{
|
|
83
|
-
"field": "LedgerName",
|
|
84
|
-
"title": "LedgerName",
|
|
85
|
-
"type": "text",
|
|
86
|
-
"isInput": false,
|
|
87
|
-
"isAutoFocus": true,
|
|
88
|
-
"WidthOptions": {
|
|
89
|
-
"inPx": 200
|
|
90
|
-
},
|
|
91
|
-
"defaultvalue": "Keshav",
|
|
92
|
-
"isDataList": true,
|
|
93
|
-
"dataListId": "LedgerNames"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"field": "LedgerParentName",
|
|
97
|
-
"title": "LedgerParentName",
|
|
98
|
-
"type": "text",
|
|
99
|
-
"isInput": true,
|
|
100
|
-
"WidthOptions": {
|
|
101
|
-
"inPx": 200
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"field": "LedgerGST",
|
|
106
|
-
"title": "LedgerGST",
|
|
107
|
-
"type": "text",
|
|
108
|
-
"isInput": true,
|
|
109
|
-
"isAutoFocus": true,
|
|
110
|
-
"WidthOptions": {
|
|
111
|
-
"inPx": 200
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"field": "InvoiceNo",
|
|
116
|
-
"title": "InvoiceNo",
|
|
117
|
-
"type": "number",
|
|
118
|
-
"isInput": true,
|
|
119
|
-
"WidthOptions": {
|
|
120
|
-
"inPx": 200
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"field": "InvoiceDate",
|
|
125
|
-
"title": "InvoiceDate",
|
|
126
|
-
"isDate": true,
|
|
127
|
-
"type": "date",
|
|
128
|
-
"WidthOptions": {
|
|
129
|
-
"inPx": 200
|
|
130
|
-
},
|
|
131
|
-
"defaultvalue": "today"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"field": "InvoiceStateCode",
|
|
135
|
-
"title": "InvoiceStateCode",
|
|
136
|
-
"defaultvalue": "37",
|
|
137
|
-
"isInput": true,
|
|
138
|
-
"WidthOptions": {
|
|
139
|
-
"inPx": 200
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
"DataTableOptions": {
|
|
144
|
-
"Header": {
|
|
145
|
-
"autoFocus": "LedgerName"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"ForeignkeyTables": [
|
|
149
|
-
"ItemsTable"
|
|
150
|
-
],
|
|
151
|
-
"DependantTables": [
|
|
152
|
-
"LedgerNames"
|
|
153
|
-
],
|
|
154
|
-
"NonSecured": {
|
|
155
|
-
"SubRoutes": [
|
|
156
|
-
"ShowAll",
|
|
157
|
-
"Insert",
|
|
158
|
-
"Find",
|
|
159
|
-
"InsertAndReturnPk",
|
|
160
|
-
"FindWithForeignData",
|
|
161
|
-
"InsertToTally"
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
"PrimarykeyTableNames": [],
|
|
165
|
-
"PrimarykeyTables": []
|
|
166
|
-
}
|
|
@@ -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,21 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
|
|
4
|
-
import { schemaMeta } from "@keshavsoft/kschema";
|
|
5
|
-
import { baseTemplate } from "./template/baseTemplate.js";
|
|
6
|
-
|
|
7
|
-
export default () => {
|
|
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(schemaMeta.query).forEach(([key, meta]) => {
|
|
15
|
-
|
|
16
|
-
const finalCode = baseTemplate({ body: meta.body });
|
|
17
|
-
|
|
18
|
-
fs.writeFileSync(path.join(OUTPUT_DIR, `${key}.js`), finalCode);
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
};
|
package/bin/v7/commands/init.js
DELETED
|
@@ -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,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
|
-
`;
|