diff --git a/src/api/actor.api.ts b/src/api/actor.api.ts index 38cb9b70..45410e5e 100644 --- a/src/api/actor.api.ts +++ b/src/api/actor.api.ts @@ -13,7 +13,7 @@ export const actorParameters = async (): Promise< const token = getProcessToken() ?? (await getToken()); if (isNullish(token)) { - console.log(`${red('No controller found.')} Are you logged in?`); + console.log(`${red('No access key found.')} Are you logged in?`); process.exit(1); } diff --git a/src/api/agent.api.ts b/src/api/agent.api.ts index ab0b926c..6741184f 100644 --- a/src/api/agent.api.ts +++ b/src/api/agent.api.ts @@ -48,7 +48,7 @@ export const initAgent = async (params?: Omit): Promis const {identity, ...rest} = params ?? (await actorParameters()); if (REVOKED_CONTROLLERS.includes(identity.getPrincipal().toText())) { - throw new Error('The controller has been revoked for security reason!'); + throw new Error('The access key has been revoked for security reason!'); } return await agent.getAgent({identity, ...rest}); diff --git a/src/commands/auth.ts b/src/commands/auth.ts index 0291e9dc..a3dd56d7 100644 --- a/src/commands/auth.ts +++ b/src/commands/auth.ts @@ -22,17 +22,15 @@ export const login = async (args?: string[]) => { } const identity = Ed25519KeyIdentity.fromParsedJson(token); - console.log( - `πŸ” Your terminal is already a controller: ${green(identity.getPrincipal().toText())}\n` - ); + console.log(`πŸ” Your terminal already has access: ${green(identity.getPrincipal().toText())}\n`); const {action}: {action: string} = await prompts({ type: 'select', name: 'action', message: 'What would you like to do?', choices: [ - {title: `Create a new controller via a login with your browser`, value: `login`}, - {title: `Reuse the existing controller`, value: `reuse`} + {title: `Create a new access key by logging in with your browser`, value: `login`}, + {title: `Reuse the access key used by your CLI`, value: `reuse`} ] }); diff --git a/src/commands/version.ts b/src/commands/version.ts index 178ea03c..f5e39a2b 100644 --- a/src/commands/version.ts +++ b/src/commands/version.ts @@ -73,7 +73,7 @@ const missionControlVersion = async () => { console.log( `${yellow( 'No mission control found.' - )} Ignore this error if your controller does not control your mission control.` + )} This is expected if your access key doesn't manage it.` ); return; } diff --git a/src/commands/whoami.ts b/src/commands/whoami.ts index b0923ce6..acf2a988 100644 --- a/src/commands/whoami.ts +++ b/src/commands/whoami.ts @@ -24,12 +24,12 @@ const info = async (): Promise<{success: boolean}> => { const token = await getToken(); if (isNullish(token)) { - console.log(`No controller found.`); + console.log(`No access key found.`); return {success: false}; } const identity = Ed25519KeyIdentity.fromParsedJson(token); - console.log(`πŸ” Controller: ${green(identity.getPrincipal().toText())}`); + console.log(`πŸ” Access key: ${green(identity.getPrincipal().toText())}`); return {success: true}; }; diff --git a/src/constants/help.constants.ts b/src/constants/help.constants.ts index 361f2a3c..10cd7fbc 100644 --- a/src/constants/help.constants.ts +++ b/src/constants/help.constants.ts @@ -12,7 +12,7 @@ export const INIT_DESCRIPTION = 'Set up your project.'; export const LOGIN_DESCRIPTION = 'Generate an authentication for use in non-interactive environments.'; export const LOGOUT_DESCRIPTION = - 'Log out of the current device. ⚠️ This action does not remove controllers from the module.'; + 'Log out of the current device. ⚠️ This action does not remove the access keys from the module.'; export const OPEN_DESCRIPTION = 'Open your satellite in your browser.'; export const SNAPSHOT_DESCRIPTION = 'Handle snapshot-related tasks.'; export const START_DESCRIPTION = 'Start a module.'; @@ -21,7 +21,7 @@ export const UPGRADE_DESCRIPTION = 'Upgrade a module to a new version.'; export const USE_DESCRIPTION = 'Switch between multiple profiles.'; export const VERSION_DESCRIPTION = 'Check the version of the modules and CLI.'; export const WHOAMI_DESCRIPTION = - 'Display your current profile, controller, and links to your satellite.'; + 'Display your current profile, access key, and links to your satellite.'; export const DEV_START_DESCRIPTION = 'Start a local Internet Computer network in a container.'; diff --git a/src/services/controllers.services.ts b/src/services/controllers.services.ts index 5cb2e819..8ce7ab0f 100644 --- a/src/services/controllers.services.ts +++ b/src/services/controllers.services.ts @@ -13,7 +13,7 @@ export const reuseController = async (controller: Principal) => { const segment = await selectSegment(); console.log( - `Before you finish setting things up, you'll need to add the controller to ${displaySegment(segment)} in Juno's console.\n\nFollow these steps:` + `Before you finish setting things up, you'll need to add the access key to ${displaySegment(segment)} in Juno's console.\n\nFollow these steps:` ); await setControllerManually({controller, segment}); @@ -23,7 +23,7 @@ export const reuseController = async (controller: Principal) => { name: 'segmentId', message: `Good. So, what's the ${green( `${displaySegment(segment)} ID` - )} to which you just added the controller?` + )} to which you just added the access key?` }); if (segmentId === undefined) { @@ -105,10 +105,10 @@ const selectSegment = async (): Promise => { const {segment}: {segment: AssetKey} = await prompts({ type: 'select', name: 'segment', - message: 'Which new segment would you like to authorize with your controller?', + message: 'Which module would you like to authorize with your access key?', choices: [ {title: 'A satellite', value: 'satellite'}, - {title: 'The orbiter for the analytics', value: 'orbiter'}, + {title: 'The orbiter (analytics)', value: 'orbiter'}, {title: 'Your mission control', value: 'mission_control'} ], initial: 0 @@ -144,13 +144,13 @@ const setControllerManually = async ({ ); } - console.log('2. Find the "Controllers" section and click "Add a controller"'); - console.log('3. Choose "Manually enter a controller"'); - console.log(`4. Enter your terminal controller ${green(controller.toText())} in the input field`); - console.log(`5. Select the ${bold('ADMIN')} scope`); + console.log('2. Find the "Access Keys" section and click "Add an access key"'); + console.log('3. Choose "Enter one manually"'); + console.log(`4. Paste the access key ID from your terminal: ${green(controller.toText())}`); + console.log(`5. Select the ${bold('Admin')} permission`); console.log(`6. Click ${bold('Submit')}`); console.log( - `7. Once it’s successful, copy the ${green(`${displaySegment(segment)} ID`)} where the controller was added\n` + `7. After the key is added, copy the ${green(`${displaySegment(segment)} ID`)} displayed\n` ); await confirmAndExit('Have you completed this step?'); diff --git a/src/services/login.services.ts b/src/services/login.services.ts index ef16c8b1..57c33994 100644 --- a/src/services/login.services.ts +++ b/src/services/login.services.ts @@ -24,7 +24,7 @@ export const login = async (args?: string[]) => { const principal = key.getPrincipal().toText(); const token = key.toJSON(); - console.log(`\nπŸ”“ Your terminal will take control as: ${green(principal)}`); + console.log(`\nπŸ”“ Your terminal will assume admin control as: ${green(principal)}`); const browser = nextArg({args, option: '-b'}) ?? nextArg({args, option: '--browser'}); diff --git a/src/services/modules/snapshot/snapshot.mission-control.services.ts b/src/services/modules/snapshot/snapshot.mission-control.services.ts index 367930e9..d064dbfb 100644 --- a/src/services/modules/snapshot/snapshot.mission-control.services.ts +++ b/src/services/modules/snapshot/snapshot.mission-control.services.ts @@ -32,9 +32,7 @@ const executeSnapshotFn = async ({ // TODO: this can be a common assertion if (isNullish(missionControl)) { console.log( - `${red( - 'No mission control found.' - )} Ignore this error if your controller does not control your mission control.` + `${red('No mission control found.')} This is expected if your access key doesn't manage it.` ); return; } diff --git a/src/services/modules/upgrade/upgrade.mission-control.services.ts b/src/services/modules/upgrade/upgrade.mission-control.services.ts index 2f0a1933..baa1672b 100644 --- a/src/services/modules/upgrade/upgrade.mission-control.services.ts +++ b/src/services/modules/upgrade/upgrade.mission-control.services.ts @@ -22,9 +22,7 @@ export const upgradeMissionControl = async (args?: string[]) => { if (isNullish(missionControl)) { console.log( - `${red( - 'No mission control found.' - )} Ignore this error if your controller does not control your mission control.` + `${red('No mission control found.')} This is expected if your access key doesn't manage it.` ); return; }