js-dos 8.3.14 → 8.3.16

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": "js-dos",
3
- "version": "8.3.14",
3
+ "version": "8.3.16",
4
4
  "description": "Full-featured DOS player with multiple emulator backends",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -37,7 +37,7 @@
37
37
  "@typescript-eslint/parser": "^6.20.0",
38
38
  "autoprefixer": "^10.4.17",
39
39
  "daisyui": "^3.9.3",
40
- "emulators": "8.3.3",
40
+ "emulators": "8.3.4",
41
41
  "eslint": "^8.56.0",
42
42
  "eslint-config-google": "^0.14.0",
43
43
  "postcss": "^8.4.33",
package/release.zip CHANGED
Binary file
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import os
4
+ import subprocess
5
+ from pathlib import Path
6
+
7
+ def brotli_compress_file(file_path):
8
+ try:
9
+ subprocess.run(['brotli', '-Zf', file_path], check=True)
10
+ os.remove(file_path)
11
+ if (file_path.endswith(".js") or file_path.endswith(".wasm") or file_path.endswith(".css")):
12
+ os.rename(file_path + '.br', file_path + ".ea")
13
+ else:
14
+ os.rename(file_path + '.br', file_path)
15
+ print(f"Compressed {file_path}")
16
+ except subprocess.CalledProcessError as e:
17
+ print(f"Error compressing {file_path}: {e}")
18
+
19
+ def main():
20
+ dist_dir = Path('dist')
21
+
22
+ if not dist_dir.exists():
23
+ print("Error: dist directory not found")
24
+ return
25
+
26
+ # Walk through all files in dist directory
27
+ for root, dirs, files in os.walk(dist_dir):
28
+ # Skip types subfolder
29
+ if 'types' in root:
30
+ continue
31
+
32
+ for file in files:
33
+ file_path = os.path.join(root, file)
34
+ # Skip if file is already brotli compressed
35
+ if not file_path.endswith('.br'):
36
+ brotli_compress_file(file_path)
37
+ if __name__ == '__main__':
38
+ main()