polotno-node 2.11.5 → 2.11.7
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/dist/assets/index-YTXoD22f.js +329 -0
- package/dist/index.html +1 -1
- package/instance.js +9 -2
- package/package.json +7 -7
- package/dist/assets/index-DwOLZbIv.js +0 -321
package/dist/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
</style>
|
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-YTXoD22f.js"></script>
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
package/instance.js
CHANGED
|
@@ -3,8 +3,15 @@ const DEFAULT_CLIENT = `file:${path.join(__dirname, 'dist', 'index.html')}`;
|
|
|
3
3
|
|
|
4
4
|
module.exports.createPage = async (browser, url) => {
|
|
5
5
|
const page = await browser.newPage();
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
// we need to make sure that headless is inside user agent
|
|
8
|
+
// because we use it for key validation check
|
|
9
|
+
// but also lets NOT just overwrite default one, because Google Fonts may send "reduced" version of font
|
|
10
|
+
// so some languages may not work
|
|
11
|
+
const userAgent = await page.evaluate(() => navigator.userAgent);
|
|
12
|
+
if (userAgent.indexOf('Headless') === -1) {
|
|
13
|
+
await page.setUserAgent(userAgent + ' Chrome Headless');
|
|
14
|
+
}
|
|
8
15
|
|
|
9
16
|
page.on('console', (msg) => {
|
|
10
17
|
msg.args().forEach(async (message) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polotno-node",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.7",
|
|
4
4
|
"description": "Polotno workflow from NodeJS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,22 +18,22 @@
|
|
|
18
18
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"ava": "^6.2.0",
|
|
21
|
-
"axios": "^1.
|
|
21
|
+
"axios": "^1.8.3",
|
|
22
22
|
"dotenv": "^16.4.7",
|
|
23
23
|
"fluent-ffmpeg": "^2.1.3",
|
|
24
24
|
"pixelmatch": "^6.0.0",
|
|
25
25
|
"pngjs": "^7.0.0",
|
|
26
|
-
"polotno": "^2.
|
|
26
|
+
"polotno": "^2.21.4",
|
|
27
27
|
"react": "^18.3.1",
|
|
28
28
|
"react-dom": "^18.3.1",
|
|
29
|
-
"vite": "^6.
|
|
29
|
+
"vite": "^6.2.2"
|
|
30
30
|
},
|
|
31
31
|
"author": "Anton Lavrenov",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@sparticuz/chromium": "^
|
|
35
|
-
"puppeteer": "^24.
|
|
36
|
-
"puppeteer-core": "^24.
|
|
34
|
+
"@sparticuz/chromium": "^133.0.0",
|
|
35
|
+
"puppeteer": "^24.4.0",
|
|
36
|
+
"puppeteer-core": "^24.4.0",
|
|
37
37
|
"tmp": "^0.2.3"
|
|
38
38
|
},
|
|
39
39
|
"bugs": {
|