2021-06-19 05:07:51 +12:00
|
|
|
/**
|
|
|
|
* Note, there is some functionality in this that is not currently exposed as it
|
|
|
|
* is complex and maybe better to be opinionated here.
|
|
|
|
* GET/DELETE requests cannot handle body elements so they will not be sent if configured.
|
|
|
|
*/
|
|
|
|
|
2021-09-07 04:53:02 +12:00
|
|
|
exports.definition = {
|
2021-06-19 05:07:51 +12:00
|
|
|
name: "Backend log",
|
|
|
|
tagline: "Console log a value in the backend",
|
2021-09-08 01:32:43 +12:00
|
|
|
icon: "Monitoring",
|
2021-06-19 05:07:51 +12:00
|
|
|
description: "Logs the given text to the server (using console.log)",
|
|
|
|
type: "ACTION",
|
2021-09-14 23:40:19 +12:00
|
|
|
internal: true,
|
2021-06-19 05:07:51 +12:00
|
|
|
stepId: "SERVER_LOG",
|
|
|
|
inputs: {
|
|
|
|
text: "",
|
|
|
|
},
|
|
|
|
schema: {
|
|
|
|
inputs: {
|
|
|
|
properties: {
|
|
|
|
text: {
|
|
|
|
type: "string",
|
2021-08-05 20:59:08 +12:00
|
|
|
title: "Log",
|
2021-06-19 05:07:51 +12:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: ["text"],
|
|
|
|
},
|
|
|
|
outputs: {
|
|
|
|
properties: {
|
|
|
|
success: {
|
|
|
|
type: "boolean",
|
|
|
|
description: "Whether the action was successful",
|
|
|
|
},
|
2022-07-28 22:14:06 +12:00
|
|
|
message: {
|
|
|
|
type: "string",
|
|
|
|
description: "What was output",
|
|
|
|
},
|
2021-06-19 05:07:51 +12:00
|
|
|
},
|
2022-07-28 22:14:06 +12:00
|
|
|
required: ["success", "message"],
|
2021-06-19 05:07:51 +12:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-09-07 04:53:02 +12:00
|
|
|
exports.run = async function ({ inputs, appId }) {
|
2022-07-28 22:14:06 +12:00
|
|
|
const message = `App ${appId} - ${inputs.text}`
|
|
|
|
console.log(message)
|
2021-09-08 04:31:54 +12:00
|
|
|
return {
|
|
|
|
success: true,
|
2022-07-28 22:14:06 +12:00
|
|
|
message,
|
2021-09-08 04:31:54 +12:00
|
|
|
}
|
2021-06-19 05:34:58 +12:00
|
|
|
}
|