diff --git a/backend/parsers/windmill-parser-py/src/lib.rs b/backend/parsers/windmill-parser-py/src/lib.rs index 4c523df0b2..72124e5b21 100644 --- a/backend/parsers/windmill-parser-py/src/lib.rs +++ b/backend/parsers/windmill-parser-py/src/lib.rs @@ -122,6 +122,11 @@ pub fn parse_python_signature(code: &str) -> anyhow::Result { fn parse_expr(e: &Box) -> Typ { match e.as_ref() { Expr::Name(ExprName { id, .. }) => parse_typ(id.as_ref()), + Expr::Attribute(x) => if x.value.as_name_expr().is_some_and(|x| x.id.as_str() == "wmill") { + parse_typ(x.attr.as_str()) + } else { + Typ::Unknown + }, Expr::Subscript(x) => match x.value.as_ref() { Expr::Name(ExprName { id, .. }) => match id.as_str() { "Literal" => { @@ -365,6 +370,7 @@ def main(test1: str, import os def main(test1: str, + s3o: wmill.S3Object, name = \"test\", byte: bytes = bytes(1)): return @@ -383,6 +389,13 @@ def main(test1: str, default: None, has_default: false }, + Arg { + otyp: None, + name: "s3o".to_string(), + typ: Typ::Resource("S3Object".to_string()), + default: None, + has_default: false + }, Arg { otyp: None, name: "name".to_string(), diff --git a/backend/parsers/windmill-parser-wasm/pkg/package.json b/backend/parsers/windmill-parser-wasm/pkg/package.json index ee2f1cd2f7..b06163c41e 100644 --- a/backend/parsers/windmill-parser-wasm/pkg/package.json +++ b/backend/parsers/windmill-parser-wasm/pkg/package.json @@ -3,7 +3,7 @@ "collaborators": [ "Ruben Fiszel " ], - "version": "1.274.0", + "version": "1.276.0", "files": [ "windmill_parser_wasm_bg.wasm", "windmill_parser_wasm.js", diff --git a/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm.js b/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm.js index 961c8adfcb..244f41dc14 100644 --- a/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm.js +++ b/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm.js @@ -97,15 +97,6 @@ function getInt32Memory0() { return cachedInt32Memory0; } -const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} - function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); const idx = heap_next; @@ -115,6 +106,15 @@ function addHeapObject(obj) { return idx; } +const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + let cachedFloat64Memory0 = null; function getFloat64Memory0() { @@ -549,10 +549,6 @@ function __wbg_get_imports() { getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbindgen_error_new = function(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); - }; imports.wbg.__wbindgen_boolean_get = function(arg0) { const v = getObject(arg0); const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; @@ -574,6 +570,10 @@ function __wbg_get_imports() { const ret = BigInt.asUintN(64, arg0); return addHeapObject(ret); }; + imports.wbg.__wbindgen_error_new = function(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; imports.wbg.__wbindgen_number_get = function(arg0, arg1) { const obj = getObject(arg1); const ret = typeof(obj) === 'number' ? obj : undefined; @@ -589,7 +589,7 @@ function __wbg_get_imports() { const ret = getObject(arg0) in getObject(arg1); return ret; }; - imports.wbg.__wbg_eval_69b0e521a846e4c2 = function(arg0, arg1) { + imports.wbg.__wbg_eval_64ad5673bb06b186 = function(arg0, arg1) { const ret = eval(getStringFromWasm0(arg0, arg1)); return addHeapObject(ret); }; diff --git a/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm_bg.wasm b/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm_bg.wasm index e1fa4518bd..888a023151 100644 Binary files a/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm_bg.wasm and b/backend/parsers/windmill-parser-wasm/pkg/windmill_parser_wasm_bg.wasm differ diff --git a/frontend/package.json b/frontend/package.json index 99050342bd..dd32cb515a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -133,7 +133,7 @@ "vscode-languageclient": "~9.0.1", "vscode-uri": "~3.0.8", "vscode-ws-jsonrpc": "~3.1.0", - "windmill-parser-wasm": "^1.274.0", + "windmill-parser-wasm": "^1.276.0", "y-monaco": "^0.1.4", "y-websocket": "^1.5.0", "yaml": "^2.3.4",