opticore-cli 1.0.2 → 1.0.3
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/bin.cjs +44 -4
- package/dist/bin.js +1 -1
- package/dist/chunk-53EMHB2D.js +83 -0
- package/dist/index.cjs +46 -4
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-6DKVP6WN.js +0 -42
package/dist/bin.cjs
CHANGED
|
@@ -30,6 +30,35 @@ var import_cfonts = __toESM(require("cfonts"), 1);
|
|
|
30
30
|
var import_cli = require("opticore-validator/cli");
|
|
31
31
|
var import_cli2 = require("opticore-orm-orchestrator/cli");
|
|
32
32
|
var import_cli3 = require("opticore-feature-component/cli");
|
|
33
|
+
var OPTICORE_CLI_VERSION = "1.0.2";
|
|
34
|
+
function printCommandList(program) {
|
|
35
|
+
const title = import_chalk.default.bold.hex("#FF6B35");
|
|
36
|
+
const name = import_chalk.default.bold.cyan;
|
|
37
|
+
const alias = import_chalk.default.dim;
|
|
38
|
+
const desc = import_chalk.default.dim;
|
|
39
|
+
const flag = import_chalk.default.green;
|
|
40
|
+
console.log(`
|
|
41
|
+
${title("Available Commands")}
|
|
42
|
+
`);
|
|
43
|
+
const walk = (cmd, path, depth) => {
|
|
44
|
+
for (const sub of cmd.commands) {
|
|
45
|
+
const fullPath = `${path} ${sub.name()}`;
|
|
46
|
+
const indent = " ".repeat(depth);
|
|
47
|
+
const aliases = sub.aliases();
|
|
48
|
+
const aliasText = aliases.length ? alias(` (${aliases.join(", ")})`) : "";
|
|
49
|
+
console.log(` ${indent}${name(fullPath)}${aliasText}`);
|
|
50
|
+
if (sub.description()) {
|
|
51
|
+
console.log(` ${indent} ${desc(sub.description())}`);
|
|
52
|
+
}
|
|
53
|
+
for (const opt of sub.options) {
|
|
54
|
+
console.log(` ${indent} ${flag(opt.flags.padEnd(22))}${desc(opt.description)}`);
|
|
55
|
+
}
|
|
56
|
+
walk(sub, fullPath, depth + 1);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
walk(program, "opticore", 0);
|
|
60
|
+
console.log();
|
|
61
|
+
}
|
|
33
62
|
function printBanner() {
|
|
34
63
|
import_cfonts.default.say("OpticoreJs", {
|
|
35
64
|
font: "block",
|
|
@@ -43,22 +72,33 @@ function printBanner() {
|
|
|
43
72
|
});
|
|
44
73
|
const orange = import_chalk.default.bold.hex("#FF6B35");
|
|
45
74
|
const dim = import_chalk.default.bold.yellow;
|
|
46
|
-
console.log(` ${orange("
|
|
47
|
-
console.log(` ${dim("
|
|
75
|
+
console.log(` ${orange("OPTICOREJS C L I")}`);
|
|
76
|
+
console.log(` ${dim("Validator \xB7 ORM Orchestrator \xB7 Feature Generator")}
|
|
77
|
+
`);
|
|
78
|
+
console.log(` ${import_chalk.default.bold.dim("Documentation")} ${import_chalk.default.underline.cyan("https://github.com/guyzoum77/opticore-cli#readme")}
|
|
48
79
|
`);
|
|
49
80
|
}
|
|
50
81
|
function runOpticoreCli() {
|
|
51
82
|
(0, import_cli.forceOpticoreColors)();
|
|
52
83
|
printBanner();
|
|
53
84
|
const program = new import_commander.Command();
|
|
54
|
-
program.name("opticore").description(import_chalk.default.dim("Opticore CLI")).
|
|
85
|
+
program.name("opticore").description(import_chalk.default.dim("Opticore CLI")).version(
|
|
86
|
+
OPTICORE_CLI_VERSION,
|
|
87
|
+
"-v, --version",
|
|
88
|
+
"Output the current version"
|
|
89
|
+
).option("-l, --list", "List every command available across installed Opticore packages").configureHelp(import_cli.helpConfig);
|
|
55
90
|
(0, import_cli.registerValidatorCommand)(program);
|
|
56
91
|
(0, import_cli2.registerOrmCommand)(program);
|
|
57
92
|
(0, import_cli3.registerFeatureCommand)(program);
|
|
58
|
-
|
|
93
|
+
const args = process.argv.slice(2);
|
|
94
|
+
if (!args.length) {
|
|
59
95
|
program.outputHelp();
|
|
60
96
|
process.exit(0);
|
|
61
97
|
}
|
|
98
|
+
if (args.includes("-l") || args.includes("--list")) {
|
|
99
|
+
printCommandList(program);
|
|
100
|
+
process.exit(0);
|
|
101
|
+
}
|
|
62
102
|
program.parse(process.argv);
|
|
63
103
|
}
|
|
64
104
|
|
package/dist/bin.js
CHANGED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import cfonts from "cfonts";
|
|
5
|
+
import { registerValidatorCommand, forceOpticoreColors, helpConfig } from "opticore-validator/cli";
|
|
6
|
+
import { registerOrmCommand } from "opticore-orm-orchestrator/cli";
|
|
7
|
+
import { registerFeatureCommand } from "opticore-feature-component/cli";
|
|
8
|
+
var OPTICORE_CLI_VERSION = "1.0.2";
|
|
9
|
+
function printCommandList(program) {
|
|
10
|
+
const title = chalk.bold.hex("#FF6B35");
|
|
11
|
+
const name = chalk.bold.cyan;
|
|
12
|
+
const alias = chalk.dim;
|
|
13
|
+
const desc = chalk.dim;
|
|
14
|
+
const flag = chalk.green;
|
|
15
|
+
console.log(`
|
|
16
|
+
${title("Available Commands")}
|
|
17
|
+
`);
|
|
18
|
+
const walk = (cmd, path, depth) => {
|
|
19
|
+
for (const sub of cmd.commands) {
|
|
20
|
+
const fullPath = `${path} ${sub.name()}`;
|
|
21
|
+
const indent = " ".repeat(depth);
|
|
22
|
+
const aliases = sub.aliases();
|
|
23
|
+
const aliasText = aliases.length ? alias(` (${aliases.join(", ")})`) : "";
|
|
24
|
+
console.log(` ${indent}${name(fullPath)}${aliasText}`);
|
|
25
|
+
if (sub.description()) {
|
|
26
|
+
console.log(` ${indent} ${desc(sub.description())}`);
|
|
27
|
+
}
|
|
28
|
+
for (const opt of sub.options) {
|
|
29
|
+
console.log(` ${indent} ${flag(opt.flags.padEnd(22))}${desc(opt.description)}`);
|
|
30
|
+
}
|
|
31
|
+
walk(sub, fullPath, depth + 1);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
walk(program, "opticore", 0);
|
|
35
|
+
console.log();
|
|
36
|
+
}
|
|
37
|
+
function printBanner() {
|
|
38
|
+
cfonts.say("OpticoreJs", {
|
|
39
|
+
font: "block",
|
|
40
|
+
align: "left",
|
|
41
|
+
colors: ["yellow", "#FF6B35"],
|
|
42
|
+
background: "transparent",
|
|
43
|
+
letterSpacing: 1,
|
|
44
|
+
lineHeight: 1,
|
|
45
|
+
space: true,
|
|
46
|
+
maxLength: "0"
|
|
47
|
+
});
|
|
48
|
+
const orange = chalk.bold.hex("#FF6B35");
|
|
49
|
+
const dim = chalk.bold.yellow;
|
|
50
|
+
console.log(` ${orange("OPTICOREJS C L I")}`);
|
|
51
|
+
console.log(` ${dim("Validator \xB7 ORM Orchestrator \xB7 Feature Generator")}
|
|
52
|
+
`);
|
|
53
|
+
console.log(` ${chalk.bold.dim("Documentation")} ${chalk.underline.cyan("https://github.com/guyzoum77/opticore-cli#readme")}
|
|
54
|
+
`);
|
|
55
|
+
}
|
|
56
|
+
function runOpticoreCli() {
|
|
57
|
+
forceOpticoreColors();
|
|
58
|
+
printBanner();
|
|
59
|
+
const program = new Command();
|
|
60
|
+
program.name("opticore").description(chalk.dim("Opticore CLI")).version(
|
|
61
|
+
OPTICORE_CLI_VERSION,
|
|
62
|
+
"-v, --version",
|
|
63
|
+
"Output the current version"
|
|
64
|
+
).option("-l, --list", "List every command available across installed Opticore packages").configureHelp(helpConfig);
|
|
65
|
+
registerValidatorCommand(program);
|
|
66
|
+
registerOrmCommand(program);
|
|
67
|
+
registerFeatureCommand(program);
|
|
68
|
+
const args = process.argv.slice(2);
|
|
69
|
+
if (!args.length) {
|
|
70
|
+
program.outputHelp();
|
|
71
|
+
process.exit(0);
|
|
72
|
+
}
|
|
73
|
+
if (args.includes("-l") || args.includes("--list")) {
|
|
74
|
+
printCommandList(program);
|
|
75
|
+
process.exit(0);
|
|
76
|
+
}
|
|
77
|
+
program.parse(process.argv);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
OPTICORE_CLI_VERSION,
|
|
82
|
+
runOpticoreCli
|
|
83
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
OPTICORE_CLI_VERSION: () => OPTICORE_CLI_VERSION,
|
|
33
34
|
runOpticoreCli: () => runOpticoreCli
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -39,6 +40,35 @@ var import_cfonts = __toESM(require("cfonts"), 1);
|
|
|
39
40
|
var import_cli = require("opticore-validator/cli");
|
|
40
41
|
var import_cli2 = require("opticore-orm-orchestrator/cli");
|
|
41
42
|
var import_cli3 = require("opticore-feature-component/cli");
|
|
43
|
+
var OPTICORE_CLI_VERSION = "1.0.2";
|
|
44
|
+
function printCommandList(program) {
|
|
45
|
+
const title = import_chalk.default.bold.hex("#FF6B35");
|
|
46
|
+
const name = import_chalk.default.bold.cyan;
|
|
47
|
+
const alias = import_chalk.default.dim;
|
|
48
|
+
const desc = import_chalk.default.dim;
|
|
49
|
+
const flag = import_chalk.default.green;
|
|
50
|
+
console.log(`
|
|
51
|
+
${title("Available Commands")}
|
|
52
|
+
`);
|
|
53
|
+
const walk = (cmd, path, depth) => {
|
|
54
|
+
for (const sub of cmd.commands) {
|
|
55
|
+
const fullPath = `${path} ${sub.name()}`;
|
|
56
|
+
const indent = " ".repeat(depth);
|
|
57
|
+
const aliases = sub.aliases();
|
|
58
|
+
const aliasText = aliases.length ? alias(` (${aliases.join(", ")})`) : "";
|
|
59
|
+
console.log(` ${indent}${name(fullPath)}${aliasText}`);
|
|
60
|
+
if (sub.description()) {
|
|
61
|
+
console.log(` ${indent} ${desc(sub.description())}`);
|
|
62
|
+
}
|
|
63
|
+
for (const opt of sub.options) {
|
|
64
|
+
console.log(` ${indent} ${flag(opt.flags.padEnd(22))}${desc(opt.description)}`);
|
|
65
|
+
}
|
|
66
|
+
walk(sub, fullPath, depth + 1);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
walk(program, "opticore", 0);
|
|
70
|
+
console.log();
|
|
71
|
+
}
|
|
42
72
|
function printBanner() {
|
|
43
73
|
import_cfonts.default.say("OpticoreJs", {
|
|
44
74
|
font: "block",
|
|
@@ -52,25 +82,37 @@ function printBanner() {
|
|
|
52
82
|
});
|
|
53
83
|
const orange = import_chalk.default.bold.hex("#FF6B35");
|
|
54
84
|
const dim = import_chalk.default.bold.yellow;
|
|
55
|
-
console.log(` ${orange("
|
|
56
|
-
console.log(` ${dim("
|
|
85
|
+
console.log(` ${orange("OPTICOREJS C L I")}`);
|
|
86
|
+
console.log(` ${dim("Validator \xB7 ORM Orchestrator \xB7 Feature Generator")}
|
|
87
|
+
`);
|
|
88
|
+
console.log(` ${import_chalk.default.bold.dim("Documentation")} ${import_chalk.default.underline.cyan("https://github.com/guyzoum77/opticore-cli#readme")}
|
|
57
89
|
`);
|
|
58
90
|
}
|
|
59
91
|
function runOpticoreCli() {
|
|
60
92
|
(0, import_cli.forceOpticoreColors)();
|
|
61
93
|
printBanner();
|
|
62
94
|
const program = new import_commander.Command();
|
|
63
|
-
program.name("opticore").description(import_chalk.default.dim("Opticore CLI")).
|
|
95
|
+
program.name("opticore").description(import_chalk.default.dim("Opticore CLI")).version(
|
|
96
|
+
OPTICORE_CLI_VERSION,
|
|
97
|
+
"-v, --version",
|
|
98
|
+
"Output the current version"
|
|
99
|
+
).option("-l, --list", "List every command available across installed Opticore packages").configureHelp(import_cli.helpConfig);
|
|
64
100
|
(0, import_cli.registerValidatorCommand)(program);
|
|
65
101
|
(0, import_cli2.registerOrmCommand)(program);
|
|
66
102
|
(0, import_cli3.registerFeatureCommand)(program);
|
|
67
|
-
|
|
103
|
+
const args = process.argv.slice(2);
|
|
104
|
+
if (!args.length) {
|
|
68
105
|
program.outputHelp();
|
|
69
106
|
process.exit(0);
|
|
70
107
|
}
|
|
108
|
+
if (args.includes("-l") || args.includes("--list")) {
|
|
109
|
+
printCommandList(program);
|
|
110
|
+
process.exit(0);
|
|
111
|
+
}
|
|
71
112
|
program.parse(process.argv);
|
|
72
113
|
}
|
|
73
114
|
// Annotate the CommonJS export names for ESM import in node:
|
|
74
115
|
0 && (module.exports = {
|
|
116
|
+
OPTICORE_CLI_VERSION,
|
|
75
117
|
runOpticoreCli
|
|
76
118
|
});
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/dist/chunk-6DKVP6WN.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import cfonts from "cfonts";
|
|
5
|
-
import { registerValidatorCommand, forceOpticoreColors, helpConfig } from "opticore-validator/cli";
|
|
6
|
-
import { registerOrmCommand } from "opticore-orm-orchestrator/cli";
|
|
7
|
-
import { registerFeatureCommand } from "opticore-feature-component/cli";
|
|
8
|
-
function printBanner() {
|
|
9
|
-
cfonts.say("OpticoreJs", {
|
|
10
|
-
font: "block",
|
|
11
|
-
align: "left",
|
|
12
|
-
colors: ["yellow", "#FF6B35"],
|
|
13
|
-
background: "transparent",
|
|
14
|
-
letterSpacing: 1,
|
|
15
|
-
lineHeight: 1,
|
|
16
|
-
space: true,
|
|
17
|
-
maxLength: "0"
|
|
18
|
-
});
|
|
19
|
-
const orange = chalk.bold.hex("#FF6B35");
|
|
20
|
-
const dim = chalk.bold.yellow;
|
|
21
|
-
console.log(` ${orange("O P T I C O R E")}`);
|
|
22
|
-
console.log(` ${dim("Project CLI \u2014 validator, ORM, features")}
|
|
23
|
-
`);
|
|
24
|
-
}
|
|
25
|
-
function runOpticoreCli() {
|
|
26
|
-
forceOpticoreColors();
|
|
27
|
-
printBanner();
|
|
28
|
-
const program = new Command();
|
|
29
|
-
program.name("opticore").description(chalk.dim("Opticore CLI")).configureHelp(helpConfig);
|
|
30
|
-
registerValidatorCommand(program);
|
|
31
|
-
registerOrmCommand(program);
|
|
32
|
-
registerFeatureCommand(program);
|
|
33
|
-
if (!process.argv.slice(2).length) {
|
|
34
|
-
program.outputHelp();
|
|
35
|
-
process.exit(0);
|
|
36
|
-
}
|
|
37
|
-
program.parse(process.argv);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export {
|
|
41
|
-
runOpticoreCli
|
|
42
|
-
};
|