@mercuryworkshop/scramjet 1.0.2 → 2.0.1-alpha

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 (53) hide show
  1. package/dist/c34a4f083a11eae2.wasm +0 -0
  2. package/dist/scramjet.js +33 -0
  3. package/dist/scramjet.js.map +1 -0
  4. package/dist/scramjet.mjs +33 -0
  5. package/dist/scramjet.mjs.map +1 -0
  6. package/dist/scramjet.wasm.wasm +0 -0
  7. package/dist/scramjet_bundled.js +33 -0
  8. package/dist/scramjet_bundled.js.map +1 -0
  9. package/dist/scramjet_bundled.mjs +33 -0
  10. package/dist/scramjet_bundled.mjs.map +1 -0
  11. package/dist/types/client/client.d.ts +91 -0
  12. package/dist/types/client/entry.d.ts +5 -0
  13. package/dist/types/client/events.d.ts +38 -0
  14. package/dist/types/client/helpers.d.ts +1 -0
  15. package/dist/types/client/index.d.ts +7 -0
  16. package/dist/types/client/location.d.ts +2 -0
  17. package/dist/types/client/shared/eval.d.ts +3 -0
  18. package/dist/types/client/shared/sourcemaps.d.ts +19 -0
  19. package/dist/types/client/shared/wrap.d.ts +4 -0
  20. package/dist/types/client/singletonbox.d.ts +14 -0
  21. package/dist/types/fetch/index.d.ts +80 -0
  22. package/dist/types/index.d.ts +9 -0
  23. package/dist/types/shared/cookie.d.ts +18 -0
  24. package/dist/types/shared/headers.d.ts +13 -0
  25. package/dist/types/shared/htmlRules.d.ts +6 -0
  26. package/dist/types/shared/index.d.ts +23 -0
  27. package/dist/types/shared/rewriters/css.d.ts +4 -0
  28. package/dist/types/shared/rewriters/html.d.ts +6 -0
  29. package/dist/types/shared/rewriters/index.d.ts +6 -0
  30. package/dist/types/shared/rewriters/js.d.ts +11 -0
  31. package/dist/types/shared/rewriters/url.d.ts +11 -0
  32. package/dist/types/shared/rewriters/wasm.d.ts +8 -0
  33. package/dist/types/shared/rewriters/worker.d.ts +3 -0
  34. package/dist/types/shared/security/index.d.ts +1 -0
  35. package/dist/types/shared/security/siteTests.d.ts +1 -0
  36. package/dist/types/symbols.d.ts +7 -0
  37. package/dist/types/types.d.ts +114 -0
  38. package/lib/index.cjs +7 -7
  39. package/lib/index.d.ts +8 -3
  40. package/lib/types.d.ts +20 -0
  41. package/package.json +77 -34
  42. package/LICENSE +0 -661
  43. package/README.md +0 -21
  44. package/dist/scramjet.bundle.js +0 -7
  45. package/dist/scramjet.bundle.js.map +0 -7
  46. package/dist/scramjet.client.js +0 -1
  47. package/dist/scramjet.client.js.map +0 -7
  48. package/dist/scramjet.codecs.js +0 -3
  49. package/dist/scramjet.codecs.js.map +0 -7
  50. package/dist/scramjet.config.js +0 -1
  51. package/dist/scramjet.config.js.map +0 -7
  52. package/dist/scramjet.worker.js +0 -42
  53. package/dist/scramjet.worker.js.map +0 -7
package/package.json CHANGED
@@ -1,56 +1,99 @@
1
1
  {
2
2
  "name": "@mercuryworkshop/scramjet",
3
- "version": "1.0.2",
3
+ "version": "2.0.1-alpha",
4
4
  "description": "An experimental web proxy that aims to be the successor to Ultraviolet",
5
- "main": "./lib/index.cjs",
6
- "types": "./lib/index.d.js",
5
+ "type": "module",
6
+ "types": "./dist/types/index.d.ts",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/MercuryWorkshop/scramjet"
10
10
  },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/types/index.d.ts",
14
+ "default": "./dist/scramjet.mjs"
15
+ },
16
+ "./path": {
17
+ "types": "./lib/index.d.ts",
18
+ "default": "./lib/index.cjs"
19
+ },
20
+ "./bundled": {
21
+ "types": "./dist/types/index.d.ts",
22
+ "default": "./dist/scramjet_bundled.mjs"
23
+ }
24
+ },
11
25
  "files": [
12
26
  "dist",
13
27
  "lib"
14
28
  ],
15
29
  "keywords": [],
16
30
  "author": "",
17
- "license": "ISC",
31
+ "license": "MIT",
32
+ "ava": {
33
+ "files": [
34
+ "tests/ci/**/*.js"
35
+ ],
36
+ "verbose": true
37
+ },
18
38
  "devDependencies": {
19
- "@fastify/static": "^7.0.3",
20
- "@mercuryworkshop/bare-as-module3": "^2.2.0-alpha",
21
- "@mercuryworkshop/epoxy-transport": "^1.1.0",
22
- "@mercuryworkshop/libcurl-transport": "^1.3.1",
23
- "@tomphttp/bare-server-node": "^2.0.3",
24
- "@types/eslint": "^8.56.10",
25
- "@types/serviceworker": "^0.0.85",
26
- "@typescript-eslint/eslint-plugin": "^6.21.0",
27
- "@typescript-eslint/parser": "^6.21.0",
28
- "dotenv": "^16.4.5",
29
- "esbuild": "^0.20.2",
30
- "esbuild-plugin-copy": "^2.1.1",
31
- "esbuild-plugin-time": "^1.0.0",
32
- "eslint": "^8.57.0",
33
- "fastify": "^4.26.2",
34
- "tslib": "^2.6.2",
35
- "typescript": "^5.4.5"
39
+ "@eslint/eslintrc": "^3.3.1",
40
+ "@eslint/js": "^9.35.0",
41
+ "@estruyf/github-actions-reporter": "^1.10.0",
42
+ "@fastify/static": "^8.2.0",
43
+ "@mercuryworkshop/wisp-js": "^0.4.0",
44
+ "@nebula-services/bare-server-node": "^2.0.4",
45
+ "@playwright/test": "^1.55.0",
46
+ "@types/eslint": "^9.6.1",
47
+ "@types/estree": "^1.0.8",
48
+ "@types/node": "^24.3.1",
49
+ "@types/serviceworker": "^0.0.160",
50
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
51
+ "@typescript-eslint/parser": "^8.43.0",
52
+ "actionlint": "^2.0.6",
53
+ "ava": "^6.4.1",
54
+ "dotenv": "^17.2.2",
55
+ "eslint": "^9.35.0",
56
+ "fastify": "^5.6.0",
57
+ "glob": "^11.0.3",
58
+ "playwright": "^1.55.0",
59
+ "prettier": "^3.6.2",
60
+ "remark": "^15.0.1",
61
+ "remark-cli": "^12.0.1",
62
+ "remark-frontmatter": "^5.0.0",
63
+ "remark-mdx": "^3.1.1",
64
+ "remark-stringify": "^11.0.0",
65
+ "ts-checker-rspack-plugin": "^1.1.5",
66
+ "tsc-alias": "^1.8.16",
67
+ "tslib": "^2.8.1",
68
+ "typescript": "^5.9.2"
36
69
  },
37
- "type": "module",
38
70
  "dependencies": {
39
- "@mercuryworkshop/bare-mux": "^1.1.2",
40
- "@webreflection/idb-map": "^0.1.3",
41
- "astravel": "^0.6.1",
42
- "astring": "^1.8.6",
71
+ "@mercuryworkshop/proxy-transports": "1.0.2",
43
72
  "dom-serializer": "^2.0.0",
44
73
  "domhandler": "^5.0.3",
45
- "domutils": "^3.1.0",
46
- "esbuild-server": "^0.3.0",
47
- "htmlparser2": "^9.1.0",
48
- "meriyah": "^4.4.2"
74
+ "domutils": "^3.2.2",
75
+ "htmlparser2": "^10.0.0",
76
+ "idb": "^8.0.3",
77
+ "parse-domain": "^8.2.2",
78
+ "set-cookie-parser": "^2.7.1"
49
79
  },
50
80
  "scripts": {
51
- "build": "node esbuild.js",
52
- "dev": "node esbuild.dev.js",
53
- "prepublish": "pnpm build",
54
- "pub": "pnpm publish --no-git-checks --access public"
81
+ "build": "cd ../.. && rspack build --mode production",
82
+ "build:types": "cd ../.. && rslib build && rm -rf packages/core/dist/temp",
83
+ "build:all": "npm run build && npm run build:types",
84
+ "rewriter:build": "cd rewriter/wasm/ && bash build.sh && cd ../../",
85
+ "dev": "node server.js",
86
+ "dev:debug": "DEBUG=1 node server.js",
87
+ "pub": "npm publish --no-git-checks --access public",
88
+ "format": "prettier --write .",
89
+ "format:docs": "remark \"docs/**/*.{md,mdx}\" --output",
90
+ "lint": "eslint ./src/",
91
+ "lint:fix": "eslint ./src/ --fix",
92
+ "lint:workflows": "actionlint .github/workflows/*.yml",
93
+ "lint:all": "npm run lint && npm run lint:workflows",
94
+ "test": "npm run test:package && npm run test:integration",
95
+ "test:package": "ava tests/ci/packageValidation.js",
96
+ "test:integration": "npx playwright test",
97
+ "preinstall": "npx only-allow pnpm"
55
98
  }
56
99
  }