@pipedream/dropbox 0.3.16 → 0.3.18

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.
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Create a Text File",
5
5
  description: "Creates a brand new text file from plain text content you specify. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesUpload__anchor)",
6
6
  key: "dropbox-create-a-text-file",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Create folder",
5
5
  description: "Create a folder. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCreateFolderV2__anchor)",
6
6
  key: "dropbox-create-folder",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Create or Append to a Text File",
5
5
  description: "Adds a new line to an existing text file, or creates a file if it doesn't exist. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesUpload__anchor)",
6
6
  key: "dropbox-create-or-append-to-a-text-file",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -5,7 +5,7 @@ export default {
5
5
  name: "Create/Update a Share Link",
6
6
  description: "Creates or updates a public share link to the file or folder (It allows to share the file or folder with anyone). [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#sharingCreateSharedLinkWithSettings__anchor)",
7
7
  key: "dropbox-create-update-share-link",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
9
  type: "action",
10
10
  props: {
11
11
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Delete a File/Folder",
5
5
  description: "Permanently removes a file/folder from the server. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDeleteV2__anchor)",
6
6
  key: "dropbox-delete-file-folder",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Download File to TMP",
7
7
  description: "Download a specific file to the temporary directory. [See the documentation](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDownload__anchor).",
8
8
  key: "dropbox-download-file-to-tmp",
9
- version: "0.0.3",
9
+ version: "0.0.4",
10
10
  type: "action",
11
11
  props: {
12
12
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "List All Files/Subfolders in a Folder",
5
5
  description: "Retrieves a list of files or subfolders in a specified folder [See the docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListFolder__anchor)",
6
6
  key: "dropbox-list-file-folders-in-a-folder",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -5,7 +5,7 @@ export default {
5
5
  name: "List File Revisions",
6
6
  description: "Retrieves a list of file revisions needed to recover previous content. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListRevisions__anchor)",
7
7
  key: "dropbox-list-file-revisions",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
9
  type: "action",
10
10
  props: {
11
11
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Move a File/Folder",
5
5
  description: "Moves a file or folder to a different location in the user's Dropbox [See the docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesMoveV2__anchor)",
6
6
  key: "dropbox-move-file-folder",
7
- version: "0.0.8",
7
+ version: "0.0.9",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Rename a File/Folder",
5
5
  description: "Renames a file or folder in the user's Dropbox [See the docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesMoveV2__anchor)",
6
6
  key: "dropbox-rename-file-folder",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -4,7 +4,7 @@ export default {
4
4
  name: "Restore a File",
5
5
  description: "Restores a previous file version. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesRestore__anchor)",
6
6
  key: "dropbox-restore-a-file",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  dropbox,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Search files and folders",
7
7
  description: "Searches for files and folders by name. [See the docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesSearchV2__anchor)",
8
8
  key: "dropbox-search-files-folders",
9
- version: "0.0.7",
9
+ version: "0.0.8",
10
10
  type: "action",
11
11
  props: {
12
12
  dropbox,
@@ -1,13 +1,13 @@
1
1
  import dropbox from "../../dropbox.app.mjs";
2
2
  import consts from "../../common/consts.mjs";
3
3
  import fs from "fs";
4
- import got from "got@12.4.1";
4
+ import got from "got";
5
5
 
6
6
  export default {
7
7
  name: "Upload a File",
8
8
  description: "Uploads a file to a selected folder. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesUpload__anchor)",
9
9
  key: "dropbox-upload-file",
10
- version: "0.0.9",
10
+ version: "0.0.11",
11
11
  type: "action",
12
12
  props: {
13
13
  dropbox,
package/dropbox.app.mjs CHANGED
@@ -29,7 +29,6 @@ export default {
29
29
  }
30
30
  return this.getPathOptions(
31
31
  query,
32
- prevContext?.cursor,
33
32
  {
34
33
  omitFiles: true,
35
34
  returnSimpleString,
@@ -55,7 +54,6 @@ export default {
55
54
  }
56
55
  return this.getPathOptions(
57
56
  query,
58
- prevContext?.cursor,
59
57
  {
60
58
  omitFolders: true,
61
59
  returnSimpleString,
@@ -81,7 +79,6 @@ export default {
81
79
  }
82
80
  return this.getPathOptions(
83
81
  query,
84
- prevContext?.cursor,
85
82
  {
86
83
  returnSimpleString,
87
84
  omitRootFolder,
@@ -192,7 +189,7 @@ export default {
192
189
  this.normalizeError(err);
193
190
  }
194
191
  },
195
- async getPathOptions(path, prevCursor, opts = {}) {
192
+ async getPathOptions(path, opts = {}) {
196
193
  try {
197
194
  const {
198
195
  omitFolders,
@@ -201,7 +198,6 @@ export default {
201
198
  } = opts;
202
199
 
203
200
  let data = [];
204
- let res = null;
205
201
  path = path === "/" || path === null
206
202
  ? ""
207
203
  : path;
@@ -210,18 +206,18 @@ export default {
210
206
  path = "/" + path;
211
207
  }
212
208
 
213
- const dpx = await this.sdk();
214
209
  if (path === "") {
215
- res = await dpx.filesListFolder({
210
+ const entries = await this.listFilesFolders({
216
211
  path,
217
- limit: config.GET_PATH_OPTIONS.DEFAULT_MAX_RESULTS,
218
212
  recursive: true,
213
+ include_mounted_folders: true,
219
214
  });
220
215
 
221
- data = res.result.entries.map((item) => ({
216
+ data = entries.map((item) => ({
222
217
  path: item.path_display,
223
218
  type: item[".tag"],
224
219
  }));
220
+
225
221
  } else {
226
222
  let subpath = "";
227
223
  let query = path;
@@ -230,7 +226,7 @@ export default {
230
226
  query = splitPath.pop();
231
227
  subpath = splitPath.join("/");
232
228
  }
233
- res = await this.searchFilesFolders({
229
+ const res = await this.searchFilesFolders({
234
230
  query,
235
231
  options: {
236
232
  path: subpath,
@@ -244,11 +240,12 @@ export default {
244
240
 
245
241
  const folders = data.filter((item) => item.type !== "file");
246
242
  for (const folder of folders) {
247
- res = await dpx.filesListFolder({
243
+ const entries = await this.listFilesFolders({
248
244
  path: folder.path,
249
245
  recursive: true,
246
+ include_mounted_folders: true,
250
247
  });
251
- const folderData = res.result?.entries?.map((item) => ({
248
+ const folderData = entries?.map((item) => ({
252
249
  path: item.path_display,
253
250
  type: item[".tag"],
254
251
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/dropbox",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
4
4
  "description": "Pipedream Dropbox Components",
5
5
  "main": "dropbox.app.mjs",
6
6
  "keywords": [
@@ -10,11 +10,12 @@
10
10
  "homepage": "https://pipedream.com/apps/dropbox",
11
11
  "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12
12
  "dependencies": {
13
+ "@types/node-fetch": "^2.5.7",
13
14
  "dropbox": "^10.34.0",
14
- "tmp-promise": "^3.0.3",
15
+ "got": "^14.0.0",
15
16
  "isomorphic-fetch": "^3.0.0",
16
17
  "lodash": "^4.17.21",
17
- "@types/node-fetch": "^2.5.7"
18
+ "tmp-promise": "^3.0.3"
18
19
  },
19
20
  "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
20
21
  "publishConfig": {
@@ -6,7 +6,7 @@ export default {
6
6
  type: "source",
7
7
  key: "dropbox-all-updates",
8
8
  name: "New or Modified File or Folder",
9
- version: "0.0.14",
9
+ version: "0.0.15",
10
10
  description: "Emit new event when a file or folder is added or modified. Make sure the number of files/folders in the watched folder does not exceed 4000.",
11
11
  props: {
12
12
  ...common.props,
@@ -7,7 +7,7 @@ export default {
7
7
  type: "source",
8
8
  key: "dropbox-new-file",
9
9
  name: "New File",
10
- version: "0.0.15",
10
+ version: "0.0.16",
11
11
  description: "Emit new event when a new file is added to your account or a specific folder. Make sure the number of files/folders in the watched folder does not exceed 4000.",
12
12
  props: {
13
13
  ...common.props,
@@ -6,7 +6,7 @@ export default {
6
6
  type: "source",
7
7
  key: "dropbox-new-folder",
8
8
  name: "New Folder",
9
- version: "0.0.14",
9
+ version: "0.0.15",
10
10
  description: "Emit new event when a new folder is created. Make sure the number of files/folders in the watched folder does not exceed 4000.",
11
11
  hooks: {
12
12
  async activate() {