google-oauth2-env-vars
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "google-oauth2-env-vars", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Generate and cache Google OAuth 2.0 tokens in .env files", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/cedricdelpoux/google-oauth2-env-vars", |
@@ -1,5 +0,13 @@ | ||
# google-oauth2-env-vars | ||
<div align="center"> | ||
<h1>google-oauth2-env-vars<h1> | ||
[![npm package][npm-badge]][npm] | ||
[![Npm version][badge-npm]][npm] | ||
[![Npm downloads][badge-npm-dl]][npm] | ||
[![MIT license][badge-licence]](./LICENCE.md) | ||
[![PRs welcome][badge-prs-welcome]](#contributing) | ||
</div> | ||
--- | ||
Helper class to generate and cache `Google OAuth 2.0` tokens in `.env` files: | ||
@@ -13,4 +21,10 @@ | ||
## Examples | ||
## Usage | ||
Download package from the NPM registry: | ||
```shell | ||
yarn add google-oauth2-env-vars | ||
``` | ||
### Generate .env vars | ||
@@ -52,4 +66,7 @@ | ||
[npm-badge]: https://img.shields.io/npm/v/google-oauth2-env-vars.svg?style=flat-square | ||
[badge-npm]: https://img.shields.io/npm/v/google-oauth2-env-vars.svg?style=flat-square | ||
[badge-npm-dl]: https://img.shields.io/npm/dt/google-oauth2-env-vars.svg?style=flat-square | ||
[badge-licence]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square | ||
[badge-prs-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square | ||
[npm]: https://www.npmjs.org/package/google-oauth2-env-vars | ||
[github-issue]: https://github.com/cedricdelpoux/google-oauth2-env-vars/issues/new |
@@ -10,4 +10,4 @@ const inquirer = require("inquirer") | ||
if (process.env[CLIENT_ID] && process.env[CLIENT_SECRET]) { | ||
console.log(`✅${CLIENT_ID} found in .env`) | ||
console.log(`✅${CLIENT_SECRET} found in .env`) | ||
console.log(`✅ ${CLIENT_ID} found in .env`) | ||
console.log(`✅ ${CLIENT_SECRET} found in .env`) | ||
console.log("") | ||
@@ -14,0 +14,0 @@ return { |
@@ -11,7 +11,7 @@ /* global Promise */ | ||
app.listen(5000, async () => { | ||
console.log("🤚🏻You need to authorize your application") | ||
console.log("🤚 You need to authorize your application") | ||
await openUrl({message: "Authorization URL:", url: authUrl}) | ||
console.log("🛑Follow the URL to authorize your application") | ||
console.log("🛑 Follow the URL to authorize your application") | ||
}) | ||
@@ -21,3 +21,3 @@ | ||
if (req.query.code) { | ||
console.log("✅Application authorized") | ||
console.log("✅ Application authorized") | ||
res.send( | ||
@@ -24,0 +24,0 @@ "Succeed! You can close this tab and go back to your terminal." |
@@ -23,7 +23,7 @@ const {google} = require("googleapis") | ||
for (const api of apisToEnable) { | ||
console.log(`🤚🏻You need to enable "${api}" API`) | ||
console.log(`🤚 You need to enable "${api}" API`) | ||
await openUrl({message: "API URL:", url: `${ENABLE_API_URL}${api}`}) | ||
console.log(`🛑Follow the URL to Enable "${api}" API`) | ||
console.log(`🛑 Follow the URL to Enable "${api}" API`) | ||
@@ -30,0 +30,0 @@ await waitInput() |
@@ -16,3 +16,3 @@ const inquirer = require("inquirer") | ||
value: "browser", | ||
short: "🌐Opened in your browser", | ||
short: "🌐 Opened in your browser", | ||
}, | ||
@@ -22,3 +22,3 @@ { | ||
value: "clipboard", | ||
short: "📋Added to your clipboard", | ||
short: "📋 Added to your clipboard", | ||
}, | ||
@@ -28,3 +28,3 @@ { | ||
value: "terminal", | ||
short: `🔗${url}`, | ||
short: `🔗 ${url}`, | ||
}, | ||
@@ -31,0 +31,0 @@ ], |
@@ -11,3 +11,3 @@ /* global Promise */ | ||
rl.question("🚦Type to continue", () => { | ||
rl.question("🚦 Type to continue", () => { | ||
console.log("") | ||
@@ -14,0 +14,0 @@ console.log("------------------------") |
@@ -14,3 +14,3 @@ const glob = require("glob") | ||
fs.appendFileSync(file, `${name}=${value}\n`) | ||
console.log(`✅${name} added to ${file}`) | ||
console.log(`✅ ${name} added to ${file}`) | ||
}) | ||
@@ -17,0 +17,0 @@ console.log("") |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12205
71