the following code when i run in a component of a workflow, its not creating my source :
import { axios } from “@pipedream/platform”;
async function defineSource() {
const sourceCode = `
import { axios } from “@pipedream/platform”;
import { axios } from “@pipedream/platform”;
export default {
name: “Source Demo”,
description: “This is a demo source”,
props: {
github: {
type: “app”,
app: “github”,
},
timer: {
type: “$.interface.timer”,
default: {
intervalSeconds: 15 * 60,
},
},
},
dedupe: “greatest”,
async run() {
const data = await axios(this, {
method: “get”,
headers: {
Authorization: `Bearer ${this.github.$auth.oauth_access_token}`,
},
url: `https://api.github.com/repos/pddemo/demo/issues\`,
});
data.forEach((issue) => {
this.$emit(issue, {
id: issue.id,
summary: `ISSUE ${issue.number}: ${issue.title}`,
ts: issue.created_at && +new Date(issue.created_at),
});
});
},
};
`;
const response = await axios($, {
method: “POST”,
url: “https://api.pipedream.com/v1/sources”,
headers: {
Authorization: Bearer ${process.env.PIPEDREAM_API_KEY}
,
},
data: {
component_code: sourceCode, // Directly pass the source code as a string
configurable_props: {
repo_full_name: steps.trigger.event.query.repo_full_name,
nango_connection_id: steps.trigger.event.query.nango_connection_id,
nango_integration_id: steps.trigger.event.query.nango_integration_id,
velora_workflow_id: steps.trigger.event.query.velora_workflow_id,
velora_workspace_id: steps.trigger.event.query.velora_workspace_id,
},
},
});
console.log(“Finish!”)
return response.data;
}