windmill-parser-wasm-regex 1.646.0 → 1.670.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/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"collaborators": [
|
|
5
5
|
"Ruben Fiszel <ruben@windmill.dev>"
|
|
6
6
|
],
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.670.0",
|
|
8
8
|
"files": [
|
|
9
9
|
"windmill_parser_wasm_bg.wasm",
|
|
10
10
|
"windmill_parser_wasm.js",
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"sideEffects": [
|
|
16
16
|
"./snippets/*"
|
|
17
17
|
]
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -11,13 +11,11 @@ export function parse_snowflake(code: string): string;
|
|
|
11
11
|
export function parse_mssql(code: string): string;
|
|
12
12
|
export function parse_db_resource(code: string): string | undefined;
|
|
13
13
|
export function parse_graphql(code: string): string;
|
|
14
|
-
export function parse_assets_sql(code: string): string;
|
|
15
14
|
|
|
16
15
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
17
16
|
|
|
18
17
|
export interface InitOutput {
|
|
19
18
|
readonly memory: WebAssembly.Memory;
|
|
20
|
-
readonly parse_assets_sql: (a: number, b: number) => [number, number];
|
|
21
19
|
readonly parse_bash: (a: number, b: number) => [number, number];
|
|
22
20
|
readonly parse_bigquery: (a: number, b: number) => [number, number];
|
|
23
21
|
readonly parse_db_resource: (a: number, b: number) => [number, number];
|
package/windmill_parser_wasm.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
+
let WASM_VECTOR_LEN = 0;
|
|
4
|
+
|
|
3
5
|
let cachedUint8ArrayMemory0 = null;
|
|
4
6
|
|
|
5
7
|
function getUint8ArrayMemory0() {
|
|
@@ -9,29 +11,6 @@ function getUint8ArrayMemory0() {
|
|
|
9
11
|
return cachedUint8ArrayMemory0;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
13
|
-
|
|
14
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
15
|
-
|
|
16
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
-
let numBytesDecoded = 0;
|
|
18
|
-
function decodeText(ptr, len) {
|
|
19
|
-
numBytesDecoded += len;
|
|
20
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
-
cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
22
|
-
cachedTextDecoder.decode();
|
|
23
|
-
numBytesDecoded = len;
|
|
24
|
-
}
|
|
25
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function getStringFromWasm0(ptr, len) {
|
|
29
|
-
ptr = ptr >>> 0;
|
|
30
|
-
return decodeText(ptr, len);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
let WASM_VECTOR_LEN = 0;
|
|
34
|
-
|
|
35
14
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
36
15
|
|
|
37
16
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -85,6 +64,27 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
85
64
|
WASM_VECTOR_LEN = offset;
|
|
86
65
|
return ptr;
|
|
87
66
|
}
|
|
67
|
+
|
|
68
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
69
|
+
|
|
70
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
71
|
+
|
|
72
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
73
|
+
let numBytesDecoded = 0;
|
|
74
|
+
function decodeText(ptr, len) {
|
|
75
|
+
numBytesDecoded += len;
|
|
76
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
77
|
+
cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
78
|
+
cachedTextDecoder.decode();
|
|
79
|
+
numBytesDecoded = len;
|
|
80
|
+
}
|
|
81
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function getStringFromWasm0(ptr, len) {
|
|
85
|
+
ptr = ptr >>> 0;
|
|
86
|
+
return decodeText(ptr, len);
|
|
87
|
+
}
|
|
88
88
|
/**
|
|
89
89
|
* @param {string} code
|
|
90
90
|
* @returns {string}
|
|
@@ -291,25 +291,6 @@ export function parse_graphql(code) {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
/**
|
|
295
|
-
* @param {string} code
|
|
296
|
-
* @returns {string}
|
|
297
|
-
*/
|
|
298
|
-
export function parse_assets_sql(code) {
|
|
299
|
-
let deferred2_0;
|
|
300
|
-
let deferred2_1;
|
|
301
|
-
try {
|
|
302
|
-
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
-
const len0 = WASM_VECTOR_LEN;
|
|
304
|
-
const ret = wasm.parse_assets_sql(ptr0, len0);
|
|
305
|
-
deferred2_0 = ret[0];
|
|
306
|
-
deferred2_1 = ret[1];
|
|
307
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
308
|
-
} finally {
|
|
309
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
294
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
314
295
|
|
|
315
296
|
async function __wbg_load(module, imports) {
|
|
@@ -348,9 +329,6 @@ async function __wbg_load(module, imports) {
|
|
|
348
329
|
function __wbg_get_imports() {
|
|
349
330
|
const imports = {};
|
|
350
331
|
imports.wbg = {};
|
|
351
|
-
imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
|
|
352
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
353
|
-
};
|
|
354
332
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
355
333
|
const table = wasm.__wbindgen_export_0;
|
|
356
334
|
const offset = table.grow(4);
|
|
Binary file
|