jcc-express-mvc 1.3.11 → 1.3.13

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 (42) hide show
  1. package/Dependency.d.ts +2 -0
  2. package/Dependency.d.ts.map +1 -0
  3. package/Dependency.js +17 -0
  4. package/cli.d.ts +1 -1
  5. package/cli.d.ts.map +1 -1
  6. package/cli.js +1 -1
  7. package/lib/App.d.ts +2 -1
  8. package/lib/App.d.ts.map +1 -1
  9. package/lib/App.js +1 -1
  10. package/lib/Command-Line/NodeArtisanCommand.d.ts +4 -1
  11. package/lib/Command-Line/NodeArtisanCommand.d.ts.map +1 -1
  12. package/lib/Command-Line/NodeArtisanCommand.js +4 -4
  13. package/lib/Command-Line/NodeTinker/ConsoleInput.d.ts +1 -1
  14. package/lib/Command-Line/NodeTinker/ConsoleInput.d.ts.map +1 -1
  15. package/lib/Command-Line/NodeTinker/ConsoleInput.js +23 -28
  16. package/lib/Command-Line/NodeTinker/Tinker.d.ts +1 -1
  17. package/lib/Command-Line/NodeTinker/Tinker.d.ts.map +1 -1
  18. package/lib/Command-Line/NodeTinker/TinkerCommand.d.ts +2 -1
  19. package/lib/Command-Line/NodeTinker/TinkerCommand.d.ts.map +1 -1
  20. package/lib/Command-Line/NodeTinker/TinkerCommand.js +25 -0
  21. package/lib/Command-Line/files/Migration.d.ts.map +1 -1
  22. package/lib/Command-Line/files/Migration.js +6 -5
  23. package/lib/Dependancy/index.d.ts +5 -0
  24. package/lib/Dependancy/index.d.ts.map +1 -0
  25. package/lib/Dependancy/index.js +26 -0
  26. package/lib/Error/AppErrorHandler.d.ts.map +1 -1
  27. package/lib/Error/AppErrorHandler.js +6 -15
  28. package/lib/Error/DisplayErrorCode.d.ts.map +1 -1
  29. package/lib/Error/DisplayErrorCode.js +4 -2
  30. package/lib/Error/public/error.html +20 -47
  31. package/lib/Routes/RouteBuilder.d.ts +1 -0
  32. package/lib/Routes/RouteBuilder.d.ts.map +1 -1
  33. package/lib/Routes/RouteBuilder.js +8 -42
  34. package/lib/Services/ServiceContainer.d.ts +2 -0
  35. package/lib/Services/ServiceContainer.d.ts.map +1 -1
  36. package/lib/Services/ServiceContainer.js +13 -0
  37. package/lib/Type/index.d.ts +1 -0
  38. package/lib/Type/index.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/lib/Command-Line/ConsoleKernel.d.ts +0 -7
  41. package/lib/Command-Line/ConsoleKernel.d.ts.map +0 -1
  42. package/lib/Command-Line/ConsoleKernel.js +0 -14
@@ -0,0 +1,2 @@
1
+ export * from "./lib/Dependancy";
2
+ //# sourceMappingURL=Dependency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dependency.d.ts","sourceRoot":"","sources":["../framework/Dependency.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
package/Dependency.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/Dependancy"), exports);
package/cli.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from "./lib/Command-Line/NodeArtisanCommand";
2
- export * from "./lib/Command-Line/NodeTinker/ConsoleInput";
2
+ export * from "./lib/Command-Line/NodeTinker/TinkerCommand";
3
3
  //# sourceMappingURL=cli.d.ts.map
package/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../framework/cli.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../framework/cli.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC"}
package/cli.js CHANGED
@@ -15,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./lib/Command-Line/NodeArtisanCommand"), exports);
18
- __exportStar(require("./lib/Command-Line/NodeTinker/ConsoleInput"), exports);
18
+ __exportStar(require("./lib/Command-Line/NodeTinker/TinkerCommand"), exports);
package/lib/App.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Router } from "./Routes/Router";
2
2
  import { HttpSever } from "./Server";
3
+ import { ServiceContainer } from "./Services/ServiceContainer";
3
4
  declare class App extends HttpSever {
4
- private container;
5
+ container: ServiceContainer;
5
6
  constructor();
6
7
  private initiateProviders;
7
8
  webRoutes(): Router<any>;
package/lib/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../framework/lib/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAKrC,cAAM,GAAI,SAAQ,SAAS;IAGzB,OAAO,CAAC,SAAS,CAA0B;;IAS3C,OAAO,CAAC,iBAAiB;IAQlB,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC;IAQ/B;;;OAGG;IACI,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC;IAQ/B;;;OAGG;IACI,UAAU,IAAI,GAAG;CAYzB;AAED,eAAO,MAAM,GAAG,KAAY,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../framework/lib/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,cAAM,GAAI,SAAQ,SAAS;IAGlB,SAAS,mBAA0B;;IAS1C,OAAO,CAAC,iBAAiB;IAQlB,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC;IAQ/B;;;OAGG;IACI,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC;IAQ/B;;;OAGG;IACI,UAAU,IAAI,GAAG;CAYzB;AAED,eAAO,MAAM,GAAG,KAAY,CAAC"}
package/lib/App.js CHANGED
@@ -20,8 +20,8 @@ class App extends Server_1.HttpSever {
20
20
  initiateProviders(providers) {
21
21
  providers.forEach((Provider) => {
22
22
  const provider = new Provider(this.container);
23
- provider.register();
24
23
  provider.boot();
24
+ provider.register();
25
25
  });
26
26
  }
27
27
  webRoutes() {
@@ -1,2 +1,5 @@
1
- export declare const getArgv: (consoleArgs: Array<any>) => Promise<void>;
1
+ export declare class ConsoleKernel {
2
+ parse(consoleArgs: Array<any>): Promise<void>;
3
+ getAction(actionType: string, type: string | undefined, argvs: Array<any>): Promise<void>;
4
+ }
2
5
  //# sourceMappingURL=NodeArtisanCommand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NodeArtisanCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/NodeArtisanCommand.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,OAAO,gBA/BO,KAAK,CAAC,GAAG,CAAC,kBA+BqC,CAAC"}
1
+ {"version":3,"file":"NodeArtisanCommand.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/NodeArtisanCommand.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IAElB,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC;IAS7B,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;CAmBzE"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getArgv = void 0;
3
+ exports.ConsoleKernel = void 0;
4
4
  const DBCommand_1 = require("./DBCommand");
5
5
  const MakeCommand_1 = require("./MakeCommand");
6
6
  const MigrateCommand_1 = require("./MigrateCommand");
@@ -22,8 +22,7 @@ class ConsoleKernel {
22
22
  await (0, DBCommand_1.DBCommand)(argvs);
23
23
  return;
24
24
  case "make":
25
- const data = await (0, MakeCommand_1.makeCommand)(argvs);
26
- console.log(data);
25
+ await (0, MakeCommand_1.makeCommand)(argvs);
27
26
  return;
28
27
  default:
29
28
  console.log("Sorry command not found");
@@ -31,4 +30,5 @@ class ConsoleKernel {
31
30
  }
32
31
  }
33
32
  }
34
- exports.getArgv = new ConsoleKernel().parse.bind(new ConsoleKernel());
33
+ exports.ConsoleKernel = ConsoleKernel;
34
+ // export const getArgv = new ConsoleKernel().parse.bind(new ConsoleKernel());
@@ -1,2 +1,2 @@
1
- export declare const consoleInput: () => void;
1
+ export {};
2
2
  //# sourceMappingURL=ConsoleInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConsoleInput.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/ConsoleInput.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,YAsBxB,CAAC"}
1
+ {"version":3,"file":"ConsoleInput.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/ConsoleInput.ts"],"names":[],"mappings":""}
@@ -1,30 +1,25 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ // import { TinkerCommand } from "./TinkerCommand";
3
+ // import readline from "readline";
5
4
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.consoleInput = void 0;
7
- const TinkerCommand_1 = require("./TinkerCommand");
8
- const readline_1 = __importDefault(require("readline"));
9
- const consoleInput = () => {
10
- const rl = readline_1.default.createInterface({
11
- input: process.stdin,
12
- output: process.stdout,
13
- prompt: "> ",
14
- });
15
- rl.prompt();
16
- rl.on("line", (inputLine) => {
17
- const [command, ...args] = inputLine.trim().split(" ");
18
- const tc = new TinkerCommand_1.TinkerCommand();
19
- tc.extractCommand(command)
20
- .then((res) => console.log(res))
21
- .catch((err) => console.log(err));
22
- return rl.prompt();
23
- });
24
- rl.on("close", () => {
25
- console.log("Goodbye, Have a nice day.");
26
- process.exit(0);
27
- });
28
- return;
29
- };
30
- exports.consoleInput = consoleInput;
5
+ // export const consoleInput = () => {
6
+ // const rl = readline.createInterface({
7
+ // input: process.stdin,
8
+ // output: process.stdout,
9
+ // prompt: "> ",
10
+ // });
11
+ // rl.prompt();
12
+ // rl.on("line", (inputLine: string) => {
13
+ // const [command, ...args] = inputLine.trim().split(" ");
14
+ // // const tc = new TinkerCommand();
15
+ // tc.extractCommand(command)
16
+ // .then((res) => console.log(res))
17
+ // .catch((err) => console.log(err));
18
+ // return rl.prompt();
19
+ // });
20
+ // rl.on("close", () => {
21
+ // console.log("Goodbye, Have a nice day.");
22
+ // process.exit(0);
23
+ // });
24
+ // return;
25
+ // };
@@ -13,6 +13,6 @@ export declare class TinkerNode {
13
13
  * @returns {object}
14
14
  */
15
15
  private validatedInput;
16
- extractCommand(input: string): Promise<any>;
16
+ protected extractCommand(input: string): Promise<any>;
17
17
  }
18
18
  //# sourceMappingURL=Tinker.d.ts.map
@@ -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,KAAK,CAA+C;IAE5D,QAAQ;IAER;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAItB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAehB,cAAc,CAAC,KAAK,EAAE,MAAM;CAuBnC"}
1
+ {"version":3,"file":"Tinker.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/Tinker.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAA+C;IAE5D,QAAQ;IAER;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAItB;;;;OAIG;IACH,OAAO,CAAC,cAAc;cAeN,cAAc,CAAC,KAAK,EAAE,MAAM;CAuB7C"}
@@ -1,5 +1,6 @@
1
1
  import { TinkerNode } from "./Tinker";
2
2
  export declare class TinkerCommand extends TinkerNode {
3
- getCommand(command: string): Promise<any>;
3
+ private getCommand;
4
+ consoleInput(): void;
4
5
  }
5
6
  //# sourceMappingURL=TinkerCommand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TinkerCommand.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/TinkerCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,qBAAa,aAAc,SAAQ,UAAU;IAC9B,UAAU,CAAC,OAAO,EAAE,MAAM;CAYxC"}
1
+ {"version":3,"file":"TinkerCommand.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/NodeTinker/TinkerCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,qBAAa,aAAc,SAAQ,UAAU;YAC7B,UAAU;IAajB,YAAY;CAuBpB"}
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.TinkerCommand = void 0;
4
7
  const Tinker_1 = require("./Tinker");
8
+ const readline_1 = __importDefault(require("readline"));
5
9
  class TinkerCommand extends Tinker_1.TinkerNode {
6
10
  async getCommand(command) {
7
11
  switch (command) {
@@ -13,5 +17,26 @@ class TinkerCommand extends Tinker_1.TinkerNode {
13
17
  return this.extractCommand(command);
14
18
  }
15
19
  }
20
+ consoleInput() {
21
+ const rl = readline_1.default.createInterface({
22
+ input: process.stdin,
23
+ output: process.stdout,
24
+ prompt: "> ",
25
+ });
26
+ rl.prompt();
27
+ rl.on("line", (inputLine) => {
28
+ const [command, ...args] = inputLine.trim().split(" ");
29
+ // const tc = new TinkerCommand();
30
+ this.getCommand(command)
31
+ .then((res) => console.log(res))
32
+ .catch((err) => console.log(err));
33
+ return rl.prompt();
34
+ });
35
+ rl.on("close", () => {
36
+ console.log("Goodbye, Have a nice day.");
37
+ process.exit(0);
38
+ });
39
+ return;
40
+ }
16
41
  }
17
42
  exports.TinkerCommand = TinkerCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"Migration.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/files/Migration.ts"],"names":[],"mappings":"AA2BA;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,UACZ,MAAM,iBACE,MAAM,iBACN,MAAM,KACpB,MAuBF,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"Migration.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Command-Line/files/Migration.ts"],"names":[],"mappings":"AA2BA;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,UACZ,MAAM,iBACE,MAAM,iBACN,MAAM,KACpB,MA0BF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -11,8 +11,8 @@ const inflection_1 = require("inflection");
11
11
  const generateDownMigration = (action, tableName) => {
12
12
  if (action === "create") {
13
13
  return `
14
- down(){
15
- return return Schema.dropTable("${tableName}");
14
+ down(){
15
+ return Schema.dropTable("${tableName}");
16
16
  }
17
17
  `;
18
18
  }
@@ -37,14 +37,15 @@ const createMigration = (table, migrationName, optionalTable) => {
37
37
  const getActionType = migrationName.split(/\_/g)[0] || "";
38
38
  const schemaAction = getActionType.trim().toLowerCase() == "create" ? "create" : "table";
39
39
  //optionalTable if user specify --table=users
40
+ const addDefaultColumns = () => `table.id();
41
+ table.timestamps();
42
+ table.softDeletes();`;
40
43
  const tableName = schemaAction === "create" ? (0, inflection_1.pluralize)(table) : (0, inflection_1.pluralize)(optionalTable);
41
44
  return `import {Schema} from "jcc-eloquent";
42
45
  export class Migration {
43
46
  up() {
44
47
  return Schema.${schemaAction}("${tableName}", (table) => {
45
- table.id();
46
- table.timestamps();
47
- table.softDeletes();
48
+ ${schemaAction === "create" ? addDefaultColumns() : ""}
48
49
  });
49
50
  }
50
51
 
@@ -0,0 +1,5 @@
1
+ import "reflect-metadata";
2
+ export declare function Inject(serviceName?: string): ParameterDecorator;
3
+ export declare function Injectable(singleton?: boolean): ClassDecorator;
4
+ export declare const app: import("../Services/ServiceContainer").ServiceContainer;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../framework/lib/Dependancy/index.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAG1B,wBAAgB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAc/D;AAED,wBAAgB,UAAU,CAAC,SAAS,GAAE,OAAe,GAAG,cAAc,CAOrE;AAED,eAAO,MAAM,GAAG,yDAAyB,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.app = void 0;
4
+ exports.Inject = Inject;
5
+ exports.Injectable = Injectable;
6
+ const App_1 = require("../App");
7
+ require("reflect-metadata");
8
+ //
9
+ function Inject(serviceName) {
10
+ return (target, propertyKey, parameterIndex) => {
11
+ const existingInjectedParameters = Reflect.getMetadata("inject_params", target) || [];
12
+ // Add the new injection metadata (index ensures correct parameter order)
13
+ existingInjectedParameters[parameterIndex] = { serviceName };
14
+ // Define the metadata again, ensuring the parameters are in correct order
15
+ Reflect.defineMetadata("inject_params", existingInjectedParameters, target);
16
+ };
17
+ }
18
+ function Injectable(singleton = false) {
19
+ const container = App_1.app.container;
20
+ return function (target) {
21
+ singleton
22
+ ? container.singleton(target.name, () => new target())
23
+ : container.bind(target.name, () => new target());
24
+ };
25
+ }
26
+ exports.app = App_1.app.container;
@@ -1 +1 @@
1
- {"version":3,"file":"AppErrorHandler.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/AppErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC,qBAAa,eAAe;IAC1B,OAAO,CAAC,GAAG,CAAc;gBACb,GAAG,EAAE,WAAW;IAI5B;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B,kBAAkB;IAMzB,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,GAAG,EAAE,GAAG;CAoCjB"}
1
+ {"version":3,"file":"AppErrorHandler.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/AppErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC,qBAAa,eAAe;IAC1B,OAAO,CAAC,GAAG,CAAc;gBACb,GAAG,EAAE,WAAW;IAI5B;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B,kBAAkB;IAMzB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,GAAG,EAAE,GAAG;CAwBjB"}
@@ -24,8 +24,7 @@ class AppErrorHandler {
24
24
  return res.sendFile(__dirname + "/public/pageNotFound.html");
25
25
  });
26
26
  }
27
- extractErrorPath(stackArray, isDatabaseError = false) {
28
- let index = 1;
27
+ extractErrorPath(stackArray, isDatabaseError = false, index = 1) {
29
28
  if (!isDatabaseError) {
30
29
  const lastError = stackArray[stackArray.length - 1];
31
30
  const parts = lastError.split(/\s/g);
@@ -34,41 +33,33 @@ class AppErrorHandler {
34
33
  const currentError = stackArray[index];
35
34
  const parts = currentError.split(/\s/g);
36
35
  const errorPath = parts[parts.length - 1];
36
+ if (index >= 5) {
37
+ return "Internal server error";
38
+ }
37
39
  if (!this.isPath(errorPath)) {
38
- index++;
39
- return this.extractErrorPath(stackArray, true);
40
+ return this.extractErrorPath(stackArray, true, index + 1);
40
41
  }
41
42
  return errorPath;
42
43
  }
43
44
  handler(app) {
44
45
  app.use((err, req, res, next) => {
45
46
  let error = { ...err };
46
- let statusCode = 0;
47
47
  if (err.type === error_1.VALIDATION_ERROR) {
48
48
  error.message = err.message;
49
49
  // console.log("object");
50
50
  return res.status(400).redirectBack();
51
51
  }
52
52
  if (err.type === error_1.API_VALIDATION_ERROR) {
53
- return res.json({ message: err.message }).status(400);
53
+ return res.status(400).json({ errors: err.message });
54
54
  }
55
55
  if (err.error_action === "database") {
56
56
  const errArray = err.stack?.split(/\n/g) || [];
57
57
  const errorPath = this.extractErrorPath(errArray);
58
58
  return DisplayErrorCode_1.DisplayError.show(errorPath, err.message, res);
59
59
  }
60
- // if (err.error_action === "app_error") {
61
60
  const errArray = err.stack?.split(/\n/g) || [];
62
61
  const errorPath = this.extractErrorPath(errArray, true);
63
62
  return DisplayErrorCode_1.DisplayError.show(errorPath, err.message, res);
64
- // }
65
- return res
66
- .json({
67
- message: err.message,
68
- stack: err.stack,
69
- // type: err.type,
70
- })
71
- .status(statusCode || 500);
72
63
  });
73
64
  }
74
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayErrorCode.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/DisplayErrorCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBAAa,YAAa,SAAQ,gBAAgB;IAChD;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAyBrD;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;CAIlE"}
1
+ {"version":3,"file":"DisplayErrorCode.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/DisplayErrorCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBAAa,YAAa,SAAQ,gBAAgB;IAChD;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAyBrD;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;CAMlE"}
@@ -26,7 +26,7 @@ class DisplayError extends ErrorHightLight_1.ErrorHighLighter {
26
26
  let formattedContent = content
27
27
  .map((line, index) => `${index + 1}. ${line}`)
28
28
  .join("\n");
29
- return this.renderHtml(res, formattedContent, startLine, `${message.trim()} \n ${pathParts.join("/").trim()} ${startLine}:${endLine}`);
29
+ return this.renderHtml(res, formattedContent, startLine, `${message.trim()} <p> ${pathParts.join("/").trim()} ${startLine}:${endLine} </p>`);
30
30
  }
31
31
  catch (error) {
32
32
  return res.status(500).json({ message: "Internal Error" });
@@ -42,7 +42,9 @@ class DisplayError extends ErrorHightLight_1.ErrorHighLighter {
42
42
  */
43
43
  static renderHtml(res, code, line, message) {
44
44
  this.compileCodeToFile(code, line, message);
45
- return res.sendFile(path_1.default.join(__dirname, "public", "error.html"));
45
+ return res
46
+ .status(500)
47
+ .sendFile(path_1.default.join(__dirname, "public", "error.html"));
46
48
  }
47
49
  }
48
50
  exports.DisplayError = DisplayError;
@@ -14,58 +14,31 @@
14
14
  <body class="">
15
15
  <div class="code-container">
16
16
  <div class="error-message">
17
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE email = 'abdou@gmail.com' AND email = 'admin@bac.gm' ORDER BY id ASC LIMIT' at line 1
18
- /media/abdou/Partition/GAMBTECH/PROGRAMMING/TYPESCRIPT/jcc/app/Http/Controllers/UsersController.ts 26:18
17
+ Expected property name or '}' in JSON at position 1 (line 1 column 2) <p> /media/abdou/Partition/GAMBTECH/PROGRAMMING/TYPESCRIPT/jcc/app/Services/CategorySercvice.ts 16:17 </p>
19
18
  </div>
20
19
  <div class="container">
21
20
  <pre
22
- data-line="26"
21
+ data-line="16"
23
22
  class="line-numbers"
24
- ><code class="language-javascript">1. import { Request, Response, Next, bcrypt, Auth } from "@framework/index";
25
- 2. import { User } from "@/Model/User";
26
- 3. import { Calculator } from "@/Services/Calculator";
27
- 4. // import { User } from "../../Models/User";
28
- 5. export class UsersController {
29
- 6. //
30
- 7. // private calculator: any;
31
- 8. constructor(private calculator: Calculator) {}
23
+ ><code class="language-javascript">1. import { Category } from "../Models/Category";
24
+ 2. import { Injectable } from "../../framework/Providers";
25
+ 3.
26
+ 4. @Injectable()
27
+ 5. export class CategoryService {
28
+ 6. async all() {
29
+ 7. return Category.with("products").take(5).get();
30
+ 8. }
32
31
  9.
33
- 10. async index(req: Request, res: Response, next: Next) {
34
- 11. // console.log(this);
35
- 12. return res.json({
36
- 13. message: this.calculator.add(1, 4), //await User.first(),
37
- 14. });
38
- 15. }
39
- 16.
40
- 17. //
41
- 18.
42
- 19. async store(req: Request, res: Response, next: Next) {
43
- 20. await req.validate({
44
- 21. name: ["required"],
45
- 22. email: ["required", "unique:users"],
46
- 23. password: ["required", "min:6"],
47
- 24. });
48
- 25.
49
- 26. const save = await User.create({
50
- 27. name: req.body.name,
51
- 28. email: req.body.email,
52
- 29. password: await bcrypt(req.body.password),
53
- 30. });
54
- 31.
55
- 32. return save
56
- 33. ? Auth.attempt(req, res, next)
57
- 34. : res.json({ message: "Invalid credentials" });
58
- 35. }
59
- 36.
60
- 37. //
61
- 38.
62
- 39. async show(req: Request, res: Response, next: Next) {
63
- 40. return res.json({
64
- 41. message: await User.find(req.params.id),
65
- 42. });
66
- 43. }
67
- 44. }
68
- 45. </code></pre>
32
+ 10. async find(id: string | number) {
33
+ 11. return Category.find(id);
34
+ 12. }
35
+ 13.
36
+ 14. async test(a: any) {
37
+ 15. console.log(1);
38
+ 16. return JSON.parse(`{a}`);
39
+ 17. }
40
+ 18. }
41
+ 19. </code></pre>
69
42
  </div>
70
43
  </div>
71
44
  <script src="/js/app-error-prism.js"> </script>
@@ -43,6 +43,7 @@ export declare class RouteBuilder {
43
43
  */
44
44
  private createRoute;
45
45
  buildRoute<T>(httpMethod: keyof Application, url: string, callback: RequestHandler | string | Array<any>): any;
46
+ resolveController<T>(controller: new (...args: any[]) => T): T;
46
47
  private resolveHandler;
47
48
  }
48
49
  //# sourceMappingURL=RouteBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RouteBuilder.d.ts","sourceRoot":"","sources":["../../../framework/lib/Routes/RouteBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAQlC,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAM;IAE/B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA+B;gBAEtD,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,OAAO;IAUlB;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAM3C;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;OAGG;WACW,SAAS,CAAC,UAAU,GAAE,KAAK,CAAC,GAAG,CAAC,GAAG,eAAoB;IAIrE;;;OAGG;WACW,aAAa,CAAC,UAAU,EAAE,GAAG;IAI3C,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,cAAc;IAiBvE,aAAa,IAAI,OAAO;IAMxB;;;;;OAKG;IA2CH,OAAO,CAAC,WAAW;IAaZ,UAAU,CAAC,CAAC,EACjB,UAAU,EAAE,MAAM,WAAW,EAC7B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;IAahD,OAAO,CAAC,cAAc;CAwBvB"}
1
+ {"version":3,"file":"RouteBuilder.d.ts","sourceRoot":"","sources":["../../../framework/lib/Routes/RouteBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAQlC,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAM;IAE/B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA+B;gBAEtD,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,OAAO;IAUlB;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAM3C;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;OAGG;WACW,SAAS,CAAC,UAAU,GAAE,KAAK,CAAC,GAAG,CAAC,GAAG,eAAoB;IAIrE;;;OAGG;WACW,aAAa,CAAC,UAAU,EAAE,GAAG;IAI3C,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,cAAc;IAevE,aAAa,IAAI,OAAO;IAMxB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAaZ,UAAU,CAAC,CAAC,EACjB,UAAU,EAAE,MAAM,WAAW,EAC7B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC;IAazC,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;IAIrE,OAAO,CAAC,cAAc;CAyBvB"}
@@ -51,7 +51,7 @@ class RouteBuilder {
51
51
  if (Array.isArray(callback)) {
52
52
  if (callback.length == 2) {
53
53
  const [Controller, method] = callback;
54
- const instance = new Controller(this.serviceContainer?.resolve(Controller.name));
54
+ const instance = new Controller();
55
55
  return instance[method];
56
56
  }
57
57
  throw new AppError_1.AppError(`Method not define ${callback[0]}`, error_1.ROUTE_CALLBACK_ERROR);
@@ -67,46 +67,6 @@ class RouteBuilder {
67
67
  * @param {string} url - The route path.
68
68
  * @param {string} callback - The callback function or method name.
69
69
  */
70
- // public buildRoute<T>(
71
- // httpMethod: keyof Application,
72
- // url: string,
73
- // callback: RequestHandler | string,
74
- // ) {
75
- // try {
76
- // const middleware = RouteBuilder.middleware || [];
77
- // RouteBuilder.middleware = [];
78
- // if (this.hasController() && typeof callback === "string") {
79
- // const Controller = RouteBuilder.controller;
80
- // const instance = new Controller(
81
- // this.serviceContainer?.resolve(Controller.name),
82
- // );
83
- // return middleware.length > 0
84
- // ? this.app[httpMethod](
85
- // this.resolvePath(url),
86
- // middleware,
87
- // asyncHandler(instance[callback].bind(instance)),
88
- // )
89
- // : this.app[httpMethod](
90
- // this.resolvePath(url),
91
- // asyncHandler(instance[callback].bind(instance)),
92
- // );
93
- // }
94
- // if (typeof callback === "function" || Array.isArray(callback)) {
95
- // return middleware.length > 0
96
- // ? this.app[httpMethod](
97
- // this.resolvePath(url),
98
- // middleware,
99
- // asyncHandler(this.validateCallback(callback)),
100
- // )
101
- // : this.app[httpMethod](
102
- // this.resolvePath(url),
103
- // asyncHandler(this.validateCallback(callback)),
104
- // );
105
- // }
106
- // } catch (error: any) {
107
- // throw new AppError(error.message, ROUTE_BUILDER_ERROR);
108
- // }
109
- // }
110
70
  createRoute(httpMethod, url, middleware, handler) {
111
71
  return this.app[httpMethod](this.resolvePath(url), middleware, (0, util_1.asyncHandler)(handler));
112
72
  }
@@ -121,10 +81,16 @@ class RouteBuilder {
121
81
  throw new AppError_1.AppError(error.message, error_1.ROUTE_BUILDER_ERROR);
122
82
  }
123
83
  }
84
+ resolveController(controller) {
85
+ return this.serviceContainer.resolveDynamicInjection(controller);
86
+ }
124
87
  resolveHandler(callback) {
125
88
  if (this.hasController() && typeof callback === "string") {
126
89
  const Controller = RouteBuilder.controller;
127
- const instance = new Controller(this.serviceContainer?.resolve(Controller.name));
90
+ this.serviceContainer.bind(Controller.name, () => new Controller());
91
+ const instance = this.resolveController(Controller);
92
+ // console.log(instance);
93
+ //new Controller();
128
94
  // Ensure the method exists on the instance
129
95
  if (typeof instance[callback] !== "function") {
130
96
  throw new AppError_1.AppError(`Method ${callback} not found on controller`, error_1.ROUTE_CALLBACK_ERROR);
@@ -1,3 +1,4 @@
1
+ import "reflect-metadata";
1
2
  export declare class ServiceContainer {
2
3
  private bindings;
3
4
  private instances;
@@ -7,5 +8,6 @@ export declare class ServiceContainer {
7
8
  call<T>(method: string, ...args: any[]): T;
8
9
  make<T>(key: string): T | undefined;
9
10
  alias(key: string, alias: string): void;
11
+ resolveDynamicInjection<T>(target: new (...args: any[]) => T): T;
10
12
  }
11
13
  //# sourceMappingURL=ServiceContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceContainer.d.ts","sourceRoot":"","sources":["../../../framework/lib/Services/ServiceContainer.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,SAAS,CAA+B;IAGzC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI;IAK7C,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI;IAWlD,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAStC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC;IAO1C,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAInC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAM/C"}
1
+ {"version":3,"file":"ServiceContainer.d.ts","sourceRoot":"","sources":["../../../framework/lib/Services/ServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,SAAS,CAA+B;IAGzC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI;IAK7C,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI;IAWlD,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAStC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC;IAO1C,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAInC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAOvC,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;CAcxE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServiceContainer = void 0;
4
+ require("reflect-metadata");
4
5
  class ServiceContainer {
5
6
  constructor() {
6
7
  this.bindings = new Map();
@@ -45,5 +46,17 @@ class ServiceContainer {
45
46
  }
46
47
  this.bindings.set(alias, this.bindings.get(key));
47
48
  }
49
+ resolveDynamicInjection(target) {
50
+ const injectParams = Reflect.getMetadata("inject_params", target) || [];
51
+ const args = injectParams.map((param) => {
52
+ const service = this.resolve(param.serviceName);
53
+ if (!service) {
54
+ throw new Error(`Service ${param.serviceName} not found`);
55
+ }
56
+ return service;
57
+ });
58
+ // Instantiate the class with the resolved dependencies
59
+ return new target(...args);
60
+ }
48
61
  }
49
62
  exports.ServiceContainer = ServiceContainer;
@@ -22,4 +22,5 @@ export type ObjectType = {
22
22
  export type ValidationObject = {
23
23
  [key: string]: any;
24
24
  };
25
+ export type Constructor<T> = new (...args: any[]) => T;
25
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../framework/lib/Type/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../framework/lib/Type/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcc-express-mvc",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "express mvc structure",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,7 +0,0 @@
1
- import { Command } from "commander";
2
- export declare class ConsoleKernel {
3
- private commander;
4
- constructor(commander: Command);
5
- getArgv(argv: any): void;
6
- }
7
- //# sourceMappingURL=ConsoleKernel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConsoleKernel.d.ts","sourceRoot":"","sources":["../../../framework/lib/Command-Line/ConsoleKernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,qBAAa,aAAa;IACZ,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,OAAO;IAItC,OAAO,CAAC,IAAI,EAAE,GAAG;CAIlB"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConsoleKernel = void 0;
4
- class ConsoleKernel {
5
- constructor(commander) {
6
- this.commander = commander;
7
- console.log(commander);
8
- }
9
- getArgv(argv) {
10
- // this.commander.
11
- console.log(argv);
12
- }
13
- }
14
- exports.ConsoleKernel = ConsoleKernel;