lune/lune.yml
2023-02-06 12:59:48 -05:00

134 lines
2.2 KiB
YAML

# Lune v0.2.2
---
globals:
# FS (filesystem)
fs.readFile:
must_use: true
args:
- type: string
fs.readDir:
must_use: true
args:
- type: string
fs.writeFile:
args:
- type: string
- type: string
fs.writeDir:
args:
- type: string
fs.removeFile:
args:
- type: string
fs.removeDir:
args:
- type: string
fs.isFile:
must_use: true
args:
- type: string
fs.isDir:
must_use: true
args:
- type: string
# Net (networking)
net.jsonEncode:
must_use: true
args:
- type: any
- required: false
type: boolean
net.jsonDecode:
must_use: true
args:
- type: string
net.request:
args:
- type: any
net.serve:
args:
- type: number
- type: function
# Processs
process.args:
property: read-only
process.cwd:
property: read-only
process.env:
property: new-fields
process.exit:
args:
- required: false
type: number
process.spawn:
args:
- type: string
- required: false
type: table
- required: false
type: table
# Stdio
stdio.color:
must_use: true
args:
- type: string
stdio.style:
must_use: true
args:
- type: string
console.format:
must_use: true
args:
- type: "..."
stdio.write:
args:
- type: string
stdio.ewrite:
args:
- type: string
stdio.prompt:
must_use: true
args:
- required: false
type: string
- required: false
type: string
- required: false
type: string | boolean | table
# Task
task.cancel:
args:
- type: thread
task.defer:
args:
- type: thread | function
- type: "..."
task.delay:
args:
- required: false
type: number
- type: thread | function
- type: "..."
task.spawn:
args:
- type: thread | function
- type: "..."
task.wait:
args:
- required: false
type: number
# Misc
print:
args:
- type: "..."
info:
args:
- type: "..."
warn:
args:
- type: "..."
error:
args:
- type: any
- required: false
type: number