@leonardofirme/deploy-nextjs16 1.2.3 → 1.2.4
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.js +46 -35
- package/package.json +1 -1
- package/src/app/page.tsx +1 -1
package/bin/cli.js
CHANGED
|
@@ -2,52 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file cli.js
|
|
5
|
-
* @description CLI Profissional
|
|
5
|
+
* @description CLI Profissional Leonardo Firme - Deploy System
|
|
6
6
|
* @author Leonardo Firme
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
const { execSync } = require('child_process');
|
|
10
|
-
const fs = require('fs
|
|
10
|
+
const fs = require('fs');
|
|
11
11
|
const path = require('path');
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
// ANSI Escape Codes para cores (Nativo, não depende de libs externas que quebram)
|
|
14
|
+
const reset = "\x1b[0m";
|
|
15
|
+
const bold = "\x1b[1m";
|
|
16
|
+
const cyan = "\x1b[36m";
|
|
17
|
+
const green = "\x1b[32m";
|
|
18
|
+
const white = "\x1b[37m";
|
|
19
|
+
const gray = "\x1b[90m";
|
|
20
|
+
const red = "\x1b[31m";
|
|
13
21
|
|
|
14
22
|
const projectName = process.argv[2] || '.';
|
|
15
23
|
const targetPath = path.resolve(process.cwd(), projectName);
|
|
16
24
|
|
|
17
|
-
console.log(
|
|
18
|
-
console.log(
|
|
19
|
-
console.log(
|
|
25
|
+
console.log(`${gray}\n---------------------------------------------------${reset}`);
|
|
26
|
+
console.log(`${white}${bold} ESTRUTURAS LEONARDO FIRME | DEPLOY SYSTEM${reset}`);
|
|
27
|
+
console.log(`${gray}---------------------------------------------------${reset}\n`);
|
|
20
28
|
|
|
21
29
|
try {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
console.log(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
// 1. Clonagem
|
|
31
|
+
console.log(`${cyan}▹ Clonando repositório de LeonardoFirme/deploy-nextjs16...${reset}`);
|
|
32
|
+
execSync(`npx degit LeonardoFirme/deploy-nextjs16 ${projectName} --force`, { stdio: 'inherit' });
|
|
33
|
+
|
|
34
|
+
// 2. Limpeza da pasta bin (Remover o que não pertence ao usuário)
|
|
35
|
+
const unwantedBin = path.join(targetPath, 'bin');
|
|
36
|
+
if (fs.existsSync(unwantedBin)) {
|
|
37
|
+
fs.rmSync(unwantedBin, { recursive: true, force: true });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 3. Instalação Automática
|
|
41
|
+
console.log(`\n${cyan}▹ Instalando dependências do ecossistema...${reset}`);
|
|
42
|
+
process.chdir(targetPath);
|
|
43
|
+
|
|
44
|
+
// Executa o install e mostra o progresso real para o usuário
|
|
45
|
+
execSync('npm install', { stdio: 'inherit' });
|
|
46
|
+
|
|
47
|
+
// 4. Assinatura Final
|
|
48
|
+
console.log(`${gray}\n---------------------------------------------------${reset}`);
|
|
49
|
+
console.log(`${green}${bold} 🚀 ESTRUTURA INSTALADA COM SUCESSO!${reset}`);
|
|
50
|
+
console.log(`\n Para iniciar o desenvolvimento:`);
|
|
51
|
+
if (projectName !== '.') {
|
|
52
|
+
console.log(`${cyan} cd ${projectName}${reset}`);
|
|
53
|
+
}
|
|
54
|
+
console.log(`${cyan} npm run dev${reset}`);
|
|
55
|
+
|
|
56
|
+
console.log(`${gray}\n Desenvolvido com precisão por:${reset}`);
|
|
57
|
+
console.log(`${white}${bold} LEONARDO FIRME • 2026${reset}`);
|
|
58
|
+
console.log(`${gray}---------------------------------------------------${reset}\n`);
|
|
49
59
|
|
|
50
60
|
} catch (error) {
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
console.error(`${red}\n❌ Erro crítico na inicialização:${reset}`);
|
|
62
|
+
console.error(error.message);
|
|
63
|
+
process.exit(1);
|
|
53
64
|
}
|
package/package.json
CHANGED
package/src/app/page.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export default function HomePage() {
|
|
|
35
35
|
{/* Badge de Versão */}
|
|
36
36
|
<motion.div variants={ITEM_VARIANTS}>
|
|
37
37
|
<Badge className="bg-white px-5 py-1.5 font-orbitron tracking-[0.2em] text-gray-800 border-gray-200 dark:bg-gray-950/30 dark:border-gray-800 dark:text-gray-50">
|
|
38
|
-
ESTRUTURA V1.2.
|
|
38
|
+
ESTRUTURA V1.2.4 VALIDADA
|
|
39
39
|
</Badge>
|
|
40
40
|
</motion.div>
|
|
41
41
|
|