express-todo 1.3.1 → 1.4.1

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 (52) hide show
  1. package/bin/cli.js +1 -1
  2. package/bin/v4/commands/simple/steps/locateSource.js +32 -0
  3. package/bin/v4/commands/simple/template/v1/package.json +22 -0
  4. package/bin/v4/commands/simple/template/v2/.env +9 -0
  5. package/bin/v4/commands/simple/template/v2/.env.local +7 -0
  6. package/bin/v4/commands/simple/template/v2/.vscode/launch.json +12 -0
  7. package/bin/v4/commands/simple/template/v2/Config/Schemas/BillsTable.json +165 -0
  8. package/bin/v4/commands/simple/template/v2/Config/Schemas/ItemsTable.json +200 -0
  9. package/bin/v4/commands/simple/template/v2/Config/Schemas/LedgerNames.json +60 -0
  10. package/bin/v4/commands/simple/template/v2/Config/Schemas/StockItems.json +50 -0
  11. package/bin/v4/commands/simple/template/v2/Config/api.json +8 -0
  12. package/bin/v4/commands/simple/template/v2/Config/schema.json +8 -0
  13. package/bin/v4/commands/simple/template/v2/Config/ui.json +8 -0
  14. package/bin/v4/commands/simple/template/v2/Public/index.html +129 -0
  15. package/bin/v4/commands/simple/template/v2/app.js +19 -0
  16. package/bin/v4/commands/simple/template/v2/config.json +4 -0
  17. package/bin/v4/commands/simple/template/v2/configLoader.js +6 -0
  18. package/bin/v4/commands/simple/template/v2/package-lock.json +834 -0
  19. package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v2}/package.json +3 -2
  20. package/bin/v4/commands/simple/template/v2/port.js +6 -0
  21. package/bin/v4/commands/simple/template/v2/routes.js +5 -0
  22. package/bin/v4/commands/simple/template/v2/server.js +13 -0
  23. package/package.json +1 -1
  24. package/bin/v2/commands/simple/steps/locateSource.js +0 -16
  25. /package/bin/{v2 → v4}/commands/exportCommands/express.js +0 -0
  26. /package/bin/{v2 → v4}/commands/simple/steps/announce.js +0 -0
  27. /package/bin/{v2 → v4}/commands/simple/steps/createProject.js +0 -0
  28. /package/bin/{v2 → v4}/commands/simple/steps/locateDestination.js +0 -0
  29. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/.env +0 -0
  30. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/.env.local +0 -0
  31. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/.vscode/launch.json +0 -0
  32. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/Schemas/BillsTable.json +0 -0
  33. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/Schemas/ItemsTable.json +0 -0
  34. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/Schemas/LedgerNames.json +0 -0
  35. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/Schemas/StockItems.json +0 -0
  36. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/api.json +0 -0
  37. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/schema.json +0 -0
  38. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Config/ui.json +0 -0
  39. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/Public/index.html +0 -0
  40. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/app.js +0 -0
  41. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/config.json +0 -0
  42. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/configLoader.js +0 -0
  43. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/package-lock.json +0 -0
  44. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/port.js +0 -0
  45. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/routes.js +0 -0
  46. /package/bin/{v2/commands/simple/template/v7 → v4/commands/simple/template/v1}/server.js +0 -0
  47. /package/bin/{v2 → v4}/commands/simple.js +0 -0
  48. /package/bin/{v2 → v4}/core/parseInput.js +0 -0
  49. /package/bin/{v2 → v4}/core/resolveCommand.js +0 -0
  50. /package/bin/{v2 → v4}/core/resolveFolderName.js +0 -0
  51. /package/bin/{v2 → v4}/core/showUsage.js +0 -0
  52. /package/bin/{v2 → v4}/start.js +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "KeshavSoft",
3
- "version": "1.1.1",
3
+ "version": "1.4.1",
4
4
  "description": "",
5
5
  "main": "app.js",
6
6
  "type": "module",
@@ -16,6 +16,7 @@
16
16
  "express": "^5.1.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@keshavsoft/kschema-api-gen": "^1.6.4"
19
+ "@keshavsoft/kschema-api-gen": "^1.6.4",
20
+ "tailwind-todo": "^1.3.1"
20
21
  }
21
22
  }
@@ -0,0 +1,6 @@
1
+ export default function normalizePort(val) {
2
+ const port = Number(val);
3
+ if (Number.isNaN(port)) return val;
4
+ if (port >= 0) return port;
5
+ return false;
6
+ };
@@ -0,0 +1,5 @@
1
+ import express from "express";
2
+
3
+ export default function setupRoutes(app) {
4
+ app.use(express.static('Public'));
5
+ };
@@ -0,0 +1,13 @@
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
+
12
+ return { port }; // 👈 add this
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-todo",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "CLI to scaffold projects using templates",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,16 +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
- const sourceVersion = "v7";
8
-
9
- export const locateSource = () => {
10
- return path.join(
11
- __dirname,
12
- "..",
13
- "template",
14
- sourceVersion
15
- );
16
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes