You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last examples in bash and PowerShell showcase well how it works under the hood: It fetches the secret from the API using the job's permissions through the ephemeral token passed as an environment variable to the job.
187
+
Nu:
188
+
189
+
```python
190
+
get_variable u/user/foo
191
+
```
192
+
193
+
Examples in bash and PowerShell showcase well how it works under the hood: It fetches the secret from the API using the job's permissions through the ephemeral token passed as an environment variable to the job.
188
194
189
195
## Mocked API files
190
196
@@ -196,4 +202,4 @@ Simulate API interactions locally by using a JSON file to store and retrieve var
196
202
description="Simulate API interactions locally by using a JSON file to store and retrieve variables and resources."
Copy file name to clipboardExpand all lines: docs/core_concepts/index.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -646,7 +646,7 @@ All details & features on [Pricing page](/pricing).
646
646
/>
647
647
<DocCard
648
648
title="Windows workers"
649
-
description="Windows Native Workers are a Self-Hosted Enterprise Feature. You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons). This feature supports the **Python**, **Bun**, and **PowerShell** executors."
649
+
description="Windows Native Workers are a Self-Hosted Enterprise Feature. You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons). This feature supports the **Python**, **Bun**, **PowerShell** and **Nu** executors."
# Nu will throw an error automatically if request fails
98
+
http get $url
99
+
echo "The URL is reachable!"
100
+
} catch {
101
+
echo "The URL is not reachable."
102
+
}
103
+
}
104
+
```
89
105
90
106
</TabItem>
91
107
</Tabs>
@@ -184,6 +200,76 @@ Default arguments can be specified using the syntax above: `$argument_name = "It
184
200
185
201
The last line of the output, here `Write-Output "Hello $Msg"`, is the return value, which might be useful if the script is used in a [flow](../../../flows/1_flow_editor.mdx) or [app](../../../apps/0_app_editor/index.mdx) to pass its result on.
186
202
203
+
### Nu
204
+
205
+
Unlike `Bash` and `PowerShell`, `Nu` requires main function and all arguments should defined in signature.
206
+
It supports typed, optional and default arguments.
One of the strong sides of `Nu`is that it is cross-platform. If you have linux workers and [windows workers](../../../misc/17_windows_workers/index.mdx)
269
+
Nushell scripts will be able to run on both!
270
+
271
+
If you are interested in`Nu` you can read their [official documentation](https://www.nushell.sh/book/getting_started.html)
272
+
187
273
## Instant preview & testing
188
274
189
275
Look at the UI preview on the right: it was updated to match the input
@@ -277,6 +370,8 @@ You can also choose to [run the script from the CLI](../../../advanced/3_cli/ind
277
370
278
371
The last line returned by the script will be the string result. To use a json result instead, output your result in`./result.json`and it will be automatically picked-up and considered as the JSON result for Bash and Powershell scripts.
279
372
373
+
For Nu first returned data from main function will be used as a result.
374
+
280
375
## Run Docker containers
281
376
282
377
In some cases where your task requires a complexset of dependencies oris implemented in a non-supported language, you can still include it as a flow step or individual script.
Copy file name to clipboardExpand all lines: docs/misc/17_windows_workers/index.mdx
+21-3
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import DocCard from '@site/src/components/DocCard';
5
5
Windows Native Workers are a [Self-Hosted Enterprise](/pricing) Feature.
6
6
7
7
You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons).
8
-
This feature supports the **Python**, **Bun**, and **PowerShell** executors.
8
+
This feature supports the **Python**, **Bun**, **PowerShell**and **Nu** executors.
9
9
10
10
You can connect Windows workers to your existing Dockerized or cloud self-hosted PostgreSQL database and Windmill server.
11
11
@@ -62,9 +62,7 @@ You can also check other installation methods in uv`s [official documentation](h
62
62
# Replace these variables with your specific configuration
63
63
$env:BUN_PATH="C:\Users\Alex\.bun\bin\bun.exe"
64
64
```
65
-
66
65
### PowerShell executor
67
-
68
66
1.**Install PowerShell 7+ (stable)**: Ensure you have the latest stable release of PowerShell by following the [official documentation](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows).
69
67
- Start PowerShell 7 and verify you're running PowerShell 7 by checking `$PSVersionTable`:
70
68
```powershell
@@ -88,3 +86,23 @@ You can also check other installation methods in uv`s [official documentation](h
88
86
# Replace these variables with your specific configuration
0 commit comments