@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/v9/start.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import parseInput from "./core/parseInput.js";
|
|
2
|
-
import resolveCommand from "./core/resolveCommand.js";
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
KSchema CLI – Entry Flow
|
|
6
|
-
|
|
7
|
-
1. Read user input from terminal (parseInput)
|
|
8
|
-
2. If no command → show usage (first-time user safety)
|
|
9
|
-
3. If help flags → show usage (quick guidance)
|
|
10
|
-
4. Resolve command dynamically (no hardcoding logic)
|
|
11
|
-
5. If command not found → inform + guide back to usage
|
|
12
|
-
6. Execute command with parsed input
|
|
13
|
-
|
|
14
|
-
Goal:
|
|
15
|
-
- Zero confusion for user
|
|
16
|
-
- Single source of truth (showUsage)
|
|
17
|
-
- Easy to extend (just add commands, no core changes)
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
const run = async () => {
|
|
21
|
-
const input = parseInput();
|
|
22
|
-
|
|
23
|
-
if (!input.cmd) return showUsage();
|
|
24
|
-
|
|
25
|
-
if (input.cmd === "--help" || input.cmd === "-h" || input.cmd === "help") return showUsage();
|
|
26
|
-
|
|
27
|
-
const command = resolveCommand(input.cmd);
|
|
28
|
-
|
|
29
|
-
if (!command) return (console.log(`Unknown command: ${input.cmd}\n`), showUsage());
|
|
30
|
-
|
|
31
|
-
await command(input);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export default run;
|
|
35
|
-
|
|
36
|
-
const showUsage = () => {
|
|
37
|
-
const g = "\x1b[32m";
|
|
38
|
-
const y = "\x1b[33m";
|
|
39
|
-
const c = "\x1b[36m";
|
|
40
|
-
const gray = "\x1b[90m";
|
|
41
|
-
const r = "\x1b[0m";
|
|
42
|
-
|
|
43
|
-
console.log(`
|
|
44
|
-
${c}🚀 KSchema CLI v1.9.3${r}
|
|
45
|
-
|
|
46
|
-
${y}Usage:${r}
|
|
47
|
-
${g}npx @keshavsoft/kschema-cli${r} <command> [options]
|
|
48
|
-
|
|
49
|
-
// inside showUsage()
|
|
50
|
-
${y}Commands:${r}
|
|
51
|
-
${g}init${r} 🛠 Initialize a new schema setup
|
|
52
|
-
${g}test${r} ✅ Run schema validations/tests
|
|
53
|
-
${g}generate-samples${r} 📦 Generate sample schema files
|
|
54
|
-
|
|
55
|
-
${y}Examples:${r}
|
|
56
|
-
${gray}npx @keshavsoft/kschema-cli init${r}
|
|
57
|
-
${gray}npx @keshavsoft/kschema-cli test users${r}
|
|
58
|
-
|
|
59
|
-
${y}Tip:${r}
|
|
60
|
-
💡 npm i -g @keshavsoft/kschema-cli
|
|
61
|
-
${g}kschema${r} <command>
|
|
62
|
-
`);
|
|
63
|
-
};
|