nucleus-core-ts 0.9.30 → 0.9.32

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/bin/cli.ts CHANGED
@@ -16,14 +16,17 @@ const DIM = '\x1b[2m'
16
16
  const RED = '\x1b[31m'
17
17
  const RESET = '\x1b[0m'
18
18
 
19
- const command = process.argv[2]
19
+ // Detect legacy `nucleus-generate config.json output/` invocation
20
+ const firstArg = process.argv[2] ?? ''
21
+ const looksLikeFile = firstArg.endsWith('.json') || firstArg.startsWith('./') || firstArg.startsWith('/')
22
+ const command = looksLikeFile ? 'generate' : firstArg
20
23
 
21
24
  function showHelp() {
22
25
  console.log(`
23
26
  ${CYAN}${BOLD}Nucleus CLI${RESET} ${DIM}(nucleus-core-ts)${RESET}
24
27
 
25
28
  ${BOLD}Usage:${RESET}
26
- bunx nucleus-core-ts ${CYAN}<command>${RESET}
29
+ npx nucleus-core-ts ${CYAN}<command>${RESET}
27
30
 
28
31
  ${BOLD}Commands:${RESET}
29
32
  ${CYAN}scaffold${RESET} Interactive project scaffolding (API + frontend + k8s + pipelines)
@@ -31,8 +34,8 @@ ${BOLD}Commands:${RESET}
31
34
  ${CYAN}help${RESET} Show this help message
32
35
 
33
36
  ${BOLD}Examples:${RESET}
34
- ${DIM}bunx nucleus-core-ts scaffold${RESET}
35
- ${DIM}bunx nucleus-core-ts generate src/config.json src/drizzle${RESET}
37
+ ${DIM}npx nucleus-core-ts scaffold${RESET}
38
+ ${DIM}npx nucleus-core-ts generate src/config.json src/drizzle${RESET}
36
39
  `)
37
40
  }
38
41