codeplay-common 4.6.8 → 4.6.9

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.
@@ -93,7 +93,7 @@ const deviceProfiles = [
93
93
  outputFormat: 'jpeg',
94
94
  outputExtension: 'jpg',
95
95
  storeRequirements: {
96
- maxFileSizeBytes: 3 * 1024 * 1024,
96
+ maxFileSizeBytes: 1000 * 1000,
97
97
  minPixels: 320,
98
98
  maxPixels: 1920,
99
99
  minAspectRatio: 0.5,
@@ -2185,12 +2185,9 @@ async function captureFramedScreenshot(
2185
2185
  const originalImageMetadata = profile.storeRequirements
2186
2186
  ? await sharp(screenshotBuffer).metadata()
2187
2187
  : null;
2188
- const frameDimensions = originalImageMetadata?.width && originalImageMetadata?.height
2189
- ? { width: originalImageMetadata.width, height: originalImageMetadata.height }
2190
- : null;
2191
- const hasCustomFrameSize = Boolean(frameDimensions || (profile.framedWidth && profile.framedHeight));
2192
- const frameWidth = frameDimensions?.width || profile.framedWidth || profile.width;
2193
- const frameHeight = frameDimensions?.height || profile.framedHeight || profile.height;
2188
+ const hasCustomFrameSize = Boolean(profile.framedWidth && profile.framedHeight);
2189
+ const frameWidth = profile.framedWidth || profile.width;
2190
+ const frameHeight = profile.framedHeight || profile.height;
2194
2191
  const frameScaleFactor = hasCustomFrameSize ? 1 : profile.deviceScaleFactor;
2195
2192
 
2196
2193
  await client.send('Emulation.setDeviceMetricsOverride', {
@@ -2236,9 +2233,7 @@ async function captureFramedScreenshot(
2236
2233
  });
2237
2234
 
2238
2235
  const framedScreenshotBuffer = Buffer.from(framedScreenshot.data, 'base64');
2239
- if (!frameDimensions) {
2240
- validateStoreImage(profile, frameWidth, frameHeight, framedScreenshotBuffer);
2241
- }
2236
+ validateStoreImage(profile, frameWidth, frameHeight, framedScreenshotBuffer);
2242
2237
 
2243
2238
  fs.mkdirSync(framedProfileDirectory, { recursive: true });
2244
2239
  fs.writeFileSync(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.6.8",
3
+ "version": "4.6.9",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",