@sigx/cli 0.2.8 → 0.3.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.
Files changed (39) hide show
  1. package/README.md +8 -59
  2. package/dist/cli.js +59 -6
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/create.d.ts +1 -1
  5. package/dist/commands/create.js +48 -413
  6. package/dist/commands/create.js.map +1 -1
  7. package/dist/commands/scaffold.js +165 -0
  8. package/dist/commands/scaffold.js.map +1 -0
  9. package/dist/index.d.ts +1 -1
  10. package/dist/plugin.d.ts +56 -0
  11. package/dist/plugin.js.map +1 -1
  12. package/dist/shell/index.d.ts +23 -0
  13. package/dist/shell/index.js +503 -0
  14. package/dist/shell/index.js.map +1 -0
  15. package/dist/templates/lynx/package.json +1 -1
  16. package/dist/templates/lynx/src/lynx-env.d.ts +1 -0
  17. package/dist/templates/lynx/src/main.tsx +2 -2
  18. package/dist/templates/lynx-daisyui/package.json +1 -1
  19. package/dist/templates/lynx-daisyui/src/lynx-env.d.ts +1 -0
  20. package/dist/templates/lynx-daisyui/src/main.tsx +2 -2
  21. package/dist/templates/lynx-tailwind/package.json +1 -1
  22. package/dist/templates/lynx-tailwind/src/lynx-env.d.ts +1 -0
  23. package/dist/templates/lynx-tailwind/src/main.tsx +2 -2
  24. package/dist/templates/ssg/package.json +1 -1
  25. package/dist/templates/ssg-daisyui/package.json +1 -1
  26. package/dist/templates/ssg-tailwind/package.json +1 -1
  27. package/package.json +7 -3
  28. package/templates/lynx/package.json +1 -1
  29. package/templates/lynx/src/lynx-env.d.ts +1 -0
  30. package/templates/lynx/src/main.tsx +2 -2
  31. package/templates/lynx-daisyui/package.json +1 -1
  32. package/templates/lynx-daisyui/src/lynx-env.d.ts +1 -0
  33. package/templates/lynx-daisyui/src/main.tsx +2 -2
  34. package/templates/lynx-tailwind/package.json +1 -1
  35. package/templates/lynx-tailwind/src/lynx-env.d.ts +1 -0
  36. package/templates/lynx-tailwind/src/main.tsx +2 -2
  37. package/templates/ssg/package.json +1 -1
  38. package/templates/ssg-daisyui/package.json +1 -1
  39. package/templates/ssg-tailwind/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @sigx/cli
2
2
 
3
- The unified `sigx` command-line tool — daily-driver CLI for [SignalX](https://github.com/signalxjs/core) projects (web and Lynx).
3
+ The unified `sigx` command-line tool — daily-driver CLI for [SignalX](https://sigx.dev/core/) projects (web and Lynx).
4
4
 
5
5
  ```bash
6
6
  npm i -D @sigx/cli
@@ -8,70 +8,19 @@ npm i -D @sigx/cli
8
8
  npx sigx <command>
9
9
  ```
10
10
 
11
- After scaffolding with `npm create @sigx@latest`, the generated project depends on `@sigx/cli` directly. The `sigx` binary is the entry point for everything: scaffolding, dev servers, builds, previews, and platform-specific commands provided by plugins.
11
+ After scaffolding with `npm create @sigx@latest`, the generated project depends on `@sigx/cli` directly. The `sigx` binary is the single entry point for everything: scaffolding, dev servers, builds, previews, and platform-specific commands provided by plugins. Any package can extend `sigx` with new commands via a `sigx-cli.plugin` field in its `package.json`.
12
12
 
13
- ## Commands
13
+ ## 📚 Documentation
14
14
 
15
- | Command | Provided by | Description |
16
- |---|---|---|
17
- | `sigx create [name]` | core | Scaffold a new project (interactive TUI; falls back to flag-driven headless when stdout isn't a TTY or when `--yes` / `--type` is passed) |
18
- | `sigx info` | core | Print environment & project info (Node, pnpm, installed `@sigx/*` packages, Lynx toolchain) |
19
- | `sigx dev` | `@sigx/vite` plugin | Start the Vite dev server (web) |
20
- | `sigx build` | `@sigx/vite` plugin | Production build (web) |
21
- | `sigx preview` | `@sigx/ssg` plugin | Serve a built SSG site |
22
- | `sigx prebuild` | `@sigx/lynx-cli` | Generate native iOS/Android project files |
23
- | `sigx run:android` | `@sigx/lynx-cli` | Build & launch on Android |
24
- | `sigx run:ios` | `@sigx/lynx-cli` | Build & launch on iOS |
25
- | `sigx doctor` | `@sigx/lynx-cli` | Verify Lynx toolchain (rspeedy, ADB, Xcode, JDK) |
26
-
27
- Run `sigx --help` for the full live list (varies by what plugins are installed in your project).
28
-
29
- ## Headless `create` (CI / scripts)
15
+ Full command reference, headless `create` flags, the plugin API and live examples → **<https://sigx.dev/cli/>**
30
16
 
31
17
  ```bash
32
- sigx create my-app --type basic # web SPA
33
- sigx create my-app --type ssr --styling tailwind # SSR + Tailwind
34
- sigx create my-app --type ssg --styling daisyui # SSG + Tailwind + daisyUI
35
- sigx create my-app --type lynx --styling tailwind # native mobile (Lynx)
36
- ```
37
-
38
- Valid values:
39
-
40
- - `--type`: `basic` | `ssr` | `ssg` | `lynx`
41
- - `--styling`: `none` | `tailwind` | `daisyui` (daisyUI not available for `lynx`)
42
- - `--yes` / `-y`: skip prompts even when running in a TTY
43
-
44
- Headless mode is also auto-selected when stdin/stdout is not a TTY (e.g. CI runners).
45
-
46
- ## Plugins
47
-
48
- Any package can extend `sigx` with new commands. To author a plugin, ship a `sigx-cli.plugin` field in your `package.json` pointing at a module that default-exports a `SigxPlugin`:
49
-
50
- ```json
51
- {
52
- "name": "my-sigx-plugin",
53
- "sigx-cli": { "plugin": "./dist/plugin.js" }
54
- }
18
+ sigx create my-app # scaffold a project (interactive)
19
+ sigx dev # start the dev server
20
+ sigx build # production build
55
21
  ```
56
22
 
57
- ```ts
58
- // my-sigx-plugin/src/plugin.ts
59
- import type { SigxPlugin } from '@sigx/cli/plugin';
60
-
61
- export default {
62
- name: 'my-plugin',
63
- commands: {
64
- hello: {
65
- description: 'Say hello',
66
- async run({ cwd, args, logger }) {
67
- logger.info(`hello from ${cwd}`);
68
- },
69
- },
70
- },
71
- } satisfies SigxPlugin;
72
- ```
73
-
74
- Plugins are discovered by walking up from `cwd` and inspecting installed dependencies' `package.json` files for the `sigx-cli.plugin` key.
23
+ Run `sigx --help` for the full live list (varies by what plugins are installed in your project).
75
24
 
76
25
  ## License
77
26
 
package/dist/cli.js CHANGED
@@ -11,10 +11,57 @@ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).expor
11
11
  * Auto-discover sigx CLI plugins from the project's dependencies.
12
12
  *
13
13
  * Scans the project's package.json for dependencies that declare
14
- * a `"sigx-cli": { "plugin": "./path/to/plugin.js" }` field.
14
+ * a `"sigx-cli"` manifest field:
15
+ *
16
+ * "sigx-cli": {
17
+ * "plugin": "./dist/plugin.js",
18
+ * "requires": ">=0.3.0" // optional: CLI version range
19
+ * }
20
+ *
15
21
  * Loads each plugin and calls `detect(cwd)` to check if it applies.
22
+ * When `requires` is declared and the RUNNING CLI binary doesn't satisfy
23
+ * it, the plugin still loads (best effort) but a prominent warning tells
24
+ * the user exactly how to update — peerDependencies can't cover this,
25
+ * because the binary that dispatches commands isn't necessarily the
26
+ * install the peer range was resolved against.
27
+ */
28
+ function parseVersion(v) {
29
+ const m = v.trim().match(/^(\d+)\.(\d+)\.(\d+)/);
30
+ if (!m) return null;
31
+ return {
32
+ major: Number(m[1]),
33
+ minor: Number(m[2]),
34
+ patch: Number(m[3])
35
+ };
36
+ }
37
+ function compare(a, b) {
38
+ return a.major - b.major || a.minor - b.minor || a.patch - b.patch;
39
+ }
40
+ /**
41
+ * Minimal semver-range check covering the forms plugins actually use:
42
+ * `^x.y.z` (0.x caret = same minor, like npm), `>=x.y.z`, and exact.
43
+ * Unknown/garbled ranges return true — never block on a malformed field.
16
44
  */
17
- async function discoverPlugins(cwd) {
45
+ function satisfiesCliRange(version, range) {
46
+ const v = parseVersion(version);
47
+ if (!v) return true;
48
+ const r = range.trim();
49
+ if (r.startsWith("^")) {
50
+ const want = parseVersion(r.slice(1));
51
+ if (!want) return true;
52
+ if (compare(v, want) < 0) return false;
53
+ if (v.major !== want.major) return false;
54
+ if (want.major === 0 && v.minor !== want.minor) return false;
55
+ return true;
56
+ }
57
+ if (r.startsWith(">=")) {
58
+ const want = parseVersion(r.slice(2));
59
+ return !want || compare(v, want) >= 0;
60
+ }
61
+ const want = parseVersion(r);
62
+ return !want || compare(v, want) === 0;
63
+ }
64
+ async function discoverPlugins(cwd, opts = {}) {
18
65
  const pkgPath = join(cwd, "package.json");
19
66
  if (!existsSync(pkgPath)) return [];
20
67
  let pkg;
@@ -35,6 +82,7 @@ async function discoverPlugins(cwd) {
35
82
  if (!pluginField?.plugin) continue;
36
83
  const pluginPath = join(cwd, "node_modules", depName, pluginField.plugin);
37
84
  if (!existsSync(pluginPath)) continue;
85
+ if (pluginField.requires && opts.cliVersion && !satisfiesCliRange(opts.cliVersion, pluginField.requires)) opts.logger?.warn(`Plugin "${depName}" requires sigx CLI ${pluginField.requires} but this project runs ${opts.cliVersion} — some commands may misbehave. Update with: pnpm up @sigx/cli --latest`);
38
86
  const mod = await import(pathToFileURL(pluginPath).href);
39
87
  const plugin = mod.default || mod;
40
88
  if (typeof plugin.detect === "function" && plugin.detect(cwd)) plugins.push(plugin);
@@ -182,7 +230,7 @@ function createLogger(prefix = "sigx") {
182
230
  var __dirname = dirname(fileURLToPath(import.meta.url));
183
231
  var pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
184
232
  var logger = createLogger();
185
- function wrapPluginCommand(cmd) {
233
+ function wrapPluginCommand(cmd, plugins) {
186
234
  return defineCommand({
187
235
  meta: { description: cmd.description },
188
236
  args: cmd.args,
@@ -190,13 +238,18 @@ function wrapPluginCommand(cmd) {
190
238
  await cmd.run({
191
239
  cwd: process.cwd(),
192
240
  args,
193
- logger
241
+ logger,
242
+ plugins,
243
+ cliVersion: pkg.version
194
244
  });
195
245
  }
196
246
  });
197
247
  }
198
248
  async function main() {
199
- const plugins = await discoverPlugins(process.cwd());
249
+ const plugins = await discoverPlugins(process.cwd(), {
250
+ cliVersion: pkg.version,
251
+ logger
252
+ });
200
253
  const subCommands = { info: infoCommand };
201
254
  subCommands.create = defineCommand({
202
255
  meta: {
@@ -210,7 +263,7 @@ async function main() {
210
263
  });
211
264
  for (const plugin of plugins) for (const [name, cmd] of Object.entries(plugin.commands)) {
212
265
  if (subCommands[name]) logger.warn(`Plugin "${plugin.name}" overrides command "${name}"`);
213
- subCommands[name] = wrapPluginCommand(cmd);
266
+ subCommands[name] = wrapPluginCommand(cmd, plugins);
214
267
  }
215
268
  await runMain(defineCommand({
216
269
  meta: {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../src/discover.ts","../__vite-browser-external","../src/commands/info.ts","../src/utils/logger.ts","../src/cli.ts"],"sourcesContent":["/**\n * Auto-discover sigx CLI plugins from the project's dependencies.\n *\n * Scans the project's package.json for dependencies that declare\n * a `\"sigx-cli\": { \"plugin\": \"./path/to/plugin.js\" }` field.\n * Loads each plugin and calls `detect(cwd)` to check if it applies.\n */\n\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { SigxPlugin } from './plugin.js';\n\ninterface DepPackageJson {\n 'sigx-cli'?: {\n plugin: string;\n };\n}\n\nexport async function discoverPlugins(cwd: string): Promise<SigxPlugin[]> {\n const pkgPath = join(cwd, 'package.json');\n if (!existsSync(pkgPath)) return [];\n\n let pkg: Record<string, unknown>;\n try {\n pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n } catch {\n return [];\n }\n\n const allDeps: Record<string, string> = {\n ...(pkg.dependencies as Record<string, string> | undefined),\n ...(pkg.devDependencies as Record<string, string> | undefined),\n };\n\n const plugins: SigxPlugin[] = [];\n\n for (const depName of Object.keys(allDeps)) {\n try {\n const depPkgPath = join(cwd, 'node_modules', depName, 'package.json');\n if (!existsSync(depPkgPath)) continue;\n\n const depPkg: DepPackageJson = JSON.parse(readFileSync(depPkgPath, 'utf-8'));\n const pluginField = depPkg['sigx-cli'];\n if (!pluginField?.plugin) continue;\n\n const pluginPath = join(cwd, 'node_modules', depName, pluginField.plugin);\n if (!existsSync(pluginPath)) continue;\n\n const mod = await import(pathToFileURL(pluginPath).href);\n const plugin: SigxPlugin = mod.default || mod;\n\n if (typeof plugin.detect === 'function' && plugin.detect(cwd)) {\n plugins.push(plugin);\n }\n } catch {\n // Not a valid plugin or failed to load — skip silently\n }\n }\n\n return plugins;\n}\n","module.exports = {}","import { defineCommand } from 'citty';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { execSync } from 'node:child_process';\n\nfunction getVersion(cmd: string): string | null {\n try {\n return execSync(cmd, { stdio: 'pipe', encoding: 'utf-8' }).trim();\n } catch {\n return null;\n }\n}\n\nexport const infoCommand = defineCommand({\n meta: {\n name: 'info',\n description: 'Print environment and project info',\n },\n run() {\n const cwd = process.cwd();\n\n console.log('\\n \\x1b[1msigx environment info\\x1b[0m\\n');\n console.log(` Platform: ${process.platform} ${process.arch}`);\n console.log(` Node: ${process.version}`);\n\n // Package manager\n const pnpmVer = getVersion('pnpm --version');\n if (pnpmVer) console.log(` pnpm: v${pnpmVer}`);\n else {\n const npmVer = getVersion('npm --version');\n if (npmVer) console.log(` npm: v${npmVer}`);\n }\n\n // Project info\n const pkgPath = join(cwd, 'package.json');\n if (existsSync(pkgPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n console.log(` Project: ${pkg.name || '(unnamed)'} v${pkg.version || '0.0.0'}`);\n\n // Detect sigx packages\n const allDeps: Record<string, string> = {\n ...pkg.dependencies,\n ...pkg.devDependencies,\n };\n const sigxPkgs = Object.entries(allDeps)\n .filter(([name]) => name.startsWith('@sigx/') || name === 'sigx')\n .map(([name, version]) => `${name}@${version}`);\n\n if (sigxPkgs.length > 0) {\n console.log(` Sigx packages:`);\n for (const p of sigxPkgs) {\n console.log(` - ${p}`);\n }\n }\n } catch {\n // ignore parse errors\n }\n } else {\n console.log(' Project: (no package.json found)');\n }\n\n // Config files\n const configs = [\n { file: 'sigx.lynx.config.ts', label: 'Lynx' },\n { file: 'sigx.lynx.config.js', label: 'Lynx' },\n { file: 'lynx.config.ts', label: 'Lynx (rspeedy)' },\n { file: 'lynx.config.js', label: 'Lynx (rspeedy)' },\n { file: 'ssg.config.ts', label: 'SSG' },\n { file: 'vite.config.ts', label: 'Vite' },\n ];\n const detected = configs.filter(c => existsSync(join(cwd, c.file)));\n if (detected.length > 0) {\n console.log(` Config files:`);\n for (const c of detected) {\n console.log(` - ${c.file} (${c.label})`);\n }\n }\n\n // Lynx-specific info\n const isLynx = detected.some(c => c.label.includes('Lynx'));\n if (isLynx) {\n console.log('');\n console.log(' \\x1b[1mLynx Environment\\x1b[0m');\n\n // rspeedy\n const rspeedyVer = getVersion('npx rspeedy --version 2>&1');\n if (rspeedyVer) console.log(` rspeedy: v${rspeedyVer.trim()}`);\n\n // Android SDK\n const androidHome = process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT;\n if (androidHome) {\n console.log(` Android SDK: ${androidHome}`);\n }\n\n // JDK\n const javaVer = getVersion('java -version 2>&1');\n if (javaVer) {\n const match = javaVer.match(/version \"([^\"]+)\"/);\n if (match) console.log(` JDK: ${match[1]}`);\n }\n\n // ADB + devices\n try {\n const adbVer = getVersion('adb version');\n if (adbVer) {\n const verMatch = adbVer.match(/version ([\\d.]+)/);\n console.log(` ADB: ${verMatch ? `v${verMatch[1]}` : 'available'}`);\n\n const devOutput = execSync('adb devices -l', { stdio: 'pipe', encoding: 'utf-8' });\n const devices = devOutput.split('\\n')\n .slice(1)\n .filter(l => l.trim().length > 0)\n .map(l => {\n const modelMatch = l.match(/model:(\\S+)/);\n return modelMatch ? modelMatch[1].replace(/_/g, ' ') : l.split(/\\s+/)[0];\n });\n\n if (devices.length > 0) {\n console.log(` Devices: ${devices.join(', ')}`);\n }\n }\n } catch {\n // ADB not available\n }\n\n // Xcode (macOS only)\n if (process.platform === 'darwin') {\n const xcodeVer = getVersion('xcodebuild -version 2>/dev/null');\n if (xcodeVer) console.log(` Xcode: ${xcodeVer.split('\\n')[0]}`);\n\n const podVer = getVersion('pod --version');\n if (podVer) console.log(` CocoaPods: v${podVer}`);\n }\n }\n\n console.log('');\n },\n});\n","import type { Logger } from '../plugin.js';\n\nexport function createLogger(prefix = 'sigx'): Logger {\n return {\n log: (msg: string) => console.log(`[${prefix}] ${msg}`),\n warn: (msg: string) => console.warn(`[${prefix}] WARN: ${msg}`),\n error: (msg: string) => console.error(`[${prefix}] ERROR: ${msg}`),\n };\n}\n","#!/usr/bin/env node\n\n/**\n * sigx CLI — unified command-line tool for SignalX projects.\n *\n * Core commands (always available):\n * sigx create — scaffold a new project\n * sigx info — print environment info\n *\n * Plugin commands (auto-discovered from installed packages):\n * sigx dev — start dev server\n * sigx build — production build\n * sigx preview — preview build (SSG)\n * sigx prebuild — generate native project files (Lynx)\n * sigx run:android / run:ios — build + launch on device (Lynx)\n */\n\nimport { defineCommand, runMain } from 'citty';\nimport { readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { discoverPlugins } from './discover.js';\nimport { infoCommand } from './commands/info.js';\nimport { createLogger } from './utils/logger.js';\nimport type { PluginCommand } from './plugin.js';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));\nconst logger = createLogger();\n\nfunction wrapPluginCommand(cmd: PluginCommand) {\n return defineCommand({\n meta: { description: cmd.description },\n args: cmd.args as any,\n async run({ args }) {\n await cmd.run({ cwd: process.cwd(), args, logger });\n },\n });\n}\n\nasync function main() {\n const cwd = process.cwd();\n const plugins = await discoverPlugins(cwd);\n\n // Build subcommand map: core + plugin commands\n const subCommands: Record<string, ReturnType<typeof defineCommand>> = {\n info: infoCommand,\n };\n\n // Lazy-load create command only when needed (it pulls in @sigx/terminal)\n subCommands.create = defineCommand({\n meta: { name: 'create', description: 'Scaffold a new SignalX project' },\n async run() {\n const { runCreate } = await import('./commands/create.js');\n await runCreate();\n },\n });\n\n // Register plugin commands\n for (const plugin of plugins) {\n for (const [name, cmd] of Object.entries(plugin.commands)) {\n if (subCommands[name]) {\n // Command conflict — last plugin wins, but warn\n logger.warn(`Plugin \"${plugin.name}\" overrides command \"${name}\"`);\n }\n subCommands[name] = wrapPluginCommand(cmd);\n }\n }\n\n const mainCommand = defineCommand({\n meta: {\n name: 'sigx',\n version: pkg.version,\n description: 'SignalX CLI',\n },\n subCommands,\n });\n\n await runMain(mainCommand);\n}\n\nmain().catch((err) => {\n logger.error(err.message || String(err));\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,eAAsB,gBAAgB,KAAoC;CACtE,MAAM,UAAU,KAAK,KAAK,eAAe;CACzC,IAAI,CAAC,WAAW,QAAQ,EAAE,OAAO,EAAE;CAEnC,IAAI;CACJ,IAAI;EACA,MAAM,KAAK,MAAM,aAAa,SAAS,QAAQ,CAAC;SAC5C;EACJ,OAAO,EAAE;;CAGb,MAAM,UAAkC;EACpC,GAAI,IAAI;EACR,GAAI,IAAI;EACX;CAED,MAAM,UAAwB,EAAE;CAEhC,KAAK,MAAM,WAAW,OAAO,KAAK,QAAQ,EACtC,IAAI;EACA,MAAM,aAAa,KAAK,KAAK,gBAAgB,SAAS,eAAe;EACrE,IAAI,CAAC,WAAW,WAAW,EAAE;EAG7B,MAAM,cADyB,KAAK,MAAM,aAAa,YAAY,QAAQ,CACvD,CAAO;EAC3B,IAAI,CAAC,aAAa,QAAQ;EAE1B,MAAM,aAAa,KAAK,KAAK,gBAAgB,SAAS,YAAY,OAAO;EACzE,IAAI,CAAC,WAAW,WAAW,EAAE;EAE7B,MAAM,MAAM,MAAM,OAAO,cAAc,WAAW,CAAC;EACnD,MAAM,SAAqB,IAAI,WAAW;EAE1C,IAAI,OAAO,OAAO,WAAW,cAAc,OAAO,OAAO,IAAI,EACzD,QAAQ,KAAK,OAAO;SAEpB;CAKZ,OAAO;;;;;CC5DX,OAAO,UAAU,EAAA;;ACKjB,SAAS,WAAW,KAA4B;CAC5C,IAAI;EACA,QAAA,GAAA,+BAAA,UAAgB,KAAK;GAAE,OAAO;GAAQ,UAAU;GAAS,CAAC,CAAC,MAAM;SAC7D;EACJ,OAAO;;;AAIf,IAAa,cAAc,cAA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AAO,KAAK,uBAAuB,KAAK,GAAG;EAEtE,YAAY,QAAQ,kBAAkB,IAAI;;CAalD,MAAM,QATc,cAAc;EAC9B,MAAM;GACF,MAAM;GACN,SAAS,IAAI;GACb,aAAa;GAChB;EACD;EACH,CAEa,CAAY;;AAG9B,MAAM,CAAC,OAAO,QAAQ;CAClB,OAAO,MAAM,IAAI,WAAW,OAAO,IAAI,CAAC;CACxC,QAAQ,KAAK,EAAE;EACjB"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/discover.ts","../__vite-browser-external","../src/commands/info.ts","../src/utils/logger.ts","../src/cli.ts"],"sourcesContent":["/**\n * Auto-discover sigx CLI plugins from the project's dependencies.\n *\n * Scans the project's package.json for dependencies that declare\n * a `\"sigx-cli\"` manifest field:\n *\n * \"sigx-cli\": {\n * \"plugin\": \"./dist/plugin.js\",\n * \"requires\": \">=0.3.0\" // optional: CLI version range\n * }\n *\n * Loads each plugin and calls `detect(cwd)` to check if it applies.\n * When `requires` is declared and the RUNNING CLI binary doesn't satisfy\n * it, the plugin still loads (best effort) but a prominent warning tells\n * the user exactly how to update — peerDependencies can't cover this,\n * because the binary that dispatches commands isn't necessarily the\n * install the peer range was resolved against.\n */\n\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { SigxPlugin, Logger } from './plugin.js';\n\ninterface DepPackageJson {\n 'sigx-cli'?: {\n plugin: string;\n /** Semver range of @sigx/cli this plugin needs: '^x.y.z', '>=x.y.z', or exact. */\n requires?: string;\n };\n}\n\ninterface ParsedVersion { major: number; minor: number; patch: number }\n\nfunction parseVersion(v: string): ParsedVersion | null {\n const m = v.trim().match(/^(\\d+)\\.(\\d+)\\.(\\d+)/);\n if (!m) return null;\n return { major: Number(m[1]), minor: Number(m[2]), patch: Number(m[3]) };\n}\n\nfunction compare(a: ParsedVersion, b: ParsedVersion): number {\n return a.major - b.major || a.minor - b.minor || a.patch - b.patch;\n}\n\n/**\n * Minimal semver-range check covering the forms plugins actually use:\n * `^x.y.z` (0.x caret = same minor, like npm), `>=x.y.z`, and exact.\n * Unknown/garbled ranges return true — never block on a malformed field.\n */\nexport function satisfiesCliRange(version: string, range: string): boolean {\n const v = parseVersion(version);\n if (!v) return true;\n const r = range.trim();\n if (r.startsWith('^')) {\n const want = parseVersion(r.slice(1));\n if (!want) return true;\n if (compare(v, want) < 0) return false;\n // Caret: same major; on 0.x the minor acts as the major.\n if (v.major !== want.major) return false;\n if (want.major === 0 && v.minor !== want.minor) return false;\n return true;\n }\n if (r.startsWith('>=')) {\n const want = parseVersion(r.slice(2));\n return !want || compare(v, want) >= 0;\n }\n const want = parseVersion(r);\n return !want || compare(v, want) === 0;\n}\n\nexport interface DiscoverOptions {\n /** The running CLI's version — enables `requires` compatibility checks. */\n cliVersion?: string;\n /** Where compatibility warnings go. */\n logger?: Logger;\n}\n\nexport async function discoverPlugins(cwd: string, opts: DiscoverOptions = {}): Promise<SigxPlugin[]> {\n const pkgPath = join(cwd, 'package.json');\n if (!existsSync(pkgPath)) return [];\n\n let pkg: Record<string, unknown>;\n try {\n pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n } catch {\n return [];\n }\n\n const allDeps: Record<string, string> = {\n ...(pkg.dependencies as Record<string, string> | undefined),\n ...(pkg.devDependencies as Record<string, string> | undefined),\n };\n\n const plugins: SigxPlugin[] = [];\n\n for (const depName of Object.keys(allDeps)) {\n try {\n const depPkgPath = join(cwd, 'node_modules', depName, 'package.json');\n if (!existsSync(depPkgPath)) continue;\n\n const depPkg: DepPackageJson = JSON.parse(readFileSync(depPkgPath, 'utf-8'));\n const pluginField = depPkg['sigx-cli'];\n if (!pluginField?.plugin) continue;\n\n const pluginPath = join(cwd, 'node_modules', depName, pluginField.plugin);\n if (!existsSync(pluginPath)) continue;\n\n if (\n pluginField.requires &&\n opts.cliVersion &&\n !satisfiesCliRange(opts.cliVersion, pluginField.requires)\n ) {\n opts.logger?.warn(\n `Plugin \"${depName}\" requires sigx CLI ${pluginField.requires} ` +\n `but this project runs ${opts.cliVersion} — some commands may misbehave. ` +\n `Update with: pnpm up @sigx/cli --latest`,\n );\n }\n\n const mod = await import(pathToFileURL(pluginPath).href);\n const plugin: SigxPlugin = mod.default || mod;\n\n if (typeof plugin.detect === 'function' && plugin.detect(cwd)) {\n plugins.push(plugin);\n }\n } catch {\n // Not a valid plugin or failed to load — skip silently\n }\n }\n\n return plugins;\n}\n","module.exports = {}","import { defineCommand } from 'citty';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { execSync } from 'node:child_process';\n\nfunction getVersion(cmd: string): string | null {\n try {\n return execSync(cmd, { stdio: 'pipe', encoding: 'utf-8' }).trim();\n } catch {\n return null;\n }\n}\n\nexport const infoCommand = defineCommand({\n meta: {\n name: 'info',\n description: 'Print environment and project info',\n },\n run() {\n const cwd = process.cwd();\n\n console.log('\\n \\x1b[1msigx environment info\\x1b[0m\\n');\n console.log(` Platform: ${process.platform} ${process.arch}`);\n console.log(` Node: ${process.version}`);\n\n // Package manager\n const pnpmVer = getVersion('pnpm --version');\n if (pnpmVer) console.log(` pnpm: v${pnpmVer}`);\n else {\n const npmVer = getVersion('npm --version');\n if (npmVer) console.log(` npm: v${npmVer}`);\n }\n\n // Project info\n const pkgPath = join(cwd, 'package.json');\n if (existsSync(pkgPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n console.log(` Project: ${pkg.name || '(unnamed)'} v${pkg.version || '0.0.0'}`);\n\n // Detect sigx packages\n const allDeps: Record<string, string> = {\n ...pkg.dependencies,\n ...pkg.devDependencies,\n };\n const sigxPkgs = Object.entries(allDeps)\n .filter(([name]) => name.startsWith('@sigx/') || name === 'sigx')\n .map(([name, version]) => `${name}@${version}`);\n\n if (sigxPkgs.length > 0) {\n console.log(` Sigx packages:`);\n for (const p of sigxPkgs) {\n console.log(` - ${p}`);\n }\n }\n } catch {\n // ignore parse errors\n }\n } else {\n console.log(' Project: (no package.json found)');\n }\n\n // Config files\n const configs = [\n { file: 'sigx.lynx.config.ts', label: 'Lynx' },\n { file: 'sigx.lynx.config.js', label: 'Lynx' },\n { file: 'lynx.config.ts', label: 'Lynx (rspeedy)' },\n { file: 'lynx.config.js', label: 'Lynx (rspeedy)' },\n { file: 'ssg.config.ts', label: 'SSG' },\n { file: 'vite.config.ts', label: 'Vite' },\n ];\n const detected = configs.filter(c => existsSync(join(cwd, c.file)));\n if (detected.length > 0) {\n console.log(` Config files:`);\n for (const c of detected) {\n console.log(` - ${c.file} (${c.label})`);\n }\n }\n\n // Lynx-specific info\n const isLynx = detected.some(c => c.label.includes('Lynx'));\n if (isLynx) {\n console.log('');\n console.log(' \\x1b[1mLynx Environment\\x1b[0m');\n\n // rspeedy\n const rspeedyVer = getVersion('npx rspeedy --version 2>&1');\n if (rspeedyVer) console.log(` rspeedy: v${rspeedyVer.trim()}`);\n\n // Android SDK\n const androidHome = process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT;\n if (androidHome) {\n console.log(` Android SDK: ${androidHome}`);\n }\n\n // JDK\n const javaVer = getVersion('java -version 2>&1');\n if (javaVer) {\n const match = javaVer.match(/version \"([^\"]+)\"/);\n if (match) console.log(` JDK: ${match[1]}`);\n }\n\n // ADB + devices\n try {\n const adbVer = getVersion('adb version');\n if (adbVer) {\n const verMatch = adbVer.match(/version ([\\d.]+)/);\n console.log(` ADB: ${verMatch ? `v${verMatch[1]}` : 'available'}`);\n\n const devOutput = execSync('adb devices -l', { stdio: 'pipe', encoding: 'utf-8' });\n const devices = devOutput.split('\\n')\n .slice(1)\n .filter(l => l.trim().length > 0)\n .map(l => {\n const modelMatch = l.match(/model:(\\S+)/);\n return modelMatch ? modelMatch[1].replace(/_/g, ' ') : l.split(/\\s+/)[0];\n });\n\n if (devices.length > 0) {\n console.log(` Devices: ${devices.join(', ')}`);\n }\n }\n } catch {\n // ADB not available\n }\n\n // Xcode (macOS only)\n if (process.platform === 'darwin') {\n const xcodeVer = getVersion('xcodebuild -version 2>/dev/null');\n if (xcodeVer) console.log(` Xcode: ${xcodeVer.split('\\n')[0]}`);\n\n const podVer = getVersion('pod --version');\n if (podVer) console.log(` CocoaPods: v${podVer}`);\n }\n }\n\n console.log('');\n },\n});\n","import type { Logger } from '../plugin.js';\n\nexport function createLogger(prefix = 'sigx'): Logger {\n return {\n log: (msg: string) => console.log(`[${prefix}] ${msg}`),\n warn: (msg: string) => console.warn(`[${prefix}] WARN: ${msg}`),\n error: (msg: string) => console.error(`[${prefix}] ERROR: ${msg}`),\n };\n}\n","#!/usr/bin/env node\n\n/**\n * sigx CLI — unified command-line tool for SignalX projects.\n *\n * Core commands (always available):\n * sigx create — scaffold a new project\n * sigx info — print environment info\n *\n * Plugin commands (auto-discovered from installed packages):\n * sigx dev — start dev server\n * sigx build — production build\n * sigx preview — preview build (SSG)\n * sigx prebuild — generate native project files (Lynx)\n * sigx run:android / run:ios — build + launch on device (Lynx)\n */\n\nimport { defineCommand, runMain } from 'citty';\nimport { readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { discoverPlugins } from './discover.js';\nimport { infoCommand } from './commands/info.js';\nimport { createLogger } from './utils/logger.js';\nimport type { PluginCommand, SigxPlugin } from './plugin.js';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));\nconst logger = createLogger();\n\nfunction wrapPluginCommand(cmd: PluginCommand, plugins: SigxPlugin[]) {\n return defineCommand({\n meta: { description: cmd.description },\n args: cmd.args as any,\n async run({ args }) {\n // `plugins` lets a shell-hosting command (e.g. lynx dev) merge\n // peer plugins' TUI contributions via runShell({ plugins }).\n await cmd.run({ cwd: process.cwd(), args, logger, plugins, cliVersion: pkg.version });\n },\n });\n}\n\nasync function main() {\n const cwd = process.cwd();\n const plugins = await discoverPlugins(cwd, { cliVersion: pkg.version, logger });\n\n // Build subcommand map: core + plugin commands\n const subCommands: Record<string, ReturnType<typeof defineCommand>> = {\n info: infoCommand,\n };\n\n // Lazy-load create command only when needed (it pulls in @sigx/terminal)\n subCommands.create = defineCommand({\n meta: { name: 'create', description: 'Scaffold a new SignalX project' },\n async run() {\n const { runCreate } = await import('./commands/create.js');\n await runCreate();\n },\n });\n\n // Register plugin commands\n for (const plugin of plugins) {\n for (const [name, cmd] of Object.entries(plugin.commands)) {\n if (subCommands[name]) {\n // Command conflict — last plugin wins, but warn\n logger.warn(`Plugin \"${plugin.name}\" overrides command \"${name}\"`);\n }\n subCommands[name] = wrapPluginCommand(cmd, plugins);\n }\n }\n\n const mainCommand = defineCommand({\n meta: {\n name: 'sigx',\n version: pkg.version,\n description: 'SignalX CLI',\n },\n subCommands,\n });\n\n await runMain(mainCommand);\n}\n\nmain().catch((err) => {\n logger.error(err.message || String(err));\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAS,aAAa,GAAiC;CACnD,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,uBAAuB;CAChD,IAAI,CAAC,GAAG,OAAO;CACf,OAAO;EAAE,OAAO,OAAO,EAAE,GAAG;EAAE,OAAO,OAAO,EAAE,GAAG;EAAE,OAAO,OAAO,EAAE,GAAG;EAAE;;AAG5E,SAAS,QAAQ,GAAkB,GAA0B;CACzD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;;;;;;;AAQjE,SAAgB,kBAAkB,SAAiB,OAAwB;CACvE,MAAM,IAAI,aAAa,QAAQ;CAC/B,IAAI,CAAC,GAAG,OAAO;CACf,MAAM,IAAI,MAAM,MAAM;CACtB,IAAI,EAAE,WAAW,IAAI,EAAE;EACnB,MAAM,OAAO,aAAa,EAAE,MAAM,EAAE,CAAC;EACrC,IAAI,CAAC,MAAM,OAAO;EAClB,IAAI,QAAQ,GAAG,KAAK,GAAG,GAAG,OAAO;EAEjC,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