Files
klz-cables.com/.pnpm-store/v10/files/3c/29487826a24b39e005b1bd34d28b0048c5a8440b6022bf9751a170e3d62b52b01a711e5eb286558b30967623fce328e3f0f9c37d400d335dc8416ffc370927
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

39 lines
1.7 KiB
Plaintext

import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
import type { SharpDependency } from '../../config/types.js';
import type { PayloadRequest } from '../../types/index.js';
import type { WithMetadata } from '../optionallyAppendMetadata.js';
import type { FileSizes, FileToSave, FocalPoint, ProbedImageSize } from '../types.js';
/**
* For the provided image sizes, handle the resizing and the transforms
* (format, trim, etc.) of each requested image size and return the result object.
* This only handles the image sizes. The transforms of the original image
* are handled in {@link ./generateFileData.ts}.
*
* The image will be resized according to the provided
* resize config. If no image sizes are requested, the resolved data will be empty.
* For every image that does not need to be resized, a result object with `null`
* parameters will be returned.
*
* @param resizeConfig - the resize config
* @returns the result of the resize operation(s)
*/
type ResizeArgs = {
config: SanitizedCollectionConfig;
dimensions: ProbedImageSize;
file: PayloadRequest['file'];
focalPoint?: FocalPoint;
mimeType: string;
req: PayloadRequest;
savedFilename: string;
sharp?: SharpDependency;
staticPath: string;
withMetadata?: WithMetadata;
};
/** Result from resizing and transforming the requested image sizes */
type ImageSizesResult = {
sizeData: FileSizes;
sizesToSave: FileToSave[];
};
export declare function createImageSizes({ config, dimensions, file, focalPoint, mimeType, req, savedFilename, sharp, staticPath, withMetadata, }: ResizeArgs): Promise<ImageSizesResult>;
export {};
//# sourceMappingURL=createImageSizes.d.ts.map