Skip to content

Commit

Permalink
Update d1 subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
lrapoport-cf committed Oct 12, 2023
1 parent 8a4611f commit 1d5b6e0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions packages/wrangler/src/d1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,49 @@ import type { CommonYargsArgv } from "../yargs-types";
export function d1(yargs: CommonYargsArgv) {
return (
yargs
.command("list", "List D1 databases", List.Options, List.Handler)
.command("list", "🔹List D1 databases", List.Options, List.Handler)
.command(
"info <name>",
"Get information about a D1 database, including the current database size and state.",
"🔹Get information about a D1 database, including the current database size and state",
Info.Options,
Info.Handler
)
.command(
"create <name>",
"Create D1 database",
"🔹Create D1 database",
Create.Options,
Create.Handler
)
.command(
"delete <name>",
"Delete D1 database",
"🔹Delete D1 database",
Delete.Options,
Delete.Handler
)
.command("backup", "Interact with D1 Backups", (backupArgs) =>
.command("backup", "🔹Interact with D1 backups", (backupArgs) =>
backupArgs
.demandCommand()
.command(
"list <name>",
"List your D1 backups",
"🔹List your D1 backups",
Backups.ListOptions,
Backups.ListHandler
)
.command(
"create <name>",
"Create a new D1 backup",
"🔹Create a new D1 backup",
Backups.CreateOptions,
Backups.CreateHandler
)
.command(
"restore <name> <backup-id>",
"Restore a DB backup",
"🔹Restore a DB backup",
Backups.RestoreOptions,
Backups.RestoreHandler
)
.command(
"download <name> <backup-id>",
"Download a DB backup",
"🔹Download a DB backup",
Backups.DownloadOptions,
Backups.DownloadHandler
)
Expand All @@ -76,47 +76,47 @@ export function d1(yargs: CommonYargsArgv) {
// )
.command(
"execute <database>",
"Executed command or SQL file",
"🔹Execute a command or SQL file",
Execute.Options,
Execute.Handler
)
.command(
"time-travel",
"Use Time Travel to restore, fork or copy a database at a specific point-in-time.",
"🔹Use Time Travel to restore, fork or copy a database at a specific point-in-time",
(yargs2) =>
yargs2
.demandCommand()
.command(
"info <database>",
"Retrieve information about a database at a specific point-in-time using Time Travel.",
"🔹Retrieve information about a database at a specific point-in-time",
TimeTravel.InfoOptions,
TimeTravel.InfoHandler
)
.command(
"restore <database>",
"Restore a database back to a specific point-in-time.",
"🔹Restore a database back to a specific point-in-time",
TimeTravel.RestoreOptions,
TimeTravel.RestoreHandler
)
)
.command("migrations", "Interact with D1 Migrations", (yargs2) =>
.command("migrations", "🔹Interact with D1 migrations", (yargs2) =>
yargs2
.demandCommand()
.command(
"list <database>",
"List your D1 migrations",
"🔹List your D1 migrations",
Migrations.ListOptions,
Migrations.ListHandler
)
.command(
"create <database> <message>",
"Create a new Migration",
"🔹Create a new migration",
Migrations.CreateOptions,
Migrations.CreateHandler
)
.command(
"apply <database>",
"Apply D1 Migrations",
"🔹Apply D1 migrations",
Migrations.ApplyOptions,
Migrations.ApplyHandler
)
Expand Down

0 comments on commit 1d5b6e0

Please sign in to comment.