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.
Files changed (79) hide show
  1. package/core/filename.js +62 -0
  2. package/core/helper.js +9 -32
  3. package/modules/css-fonts-minifier.js +34 -13
  4. package/modules/template-formatter.js +8 -2
  5. package/package.json +10 -2
  6. package/processors/compression/compression-constants.js +28 -0
  7. package/processors/compression/compression.js +3 -1
  8. package/.github/workflows/publish.yml +0 -88
  9. package/.github/workflows/test.yml +0 -31
  10. package/.github/workflows/vendor.yml +0 -39
  11. package/css-tree-build/README.md +0 -39
  12. package/css-tree-build/build.js +0 -66
  13. package/css-tree-build/package-lock.json +0 -511
  14. package/css-tree-build/package.json +0 -13
  15. package/deno.lock +0 -19
  16. package/doc/assets/singlefile-archive-byte-map.svg +0 -276
  17. package/doc/assets/singlefile-archive-lenses.svg +0 -245
  18. package/doc/singlefile-archive.md +0 -1968
  19. package/eslint.config.mjs +0 -74
  20. package/test/capture/README.md +0 -74
  21. package/test/capture/canonical-link.js +0 -50
  22. package/test/capture/common.js +0 -73
  23. package/test/capture/deferred-content-options.js +0 -71
  24. package/test/capture/dom.js +0 -26
  25. package/test/capture/maff-metadata.js +0 -205
  26. package/test/capture/resource-cap.js +0 -79
  27. package/test/capture/script-uri-sanitization.js +0 -82
  28. package/test/fixtures/README.md +0 -18
  29. package/test/fixtures/classic-digest.html +0 -5
  30. package/test/fixtures/generate-fixtures.sh +0 -31
  31. package/test/fixtures/multi-page-dedup.zip.html +0 -70
  32. package/test/fixtures/multi-page.zip.html +0 -26
  33. package/test/fixtures/single-page.zip.html +0 -11
  34. package/test/fixtures/site/multi-page/alpha.html +0 -2
  35. package/test/fixtures/site/multi-page/beta.html +0 -2
  36. package/test/fixtures/site/multi-page/index.html +0 -2
  37. package/test/fixtures/site/multi-page/sub/gamma.html +0 -2
  38. package/test/fixtures/site/multi-page-dedup/index.html +0 -2
  39. package/test/fixtures/site/multi-page-dedup/logo.png +0 -0
  40. package/test/fixtures/site/multi-page-dedup/one.html +0 -2
  41. package/test/fixtures/site/multi-page-dedup/shared.css +0 -3
  42. package/test/fixtures/site/multi-page-dedup/two.html +0 -2
  43. package/test/run.js +0 -109
  44. package/test/sfz-harness/README.md +0 -87
  45. package/test/sfz-harness/adopted-stylesheets-hook.js +0 -240
  46. package/test/sfz-harness/byte-map.js +0 -137
  47. package/test/sfz-harness/charset-round-trip.js +0 -161
  48. package/test/sfz-harness/check-determinism.js +0 -57
  49. package/test/sfz-harness/common.js +0 -154
  50. package/test/sfz-harness/content-type-sniffing.js +0 -83
  51. package/test/sfz-harness/css-fonts-minifier.js +0 -235
  52. package/test/sfz-harness/css-property-filter.js +0 -113
  53. package/test/sfz-harness/dom-stub.js +0 -13
  54. package/test/sfz-harness/entry-compression.js +0 -77
  55. package/test/sfz-harness/filename-characters.js +0 -55
  56. package/test/sfz-harness/filename-max-length.js +0 -69
  57. package/test/sfz-harness/font-face-composite.js +0 -135
  58. package/test/sfz-harness/format-rules.js +0 -617
  59. package/test/sfz-harness/gen-e2e-page.js +0 -14
  60. package/test/sfz-harness/inlined-functions.js +0 -82
  61. package/test/sfz-harness/option-wiring.js +0 -60
  62. package/test/sfz-harness/pages-archive.js +0 -318
  63. package/test/sfz-harness/pages-router.js +0 -143
  64. package/test/sfz-harness/relocation-cost.js +0 -94
  65. package/test/sfz-harness/search-triggers.js +0 -35
  66. package/test/sfz-harness/smoke.js +0 -10
  67. package/test/sfz-harness/stored-trigger.js +0 -95
  68. package/test/sfz-harness/trigger-seeds.json +0 -120
  69. package/test/sfz-harness/zip64.js +0 -77
  70. package/zip-build/README.md +0 -56
  71. package/zip-build/lib/fflate-streams.js +0 -47
  72. package/zip-build/lib/fflate.js +0 -2692
  73. package/zip-build/lib/zip-vendor-worker.js +0 -3
  74. package/zip-build/lib/zip-vendor.js +0 -9
  75. package/zip-build/lib/zip.js +0 -25
  76. package/zip-build/package-lock.json +0 -665
  77. package/zip-build/package.json +0 -15
  78. package/zip-build/reserved-property-names.json +0 -10630
  79. 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
- }];