mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
This commit is contained in:
@@ -18,11 +18,11 @@ export class ExportCredentialsCommand extends Command {
|
||||
static description = 'Export credentials';
|
||||
|
||||
static examples = [
|
||||
`$ n8n export:credentials --all`,
|
||||
`$ n8n export:credentials --id=5 --output=file.json`,
|
||||
`$ n8n export:credentials --all --output=backups/latest.json`,
|
||||
`$ n8n export:credentials --backup --output=backups/latest/`,
|
||||
`$ n8n export:credentials --all --decrypted --output=backups/decrypted.json`,
|
||||
'$ n8n export:credentials --all',
|
||||
'$ n8n export:credentials --id=5 --output=file.json',
|
||||
'$ n8n export:credentials --all --output=backups/latest.json',
|
||||
'$ n8n export:credentials --backup --output=backups/latest/',
|
||||
'$ n8n export:credentials --all --decrypted --output=backups/decrypted.json',
|
||||
];
|
||||
|
||||
static flags = {
|
||||
@@ -69,25 +69,25 @@ export class ExportCredentialsCommand extends Command {
|
||||
}
|
||||
|
||||
if (!flags.all && !flags.id) {
|
||||
console.info(`Either option "--all" or "--id" have to be set!`);
|
||||
console.info('Either option "--all" or "--id" have to be set!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags.all && flags.id) {
|
||||
console.info(`You should either use "--all" or "--id" but never both!`);
|
||||
console.info('You should either use "--all" or "--id" but never both!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags.separate) {
|
||||
try {
|
||||
if (!flags.output) {
|
||||
console.info(`You must inform an output directory via --output when using --separate`);
|
||||
console.info('You must inform an output directory via --output when using --separate');
|
||||
return;
|
||||
}
|
||||
|
||||
if (fs.existsSync(flags.output)) {
|
||||
if (!fs.lstatSync(flags.output).isDirectory()) {
|
||||
console.info(`The parameter --output must be a directory`);
|
||||
console.info('The parameter --output must be a directory');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -106,7 +106,7 @@ export class ExportCredentialsCommand extends Command {
|
||||
} else if (flags.output) {
|
||||
if (fs.existsSync(flags.output)) {
|
||||
if (fs.lstatSync(flags.output).isDirectory()) {
|
||||
console.info(`The parameter --output must be a writeable file`);
|
||||
console.info('The parameter --output must be a writeable file');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user