kubit-forge 0.0.2-canary.13 → 0.0.2-canary.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.2-canary.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Remove deprecated loadConfigFromCLIDir option
8
+ - Remove loadConfigFromCLIDir from RunCLIOptions interface
9
+ - configDir is now the only way to specify config location
10
+ - Update documentation with configDir examples
11
+ - Remove unused imports (dirname, join, fileURLToPath)
12
+ - Fix JSDoc example with correct syntax
13
+ - Simplify config directory logic
14
+
15
+ This simplifies the API and makes config location explicit.
16
+
3
17
  ## 0.0.2-canary.13
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -745,7 +745,6 @@ interface RunCLIOptions {
745
745
  description?: string;
746
746
  banner?: (version: string) => string;
747
747
  examples?: string[];
748
- loadConfigFromCLIDir?: boolean;
749
748
  }
750
749
  declare function runCLI(options?: RunCLIOptions): Promise<void>;
751
750
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {n,o,p,l}from'./chunk-XGK6YEDR.js';export{n as ConfigLoader,o as ConsoleLogger,p as DefaultTaskRunner,m as KubitConfigSchema,l as PluginManager}from'./chunk-XGK6YEDR.js';import {Command}from'commander';import {dirname,join}from'path';import {fileURLToPath}from'url';async function k(e={}){let{banner:o,configDir:i,cwd:n$1=process.cwd(),description:a="Modern development CLI powered by Kubit Forge",examples:t=[],loadConfigFromCLIDir:r=false,name:h="kubit",version:b="1.0.0"}=e,s=new Command;s.name(h).version(b,"-v, --version","Display version number").description(a),o&&s.addHelpText("beforeAll",()=>o(b)),M(s);let g=n$1;if(i)g=i;else if(r){let l=import.meta.url,p=fileURLToPath(l),c=dirname(p);g=join(c,"..");}try{let l=new n(g),p=await R(l),c=s.opts(),m=await G(p,n$1,g,c);await I(p,m),j(s,m),F(s,m),t.length>0&&s.addHelpText("after",()=>{let w=`
2
+ import {n,o,p,l}from'./chunk-XGK6YEDR.js';export{n as ConfigLoader,o as ConsoleLogger,p as DefaultTaskRunner,m as KubitConfigSchema,l as PluginManager}from'./chunk-XGK6YEDR.js';import {Command}from'commander';async function P(e={}){let{banner:o,configDir:r,cwd:n$1=process.cwd(),description:a="Modern development CLI powered by Kubit Forge",examples:t=[],name:i="kubit",version:f="1.0.0"}=e,s=new Command;s.name(i).version(f,"-v, --version","Display version number").description(a),o&&s.addHelpText("beforeAll",()=>o(f)),L(s);let d=r||n$1;try{let l=new n(d),C=await O(l),b=s.opts(),g=await k(C,n$1,d,b);await M(C,g),G(s,g),R(s,g),t.length>0&&s.addHelpText("after",()=>{let w=`
3
3
  Examples:
4
- `;for(let y of t)w+=` $ ${y}
5
- `;return w}),s.parse();}catch(l){console.error("Fatal error:",l),process.exit(1);}}function M(e){e.option("--cwd <path>","Working directory").option("--config <path>","Path to config file").option("--json","Output as JSON").option("--verbose","Verbose output").option("--quiet","Minimal output").option("--no-color","Disable colors").option("--dry-run","Show what would be done without executing").option("--yes","Skip confirmations").option("--profile","Show timing information");}async function R(e){try{let o=await e.load();return o||{project:{name:"my-project",stack:"vanilla"}}}catch{return console.warn("Warning: Failed to load kubit.config.toml, using defaults"),{project:{name:"my-project",stack:"vanilla"}}}}async function G(e,o$1,i,n){let a=new o(n),t=new p(a),r=new l(a,i);return {config:e,cwd:o$1,logger:a,pluginManager:r,runner:t}}async function I(e,o){let{pluginManager:i}=o;e.plugins?.enabled&&e.plugins.enabled.length>0&&await i.loadPlugins(e.plugins.enabled,o),e.plugins?.internal&&e.plugins.internal.length>0&&await i.loadInternalPlugins(e.plugins.internal,o);}function j(e,o){let i=o.pluginManager.getCommands();for(let n of i){let a=e.command(n.name).description(n.description);if(n.options)for(let t of n.options)a.option(t.flags,t.description,t.defaultValue);a.action(async t=>{try{await o.pluginManager.callBeforeCommand(n.name,o);let r=await n.action(t,o);await o.pluginManager.callAfterCommand(n.name,o,r),r?.status==="error"&&process.exit(1);}catch(r){console.error("Command failed:",r),process.exit(1);}});}i.length>0&&o.logger.debug(`Registered ${i.length} commands`);}function F(e,o){let i=o.pluginManager.getGenerators();for(let n of i){let a=e.command(`generate:${n.kind}`).description(n.description||`Generate ${n.kind}`);if(a.option("--name <name>","Name of the generated item").option("--path <path>","Path where to generate").option("--force","Overwrite existing files"),n.options)for(let t of n.options)a.option(t.flags,t.description,t.defaultValue);a.action(async t=>{try{let r=await n.generate(t.name||"",t,o);r?.status==="error"&&(console.error("Generation failed:",r.message),process.exit(1));}catch(r){console.error("Generator failed:",r),process.exit(1);}});}i.length>0&&o.logger.debug(`Registered ${i.length} generators`);}export{k as runCLI};
4
+ `;for(let h of t)w+=` $ ${h}
5
+ `;return w}),s.parse();}catch(l){console.error("Fatal error:",l),process.exit(1);}}function L(e){e.option("--cwd <path>","Working directory").option("--config <path>","Path to config file").option("--json","Output as JSON").option("--verbose","Verbose output").option("--quiet","Minimal output").option("--no-color","Disable colors").option("--dry-run","Show what would be done without executing").option("--yes","Skip confirmations").option("--profile","Show timing information");}async function O(e){try{let o=await e.load();return o||{project:{name:"my-project",stack:"vanilla"}}}catch{return console.warn("Warning: Failed to load kubit.config.toml, using defaults"),{project:{name:"my-project",stack:"vanilla"}}}}async function k(e,o$1,r,n){let a=new o(n),t=new p(a),i=new l(a,r);return {config:e,cwd:o$1,logger:a,pluginManager:i,runner:t}}async function M(e,o){let{pluginManager:r}=o;e.plugins?.enabled&&e.plugins.enabled.length>0&&await r.loadPlugins(e.plugins.enabled,o),e.plugins?.internal&&e.plugins.internal.length>0&&await r.loadInternalPlugins(e.plugins.internal,o);}function G(e,o){let r=o.pluginManager.getCommands();for(let n of r){let a=e.command(n.name).description(n.description);if(n.options)for(let t of n.options)a.option(t.flags,t.description,t.defaultValue);a.action(async t=>{try{await o.pluginManager.callBeforeCommand(n.name,o);let i=await n.action(t,o);await o.pluginManager.callAfterCommand(n.name,o,i),i?.status==="error"&&process.exit(1);}catch(i){console.error("Command failed:",i),process.exit(1);}});}r.length>0&&o.logger.debug(`Registered ${r.length} commands`);}function R(e,o){let r=o.pluginManager.getGenerators();for(let n of r){let a=e.command(`generate:${n.kind}`).description(n.description||`Generate ${n.kind}`);if(a.option("--name <name>","Name of the generated item").option("--path <path>","Path where to generate").option("--force","Overwrite existing files"),n.options)for(let t of n.options)a.option(t.flags,t.description,t.defaultValue);a.action(async t=>{try{let i=await n.generate(t.name||"",t,o);i?.status==="error"&&(console.error("Generation failed:",i.message),process.exit(1));}catch(i){console.error("Generator failed:",i),process.exit(1);}});}r.length>0&&o.logger.debug(`Registered ${r.length} generators`);}export{P as runCLI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubit-forge",
3
- "version": "0.0.2-canary.13",
3
+ "version": "0.0.2-canary.14",
4
4
  "description": "World-class CLI for modern web development with enterprise-grade features: plugins, recipes, DAG task engine, interactive dashboard, asset optimization, and SBOM generation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {