@pipedream/dropbox 0.3.8 → 0.3.10
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.
- package/actions/create-a-text-file/create-a-text-file.mjs +1 -1
- package/actions/create-folder/create-folder.mjs +1 -1
- package/actions/create-or-append-to-a-text-file/create-or-append-to-a-text-file.mjs +1 -1
- package/actions/create-update-share-link/create-update-share-link.mjs +1 -1
- package/actions/delete-file-folder/delete-file-folder.mjs +1 -1
- package/actions/list-file-folders-in-a-folder/list-file-folders-in-a-folder.mjs +1 -1
- package/actions/list-file-revisions/list-file-revisions.mjs +1 -1
- package/actions/move-file-folder/move-file-folder.mjs +1 -1
- package/actions/rename-file-folder/rename-file-folder.mjs +1 -1
- package/actions/restore-a-file/restore-a-file.mjs +1 -1
- package/actions/search-files-folders/search-files-folders.mjs +1 -1
- package/actions/upload-file/upload-file.mjs +1 -1
- package/dropbox.app.mjs +33 -27
- package/package.json +5 -4
- package/sources/all-updates/all-updates.mjs +1 -1
- package/sources/common/common.mjs +3 -0
- package/sources/new-file/new-file.mjs +1 -1
- package/sources/new-folder/new-folder.mjs +1 -1
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "Create a Text File",
|
|
7
7
|
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)",
|
|
8
8
|
key: "dropbox-create-a-text-file",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.5",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
dropbox,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "Create folder",
|
|
7
7
|
description: "Create a folder. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCreateFolderV2__anchor)",
|
|
8
8
|
key: "dropbox-create-folder",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.5",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
dropbox,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create or Append to a Text File",
|
|
6
6
|
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)",
|
|
7
7
|
key: "dropbox-create-or-append-to-a-text-file",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
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.
|
|
8
|
+
version: "0.0.5",
|
|
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
|
+
version: "0.0.5",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
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
|
+
version: "0.0.5",
|
|
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.
|
|
8
|
+
version: "0.0.5",
|
|
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.
|
|
7
|
+
version: "0.0.5",
|
|
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
|
+
version: "0.0.5",
|
|
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
|
+
version: "0.0.5",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
dropbox,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "Search files and folders",
|
|
8
8
|
description: "Searches for files and folders by name. [See the docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesSearchV2__anchor)",
|
|
9
9
|
key: "dropbox-search-files-folders",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.5",
|
|
11
11
|
type: "action",
|
|
12
12
|
props: {
|
|
13
13
|
dropbox,
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
name: "Upload a File",
|
|
10
10
|
description: "Uploads a file to a selected folder. [See docs here](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesUpload__anchor)",
|
|
11
11
|
key: "dropbox-upload-file",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.6",
|
|
13
13
|
type: "action",
|
|
14
14
|
props: {
|
|
15
15
|
dropbox,
|
package/dropbox.app.mjs
CHANGED
|
@@ -173,38 +173,49 @@ export default {
|
|
|
173
173
|
omitFiles,
|
|
174
174
|
} = opts;
|
|
175
175
|
|
|
176
|
-
const LIMIT = config.GET_PATH_OPTIONS.DEFAULT_MAX_RESULTS;
|
|
177
|
-
|
|
178
176
|
let data = [];
|
|
179
177
|
let res = null;
|
|
180
|
-
let nextCursor = null;
|
|
181
|
-
let lastPage = false;
|
|
182
178
|
path = path === "/" || path === null
|
|
183
179
|
? ""
|
|
184
180
|
: path;
|
|
185
|
-
const dpx = await this.sdk();
|
|
186
181
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
cursor: prevCursor,
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
182
|
+
const dpx = await this.sdk();
|
|
183
|
+
if (path === "") {
|
|
192
184
|
res = await dpx.filesListFolder({
|
|
193
185
|
path,
|
|
194
|
-
limit:
|
|
186
|
+
limit: config.GET_PATH_OPTIONS.DEFAULT_MAX_RESULTS,
|
|
195
187
|
recursive: true,
|
|
196
188
|
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
data = res.result.entries.map((item) => ({
|
|
200
|
-
path: item.path_display,
|
|
201
|
-
type: item[".tag"],
|
|
202
|
-
}));
|
|
203
189
|
|
|
204
|
-
|
|
205
|
-
|
|
190
|
+
data = res.result.entries.map((item) => ({
|
|
191
|
+
path: item.path_display,
|
|
192
|
+
type: item[".tag"],
|
|
193
|
+
}));
|
|
206
194
|
} else {
|
|
207
|
-
|
|
195
|
+
res = await this.searchFilesFolders({
|
|
196
|
+
query: path,
|
|
197
|
+
options: {
|
|
198
|
+
path: "",
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
data = res.map(({ metadata }) => ({
|
|
203
|
+
path: metadata.metadata.path_display,
|
|
204
|
+
type: metadata.metadata[".tag"],
|
|
205
|
+
}));
|
|
206
|
+
|
|
207
|
+
const folders = data.filter((item) => item.type !== "file");
|
|
208
|
+
for (const folder of folders) {
|
|
209
|
+
res = await dpx.filesListFolder({
|
|
210
|
+
path: folder.path,
|
|
211
|
+
recursive: true,
|
|
212
|
+
});
|
|
213
|
+
const folderData = res.result?.entries?.map((item) => ({
|
|
214
|
+
path: item.path_display,
|
|
215
|
+
type: item[".tag"],
|
|
216
|
+
}));
|
|
217
|
+
data.push(...folderData);
|
|
218
|
+
}
|
|
208
219
|
}
|
|
209
220
|
|
|
210
221
|
if (omitFiles) {
|
|
@@ -223,13 +234,8 @@ export default {
|
|
|
223
234
|
-1;
|
|
224
235
|
});
|
|
225
236
|
|
|
226
|
-
return
|
|
227
|
-
|
|
228
|
-
context: {
|
|
229
|
-
cursor: nextCursor,
|
|
230
|
-
reachedLastPage: lastPage,
|
|
231
|
-
},
|
|
232
|
-
};
|
|
237
|
+
return data;
|
|
238
|
+
|
|
233
239
|
} catch (err) {
|
|
234
240
|
console.log(err);
|
|
235
241
|
return [];
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/dropbox",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Pipedream Dropbox Components",
|
|
5
|
-
"main": "dropbox.app.
|
|
5
|
+
"main": "dropbox.app.mjs",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"pipedream",
|
|
8
8
|
"dropbox"
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
"homepage": "https://pipedream.com/apps/dropbox",
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"dropbox": "^
|
|
14
|
-
"isomorphic-fetch": "^3.0.0"
|
|
13
|
+
"dropbox": "^10.34.0",
|
|
14
|
+
"isomorphic-fetch": "^3.0.0",
|
|
15
|
+
"lodash": "^4.17.21"
|
|
15
16
|
},
|
|
16
17
|
"gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
|
|
17
18
|
"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.
|
|
9
|
+
version: "0.0.12",
|
|
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,
|
|
@@ -40,6 +40,9 @@ export default {
|
|
|
40
40
|
if (!fileTypes.includes(file[".tag"])) {
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
+
if (this.includeLink) {
|
|
44
|
+
file.link = await this.getTemporaryLink(file);
|
|
45
|
+
}
|
|
43
46
|
this.$emit(file, this.getMeta(file.id, file.path_display || file.id));
|
|
44
47
|
count++;
|
|
45
48
|
if (count >= 25) {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
type: "source",
|
|
7
7
|
key: "dropbox-new-file",
|
|
8
8
|
name: "New File",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.12",
|
|
10
10
|
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.",
|
|
11
11
|
props: {
|
|
12
12
|
...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.
|
|
9
|
+
version: "0.0.12",
|
|
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() {
|