create-domis 1.0.52 → 1.0.54

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.
Files changed (3) hide show
  1. package/README.md +261 -245
  2. package/dist/index.js +53 -22
  3. package/package.json +36 -42
package/README.md CHANGED
@@ -1,245 +1,261 @@
1
- ![NPM Version](https://img.shields.io/npm/v/create-domis?style=for-the-badge&logo=npm&color=CB3837)
2
- ![NPM Downloads](https://img.shields.io/npm/dm/create-domis?style=for-the-badge)
3
- ![Next.js](https://img.shields.io/badge/Next.js-15-black?style=for-the-badge&logo=next.js&logoColor=white)
4
- ![Tailwind v4](https://img.shields.io/badge/Tailwind-v4-38BDF8?style=for-the-badge&logo=tailwindcss&logoColor=white)
5
- ![Status](https://img.shields.io/badge/Status-Validado-brightgreen?style=for-the-badge)
6
-
7
- <h2 id="sobre-o-cli">1. 🚀 Create Domis - O Acelerador Next.Js 15 + Firebase Killer 🚀</h2>
8
-
9
- ![Status](https://img.shields.io/badge/Status-Online-brightgreen?style=flat-square)
10
- ![CLI](https://img.shields.io/badge/CLI-Oficial-26FF00?style=flat-square)
11
- ![Firebase](https://img.shields.io/badge/Firebase-Ready-FFCA28?style=flat-square&logo=firebase&logoColor=black)
12
- [![License](https://img.shields.io/badge/License-Private_Commercial_v1.3-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
13
- ![Imagem DomisPacks](./src/assets/domispacks.png)
14
-
15
- Bem-vindo ao **CLI Oficial Domis**. O &nbsp;`npm create domis@latest` é um acelerador de projetos que elimina 3 horas de configuração de `firebase.json`, &nbsp;`firestore.rules` e &nbsp;`GitHub Actions` com 1 comando. Resolvemos o bug de Hosting que quebra 90% dos deploys Next.js 15 no Firebase.
16
-
17
- ---
18
-
19
- ## 📚 Tabela de Conteúdo
20
-
21
- | 💻 O CLI | 🛠 Técnico | 🤝 Comercial |
22
- | :---: | :---: | :---: |
23
- | [![1. Sobre](https://img.shields.io/badge/1%20-%20Sobre-4CAF50)](#sobre-o-cli) | [![5. Techs](https://img.shields.io/badge/5%20-%20Techs-607D8B)](#tecnologias) | [![9. Estrutura](https://img.shields.io/badge/9%20-%20Estrutura-795548)](#estrutura) |
24
- | [![2. Instalação](https://img.shields.io/badge/2%20-%20Instalação-2196F3)](#instalacao) | [![6. Packs](https://img.shields.io/badge/6%20-%20Packs-009688)](#templates-inclusos) | [![10. Venda](https://img.shields.io/badge/10%20-%20Venda-FF9800)](#como-funciona-a-venda) |
25
- | [![3. Uso Rápido](https://img.shields.io/badge/3%20-%20Uso-FF9800)](#uso-rapido) | [![7. Fluxo](https://img.shields.io/badge/7%20-%20Fluxo-3F51B5)](#fluxo-de-uso) | [![11. Licença](https://img.shields.io/badge/11%20-%20Licença-E91E63)](#licenca) |
26
- | [![4. Comandos](https://img.shields.io/badge/4%20-%20Comandos-9C27B0)](#comandos) | [![8. FAQ](https://img.shields.io/badge/8%20-%20FAQ-FFC107)](#faq) | [![12. Domis](https://img.shields.io/badge/12%20-%20Domis-212121)](#perfil) |
27
-
28
- ---
29
-
30
- <h2 id="instalacao">2. ⚙ Instalação</h2>
31
-
32
- Não precisa instalar global. Rode sempre na última versão:
33
-
34
- ```bash
35
- npm create domis@latest
36
- ```
37
-
38
- ---
39
-
40
- <h2 id="uso-rapido">3. 🚀 Uso Rápido</h2>
41
-
42
- Todo mundo roda o mesmo comando. O que muda é o que sua PRO_KEY liberou no `verificar.html`:
43
-
44
- ```bash
45
- npm create domis@latest
46
- ```
47
-
48
- O CLI vai abrir:
49
-
50
- ```bash
51
- 🔥 DomisPacks Technical v1.1.0
52
-
53
- ? Qual pack você quer acelerar hoje?
54
-
55
- > 🔥 Ver DEMO Grátis - firebase.json
56
- 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
57
- 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
58
- ```
59
-
60
- | Você comprou | O que acontece |
61
- | :--- | :--- |
62
- | **DEMO Grátis** | Libera o `firebase.json` básico para você usar |
63
- | **Lite R$49** | Escolhe `DomisDocs Lite` e cria na hora |
64
- | **Pro R$197** | Valida sua PRO_KEY no `verificar.html`, depois escolhe `DomisDocs PRO` no mesmo comando |
65
-
66
- > A autenticação `--key` é feita por debaixo dos panos pelo `verificar.html`. Você não precisa digitar `--template` ou `--key` na mão.
67
-
68
- ---
69
-
70
- <h2 id="comandos">4. 🧩 Comandos Disponíveis</h2>
71
-
72
- | Comando | O que faz |
73
- | :--- | :--- |
74
- | `npm create domis@latest` | Modo interativo (recomendado) - lista Grátis/Lite/Pro liberados pela sua key nas versões pagas |
75
- | `--template <nome>` | Uso interno - pula o menu - gerenciado pelo verificar.html |
76
- | `--key <PRO_KEY>` | Uso interno - autentica no repo privado - gerenciado pelo verificar.html |
77
- | `--help` | Lista todos os templates disponíveis |
78
-
79
- ---
80
-
81
- <h2 id="tecnologias">5. 💻 Stack do CLI</h2>
82
-
83
- | Camada | Tecnologia |
84
- | :--- | :--- |
85
- | **Core** | Node + TypeScript |
86
- | **CLI Engine** | `create-*` + `prompts` + `degit` |
87
- | **Infra** | GitHub Private Repo como CDN seguro de Packs |
88
- | **Auth** | PRO_KEY Kiwify via verificar.html |
89
- | **Frontend** | Next.js 15 + Tailwind v4 |
90
-
91
- ---
92
-
93
- <h2 id="templates-inclusos">6. 📦 Templates Inclusos no MVP</h2>
94
-
95
- | Pack | Preço | O que entrega |
96
- | :--- | :--- | :--- |
97
- | `domisdocs-lite` | **R$49** | `firebase.json` killer + Hosting otimizado + `next.config` + `firestore.rules` básica |
98
- | `domisdocs-pro` | **R$197** | Tudo do Lite + `firestore.rules` avançadas + `storage.rules` + `GitHub Actions` + `functions/` + Stripe Checkout + Kiwify Webhook + SSR |
99
-
100
- ---
101
-
102
- <h2 id="fluxo-de-uso">7. 🔄 Fluxo de Uso</h2>
103
-
104
- 1. Cliente roda:
105
-
106
- ```bash
107
- npm create domis@latest
108
- ```
109
-
110
- 2. CLI faz:
111
-
112
- ```bash
113
- ✔ DomisPacks Technical v1.1.0
114
- ✔ Qual pack você quer acelerar hoje?
115
- ```
116
-
117
- 3. Opções disponíveis:
118
-
119
- ```bash
120
- ✔ > 🔥 Ver DEMO Grátis - firebase.json
121
- ```
122
-
123
- 4. Ou seleciona Lite:
124
-
125
- ```bash
126
- ✔ > 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
127
- ```
128
-
129
- 5. Ou Pro:
130
-
131
- ```bash
132
- ✔ 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
133
- ```
134
-
135
- 6. Depois:
136
-
137
- ```bash
138
- ✔ Baixando pack...
139
- ✔ Corrigindo firebase.json -> Hosting + Rewrites + Cache Next.js 15
140
- ✔ Instalando deps...
141
- ✔ Pronto!
142
- cd meu-app && npm run dev
143
- ```
144
-
145
- ---
146
-
147
- <h2 id="faq">8. 🧠 FAQ</h2>
148
-
149
- <details>
150
- <summary><strong>Precisa de Firebase CLI instalado ❓</strong></summary>
151
- <p>⚠ <strong>Sim, para deploy.</strong> <code>npm i -g firebase-tools</code>. O <code>create-domis</code> só cria e corrige o projeto.</p>
152
- </details>
153
-
154
- <details>
155
- <summary><strong>Funciona no Windows ❓</strong></summary>
156
- <p>✅ <strong>Sim.</strong> Testado em PowerShell e CMD.</p>
157
- </details>
158
-
159
- <details>
160
- <summary><strong>O que é a PRO_KEY ❓</strong></summary>
161
- <p>🔑 É a key gerada após compra na Kiwify. Você cola no verificar.html como senha e ela libera seu pack. Não precisa digitar no terminal.</p>
162
- </details>
163
-
164
- <details>
165
- <summary><strong>Funciona com SSR / Next.js App Router ❓</strong></summary>
166
- <p>🌐 <strong>No Lite é Hosting estático otimizado.</strong> SSR completo + Functions está no Pack Pro com <code>ssr: true</code> já configurado.</p>
167
- </details>
168
-
169
- <details>
170
- <summary><strong>Posso usar com GitHub Actions (deploy automático) ❓</strong></summary>
171
- <p>🤖 <strong>Sim, mas no Lite é manual.</strong> No Lite você roda <code>firebase deploy</code>. No Pro já vem <code>.github/workflows/deploy.yml</code> que faz deploy a cada push na <code>main.</code></p>
172
- </details>
173
-
174
- ---
175
-
176
- <h2 id="estrutura">9. 📁 Estrutura do Projeto Gerado</h2>
177
-
178
- O que o `npm create domis@latest` cria dentro da pasta `meu-app/` - reaproveitável para Lite e futuro PRO:
179
-
180
- ```
181
- meu-app/
182
- ├── firebase.json → Firebase Killer (Hosting + Rewrites + Cache)
183
- ├── firestore.rules → Lite: basica / Pro: avançada multi-tenant
184
- ├── storage.rules → Pro: regras avançadas (Lite: basica)
185
- ├── next.config.js → Otimizado para Firebase Hosting
186
- ├── tailwind.config.ts → Tailwind v4 ja configurado
187
- ├── .github/
188
- │ └── workflows/
189
- │ └── deploy.yml → So no PRO: deploy automatico
190
- ├── functions/ → So no PRO: Stripe + Kiwify Webhook + Validator
191
- │ ├── src/
192
- │ │ └── index.ts
193
- │ └── package.json
194
- └── src/
195
- ├── app/
196
- │ ├── (saas)/
197
- │ │ └── dashboard/ → So no PRO
198
- │ ├── layout.tsx
199
- │ └── page.tsx
200
- └── lib/
201
- ├── firebase.ts
202
- └── stripe.ts → So no PRO
203
- ```
204
-
205
- > No Lite você recebe tudo até : `src/lib/firebase.ts`. No PRO destrava : `functions/`, `.github/` e `storage.rules` avançadas.
206
-
207
- ---
208
-
209
- <h2 id="como-funciona-a-venda">10. 💳 Como Funciona a Venda</h2>
210
-
211
- 1. Cliente compra na Kiwify (Lite R$49 ou Pro R$197)
212
- 2. Kiwify envia PRO_KEY automatica por e-mail
213
- 3. Cliente acessa verificar.html e ativa a key como senha
214
- 4. Ele roda: `npm create domis@latest` e escolhe o pack liberado pela key
215
- 5. Acesso liberado por 6 meses - renova com CUPOM: L2NNYK8 5% OFF
216
-
217
- ---
218
-
219
- <h2 id="licenca">11. 📄 Licença</h2>
220
-
221
- Este repositório contém:
222
- * **CLI - `create-domis` :** &nbsp; Private Commercial v1.2 - motor que aciona 3 opções (grátis/Lite/Pro)
223
- * **Packs - meu-app/ gerado via CLI :** &nbsp; [![Private Commercial](https://img.shields.io/badge/License-Private_Commercial_v1.2-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
224
-
225
- > **Uso pessoal, intransferível e não exclusivo.**
226
- > Pode usar em projetos próprios e de clientes.
227
- >
228
- > **PROIBIDO:** Redistribuir, revender, compartilhar ou publicar o boilerplate como template/curso/pack concorrente. PRO_KEY pessoal e intransferível.
229
- > Violação = revogação sem reembolso.
230
-
231
- ---
232
-
233
- <h2 id="perfil">12. 👨💻 DomisDev</h2>
234
-
235
- > Caso precise de informações adicionais, abra uma Pull Request:
236
-
237
- <a href="https://github.com/Domisnnet">
238
- <img src="./src/assets/DomisDev.png" width="90" style="border-radius: 50%" alt="DomisDev">
239
- </a>
240
-
241
- <p align="center">
242
- <a href="#sobre-o-cli">
243
- <img src="https://img.shields.io/badge/⬆%20VOLTAR%20AO%20TOPO-26FF00?style=flat&labelColor=111827&color=0A0F1C" alt="Voltar ao topo" style="height: 30px;">
244
- </a>
245
- </p>
1
+ ![NPM Version](https://img.shields.io/npm/v/create-domis?style=for-the-badge&logo=npm&color=CB3837)
2
+ ![NPM Downloads](https://img.shields.io/npm/dm/create-domis?style=for-the-badge)
3
+ ![Next.Js](https://img.shields.io/badge/Next.Js-15-black?style=for-the-badge&logo=next.js&logoColor=white)
4
+ ![Tailwind](https://img.shields.io/badge/Tailwind-v4-38BDF8?style=for-the-badge&logo=tailwindcss&logoColor=white)
5
+ ![Status](https://img.shields.io/badge/Status-Validado-brightgreen?style=for-the-badge)
6
+
7
+ <h2 id="sobre-o-cli">1. 🚀 Create Domis - O Acelerador Next.Js 15 + Firebase Killer 🚀</h2>
8
+
9
+ ![Status](https://img.shields.io/badge/Status-Online-brightgreen?style=flat-square)
10
+ ![CLI](https://img.shields.io/badge/CLI-Oficial-26FF00?style=flat-square)
11
+ ![Firebase](https://img.shields.io/badge/Firebase-Ready-FFCA28?style=flat-square&logo=firebase&logoColor=black)
12
+ [![License](https://img.shields.io/badge/License-Private_Commercial_v1.3-red?style=flat-square)](https://github.com/Domisnnet/DomisDocs-Legacy-Technical/blob/main/LICENSE)
13
+ ![Imagem DomisPacks](/src/assets/domispacks-lite.png)
14
+
15
+ Bem-vindo ao **CLI Oficial Domis**. O `npm create domis@latest` é um acelerador de projetos que elimina 3 horas de configuração de `firebase.json`, `firestore.rules` e `GitHub Actions` . Em 1 comando você elimina a configuração manual de firebase.json, rewrites SPA e headers de cache que quebram a maioria dos deploys Next.Js 15 no Firebase Hosting.
16
+
17
+ ---
18
+
19
+ <h2>📚 Tabela de Conteúdo</h2>
20
+
21
+ | 💻 O CLI | 🛠 Técnico | 🤝 Comercial |
22
+ | :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------: |
23
+ | [![1. Sobre](https://img.shields.io/badge/1%20-%20Sobre-4CAF50)](#sobre-o-cli) | [![5. Techs](https://img.shields.io/badge/5%20-%20Techs-607D8B)](#tecnologias) | [![9. Estrutura](https://img.shields.io/badge/9%20-%20Estrutura-795548)](#estrutura) |
24
+ | [![2. Instalação](https://img.shields.io/badge/2%20-%20Instalação-2196F3)](#instalacao) | [![6. Packs](https://img.shields.io/badge/6%20-%20Packs-009688)](#templates-inclusos) | [![10. Venda](https://img.shields.io/badge/10%20-%20Venda-FF9800)](#como-funciona-a-venda) |
25
+ | [![3. Uso Rápido](https://img.shields.io/badge/3%20-%20Uso-FF9800)](#uso-rapido) | [![7. Fluxo](https://img.shields.io/badge/7%20-%20Fluxo-3F51B5)](#fluxo-de-uso) | [![11. Licença](https://img.shields.io/badge/11%20-%20Licença-E91E63)](#licenca) |
26
+ | [![4. Comandos](https://img.shields.io/badge/4%20-%20Comandos-9C27B0)](#comandos) | [![8. FAQ](https://img.shields.io/badge/8%20-%20FAQ-FFC107)](#faq) | [![12. Domis](https://img.shields.io/badge/12%20-%20Domis-212121)](#perfil) |
27
+
28
+ ---
29
+
30
+ <h2 id="instalacao">2. ⚙ Instalação</h2>
31
+
32
+ Não precisa instalar global. Rode sempre na última versão:
33
+
34
+ ```bash
35
+ npm create domis@latest
36
+ ```
37
+
38
+ <h3><strong>Requisitos:</strong></h3>
39
+
40
+ - `Node.Js 18+`
41
+ - Conta Firebase - para o deploy
42
+
43
+ ---
44
+
45
+ <h2 id="uso-rapido">3. 🚀 Uso Rápido:</h2>
46
+
47
+ Todo mundo roda o mesmo comando. O que muda é o seu Pack:
48
+
49
+ ```bash
50
+ npm create domis@latest
51
+ ```
52
+
53
+ O CLI vai abrir:
54
+
55
+ ```
56
+ 🔥 DomisPacks Technical v1.0.52
57
+
58
+ ? Qual pack você quer acelerar hoje?
59
+
60
+ > 🔥 DomisDocs Free — Firebase
61
+ 🔥 DomisDocs Lite — Next.Js 15 + SaaS
62
+ 🔥 DomisDocs PRO — Stripe + Rules
63
+ ```
64
+
65
+ | Você comprou | O que acontece |
66
+ | :------------ | :-------------------------------------------------------------------------------- |
67
+ | **Lite R$49** | Escolhe `Lite`, cola a `PRO_KEY`, o template é baixado |
68
+ | **Pro R$197** | Escolhe `Pro`(quando estiver disponível) , cola a `PRO_KEY`, o template é baixado |
69
+
70
+ ---
71
+
72
+ <h2 id="comandos">4. 🧩 Comandos Disponíveis</h2>
73
+
74
+ <h3>Basta rodar no Terminal</h3>
75
+
76
+ ```npm create domis@latest``` &nbsp;→ Modo interativo: escolha o pack , valide a PRO_KEY e baixa o template.
77
+
78
+ ---
79
+
80
+ <h2 id="tecnologias">5. 💻 Stack do CLI</h2>
81
+
82
+ | Camada | Tecnologia |
83
+ | :------------- | :----------------------------------------------------------- |
84
+ | **Core** | `Node` + `TypeScript` |
85
+ | **CLI Engine** | `inquirer` + `ora` + `chalk` + `extract-zip` |
86
+ | **Entrega** | Cloud Function: `verifyProKey` + `Firebase Storage - ZIP` |
87
+ | **Auth** | `PRO_KEY` gerada via webhook Kiwify |
88
+ | **Template** | `Next.Js 15` + `Tailwind v4` + `Firebase Hosting - estático` |
89
+
90
+ ---
91
+
92
+ <h2 id="templates-inclusos">6. 📦 Packs</h2>
93
+
94
+ | Pack | Preço | O que entrega |
95
+ | :--------------- | :-------- | :-------------------------------------------------------------------------------------------------- |
96
+ | `DomisDocs Lite` | **R$49** | `Next.Js 15` + `Tailwind v4` + `firebase.json otimizado:` rewrites + cache + headers + starter SaaS |
97
+ | `DomisDocs Pro` | **R$197** | Tudo do Lite + `rules avançadas` + `CI/CD` + `Functions` + `Stripe` + `Dashboard` - em breve |
98
+
99
+ ---
100
+
101
+ <h2 id="fluxo-de-uso">7. 🔄 Fluxo de Uso</h2>
102
+
103
+ - Cliente roda :
104
+
105
+ ```bash
106
+ npm create domis@latest
107
+ ```
108
+
109
+ <h3>CLI faz :</h3>
110
+
111
+ ```
112
+ ✔ DomisPacks Technical v1.0.52
113
+ ✔ Qual pack você quer acelerar hoje?
114
+ ```
115
+
116
+ <h4>Você pode escolher o Pack Free:</h4>
117
+
118
+ ```
119
+ ✔ 🔥 DomisDocs Free — Firebase
120
+ ```
121
+
122
+ <h4>Ou os Packs Pagos:</h4>
123
+
124
+ ```
125
+ ✔ 🔥 DomisDocs Lite — Next.Js 15 + SaaS
126
+ ```
127
+
128
+ <h4>O CLI valida a key, baixa o ZIP e monta a pasta:</h4>
129
+
130
+ - Cola a PRO_KEY
131
+ - Define o nome do projeto
132
+
133
+ > Ou:
134
+
135
+ ```
136
+ ✔ 🔥 DomisDocs PRO — Stripe + Rules
137
+ ```
138
+
139
+ - Cola a PRO_KEY
140
+ - Define o nome do projeto
141
+
142
+ <h3>Depois:</h3>
143
+
144
+ ```
145
+ ✔ Baixando...
146
+ ```
147
+
148
+ <h5>Crie um nome para o projeto</h5>
149
+
150
+ ```bash
151
+ 👉 cd + nome do projeto
152
+ ```
153
+
154
+ <h5>Instale as dependências</h5>
155
+
156
+ ```bash
157
+ 👉 npm install
158
+ ```
159
+
160
+ <h5>Para testar localmente via Localhost: </h5>
161
+
162
+ ```bash
163
+ 👉 npm run dev
164
+ ```
165
+
166
+ <h5>Para fazer o Deploy do projeto</h5>
167
+
168
+ ```bash
169
+ 👉 firebase deploy --only hosting
170
+ ```
171
+
172
+ ---
173
+
174
+ <h2 id="faq">8. 🧠 FAQ</h2>
175
+
176
+ <details>
177
+ <summary><strong>Precisa de Firebase CLI instalado ❓</strong></summary>
178
+ <p>⚠ <strong>Sim, para deploy.</strong>`npm i -g firebase-tools`. O `create-domis` só cria o projeto.
179
+ </p>
180
+ </details>
181
+
182
+ <details>
183
+ <summary><strong>Funciona no Windows ❓</strong></summary>
184
+ <p>✅ <strong>Sim.</strong> Testado em PowerShell e CMD.</p>
185
+ </details>
186
+
187
+ <details>
188
+ <summary><strong>O que é a PRO_KEY ❓</strong></summary>
189
+ <p>🔑 <strong>É a key gerada após compra na Kiwify.</strong>
190
+ . Chega por e-mail e você cola no terminal quando o CLI pedir.
191
+ </p>
192
+ </details>
193
+
194
+ <details>
195
+ <summary><strong>O Lite usa SSR ❓</strong></summary>
196
+ <p>🌐 <strong>O Lite usa export estático: `public: "out"` com `rewrites SPA`</strong>
197
+ . Ideal para a maioria dos SaaS e Landing Pages. SSR completo fica no Pro.
198
+ </p>
199
+ </details>
200
+
201
+ <details>
202
+ <summary><strong>Posso usar com GitHub Actions - deploy automático ❓</strong></summary>
203
+ <p>🤖 <strong>No Lite o deploy é manual</strong><code>firebase deploy</code>
204
+ . No Pro já vem workflow de <code>CI/CD.</code>
205
+ </p>
206
+ </details>
207
+
208
+ ---
209
+
210
+ <h2 id="estrutura">9. 📁 Estrutura do Projeto Gerado</h2>
211
+
212
+ O que o `npm create domis@latest` cria dentro da pasta - reaproveitável para `Lite` e futuro `PRO`:
213
+
214
+ ```bash
215
+ meu-app/
216
+ ├── src/
217
+ │ ├── app/
218
+ │ ├── components/
219
+ │ ├── lib/
220
+ │ └── assets/
221
+ ├── firebase.json → public: "out" + rewrites + headers
222
+ ├── .firebaserc
223
+ ├── firestore.rules
224
+ ├── next.config.ts
225
+ ├── postcss.config.mjs
226
+ ├── package.json
227
+ ```
228
+
229
+ > A diferença é que no Pack: Pro , são mais pastas disponíveis.
230
+
231
+ ---
232
+
233
+ <h2 id="como-funciona-a-venda">10. 💳 Como Funciona a Venda</h2>
234
+
235
+ 1. Cliente compra na Kiwify (Lite R$49 ou Pro R$197)
236
+ 2. Kiwify envia PRO_KEY automaticamente por e-mail
237
+ 3. Cliente roda `npm create domis@latest` e cola a key
238
+ 4. Template é baixado e o projeto fica pronto
239
+ 5. Acesso por 6 meses - conforme regra da Kiwify
240
+
241
+ ---
242
+
243
+ <h2 id="licenca">11. 📄 Licença</h2>
244
+
245
+ Este CLI e os Packs estão sob: &nbsp;[![License](https://img.shields.io/badge/License-Private_Commercial_V1.3-red?style=flat-square)](https://github.com/Domisnnet/DomisDocs-Legacy-Technical/blob/main/LICENSE) — De uso privado do Desenvolvedor. Proibida redistribuição sem PRO_KEY ativa. Proibida a revenda desse código.
246
+
247
+ ---
248
+
249
+ <h2 id="perfil">12. 👨💻 DomisDev</h2>
250
+
251
+ > Caso precise de informações adicionais, abra uma Pull Request:
252
+
253
+ <a href="https://github.com/Domisnnet">
254
+ <img src="/src/assets/DomisDev.png" width="90" style="border-radius: 50%" alt="DomisDev">
255
+ </a>
256
+
257
+ <p align="center">
258
+ <a href="#sobre-o-cli">
259
+ <img src="https://img.shields.io/badge/⬆%20VOLTAR%20AO%20TOPO-26FF00?style=flat&labelColor=111827&color=0A0F1C" alt="Voltar ao topo" style="height: 30px;">
260
+ </a>
261
+ </p>
package/dist/index.js CHANGED
@@ -9,7 +9,14 @@ import path from "path";
9
9
  import os from "os";
10
10
  import extract from "extract-zip";
11
11
  var API_VERIFY = "https://verifyprokey-rk2ogbbeja-uc.a.run.app";
12
- console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.52\n"));
12
+ console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.54\n"));
13
+ function sanitizeProjectName(name) {
14
+ const base = path.basename(name.trim());
15
+ const sanitized = base.replace(/[^a-zA-Z0-9-_]/g, "-").replace(/^-+|-+$/g, "");
16
+ if (!sanitized || sanitized === "." || sanitized === "..") throw new Error("Nome de projeto inv\xE1lido");
17
+ if (sanitized.length < 2) throw new Error("Nome muito curto");
18
+ return sanitized;
19
+ }
13
20
  function copyRecursive(src, dest) {
14
21
  const stat = fs.lstatSync(src);
15
22
  if (stat.isDirectory()) {
@@ -24,14 +31,11 @@ function copyRecursive(src, dest) {
24
31
  }
25
32
  async function getDownloadUrl(pack, proKey) {
26
33
  const body = proKey ? { key: proKey, pack } : { pack };
27
- const res = await fetch(
28
- API_VERIFY,
29
- {
30
- method: "POST",
31
- headers: { "Content-Type": "application/json" },
32
- body: JSON.stringify(body)
33
- }
34
- );
34
+ const res = await fetch(API_VERIFY, {
35
+ method: "POST",
36
+ headers: { "Content-Type": "application/json" },
37
+ body: JSON.stringify(body)
38
+ });
35
39
  const data = await res.json();
36
40
  if (!res.ok || !data.valid) throw new Error(data.detail || data.reason || data.error || `HTTP ${res.status}`);
37
41
  if (!data.downloadUrl) throw new Error("API n\xE3o retornou downloadUrl");
@@ -39,16 +43,42 @@ async function getDownloadUrl(pack, proKey) {
39
43
  }
40
44
  async function main() {
41
45
  const ans = await inquirer.prompt([
42
- { type: "list", name: "pack", message: "Qual pack voc\xEA quer acelerar hoje?", choices: [
43
- { name: "\u{1F525} DomisDocs Free - Firebase", value: "free" },
44
- { name: "\u{1F525} DomisDocs Lite \u2014 Next.Js 15 + SaaS", value: "lite" },
45
- { name: "\u{1F525} DomisDocs PRO \u2014 Stripe + Rules", value: "pro" }
46
- ] },
47
- { type: "password", name: "proKey", message: "Digite sua PRO_KEY:", mask: "*", when: (a) => a.pack !== "free", validate: (v) => v.startsWith("DOMIS-") ? true : "Formato: DOMIS-XXXX-XXXX-XXXX" },
48
- { type: "input", name: "projectName", message: "Nome do projeto:", default: "meu-app", validate: (v) => v.trim() ? true : "Digite um nome" }
46
+ {
47
+ type: "list",
48
+ name: "pack",
49
+ message: "Qual pack voc\xEA quer acelerar hoje?",
50
+ choices: [
51
+ { name: "\u{1F525} DomisDocs Free - Firebase", value: "free" },
52
+ { name: "\u{1F525} DomisDocs Lite \u2014 Next.Js 15 + SaaS", value: "lite" },
53
+ { name: "\u{1F525} DomisDocs PRO \u2014 Stripe + Rules - R$197 EM BREVE", value: "pro" }
54
+ ]
55
+ },
56
+ {
57
+ type: "password",
58
+ name: "proKey",
59
+ message: "Digite sua PRO_KEY:",
60
+ mask: "*",
61
+ when: (a) => a.pack !== "free",
62
+ validate: (v) => v.trim().toUpperCase().startsWith("DOMIS-") ? true : "Formato: DOMIS-XXXX-XXXX-XXXX"
63
+ },
64
+ {
65
+ type: "input",
66
+ name: "projectName",
67
+ message: "Nome do projeto:",
68
+ default: "meu-app",
69
+ validate: (v) => {
70
+ try {
71
+ sanitizeProjectName(v);
72
+ return true;
73
+ } catch (e) {
74
+ return e.message;
75
+ }
76
+ }
77
+ }
49
78
  ]);
50
- if (fs.existsSync(ans.projectName)) {
51
- console.log(chalk.red(`\u274C Pasta "${ans.projectName}" j\xE1 existe!`));
79
+ const projectName = sanitizeProjectName(ans.projectName);
80
+ if (fs.existsSync(projectName)) {
81
+ console.log(chalk.red(`\u274C Pasta "${projectName}" j\xE1 existe!`));
52
82
  process.exit(1);
53
83
  }
54
84
  const spinner = ora("\u2714 Baixando...").start();
@@ -64,13 +94,14 @@ async function main() {
64
94
  await extract(zipTmp, { dir: extractTmp });
65
95
  const files = fs.readdirSync(extractTmp);
66
96
  const srcDir = files.length === 1 && fs.lstatSync(path.join(extractTmp, files[0])).isDirectory() ? path.join(extractTmp, files[0]) : extractTmp;
67
- fs.mkdirSync(ans.projectName, { recursive: true });
68
- copyRecursive(srcDir, ans.projectName);
97
+ if (!fs.existsSync(srcDir)) throw new Error("ZIP vazio");
98
+ fs.mkdirSync(projectName, { recursive: true });
99
+ copyRecursive(srcDir, projectName);
69
100
  fs.rmSync(zipTmp, { force: true });
70
101
  fs.rmSync(extractTmp, { recursive: true, force: true });
71
- spinner.succeed(`\u2705 ${ans.projectName} criado!`);
102
+ spinner.succeed(`\u2705 ${projectName} criado!`);
72
103
  console.log(chalk.cyan(`
73
- \u{1F449} cd ${ans.projectName}
104
+ \u{1F449} cd ${projectName}
74
105
  \u{1F449} npm install
75
106
  \u{1F449} npm run dev
76
107
  `));
package/package.json CHANGED
@@ -1,42 +1,36 @@
1
- {
2
- "name": "create-domis",
3
- "version": "1.0.52",
4
- "description": "CLI Oficial DomisPacks - Acelerador Next.js 15 + Tailwind v4 + SaaS Boilerplate",
5
- "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "bin": {
10
- "create-domis": "dist/index.js"
11
- },
12
- "scripts": {
13
- "build": "tsup src/index.ts --format esm --dts",
14
- "dev": "tsx src/index.ts",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "keywords": [
18
- "firebase",
19
- "domis",
20
- "create-domis",
21
- "cli"
22
- ],
23
- "author": "Domisnnet",
24
- "license": "LICENSE",
25
- "dependencies": {
26
- "chalk": "^5.3.0",
27
- "extract-zip": "^2.0.1",
28
- "inquirer": "^9.2.12",
29
- "ora": "^7.0.1"
30
- },
31
- "devDependencies": {
32
- "@types/extract-zip": "^2.0.0",
33
- "@types/inquirer": "^9.0.10",
34
- "@types/node": "^22.20.1",
35
- "tsup": "^8.5.1",
36
- "tsx": "^4.7.0",
37
- "typescript": "^5.9.3"
38
- },
39
- "engines": {
40
- "node": ">=18.0.0"
41
- }
42
- }
1
+ {
2
+ "name": "create-domis",
3
+ "version": "1.0.54",
4
+ "description": "CLI Oficial DomisPacks - Acelerador Next.Js 15 + SaaS Boilerplate",
5
+ "type": "module",
6
+ "files": [ "dist" ],
7
+ "bin": { "create-domis": "dist/index.js" },
8
+ "scripts": {
9
+ "build": "tsup src/index.ts --format esm --dts",
10
+ "dev": "tsx src/index.ts",
11
+ "prepublishOnly": "npm run build"
12
+ },
13
+ "keywords": [
14
+ "firebase",
15
+ "domis",
16
+ "create-domis",
17
+ "cli"
18
+ ],
19
+ "author": "Domisnnet",
20
+ "license": "LICENSE",
21
+ "dependencies": {
22
+ "chalk": "^5.3.0",
23
+ "extract-zip": "^2.0.1",
24
+ "inquirer": "^9.2.12",
25
+ "ora": "^7.0.1"
26
+ },
27
+ "devDependencies": {
28
+ "@types/extract-zip": "^2.0.0",
29
+ "@types/inquirer": "^9.0.10",
30
+ "@types/node": "^22.20.1",
31
+ "tsup": "^8.5.1",
32
+ "tsx": "^4.7.0",
33
+ "typescript": "^5.9.3"
34
+ },
35
+ "engines": { "node": ">=18.0.0" }
36
+ }