windmill-parser-wasm-ts 1.657.2 → 1.659.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
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function parse_deno(code: string, main_override?: string | null): string;
|
|
4
4
|
export function parse_outputs(code: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Parse TypeScript imports and return raw import strings.
|
|
7
|
+
* See [`parse_ts_relative_imports`] for resolved absolute paths.
|
|
8
|
+
*/
|
|
5
9
|
export function parse_ts_imports(code: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Parse TypeScript imports and return relative imports resolved to absolute Windmill paths.
|
|
12
|
+
* Throws JS error on parse failure.
|
|
13
|
+
* See [`parse_ts_imports`] for raw import strings.
|
|
14
|
+
*/
|
|
15
|
+
export function parse_ts_relative_imports(code: string, path: string): string[];
|
|
6
16
|
|
|
7
17
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
8
18
|
|
|
@@ -11,12 +21,15 @@ export interface InitOutput {
|
|
|
11
21
|
readonly parse_deno: (a: number, b: number, c: number, d: number) => [number, number];
|
|
12
22
|
readonly parse_outputs: (a: number, b: number) => [number, number];
|
|
13
23
|
readonly parse_ts_imports: (a: number, b: number) => [number, number];
|
|
24
|
+
readonly parse_ts_relative_imports: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
14
25
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
15
26
|
readonly __externref_table_alloc: () => number;
|
|
16
27
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
17
28
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
18
29
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
19
30
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
31
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
32
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
20
33
|
readonly __wbindgen_start: () => void;
|
|
21
34
|
}
|
|
22
35
|
|
package/windmill_parser_wasm.js
CHANGED
|
@@ -225,6 +225,8 @@ export function parse_outputs(code) {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
+
* Parse TypeScript imports and return raw import strings.
|
|
229
|
+
* See [`parse_ts_relative_imports`] for resolved absolute paths.
|
|
228
230
|
* @param {string} code
|
|
229
231
|
* @returns {string}
|
|
230
232
|
*/
|
|
@@ -243,6 +245,44 @@ export function parse_ts_imports(code) {
|
|
|
243
245
|
}
|
|
244
246
|
}
|
|
245
247
|
|
|
248
|
+
function takeFromExternrefTable0(idx) {
|
|
249
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
250
|
+
wasm.__externref_table_dealloc(idx);
|
|
251
|
+
return value;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
255
|
+
ptr = ptr >>> 0;
|
|
256
|
+
const mem = getDataViewMemory0();
|
|
257
|
+
const result = [];
|
|
258
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
259
|
+
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
260
|
+
}
|
|
261
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
262
|
+
return result;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Parse TypeScript imports and return relative imports resolved to absolute Windmill paths.
|
|
266
|
+
* Throws JS error on parse failure.
|
|
267
|
+
* See [`parse_ts_imports`] for raw import strings.
|
|
268
|
+
* @param {string} code
|
|
269
|
+
* @param {string} path
|
|
270
|
+
* @returns {string[]}
|
|
271
|
+
*/
|
|
272
|
+
export function parse_ts_relative_imports(code, path) {
|
|
273
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
+
const len1 = WASM_VECTOR_LEN;
|
|
277
|
+
const ret = wasm.parse_ts_relative_imports(ptr0, len0, ptr1, len1);
|
|
278
|
+
if (ret[3]) {
|
|
279
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
280
|
+
}
|
|
281
|
+
var v3 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
282
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
283
|
+
return v3;
|
|
284
|
+
}
|
|
285
|
+
|
|
246
286
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
247
287
|
|
|
248
288
|
async function __wbg_load(module, imports) {
|
|
@@ -297,7 +337,7 @@ function __wbg_get_imports() {
|
|
|
297
337
|
const ret = Object.entries(arg0);
|
|
298
338
|
return ret;
|
|
299
339
|
};
|
|
300
|
-
imports.wbg.
|
|
340
|
+
imports.wbg.__wbg_eval_bbb57f69b589b1ca = function(arg0, arg1) {
|
|
301
341
|
const ret = eval(getStringFromWasm0(arg0, arg1));
|
|
302
342
|
return ret;
|
|
303
343
|
};
|
|
@@ -438,6 +478,11 @@ function __wbg_get_imports() {
|
|
|
438
478
|
imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
|
|
439
479
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
440
480
|
};
|
|
481
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
482
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
483
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
484
|
+
return ret;
|
|
485
|
+
};
|
|
441
486
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
442
487
|
// Cast intrinsic for `U64 -> Externref`.
|
|
443
488
|
const ret = BigInt.asUintN(64, arg0);
|
|
Binary file
|