nesthub 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -12,7 +12,6 @@ npm install nesthub
12
12
 
13
13
  | Import path | Description | README |
14
14
  |---|---|---|
15
- | `nesthub` | Version constant (`VERSION`) | — |
16
15
  | `nesthub/typeorm` | TypeORM configuration helpers (RDS PostgreSQL, MySQL) | [README](src/typeorm/README.md) |
17
16
  | `nesthub/cache` | Global cache module with Valkey / Redis backend | [README](src/cache/README.md) |
18
17
  | `nesthub/queue` | BullMQ config factory for Valkey / Redis backend | [README](src/queue/README.md) |
package/dist/index.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare const VERSION = "1.0.1";
1
+ export * from './typeorm';
2
+ export * from './cache';
3
+ export * from './queue';
4
+ export * from './notification';
package/dist/index.js CHANGED
@@ -1,5 +1,21 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VERSION = void 0;
4
- exports.VERSION = '1.0.1';
17
+ __exportStar(require("./typeorm"), exports);
18
+ __exportStar(require("./cache"), exports);
19
+ __exportStar(require("./queue"), exports);
20
+ __exportStar(require("./notification"), exports);
5
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB;AACxB,iDAA+B"}
@@ -79,4 +79,4 @@ BullModule.forRootAsync({
79
79
  |---|---|---|
80
80
  | `store` | `'valkey'` | Backend store: `'valkey'` or `'redis'` |
81
81
  | `prefix` | `'{default}'` | BullMQ key prefix |
82
- | `defaultJobOptions` | | Default job options for all queues (e.g. `{ attempts: 3 }`) |
82
+ | `defaultJobOptions` | `{ removeOnComplete: true, removeOnFail: true }` | Default job options (auto-removes jobs to prevent memory overflow; override by passing same keys) |
@@ -1,14 +1,9 @@
1
1
  import type { ConfigService } from '@nestjs/config';
2
+ import type { BullRootModuleOptions } from '@nestjs/bullmq';
3
+ import type { DefaultJobOptions } from 'bullmq';
2
4
  export interface QueueModuleOptions {
3
5
  store?: 'valkey' | 'redis';
4
6
  prefix?: string;
5
- defaultJobOptions?: Record<string, unknown>;
7
+ defaultJobOptions?: DefaultJobOptions;
6
8
  }
7
- export interface BullMQModuleOptions {
8
- connection: {
9
- url: string;
10
- };
11
- prefix: string;
12
- defaultJobOptions?: Record<string, unknown>;
13
- }
14
- export declare function configBullMQ(configService: ConfigService, options?: QueueModuleOptions): BullMQModuleOptions;
9
+ export declare function configBullMQ(configService: ConfigService, options?: QueueModuleOptions): BullRootModuleOptions;
@@ -11,7 +11,11 @@ function configBullMQ(configService, options) {
11
11
  return {
12
12
  connection: { url },
13
13
  prefix: prefix ?? '{default}',
14
- defaultJobOptions,
14
+ defaultJobOptions: {
15
+ removeOnComplete: true,
16
+ removeOnFail: true,
17
+ ...defaultJobOptions,
18
+ },
15
19
  };
16
20
  }
17
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/queue/index.ts"],"names":[],"mappings":";;AAcA,oCAeC;AAfD,SAAgB,YAAY,CAC1B,aAA4B,EAC5B,OAA4B;IAE5B,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACtE,MAAM,MAAM,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAS,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,wBAAwB,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO;QACL,UAAU,EAAE,EAAE,GAAG,EAAE;QACnB,MAAM,EAAE,MAAM,IAAI,WAAW;QAC7B,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/queue/index.ts"],"names":[],"mappings":";;AAUA,oCAmBC;AAnBD,SAAgB,YAAY,CAC1B,aAA4B,EAC5B,OAA4B;IAE5B,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACtE,MAAM,MAAM,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAS,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,wBAAwB,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO;QACL,UAAU,EAAE,EAAE,GAAG,EAAE;QACnB,MAAM,EAAE,MAAM,IAAI,WAAW;QAC7B,iBAAiB,EAAE;YACjB,gBAAgB,EAAE,IAAI;YACtB,YAAY,EAAE,IAAI;YAClB,GAAG,iBAAiB;SACrB;KACF,CAAC;AACJ,CAAC"}