windmill-parser-wasm-regex 1.435.2 → 1.478.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/package.json +1 -1
- package/windmill_parser_wasm.d.ts +17 -50
- package/windmill_parser_wasm.js +134 -135
- package/windmill_parser_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,68 +1,35 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* @param {string} code
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
3
|
export function parse_bash(code: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* @param {string} code
|
|
10
|
-
* @returns {string}
|
|
11
|
-
*/
|
|
12
4
|
export function parse_powershell(code: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* @param {string} code
|
|
15
|
-
* @returns {string}
|
|
16
|
-
*/
|
|
17
5
|
export function parse_sql(code: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* @param {string} code
|
|
20
|
-
* @returns {string}
|
|
21
|
-
*/
|
|
22
6
|
export function parse_mysql(code: string): string;
|
|
23
|
-
|
|
24
|
-
* @param {string} code
|
|
25
|
-
* @returns {string}
|
|
26
|
-
*/
|
|
7
|
+
export function parse_oracledb(code: string): string;
|
|
27
8
|
export function parse_bigquery(code: string): string;
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} code
|
|
30
|
-
* @returns {string}
|
|
31
|
-
*/
|
|
32
9
|
export function parse_snowflake(code: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* @param {string} code
|
|
35
|
-
* @returns {string}
|
|
36
|
-
*/
|
|
37
10
|
export function parse_mssql(code: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* @param {string} code
|
|
40
|
-
* @returns {string | undefined}
|
|
41
|
-
*/
|
|
42
11
|
export function parse_db_resource(code: string): string | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* @param {string} code
|
|
45
|
-
* @returns {string}
|
|
46
|
-
*/
|
|
47
12
|
export function parse_graphql(code: string): string;
|
|
48
13
|
|
|
49
14
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
50
15
|
|
|
51
16
|
export interface InitOutput {
|
|
52
17
|
readonly memory: WebAssembly.Memory;
|
|
53
|
-
readonly parse_bash: (a: number, b: number
|
|
54
|
-
readonly parse_powershell: (a: number, b: number
|
|
55
|
-
readonly parse_sql: (a: number, b: number
|
|
56
|
-
readonly parse_mysql: (a: number, b: number
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
18
|
+
readonly parse_bash: (a: number, b: number) => [number, number];
|
|
19
|
+
readonly parse_powershell: (a: number, b: number) => [number, number];
|
|
20
|
+
readonly parse_sql: (a: number, b: number) => [number, number];
|
|
21
|
+
readonly parse_mysql: (a: number, b: number) => [number, number];
|
|
22
|
+
readonly parse_oracledb: (a: number, b: number) => [number, number];
|
|
23
|
+
readonly parse_bigquery: (a: number, b: number) => [number, number];
|
|
24
|
+
readonly parse_snowflake: (a: number, b: number) => [number, number];
|
|
25
|
+
readonly parse_mssql: (a: number, b: number) => [number, number];
|
|
26
|
+
readonly parse_db_resource: (a: number, b: number) => [number, number];
|
|
27
|
+
readonly parse_graphql: (a: number, b: number) => [number, number];
|
|
28
|
+
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
63
29
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
64
30
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
65
31
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
32
|
+
readonly __wbindgen_start: () => void;
|
|
66
33
|
}
|
|
67
34
|
|
|
68
35
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
@@ -70,18 +37,18 @@ export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
|
70
37
|
* Instantiates the given `module`, which can either be bytes or
|
|
71
38
|
* a precompiled `WebAssembly.Module`.
|
|
72
39
|
*
|
|
73
|
-
* @param {SyncInitInput} module
|
|
40
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
74
41
|
*
|
|
75
42
|
* @returns {InitOutput}
|
|
76
43
|
*/
|
|
77
|
-
export function initSync(module: SyncInitInput): InitOutput;
|
|
44
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
78
45
|
|
|
79
46
|
/**
|
|
80
47
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
81
48
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
82
49
|
*
|
|
83
|
-
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
50
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
84
51
|
*
|
|
85
52
|
* @returns {Promise<InitOutput>}
|
|
86
53
|
*/
|
|
87
|
-
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
54
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/windmill_parser_wasm.js
CHANGED
|
@@ -2,13 +2,13 @@ let wasm;
|
|
|
2
2
|
|
|
3
3
|
let WASM_VECTOR_LEN = 0;
|
|
4
4
|
|
|
5
|
-
let
|
|
5
|
+
let cachedUint8ArrayMemory0 = null;
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
|
|
7
|
+
function getUint8ArrayMemory0() {
|
|
8
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
9
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return cachedUint8ArrayMemory0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
@@ -31,7 +31,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
31
31
|
if (realloc === undefined) {
|
|
32
32
|
const buf = cachedTextEncoder.encode(arg);
|
|
33
33
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
34
|
-
|
|
34
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
35
35
|
WASM_VECTOR_LEN = buf.length;
|
|
36
36
|
return ptr;
|
|
37
37
|
}
|
|
@@ -39,7 +39,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
39
39
|
let len = arg.length;
|
|
40
40
|
let ptr = malloc(len, 1) >>> 0;
|
|
41
41
|
|
|
42
|
-
const mem =
|
|
42
|
+
const mem = getUint8ArrayMemory0();
|
|
43
43
|
|
|
44
44
|
let offset = 0;
|
|
45
45
|
|
|
@@ -54,7 +54,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
54
54
|
arg = arg.slice(offset);
|
|
55
55
|
}
|
|
56
56
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
57
|
-
const view =
|
|
57
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
58
58
|
const ret = encodeString(arg, view);
|
|
59
59
|
|
|
60
60
|
offset += ret.written;
|
|
@@ -65,226 +65,197 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
65
65
|
return ptr;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
let cachedInt32Memory0 = null;
|
|
69
|
-
|
|
70
|
-
function getInt32Memory0() {
|
|
71
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
72
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
73
|
-
}
|
|
74
|
-
return cachedInt32Memory0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
68
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
78
69
|
|
|
79
70
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
80
71
|
|
|
81
72
|
function getStringFromWasm0(ptr, len) {
|
|
82
73
|
ptr = ptr >>> 0;
|
|
83
|
-
return cachedTextDecoder.decode(
|
|
74
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
84
75
|
}
|
|
85
76
|
/**
|
|
86
|
-
* @param {string} code
|
|
87
|
-
* @returns {string}
|
|
88
|
-
*/
|
|
77
|
+
* @param {string} code
|
|
78
|
+
* @returns {string}
|
|
79
|
+
*/
|
|
89
80
|
export function parse_bash(code) {
|
|
90
81
|
let deferred2_0;
|
|
91
82
|
let deferred2_1;
|
|
92
83
|
try {
|
|
93
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
94
84
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
95
85
|
const len0 = WASM_VECTOR_LEN;
|
|
96
|
-
wasm.parse_bash(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
deferred2_1 = r1;
|
|
101
|
-
return getStringFromWasm0(r0, r1);
|
|
86
|
+
const ret = wasm.parse_bash(ptr0, len0);
|
|
87
|
+
deferred2_0 = ret[0];
|
|
88
|
+
deferred2_1 = ret[1];
|
|
89
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
102
90
|
} finally {
|
|
103
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
104
91
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
105
92
|
}
|
|
106
93
|
}
|
|
107
94
|
|
|
108
95
|
/**
|
|
109
|
-
* @param {string} code
|
|
110
|
-
* @returns {string}
|
|
111
|
-
*/
|
|
96
|
+
* @param {string} code
|
|
97
|
+
* @returns {string}
|
|
98
|
+
*/
|
|
112
99
|
export function parse_powershell(code) {
|
|
113
100
|
let deferred2_0;
|
|
114
101
|
let deferred2_1;
|
|
115
102
|
try {
|
|
116
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
117
103
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
118
104
|
const len0 = WASM_VECTOR_LEN;
|
|
119
|
-
wasm.parse_powershell(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
deferred2_1 = r1;
|
|
124
|
-
return getStringFromWasm0(r0, r1);
|
|
105
|
+
const ret = wasm.parse_powershell(ptr0, len0);
|
|
106
|
+
deferred2_0 = ret[0];
|
|
107
|
+
deferred2_1 = ret[1];
|
|
108
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
125
109
|
} finally {
|
|
126
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
127
110
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
128
111
|
}
|
|
129
112
|
}
|
|
130
113
|
|
|
131
114
|
/**
|
|
132
|
-
* @param {string} code
|
|
133
|
-
* @returns {string}
|
|
134
|
-
*/
|
|
115
|
+
* @param {string} code
|
|
116
|
+
* @returns {string}
|
|
117
|
+
*/
|
|
135
118
|
export function parse_sql(code) {
|
|
136
119
|
let deferred2_0;
|
|
137
120
|
let deferred2_1;
|
|
138
121
|
try {
|
|
139
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
140
122
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
141
123
|
const len0 = WASM_VECTOR_LEN;
|
|
142
|
-
wasm.parse_sql(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
deferred2_1 = r1;
|
|
147
|
-
return getStringFromWasm0(r0, r1);
|
|
124
|
+
const ret = wasm.parse_sql(ptr0, len0);
|
|
125
|
+
deferred2_0 = ret[0];
|
|
126
|
+
deferred2_1 = ret[1];
|
|
127
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
148
128
|
} finally {
|
|
149
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
150
129
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
151
130
|
}
|
|
152
131
|
}
|
|
153
132
|
|
|
154
133
|
/**
|
|
155
|
-
* @param {string} code
|
|
156
|
-
* @returns {string}
|
|
157
|
-
*/
|
|
134
|
+
* @param {string} code
|
|
135
|
+
* @returns {string}
|
|
136
|
+
*/
|
|
158
137
|
export function parse_mysql(code) {
|
|
159
138
|
let deferred2_0;
|
|
160
139
|
let deferred2_1;
|
|
161
140
|
try {
|
|
162
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
163
141
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
164
142
|
const len0 = WASM_VECTOR_LEN;
|
|
165
|
-
wasm.parse_mysql(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
deferred2_1 = r1;
|
|
170
|
-
return getStringFromWasm0(r0, r1);
|
|
143
|
+
const ret = wasm.parse_mysql(ptr0, len0);
|
|
144
|
+
deferred2_0 = ret[0];
|
|
145
|
+
deferred2_1 = ret[1];
|
|
146
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
171
147
|
} finally {
|
|
172
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
173
148
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
174
149
|
}
|
|
175
150
|
}
|
|
176
151
|
|
|
177
152
|
/**
|
|
178
|
-
* @param {string} code
|
|
179
|
-
* @returns {string}
|
|
180
|
-
*/
|
|
181
|
-
export function
|
|
153
|
+
* @param {string} code
|
|
154
|
+
* @returns {string}
|
|
155
|
+
*/
|
|
156
|
+
export function parse_oracledb(code) {
|
|
182
157
|
let deferred2_0;
|
|
183
158
|
let deferred2_1;
|
|
184
159
|
try {
|
|
185
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
186
160
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
187
161
|
const len0 = WASM_VECTOR_LEN;
|
|
188
|
-
wasm.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
deferred2_1 = r1;
|
|
193
|
-
return getStringFromWasm0(r0, r1);
|
|
162
|
+
const ret = wasm.parse_oracledb(ptr0, len0);
|
|
163
|
+
deferred2_0 = ret[0];
|
|
164
|
+
deferred2_1 = ret[1];
|
|
165
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
194
166
|
} finally {
|
|
195
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
196
167
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
197
168
|
}
|
|
198
169
|
}
|
|
199
170
|
|
|
200
171
|
/**
|
|
201
|
-
* @param {string} code
|
|
202
|
-
* @returns {string}
|
|
203
|
-
*/
|
|
204
|
-
export function
|
|
172
|
+
* @param {string} code
|
|
173
|
+
* @returns {string}
|
|
174
|
+
*/
|
|
175
|
+
export function parse_bigquery(code) {
|
|
205
176
|
let deferred2_0;
|
|
206
177
|
let deferred2_1;
|
|
207
178
|
try {
|
|
208
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
209
179
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
210
180
|
const len0 = WASM_VECTOR_LEN;
|
|
211
|
-
wasm.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
deferred2_1 = r1;
|
|
216
|
-
return getStringFromWasm0(r0, r1);
|
|
181
|
+
const ret = wasm.parse_bigquery(ptr0, len0);
|
|
182
|
+
deferred2_0 = ret[0];
|
|
183
|
+
deferred2_1 = ret[1];
|
|
184
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
217
185
|
} finally {
|
|
218
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
219
186
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
220
187
|
}
|
|
221
188
|
}
|
|
222
189
|
|
|
223
190
|
/**
|
|
224
|
-
* @param {string} code
|
|
225
|
-
* @returns {string}
|
|
226
|
-
*/
|
|
227
|
-
export function
|
|
191
|
+
* @param {string} code
|
|
192
|
+
* @returns {string}
|
|
193
|
+
*/
|
|
194
|
+
export function parse_snowflake(code) {
|
|
228
195
|
let deferred2_0;
|
|
229
196
|
let deferred2_1;
|
|
230
197
|
try {
|
|
231
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
232
198
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
233
199
|
const len0 = WASM_VECTOR_LEN;
|
|
234
|
-
wasm.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
deferred2_1 = r1;
|
|
239
|
-
return getStringFromWasm0(r0, r1);
|
|
200
|
+
const ret = wasm.parse_snowflake(ptr0, len0);
|
|
201
|
+
deferred2_0 = ret[0];
|
|
202
|
+
deferred2_1 = ret[1];
|
|
203
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
240
204
|
} finally {
|
|
241
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
242
205
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
243
206
|
}
|
|
244
207
|
}
|
|
245
208
|
|
|
246
209
|
/**
|
|
247
|
-
* @param {string} code
|
|
248
|
-
* @returns {string
|
|
249
|
-
*/
|
|
250
|
-
export function
|
|
210
|
+
* @param {string} code
|
|
211
|
+
* @returns {string}
|
|
212
|
+
*/
|
|
213
|
+
export function parse_mssql(code) {
|
|
214
|
+
let deferred2_0;
|
|
215
|
+
let deferred2_1;
|
|
251
216
|
try {
|
|
252
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
253
217
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
254
218
|
const len0 = WASM_VECTOR_LEN;
|
|
255
|
-
wasm.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (r0 !== 0) {
|
|
260
|
-
v2 = getStringFromWasm0(r0, r1).slice();
|
|
261
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
262
|
-
}
|
|
263
|
-
return v2;
|
|
219
|
+
const ret = wasm.parse_mssql(ptr0, len0);
|
|
220
|
+
deferred2_0 = ret[0];
|
|
221
|
+
deferred2_1 = ret[1];
|
|
222
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
264
223
|
} finally {
|
|
265
|
-
wasm.
|
|
224
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
266
225
|
}
|
|
267
226
|
}
|
|
268
227
|
|
|
269
228
|
/**
|
|
270
|
-
* @param {string} code
|
|
271
|
-
* @returns {string}
|
|
272
|
-
*/
|
|
229
|
+
* @param {string} code
|
|
230
|
+
* @returns {string | undefined}
|
|
231
|
+
*/
|
|
232
|
+
export function parse_db_resource(code) {
|
|
233
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
+
const len0 = WASM_VECTOR_LEN;
|
|
235
|
+
const ret = wasm.parse_db_resource(ptr0, len0);
|
|
236
|
+
let v2;
|
|
237
|
+
if (ret[0] !== 0) {
|
|
238
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
239
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
240
|
+
}
|
|
241
|
+
return v2;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @param {string} code
|
|
246
|
+
* @returns {string}
|
|
247
|
+
*/
|
|
273
248
|
export function parse_graphql(code) {
|
|
274
249
|
let deferred2_0;
|
|
275
250
|
let deferred2_1;
|
|
276
251
|
try {
|
|
277
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
278
252
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
279
253
|
const len0 = WASM_VECTOR_LEN;
|
|
280
|
-
wasm.parse_graphql(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
deferred2_1 = r1;
|
|
285
|
-
return getStringFromWasm0(r0, r1);
|
|
254
|
+
const ret = wasm.parse_graphql(ptr0, len0);
|
|
255
|
+
deferred2_0 = ret[0];
|
|
256
|
+
deferred2_1 = ret[1];
|
|
257
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
286
258
|
} finally {
|
|
287
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
288
259
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
289
260
|
}
|
|
290
261
|
}
|
|
@@ -297,7 +268,7 @@ async function __wbg_load(module, imports) {
|
|
|
297
268
|
|
|
298
269
|
} catch (e) {
|
|
299
270
|
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
300
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve
|
|
271
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
301
272
|
|
|
302
273
|
} else {
|
|
303
274
|
throw e;
|
|
@@ -323,27 +294,46 @@ async function __wbg_load(module, imports) {
|
|
|
323
294
|
function __wbg_get_imports() {
|
|
324
295
|
const imports = {};
|
|
325
296
|
imports.wbg = {};
|
|
297
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
298
|
+
const table = wasm.__wbindgen_export_0;
|
|
299
|
+
const offset = table.grow(4);
|
|
300
|
+
table.set(0, undefined);
|
|
301
|
+
table.set(offset + 0, undefined);
|
|
302
|
+
table.set(offset + 1, null);
|
|
303
|
+
table.set(offset + 2, true);
|
|
304
|
+
table.set(offset + 3, false);
|
|
305
|
+
;
|
|
306
|
+
};
|
|
326
307
|
|
|
327
308
|
return imports;
|
|
328
309
|
}
|
|
329
310
|
|
|
330
|
-
function __wbg_init_memory(imports,
|
|
311
|
+
function __wbg_init_memory(imports, memory) {
|
|
331
312
|
|
|
332
313
|
}
|
|
333
314
|
|
|
334
315
|
function __wbg_finalize_init(instance, module) {
|
|
335
316
|
wasm = instance.exports;
|
|
336
317
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
337
|
-
|
|
338
|
-
cachedUint8Memory0 = null;
|
|
318
|
+
cachedUint8ArrayMemory0 = null;
|
|
339
319
|
|
|
340
320
|
|
|
321
|
+
wasm.__wbindgen_start();
|
|
341
322
|
return wasm;
|
|
342
323
|
}
|
|
343
324
|
|
|
344
325
|
function initSync(module) {
|
|
345
326
|
if (wasm !== undefined) return wasm;
|
|
346
327
|
|
|
328
|
+
|
|
329
|
+
if (typeof module !== 'undefined') {
|
|
330
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
331
|
+
({module} = module)
|
|
332
|
+
} else {
|
|
333
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
347
337
|
const imports = __wbg_get_imports();
|
|
348
338
|
|
|
349
339
|
__wbg_init_memory(imports);
|
|
@@ -357,24 +347,33 @@ function initSync(module) {
|
|
|
357
347
|
return __wbg_finalize_init(instance, module);
|
|
358
348
|
}
|
|
359
349
|
|
|
360
|
-
async function __wbg_init(
|
|
350
|
+
async function __wbg_init(module_or_path) {
|
|
361
351
|
if (wasm !== undefined) return wasm;
|
|
362
352
|
|
|
363
|
-
|
|
364
|
-
|
|
353
|
+
|
|
354
|
+
if (typeof module_or_path !== 'undefined') {
|
|
355
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
356
|
+
({module_or_path} = module_or_path)
|
|
357
|
+
} else {
|
|
358
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (typeof module_or_path === 'undefined') {
|
|
363
|
+
module_or_path = new URL('windmill_parser_wasm_bg.wasm', import.meta.url);
|
|
365
364
|
}
|
|
366
365
|
const imports = __wbg_get_imports();
|
|
367
366
|
|
|
368
|
-
if (typeof
|
|
369
|
-
|
|
367
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
368
|
+
module_or_path = fetch(module_or_path);
|
|
370
369
|
}
|
|
371
370
|
|
|
372
371
|
__wbg_init_memory(imports);
|
|
373
372
|
|
|
374
|
-
const { instance, module } = await __wbg_load(await
|
|
373
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
375
374
|
|
|
376
375
|
return __wbg_finalize_init(instance, module);
|
|
377
376
|
}
|
|
378
377
|
|
|
379
|
-
export { initSync }
|
|
378
|
+
export { initSync };
|
|
380
379
|
export default __wbg_init;
|
|
Binary file
|