@aristobyte-ui/cli 2.6.0 → 2.6.2
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/es/.tsbuildinfo +1 -0
- package/es/commands/add.d.ts +2 -0
- package/es/commands/add.d.ts.map +1 -0
- package/es/commands/add.js +106 -0
- package/es/commands/doctor.d.ts +2 -0
- package/es/commands/doctor.d.ts.map +1 -0
- package/es/commands/doctor.js +166 -0
- package/es/commands/env.d.ts +2 -0
- package/es/commands/env.d.ts.map +1 -0
- package/es/commands/env.js +175 -0
- package/es/commands/init.d.ts +2 -0
- package/es/commands/init.d.ts.map +1 -0
- package/es/commands/init.js +180 -0
- package/es/commands/list.d.ts +3 -0
- package/es/commands/list.d.ts.map +1 -0
- package/es/commands/list.js +195 -0
- package/es/commands/remove.d.ts +2 -0
- package/es/commands/remove.d.ts.map +1 -0
- package/es/commands/remove.js +100 -0
- package/es/commands/upgrade.d.ts +2 -0
- package/es/commands/upgrade.d.ts.map +1 -0
- package/es/commands/upgrade.js +122 -0
- package/es/index.d.ts +3 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +212 -0
- package/es/utils/checkVersion.d.ts +2 -0
- package/es/utils/checkVersion.d.ts.map +1 -0
- package/es/utils/checkVersion.js +8 -0
- package/es/utils/colors.d.ts +15 -0
- package/es/utils/colors.d.ts.map +1 -0
- package/es/utils/colors.js +77 -0
- package/es/utils/compareVersions.d.ts +2 -0
- package/es/utils/compareVersions.d.ts.map +1 -0
- package/es/utils/compareVersions.js +11 -0
- package/es/utils/getBanner.d.ts +2 -0
- package/es/utils/getBanner.d.ts.map +1 -0
- package/es/utils/getBanner.js +30 -0
- package/es/utils/getCurrentPackageManager.d.ts +3 -0
- package/es/utils/getCurrentPackageManager.d.ts.map +1 -0
- package/es/utils/getCurrentPackageManager.js +55 -0
- package/es/utils/getDescription.d.ts +2 -0
- package/es/utils/getDescription.d.ts.map +1 -0
- package/es/utils/getDescription.js +21 -0
- package/es/utils/getTip.d.ts +2 -0
- package/es/utils/getTip.d.ts.map +1 -0
- package/es/utils/getTip.js +21 -0
- package/es/utils/installPackage.d.ts +2 -0
- package/es/utils/installPackage.d.ts.map +1 -0
- package/es/utils/installPackage.js +75 -0
- package/es/utils/parseHelp.d.ts +3 -0
- package/es/utils/parseHelp.d.ts.map +1 -0
- package/es/utils/parseHelp.js +22 -0
- package/es/utils/typography.d.ts +3 -0
- package/es/utils/typography.d.ts.map +1 -0
- package/es/utils/typography.js +9 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/commands/add.d.ts +2 -0
- package/lib/commands/add.d.ts.map +1 -0
- package/lib/commands/add.js +112 -0
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.d.ts.map +1 -0
- package/lib/commands/doctor.js +172 -0
- package/lib/commands/env.d.ts +2 -0
- package/lib/commands/env.d.ts.map +1 -0
- package/lib/commands/env.js +181 -0
- package/lib/commands/init.d.ts +2 -0
- package/lib/commands/init.d.ts.map +1 -0
- package/lib/commands/init.js +186 -0
- package/lib/commands/list.d.ts +3 -0
- package/lib/commands/list.d.ts.map +1 -0
- package/lib/commands/list.js +202 -0
- package/lib/commands/remove.d.ts +2 -0
- package/lib/commands/remove.d.ts.map +1 -0
- package/lib/commands/remove.js +106 -0
- package/lib/commands/upgrade.d.ts +2 -0
- package/lib/commands/upgrade.d.ts.map +1 -0
- package/lib/commands/upgrade.js +128 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +217 -0
- package/lib/utils/checkVersion.d.ts +2 -0
- package/lib/utils/checkVersion.d.ts.map +1 -0
- package/lib/utils/checkVersion.js +14 -0
- package/lib/utils/colors.d.ts +15 -0
- package/lib/utils/colors.d.ts.map +1 -0
- package/lib/utils/colors.js +96 -0
- package/lib/utils/compareVersions.d.ts +2 -0
- package/lib/utils/compareVersions.d.ts.map +1 -0
- package/lib/utils/compareVersions.js +14 -0
- package/lib/utils/getBanner.d.ts +2 -0
- package/lib/utils/getBanner.d.ts.map +1 -0
- package/lib/utils/getBanner.js +33 -0
- package/lib/utils/getCurrentPackageManager.d.ts +3 -0
- package/lib/utils/getCurrentPackageManager.d.ts.map +1 -0
- package/lib/utils/getCurrentPackageManager.js +61 -0
- package/lib/utils/getDescription.d.ts +2 -0
- package/lib/utils/getDescription.d.ts.map +1 -0
- package/lib/utils/getDescription.js +24 -0
- package/lib/utils/getTip.d.ts +2 -0
- package/lib/utils/getTip.d.ts.map +1 -0
- package/lib/utils/getTip.js +24 -0
- package/lib/utils/installPackage.d.ts +2 -0
- package/lib/utils/installPackage.d.ts.map +1 -0
- package/lib/utils/installPackage.js +78 -0
- package/lib/utils/parseHelp.d.ts +3 -0
- package/lib/utils/parseHelp.d.ts.map +1 -0
- package/lib/utils/parseHelp.js +25 -0
- package/lib/utils/typography.d.ts +3 -0
- package/lib/utils/typography.d.ts.map +1 -0
- package/lib/utils/typography.js +13 -0
- package/package.json +1 -1
- package/README.md +0 -11
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.installPackage = installPackage;
|
|
40
|
+
var execa_1 = require("execa");
|
|
41
|
+
function installPackage(pkgManager_1, pkg_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function (pkgManager, pkg, dev) {
|
|
43
|
+
var args;
|
|
44
|
+
if (dev === void 0) { dev = false; }
|
|
45
|
+
return __generator(this, function (_a) {
|
|
46
|
+
switch (_a.label) {
|
|
47
|
+
case 0:
|
|
48
|
+
args = [];
|
|
49
|
+
switch (pkgManager) {
|
|
50
|
+
case "npm":
|
|
51
|
+
args = ["install", pkg, dev ? "--save-dev" : "--save"];
|
|
52
|
+
break;
|
|
53
|
+
case "yarn":
|
|
54
|
+
args = ["add", pkg];
|
|
55
|
+
if (dev)
|
|
56
|
+
args.push("-D");
|
|
57
|
+
break;
|
|
58
|
+
case "pnpm":
|
|
59
|
+
args = ["add", pkg];
|
|
60
|
+
if (dev)
|
|
61
|
+
args.push("-D");
|
|
62
|
+
break;
|
|
63
|
+
case "bun":
|
|
64
|
+
args = ["add", pkg];
|
|
65
|
+
if (dev)
|
|
66
|
+
args.push("-d");
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
throw new Error("Unsupported package manager: ".concat(pkgManager));
|
|
70
|
+
}
|
|
71
|
+
return [4, (0, execa_1.execa)(pkgManager, args, { stdio: "inherit" })];
|
|
72
|
+
case 1:
|
|
73
|
+
_a.sent();
|
|
74
|
+
return [2];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseHelp.d.ts","sourceRoot":"","sources":["../../src/main/utils/parseHelp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAO/C,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,UAmCnD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseHelp = parseHelp;
|
|
4
|
+
var colors_1 = require("./colors");
|
|
5
|
+
var typography_1 = require("./typography");
|
|
6
|
+
var getBanner_1 = require("./getBanner");
|
|
7
|
+
var getTip_1 = require("./getTip");
|
|
8
|
+
var getDescription_1 = require("./getDescription");
|
|
9
|
+
function parseHelp(cmd, helper) {
|
|
10
|
+
return "\n".concat((0, getBanner_1.getBanner)(cmd.name()), "\n\n").concat((0, colors_1.logoSmallGradient)("Usage:"), " \n").concat((0, colors_1.logo3)(helper.commandUsage(cmd)), "\n\n").concat((0, colors_1.logoSmallGradient)("Description:"), "\n ").concat((0, colors_1.darkGrey)((0, getDescription_1.getDescription)(cmd.name())), "\n\n").concat(helper.visibleCommands(cmd).length > 0
|
|
11
|
+
? "".concat((0, colors_1.logoSmallGradient)("Commands:"), "\n").concat(helper
|
|
12
|
+
.visibleCommands(cmd)
|
|
13
|
+
.map(function (c) {
|
|
14
|
+
return " ".concat("".concat((0, colors_1.logo3)(c.name()).padEnd(31), " ").concat(c.usage() || "".padEnd(30)).padEnd(129), " ").concat((0, typography_1.description)(c.description()));
|
|
15
|
+
})
|
|
16
|
+
.join("\n"), "\n\n")
|
|
17
|
+
: "").concat(helper.visibleOptions(cmd).length > 0
|
|
18
|
+
? "".concat((0, colors_1.logoSmallGradient)("Options:"), "\n").concat(helper
|
|
19
|
+
.visibleOptions(cmd)
|
|
20
|
+
.map(function (option) {
|
|
21
|
+
return " ".concat("".concat((0, colors_1.logo3)(option.flags.split(/,\s*/)[0])).concat((0, colors_1.darkGrey)(", ")).concat((0, colors_1.logo4)(option.flags.split(/,\s*/)[1])).padEnd(93), " ").concat((0, typography_1.description)(option.description));
|
|
22
|
+
})
|
|
23
|
+
.join("\n"), "\n\n")
|
|
24
|
+
: "").concat((0, colors_1.logoSmallGradient)("Tip:"), "\n ").concat((0, colors_1.lightGrey)((0, getTip_1.getTip)(cmd.name())), "\n");
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/main/utils/typography.ts"],"names":[],"mappings":"AAEA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,UAIrC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAEvC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usage = usage;
|
|
4
|
+
exports.description = description;
|
|
5
|
+
var colors_1 = require("./colors");
|
|
6
|
+
function usage(params) {
|
|
7
|
+
return params
|
|
8
|
+
.map(function (param) { return "".concat((0, colors_1.logo4)("["), " ").concat((0, colors_1.lightGrey)(param), " ").concat((0, colors_1.logo4)("]")); })
|
|
9
|
+
.join(" ");
|
|
10
|
+
}
|
|
11
|
+
function description(text) {
|
|
12
|
+
return (0, colors_1.darkGrey)("- ".concat(text));
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/cli",
|
|
3
3
|
"description": "The official AristoByteUI CLI — initialize projects, install, upgrade, remove, and manage UI components seamlessly.",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "AristoByte <info@aristobyte.com>",
|