@pipedream/google_drive 0.6.12 → 0.6.13
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,8 +4,8 @@ import { getListFilesOpts } from "../../common/utils.mjs";
|
|
4
4
|
export default {
|
5
5
|
key: "google_drive-list-files",
|
6
6
|
name: "List Files",
|
7
|
-
description: "List files from a specific folder. [See the
|
8
|
-
version: "0.1.
|
7
|
+
description: "List files from a specific folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/list) for more information",
|
8
|
+
version: "0.1.4",
|
9
9
|
type: "action",
|
10
10
|
props: {
|
11
11
|
googleDrive,
|
@@ -67,8 +67,16 @@ export default {
|
|
67
67
|
if (this.fields) {
|
68
68
|
opts.fields = this.fields;
|
69
69
|
}
|
70
|
-
const
|
71
|
-
|
72
|
-
|
70
|
+
const allFiles = [];
|
71
|
+
let pageToken;
|
72
|
+
do {
|
73
|
+
const {
|
74
|
+
files, nextPageToken,
|
75
|
+
} = await this.googleDrive.listFilesInPage(pageToken, opts);
|
76
|
+
allFiles.push(...files);
|
77
|
+
pageToken = nextPageToken;
|
78
|
+
} while (pageToken);
|
79
|
+
$.export("$summary", `Successfully found ${allFiles.length} file(s).`);
|
80
|
+
return allFiles;
|
73
81
|
},
|
74
82
|
};
|