@1agh/maude 0.53.0 → 0.53.1
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/apps/studio/bin/_import-asset.mjs +1 -6
- package/apps/studio/bin/_import-brand.mjs +1 -1
- package/apps/studio/bin/_video-playwright.mjs +5 -1
- package/apps/studio/dist/client.bundle.js +1 -1
- package/apps/studio/http.ts +13 -3
- package/apps/studio/test/report-proxy.test.ts +125 -0
- package/package.json +8 -8
|
@@ -360,12 +360,7 @@ export function sanitizeSvgAllowlist(svgText) {
|
|
|
360
360
|
const window = new Window();
|
|
361
361
|
const doc = new window.DOMParser().parseFromString(svgText, 'image/svg+xml');
|
|
362
362
|
const root = doc.documentElement;
|
|
363
|
-
if (
|
|
364
|
-
!root ||
|
|
365
|
-
root.tagName !== 'svg' ||
|
|
366
|
-
root.namespaceURI !== SVG_NS ||
|
|
367
|
-
doc.querySelector('parsererror')
|
|
368
|
-
) {
|
|
363
|
+
if (root?.tagName !== 'svg' || root.namespaceURI !== SVG_NS || doc.querySelector('parsererror')) {
|
|
369
364
|
throw new ImportAssetError(3, 'SVG failed to parse');
|
|
370
365
|
}
|
|
371
366
|
walkAllowlist(root);
|
|
@@ -355,7 +355,7 @@ export function hardenBrandLogoSvg(sanitizedSvgText) {
|
|
|
355
355
|
const window = new Window();
|
|
356
356
|
const doc = new window.DOMParser().parseFromString(sanitizedSvgText, 'image/svg+xml');
|
|
357
357
|
const root = doc.documentElement;
|
|
358
|
-
if (
|
|
358
|
+
if (root?.tagName !== 'svg' || root.namespaceURI !== SVG_NS) {
|
|
359
359
|
throw new ImportBrandError(3, 'input is not a valid sanitized SVG document');
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -354,7 +354,11 @@ async function frameStepCapture({
|
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
// A comma operator hid the side effect here; the directory has to exist
|
|
358
|
+
// before anything writes a frame into it, so the effect is the point and
|
|
359
|
+
// deserves its own line.
|
|
360
|
+
if (dumpDir) mkdirSync(dumpDir, { recursive: true });
|
|
361
|
+
const dump = dumpDir ?? null;
|
|
358
362
|
const framePaths = [];
|
|
359
363
|
const t0 = Date.now();
|
|
360
364
|
|