@aeptus/aexeo-emdash 0.1.0

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.
@@ -0,0 +1,25 @@
1
+ export interface PluginAdminPage {
2
+ path: string;
3
+ label: string;
4
+ icon?: string;
5
+ }
6
+ export interface PluginAdminWidget {
7
+ id: string;
8
+ size?: "full" | "half" | "third";
9
+ title?: string;
10
+ }
11
+ export interface SandboxedPluginDescriptor {
12
+ id: string;
13
+ version: string;
14
+ entrypoint: string;
15
+ format: "standard";
16
+ capabilities?: readonly string[];
17
+ adminPages?: readonly PluginAdminPage[];
18
+ adminWidgets?: readonly PluginAdminWidget[];
19
+ allowedHosts?: readonly string[];
20
+ }
21
+ export interface SeogeoSandboxedOptions {
22
+ evaluatorHost?: string;
23
+ }
24
+ export declare function seogeoPluginSandboxed(options?: SeogeoSandboxedOptions): SandboxedPluginDescriptor;
25
+ //# sourceMappingURL=sandbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAGxC,YAAY,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC5C,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAeD,MAAM,WAAW,sBAAsB;IAgBrC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,sBAA2B,GACnC,yBAAyB,CAwB3B"}
@@ -0,0 +1,27 @@
1
+ import type { EmdashDocument, Finding } from "./types.js";
2
+ export interface SidecarHttp {
3
+ fetch(url: string, init?: {
4
+ method?: string;
5
+ headers?: Record<string, string>;
6
+ body?: string;
7
+ }): Promise<{
8
+ status: number;
9
+ ok: boolean;
10
+ text(): Promise<string>;
11
+ }>;
12
+ }
13
+ export interface SidecarConfig {
14
+ url: string;
15
+ authToken: string;
16
+ configJson?: string;
17
+ }
18
+ export type SidecarResult = {
19
+ ok: true;
20
+ findings: Finding[];
21
+ } | {
22
+ ok: false;
23
+ reason: "network_error" | "auth_error" | "server_error" | "invalid_response";
24
+ detail: string;
25
+ };
26
+ export declare function evaluateViaSidecar(http: SidecarHttp, config: SidecarConfig, documents: readonly EmdashDocument[]): Promise<SidecarResult>;
27
+ //# sourceMappingURL=sidecar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidecar.d.ts","sourceRoot":"","sources":["../src/sidecar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB1D,MAAM,WAAW,WAAW;IAC1B,KAAK,CACH,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAIlB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,GACjC;IACE,EAAE,EAAE,KAAK,CAAC;IAIV,MAAM,EACF,eAAe,GACf,YAAY,GACZ,cAAc,GACd,kBAAkB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,OAAO,CAAC,aAAa,CAAC,CA+DxB"}
@@ -0,0 +1,66 @@
1
+ export type BlockStyle = "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote";
2
+ export type ListItem = "bullet" | "number";
3
+ export interface PortableTextSpan {
4
+ _type: "span";
5
+ _key?: string;
6
+ text: string;
7
+ marks: string[];
8
+ }
9
+ export interface MarkDef {
10
+ _key: string;
11
+ _type: string;
12
+ [key: string]: unknown;
13
+ }
14
+ export type PortableTextChild = PortableTextSpan;
15
+ export interface PortableTextBlock {
16
+ _type?: "block";
17
+ _key?: string;
18
+ style?: BlockStyle;
19
+ listItem?: ListItem;
20
+ level?: number;
21
+ children: PortableTextChild[];
22
+ markDefs?: MarkDef[];
23
+ }
24
+ export interface HreflangAlternate {
25
+ lang: string;
26
+ href: string;
27
+ }
28
+ export interface EmdashDocument {
29
+ route: string;
30
+ title: string;
31
+ description?: string;
32
+ canonical?: string;
33
+ lang?: string;
34
+ alternates?: HreflangAlternate[];
35
+ meta?: Record<string, string>;
36
+ schema?: unknown[];
37
+ body?: PortableTextBlock[];
38
+ }
39
+ export type FindingSeverity = "error" | "warning";
40
+ export type FindingScope = "page" | "template" | "sitewide";
41
+ export interface Finding {
42
+ rule_id: string;
43
+ message: string;
44
+ path: string;
45
+ line: number;
46
+ column: number;
47
+ severity: FindingSeverity;
48
+ suggestion: string | null;
49
+ scope: FindingScope;
50
+ }
51
+ export interface SiteIntelligenceScore {
52
+ citation_readiness_score: number;
53
+ truth_consistency_score: number;
54
+ answer_pack_score: number;
55
+ external_trust_alignment_score: number | null;
56
+ overall_score: number;
57
+ route_scores: unknown[];
58
+ blockers: IntelligenceBlocker[];
59
+ }
60
+ export interface IntelligenceBlocker {
61
+ rule_id?: string;
62
+ message: string;
63
+ route?: string;
64
+ severity?: string;
65
+ }
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,YAAY,CAAC;AAEjB,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,YAAY,CAAC;CACrB;AAKD,MAAM,WAAW,qBAAqB;IACpC,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8BAA8B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ export declare function evaluateDocuments(documentsJson: string, configJson?: string | null): Promise<string>;
2
+ export declare function scoreIntelligence(documentsJson: string): Promise<string>;
3
+ //# sourceMappingURL=wasm-init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wasm-init.d.ts","sourceRoot":"","sources":["../src/wasm-init.ts"],"names":[],"mappings":"AAmDA,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@aeptus/aexeo-emdash",
3
+ "version": "0.1.0",
4
+ "description": "Aexeo seogeo SEO/GEO content evaluator as an emdash plugin",
5
+ "license": "MIT",
6
+ "author": "Aexeo",
7
+ "homepage": "https://github.com/schiste/Aexeo/tree/main/packages/aexeo-emdash",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/schiste/Aexeo.git",
11
+ "directory": "packages/aexeo-emdash"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/schiste/Aexeo/issues"
15
+ },
16
+ "keywords": [
17
+ "emdash",
18
+ "emdash-plugin",
19
+ "seo",
20
+ "geo",
21
+ "cms",
22
+ "wasm",
23
+ "cloudflare"
24
+ ],
25
+ "type": "module",
26
+ "main": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "default": "./dist/index.js"
33
+ },
34
+ "./configured": {
35
+ "types": "./dist/configured.d.ts",
36
+ "import": "./dist/configured.js",
37
+ "default": "./dist/configured.js"
38
+ },
39
+ "./sandbox": {
40
+ "types": "./dist/sandbox-entry.d.ts",
41
+ "import": "./dist/sandbox-entry.js",
42
+ "default": "./dist/sandbox-entry.js"
43
+ }
44
+ },
45
+ "files": [
46
+ "dist",
47
+ "wasm",
48
+ "INSTALL.md",
49
+ "CHANGELOG.md",
50
+ "LICENSE"
51
+ ],
52
+ "scripts": {
53
+ "build:wasm": "bash scripts/build-wasm.sh",
54
+ "build:ts": "tsc -p tsconfig.build.json",
55
+ "build:bundle": "node scripts/build-bundle.mjs",
56
+ "build": "npm run build:wasm && npm run build:ts && npm run build:bundle",
57
+ "typecheck": "tsc --noEmit",
58
+ "prepublishOnly": "npm run build"
59
+ },
60
+ "peerDependencies": {
61
+ "@emdash-cms/core": "*",
62
+ "emdash": ">=0.7.0"
63
+ },
64
+ "peerDependenciesMeta": {
65
+ "@emdash-cms/core": {
66
+ "optional": true
67
+ },
68
+ "emdash": {
69
+ "optional": true
70
+ }
71
+ },
72
+ "devDependencies": {
73
+ "@types/node": "^22.0.0",
74
+ "emdash": "^0.7.0",
75
+ "esbuild": "^0.28.0",
76
+ "typescript": "^5.6.0"
77
+ }
78
+ }
@@ -0,0 +1,6 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export function evaluateDocuments(documents_json: string, config_json?: string | null): string;
5
+
6
+ export function scoreIntelligence(documents_json: string): string;
@@ -0,0 +1,9 @@
1
+ /* @ts-self-types="./aexeo_emdash_bridge.d.ts" */
2
+ import * as wasm from "./aexeo_emdash_bridge_bg.wasm";
3
+ import { __wbg_set_wasm } from "./aexeo_emdash_bridge_bg.js";
4
+
5
+ __wbg_set_wasm(wasm);
6
+ wasm.__wbindgen_start();
7
+ export {
8
+ evaluateDocuments, scoreIntelligence
9
+ } from "./aexeo_emdash_bridge_bg.js";
@@ -0,0 +1,17 @@
1
+ // Minimal ambient declarations for the wasm-bindgen "bg" glue
2
+ // module. We import this for two purposes:
3
+ // 1. The named functions we actually call from JS:
4
+ // __wbg_set_wasm, evaluateDocuments, scoreIntelligence.
5
+ // 2. The full namespace, which we hand to WebAssembly.instantiate
6
+ // as the import map — every __wbg_* / __wbindgen_* import the
7
+ // WASM declares needs to resolve at instantiation time.
8
+ // We don't enumerate the second set here; they cross the boundary
9
+ // only via `import * as glue` and never appear in TypeScript call
10
+ // sites by name. See scripts/build-wasm.sh for why this file is
11
+ // (re)written after every wasm-bindgen run.
12
+ export const __wbg_set_wasm: (wasm: WebAssembly.Exports) => void;
13
+ export const evaluateDocuments: (
14
+ documents_json: string,
15
+ config_json?: string | null,
16
+ ) => string;
17
+ export const scoreIntelligence: (documents_json: string) => string;
@@ -0,0 +1,159 @@
1
+ /**
2
+ * @param {string} documents_json
3
+ * @param {string | null} [config_json]
4
+ * @returns {string}
5
+ */
6
+ export function evaluateDocuments(documents_json, config_json) {
7
+ let deferred4_0;
8
+ let deferred4_1;
9
+ try {
10
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11
+ const len0 = WASM_VECTOR_LEN;
12
+ var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
13
+ var len1 = WASM_VECTOR_LEN;
14
+ const ret = wasm.evaluateDocuments(ptr0, len0, ptr1, len1);
15
+ var ptr3 = ret[0];
16
+ var len3 = ret[1];
17
+ if (ret[3]) {
18
+ ptr3 = 0; len3 = 0;
19
+ throw takeFromExternrefTable0(ret[2]);
20
+ }
21
+ deferred4_0 = ptr3;
22
+ deferred4_1 = len3;
23
+ return getStringFromWasm0(ptr3, len3);
24
+ } finally {
25
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
26
+ }
27
+ }
28
+
29
+ /**
30
+ * @param {string} documents_json
31
+ * @returns {string}
32
+ */
33
+ export function scoreIntelligence(documents_json) {
34
+ let deferred3_0;
35
+ let deferred3_1;
36
+ try {
37
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38
+ const len0 = WASM_VECTOR_LEN;
39
+ const ret = wasm.scoreIntelligence(ptr0, len0);
40
+ var ptr2 = ret[0];
41
+ var len2 = ret[1];
42
+ if (ret[3]) {
43
+ ptr2 = 0; len2 = 0;
44
+ throw takeFromExternrefTable0(ret[2]);
45
+ }
46
+ deferred3_0 = ptr2;
47
+ deferred3_1 = len2;
48
+ return getStringFromWasm0(ptr2, len2);
49
+ } finally {
50
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
51
+ }
52
+ }
53
+ export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
54
+ const ret = Error(getStringFromWasm0(arg0, arg1));
55
+ return ret;
56
+ }
57
+ export function __wbindgen_init_externref_table() {
58
+ const table = wasm.__wbindgen_externrefs;
59
+ const offset = table.grow(4);
60
+ table.set(0, undefined);
61
+ table.set(offset + 0, undefined);
62
+ table.set(offset + 1, null);
63
+ table.set(offset + 2, true);
64
+ table.set(offset + 3, false);
65
+ }
66
+ function getStringFromWasm0(ptr, len) {
67
+ ptr = ptr >>> 0;
68
+ return decodeText(ptr, len);
69
+ }
70
+
71
+ let cachedUint8ArrayMemory0 = null;
72
+ function getUint8ArrayMemory0() {
73
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
74
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
75
+ }
76
+ return cachedUint8ArrayMemory0;
77
+ }
78
+
79
+ function isLikeNone(x) {
80
+ return x === undefined || x === null;
81
+ }
82
+
83
+ function passStringToWasm0(arg, malloc, realloc) {
84
+ if (realloc === undefined) {
85
+ const buf = cachedTextEncoder.encode(arg);
86
+ const ptr = malloc(buf.length, 1) >>> 0;
87
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
88
+ WASM_VECTOR_LEN = buf.length;
89
+ return ptr;
90
+ }
91
+
92
+ let len = arg.length;
93
+ let ptr = malloc(len, 1) >>> 0;
94
+
95
+ const mem = getUint8ArrayMemory0();
96
+
97
+ let offset = 0;
98
+
99
+ for (; offset < len; offset++) {
100
+ const code = arg.charCodeAt(offset);
101
+ if (code > 0x7F) break;
102
+ mem[ptr + offset] = code;
103
+ }
104
+ if (offset !== len) {
105
+ if (offset !== 0) {
106
+ arg = arg.slice(offset);
107
+ }
108
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
109
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
110
+ const ret = cachedTextEncoder.encodeInto(arg, view);
111
+
112
+ offset += ret.written;
113
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
114
+ }
115
+
116
+ WASM_VECTOR_LEN = offset;
117
+ return ptr;
118
+ }
119
+
120
+ function takeFromExternrefTable0(idx) {
121
+ const value = wasm.__wbindgen_externrefs.get(idx);
122
+ wasm.__externref_table_dealloc(idx);
123
+ return value;
124
+ }
125
+
126
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
127
+ cachedTextDecoder.decode();
128
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
129
+ let numBytesDecoded = 0;
130
+ function decodeText(ptr, len) {
131
+ numBytesDecoded += len;
132
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
133
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
134
+ cachedTextDecoder.decode();
135
+ numBytesDecoded = len;
136
+ }
137
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
138
+ }
139
+
140
+ const cachedTextEncoder = new TextEncoder();
141
+
142
+ if (!('encodeInto' in cachedTextEncoder)) {
143
+ cachedTextEncoder.encodeInto = function (arg, view) {
144
+ const buf = cachedTextEncoder.encode(arg);
145
+ view.set(buf);
146
+ return {
147
+ read: arg.length,
148
+ written: buf.length
149
+ };
150
+ };
151
+ }
152
+
153
+ let WASM_VECTOR_LEN = 0;
154
+
155
+
156
+ let wasm;
157
+ export function __wbg_set_wasm(val) {
158
+ wasm = val;
159
+ }
Binary file
@@ -0,0 +1,11 @@
1
+ // Overrides the wasm-bindgen-generated default to match what
2
+ // emdash hosts consuming this package actually receive at the
3
+ // import site: a precompiled WebAssembly.Module. Cloudflare
4
+ // Workers / workerd disallow runtime WebAssembly.instantiate
5
+ // from raw bytes ("Wasm code generation disallowed by embedder"),
6
+ // so we depend on the consumer's bundler resolving the import
7
+ // to a Module at build time. esbuild's "wasm" loader does this;
8
+ // Wrangler does this natively. See scripts/build-wasm.sh for why
9
+ // this file is rewritten after every wasm-bindgen run.
10
+ declare const wasmModule: WebAssembly.Module;
11
+ export default wasmModule;