Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v1.2.2 #311

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions servers/all/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -342,7 +342,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_1pjj81w = controllerFn_1pjj81w(fastify);
const controller_iyk7j5 = controllerFn_iyk7j5(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
2 changes: 1 addition & 1 deletion servers/minimum/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, onR

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down
2 changes: 1 addition & 1 deletion servers/noMulter/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down
4 changes: 2 additions & 2 deletions servers/noTypedParams/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Rou

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -202,7 +202,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_1bjhajh = controllerFn_1bjhajh(fastify);
const controller_g6e9u2 = controllerFn_g6e9u2(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
4 changes: 2 additions & 2 deletions servers/noValidator/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -233,7 +233,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_g6e9u2 = controllerFn_g6e9u2(fastify);
const controller_1y88f1f = controllerFn_1y88f1f(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
4 changes: 2 additions & 2 deletions src/buildServerFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ${imports}import type { FastifyInstance, RouteHandlerMethod, preValidationHookHa

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -369,7 +369,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
${consts}
${
hasMultipart
? ' fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });\n\n'
? ' fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });\n\n'
: ''
}${controllers}
return fastify;
Expand Down
Loading