From 5f0045aa70820ae57eb29d7878be85b5eb3f70ab Mon Sep 17 00:00:00 2001 From: userquin Date: Wed, 13 Dec 2023 01:21:44 +0100 Subject: [PATCH] fix: use image buffer for apple splash screens --- src/api/apple-icons-helper.ts | 4 +++- src/api/instructions-resolver.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/apple-icons-helper.ts b/src/api/apple-icons-helper.ts index 0dc0eda..3c90d47 100644 --- a/src/api/apple-icons-helper.ts +++ b/src/api/apple-icons-helper.ts @@ -7,6 +7,8 @@ import { generateMaskableAsset } from './maskable.ts' import { createAppleSplashScreenHtmlLink } from './html.ts' export function resolveAppleSplashScreensInstructions( + // eslint-disable-next-line n/prefer-global/buffer + image: Buffer, imageAssets: ImageAssets, instructions: ImageAssetsInstructions, useAppleSplashScreens?: AppleSplashScreens, @@ -96,7 +98,7 @@ export function resolveAppleSplashScreensInstructions( for (const size of splashScreens) { const name = resolveName(size.landscape, size.size, size.dark) const url = `${imageAssets.basePath}${name}` - const promise = () => generateMaskableAsset('png', imageAssets.imageName, size.size, { + const promise = () => generateMaskableAsset('png', image, size.size, { padding: size.padding, resizeOptions: { ...size.resizeOptions, diff --git a/src/api/instructions-resolver.ts b/src/api/instructions-resolver.ts index 07c4705..947697d 100644 --- a/src/api/instructions-resolver.ts +++ b/src/api/instructions-resolver.ts @@ -84,7 +84,7 @@ export async function resolveInstructions(imageAssets: ImageAssets) { } } - resolveAppleSplashScreensInstructions(imageAssets, instructions, useAppleSplashScreens) + resolveAppleSplashScreensInstructions(image, imageAssets, instructions, useAppleSplashScreens) return instructions }