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

fix: ACNA-1634 - Replace Developer Terms of Service text with help text and Developer Console url #566

Merged
merged 3 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"get-port": "^5.1.1",
"hjson": "^3.2.1",
"http-terminator": "^2.0.3",
"hyperlinker": "^1.0.0",
"inquirer": "^7.0.0",
"js-yaml": "^3.13.1",
"lodash.clonedeep": "^4.5.0",
Expand Down
3 changes: 2 additions & 1 deletion src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const chalk = require('chalk')
// const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:init', { provider: 'debug' })
const { Flags } = require('@oclif/core')
const generators = require('@adobe/generator-aio-app')
const hyperlinker = require('hyperlinker')
Copy link
Member

Choose a reason for hiding this comment

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

since we are already including @oclif/core, why not use CliUx.ux.url? So we don't need another dependency.
https://github.com/oclif/core/tree/main/src/cli-ux

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @shazron ,

  • oclif hyperlink functionality CliUx.ux.url seems to be broken, It returns promise back
  • Unable to use it with template-literals .. It is not working despite many efforts
  • And oclif has underlying same package hyperlink for CliUx.ux.url functionalilty.

Thanks,

Copy link
Member

Choose a reason for hiding this comment

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

Looks like CliUx.ux.url does not return the "hyperlinked" text, but modifies the text stream directly. Let's not waste any more time on this and use hyperlink, your original plan


const { loadAndValidateConfigFile, importConfigJson } = require('../../lib/import')
const { atLeastOne } = require('../../lib/app-helper')
Expand Down Expand Up @@ -133,7 +134,7 @@ class InitCommand extends AddCommand {
if (!isTermAccepted) {
const terms = await consoleCLI.getDevTermsForOrg()
const confirmDevTerms = await consoleCLI.prompt.promptConfirm(`${terms.text}
\nDo you agree with the new Developer Terms?`)
\nYou have not accepted the Developer Terms of Service. Go to ${hyperlinker('https://www.adobe.com/go/developer-terms', 'https://www.adobe.com/go/developer-terms')} to view the terms. Do you accept the terms? (y/n):`)
if (!confirmDevTerms) {
this.error('The Developer Terms of Service were declined')
} else {
Expand Down