Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move auth functions to auth.ts #154

Merged
merged 1 commit into from Apr 30, 2018
Merged

Move auth functions to auth.ts #154

merged 1 commit into from Apr 30, 2018

Conversation

campionfellin
Copy link
Collaborator

Including:
REDIRECT_URI_OOB
oauth2Client
getAPICredentials
authorizeWithLocalHost
authorizeWithoutLocalHost

Note: I am exporting LOG from index.ts just until we move it to /src/commands.ts

Also, though the tsconfig.json file still has this:

  "files": [
    "index.ts",
    "tests/test.ts",
    "src/utils.ts"
  ]

It still compiles /src/auth.ts into /src/auth.js. Might be worth looking into.

Signed-off-by: campionfellin campionfellin@gmail.com

Works on #134

  • npm run test succeeds.
  • npm run lint succeeds.
  • Appropriate changes to README are included in PR.

Including:
REDIRECT_URI_OOB
oauth2Client
getAPICredentials
authorizeWithLocalHost
authorizeWithoutLocalHost

Signed-off-by: campionfellin <campionfellin@gmail.com>
const script = google.script({
version: 'v1',
auth: oauth2Client,
});

// Log messages (some logs take required params)
const LOG = {
export const LOG = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note above: this is just temporary

const open = require('open');
const readline = require('readline');
//Just for now, until it moves into /src/commands.ts
import { LOG } from '../index.js';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note, this is just temporary until we make /src/commands.ts

@coveralls
Copy link

coveralls commented Apr 29, 2018

Pull Request Test Coverage Report for Build 136

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • 255 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.6%) to 12.068%

Files with Coverage Reduction New Missed Lines %
index.js 255 6.47%
Totals Coverage Status
Change from base Build 135: 0.6%
Covered Lines: 130
Relevant Lines: 801

💛 - Coveralls

@grant
Copy link
Contributor

grant commented Apr 30, 2018

Thanks for the detailed comments. LGTM.

@grant grant merged commit 22e0925 into google:master Apr 30, 2018
@campionfellin campionfellin mentioned this pull request Apr 30, 2018
3 tasks
@campionfellin campionfellin deleted the auth branch May 25, 2018 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants