Skip to content

Commit

Permalink
fix(terminal-link): remove hyperlinks from the terminal link and disp…
Browse files Browse the repository at this point in the history
…lay the URL instead
  • Loading branch information
sglkc committed Apr 5, 2023
1 parent 6c2f447 commit 38a2baa
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 92 deletions.
7 changes: 2 additions & 5 deletions .releaserc.json
Expand Up @@ -49,12 +49,9 @@
[
"@semantic-release/git",
{
"assets": [
"package.json",
"CHANGELOG.md"
],
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
}
2 changes: 1 addition & 1 deletion esbuild.json
Expand Up @@ -14,4 +14,4 @@
"kuromoji",
"terminal-kit"
]
}
}
73 changes: 5 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -58,8 +58,7 @@
"ora": "^6.1.2",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"terminal-kit": "^3.0.0",
"terminal-link": "^3.0.0"
"terminal-kit": "^3.0.0"
},
"devDependencies": {
"@faker-js/faker": "^7.6.0",
Expand Down
@@ -1,7 +1,6 @@
import { isAxiosError } from 'axios';
import chalk from 'chalk';
import { catchError, MonoTypeOperatorFunction, pipe, throwError } from 'rxjs';
import terminalLink from 'terminal-link';

export const throwAxiosErrorResponseIfAvailable = <T>(
from: string,
Expand All @@ -16,10 +15,7 @@ export const throwAxiosErrorResponseIfAvailable = <T>(
error.response?.data,
)}\n\nSource: ${from}\n\nPlease rerun the related command again or try to run ${chalk.inverse(
'lyricstify init',
)}. If this does not solve your problem feel free to open a new issue to ${terminalLink(
'this link',
'https://github.com/lyricstify/lyricstify/issues/',
)}.`;
)}. If this does not solve your problem feel free to open a new issue to https://github.com/lyricstify/lyricstify/issues/`;

return new Error(message);
}
Expand Down
7 changes: 1 addition & 6 deletions src/initialize/initialize.command.ts
Expand Up @@ -6,7 +6,6 @@ import {
Option,
} from 'nest-commander';
import ora from 'ora';
import terminalLink from 'terminal-link';
import { CommandValidationService } from '../command-validation/command-validation.service.js';
import { InitializeOptionsDto } from './dto/initialize-options.dto.js';
import { RequestAuthorizationDto } from './dto/request-authorization.dto.js';
Expand Down Expand Up @@ -46,11 +45,7 @@ export class InitializeCommand extends CommandRunner {
requestAuthorizationDto,
);

console.info(
`Please open ${chalk.bold(
terminalLink('this link', link),
)} to start authorize.`,
);
console.info(`Please open ${chalk.bold(link)} to start authorize.`);

const loading = ora('We are waiting for you to finish.').start();
const result = await this.initializeService.authorize(initializeOptionsDto);
Expand Down
6 changes: 1 addition & 5 deletions src/initialize/initialize.question.ts
Expand Up @@ -7,7 +7,6 @@ import {
ValidateFor,
WhenFor,
} from 'nest-commander';
import terminalLink from 'terminal-link';
import { ClientService } from '../client/client.service.js';
import { CommandValidationService } from '../command-validation/command-validation.service.js';
import { InitializeOptionsInterface } from './interfaces/initialize-options.interface.js';
Expand All @@ -33,10 +32,7 @@ export class InitializeQuestion {
return 'We detected that there was already a previously saved configuration. Do you want to update it?';
}

const link = terminalLink(
'this page first',
'https://github.com/lyricstify/lyricstify/',
);
const link = 'https://github.com/lyricstify/lyricstify/';

return `Welcome to Lyricstify! Please follow the guide on ${chalk.bold(
link,
Expand Down

0 comments on commit 38a2baa

Please sign in to comment.