Skip to content

Commit

Permalink
refactor: naming consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
tillwestpfahl committed Aug 28, 2024
1 parent 283548a commit 5e77b9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/commands/mail/address/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export default class Create extends ExecRenderBaseCommand<
return [await generateRandomPassword(process), true];
}

return [await process.addInput(<Text>Mailbox password</Text>, true), false];
return [
await process.addInput(<Text>enter mailbox password</Text>, true),
false,
];
}

protected async createForwardAddress(
Expand Down
16 changes: 8 additions & 8 deletions src/commands/mail/deliverybox/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { FlagInput, OutputFlags } from "@oclif/core/lib/interfaces/parser.js";
import { generateRandomPassword } from "../commons.js";

type CreateResult = {
deliveryboxId: string;
deliveryBoxId: string;
generatedPassword: string | null;
};

Expand Down Expand Up @@ -75,12 +75,12 @@ export default class Create extends ExecRenderBaseCommand<
}

return [
await process.addInput(<Text>Deliverybox password</Text>, true),
await process.addInput(<Text>enter delivery box password</Text>, true),
false,
];
}

protected async createMailDeliverybox(
protected async createMailDeliveryBox(
projectId: string,
process: ProcessRenderer,
flags: OutputFlags<FlagInput<typeof Create.flags>>,
Expand All @@ -104,11 +104,11 @@ export default class Create extends ExecRenderBaseCommand<
);

await process.complete(
<Success>Your mail deliverybox was successfully created.</Success>,
<Success>Your mail delivery box was successfully created.</Success>,
);

return {
deliveryboxId: response.data.id,
deliveryBoxId: response.data.id,
generatedPassword: passwordGenerated ? password : null,
};
}
Expand All @@ -122,21 +122,21 @@ export default class Create extends ExecRenderBaseCommand<
"Creating a new mail delivery box",
);

return this.createMailDeliverybox(projectId, process, flags);
return this.createMailDeliveryBox(projectId, process, flags);
}

protected render(executionResult: CreateResult): ReactNode {
if (this.flags.quiet) {
if (executionResult.generatedPassword) {
return (
<Text>
{executionResult.deliveryboxId}
{executionResult.deliveryBoxId}
{"\t"}
{executionResult.generatedPassword}
</Text>
);
}
return <Text>{executionResult.deliveryboxId}</Text>;
return <Text>{executionResult.deliveryBoxId}</Text>;
}
}
}

0 comments on commit 5e77b9c

Please sign in to comment.