@v5x/cli 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +108 -2
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,110 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
13
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
21
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
|
|
35
|
+
// ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
36
|
+
var require_picocolors = __commonJS((exports, module) => {
|
|
37
|
+
var p = process || {};
|
|
38
|
+
var argv = p.argv || [];
|
|
39
|
+
var env = p.env || {};
|
|
40
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
41
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
42
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
43
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
44
|
+
};
|
|
45
|
+
var replaceClose = (string, close, replace, index) => {
|
|
46
|
+
let result = "", cursor = 0;
|
|
47
|
+
do {
|
|
48
|
+
result += string.substring(cursor, index) + replace;
|
|
49
|
+
cursor = index + close.length;
|
|
50
|
+
index = string.indexOf(close, cursor);
|
|
51
|
+
} while (~index);
|
|
52
|
+
return result + string.substring(cursor);
|
|
53
|
+
};
|
|
54
|
+
var createColors = (enabled = isColorSupported) => {
|
|
55
|
+
let f = enabled ? formatter : () => String;
|
|
56
|
+
return {
|
|
57
|
+
isColorSupported: enabled,
|
|
58
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
59
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
60
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
61
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
62
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
63
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
64
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
65
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
66
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
67
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
68
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
69
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
70
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
71
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
72
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
73
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
74
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
75
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
76
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
77
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
78
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
79
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
80
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
81
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
82
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
83
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
84
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
85
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
86
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
87
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
88
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
89
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
90
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
91
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
92
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
93
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
94
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
95
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
96
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
97
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
98
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
module.exports = createColors();
|
|
102
|
+
module.exports.createColors = createColors;
|
|
103
|
+
});
|
|
3
104
|
// package.json
|
|
4
105
|
var package_default = {
|
|
5
106
|
name: "@v5x/cli",
|
|
6
|
-
version: "0.0.
|
|
107
|
+
version: "0.0.1",
|
|
7
108
|
description: "Command line interface for v5x.",
|
|
8
109
|
license: "MIT",
|
|
9
110
|
type: "module",
|
|
@@ -38,8 +139,13 @@ var package_default = {
|
|
|
38
139
|
},
|
|
39
140
|
devDependencies: {
|
|
40
141
|
"@types/bun": "^1.3.1"
|
|
142
|
+
},
|
|
143
|
+
dependencies: {
|
|
144
|
+
picocolors: "^1.1.1"
|
|
41
145
|
}
|
|
42
146
|
};
|
|
43
147
|
|
|
44
148
|
// src/index.ts
|
|
45
|
-
|
|
149
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
150
|
+
console.log(import_picocolors.default.redBright(`v5x ${package_default.version}`));
|
|
151
|
+
console.log("modern cli for v5 development");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v5x/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Command line interface for v5x.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,5 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/bun": "^1.3.1"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"picocolors": "^1.1.1"
|
|
38
41
|
}
|
|
39
42
|
}
|