@sigx/cli 0.4.0 → 0.4.1

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.
@@ -1 +1,9 @@
1
- export declare function runCreate(): Promise<void>;
1
+ export interface CreateOptions {
2
+ /** Project name (positional). */
3
+ name?: string;
4
+ type?: 'basic' | 'ssr' | 'ssg' | 'lynx';
5
+ styling?: 'none' | 'tailwind' | 'daisyui';
6
+ /** Skip prompts (headless mode). */
7
+ yes?: boolean;
8
+ }
9
+ export declare function runCreate(opts?: CreateOptions): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { definePlugin } from './plugin.js';
2
- export type { SigxPlugin, PluginCommand, CommandContext, ArgDef, Logger, ShellNode, StatusItem, ShellTab, SlashCommand, Shortcut, ShellLogStore, ShellHandle, TuiContribution } from './plugin.js';
1
+ export { definePlugin, a } from './plugin.js';
2
+ export type { SigxPlugin, PluginCommand, CommandContext, AnyArg, ArgsShape, InferArgs, Logger, ShellNode, StatusItem, ShellTab, SlashCommand, Shortcut, ShellLogStore, ShellHandle, TuiContribution } from './plugin.js';
package/dist/plugin.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- export interface ArgDef {
2
- type: 'string' | 'boolean';
3
- description?: string;
4
- default?: string | boolean;
5
- }
1
+ import type { ArgsShape } from '@sigx/args';
2
+ export { a } from '@sigx/args';
3
+ export type { AnyArg, ArgsShape, InferArgs } from '@sigx/args';
6
4
  export interface CommandContext {
7
5
  cwd: string;
6
+ /** Parsed args per the command's builders; args._ = post-'--' tokens. */
8
7
  args: Record<string, unknown>;
9
8
  logger: Logger;
10
9
  /** All plugins discovered for this project (for runShell({ plugins })). */
@@ -19,7 +18,8 @@ export interface Logger {
19
18
  }
20
19
  export interface PluginCommand {
21
20
  description: string;
22
- args?: Record<string, ArgDef>;
21
+ /** Fluent arg builders, e.g. { port: a.number().default(8788) }. */
22
+ args?: ArgsShape;
23
23
  run: (ctx: CommandContext) => Promise<void>;
24
24
  }
25
25
  /** Opaque renderable returned by a tab's render() — author with JSX. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigx/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Unified CLI for SignalX — create, dev, build, and run projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",