@ptc-org/nestjs-query-typegoose 7.0.1 → 8.0.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.
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@ptc-org/nestjs-query-typegoose",
3
- "version": "7.0.1",
3
+ "version": "8.0.0",
4
4
  "description": "Typegoose adapter for @ptc-org/nestjs-query-core",
5
- "author": "john mcinall<johnmcinall@gmail.com>",
6
5
  "homepage": "https://github.com/tripss/nestjs-query#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/tripss/nestjs-query/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/tripss/nestjs-query.git",
12
+ "directory": "packages/query-typegoose"
13
+ },
7
14
  "license": "MIT",
8
- "main": "./src/index.js",
15
+ "author": "john mcinall<johnmcinall@gmail.com>",
16
+ "main": "src/index.js",
9
17
  "types": "src/index.d.ts",
10
18
  "directories": {
11
19
  "lib": "src",
@@ -14,16 +22,13 @@
14
22
  "files": [
15
23
  "src/**"
16
24
  ],
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
25
  "dependencies": {
21
26
  "camel-case": "^4.1.2",
22
27
  "is-class": "0.0.9",
23
28
  "lodash.escaperegexp": "^4.1.2",
24
29
  "lodash.merge": "^4.6.2",
25
30
  "tslib": "^2.6.3",
26
- "@ptc-org/nestjs-query-core": "7.0.1",
31
+ "@ptc-org/nestjs-query-core": "8.0.0",
27
32
  "reflect-metadata": "0.2.2"
28
33
  },
29
34
  "peerDependencies": {
@@ -32,13 +37,9 @@
32
37
  "@typegoose/typegoose": "^9.0.0 || ^10.0.0 || ^11.0.0",
33
38
  "mongoose": "^6.5.0 || ^7.0.3 || ^8.0.0"
34
39
  },
35
- "repository": {
36
- "type": "git",
37
- "url": "git+https://github.com/tripss/nestjs-query.git",
38
- "directory": "packages/query-typegoose"
39
- },
40
- "bugs": {
41
- "url": "https://github.com/tripss/nestjs-query/issues"
40
+ "publishConfig": {
41
+ "access": "public"
42
42
  },
43
+ "packageManager": "yarn@4.4.0",
43
44
  "type": "commonjs"
44
- }
45
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../../packages/query-typegoose/src/providers.ts"],"names":[],"mappings":";;;AAAA,4DAAqD;AAErD,kEAAsF;AACtF,oDAA6D;AAE7D,uCAAkC;AAElC,yCAAkD;AAOlD,MAAM,gBAAgB,GAAG,CAAC,IAAoB,EAA0B,EAAE,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAA;AAExF,MAAM,2BAA2B,GAAG,CAAC,IAA0B,EAAqC,EAAE,CACpG,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEvC,IAAA,uCAAmB,EAAC,CAAC,GAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,oBAAQ,CAAC,QAAQ,CAAC,CAAA;AAEpG,SAAS,iBAAiB,CAAC,IAAoB;IAC7C,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,CAAA;IACjC,CAAC;IACD,IAAI,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,mCAAmC,CAC1C,KAAiD;IAEjD,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,iHAAiH;QACjH,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,gBAAgB,CAAC,CAAA;IAC7D,CAAC;IACD,MAAM,SAAS,GAAG,UAAU,CAAC,cAAc,EAAE,IAAI,CAAA;IAEjD,OAAO;QACL,OAAO,EAAE,IAAA,wCAA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AE,CAAA;IACjC,CAAC;IACD,IAAI,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,mCAAmC,CAC1C,KAAiD;IAEjD,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,iHAAiH;QACjH,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,gBAAgB,CAAC,CAAA;IAC7D,CAAC;IACD,MAAM,SAAS,GAAG,UAAU,CAAC,cAAc,EAAE,IAAI,CAAA;IAEjD,OAAO;QACL,OAAO,EAAE,IAAA,wCAAoB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAClD,UAAU,CAAC,UAA6C;YACtD,mGAAmG;YACnG,+DAA+D;YAC/D,IAAA,uCAAmB,EAAC,CAAC,GAA0B,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;YAEjG,OAAO,IAAI,gCAAqB,CAAC,UAAU,CAAC,CAAA;QAC9C,CAAC;QACD,MAAM,EAAE,CAAC,IAAA,gCAAa,EAAC,SAAS,CAAC,CAAC;KACnC,CAAA;AACH,CAAC;AAEM,MAAM,oCAAoC,GAAG,CAAC,MAAsD,EAAqB,EAAE,CAChI,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,CAAC,CAAA;AADtD,QAAA,oCAAoC,wCACkB"}
@@ -1,4 +1,3 @@
1
- /// <reference types="mongoose/types/query" />
2
1
  import { CommonFieldComparisonBetweenType, FilterComparisonOperators } from '@ptc-org/nestjs-query-core';
3
2
  import { mongoose } from '@typegoose/typegoose';
4
3
  import { ReturnModelType } from '../typegoose-types.helper';
@@ -1,4 +1,3 @@
1
- /// <reference types="mongoose/types/query" />
2
1
  import { AggregateQuery, Filter, Query, SortField } from '@ptc-org/nestjs-query-core';
3
2
  import { DocumentType, mongoose } from '@typegoose/typegoose';
4
3
  import { ReturnModelType } from '../typegoose-types.helper';
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSchemaKey = void 0;
3
+ exports.getSchemaKey = getSchemaKey;
4
4
  function getSchemaKey(key) {
5
5
  return key === 'id' ? '_id' : key;
6
6
  }
7
- exports.getSchemaKey = getSchemaKey;
8
7
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../packages/query-typegoose/src/query/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAA;AACnC,CAAC;AAFD,oCAEC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../packages/query-typegoose/src/query/helpers.ts"],"names":[],"mappings":";;AAAA,oCAEC;AAFD,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAA;AACnC,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="mongoose/types/query" />
2
1
  import { Filter } from '@ptc-org/nestjs-query-core';
3
2
  import { mongoose } from '@typegoose/typegoose';
4
3
  import { ReturnModelType } from '../typegoose-types.helper';
@@ -1,4 +1,3 @@
1
- /// <reference types="mongoose/types/schemaoptions" />
2
1
  import { mongoose } from '@typegoose/typegoose';
3
2
  export interface TypegooseClass {
4
3
  new (...args: any[]): any;
@@ -1,5 +1,3 @@
1
- /// <reference types="mongoose/types/schematypes" />
2
- /// <reference types="mongoose/types/models" />
3
1
  import { DocumentType, mongoose } from '@typegoose/typegoose';
4
2
  import { AnyParamConstructor, BeAnObject, BeAnyObject, IObjectWithTypegooseFunction } from '@typegoose/typegoose/lib/types';
5
3
  export type ReferenceOptions = {
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isVirtualTypeWithReferenceOptions = exports.isVirtualReferenceOptions = exports.isEmbeddedSchemaTypeOptions = exports.isSchemaTypeWithReferenceOptions = exports.isReferenceOptions = void 0;
3
+ exports.isReferenceOptions = isReferenceOptions;
4
+ exports.isSchemaTypeWithReferenceOptions = isSchemaTypeWithReferenceOptions;
5
+ exports.isEmbeddedSchemaTypeOptions = isEmbeddedSchemaTypeOptions;
6
+ exports.isVirtualReferenceOptions = isVirtualReferenceOptions;
7
+ exports.isVirtualTypeWithReferenceOptions = isVirtualTypeWithReferenceOptions;
4
8
  function isReferenceOptions(options) {
5
9
  return (typeof options === 'object' &&
6
10
  options !== null &&
@@ -8,7 +12,6 @@ function isReferenceOptions(options) {
8
12
  'ref' in options &&
9
13
  typeof options.ref === 'string');
10
14
  }
11
- exports.isReferenceOptions = isReferenceOptions;
12
15
  function isSchemaTypeWithReferenceOptions(type) {
13
16
  if (type && typeof type === 'object' && 'options' in type) {
14
17
  const { options } = type;
@@ -16,7 +19,6 @@ function isSchemaTypeWithReferenceOptions(type) {
16
19
  }
17
20
  return false;
18
21
  }
19
- exports.isSchemaTypeWithReferenceOptions = isSchemaTypeWithReferenceOptions;
20
22
  function isEmbeddedSchemaTypeOptions(options) {
21
23
  if (options && typeof options === 'object' && '$embeddedSchemaType' in options) {
22
24
  const { $embeddedSchemaType } = options;
@@ -24,11 +26,9 @@ function isEmbeddedSchemaTypeOptions(options) {
24
26
  }
25
27
  return false;
26
28
  }
27
- exports.isEmbeddedSchemaTypeOptions = isEmbeddedSchemaTypeOptions;
28
29
  function isVirtualReferenceOptions(options) {
29
30
  return (typeof options === 'object' && options !== null && 'ref' in options && 'localField' in options && 'foreignField' in options);
30
31
  }
31
- exports.isVirtualReferenceOptions = isVirtualReferenceOptions;
32
32
  function isVirtualTypeWithReferenceOptions(virtualType) {
33
33
  if (virtualType && typeof virtualType === 'object' && 'options' in virtualType) {
34
34
  const { options } = virtualType;
@@ -36,5 +36,4 @@ function isVirtualTypeWithReferenceOptions(virtualType) {
36
36
  }
37
37
  return false;
38
38
  }
39
- exports.isVirtualTypeWithReferenceOptions = isVirtualTypeWithReferenceOptions;
40
39
  //# sourceMappingURL=typegoose-types.helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typegoose-types.helper.js","sourceRoot":"","sources":["../../../../packages/query-typegoose/src/typegoose-types.helper.ts"],"names":[],"mappings":";;;AAwBA,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,MAAM,IAAI,OAAO;QACjB,KAAK,IAAI,OAAO;QAChB,OAAQ,OAA4B,CAAC,GAAG,KAAK,QAAQ,CACtD,CAAA;AACH,CAAC;AARD,gDAQC;AAMD,SAAgB,gCAAgC,CAAC,IAAa;IAC5D,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QAC1D,MAAM,EAAE,OAAO,EAAE,GAAG,IAA4B,CAAA;QAChD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,4EAMC;AAMD,SAAgB,2BAA2B,CAAC,OAAgB;IAC1D,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,qBAAqB,IAAI,OAAO,EAAE,CAAC;QAC/E,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAwD,CAAA;QACxF,OAAO,kBAAkB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,kEAMC;AAQD,SAAgB,yBAAyB,CAAC,OAAgB;IACxD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,IAAI,cAAc,IAAI,OAAO,CAC5H,CAAA;AACH,CAAC;AAJD,8DAIC;AAMD,SAAgB,iCAAiC,CAAC,WAAoB;IACpE,IAAI,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;QAC/E,MAAM,EAAE,OAAO,EAAE,GAAG,WAAmC,CAAA;QACvD,OAAO,yBAAyB,CAAC,OAAO,CAAC,CAAA;IAC3C,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,8EAMC"}
1
+ {"version":3,"file":"typegoose-types.helper.js","sourceRoot":"","sources":["../../../../packages/query-typegoose/src/typegoose-types.helper.ts"],"names":[],"mappings":";;AAwBA,gDAQC;AAMD,4EAMC;AAMD,kEAMC;AAQD,8DAIC;AAMD,8EAMC;AAxDD,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,MAAM,IAAI,OAAO;QACjB,KAAK,IAAI,OAAO;QAChB,OAAQ,OAA4B,CAAC,GAAG,KAAK,QAAQ,CACtD,CAAA;AACH,CAAC;AAMD,SAAgB,gCAAgC,CAAC,IAAa;IAC5D,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QAC1D,MAAM,EAAE,OAAO,EAAE,GAAG,IAA4B,CAAA;QAChD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAMD,SAAgB,2BAA2B,CAAC,OAAgB;IAC1D,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,qBAAqB,IAAI,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