Compare commits

..

No commits in common. "2ee628544ebe0eafc80409f25291e3d4d2d41976" and "ac73b62df21022b4be1921e24e147db18c7ed6af" have entirely different histories.

8 changed files with 8 additions and 62 deletions

View File

@ -9,7 +9,6 @@ Since the cli requires access to:
- reading and writing files
- access to environment variables
- network access
- run programs
The -A flag is the easiest way to install. You can however manually grant the required permissions.
@ -19,4 +18,3 @@ The -A flag is the easiest way to install. You can however manually grant the re
| --allow-write | Write configuration file while using setup and init as well as during publish for temporary files |
| --allow-net | Access to network for uploading to the registry (can be exclusive to the registry) |
| --allow-env | Required to get config file path relative to user home directory |
| --allow-run | Required to run hook scripts |

View File

@ -6,7 +6,7 @@ export default async function deprecate(options: any) {
const meta = await getMeta();
const res = await Cliffy.Confirm.prompt(
"Are you sure you want to deprecat this package?"
"Are you shure you want to deprecat this package?"
);
if (res) {

View File

@ -1,26 +0,0 @@
import { Cliffy, Colors } from "../deps.ts";
export default async function upgrade() {
const res = await Cliffy.Confirm.prompt({
message: "Are you sure you want to upgrade the denreg cli?",
default: true,
});
if (res) {
const process = Deno.run({
cmd: [
"deno",
"install",
"-A",
"--unstable",
"-f",
"https://deno.hibas123.de/raw/@denreg-cli/denreg.ts",
],
});
const s = await process.status();
if (!s) {
console.log(Colors.red("Upgrade failed!"));
}
}
}

View File

@ -6,14 +6,6 @@ import initCMD from "./commands/init.ts";
import bumpCMD from "./commands/bump.ts";
import publishCMD from "./commands/publish.ts";
import deprecateCMD from "./commands/deprecate.ts";
import upgradeCMD from "./commands/upgrade.ts";
let version = "unknown";
try {
const v = await import("./version.ts");
version = v.version;
} catch (err) {}
const HOME_FOLDER = Deno.env.get("HOME") || Deno.env.get("USERPROFILE") || "";
@ -33,7 +25,7 @@ const commandWrapper = (cmd: CommandHandler) => {
};
const flags = await new Cliffy.Command()
.name("denreg")
.version(version)
.version("1.1.9")
.description("CLI for the Open Source DenReg package registry")
.option("-i, --interactive [interactive:boolean]", "Interactive mode", {
default: true,
@ -82,12 +74,6 @@ const flags = await new Cliffy.Command()
.description("Deprecate package")
.action(commandWrapper(deprecateCMD))
)
.command(
"upgrade",
new Cliffy.Command()
.description("Upgrade to latest version of denreg cli")
.action(commandWrapper(upgradeCMD))
)
.command("completions", new Cliffy.CompletionsCommand())
.parse(Deno.args);

View File

@ -1,7 +1,7 @@
export * as Compress from "https://deno.hibas123.de/raw/@denreg-tar/mod.ts";
export * as Ini from "https://deno.land/x/ini/mod.ts";
export * as Cliffy from "https://deno.land/x/cliffy/mod.ts";
export * as Base64 from "https://deno.land/std@0.65.0/encoding/base64.ts";
export * as FS from "https://deno.land/std@0.65.0/fs/mod.ts";
export * as Colors from "https://deno.land/std@0.65.0/fmt/colors.ts";
export * as Path from "https://deno.land/std@0.65.0/path/mod.ts";
export * as Base64 from "https://deno.land/std@0.63.0/encoding/base64.ts";
export * as FS from "https://deno.land/std@0.63.0/fs/mod.ts";
export * as Colors from "https://deno.land/std@0.63.0/fmt/colors.ts";
export * as Path from "https://deno.land/std@0.63.0/path/mod.ts";

View File

@ -1,11 +1,8 @@
{
"name": "@denreg-cli",
"version": "0.2.3",
"version": "0.2.0",
"description": "CLI for the DenReg package registry",
"author": "Fabian Stamm <dev@fabianstamm.de>",
"contributors": [],
"files": ["**/*.ts", "**/*.js", "README.md"],
"hooks": {
"prepublish": "pre.ts"
}
"files": ["**/*.ts", "**/*.js", "README.md"]
}

View File

@ -1,8 +0,0 @@
import { FS } from "./deps.ts";
const meta = (await FS.readJson("./meta.json")) as any;
await Deno.writeTextFile(
"version.ts",
`export const version = "${meta.version}"`
);

View File

@ -1 +0,0 @@
export const version = "0.2.3"