nestjs-typeorm3-kit 0.1.1

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 (81) hide show
  1. package/dist/@types/index.d.ts +17 -0
  2. package/dist/@types/index.d.ts.map +1 -0
  3. package/dist/@types/index.js +15 -0
  4. package/dist/@types/index.js.map +1 -0
  5. package/dist/common/decorator/index.d.ts +3 -0
  6. package/dist/common/decorator/index.d.ts.map +1 -0
  7. package/dist/common/decorator/index.js +39 -0
  8. package/dist/common/decorator/index.js.map +1 -0
  9. package/dist/common/index.d.ts +2 -0
  10. package/dist/common/index.d.ts.map +1 -0
  11. package/dist/common/index.js +18 -0
  12. package/dist/common/index.js.map +1 -0
  13. package/dist/controller/decorator/index.d.ts +10 -0
  14. package/dist/controller/decorator/index.d.ts.map +1 -0
  15. package/dist/controller/decorator/index.js +141 -0
  16. package/dist/controller/decorator/index.js.map +1 -0
  17. package/dist/controller/index.d.ts +2 -0
  18. package/dist/controller/index.d.ts.map +1 -0
  19. package/dist/controller/index.js +18 -0
  20. package/dist/controller/index.js.map +1 -0
  21. package/dist/index.d.ts +8 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +24 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/module/decorator/index.d.ts +6 -0
  26. package/dist/module/decorator/index.d.ts.map +1 -0
  27. package/dist/module/decorator/index.js +51 -0
  28. package/dist/module/decorator/index.js.map +1 -0
  29. package/dist/module/index.d.ts +2 -0
  30. package/dist/module/index.d.ts.map +1 -0
  31. package/dist/module/index.js +18 -0
  32. package/dist/module/index.js.map +1 -0
  33. package/dist/repository/config/constants.d.ts +5 -0
  34. package/dist/repository/config/constants.d.ts.map +1 -0
  35. package/dist/repository/config/constants.js +8 -0
  36. package/dist/repository/config/constants.js.map +1 -0
  37. package/dist/repository/config/index.d.ts +4 -0
  38. package/dist/repository/config/index.d.ts.map +1 -0
  39. package/dist/repository/config/index.js +20 -0
  40. package/dist/repository/config/index.js.map +1 -0
  41. package/dist/repository/config/types.d.ts +5 -0
  42. package/dist/repository/config/types.d.ts.map +1 -0
  43. package/dist/repository/config/types.js +3 -0
  44. package/dist/repository/config/types.js.map +1 -0
  45. package/dist/repository/config/utils.d.ts +6 -0
  46. package/dist/repository/config/utils.d.ts.map +1 -0
  47. package/dist/repository/config/utils.js +93 -0
  48. package/dist/repository/config/utils.js.map +1 -0
  49. package/dist/repository/decorator/index.d.ts +7 -0
  50. package/dist/repository/decorator/index.d.ts.map +1 -0
  51. package/dist/repository/decorator/index.js +16 -0
  52. package/dist/repository/decorator/index.js.map +1 -0
  53. package/dist/repository/index.d.ts +4 -0
  54. package/dist/repository/index.d.ts.map +1 -0
  55. package/dist/repository/index.js +20 -0
  56. package/dist/repository/index.js.map +1 -0
  57. package/dist/repository/module/index.d.ts +25 -0
  58. package/dist/repository/module/index.d.ts.map +1 -0
  59. package/dist/repository/module/index.js +134 -0
  60. package/dist/repository/module/index.js.map +1 -0
  61. package/dist/transaction/decorator/index.d.ts +7 -0
  62. package/dist/transaction/decorator/index.d.ts.map +1 -0
  63. package/dist/transaction/decorator/index.js +32 -0
  64. package/dist/transaction/decorator/index.js.map +1 -0
  65. package/dist/transaction/index.d.ts +3 -0
  66. package/dist/transaction/index.d.ts.map +1 -0
  67. package/dist/transaction/index.js +19 -0
  68. package/dist/transaction/index.js.map +1 -0
  69. package/dist/transaction/setup/index.d.ts +2 -0
  70. package/dist/transaction/setup/index.d.ts.map +1 -0
  71. package/dist/transaction/setup/index.js +8 -0
  72. package/dist/transaction/setup/index.js.map +1 -0
  73. package/dist/validate/decorator/index.d.ts +9 -0
  74. package/dist/validate/decorator/index.d.ts.map +1 -0
  75. package/dist/validate/decorator/index.js +48 -0
  76. package/dist/validate/decorator/index.js.map +1 -0
  77. package/dist/validate/index.d.ts +2 -0
  78. package/dist/validate/index.d.ts.map +1 -0
  79. package/dist/validate/index.js +18 -0
  80. package/dist/validate/index.js.map +1 -0
  81. package/package.json +61 -0
@@ -0,0 +1,17 @@
1
+ import { HttpStatus, Type } from '@nestjs/common';
2
+ export type TRepoClass = {
3
+ getConnectionName: any;
4
+ new (...args: any[]): any;
5
+ };
6
+ export type TClass = {
7
+ new (...args: any[]): any;
8
+ };
9
+ export declare class MethodGetOptions {
10
+ summary?: string;
11
+ statusCode?: HttpStatus;
12
+ responseType?: Type<unknown> | Function | [Function] | string;
13
+ }
14
+ export declare class MethodOptions extends MethodGetOptions {
15
+ bodyType?: Type<unknown> | Function | [Function] | string;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/@types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG;IAAE,iBAAiB,EAAE,GAAG,CAAC;IAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;CAAE,CAAC;AAC/E,MAAM,MAAM,MAAM,GAAG;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;CAAE,CAAC;AAEnD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAM;IACtB,UAAU,CAAC,EAAE,UAAU,CAAiB;IACxC,YAAY,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;CAC/D;AAED,qBAAa,aAAc,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;CAC3D"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MethodOptions = exports.MethodGetOptions = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ class MethodGetOptions {
6
+ constructor() {
7
+ this.summary = '';
8
+ this.statusCode = common_1.HttpStatus.OK;
9
+ }
10
+ }
11
+ exports.MethodGetOptions = MethodGetOptions;
12
+ class MethodOptions extends MethodGetOptions {
13
+ }
14
+ exports.MethodOptions = MethodOptions;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/@types/index.ts"],"names":[],"mappings":";;;AAAA,2CAAkD;AAKlD,MAAa,gBAAgB;IAA7B;QACE,YAAO,GAAY,EAAE,CAAC;QACtB,eAAU,GAAgB,mBAAU,CAAC,EAAE,CAAC;IAE1C,CAAC;CAAA;AAJD,4CAIC;AAED,MAAa,aAAc,SAAQ,gBAAgB;CAElD;AAFD,sCAEC"}
@@ -0,0 +1,3 @@
1
+ export declare function Emoji(): (target: Object, key: string | symbol) => void;
2
+ export declare function NewClass(): ClassDecorator;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/decorator/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,KACF,QAAQ,MAAM,EAAE,KAAK,MAAM,GAAG,MAAM,UAkBtD;AAED,wBAAgB,QAAQ,IAAI,cAAc,CAwBzC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Emoji = Emoji;
4
+ exports.NewClass = NewClass;
5
+ function Emoji() {
6
+ return function (target, key) {
7
+ let val = target[key];
8
+ const getter = () => {
9
+ return val;
10
+ };
11
+ const setter = (next) => {
12
+ val = `🍦 ${next} 🍦`;
13
+ };
14
+ Object.defineProperty(target, key, {
15
+ get: getter,
16
+ set: setter,
17
+ enumerable: true,
18
+ configurable: true,
19
+ });
20
+ };
21
+ }
22
+ function NewClass() {
23
+ return function (target) {
24
+ const original = target;
25
+ function construct(constructor, args) {
26
+ const c = function () {
27
+ return constructor.apply(this, args);
28
+ };
29
+ c.prototype = constructor.prototype;
30
+ return new c();
31
+ }
32
+ const newConstructor = function (...args) {
33
+ return construct(original, args);
34
+ };
35
+ newConstructor.prototype = original.prototype;
36
+ return newConstructor;
37
+ };
38
+ }
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/decorator/index.ts"],"names":[],"mappings":";;AAAA,sBAmBC;AAED,4BAwBC;AA7CD,SAAgB,KAAK;IACnB,OAAO,UAAU,MAAc,EAAE,GAAoB;QACnD,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAEtB,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,OAAO,GAAG,CAAC;QACb,CAAC,CAAC;QACF,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE;YAEtB,GAAG,GAAG,MAAM,IAAI,KAAK,CAAC;QACxB,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;YACjC,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;YACX,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,QAAQ;IACtB,OAAO,UAAU,MAAgB;QAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,SAAS,SAAS,CAAC,WAAqB,EAAE,IAAW;YACnD,MAAM,CAAC,GAAQ;gBACb,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACvC,CAAC,CAAC;YACF,CAAC,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;YACpC,OAAO,IAAI,CAAC,EAAE,CAAC;QACjB,CAAC;QAGD,MAAM,cAAc,GAAQ,UAAU,GAAG,IAAW;YAElD,OAAO,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnC,CAAC,CAAC;QAGF,cAAc,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;QAG9C,OAAO,cAAc,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './decorator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,18 @@
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("./decorator"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
@@ -0,0 +1,10 @@
1
+ import { ControllerOptions } from '@nestjs/common';
2
+ import { MethodGetOptions, MethodOptions } from '../../@types';
3
+ export declare function DefController(prefix?: string | string[]): ClassDecorator;
4
+ export declare function DefController(options: ControllerOptions): ClassDecorator;
5
+ export declare function DefGet(path?: string | string[], options?: MethodGetOptions): MethodDecorator;
6
+ export declare function DefPost(path?: string | string[], options?: MethodOptions): MethodDecorator;
7
+ export declare function DefPut(path?: string | string[], options?: MethodOptions): MethodDecorator;
8
+ export declare function DefPatch(path?: string | string[], options?: MethodOptions): MethodDecorator;
9
+ export declare function DefDelete(path?: string | string[], options?: MethodOptions): MethodDecorator;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controller/decorator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/D,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC;AAC1E,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,CAAC;AAc1E,wBAAgB,MAAM,CACpB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,gBAAyC,GACjD,eAAe,CAwBjB;AAED,wBAAgB,OAAO,CACrB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,aAAmC,GAC3C,eAAe,CAgCjB;AAED,wBAAgB,MAAM,CACpB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,aAAmC,GAC3C,eAAe,CAgCjB;AAED,wBAAgB,QAAQ,CACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,aAAmC,GAC3C,eAAe,CAgCjB;AAED,wBAAgB,SAAS,CACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,OAAO,GAAE,aAAmC,GAC3C,eAAe,CAgCjB"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefController = DefController;
4
+ exports.DefGet = DefGet;
5
+ exports.DefPost = DefPost;
6
+ exports.DefPut = DefPut;
7
+ exports.DefPatch = DefPatch;
8
+ exports.DefDelete = DefDelete;
9
+ const common_1 = require("@nestjs/common");
10
+ const constants_1 = require("@nestjs/common/constants");
11
+ const swagger_1 = require("@nestjs/swagger");
12
+ const _types_1 = require("../../@types");
13
+ function DefController(options) {
14
+ return (target) => {
15
+ const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH, target);
16
+ const pathMetadata = Reflect.getMetadata(constants_1.PATH_METADATA, target);
17
+ console.log('-------------------');
18
+ console.log(JSON.stringify({ modulePath, pathMetadata }));
19
+ console.log('-------------------');
20
+ (0, swagger_1.ApiBearerAuth)()(target);
21
+ (0, common_1.Controller)(options)(target);
22
+ };
23
+ }
24
+ function DefGet(path, options = new _types_1.MethodGetOptions()) {
25
+ return function (target, propertyKey, descriptor) {
26
+ const { statusCode = common_1.HttpStatus.OK, summary, responseType = undefined } = options;
27
+ const output = {
28
+ ...(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor),
29
+ ...(0, swagger_1.ApiOperation)({ summary })(target, propertyKey, descriptor),
30
+ ...(0, common_1.Get)(path)(target, propertyKey, descriptor),
31
+ };
32
+ if (responseType) {
33
+ Object.assign(output, {
34
+ ...(0, swagger_1.ApiResponse)({ status: statusCode, type: responseType })(target, propertyKey, descriptor),
35
+ });
36
+ }
37
+ else {
38
+ Object.assign(output, {
39
+ ...(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor),
40
+ });
41
+ }
42
+ return output;
43
+ };
44
+ }
45
+ function DefPost(path, options = new _types_1.MethodOptions()) {
46
+ return function (target, propertyKey, descriptor) {
47
+ const { statusCode = common_1.HttpStatus.OK, summary, responseType = undefined, bodyType = undefined, } = options;
48
+ const output = {
49
+ ...(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor),
50
+ ...(0, swagger_1.ApiOperation)({ summary })(target, propertyKey, descriptor),
51
+ ...(0, common_1.Post)(path)(target, propertyKey, descriptor),
52
+ };
53
+ if (responseType) {
54
+ Object.assign(output, {
55
+ ...(0, swagger_1.ApiResponse)({ status: statusCode, type: responseType })(target, propertyKey, descriptor),
56
+ });
57
+ }
58
+ else {
59
+ Object.assign(output, {
60
+ ...(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor),
61
+ });
62
+ }
63
+ if (bodyType) {
64
+ Object.assign(output, { ...(0, swagger_1.ApiBody)({ type: bodyType })(target, propertyKey, descriptor) });
65
+ }
66
+ return output;
67
+ };
68
+ }
69
+ function DefPut(path, options = new _types_1.MethodOptions()) {
70
+ return function (target, propertyKey, descriptor) {
71
+ const { statusCode = common_1.HttpStatus.OK, summary, responseType = undefined, bodyType = undefined, } = options;
72
+ const output = {
73
+ ...(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor),
74
+ ...(0, swagger_1.ApiOperation)({ summary })(target, propertyKey, descriptor),
75
+ ...(0, common_1.Put)(path)(target, propertyKey, descriptor),
76
+ };
77
+ if (responseType) {
78
+ Object.assign(output, {
79
+ ...(0, swagger_1.ApiResponse)({ status: statusCode, type: responseType })(target, propertyKey, descriptor),
80
+ });
81
+ }
82
+ else {
83
+ Object.assign(output, {
84
+ ...(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor),
85
+ });
86
+ }
87
+ if (bodyType) {
88
+ Object.assign(output, { ...(0, swagger_1.ApiBody)({ type: bodyType })(target, propertyKey, descriptor) });
89
+ }
90
+ return output;
91
+ };
92
+ }
93
+ function DefPatch(path, options = new _types_1.MethodOptions()) {
94
+ return function (target, propertyKey, descriptor) {
95
+ const { statusCode = common_1.HttpStatus.OK, summary, responseType = undefined, bodyType = undefined, } = options;
96
+ const output = {
97
+ ...(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor),
98
+ ...(0, swagger_1.ApiOperation)({ summary })(target, propertyKey, descriptor),
99
+ ...(0, common_1.Patch)(path)(target, propertyKey, descriptor),
100
+ };
101
+ if (responseType) {
102
+ Object.assign(output, {
103
+ ...(0, swagger_1.ApiResponse)({ status: statusCode, type: responseType })(target, propertyKey, descriptor),
104
+ });
105
+ }
106
+ else {
107
+ Object.assign(output, {
108
+ ...(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor),
109
+ });
110
+ }
111
+ if (bodyType) {
112
+ Object.assign(output, { ...(0, swagger_1.ApiBody)({ type: bodyType })(target, propertyKey, descriptor) });
113
+ }
114
+ return output;
115
+ };
116
+ }
117
+ function DefDelete(path, options = new _types_1.MethodOptions()) {
118
+ return function (target, propertyKey, descriptor) {
119
+ const { statusCode = common_1.HttpStatus.OK, summary, responseType = undefined, bodyType = undefined, } = options;
120
+ const output = {
121
+ ...(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor),
122
+ ...(0, swagger_1.ApiOperation)({ summary })(target, propertyKey, descriptor),
123
+ ...(0, common_1.Delete)(path)(target, propertyKey, descriptor),
124
+ };
125
+ if (responseType) {
126
+ Object.assign(output, {
127
+ ...(0, swagger_1.ApiResponse)({ status: statusCode, type: responseType })(target, propertyKey, descriptor),
128
+ });
129
+ }
130
+ else {
131
+ Object.assign(output, {
132
+ ...(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor),
133
+ });
134
+ }
135
+ if (bodyType) {
136
+ Object.assign(output, { ...(0, swagger_1.ApiBody)({ type: bodyType })(target, propertyKey, descriptor) });
137
+ }
138
+ return output;
139
+ };
140
+ }
141
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controller/decorator/index.ts"],"names":[],"mappings":";;AAiBA,sCAWC;AAED,wBA2BC;AAED,0BAmCC;AAED,wBAmCC;AAED,4BAmCC;AAED,8BAmCC;AA7MD,2CAUwB;AACxB,wDAAsE;AACtE,6CAAoF;AACpF,yCAA+D;AAI/D,SAAgB,aAAa,CAAC,OAAY;IACxC,OAAO,CAAC,MAAgB,EAAE,EAAE;QAC1B,MAAM,UAAU,GAAG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AAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC;aACxE,CAAC,CAAC;QACL,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,GAAG,IAAA,iBAAO,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './decorator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,18 @@
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("./decorator"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
@@ -0,0 +1,8 @@
1
+ export * from './@types';
2
+ export * from './controller';
3
+ export * from './module';
4
+ export * from './validate';
5
+ export * from './common';
6
+ export * from './repository';
7
+ export * from './transaction';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
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("./@types"), exports);
18
+ __exportStar(require("./controller"), exports);
19
+ __exportStar(require("./module"), exports);
20
+ __exportStar(require("./validate"), exports);
21
+ __exportStar(require("./common"), exports);
22
+ __exportStar(require("./repository"), exports);
23
+ __exportStar(require("./transaction"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B"}
@@ -0,0 +1,6 @@
1
+ import { ModuleMetadata } from '@nestjs/common/interfaces';
2
+ export interface IChildModuleMetadata extends ModuleMetadata {
3
+ prefix?: string;
4
+ }
5
+ export declare function ChildModule(childMetadata?: IChildModuleMetadata): ClassDecorator;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/module/decorator/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAyBD,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,oBAAoB,GAAG,cAAc,CA2BhF"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChildModule = ChildModule;
4
+ const validate_module_keys_util_1 = require("@nestjs/common/utils/validate-module-keys.util");
5
+ const constants_1 = require("@nestjs/common/constants");
6
+ const swagger_1 = require("@nestjs/swagger");
7
+ const PREFIX_METADATA = '__prefix___';
8
+ function fixPath(strInput) {
9
+ let path = strInput;
10
+ const regex = new RegExp('//', 'g');
11
+ while (path.includes('//')) {
12
+ path = path.replace(regex, '/');
13
+ }
14
+ const regexConfig = /(^\/+|\/+$)/gm;
15
+ return path.replace(regexConfig, '');
16
+ }
17
+ const toPascalCase = (str) => {
18
+ return str
19
+ .replace(new RegExp(/[-_]+/, 'g'), ' ')
20
+ .replace(new RegExp(/[^\w\s]/, 'g'), '')
21
+ .replace(new RegExp(/\s+(.)(\w+)/, 'g'), ($1, $2, $3) => `${$2.toUpperCase() + $3.toLowerCase()}`)
22
+ .replace(new RegExp(/\s/, 'g'), '')
23
+ .replace(new RegExp(/\w/), s => s.toUpperCase());
24
+ };
25
+ function ChildModule(childMetadata) {
26
+ let { prefix = '', ...metadata } = childMetadata;
27
+ const propsKeys = Object.keys(metadata);
28
+ (0, validate_module_keys_util_1.validateModuleKeys)(propsKeys);
29
+ return target => {
30
+ console.log('=====ChildModule=====');
31
+ for (const property in metadata) {
32
+ if (metadata.hasOwnProperty(property)) {
33
+ Reflect.defineMetadata(property, metadata[property], target);
34
+ }
35
+ }
36
+ const defPrefix = fixPath(prefix);
37
+ Reflect.defineMetadata(constants_1.MODULE_PATH, defPrefix ? '/' + defPrefix : defPrefix, target);
38
+ const data = metadata['imports'] || [];
39
+ data.forEach(item => {
40
+ const childPath = Reflect.getMetadata(constants_1.MODULE_PATH, item) || '';
41
+ const mixPath = fixPath(defPrefix + childPath);
42
+ Reflect.defineMetadata(constants_1.MODULE_PATH, mixPath ? '/' + mixPath : mixPath, item);
43
+ });
44
+ const controllers = metadata['controllers'] || [];
45
+ controllers.forEach(ctr => {
46
+ const groupName = prefix ? `[${toPascalCase(prefix)}] ${ctr.name}` : `[API]${ctr.name}`;
47
+ (0, swagger_1.ApiTags)(groupName)(ctr);
48
+ });
49
+ };
50
+ }
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/module/decorator/index.ts"],"names":[],"mappings":";;AAgCA,kCA2BC;AA3DD,8FAAoF;AACpF,wDAAuD;AAEvD,6CAA0C;AAK1C,MAAM,eAAe,GAAG,aAAa,CAAC;AACtC,SAAS,OAAO,CAAC,QAAgB;IAC/B,IAAI,IAAI,GAAG,QAAQ,CAAC;IACpB,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,WAAW,GAAG,eAAe,CAAC;IACpC,OAAO,IAAI,CAAC,OAA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,OAAO,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,CAAC,cAAc,CAAC,uBAAW,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACrF,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,uBAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;YAE/D,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;YAC/C,OAAO,CAAC,cAAc,CAAC,uBAAW,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;QACH,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAClD,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAExB,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;YACxF,IAAA,iBAAO,EAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './decorator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/module/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,18 @@
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("./decorator"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/module/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
@@ -0,0 +1,5 @@
1
+ export declare const ENTITY_METADATA_KEY = "custom-repo:entity";
2
+ export declare const DEFAULT_CONNECTION_NAME = "default";
3
+ export declare const DEF_REPO_DYNAMIC_PROVIDERS = "DEF_REPO_DYNAMIC_PROVIDERS";
4
+ export declare const DEF_REPOSITORY_OPTIONS = "DEF_REPOSITORY_OPTIONS";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/repository/config/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEF_REPOSITORY_OPTIONS = exports.DEF_REPO_DYNAMIC_PROVIDERS = exports.DEFAULT_CONNECTION_NAME = exports.ENTITY_METADATA_KEY = void 0;
4
+ exports.ENTITY_METADATA_KEY = 'custom-repo:entity';
5
+ exports.DEFAULT_CONNECTION_NAME = 'default';
6
+ exports.DEF_REPO_DYNAMIC_PROVIDERS = 'DEF_REPO_DYNAMIC_PROVIDERS';
7
+ exports.DEF_REPOSITORY_OPTIONS = 'DEF_REPOSITORY_OPTIONS';
8
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/repository/config/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,oBAAoB,CAAC;AAC3C,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACpC,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,sBAAsB,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './constants';
2
+ export * from './types';
3
+ export * from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repository/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,20 @@
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("./constants"), exports);
18
+ __exportStar(require("./types"), exports);
19
+ __exportStar(require("./utils"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repository/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,5 @@
1
+ import { EntityManager, EntityTarget, ObjectLiteral, QueryRunner, Repository as TypeOrmRepository } from 'typeorm';
2
+ export interface Repository extends Function {
3
+ new (target: EntityTarget<any>, manager: EntityManager, queryRunner?: QueryRunner): TypeOrmRepository<ObjectLiteral>;
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/repository/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,IAAI,iBAAiB,EAChC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAC1C,KACE,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,EACzB,OAAO,EAAE,aAAa,EACtB,WAAW,CAAC,EAAE,WAAW,GACxB,iBAAiB,CAAC,aAAa,CAAC,CAAC;CACrC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/repository/config/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { DataSource, DataSourceOptions } from 'typeorm';
2
+ import { Repository } from './types';
3
+ export declare function getDefRepositoryToken(repository: Repository, dataSource?: string | DataSource | DataSourceOptions): string | Repository;
4
+ export declare function getEntityByRepository(repository: Repository): any;
5
+ export declare function loadRepositoriesFromPath(pattern: string): Promise<any[]>;
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/repository/config/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAmC,MAAM,SAAS,CAAC;AAGzF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,UAAU,GAAE,MAAM,GAAG,UAAU,GAAG,iBAA2C,uBAa9E;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,UAAU,OAO3D;AAoBD,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAc9E"}