@obisey/nest 0.1.13 → 0.1.15

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@obisey/nest",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "NestJS utilities and base classes by Obisey",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,32 +20,30 @@
20
20
  "author": "Ulises",
21
21
  "license": "MIT",
22
22
  "peerDependencies": {
23
- "@apollo/subgraph": "^2.5.0",
24
- "graphql": "^16.11.0",
23
+ "@apollo/subgraph": "^2.11.0",
24
+ "graphql": "^16.0.0",
25
25
  "graphql-scalars": "^1.23.0",
26
26
  "lodash": "^4.17.21",
27
- "sequelize": "^6.32.1",
28
- "sequelize-typescript": "^2.1.5",
29
- "type-graphql": "^1.2.0-beta.1",
30
- "typegraphql-nestjs": "^0.7.0"
27
+ "sequelize": "^6.37.7",
28
+ "sequelize-typescript": "^2.1.6",
29
+ "type-graphql": "^1.2.0-beta.1"
31
30
  },
32
31
  "devDependencies": {
33
32
  "@nestjs/axios": "^4.0.0",
34
33
  "@nestjs/cache-manager": "^3.0.1",
35
- "@nestjs/common": "^10.3.3",
36
- "@nestjs/core": "^10.3.3",
37
- "@nestjs/graphql": "^12.2.2",
34
+ "@nestjs/common": "^11.1.3",
35
+ "@nestjs/core": "^11.1.3",
36
+ "@nestjs/graphql": "^13.1.0",
38
37
  "@types/sequelize": "^4.28.20",
39
38
  "cache-manager": "^7.0.0",
40
39
  "cache-manager-redis-store": "^3.0.1",
41
- "graphql": "^16.11.0",
40
+ "graphql": "^16.0.0",
42
41
  "ioredis": "^5.6.1",
43
42
  "reflect-metadata": "^0.2.2",
44
- "sequelize": "^6.32.1",
45
- "sequelize-typescript": "^2.1.5",
43
+ "sequelize": "^6.37.7",
44
+ "sequelize-typescript": "^2.1.6",
46
45
  "type-graphql": "^1.2.0-beta.1",
47
- "typegraphql-nestjs": "^0.7.0",
48
- "typescript": "^5.4.5"
46
+ "typescript": "^5.8.3"
49
47
  },
50
48
  "dependencies": {
51
49
  "dayjs": "^1.11.13",
@@ -1,5 +1,5 @@
1
1
  import { Cache } from 'cache-manager';
2
- import { RedisClientType } from 'redis';
2
+ import { createClient } from 'redis';
3
3
  import { Key } from './utils/keyInterface';
4
4
  export declare const redis_on = true;
5
5
  type Ctor = new (...a: any[]) => any;
@@ -15,7 +15,7 @@ interface Peticion {
15
15
  }
16
16
  export declare function BaseService(modelo: string): {
17
17
  new <T extends {
18
- readonly redis: RedisClientType;
18
+ readonly redis: ReturnType<typeof createClient>;
19
19
  readonly cacheManager: Cache;
20
20
  buscarXid<Ctor>({ value: { id, cacheable }, key, Clase, repository, pagina, }: Peticion): Promise<Ctor>;
21
21
  buscarTodos<Ctor>({ value, key, Clase, repository, pagina, cacheable, }: Peticion): Promise<Ctor[]>;
@@ -52,8 +52,8 @@ export declare function BaseService(modelo: string): {
52
52
  repository: any;
53
53
  }): Promise<Ctor>;
54
54
  eliminarCache(items: string[], borrarSSR?: boolean): Promise<boolean[][]>;
55
- }>(redis: RedisClientType, cacheManager: Cache): {
56
- readonly redis: RedisClientType;
55
+ }>(redis: ReturnType<typeof createClient>, cacheManager: Cache): {
56
+ readonly redis: ReturnType<typeof createClient>;
57
57
  readonly cacheManager: Cache;
58
58
  buscarXid<Ctor>({ value: { id, cacheable }, key, Clase, repository, pagina, }: Peticion): Promise<Ctor>;
59
59
  buscarTodos<Ctor>({ value, key, Clase, repository, pagina, cacheable, }: Peticion): Promise<Ctor[]>;
@@ -33,8 +33,7 @@ var stringifyInclude = ({ where, as, include }) => ({
33
33
  });
34
34
  function BaseService(modelo) {
35
35
  return class BaseService {
36
- constructor(redis, // o ReturnType<typeof createClient>
37
- cacheManager) {
36
+ constructor(redis, cacheManager) {
38
37
  this.redis = redis;
39
38
  this.cacheManager = cacheManager;
40
39
  }
package/types.d.ts CHANGED
@@ -34,6 +34,5 @@ export declare class OrderInput {
34
34
  acomodo: String;
35
35
  key: String;
36
36
  }
37
- export declare class UtilsModule {
38
- }
37
+ export declare const UtilsTypes: (typeof Conteo | typeof Status | typeof ArgsFechas | typeof OrderInput)[];
39
38
  export {};
package/types.js CHANGED
@@ -9,10 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UtilsModule = exports.OrderInput = exports.ArgsFechas = exports.Status = exports.Conteo = exports.peticion = exports.paginate = void 0;
12
+ exports.UtilsTypes = exports.OrderInput = exports.ArgsFechas = exports.Status = exports.Conteo = exports.peticion = exports.paginate = void 0;
13
13
  const graphql_1 = require("@nestjs/graphql");
14
- const common_1 = require("@nestjs/common");
15
- const typegraphql_nestjs_1 = require("typegraphql-nestjs");
16
14
  const paginate = ({ where, pagina, limite, order }) => {
17
15
  const offset = (pagina - 1) * limite;
18
16
  const limit = limite;
@@ -84,15 +82,6 @@ __decorate([
84
82
  exports.OrderInput = OrderInput = __decorate([
85
83
  (0, graphql_1.InputType)()
86
84
  ], OrderInput);
87
- let UtilsModule = class UtilsModule {
88
- };
89
- exports.UtilsModule = UtilsModule;
90
- exports.UtilsModule = UtilsModule = __decorate([
91
- (0, common_1.Module)({
92
- imports: [
93
- typegraphql_nestjs_1.TypeGraphQLModule.forFeature({
94
- orphanedTypes: [ArgsFechas, Status, Conteo, OrderInput],
95
- }),
96
- ],
97
- })
98
- ], UtilsModule);
85
+ exports.UtilsTypes = [
86
+ ArgsFechas, Status, Conteo, OrderInput
87
+ ];