@rsdk/http.server.fastify 3.2.0-next.2 → 3.3.0-next.0
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/CHANGELOG.md +10 -0
- package/dist/fastify-http-transport.d.ts +3 -3
- package/dist/fastify-http-transport.js.map +1 -1
- package/package.json +3 -3
- package/src/fastify-http-transport.ts +4 -5
- package/dist/types.d.ts +0 -9
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/src/types.ts +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.3.0-next.0](https://github.com/R-Vision/rsdk/compare/v3.2.3...v3.3.0-next.0) (2023-08-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/http.server.fastify
|
|
9
|
+
|
|
10
|
+
## [3.2.0](https://github.com/R-Vision/rsdk/compare/v3.2.0-next.2...v3.2.0) (2023-08-09)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **http.server.fastify:** remove custom type definition prefer standard `HttpTransportOptions` ([00b0c7c](https://github.com/R-Vision/rsdk/commit/00b0c7cb8c51fc2a817fc945003622e96dbadd3f))
|
|
15
|
+
|
|
6
16
|
## [3.2.0-next.2](https://github.com/R-Vision/rsdk/compare/v3.2.0-next.1...v3.2.0-next.2) (2023-08-09)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsdk/http.server.fastify
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AbstractHttpAdapter } from '@nestjs/core';
|
|
2
|
+
import type { HttpTransportOptions } from '@rsdk/http.server';
|
|
2
3
|
import { AbstractRsdkHttpTransport } from '@rsdk/http.server';
|
|
3
4
|
import type { HttpConfig } from '@rsdk/http.server/dist/http.config';
|
|
4
|
-
import type { FastifyAdapterOptions } from './types';
|
|
5
5
|
export declare class FastifyHttpTransport extends AbstractRsdkHttpTransport {
|
|
6
|
-
readonly options?:
|
|
7
|
-
constructor(options?:
|
|
6
|
+
readonly options?: HttpTransportOptions;
|
|
7
|
+
constructor(options?: HttpTransportOptions);
|
|
8
8
|
createHttpAdapter(httpConfig: HttpConfig): AbstractHttpAdapter;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastify-http-transport.js","sourceRoot":"","sources":["../src/fastify-http-transport.ts"],"names":[],"mappings":";;;AACA,+DAA0D;AAE1D,mDAA8D;
|
|
1
|
+
{"version":3,"file":"fastify-http-transport.js","sourceRoot":"","sources":["../src/fastify-http-transport.ts"],"names":[],"mappings":";;;AACA,+DAA0D;AAE1D,mDAA8D;AAG9D,MAAa,oBAAqB,SAAQ,uCAAyB;IACxD,OAAO,CAAwB;IAExC,YAAY,OAA8B;QACxC,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;SACxB;IACH,CAAC;IAED,iBAAiB,CAAC,UAAsB;QACtC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;QACvC,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;QACjC,MAAM,cAAc,GAAG,IAAI,iCAAc,CAAC;YACxC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE;SAC7B,CAAC,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAkB,MAAM,CAAC,MAAM,CACnD;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,KAAK;aAClB;YACD,MAAM,EAAE,KAAK;SACd,EACD,OAAO,CACR,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,gGAAgG;YAChG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;SACvD;QACD,IAAI,MAAM,EAAE;YACV,gGAAgG;YAChG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACrD;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AArCD,oDAqCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/http.server.fastify",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-next.0",
|
|
4
4
|
"description": "Adapter for @rsdk/http.server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@nestjs/common": "^10.1.3",
|
|
21
21
|
"@nestjs/core": "^10.1.3",
|
|
22
22
|
"@nestjs/platform-fastify": "^10.1.3",
|
|
23
|
-
"@rsdk/http.server": "^3.
|
|
23
|
+
"@rsdk/http.server": "^3.3.0-next.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@fastify/cookie": "^9.0.4",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"optional": true
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "58a1a6d19248e79dfa11c8a25c1ead3be02710ff"
|
|
38
38
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { AbstractHttpAdapter } from '@nestjs/core';
|
|
2
2
|
import { FastifyAdapter } from '@nestjs/platform-fastify';
|
|
3
|
-
import type { ParsersConfig } from '@rsdk/http.server';
|
|
3
|
+
import type { HttpTransportOptions, ParsersConfig } from '@rsdk/http.server';
|
|
4
4
|
import { AbstractRsdkHttpTransport } from '@rsdk/http.server';
|
|
5
5
|
import type { HttpConfig } from '@rsdk/http.server/dist/http.config';
|
|
6
6
|
|
|
7
|
-
import type { FastifyAdapterOptions } from './types';
|
|
8
|
-
|
|
9
7
|
export class FastifyHttpTransport extends AbstractRsdkHttpTransport {
|
|
10
|
-
readonly options?:
|
|
11
|
-
|
|
8
|
+
readonly options?: HttpTransportOptions;
|
|
9
|
+
|
|
10
|
+
constructor(options?: HttpTransportOptions) {
|
|
12
11
|
super();
|
|
13
12
|
if (options) {
|
|
14
13
|
this.options = options;
|
package/dist/types.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
2
|
-
import type { DeepPartial } from '@rsdk/common';
|
|
3
|
-
import type { ParsersConfig, SwaggerOptions } from '@rsdk/http.server';
|
|
4
|
-
export interface FastifyAdapterOptions {
|
|
5
|
-
cors?: CorsOptions;
|
|
6
|
-
globalPrefix?: string;
|
|
7
|
-
parsers?: DeepPartial<ParsersConfig>;
|
|
8
|
-
swagger?: DeepPartial<SwaggerOptions>;
|
|
9
|
-
}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/src/types.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
2
|
-
import type { DeepPartial } from '@rsdk/common';
|
|
3
|
-
import type { ParsersConfig, SwaggerOptions } from '@rsdk/http.server';
|
|
4
|
-
|
|
5
|
-
export interface FastifyAdapterOptions {
|
|
6
|
-
// CORS middleware options
|
|
7
|
-
cors?: CorsOptions;
|
|
8
|
-
|
|
9
|
-
// Global prefix (will be used in app.setGlobalPrefix())
|
|
10
|
-
globalPrefix?: string;
|
|
11
|
-
|
|
12
|
-
// Configuration of body and cookie parsers
|
|
13
|
-
// WARNING: Has no effect on FastifyAdapter. Use FastifyAdapter
|
|
14
|
-
// constructor options instead
|
|
15
|
-
parsers?: DeepPartial<ParsersConfig>;
|
|
16
|
-
|
|
17
|
-
// Swagger options. You can configure OpenAPI document
|
|
18
|
-
// builder or set file to write on application start
|
|
19
|
-
// NOTE: SwaggerUI is enabled or disabled by HTTP_SWAGGER_UI_ENABLED
|
|
20
|
-
// (true by default).
|
|
21
|
-
|
|
22
|
-
// TODO: It terrible to generate file on application start. Would be
|
|
23
|
-
// much better if we could get OpenAPI spec on demand without actually
|
|
24
|
-
// running the app. Unfortunately there is no way to do it in Nest.js 9.
|
|
25
|
-
// Planned in https://jira.rvision.pro/browse/PFM-134
|
|
26
|
-
swagger?: DeepPartial<SwaggerOptions>;
|
|
27
|
-
}
|