@nmxjs/app 1.0.91 → 1.0.93
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/.github/workflows/npm.yaml +2 -2
- package/dist/GqlExceptionFilter.d.ts +1 -1
- package/dist/GqlExceptionFilter.js +6 -1
- package/dist/GqlExceptionFilter.js.map +1 -1
- package/dist/createTestNestApp.d.ts +3 -3
- package/dist/createTestNestApp.js.map +1 -1
- package/dist/createTestNestHttpApp.d.ts +2 -1
- package/dist/getTypeOrmModule.d.ts +2 -1
- package/package.json +11 -11
- package/types.d.ts +17 -0
|
@@ -11,10 +11,15 @@ const graphql_1 = require("graphql");
|
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const errors_1 = require("@nmxjs/errors");
|
|
13
13
|
let GqlExceptionFilter = class GqlExceptionFilter {
|
|
14
|
-
catch(error) {
|
|
14
|
+
catch(error, host) {
|
|
15
15
|
if (error.code === '23505') {
|
|
16
16
|
error = new errors_1.AlreadyExistError();
|
|
17
17
|
}
|
|
18
|
+
if (error instanceof common_1.NotFoundException) {
|
|
19
|
+
const ctx = host.switchToHttp();
|
|
20
|
+
const res = ctx.getResponse();
|
|
21
|
+
return res.status(404).json({ message: { statusCode: 404, error: 'Not Found', message: error.message } });
|
|
22
|
+
}
|
|
18
23
|
throw new graphql_1.GraphQLError(error.message, {
|
|
19
24
|
extensions: {
|
|
20
25
|
code: error.code,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GqlExceptionFilter.js","sourceRoot":"","sources":["../src/GqlExceptionFilter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"GqlExceptionFilter.js","sourceRoot":"","sources":["../src/GqlExceptionFilter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qCAAuC;AACvC,2CAA2E;AAC3E,0CAAkD;AAG3C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACtB,KAAK,CAAC,KAAK,EAAE,IAAI;QACtB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC3B,KAAK,GAAG,IAAI,0BAAiB,EAAE,CAAC;QAClC,CAAC;QAED,IAAI,KAAK,YAAY,0BAAiB,EAAE,CAAC;YACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;YAC9B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC5G,CAAC;QAED,MAAM,IAAI,sBAAY,CAAC,KAAK,CAAC,OAAO,EAAE;YACpC,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,IAAI,GAAG,EAAE;aAC1C;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAnBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,cAAK,GAAE;GACK,kBAAkB,CAmB9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/// <reference types="types" />
|
|
1
2
|
import { Test } from '@nestjs/testing';
|
|
2
|
-
import { ClientProxy } from '@nestjs/microservices';
|
|
3
3
|
export declare function createTestNestApp(module: Parameters<typeof Test.createTestingModule>[0]): Promise<{
|
|
4
|
-
app:
|
|
5
|
-
client:
|
|
4
|
+
app: any;
|
|
5
|
+
client: any;
|
|
6
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTestNestApp.js","sourceRoot":"","sources":["../src/createTestNestApp.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"createTestNestApp.js","sourceRoot":"","sources":["../src/createTestNestApp.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AACvC,yDAAiE;AAE1D,KAAK,UAAU,iBAAiB,CAAC,MAAsD;IAC5F,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAEvC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,6BAAa,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,yBAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAE7F,MAAM,aAAa,GAAG,MAAM,cAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;IACvE,MAAM,GAAG,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;IAElD,GAAG,CAAC,mBAAmB,CAAC;QACtB,SAAS,EAAE,yBAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,qBAAqB,EAAE,CAAC;IAClC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAEjB,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IAEvB,OAAO;QACL,GAAG;QACH,MAAM;KACP,CAAC;AACJ,CAAC;AAtBD,8CAsBC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="types" />
|
|
1
2
|
import { Test } from '@nestjs/testing';
|
|
2
|
-
export declare function createTestNestHttpApp(module: Parameters<typeof Test.createTestingModule>[0]): Promise<
|
|
3
|
+
export declare function createTestNestHttpApp(module: Parameters<typeof Test.createTestingModule>[0]): Promise<any>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="types" />
|
|
1
2
|
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
2
|
-
export declare const getTypeOrmModule: (options?: Partial<TypeOrmModuleOptions>) =>
|
|
3
|
+
export declare const getTypeOrmModule: (options?: Partial<TypeOrmModuleOptions>) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmxjs/app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.93",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,33 +22,33 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/n1ghtm6r9/nm-app#readme",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/node": "^
|
|
25
|
+
"@types/node": "^22.13.0",
|
|
26
26
|
"typescript": "^5.1.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apollo/server": "^4.9.5",
|
|
30
30
|
"@apollo/server-plugin-landing-page-graphql-playground": "^4.0.1",
|
|
31
31
|
"@graphql-tools/utils": "^10.5.4",
|
|
32
|
-
"@nestjs/core": "^10.3.0",
|
|
33
|
-
"@nestjs/microservices": "^10.3.0",
|
|
34
|
-
"@nestjs/testing": "^10.3.4",
|
|
35
|
-
"@nestjs/typeorm": "^10.0.0",
|
|
36
32
|
"@nmxjs/constants": "^1.0.4",
|
|
37
33
|
"@nmxjs/errors": "^1.0.9",
|
|
38
34
|
"@nmxjs/utils": "^1.0.14",
|
|
39
35
|
"apollo-server-express": "^3.10.2",
|
|
40
36
|
"compression": "^1.7.4",
|
|
41
37
|
"graphql": "^16.6.0",
|
|
42
|
-
"graphql-subscriptions": "^
|
|
38
|
+
"graphql-subscriptions": "^3.0.0",
|
|
43
39
|
"graphql-type-json": "^0.3.2",
|
|
44
40
|
"graphql-upload-ts": "^2.1.2",
|
|
45
|
-
"graphql-ws": "^
|
|
46
|
-
"helmet": "^
|
|
41
|
+
"graphql-ws": "^6.0.3",
|
|
42
|
+
"helmet": "^8.0.0",
|
|
47
43
|
"typeorm": "^0.3.10"
|
|
48
44
|
},
|
|
49
45
|
"peerDependencies": {
|
|
50
|
-
"@nestjs/
|
|
51
|
-
"@nestjs/
|
|
46
|
+
"@nestjs/core": "^11.0.7",
|
|
47
|
+
"@nestjs/microservices": "^11.0.7",
|
|
48
|
+
"@nestjs/testing": "^11.0.7",
|
|
49
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
50
|
+
"@nestjs/apollo": "^13.0.2",
|
|
51
|
+
"@nestjs/graphql": "^13.0.2",
|
|
52
52
|
"@nmxjs/api": "^1.1.16",
|
|
53
53
|
"@nmxjs/config": "^1.0.8",
|
|
54
54
|
"@nmxjs/events": "^1.0.9",
|
package/types.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
declare module '@nestjs/typeorm' {
|
|
2
|
+
class TypeOrmModule {
|
|
3
|
+
static forRootAsync: any;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
type TypeOrmModuleOptions = {};
|
|
7
|
+
}
|
|
8
|
+
declare module '@nestjs/core' {
|
|
9
|
+
class NestFactory {}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '@nestjs/testing' {
|
|
13
|
+
class Test {
|
|
14
|
+
static createTestingModule(options: { imports: any[] }): any;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
1
18
|
declare module '@nmxjs/config' {
|
|
2
19
|
interface IConfig {
|
|
3
20
|
event?: any;
|