@pipedream/google_drive 0.4.10 → 0.4.11
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/package.json
CHANGED
|
@@ -19,9 +19,8 @@ export default {
|
|
|
19
19
|
...common,
|
|
20
20
|
key: "google_drive-new-or-modified-files",
|
|
21
21
|
name: "New or Modified Files",
|
|
22
|
-
description:
|
|
23
|
-
|
|
24
|
-
version: "0.0.20",
|
|
22
|
+
description: "Emit new event any time any file in your linked Google Drive is added, modified, or deleted",
|
|
23
|
+
version: "0.0.21",
|
|
25
24
|
type: "source",
|
|
26
25
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
27
26
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -50,8 +49,11 @@ export default {
|
|
|
50
49
|
},
|
|
51
50
|
async processChanges(changedFiles, headers) {
|
|
52
51
|
for (const file of changedFiles) {
|
|
52
|
+
const metadata = await this.googleDrive.getFileMetadata(`${headers["x-goog-resource-uri"]}&fields=*`);
|
|
53
|
+
|
|
53
54
|
const eventToEmit = {
|
|
54
55
|
file,
|
|
56
|
+
...metadata,
|
|
55
57
|
change: {
|
|
56
58
|
state: headers["x-goog-resource-state"],
|
|
57
59
|
resourceURI: headers["x-goog-resource-uri"],
|
|
@@ -19,9 +19,8 @@ export default {
|
|
|
19
19
|
...common,
|
|
20
20
|
key: "google_drive-new-or-modified-folders",
|
|
21
21
|
name: "New or Modified Folders",
|
|
22
|
-
description:
|
|
23
|
-
|
|
24
|
-
version: "0.0.9",
|
|
22
|
+
description: "Emit new event any time any folder in your linked Google Drive is added, modified, or deleted",
|
|
23
|
+
version: "0.0.10",
|
|
25
24
|
type: "source",
|
|
26
25
|
// Dedupe events based on the "x-goog-message-number" header for the target channel:
|
|
27
26
|
// https://developers.google.com/drive/api/v3/push#making-watch-requests
|
|
@@ -68,8 +67,11 @@ export default {
|
|
|
68
67
|
const modifiedTime = Date.parse(fileInfo.modifiedTime);
|
|
69
68
|
if (lastModifiedTimeForFile == modifiedTime) continue;
|
|
70
69
|
|
|
70
|
+
const metadata = await this.googleDrive.getFileMetadata(`${headers["x-goog-resource-uri"]}&fields=*`);
|
|
71
|
+
|
|
71
72
|
const eventToEmit = {
|
|
72
73
|
file,
|
|
74
|
+
...metadata,
|
|
73
75
|
change: {
|
|
74
76
|
state: headers["x-goog-resource-state"],
|
|
75
77
|
resourceURI: headers["x-goog-resource-uri"],
|