13 lines
389 B
Text
13 lines
389 B
Text
#!/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
|
|
}
|