diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 130987e61e95e..9599dbcf19bd4 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1138,6 +1138,8 @@ dependencies = [ "cexpr", "clang-sys", "itertools 0.13.0", + "log", + "prettyplease 0.2.25", "proc-macro2", "quote", "regex", @@ -1254,6 +1256,50 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bollard" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ccca1260af6a459d75994ad5acc1651bcabcbdbc41467cc9786519ab854c30" +dependencies = [ + "base64 0.22.1", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "http 1.2.0", + "http-body-util", + "hyper 1.5.1", + "hyper-named-pipe", + "hyper-util", + "hyperlocal", + "log", + "pin-project-lite", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror 2.0.4", + "tokio", + "tokio-util", + "tower-service", + "url", + "winapi", +] + +[[package]] +name = "bollard-stubs" +version = "1.47.1-rc.27.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f179cfbddb6e77a5472703d4b30436bff32929c0aa8a9008ecf23d1d3cdd0da" +dependencies = [ + "serde", + "serde_repr", + "serde_with", +] + [[package]] name = "borsh" version = "1.5.3" @@ -2440,9 +2486,9 @@ dependencies = [ [[package]] name = "deno_ast" -version = "0.42.2" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b9d03b1bbeeecdac54367f075d572131736d06c5be3bc49037855bc5ab1bbb" +checksum = "48d00b724e06d2081a141ec1155756a0b465d413d8e2a7515221f61d482eb2ee" dependencies = [ "base64 0.21.7", "deno_media_type", @@ -2481,18 +2527,18 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.171.0" +version = "0.179.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144108c8bb93b1df2cda4583d9beb8cd4e18798d3e030af8b07d2c55c1e3259b" +checksum = "2e09f2bbb2d842329b602da25dbab5cd4a342f9a8adcb7c02509fc322f796e79" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.311.0" +version = "0.321.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e09bd55da542fa1fde753aff617c355b5d782e763ab2a19e4371a56d7844cac" +checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7" dependencies = [ "anyhow", "bincode", @@ -2504,6 +2550,7 @@ dependencies = [ "deno_ops", "deno_unsync", "futures", + "indexmap 2.7.0", "libc", "memoffset", "parking_lot", @@ -2518,19 +2565,20 @@ dependencies = [ "tokio", "url", "v8", + "wasm_dep_analyzer", ] [[package]] name = "deno_core_icudata" -version = "0.0.73" +version = "0.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13951ea98c0a4c372f162d669193b4c9d991512de9f2381dd161027f34b26b1" +checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_fetch" -version = "0.195.0" +version = "0.203.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a91340a1d60cebe1392e4b6e1614709ab5fdcfc1f55842561e498d7ef9b2cb9" +checksum = "a18e66bd3bf786e24a8b8bdc97049fa82957b095a5fd1e142545c5a7cdd2272a" dependencies = [ "base64 0.21.7", "bytes", @@ -2540,6 +2588,7 @@ dependencies = [ "deno_tls", "dyn-clone", "error_reporter", + "hickory-resolver", "http 1.2.0", "http-body-util", "hyper 1.5.1", @@ -2550,6 +2599,7 @@ dependencies = [ "rustls-webpki 0.102.8", "serde", "serde_json", + "thiserror 1.0.69", "tokio", "tokio-rustls 0.26.0", "tokio-socks", @@ -2561,9 +2611,9 @@ dependencies = [ [[package]] name = "deno_media_type" -version = "0.1.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8978229b82552bf8457a0125aa20863f023619cfc21ebb007b1e571d68fd85b" +checksum = "eaa135b8a9febc9a51c16258e294e268a1276750780d69e46edb31cced2826e4" dependencies = [ "data-url", "serde", @@ -2585,31 +2635,33 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.163.0" +version = "0.171.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b769fd37232a38bf15a3834c9da8cc99409b52d0cf4a936f3117744369f8063" +checksum = "f7b3a51f7b4d5d64d17a7bc6f7495498f20d809930979d21a059d75e850cdea6" dependencies = [ "deno_core", "deno_permissions", "deno_tls", + "hickory-proto", + "hickory-resolver", "pin-project", "rustls-tokio-stream", "serde", "socket2", + "thiserror 1.0.69", "tokio", - "trust-dns-proto", - "trust-dns-resolver", ] [[package]] name = "deno_ops" -version = "0.187.0" +version = "0.197.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e040fd4def8a67538fe38c9955fd970efc9f44284bd69d44f8992a456afd665d" +checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e" dependencies = [ "proc-macro-rules", "proc-macro2", "quote", + "stringcase", "strum 0.25.0", "strum_macros 0.25.3", "syn 2.0.90", @@ -2618,9 +2670,9 @@ dependencies = [ [[package]] name = "deno_path_util" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4889646c1ce8437a6fde3acb057fd7e2d039e62c61f5063fc125ed1ede114dc6" +checksum = "ff25f6e08e7a0214bbacdd6f7195c7f1ebcd850c87a624e4ff06326b68b42d99" dependencies = [ "percent-encoding", "thiserror 1.0.69", @@ -2629,9 +2681,9 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.31.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1328c2d1d26cd066ba9d7d5fb3451081219e373342423f78d7a1b73bfac9849" +checksum = "14e822f98185ab3ddf06104b2407681e0008af52361af32f1cd171b7eda5aa59" dependencies = [ "deno_core", "deno_path_util", @@ -2642,6 +2694,7 @@ dependencies = [ "once_cell", "percent-encoding", "serde", + "thiserror 1.0.69", "which 4.4.2", "winapi", ] @@ -2668,9 +2721,9 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.158.0" +version = "0.166.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a1abc6bd8af41aa2496ceceef94f4277092c781a9495c437327a17659553a2" +checksum = "688175eed35e7b3053ec114227894ef24786855405d8844058a48bffa997d85a" dependencies = [ "deno_core", "deno_native_certs", @@ -2679,6 +2732,7 @@ dependencies = [ "rustls-tokio-stream", "rustls-webpki 0.102.8", "serde", + "thiserror 1.0.69", "tokio", "webpki-roots 0.26.7", ] @@ -2696,19 +2750,20 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.171.0" +version = "0.179.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68eb6834d66ff13c19633b0e1b621292461b744858130b0a1c51f34a57ba1a03" +checksum = "ad9a108794e505f2b07665e19ff336c1bcba6adcf7182c90c1d3a6c741d7fcd0" dependencies = [ "deno_core", + "thiserror 1.0.69", "urlpattern", ] [[package]] name = "deno_web" -version = "0.202.0" +version = "0.210.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0862246372f5b559b788aa07ca1b9385909d59630251156a54c4d2c5342d1eb" +checksum = "7679087bcc41f7ae3385f8c12d43bc81cfc54cb9b1ef73983d20f5e39fa4e0da" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2719,15 +2774,16 @@ dependencies = [ "flate2", "futures", "serde", + "thiserror 1.0.69", "tokio", "uuid 1.11.0", ] [[package]] name = "deno_webidl" -version = "0.171.0" +version = "0.179.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e969b61b740479379eaf303a6900d11f162f9de610640398f89f0aa58abb7c4" +checksum = "5b55d845e3d64f8de7eff67aaa4b6fe1b23bbc2efe967c984f8c64c8dd85fad4" dependencies = [ "deno_core", ] @@ -3941,6 +3997,53 @@ dependencies = [ "ureq", ] +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "serde", + "thiserror 1.0.69", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "serde", + "smallvec", + "thiserror 1.0.69", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -4139,6 +4242,21 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.5.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -4235,6 +4353,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "hyperlocal" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.5.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -5122,13 +5255,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7685,6 +7818,17 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "serde_spanned" version = "0.6.8" @@ -7720,9 +7864,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.220.0" +version = "0.230.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7a65d91d79acc82aa229aeb084f4a39bda269069bc1520df40f679495388e4" +checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f" dependencies = [ "num-bigint", "serde", @@ -8369,6 +8513,12 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "stringcase" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04028eeb851ed08af6aba5caa29f2d59a13ed168cee4d6bd753aeefcf1d636b0" + [[package]] name = "stringprep" version = "0.1.5" @@ -9358,29 +9508,28 @@ dependencies = [ [[package]] name = "tokio" -version = "1.36.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -9879,54 +10028,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "trust-dns-proto" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand 0.8.5", - "serde", - "smallvec", - "thiserror 1.0.69", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lru-cache", - "once_cell", - "parking_lot", - "rand 0.8.5", - "resolv-conf", - "serde", - "smallvec", - "thiserror 1.0.69", - "tokio", - "tracing", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -10319,11 +10420,11 @@ dependencies = [ [[package]] name = "v8" -version = "0.106.0" +version = "130.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a381badc47c6f15acb5fe0b5b40234162349ed9d4e4fd7c83a7f5547c0fc69c5" +checksum = "2ee0be58935708fa4d7efb970c6cf9f2d9511d24ee24246481a65b6ee167348d" dependencies = [ - "bindgen 0.69.5", + "bindgen 0.70.1", "bitflags 2.6.0", "fslock", "gzip-header", @@ -10505,6 +10606,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm_dep_analyzer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f270206a91783fd90625c8bb0d8fbd459d0b1d1bf209b656f713f01ae7c04b8" +dependencies = [ + "thiserror 1.0.69", +] + [[package]] name = "wav" version = "1.0.1" @@ -11117,6 +11227,7 @@ dependencies = [ "backon", "base64 0.22.1", "bit-vec", + "bollard", "bytes", "chrono", "const_format", @@ -11126,6 +11237,7 @@ dependencies = [ "deno_core", "deno_fetch", "deno_net", + "deno_permissions", "deno_tls", "deno_url", "deno_web", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index ec6ee6048b87e..88b82d896b7e6 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -64,6 +64,7 @@ sqlx = ["windmill-worker/sqlx"] deno_core = ["windmill-worker/deno_core", "dep:deno_core"] kafka = ["windmill-api/kafka"] otel = ["windmill-common/otel", "windmill-worker/otel"] +dind = ["windmill-worker/dind"] [dependencies] anyhow.workspace = true @@ -137,7 +138,7 @@ windmill-api-client = { path = "./windmill-api-client" } axum = { version = "^0.7", features = ["multipart"] } headers = "^0" hyper = { version = "^1", features = ["full"] } -tokio = { version = "^1", features = ["full", "tracing"] } +tokio = { version = "^1.42.0", features = ["full", "tracing"] } tower = "^0" tower-http = { version = "^0.6", features = ["trace", "cors"] } tower-cookies = "^0.10" @@ -182,15 +183,16 @@ itertools = "^0" regex = "^1" semver = "^1" -deno_fetch = "0.195.0" -deno_tls = "0.158.0" -deno_console = "0.171.0" -deno_url = "0.171.0" -deno_webidl = "0.171.0" -deno_web = "0.202.0" -deno_net = "0.163.0" -deno_core = "0.311.0" -deno_ast = { version = "=0.42.2", features = ["transpiling"] } +deno_fetch = "0.203.0" +deno_tls = "0.166.0" +deno_console = "0.179.0" +deno_url = "0.179.0" +deno_webidl = "0.179.0" +deno_web = "0.210.0" +deno_net = "0.171.0" +deno_core = "0.321.0" +deno_ast = { version = "=0.43.3", features = ["transpiling"] } +deno_permissions = "0.39.0" swc_common = "=0.37.5" swc_ecma_parser = "=0.149.1" @@ -286,6 +288,8 @@ opentelemetry-otlp = { version = "0.27.0", features = ["grpc-tonic", "tls"] } opentelemetry-appender-tracing = "0.27.0" opentelemetry-semantic-conventions = { version = "*", features = ["semconv_experimental"] } +bollard = "0.18.1" + tonic = { version = "^0", features = ["tls-native-roots"] } tikv-jemallocator = { version = "0.5" } diff --git a/backend/windmill-worker/Cargo.toml b/backend/windmill-worker/Cargo.toml index 22640e577a9a6..f4df376e6dfa9 100644 --- a/backend/windmill-worker/Cargo.toml +++ b/backend/windmill-worker/Cargo.toml @@ -18,8 +18,10 @@ parquet = ["windmill-common/parquet", "dep:object_store"] flow_testing = [] cloud = [] sqlx = [] -deno_core = ["dep:deno_fetch", "dep:deno_webidl", "dep:deno_web", "dep:deno_net", "dep:deno_console", "dep:deno_url", "dep:deno_core", "dep:deno_ast", "dep:deno_tls"] +deno_core = ["dep:deno_fetch", "dep:deno_webidl", "dep:deno_web", "dep:deno_net", "dep:deno_console", "dep:deno_url", "dep:deno_core", + "dep:deno_ast", "dep:deno_tls", "dep:deno_permissions"] otel = ["windmill-common/otel", "dep:opentelemetry"] +dind = ["dep:bollard"] [dependencies] windmill-queue.workspace = true @@ -69,6 +71,8 @@ deno_url = { workspace = true, optional = true } deno_core = { workspace = true, optional = true } deno_ast = { workspace = true, optional = true } deno_tls = { workspace = true, optional = true } +deno_permissions = { workspace = true, optional = true } + postgres-native-tls.workspace = true native-tls.workspace = true mysql_async.workspace = true @@ -94,7 +98,7 @@ swc_ecma_parser.workspace = true backon.workspace = true opentelemetry = { workspace = true, optional = true } - +bollard = { workspace = true, optional = true } [build-dependencies] deno_fetch = { workspace = true, optional = true } @@ -106,4 +110,6 @@ deno_url = { workspace = true, optional = true } deno_core = { workspace = true, optional = true } deno_ast = { workspace = true, optional = true } deno_tls = { workspace = true, optional = true } +deno_permissions = { workspace = true, optional = true } + zstd.workspace = true diff --git a/backend/windmill-worker/build.rs b/backend/windmill-worker/build.rs index 6bbc3fd75f173..e48ecddb3506e 100644 --- a/backend/windmill-worker/build.rs +++ b/backend/windmill-worker/build.rs @@ -25,7 +25,7 @@ impl FetchPermissions for PermissionsContainer { &mut self, _url: &deno_core::url::Url, _api_name: &str, - ) -> Result<(), deno_core::error::AnyError> { + ) -> Result<(), deno_permissions::PermissionCheckError> { unreachable!("snapshotting") } @@ -34,7 +34,7 @@ impl FetchPermissions for PermissionsContainer { &mut self, _p: &'a std::path::Path, _api_name: &str, - ) -> Result, deno_core::error::AnyError> { + ) -> Result, deno_permissions::PermissionCheckError> { unreachable!("snapshotting") } } @@ -53,7 +53,7 @@ impl NetPermissions for PermissionsContainer { &mut self, _p: &'a str, _api_name: &str, - ) -> Result { + ) -> Result { unreachable!("snapshotting") } @@ -61,7 +61,7 @@ impl NetPermissions for PermissionsContainer { &mut self, _p: &'a str, _api_name: &str, - ) -> Result { + ) -> Result { unreachable!("snapshotting") } @@ -69,7 +69,7 @@ impl NetPermissions for PermissionsContainer { &mut self, _host: &(T, Option), _api_name: &str, - ) -> Result<(), deno_core::error::AnyError> { + ) -> Result<(), deno_permissions::PermissionCheckError> { unreachable!("snapshotting") } @@ -77,7 +77,7 @@ impl NetPermissions for PermissionsContainer { &mut self, _: &'a Path, _: &str, - ) -> Result, deno_core::anyhow::Error> { + ) -> Result, deno_permissions::PermissionCheckError> { todo!() } } @@ -95,6 +95,7 @@ fn main() { println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap()); let exts = vec![ + // deno_telemetry::deno_telemetry::init_ops_and_esm(), deno_webidl::deno_webidl::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -116,10 +117,10 @@ fn main() { deno_core::snapshot::CreateSnapshotOptions { cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), startup_snapshot: None, + extension_transpiler: None, extensions: exts, with_runtime_cb: None, skip_op_registration: false, - extension_transpiler: None, }, None, ) diff --git a/backend/windmill-worker/src/js_eval.rs b/backend/windmill-worker/src/js_eval.rs index b4b84e2e2b09b..8dd1f8d252e0f 100644 --- a/backend/windmill-worker/src/js_eval.rs +++ b/backend/windmill-worker/src/js_eval.rs @@ -108,7 +108,7 @@ impl FetchPermissions for PermissionsContainer { &mut self, _url: &deno_core::url::Url, _api_name: &str, - ) -> Result<(), deno_core::error::AnyError> { + ) -> Result<(), deno_permissions::PermissionCheckError> { Ok(()) } @@ -117,7 +117,7 @@ impl FetchPermissions for PermissionsContainer { &mut self, p: &'a std::path::Path, _api_name: &str, - ) -> Result, anyhow::Error> { + ) -> Result, deno_permissions::PermissionCheckError> { Ok(Cow::Borrowed(p)) } } @@ -136,7 +136,7 @@ impl NetPermissions for PermissionsContainer { &mut self, p: &'a str, _api_name: &str, - ) -> Result { + ) -> Result { Ok(PathBuf::from(p)) } @@ -144,7 +144,7 @@ impl NetPermissions for PermissionsContainer { &mut self, p: &'a str, _api_name: &str, - ) -> Result { + ) -> Result { Ok(PathBuf::from(p)) } @@ -152,7 +152,7 @@ impl NetPermissions for PermissionsContainer { &mut self, _host: &(T, Option), _api_name: &str, - ) -> Result<(), deno_core::error::AnyError> { + ) -> Result<(), deno_permissions::PermissionCheckError> { Ok(()) } @@ -160,7 +160,7 @@ impl NetPermissions for PermissionsContainer { &mut self, p: &'a std::path::Path, _api_name: &str, - ) -> Result, AnyError> { + ) -> Result, deno_permissions::PermissionCheckError> { Ok(Cow::Borrowed(p)) } } @@ -669,9 +669,12 @@ pub fn transpile_ts(expr: String) -> anyhow::Result { text: deno_core::ModuleCodeString::from(expr).into(), })?; Ok(parsed - .transpile(&Default::default(), &Default::default())? + .transpile( + &Default::default(), + &Default::default(), + &Default::default(), + )? .into_source() - .into_string()? .text) } @@ -814,13 +817,7 @@ pub async fn eval_fetch_timeout( let ext = Extension { name: "windmill", ops: ops.into(), ..Default::default() }; let fetch_options = deno_fetch::Options { - root_cert_store_provider: if let Some(cert_path) = env::var("DENO_CERT").ok() { - let mut cert_store_provider = ContainerRootCertStoreProvider::new(); - cert_store_provider.add_certificate(cert_path)?; - Some(Arc::new(cert_store_provider)) - } else { - None - }, + root_cert_store_provider: None, user_agent: ann.useragent.unwrap_or_else(|| "windmill/beta".to_string()), proxy: ann.proxy.map(|x| deno_tls::Proxy { url: x.0,