@nimbuslab/cli 0.17.1 → 0.17.3
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/README.md +0 -8
- package/dist/index.js +91 -77
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -5,14 +5,7 @@ CLI para criar projetos com a stack moderna da nimbuslab.
|
|
|
5
5
|
## Instalacao
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
# Instalar CLI
|
|
9
8
|
npm install -g @nimbuslab/cli
|
|
10
|
-
|
|
11
|
-
# IMPORTANTE: Configurar ambiente Node.js (remove fnm/nvm, instala Volta)
|
|
12
|
-
nimbus setup node
|
|
13
|
-
|
|
14
|
-
# Instalar Lola (Code Agent)
|
|
15
|
-
nimbus lola install
|
|
16
9
|
```
|
|
17
10
|
|
|
18
11
|
## Comandos
|
|
@@ -23,7 +16,6 @@ nimbus analyze # Analisar stack do projeto atual
|
|
|
23
16
|
nimbus upgrade # Planejar upgrades de dependencias
|
|
24
17
|
nimbus update # Atualizar o CLI
|
|
25
18
|
nimbus setup node # Configurar ambiente Node.js (Volta)
|
|
26
|
-
nimbus lola install # Instalar Lola (Code Agent)
|
|
27
19
|
nimbus help # Ajuda
|
|
28
20
|
```
|
|
29
21
|
|
package/dist/index.js
CHANGED
|
@@ -146,61 +146,6 @@ var require_src = __commonJS((exports, module) => {
|
|
|
146
146
|
module.exports = { cursor, scroll, erase, beep };
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
// package.json
|
|
150
|
-
var require_package = __commonJS((exports, module) => {
|
|
151
|
-
module.exports = {
|
|
152
|
-
name: "@nimbuslab/cli",
|
|
153
|
-
version: "0.17.0",
|
|
154
|
-
description: "CLI para criar projetos nimbuslab",
|
|
155
|
-
type: "module",
|
|
156
|
-
bin: {
|
|
157
|
-
nimbus: "./dist/index.js"
|
|
158
|
-
},
|
|
159
|
-
files: [
|
|
160
|
-
"dist"
|
|
161
|
-
],
|
|
162
|
-
scripts: {
|
|
163
|
-
dev: "bun run src/index.ts",
|
|
164
|
-
build: "bun build src/index.ts --outdir dist --target bun",
|
|
165
|
-
typecheck: "tsc --noEmit"
|
|
166
|
-
},
|
|
167
|
-
keywords: [
|
|
168
|
-
"nimbuslab",
|
|
169
|
-
"cli",
|
|
170
|
-
"nextjs",
|
|
171
|
-
"fast",
|
|
172
|
-
"landing-page",
|
|
173
|
-
"saas"
|
|
174
|
-
],
|
|
175
|
-
author: {
|
|
176
|
-
name: "nimbuslab",
|
|
177
|
-
email: "contato@nimbuslab.com.br",
|
|
178
|
-
url: "https://nimbuslab.com.br"
|
|
179
|
-
},
|
|
180
|
-
license: "UNLICENSED",
|
|
181
|
-
private: false,
|
|
182
|
-
repository: {
|
|
183
|
-
type: "git",
|
|
184
|
-
url: "git+https://github.com/nimbuslab/cli.git"
|
|
185
|
-
},
|
|
186
|
-
homepage: "https://nimbuslab.com.br",
|
|
187
|
-
bugs: {
|
|
188
|
-
url: "https://github.com/nimbuslab/cli/issues"
|
|
189
|
-
},
|
|
190
|
-
engines: {
|
|
191
|
-
node: ">=18"
|
|
192
|
-
},
|
|
193
|
-
devDependencies: {
|
|
194
|
-
"@types/bun": "latest",
|
|
195
|
-
typescript: "^5"
|
|
196
|
-
},
|
|
197
|
-
dependencies: {
|
|
198
|
-
"@clack/prompts": "^0.11.0",
|
|
199
|
-
picocolors: "^1.1.1"
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
|
|
204
149
|
// src/index.ts
|
|
205
150
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
206
151
|
|
|
@@ -3504,11 +3449,14 @@ function detectFnm() {
|
|
|
3504
3449
|
const fnmLocations = IS_WINDOWS ? [
|
|
3505
3450
|
join4(HOME2, "scoop", "shims", "fnm.exe"),
|
|
3506
3451
|
join4(HOME2, "scoop", "apps", "fnm", "current", "fnm.exe"),
|
|
3507
|
-
|
|
3452
|
+
"C:\\ProgramData\\chocolatey\\bin\\fnm.exe",
|
|
3508
3453
|
join4(HOME2, ".cargo", "bin", "fnm.exe"),
|
|
3509
3454
|
join4(HOME2, ".fnm", "fnm.exe"),
|
|
3510
3455
|
join4(HOME2, "AppData", "Local", "fnm", "fnm.exe"),
|
|
3511
|
-
join4(HOME2, "AppData", "Roaming", "fnm", "fnm.exe")
|
|
3456
|
+
join4(HOME2, "AppData", "Roaming", "fnm", "fnm.exe"),
|
|
3457
|
+
join4(HOME2, "AppData", "Local", "Microsoft", "fnm", "fnm.exe"),
|
|
3458
|
+
join4(HOME2, "AppData", "Roaming", "fnm"),
|
|
3459
|
+
join4(HOME2, "AppData", "Local", "fnm_multishells")
|
|
3512
3460
|
] : [
|
|
3513
3461
|
join4(HOME2, ".local", "share", "fnm", "fnm"),
|
|
3514
3462
|
join4(HOME2, ".fnm", "fnm"),
|
|
@@ -3529,6 +3477,17 @@ function detectFnm() {
|
|
|
3529
3477
|
}
|
|
3530
3478
|
}
|
|
3531
3479
|
}
|
|
3480
|
+
if (!fnmPath && process.env.FNM_DIR) {
|
|
3481
|
+
if (existsSync3(process.env.FNM_DIR)) {
|
|
3482
|
+
fnmPath = process.env.FNM_DIR;
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3485
|
+
if (!fnmPath && IS_WINDOWS) {
|
|
3486
|
+
const fnmMultishells = join4(HOME2, "AppData", "Local", "fnm_multishells");
|
|
3487
|
+
if (existsSync3(fnmMultishells)) {
|
|
3488
|
+
fnmPath = fnmMultishells;
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3532
3491
|
if (!fnmPath)
|
|
3533
3492
|
return result;
|
|
3534
3493
|
result.installed = true;
|
|
@@ -3571,8 +3530,9 @@ function detectNvm() {
|
|
|
3571
3530
|
const check = spawnSync2(CHECK_CMD2, ["nvm"], { encoding: "utf-8", shell: true });
|
|
3572
3531
|
const nvmWinLocations = [
|
|
3573
3532
|
join4(HOME2, "AppData", "Roaming", "nvm", "nvm.exe"),
|
|
3574
|
-
|
|
3575
|
-
|
|
3533
|
+
"C:\\Program Files\\nvm\\nvm.exe",
|
|
3534
|
+
"C:\\ProgramData\\nvm\\nvm.exe",
|
|
3535
|
+
join4(HOME2, "nvm", "nvm.exe")
|
|
3576
3536
|
];
|
|
3577
3537
|
let nvmPath = null;
|
|
3578
3538
|
if (check.exitCode === 0) {
|
|
@@ -3771,7 +3731,9 @@ async function removeFnm(fnm) {
|
|
|
3771
3731
|
const winFnmDirs = [
|
|
3772
3732
|
join4(HOME2, ".fnm"),
|
|
3773
3733
|
join4(HOME2, "AppData", "Local", "fnm"),
|
|
3774
|
-
join4(HOME2, "AppData", "Roaming", "fnm")
|
|
3734
|
+
join4(HOME2, "AppData", "Roaming", "fnm"),
|
|
3735
|
+
join4(HOME2, "AppData", "Local", "fnm_multishells"),
|
|
3736
|
+
join4(HOME2, "AppData", "Local", "Microsoft", "fnm")
|
|
3775
3737
|
];
|
|
3776
3738
|
for (const dir of winFnmDirs) {
|
|
3777
3739
|
if (existsSync3(dir)) {
|
|
@@ -3779,9 +3741,21 @@ async function removeFnm(fnm) {
|
|
|
3779
3741
|
execSync2(`rmdir /s /q "${dir}"`, { stdio: "pipe", shell: true });
|
|
3780
3742
|
console.log(import_picocolors8.default.dim(` Removido ${dir}`));
|
|
3781
3743
|
removed = true;
|
|
3782
|
-
} catch {
|
|
3744
|
+
} catch {
|
|
3745
|
+
try {
|
|
3746
|
+
execSync2(`powershell -Command "Remove-Item -Path '${dir}' -Recurse -Force"`, { stdio: "pipe" });
|
|
3747
|
+
console.log(import_picocolors8.default.dim(` Removido ${dir}`));
|
|
3748
|
+
removed = true;
|
|
3749
|
+
} catch {}
|
|
3750
|
+
}
|
|
3783
3751
|
}
|
|
3784
3752
|
}
|
|
3753
|
+
try {
|
|
3754
|
+
execSync2(`powershell -Command "[Environment]::SetEnvironmentVariable('FNM_DIR', $null, 'User')"`, { stdio: "pipe" });
|
|
3755
|
+
execSync2(`powershell -Command "[Environment]::SetEnvironmentVariable('FNM_MULTISHELL_PATH', $null, 'User')"`, { stdio: "pipe" });
|
|
3756
|
+
console.log(import_picocolors8.default.dim(" Variaveis de ambiente FNM removidas"));
|
|
3757
|
+
removed = true;
|
|
3758
|
+
} catch {}
|
|
3785
3759
|
for (const configFile of fnm.configFiles || []) {
|
|
3786
3760
|
if (removeFnmFromConfig(configFile)) {
|
|
3787
3761
|
console.log(import_picocolors8.default.dim(` Removido de ${configFile}`));
|
|
@@ -3908,29 +3882,70 @@ async function installVolta() {
|
|
|
3908
3882
|
try {
|
|
3909
3883
|
if (IS_WINDOWS) {
|
|
3910
3884
|
spinner.start("Verificando metodo de instalacao...");
|
|
3911
|
-
const chocoCheck = spawnSync2(CHECK_CMD2, ["choco"], { encoding: "utf-8", shell: true });
|
|
3912
|
-
if (chocoCheck.exitCode === 0) {
|
|
3913
|
-
spinner.stop("Chocolatey detectado");
|
|
3914
|
-
spinner.start("Instalando Volta via Chocolatey...");
|
|
3915
|
-
execSync2("choco install volta -y", { stdio: "pipe" });
|
|
3916
|
-
spinner.stop("Volta instalado!");
|
|
3917
|
-
return true;
|
|
3918
|
-
}
|
|
3919
3885
|
const wingetCheck = spawnSync2(CHECK_CMD2, ["winget"], { encoding: "utf-8", shell: true });
|
|
3920
3886
|
if (wingetCheck.exitCode === 0) {
|
|
3921
3887
|
spinner.stop("winget detectado");
|
|
3922
3888
|
spinner.start("Instalando Volta via winget...");
|
|
3923
|
-
|
|
3889
|
+
try {
|
|
3890
|
+
execSync2("winget install Volta.Volta --silent --accept-package-agreements --accept-source-agreements", {
|
|
3891
|
+
stdio: "pipe",
|
|
3892
|
+
timeout: 120000
|
|
3893
|
+
});
|
|
3894
|
+
spinner.stop("Volta instalado!");
|
|
3895
|
+
const voltaPath = join4(HOME2, ".volta", "bin");
|
|
3896
|
+
console.log(import_picocolors8.default.dim(` Adicionando ${voltaPath} ao PATH...`));
|
|
3897
|
+
try {
|
|
3898
|
+
execSync2(`setx PATH "%PATH%;${voltaPath}"`, { stdio: "pipe", shell: true });
|
|
3899
|
+
} catch {}
|
|
3900
|
+
return true;
|
|
3901
|
+
} catch (e2) {
|
|
3902
|
+
spinner.stop(import_picocolors8.default.yellow("winget falhou, tentando outro metodo..."));
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
const chocoCheck = spawnSync2(CHECK_CMD2, ["choco"], { encoding: "utf-8", shell: true });
|
|
3906
|
+
if (chocoCheck.exitCode === 0) {
|
|
3907
|
+
spinner.start("Instalando Volta via Chocolatey...");
|
|
3908
|
+
try {
|
|
3909
|
+
execSync2("choco install volta -y", { stdio: "pipe", timeout: 120000 });
|
|
3910
|
+
spinner.stop("Volta instalado!");
|
|
3911
|
+
return true;
|
|
3912
|
+
} catch {
|
|
3913
|
+
spinner.stop(import_picocolors8.default.yellow("Chocolatey falhou"));
|
|
3914
|
+
}
|
|
3915
|
+
}
|
|
3916
|
+
spinner.start("Baixando Volta diretamente...");
|
|
3917
|
+
try {
|
|
3918
|
+
const psScript = `
|
|
3919
|
+
$ErrorActionPreference = 'Stop'
|
|
3920
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
3921
|
+
$voltaUrl = 'https://get.volta.sh'
|
|
3922
|
+
$response = Invoke-WebRequest -Uri $voltaUrl -UseBasicParsing
|
|
3923
|
+
# Volta nao tem instalador PS nativo, usar release direto
|
|
3924
|
+
$releaseUrl = 'https://github.com/volta-cli/volta/releases/latest/download/volta-windows.msi'
|
|
3925
|
+
$msiPath = "$env:TEMP\\volta-installer.msi"
|
|
3926
|
+
Invoke-WebRequest -Uri $releaseUrl -OutFile $msiPath
|
|
3927
|
+
Start-Process msiexec.exe -ArgumentList '/i', $msiPath, '/quiet', '/norestart' -Wait
|
|
3928
|
+
Remove-Item $msiPath -Force
|
|
3929
|
+
`;
|
|
3930
|
+
execSync2(`powershell -ExecutionPolicy Bypass -Command "${psScript.replace(/\n/g, " ")}"`, {
|
|
3931
|
+
stdio: "pipe",
|
|
3932
|
+
timeout: 180000
|
|
3933
|
+
});
|
|
3924
3934
|
spinner.stop("Volta instalado!");
|
|
3925
3935
|
return true;
|
|
3936
|
+
} catch (e2) {
|
|
3937
|
+
spinner.stop(import_picocolors8.default.yellow("Download direto falhou"));
|
|
3926
3938
|
}
|
|
3927
|
-
spinner.stop(import_picocolors8.default.yellow("Instale manualmente"));
|
|
3928
3939
|
console.log();
|
|
3929
|
-
console.log(import_picocolors8.default.bold("
|
|
3930
|
-
console.log(
|
|
3940
|
+
console.log(import_picocolors8.default.bold(" Instale manualmente:"));
|
|
3941
|
+
console.log();
|
|
3942
|
+
console.log(import_picocolors8.default.cyan(" 1. Baixe: https://github.com/volta-cli/volta/releases/latest"));
|
|
3943
|
+
console.log(import_picocolors8.default.dim(" (arquivo volta-windows.msi)"));
|
|
3944
|
+
console.log();
|
|
3945
|
+
console.log(import_picocolors8.default.cyan(" 2. Execute o instalador"));
|
|
3946
|
+
console.log();
|
|
3947
|
+
console.log(import_picocolors8.default.cyan(" 3. Reinicie o terminal"));
|
|
3931
3948
|
console.log();
|
|
3932
|
-
console.log(import_picocolors8.default.dim(" Ou instale Chocolatey primeiro:"));
|
|
3933
|
-
console.log(import_picocolors8.default.dim(" https://chocolatey.org/install"));
|
|
3934
3949
|
return false;
|
|
3935
3950
|
} else {
|
|
3936
3951
|
spinner.start("Baixando e instalando Volta...");
|
|
@@ -4120,8 +4135,7 @@ async function setupNode(args) {
|
|
|
4120
4135
|
|
|
4121
4136
|
// src/index.ts
|
|
4122
4137
|
var PACKAGE_NAME2 = "@nimbuslab/cli";
|
|
4123
|
-
var
|
|
4124
|
-
var CURRENT_VERSION = pkg.version;
|
|
4138
|
+
var CURRENT_VERSION = "0.17.3";
|
|
4125
4139
|
var LOGO = `
|
|
4126
4140
|
\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
4127
4141
|
\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbuslab/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"description": "CLI para criar projetos nimbuslab",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"dev": "bun run src/index.ts",
|
|
14
|
-
"build": "bun
|
|
15
|
-
"typecheck": "tsc --noEmit"
|
|
14
|
+
"build": "bun run scripts/build.ts",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"prepublishOnly": "bun run build",
|
|
17
|
+
"release": "bunx bumpp && bun run build && npm publish",
|
|
18
|
+
"release:patch": "bunx bumpp patch && bun run build && npm publish",
|
|
19
|
+
"release:minor": "bunx bumpp minor && bun run build && npm publish",
|
|
20
|
+
"release:major": "bunx bumpp major && bun run build && npm publish"
|
|
16
21
|
},
|
|
17
22
|
"keywords": [
|
|
18
23
|
"nimbuslab",
|