@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 docs](https://developers.google.com/drive/api/v3/reference/files/list) for more information",
8
- version: "0.1.3",
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 files = (await this.googleDrive.listFilesInPage(null, opts)).files;
71
- $.export("$summary", `Successfully found ${files.length} file(s).`);
72
- return files;
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_drive",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "Pipedream Google_drive Components",
5
5
  "main": "google_drive.app.mjs",
6
6
  "keywords": [