mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: 🚨 Always explicitely state member accessibility
This commit is contained in:
parent
7a73b8db91
commit
54cea29ce9
36 changed files with 227 additions and 196 deletions
|
|
@ -9,21 +9,21 @@ import { BaseCommand } from "~/cli/base";
|
|||
import { formatArray } from "~/cli/utils/format";
|
||||
|
||||
export default class UserCreate extends BaseCommand<typeof UserCreate> {
|
||||
static override args = {
|
||||
public static override args = {
|
||||
username: Args.string({
|
||||
description: "Username",
|
||||
required: true,
|
||||
}),
|
||||
};
|
||||
|
||||
static override description = "Creates a new user";
|
||||
public static override description = "Creates a new user";
|
||||
|
||||
static override examples = [
|
||||
public static override examples = [
|
||||
"<%= config.bin %> <%= command.id %> johngastron --email joe@gamer.com",
|
||||
"<%= config.bin %> <%= command.id %> bimbobaggins",
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
public static override flags = {
|
||||
format: Flags.string({
|
||||
char: "f",
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ import { UserFinderCommand } from "~/cli/classes";
|
|||
import { formatArray } from "~/cli/utils/format";
|
||||
|
||||
export default class UserDelete extends UserFinderCommand<typeof UserDelete> {
|
||||
static override description = "Deletes users";
|
||||
public static override description = "Deletes users";
|
||||
|
||||
static override examples = [
|
||||
public static override examples = [
|
||||
"<%= config.bin %> <%= command.id %> johngastron --type username",
|
||||
"<%= config.bin %> <%= command.id %> 018ec11c-c6cb-7a67-bd20-a4c81bf42912",
|
||||
'<%= config.bin %> <%= command.id %> "*badword*" --pattern --type username',
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
public static override flags = {
|
||||
confirm: Flags.boolean({
|
||||
description:
|
||||
"Ask for confirmation before deleting the user (default yes)",
|
||||
|
|
@ -23,7 +23,7 @@ export default class UserDelete extends UserFinderCommand<typeof UserDelete> {
|
|||
}),
|
||||
};
|
||||
|
||||
static override args = {
|
||||
public static override args = {
|
||||
identifier: UserFinderCommand.baseArgs.identifier,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ import { BaseCommand } from "~/cli/base";
|
|||
import { formatArray } from "~/cli/utils/format";
|
||||
|
||||
export default class UserList extends BaseCommand<typeof UserList> {
|
||||
static override args = {};
|
||||
public static override args = {};
|
||||
|
||||
static override description = "List all users";
|
||||
public static override description = "List all users";
|
||||
|
||||
static override examples = [
|
||||
public static override examples = [
|
||||
"<%= config.bin %> <%= command.id %> --format json --local",
|
||||
"<%= config.bin %> <%= command.id %>",
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
public static override flags = {
|
||||
format: Flags.string({
|
||||
char: "f",
|
||||
description: "Output format",
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import { UserFinderCommand } from "~/cli/classes";
|
|||
import { formatArray } from "~/cli/utils/format";
|
||||
|
||||
export default class UserRefetch extends UserFinderCommand<typeof UserRefetch> {
|
||||
static override description = "Refetch remote users";
|
||||
public static override description = "Refetch remote users";
|
||||
|
||||
static override examples = [
|
||||
public static override examples = [
|
||||
"<%= config.bin %> <%= command.id %> johngastron --type username",
|
||||
"<%= config.bin %> <%= command.id %> 018ec11c-c6cb-7a67-bd20-a4c81bf42912",
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
public static override flags = {
|
||||
confirm: Flags.boolean({
|
||||
description:
|
||||
"Ask for confirmation before refetching the user (default yes)",
|
||||
|
|
@ -27,7 +27,7 @@ export default class UserRefetch extends UserFinderCommand<typeof UserRefetch> {
|
|||
}),
|
||||
};
|
||||
|
||||
static override args = {
|
||||
public static override args = {
|
||||
identifier: UserFinderCommand.baseArgs.identifier,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ import { formatArray } from "~/cli/utils/format";
|
|||
import { config } from "~/packages/config-manager";
|
||||
|
||||
export default class UserReset extends UserFinderCommand<typeof UserReset> {
|
||||
static override description = "Resets users' passwords";
|
||||
public static override description = "Resets users' passwords";
|
||||
|
||||
static override examples = [
|
||||
public static override examples = [
|
||||
"<%= config.bin %> <%= command.id %> johngastron --type username",
|
||||
"<%= config.bin %> <%= command.id %> 018ec11c-c6cb-7a67-bd20-a4c81bf42912",
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
public static override flags = {
|
||||
confirm: Flags.boolean({
|
||||
description:
|
||||
"Ask for confirmation before deleting the user (default yes)",
|
||||
|
|
@ -32,7 +32,7 @@ export default class UserReset extends UserFinderCommand<typeof UserReset> {
|
|||
}),
|
||||
};
|
||||
|
||||
static override args = {
|
||||
public static override args = {
|
||||
identifier: UserFinderCommand.baseArgs.identifier,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue