@pipedream/twilio 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ export default {
8
8
  key: "twilio-download-recording-media",
9
9
  name: "Download Recording Media",
10
10
  description: "Download a recording media file. [See the documentation](https://www.twilio.com/docs/voice/api/recording#fetch-a-recording-media-file)",
11
- version: "0.1.6",
11
+ version: "0.1.7",
12
12
  type: "action",
13
13
  props: {
14
14
  twilio,
@@ -29,6 +29,11 @@ export default {
29
29
  label: "File Path",
30
30
  description: "The destination path in [`/tmp`](https://pipedream.com/docs/workflows/steps/code/nodejs/working-with-files/#the-tmp-directory) for the downloaded the file (e.g., `/tmp/myFile.mp3`). Make sure to include the file extension.",
31
31
  },
32
+ syncDir: {
33
+ type: "dir",
34
+ accessMode: "write",
35
+ sync: true,
36
+ },
32
37
  },
33
38
  methods: {
34
39
  getFileStream({
@@ -58,13 +63,16 @@ export default {
58
63
  downloadUrl,
59
64
  });
60
65
  const pipeline = promisify(stream.pipeline);
61
- const resp = await pipeline(
66
+ const filePath = this.filePath.startsWith("/tmp")
67
+ ? this.filePath
68
+ : `/tmp/${this.filePath}`;
69
+ await pipeline(
62
70
  fileStream,
63
- fs.createWriteStream(this.filePath.includes("/tmp")
64
- ? this.filePath
65
- : `/tmp/${this.filePath}`),
71
+ fs.createWriteStream(filePath),
66
72
  );
67
- $.export("$summary", `Successfully downloaded the recording media file to "${this.filePath}"`);
68
- return resp;
73
+ $.export("$summary", `Successfully downloaded the recording media file to "${filePath}"`);
74
+ return {
75
+ filePath,
76
+ };
69
77
  },
70
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/twilio",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Pipedream Twilio Components",
5
5
  "main": "twilio.app.mjs",
6
6
  "keywords": [