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

Commit 0aebf6d

Browse files
committed
Merge branch 'release/0.0.11'
2 parents 91e8b14 + 8e1abd1 commit 0aebf6d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gdrive.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ const delay = (ms) => {
1111

1212
class GDrive {
1313
constructor () {
14+
// Hack to fix knot problem with key that has spaces and new lines.
15+
// TODO: Replace with base64 encoding and decoding.
16+
let PRIVATE_KEY = process.env.PRIVATE_KEY
17+
PRIVATE_KEY = PRIVATE_KEY.replace(/<SPACE>/g, ' ')
18+
PRIVATE_KEY = PRIVATE_KEY.replace(/<NEWLINE>/g, '\n')
1419
this.driveOptions = {
1520
pageSize: 200,
1621
corpora: 'teamDrive',
@@ -22,7 +27,7 @@ class GDrive {
2227
this.authCredentials = [
2328
process.env.CLIENT_EMAIL,
2429
null,
25-
process.env.PRIVATE_KEY,
30+
PRIVATE_KEY,
2631
['https://www.googleapis.com/auth/drive'],
2732
process.env.USER_EMAIL,
2833
]

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@knotel/gdrive-lib",
33
"description": "Library for building/fetching Google Team Drive metadata in nested JSON format",
4-
"version": "0.0.10",
4+
"version": "0.0.11",
55
"main": "gdrive.js",
66
"repository": "[email protected]:knotel/gdrive-lib.git",
77
"author": "[email protected]",

0 commit comments

Comments
 (0)