single-file-core 1.6.1 → 1.6.3
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/core/filename.js +62 -0
- package/core/helper.js +9 -32
- package/modules/css-fonts-minifier.js +34 -13
- package/modules/template-formatter.js +8 -2
- package/package.json +10 -2
- package/processors/compression/compression-constants.js +28 -0
- package/processors/compression/compression.js +3 -1
- package/.github/workflows/publish.yml +0 -88
- package/.github/workflows/test.yml +0 -31
- package/.github/workflows/vendor.yml +0 -39
- package/css-tree-build/README.md +0 -39
- package/css-tree-build/build.js +0 -66
- package/css-tree-build/package-lock.json +0 -511
- package/css-tree-build/package.json +0 -13
- package/deno.lock +0 -19
- package/doc/assets/singlefile-archive-byte-map.svg +0 -276
- package/doc/assets/singlefile-archive-lenses.svg +0 -245
- package/doc/singlefile-archive.md +0 -1968
- package/eslint.config.mjs +0 -74
- package/test/capture/README.md +0 -74
- package/test/capture/canonical-link.js +0 -50
- package/test/capture/common.js +0 -73
- package/test/capture/deferred-content-options.js +0 -71
- package/test/capture/dom.js +0 -26
- package/test/capture/maff-metadata.js +0 -205
- package/test/capture/resource-cap.js +0 -79
- package/test/capture/script-uri-sanitization.js +0 -82
- package/test/fixtures/README.md +0 -18
- package/test/fixtures/classic-digest.html +0 -5
- package/test/fixtures/generate-fixtures.sh +0 -31
- package/test/fixtures/multi-page-dedup.zip.html +0 -70
- package/test/fixtures/multi-page.zip.html +0 -26
- package/test/fixtures/single-page.zip.html +0 -11
- package/test/fixtures/site/multi-page/alpha.html +0 -2
- package/test/fixtures/site/multi-page/beta.html +0 -2
- package/test/fixtures/site/multi-page/index.html +0 -2
- package/test/fixtures/site/multi-page/sub/gamma.html +0 -2
- package/test/fixtures/site/multi-page-dedup/index.html +0 -2
- package/test/fixtures/site/multi-page-dedup/logo.png +0 -0
- package/test/fixtures/site/multi-page-dedup/one.html +0 -2
- package/test/fixtures/site/multi-page-dedup/shared.css +0 -3
- package/test/fixtures/site/multi-page-dedup/two.html +0 -2
- package/test/run.js +0 -109
- package/test/sfz-harness/README.md +0 -87
- package/test/sfz-harness/adopted-stylesheets-hook.js +0 -240
- package/test/sfz-harness/byte-map.js +0 -137
- package/test/sfz-harness/charset-round-trip.js +0 -161
- package/test/sfz-harness/check-determinism.js +0 -57
- package/test/sfz-harness/common.js +0 -154
- package/test/sfz-harness/content-type-sniffing.js +0 -83
- package/test/sfz-harness/css-fonts-minifier.js +0 -235
- package/test/sfz-harness/css-property-filter.js +0 -113
- package/test/sfz-harness/dom-stub.js +0 -13
- package/test/sfz-harness/entry-compression.js +0 -77
- package/test/sfz-harness/filename-characters.js +0 -55
- package/test/sfz-harness/filename-max-length.js +0 -69
- package/test/sfz-harness/font-face-composite.js +0 -135
- package/test/sfz-harness/format-rules.js +0 -617
- package/test/sfz-harness/gen-e2e-page.js +0 -14
- package/test/sfz-harness/inlined-functions.js +0 -82
- package/test/sfz-harness/option-wiring.js +0 -60
- package/test/sfz-harness/pages-archive.js +0 -318
- package/test/sfz-harness/pages-router.js +0 -143
- package/test/sfz-harness/relocation-cost.js +0 -94
- package/test/sfz-harness/search-triggers.js +0 -35
- package/test/sfz-harness/smoke.js +0 -10
- package/test/sfz-harness/stored-trigger.js +0 -95
- package/test/sfz-harness/trigger-seeds.json +0 -120
- package/test/sfz-harness/zip64.js +0 -77
- package/zip-build/README.md +0 -56
- package/zip-build/lib/fflate-streams.js +0 -47
- package/zip-build/lib/fflate.js +0 -2692
- package/zip-build/lib/zip-vendor-worker.js +0 -3
- package/zip-build/lib/zip-vendor.js +0 -9
- package/zip-build/lib/zip.js +0 -25
- package/zip-build/package-lock.json +0 -665
- package/zip-build/package.json +0 -15
- package/zip-build/reserved-property-names.json +0 -10630
- package/zip-build/rollup.config.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/* global URL */
|
|
2
|
-
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
|
-
import terser from "@rollup/plugin-terser";
|
|
5
|
-
|
|
6
|
-
const reservedPropertyNames = [...JSON.parse(readFileSync(new URL("./reserved-property-names.json", import.meta.url))), "inflateRaw"];
|
|
7
|
-
|
|
8
|
-
const bundledTerserOptions = {
|
|
9
|
-
compress: {
|
|
10
|
-
unsafe: true,
|
|
11
|
-
unsafe_arrows: true,
|
|
12
|
-
unsafe_comps: true,
|
|
13
|
-
unsafe_symbols: true,
|
|
14
|
-
unsafe_proto: true,
|
|
15
|
-
keep_fargs: false,
|
|
16
|
-
passes: 3,
|
|
17
|
-
ecma: 2019
|
|
18
|
-
},
|
|
19
|
-
mangle: {
|
|
20
|
-
properties: {
|
|
21
|
-
keep_quoted: "strict",
|
|
22
|
-
reserved: reservedPropertyNames
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
// zip.min.js is inlined into self-extracting pages, which declare windows-1252: a literal
|
|
26
|
-
// non-ASCII character in the source is re-decoded there, and the CP437 table it belongs to
|
|
27
|
-
// then maps every legacy entry name to garbage. terser prints the shortest form and turns
|
|
28
|
-
// an escape back into the character, so the escaping has to be asked for here
|
|
29
|
-
format: {
|
|
30
|
-
ascii_only: true
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const GLOBALS = "const { Array, Object, String, Number, BigInt, Math, Date, Map, Set, Response, URL, Error, Uint8Array, Uint16Array, Uint32Array, DataView, Blob, Promise, TextEncoder, TextDecoder, crypto, btoa, TransformStream, ReadableStream, WritableStream, CompressionStream, DecompressionStream, navigator, Worker, setTimeout, clearTimeout } = typeof globalThis !== 'undefined' ? globalThis : self;";
|
|
35
|
-
const GLOBALS_WORKER = "const { Array, Object, Number, Math, Error, Uint8Array, Uint16Array, Uint32Array, Int32Array, Map, DataView, Promise, TextEncoder, crypto, postMessage, TransformStream, ReadableStream, WritableStream, CompressionStream, DecompressionStream } = self;";
|
|
36
|
-
|
|
37
|
-
export default [{
|
|
38
|
-
input: "lib/zip.js",
|
|
39
|
-
output: [{
|
|
40
|
-
intro: GLOBALS,
|
|
41
|
-
file: "../vendor/zip/zip.min.js",
|
|
42
|
-
format: "umd",
|
|
43
|
-
name: "zip",
|
|
44
|
-
plugins: [terser(bundledTerserOptions)]
|
|
45
|
-
}]
|
|
46
|
-
}, {
|
|
47
|
-
input: "lib/zip-vendor.js",
|
|
48
|
-
output: [{
|
|
49
|
-
intro: GLOBALS,
|
|
50
|
-
file: "../vendor/zip/zip.js",
|
|
51
|
-
format: "es"
|
|
52
|
-
}]
|
|
53
|
-
}, {
|
|
54
|
-
input: "lib/zip-vendor-worker.js",
|
|
55
|
-
output: [{
|
|
56
|
-
intro: GLOBALS_WORKER,
|
|
57
|
-
file: "../vendor/zip/z-worker.js",
|
|
58
|
-
format: "iife",
|
|
59
|
-
plugins: [terser(bundledTerserOptions)]
|
|
60
|
-
}]
|
|
61
|
-
}];
|