alex4o
alex4o
WWindmill
Created by alex4o on 9/4/2024 in #help
Creating custom react components fails with jsxRuntime not defined
I want to create a graph network visualisation app component and was looking at either https://reagraph.dev/ or https://www.xyflow.com/ but both add jsxRuntime as dependency and can't be ran. Is there a way to circumvent that?
15 replies
WWindmill
Created by alex4o on 8/19/2024 in #help
Import tasks from files.
I am trying to make it so each file exports a task that can be imported.
export async function main(arangodb: Arangodb, databaseName: string, emailAccount: string) {
const database = createClient(arangodb)({ databaseName })

return getSuppliersFromArango(database)(emailAccount)
}

export const get_suppliers_from_arango = wmill.task(
(p: { arangodb: Arangodb; databaseName: string; emailAccount: string }) =>
main(p.arangodb, p.databaseName, p.emailAccount),
)
export async function main(arangodb: Arangodb, databaseName: string, emailAccount: string) {
const database = createClient(arangodb)({ databaseName })

return getSuppliersFromArango(database)(emailAccount)
}

export const get_suppliers_from_arango = wmill.task(
(p: { arangodb: Arangodb; databaseName: string; emailAccount: string }) =>
main(p.arangodb, p.databaseName, p.emailAccount),
)
This way I can make flows defined in code that are fully type safe and still reside in separate files? Is that something that is/will be supported or I should think of a different strategy.
2 replies