Abrar
Abrar
BRBuildShip + Rowy
Created by Abrar on 6/16/2024 in #❓・buildship-help
Store an Array of strings with 'Buildship - Create Document (with ref)' node
No description
3 replies
BRBuildShip + Rowy
Created by Abrar on 6/15/2024 in #❓・buildship-help
Logging witihin NodeLogic
This is probably a very basic Javascript question... Consulted he documentation and yes there is logging but it is only available (scoped) in the default export function.. I want to log in the other functions... how do I get this to work? Consider the following:
export default async function (
{ inputData }: NodeInputs, // Access values of node input params
{ logging, env }: NodeScriptOptions,
): NodeOutput {
/* Log values while executing the node/workflow */
logging.log(">> Hello From Default!");
someFunc();

return {}
}

function someFunc() {
// This is what i want to do..
logging.log(">> >> Hello from someFunc()");
// I keep getting 'logging is not defined' ...
}
export default async function (
{ inputData }: NodeInputs, // Access values of node input params
{ logging, env }: NodeScriptOptions,
): NodeOutput {
/* Log values while executing the node/workflow */
logging.log(">> Hello From Default!");
someFunc();

return {}
}

function someFunc() {
// This is what i want to do..
logging.log(">> >> Hello from someFunc()");
// I keep getting 'logging is not defined' ...
}
Thanks in advance!
5 replies
BRBuildShip + Rowy
Created by Abrar on 5/19/2024 in #❓・buildship-help
query
Noob question: In my custom node, i need to use a package that is available via npm. How do i trigger this workflow to run the npm install command?
5 replies
BRBuildShip + Rowy
Created by Abrar on 5/1/2024 in #❓・buildship-help
Validating the existence of query string parameters
So I'm relaying a call to an api which accepts a bunch of optional query params.... When i make the API call... I try to pass on the query params like so...
{
"key" : (await getSecret("openaustralia-key")),
"date" : ctx["root"]["request"]["query"].date,
"party" : ctx["root"]["request"]["query"].party,
"state" : ctx["root"]["request"]["query"].state,
"search" : ctx["root"]["request"]["query"].search
}
{
"key" : (await getSecret("openaustralia-key")),
"date" : ctx["root"]["request"]["query"].date,
"party" : ctx["root"]["request"]["query"].party,
"state" : ctx["root"]["request"]["query"].state,
"search" : ctx["root"]["request"]["query"].search
}
I'm looking for a simple in-line way to validate the existence of each param, and only then and only populate the value.. Does anyone know how to do this in a clean and efficient manner? (NB: im not a javascript guru) Thanks in advance
6 replies