@mercuryworkshop/scramjet 2.0.1-alpha → 2.0.2-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.
@@ -1,5 +1,5 @@
1
1
  import { URLMeta } from "./rewriters/url";
2
- import { ScramjetContext } from "./";
2
+ import { ScramjetContext } from "../shared";
3
3
  export declare const htmlRules: {
4
4
  [key: string]: "*" | string[] | ((...any: any[]) => string | null);
5
5
  fn: (value: string, context: ScramjetContext, meta: URLMeta) => string | null;
@@ -1,4 +1,4 @@
1
1
  import { URLMeta } from "./url";
2
- import { ScramjetContext } from "..";
2
+ import { ScramjetContext } from "../../shared";
3
3
  export declare function rewriteCss(css: string, context: ScramjetContext, meta: URLMeta): string;
4
4
  export declare function unrewriteCss(css: string): string;
@@ -1,6 +1,6 @@
1
1
  import { DomHandler } from "domhandler";
2
2
  import { URLMeta } from "./url";
3
- import { ScramjetContext } from "..";
3
+ import { ScramjetContext } from "../../shared";
4
4
  export declare function rewriteHtml(html: string, context: ScramjetContext, meta: URLMeta, fromTop?: boolean, preRewrite?: (handler: DomHandler) => void, postRewrite?: (handler: DomHandler) => void): string;
5
5
  export declare function unrewriteHtml(html: string): string;
6
6
  export declare function rewriteSrcset(srcset: string, context: ScramjetContext, meta: URLMeta): string;
@@ -1,4 +1,4 @@
1
- import { ScramjetContext } from "..";
1
+ import { ScramjetContext } from "../../shared";
2
2
  import { URLMeta } from "./url";
3
3
  type RewriterResult = {
4
4
  js: string | Uint8Array;
@@ -1,4 +1,4 @@
1
- import { ScramjetContext } from "..";
1
+ import { ScramjetContext } from "../../shared";
2
2
  export type URLMeta = {
3
3
  origin: URL;
4
4
  base: URL;
@@ -1,6 +1,6 @@
1
1
  import { Rewriter } from "../../../rewriter/wasm/out/wasm.js";
2
2
  import type { JsRewriterOutput } from "../../../rewriter/wasm/out/wasm.js";
3
- import { ScramjetContext } from "..";
3
+ import { ScramjetContext } from "../../shared";
4
4
  export type { JsRewriterOutput, Rewriter };
5
5
  import { URLMeta } from "./url";
6
6
  export declare function setWasm(u8: Uint8Array | ArrayBuffer): void;
@@ -1,3 +1,3 @@
1
- import { ScramjetContext } from "..";
1
+ import { ScramjetContext } from "../../shared";
2
2
  import { URLMeta } from "./url";
3
3
  export declare function rewriteWorkers(context: ScramjetContext, js: string | Uint8Array, type: "module" | "regular", url: string, meta: URLMeta): string;
@@ -28,6 +28,7 @@ export type ScramjetFlags = {
28
28
  allowInvalidJs: boolean;
29
29
  allowFailedIntercepts: boolean;
30
30
  debugTrampolines: boolean;
31
+ encapsulateWorkers: boolean;
31
32
  };
32
33
  export interface ScramjetConfig {
33
34
  globals: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercuryworkshop/scramjet",
3
- "version": "2.0.1-alpha",
3
+ "version": "2.0.2-alpha",
4
4
  "description": "An experimental web proxy that aims to be the successor to Ultraviolet",
5
5
  "type": "module",
6
6
  "types": "./dist/types/index.d.ts",
@@ -79,8 +79,6 @@
79
79
  },
80
80
  "scripts": {
81
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
82
  "rewriter:build": "cd rewriter/wasm/ && bash build.sh && cd ../../",
85
83
  "dev": "node server.js",
86
84
  "dev:debug": "DEBUG=1 node server.js",
File without changes