astro-better-generate-screenshots 0.4.3 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-better-generate-screenshots",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "CLI that generates screenshot PNGs for astro-better-declarative-screenshots",
5
5
  "repository": {
6
6
  "type": "git",
@@ -92,7 +92,16 @@ async function main() {
92
92
  context,
93
93
  });
94
94
 
95
- const newBuffer = await applyChrome(rawBuffer, config, fullUrl);
95
+ let newBuffer = rawBuffer;
96
+ if (config.chrome.style !== 'none' && config.chrome.renderIn !== 'css') {
97
+ newBuffer = await addChrome(rawBuffer, {
98
+ url: fullUrl,
99
+ dark: config.chrome.dark,
100
+ showUrl: config.chrome.showUrl,
101
+ shadowBlur: config.chrome.shadowBlur,
102
+ shadowPadding: config.chrome.shadowPadding,
103
+ });
104
+ }
96
105
 
97
106
  const result = await diffScreenshot(referencePath, newBuffer, {
98
107
  threshold: args.pixelThreshold ?? 0.1,