Skip to content

Commit 099c95c

Browse files
committed
updates
1 parent 164b135 commit 099c95c

File tree

10 files changed

+39
-13
lines changed

10 files changed

+39
-13
lines changed

components/helper_functions/actions/retrieve-all-rss-stories/retrieve-all-rss-stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export default {
1111
props: {
1212
helper_functions,
1313
rss_feeds: {
14-
type: "any",
14+
type: "string[]",
15+
label: "RSS Feeds",
1516
description: "The URL(s) of the RSS Feeds",
1617
},
1718
},

components/helper_functions/actions/retrieve-new-rss-stories/retrieve-new-rss-stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export default {
1313
helper_functions,
1414
db: "$.service.db",
1515
rss_feeds: {
16-
type: "any",
16+
type: "string[]",
17+
label: "RSS Feeds",
1718
description: "The URL(s) of the RSS Feeds",
1819
},
1920
},

components/imgur/actions/upload-image/upload-image.mjs

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,38 @@
11
import imgur from "../../imgur.app.mjs";
2+
import { getFileStream } from "@pipedream/platform";
23

34
export default {
45
name: "Upload Image",
5-
version: "0.1.1",
6+
version: "1.0.0",
67
key: "imgur-upload-image",
78
description: "Upload an image to Imgur",
9+
type: "action",
810
props: {
911
imgur,
1012
image: {
1113
type: "string",
1214
label: "Image",
13-
description: "A base 64 encoded image",
15+
description: "Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFlie.pdf).",
16+
},
17+
},
18+
methods: {
19+
streamToBase64(stream) {
20+
return new Promise((resolve, reject) => {
21+
const chunks = [];
22+
stream.on("data", (chunk) => chunks.push(chunk));
23+
stream.on("end", () => {
24+
const buffer = Buffer.concat(chunks);
25+
resolve(buffer.toString("base64"));
26+
});
27+
stream.on("error", reject);
28+
});
1429
},
1530
},
16-
type: "action",
1731
async run({ $ }) {
18-
const res = await this.imgur.uploadImage(this.image);
32+
const stream = await getFileStream(this.image);
33+
const base64 = await this.streamToBase64(stream);
34+
35+
const res = await this.imgur.uploadImage(base64);
1936

2037
if (!res.status == 200) {
2138
$.export("response", res);

components/imgur/imgur.app.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ export default {
66
app: "imgur",
77
propDefinitions: {},
88
methods: {
9-
// this.$auth contains connected account data
10-
authKeys() {
11-
console.log(Object.keys(this.$auth));
12-
},
139
/**
1410
* Upload a screenshot to Imgur
1511
*

components/imgur/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/imgur",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"description": "The imgur app file for Pipedream action & trigger integrations.",
55
"main": "imgur.app.mjs",
66
"scripts": {
@@ -14,5 +14,8 @@
1414
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1515
"publishConfig": {
1616
"access": "public"
17+
},
18+
"dependencies": {
19+
"@pipedream/platform": "^3.1.0"
1720
}
1821
}

components/pipedream_utils/actions/retrieve-all-rss-stories/retrieve-all-rss-stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export default {
1111
props: {
1212
pipedream_utils,
1313
rss_feeds: {
14-
type: "any",
14+
type: "string[]",
15+
label: "RSS Feeds",
1516
description: "The URL(s) of the RSS Feeds",
1617
},
1718
},

components/pipedream_utils/actions/retrieve-new-rss-stories/retrieve-new-rss-stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export default {
1313
pipedream_utils,
1414
db: "$.service.db",
1515
rss_feeds: {
16-
type: "any",
16+
type: "string[]",
17+
label: "RSS Feeds",
1718
description: "The URL(s) of the RSS Feeds",
1819
},
1920
},

components/voilanorbert/actions/start-contact-search/start-contact-search.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export default {
4949
},
5050
methods: {
5151
async processEvent({ $ }) {
52+
if (!this.domain && !this.company) {
53+
throw new ConfigurationError("Either domain or company is required.");
54+
}
55+
5256
const { resume_url } = this.webhookUrl
5357
? {
5458
resume_url: this.webhookUrl,

components/voilanorbert/utils.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const objectToString = (data) => {
22
return Object.keys(data).reduce((prev, key) => {
3+
if (data[key] === undefined) return prev;
34
return `${prev
45
? `${prev}&`
56
: ""}${key}=${data[key]}`;

components/voilanorbert/voilanorbert.app.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default {
7979
headers: {
8080
"Content-Type": "application/x-www-form-urlencoded",
8181
},
82+
debug: true,
8283
};
8384
return axios($, config);
8485
},

0 commit comments

Comments
 (0)