@tsed/mongoose 7.0.0-beta.2 → 7.0.0-beta.20

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 (140) hide show
  1. package/jest.config.js +1 -1
  2. package/lib/cjs/MongooseModule.js +6 -4
  3. package/lib/cjs/MongooseModule.js.map +1 -1
  4. package/lib/cjs/constants/{index.js → constants.js} +1 -1
  5. package/lib/cjs/constants/constants.js.map +1 -0
  6. package/lib/cjs/decorators/discriminatorKey.js +1 -1
  7. package/lib/cjs/decorators/discriminatorKey.js.map +1 -1
  8. package/lib/cjs/decorators/dynamicRef.js +24 -5
  9. package/lib/cjs/decorators/dynamicRef.js.map +1 -1
  10. package/lib/cjs/decorators/model.js +5 -4
  11. package/lib/cjs/decorators/model.js.map +1 -1
  12. package/lib/cjs/decorators/numberDecimal.js +2 -2
  13. package/lib/cjs/decorators/numberDecimal.js.map +1 -1
  14. package/lib/cjs/decorators/objectID.js +1 -1
  15. package/lib/cjs/decorators/objectID.js.map +1 -1
  16. package/lib/cjs/decorators/postHook.js.map +1 -1
  17. package/lib/cjs/decorators/preHook.js.map +1 -1
  18. package/lib/cjs/decorators/ref.js +5 -2
  19. package/lib/cjs/decorators/ref.js.map +1 -1
  20. package/lib/cjs/decorators/schema.js +1 -1
  21. package/lib/cjs/decorators/schema.js.map +1 -1
  22. package/lib/cjs/decorators/versionKey.js +1 -1
  23. package/lib/cjs/decorators/versionKey.js.map +1 -1
  24. package/lib/cjs/decorators/virtualRef.js +1 -1
  25. package/lib/cjs/decorators/virtualRef.js.map +1 -1
  26. package/lib/cjs/index.js +47 -6
  27. package/lib/cjs/index.js.map +1 -1
  28. package/lib/cjs/interfaces/MongooseModel.js.map +1 -1
  29. package/lib/cjs/interfaces/MongooseModelOptions.js.map +1 -1
  30. package/lib/cjs/interfaces/MongooseSchemaOptions.js.map +1 -1
  31. package/lib/cjs/interfaces/interfaces.js +3 -0
  32. package/lib/cjs/interfaces/interfaces.js.map +1 -0
  33. package/lib/cjs/package.json +3 -0
  34. package/lib/cjs/services/MongooseConnections.js +1 -5
  35. package/lib/cjs/services/MongooseConnections.js.map +1 -1
  36. package/lib/cjs/services/MongooseService.js +7 -8
  37. package/lib/cjs/services/MongooseService.js.map +1 -1
  38. package/lib/cjs/utils/createModel.js +7 -11
  39. package/lib/cjs/utils/createModel.js.map +1 -1
  40. package/lib/cjs/utils/createSchema.js +5 -5
  41. package/lib/cjs/utils/createSchema.js.map +1 -1
  42. package/lib/cjs/utils/resolveRefType.js +1 -1
  43. package/lib/cjs/utils/resolveRefType.js.map +1 -1
  44. package/lib/cjs/utils/schemaOptions.js +1 -1
  45. package/lib/cjs/utils/schemaOptions.js.map +1 -1
  46. package/lib/esm/MongooseModule.js +5 -3
  47. package/lib/esm/MongooseModule.js.map +1 -1
  48. package/lib/esm/constants/{index.js → constants.js} +1 -1
  49. package/lib/esm/constants/constants.js.map +1 -0
  50. package/lib/esm/decorators/auto.js +1 -1
  51. package/lib/esm/decorators/discriminatorKey.js +2 -2
  52. package/lib/esm/decorators/discriminatorKey.js.map +1 -1
  53. package/lib/esm/decorators/dynamicRef.js +26 -7
  54. package/lib/esm/decorators/dynamicRef.js.map +1 -1
  55. package/lib/esm/decorators/excludeIndexes.js +1 -1
  56. package/lib/esm/decorators/expires.js +1 -1
  57. package/lib/esm/decorators/immutable.js +1 -1
  58. package/lib/esm/decorators/indexed.js +1 -1
  59. package/lib/esm/decorators/lowercase.js +1 -1
  60. package/lib/esm/decorators/model.js +5 -4
  61. package/lib/esm/decorators/model.js.map +1 -1
  62. package/lib/esm/decorators/mongooseIndex.js +1 -1
  63. package/lib/esm/decorators/mongooseIndexes.js +1 -1
  64. package/lib/esm/decorators/mongoosePlugin.js +1 -1
  65. package/lib/esm/decorators/numberDecimal.js +1 -1
  66. package/lib/esm/decorators/numberDecimal.js.map +1 -1
  67. package/lib/esm/decorators/objectID.js +1 -1
  68. package/lib/esm/decorators/objectID.js.map +1 -1
  69. package/lib/esm/decorators/postHook.js +1 -1
  70. package/lib/esm/decorators/postHook.js.map +1 -1
  71. package/lib/esm/decorators/preHook.js +1 -1
  72. package/lib/esm/decorators/preHook.js.map +1 -1
  73. package/lib/esm/decorators/ref.js +7 -4
  74. package/lib/esm/decorators/ref.js.map +1 -1
  75. package/lib/esm/decorators/schema.js +2 -2
  76. package/lib/esm/decorators/schema.js.map +1 -1
  77. package/lib/esm/decorators/schemaIgnore.js +1 -1
  78. package/lib/esm/decorators/select.js +1 -1
  79. package/lib/esm/decorators/sparse.js +1 -1
  80. package/lib/esm/decorators/text.js +1 -1
  81. package/lib/esm/decorators/trim.js +1 -1
  82. package/lib/esm/decorators/unique.js +1 -1
  83. package/lib/esm/decorators/uppercase.js +1 -1
  84. package/lib/esm/decorators/versionKey.js +1 -1
  85. package/lib/esm/decorators/versionKey.js.map +1 -1
  86. package/lib/esm/decorators/virtualRef.js +2 -2
  87. package/lib/esm/decorators/virtualRef.js.map +1 -1
  88. package/lib/esm/index.js +47 -6
  89. package/lib/esm/index.js.map +1 -1
  90. package/lib/esm/interfaces/MongooseModel.js.map +1 -1
  91. package/lib/esm/interfaces/MongooseModelOptions.js.map +1 -1
  92. package/lib/esm/interfaces/MongooseSchemaOptions.js.map +1 -1
  93. package/lib/esm/interfaces/interfaces.js +2 -0
  94. package/lib/esm/interfaces/interfaces.js.map +1 -0
  95. package/lib/esm/package.json +3 -0
  96. package/lib/esm/services/MongooseConnections.js +2 -6
  97. package/lib/esm/services/MongooseConnections.js.map +1 -1
  98. package/lib/esm/services/MongooseService.js +3 -4
  99. package/lib/esm/services/MongooseService.js.map +1 -1
  100. package/lib/esm/utils/createModel.js +8 -12
  101. package/lib/esm/utils/createModel.js.map +1 -1
  102. package/lib/esm/utils/createSchema.js +6 -6
  103. package/lib/esm/utils/createSchema.js.map +1 -1
  104. package/lib/esm/utils/resolveRefType.js +1 -1
  105. package/lib/esm/utils/resolveRefType.js.map +1 -1
  106. package/lib/esm/utils/schemaOptions.js +1 -1
  107. package/lib/esm/utils/schemaOptions.js.map +1 -1
  108. package/lib/types/constants/{index.d.ts → constants.d.ts} +0 -0
  109. package/lib/types/decorators/dynamicRef.d.ts +4 -2
  110. package/lib/types/decorators/postHook.d.ts +1 -1
  111. package/lib/types/decorators/preHook.d.ts +1 -1
  112. package/lib/types/decorators/schema.d.ts +1 -1
  113. package/lib/types/decorators/virtualRef.d.ts +0 -4
  114. package/lib/types/index.d.ts +46 -5
  115. package/lib/types/interfaces/MongooseModel.d.ts +1 -2
  116. package/lib/types/interfaces/MongooseModelOptions.d.ts +1 -1
  117. package/lib/types/interfaces/MongooseSchemaOptions.d.ts +4 -4
  118. package/lib/types/interfaces/{index.d.ts → interfaces.d.ts} +0 -6
  119. package/lib/types/utils/createModel.d.ts +2 -2
  120. package/lib/types/utils/createSchema.d.ts +1 -1
  121. package/lib/types/utils/schemaOptions.d.ts +1 -1
  122. package/package.json +24 -19
  123. package/readme.md +127 -136
  124. package/tsconfig.compile.esm.json +2 -12
  125. package/lib/cjs/constants/index.js.map +0 -1
  126. package/lib/cjs/decorators/index.js +0 -30
  127. package/lib/cjs/decorators/index.js.map +0 -1
  128. package/lib/cjs/interfaces/index.js +0 -10
  129. package/lib/cjs/interfaces/index.js.map +0 -1
  130. package/lib/cjs/utils/index.js +0 -6
  131. package/lib/cjs/utils/index.js.map +0 -1
  132. package/lib/esm/constants/index.js.map +0 -1
  133. package/lib/esm/decorators/index.js +0 -27
  134. package/lib/esm/decorators/index.js.map +0 -1
  135. package/lib/esm/interfaces/index.js +0 -7
  136. package/lib/esm/interfaces/index.js.map +0 -1
  137. package/lib/esm/utils/index.js +0 -3
  138. package/lib/esm/utils/index.js.map +0 -1
  139. package/lib/types/decorators/index.d.ts +0 -26
  140. package/lib/types/utils/index.d.ts +0 -2
package/readme.md CHANGED
@@ -11,7 +11,8 @@
11
11
  [![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)
12
12
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
13
13
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
14
- [![backers](https://opencollective.com/tsed/tiers/badge.svg)](https://opencollective.com/tsed)
14
+ [![github](https://img.shields.io/static/v1?label=Github%20sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/romakita)
15
+ [![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor&message=%E2%9D%A4&logo=OpenCollective&color=%23fe8e86)](https://opencollective.com/tsed)
15
16
 
16
17
  </div>
17
18
 
@@ -59,17 +60,15 @@ import {Configuration} from "@tsed/common";
59
60
  import "@tsed/mongoose"; // import mongoose ts.ed module
60
61
 
61
62
  @Configuration({
62
- mongoose: [
63
- {
64
- id: "default",
65
- url: "mongodb://127.0.0.1:27017/db1",
66
- connectionOptions: {}
67
- }
68
- ]
63
+ mongoose: [
64
+ {
65
+ id: "default",
66
+ url: "mongodb://127.0.0.1:27017/db1",
67
+ connectionOptions: {}
68
+ }
69
+ ]
69
70
  })
70
- export class Server {
71
-
72
- }
71
+ export class Server {}
73
72
  ```
74
73
 
75
74
  ## Multi databases
@@ -82,27 +81,25 @@ import {Configuration} from "@tsed/common";
82
81
  import "@tsed/mongoose"; // import mongoose ts.ed module
83
82
 
84
83
  @Configuration({
85
- mongoose: [
86
- {
87
- id: "default",
88
- url: "mongodb://127.0.0.1:27017/db1",
89
- connectionOptions: {}
90
- },
91
- {
92
- id: "default",
93
- url: "mongodb://127.0.0.1:27017/db2",
94
- connectionOptions: {}
95
- }
96
- ]
84
+ mongoose: [
85
+ {
86
+ id: "default",
87
+ url: "mongodb://127.0.0.1:27017/db1",
88
+ connectionOptions: {}
89
+ },
90
+ {
91
+ id: "default",
92
+ url: "mongodb://127.0.0.1:27017/db2",
93
+ connectionOptions: {}
94
+ }
95
+ ]
97
96
  })
98
- export class Server {
99
-
100
- }
97
+ export class Server {}
101
98
  ```
102
99
 
103
100
  ## MongooseService
104
101
 
105
- MongooseService let you to retrieve an instance of Mongoose.Connection.
102
+ MongooseService let you to retrieve an instance of Mongoose.Connection.
106
103
 
107
104
  ```typescript
108
105
  import {Service} from "@tsed/common";
@@ -110,12 +107,12 @@ import {MongooseService} from "@tsed/mongoose";
110
107
 
111
108
  @Service()
112
109
  export class MyService {
113
- constructor(mongooseService: MongooseService) {
114
- mongooseService.get(); // return the default instance of Mongoose.
115
- // If you have one or more database configured with Ts.ED
116
- mongooseService.get("default");
117
- mongooseService.get("db2");
118
- }
110
+ constructor(mongooseService: MongooseService) {
111
+ mongooseService.get(); // return the default instance of Mongoose.
112
+ // If you have one or more database configured with Ts.ED
113
+ mongooseService.get("default");
114
+ mongooseService.get("db2");
115
+ }
119
116
  }
120
117
  ```
121
118
 
@@ -124,55 +121,50 @@ export class MyService {
124
121
  By default, Ts.ED mongoose will reuse the metadata stored by the decorators dedicated
125
122
  to describe a JsonSchema. This decorators come from the `@tsed/common` package.
126
123
 
127
-
128
124
  Here a model example:
129
125
 
130
126
  ```typescript
131
- import {
132
- Minimum, Maximum, MaxLength, MinLength,
133
- Enum, Pattern, Required,
134
- CollectionOf
135
- } from "@tsed/common";
136
- import {Model, Unique, Indexed, Ref, ObjectID} from "@tsed/mongoose"
127
+ import {Minimum, Maximum, MaxLength, MinLength, Enum, Pattern, Required, CollectionOf} from "@tsed/common";
128
+ import {Model, Unique, Indexed, Ref, ObjectID} from "@tsed/mongoose";
137
129
 
138
130
  enum Categories {
139
131
  CAT1 = "cat1",
140
132
  CAT2 = "cat2"
141
133
  }
142
134
 
143
- @Model({dbName: 'default'}) // dbName is optional. By default dbName is equal to default
135
+ @Model({dbName: "default"}) // dbName is optional. By default dbName is equal to default
144
136
  export class MyModel {
145
- @ObjectID()
146
- _id: string;
147
-
148
- @Unique()
149
- @Required()
150
- unique: string;
151
-
152
- @Indexed()
153
- @MinLength(3)
154
- @MaxLength(50)
155
- indexed: string;
156
-
157
- @Minimum(0)
158
- @Maximum(100)
159
- rate: Number;
160
-
161
- @Enum(Categories)
162
- // or @Enum("type1", "type2")
163
- category: Categories;
164
-
165
- @Pattern(/[a-z]/) // equivalent of match field in mongoose
166
- pattern: String;
167
-
168
- @CollectionOf(String)
169
- arrayOf: string[];
170
-
171
- @Ref(OtherModel)
172
- ref: Ref<OtherModel>;
173
-
174
- @Ref(OtherModel)
175
- refs: Ref<OtherModel>[];
137
+ @ObjectID()
138
+ _id: string;
139
+
140
+ @Unique()
141
+ @Required()
142
+ unique: string;
143
+
144
+ @Indexed()
145
+ @MinLength(3)
146
+ @MaxLength(50)
147
+ indexed: string;
148
+
149
+ @Minimum(0)
150
+ @Maximum(100)
151
+ rate: Number;
152
+
153
+ @Enum(Categories)
154
+ // or @Enum("type1", "type2")
155
+ category: Categories;
156
+
157
+ @Pattern(/[a-z]/) // equivalent of match field in mongoose
158
+ pattern: String;
159
+
160
+ @CollectionOf(String)
161
+ arrayOf: string[];
162
+
163
+ @Ref(OtherModel)
164
+ ref: Ref<OtherModel>;
165
+
166
+ @Ref(OtherModel)
167
+ refs: Ref<OtherModel>[];
176
168
  }
177
169
  ```
178
170
 
@@ -185,31 +177,30 @@ import {MyModel} from "./models/MyModel";
185
177
 
186
178
  @Service()
187
179
  export class MyService {
188
- constructor(@Inject(MyModel) private model: MongooseModel<MyModel>): MyModel {
189
- console.log(model) // Mongoose.model class
190
- }
191
-
192
- async save(obj: MyModel): MongooseModel<MyModel> {
193
-
194
- const doc = new this.model(obj);
195
- await doc.save();
196
-
197
- return doc;
198
- }
199
-
200
- async find(query: any) {
201
- const list = await this.model.find(query).exec();
202
-
203
- console.log(list);
204
-
205
- return list;
206
- }
180
+ constructor(@Inject(MyModel) private model: MongooseModel<MyModel>): MyModel {
181
+ console.log(model); // Mongoose.model class
182
+ }
183
+
184
+ async save(obj: MyModel): MongooseModel<MyModel> {
185
+ const doc = new this.model(obj);
186
+ await doc.save();
187
+
188
+ return doc;
189
+ }
190
+
191
+ async find(query: any) {
192
+ const list = await this.model.find(query).exec();
193
+
194
+ console.log(list);
195
+
196
+ return list;
197
+ }
207
198
  }
208
199
  ```
209
200
 
210
201
  ## Register hook
211
202
 
212
- Mongoose allows the developer to add pre and post [hooks / middlewares](http://mongoosejs.com/docs/middleware.html) to the schema.
203
+ Mongoose allows the developer to add pre and post [hooks / middlewares](http://mongoosejs.com/docs/middleware.html) to the schema.
213
204
  With this it is possible to add document transformations and observations before or after validation, save and more.
214
205
 
215
206
  Ts.ED provide class decorator to register middlewares on the pre and post hook.
@@ -217,83 +208,83 @@ Ts.ED provide class decorator to register middlewares on the pre and post hook.
217
208
  ### Pre hook
218
209
 
219
210
  We can simply attach a `@PreHook` decorator to your model class and
220
- define the hook function like you normally would in Mongoose.
221
-
211
+ define the hook function like you normally would in Mongoose.
212
+
222
213
  ```typescript
223
214
  import {Required} from "@tsed/common";
224
215
  import {PreHook, Model, ObjectID} from "@tsed/mongoose";
225
216
 
226
217
  @Model()
227
218
  @PreHook("save", (car: CarModel, next) => {
228
- if (car.model === 'Tesla') {
219
+ if (car.model === "Tesla") {
229
220
  car.isFast = true;
230
221
  }
231
222
  next();
232
223
  })
233
224
  export class CarModel {
234
- @ObjectID()
235
- _id: string;
236
-
237
- @Required()
238
- model: string;
239
-
240
- @Required()
241
- isFast: boolean;
242
-
243
- // or Prehook on static method
244
- @PreHook("save")
245
- static preSave(car: CarModel, next) {
246
- if (car.model === 'Tesla') {
247
- car.isFast = true;
248
- }
249
- next();
225
+ @ObjectID()
226
+ _id: string;
227
+
228
+ @Required()
229
+ model: string;
230
+
231
+ @Required()
232
+ isFast: boolean;
233
+
234
+ // or Prehook on static method
235
+ @PreHook("save")
236
+ static preSave(car: CarModel, next) {
237
+ if (car.model === "Tesla") {
238
+ car.isFast = true;
250
239
  }
240
+ next();
241
+ }
251
242
  }
252
243
  ```
253
244
 
254
- This will execute the pre-save hook each time a `CarModel` document is saved.
245
+ This will execute the pre-save hook each time a `CarModel` document is saved.
255
246
 
256
247
  ### Post hook
257
248
 
258
249
  We can simply attach a `@PostHook` decorator to your model class and
259
- define the hook function like you normally would in Mongoose.
260
-
250
+ define the hook function like you normally would in Mongoose.
251
+
261
252
  ```typescript
262
253
  import {ObjectID, Required} from "@tsed/common";
263
254
  import {PostHook, Model} from "@tsed/mongoose";
264
255
 
265
256
  @Model()
266
257
  @PostHook("save", (car: CarModel) => {
267
- if (car.topSpeedInKmH > 300) {
268
- console.log(car.model, 'is fast!');
269
- }
258
+ if (car.topSpeedInKmH > 300) {
259
+ console.log(car.model, "is fast!");
260
+ }
270
261
  })
271
262
  export class CarModel {
272
- @ObjectID()
273
- _id: string;
274
-
275
- @Required()
276
- model: string;
277
-
278
- @Required()
279
- isFast: boolean;
280
-
281
- // or Prehook on static method
282
- @PostHook("save")
283
- static postSave(car: CarModel) {
284
- if (car.topSpeedInKmH > 300) {
285
- console.log(car.model, 'is fast!');
286
- }
263
+ @ObjectID()
264
+ _id: string;
265
+
266
+ @Required()
267
+ model: string;
268
+
269
+ @Required()
270
+ isFast: boolean;
271
+
272
+ // or Prehook on static method
273
+ @PostHook("save")
274
+ static postSave(car: CarModel) {
275
+ if (car.topSpeedInKmH > 300) {
276
+ console.log(car.model, "is fast!");
287
277
  }
278
+ }
288
279
  }
289
280
  ```
290
281
 
291
- This will execute the post-save hook each time a `CarModel` document is saved.
282
+ This will execute the post-save hook each time a `CarModel` document is saved.
292
283
 
293
284
  ## Plugin
294
285
 
295
- Using the `plugin` decorator enables the developer to attach various Mongoose plugins to the schema.
296
- Just like the regular `schema.plugin()` call, the decorator accepts 1 or 2 parameters: the plugin itself, and an optional configuration object.
286
+ Using the `plugin` decorator enables the developer to attach various Mongoose plugins to the schema.
287
+ Just like the regular `schema.plugin()` call, the decorator accepts 1 or 2 parameters: the plugin itself, and an optional configuration object.
297
288
  Multiple `plugin` decorator can be used for a single model class.
298
289
 
299
290
  ```typescript
@@ -373,7 +364,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
373
364
 
374
365
  The MIT License (MIT)
375
366
 
376
- Copyright (c) 2016 - 2018 Romain Lenzotti
367
+ Copyright (c) 2016 - 2022 Romain Lenzotti
377
368
 
378
369
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
379
370
 
@@ -8,16 +8,6 @@
8
8
  "declaration": true,
9
9
  "declarationDir": "./lib/types"
10
10
  },
11
- "exclude": [
12
- "node_modules",
13
- "test",
14
- "lib",
15
- "benchmark",
16
- "coverage",
17
- "spec",
18
- "**/*.benchmark.ts",
19
- "**/*.spec.ts",
20
- "keys",
21
- "jest.config.js"
22
- ]
11
+ "include": ["src"],
12
+ "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
23
13
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,eAAe,GAAG,sBAAsB,CAAC;AACtD;;;GAGG;AACU,QAAA,uBAAuB,GAAG,8BAA8B,CAAC;AACtE;;;GAGG;AACU,QAAA,cAAc,GAAG,qBAAqB,CAAC;AACpD;;;GAGG;AACU,QAAA,mBAAmB,GAAG,0BAA0B,CAAC","sourcesContent":["/**\n *\n * @type {string}\n */\nexport const MONGOOSE_SCHEMA = \"tsed:mongoose:schema\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_SCHEMA_OPTIONS = \"tsed:mongoose:schema:options\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_MODEL = \"tsed:mongoose:model\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_MODEL_NAME = \"tsed:mongoose:model:name\";\n"]}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./auto"), exports);
5
- (0, tslib_1.__exportStar)(require("./discriminatorKey"), exports);
6
- (0, tslib_1.__exportStar)(require("./dynamicRef"), exports);
7
- (0, tslib_1.__exportStar)(require("./excludeIndexes"), exports);
8
- (0, tslib_1.__exportStar)(require("./expires"), exports);
9
- (0, tslib_1.__exportStar)(require("./immutable"), exports);
10
- (0, tslib_1.__exportStar)(require("./indexed"), exports);
11
- (0, tslib_1.__exportStar)(require("./lowercase"), exports);
12
- (0, tslib_1.__exportStar)(require("./model"), exports);
13
- (0, tslib_1.__exportStar)(require("./mongooseIndex"), exports);
14
- (0, tslib_1.__exportStar)(require("./mongoosePlugin"), exports);
15
- (0, tslib_1.__exportStar)(require("./numberDecimal"), exports);
16
- (0, tslib_1.__exportStar)(require("./objectID"), exports);
17
- (0, tslib_1.__exportStar)(require("./postHook"), exports);
18
- (0, tslib_1.__exportStar)(require("./preHook"), exports);
19
- (0, tslib_1.__exportStar)(require("./ref"), exports);
20
- (0, tslib_1.__exportStar)(require("./schema"), exports);
21
- (0, tslib_1.__exportStar)(require("./schemaIgnore"), exports);
22
- (0, tslib_1.__exportStar)(require("./select"), exports);
23
- (0, tslib_1.__exportStar)(require("./sparse"), exports);
24
- (0, tslib_1.__exportStar)(require("./text"), exports);
25
- (0, tslib_1.__exportStar)(require("./trim"), exports);
26
- (0, tslib_1.__exportStar)(require("./unique"), exports);
27
- (0, tslib_1.__exportStar)(require("./uppercase"), exports);
28
- (0, tslib_1.__exportStar)(require("./versionKey"), exports);
29
- (0, tslib_1.__exportStar)(require("./virtualRef"), exports);
30
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":";;;AAAA,sDAAuB;AACvB,kEAAmC;AACnC,4DAA6B;AAC7B,gEAAiC;AACjC,yDAA0B;AAC1B,2DAA4B;AAC5B,yDAA0B;AAC1B,2DAA4B;AAC5B,uDAAwB;AACxB,+DAAgC;AAChC,gEAAiC;AACjC,+DAAgC;AAChC,0DAA2B;AAC3B,0DAA2B;AAC3B,yDAA0B;AAC1B,qDAAsB;AACtB,wDAAyB;AACzB,8DAA+B;AAC/B,wDAAyB;AACzB,wDAAyB;AACzB,sDAAuB;AACvB,sDAAuB;AACvB,wDAAyB;AACzB,2DAA4B;AAC5B,4DAA6B;AAC7B,4DAA6B","sourcesContent":["export * from \"./auto\";\nexport * from \"./discriminatorKey\";\nexport * from \"./dynamicRef\";\nexport * from \"./excludeIndexes\";\nexport * from \"./expires\";\nexport * from \"./immutable\";\nexport * from \"./indexed\";\nexport * from \"./lowercase\";\nexport * from \"./model\";\nexport * from \"./mongooseIndex\";\nexport * from \"./mongoosePlugin\";\nexport * from \"./numberDecimal\";\nexport * from \"./objectID\";\nexport * from \"./postHook\";\nexport * from \"./preHook\";\nexport * from \"./ref\";\nexport * from \"./schema\";\nexport * from \"./schemaIgnore\";\nexport * from \"./select\";\nexport * from \"./sparse\";\nexport * from \"./text\";\nexport * from \"./trim\";\nexport * from \"./unique\";\nexport * from \"./uppercase\";\nexport * from \"./versionKey\";\nexport * from \"./virtualRef\";\n"]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./MongooseConnectionOptions"), exports);
5
- (0, tslib_1.__exportStar)(require("./MongooseDocument"), exports);
6
- (0, tslib_1.__exportStar)(require("./MongooseModel"), exports);
7
- (0, tslib_1.__exportStar)(require("./MongooseModelOptions"), exports);
8
- (0, tslib_1.__exportStar)(require("./MongooseSchemaOptions"), exports);
9
- (0, tslib_1.__exportStar)(require("./MongooseVirtualRefOptions"), exports);
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAUA,2EAA4C;AAC5C,kEAAmC;AACnC,+DAAgC;AAChC,sEAAuC;AACvC,uEAAwC;AACxC,2EAA4C","sourcesContent":["import {MongooseConnectionOptions} from \"./MongooseConnectionOptions\";\n\ndeclare global {\n namespace TsED {\n interface Configuration {\n mongoose: Omit<MongooseConnectionOptions, \"id\"> | MongooseConnectionOptions[];\n }\n }\n}\n\nexport * from \"./MongooseConnectionOptions\";\nexport * from \"./MongooseDocument\";\nexport * from \"./MongooseModel\";\nexport * from \"./MongooseModelOptions\";\nexport * from \"./MongooseSchemaOptions\";\nexport * from \"./MongooseVirtualRefOptions\";\n"]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./createSchema"), exports);
5
- (0, tslib_1.__exportStar)(require("./createModel"), exports);
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,8DAA+B;AAC/B,6DAA8B","sourcesContent":["export * from \"./createSchema\";\nexport * from \"./createModel\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC;AACtD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AACtE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC","sourcesContent":["/**\n *\n * @type {string}\n */\nexport const MONGOOSE_SCHEMA = \"tsed:mongoose:schema\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_SCHEMA_OPTIONS = \"tsed:mongoose:schema:options\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_MODEL = \"tsed:mongoose:model\";\n/**\n *\n * @type {string}\n */\nexport const MONGOOSE_MODEL_NAME = \"tsed:mongoose:model:name\";\n"]}
@@ -1,27 +0,0 @@
1
- export * from "./auto";
2
- export * from "./discriminatorKey";
3
- export * from "./dynamicRef";
4
- export * from "./excludeIndexes";
5
- export * from "./expires";
6
- export * from "./immutable";
7
- export * from "./indexed";
8
- export * from "./lowercase";
9
- export * from "./model";
10
- export * from "./mongooseIndex";
11
- export * from "./mongoosePlugin";
12
- export * from "./numberDecimal";
13
- export * from "./objectID";
14
- export * from "./postHook";
15
- export * from "./preHook";
16
- export * from "./ref";
17
- export * from "./schema";
18
- export * from "./schemaIgnore";
19
- export * from "./select";
20
- export * from "./sparse";
21
- export * from "./text";
22
- export * from "./trim";
23
- export * from "./unique";
24
- export * from "./uppercase";
25
- export * from "./versionKey";
26
- export * from "./virtualRef";
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./auto\";\nexport * from \"./discriminatorKey\";\nexport * from \"./dynamicRef\";\nexport * from \"./excludeIndexes\";\nexport * from \"./expires\";\nexport * from \"./immutable\";\nexport * from \"./indexed\";\nexport * from \"./lowercase\";\nexport * from \"./model\";\nexport * from \"./mongooseIndex\";\nexport * from \"./mongoosePlugin\";\nexport * from \"./numberDecimal\";\nexport * from \"./objectID\";\nexport * from \"./postHook\";\nexport * from \"./preHook\";\nexport * from \"./ref\";\nexport * from \"./schema\";\nexport * from \"./schemaIgnore\";\nexport * from \"./select\";\nexport * from \"./sparse\";\nexport * from \"./text\";\nexport * from \"./trim\";\nexport * from \"./unique\";\nexport * from \"./uppercase\";\nexport * from \"./versionKey\";\nexport * from \"./virtualRef\";\n"]}
@@ -1,7 +0,0 @@
1
- export * from "./MongooseConnectionOptions";
2
- export * from "./MongooseDocument";
3
- export * from "./MongooseModel";
4
- export * from "./MongooseModelOptions";
5
- export * from "./MongooseSchemaOptions";
6
- export * from "./MongooseVirtualRefOptions";
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAUA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC","sourcesContent":["import {MongooseConnectionOptions} from \"./MongooseConnectionOptions\";\n\ndeclare global {\n namespace TsED {\n interface Configuration {\n mongoose: Omit<MongooseConnectionOptions, \"id\"> | MongooseConnectionOptions[];\n }\n }\n}\n\nexport * from \"./MongooseConnectionOptions\";\nexport * from \"./MongooseDocument\";\nexport * from \"./MongooseModel\";\nexport * from \"./MongooseModelOptions\";\nexport * from \"./MongooseSchemaOptions\";\nexport * from \"./MongooseVirtualRefOptions\";\n"]}
@@ -1,3 +0,0 @@
1
- export * from "./createSchema";
2
- export * from "./createModel";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./createSchema\";\nexport * from \"./createModel\";\n"]}
@@ -1,26 +0,0 @@
1
- export * from "./auto";
2
- export * from "./discriminatorKey";
3
- export * from "./dynamicRef";
4
- export * from "./excludeIndexes";
5
- export * from "./expires";
6
- export * from "./immutable";
7
- export * from "./indexed";
8
- export * from "./lowercase";
9
- export * from "./model";
10
- export * from "./mongooseIndex";
11
- export * from "./mongoosePlugin";
12
- export * from "./numberDecimal";
13
- export * from "./objectID";
14
- export * from "./postHook";
15
- export * from "./preHook";
16
- export * from "./ref";
17
- export * from "./schema";
18
- export * from "./schemaIgnore";
19
- export * from "./select";
20
- export * from "./sparse";
21
- export * from "./text";
22
- export * from "./trim";
23
- export * from "./unique";
24
- export * from "./uppercase";
25
- export * from "./versionKey";
26
- export * from "./virtualRef";
@@ -1,2 +0,0 @@
1
- export * from "./createSchema";
2
- export * from "./createModel";