Upgrade cliffy dependency
parent
1508f6bcbf
commit
de83995f35
|
@ -86,6 +86,7 @@
|
||||||
"jsxImportSource": "https://esm.sh/preact@10.23.1"
|
"jsxImportSource": "https://esm.sh/preact@10.23.1"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
|
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7",
|
||||||
"@silverbulletmd/silverbullet/syscall": "./plug-api/syscall.ts",
|
"@silverbulletmd/silverbullet/syscall": "./plug-api/syscall.ts",
|
||||||
"@silverbulletmd/silverbullet/syscalls": "./plug-api/syscalls.ts",
|
"@silverbulletmd/silverbullet/syscalls": "./plug-api/syscalls.ts",
|
||||||
"@silverbulletmd/silverbullet/types": "./plug-api/types.ts",
|
"@silverbulletmd/silverbullet/types": "./plug-api/types.ts",
|
||||||
|
@ -138,7 +139,6 @@
|
||||||
"@std/path": "jsr:@std/path@^1.0.2",
|
"@std/path": "jsr:@std/path@^1.0.2",
|
||||||
"@std/testing": "jsr:@std/testing@^0.225.3",
|
"@std/testing": "jsr:@std/testing@^0.225.3",
|
||||||
"@std/yaml": "jsr:@std/yaml@^1.0.5",
|
"@std/yaml": "jsr:@std/yaml@^1.0.5",
|
||||||
"cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.4/",
|
|
||||||
"crelt": "https://esm.sh/crelt@1.0.6",
|
"crelt": "https://esm.sh/crelt@1.0.6",
|
||||||
"denosass": "https://deno.land/x/denosass@1.0.6/mod.ts",
|
"denosass": "https://deno.land/x/denosass@1.0.6/mod.ts",
|
||||||
"djwt": "https://deno.land/x/djwt@v3.0.2/mod.ts",
|
"djwt": "https://deno.land/x/djwt@v3.0.2/mod.ts",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import.meta.main = false;
|
import.meta.main = false;
|
||||||
import { Command } from "cliffy/command/command.ts";
|
import { Command } from "@cliffy/command";
|
||||||
|
|
||||||
import { version } from "./version.ts";
|
import { version } from "./version.ts";
|
||||||
|
|
||||||
|
@ -20,14 +20,12 @@ await new Command()
|
||||||
.name("silverbullet")
|
.name("silverbullet")
|
||||||
.description("Note taking for knowledge hackers")
|
.description("Note taking for knowledge hackers")
|
||||||
.version(version)
|
.version(version)
|
||||||
.help({
|
.helpOption(false)
|
||||||
colors: false,
|
|
||||||
})
|
|
||||||
.usage("<options> <folder> | <command> (see below)")
|
.usage("<options> <folder> | <command> (see below)")
|
||||||
// Main command
|
// Main command
|
||||||
.arguments("[folder:string]")
|
.arguments("[folder:string]")
|
||||||
.option(
|
.option(
|
||||||
"--hostname, -L <hostname:string>",
|
"-L, --hostname <hostname:string>",
|
||||||
"Hostname or address to listen on",
|
"Hostname or address to listen on",
|
||||||
)
|
)
|
||||||
.option("-p, --port <port:number>", "Port to listen on")
|
.option("-p, --port <port:number>", "Port to listen on")
|
||||||
|
@ -57,7 +55,8 @@ await new Command()
|
||||||
)
|
)
|
||||||
.action(serveCommand)
|
.action(serveCommand)
|
||||||
// plug:compile
|
// 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>")
|
.arguments("<...name.plug.yaml:string>")
|
||||||
.option("--debug", "Do not minifiy code", { default: false })
|
.option("--debug", "Do not minifiy code", { default: false })
|
||||||
.option("--info", "Print out size info per function", {
|
.option("--info", "Print out size info per function", {
|
||||||
|
@ -76,19 +75,22 @@ await new Command()
|
||||||
.option("--runtimeUrl <url:string>", "URL to worker_runtime.ts to use")
|
.option("--runtimeUrl <url:string>", "URL to worker_runtime.ts to use")
|
||||||
.action(plugCompileCommand)
|
.action(plugCompileCommand)
|
||||||
// plug:run
|
// 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]")
|
.arguments("<spacePath> [function] [...args:string]")
|
||||||
.option(
|
.option(
|
||||||
"--hostname, -L <hostname:string>",
|
"-L, --hostname <hostname:string>",
|
||||||
"Hostname or address to listen on",
|
"Hostname or address to listen on",
|
||||||
)
|
)
|
||||||
.option("-p, --port <port:number>", "Port to listen on")
|
.option("-p, --port <port:number>", "Port to listen on")
|
||||||
.action(plugRunCommand)
|
.action(plugRunCommand)
|
||||||
// upgrade
|
// upgrade
|
||||||
.command("upgrade", "Upgrade SilverBullet")
|
.command("upgrade")
|
||||||
|
.description("Upgrade SilverBullet")
|
||||||
.action(upgradeCommand)
|
.action(upgradeCommand)
|
||||||
// sync
|
// sync
|
||||||
.command("sync", "Synchronize two spaces")
|
.command("sync")
|
||||||
|
.description("Synchronize two spaces")
|
||||||
.option(
|
.option(
|
||||||
"--snapshot <snapshot:string>",
|
"--snapshot <snapshot:string>",
|
||||||
"Path to state file to use",
|
"Path to state file to use",
|
||||||
|
@ -100,7 +102,8 @@ await new Command()
|
||||||
.arguments("<primary:string> <secondary:string>")
|
.arguments("<primary:string> <secondary:string>")
|
||||||
.action(syncCommand)
|
.action(syncCommand)
|
||||||
// version
|
// version
|
||||||
.command("version", "Get current version")
|
.command("version")
|
||||||
|
.description("Get current version")
|
||||||
.action(versionCommand)
|
.action(versionCommand)
|
||||||
.parse(Deno.args);
|
.parse(Deno.args);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue