chore: flag cleanup

This commit is contained in:
Percs 2024-12-15 23:27:46 -06:00
parent e86e70d873
commit e526285560
3 changed files with 13 additions and 12 deletions

View file

@ -3,7 +3,8 @@ import { config, unrewriteUrl } from "../../shared";
import { ScramjetClient } from "../client"; import { ScramjetClient } from "../client";
export const enabled = (client: ScramjetClient) => export const enabled = (client: ScramjetClient) =>
flagEnabled("cleanerrors", client.url); flagEnabled("cleanErrors", client.url);
export default function (client: ScramjetClient, _self: Self) { export default function (client: ScramjetClient, _self: Self) {
// v8 only. all we need to do is clean the scramjet urls from stack traces // v8 only. all we need to do is clean the scramjet urls from stack traces
const closure = (error, stack) => { const closure = (error, stack) => {

View file

@ -20,7 +20,7 @@ export class ScramjetController {
pushsourcemapfn: "$scramjet$pushsourcemap", pushsourcemapfn: "$scramjet$pushsourcemap",
}, },
files: { files: {
wasm: "/scramjet.wasm.js", wasm: "/scramjet.wasm.wasm",
shared: "/scramjet.shared.js", shared: "/scramjet.shared.js",
worker: "/scramjet.worker.js", worker: "/scramjet.worker.js",
client: "/scramjet.client.js", client: "/scramjet.client.js",
@ -28,14 +28,14 @@ export class ScramjetController {
}, },
flags: { flags: {
serviceworkers: false, serviceworkers: false,
naiiveRewriter: false,
captureErrors: false,
strictRewrites: true,
syncxhr: false, syncxhr: false,
cleanerrors: false, strictRewrites: true,
naiiveRewriter: false,
rewriterLogs: true,
captureErrors: true,
cleanErrors: false,
scramitize: false, scramitize: false,
sourcemaps: false, sourcemaps: false,
rewriterLogs: true,
}, },
siteFlags: {}, siteFlags: {},
codec: { codec: {

10
src/types.d.ts vendored
View file

@ -25,14 +25,14 @@ import { ScramjetFrame } from "./controller/frame";
type ScramjetFlags = { type ScramjetFlags = {
serviceworkers: boolean; serviceworkers: boolean;
naiiveRewriter: boolean; syncxhr: boolean;
captureErrors: boolean;
strictRewrites: boolean; strictRewrites: boolean;
cleanerrors: boolean; naiiveRewriter: boolean;
rewriterLogs: boolean;
captureErrors: boolean;
cleanErrors: boolean;
scramitize: boolean; scramitize: boolean;
sourcemaps: boolean; sourcemaps: boolean;
syncxhr: boolean;
rewriterLogs: boolean;
}; };
interface ScramjetConfig { interface ScramjetConfig {