Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script 'f/examples/dedicated_scriptt' deployed #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions f/examples/dedicated_scriptt.script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
summary: ''
description: ''
lock: |-
{
"dependencies": {}
}
//bun.lockb
<empty>
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
e:
type: string
description: ''
default: inferred type string from default arg
f:
type: object
description: ''
default:
nested: object
properties:
nested:
type: string
required:
- a
- b
18 changes: 18 additions & 0 deletions f/examples/dedicated_scriptt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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, // for large files backed by S3 (https://www.windmill.dev/docs/core_concepts/persistent_storage/large_data_files)
e = "inferred type string from default arg",
f = { nested: "object" },
) {
// let x = await wmill.getVariable('u/user/foo')
return { foo: a };
}