nesthub 1.0.0 → 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.
Files changed (66) hide show
  1. package/README.md +0 -1
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.js +18 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/queue/README.md +1 -1
  6. package/dist/queue/index.d.ts +4 -9
  7. package/dist/queue/index.js +5 -1
  8. package/dist/queue/index.js.map +1 -1
  9. package/dist/tsconfig.build.tsbuildinfo +1 -1
  10. package/package.json +1 -1
  11. package/src/queue/README.md +1 -1
  12. package/dist/cache/index.spec.d.ts +0 -1
  13. package/dist/cache/index.spec.js +0 -61
  14. package/dist/cache/index.spec.js.map +0 -1
  15. package/dist/excel/excel.module.d.ts +0 -2
  16. package/dist/excel/excel.module.js +0 -21
  17. package/dist/excel/excel.module.js.map +0 -1
  18. package/dist/excel/interfaces.d.ts +0 -19
  19. package/dist/excel/interfaces.js +0 -3
  20. package/dist/excel/interfaces.js.map +0 -1
  21. package/dist/index.spec.d.ts +0 -1
  22. package/dist/index.spec.js +0 -11
  23. package/dist/index.spec.js.map +0 -1
  24. package/dist/notification/email/index.d.ts +0 -62
  25. package/dist/notification/email/index.js +0 -253
  26. package/dist/notification/email/index.js.map +0 -1
  27. package/dist/notification/email/index.spec.d.ts +0 -1
  28. package/dist/notification/email/index.spec.js +0 -121
  29. package/dist/notification/email/index.spec.js.map +0 -1
  30. package/dist/notification/firebase/index.d.ts +0 -52
  31. package/dist/notification/firebase/index.js +0 -261
  32. package/dist/notification/firebase/index.js.map +0 -1
  33. package/dist/notification/firebase/index.spec.d.ts +0 -1
  34. package/dist/notification/firebase/index.spec.js +0 -114
  35. package/dist/notification/firebase/index.spec.js.map +0 -1
  36. package/dist/notification/index.spec.d.ts +0 -1
  37. package/dist/notification/index.spec.js +0 -336
  38. package/dist/notification/index.spec.js.map +0 -1
  39. package/dist/notification/shared.d.ts +0 -48
  40. package/dist/notification/shared.js +0 -95
  41. package/dist/notification/shared.js.map +0 -1
  42. package/dist/notification/sms/index.d.ts +0 -52
  43. package/dist/notification/sms/index.js +0 -234
  44. package/dist/notification/sms/index.js.map +0 -1
  45. package/dist/notification/sms/index.spec.d.ts +0 -1
  46. package/dist/notification/sms/index.spec.js +0 -123
  47. package/dist/notification/sms/index.spec.js.map +0 -1
  48. package/dist/notification/telegram/index.d.ts +0 -50
  49. package/dist/notification/telegram/index.js +0 -248
  50. package/dist/notification/telegram/index.js.map +0 -1
  51. package/dist/notification/telegram/index.spec.d.ts +0 -1
  52. package/dist/notification/telegram/index.spec.js +0 -108
  53. package/dist/notification/telegram/index.spec.js.map +0 -1
  54. package/dist/notification/typeorm-storage.d.ts +0 -28
  55. package/dist/notification/typeorm-storage.js +0 -56
  56. package/dist/notification/typeorm-storage.js.map +0 -1
  57. package/dist/notification/unified.d.ts +0 -47
  58. package/dist/notification/unified.js +0 -207
  59. package/dist/notification/unified.js.map +0 -1
  60. package/dist/queue/index.spec.d.ts +0 -1
  61. package/dist/queue/index.spec.js +0 -76
  62. package/dist/queue/index.spec.js.map +0 -1
  63. package/dist/tsconfig.tsbuildinfo +0 -1
  64. package/dist/typeorm/index.spec.d.ts +0 -1
  65. package/dist/typeorm/index.spec.js +0 -109
  66. package/dist/typeorm/index.spec.js.map +0 -1
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 = "2.2.0";
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 = '2.2.0';
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,C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