Skip to content

Commit

Permalink
Rename reset to logout
Browse files Browse the repository at this point in the history
Fix #114
  • Loading branch information
Mikescops committed Jul 27, 2023
1 parent 120da96 commit 1a995f5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion documentation/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"install": "Install",
"personal": "Personal",
"business": "Business",
"reset": "Reset local data"
"logout": "Logout"
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Callout } from 'nextra/components';

# Reset local data
# Logout

If you want to start fresh with the CLI or use another account, you can reset the local data by running the following command:
If you want to start fresh with the CLI or use another account, you can logout and reset the local data by running the following command:

```sh copy
dcli reset
dcli logout
```

<Callout type="info" emoji="ℹ️">
Expand Down
2 changes: 1 addition & 1 deletion documentation/pages/personal/devices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ dcli devices remove --all
```

<Callout type="info" emoji="ℹ️">
If you remove the current CLI device, you will need to do a `dcli reset` in order to re-authenticate.
If you remove the current CLI device, you will need to do a `dcli logout` in order to re-authenticate.
</Callout>
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ devicesGroup
.option('--all', 'remove all devices (dangerous)')
.option('--other', 'remove all other devices')
.argument('[device ids...]', 'ids of the devices to remove')
.description('Unregisters a list of devices. Unregistering the CLI will implies doing a "dcli reset"')
.description('De-registers a list of devices. De-registering the CLI will implies doing a "dcli logout"')
.action(removeAllDevices);

const teamGroup = program.command('team').alias('t').description('Team related commands');
Expand Down Expand Up @@ -266,8 +266,8 @@ configureGroup
});

program
.command('reset')
.description('Reset and clean your local database and OS keychain')
.command('logout')
.description('Logout and clean your local database and OS keychain')
.action(async () => {
const resetConfirmation = await askConfirmReset();
if (resetConfirmation) {
Expand All @@ -280,13 +280,13 @@ program
if (error instanceof Error) {
errorMessage = error.message;
}
winston.debug(`Unable to read device configuration during reset: ${errorMessage}`);
winston.debug(`Unable to read device configuration during logout: ${errorMessage}`);

db = connect();
db.serialize();
}
reset({ db, secrets });
console.log('The local Dashlane local storage has been reset');
console.log('The local Dashlane local storage has been reset and you have been logged out');
db.close();
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const askConfirmReset = async () => {
{
type: 'list',
name: 'confirmReset',
message: 'Do you really want to delete all local data from this app?',
message: 'Do you really want to logout and delete all local data from this app?',
choices: ['Yes', 'No'],
},
]);
Expand Down

0 comments on commit 1a995f5

Please sign in to comment.