flarecms 0.2.8 → 0.2.9
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/cli/index.js +24 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -6783,14 +6783,37 @@ async function mcpCommand(args) {
|
|
|
6783
6783
|
}
|
|
6784
6784
|
|
|
6785
6785
|
// src/cli/index.ts
|
|
6786
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
6786
6787
|
import { readFileSync as readFileSync2 } from "fs";
|
|
6787
6788
|
import { resolve as resolve2, dirname } from "path";
|
|
6788
6789
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
6789
6790
|
var __dirname2 = dirname(fileURLToPath2(import.meta.url));
|
|
6790
6791
|
var pkg = JSON.parse(readFileSync2(resolve2(__dirname2, "../../package.json"), "utf8"));
|
|
6791
6792
|
var version = pkg.version;
|
|
6793
|
+
function displayHelp() {
|
|
6794
|
+
console.log(`
|
|
6795
|
+
${import_picocolors2.default.bold(import_picocolors2.default.yellow("\u2014 F L A R E C M S \u2014"))} ${import_picocolors2.default.dim(`v${version}`)}
|
|
6796
|
+
`);
|
|
6797
|
+
console.log(` ${import_picocolors2.default.bold("Usage:")} ${import_picocolors2.default.cyan("flarecms")} ${import_picocolors2.default.dim("<command> [options]")}
|
|
6798
|
+
`);
|
|
6799
|
+
console.log(` ${import_picocolors2.default.bold("Commands:")}`);
|
|
6800
|
+
console.log(` ${import_picocolors2.default.cyan("create")} ${import_picocolors2.default.dim("Initialize a new FlareCMS project (default)")}`);
|
|
6801
|
+
console.log(` ${import_picocolors2.default.cyan("plugin create")} ${import_picocolors2.default.dim("Create a new FlareCMS plugin")}`);
|
|
6802
|
+
console.log(` ${import_picocolors2.default.cyan("mcp")} ${import_picocolors2.default.dim("Start the FlareCMS MCP bridge")}`);
|
|
6803
|
+
console.log(` ${import_picocolors2.default.cyan("version")} ${import_picocolors2.default.dim("Show current version")}`);
|
|
6804
|
+
console.log(` ${import_picocolors2.default.cyan("help")} ${import_picocolors2.default.dim("Show this help message")}
|
|
6805
|
+
`);
|
|
6806
|
+
console.log(` ${import_picocolors2.default.bold("Options:")}`);
|
|
6807
|
+
console.log(` ${import_picocolors2.default.cyan("-v, --version")} ${import_picocolors2.default.dim("Show current version")}`);
|
|
6808
|
+
console.log(` ${import_picocolors2.default.cyan("-h, --help")} ${import_picocolors2.default.dim("Show this help message")}
|
|
6809
|
+
`);
|
|
6810
|
+
}
|
|
6792
6811
|
async function main() {
|
|
6793
6812
|
const args = process.argv.slice(2);
|
|
6813
|
+
if (args.includes("-h") || args.includes("--help") || args[0] === "help") {
|
|
6814
|
+
displayHelp();
|
|
6815
|
+
process.exit(0);
|
|
6816
|
+
}
|
|
6794
6817
|
if (args.includes("-v") || args.includes("--version") || args[0] === "version") {
|
|
6795
6818
|
console.log(version);
|
|
6796
6819
|
process.exit(0);
|
|
@@ -6802,7 +6825,7 @@ async function main() {
|
|
|
6802
6825
|
} else if (args.length === 0 || args[0] === "create") {
|
|
6803
6826
|
await createProjectCommand();
|
|
6804
6827
|
} else {
|
|
6805
|
-
|
|
6828
|
+
displayHelp();
|
|
6806
6829
|
process.exit(1);
|
|
6807
6830
|
}
|
|
6808
6831
|
}
|