From 66e6ead15f9c05b6a3c3006e29e50e41758bff2a Mon Sep 17 00:00:00 2001 From: Danny Roosevelt Date: Wed, 26 Mar 2025 09:05:55 -0700 Subject: [PATCH 1/4] adding custom header per app's request --- .../actions/convert-html-to-pdf/convert-html-to-pdf.mjs | 2 +- .../actions/convert-html-to-png/convert-html-to-png.mjs | 2 +- .../actions/create-screenshot/create-screenshot.mjs | 2 +- components/customjs/actions/merge-pdfs/merge-pdfs.mjs | 2 +- .../customjs/actions/run-puppeteer/run-puppeteer.mjs | 2 +- components/customjs/customjs.app.mjs | 1 + pnpm-lock.yaml | 9 +++------ 7 files changed, 9 insertions(+), 11 deletions(-) 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..606f59316f972 100644 --- a/components/customjs/customjs.app.mjs +++ b/components/customjs/customjs.app.mjs @@ -24,6 +24,7 @@ export default { headers: { ...headers, "Content-Type": "application/json", + "customjs-origin": "pipedream", }, responseType: "arraybuffer", }); 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: From 96d39344df293e9224993386efa8b9857addb6e5 Mon Sep 17 00:00:00 2001 From: Danny Roosevelt Date: Wed, 26 Mar 2025 09:15:03 -0700 Subject: [PATCH 2/4] Update customjs.app.mjs --- components/customjs/customjs.app.mjs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/customjs/customjs.app.mjs b/components/customjs/customjs.app.mjs index 606f59316f972..3e9844482fece 100644 --- a/components/customjs/customjs.app.mjs +++ b/components/customjs/customjs.app.mjs @@ -11,20 +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", - "customjs-origin": "pipedream", }, responseType: "arraybuffer", }); From 725d9649ec70104d63b4edf4db9faa343fa96311 Mon Sep 17 00:00:00 2001 From: Danny Roosevelt Date: Wed, 26 Mar 2025 09:18:20 -0700 Subject: [PATCH 3/4] Update package.json --- components/customjs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/customjs/package.json b/components/customjs/package.json index 7e6c726641592..1b98e8e7322de 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.2", "description": "Pipedream CustomJS Components", "main": "customjs.app.mjs", "keywords": [ From 4f4776e231b68958c478c707e2bdf5476a572eb4 Mon Sep 17 00:00:00 2001 From: Danny Roosevelt Date: Wed, 26 Mar 2025 09:18:29 -0700 Subject: [PATCH 4/4] Update package.json --- components/customjs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/customjs/package.json b/components/customjs/package.json index 1b98e8e7322de..fac4f9cf9d4d2 100644 --- a/components/customjs/package.json +++ b/components/customjs/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/customjs", - "version": "0.2.2", + "version": "0.2.1", "description": "Pipedream CustomJS Components", "main": "customjs.app.mjs", "keywords": [