@keshavsoft/kschema-cli 1.12.8 → 1.12.11
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/bin/cli.js +1 -1
- package/bin/v12/commands/exportCommands/tally.js +9 -0
- package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/Config/schema.json +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/Insert/rest.http +12 -12
- package/bin/v12/commands/tally/template/v3/Api/V1/BillsTable/end-points.js +4 -4
- package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/Config/schema.json +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/Insert/rest.http +13 -13
- package/bin/v12/commands/tally/template/v3/Api/V1/ItemsTable/end-points.js +4 -4
- package/bin/v12/commands/tally/template/v3/Api/V1/LedgerNames/Config/schema.json +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/LedgerNames/end-points.js +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/StockItems/Config/schema.json +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/StockItems/end-points.js +2 -2
- package/bin/v12/commands/tally/template/v3/Api/V1/routes.js +8 -8
- package/bin/v12/commands/tally/template/v3/Api/routes.js +2 -2
- package/bin/v12/commands/tally/template/v3/FromTally/V1/StockItems/Config/schema.json +2 -2
- package/bin/v12/commands/tally/template/v3/FromTally/V1/routes.js +2 -2
- package/bin/v12/commands/tally/template/v3/app.js +4 -4
- package/index.js +10 -2
- package/package.json +1 -1
- package/bin/v10/commands/generateSamples.js +0 -26
- package/bin/v10/commands/init.js +0 -23
- package/bin/v10/commands/steps/announce.js +0 -3
- package/bin/v10/commands/steps/createProject.js +0 -6
- package/bin/v10/commands/steps/decideTemplate.js +0 -3
- package/bin/v10/commands/steps/locateDestination.js +0 -5
- package/bin/v10/commands/steps/locateSource.js +0 -14
- package/bin/v10/commands/template/baseTemplate.js +0 -11
- package/bin/v10/commands/template/basic/.vscode/launch.json +0 -12
- package/bin/v10/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
- package/bin/v10/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
- package/bin/v10/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v10/commands/template/basic/Config/Schemas/StockItems.json +0 -45
- package/bin/v10/commands/template/basic/Config/api.json +0 -8
- package/bin/v10/commands/template/basic/Config/schema.json +0 -8
- package/bin/v10/commands/template/basic/Config/ui.json +0 -8
- package/bin/v10/commands/template/basic/Data/BillsTable.json +0 -165
- package/bin/v10/commands/template/basic/Data/ItemsTable.json +0 -200
- package/bin/v10/commands/template/basic/Data/LedgerNames.json +0 -6
- package/bin/v10/commands/template/basic/Data/StockItems.json +0 -45
- package/bin/v10/commands/template/basic/app.js +0 -4
- package/bin/v10/commands/template/basic/config.json +0 -4
- package/bin/v10/commands/template/basic/package-lock.json +0 -21
- package/bin/v10/commands/template/basic/package.json +0 -14
- package/bin/v10/commands/template/basic/read.js +0 -8
- package/bin/v10/commands/template/basic/write.js +0 -8
- package/bin/v10/commands/template/express/.env +0 -8
- package/bin/v10/commands/template/express/.env.local +0 -7
- package/bin/v10/commands/template/express/.vscode/launch.json +0 -12
- package/bin/v10/commands/template/express/Config/Schemas/BillsTable.json +0 -166
- package/bin/v10/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
- package/bin/v10/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v10/commands/template/express/Config/Schemas/StockItems.json +0 -45
- package/bin/v10/commands/template/express/Config/api.json +0 -8
- package/bin/v10/commands/template/express/Config/schema.json +0 -8
- package/bin/v10/commands/template/express/Config/ui.json +0 -8
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
- package/bin/v10/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
- package/bin/v10/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
- package/bin/v10/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
- package/bin/v10/commands/template/express/app.js +0 -33
- package/bin/v10/commands/template/express/config.json +0 -4
- package/bin/v10/commands/template/express/package.json +0 -18
- package/bin/v10/commands/test.js +0 -36
- package/bin/v10/core/parseInput.js +0 -10
- package/bin/v10/core/resolveCommand.js +0 -14
- package/bin/v10/core/resolveFolderName.js +0 -17
- package/bin/v10/core/showUsage.js +0 -42
- package/bin/v10/start.js +0 -22
- package/bin/v8/commands/generateSamples.js +0 -25
- package/bin/v8/commands/init.js +0 -23
- package/bin/v8/commands/steps/announce.js +0 -3
- package/bin/v8/commands/steps/createProject.js +0 -6
- package/bin/v8/commands/steps/decideTemplate.js +0 -3
- package/bin/v8/commands/steps/locateDestination.js +0 -5
- package/bin/v8/commands/steps/locateSource.js +0 -14
- package/bin/v8/commands/template/baseTemplate.js +0 -11
- package/bin/v8/commands/template/basic/.vscode/launch.json +0 -12
- package/bin/v8/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
- package/bin/v8/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
- package/bin/v8/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v8/commands/template/basic/Config/Schemas/StockItems.json +0 -45
- package/bin/v8/commands/template/basic/Config/api.json +0 -8
- package/bin/v8/commands/template/basic/Config/schema.json +0 -8
- package/bin/v8/commands/template/basic/Config/ui.json +0 -8
- package/bin/v8/commands/template/basic/Data/BillsTable.json +0 -165
- package/bin/v8/commands/template/basic/Data/ItemsTable.json +0 -200
- package/bin/v8/commands/template/basic/Data/LedgerNames.json +0 -6
- package/bin/v8/commands/template/basic/Data/StockItems.json +0 -45
- package/bin/v8/commands/template/basic/app.js +0 -4
- package/bin/v8/commands/template/basic/config.json +0 -4
- package/bin/v8/commands/template/basic/package-lock.json +0 -21
- package/bin/v8/commands/template/basic/package.json +0 -13
- package/bin/v8/commands/template/basic/read.js +0 -8
- package/bin/v8/commands/template/basic/write.js +0 -8
- package/bin/v8/commands/template/express/.env +0 -8
- package/bin/v8/commands/template/express/.env.local +0 -7
- package/bin/v8/commands/template/express/.vscode/launch.json +0 -12
- package/bin/v8/commands/template/express/Config/Schemas/BillsTable.json +0 -166
- package/bin/v8/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
- package/bin/v8/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v8/commands/template/express/Config/Schemas/StockItems.json +0 -45
- package/bin/v8/commands/template/express/Config/api.json +0 -8
- package/bin/v8/commands/template/express/Config/schema.json +0 -8
- package/bin/v8/commands/template/express/Config/ui.json +0 -8
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
- package/bin/v8/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
- package/bin/v8/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
- package/bin/v8/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
- package/bin/v8/commands/template/express/app.js +0 -33
- package/bin/v8/commands/template/express/config.json +0 -4
- package/bin/v8/commands/template/express/package.json +0 -18
- package/bin/v8/commands/test.js +0 -36
- package/bin/v8/core/parseInput.js +0 -10
- package/bin/v8/core/resolveCommand.js +0 -12
- package/bin/v8/core/resolveFolderName.js +0 -17
- package/bin/v8/start.js +0 -23
- package/bin/v9/commands/generateSamples.js +0 -26
- package/bin/v9/commands/init.js +0 -23
- package/bin/v9/commands/steps/announce.js +0 -3
- package/bin/v9/commands/steps/createProject.js +0 -6
- package/bin/v9/commands/steps/decideTemplate.js +0 -3
- package/bin/v9/commands/steps/locateDestination.js +0 -5
- package/bin/v9/commands/steps/locateSource.js +0 -14
- package/bin/v9/commands/template/baseTemplate.js +0 -11
- package/bin/v9/commands/template/basic/.vscode/launch.json +0 -12
- package/bin/v9/commands/template/basic/Config/Schemas/BillsTable.json +0 -165
- package/bin/v9/commands/template/basic/Config/Schemas/ItemsTable.json +0 -200
- package/bin/v9/commands/template/basic/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v9/commands/template/basic/Config/Schemas/StockItems.json +0 -45
- package/bin/v9/commands/template/basic/Config/api.json +0 -8
- package/bin/v9/commands/template/basic/Config/schema.json +0 -8
- package/bin/v9/commands/template/basic/Config/ui.json +0 -8
- package/bin/v9/commands/template/basic/Data/BillsTable.json +0 -165
- package/bin/v9/commands/template/basic/Data/ItemsTable.json +0 -200
- package/bin/v9/commands/template/basic/Data/LedgerNames.json +0 -6
- package/bin/v9/commands/template/basic/Data/StockItems.json +0 -45
- package/bin/v9/commands/template/basic/app.js +0 -4
- package/bin/v9/commands/template/basic/config.json +0 -4
- package/bin/v9/commands/template/basic/package-lock.json +0 -21
- package/bin/v9/commands/template/basic/package.json +0 -13
- package/bin/v9/commands/template/basic/read.js +0 -8
- package/bin/v9/commands/template/basic/write.js +0 -8
- package/bin/v9/commands/template/express/.env +0 -8
- package/bin/v9/commands/template/express/.env.local +0 -7
- package/bin/v9/commands/template/express/.vscode/launch.json +0 -12
- package/bin/v9/commands/template/express/Config/Schemas/BillsTable.json +0 -166
- package/bin/v9/commands/template/express/Config/Schemas/ItemsTable.json +0 -206
- package/bin/v9/commands/template/express/Config/Schemas/LedgerNames.json +0 -50
- package/bin/v9/commands/template/express/Config/Schemas/StockItems.json +0 -45
- package/bin/v9/commands/template/express/Config/api.json +0 -8
- package/bin/v9/commands/template/express/Config/schema.json +0 -8
- package/bin/v9/commands/template/express/Config/ui.json +0 -8
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/build.js +0 -6
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/config.js +0 -12
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/main.js +0 -29
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/publish.js +0 -22
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/repo.js +0 -20
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/schema.js +0 -16
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/utils.js +0 -26
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/Builder/version.js +0 -25
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/buildAndCopy.js +0 -166
- package/bin/v9/commands/template/express/ForFrontEnd/NonSecured/latestVersion.js +0 -38
- package/bin/v9/commands/template/express/ForFrontEnd/Secured/buildProtected.js +0 -108
- package/bin/v9/commands/template/express/ForFrontEnd/Secured/latestVersion.js +0 -38
- package/bin/v9/commands/template/express/app.js +0 -33
- package/bin/v9/commands/template/express/config.json +0 -4
- package/bin/v9/commands/template/express/package.json +0 -18
- package/bin/v9/commands/test.js +0 -36
- package/bin/v9/core/parseInput.js +0 -10
- package/bin/v9/core/resolveCommand.js +0 -14
- package/bin/v9/core/resolveFolderName.js +0 -17
- package/bin/v9/start.js +0 -63
package/bin/cli.js
CHANGED
|
@@ -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,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
|
-
|
|
2
|
-
|
|
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,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
|
-
};
|
package/bin/v10/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
|
-
`;
|
|
@@ -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
|
-
}
|