@scalar/nestjs-api-reference 0.3.181 → 0.3.183

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
@@ -15,7 +15,7 @@ npm install @scalar/nestjs-api-reference
15
15
 
16
16
  ## Usage
17
17
 
18
- [Set up NestJS](https://docs.nestjs.com/first-steps) and [set up NestJS Swagger](https://docs.nestjs.com/openapi/introduction) and pass an OpenAPI/Swagger spec to the `apiReference` middleware:
18
+ [Set up NestJS](https://docs.nestjs.com/first-steps) and [set up NestJS Swagger](https://docs.nestjs.com/openapi/introduction) and pass an OpenAPI/Swagger document to the `apiReference` middleware:
19
19
 
20
20
  ```ts
21
21
  import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
package/dist/index.cjs CHANGED
@@ -128,13 +128,13 @@ function apiReference(options) {
128
128
  </html>
129
129
  `;
130
130
  if (options.withFastify) {
131
- return (req, res) => {
131
+ return (_req, res) => {
132
132
  res.writeHead(200, { "Content-Type": "text/html" });
133
133
  res.write(content);
134
134
  res.end();
135
135
  };
136
136
  }
137
- return (req, res) => {
137
+ return (_req, res) => {
138
138
  res.send(content);
139
139
  };
140
140
  }
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReferenceConfiguration } from '@scalar/types/legacy';
2
2
  import { Request, Response } from 'express';
3
3
  import { FastifyRequest } from 'fastify';
4
- import { ServerResponse } from 'http';
4
+ import { ServerResponse } from 'node:http';
5
5
 
6
6
  type NestJSReferenceConfiguration = ReferenceConfiguration & {
7
7
  withFastify?: boolean;
@@ -21,6 +21,6 @@ declare const ApiReference: (options: ApiReferenceOptions) => string;
21
21
  /**
22
22
  * The HTML template to render the API Reference.
23
23
  */
24
- declare function apiReference(options: NestJSReferenceConfiguration): ((req: FastifyRequest, res: ServerResponse) => void) | ((req: Request, res: Response) => void);
24
+ declare function apiReference(options: NestJSReferenceConfiguration): ((_req: FastifyRequest, res: ServerResponse) => void) | ((_req: Request, res: Response) => void);
25
25
 
26
26
  export { ApiReference, type ApiReferenceOptions, type NestJSReferenceConfiguration, apiReference, customThemeCSS };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReferenceConfiguration } from '@scalar/types/legacy';
2
2
  import { Request, Response } from 'express';
3
3
  import { FastifyRequest } from 'fastify';
4
- import { ServerResponse } from 'http';
4
+ import { ServerResponse } from 'node:http';
5
5
 
6
6
  type NestJSReferenceConfiguration = ReferenceConfiguration & {
7
7
  withFastify?: boolean;
@@ -21,6 +21,6 @@ declare const ApiReference: (options: ApiReferenceOptions) => string;
21
21
  /**
22
22
  * The HTML template to render the API Reference.
23
23
  */
24
- declare function apiReference(options: NestJSReferenceConfiguration): ((req: FastifyRequest, res: ServerResponse) => void) | ((req: Request, res: Response) => void);
24
+ declare function apiReference(options: NestJSReferenceConfiguration): ((_req: FastifyRequest, res: ServerResponse) => void) | ((_req: Request, res: Response) => void);
25
25
 
26
26
  export { ApiReference, type ApiReferenceOptions, type NestJSReferenceConfiguration, apiReference, customThemeCSS };
package/dist/index.js CHANGED
@@ -100,13 +100,13 @@ function apiReference(options) {
100
100
  </html>
101
101
  `;
102
102
  if (options.withFastify) {
103
- return (req, res) => {
103
+ return (_req, res) => {
104
104
  res.writeHead(200, { "Content-Type": "text/html" });
105
105
  res.write(content);
106
106
  res.end();
107
107
  };
108
108
  }
109
- return (req, res) => {
109
+ return (_req, res) => {
110
110
  res.send(content);
111
111
  };
112
112
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "integrations/nestjs"
12
12
  },
13
- "version": "0.3.181",
13
+ "version": "0.3.183",
14
14
  "engines": {
15
15
  "node": ">=18"
16
16
  },
@@ -34,16 +34,16 @@
34
34
  ],
35
35
  "module": "dist/index.js",
36
36
  "dependencies": {
37
- "@scalar/types": "0.0.31"
37
+ "@scalar/types": "0.0.33"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/express": "^4.17.21",
41
- "express": "^4.21.1",
41
+ "express": "^4.21.2",
42
42
  "fastify": "^4.26.2",
43
43
  "tsup": "^7.2.0",
44
44
  "vite": "^5.4.10",
45
45
  "vitest": "^1.6.0",
46
- "@scalar/api-reference": "1.25.116"
46
+ "@scalar/api-reference": "1.25.119"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup ./src/index.ts --format esm,cjs --dts",