Skip to content

Commit

Permalink
Upgrade cliffy dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
zefhemel committed Jan 8, 2025
1 parent 1508f6b commit de83995
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"jsxImportSource": "https://esm.sh/[email protected]"
},
"imports": {
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7",
"@silverbulletmd/silverbullet/syscall": "./plug-api/syscall.ts",
"@silverbulletmd/silverbullet/syscalls": "./plug-api/syscalls.ts",
"@silverbulletmd/silverbullet/types": "./plug-api/types.ts",
Expand Down Expand Up @@ -138,7 +139,6 @@
"@std/path": "jsr:@std/path@^1.0.2",
"@std/testing": "jsr:@std/testing@^0.225.3",
"@std/yaml": "jsr:@std/yaml@^1.0.5",
"cliffy/": "https://deno.land/x/[email protected]/",
"crelt": "https://esm.sh/[email protected]",
"denosass": "https://deno.land/x/[email protected]/mod.ts",
"djwt": "https://deno.land/x/[email protected]/mod.ts",
Expand Down
25 changes: 14 additions & 11 deletions silverbullet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import.meta.main = false;
import { Command } from "cliffy/command/command.ts";
import { Command } from "@cliffy/command";

import { version } from "./version.ts";

Expand All @@ -20,14 +20,12 @@ await new Command()
.name("silverbullet")
.description("Note taking for knowledge hackers")
.version(version)
.help({
colors: false,
})
.helpOption(false)
.usage("<options> <folder> | <command> (see below)")
// Main command
.arguments("[folder:string]")
.option(
"--hostname, -L <hostname:string>",
"-L, --hostname <hostname:string>",
"Hostname or address to listen on",
)
.option("-p, --port <port:number>", "Port to listen on")
Expand Down Expand Up @@ -57,7 +55,8 @@ await new Command()
)
.action(serveCommand)
// plug:compile
.command("plug:compile", "Bundle (compile) one or more plug manifests")
.command("plug:compile")
.description("Bundle (compile) one or more plug manifests")
.arguments("<...name.plug.yaml:string>")
.option("--debug", "Do not minifiy code", { default: false })
.option("--info", "Print out size info per function", {
Expand All @@ -76,19 +75,22 @@ await new Command()
.option("--runtimeUrl <url:string>", "URL to worker_runtime.ts to use")
.action(plugCompileCommand)
// plug:run
.command("plug:run", "Run a PlugOS function from the CLI")
.command("plug:run")
.description("Run a PlugOS function from the CLI")
.arguments("<spacePath> [function] [...args:string]")
.option(
"--hostname, -L <hostname:string>",
"-L, --hostname <hostname:string>",
"Hostname or address to listen on",
)
.option("-p, --port <port:number>", "Port to listen on")
.action(plugRunCommand)
// upgrade
.command("upgrade", "Upgrade SilverBullet")
.command("upgrade")
.description("Upgrade SilverBullet")
.action(upgradeCommand)
// sync
.command("sync", "Synchronize two spaces")
.command("sync")
.description("Synchronize two spaces")
.option(
"--snapshot <snapshot:string>",
"Path to state file to use",
Expand All @@ -100,7 +102,8 @@ await new Command()
.arguments("<primary:string> <secondary:string>")
.action(syncCommand)
// version
.command("version", "Get current version")
.command("version")
.description("Get current version")
.action(versionCommand)
.parse(Deno.args);

Expand Down

0 comments on commit de83995

Please sign in to comment.