@stormycms/cli 0.0.16 → 0.0.17

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/boilerplate.zip CHANGED
Binary file
package/dist/cli.js CHANGED
@@ -128,8 +128,8 @@ async function loadBuiltInPlugins() {
128
128
  var import_node_fs2 = __toESM(require("fs"));
129
129
  var import_node_path2 = __toESM(require("path"));
130
130
  var DEFAULT_CONFIG = {
131
- components: "./src/components",
132
- output: "./componentschema.ts"
131
+ components: "packages/components/src/lib",
132
+ output: "packages/components/src/index.ts"
133
133
  };
134
134
  async function loadConfig(cwd) {
135
135
  let config = {};
@@ -169,9 +169,13 @@ async function detectFrameworkFromDeps(cwd) {
169
169
  // src/generate.ts
170
170
  var import_node_fs3 = __toESM(require("fs"));
171
171
  var import_node_path3 = __toESM(require("path"));
172
- async function generate(options) {
172
+ async function generate(options = {}) {
173
173
  const cwd = process.cwd();
174
174
  const config = await loadConfig(cwd);
175
+ const mergedOptions = {
176
+ components: options.components ?? config.components,
177
+ output: options.output ?? config.output
178
+ };
175
179
  await loadBuiltInPlugins();
176
180
  await pluginRegistry.loadConfigPlugins(cwd);
177
181
  let framework = config.framework;
@@ -197,7 +201,7 @@ async function generate(options) {
197
201
  }
198
202
  console.log(`Using framework plugin: ${plugin.name}`);
199
203
  try {
200
- runGeneration(plugin, options);
204
+ runGeneration(plugin, mergedOptions);
201
205
  } catch (error) {
202
206
  console.error("Generation failed:", error);
203
207
  process.exit(1);
@@ -460,7 +464,7 @@ async function runPnpmInstall(targetDir) {
460
464
  // src/cli.ts
461
465
  var program = new import_commander.Command();
462
466
  program.name("stormy").description("Stormy CMS CLI tools").version("0.1.0");
463
- program.command("generate").description("Generate CMS-wrapped components from component files").option("-c, --components <path>", "Path to the components directory", "./src/components").option("-o, --output <path>", "Output file path", "./componentschema.ts").option("-f, --framework <name>", "Framework to use (auto-detected if not specified)").action(async (options) => {
467
+ program.command("generate").description("Generate CMS-wrapped components from component files").option("-c, --components <path>", `Path to the components directory (default: ${DEFAULT_CONFIG.components})`).option("-o, --output <path>", `Output file path (default: ${DEFAULT_CONFIG.output})`).option("-f, --framework <name>", "Framework to use (auto-detected if not specified)").action(async (options) => {
464
468
  await generate({
465
469
  components: options.components,
466
470
  output: options.output
package/dist/index.js CHANGED
@@ -130,8 +130,8 @@ var pluginRegistry = new PluginRegistry();
130
130
  var import_node_fs2 = __toESM(require("fs"));
131
131
  var import_node_path2 = __toESM(require("path"));
132
132
  var DEFAULT_CONFIG = {
133
- components: "./src/components",
134
- output: "./componentschema.ts"
133
+ components: "packages/components/src/lib",
134
+ output: "packages/components/src/index.ts"
135
135
  };
136
136
  async function loadConfig(cwd) {
137
137
  let config = {};
package/dist/index.mjs CHANGED
@@ -87,8 +87,8 @@ var pluginRegistry = new PluginRegistry();
87
87
  import fs2 from "fs";
88
88
  import path2 from "path";
89
89
  var DEFAULT_CONFIG = {
90
- components: "./src/components",
91
- output: "./componentschema.ts"
90
+ components: "packages/components/src/lib",
91
+ output: "packages/components/src/index.ts"
92
92
  };
93
93
  async function loadConfig(cwd) {
94
94
  let config = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stormycms/cli",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Stormy CMS CLI - Framework-agnostic core with plugin system",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",