@nest-boot/graphql-logger 8.0.0-beta.0 → 8.0.0-beta.1
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/dist/graphql-logger-module-options.interface.d.ts +0 -1
- package/dist/graphql-logger-module-options.interface.js +0 -1
- package/dist/graphql-logger-module-options.interface.js.map +1 -1
- package/dist/graphql-logger.module.d.ts +0 -17
- package/dist/graphql-logger.module.js +0 -17
- package/dist/graphql-logger.module.js.map +1 -1
- package/dist/graphql-logger.plugin.d.ts +0 -14
- package/dist/graphql-logger.plugin.js +0 -15
- package/dist/graphql-logger.plugin.js.map +1 -1
- package/package.json +41 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-logger-module-options.interface.js","sourceRoot":"","sources":["../src/graphql-logger-module-options.interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql-logger-module-options.interface.js","sourceRoot":"","sources":["../src/graphql-logger-module-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import { type DynamicModule } from "@nestjs/common";
|
|
2
2
|
import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./graphql-logger.module-definition.js";
|
|
3
|
-
/**
|
|
4
|
-
* GraphQL request logging module.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Provides an Apollo Server plugin that logs GraphQL operations
|
|
8
|
-
* including query details, variables, and execution timing.
|
|
9
|
-
*/
|
|
10
3
|
export declare class GraphQLLoggerModule extends ConfigurableModuleClass {
|
|
11
|
-
/**
|
|
12
|
-
* Registers the GraphQLLoggerModule with the given options.
|
|
13
|
-
* @param options - Configuration options for GraphQL logging
|
|
14
|
-
* @returns Dynamic module configuration
|
|
15
|
-
*/
|
|
16
4
|
static forRoot(options: typeof OPTIONS_TYPE): DynamicModule;
|
|
17
|
-
/**
|
|
18
|
-
* Registers the GraphQLLoggerModule asynchronously with factory functions.
|
|
19
|
-
* @param options - Async configuration options
|
|
20
|
-
* @returns Dynamic module configuration
|
|
21
|
-
*/
|
|
22
5
|
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule;
|
|
23
6
|
}
|
|
@@ -7,27 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { Global, Module } from "@nestjs/common";
|
|
8
8
|
import { ConfigurableModuleClass, } from "./graphql-logger.module-definition.js";
|
|
9
9
|
import { GraphQLLoggerPlugin } from "./graphql-logger.plugin.js";
|
|
10
|
-
/**
|
|
11
|
-
* GraphQL request logging module.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Provides an Apollo Server plugin that logs GraphQL operations
|
|
15
|
-
* including query details, variables, and execution timing.
|
|
16
|
-
*/
|
|
17
10
|
let GraphQLLoggerModule = class GraphQLLoggerModule extends ConfigurableModuleClass {
|
|
18
|
-
/**
|
|
19
|
-
* Registers the GraphQLLoggerModule with the given options.
|
|
20
|
-
* @param options - Configuration options for GraphQL logging
|
|
21
|
-
* @returns Dynamic module configuration
|
|
22
|
-
*/
|
|
23
11
|
static forRoot(options) {
|
|
24
12
|
return super.forRoot(options);
|
|
25
13
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Registers the GraphQLLoggerModule asynchronously with factory functions.
|
|
28
|
-
* @param options - Async configuration options
|
|
29
|
-
* @returns Dynamic module configuration
|
|
30
|
-
*/
|
|
31
14
|
static forRootAsync(options) {
|
|
32
15
|
return super.forRootAsync(options);
|
|
33
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-logger.module.js","sourceRoot":"","sources":["../src/graphql-logger.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAEL,uBAAuB,GAExB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"graphql-logger.module.js","sourceRoot":"","sources":["../src/graphql-logger.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAEL,uBAAuB,GAExB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAa1D,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,uBAAuB;IAM9D,MAAM,CAAU,OAAO,CAAC,OAA4B;QAClD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAOD,MAAM,CAAU,YAAY,CAC1B,OAAkC;QAElC,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF,CAAA;AApBY,mBAAmB;IAJ/B,MAAM,EAAE;IACR,MAAM,CAAC;QACN,SAAS,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,mBAAmB,CAoB/B"}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { type ApolloServerPlugin, type BaseContext, type GraphQLRequestListener } from "@apollo/server";
|
|
2
2
|
import { Logger } from "@nest-boot/logger";
|
|
3
|
-
/**
|
|
4
|
-
* Apollo Server plugin that logs GraphQL operation metadata.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Adds operation ID, name, and type (query/mutation/subscription)
|
|
8
|
-
* to the structured logger on each resolved operation.
|
|
9
|
-
*/
|
|
10
3
|
export declare class GraphQLLoggerPlugin implements ApolloServerPlugin {
|
|
11
4
|
private readonly logger;
|
|
12
|
-
/** Creates a new GraphQLLoggerPlugin instance.
|
|
13
|
-
* @param logger - Structured logger for recording operation metadata
|
|
14
|
-
*/
|
|
15
5
|
constructor(logger: Logger);
|
|
16
|
-
/**
|
|
17
|
-
* Hook invoked when a GraphQL request starts processing.
|
|
18
|
-
* @returns A request listener that logs operation metadata after resolution
|
|
19
|
-
*/
|
|
20
6
|
requestDidStart(): Promise<GraphQLRequestListener<BaseContext>>;
|
|
21
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/require-await */
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,25 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
9
|
};
|
|
11
10
|
import { Logger } from "@nest-boot/logger";
|
|
12
11
|
import { Plugin } from "@nestjs/apollo";
|
|
13
|
-
/**
|
|
14
|
-
* Apollo Server plugin that logs GraphQL operation metadata.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* Adds operation ID, name, and type (query/mutation/subscription)
|
|
18
|
-
* to the structured logger on each resolved operation.
|
|
19
|
-
*/
|
|
20
12
|
let GraphQLLoggerPlugin = class GraphQLLoggerPlugin {
|
|
21
13
|
logger;
|
|
22
|
-
/** Creates a new GraphQLLoggerPlugin instance.
|
|
23
|
-
* @param logger - Structured logger for recording operation metadata
|
|
24
|
-
*/
|
|
25
14
|
constructor(logger) {
|
|
26
15
|
this.logger = logger;
|
|
27
16
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Hook invoked when a GraphQL request starts processing.
|
|
30
|
-
* @returns A request listener that logs operation metadata after resolution
|
|
31
|
-
*/
|
|
32
17
|
async requestDidStart() {
|
|
33
18
|
return {
|
|
34
19
|
didResolveOperation: async (ctx) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-logger.plugin.js","sourceRoot":"","sources":["../src/graphql-logger.plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql-logger.plugin.js","sourceRoot":"","sources":["../src/graphql-logger.plugin.ts"],"names":[],"mappings":";;;;;;;;;AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAUjC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAID;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAM/C,KAAK,CAAC,eAAe;QACnB,OAAO;YACL,mBAAmB,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;gBACjC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;oBACjB,SAAS,EAAE;wBACT,EAAE,EAAE,GAAG,CAAC,SAAS;wBACjB,IAAI,EAAE,GAAG,CAAC,aAAa;wBACvB,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,SAAS;qBAC/B;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAvBY,mBAAmB;IAD/B,MAAM,EAAE;qCAK8B,MAAM;GAJhC,mBAAmB,CAuB/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/graphql-logger",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/nest-boot/nest-boot.git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"types": "dist/index.d.ts",
|
|
17
|
+
"main": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
19
|
"directories": {
|
|
20
20
|
"lib": "dist"
|
|
21
21
|
},
|
|
@@ -24,35 +24,43 @@
|
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@apollo/server": "^5.2.0",
|
|
27
|
-
"@
|
|
28
|
-
"@nestjs/
|
|
29
|
-
"@nestjs/
|
|
30
|
-
"@nestjs/
|
|
31
|
-
"@nestjs/
|
|
27
|
+
"@as-integrations/express5": "^1.1.2",
|
|
28
|
+
"@nestjs/apollo": "^14.0.0",
|
|
29
|
+
"@nestjs/common": "^12.0.1",
|
|
30
|
+
"@nestjs/core": "^12.0.1",
|
|
31
|
+
"@nestjs/graphql": "^14.0.0",
|
|
32
|
+
"@nestjs/platform-express": "^12.0.1",
|
|
33
|
+
"@nestjs/testing": "^12.0.1",
|
|
32
34
|
"@types/express": "^5.0.3",
|
|
33
35
|
"@types/node": "^26.0.0",
|
|
36
|
+
"@types/supertest": "^7.2.1",
|
|
37
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
34
38
|
"eslint": "^9.39.3",
|
|
35
39
|
"express": "^5.1.0",
|
|
36
40
|
"graphql": "^16.11.0",
|
|
37
41
|
"reflect-metadata": "^0.2.2",
|
|
38
42
|
"rxjs": "^7.8.2",
|
|
43
|
+
"supertest": "^7.2.2",
|
|
39
44
|
"typescript": "^6.0.3",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"@nest-boot/eslint-config": "^8.0.0-beta.
|
|
43
|
-
"@nest-boot/
|
|
45
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
46
|
+
"vitest": "^4.1.11",
|
|
47
|
+
"@nest-boot/eslint-config": "^8.0.0-beta.1",
|
|
48
|
+
"@nest-boot/graphql": "^8.0.0-beta.1",
|
|
49
|
+
"@nest-boot/eslint-plugin": "^8.0.0-beta.1",
|
|
50
|
+
"@nest-boot/logger": "^8.0.0-beta.1",
|
|
51
|
+
"@nest-boot/tsconfig": "^8.0.0-beta.1"
|
|
44
52
|
},
|
|
45
53
|
"peerDependencies": {
|
|
46
54
|
"@apollo/server": "^5.0.0",
|
|
47
|
-
"@nestjs/apollo": "^14.0.0
|
|
48
|
-
"@nestjs/common": "^12.0.0
|
|
49
|
-
"@nestjs/core": "^12.0.0
|
|
50
|
-
"@nestjs/graphql": "^14.0.0
|
|
55
|
+
"@nestjs/apollo": "^14.0.0",
|
|
56
|
+
"@nestjs/common": "^12.0.0",
|
|
57
|
+
"@nestjs/core": "^12.0.0",
|
|
58
|
+
"@nestjs/graphql": "^14.0.0",
|
|
51
59
|
"express": "^5.0.0",
|
|
52
60
|
"graphql": "^16.0.0",
|
|
53
61
|
"reflect-metadata": "^0.2.2",
|
|
54
62
|
"rxjs": "^7.0.0",
|
|
55
|
-
"@nest-boot/logger": "^8.0.0-beta.
|
|
63
|
+
"@nest-boot/logger": "^8.0.0-beta.1"
|
|
56
64
|
},
|
|
57
65
|
"publishConfig": {
|
|
58
66
|
"access": "public"
|
|
@@ -64,11 +72,26 @@
|
|
|
64
72
|
]
|
|
65
73
|
},
|
|
66
74
|
"type": "module",
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=26.0.0"
|
|
77
|
+
},
|
|
78
|
+
"exports": {
|
|
79
|
+
".": {
|
|
80
|
+
"types": "./dist/index.d.ts",
|
|
81
|
+
"import": "./dist/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./package.json": "./package.json"
|
|
84
|
+
},
|
|
67
85
|
"scripts": {
|
|
68
86
|
"build": "tsc -p tsconfig.build.json",
|
|
69
87
|
"clean": "rm -rf .nx && rm -rf node_modules && rm -rf dist",
|
|
70
88
|
"dev": "tsc -w -p tsconfig.build.json",
|
|
71
89
|
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
72
|
-
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix"
|
|
90
|
+
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
91
|
+
"test": "vitest run",
|
|
92
|
+
"test:cov": "vitest run --coverage",
|
|
93
|
+
"test:watch": "vitest",
|
|
94
|
+
"test:debug": "vitest --inspect-brk --no-file-parallelism",
|
|
95
|
+
"test:e2e": "vitest run --config ./vitest.config.e2e.ts"
|
|
73
96
|
}
|
|
74
97
|
}
|