@hpcc-js/wasm-expat 1.10.0 → 1.10.1
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/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/expat.ts +1 -1
- package/types/expat.d.ts +1 -1
- package/types/expatlib.d.ts +65 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/wasm-expat",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "hpcc-js - WASM expat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/",
|
|
57
57
|
"license": "Apache-2.0",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "11395f5acfc865accde71905509bb45d5c79b11b"
|
|
59
59
|
}
|
package/src/expat.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-expect-error importing from a wasm file is resolved via a custom esbuild plugin
|
|
2
2
|
import load, { reset } from "../../../build/packages/expat/expatlib.wasm";
|
|
3
|
-
import type { MainModule, map_string_string } from "
|
|
3
|
+
import type { MainModule, map_string_string } from "../types/expatlib.js";
|
|
4
4
|
import { MainModuleEx } from "@hpcc-js/wasm-util";
|
|
5
5
|
|
|
6
6
|
export type Attributes = { [key: string]: string };
|
package/types/expat.d.ts
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
|
|
2
|
+
declare namespace RuntimeExports {
|
|
3
|
+
/**
|
|
4
|
+
* Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
|
|
5
|
+
* emscripten HEAP, returns a copy of that string as a Javascript String object.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} ptr
|
|
8
|
+
* @param {number=} maxBytesToRead - An optional length that specifies the
|
|
9
|
+
* maximum number of bytes to read. You can omit this parameter to scan the
|
|
10
|
+
* string until the first 0 byte. If maxBytesToRead is passed, and the string
|
|
11
|
+
* at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
|
|
12
|
+
* string will cut short at that byte index.
|
|
13
|
+
* @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.
|
|
14
|
+
* @return {string}
|
|
15
|
+
*/
|
|
16
|
+
function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined, ignoreNul?: boolean | undefined): string;
|
|
17
|
+
function lengthBytesUTF8(str: any): number;
|
|
18
|
+
function stringToUTF8(str: any, outPtr: any, maxBytesToWrite: any): any;
|
|
19
|
+
let HEAPU8: any;
|
|
20
|
+
}
|
|
21
|
+
interface WasmModule {
|
|
22
|
+
_malloc(_0: number): number;
|
|
23
|
+
_free(_0: number): void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type EmbindString = ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string;
|
|
27
|
+
export interface ClassHandle {
|
|
28
|
+
isAliasOf(other: ClassHandle): boolean;
|
|
29
|
+
delete(): void;
|
|
30
|
+
deleteLater(): this;
|
|
31
|
+
isDeleted(): boolean;
|
|
32
|
+
// @ts-ignore - If targeting lower than ESNext, this symbol might not exist.
|
|
33
|
+
[Symbol.dispose](): void;
|
|
34
|
+
clone(): this;
|
|
35
|
+
}
|
|
36
|
+
export interface vector_string extends ClassHandle {
|
|
37
|
+
size(): number;
|
|
38
|
+
get(_0: number): string | undefined;
|
|
39
|
+
push_back(_0: EmbindString): void;
|
|
40
|
+
resize(_0: number, _1: EmbindString): void;
|
|
41
|
+
set(_0: number, _1: EmbindString): boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface map_string_string extends ClassHandle {
|
|
45
|
+
keys(): vector_string;
|
|
46
|
+
size(): number;
|
|
47
|
+
get(_0: EmbindString): string | undefined;
|
|
48
|
+
set(_0: EmbindString, _1: EmbindString): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type IParser = {startElement: (tag: string, attrs: map_string_string) => void, endElement: (tag: string) => void, characterData: (content: string) => void};
|
|
52
|
+
|
|
53
|
+
interface EmbindModule {
|
|
54
|
+
vector_string: {
|
|
55
|
+
new(): vector_string;
|
|
56
|
+
};
|
|
57
|
+
map_string_string: {
|
|
58
|
+
new(): map_string_string;
|
|
59
|
+
};
|
|
60
|
+
version(): string;
|
|
61
|
+
parse(_0: EmbindString, _1: IParser): boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule;
|
|
65
|
+
export default function MainModuleFactory (options?: unknown): Promise<MainModule>;
|