diff --git a/components/customjs/actions/convert-html-to-pdf/convert-html-to-pdf.mjs b/components/customjs/actions/convert-html-to-pdf/convert-html-to-pdf.mjs index 3efbfb3c3357a..2b4395a450bc4 100644 --- a/components/customjs/actions/convert-html-to-pdf/convert-html-to-pdf.mjs +++ b/components/customjs/actions/convert-html-to-pdf/convert-html-to-pdf.mjs @@ -6,7 +6,7 @@ export default { key: "customjs-convert-html-to-pdf", name: "Convert HTML to PDF", description: "Converts an HTML string to a PDF document. [See the documentation](https://www.customjs.space/api/docs#_1-html-to-pdf)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { customjs, diff --git a/components/customjs/actions/convert-html-to-png/convert-html-to-png.mjs b/components/customjs/actions/convert-html-to-png/convert-html-to-png.mjs index 48c7a499f558b..54034639e2fd0 100644 --- a/components/customjs/actions/convert-html-to-png/convert-html-to-png.mjs +++ b/components/customjs/actions/convert-html-to-png/convert-html-to-png.mjs @@ -6,7 +6,7 @@ export default { key: "customjs-convert-html-to-png", name: "Convert HTML to PNG", description: "Converts an HTML string to a PNG image. [See the documentation](https://www.customjs.space/api/docs#_4-html-to-png)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { customjs, diff --git a/components/customjs/actions/create-screenshot/create-screenshot.mjs b/components/customjs/actions/create-screenshot/create-screenshot.mjs index 284a696b6ccc7..98bc0e233fd4f 100644 --- a/components/customjs/actions/create-screenshot/create-screenshot.mjs +++ b/components/customjs/actions/create-screenshot/create-screenshot.mjs @@ -6,7 +6,7 @@ export default { key: "customjs-create-screenshot", name: "Create Screenshot", description: "Create a screenshot of a website. [See the documentation](https://www.customjs.space/api/docs#_3-create-screenshot)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { customjs, diff --git a/components/customjs/actions/merge-pdfs/merge-pdfs.mjs b/components/customjs/actions/merge-pdfs/merge-pdfs.mjs index 7f38cb6fce82a..aa0cb473c700f 100644 --- a/components/customjs/actions/merge-pdfs/merge-pdfs.mjs +++ b/components/customjs/actions/merge-pdfs/merge-pdfs.mjs @@ -6,7 +6,7 @@ export default { key: "customjs-merge-pdfs", name: "Merge PDFs", description: "Merges multiple PDF documents into one. [See the documentation](https://www.customjs.space/api/docs#_2-merge-pdfs)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { customjs, diff --git a/components/customjs/actions/run-puppeteer/run-puppeteer.mjs b/components/customjs/actions/run-puppeteer/run-puppeteer.mjs index 1eb69bad1411b..54f5bdca1fd01 100644 --- a/components/customjs/actions/run-puppeteer/run-puppeteer.mjs +++ b/components/customjs/actions/run-puppeteer/run-puppeteer.mjs @@ -6,7 +6,7 @@ export default { key: "customjs-run-puppeteer", name: "Run Puppeteer", description: "Run Puppeteer. [See the documentation](https://www.customjs.space/api/docs#_5-run-puppeteer)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { customjs, diff --git a/components/customjs/customjs.app.mjs b/components/customjs/customjs.app.mjs index 40afd8fe0b0c2..3e9844482fece 100644 --- a/components/customjs/customjs.app.mjs +++ b/components/customjs/customjs.app.mjs @@ -11,19 +11,26 @@ export default { }, }, methods: { + _getBaseHeaders() { + return { + "Content-Type": "application/json", + "customjs-origin": "pipedream", + }; + }, _makeRequest(opts = {}) { const { $ = this, - headers, + headers = {}, ...otherOpts } = opts; + return axios($, { ...otherOpts, method: "POST", url: `https://e.customjs.io/__js1-${this.$auth.api_key}`, headers: { + ...this._getBaseHeaders(), ...headers, - "Content-Type": "application/json", }, responseType: "arraybuffer", }); diff --git a/components/customjs/package.json b/components/customjs/package.json index 7e6c726641592..fac4f9cf9d4d2 100644 --- a/components/customjs/package.json +++ b/components/customjs/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/customjs", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream CustomJS Components", "main": "customjs.app.mjs", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8da0f6f6cfc5d..a5967e6847e2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1667,8 +1667,7 @@ importers: specifier: ^1.6.5 version: 1.6.6 - components/botsonic: - specifiers: {} + components/botsonic: {} components/botstar: dependencies: @@ -9495,8 +9494,7 @@ importers: specifier: ^3.0.0 version: 3.0.1(web-streams-polyfill@3.3.3) - components/piped: - specifiers: {} + components/piped: {} components/pipedream: dependencies: @@ -13773,8 +13771,7 @@ importers: components/vosfactures: {} - components/voxapp: - specifiers: {} + components/voxapp: {} components/vryno: dependencies: