Update to work with newer deno versions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9dfb8d65d3
commit
22a447604b
@ -84,6 +84,7 @@ const flags = await new Cliffy.Command()
|
|||||||
.action(commandWrapper(upgradeCMD))
|
.action(commandWrapper(upgradeCMD))
|
||||||
)
|
)
|
||||||
.command("completions", new Cliffy.CompletionsCommand())
|
.command("completions", new Cliffy.CompletionsCommand())
|
||||||
|
.command("help", new Cliffy.HelpCommand().global())
|
||||||
.parse(Deno.args);
|
.parse(Deno.args);
|
||||||
|
|
||||||
await init(flags.options);
|
await init(flags.options);
|
||||||
@ -95,5 +96,5 @@ if (command) {
|
|||||||
console.log(Colors.bold(Colors.red("An error occured:")), err.message);
|
console.log(Colors.bold(Colors.red("An error occured:")), err.message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flags.cmd.help();
|
flags.cmd.showHelp();
|
||||||
}
|
}
|
||||||
|
10
cli/deps.ts
10
cli/deps.ts
@ -1,7 +1,7 @@
|
|||||||
export * as Compress from "https://deno.hibas123.de/raw/@denreg-tar/mod.ts";
|
export * as Compress from "https://deno.hibas123.de/raw/@denreg-tar/mod.ts";
|
||||||
export * as Ini from "https://deno.land/x/ini@v2.1.0/mod.ts";
|
export * as Ini from "https://deno.land/x/ini@v2.1.0/mod.ts";
|
||||||
export * as Cliffy from "https://deno.land/x/cliffy@v0.16.0/mod.ts";
|
export * as Cliffy from "https://deno.land/x/cliffy@v0.18.2/mod.ts";
|
||||||
export * as Base64 from "https://deno.land/std@0.65.0/encoding/base64.ts";
|
export * as Base64 from "https://deno.land/std@0.91.0/encoding/base64.ts";
|
||||||
export * as FS from "https://deno.land/std@0.65.0/fs/mod.ts";
|
export * as FS from "https://deno.land/std@0.91.0/fs/mod.ts";
|
||||||
export * as Colors from "https://deno.land/std@0.65.0/fmt/colors.ts";
|
export * as Colors from "https://deno.land/std@0.91.0/fmt/colors.ts";
|
||||||
export * as Path from "https://deno.land/std@0.65.0/path/mod.ts";
|
export * as Path from "https://deno.land/std@0.91.0/path/mod.ts";
|
||||||
|
@ -42,16 +42,18 @@ export async function setConfig(name: string, value: string) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const readJson = (name: string) => Deno.readTextFile(name).then(JSON.parse);
|
||||||
|
const writeJson = (name: string, value: any, spaces?: string) =>
|
||||||
|
Deno.writeTextFile(name, JSON.stringify(value, null, spaces));
|
||||||
|
|
||||||
export async function getMeta() {
|
export async function getMeta() {
|
||||||
log("Reading meta.json");
|
log("Reading meta.json");
|
||||||
return (await FS.readJson("meta.json")) as IMeta;
|
return (await readJson("meta.json")) as IMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setMeta(meta: IMeta): Promise<void> {
|
export async function setMeta(meta: IMeta): Promise<void> {
|
||||||
log("Saving meta.json");
|
log("Saving meta.json");
|
||||||
return FS.writeJson("meta.json", meta, {
|
return writeJson("meta.json", meta, " ");
|
||||||
spaces: " ",
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let interactive = true;
|
let interactive = true;
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@denreg-cli",
|
"name": "@denreg-cli",
|
||||||
"version": "0.2.10",
|
"version": "0.2.11",
|
||||||
"description": "CLI for the DenReg package registry",
|
"description": "CLI for the DenReg package registry",
|
||||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||||
"contributors": [],
|
"contributors": [],
|
||||||
"files": [
|
"files": ["**/*.ts", "**/*.js", "README.md"],
|
||||||
"**/*.ts",
|
|
||||||
"**/*.js",
|
|
||||||
"README.md"
|
|
||||||
],
|
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"prepublish": "pre.ts"
|
"prepublish": "pre.ts"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { FS } from "./deps.ts";
|
import { FS } from "./deps.ts";
|
||||||
|
|
||||||
const meta = (await FS.readJson("./meta.json")) as any;
|
const meta = (await Deno.readTextFile("./meta.json").then(JSON.parse)) as any;
|
||||||
|
|
||||||
await Deno.writeTextFile(
|
await Deno.writeTextFile(
|
||||||
"version.ts",
|
"version.ts",
|
||||||
|
@ -1 +1 @@
|
|||||||
export const version = "0.2.10"
|
export const version = "0.2.11"
|
Loading…
Reference in New Issue
Block a user