single-file-cli 1.0.10 → 1.0.13

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": "single-file-cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "SingleFile CLI",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -9,7 +9,8 @@
9
9
  "single-file": "./single-file"
10
10
  },
11
11
  "scripts": {
12
- "build": "./build-lib.sh"
12
+ "build": "./build-lib.sh",
13
+ "prepublishOnly": "./build-lib.sh"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -25,7 +26,7 @@
25
26
  "jsdom": "19.0.0",
26
27
  "puppeteer-core": "14.2.1",
27
28
  "selenium-webdriver": "4.2.0",
28
- "single-file-core": "1.0.13",
29
+ "single-file-core": "1.0.17",
29
30
  "strong-data-uri": "1.0.6",
30
31
  "yargs": "17.5.1"
31
32
  },
@@ -5,7 +5,7 @@ const PLUGINS = [resolve({ moduleDirectories: [".."] })];
5
5
  const EXTERNAL = ["single-file-core"];
6
6
 
7
7
  export default [{
8
- input: ["single-file-core/index.js"],
8
+ input: ["single-file-core/single-file.js"],
9
9
  output: [{
10
10
  file: "lib/single-file.js",
11
11
  format: "umd",
@@ -15,7 +15,7 @@ export default [{
15
15
  plugins: PLUGINS,
16
16
  external: EXTERNAL
17
17
  }, {
18
- input: ["single-file-core/processors/frame-tree/content/content-frame-tree.js"],
18
+ input: ["single-file-core/single-file-frames.js"],
19
19
  output: [{
20
20
  file: "lib/single-file-frames.js",
21
21
  format: "umd",
@@ -35,16 +35,7 @@ export default [{
35
35
  plugins: PLUGINS,
36
36
  external: EXTERNAL
37
37
  }, {
38
- input: ["single-file-core/processors/hooks/content/content-hooks-web.js"],
39
- output: [{
40
- file: "lib/single-file-hooks.js",
41
- format: "iife",
42
- plugins: []
43
- }],
44
- plugins: PLUGINS,
45
- external: EXTERNAL
46
- }, {
47
- input: ["single-file-core/processors/hooks/content/content-hooks-frames-web.js"],
38
+ input: ["single-file-core/single-file-hooks-frames.js"],
48
39
  output: [{
49
40
  file: "lib/single-file-hooks-frames.js",
50
41
  format: "iife",
@@ -53,7 +44,7 @@ export default [{
53
44
  plugins: PLUGINS,
54
45
  external: EXTERNAL
55
46
  }, {
56
- input: ["single-file-core/common/content-infobar-web.js"],
47
+ input: ["single-file-core/single-file-infobar.js"],
57
48
  output: [{
58
49
  file: "lib/single-file-infobar.js",
59
50
  format: "iife",
package/rollup.config.js CHANGED
@@ -5,7 +5,7 @@ const PLUGINS = [resolve({ moduleDirectories: ["node_modules"] })];
5
5
  const EXTERNAL = ["single-file-core"];
6
6
 
7
7
  export default [{
8
- input: ["single-file-core/index.js"],
8
+ input: ["single-file-core/single-file.js"],
9
9
  output: [{
10
10
  file: "lib/single-file.js",
11
11
  format: "umd",
@@ -15,7 +15,7 @@ export default [{
15
15
  plugins: PLUGINS,
16
16
  external: EXTERNAL
17
17
  }, {
18
- input: ["single-file-core/processors/frame-tree/content/content-frame-tree.js"],
18
+ input: ["single-file-core/single-file-frames.js"],
19
19
  output: [{
20
20
  file: "lib/single-file-frames.js",
21
21
  format: "umd",
@@ -35,16 +35,7 @@ export default [{
35
35
  plugins: PLUGINS,
36
36
  external: EXTERNAL
37
37
  }, {
38
- input: ["single-file-core/processors/hooks/content/content-hooks-web.js"],
39
- output: [{
40
- file: "lib/single-file-hooks.js",
41
- format: "iife",
42
- plugins: [terser()]
43
- }],
44
- plugins: PLUGINS,
45
- external: EXTERNAL
46
- }, {
47
- input: ["single-file-core/processors/hooks/content/content-hooks-frames-web.js"],
38
+ input: ["single-file-core/single-file-hooks-frames.js"],
48
39
  output: [{
49
40
  file: "lib/single-file-hooks-frames.js",
50
41
  format: "iife",
@@ -53,7 +44,7 @@ export default [{
53
44
  plugins: PLUGINS,
54
45
  external: EXTERNAL
55
46
  }, {
56
- input: ["single-file-core/common/content-infobar-web.js"],
47
+ input: ["single-file-core/single-file-infobar.js"],
57
48
  output: [{
58
49
  file: "lib/single-file-infobar.js",
59
50
  format: "iife",
@@ -33,7 +33,6 @@ const DEFAULT_OPTIONS = {
33
33
  removeUnusedStyles: true,
34
34
  removeUnusedFonts: true,
35
35
  removeFrames: false,
36
- removeImports: true,
37
36
  compressHTML: true,
38
37
  compressCSS: false,
39
38
  loadDeferredImages: true,
@@ -66,7 +65,7 @@ const DEFAULT_OPTIONS = {
66
65
  insertSingleFileComment: true,
67
66
  blockImages: false,
68
67
  blockStylesheets: false,
69
- blockFont: false,
68
+ blockFonts: false,
70
69
  blockScripts: true,
71
70
  blockVideos: true,
72
71
  blockAudios: true
@@ -1 +0,0 @@
1
- !function(){"use strict";(e=>{const t=e.CustomEvent,s=e.fetch;var a,c,r;a="single-file-request-fetch",c=async a=>{const c=a.detail;let r;try{const e=await s(c,{cache:"force-cache"});r={url:c,response:await e.arrayBuffer(),headers:[...e.headers],status:e.status}}catch(e){r={url:c,error:e&&e.toString()}}(t=>{try{e.dispatchEvent(t)}catch(e){}})(new t("single-file-response-fetch",{detail:r}))},e.addEventListener(a,c,r)})("object"==typeof globalThis?globalThis:window)}();