@infineit-nestjs/services 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.
@@ -1,2 +1,3 @@
1
1
  export * from './module';
2
2
  export * from './services/logger.service';
3
+ export * from './services/prisma.service';
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./module"),exports),e.__exportStar(require("./services/logger.service"),exports);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./module"),exports),e.__exportStar(require("./services/logger.service"),exports),e.__exportStar(require("./services/prisma.service"),exports);
@@ -0,0 +1,17 @@
1
+ import { OnModuleInit, OnModuleDestroy } from '@nestjs/common';
2
+ import { ConfigService } from '@nestjs/config';
3
+ import { HealthIndicatorResult } from '@nestjs/terminus';
4
+ import { AllConfigType } from '@infineit-nestjs/types';
5
+ import { Prisma, PrismaClient } from '@prisma/client';
6
+ export declare class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
7
+ private readonly configService;
8
+ constructor(configService: ConfigService<AllConfigType>);
9
+ onModuleInit(): Promise<void>;
10
+ onModuleDestroy(): Promise<void>;
11
+ executeRawQuery<T>(queryMethod: Function, ...args: any[]): Promise<T | T[] | null>;
12
+ private getQueryDetails;
13
+ private sanitizeData;
14
+ executeRawQueryOld(queryObj?: any, data?: any, fields?: string[]): Promise<any>;
15
+ executeTransaction(actions: (prisma: Prisma.TransactionClient) => Promise<any>): Promise<any>;
16
+ isHealthy(): Promise<HealthIndicatorResult>;
17
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './module';
2
2
  export * from './services/logger.service';
3
+ export * from './services/prisma.service';
package/dist/es/index.mjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./module"),exports),e.__exportStar(require("./services/logger.service"),exports);
1
+ Object.defineProperty(exports,"__esModule",{value:!0});const e=require("tslib");e.__exportStar(require("./module"),exports),e.__exportStar(require("./services/logger.service"),exports),e.__exportStar(require("./services/prisma.service"),exports);
@@ -0,0 +1,17 @@
1
+ import { OnModuleInit, OnModuleDestroy } from '@nestjs/common';
2
+ import { ConfigService } from '@nestjs/config';
3
+ import { HealthIndicatorResult } from '@nestjs/terminus';
4
+ import { AllConfigType } from '@infineit-nestjs/types';
5
+ import { Prisma, PrismaClient } from '@prisma/client';
6
+ export declare class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
7
+ private readonly configService;
8
+ constructor(configService: ConfigService<AllConfigType>);
9
+ onModuleInit(): Promise<void>;
10
+ onModuleDestroy(): Promise<void>;
11
+ executeRawQuery<T>(queryMethod: Function, ...args: any[]): Promise<T | T[] | null>;
12
+ private getQueryDetails;
13
+ private sanitizeData;
14
+ executeRawQueryOld(queryObj?: any, data?: any, fields?: string[]): Promise<any>;
15
+ executeTransaction(actions: (prisma: Prisma.TransactionClient) => Promise<any>): Promise<any>;
16
+ isHealthy(): Promise<HealthIndicatorResult>;
17
+ }
@@ -1,8 +1,15 @@
1
- import Logger from '@infineit/winston-logger/logger/domain/logger';
1
+ import type Logger from '@infineit/winston-logger/logger/domain/logger';
2
+ import { OnModuleInit, OnModuleDestroy } from '@nestjs/common';
3
+ import { ConfigService } from '@nestjs/config';
4
+ import { HealthIndicatorResult } from '@nestjs/terminus';
5
+ import { AllConfigType } from '@infineit-nestjs/types';
6
+ import { PrismaClient, Prisma } from '@prisma/client';
2
7
 
3
8
  declare class HelperModule {
4
9
  }
5
10
 
11
+
12
+
6
13
  interface ILogData {
7
14
  organization?: string;
8
15
  context?: string;
@@ -32,4 +39,18 @@ declare class LoggerService {
32
39
  emergency(message: string | Error, data?: ILogData, profile?: string): void;
33
40
  }
34
41
 
35
- export { HelperModule, type ILogData, LogLevel, LoggerService };
42
+ declare class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
43
+ private readonly configService;
44
+ constructor(configService: ConfigService<AllConfigType>);
45
+ onModuleInit(): Promise<void>;
46
+ onModuleDestroy(): Promise<void>;
47
+ executeRawQuery<T>(queryMethod: Function, ...args: any[]): Promise<T | T[] | null>;
48
+ private getQueryDetails;
49
+ private sanitizeData;
50
+ executeRawQueryOld(queryObj?: any, data?: any, fields?: string[]): Promise<any>;
51
+ executeTransaction(actions: (prisma: Prisma.TransactionClient) => Promise<any>): Promise<any>;
52
+ isHealthy(): Promise<HealthIndicatorResult>;
53
+ }
54
+
55
+ export { HelperModule, LogLevel, LoggerService, PrismaService };
56
+ export type { ILogData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infineit-nestjs/services",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/es/index.mjs",
6
6
  "exports": {
@@ -23,7 +23,19 @@
23
23
  "build": "yarn clean && rollup -c",
24
24
  "dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\""
25
25
  },
26
+ "dependencies": {
27
+ "@infineit-nestjs/types": "1.0.1",
28
+ "@infineit/winston-logger": "^1.0.30",
29
+ "@nestjs/axios": "^4.0.0",
30
+ "@nestjs/terminus": "^11.0.0",
31
+ "@prisma/client": "^6.5.0",
32
+ "lodash": "^4.17.21"
33
+ },
26
34
  "devDependencies": {
35
+ "@nestjs/common": "^11.0.11",
36
+ "@nestjs/config": "^4.0.1",
37
+ "@nestjs/core": "^11.0.11",
38
+ "@nestjs/platform-express": "^11.0.11",
27
39
  "@rollup/plugin-commonjs": "^28.0.2",
28
40
  "@rollup/plugin-json": "^6.1.0",
29
41
  "@rollup/plugin-node-resolve": "^16.0.0",
@@ -34,19 +46,33 @@
34
46
  "@types/lodash": "^4",
35
47
  "@types/rollup-plugin-peer-deps-external": "^2",
36
48
  "@types/terser": "^3.12.0",
49
+ "axios": "^1.8.3",
50
+ "class-transformer": "^0.5.1",
51
+ "class-validator": "^0.14.1",
52
+ "express": "^4.21.2",
53
+ "reflect-metadata": "^0.2.2",
37
54
  "rollup": "^4.34.8",
38
55
  "rollup-plugin-dts": "^6.1.1",
39
56
  "rollup-plugin-peer-deps-external": "^2.2.4",
40
57
  "rollup-plugin-preserve-directives": "^0.4.0",
58
+ "rxjs": "^7.8.2",
41
59
  "typescript": "^5.7.3"
42
60
  },
61
+ "peerDependencies": {
62
+ "@nestjs/common": "^11.0.11",
63
+ "@nestjs/config": "^4.0.1",
64
+ "@nestjs/core": "^11.0.11",
65
+ "@nestjs/platform-express": "^11.0.11",
66
+ "axios": "^1.8.3",
67
+ "class-transformer": "^0.5.1",
68
+ "class-validator": "^0.14.1",
69
+ "express": "^4.21.2",
70
+ "reflect-metadata": "^0.2.2",
71
+ "rxjs": "^7.8.2"
72
+ },
43
73
  "sideEffects": false,
44
74
  "publishConfig": {
45
75
  "access": "public"
46
76
  },
47
- "dependencies": {
48
- "@infineit/winston-logger": "^1.0.30",
49
- "@nestjs/axios": "^4.0.0"
50
- },
51
- "gitHead": "4598240c5af3b02eea24e65b71a3d14f0a925f63"
77
+ "gitHead": "0ca54bcc5ca6483453f7b875cfda28bcb1a88799"
52
78
  }