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 +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +32 -41
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.
|
|
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
package/scripts/postinstall.js
CHANGED
|
@@ -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.
|
|
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
|
-
//
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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.
|
|
149
|
+
version: '1.0.21'
|
|
166
150
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
+
})
|