@tsed/mongoose 8.0.0-alpha.3 → 8.0.0-alpha.5
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.
- package/lib/cjs/decorators/model.js +0 -2
- package/lib/cjs/decorators/model.js.map +1 -1
- package/lib/esm/decorators/model.js +0 -2
- package/lib/esm/decorators/model.js.map +1 -1
- package/lib/types/interfaces/MongooseModelOptions.d.ts +0 -4
- package/lib/types-esm/interfaces/MongooseModelOptions.d.ts +0 -4
- package/package.json +14 -14
- package/vitest.config.mts +2 -2
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Model = void 0;
|
|
4
4
|
const core_1 = require("@tsed/core");
|
|
5
5
|
const di_1 = require("@tsed/di");
|
|
6
|
-
const schema_1 = require("@tsed/schema");
|
|
7
6
|
const MongooseConnections_js_1 = require("../services/MongooseConnections.js");
|
|
8
7
|
const createModel_js_1 = require("../utils/createModel.js");
|
|
9
8
|
const createSchema_js_1 = require("../utils/createSchema.js");
|
|
@@ -48,7 +47,6 @@ const schemaOptions_js_1 = require("../utils/schemaOptions.js");
|
|
|
48
47
|
function Model(options = {}) {
|
|
49
48
|
return (0, core_1.useDecorators)((target) => {
|
|
50
49
|
const { token, collectionName } = (0, createModel_js_1.getModelToken)(target, options);
|
|
51
|
-
options.discriminatorValue && (0, schema_1.DiscriminatorValue)(options.discriminatorValue)(target);
|
|
52
50
|
(0, di_1.registerProvider)({
|
|
53
51
|
provide: token,
|
|
54
52
|
deps: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/decorators/model.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AACjD,iCAA0C;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/decorators/model.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AACjD,iCAA0C;AAI1C,+EAAwE;AACxE,4DAAmE;AACnE,8DAAmD;AACnD,gEAA4E;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,SAAgB,KAAK,CAAC,UAAgC,EAAE;IACtD,OAAO,IAAA,oBAAa,EAAC,CAAC,MAAW,EAAE,EAAE;QACnC,MAAM,EAAC,KAAK,EAAE,cAAc,EAAC,GAAG,IAAA,8BAAa,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE/D,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,EAAE;YACR,UAAU;gBACR,OAAO,IAAA,2BAAS,EAAC,MAAM,EAAE,OAAc,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC,CAAC;QAEH,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,CAAC,6CAAoB,EAAE,KAAK,CAAC;YACnC,UAAU,CAAC,WAAiC,EAAE,MAAc;gBAC1D,IAAA,qCAAkB,EAAC,MAAM,EAAE,IAAA,gCAAa,EAAC,MAAM,CAAC,CAAC,CAAC;gBAClD,OAAO,IAAA,4BAAW,EAChB,MAAM,EACN,MAAM,EACN,cAAc,EACd,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,eAAe,EACvB,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CACpC,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA7BD,sBA6BC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useDecorators } from "@tsed/core";
|
|
2
2
|
import { registerProvider } from "@tsed/di";
|
|
3
|
-
import { DiscriminatorValue } from "@tsed/schema";
|
|
4
3
|
import { MONGOOSE_CONNECTIONS } from "../services/MongooseConnections.js";
|
|
5
4
|
import { createModel, getModelToken } from "../utils/createModel.js";
|
|
6
5
|
import { getSchema } from "../utils/createSchema.js";
|
|
@@ -45,7 +44,6 @@ import { applySchemaOptions, schemaOptions } from "../utils/schemaOptions.js";
|
|
|
45
44
|
export function Model(options = {}) {
|
|
46
45
|
return useDecorators((target) => {
|
|
47
46
|
const { token, collectionName } = getModelToken(target, options);
|
|
48
|
-
options.discriminatorValue && DiscriminatorValue(options.discriminatorValue)(target);
|
|
49
47
|
registerProvider({
|
|
50
48
|
provide: token,
|
|
51
49
|
deps: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/decorators/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAC,MAAM,YAAY,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/decorators/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAC,MAAM,YAAY,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAC,kBAAkB,EAAE,aAAa,EAAC,MAAM,2BAA2B,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,KAAK,CAAC,UAAgC,EAAE;IACtD,OAAO,aAAa,CAAC,CAAC,MAAW,EAAE,EAAE;QACnC,MAAM,EAAC,KAAK,EAAE,cAAc,EAAC,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE/D,gBAAgB,CAAC;YACf,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,EAAE;YACR,UAAU;gBACR,OAAO,SAAS,CAAC,MAAM,EAAE,OAAc,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC,CAAC;QAEH,gBAAgB,CAAC;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,CAAC,oBAAoB,EAAE,KAAK,CAAC;YACnC,UAAU,CAAC,WAAiC,EAAE,MAAc;gBAC1D,kBAAkB,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAClD,OAAO,WAAW,CAChB,MAAM,EACN,MAAM,EACN,cAAc,EACd,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,eAAe,EACvB,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CACpC,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/mongoose",
|
|
3
3
|
"description": "Mongoose package for Ts.ED framework",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"version": "8.0.0-alpha.
|
|
5
|
+
"version": "8.0.0-alpha.5",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tsed",
|
|
8
8
|
"mongoose",
|
|
@@ -34,27 +34,27 @@
|
|
|
34
34
|
"tslib": "2.6.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@tsed/ajv": "8.0.0-alpha.
|
|
38
|
-
"@tsed/barrels": "8.0.0-alpha.
|
|
39
|
-
"@tsed/core": "8.0.0-alpha.
|
|
40
|
-
"@tsed/di": "8.0.0-alpha.
|
|
41
|
-
"@tsed/json-mapper": "8.0.0-alpha.
|
|
37
|
+
"@tsed/ajv": "8.0.0-alpha.5",
|
|
38
|
+
"@tsed/barrels": "8.0.0-alpha.5",
|
|
39
|
+
"@tsed/core": "8.0.0-alpha.5",
|
|
40
|
+
"@tsed/di": "8.0.0-alpha.5",
|
|
41
|
+
"@tsed/json-mapper": "8.0.0-alpha.5",
|
|
42
42
|
"@tsed/logger": ">=6.7.5",
|
|
43
|
-
"@tsed/schema": "8.0.0-alpha.
|
|
44
|
-
"@tsed/testcontainers-mongo": "8.0.0-alpha.
|
|
45
|
-
"@tsed/typescript": "8.0.0-alpha.
|
|
43
|
+
"@tsed/schema": "8.0.0-alpha.5",
|
|
44
|
+
"@tsed/testcontainers-mongo": "8.0.0-alpha.5",
|
|
45
|
+
"@tsed/typescript": "8.0.0-alpha.5",
|
|
46
46
|
"eslint": "^8.57.0",
|
|
47
47
|
"mongoose": "6.12.7",
|
|
48
48
|
"typescript": "4.9.5",
|
|
49
49
|
"vitest": "2.0.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@tsed/ajv": "8.0.0-alpha.
|
|
53
|
-
"@tsed/core": "8.0.0-alpha.
|
|
54
|
-
"@tsed/di": "8.0.0-alpha.
|
|
55
|
-
"@tsed/json-mapper": "8.0.0-alpha.
|
|
52
|
+
"@tsed/ajv": "8.0.0-alpha.5",
|
|
53
|
+
"@tsed/core": "8.0.0-alpha.5",
|
|
54
|
+
"@tsed/di": "8.0.0-alpha.5",
|
|
55
|
+
"@tsed/json-mapper": "8.0.0-alpha.5",
|
|
56
56
|
"@tsed/logger": ">=6.7.5",
|
|
57
|
-
"@tsed/schema": "8.0.0-alpha.
|
|
57
|
+
"@tsed/schema": "8.0.0-alpha.5",
|
|
58
58
|
"mongoose": ">=6.0.0"
|
|
59
59
|
},
|
|
60
60
|
"repository": "https://github.com/tsedio/tsed",
|