nex-framework-cli 1.0.21 → 1.0.22

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/cli/nex-cli.js CHANGED
@@ -28,7 +28,7 @@ program.configureHelp({
28
28
  program
29
29
  .name('nex')
30
30
  .description('NEX Framework - Framework completo de agentes AI')
31
- .version('1.0.20', '-v, --version', 'Mostra a versão')
31
+ .version('1.0.21', '-v, --version', 'Mostra a versão')
32
32
  .addHelpText('before', chalk.bold.cyan(`
33
33
  ╔════════════════════════════════════════════════════════════════╗
34
34
  ║ NEX Framework - CLI v1.0.9 ║
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nex-framework-cli",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "NEX CLI - Command-line interface for NEX Framework and Agent Marketplace",
5
5
  "type": "module",
6
6
  "main": "cli/nex-cli.js",
@@ -116,7 +116,7 @@ export async function runSetup(force = false) {
116
116
  enabled: answers.cursorIntegration
117
117
  },
118
118
  installedAt: new Date().toISOString(),
119
- version: '1.0.20'
119
+ version: '1.0.21'
120
120
  }
121
121
 
122
122
  // Save config
@@ -132,48 +132,39 @@ export async function runSetup(force = false) {
132
132
  console.log(chalk.cyan('\n💡 Dica: Para reconfigurar, execute: nex config reset\n'))
133
133
  }
134
134
 
135
- // Check if running in interactive mode (TTY available)
136
- const isInteractive = process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY
137
- const isCI = process.env.CI === 'true'
138
- const skipSetup = process.env.NEX_SKIP_SETUP === 'true'
139
-
140
- // Only run interactive setup if:
141
- // 1. Not in CI
142
- // 2. Not explicitly skipped
143
- // 3. Running in interactive mode (TTY)
144
- if (!isCI && !skipSetup && isInteractive) {
145
- runSetup().catch((error) => {
146
- console.error(chalk.red('\n❌ Erro ao configurar NEX CLI:'))
147
- console.error(chalk.red(error.message))
148
- console.log(chalk.yellow('\n💡 Você pode configurar manualmente depois executando: nex config reset\n'))
149
- process.exit(0) // Don't fail the install
150
- })
151
- } else {
152
- // Non-interactive mode: create default config silently
153
- const configPath = getGlobalConfigPath()
154
- const configDir = path.dirname(configPath)
155
- const defaultConfig = {
156
- user: {
157
- name: process.env.USER || process.env.USERNAME || 'Developer',
158
- conversationLanguage: 'pt-BR',
159
- documentLanguage: 'pt-BR'
160
- },
135
+ // Always create default config silently (fast, non-blocking)
136
+ // User can configure later with: nex config reset
137
+ const configPath = getGlobalConfigPath()
138
+ const configDir = path.dirname(configPath)
139
+ const defaultConfig = {
140
+ user: {
141
+ name: process.env.USER || process.env.USERNAME || 'Developer',
142
+ conversationLanguage: 'pt-BR',
143
+ documentLanguage: 'pt-BR'
144
+ },
161
145
  cursor: {
162
146
  enabled: false
163
147
  },
164
148
  installedAt: new Date().toISOString(),
165
- version: '1.0.20'
149
+ version: '1.0.21'
166
150
  }
167
-
168
- fs.ensureDir(configDir)
169
- .then(() => fs.writeJSON(configPath, defaultConfig, { spaces: 2 }))
170
- .then(() => {
171
- if (!isCI && isInteractive) {
172
- console.log(chalk.green('\n✅ NEX CLI instalado com configuração padrão'))
173
- console.log(chalk.gray(' Para configurar: nex config reset\n'))
174
- }
175
- })
176
- .catch(() => {
177
- // Silently fail in non-interactive mode
178
- })
179
- }
151
+
152
+ // Create config asynchronously without blocking
153
+ fs.ensureDir(configDir)
154
+ .then(() => fs.writeJSON(configPath, defaultConfig, { spaces: 2 }))
155
+ .then(() => {
156
+ // Only show message if in interactive mode and not CI
157
+ const isInteractive = process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY
158
+ const isCI = process.env.CI === 'true'
159
+ if (!isCI && isInteractive) {
160
+ console.log(chalk.green('\n✅ NEX CLI instalado com configuração padrão'))
161
+ console.log(chalk.gray(' Para configurar: nex config reset\n'))
162
+ }
163
+ })
164
+ .catch(() => {
165
+ // Silently fail - don't block installation
166
+ })
167
+ .finally(() => {
168
+ // Always exit successfully to not block npm install
169
+ process.exit(0)
170
+ })