@mercuryworkshop/scramjet 2.0.67-alpha → 2.0.67-alpha.2
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/dist/scramjet-external.mjs +1 -0
- package/dist/scramjet.js +5 -5
- package/dist/scramjet.js.map +1 -1
- package/dist/scramjet.mjs +5 -5
- package/dist/scramjet.mjs.map +1 -1
- package/dist/scramjet.wasm +0 -0
- package/dist/scramjet_bundled.js +5 -5
- package/dist/scramjet_bundled.js.map +1 -1
- package/dist/scramjet_bundled.mjs +5 -5
- package/dist/scramjet_bundled.mjs.map +1 -1
- package/dist/temp-types-build/index.js +3 -3
- package/dist/temp-types-build/index.js.map +1 -1
- package/dist/types/client/singletonbox.d.ts +2 -0
- package/dist/types/shared/mime.d.ts +6 -0
- package/dist/types/shared/rewriters/worker.d.ts +1 -1
- package/dist/types/shared/snapshot.d.ts +1 -0
- package/dist/types/typesEntry.d.ts +5 -0
- package/package.json +4 -5
- package/lib/types.d.ts +0 -20
|
@@ -6,8 +6,10 @@ export declare class SingletonBox {
|
|
|
6
6
|
clients: ScramjetClient[];
|
|
7
7
|
globals: Map<Self, ScramjetClient>;
|
|
8
8
|
documents: Map<Document, ScramjetClient>;
|
|
9
|
+
histories: Map<History, ScramjetClient>;
|
|
9
10
|
locations: Map<Location, ScramjetClient>;
|
|
10
11
|
writeRewriters: WeakMap<Document, IncrementalHtmlRewriter>;
|
|
12
|
+
unproxy: Map<any, any>;
|
|
11
13
|
ctors: Record<string, Function[]>;
|
|
12
14
|
sourcemaps: SourceMaps;
|
|
13
15
|
constructor(ownerclient: ScramjetClient);
|
|
@@ -32,6 +32,12 @@ export declare function isJavascriptMimeType(mime: string | ParsedMimeType): boo
|
|
|
32
32
|
* JavaScript MIME type essence strings (not necessarily a full parsed MIME type).
|
|
33
33
|
*/
|
|
34
34
|
export declare function isJavascriptMimeTypeEssenceMatch(s: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Script block type string for a `<script>` element (prepare a script).
|
|
37
|
+
* Resolves `type` when present; otherwise maps obsolete `language` to `text/…`.
|
|
38
|
+
* @see https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script
|
|
39
|
+
*/
|
|
40
|
+
export declare function getScriptBlockTypeString(type: string | null | undefined, language: string | null | undefined, hasTypeAttribute?: boolean, hasLanguageAttribute?: boolean): string;
|
|
35
41
|
/**
|
|
36
42
|
* Whether a `<script type="...">` value denotes executable JavaScript
|
|
37
43
|
* (classic or module script), not a data block or import map.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ScramjetContext } from "@/shared";
|
|
2
2
|
import { URLMeta } from "@rewriters/url";
|
|
3
|
-
export declare function rewriteWorkers(
|
|
3
|
+
export declare function rewriteWorkers(js: string | Uint8Array, url: string, context: ScramjetContext, meta: URLMeta, isModule: boolean): string;
|
|
@@ -3,6 +3,7 @@ export declare const String_fromCodePoint: (...codePoints: number[]) => string;
|
|
|
3
3
|
export declare const String_fromCharCode: (...codes: number[]) => string;
|
|
4
4
|
export declare const Number: NumberConstructor;
|
|
5
5
|
export declare const Number_parseInt: (string: string, radix?: number) => number;
|
|
6
|
+
export declare const Number_isSafeInteger: (number: unknown) => boolean;
|
|
6
7
|
export declare const Object_keys: {
|
|
7
8
|
(o: object): string[];
|
|
8
9
|
(o: {}): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercuryworkshop/scramjet",
|
|
3
|
-
"version": "2.0.67-alpha",
|
|
3
|
+
"version": "2.0.67-alpha.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"description": "An experimental web proxy that aims to be the successor to Ultraviolet",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/types/
|
|
16
|
+
"types": "./dist/types/typesEntry.d.ts",
|
|
17
17
|
"default": "./dist/scramjet-external.mjs"
|
|
18
18
|
},
|
|
19
19
|
"./path": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"rewriter:build": "cd rewriter/wasm/ && bash build.sh && cd ../../",
|
|
86
86
|
"dev": "node server.js",
|
|
87
87
|
"dev:debug": "DEBUG=1 node server.js",
|
|
88
|
-
"pub": "
|
|
88
|
+
"pub": "pnpm publish --no-git-checks --access public",
|
|
89
89
|
"format": "prettier --write .",
|
|
90
90
|
"format:docs": "remark \"docs/**/*.{md,mdx}\" --output",
|
|
91
91
|
"lint": "eslint ./src/",
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"lint:workflows": "actionlint .github/workflows/*.yml",
|
|
94
94
|
"lint:all": "npm run lint && npm run lint:workflows",
|
|
95
95
|
"test": "npm run test:package",
|
|
96
|
-
"test:package": "ava tests/ci/packageValidation.js"
|
|
97
|
-
"preinstall": "npx only-allow pnpm"
|
|
96
|
+
"test:package": "ava tests/ci/packageValidation.js"
|
|
98
97
|
}
|
|
99
98
|
}
|
package/lib/types.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as controller from "../dist/types/controller/index.ts";
|
|
2
|
-
import { ScramjetConfig } from "../dist/types/types.ts";
|
|
3
|
-
import * as worker from "../dist/types/worker";
|
|
4
|
-
import * as shared from "../dist/types/shared";
|
|
5
|
-
import * as client from "../dist/types/shared";
|
|
6
|
-
|
|
7
|
-
declare global {
|
|
8
|
-
function $scramjetLoadController(): typeof controller;
|
|
9
|
-
function $scramjetLoadWorker(): typeof worker;
|
|
10
|
-
function $scramjetLoadClient(config: ScramjetConfig): typeof client;
|
|
11
|
-
function $scramjetLoadShared(): typeof shared;
|
|
12
|
-
/// load any file from scramjet source
|
|
13
|
-
function $scramjetRequire(path: string): any;
|
|
14
|
-
var $scramjetVersion: {
|
|
15
|
-
build: string;
|
|
16
|
-
version: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type * from "../dist/types/index";
|