@pipedream/dropbox 0.3.13 → 0.3.15
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/download-file-to-tmp/download-file-to-tmp.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 +6 -8
- 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 +14 -3
- package/package.json +3 -2
- package/sources/all-updates/all-updates.mjs +1 -1
- 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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
dropbox,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "Download File to TMP",
|
|
9
9
|
description: "Download a specific file to the temporary directory. [See the documentation](https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDownload__anchor).",
|
|
10
10
|
key: "dropbox-download-file-to-tmp",
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.2",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
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.6",
|
|
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.6",
|
|
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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
dropbox,
|
|
@@ -48,15 +48,13 @@ export default {
|
|
|
48
48
|
let normalizedPathTo = pathTo?.value || pathTo;
|
|
49
49
|
const normalizedPathFrom = pathFrom?.value || pathFrom;
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
normalizedPathTo = `${pathTo?.value || pathTo}/${fileName}`;
|
|
56
|
-
}
|
|
51
|
+
// Add file/folder name to end of pathTo
|
|
52
|
+
const splited = normalizedPathFrom.split("/");
|
|
53
|
+
const fileName = splited[splited.length - 1];
|
|
54
|
+
normalizedPathTo += `/${fileName}`;
|
|
57
55
|
|
|
58
56
|
const res = await this.dropbox.filesMove({
|
|
59
|
-
from_path:
|
|
57
|
+
from_path: normalizedPathFrom,
|
|
60
58
|
to_path: normalizedPathTo,
|
|
61
59
|
autorename,
|
|
62
60
|
allow_ownership_transfer: allowOwnershipTransfer,
|
|
@@ -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.6",
|
|
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.6",
|
|
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.6",
|
|
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.8",
|
|
13
13
|
type: "action",
|
|
14
14
|
props: {
|
|
15
15
|
dropbox,
|
package/dropbox.app.mjs
CHANGED
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
pathFolder: {
|
|
15
15
|
type: "string",
|
|
16
16
|
label: "Path",
|
|
17
|
-
description: "The folder path. (Please use a valid path to filter the values)",
|
|
17
|
+
description: "The folder path. (Please use a valid path to filter the values and type at least 2 characters after the latest '/' to perform the search.)",
|
|
18
18
|
useQuery: true,
|
|
19
19
|
withLabel: true,
|
|
20
20
|
async options({
|
|
@@ -179,6 +179,10 @@ export default {
|
|
|
179
179
|
? ""
|
|
180
180
|
: path;
|
|
181
181
|
|
|
182
|
+
if (path.length > 0 && !path.startsWith("/")) {
|
|
183
|
+
path = "/" + path;
|
|
184
|
+
}
|
|
185
|
+
|
|
182
186
|
const dpx = await this.sdk();
|
|
183
187
|
if (path === "") {
|
|
184
188
|
res = await dpx.filesListFolder({
|
|
@@ -192,10 +196,17 @@ export default {
|
|
|
192
196
|
type: item[".tag"],
|
|
193
197
|
}));
|
|
194
198
|
} else {
|
|
199
|
+
let subpath = "";
|
|
200
|
+
let query = path;
|
|
201
|
+
if ((path.match(/\//g) || []).length > 1) {
|
|
202
|
+
const splitPath = path.split("/");
|
|
203
|
+
query = splitPath.pop();
|
|
204
|
+
subpath = splitPath.join("/");
|
|
205
|
+
}
|
|
195
206
|
res = await this.searchFilesFolders({
|
|
196
|
-
query
|
|
207
|
+
query,
|
|
197
208
|
options: {
|
|
198
|
-
path:
|
|
209
|
+
path: subpath,
|
|
199
210
|
},
|
|
200
211
|
});
|
|
201
212
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/dropbox",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"description": "Pipedream Dropbox Components",
|
|
5
5
|
"main": "dropbox.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"dropbox": "^10.34.0",
|
|
14
14
|
"tmp-promise": "^3.0.3",
|
|
15
15
|
"isomorphic-fetch": "^3.0.0",
|
|
16
|
-
"lodash": "^4.17.21"
|
|
16
|
+
"lodash": "^4.17.21",
|
|
17
|
+
"@types/node-fetch": "^2.5.7"
|
|
17
18
|
},
|
|
18
19
|
"gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
|
|
19
20
|
"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.13",
|
|
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.
|
|
10
|
+
version: "0.0.14",
|
|
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.
|
|
9
|
+
version: "0.0.13",
|
|
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() {
|