@stormycms/cli 0.0.15 → 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);
@@ -253,12 +257,12 @@ async function init(options) {
253
257
  replaceProjectName(targetDir, projectName);
254
258
  const envAnswers = await promptEnvValues(targetDir, options.skipEnv);
255
259
  await generateEnvFiles(targetDir, envAnswers);
256
- console.log("Initializing git repository...");
257
- await initializeGitRepository(targetDir);
258
260
  if (!options.skipInstall) {
259
261
  console.log("Installing dependencies...");
260
262
  await runPnpmInstall(targetDir);
261
263
  }
264
+ console.log("Initializing git repository...");
265
+ await initializeGitRepository(targetDir);
262
266
  console.log("\n\u2705 Project initialized successfully!");
263
267
  console.log(`
264
268
  Location: ${targetDir}`);
@@ -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 = {};
@@ -196,12 +196,12 @@ async function init(options) {
196
196
  replaceProjectName(targetDir, projectName);
197
197
  const envAnswers = await promptEnvValues(targetDir, options.skipEnv);
198
198
  await generateEnvFiles(targetDir, envAnswers);
199
- console.log("Initializing git repository...");
200
- await initializeGitRepository(targetDir);
201
199
  if (!options.skipInstall) {
202
200
  console.log("Installing dependencies...");
203
201
  await runPnpmInstall(targetDir);
204
202
  }
203
+ console.log("Initializing git repository...");
204
+ await initializeGitRepository(targetDir);
205
205
  console.log("\n\u2705 Project initialized successfully!");
206
206
  console.log(`
207
207
  Location: ${targetDir}`);
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 = {};
@@ -153,12 +153,12 @@ async function init(options) {
153
153
  replaceProjectName(targetDir, projectName);
154
154
  const envAnswers = await promptEnvValues(targetDir, options.skipEnv);
155
155
  await generateEnvFiles(targetDir, envAnswers);
156
- console.log("Initializing git repository...");
157
- await initializeGitRepository(targetDir);
158
156
  if (!options.skipInstall) {
159
157
  console.log("Installing dependencies...");
160
158
  await runPnpmInstall(targetDir);
161
159
  }
160
+ console.log("Initializing git repository...");
161
+ await initializeGitRepository(targetDir);
162
162
  console.log("\n\u2705 Project initialized successfully!");
163
163
  console.log(`
164
164
  Location: ${targetDir}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stormycms/cli",
3
- "version": "0.0.15",
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",