Hi, I'm Luke ๐
I'm a software engineer turned Site Reliability Engineer. I empower developers to build reliable, performant software through monitoring, automation and learning.
๐ง Second brain | ๐จโ๐ป DEV | ๐ LinkedIn | ๐ Rรฉsumรฉ
Draw.io exports via Puppeteer
License: MIT License
Hi, I'm Luke ๐
I'm a software engineer turned Site Reliability Engineer. I empower developers to build reliable, performant software through monitoring, automation and learning.
๐ง Second brain | ๐จโ๐ป DEV | ๐ LinkedIn | ๐ Rรฉsumรฉ
For example, exporting this diagram yields this error:
Exporting /assets/diagrams/p.r.comp.lang.php.ext.tideways.drawio#0 to /assets/diagrams/p.r.comp.lang.php.ext.tideways.drawio-0.svg
Launching browser via Puppeteer
Preparing a new page
Navigating to the exporter
Setting up browser timeout in 30000 microseconds
Rendering diagram
Browser: Rendering page 0 as svg
Browser: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check [https://xhr.spec.whatwg.org/.](https://xhr.spec.whatwg.org/)
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Browser: Access to XMLHttpRequest at 'file:///home/runner/work/brain/brain/node_modules/drawio-export-puppeteer/stencils/aws3.xml' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-untrusted, https.
Browser: Failed to load resource: net::ERR_FAILED
Browser: error in loadStencilSet: stencils/aws3.xml JSHandle@error
Awaiting render result information
Result info yields bounds { x: 181, y: 20, width: 371, height: 370 } and scale 1
Closing the browser
The resulting SVG is missing the stencil's images:
--export
(-x
) accept a directory--output
(-o
) accept a directorydraw.io
CLI behaviour for generating output filenamesA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.