create-domis 1.0.4 → 1.0.5

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/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ DOMIS PACKS TECHNICAL - PRIVATE COMMERCIAL LICENSE
2
+ Version 1.0 - 2026 - DomisDev
3
+
4
+ Copyright (c) 2026 DomisDev (Domisnnet)
5
+
6
+ 1. DEFINIÇÃO DO SOFTWARE
7
+ Este "Software" refere-se aos templates, firebase.json, firestore.rules,
8
+ workflows e documentações contidas no repositório DomisPacks-Technical,
9
+ adquiridos via PRO_KEY ou Pack Lite/Pro.
10
+
11
+ 2. DIREITOS CONCEDIDOS AO COMPRADOR (LICENCIADO)
12
+
13
+ Ao adquirir uma PRO_KEY válida, é concedido ao Licenciado, de forma
14
+ não-exclusiva e intransferível:
15
+
16
+ a) USO PRIVADO E COMERCIAL: Usar, modificar e construir projetos próprios
17
+ e para clientes finais.
18
+ b) MODIFICAÇÃO: Alterar o código para adequar ao seu projeto.
19
+ c) PROJETOS ILIMITADOS: Usar o mesmo Pack em N projetos seus.
20
+
21
+ 3. PROIBIÇÕES EXPRESSAS (O QUE VOCÊ NÃO PODE FAZER)
22
+
23
+ Sem autorização escrita do DomisDev, é EXPRESSAMENTE PROIBIDO:
24
+
25
+ a) REVENDER, REDISTRIBUIR OU COMPARTILHAR: Revender, doar, postar em
26
+ GitHub público, Discord, Telegram, cursos ou como template.
27
+ b) REEMBALAR COMO PRODUTO: Criar um "Novo Pack", CLI ou curso usando
28
+ este código como base para venda.
29
+ c) REMOVER COPYRIGHT: Remover avisos de autoria DomisDev.
30
+ d) COMPARTILHAR PRO_KEY: Uma key = 1 desenvolvedor. Compartilhamento
31
+ gera banimento imediato.
32
+
33
+ 4. GARANTIA E SUPORTE
34
+
35
+ O Software é fornecido "COMO ESTÁ" (AS IS), sem garantias. O suporte
36
+ é garantido apenas para detentores de PRO_KEY ativa conforme o plano
37
+ (Lite = docs, Pro = 7 dias via GitHub Issues privado).
38
+
39
+ 5. VIOLAÇÃO
40
+
41
+ Violação desta licença resulta em revogação automática da PRO_KEY,
42
+ remoção de acesso ao repositório privado e medidas legais cabíveis.
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
package/README.md ADDED
@@ -0,0 +1,172 @@
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
+ ![Angular](https://img.shields.io/badge/Angular-17%20to%2020-DD0031?style=for-the-badge&logo=angular&logoColor=white)
4
+ ![Status](https://img.shields.io/badge/Status-Validado-brightgreen?style=for-the-badge)
5
+
6
+ <h2 id="sobre-o-cli">1. 🚀 create-domis - O Acelerador Angular + Firebase 🚀</h2>
7
+
8
+ ![Status](https://img.shields.io/badge/Status-Online-brightgreen?style=flat-square)
9
+ ![CLI](https://img.shields.io/badge/CLI-Oficial-26FF00?style=flat-square)
10
+ ![Firebase](https://img.shields.io/badge/Firebase-Ready-FFCA28?style=flat-square&logo=firebase&logoColor=black)
11
+ [![License](https://img.shields.io/badge/License-Private_Commercial-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
12
+
13
+ Bem-vindo ao **CLI Oficial Domis**. O `npm create domis` é um acelerador de projetos que elimina 3 horas de configuração de `firebase.json`, `firestore.rules` e `GitHub Actions` com 1 comando. Resolvemos o bug do `browser/` que quebra 90% dos deploys Angular 20.
14
+
15
+ ---
16
+
17
+ ## 📚 Tabela de Conteúdo
18
+
19
+ | 💻 O CLI | 🛠 Técnico | 🤝 Comercial |
20
+ | :---: | :---: | :---: |
21
+ | [![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. Publicar](https://img.shields.io/badge/9%20-%20Publicar-795548)](#como-publicar) |
22
+ | [![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-pro) |
23
+ | [![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) |
24
+ | [![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) |
25
+
26
+ ---
27
+
28
+ <h2 id="instalacao">2. ⚙ Instalação</h2>
29
+
30
+ Não precisa instalar global. Rode sempre na última versão:
31
+
32
+ ```bash
33
+ npm create domis@latest
34
+ ```
35
+
36
+ ---
37
+
38
+ <h2 id="uso-rapido">3. 🚀 Uso Rápido</h2>
39
+
40
+ | Cenário | Comando |
41
+ | :--- | :--- |
42
+ | **Pack Gratuito / Lite** | `npm create domis@latest -- --template domflix-firebase-lite meu-app` |
43
+ | **Pack Pro (com Key)** | `npm create domis@latest -- --template domflix-firebase-pro --key ghp_SUAKEY meu-app` |
44
+ | **Interativo** | `npm create domis@latest` e escolha no menu |
45
+
46
+ ---
47
+
48
+ <h2 id="comandos">4. 🧩 Comandos Disponíveis</h2>
49
+
50
+ | Comando | O que faz |
51
+ | :--- | :--- |
52
+ | `--template <nome>` | Pula o menu e já cria o pack escolhido |
53
+ | `--key <PRO_KEY>` | Autentica no repo privado `DomisPacks-Private` |
54
+ | `--help` | Lista todos os templates disponíveis |
55
+
56
+ ---
57
+
58
+ <h2 id="tecnologias">5. 💻 Stack do CLI</h2>
59
+
60
+ | Camada | Tecnologia |
61
+ | :--- | :--- |
62
+ | **Core** | ![Node](https://img.shields.io/badge/Node-339933?style=flat-square&logo=node.js&logoColor=white) + TypeScript |
63
+ | **CLI Engine** | `create-*` + `prompts` + `degit` |
64
+ | **Infra** | GitHub Private Repo como CDN de Packs |
65
+ | **Auth** | GitHub PAT (v1) / Cloud Function Validator (v2) |
66
+
67
+ ---
68
+
69
+ <h2 id="templates-inclusos">6. 📦 Templates Inclusos no MVP</h2>
70
+
71
+ | Pack | Preço | O que entrega |
72
+ | :--- | :--- | :--- |
73
+ | `domflix-firebase-lite` | **Grátis / R$49** | `firebase.json` killer (fix browser/ + rewrites + cache) |
74
+ | `domflix-firebase-pro` | **R$199** | Lite + `firestore.rules` + `storage.rules` + `GitHub Actions` + `functions/` |
75
+
76
+ > Novos packs são adicionados em `DomisPacks-Private/packs/` e o CLI busca automaticamente.
77
+
78
+ ---
79
+
80
+ <h2 id="fluxo-de-uso">7. 🔄 Fluxo de Uso</h2>
81
+
82
+ ```bash
83
+ # Cliente roda
84
+ npm create domis@latest -- --template domflix-firebase-lite domflix
85
+
86
+ # CLI faz
87
+ ✔ Baixando pack...
88
+ ✔ Corrigindo firebase.json -> dist/domflix/browser
89
+ ✔ Instalando deps...
90
+ ✔ Pronto! cd domflix && ng serve
91
+ ```
92
+
93
+ ---
94
+
95
+ <h2 id="faq">8. 🧠 FAQ</h2>
96
+
97
+ <details>
98
+ <summary><strong>Precisa de Firebase CLI instalado ❓</strong></summary>
99
+ <p>⚠️ <strong>Sim, para deploy.</strong> `npm i -g firebase-tools`. O `create-domis` só cria e corrige o projeto.</p>
100
+ </details>
101
+
102
+ <details>
103
+ <summary><strong>Funciona no Windows ❓</strong></summary>
104
+ <p>✅ <strong>Sim.</strong> Testado em PowerShell e CMD. Se `gh` não estiver no PATH, use o token direto.</p>
105
+ </details>
106
+
107
+ <details>
108
+ <summary><strong>O que é a PRO_KEY ❓</strong></summary>
109
+ <p>🔑 É um GitHub PAT read-only gerado após compra na Kiwify. Ela libera o download do repo privado.</p>
110
+ </details>
111
+
112
+ <details>
113
+ <summary><strong>Funciona com SSR / Angular Universal ❓</strong></summary>
114
+ <p>🌐 <strong>No Lite não.</strong> SSR precisa de Cloud Functions + Hosting. Isso está no Pack Pro com `ssr: true` já configurado.</p>
115
+ </details>
116
+
117
+ <details>
118
+ <summary><strong>Posso usar com GitHub Actions (deploy automático) ❓</strong></summary>
119
+ <p>🤖 <strong>Sim, mas no Lite é manual.</strong> No Lite você roda `firebase deploy`. No Pro já vem `.github/workflows/deploy.yml` que faz deploy a cada push na `main`.</p>
120
+ </details>
121
+
122
+ ---
123
+
124
+ <h2 id="como-publicar">9. 🚀 Como Publicar (Primeira vez)</h2>
125
+
126
+ ```bash
127
+ cd create-domis
128
+ npm install
129
+ npm run build
130
+ npm publish --access public
131
+ ```
132
+
133
+ Depois disso, qualquer pessoa no mundo roda `npm create domis@latest`.
134
+
135
+ ---
136
+
137
+ <h2 id="como-funciona-a-venda-pro">10. 💳 Como Funciona a Venda PRO - v1 e v2</h2>
138
+
139
+ **v1 - Simples (MVP):**
140
+
141
+ 1. Cliente compra na Kiwify
142
+ 2. Você gera um GitHub Personal Access Token (PAT) com `repo` read-only para `DomisPacks-Private`
143
+ 3. Esse token é a `PRO_KEY` dele
144
+ 4. Ele roda: `npm create domis@latest -- --template domflix-firebase-pro --key ghp_XXXX`
145
+
146
+ **v2 - Profissional (recomendado):**
147
+
148
+ Crie uma Cloud Function `https://api.domisdocs.com/validate` que recebe a key da Kiwify e retorna um token temporário do GitHub. Assim você nunca expõe o PAT.
149
+
150
+ ---
151
+
152
+ <h2 id="licenca">11. 📄 Licença</h2>
153
+
154
+ Este CLI é código aberto, mas os Packs são sob:
155
+
156
+ [![License](https://img.shields.io/badge/License-Private_Commercial-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE) &nbsp; — De uso privado do Desenvolvedor. Proibida redistribuição sem PRO_KEY ativa. Proibida a revenda desse código.
157
+
158
+ ---
159
+
160
+ <h2 id="perfil">12. 👨💻 DomisDev :</h2>
161
+
162
+ > Caso precise de informações adicionais, abra uma Pull Request:
163
+
164
+ <a href="https://github.com/Domisnnet">
165
+ <img src="src/assets/DomisDev.png" width="90" style="border-radius: 50%" alt="DomisDev">
166
+ </a>
167
+
168
+ <p align="center">
169
+ <a href="#sobre-o-cli">
170
+ <img src="https://img.shields.io/badge/⬆%20VOLTAR%20AO%20TOPO-26FF00?style=flat&labelColor=111827&color=0A0F1C" alt="Voltar ao topo" style="height: 30px;">
171
+ </a>
172
+ </p>
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import prompts from "prompts";
5
+ import pc from "picocolors";
6
+ import ora from "ora";
7
+ import fs from "fs";
8
+ import path from "path";
9
+ console.log(pc.bgMagenta(pc.black(" DOMIS CLI ")), pc.magenta("v0.1.0 - Acelere seu Angular + Firebase\n"));
10
+ var args = process.argv.slice(2);
11
+ var hasTemplateArg = args.find((a) => a.includes("template"))?.split("=")[1] || args[args.indexOf("--template") + 1];
12
+ var hasKeyArg = args.find((a) => a.includes("key"))?.split("=")[1] || args[args.indexOf("--key") + 1];
13
+ async function main() {
14
+ let template = hasTemplateArg;
15
+ let proKey = hasKeyArg;
16
+ let projectName = "meu-app-domis";
17
+ if (!template) {
18
+ const res = await prompts([
19
+ {
20
+ type: "select",
21
+ name: "template",
22
+ message: "Qual pack voc\xEA quer acelerar hoje?",
23
+ choices: [
24
+ { title: "\u{1F525} Domflix + Firebase Killer (GR\xC1TIS)", value: "domflix-firebase-lite" },
25
+ { title: "\u{1F680} Domflix PRO - Completo com TMDB + Auth (PAGO)", value: "domflix-firebase-pro" },
26
+ { title: "\u{1F4DA} Angular + Firestore SaaS Starter (PAGO)", value: "angular-firestore-pro" }
27
+ ]
28
+ },
29
+ {
30
+ type: (prev) => prev.includes("pro") ? "text" : null,
31
+ name: "key",
32
+ message: "Digite sua PRO_KEY (comprada na Kiwify):"
33
+ },
34
+ {
35
+ type: "text",
36
+ name: "projectName",
37
+ message: "Nome do projeto?",
38
+ initial: "meu-app-domis"
39
+ }
40
+ ]);
41
+ template = res.template;
42
+ proKey = res.key;
43
+ projectName = res.projectName || "meu-app-domis";
44
+ await scaffold(template, projectName, proKey);
45
+ return;
46
+ }
47
+ const cliProjectName = args[args.length - 1]?.startsWith("--") ? "meu-app-domis" : args[args.length - 1] || "meu-app-domis";
48
+ await scaffold(template, cliProjectName, proKey);
49
+ }
50
+ async function scaffold(template, projectName, proKey) {
51
+ const spinner = ora(`Baixando template ${pc.cyan(template)}...`).start();
52
+ try {
53
+ const isPro = template.includes("pro");
54
+ if (isPro && (!proKey || proKey.length < 5)) {
55
+ spinner.fail(pc.red("Template PRO precisa de PRO_KEY v\xE1lida."));
56
+ process.exit(1);
57
+ }
58
+ let source = `gh:Domisnnet/DomisPacks-Private/packs/${template}#main`;
59
+ const localTemplatePath = path.resolve(process.cwd(), "templates", template);
60
+ const altPath = path.resolve(new URL(".", import.meta.url).pathname, "..", "..", "templates", template);
61
+ const srcPath = fs.existsSync(localTemplatePath) ? localTemplatePath : altPath;
62
+ if (fs.existsSync(srcPath)) {
63
+ fs.cpSync(srcPath, path.resolve(process.cwd(), projectName), { recursive: true });
64
+ } else {
65
+ fs.mkdirSync(projectName, { recursive: true });
66
+ fs.writeFileSync(path.join(projectName, "firebase.json"), JSON.stringify({
67
+ hosting: { public: "dist/seu-projeto/browser", ignore: ["firebase.json", "**/.*", "**/node_modules/**"], rewrites: [{ source: "**", destination: "/index.html" }] }
68
+ }, null, 2));
69
+ }
70
+ spinner.succeed(pc.green(`Template ${pc.bold(template)} baixado em./${projectName}`));
71
+ console.log(pc.cyan("\nPr\xF3ximos passos:"));
72
+ console.log(` cd ${projectName}
73
+ npm install
74
+ ng build
75
+ firebase deploy --only hosting`);
76
+ } catch (e) {
77
+ spinner.fail(pc.red("Falha ao baixar template"));
78
+ console.error(e.message);
79
+ }
80
+ }
81
+ main();
package/package.json CHANGED
@@ -1,19 +1,41 @@
1
- {
2
- "name": "create-domis",
3
- "version": "1.0.4",
4
- "description": "CLI DomisPacks Technical - https://pay.kiwify.com.br/heAmetM",
5
- "type": "module",
6
- "bin": {
7
- "create-domis": "bin.js"
8
- },
9
- "files": [
10
- "bin.js"
11
- ],
12
- "author": "Domisnnet",
13
- "license": "MIT",
14
- "dependencies": {
15
- "degit": "^3.0.4",
16
- "picocolors": "^1.0.1",
17
- "prompts": "^2.4.2"
18
- }
19
- }
1
+ {
2
+ "name": "create-domis",
3
+ "version": "1.0.5",
4
+ "description": "CLI oficial do ecossistema Domis - Acelere seus projetos Angular + Firebase",
5
+ "type": "module",
6
+ "bin": {
7
+ "create-domis": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsup src/index.ts --format esm --dts --clean",
14
+ "dev": "tsx src/index.ts",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "angular",
19
+ "firebase",
20
+ "domis",
21
+ "domflix",
22
+ "create",
23
+ "cli",
24
+ "vitepress"
25
+ ],
26
+ "author": "Domisnnet",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "chalk": "^5.3.0",
30
+ "giget": "^1.2.3",
31
+ "ora": "^7.0.1",
32
+ "picocolors": "^1.0.1",
33
+ "prompts": "^2.4.2"
34
+ },
35
+ "devDependencies": {
36
+ "@types/prompts": "^2.4.9",
37
+ "tsup": "^8.5.1",
38
+ "tsx": "^4.7.0",
39
+ "typescript": "^5.9.3"
40
+ }
41
+ }
package/bin.js DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- import prompts from 'prompts';
3
- import pc from 'picocolors';
4
-
5
- console.log('');
6
- console.log(pc.bgYellow(pc.black(' 🔥 DOMISPACKS TECHNICAL v1.0.4 🔥 ')));
7
- console.log(pc.cyan(' Sales: https://kiwify.app/L2NNYK8'));
8
- console.log(pc.cyan(' Checkout: https://pay.kiwify.com.br/heAmetM'));
9
- console.log('');
10
-
11
- const { proKey: raw } = await prompts({
12
- type: 'text',
13
- name: 'proKey',
14
- message: 'Digite sua PRO_KEY (ou TESTE)',
15
- });
16
- const proKey = (raw || '').trim();
17
-
18
- if(!proKey || proKey.toUpperCase() === 'TESTE' || proKey.length < 4){
19
- console.log(pc.green(' OFERTA ATIVA:'));
20
- console.log(pc.white(' Checkout: https://pay.kiwify.com.br/heAmetM'));
21
- console.log(pc.white(' Sales: https://kiwify.app/L2NNYK8'));
22
- console.log('');
23
- process.exit(0);
24
- }
25
- console.log(' PRO_KEY: ' + proKey.slice(0,4) + '****');