provisioning-catalog/components/surrealdb/cluster/vars.nu

14 lines
389 B
Text
Raw Normal View History

#!/usr/bin/env nu
# Derived variables for surrealdb bundle rendering.
def main [component_json: string]: nothing -> nothing {
let db = ($component_json | from json)
let namespaces = ($db | get -o namespaces | default [])
{
namespaces_space: ($namespaces | str join " "),
namespaces_json: ($namespaces | to json --raw),
}
| to json --raw
| print
}