baraqex 1.0.71 → 1.0.73
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/dist/index.js +5 -1
- package/dist/index.js.map +3 -3
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +5 -1
- package/dist/server/index.js.map +3 -3
- package/package.json +2 -1
- package/templates/fullstack-template/package-lock.json +338 -5
- package/templates/fullstack-template/package.json +3 -2
- package/templates/fullstack-template/server.js +15 -1
- package/templates/fullstack-template/src/server.ts +5 -5
- package/templates/ssr-template/src/App.tsx +29 -20
- package/templates/fullstack-template/src/App.tsx +0 -271
- package/templates/fullstack-template/src/api/auth/login.ts +0 -75
- package/templates/fullstack-template/src/api/auth/me.ts +0 -66
- package/templates/fullstack-template/src/api/auth/register.ts +0 -59
- package/templates/fullstack-template/src/api/hello.js +0 -19
- package/templates/fullstack-template/src/api/todos/[id].ts +0 -108
- package/templates/fullstack-template/src/api/todos/index.ts +0 -79
- package/templates/fullstack-template/src/api/users.js +0 -39
- package/templates/fullstack-template/src/components/Dashboard.tsx +0 -129
- package/templates/fullstack-template/src/components/Header.tsx +0 -76
- package/templates/fullstack-template/src/contexts/ApiContext.tsx +0 -69
- package/templates/fullstack-template/src/contexts/AuthContext.tsx +0 -155
- package/templates/fullstack-template/src/pages/index.tsx +0 -200
- package/templates/fullstack-template/src/styles/App.css +0 -446
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
"version": "0.1.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"baraqex": "^1.0.
|
|
12
|
+
"baraqex": "^1.0.71",
|
|
13
13
|
"dotenv": "^16.0.0",
|
|
14
|
-
"express": "^4.21.2"
|
|
14
|
+
"express": "^4.21.2",
|
|
15
|
+
"glob": "^11.0.2"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@types/express": "^4.17.0",
|
|
@@ -457,6 +458,50 @@
|
|
|
457
458
|
"node": ">=18"
|
|
458
459
|
}
|
|
459
460
|
},
|
|
461
|
+
"node_modules/@isaacs/cliui": {
|
|
462
|
+
"version": "8.0.2",
|
|
463
|
+
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
|
464
|
+
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
|
465
|
+
"license": "ISC",
|
|
466
|
+
"dependencies": {
|
|
467
|
+
"string-width": "^5.1.2",
|
|
468
|
+
"string-width-cjs": "npm:string-width@^4.2.0",
|
|
469
|
+
"strip-ansi": "^7.0.1",
|
|
470
|
+
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
|
471
|
+
"wrap-ansi": "^8.1.0",
|
|
472
|
+
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
|
473
|
+
},
|
|
474
|
+
"engines": {
|
|
475
|
+
"node": ">=12"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"node_modules/@isaacs/cliui/node_modules/ansi-regex": {
|
|
479
|
+
"version": "6.1.0",
|
|
480
|
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
|
481
|
+
"integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
|
|
482
|
+
"license": "MIT",
|
|
483
|
+
"engines": {
|
|
484
|
+
"node": ">=12"
|
|
485
|
+
},
|
|
486
|
+
"funding": {
|
|
487
|
+
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {
|
|
491
|
+
"version": "7.1.0",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
|
493
|
+
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
|
494
|
+
"license": "MIT",
|
|
495
|
+
"dependencies": {
|
|
496
|
+
"ansi-regex": "^6.0.1"
|
|
497
|
+
},
|
|
498
|
+
"engines": {
|
|
499
|
+
"node": ">=12"
|
|
500
|
+
},
|
|
501
|
+
"funding": {
|
|
502
|
+
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
|
503
|
+
}
|
|
504
|
+
},
|
|
460
505
|
"node_modules/@mongodb-js/saslprep": {
|
|
461
506
|
"version": "1.2.2",
|
|
462
507
|
"resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.2.tgz",
|
|
@@ -698,10 +743,16 @@
|
|
|
698
743
|
"node": ">= 6.0.0"
|
|
699
744
|
}
|
|
700
745
|
},
|
|
746
|
+
"node_modules/balanced-match": {
|
|
747
|
+
"version": "1.0.2",
|
|
748
|
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
|
749
|
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
|
750
|
+
"license": "MIT"
|
|
751
|
+
},
|
|
701
752
|
"node_modules/baraqex": {
|
|
702
|
-
"version": "1.0.
|
|
703
|
-
"resolved": "https://registry.npmjs.org/baraqex/-/baraqex-1.0.
|
|
704
|
-
"integrity": "sha512
|
|
753
|
+
"version": "1.0.71",
|
|
754
|
+
"resolved": "https://registry.npmjs.org/baraqex/-/baraqex-1.0.71.tgz",
|
|
755
|
+
"integrity": "sha512-/3dHO40r03ztC05H2yrDeBBCWrXPijB7EdRooMbnJw7ej8uQ33JQNxiDRJRUp8Lsyxqu9kXfXB3Sck8aWngnKw==",
|
|
705
756
|
"license": "MIT",
|
|
706
757
|
"dependencies": {
|
|
707
758
|
"chokidar": "^4.0.3",
|
|
@@ -833,6 +884,15 @@
|
|
|
833
884
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
834
885
|
}
|
|
835
886
|
},
|
|
887
|
+
"node_modules/brace-expansion": {
|
|
888
|
+
"version": "2.0.1",
|
|
889
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
890
|
+
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
|
891
|
+
"license": "MIT",
|
|
892
|
+
"dependencies": {
|
|
893
|
+
"balanced-match": "^1.0.0"
|
|
894
|
+
}
|
|
895
|
+
},
|
|
836
896
|
"node_modules/bson": {
|
|
837
897
|
"version": "6.10.4",
|
|
838
898
|
"resolved": "https://registry.npmjs.org/bson/-/bson-6.10.4.tgz",
|
|
@@ -1103,6 +1163,20 @@
|
|
|
1103
1163
|
"node": ">= 0.10"
|
|
1104
1164
|
}
|
|
1105
1165
|
},
|
|
1166
|
+
"node_modules/cross-spawn": {
|
|
1167
|
+
"version": "7.0.6",
|
|
1168
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
|
1169
|
+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
|
1170
|
+
"license": "MIT",
|
|
1171
|
+
"dependencies": {
|
|
1172
|
+
"path-key": "^3.1.0",
|
|
1173
|
+
"shebang-command": "^2.0.0",
|
|
1174
|
+
"which": "^2.0.1"
|
|
1175
|
+
},
|
|
1176
|
+
"engines": {
|
|
1177
|
+
"node": ">= 8"
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1106
1180
|
"node_modules/debug": {
|
|
1107
1181
|
"version": "2.6.9",
|
|
1108
1182
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
|
@@ -1420,6 +1494,34 @@
|
|
|
1420
1494
|
"node": ">= 0.8"
|
|
1421
1495
|
}
|
|
1422
1496
|
},
|
|
1497
|
+
"node_modules/foreground-child": {
|
|
1498
|
+
"version": "3.3.1",
|
|
1499
|
+
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
|
|
1500
|
+
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
|
|
1501
|
+
"license": "ISC",
|
|
1502
|
+
"dependencies": {
|
|
1503
|
+
"cross-spawn": "^7.0.6",
|
|
1504
|
+
"signal-exit": "^4.0.1"
|
|
1505
|
+
},
|
|
1506
|
+
"engines": {
|
|
1507
|
+
"node": ">=14"
|
|
1508
|
+
},
|
|
1509
|
+
"funding": {
|
|
1510
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
"node_modules/foreground-child/node_modules/signal-exit": {
|
|
1514
|
+
"version": "4.1.0",
|
|
1515
|
+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
|
1516
|
+
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
|
1517
|
+
"license": "ISC",
|
|
1518
|
+
"engines": {
|
|
1519
|
+
"node": ">=14"
|
|
1520
|
+
},
|
|
1521
|
+
"funding": {
|
|
1522
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1423
1525
|
"node_modules/forwarded": {
|
|
1424
1526
|
"version": "0.2.0",
|
|
1425
1527
|
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
|
@@ -1546,6 +1648,29 @@
|
|
|
1546
1648
|
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
|
1547
1649
|
}
|
|
1548
1650
|
},
|
|
1651
|
+
"node_modules/glob": {
|
|
1652
|
+
"version": "11.0.2",
|
|
1653
|
+
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz",
|
|
1654
|
+
"integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==",
|
|
1655
|
+
"license": "ISC",
|
|
1656
|
+
"dependencies": {
|
|
1657
|
+
"foreground-child": "^3.1.0",
|
|
1658
|
+
"jackspeak": "^4.0.1",
|
|
1659
|
+
"minimatch": "^10.0.0",
|
|
1660
|
+
"minipass": "^7.1.2",
|
|
1661
|
+
"package-json-from-dist": "^1.0.0",
|
|
1662
|
+
"path-scurry": "^2.0.0"
|
|
1663
|
+
},
|
|
1664
|
+
"bin": {
|
|
1665
|
+
"glob": "dist/esm/bin.mjs"
|
|
1666
|
+
},
|
|
1667
|
+
"engines": {
|
|
1668
|
+
"node": "20 || >=22"
|
|
1669
|
+
},
|
|
1670
|
+
"funding": {
|
|
1671
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1549
1674
|
"node_modules/gopd": {
|
|
1550
1675
|
"version": "1.2.0",
|
|
1551
1676
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
|
@@ -1811,6 +1936,27 @@
|
|
|
1811
1936
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1812
1937
|
}
|
|
1813
1938
|
},
|
|
1939
|
+
"node_modules/isexe": {
|
|
1940
|
+
"version": "2.0.0",
|
|
1941
|
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
|
1942
|
+
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
|
1943
|
+
"license": "ISC"
|
|
1944
|
+
},
|
|
1945
|
+
"node_modules/jackspeak": {
|
|
1946
|
+
"version": "4.1.1",
|
|
1947
|
+
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
|
|
1948
|
+
"integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
|
|
1949
|
+
"license": "BlueOak-1.0.0",
|
|
1950
|
+
"dependencies": {
|
|
1951
|
+
"@isaacs/cliui": "^8.0.2"
|
|
1952
|
+
},
|
|
1953
|
+
"engines": {
|
|
1954
|
+
"node": "20 || >=22"
|
|
1955
|
+
},
|
|
1956
|
+
"funding": {
|
|
1957
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1814
1960
|
"node_modules/jsonwebtoken": {
|
|
1815
1961
|
"version": "9.0.2",
|
|
1816
1962
|
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
|
|
@@ -2078,6 +2224,30 @@
|
|
|
2078
2224
|
"node": ">=6"
|
|
2079
2225
|
}
|
|
2080
2226
|
},
|
|
2227
|
+
"node_modules/minimatch": {
|
|
2228
|
+
"version": "10.0.1",
|
|
2229
|
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
|
|
2230
|
+
"integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
|
|
2231
|
+
"license": "ISC",
|
|
2232
|
+
"dependencies": {
|
|
2233
|
+
"brace-expansion": "^2.0.1"
|
|
2234
|
+
},
|
|
2235
|
+
"engines": {
|
|
2236
|
+
"node": "20 || >=22"
|
|
2237
|
+
},
|
|
2238
|
+
"funding": {
|
|
2239
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
"node_modules/minipass": {
|
|
2243
|
+
"version": "7.1.2",
|
|
2244
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
|
2245
|
+
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
|
2246
|
+
"license": "ISC",
|
|
2247
|
+
"engines": {
|
|
2248
|
+
"node": ">=16 || 14 >=14.17"
|
|
2249
|
+
}
|
|
2250
|
+
},
|
|
2081
2251
|
"node_modules/mongodb": {
|
|
2082
2252
|
"version": "6.17.0",
|
|
2083
2253
|
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.17.0.tgz",
|
|
@@ -2346,6 +2516,12 @@
|
|
|
2346
2516
|
"node": ">=0.10.0"
|
|
2347
2517
|
}
|
|
2348
2518
|
},
|
|
2519
|
+
"node_modules/package-json-from-dist": {
|
|
2520
|
+
"version": "1.0.1",
|
|
2521
|
+
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
|
|
2522
|
+
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
|
2523
|
+
"license": "BlueOak-1.0.0"
|
|
2524
|
+
},
|
|
2349
2525
|
"node_modules/parseurl": {
|
|
2350
2526
|
"version": "1.3.3",
|
|
2351
2527
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
|
@@ -2355,6 +2531,40 @@
|
|
|
2355
2531
|
"node": ">= 0.8"
|
|
2356
2532
|
}
|
|
2357
2533
|
},
|
|
2534
|
+
"node_modules/path-key": {
|
|
2535
|
+
"version": "3.1.1",
|
|
2536
|
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
|
2537
|
+
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
|
2538
|
+
"license": "MIT",
|
|
2539
|
+
"engines": {
|
|
2540
|
+
"node": ">=8"
|
|
2541
|
+
}
|
|
2542
|
+
},
|
|
2543
|
+
"node_modules/path-scurry": {
|
|
2544
|
+
"version": "2.0.0",
|
|
2545
|
+
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
|
|
2546
|
+
"integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
|
|
2547
|
+
"license": "BlueOak-1.0.0",
|
|
2548
|
+
"dependencies": {
|
|
2549
|
+
"lru-cache": "^11.0.0",
|
|
2550
|
+
"minipass": "^7.1.2"
|
|
2551
|
+
},
|
|
2552
|
+
"engines": {
|
|
2553
|
+
"node": "20 || >=22"
|
|
2554
|
+
},
|
|
2555
|
+
"funding": {
|
|
2556
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2559
|
+
"node_modules/path-scurry/node_modules/lru-cache": {
|
|
2560
|
+
"version": "11.1.0",
|
|
2561
|
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
|
|
2562
|
+
"integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
|
|
2563
|
+
"license": "ISC",
|
|
2564
|
+
"engines": {
|
|
2565
|
+
"node": "20 || >=22"
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2358
2568
|
"node_modules/path-to-regexp": {
|
|
2359
2569
|
"version": "0.1.12",
|
|
2360
2570
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
|
@@ -2753,6 +2963,27 @@
|
|
|
2753
2963
|
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
|
2754
2964
|
"license": "ISC"
|
|
2755
2965
|
},
|
|
2966
|
+
"node_modules/shebang-command": {
|
|
2967
|
+
"version": "2.0.0",
|
|
2968
|
+
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
|
2969
|
+
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
|
2970
|
+
"license": "MIT",
|
|
2971
|
+
"dependencies": {
|
|
2972
|
+
"shebang-regex": "^3.0.0"
|
|
2973
|
+
},
|
|
2974
|
+
"engines": {
|
|
2975
|
+
"node": ">=8"
|
|
2976
|
+
}
|
|
2977
|
+
},
|
|
2978
|
+
"node_modules/shebang-regex": {
|
|
2979
|
+
"version": "3.0.0",
|
|
2980
|
+
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
|
2981
|
+
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
|
2982
|
+
"license": "MIT",
|
|
2983
|
+
"engines": {
|
|
2984
|
+
"node": ">=8"
|
|
2985
|
+
}
|
|
2986
|
+
},
|
|
2756
2987
|
"node_modules/side-channel": {
|
|
2757
2988
|
"version": "1.1.0",
|
|
2758
2989
|
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
|
@@ -2896,6 +3127,27 @@
|
|
|
2896
3127
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2897
3128
|
}
|
|
2898
3129
|
},
|
|
3130
|
+
"node_modules/string-width-cjs": {
|
|
3131
|
+
"name": "string-width",
|
|
3132
|
+
"version": "4.2.3",
|
|
3133
|
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
|
3134
|
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
|
3135
|
+
"license": "MIT",
|
|
3136
|
+
"dependencies": {
|
|
3137
|
+
"emoji-regex": "^8.0.0",
|
|
3138
|
+
"is-fullwidth-code-point": "^3.0.0",
|
|
3139
|
+
"strip-ansi": "^6.0.1"
|
|
3140
|
+
},
|
|
3141
|
+
"engines": {
|
|
3142
|
+
"node": ">=8"
|
|
3143
|
+
}
|
|
3144
|
+
},
|
|
3145
|
+
"node_modules/string-width-cjs/node_modules/emoji-regex": {
|
|
3146
|
+
"version": "8.0.0",
|
|
3147
|
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
|
3148
|
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
|
3149
|
+
"license": "MIT"
|
|
3150
|
+
},
|
|
2899
3151
|
"node_modules/string-width/node_modules/ansi-regex": {
|
|
2900
3152
|
"version": "6.1.0",
|
|
2901
3153
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
|
@@ -2935,6 +3187,19 @@
|
|
|
2935
3187
|
"node": ">=8"
|
|
2936
3188
|
}
|
|
2937
3189
|
},
|
|
3190
|
+
"node_modules/strip-ansi-cjs": {
|
|
3191
|
+
"name": "strip-ansi",
|
|
3192
|
+
"version": "6.0.1",
|
|
3193
|
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
3194
|
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
|
3195
|
+
"license": "MIT",
|
|
3196
|
+
"dependencies": {
|
|
3197
|
+
"ansi-regex": "^5.0.1"
|
|
3198
|
+
},
|
|
3199
|
+
"engines": {
|
|
3200
|
+
"node": ">=8"
|
|
3201
|
+
}
|
|
3202
|
+
},
|
|
2938
3203
|
"node_modules/supports-color": {
|
|
2939
3204
|
"version": "7.2.0",
|
|
2940
3205
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
@@ -3119,6 +3384,21 @@
|
|
|
3119
3384
|
"node": ">=18"
|
|
3120
3385
|
}
|
|
3121
3386
|
},
|
|
3387
|
+
"node_modules/which": {
|
|
3388
|
+
"version": "2.0.2",
|
|
3389
|
+
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
|
3390
|
+
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
|
3391
|
+
"license": "ISC",
|
|
3392
|
+
"dependencies": {
|
|
3393
|
+
"isexe": "^2.0.0"
|
|
3394
|
+
},
|
|
3395
|
+
"bin": {
|
|
3396
|
+
"node-which": "bin/node-which"
|
|
3397
|
+
},
|
|
3398
|
+
"engines": {
|
|
3399
|
+
"node": ">= 8"
|
|
3400
|
+
}
|
|
3401
|
+
},
|
|
3122
3402
|
"node_modules/widest-line": {
|
|
3123
3403
|
"version": "4.0.1",
|
|
3124
3404
|
"resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
|
|
@@ -3151,6 +3431,59 @@
|
|
|
3151
3431
|
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
|
3152
3432
|
}
|
|
3153
3433
|
},
|
|
3434
|
+
"node_modules/wrap-ansi-cjs": {
|
|
3435
|
+
"name": "wrap-ansi",
|
|
3436
|
+
"version": "7.0.0",
|
|
3437
|
+
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
|
3438
|
+
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
|
3439
|
+
"license": "MIT",
|
|
3440
|
+
"dependencies": {
|
|
3441
|
+
"ansi-styles": "^4.0.0",
|
|
3442
|
+
"string-width": "^4.1.0",
|
|
3443
|
+
"strip-ansi": "^6.0.0"
|
|
3444
|
+
},
|
|
3445
|
+
"engines": {
|
|
3446
|
+
"node": ">=10"
|
|
3447
|
+
},
|
|
3448
|
+
"funding": {
|
|
3449
|
+
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
"node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
|
|
3453
|
+
"version": "4.3.0",
|
|
3454
|
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
|
3455
|
+
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
3456
|
+
"license": "MIT",
|
|
3457
|
+
"dependencies": {
|
|
3458
|
+
"color-convert": "^2.0.1"
|
|
3459
|
+
},
|
|
3460
|
+
"engines": {
|
|
3461
|
+
"node": ">=8"
|
|
3462
|
+
},
|
|
3463
|
+
"funding": {
|
|
3464
|
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
3465
|
+
}
|
|
3466
|
+
},
|
|
3467
|
+
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
|
|
3468
|
+
"version": "8.0.0",
|
|
3469
|
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
|
3470
|
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
|
3471
|
+
"license": "MIT"
|
|
3472
|
+
},
|
|
3473
|
+
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
|
|
3474
|
+
"version": "4.2.3",
|
|
3475
|
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
|
3476
|
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
|
3477
|
+
"license": "MIT",
|
|
3478
|
+
"dependencies": {
|
|
3479
|
+
"emoji-regex": "^8.0.0",
|
|
3480
|
+
"is-fullwidth-code-point": "^3.0.0",
|
|
3481
|
+
"strip-ansi": "^6.0.1"
|
|
3482
|
+
},
|
|
3483
|
+
"engines": {
|
|
3484
|
+
"node": ">=8"
|
|
3485
|
+
}
|
|
3486
|
+
},
|
|
3154
3487
|
"node_modules/wrap-ansi/node_modules/ansi-regex": {
|
|
3155
3488
|
"version": "6.1.0",
|
|
3156
3489
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"baraqex": "^1.0.
|
|
15
|
+
"baraqex": "^1.0.71",
|
|
16
16
|
"dotenv": "^16.0.0",
|
|
17
|
-
"express": "^4.21.2"
|
|
17
|
+
"express": "^4.21.2",
|
|
18
|
+
"glob": "^11.0.2"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@types/express": "^4.17.0",
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
const isNode = typeof process !== 'undefined' && process.versions?.node;
|
|
2
|
+
const isBrowser = typeof window !== 'undefined';
|
|
2
3
|
|
|
3
4
|
// Create a fullstack server with basic configuration
|
|
5
|
+
|
|
6
|
+
if (isNode) {
|
|
7
|
+
const env = process.env.NODE_ENV || 'development';
|
|
8
|
+
|
|
9
|
+
if (env === 'development') {
|
|
10
|
+
process.env.NODE_ENV = 'development';
|
|
11
|
+
} else if (env === 'production') {
|
|
12
|
+
process.env.NODE_ENV = 'production';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
import { createServer } from 'baraqex';
|
|
16
|
+
|
|
17
|
+
|
|
4
18
|
const server = createServer({
|
|
5
19
|
port: process.env.PORT || 3000,
|
|
6
20
|
apiDir: './src/api',
|
|
@@ -81,7 +81,7 @@ async function startServer() {
|
|
|
81
81
|
|
|
82
82
|
if (app) {
|
|
83
83
|
// Health check endpoint
|
|
84
|
-
app.get('/health', (
|
|
84
|
+
app.get('/health', (_req: any, res: { json: (arg0: { status: string; timestamp: string; version: string; environment: string; }) => void; }) => {
|
|
85
85
|
res.json({
|
|
86
86
|
status: 'ok',
|
|
87
87
|
timestamp: new Date().toISOString(),
|
|
@@ -91,7 +91,7 @@ async function startServer() {
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
// API status endpoint
|
|
94
|
-
app.get('/api/status', (
|
|
94
|
+
app.get('/api/status', (_req: any, res: { json: (arg0: { api: string; database: string; authentication: string; timestamp: string; }) => void; }) => {
|
|
95
95
|
let db = null;
|
|
96
96
|
let auth = null;
|
|
97
97
|
|
|
@@ -120,7 +120,7 @@ async function startServer() {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
} catch (setupError) {
|
|
123
|
+
} catch (setupError:any) {
|
|
124
124
|
console.warn('⚠️ Could not set up additional endpoints:', setupError.message);
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -157,7 +157,7 @@ async function startServer() {
|
|
|
157
157
|
|
|
158
158
|
return server;
|
|
159
159
|
|
|
160
|
-
} catch (error) {
|
|
160
|
+
} catch (error:any) {
|
|
161
161
|
console.error('❌ Failed to start server:', error);
|
|
162
162
|
|
|
163
163
|
if (error.message.includes('Express not installed')) {
|
|
@@ -178,7 +178,7 @@ async function startServer() {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
// Database connection helper
|
|
181
|
-
async function connectDatabase(server) {
|
|
181
|
+
async function connectDatabase(server: { getDatabase: () => any; }) {
|
|
182
182
|
let db = null;
|
|
183
183
|
try {
|
|
184
184
|
if (typeof server.getDatabase === 'function') {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { useState, useEffect, useRef, useMemo } from 'baraqex';
|
|
2
2
|
|
|
3
|
+
// JSX type declarations for TypeScript
|
|
4
|
+
declare global {
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface IntrinsicElements {
|
|
7
|
+
[elemName: string]: any;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
// Custom hooks for better code organization
|
|
4
13
|
function useTimer(initialTime = 0) {
|
|
5
14
|
const [time, setTime] = useState(initialTime);
|
|
@@ -10,7 +19,7 @@ function useTimer(initialTime = 0) {
|
|
|
10
19
|
if (!isRunning) {
|
|
11
20
|
setIsRunning(true);
|
|
12
21
|
intervalRef.current = setInterval(() => {
|
|
13
|
-
setTime((prev) => prev + 1);
|
|
22
|
+
setTime((prev: number) => prev + 1);
|
|
14
23
|
}, 1000);
|
|
15
24
|
}
|
|
16
25
|
};
|
|
@@ -50,10 +59,10 @@ function useTimer(initialTime = 0) {
|
|
|
50
59
|
function useCounter(initialValue = 0, step = 1) {
|
|
51
60
|
const [count, setCount] = useState(initialValue);
|
|
52
61
|
|
|
53
|
-
const increment = () => setCount((prev) => prev + step);
|
|
54
|
-
const decrement = () => setCount((prev) => prev - step);
|
|
62
|
+
const increment = () => setCount((prev: number) => prev + step);
|
|
63
|
+
const decrement = () => setCount((prev: number) => prev - step);
|
|
55
64
|
const reset = () => setCount(initialValue);
|
|
56
|
-
const setValue = (value) => setCount(typeof value === 'function' ? value : value);
|
|
65
|
+
const setValue = (value: any) => setCount(typeof value === 'function' ? value : value);
|
|
57
66
|
|
|
58
67
|
return { count, increment, decrement, reset, setValue };
|
|
59
68
|
}
|
|
@@ -67,10 +76,10 @@ function useTodos() {
|
|
|
67
76
|
]);
|
|
68
77
|
const [filter, setFilter] = useState('all');
|
|
69
78
|
|
|
70
|
-
const addTodo = (text) => {
|
|
79
|
+
const addTodo = (text: any) => {
|
|
71
80
|
const textString = String(text || '').trim();
|
|
72
81
|
if (textString) {
|
|
73
|
-
setTodos((prev) => [...prev, {
|
|
82
|
+
setTodos((prev: any) => [...prev, {
|
|
74
83
|
id: Date.now(),
|
|
75
84
|
text: textString,
|
|
76
85
|
completed: false
|
|
@@ -78,14 +87,14 @@ function useTodos() {
|
|
|
78
87
|
}
|
|
79
88
|
};
|
|
80
89
|
|
|
81
|
-
const toggleTodo = (id) => {
|
|
82
|
-
setTodos((prev) => prev.map((todo) =>
|
|
90
|
+
const toggleTodo = (id: any) => {
|
|
91
|
+
setTodos((prev: any[]) => prev.map((todo: { id: any; completed: any; }) =>
|
|
83
92
|
todo.id === id ? { ...todo, completed: !todo.completed } : todo
|
|
84
93
|
));
|
|
85
94
|
};
|
|
86
95
|
|
|
87
|
-
const deleteTodo = (id) => {
|
|
88
|
-
setTodos((prev) => prev.filter((todo) => todo.id !== id));
|
|
96
|
+
const deleteTodo = (id: any) => {
|
|
97
|
+
setTodos((prev: any[]) => prev.filter((todo: { id: any; }) => todo.id !== id));
|
|
89
98
|
};
|
|
90
99
|
|
|
91
100
|
const filteredTodos = useMemo(() => {
|
|
@@ -124,7 +133,7 @@ function useTheme() {
|
|
|
124
133
|
const [theme, setTheme] = useState('light');
|
|
125
134
|
|
|
126
135
|
const toggleTheme = () => {
|
|
127
|
-
setTheme((prev) => prev === 'light' ? 'dark' : 'light');
|
|
136
|
+
setTheme((prev: string) => prev === 'light' ? 'dark' : 'light');
|
|
128
137
|
};
|
|
129
138
|
|
|
130
139
|
const themeColors = useMemo(() => {
|
|
@@ -149,13 +158,13 @@ function useTheme() {
|
|
|
149
158
|
}
|
|
150
159
|
|
|
151
160
|
// Todo Item Component
|
|
152
|
-
function TodoItem({ todo, onToggle, onDelete }) {
|
|
153
|
-
const handleToggle = (e) => {
|
|
161
|
+
function TodoItem({ todo, onToggle, onDelete }: { todo: { id: number; text: string; completed: boolean; }; onToggle: (id: number) => void; onDelete: (id: number) => void; }) {
|
|
162
|
+
const handleToggle = (e: { preventDefault: () => void; }) => {
|
|
154
163
|
e.preventDefault();
|
|
155
164
|
onToggle(todo.id);
|
|
156
165
|
};
|
|
157
166
|
|
|
158
|
-
const handleDelete = (e) => {
|
|
167
|
+
const handleDelete = (e: { preventDefault: () => void; }) => {
|
|
159
168
|
e.preventDefault();
|
|
160
169
|
onDelete(todo.id);
|
|
161
170
|
};
|
|
@@ -199,7 +208,7 @@ function TodoItem({ todo, onToggle, onDelete }) {
|
|
|
199
208
|
}
|
|
200
209
|
|
|
201
210
|
// Stats Component
|
|
202
|
-
function StatsCard({ title, value, color = '#3498db' }) {
|
|
211
|
+
function StatsCard({ title, value, color = '#3498db' }: { title: string; value: string | number; color?: string }) {
|
|
203
212
|
return (
|
|
204
213
|
<div style={{
|
|
205
214
|
background: 'white',
|
|
@@ -244,7 +253,7 @@ export function App() {
|
|
|
244
253
|
const inputRef = useRef(null);
|
|
245
254
|
|
|
246
255
|
// Handle todo form submission
|
|
247
|
-
const handleTodoSubmit = (e) => {
|
|
256
|
+
const handleTodoSubmit = (e: { preventDefault: () => void; stopPropagation: () => void; }) => {
|
|
248
257
|
e.preventDefault();
|
|
249
258
|
e.stopPropagation();
|
|
250
259
|
|
|
@@ -262,15 +271,15 @@ export function App() {
|
|
|
262
271
|
}
|
|
263
272
|
};
|
|
264
273
|
|
|
265
|
-
const handleNewTodoChange = (e) => {
|
|
274
|
+
const handleNewTodoChange = (e: { target: { value: any; }; }) => {
|
|
266
275
|
setNewTodo(e.target.value);
|
|
267
276
|
};
|
|
268
277
|
|
|
269
|
-
const handleStepChange = (e) => {
|
|
278
|
+
const handleStepChange = (e: { target: { value: string; }; }) => {
|
|
270
279
|
setStep(parseInt(e.target.value) || 1);
|
|
271
280
|
};
|
|
272
281
|
|
|
273
|
-
const handleSetValue = (e) => {
|
|
282
|
+
const handleSetValue = (e: { key: string; target: { value: string; }; }) => {
|
|
274
283
|
if (e.key === 'Enter') {
|
|
275
284
|
const value = parseInt(e.target.value) || 0;
|
|
276
285
|
setValue(value);
|
|
@@ -738,7 +747,7 @@ export function App() {
|
|
|
738
747
|
'🎉 No completed todos yet!'}
|
|
739
748
|
</div>
|
|
740
749
|
) : (
|
|
741
|
-
todos.map((todo) => (
|
|
750
|
+
todos.map((todo: { id: any; }) => (
|
|
742
751
|
<TodoItem
|
|
743
752
|
key={todo.id}
|
|
744
753
|
todo={todo}
|