windmill-cli 1.478.0 → 1.479.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.
- package/esm/bootstrap/script_bootstrap.js +13 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/_common16.js +45 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/_common32.js +175 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/_common64.js +98 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/_common_detach.js +13 -0
- package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base32.js +39 -21
- package/esm/deps/jsr.io/@std/encoding/1.0.8/base64.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/base64url.js +72 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.8/hex.js +87 -0
- package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/mod.js +1 -0
- package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/eol.js +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/deps.js +2 -2
- package/esm/gen/core/OpenAPI.js +1 -1
- package/esm/gen/services.gen.js +146 -20
- package/esm/hub.js +11 -7
- package/esm/instance.js +8 -0
- package/esm/main.js +1 -1
- package/esm/metadata.js +29 -4
- package/esm/script.js +15 -0
- package/esm/script_common.js +8 -0
- package/esm/settings.js +3 -11
- package/esm/sync.js +19 -1
- package/esm/types.js +3 -0
- package/esm/wasm/csharp/windmill_parser_wasm.js +103 -0
- package/esm/wasm/csharp/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/go/windmill_parser_wasm.js +103 -0
- package/esm/wasm/go/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/java/windmill_parser_wasm.js +103 -0
- package/esm/wasm/java/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/nu/windmill_parser_wasm.js +103 -0
- package/esm/wasm/nu/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/php/windmill_parser_wasm.js +103 -0
- package/esm/wasm/php/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/python/windmill_parser_wasm.js +109 -0
- package/esm/wasm/python/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/regex/windmill_parser_wasm.js +270 -0
- package/esm/wasm/regex/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/rust/windmill_parser_wasm.js +103 -0
- package/esm/wasm/rust/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/ts/windmill_parser_wasm.js +419 -0
- package/esm/wasm/ts/windmill_parser_wasm_bg.wasm +0 -0
- package/esm/wasm/yaml/windmill_parser_wasm.js +103 -0
- package/esm/wasm/yaml/windmill_parser_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/types/bootstrap/script_bootstrap.d.ts +2 -0
- package/types/bootstrap/script_bootstrap.d.ts.map +1 -1
- package/types/conf.d.ts +1 -0
- package/types/conf.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common16.d.ts +21 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common16.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common32.d.ts +21 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common32.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common64.d.ts +21 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common64.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common_detach.d.ts +4 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/_common_detach.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_types.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_validate_binary_like.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/ascii85.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base32.d.ts +15 -15
- package/types/deps/jsr.io/@std/encoding/1.0.8/base32.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base58.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/encoding/1.0.8/base64.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/base64url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/hex.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/1.0.8/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/varint.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_create_walk_entry.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_get_file_info_type.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_same_path.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_subdir.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_to_path_string.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/copy.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/empty_dir.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_dir.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_file.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_link.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_symlink.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/eol.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/exists.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/expand_glob.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/move.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/walk.d.ts.map +1 -1
- package/types/deps.d.ts +2 -2
- package/types/gen/services.gen.d.ts +75 -11
- package/types/gen/services.gen.d.ts.map +1 -1
- package/types/gen/types.gen.d.ts +102 -35
- package/types/gen/types.gen.d.ts.map +1 -1
- package/types/hub.d.ts.map +1 -1
- package/types/instance.d.ts +1 -0
- package/types/instance.d.ts.map +1 -1
- package/types/main.d.ts +1 -1
- package/types/metadata.d.ts +2 -2
- package/types/metadata.d.ts.map +1 -1
- package/types/script.d.ts +2 -0
- package/types/script.d.ts.map +1 -1
- package/types/script_common.d.ts +1 -1
- package/types/script_common.d.ts.map +1 -1
- package/types/settings.d.ts +2 -4
- package/types/settings.d.ts.map +1 -1
- package/types/sync.d.ts +2 -0
- package/types/sync.d.ts.map +1 -1
- package/types/types.d.ts.map +1 -1
- package/types/wasm/csharp/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/csharp/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/go/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/go/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/java/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/java/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/nu/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/nu/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/php/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/php/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/python/windmill_parser_wasm.d.ts +8 -0
- package/types/wasm/python/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/regex/windmill_parser_wasm.d.ts +52 -0
- package/types/wasm/regex/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/rust/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/rust/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/ts/windmill_parser_wasm.d.ts +19 -0
- package/types/wasm/ts/windmill_parser_wasm.d.ts.map +1 -0
- package/types/wasm/yaml/windmill_parser_wasm.d.ts +7 -0
- package/types/wasm/yaml/windmill_parser_wasm.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/_base32_common.js +0 -183
- package/esm/deps/jsr.io/@std/encoding/1.0.7/base64.js +0 -163
- package/esm/deps/jsr.io/@std/encoding/1.0.7/base64url.js +0 -81
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +0 -109
- package/esm/wasm/windmill_parser_wasm.generated.js +0 -1135
- package/esm/wasm/windmill_parser_wasm_bg.wasm +0 -0
- package/types/deps/jsr.io/@std/encoding/1.0.7/_base32_common.d.ts +0 -18
- package/types/deps/jsr.io/@std/encoding/1.0.7/_base32_common.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.7/base32.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.7/base64.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.7/base64url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.7/mod.d.ts.map +0 -1
- package/types/wasm/windmill_parser_wasm.generated.d.ts +0 -146
- package/types/wasm/windmill_parser_wasm.generated.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_types.js +0 -0
- /package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_validate_binary_like.js +0 -0
- /package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/ascii85.js +0 -0
- /package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base58.js +0 -0
- /package/esm/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/varint.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_create_walk_entry.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_get_file_info_type.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_same_path.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_subdir.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_to_path_string.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/copy.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/empty_dir.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_dir.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_file.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_link.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_symlink.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/exists.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/expand_glob.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/mod.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/move.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/walk.js +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_types.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/_validate_binary_like.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/ascii85.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base58.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base64.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/base64url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/hex.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/encoding/{1.0.7 → 1.0.8}/varint.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_create_walk_entry.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_get_file_info_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_same_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_is_subdir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/_to_path_string.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/copy.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/empty_dir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_dir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_file.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_link.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/ensure_symlink.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/eol.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/exists.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/expand_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/move.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.14 → 1.0.15}/walk.d.ts +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
46
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
47
|
+
cachedTextDecoder.decode();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
function getStringFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} code
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function parse_csharp(code) {
|
|
59
|
+
let deferred2_0;
|
|
60
|
+
let deferred2_1;
|
|
61
|
+
try {
|
|
62
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.parse_csharp(ptr0, len0);
|
|
65
|
+
deferred2_0 = ret[0];
|
|
66
|
+
deferred2_1 = ret[1];
|
|
67
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const imports = {
|
|
74
|
+
__wbindgen_placeholder__: {
|
|
75
|
+
__wbindgen_init_externref_table: function () {
|
|
76
|
+
const table = wasm.__wbindgen_export_0;
|
|
77
|
+
const offset = table.grow(4);
|
|
78
|
+
table.set(0, undefined);
|
|
79
|
+
table.set(offset + 0, undefined);
|
|
80
|
+
table.set(offset + 1, null);
|
|
81
|
+
table.set(offset + 2, true);
|
|
82
|
+
table.set(offset + 3, false);
|
|
83
|
+
;
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
88
|
+
let wasmCode = '';
|
|
89
|
+
switch (wasm_url.protocol) {
|
|
90
|
+
case 'file:':
|
|
91
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
92
|
+
break;
|
|
93
|
+
case 'https:':
|
|
94
|
+
case 'http:':
|
|
95
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
99
|
+
}
|
|
100
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
101
|
+
const wasm = wasmInstance.exports;
|
|
102
|
+
export const __wasm = wasm;
|
|
103
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
46
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
47
|
+
cachedTextDecoder.decode();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
function getStringFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} code
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function parse_go(code) {
|
|
59
|
+
let deferred2_0;
|
|
60
|
+
let deferred2_1;
|
|
61
|
+
try {
|
|
62
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.parse_go(ptr0, len0);
|
|
65
|
+
deferred2_0 = ret[0];
|
|
66
|
+
deferred2_1 = ret[1];
|
|
67
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const imports = {
|
|
74
|
+
__wbindgen_placeholder__: {
|
|
75
|
+
__wbindgen_init_externref_table: function () {
|
|
76
|
+
const table = wasm.__wbindgen_export_0;
|
|
77
|
+
const offset = table.grow(4);
|
|
78
|
+
table.set(0, undefined);
|
|
79
|
+
table.set(offset + 0, undefined);
|
|
80
|
+
table.set(offset + 1, null);
|
|
81
|
+
table.set(offset + 2, true);
|
|
82
|
+
table.set(offset + 3, false);
|
|
83
|
+
;
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
88
|
+
let wasmCode = '';
|
|
89
|
+
switch (wasm_url.protocol) {
|
|
90
|
+
case 'file:':
|
|
91
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
92
|
+
break;
|
|
93
|
+
case 'https:':
|
|
94
|
+
case 'http:':
|
|
95
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
99
|
+
}
|
|
100
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
101
|
+
const wasm = wasmInstance.exports;
|
|
102
|
+
export const __wasm = wasm;
|
|
103
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
46
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
47
|
+
cachedTextDecoder.decode();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
function getStringFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} code
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function parse_java(code) {
|
|
59
|
+
let deferred2_0;
|
|
60
|
+
let deferred2_1;
|
|
61
|
+
try {
|
|
62
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.parse_java(ptr0, len0);
|
|
65
|
+
deferred2_0 = ret[0];
|
|
66
|
+
deferred2_1 = ret[1];
|
|
67
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const imports = {
|
|
74
|
+
__wbindgen_placeholder__: {
|
|
75
|
+
__wbindgen_init_externref_table: function () {
|
|
76
|
+
const table = wasm.__wbindgen_export_0;
|
|
77
|
+
const offset = table.grow(4);
|
|
78
|
+
table.set(0, undefined);
|
|
79
|
+
table.set(offset + 0, undefined);
|
|
80
|
+
table.set(offset + 1, null);
|
|
81
|
+
table.set(offset + 2, true);
|
|
82
|
+
table.set(offset + 3, false);
|
|
83
|
+
;
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
88
|
+
let wasmCode = '';
|
|
89
|
+
switch (wasm_url.protocol) {
|
|
90
|
+
case 'file:':
|
|
91
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
92
|
+
break;
|
|
93
|
+
case 'https:':
|
|
94
|
+
case 'http:':
|
|
95
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
99
|
+
}
|
|
100
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
101
|
+
const wasm = wasmInstance.exports;
|
|
102
|
+
export const __wasm = wasm;
|
|
103
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
46
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
47
|
+
cachedTextDecoder.decode();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
function getStringFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} code
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function parse_nu(code) {
|
|
59
|
+
let deferred2_0;
|
|
60
|
+
let deferred2_1;
|
|
61
|
+
try {
|
|
62
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.parse_nu(ptr0, len0);
|
|
65
|
+
deferred2_0 = ret[0];
|
|
66
|
+
deferred2_1 = ret[1];
|
|
67
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const imports = {
|
|
74
|
+
__wbindgen_placeholder__: {
|
|
75
|
+
__wbindgen_init_externref_table: function () {
|
|
76
|
+
const table = wasm.__wbindgen_export_0;
|
|
77
|
+
const offset = table.grow(4);
|
|
78
|
+
table.set(0, undefined);
|
|
79
|
+
table.set(offset + 0, undefined);
|
|
80
|
+
table.set(offset + 1, null);
|
|
81
|
+
table.set(offset + 2, true);
|
|
82
|
+
table.set(offset + 3, false);
|
|
83
|
+
;
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
88
|
+
let wasmCode = '';
|
|
89
|
+
switch (wasm_url.protocol) {
|
|
90
|
+
case 'file:':
|
|
91
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
92
|
+
break;
|
|
93
|
+
case 'https:':
|
|
94
|
+
case 'http:':
|
|
95
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
99
|
+
}
|
|
100
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
101
|
+
const wasm = wasmInstance.exports;
|
|
102
|
+
export const __wasm = wasm;
|
|
103
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
46
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
47
|
+
cachedTextDecoder.decode();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
function getStringFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} code
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function parse_php(code) {
|
|
59
|
+
let deferred2_0;
|
|
60
|
+
let deferred2_1;
|
|
61
|
+
try {
|
|
62
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.parse_php(ptr0, len0);
|
|
65
|
+
deferred2_0 = ret[0];
|
|
66
|
+
deferred2_1 = ret[1];
|
|
67
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const imports = {
|
|
74
|
+
__wbindgen_placeholder__: {
|
|
75
|
+
__wbindgen_init_externref_table: function () {
|
|
76
|
+
const table = wasm.__wbindgen_export_0;
|
|
77
|
+
const offset = table.grow(4);
|
|
78
|
+
table.set(0, undefined);
|
|
79
|
+
table.set(offset + 0, undefined);
|
|
80
|
+
table.set(offset + 1, null);
|
|
81
|
+
table.set(offset + 2, true);
|
|
82
|
+
table.set(offset + 3, false);
|
|
83
|
+
;
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
88
|
+
let wasmCode = '';
|
|
89
|
+
switch (wasm_url.protocol) {
|
|
90
|
+
case 'file:':
|
|
91
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
92
|
+
break;
|
|
93
|
+
case 'https:':
|
|
94
|
+
case 'http:':
|
|
95
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
99
|
+
}
|
|
100
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
101
|
+
const wasm = wasmInstance.exports;
|
|
102
|
+
export const __wasm = wasm;
|
|
103
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
+
let WASM_VECTOR_LEN = 0;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
|
|
11
|
+
const encodeString = function (arg, view) {
|
|
12
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
13
|
+
};
|
|
14
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
15
|
+
if (realloc === undefined) {
|
|
16
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
17
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
18
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
19
|
+
WASM_VECTOR_LEN = buf.length;
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
let len = arg.length;
|
|
23
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
24
|
+
const mem = getUint8ArrayMemory0();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
for (; offset < len; offset++) {
|
|
27
|
+
const code = arg.charCodeAt(offset);
|
|
28
|
+
if (code > 0x7F)
|
|
29
|
+
break;
|
|
30
|
+
mem[ptr + offset] = code;
|
|
31
|
+
}
|
|
32
|
+
if (offset !== len) {
|
|
33
|
+
if (offset !== 0) {
|
|
34
|
+
arg = arg.slice(offset);
|
|
35
|
+
}
|
|
36
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
37
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
38
|
+
const ret = encodeString(arg, view);
|
|
39
|
+
offset += ret.written;
|
|
40
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
WASM_VECTOR_LEN = offset;
|
|
43
|
+
return ptr;
|
|
44
|
+
}
|
|
45
|
+
function isLikeNone(x) {
|
|
46
|
+
return x === undefined || x === null;
|
|
47
|
+
}
|
|
48
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
|
|
49
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
50
|
+
cachedTextDecoder.decode();
|
|
51
|
+
}
|
|
52
|
+
;
|
|
53
|
+
function getStringFromWasm0(ptr, len) {
|
|
54
|
+
ptr = ptr >>> 0;
|
|
55
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} code
|
|
59
|
+
* @param {string | null} [main_override]
|
|
60
|
+
* @returns {string}
|
|
61
|
+
*/
|
|
62
|
+
export function parse_python(code, main_override) {
|
|
63
|
+
let deferred3_0;
|
|
64
|
+
let deferred3_1;
|
|
65
|
+
try {
|
|
66
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
67
|
+
const len0 = WASM_VECTOR_LEN;
|
|
68
|
+
var ptr1 = isLikeNone(main_override) ? 0 : passStringToWasm0(main_override, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
69
|
+
var len1 = WASM_VECTOR_LEN;
|
|
70
|
+
const ret = wasm.parse_python(ptr0, len0, ptr1, len1);
|
|
71
|
+
deferred3_0 = ret[0];
|
|
72
|
+
deferred3_1 = ret[1];
|
|
73
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const imports = {
|
|
80
|
+
__wbindgen_placeholder__: {
|
|
81
|
+
__wbindgen_init_externref_table: function () {
|
|
82
|
+
const table = wasm.__wbindgen_export_0;
|
|
83
|
+
const offset = table.grow(4);
|
|
84
|
+
table.set(0, undefined);
|
|
85
|
+
table.set(offset + 0, undefined);
|
|
86
|
+
table.set(offset + 1, null);
|
|
87
|
+
table.set(offset + 2, true);
|
|
88
|
+
table.set(offset + 3, false);
|
|
89
|
+
;
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
const wasm_url = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
94
|
+
let wasmCode = '';
|
|
95
|
+
switch (wasm_url.protocol) {
|
|
96
|
+
case 'file:':
|
|
97
|
+
wasmCode = await dntShim.Deno.readFile(wasm_url);
|
|
98
|
+
break;
|
|
99
|
+
case 'https:':
|
|
100
|
+
case 'http:':
|
|
101
|
+
wasmCode = await (await fetch(wasm_url)).arrayBuffer();
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
throw new Error(`Unsupported protocol: ${wasm_url.protocol}`);
|
|
105
|
+
}
|
|
106
|
+
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
|
|
107
|
+
const wasm = wasmInstance.exports;
|
|
108
|
+
export const __wasm = wasm;
|
|
109
|
+
wasm.__wbindgen_start();
|
|
Binary file
|