moost 0.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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/dist/moost.cjs.prod.js +742 -0
  4. package/dist/moost.d.ts +274 -0
  5. package/dist/moost.esm-bundler.js +693 -0
  6. package/dist/src/binding/bind-controller.d.ts +13 -0
  7. package/dist/src/binding/bind-controller.d.ts.map +1 -0
  8. package/dist/src/binding/bind-handler.d.ts +18 -0
  9. package/dist/src/binding/bind-handler.d.ts.map +1 -0
  10. package/dist/src/binding/index.d.ts +3 -0
  11. package/dist/src/binding/index.d.ts.map +1 -0
  12. package/dist/src/binding/tests/binding.spec.d.ts +2 -0
  13. package/dist/src/binding/tests/binding.spec.d.ts.map +1 -0
  14. package/dist/src/binding/utils.d.ts +3 -0
  15. package/dist/src/binding/utils.d.ts.map +1 -0
  16. package/dist/src/class-function/class-function.d.ts +4 -0
  17. package/dist/src/class-function/class-function.d.ts.map +1 -0
  18. package/dist/src/class-function/index.d.ts +2 -0
  19. package/dist/src/class-function/index.d.ts.map +1 -0
  20. package/dist/src/class-function/types.d.ts +9 -0
  21. package/dist/src/class-function/types.d.ts.map +1 -0
  22. package/dist/src/composables/cache-object.d.ts +3 -0
  23. package/dist/src/composables/cache-object.d.ts.map +1 -0
  24. package/dist/src/composables/controller-meta.d.ts +8 -0
  25. package/dist/src/composables/controller-meta.d.ts.map +1 -0
  26. package/dist/src/composables/index.d.ts +2 -0
  27. package/dist/src/composables/index.d.ts.map +1 -0
  28. package/dist/src/decorators/circular.decorator.d.ts +3 -0
  29. package/dist/src/decorators/circular.decorator.d.ts.map +1 -0
  30. package/dist/src/decorators/common.decorator.d.ts +4 -0
  31. package/dist/src/decorators/common.decorator.d.ts.map +1 -0
  32. package/dist/src/decorators/controller.decorator.d.ts +6 -0
  33. package/dist/src/decorators/controller.decorator.d.ts.map +1 -0
  34. package/dist/src/decorators/http-method.decorator.d.ts +8 -0
  35. package/dist/src/decorators/http-method.decorator.d.ts.map +1 -0
  36. package/dist/src/decorators/index.d.ts +10 -0
  37. package/dist/src/decorators/index.d.ts.map +1 -0
  38. package/dist/src/decorators/injectable.decorator.d.ts +3 -0
  39. package/dist/src/decorators/injectable.decorator.d.ts.map +1 -0
  40. package/dist/src/decorators/intercept.decorator.d.ts +20 -0
  41. package/dist/src/decorators/intercept.decorator.d.ts.map +1 -0
  42. package/dist/src/decorators/pipe.decorator.d.ts +3 -0
  43. package/dist/src/decorators/pipe.decorator.d.ts.map +1 -0
  44. package/dist/src/decorators/provide.decorator.d.ts +5 -0
  45. package/dist/src/decorators/provide.decorator.d.ts.map +1 -0
  46. package/dist/src/decorators/resolve.decorator.d.ts +21 -0
  47. package/dist/src/decorators/resolve.decorator.d.ts.map +1 -0
  48. package/dist/src/decorators/tests/circular.artifacts.d.ts +7 -0
  49. package/dist/src/decorators/tests/circular.artifacts.d.ts.map +1 -0
  50. package/dist/src/decorators/tests/circular.spec.d.ts +2 -0
  51. package/dist/src/decorators/tests/circular.spec.d.ts.map +1 -0
  52. package/dist/src/decorators/tests/common.artifacts.d.ts +4 -0
  53. package/dist/src/decorators/tests/common.artifacts.d.ts.map +1 -0
  54. package/dist/src/decorators/tests/common.spec.d.ts +2 -0
  55. package/dist/src/decorators/tests/common.spec.d.ts.map +1 -0
  56. package/dist/src/decorators/tests/controller.spec.d.ts +2 -0
  57. package/dist/src/decorators/tests/controller.spec.d.ts.map +1 -0
  58. package/dist/src/decorators/tests/http-method.artifacts.d.ts +12 -0
  59. package/dist/src/decorators/tests/http-method.artifacts.d.ts.map +1 -0
  60. package/dist/src/decorators/tests/http-method.spec.d.ts +2 -0
  61. package/dist/src/decorators/tests/http-method.spec.d.ts.map +1 -0
  62. package/dist/src/decorators/tests/injectable.spec.d.ts +2 -0
  63. package/dist/src/decorators/tests/injectable.spec.d.ts.map +1 -0
  64. package/dist/src/decorators/tests/intercept.spec.d.ts +2 -0
  65. package/dist/src/decorators/tests/intercept.spec.d.ts.map +1 -0
  66. package/dist/src/decorators/tests/pipe.artifacts.d.ts +4 -0
  67. package/dist/src/decorators/tests/pipe.artifacts.d.ts.map +1 -0
  68. package/dist/src/decorators/tests/pipe.spec.d.ts +2 -0
  69. package/dist/src/decorators/tests/pipe.spec.d.ts.map +1 -0
  70. package/dist/src/decorators/tests/provide.artifacts.d.ts +9 -0
  71. package/dist/src/decorators/tests/provide.artifacts.d.ts.map +1 -0
  72. package/dist/src/decorators/tests/provide.spec.d.ts +2 -0
  73. package/dist/src/decorators/tests/provide.spec.d.ts.map +1 -0
  74. package/dist/src/decorators/tests/resolve.artifacts.d.ts +4 -0
  75. package/dist/src/decorators/tests/resolve.artifacts.d.ts.map +1 -0
  76. package/dist/src/decorators/tests/resolve.spec.d.ts +2 -0
  77. package/dist/src/decorators/tests/resolve.spec.d.ts.map +1 -0
  78. package/dist/src/decorators/tests/validate.artifacts.d.ts +21 -0
  79. package/dist/src/decorators/tests/validate.artifacts.d.ts.map +1 -0
  80. package/dist/src/decorators/tests/validate.spec.d.ts +2 -0
  81. package/dist/src/decorators/tests/validate.spec.d.ts.map +1 -0
  82. package/dist/src/decorators/validate.decorator.d.ts +10 -0
  83. package/dist/src/decorators/validate.decorator.d.ts.map +1 -0
  84. package/dist/src/index.d.ts +7 -0
  85. package/dist/src/index.d.ts.map +1 -0
  86. package/dist/src/metadata/index.d.ts +2 -0
  87. package/dist/src/metadata/index.d.ts.map +1 -0
  88. package/dist/src/metadata/infact.d.ts +7 -0
  89. package/dist/src/metadata/infact.d.ts.map +1 -0
  90. package/dist/src/metadata/moost-metadata.d.ts +62 -0
  91. package/dist/src/metadata/moost-metadata.d.ts.map +1 -0
  92. package/dist/src/metadata/valido.d.ts +3 -0
  93. package/dist/src/metadata/valido.d.ts.map +1 -0
  94. package/dist/src/moost.d.ts +34 -0
  95. package/dist/src/moost.d.ts.map +1 -0
  96. package/dist/src/moost.spec.d.ts +2 -0
  97. package/dist/src/moost.spec.d.ts.map +1 -0
  98. package/dist/src/pipes/generic-types-cast.pipe.d.ts +3 -0
  99. package/dist/src/pipes/generic-types-cast.pipe.d.ts.map +1 -0
  100. package/dist/src/pipes/index.d.ts +5 -0
  101. package/dist/src/pipes/index.d.ts.map +1 -0
  102. package/dist/src/pipes/resolve.pipe.d.ts +3 -0
  103. package/dist/src/pipes/resolve.pipe.d.ts.map +1 -0
  104. package/dist/src/pipes/run-pipes.d.ts +5 -0
  105. package/dist/src/pipes/run-pipes.d.ts.map +1 -0
  106. package/dist/src/pipes/shared-pipes.d.ts +3 -0
  107. package/dist/src/pipes/shared-pipes.d.ts.map +1 -0
  108. package/dist/src/pipes/types.d.ts +21 -0
  109. package/dist/src/pipes/types.d.ts.map +1 -0
  110. package/dist/src/pipes/validate.pipe.d.ts +7 -0
  111. package/dist/src/pipes/validate.pipe.d.ts.map +1 -0
  112. package/dist/src/pipes/validation.spec.d.ts +2 -0
  113. package/dist/src/pipes/validation.spec.d.ts.map +1 -0
  114. package/dist/src/tests/e2e.artifacts.d.ts +17 -0
  115. package/dist/src/tests/e2e.artifacts.d.ts.map +1 -0
  116. package/dist/src/tests/e2e.spec.d.ts +2 -0
  117. package/dist/src/tests/e2e.spec.d.ts.map +1 -0
  118. package/dist/src/tests/request.artifacts.d.ts +10 -0
  119. package/dist/src/tests/request.artifacts.d.ts.map +1 -0
  120. package/dist/src/types.d.ts +8 -0
  121. package/dist/src/types.d.ts.map +1 -0
  122. package/dist/src/utils/banner.d.ts +2 -0
  123. package/dist/src/utils/banner.d.ts.map +1 -0
  124. package/dist/src/utils/log.d.ts +5 -0
  125. package/dist/src/utils/log.d.ts.map +1 -0
  126. package/dist/src/utils/panic.d.ts +2 -0
  127. package/dist/src/utils/panic.d.ts.map +1 -0
  128. package/index.js +2 -0
  129. package/package.json +90 -0
@@ -0,0 +1,13 @@
1
+ import { Wooks } from 'wooks';
2
+ import { TMoostMetadata } from '../metadata';
3
+ import { TPipeData } from '../pipes';
4
+ import { TClassConstructor, TObject } from '../types';
5
+ export interface TBindControllerOptions {
6
+ globalPrefix?: string;
7
+ replaceOwnPrefix?: string;
8
+ provide?: TMoostMetadata['provide'];
9
+ interceptors?: TMoostMetadata['interceptors'];
10
+ pipes?: TPipeData[];
11
+ }
12
+ export declare function bindControllerMethods(getInstance: () => Promise<TObject>, classConstructor: TClassConstructor, wooksApp: Wooks, options?: TBindControllerOptions): void;
13
+ //# sourceMappingURL=bind-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bind-controller.d.ts","sourceRoot":"","sources":["../../../src/binding/bind-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA0B,MAAM,OAAO,CAAA;AACrD,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAOrD,MAAM,WAAW,sBAAsB;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAA;IAC7C,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACtB;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,sBAAsB,QAyDhK"}
@@ -0,0 +1,18 @@
1
+ import { Wooks } from 'wooks';
2
+ import { TInterceptorFn } from '../decorators';
3
+ import { TMoostMetadata, TMoostParamsMetadata } from '../metadata';
4
+ import { TPipeData } from '../pipes';
5
+ import { TObject } from '../types';
6
+ export interface IBindHandlerOptions {
7
+ httpMethod: Required<TMoostMetadata>['httpHandler'][0]['method'];
8
+ path: string;
9
+ interceptorHandlers: TInterceptorFn[];
10
+ provide: Required<TMoostMetadata>['provide'];
11
+ argsMeta: TMoostParamsMetadata[];
12
+ argsPipes: {
13
+ meta: TMoostParamsMetadata;
14
+ pipes: TPipeData[];
15
+ }[];
16
+ }
17
+ export declare function bindHandler<T extends TObject = TObject>(getInstance: () => Promise<T>, method: keyof T, wooksApp: Wooks, options: IBindHandlerOptions): void;
18
+ //# sourceMappingURL=bind-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bind-handler.d.ts","sourceRoot":"","sources":["../../../src/binding/bind-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,OAAO,CAAA;AAEjE,OAAO,EAAyC,cAAc,EAAuB,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,MAAM,WAAW,mBAAmB;IAChC,UAAU,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IAChE,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB,EAAE,cAAc,EAAE,CAAA;IACrC,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,CAAA;IAC5C,QAAQ,EAAE,oBAAoB,EAAE,CAAA;IAChC,SAAS,EAAE;QACP,IAAI,EAAE,oBAAoB,CAAA;QAC1B,KAAK,EAAE,SAAS,EAAE,CAAA;KACrB,EAAE,CAAA;CACN;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,QAwErJ"}
@@ -0,0 +1,3 @@
1
+ export * from './bind-controller';
2
+ export * from './bind-handler';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/binding/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=binding.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binding.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/tests/binding.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { TAny } from '../types';
2
+ export declare function getInstanceOwnMethods<T = TAny>(instance: T): (keyof T)[];
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/binding/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAOxE"}
@@ -0,0 +1,4 @@
1
+ import { TAnyFn, TFunction, TObject } from '../types';
2
+ import { TCallableClassFunction } from './types';
3
+ export declare function getCallableFn<T extends TAnyFn = TAnyFn>(targetInstance: TObject, fn: TCallableClassFunction<T>, restoreCtx?: TFunction): Promise<T>;
4
+ //# sourceMappingURL=class-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-function.d.ts","sourceRoot":"","sources":["../../../src/class-function/class-function.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,MAAM,EAAqB,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAE9E,OAAO,EAAE,sBAAsB,EAAkB,MAAM,SAAS,CAAA;AAEhE,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAgBzJ"}
@@ -0,0 +1,2 @@
1
+ export { TClassFunction, TCallableClassFunction } from './types';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/class-function/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { TAny, TAnyFn } from '../types';
2
+ export interface TClassFunction<T extends TAnyFn = TAnyFn> {
3
+ handler: T;
4
+ }
5
+ export interface TClassFunctionConstructor<T extends TAnyFn = TAnyFn> {
6
+ new (...a: TAny[]): TClassFunction<T>;
7
+ }
8
+ export declare type TCallableClassFunction<T extends TAnyFn = TAnyFn> = T | TClassFunctionConstructor;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/class-function/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACrD,OAAO,EAAE,CAAC,CAAA;CACb;AAED,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAChE,KAAK,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;CACxC;AAED,oBAAY,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,yBAAyB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare function useCacheObject<T = unknown>(name: string, def: T): T;
2
+ export declare function setCacheObject(name: string, value: unknown): void;
3
+ //# sourceMappingURL=cache-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-object.d.ts","sourceRoot":"","sources":["../../../src/composables/cache-object.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAKnE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAI1D"}
@@ -0,0 +1,8 @@
1
+ import { TMoostMetadata } from '../metadata';
2
+ import { TObject } from '../types';
3
+ export declare function useControllerMeta<T extends TMoostMetadata = TMoostMetadata>(): {
4
+ getClassMeta: () => T | undefined;
5
+ getMethodMeta: () => T | undefined;
6
+ };
7
+ export declare function setComposableControllerContext(controller: TObject, method: string | symbol): void;
8
+ //# sourceMappingURL=controller-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller-meta.d.ts","sourceRoot":"","sources":["../../../src/composables/controller-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;;;EAO1E;AAED,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,QAG1F"}
@@ -0,0 +1,2 @@
1
+ export { useControllerMeta } from './controller-meta';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { TClassConstructor } from '../types';
2
+ export declare function Circular<T = unknown>(resolver: () => TClassConstructor<T>): ParameterDecorator;
3
+ //# sourceMappingURL=circular.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circular.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/circular.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAE9F"}
@@ -0,0 +1,4 @@
1
+ export declare function Label(value: string): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
2
+ export declare function Optional(): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
3
+ export declare function Required(): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
4
+ //# sourceMappingURL=common.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/common.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,6EAElC;AAED,wBAAgB,QAAQ,8EAEvB;AAED,wBAAgB,QAAQ,8EAevB"}
@@ -0,0 +1,6 @@
1
+ import { TProvideRegistry } from '@prostojs/infact';
2
+ import { TFunction, TObject } from '../types';
3
+ export declare function Controller(prefix?: string): ClassDecorator;
4
+ export declare function ImportController(controller: TFunction | TObject, provide?: TProvideRegistry): ClassDecorator;
5
+ export declare function ImportController(prefix: string, controller: TFunction | TObject, provide?: TProvideRegistry): ClassDecorator;
6
+ //# sourceMappingURL=controller.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/controller.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAE7C,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAA;AAE7G,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ export declare function HttpMethod(method: '*' | 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS', path?: string): MethodDecorator;
2
+ export declare const All: (path?: string) => MethodDecorator;
3
+ export declare const Get: (path?: string) => MethodDecorator;
4
+ export declare const Post: (path?: string) => MethodDecorator;
5
+ export declare const Put: (path?: string) => MethodDecorator;
6
+ export declare const Delete: (path?: string) => MethodDecorator;
7
+ export declare const Patch: (path?: string) => MethodDecorator;
8
+ //# sourceMappingURL=http-method.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/http-method.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,CAEzI;AAED,eAAO,MAAM,GAAG,UAAW,MAAM,oBAA0B,CAAA;AAE3D,eAAO,MAAM,GAAG,UAAW,MAAM,oBAA4B,CAAA;AAE7D,eAAO,MAAM,IAAI,UAAW,MAAM,oBAA6B,CAAA;AAE/D,eAAO,MAAM,GAAG,UAAW,MAAM,oBAA4B,CAAA;AAE7D,eAAO,MAAM,MAAM,UAAW,MAAM,oBAA+B,CAAA;AAEnE,eAAO,MAAM,KAAK,UAAW,MAAM,oBAA8B,CAAA"}
@@ -0,0 +1,10 @@
1
+ export * from './http-method.decorator';
2
+ export * from './resolve.decorator';
3
+ export * from './controller.decorator';
4
+ export * from './injectable.decorator';
5
+ export * from './circular.decorator';
6
+ export * from './intercept.decorator';
7
+ export * from './provide.decorator';
8
+ export * from './common.decorator';
9
+ export * from './validate.decorator';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { TInjectableScope } from '../metadata/moost-metadata';
2
+ export declare function Injectable(scope?: true | TInjectableScope): ClassDecorator;
3
+ //# sourceMappingURL=injectable.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectable.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/injectable.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,wBAAgB,UAAU,CAAC,KAAK,GAAE,IAAI,GAAG,gBAAuB,GAAG,cAAc,CAEhF"}
@@ -0,0 +1,20 @@
1
+ import { TCallableClassFunction } from '../class-function/types';
2
+ import { TAny } from '../types';
3
+ export declare type TInterceptorBefore = (reply: (response: TAny) => void) => void | Promise<void>;
4
+ export declare type TInterceptorAfter = (response: TAny, reply: (response: TAny) => void) => void | Promise<void>;
5
+ export declare type TInterceptorOnError = (error: Error, reply: (response: TAny) => void) => void | Promise<void>;
6
+ export declare type TInterceptorFn = {
7
+ (before: (fn: TInterceptorBefore) => void, after: (fn: TInterceptorAfter) => void, onError: (fn: TInterceptorOnError) => void): void | Promise<void>;
8
+ priority?: TInterceptorPriority;
9
+ };
10
+ export declare enum TInterceptorPriority {
11
+ BEFORE_ALL = 0,
12
+ BEFORE_GUARD = 1,
13
+ GUARD = 2,
14
+ AFTER_GUARD = 3,
15
+ INTERCEPTOR = 4,
16
+ CATCH_ERROR = 5,
17
+ AFTER_ALL = 6
18
+ }
19
+ export declare function Intercept(handler: TCallableClassFunction<TInterceptorFn>, priority?: TInterceptorPriority): ClassDecorator & MethodDecorator;
20
+ //# sourceMappingURL=intercept.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intercept.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/intercept.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,oBAAY,kBAAkB,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAC1F,oBAAY,iBAAiB,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACzG,oBAAY,mBAAmB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACzG,oBAAY,cAAc,GAAG;IAAC,CAC1B,MAAM,EAAE,CAAC,EAAE,EAAE,kBAAkB,KAAK,IAAI,EACxC,KAAK,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,EACtC,OAAO,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,IAAI,GACvC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAClC,CAAA;AAED,oBAAY,oBAAoB;IAC5B,UAAU,IAAA;IAEV,YAAY,IAAA;IACZ,KAAK,IAAA;IACL,WAAW,IAAA;IAEX,WAAW,IAAA;IAEX,WAAW,IAAA;IAEX,SAAS,IAAA;CACZ;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,sBAAsB,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,EAAE,oBAAoB,GAAG,cAAc,GAAG,eAAe,CAK5I"}
@@ -0,0 +1,3 @@
1
+ import { TPipeFn, TPipePriority } from '../pipes/types';
2
+ export declare function Pipe(handler: TPipeFn, priority?: TPipePriority): ClassDecorator & MethodDecorator & ParameterDecorator;
3
+ //# sourceMappingURL=pipe.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/pipe.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEvD,wBAAgB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,eAAe,GAAG,kBAAkB,CAKtH"}
@@ -0,0 +1,5 @@
1
+ import { TProvideFn } from '@prostojs/infact';
2
+ import { TClassConstructor } from '../types';
3
+ export declare function Provide(type: string | TClassConstructor, fn: TProvideFn): ClassDecorator;
4
+ export declare function Inject(type: string | TClassConstructor): ParameterDecorator;
5
+ //# sourceMappingURL=provide.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/provide.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,EAAE,EAAE,UAAU,GAAG,cAAc,CAMxF;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,kBAAkB,CAE3E"}
@@ -0,0 +1,21 @@
1
+ export declare function Resolve(resolver: () => unknown, label?: string): ParameterDecorator;
2
+ export declare function Header(name: string): ParameterDecorator;
3
+ export declare function Cookie(name: string): ParameterDecorator;
4
+ export declare function Param(name: string): ParameterDecorator;
5
+ export declare function Params(): ParameterDecorator;
6
+ export declare function Query(name?: string): ParameterDecorator;
7
+ export declare function Url(): ParameterDecorator;
8
+ export declare function Method(): ParameterDecorator;
9
+ export declare function Req(): ParameterDecorator;
10
+ export declare function ReqId(): ParameterDecorator;
11
+ export declare function Ip(opts?: {
12
+ trustProxy: boolean;
13
+ }): ParameterDecorator;
14
+ export declare function IpList(): ParameterDecorator;
15
+ export declare function Res(options?: {
16
+ passthrough: boolean;
17
+ }): ParameterDecorator;
18
+ export declare function Const(value: unknown, label?: string): ParameterDecorator;
19
+ export declare function Body(): ParameterDecorator;
20
+ export declare function RawBody(): ParameterDecorator;
21
+ //# sourceMappingURL=resolve.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/resolve.decorator.ts"],"names":[],"mappings":"AAKA,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAKnF;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,sBAKlC;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,sBAElC;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,sBAEjC;AAED,wBAAgB,MAAM,uBAErB;AAED,wBAAgB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAYvD;AAED,wBAAgB,GAAG,uBAElB;AAED,wBAAgB,MAAM,uBAErB;AAED,wBAAgB,GAAG,uBAElB;AAED,wBAAgB,KAAK,uBAEpB;AAED,wBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,sBAEhD;AAED,wBAAgB,MAAM,uBAErB;AAED,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE,sBAErD;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,sBAEnD;AAED,wBAAgB,IAAI,uBAEnB;AAED,wBAAgB,OAAO,uBAEtB"}
@@ -0,0 +1,7 @@
1
+ export declare class CircularTestClassA {
2
+ }
3
+ export declare class CircularTestClassB {
4
+ private a;
5
+ constructor(a: CircularTestClassA);
6
+ }
7
+ //# sourceMappingURL=circular.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circular.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/circular.artifacts.ts"],"names":[],"mappings":"AAEA,qBAAa,kBAAkB;CAE9B;AAED,qBAAa,kBAAkB;IACqB,OAAO,CAAC,CAAC;gBAAD,CAAC,EAAE,kBAAkB;CAChF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=circular.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circular.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/circular.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare class CommonDecoratorsTestClass {
2
+ method(_labelled: string, _optional: string): void;
3
+ }
4
+ //# sourceMappingURL=common.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/common.artifacts.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAAyB;IAClC,MAAM,CAEE,SAAS,EAAE,MAAM,EAEjB,SAAS,EAAE,MAAM;CAE5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/common.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=controller.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/controller.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export declare class HttpMethodTestClass {
2
+ root(): void;
3
+ test(): void;
4
+ all(): void;
5
+ get(): void;
6
+ put(): void;
7
+ post(): void;
8
+ delete(): void;
9
+ patch(): void;
10
+ options(): void;
11
+ }
12
+ //# sourceMappingURL=http-method.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/http-method.artifacts.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE5B,IAAI;IAGJ,IAAI;IAGJ,GAAG;IAGH,GAAG;IAGH,GAAG;IAGH,IAAI;IAGJ,MAAM;IAGN,KAAK;IAGL,OAAO;CACV"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=http-method.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/http-method.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=injectable.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectable.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/injectable.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=intercept.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intercept.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/intercept.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare class PipeDecoratorTestClass {
2
+ method(a: string): void;
3
+ }
4
+ //# sourceMappingURL=pipe.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/pipe.artifacts.ts"],"names":[],"mappings":"AAEA,qBACa,sBAAsB;IAE/B,MAAM,CAEE,CAAC,EAAE,MAAM;CAEpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pipe.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/pipe.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare class ToInjectTestClass {
2
+ type: string;
3
+ constructor(type: string);
4
+ }
5
+ export declare class ProvideTestClass {
6
+ a: ToInjectTestClass;
7
+ constructor(a: ToInjectTestClass);
8
+ }
9
+ //# sourceMappingURL=provide.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/provide.artifacts.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IACP,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM;CAClC;AAED,qBAEa,gBAAgB;IACqB,CAAC,EAAE,iBAAiB;gBAApB,CAAC,EAAE,iBAAiB;CACrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provide.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/provide.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare class ResolveDecoratorsTestClass {
2
+ method(_p0: string, _p1: string, _p2: string, _p3: string, _p4: string, _p5: string, _p6: string, _p7: string, _p8: string, _p9: string, _p10: string, _p11: string, _p12: string): void;
3
+ }
4
+ //# sourceMappingURL=resolve.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/resolve.artifacts.ts"],"names":[],"mappings":"AAiBA,qBAAa,0BAA0B;IACnC,MAAM,CACyB,GAAG,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACR,GAAG,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACP,IAAI,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACT,IAAI,EAAE,MAAM;CAE9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resolve.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/resolve.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export declare class ValidateDecoratorTestClass {
2
+ prop: string;
3
+ }
4
+ export declare class ValidateDecoratorTestIsTypeOfClass {
5
+ prop: string;
6
+ }
7
+ export declare class ValidateDecoratorTestStringClass {
8
+ prop: string;
9
+ }
10
+ export declare class ValidateDecoratorTestNumberClass {
11
+ prop: number;
12
+ }
13
+ export declare class ValidateDecoratorTestBooleanClass {
14
+ prop: boolean;
15
+ }
16
+ export declare class ValidateDecoratorTestArrayClass {
17
+ prop: string[];
18
+ propStr: string[];
19
+ propTuple: [ValidateDecoratorTestNumberClass, ValidateDecoratorTestBooleanClass];
20
+ }
21
+ //# sourceMappingURL=validate.artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.artifacts.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/validate.artifacts.ts"],"names":[],"mappings":"AAGA,qBACa,0BAA0B;IAEnC,IAAI,EAAE,MAAM,CAAK;CACpB;AAED,qBACa,kCAAkC;IAE3C,IAAI,EAAE,MAAM,CAAK;CACpB;AAED,qBACa,gCAAgC;IAMzC,IAAI,EAAE,MAAM,CAAK;CACpB;AAED,qBACa,gCAAgC;IAMzC,IAAI,EAAE,MAAM,CAAI;CACnB;AAED,qBACa,iCAAiC;IAE1C,IAAI,EAAE,OAAO,CAAQ;CACxB;AAED,qBACa,+BAA+B;IAKxC,IAAI,EAAE,MAAM,EAAE,CAAK;IAKnB,OAAO,EAAE,MAAM,EAAE,CAAK;IAKtB,SAAS,EAAE,CAAC,gCAAgC,EAAE,iCAAiC,CAAC,CAAoF;CACvK"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validate.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.spec.d.ts","sourceRoot":"","sources":["../../../../src/decorators/tests/validate.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { TValidoDtoOptions, TValidoFn, validoIsBoolean, validoIsNumber, validoIsString } from '@prostojs/valido';
2
+ import { TValidateArrayOptions } from '../metadata/moost-metadata';
3
+ export declare function Dto(dtoOptions?: TValidoDtoOptions): ClassDecorator;
4
+ export declare function Validate<T = unknown>(validator: TValidoFn<T>): PropertyDecorator & ParameterDecorator;
5
+ export declare function IsArray<T = unknown>(opts?: TValidateArrayOptions<T>): PropertyDecorator & ParameterDecorator;
6
+ export declare function IsTypeOf(type: 'string' | 'object' | 'number' | 'boolean', errorText?: string): PropertyDecorator & ParameterDecorator;
7
+ export declare function IsString(...args: Parameters<typeof validoIsString>): PropertyDecorator & ParameterDecorator;
8
+ export declare function IsNumber(...args: Parameters<typeof validoIsNumber>): PropertyDecorator & ParameterDecorator;
9
+ export declare function IsBoolean(...args: Parameters<typeof validoIsBoolean>): PropertyDecorator & ParameterDecorator;
10
+ //# sourceMappingURL=validate.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.decorator.d.ts","sourceRoot":"","sources":["../../../src/decorators/validate.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAkB,MAAM,kBAAkB,CAAA;AAChI,OAAO,EAAgB,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEhF,wBAAgB,GAAG,CAAC,UAAU,GAAE,iBAAsB,GAAG,cAAc,CAEtE;AAID,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAErG;AAED,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAY5G;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,kBAAkB,CAErI;AAED,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAE3G;AAED,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAE3G;AAED,wBAAgB,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAE7G"}
@@ -0,0 +1,7 @@
1
+ export * from './moost';
2
+ export * from './decorators';
3
+ export * from './composables';
4
+ export * from './pipes';
5
+ export * from './metadata';
6
+ export * from './class-function';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './moost-metadata';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { Infact, TInfactClassMeta, TInfactConstructorParamMeta } from '@prostojs/infact';
2
+ import { TMoostParamsMetadata } from './moost-metadata';
3
+ declare type TInfactMoostMeta = TInfactClassMeta<TMoostParamsMetadata & TInfactConstructorParamMeta>;
4
+ export declare function getMoostInfact(): Infact<TInfactMoostMeta>;
5
+ export declare function getNewMoostInfact(): Infact<TInfactMoostMeta>;
6
+ export {};
7
+ //# sourceMappingURL=infact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infact.d.ts","sourceRoot":"","sources":["../../../src/metadata/infact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAGxF,OAAO,EAAgB,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAErE,aAAK,gBAAgB,GAAG,gBAAgB,CAAC,oBAAoB,GAAG,2BAA2B,CAAC,CAAA;AAI5F,wBAAgB,cAAc,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAEzD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAoB5D"}
@@ -0,0 +1,62 @@
1
+ import { TInterceptorFn, TInterceptorPriority } from '../decorators/intercept.decorator';
2
+ import { Mate, TProstoParamsMetadata, TProstoMetadata } from '@prostojs/mate';
3
+ import { TAny, TClassConstructor, TFunction, TObject } from '../types';
4
+ import { TProvideRegistry } from '@prostojs/infact';
5
+ import { TPipeData } from '../pipes';
6
+ import { TCallableClassFunction } from '../class-function/types';
7
+ import { TValidoDtoOptions, TValidoFn } from '@prostojs/valido';
8
+ interface TCommonMetaFields {
9
+ label?: string;
10
+ optional?: boolean;
11
+ required?: boolean;
12
+ }
13
+ interface TCommonMoostMeta {
14
+ pipes?: TPipeData[];
15
+ }
16
+ declare type TProstoParamsAndCommonMetadata = TProstoParamsMetadata & TCommonMetaFields & TCommonMoostMeta;
17
+ declare type TProstoAndCommonMetadata<T extends TMoostParamsMetadata = TMoostParamsMetadata> = TProstoMetadata<T> & TCommonMetaFields & TCommonMoostMeta;
18
+ export interface TValidateArrayOptions<T = unknown> {
19
+ itemType?: (item: T, index: number) => Promise<TFunction> | TFunction;
20
+ itemValidators?: () => (PropertyDecorator | ParameterDecorator)[];
21
+ minLength?: number;
22
+ maxLength?: number;
23
+ }
24
+ export declare type TInjectableScope = 'FOR_REQUEST' | 'SINGLETON';
25
+ export interface TMoostMetadata extends TProstoAndCommonMetadata {
26
+ inherit?: boolean;
27
+ dto?: TValidoDtoOptions;
28
+ requiredProps?: (string | symbol)[];
29
+ controller?: {
30
+ prefix?: string;
31
+ };
32
+ importController?: {
33
+ prefix?: string;
34
+ typeResolver?: TClassConstructor | (() => TClassConstructor | TObject | Promise<TClassConstructor | TObject>);
35
+ provide?: TProvideRegistry;
36
+ }[];
37
+ injectable?: true | TInjectableScope;
38
+ interceptors?: TInterceptorData[];
39
+ httpHandler?: {
40
+ method: '*' | 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
41
+ path: string;
42
+ }[];
43
+ validators?: TValidoFn[];
44
+ validatorsOfItem?: TValidoFn[];
45
+ arrayType?: true | TValidateArrayOptions;
46
+ provide?: TProvideRegistry;
47
+ }
48
+ export interface TInterceptorData {
49
+ handler: TCallableClassFunction<TInterceptorFn>;
50
+ priority: TInterceptorPriority;
51
+ }
52
+ export interface TMoostParamsMetadata extends TProstoParamsAndCommonMetadata {
53
+ validators?: TValidoFn[];
54
+ validatorsOfItem?: TValidoFn[];
55
+ arrayType?: true | TValidateArrayOptions;
56
+ resolver?: TFunction;
57
+ circular?: () => TAny;
58
+ inject?: string | symbol;
59
+ }
60
+ export declare function getMoostMate(): Mate<TMoostMetadata>;
61
+ export {};
62
+ //# sourceMappingURL=moost-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moost-metadata.d.ts","sourceRoot":"","sources":["../../../src/metadata/moost-metadata.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import { Valido } from '@prostojs/valido';
2
+ export declare function getMoostValido(): Valido;
3
+ //# sourceMappingURL=valido.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valido.d.ts","sourceRoot":"","sources":["../../../src/metadata/valido.ts"],"names":[],"mappings":"AACA,OAAO,EAAoC,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAmB3E,wBAAgB,cAAc,WAE7B"}