single-file-cli 1.0.57 → 1.0.59
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/back-ends/jsdom.js +0 -3
- package/lib/single-file-bootstrap.js +1 -1
- package/lib/single-file-frames.js +1 -1
- package/lib/single-file-hooks-frames.js +1 -1
- package/lib/single-file-infobar.js +1 -1
- package/lib/single-file.js +1 -1
- package/package.json +2 -2
- package/single-file-cli-api.js +1 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "single-file-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "SingleFile CLI",
|
|
5
5
|
"author": "Gildas Lormeau",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"jsdom": "22.1.0",
|
|
27
27
|
"puppeteer-core": "20.9.0",
|
|
28
28
|
"selenium-webdriver": "4.11.1",
|
|
29
|
-
"single-file-core": "1.0.
|
|
29
|
+
"single-file-core": "1.0.68",
|
|
30
30
|
"strong-data-uri": "1.0.6",
|
|
31
31
|
"yargs": "17.7.2"
|
|
32
32
|
},
|
package/single-file-cli-api.js
CHANGED
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
|
|
26
26
|
const fs = require("fs");
|
|
27
27
|
const path = require("path");
|
|
28
|
-
const scripts = require("./back-ends/common/scripts.js");
|
|
29
28
|
const VALID_URL_TEST = /^(https?|file):\/\//;
|
|
30
29
|
|
|
31
30
|
const DEFAULT_OPTIONS = {
|
|
@@ -253,9 +252,6 @@ async function capturePage(options) {
|
|
|
253
252
|
try {
|
|
254
253
|
let filename;
|
|
255
254
|
const pageData = await backend.getPageData(options);
|
|
256
|
-
if (options.includeInfobar) {
|
|
257
|
-
await includeInfobarScript(pageData);
|
|
258
|
-
}
|
|
259
255
|
if (options.output) {
|
|
260
256
|
filename = getFilename(options.output, options);
|
|
261
257
|
} else if (options.dumpContent) {
|
|
@@ -317,9 +313,4 @@ function getFilename(filename, options, index = 1) {
|
|
|
317
313
|
|
|
318
314
|
function escapeRegExp(string) {
|
|
319
315
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
async function includeInfobarScript(pageData) {
|
|
323
|
-
const infobarContent = await scripts.getInfobarScript();
|
|
324
|
-
pageData.content += "<script>document.currentScript.remove();" + infobarContent + "</script>";
|
|
325
|
-
}
|
|
316
|
+
}
|