@adobe/aio-lib-ims-oauth
Advanced tools
Comparing version 5.0.2 to 5.1.0
{ | ||
"name": "@adobe/aio-lib-ims-oauth", | ||
"description": "OAuth2 (SUSI) token creation plugin for @adobe/aio-lib-ims", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"author": "Adobe Inc.", | ||
@@ -11,4 +11,4 @@ "bugs": "https://github.com/adobe/aio-lib-ims-oauth/issues", | ||
"@adobe/aio-lib-env": "^2.0.0", | ||
"@oclif/core": "^1.14.2", | ||
"ora": "^4.0.3" | ||
"@oclif/core": "^2.3.0", | ||
"open": "^8.4.2" | ||
}, | ||
@@ -15,0 +15,0 @@ "peerDependencies": { |
@@ -76,3 +76,10 @@ /* | ||
.then(() => { | ||
const options = { bare: config[CLI_BARE_OUTPUT], env: config.env, timeout: config.timeout, open: config.open, browser: config.browser } | ||
const options = { | ||
client_id: config.client_id, | ||
bare: config[CLI_BARE_OUTPUT], | ||
env: config.env, | ||
timeout: config.timeout, | ||
open: config.open, | ||
browser: config.browser | ||
} | ||
return login(options) | ||
@@ -79,0 +86,0 @@ }) |
@@ -14,4 +14,4 @@ /* | ||
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-lib-ims-oauth:login', { provider: 'debug' }) | ||
const ora = require('ora') | ||
const { CliUx } = require('@oclif/core') | ||
const { ux } = require('@oclif/core') | ||
const open = require('open') | ||
const { randomId, authSiteUrl, getImsCliOAuthUrl, createServer, handleOPTIONS, handleGET, handlePOST, handleUnsupportedHttpMethod } = require('./helpers') | ||
@@ -37,4 +37,12 @@ const { codes: errors } = require('./errors') | ||
// eslint-disable-next-line camelcase | ||
const { bare = false, env, timeout = AUTH_TIMEOUT_SECONDS, client_id, scope, open = true, browser: app } = options | ||
const { | ||
bare = false, | ||
env, | ||
timeout = AUTH_TIMEOUT_SECONDS, | ||
client_id, // eslint-disable-line camelcase | ||
scope, | ||
open: autoOpen = true, | ||
browser: app | ||
} = options | ||
const redirect_uri = `${getImsCliOAuthUrl(env)}${LOGIN_SUCCESS}` // eslint-disable-line camelcase | ||
@@ -50,13 +58,9 @@ const id = randomId() | ||
return new Promise((resolve, reject) => { | ||
let spinner | ||
if (!bare) { | ||
console.log('Visit this url to log in: ') | ||
CliUx.ux.url(uri, uri) | ||
spinner = ora('Waiting for browser login').start() | ||
ux.url(uri, uri) | ||
ux.action.start('Waiting for browser login') | ||
} | ||
if (open) { | ||
CliUx.ux.open(uri, { | ||
app | ||
}) | ||
if (autoOpen) { | ||
open(uri, { app }) | ||
} | ||
@@ -67,3 +71,3 @@ | ||
if (!bare) { | ||
spinner.stop() | ||
ux.action.stop() | ||
} | ||
@@ -75,3 +79,3 @@ }, timeout * 1000) | ||
if (!bare) { | ||
spinner.stop() | ||
ux.action.stop() | ||
} | ||
@@ -103,3 +107,4 @@ server.close() | ||
if (!bare) { | ||
spinner.fail() | ||
ux.action.stop() | ||
// spinner.fail() | ||
} | ||
@@ -106,0 +111,0 @@ cleanup() |
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
36904
540
+ Addedopen@^8.4.2
+ Added@azure/core-rest-pipeline@1.18.1(transitive)
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@oclif/core@2.16.0(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/cli-progress@3.11.6(transitive)
+ Added@types/node@22.10.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedastral-regex@2.0.0(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedslice-ansi@4.0.0(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedtypescript@5.7.2(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedwordwrap@1.0.0(transitive)
+ Addedyn@3.1.1(transitive)
- Removedora@^4.0.3
- Removed@azure/core-rest-pipeline@1.18.0(transitive)
- Removed@oclif/core@1.26.2(transitive)
- Removed@oclif/linewrap@1.0.0(transitive)
- Removed@oclif/screen@3.0.8(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.23.0.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedlog-symbols@3.0.0(transitive)
- Removedmute-stream@0.0.8(transitive)
- Removedora@4.1.1(transitive)
- Removedsupports-color@5.5.0(transitive)
Updated@oclif/core@^2.3.0