-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
info.ts
115 lines (89 loc) 路 2.52 KB
/
info.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/**
* Copyright (c) Crew Dev.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as colors from "fmt/colors.ts";
const { green, yellow } = colors;
export const URI_STD = "https://deno.land/std";
export const URI_X = "https://deno.land/x/";
export const STD = [
"_util",
"_wasm_crypto",
"fs",
"http",
"crypto",
"archive",
"async",
"bytes",
"datetime",
"encoding",
"flags",
"fmt",
"hash",
"io",
"log",
"mime",
"node",
"path",
"permissions",
"signal",
"testing",
"textproto",
"uuid",
"ws",
"wasi",
"collections",
];
export const VERSION = { VERSION: "v1.11.0" };
export const helpsInfo = [
green("advanced package management for deno, based on import_map.json\n"),
green("\nUSAGE:\n"),
` trex ${yellow("[OPTIONS]")} ${yellow("[SUBCOMMAND]")}\n`,
green("\nOPTIONS:\n"),
` ${yellow("-h, --help")} print help info\n`,
` ${yellow("-c, --custom")} install custom package\n`,
` ${yellow("-v, --version")} print version\n`,
` ${yellow("-m, --map")} install package from deno.land\n`,
` ${yellow("-n, --nest")} install package from nest.land\n`,
` ${yellow("-p, --pkg")} install package from some repository\n`,
green("\nSUBCOMMANDS:\n"),
` ${yellow("[install or i]")} install a package\n`,
` ${yellow("delete")} delete a package\n`,
` ${yellow("upgrade")} update trex\n`,
` ${yellow("tree")} view dependency tree\n`,
` ${yellow("run")} run a script alias in a file run.json\n`,
` ${yellow("purge")} remove a package or url from cache\n`,
` ${yellow("ls")} shows the list of installed packages\n`,
` ${yellow("exec")} execute any cli tool without install\n`,
` ${
yellow("check")
} check deno.land [std/x] dependencies updates\n`,
green(
"\nyou can see the different options available for each command using:\n",
),
` ${green("trex")} ${yellow("[command]")} ${yellow("--help or -h")}\n`,
];
export const flags = {
map: ["--map", "-m"],
version: ["--version", "-v"],
custom: ["--custom", "-c"],
help: ["--help", "-h"],
nest: ["--nest", "-n"],
pkg: ["--pkg", "-p"],
fix: ["--fix", "-f"],
};
export const keyWords = {
install: ["install", "i"],
uninstall: "delete",
upgrade: "upgrade",
tree: "tree",
run: "run",
purge: "purge",
setup: "setup",
ls: "ls",
exec: "exec",
check: "check",
};