-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WM] Script 'f/user/happy_script' deployed
- Loading branch information
1 parent
8ec548c
commit 29e9b43
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": {} | ||
} | ||
//bun.lock | ||
<empty> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
summary: '' | ||
description: '' | ||
lock: '!inline f/user/happy_script.script.lock' | ||
kind: script | ||
schema: | ||
$schema: 'https://json-schema.org/draft/2020-12/schema' | ||
type: object | ||
properties: | ||
a: | ||
type: number | ||
description: '' | ||
default: null | ||
b: | ||
type: string | ||
description: '' | ||
default: null | ||
enum: | ||
- my | ||
- enum | ||
originalType: enum | ||
e: | ||
type: string | ||
description: '' | ||
default: inferred type string from default arg | ||
originalType: string | ||
f: | ||
type: object | ||
description: '' | ||
default: | ||
nested: object | ||
properties: | ||
nested: | ||
type: string | ||
description: '' | ||
originalType: string | ||
g: | ||
type: object | ||
description: '' | ||
default: null | ||
oneOf: | ||
- type: object | ||
properties: | ||
foo: | ||
type: string | ||
description: '' | ||
originalType: string | ||
label: | ||
type: string | ||
description: '' | ||
enum: | ||
- Variant 1 | ||
originalType: enum | ||
title: Variant 1 | ||
- type: object | ||
properties: | ||
bar: | ||
type: number | ||
description: '' | ||
label: | ||
type: string | ||
description: '' | ||
enum: | ||
- Variant 2 | ||
originalType: enum | ||
title: Variant 2 | ||
required: | ||
- a | ||
- b | ||
- g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// there are multiple modes to add as header: //nobundling //native //npm //nodejs | ||
// https://www.windmill.dev/docs/getting_started/scripts_quickstart/typescript#modes | ||
|
||
// import { toWords } from "number-to-words@1" | ||
import * as wmill from "windmill-client" | ||
|
||
// fill the type, or use the +Resource type to get a type-safe reference to a resource | ||
// type Postgresql = object | ||
|
||
|
||
export async function main( | ||
a: number, | ||
b: "my" | "enum", | ||
//c: Postgresql, | ||
//d: wmill.S3Object, // https://www.windmill.dev/docs/core_concepts/persistent_storage/large_data_files | ||
//d: DynSelect_foo, // https://www.windmill.dev/docs/core_concepts/json_schema_and_parsing#dynamic-select | ||
e = "inferred type string from default arg", | ||
f = { nested: "object" }, | ||
g: { | ||
label: "Variant 1", | ||
foo: string | ||
} | { | ||
label: "Variant 2", | ||
bar: number | ||
} | ||
) { | ||
// let x = await wmill.getVariable('u/user/foo') | ||
return { foo: a }; | ||
} |