From f2c28bfe017a020add45ad98be53adaeed847005 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Mon, 22 Sep 2025 11:44:10 -0400 Subject: [PATCH] bug fixes --- .../actions/list-blog-posts/list-blog-posts.mjs | 13 ++++++------- .../actions/list-campaigns/list-campaigns.mjs | 13 ++++++------- .../list-marketing-emails/list-marketing-emails.mjs | 13 ++++++------- .../list-marketing-events/list-marketing-events.mjs | 13 ++++++------- components/hubspot/package.json | 2 +- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs b/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs index 0363ca238090d..462047df6948c 100644 --- a/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs +++ b/components/hubspot/actions/list-blog-posts/list-blog-posts.mjs @@ -3,9 +3,8 @@ import hubspot from "../../hubspot.app.mjs"; export default { key: "hubspot-list-blog-posts", name: "List Blog Posts", - description: - "Retrieves a list of blog posts. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/blogs/blog-posts)", - version: "0.0.7", + description: "Retrieves a list of blog posts. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/blogs/blog-posts)", + version: "0.0.8", type: "action", props: { hubspot, @@ -79,7 +78,7 @@ export default { }, }, async run({ $ }) { - const results = []; + const posts = []; let hasMore, count = 0; @@ -105,7 +104,7 @@ export default { break; } for (const item of results) { - results.push(item); + posts.push(item); count++; if (count >= this.maxResults) { break; @@ -117,10 +116,10 @@ export default { $.export( "$summary", - `Found ${results.length} page${results.length === 1 + `Found ${posts.length} page${posts.length === 1 ? "" : "s"}`, ); - return results; + return posts; }, }; diff --git a/components/hubspot/actions/list-campaigns/list-campaigns.mjs b/components/hubspot/actions/list-campaigns/list-campaigns.mjs index 48ada05a572cd..e004bca9311d7 100644 --- a/components/hubspot/actions/list-campaigns/list-campaigns.mjs +++ b/components/hubspot/actions/list-campaigns/list-campaigns.mjs @@ -3,9 +3,8 @@ import hubspot from "../../hubspot.app.mjs"; export default { key: "hubspot-list-campaigns", name: "List Campaigns", - description: - "Retrieves a list of campaigns. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/campaigns#get-%2Fmarketing%2Fv3%2Fcampaigns%2F)", - version: "0.0.7", + description: "Retrieves a list of campaigns. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/campaigns#get-%2Fmarketing%2Fv3%2Fcampaigns%2F)", + version: "0.0.8", type: "action", props: { hubspot, @@ -33,7 +32,7 @@ export default { }, }, async run({ $ }) { - const results = []; + const campaigns = []; let hasMore, count = 0; @@ -52,7 +51,7 @@ export default { break; } for (const item of results) { - results.push(item); + campaigns.push(item); count++; if (count >= this.maxResults) { break; @@ -64,10 +63,10 @@ export default { $.export( "$summary", - `Found ${results.length} campaign${results.length === 1 + `Found ${campaigns.length} campaign${campaigns.length === 1 ? "" : "s"}`, ); - return results; + return campaigns; }, }; diff --git a/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs b/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs index 9389dc2d90a5f..5994cdeb14413 100644 --- a/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs +++ b/components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs @@ -3,9 +3,8 @@ import hubspot from "../../hubspot.app.mjs"; export default { key: "hubspot-list-marketing-emails", name: "List Marketing Emails", - description: - "Retrieves a list of marketing emails. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#get-%2Fmarketing%2Fv3%2Femails%2F)", - version: "0.0.7", + description: "Retrieves a list of marketing emails. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/emails/marketing-emails#get-%2Fmarketing%2Fv3%2Femails%2F)", + version: "0.0.8", type: "action", props: { hubspot, @@ -85,7 +84,7 @@ export default { }, }, async run({ $ }) { - const results = []; + const emails = []; let hasMore, count = 0; @@ -112,7 +111,7 @@ export default { break; } for (const item of results) { - results.push(item); + emails.push(item); count++; if (count >= this.maxResults) { break; @@ -124,10 +123,10 @@ export default { $.export( "$summary", - `Found ${results.length} email${results.length === 1 + `Found ${emails.length} email${emails.length === 1 ? "" : "s"}`, ); - return results; + return emails; }, }; diff --git a/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs b/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs index 205e2882502bb..76484aa86e395 100644 --- a/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs +++ b/components/hubspot/actions/list-marketing-events/list-marketing-events.mjs @@ -3,9 +3,8 @@ import hubspot from "../../hubspot.app.mjs"; export default { key: "hubspot-list-marketing-events", name: "List Marketing Events", - description: - "Retrieves a list of marketing events. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/marketing-events#get-%2Fmarketing%2Fv3%2Fmarketing-events%2F)", - version: "0.0.7", + description: "Retrieves a list of marketing events. [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/marketing-events#get-%2Fmarketing%2Fv3%2Fmarketing-events%2F)", + version: "0.0.8", type: "action", props: { hubspot, @@ -18,7 +17,7 @@ export default { }, }, async run({ $ }) { - const results = []; + const events = []; const params = { limit: 100, }; @@ -36,7 +35,7 @@ export default { break; } for (const item of results) { - results.push(item); + events.push(item); count++; if (count >= this.maxResults) { break; @@ -48,10 +47,10 @@ export default { $.export( "$summary", - `Found ${results.length} event${results.length === 1 + `Found ${events.length} event${events.length === 1 ? "" : "s"}`, ); - return results; + return events; }, }; diff --git a/components/hubspot/package.json b/components/hubspot/package.json index a3982d87f377c..2801fa5b7c616 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.7.6", + "version": "1.7.7", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [