Deferred from #5 (see PR #12).
GoogleDriveTransport.upload() calls files.create and returns the new fileId, but the consumer owns the manifest that persists it. If the process dies between the successful create and the manifest write, the Doc exists in Drive with nothing pointing at it — and the next publish creates a duplicate, forever.
Under drive.file, files.list only returns files this app created, so tagging creates with appProperties makes the orphan findable at no additional scope.
Tasks
Also worth doing before the first npm release
Every Drive test is mocked. The review flagged files.update carrying mimeType: application/vnd.google-apps.document as the call shape most likely to behave differently against the real API. One manual smoke test against a real account: create → confirm it opens as a native Google Doc; update → confirm the content changed and the mimeType is still application/vnd.google-apps.document; confirm folderId works with a Picker-granted folder.
Deferred from #5 (see PR #12).
GoogleDriveTransport.upload()callsfiles.createand returns the newfileId, but the consumer owns the manifest that persists it. If the process dies between the successful create and the manifest write, the Doc exists in Drive with nothing pointing at it — and the next publish creates a duplicate, forever.Under
drive.file,files.listonly returns files this app created, so tagging creates withappPropertiesmakes the orphan findable at no additional scope.Tasks
appProperties: { polydocCanonicalId: canonicalId }onfiles.create(and preserve it on update).findExistingFileId(canonicalId)— queryingappProperties has {key='polydocCanonicalId' and value='...'}, usable as aresolveExistingFileIdimplementation.Also worth doing before the first npm release
Every Drive test is mocked. The review flagged
files.updatecarryingmimeType: application/vnd.google-apps.documentas the call shape most likely to behave differently against the real API. One manual smoke test against a real account: create → confirm it opens as a native Google Doc; update → confirm the content changed and the mimeType is stillapplication/vnd.google-apps.document; confirmfolderIdworks with a Picker-granted folder.