Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.0.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
calebfaruki committed Mar 6, 2019
2 parents 91e8b14 + 8e1abd1 commit 0aebf6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion gdrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ const delay = (ms) => {

class GDrive {
constructor () {
// Hack to fix knot problem with key that has spaces and new lines.
// TODO: Replace with base64 encoding and decoding.
let PRIVATE_KEY = process.env.PRIVATE_KEY
PRIVATE_KEY = PRIVATE_KEY.replace(/<SPACE>/g, ' ')
PRIVATE_KEY = PRIVATE_KEY.replace(/<NEWLINE>/g, '\n')
this.driveOptions = {
pageSize: 200,
corpora: 'teamDrive',
Expand All @@ -22,7 +27,7 @@ class GDrive {
this.authCredentials = [
process.env.CLIENT_EMAIL,
null,
process.env.PRIVATE_KEY,
PRIVATE_KEY,
['https://www.googleapis.com/auth/drive'],
process.env.USER_EMAIL,
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@knotel/gdrive-lib",
"description": "Library for building/fetching Google Team Drive metadata in nested JSON format",
"version": "0.0.10",
"version": "0.0.11",
"main": "gdrive.js",
"repository": "[email protected]:knotel/gdrive-lib.git",
"author": "[email protected]",
Expand Down

0 comments on commit 0aebf6d

Please sign in to comment.