jcc-express-mvc 1.5.2 → 1.5.3

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 (231) hide show
  1. package/Core/Auth.d.ts +4 -0
  2. package/Core/Auth.d.ts.map +1 -0
  3. package/Core/Auth.js +7 -0
  4. package/Core/Cli.d.ts +3 -0
  5. package/Core/Cli.d.ts.map +1 -0
  6. package/Core/Dependency.d.ts.map +1 -0
  7. package/Core/FormRequest.d.ts.map +1 -0
  8. package/Core/Inertia.d.ts +2 -0
  9. package/Core/Inertia.d.ts.map +1 -0
  10. package/Core/Inertia.js +17 -0
  11. package/Core/Mail.d.ts +3 -0
  12. package/Core/Mail.d.ts.map +1 -0
  13. package/{core/ServiceProvider.js → Core/Mail.js} +2 -1
  14. package/Core/Mailer.d.ts +2 -0
  15. package/Core/Mailer.d.ts.map +1 -0
  16. package/{core/Queue.js → Core/Mailer.js} +1 -1
  17. package/Core/Provider.d.ts +3 -0
  18. package/Core/Provider.d.ts.map +1 -0
  19. package/{core/cli.js → Core/Provider.js} +2 -2
  20. package/Core/Socket.d.ts +3 -0
  21. package/Core/Socket.d.ts.map +1 -0
  22. package/Core/Str.d.ts.map +1 -0
  23. package/Core/http.d.ts +2 -0
  24. package/Core/http.d.ts.map +1 -0
  25. package/Core/http.js +17 -0
  26. package/Core/index.d.ts +3 -0
  27. package/Core/index.d.ts.map +1 -0
  28. package/{inertia → Core}/index.js +2 -1
  29. package/index.d.ts +1 -17
  30. package/index.d.ts.map +1 -1
  31. package/index.js +0 -38
  32. package/lib/Application/Application.d.ts +19 -0
  33. package/lib/Application/Application.d.ts.map +1 -0
  34. package/lib/Application/Application.js +69 -0
  35. package/lib/Application/ApplicationBuilder.d.ts +16 -0
  36. package/lib/Application/ApplicationBuilder.d.ts.map +1 -0
  37. package/lib/Application/ApplicationBuilder.js +47 -0
  38. package/lib/Application/interface.d.ts +28 -0
  39. package/lib/Application/interface.d.ts.map +1 -0
  40. package/lib/Application/type.d.ts +2 -0
  41. package/lib/Application/type.d.ts.map +1 -0
  42. package/lib/Application/type.js +2 -0
  43. package/lib/Auth/AuthMiddleware.d.ts.map +1 -1
  44. package/lib/Auth/index.d.ts.map +1 -1
  45. package/lib/Auth/index.js +1 -1
  46. package/lib/Command-Line/DBCommand.d.ts.map +1 -1
  47. package/lib/Command-Line/MigrateCommand.d.ts.map +1 -1
  48. package/lib/Command-Line/NodeArtisanCommand.d.ts +0 -1
  49. package/lib/Command-Line/NodeArtisanCommand.d.ts.map +1 -1
  50. package/lib/Command-Line/NodeArtisanCommand.js +9 -11
  51. package/lib/Command-Line/NodeTinker/ConsoleInput.d.ts.map +1 -1
  52. package/lib/Command-Line/NodeTinker/ConsoleInput.js +2 -2
  53. package/lib/Command-Line/NodeTinker/Tinker.d.ts.map +1 -1
  54. package/lib/Command-Line/RouteCommand.d.ts +0 -1
  55. package/lib/Command-Line/RouteCommand.d.ts.map +1 -1
  56. package/lib/Command-Line/RouteCommand.js +11 -18
  57. package/lib/Command-Line/buildCommand.d.ts.map +1 -1
  58. package/lib/Command-Line/command.d.ts.map +1 -1
  59. package/lib/Command-Line/command.js +10 -5
  60. package/lib/Command-Line/files/Controller.d.ts.map +1 -1
  61. package/lib/Command-Line/files/Controller.js +1 -1
  62. package/lib/Command-Line/files/Migration.d.ts.map +1 -1
  63. package/lib/Command-Line/files/Models.d.ts.map +1 -1
  64. package/lib/Command-Line/files/Request.d.ts.map +1 -1
  65. package/lib/Command-Line/files/Request.js +2 -2
  66. package/lib/Command-Line/files/ResourcesController.d.ts.map +1 -1
  67. package/lib/Command-Line/files/Seeder.d.ts.map +1 -1
  68. package/lib/Command-Line/files/TsConfig.d.ts.map +1 -1
  69. package/lib/Command-Line/utils.d.ts.map +1 -1
  70. package/lib/Config/Config.d.ts.map +1 -1
  71. package/lib/Container/index.d.ts +16 -0
  72. package/lib/Container/index.d.ts.map +1 -0
  73. package/lib/Container/index.js +98 -0
  74. package/lib/Dependancy/index.d.ts +1 -2
  75. package/lib/Dependancy/index.d.ts.map +1 -1
  76. package/lib/Dependancy/index.js +9 -9
  77. package/lib/Error/AppError.d.ts.map +1 -1
  78. package/lib/Error/AppErrorHandler.d.ts.map +1 -1
  79. package/lib/Error/AppErrorHandler.js +7 -6
  80. package/lib/Error/Constants/error.d.ts.map +1 -1
  81. package/lib/Error/Constants/index.d.ts.map +1 -1
  82. package/lib/Error/DisplayErrorCode.d.ts.map +1 -1
  83. package/lib/Error/ErrorHightLight.d.ts.map +1 -1
  84. package/lib/Error/public/error.html +99 -66
  85. package/lib/Express/ExpressApplication.d.ts +7 -0
  86. package/lib/Express/ExpressApplication.d.ts.map +1 -0
  87. package/lib/Express/ExpressApplication.js +34 -0
  88. package/lib/Http/HttpHeader.d.ts +7 -0
  89. package/lib/Http/HttpHeader.d.ts.map +1 -0
  90. package/lib/Http/HttpHeader.js +10 -0
  91. package/lib/Http/index.d.ts +21 -0
  92. package/lib/Http/index.d.ts.map +1 -0
  93. package/lib/Http/index.js +71 -0
  94. package/lib/{Middlewares/inertia.d.ts → Inertia/index.d.ts} +1 -1
  95. package/lib/Inertia/index.d.ts.map +1 -0
  96. package/lib/Inertia/new.d.ts +10 -0
  97. package/lib/Inertia/new.d.ts.map +1 -0
  98. package/lib/Inertia/new.js +150 -0
  99. package/lib/Inertia/newer.d.ts +9 -0
  100. package/lib/Inertia/newer.d.ts.map +1 -0
  101. package/lib/Inertia/newer.js +168 -0
  102. package/lib/Interface/index.d.ts +17 -53
  103. package/lib/Interface/index.d.ts.map +1 -1
  104. package/lib/Mail/index.d.ts +3 -8
  105. package/lib/Mail/index.d.ts.map +1 -1
  106. package/lib/Mail/index.js +3 -2
  107. package/lib/Mail/interface/Mailer.d.ts +7 -2
  108. package/lib/Mail/interface/Mailer.d.ts.map +1 -1
  109. package/lib/Mail/interface/index.d.ts.map +1 -1
  110. package/lib/Middleware/index.d.ts +13 -0
  111. package/lib/Middleware/index.d.ts.map +1 -0
  112. package/lib/Middleware/index.js +55 -0
  113. package/lib/Passport/config.d.ts.map +1 -1
  114. package/lib/Providers/RouteServiceProvider.d.ts +10 -0
  115. package/lib/Providers/RouteServiceProvider.d.ts.map +1 -0
  116. package/lib/Providers/RouteServiceProvider.js +21 -0
  117. package/lib/Providers/ServiceProvider.d.ts +8 -0
  118. package/lib/Providers/ServiceProvider.d.ts.map +1 -0
  119. package/lib/Providers/ServiceProvider.js +11 -0
  120. package/lib/Providers/SocketServiceProvider.d.ts +13 -0
  121. package/lib/Providers/SocketServiceProvider.d.ts.map +1 -0
  122. package/lib/Providers/SocketServiceProvider.js +16 -0
  123. package/lib/Request/FormRequest.d.ts +4 -8
  124. package/lib/Request/FormRequest.d.ts.map +1 -1
  125. package/lib/Request/FormRequest.js +9 -10
  126. package/lib/Request/request.d.ts.map +1 -1
  127. package/lib/Request/request.js +0 -1
  128. package/lib/Response/index.d.ts +2 -1
  129. package/lib/Response/index.d.ts.map +1 -1
  130. package/lib/Response/index.js +10 -12
  131. package/lib/Routes/Route.d.ts +67 -54
  132. package/lib/Routes/Route.d.ts.map +1 -1
  133. package/lib/Routes/Route.js +84 -86
  134. package/lib/Routes/RouteBuilder.d.ts +31 -9
  135. package/lib/Routes/RouteBuilder.d.ts.map +1 -1
  136. package/lib/Routes/RouteBuilder.js +161 -108
  137. package/lib/Server/index.d.ts +6 -5
  138. package/lib/Server/index.d.ts.map +1 -1
  139. package/lib/Server/index.js +11 -8
  140. package/lib/Templating-engine/engineHelper.d.ts +1 -1
  141. package/lib/Templating-engine/engineHelper.d.ts.map +1 -1
  142. package/lib/Templating-engine/engineHelper.js +3 -3
  143. package/lib/Templating-engine/expressions.d.ts.map +1 -1
  144. package/lib/Templating-engine/index.d.ts.map +1 -1
  145. package/lib/Templating-engine/index.js +1 -2
  146. package/lib/Type/index.d.ts +3 -1
  147. package/lib/Type/index.d.ts.map +1 -1
  148. package/lib/Validation/index.d.ts +5 -5
  149. package/lib/Validation/index.d.ts.map +1 -1
  150. package/lib/Validation/index.js +35 -43
  151. package/lib/Validation/rules.d.ts +10 -1
  152. package/lib/Validation/rules.d.ts.map +1 -1
  153. package/lib/Validation/rules.js +118 -57
  154. package/lib/Validation/validate.d.ts +48 -35
  155. package/lib/Validation/validate.d.ts.map +1 -1
  156. package/lib/Validation/validate.js +101 -79
  157. package/lib/util/Str.d.ts.map +1 -1
  158. package/lib/util/index.d.ts +1 -1
  159. package/lib/util/index.d.ts.map +1 -1
  160. package/lib/util/index.js +11 -2
  161. package/package.json +1 -1
  162. package/Route.d.ts +0 -3
  163. package/Route.d.ts.map +0 -1
  164. package/Route.js +0 -6
  165. package/core/Container.d.ts +0 -50
  166. package/core/Container.d.ts.map +0 -1
  167. package/core/Dependency.d.ts.map +0 -1
  168. package/core/FormRequest.d.ts.map +0 -1
  169. package/core/Queue.d.ts +0 -2
  170. package/core/Queue.d.ts.map +0 -1
  171. package/core/ServiceProvider.d.ts +0 -2
  172. package/core/ServiceProvider.d.ts.map +0 -1
  173. package/core/Str.d.ts.map +0 -1
  174. package/core/cli.d.ts +0 -2
  175. package/core/cli.d.ts.map +0 -1
  176. package/core/http.d.ts +0 -2
  177. package/core/http.d.ts.map +0 -1
  178. package/inertia/index.d.ts +0 -2
  179. package/inertia/index.d.ts.map +0 -1
  180. package/lib/App.d.ts +0 -22
  181. package/lib/App.d.ts.map +0 -1
  182. package/lib/App.js +0 -67
  183. package/lib/HttpKernel/HttpKernel.d.ts +0 -7
  184. package/lib/HttpKernel/HttpKernel.d.ts.map +0 -1
  185. package/lib/HttpKernel/HttpKernel.js +0 -12
  186. package/lib/Middlewares/index.d.ts +0 -42
  187. package/lib/Middlewares/index.d.ts.map +0 -1
  188. package/lib/Middlewares/index.js +0 -103
  189. package/lib/Middlewares/inertia.d.ts.map +0 -1
  190. package/lib/Middlewares/isLogin.d.ts +0 -16
  191. package/lib/Middlewares/isLogin.d.ts.map +0 -1
  192. package/lib/Middlewares/isLogin.js +0 -29
  193. package/lib/Queue/DispatchEvent.d.ts +0 -8
  194. package/lib/Queue/DispatchEvent.d.ts.map +0 -1
  195. package/lib/Queue/DispatchEvent.js +0 -21
  196. package/lib/Queue/Job.d.ts +0 -9
  197. package/lib/Queue/Job.d.ts.map +0 -1
  198. package/lib/Queue/Job.js +0 -50
  199. package/lib/Queue/JobModel.d.ts +0 -6
  200. package/lib/Queue/JobModel.d.ts.map +0 -1
  201. package/lib/Queue/JobModel.js +0 -11
  202. package/lib/Queue/Queue.d.ts +0 -9
  203. package/lib/Queue/Queue.d.ts.map +0 -1
  204. package/lib/Queue/Queue.js +0 -104
  205. package/lib/Queue/type.d.ts +0 -11
  206. package/lib/Queue/type.d.ts.map +0 -1
  207. package/lib/Routes/Router.d.ts +0 -74
  208. package/lib/Routes/Router.d.ts.map +0 -1
  209. package/lib/Routes/Router.js +0 -117
  210. package/lib/Services/ServiceContainer.d.ts +0 -13
  211. package/lib/Services/ServiceContainer.d.ts.map +0 -1
  212. package/lib/Services/ServiceContainer.js +0 -60
  213. package/lib/Services/ServiceProvider.d.ts +0 -16
  214. package/lib/Services/ServiceProvider.d.ts.map +0 -1
  215. package/lib/Services/ServiceProvider.js +0 -31
  216. package/lib/util/GetClass.d.ts +0 -6
  217. package/lib/util/GetClass.d.ts.map +0 -1
  218. package/lib/util/GetClass.js +0 -13
  219. package/server.d.ts +0 -2
  220. package/server.d.ts.map +0 -1
  221. package/server.js +0 -5
  222. /package/{core/Container.js → Core/Cli.js} +0 -0
  223. /package/{core → Core}/Dependency.d.ts +0 -0
  224. /package/{core → Core}/Dependency.js +0 -0
  225. /package/{core → Core}/FormRequest.d.ts +0 -0
  226. /package/{core → Core}/FormRequest.js +0 -0
  227. /package/{core/http.js → Core/Socket.js} +0 -0
  228. /package/{core → Core}/Str.d.ts +0 -0
  229. /package/{core → Core}/Str.js +0 -0
  230. /package/lib/{Queue/type.js → Application/interface.js} +0 -0
  231. /package/lib/{Middlewares/inertia.js → Inertia/index.js} +0 -0
package/Core/Auth.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export declare const guest: (req: import("..").Request, res: import("..").Response, next: import("..").Next) => any;
2
+ export declare const apiAuth: (request: import("..").Request, response: import("..").Response, next: import("..").Next) => Promise<any>;
3
+ export declare const auth: (request: import("..").Request, response: import("..").Response, next: import("..").Next) => any;
4
+ //# sourceMappingURL=Auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../Framework/Core/Auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yFAAuB,CAAC;AAC1C,eAAO,MAAM,OAAO,2GAAyB,CAAC;AAC9C,eAAO,MAAM,IAAI,kGAAsB,CAAC"}
package/Core/Auth.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.auth = exports.apiAuth = exports.guest = void 0;
4
+ const AuthMiddleware_1 = require("../lib/Auth/AuthMiddleware");
5
+ exports.guest = AuthMiddleware_1.authMiddleware.guest;
6
+ exports.apiAuth = AuthMiddleware_1.authMiddleware.apiAuth;
7
+ exports.auth = AuthMiddleware_1.authMiddleware.auth;
package/Core/Cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { ConsoleKernel } from "..//lib/Interface";
2
+ export { ConsoleKernel };
3
+ //# sourceMappingURL=Cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../Framework/Core/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dependency.d.ts","sourceRoot":"","sources":["../../Framework/Core/Dependency.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormRequest.d.ts","sourceRoot":"","sources":["../../Framework/Core/FormRequest.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "../lib/Inertia/index";
2
+ //# sourceMappingURL=Inertia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Inertia.d.ts","sourceRoot":"","sources":["../../Framework/Core/Inertia.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../lib/Inertia/index"), exports);
package/Core/Mail.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from "../lib/Mail/index";
2
+ export * from "../lib/Mail/interface/Mailer";
3
+ //# sourceMappingURL=Mail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mail.d.ts","sourceRoot":"","sources":["../../Framework/Core/Mail.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC"}
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../lib/Services/ServiceProvider"), exports);
17
+ __exportStar(require("../lib/Mail/index"), exports);
18
+ __exportStar(require("../lib/Mail/interface/Mailer"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "../lib/Mail";
2
+ //# sourceMappingURL=Mailer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mailer.d.ts","sourceRoot":"","sources":["../../Framework/Core/Mailer.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../lib/Queue/Queue"), exports);
17
+ __exportStar(require("../lib/Mail"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "../lib/Providers/ServiceProvider";
2
+ export * from "../lib/Providers/SocketServiceProvider";
3
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../Framework/Core/Provider.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../lib/Command-Line/NodeArtisanCommand"), exports);
18
- // export * from "./lib/Command-Line/NodeTinker/TinkerCommand";
17
+ __exportStar(require("../lib/Providers/ServiceProvider"), exports);
18
+ __exportStar(require("../lib/Providers/SocketServiceProvider"), exports);
@@ -0,0 +1,3 @@
1
+ import { SocketType } from "../lib/Type";
2
+ export { SocketType };
3
+ //# sourceMappingURL=Socket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Socket.d.ts","sourceRoot":"","sources":["../../Framework/Core/Socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Str.d.ts","sourceRoot":"","sources":["../../Framework/Core/Str.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
package/Core/http.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "../lib/Http";
2
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../Framework/Core/http.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
package/Core/http.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../lib/Http"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "../lib/Application/Application";
2
+ export * from "../lib/Routes/Route";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Framework/Core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC"}
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../lib/Middlewares/inertia"), exports);
17
+ __exportStar(require("../lib/Application/Application"), exports);
18
+ __exportStar(require("../lib/Routes/Route"), exports);
package/index.d.ts CHANGED
@@ -1,18 +1,2 @@
1
- import { config as appConfig } from "./lib/Config/Config";
2
- import Kernel from "./lib/HttpKernel/HttpKernel";
3
- import Authentication from "./lib/Auth";
4
- import { bcrypt as appBcrypt, verifyHash as appVerifyHash, jwtSign as appJwtSign, jwtVerify as appjwtVerify, loadRoute as apploadRoute } from "./lib/util";
5
- export declare const HttpKernel: typeof Kernel;
6
- export declare const config: typeof appConfig;
7
- export declare const Auth: typeof Authentication;
8
- export declare const auth: (request: import("./lib/Interface").AppRequest, response: import("./lib/Interface").AppResponse, next: import("./lib/Interface").AppNext) => any;
9
- export declare const guest: (req: import("./lib/Interface").AppRequest, res: import("./lib/Interface").AppResponse, next: import("./lib/Interface").AppNext) => any;
10
- export declare const apiAuth: (request: import("./lib/Interface").AppRequest, response: import("./lib/Interface").AppResponse, next: import("./lib/Interface").AppNext) => Promise<any>;
11
- export declare const bcrypt: typeof appBcrypt;
12
- export declare const jwtSign: typeof appJwtSign;
13
- export declare const jwtVerify: typeof appjwtVerify;
14
- export declare const verifyHash: typeof appVerifyHash;
15
- export declare const loadRoute: typeof apploadRoute;
16
- export * from "./lib/Mail/index";
17
- export * from "./lib/Mail/interface/Mailer";
1
+ export { AppRequest as Request, AppResponse as Response, AppNext as Next, } from "./lib/Interface";
18
2
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../framework/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,cAAc,MAAM,YAAY,CAAC;AAKxC,OAAO,EACL,MAAM,IAAI,SAAS,EACnB,UAAU,IAAI,aAAa,EAC3B,OAAO,IAAI,UAAU,EACrB,SAAS,IAAI,YAAY,EACzB,SAAS,IAAI,YAAY,EAC1B,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,UAAU,eAAS,CAAC;AACjC,eAAO,MAAM,MAAM,EAAE,OAAO,SAAqB,CAAC;AAClD,eAAO,MAAM,IAAI,EAAE,OAAO,cAA+B,CAAC;AAC1D,eAAO,MAAM,IAAI,kJAAsB,CAAC;AACxC,eAAO,MAAM,KAAK,yIAAuB,CAAC;AAC1C,eAAO,MAAM,OAAO,2JAAyB,CAAC;AAC9C,eAAO,MAAM,MAAM,EAAE,OAAO,SAAqB,CAAC;AAClD,eAAO,MAAM,OAAO,EAAE,OAAO,UAAuB,CAAC;AACrD,eAAO,MAAM,SAAS,EAAE,OAAO,YAA2B,CAAC;AAC3D,eAAO,MAAM,UAAU,EAAE,OAAO,aAA6B,CAAC;AAC9D,eAAO,MAAM,SAAS,EAAE,OAAO,YAA2B,CAAC;AAC3D,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../Framework/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,OAAO,EACrB,WAAW,IAAI,QAAQ,EACvB,OAAO,IAAI,IAAI,GAChB,MAAM,iBAAiB,CAAC"}
package/index.js CHANGED
@@ -1,40 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
2
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.loadRoute = exports.verifyHash = exports.jwtVerify = exports.jwtSign = exports.bcrypt = exports.apiAuth = exports.guest = exports.auth = exports.Auth = exports.config = exports.HttpKernel = void 0;
21
- const Config_1 = require("./lib/Config/Config");
22
- const HttpKernel_1 = __importDefault(require("./lib/HttpKernel/HttpKernel"));
23
- const Auth_1 = __importDefault(require("./lib/Auth"));
24
- const AuthMiddleware_1 = require("./lib/Auth/AuthMiddleware");
25
- // import { Mail as AppMail } from "./lib/Mail";
26
- // import { Mailer as } from "./lib/Mail/interface/Mailer";
27
- const util_1 = require("./lib/util");
28
- exports.HttpKernel = HttpKernel_1.default;
29
- exports.config = Config_1.config;
30
- exports.Auth = Auth_1.default;
31
- exports.auth = AuthMiddleware_1.authMiddleware.auth;
32
- exports.guest = AuthMiddleware_1.authMiddleware.guest;
33
- exports.apiAuth = AuthMiddleware_1.authMiddleware.apiAuth;
34
- exports.bcrypt = util_1.bcrypt;
35
- exports.jwtSign = util_1.jwtSign;
36
- exports.jwtVerify = util_1.jwtVerify;
37
- exports.verifyHash = util_1.verifyHash;
38
- exports.loadRoute = util_1.loadRoute;
39
- __exportStar(require("./lib/Mail/index"), exports);
40
- __exportStar(require("./lib/Mail/interface/Mailer"), exports);
@@ -0,0 +1,19 @@
1
+ import { ServiceProvider } from "../Providers/ServiceProvider";
2
+ import { ApplicationBuilder } from "./ApplicationBuilder";
3
+ import { RouteConfig } from "../Interface";
4
+ import { ExpressApplication } from "../Express/ExpressApplication";
5
+ export declare class Application extends ExpressApplication {
6
+ private booted;
7
+ private providers;
8
+ rootPath: string;
9
+ configRoutes: RouteConfig[];
10
+ private VERSION;
11
+ constructor();
12
+ registerProviders(Provider: new (app: Application) => ServiceProvider): this;
13
+ boot(): this;
14
+ private bootProvider;
15
+ version(): string;
16
+ run(): Promise<void>;
17
+ static configuration(): ApplicationBuilder;
18
+ }
19
+ //# sourceMappingURL=Application.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Application/Application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAQnE,qBAAa,WAAY,SAAQ,kBAAkB;IACjD,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAyB;IACnC,QAAQ,EAAE,MAAM,CAAY;IAC5B,YAAY,EAAE,WAAW,EAAE,CAAM;IACxC,OAAO,CAAC,OAAO,CAAW;;IAU1B,iBAAiB,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,WAAW,KAAK,eAAe,GAAG,IAAI;IAc5E,IAAI,IAAI,IAAI;IAUZ,OAAO,CAAC,YAAY;IAIb,OAAO;IAKR,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB1B,MAAM,CAAC,aAAa;CAGrB"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Application = void 0;
7
+ const app_root_path_1 = __importDefault(require("app-root-path"));
8
+ const ApplicationBuilder_1 = require("./ApplicationBuilder");
9
+ const RouteServiceProvider_1 = require("../Providers/RouteServiceProvider");
10
+ const ExpressApplication_1 = require("../Express/ExpressApplication");
11
+ const Server_1 = require("../Server");
12
+ const RouteBuilder_1 = require("../Routes/RouteBuilder");
13
+ const dotenv_1 = __importDefault(require("dotenv"));
14
+ const Config_1 = require("../Config/Config");
15
+ const rootPath = app_root_path_1.default.path;
16
+ class Application extends ExpressApplication_1.ExpressApplication {
17
+ constructor() {
18
+ super();
19
+ this.booted = false;
20
+ this.providers = [];
21
+ this.rootPath = rootPath;
22
+ this.configRoutes = [];
23
+ this.VERSION = "0.0.0";
24
+ dotenv_1.default.config({ path: `${rootPath}/.env` });
25
+ this.instance("app", this);
26
+ this.singleton("RouteServiceProvider", RouteServiceProvider_1.RouteServiceProvider);
27
+ }
28
+ // Register a service provider
29
+ registerProviders(Provider) {
30
+ const provider = new Provider(this);
31
+ provider.register();
32
+ this.providers.push(provider);
33
+ if (this.booted) {
34
+ this.bootProvider(provider);
35
+ }
36
+ return this;
37
+ }
38
+ // Boot all registered service providers
39
+ boot() {
40
+ if (!this.booted) {
41
+ this.providers.forEach((provider) => this.bootProvider(provider));
42
+ this.booted = true;
43
+ }
44
+ return this;
45
+ }
46
+ // Boot a specific provider
47
+ bootProvider(provider) {
48
+ provider.boot();
49
+ }
50
+ version() {
51
+ return this.VERSION;
52
+ }
53
+ // Start the application
54
+ async run() {
55
+ if (!this.booted) {
56
+ this.boot();
57
+ }
58
+ const routeServiceProvider = this.resolve("RouteServiceProvider");
59
+ //
60
+ await routeServiceProvider.loadRoutes(this.configRoutes);
61
+ RouteBuilder_1.RouteBuilder.setServiceContainer(this);
62
+ const server = new Server_1.Server(this);
63
+ server.server(Number(Config_1.config.get("PORT", "5500")));
64
+ }
65
+ static configuration() {
66
+ return new ApplicationBuilder_1.ApplicationBuilder(new Application()).withConsole();
67
+ }
68
+ }
69
+ exports.Application = Application;
@@ -0,0 +1,16 @@
1
+ import { Application } from "./Application";
2
+ import { ServiceProvider } from "../Providers/ServiceProvider";
3
+ import { RouteConfig } from "../Interface";
4
+ export declare class ApplicationBuilder {
5
+ app: Application;
6
+ constructor(app: Application);
7
+ withKernels(Kernel: any): this;
8
+ withRouting(routeConfig: RouteConfig[]): this;
9
+ withProviders(providers: Array<new (app: Application) => ServiceProvider>): this;
10
+ private withEvents;
11
+ private withBroadcasting;
12
+ withConsole(): this;
13
+ withMiddleWare(): this;
14
+ create(): Application;
15
+ }
16
+ //# sourceMappingURL=ApplicationBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApplicationBuilder.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Application/ApplicationBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK3C,qBAAa,kBAAkB;IACtB,GAAG,EAAE,WAAW,CAAC;gBAEZ,GAAG,EAAE,WAAW;IAIrB,WAAW,CAAC,MAAM,EAAE,GAAG;IAKvB,WAAW,CAAC,WAAW,EAAE,WAAW,EAAE;IAOtC,aAAa,CAClB,SAAS,EAAE,KAAK,CAAC,KAAK,GAAG,EAAE,WAAW,KAAK,eAAe,CAAC;IAM7D,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,gBAAgB;IAIjB,WAAW;IAKX,cAAc;IAWd,MAAM;CAGd"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApplicationBuilder = void 0;
4
+ const Middleware_1 = require("../Middleware");
5
+ const NodeArtisanCommand_1 = require("../Command-Line/NodeArtisanCommand");
6
+ class ApplicationBuilder {
7
+ constructor(app) {
8
+ this.app = app;
9
+ }
10
+ withKernels(Kernel) {
11
+ this.app.bind("HttpKernel", Kernel);
12
+ return this;
13
+ }
14
+ withRouting(routeConfig) {
15
+ this.app.configRoutes = routeConfig.map((route) => {
16
+ return { ...route, name: `${this.app.rootPath}/${route.name}` };
17
+ });
18
+ return this;
19
+ }
20
+ withProviders(providers) {
21
+ providers.forEach((Provider) => this.app.registerProviders(Provider));
22
+ return this;
23
+ }
24
+ withEvents() {
25
+ // Setup routes here
26
+ return this;
27
+ }
28
+ withBroadcasting() {
29
+ // Setup error handling here
30
+ }
31
+ withConsole() {
32
+ this.app.bind("ConsoleKernel", NodeArtisanCommand_1.ConsoleKernel);
33
+ return this;
34
+ }
35
+ withMiddleWare() {
36
+ //
37
+ const kernel = this.app.resolve("HttpKernel");
38
+ const middleware = new Middleware_1.Middleware(this.app);
39
+ middleware.loadStaticFiles();
40
+ middleware.use(kernel.middlewares);
41
+ return this;
42
+ }
43
+ create() {
44
+ return this.app;
45
+ }
46
+ }
47
+ exports.ApplicationBuilder = ApplicationBuilder;
@@ -0,0 +1,28 @@
1
+ import { ServiceProvider } from "../Providers/ServiceProvider";
2
+ import { ClassConstructor } from "./type";
3
+ export interface AppConfig {
4
+ name: string;
5
+ env: "production" | "development" | "testing";
6
+ debug: boolean;
7
+ url: string;
8
+ port: number;
9
+ timezone: string;
10
+ locale: string;
11
+ providers: ClassConstructor<ServiceProvider>[];
12
+ }
13
+ export interface DatabaseConfig {
14
+ default: string;
15
+ connections: {
16
+ [key: string]: {
17
+ driver: string;
18
+ host: string;
19
+ port: number;
20
+ database: string;
21
+ username: string;
22
+ password: string;
23
+ charset?: string;
24
+ collation?: string;
25
+ };
26
+ };
27
+ }
28
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Application/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;IAC9C,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,gBAAgB,CAAC,eAAe,CAAC,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,EAAE,MAAM,CAAC;YACjB,QAAQ,EAAE,MAAM,CAAC;YACjB,QAAQ,EAAE,MAAM,CAAC;YACjB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export type ClassConstructor<T> = new (...args: any[]) => T;
2
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Application/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"AuthMiddleware.d.ts","sourceRoot":"","sources":["../../../framework/lib/Auth/AuthMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhE,cAAM,cAAc;IACL,OAAO,CAClB,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,GAAG,CAAC;IAqCR,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG;IAapE,KAAK,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;CAO9D;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
1
+ {"version":3,"file":"AuthMiddleware.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Auth/AuthMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhE,cAAM,cAAc;IACL,OAAO,CAClB,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,GAAG,CAAC;IAqCR,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG;IAapE,KAAK,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;CAO9D;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../framework/lib/Auth/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhE,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,WAAW;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;CACF;AAED,cAAM,cAAc;WAEL,KAAK,CAAC,IAAI,KAAK;WAcf,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;WAgCxD,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;IAkBzE,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;WAmBjD,MAAM,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;CAQtE;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Auth/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhE,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,WAAW;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;CACF;AAED,cAAM,cAAc;WAEL,KAAK,CAAC,IAAI,KAAK;WAcf,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;WAgCxD,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;IAkBzE,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;WAmBjD,MAAM,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;CAQtE;AAED,eAAe,cAAc,CAAC"}
package/lib/Auth/index.js CHANGED
@@ -66,7 +66,7 @@ class Authentication {
66
66
  static attempt(req, res, next) {
67
67
  const { RouteServiceProvider } = (0, util_1.getProvider)("RouteServiceProvider");
68
68
  try {
69
- let redirectBack = req.previsiousUrls[1];
69
+ let redirectBack = req.previsiousUrl;
70
70
  // Retrieve the previous URL
71
71
  const appRedirect = req.session["appRedirect"];
72
72
  const redirectPath = appRedirect
@@ -1 +1 @@
1
- {"version":3,"file":"DBCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/DBCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,OAAO,CAAC,WAAW,CAA0C;IAE7D,OAAO,CAAC,YAAY;IAQd,IAAI;IAqBJ,YAAY,CAAC,UAAU,EAAE,MAAM;CAUtC"}
1
+ {"version":3,"file":"DBCommand.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Command-Line/DBCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,OAAO,CAAC,WAAW,CAA0C;IAE7D,OAAO,CAAC,YAAY;IAQd,IAAI;IAqBJ,YAAY,CAAC,UAAU,EAAE,MAAM;CAUtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/MigrateCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,OAAO;IAClB,OAAO,CAAC,aAAa,CAA6C;IAE3D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIzB,KAAK;IAKL,KAAK;IAKL,YAAY;CAG1B"}
1
+ {"version":3,"file":"MigrateCommand.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Command-Line/MigrateCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,OAAO;IAClB,OAAO,CAAC,aAAa,CAA6C;IAE3D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIzB,KAAK;IAKL,KAAK;IAKL,YAAY;CAG1B"}
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  import { Command } from "commander";
3
2
  export declare class ConsoleKernel {
4
3
  private program;
@@ -1 +1 @@
1
- {"version":3,"file":"NodeArtisanCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/NodeArtisanCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,EAAE,CAAmB;IAC7B,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,KAAK,CAAsB;IAGnC,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,aAAa;IAoHrB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE;CAIrB"}
1
+ {"version":3,"file":"NodeArtisanCommand.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Command-Line/NodeArtisanCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,qBAAa,aAAa;IAExB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,EAAE,CAAmB;IAC7B,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,KAAK,CAAsB;IAGnC,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,aAAa;IAwHrB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE;CAIrB"}
@@ -1,20 +1,19 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.ConsoleKernel = void 0;
5
4
  const commander_1 = require("commander");
6
5
  const buildCommand_1 = require("./buildCommand");
7
6
  const DBCommand_1 = require("./DBCommand");
8
- // import { makeCommand } from "./MakeCommand";
9
7
  const MigrateCommand_1 = require("./MigrateCommand");
10
8
  const command_1 = require("./command");
11
9
  const util_1 = require("../util");
12
10
  const inflection_1 = require("inflection");
13
- const ConsoleInput_1 = require("./NodeTinker/ConsoleInput");
14
- const Queue_1 = require("../Queue/Queue");
11
+ // import { ConsoleInput } from "./NodeTinker/ConsoleInput";
15
12
  const RouteCommand_1 = require("./RouteCommand");
13
+ //
16
14
  class ConsoleKernel {
17
15
  constructor() {
16
+ //
18
17
  this.program = new commander_1.Command();
19
18
  this.migrate = new MigrateCommand_1.Migrate();
20
19
  this.db = new DBCommand_1.DBCommand();
@@ -28,15 +27,11 @@ class ConsoleKernel {
28
27
  .argument("[firstArg]")
29
28
  .argument("[secondArg]");
30
29
  }
31
- // Helper to handle common action logic
32
- // private handleAction(callback:(firstArg: string, secondArg: string)=>void) {
33
- // return callback(fi)
34
- // }
35
- // Method to define all available actions for commands
36
30
  defineActions() {
37
31
  // Define all commands with possible flags and options
38
32
  this.defineCommand("make:controller").action((firstArg, secondArg) => {
39
33
  this.make.createController(firstArg);
34
+ process.exit(0);
40
35
  });
41
36
  this.defineCommand("make:model").action((firstArg, secondArg, cmd) => {
42
37
  if (!secondArg) {
@@ -48,15 +43,18 @@ class ConsoleKernel {
48
43
  this.make.createController(`${(0, inflection_1.pluralize)(firstArg)}Controller`);
49
44
  this.make.createMigration(`create_${(0, util_1.pluralizeStr)(firstArg)}_table`, "");
50
45
  }
46
+ process.exit(0);
51
47
  });
52
48
  this.defineCommand("make:request").action((firstArg, secondArg, cmd) => {
53
49
  this.make.createRequest(firstArg);
54
50
  });
55
51
  this.defineCommand("make:seeder").action((firstArg, secondArg, cmd) => {
56
52
  this.make.createSeeder(firstArg);
53
+ process.exit(0);
57
54
  });
58
55
  this.defineCommand("make:migration").action((firstArg, secondArg) => {
59
56
  this.make.createMigration(firstArg, "");
57
+ process.exit(0);
60
58
  });
61
59
  this.defineCommand("migrate").action(async (firstArg, secondArg) => {
62
60
  await this.migrate.runMigration();
@@ -93,14 +91,14 @@ class ConsoleKernel {
93
91
  });
94
92
  this.defineCommand("queue:work").action(async (firstArg, secondArg) => {
95
93
  console.log("Starting the queue worker...");
96
- await Queue_1.Queue.start();
94
+ // await Queue.start();
97
95
  });
98
96
  this.defineCommand("route:list").action(async (firstArg, secondArg) => {
99
97
  this.route.display();
100
98
  });
101
99
  this.defineCommand("db-tinker").action((firstArg, secondArg) => {
102
100
  //
103
- ConsoleInput_1.ConsoleInput.startTinkerConsole();
101
+ // ConsoleInput.startTinkerConsole();
104
102
  });
105
103
  this.defineCommand("build").action((firstArg, secondArg) => {
106
104
  (0, buildCommand_1.BuildCommand)();
@@ -1 +1 @@
1
- {"version":3,"file":"ConsoleInput.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/ConsoleInput.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,qBAAa,YAAa,SAAQ,UAAU;IAC1C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAgD;IACxE,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2B;IAEhD,OAAO,CAAC,MAAM,CAAC,UAAU;IASzB,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B,OAAO,CAAC,MAAM,CAAC,QAAQ;IAKvB,OAAO,CAAC,MAAM,CAAC,gBAAgB;mBAOV,WAAW;IA0BhC,MAAM,CAAC,kBAAkB;CA0B1B"}
1
+ {"version":3,"file":"ConsoleInput.d.ts","sourceRoot":"","sources":["../../../../Framework/lib/Command-Line/NodeTinker/ConsoleInput.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,qBAAa,YAAa,SAAQ,UAAU;IAC1C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAgD;IACxE,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2B;IAEhD,OAAO,CAAC,MAAM,CAAC,UAAU;IASzB,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B,OAAO,CAAC,MAAM,CAAC,QAAQ;IAKvB,OAAO,CAAC,MAAM,CAAC,gBAAgB;mBAOV,WAAW;IA0BhC,MAAM,CAAC,kBAAkB;CA0B1B"}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ConsoleInput = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const repl_1 = require("repl");
8
+ const node_repl_1 = require("node:repl");
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const app_root_path_1 = __importDefault(require("app-root-path"));
11
11
  const colors_1 = __importDefault(require("colors"));
@@ -56,7 +56,7 @@ class ConsoleInput extends Tinker_1.TinkerNode {
56
56
  static startTinkerConsole() {
57
57
  this.logIntro();
58
58
  this.loadModels();
59
- const replServer = (0, repl_1.start)({
59
+ const replServer = (0, node_repl_1.start)({
60
60
  prompt: "> ",
61
61
  input: process.stdin,
62
62
  output: process.stdout,
@@ -1 +1 @@
1
- {"version":3,"file":"Tinker.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/Tinker.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAA+C;IAEnE,QAAQ;IAER;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;qBAkBN,cAAc,CAAC,KAAK,EAAE,MAAM;CAuBpD"}
1
+ {"version":3,"file":"Tinker.d.ts","sourceRoot":"","sources":["../../../../Framework/lib/Command-Line/NodeTinker/Tinker.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAA+C;IAEnE,QAAQ;IAER;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;qBAkBN,cAAc,CAAC,KAAK,EAAE,MAAM;CAuBpD"}
@@ -1,5 +1,4 @@
1
1
  export declare class RouteCommand {
2
- private container;
3
2
  private callRouteProvider;
4
3
  private formatRoutes;
5
4
  display(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"RouteCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/RouteCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAA0B;IAE3C,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,YAAY;IAYpB,OAAO;CAKR"}
1
+ {"version":3,"file":"RouteCommand.d.ts","sourceRoot":"","sources":["../../../Framework/lib/Command-Line/RouteCommand.ts"],"names":[],"mappings":"AAGA,qBAAa,YAAY;IAGvB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,YAAY;IAYpB,OAAO;CAGR"}