@@ -29,8 +29,7 @@ module.exports = {
2929 updateTypes : {
3030 type : "string[]" ,
3131 label : "Types of updates" ,
32- description :
33- `The types of updates you want to watch for on these files.
32+ description : `The types of updates you want to watch for on these files.
3433 [See Google's docs]
3534 (https://developers.google.com/drive/api/v3/push#understanding-drive-api-notification-events).` ,
3635 // https://developers.google.com/drive/api/v3/push#understanding-drive-api-notification-events
@@ -40,8 +39,7 @@ module.exports = {
4039 watchForPropertiesChanges : {
4140 type : "boolean" ,
4241 label : "Watch for changes to file properties" ,
43- description :
44- `Watch for changes to [file properties](https://developers.google.com/drive/api/v3/properties)
42+ description : `Watch for changes to [file properties](https://developers.google.com/drive/api/v3/properties)
4543 in addition to changes to content. **Defaults to \`false\`, watching for only changes to content**.` ,
4644 optional : true ,
4745 default : false ,
@@ -230,7 +228,9 @@ module.exports = {
230228 const {
231229 drives = [ ] ,
232230 nextPageToken,
233- } = await this . listDrivesInPage ( pageToken ) ;
231+ } = await this . listDrivesInPage (
232+ pageToken ,
233+ ) ;
234234
235235 for ( const drive in drives ) {
236236 yield drive ;
@@ -256,14 +256,15 @@ module.exports = {
256256 // list and assign it a static ID that we can refer to when we need. We
257257 // only do this during the first page of options (i.e. when `pageToken` is
258258 // undefined).
259- const options = pageToken !== undefined
260- ? [ ]
261- : [
262- {
263- label : "My Drive" ,
264- value : MY_DRIVE_VALUE ,
265- } ,
266- ] ;
259+ const options =
260+ pageToken !== undefined
261+ ? [ ]
262+ : [
263+ {
264+ label : "My Drive" ,
265+ value : MY_DRIVE_VALUE ,
266+ } ,
267+ ] ;
267268 for ( const d of drives ) {
268269 options . push ( {
269270 label : d . name ,
@@ -320,7 +321,10 @@ module.exports = {
320321 const {
321322 files,
322323 nextPageToken,
323- } = await this . listFilesInPage ( pageToken , extraOpts ) ;
324+ } = await this . listFilesInPage (
325+ pageToken ,
326+ extraOpts ,
327+ ) ;
324328 const options = files . map ( ( file ) => ( {
325329 label : file . name ,
326330 value : file . id ,
@@ -406,7 +410,8 @@ module.exports = {
406410 }
407411 } ,
408412 _makeWatchRequestBody ( id , address ) {
409- const expiration = Date . now ( ) + WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS ;
413+ const expiration =
414+ Date . now ( ) + WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS ;
410415 return {
411416 id, // the component-specific channel ID, a UUID
412417 type : "web_hook" ,
@@ -500,6 +505,7 @@ module.exports = {
500505 await drive . files . get ( {
501506 fileId,
502507 fields : "*" ,
508+ supportsAllDrives : true ,
503509 } )
504510 ) . data ;
505511 } ,
@@ -548,7 +554,7 @@ module.exports = {
548554 async invokedByTimer ( drive , subscription , url , channelID , pageToken ) {
549555 const newChannelID = channelID || uuid ( ) ;
550556 const driveId = this . getDriveId ( drive ) ;
551- const newPageToken = pageToken || await this . getPageToken ( driveId ) ;
557+ const newPageToken = pageToken || ( await this . getPageToken ( driveId ) ) ;
552558
553559 const {
554560 expiration,
0 commit comments