@mini2/core 1.4.11 → 2.0.1-beta.0

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 (78) hide show
  1. package/dist/app.d.ts +10 -4
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +30 -19
  4. package/dist/app.js.map +1 -1
  5. package/dist/container.d.ts +17 -2
  6. package/dist/container.d.ts.map +1 -1
  7. package/dist/container.js +36 -2
  8. package/dist/container.js.map +1 -1
  9. package/dist/index.d.ts +10 -8
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +13 -11
  12. package/dist/index.js.map +1 -1
  13. package/dist/interfaces/app.interface.d.ts +9 -1
  14. package/dist/interfaces/app.interface.d.ts.map +1 -1
  15. package/dist/interfaces/config.interface.d.ts +12 -0
  16. package/dist/interfaces/config.interface.d.ts.map +1 -1
  17. package/dist/jest.config.d.ts.map +1 -1
  18. package/dist/jest.config.js +1 -0
  19. package/dist/jest.config.js.map +1 -1
  20. package/dist/loader.d.ts +13 -0
  21. package/dist/loader.d.ts.map +1 -0
  22. package/dist/loader.js +76 -0
  23. package/dist/loader.js.map +1 -0
  24. package/dist/{rest.d.ts → notations/controller/index.d.ts} +10 -46
  25. package/dist/notations/controller/index.d.ts.map +1 -0
  26. package/dist/{rest.js → notations/controller/index.js} +38 -20
  27. package/dist/notations/controller/index.js.map +1 -0
  28. package/dist/notations/controller/interfaces/authenticated.interface.d.ts.map +1 -0
  29. package/dist/notations/controller/interfaces/authenticated.interface.js.map +1 -0
  30. package/dist/notations/controller/middlewares/authenticated.middleware.d.ts.map +1 -0
  31. package/dist/{middlewares → notations/controller/middlewares}/authenticated.middleware.js +8 -3
  32. package/dist/notations/controller/middlewares/authenticated.middleware.js.map +1 -0
  33. package/dist/notations/controller/middlewares/authorized.middleware.d.ts +7 -0
  34. package/dist/notations/controller/middlewares/authorized.middleware.d.ts.map +1 -0
  35. package/dist/{middlewares → notations/controller/middlewares}/authorized.middleware.js +1 -6
  36. package/dist/notations/controller/middlewares/authorized.middleware.js.map +1 -0
  37. package/dist/{middlewares → notations/controller/middlewares}/validation.middleware.d.ts +1 -1
  38. package/dist/notations/controller/middlewares/validation.middleware.d.ts.map +1 -0
  39. package/dist/notations/controller/middlewares/validation.middleware.js.map +1 -0
  40. package/dist/notations/controller/rest.types.d.ts +61 -0
  41. package/dist/notations/controller/rest.types.d.ts.map +1 -0
  42. package/dist/{interfaces/queue.interface.js → notations/controller/rest.types.js} +1 -1
  43. package/dist/notations/controller/rest.types.js.map +1 -0
  44. package/dist/notations/index.d.ts +3 -0
  45. package/dist/notations/index.d.ts.map +1 -0
  46. package/dist/notations/index.js +19 -0
  47. package/dist/notations/index.js.map +1 -0
  48. package/dist/swagger.d.ts +6 -12
  49. package/dist/swagger.d.ts.map +1 -1
  50. package/dist/swagger.js +165 -27
  51. package/dist/swagger.js.map +1 -1
  52. package/dist/utils/infer-schema.d.ts +5 -0
  53. package/dist/utils/infer-schema.d.ts.map +1 -0
  54. package/dist/utils/infer-schema.js +47 -0
  55. package/dist/utils/infer-schema.js.map +1 -0
  56. package/package.json +3 -1
  57. package/dist/interfaces/authenticated.interface.d.ts.map +0 -1
  58. package/dist/interfaces/authenticated.interface.js.map +0 -1
  59. package/dist/interfaces/queue.interface.d.ts +0 -6
  60. package/dist/interfaces/queue.interface.d.ts.map +0 -1
  61. package/dist/interfaces/queue.interface.js.map +0 -1
  62. package/dist/interfaces/repository.interface.d.ts +0 -9
  63. package/dist/interfaces/repository.interface.d.ts.map +0 -1
  64. package/dist/interfaces/repository.interface.js +0 -3
  65. package/dist/interfaces/repository.interface.js.map +0 -1
  66. package/dist/middlewares/authenticated.middleware.d.ts.map +0 -1
  67. package/dist/middlewares/authenticated.middleware.js.map +0 -1
  68. package/dist/middlewares/authorized.middleware.d.ts +0 -12
  69. package/dist/middlewares/authorized.middleware.d.ts.map +0 -1
  70. package/dist/middlewares/authorized.middleware.js.map +0 -1
  71. package/dist/middlewares/validation.middleware.d.ts.map +0 -1
  72. package/dist/middlewares/validation.middleware.js.map +0 -1
  73. package/dist/rest.d.ts.map +0 -1
  74. package/dist/rest.js.map +0 -1
  75. /package/dist/{interfaces → notations/controller/interfaces}/authenticated.interface.d.ts +0 -0
  76. /package/dist/{interfaces → notations/controller/interfaces}/authenticated.interface.js +0 -0
  77. /package/dist/{middlewares → notations/controller/middlewares}/authenticated.middleware.d.ts +0 -0
  78. /package/dist/{middlewares → notations/controller/middlewares}/validation.middleware.js +0 -0
package/dist/app.d.ts CHANGED
@@ -1,14 +1,20 @@
1
1
  import express, { Express } from 'express';
2
+ import { Server } from 'http';
2
3
  import { IApp } from './interfaces/app.interface';
3
4
  import { IConfig } from './interfaces/config.interface';
4
- import { IController } from './rest';
5
+ import { IController } from './notations';
5
6
  import { Container } from 'inversify';
7
+ import { LoadInjectablesOptions } from './loader';
6
8
  declare class App implements IApp {
7
- private controllers;
8
9
  app: Express;
9
10
  container: Container;
10
- constructor(controllers: IController[]);
11
- init(config: IConfig): Promise<void>;
11
+ controllers: IController[];
12
+ server: Server;
13
+ loadedInjectables: boolean;
14
+ constructor();
15
+ loadInjectables(loadInjectablesOptions?: LoadInjectablesOptions): void;
16
+ init(config: IConfig, loadInjectablesOptions?: LoadInjectablesOptions): Promise<void>;
17
+ expressAppInitialize(config: IConfig): void;
12
18
  getApp(): express.Express;
13
19
  afterInit(standartErrorHandler?: boolean): Promise<void>;
14
20
  }
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,OAAO,EAAmC,MAAM,SAAS,CAAC;AAG5E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAY,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,SAAS,EAA2B,MAAM,WAAW,CAAC;AAM/D,cACM,GAAI,YAAW,IAAI;IAIyB,OAAO,CAAC,WAAW;IAHpE,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;gBAEoC,WAAW,EAAE,WAAW,EAAE;IAM7E,IAAI,CAAC,MAAM,EAAE,OAAO;IAyB1B,MAAM;IAMA,SAAS,CAAC,oBAAoB,GAAC,OAAc;CAuBnD;AAED,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,OAAO,EAAmC,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAY,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAKlD,OAAO,EAAmB,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEnE,cACM,GAAI,YAAW,IAAI;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,MAAM,EAAG,MAAM,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAS;;IAOnC,eAAe,CAAC,sBAAsB,CAAC,EAAE,sBAAsB;IAQzD,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,sBAAsB,CAAC,EAAE,sBAAsB;IAI3E,oBAAoB,CAAC,MAAM,EAAE,OAAO;IA2BpC,MAAM;IAIA,SAAS,CAAC,oBAAoB,GAAE,OAAc;CAiBpD;AAED,eAAe,GAAG,CAAC"}
package/dist/app.js CHANGED
@@ -8,9 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
15
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
16
13
  };
@@ -18,43 +15,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
15
  const express_1 = __importDefault(require("express"));
19
16
  const cors_1 = __importDefault(require("cors"));
20
17
  const morgan_1 = __importDefault(require("morgan"));
21
- const rest_1 = require("./rest");
18
+ const notations_1 = require("./notations");
22
19
  const inversify_1 = require("inversify");
23
20
  const swagger_1 = require("./swagger");
24
21
  const types_1 = require("./types");
25
- const container_1 = __importDefault(require("./container"));
22
+ const container_1 = require("./container");
26
23
  const http_expection_1 = __importDefault(require("./expections/http.expection"));
24
+ const loader_1 = require("./loader");
27
25
  let App = class App {
28
- constructor(controllers) {
29
- this.controllers = controllers;
26
+ constructor() {
27
+ this.loadedInjectables = false;
30
28
  this.app = (0, express_1.default)();
31
- this.container = container_1.default;
32
- console.log(this.controllers);
29
+ this.controllers = [];
30
+ this.container = container_1.container;
31
+ }
32
+ loadInjectables(loadInjectablesOptions) {
33
+ if (loadInjectablesOptions?.autoload) {
34
+ globalThis.MINI_AUTOLOAD = true;
35
+ (0, loader_1.loadInjectables)(loadInjectablesOptions);
36
+ (0, container_1.bindDiscovered)();
37
+ this.loadedInjectables = true;
38
+ }
39
+ }
40
+ async init(config, loadInjectablesOptions) {
41
+ this.loadInjectables(loadInjectablesOptions);
42
+ this.expressAppInitialize(config);
33
43
  }
34
- async init(config) {
44
+ expressAppInitialize(config) {
35
45
  this.app.use(express_1.default.json());
36
46
  this.app.use(express_1.default.urlencoded({ extended: true }));
37
47
  this.app.use((0, cors_1.default)());
38
48
  this.app.use((0, morgan_1.default)('dev'));
39
- this.app.listen(config.port, () => {
49
+ this.server = this.app.listen(config.port, () => {
40
50
  console.log(`Server is running on port ${config.port}`);
41
51
  });
42
52
  const swaggerIntegration = new swagger_1.SwaggerIntegration({
43
53
  title: config.applicationName,
44
54
  description: `API documentation for ${config.applicationName}`,
45
55
  version: '1.0.0',
46
- servers: [
56
+ servers: config.swaggerServers ?? [
47
57
  {
48
58
  url: `http://${config.host}:${config.port}`,
49
59
  description: 'Development server',
50
60
  },
51
61
  ],
52
- docsPath: '/api-docs',
53
- jsonPath: '/api-docs.json',
62
+ docsPath: config.swaggerDocsPath ?? '/api-docs',
63
+ jsonPath: config.swaggerJsonPath ?? '/api-docs.json',
64
+ ...(config.swaggerBasicAuth && { basicAuth: config.swaggerBasicAuth }),
54
65
  });
66
+ this.controllers = container_1.container.getAll(types_1.MINI_TYPES.IController);
55
67
  swaggerIntegration.generateSwaggerSpec(this.controllers);
56
68
  swaggerIntegration.setupSwagger(this.app);
57
- (0, rest_1.buildApp)(this.app, this.controllers);
69
+ (0, notations_1.buildApp)(this.app, this.controllers);
58
70
  }
59
71
  getApp() {
60
72
  return this.app;
@@ -66,10 +78,10 @@ let App = class App {
66
78
  res.status(error.code).json(error.messageJson);
67
79
  }
68
80
  else {
69
- console.error("Unexpected error:", error);
81
+ console.error('Unexpected error:', error);
70
82
  res.status(500).json({
71
83
  errorId: 1,
72
- message: "Some error happen",
84
+ message: 'Some error happen',
73
85
  });
74
86
  }
75
87
  });
@@ -78,8 +90,7 @@ let App = class App {
78
90
  };
79
91
  App = __decorate([
80
92
  (0, inversify_1.injectable)(),
81
- __param(0, (0, inversify_1.multiInject)(types_1.MINI_TYPES.IController)),
82
- __metadata("design:paramtypes", [Array])
93
+ __metadata("design:paramtypes", [])
83
94
  ], App);
84
95
  exports.default = App;
85
96
  //# sourceMappingURL=app.js.map
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;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AAY,wBAAa,EAAE,CAAC;oBACpC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gBAChD,CAAC;qBAAM,CAAC;oBACP,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;oBAC1C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;wBACpB,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,mBAAmB;qBAC5B,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC,CACD,CAAC;QACH,CAAC;IACF,CAAC;CACD,CAAA;AAxEK,GAAG;IADR,IAAA,sBAAU,GAAE;;GACP,GAAG,CAwER;AAED,kBAAe,GAAG,CAAC"}
@@ -1,4 +1,19 @@
1
+ import type { ServiceIdentifier } from 'inversify';
1
2
  import { Container } from 'inversify';
2
- declare const container: Container;
3
- export default container;
3
+ export declare const container: Container;
4
+ type Scope = 'Singleton' | 'Transient' | 'Request';
5
+ export type DiscoveredBinding = {
6
+ token: ServiceIdentifier<any>;
7
+ target: new (...args: any[]) => any;
8
+ scope: Scope;
9
+ priority: number;
10
+ };
11
+ export declare function autoBind(token: DiscoveredBinding['token'], opts?: {
12
+ scope?: Scope;
13
+ priority?: number;
14
+ }): (target: any) => void;
15
+ export declare const bindDiscovered: () => {
16
+ count: number;
17
+ };
18
+ export {};
4
19
  //# sourceMappingURL=container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,QAAA,MAAM,SAAS,WAAkB,CAAC;AAGlC,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,eAAO,MAAM,SAAS,WAGpB,CAAC;AAEH,KAAK,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnD,MAAM,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IACpC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAUF,wBAAgB,QAAQ,CACvB,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACjC,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,IAI1B,QAAQ,GAAG,UAI5B;AAED,eAAO,MAAM,cAAc;;CAa1B,CAAC"}
package/dist/container.js CHANGED
@@ -1,6 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bindDiscovered = exports.container = void 0;
4
+ exports.autoBind = autoBind;
3
5
  const inversify_1 = require("inversify");
4
- const container = new inversify_1.Container();
5
- exports.default = container;
6
+ exports.container = new inversify_1.Container({
7
+ defaultScope: 'Singleton',
8
+ autobind: true,
9
+ });
10
+ const DISCOVERY_KEY = Symbol.for('DI_DISCOVERY_REGISTRY');
11
+ function getRegistry() {
12
+ const g = globalThis;
13
+ if (!g[DISCOVERY_KEY])
14
+ g[DISCOVERY_KEY] = [];
15
+ return g[DISCOVERY_KEY];
16
+ }
17
+ function autoBind(token, opts) {
18
+ const scope = opts?.scope ?? 'Singleton';
19
+ return function (target) {
20
+ const reg = getRegistry();
21
+ reg.push({ token, target, scope, priority: opts?.priority ?? 0 });
22
+ };
23
+ }
24
+ const bindDiscovered = () => {
25
+ const reg = getRegistry();
26
+ for (const b of reg.sort((a, b) => a.priority - b.priority)) {
27
+ if (exports.container.isBound(b.token) && b.scope === 'Singleton')
28
+ continue;
29
+ const binding = exports.container.bind(b.token).to(b.target);
30
+ if (b.scope === 'Singleton')
31
+ binding.inSingletonScope();
32
+ if (b.scope === 'Transient')
33
+ binding.inTransientScope();
34
+ if (b.scope === 'Request')
35
+ binding.inRequestScope();
36
+ }
37
+ return { count: reg.length };
38
+ };
39
+ exports.bindDiscovered = bindDiscovered;
6
40
  //# sourceMappingURL=container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"container.js","sourceRoot":"","sources":["../container.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AAEtC,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;AAGlC,kBAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../container.ts"],"names":[],"mappings":";;;AAwBA,4BAUC;AAjCD,yCAAsC;AACzB,QAAA,SAAS,GAAG,IAAI,qBAAS,CAAC;IACtC,YAAY,EAAE,WAAW;IACzB,QAAQ,EAAE,IAAI;CACd,CAAC,CAAC;AAWH,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAE1D,SAAS,WAAW;IACnB,MAAM,CAAC,GAAG,UAAiB,CAAC;IAC5B,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;QAAE,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,CAAC,aAAa,CAAwB,CAAC;AAChD,CAAC;AAED,SAAgB,QAAQ,CACvB,KAAiC,EACjC,IAA2C;IAE3C,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,WAAW,CAAC;IAEzC,OAAO,UAAU,MAAW;QAC3B,MAAM,GAAG,GAAG,WAAW,EAAE,CAAC;QAC1B,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC,CAAC;AACH,CAAC;AAEM,MAAM,cAAc,GAAG,GAAG,EAAE;IAClC,MAAM,GAAG,GAAG,WAAW,EAAE,CAAC;IAC1B,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7D,IAAI,iBAAS,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,WAAW;YAAE,SAAS;QAEpE,MAAM,OAAO,GAAG,iBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAErD,IAAI,CAAC,CAAC,KAAK,KAAK,WAAW;YAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACxD,IAAI,CAAC,CAAC,KAAK,KAAK,WAAW;YAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACxD,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,CAAC,cAAc,EAAE,CAAC;IACrD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;AAC9B,CAAC,CAAC;AAbW,QAAA,cAAc,kBAazB"}
package/dist/index.d.ts CHANGED
@@ -1,26 +1,28 @@
1
1
  import App from './app';
2
- import container from './container';
2
+ import { container, autoBind } from './container';
3
3
  import { IApp } from './interfaces/app.interface';
4
4
  import { MINI_TYPES } from './types';
5
5
  export * from 'inversify';
6
6
  export { container };
7
+ export { autoBind };
8
+ declare const AutoBind: typeof autoBind;
9
+ export { AutoBind };
7
10
  export { IApp };
8
11
  export { App };
9
12
  export { MINI_TYPES };
10
13
  export * from './interfaces/app.interface';
11
- export * from './interfaces/authenticated.interface';
14
+ export * from './notations/controller/interfaces/authenticated.interface';
12
15
  export * from './interfaces/config.interface';
13
- export * from './interfaces/queue.interface';
14
- export * from './interfaces/repository.interface';
15
- export * from './middlewares/authenticated.middleware';
16
- export * from './middlewares/authorized.middleware';
17
- export * from './middlewares/validation.middleware';
16
+ export * from './notations/controller/middlewares/authenticated.middleware';
17
+ export * from './notations/controller/middlewares/authorized.middleware';
18
+ export * from './notations/controller/middlewares/validation.middleware';
18
19
  export * from './utils/array-unify';
19
20
  export * from './utils/math';
21
+ export * from './utils/infer-schema';
20
22
  export * from './expections/http.expection';
21
23
  export { default as HttpException } from './expections/http.expection';
22
24
  export * from './types';
23
25
  export * from './response-builder';
24
- export * from './rest';
26
+ export * from './notations';
25
27
  export * from './swagger';
26
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,cAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,GAAG,EAAE,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAGpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAG7B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGvE,cAAc,SAAS,CAAC;AAGxB,cAAc,oBAAoB,CAAC;AAGnC,cAAc,QAAQ,CAAC;AAGvB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,QAAA,MAAM,QAAQ,iBAAW,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,GAAG,EAAE,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2DAA2D,CAAC;AAC1E,cAAc,+BAA+B,CAAC;AAG9C,cAAc,6DAA6D,CAAC;AAC5E,cAAc,0DAA0D,CAAC;AACzE,cAAc,0DAA0D,CAAC;AAGzE,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGvE,cAAc,SAAS,CAAC;AAGxB,cAAc,oBAAoB,CAAC;AAGnC,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -17,29 +17,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.HttpException = exports.MINI_TYPES = exports.App = exports.container = void 0;
20
+ exports.HttpException = exports.MINI_TYPES = exports.App = exports.AutoBind = exports.autoBind = exports.container = void 0;
21
21
  const app_1 = __importDefault(require("./app"));
22
22
  exports.App = app_1.default;
23
- const container_1 = __importDefault(require("./container"));
24
- exports.container = container_1.default;
23
+ const container_1 = require("./container");
24
+ Object.defineProperty(exports, "container", { enumerable: true, get: function () { return container_1.container; } });
25
+ Object.defineProperty(exports, "autoBind", { enumerable: true, get: function () { return container_1.autoBind; } });
25
26
  const types_1 = require("./types");
26
27
  Object.defineProperty(exports, "MINI_TYPES", { enumerable: true, get: function () { return types_1.MINI_TYPES; } });
27
28
  // Main Application class
28
29
  // Container Class ve instance için
29
30
  __exportStar(require("inversify"), exports);
31
+ const AutoBind = container_1.autoBind;
32
+ exports.AutoBind = AutoBind;
30
33
  // Interfaces
31
34
  __exportStar(require("./interfaces/app.interface"), exports);
32
- __exportStar(require("./interfaces/authenticated.interface"), exports);
35
+ __exportStar(require("./notations/controller/interfaces/authenticated.interface"), exports);
33
36
  __exportStar(require("./interfaces/config.interface"), exports);
34
- __exportStar(require("./interfaces/queue.interface"), exports);
35
- __exportStar(require("./interfaces/repository.interface"), exports);
36
37
  // Middlewares
37
- __exportStar(require("./middlewares/authenticated.middleware"), exports);
38
- __exportStar(require("./middlewares/authorized.middleware"), exports);
39
- __exportStar(require("./middlewares/validation.middleware"), exports);
38
+ __exportStar(require("./notations/controller/middlewares/authenticated.middleware"), exports);
39
+ __exportStar(require("./notations/controller/middlewares/authorized.middleware"), exports);
40
+ __exportStar(require("./notations/controller/middlewares/validation.middleware"), exports);
40
41
  // Utils
41
42
  __exportStar(require("./utils/array-unify"), exports);
42
43
  __exportStar(require("./utils/math"), exports);
44
+ __exportStar(require("./utils/infer-schema"), exports);
43
45
  // Exceptions
44
46
  __exportStar(require("./expections/http.expection"), exports);
45
47
  var http_expection_1 = require("./expections/http.expection");
@@ -49,8 +51,8 @@ __exportStar(require("./types"), exports);
49
51
  // Response builder
50
52
  __exportStar(require("./response-builder"), exports);
51
53
  // REST utilities
52
- __exportStar(require("./rest"), exports);
54
+ __exportStar(require("./notations"), exports);
53
55
  // Swagger integration
54
56
  __exportStar(require("./swagger"), exports);
55
- container_1.default.bind(types_1.MINI_TYPES.IApp).to(app_1.default).inSingletonScope();
57
+ container_1.container.bind(types_1.MINI_TYPES.IApp).to(app_1.default).inSingletonScope();
56
58
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAUf,cAVF,aAAG,CAUE;AATZ,4DAAoC;AAO3B,oBAPF,mBAAS,CAOE;AALlB,mCAAqC;AAQ5B,2FARA,kBAAU,OAQA;AAPnB,yBAAyB;AAEzB,mCAAmC;AACnC,4CAA2B;AAM3B,aAAa;AACb,6DAA2C;AAC3C,uEAAqD;AACrD,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAElD,cAAc;AACd,yEAAuD;AACvD,sEAAoD;AACpD,sEAAoD;AAEpD,QAAQ;AACR,sDAAoC;AACpC,+CAA6B;AAE7B,aAAa;AACb,8DAA4C;AAC5C,8DAAuE;AAA9D,gIAAA,OAAO,OAAiB;AAEjC,QAAQ;AACR,0CAAwB;AAExB,mBAAmB;AACnB,qDAAmC;AAEnC,iBAAiB;AACjB,yCAAuB;AAEvB,sBAAsB;AACtB,4CAA0B;AAE1B,mBAAS,CAAC,IAAI,CAAO,kBAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,aAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAaf,cAbF,aAAG,CAaE;AAZZ,2CAAkD;AAOzC,0FAPA,qBAAS,OAOA;AACT,yFARW,oBAAQ,OAQX;AANjB,mCAAqC;AAW5B,2FAXA,kBAAU,OAWA;AAVnB,yBAAyB;AAEzB,mCAAmC;AACnC,4CAA0B;AAG1B,MAAM,QAAQ,GAAG,oBAAQ,CAAC;AACjB,4BAAQ;AAKjB,aAAa;AACb,6DAA2C;AAC3C,4FAA0E;AAC1E,gEAA8C;AAE9C,cAAc;AACd,8FAA4E;AAC5E,2FAAyE;AACzE,2FAAyE;AAEzE,QAAQ;AACR,sDAAoC;AACpC,+CAA6B;AAC7B,uDAAqC;AAErC,aAAa;AACb,8DAA4C;AAC5C,8DAAuE;AAA9D,gIAAA,OAAO,OAAiB;AAEjC,QAAQ;AACR,0CAAwB;AAExB,mBAAmB;AACnB,qDAAmC;AAEnC,iBAAiB;AACjB,8CAA4B;AAE5B,sBAAsB;AACtB,4CAA0B;AAE1B,qBAAS,CAAC,IAAI,CAAO,kBAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,aAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC"}
@@ -1,7 +1,15 @@
1
+ import { IController } from '../notations';
1
2
  import { IConfig } from './config.interface';
2
3
  import { Express } from 'express';
4
+ import { Server } from 'http';
5
+ import { LoadInjectablesOptions } from '../loader';
3
6
  export interface IApp {
4
- init(config: IConfig): Promise<void>;
7
+ server: Server;
8
+ controllers: IController[];
9
+ loadedInjectables: boolean;
10
+ loadInjectables(loadInjectablesOptions?: LoadInjectablesOptions): void;
11
+ init(config: IConfig, loadInjectablesOptions?: LoadInjectablesOptions): Promise<void>;
12
+ expressAppInitialize(config: IConfig): void;
5
13
  afterInit(standartErrorHandler?: boolean): Promise<void>;
6
14
  getApp(): Express;
7
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"app.interface.d.ts","sourceRoot":"","sources":["../../interfaces/app.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,MAAM,WAAW,IAAI;IACpB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,SAAS,CAAC,oBAAoB,CAAC,EAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,IAAG,OAAO,CAAC;CACjB"}
1
+ {"version":3,"file":"app.interface.d.ts","sourceRoot":"","sources":["../../interfaces/app.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,MAAM,WAAW,IAAI;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACvE,IAAI,CACH,MAAM,EAAE,OAAO,EACf,sBAAsB,CAAC,EAAE,sBAAsB,GAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,IAAI,OAAO,CAAC;CAClB"}
@@ -1,6 +1,18 @@
1
+ export interface ISwaggerServer {
2
+ url: string;
3
+ description: string;
4
+ }
5
+ export interface ISwaggerBasicAuth {
6
+ username: string;
7
+ password: string;
8
+ }
1
9
  export interface IConfig {
2
10
  host: string;
3
11
  port: number;
4
12
  applicationName: string;
13
+ swaggerDocsPath?: string;
14
+ swaggerJsonPath?: string;
15
+ swaggerServers?: ISwaggerServer[];
16
+ swaggerBasicAuth?: ISwaggerBasicAuth;
5
17
  }
6
18
  //# sourceMappingURL=config.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../interfaces/config.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../interfaces/config.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;CACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,QAAA,MAAM,MAAM,EAAE,MAiBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,QAAA,MAAM,MAAM,EAAE,MAkBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -4,6 +4,7 @@ const config = {
4
4
  preset: 'ts-jest',
5
5
  testEnvironment: 'node',
6
6
  roots: ['<rootDir>/__tests__'],
7
+ testMatch: ['**/*.test.ts'],
7
8
  moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
8
9
  transform: {
9
10
  '^.+\\.tsx?$': [
@@ -1 +1 @@
1
- {"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAW;IACrB,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,CAAC,qBAAqB,CAAC;IAC9B,oBAAoB,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;IACjD,SAAS,EAAE;QACT,aAAa,EAAE;YACb,SAAS;YACT;gBACE,QAAQ,EAAE,oBAAoB;gBAC9B,WAAW,EAAE,IAAI;gBACjB,eAAe,EAAE,KAAK;aACvB;SACF;KACF;IACD,kBAAkB,EAAE,CAAC,yBAAyB,CAAC;IAC/C,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,kBAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAW;IACtB,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,CAAC,qBAAqB,CAAC;IAC9B,SAAS,EAAE,CAAC,cAAc,CAAC;IAC3B,oBAAoB,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;IACjD,SAAS,EAAE;QACV,aAAa,EAAE;YACd,SAAS;YACT;gBACC,QAAQ,EAAE,oBAAoB;gBAC9B,WAAW,EAAE,IAAI;gBACjB,eAAe,EAAE,KAAK;aACtB;SACD;KACD;IACD,kBAAkB,EAAE,CAAC,yBAAyB,CAAC;IAC/C,WAAW,EAAE,KAAK;CAClB,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type LoadInjectablesOptions = {
2
+ autoload?: boolean;
3
+ workingDirectory?: string;
4
+ patterns?: string[];
5
+ logging?: boolean;
6
+ extensions?: string[];
7
+ ignoreExtensions?: string[];
8
+ };
9
+ export declare function loadInjectables(opts?: LoadInjectablesOptions): {
10
+ files: string[];
11
+ count: number;
12
+ } | undefined;
13
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../loader.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AACF,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,sBAAsB;;;cAiE5D"}
package/dist/loader.js ADDED
@@ -0,0 +1,76 @@
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.loadInjectables = loadInjectables;
7
+ // load-injectables.ts
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const fast_glob_1 = __importDefault(require("fast-glob"));
10
+ const node_fs_1 = __importDefault(require("node:fs"));
11
+ function loadInjectables(opts) {
12
+ if (!opts?.autoload)
13
+ return;
14
+ const logging = opts?.logging ?? false;
15
+ const patterns = opts?.patterns ?? ['**/*.(ts|js)'];
16
+ const extensions = opts?.extensions ?? [
17
+ '.ts',
18
+ '.mts',
19
+ '.cts',
20
+ '.js',
21
+ '.cjs',
22
+ '.mjs',
23
+ ];
24
+ const workingDirectory = opts?.workingDirectory;
25
+ if (!workingDirectory)
26
+ throw new Error('Working directory is required');
27
+ const ignoreExtensions = opts?.ignoreExtensions ?? [];
28
+ const baseDir = node_path_1.default.resolve(workingDirectory);
29
+ if (logging) {
30
+ console.log('------ AUTO LOADING OPTIONS ------');
31
+ console.log({
32
+ logging,
33
+ patterns,
34
+ extensions,
35
+ ignoreExtensions,
36
+ baseDir,
37
+ });
38
+ }
39
+ const files = fast_glob_1.default.sync(extensions.flatMap((ext) => patterns
40
+ .map((p) => {
41
+ // Pattern'deki .(ts|js) gibi placeholder'ları extension ile değiştir
42
+ // Nokta dahil replace ediyoruz: .(ts|js) → .ts
43
+ const cleanPattern = p.replace(/\.\([^)]+\)/, ext);
44
+ return node_path_1.default.join(baseDir, cleanPattern);
45
+ })
46
+ .filter((f) => !ignoreExtensions.some((ie) => f.endsWith(ie)))), {
47
+ onlyFiles: true,
48
+ unique: true,
49
+ });
50
+ if (logging) {
51
+ console.log('------ AUTO LOADING FILES ------');
52
+ console.log(files);
53
+ }
54
+ if (files.length > 0) {
55
+ files.forEach((f) => {
56
+ const file = node_fs_1.default.readFileSync(f, 'utf8');
57
+ if (!file.startsWith('//mini-dont-auto-load')) {
58
+ if (logging) {
59
+ console.log('auto-loading', f);
60
+ }
61
+ require(f);
62
+ }
63
+ else {
64
+ if (logging) {
65
+ console.log('skipping', f);
66
+ }
67
+ }
68
+ });
69
+ }
70
+ else {
71
+ if (opts?.logging)
72
+ console.log('------ NO FILES FOUND TO AUTO LOAD ------');
73
+ }
74
+ return { files, count: files.length };
75
+ }
76
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../loader.ts"],"names":[],"mappings":";;;;;AAYA,0CAiEC;AA7ED,sBAAsB;AACtB,0DAA6B;AAC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BAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAC/D,EACD;QACC,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;KACZ,CACD,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACnB,MAAM,IAAI,GAAG,iBAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBAC/C,IAAI,OAAO,EAAE,CAAC;oBACb,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;gBAChC,CAAC;gBACD,OAAO,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACP,IAAI,OAAO,EAAE,CAAC;oBACb,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;gBAC5B,CAAC;YACF,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;SAAM,CAAC;QACP,IAAI,IAAI,EAAE,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AACvC,CAAC"}
@@ -2,45 +2,7 @@ import 'reflect-metadata';
2
2
  import express, { type Express } from 'express';
3
3
  import type { IRouter, RequestHandler } from 'express';
4
4
  import { IValidation } from './middlewares/validation.middleware';
5
- export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch';
6
- export type IExtraData = Map<string, any>;
7
- export type ParameterSlot = 'req' | 'res' | 'next' | 'body' | 'query' | 'params' | 'headers';
8
- export type RequestHandlerWithPreMiddlewareOptions = {
9
- handler: RequestHandler;
10
- isPre: boolean;
11
- order: number;
12
- };
13
- export interface RouteOptions {
14
- method?: Method;
15
- path?: string;
16
- validations?: IValidation[];
17
- permissions?: string[];
18
- authenticated?: boolean;
19
- otherHttpMiddlewares?: RequestHandlerWithPreMiddlewareOptions[];
20
- extraData?: IExtraData;
21
- name?: string;
22
- }
23
- export interface RouteDefinition extends RouteOptions {
24
- methodName: string;
25
- parameterIndices?: Partial<Record<ParameterSlot, number>>;
26
- }
27
- export interface RouteDefinitions {
28
- basePath: string;
29
- controllerName?: string;
30
- moduleName?: string;
31
- routes: RouteDefinition[];
32
- }
33
- export interface IControllerClassConstructor {
34
- new (...args: any[]): any;
35
- __routeDefinitions?: RouteDefinitions;
36
- }
37
- export interface IController {
38
- path: string;
39
- name: string;
40
- moduleName: string;
41
- getRouteDefinition(methodName: string): RouteDefinition;
42
- getRouteDefinitions(): RouteDefinitions;
43
- }
5
+ import { IController, IControllerClassConstructor, ParameterSlot, RouteDefinition, RouteDefinitions, RouteOptions } from './rest.types';
44
6
  export declare class Controller implements IController {
45
7
  path: string;
46
8
  name: string;
@@ -73,14 +35,16 @@ export declare const keyOfParams: unique symbol;
73
35
  export declare const keyOfHeaders: unique symbol;
74
36
  export declare function controller(path: string, name?: string, moduleName?: string): <T extends {
75
37
  new (...args: any[]): Controller;
76
- }>(constructor: T) => T;
38
+ }>(constructor: T) => void | T;
77
39
  export declare function httpMethod(newOptions: RouteOptions): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
78
- export declare function get(path: string, name?: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
79
- export declare function post(path: string, name?: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
80
- export declare function put(path: string, name?: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
81
- export declare function del(path: string, name?: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
82
- export declare function patch(path: string, name?: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
40
+ export declare function get(path: string, name?: string, options?: Omit<RouteOptions, 'path' | 'method' | 'name'>): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
41
+ export declare function post(path: string, name?: string, options?: Omit<RouteOptions, 'path' | 'method' | 'name'>): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
42
+ export declare function put(path: string, name?: string, options?: Omit<RouteOptions, 'path' | 'method' | 'name'>): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
43
+ export declare function del(path: string, name?: string, options?: Omit<RouteOptions, 'path' | 'method' | 'name'>): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
44
+ export declare function patch(path: string, name?: string, options?: Omit<RouteOptions, 'path' | 'method' | 'name'>): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
83
45
  export declare function validate(options: IValidation | IValidation[]): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
46
+ export declare function preRequestScript(script: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
47
+ export declare function testScript(script: string): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
84
48
  export declare function authenticated(value?: boolean): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
85
49
  export declare function authorized(value: string | string[]): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
86
50
  export declare function middleware(mw: RequestHandler, isPre?: boolean, order?: number): (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
@@ -94,4 +58,4 @@ export declare function params(): (t: any, k: string, i: number) => void;
94
58
  export declare function headers(): (t: any, k: string, i: number) => void;
95
59
  export declare function buildRouterFromController(controllerInstance: IController): IRouter;
96
60
  export declare function buildApp(app: Express, controllers: IController[]): express.Express;
97
- //# sourceMappingURL=rest.d.ts.map
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../notations/controller/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,OAAO,EAAE,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAIX,OAAO,EACP,cAAc,EACd,MAAM,SAAS,CAAC;AAGjB,OAA6B,EAC5B,WAAW,EACX,MAAM,qCAAqC,CAAC;AAK7C,OAAO,EACN,WAAW,EACX,2BAA2B,EAE3B,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,MAAM,cAAc,CAAC;AAEtB,qBAAa,UAAW,YAAW,WAAW;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;;IAiBnC,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe;IAOvD,mBAAmB,IAAI,gBAAgB;CAGvC;AAED,qBAAa,aAAa;IACzB,OAAO,CAAC,MAAM,CAAC,OAAO;IAMtB,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,gBAAgB;IAQzD,MAAM,CAAC,WAAW,CACjB,WAAW,EAAE,2BAA2B,EACxC,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,MAAM;IAQpB,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe;IAgBzE,MAAM,CAAC,WAAW,CACjB,MAAM,EAAE,GAAG,EACX,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC;IAoC7C,MAAM,CAAC,iBAAiB,CACvB,MAAM,EAAE,GAAG,EACX,UAAU,E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