create-domis 1.0.0 → 1.0.2

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 (2) hide show
  1. package/bin.js +40 -54
  2. package/package.json +2 -2
package/bin.js CHANGED
@@ -1,58 +1,44 @@
1
- #!/usr/bin/env node
2
- import degit from 'degit';
3
1
  import prompts from 'prompts';
4
2
  import pc from 'picocolors';
3
+ import degit from 'degit';
5
4
 
6
- console.log(pc.green(`\n🚀 create-domis - DomisPacks-Technical\n`));
7
-
8
- const response = await prompts([
9
- {
10
- type: 'text',
11
- name: 'key',
12
- message: 'Digite sua PRO_KEY (enviada por e-mail da Kiwify):',
13
- validate: v => v.length > 10 ? true : 'PRO_KEY inválida'
14
- },
15
- {
16
- type: 'select',
17
- name: 'template',
18
- message: 'Qual pack deseja baixar?',
19
- choices: [
20
- { title: 'domisdocs-firebase-lite (R$49)', value: 'lite' },
21
- { title: 'domisdocs-firebase-pro (R$199)', value: 'pro' }
22
- ]
23
- }
24
- ]);
25
-
26
- const repoMap = {
27
- lite: 'Domisnnet/DomisPacks-Technical/packs/domisdocs-firebase-lite',
28
- pro: 'Domisnnet/DomisPacks-Technical/packs/domisdocs-firebase-pro'
29
- };
30
-
31
- const repo = repoMap[response.template];
32
-
33
- console.log(pc.cyan(`\n📦 Baixando ${repo} com sua PRO_KEY...\n`));
34
-
35
- try {
36
- // Usa a PRO_KEY como token no git clone via degit com auth
37
- const emitter = degit(`${repo}`, {
38
- cache: false,
39
- force: true,
40
- verbose: true
41
- });
42
-
43
- // Passa token via env - degit usa https
44
- // O usuário precisa ter aceito convite do repo privado antes
45
- await emitter.clone('./domis-pack');
46
-
47
- console.log(pc.green(`\n✅ Pack baixado em ./domis-pack !\n`));
48
- console.log(pc.dim(`Próximos passos:`));
49
- console.log(` cd domis-pack`);
50
- console.log(` cp firebase.json seu-projeto/\n`);
51
- } catch (e) {
52
- console.log(pc.red(`\n❌ Erro: ${e.message}\n`));
53
- console.log(pc.yellow(`Soluções:`));
54
- console.log(`1. Verifique se aceitou o convite do GitHub para DomisPacks-Technical`);
55
- console.log(`2. Verifique sua PRO_KEY`);
56
- console.log(`3. Tente via git clone manual:`);
57
- console.log(pc.cyan(` git clone https://${response.key}@github.com/Domisnnet/DomisPacks-Technical.git\n`));
5
+ console.log(pc.bgYellow(pc.black(`🔥 DOMISPACKS TECHNICAL - CLI OFICIAL v1.0.2 🔥 `)));
6
+ console.log(pc.cyan(`Sales: https://kiwify.app/L2NNYK8`));
7
+ console.log(pc.cyan(`Checkout: https://pay.kiwify.com.br/heAmetM`));
8
+
9
+ const r1 = await prompts({
10
+ type: 'text',
11
+ name: 'proKey',
12
+ message: 'Digite sua PRO_KEY (ou digite TESTE para ver oferta)',
13
+ });
14
+ const proKey = r1.proKey || '';
15
+
16
+ if(!proKey || proKey.toUpperCase() === 'TESTE' || proKey.length < 4){
17
+ console.log(pc.green(`🚀 ENTRADA ÉPICA - OFERTA ATIVA:`));
18
+ console.log(pc.white(`👉 Checkout OFICIAL R$49/R$199: https://pay.kiwify.com.br/heAmetM`));
19
+ console.log(pc.cyan(`👉 Sales Page: https://kiwify.app/L2NNYK8`));
20
+ console.log(pc.yellow(`Após pagar você recebe PRO_KEY por e-mail e roda:`));
21
+ console.log(pc.white(`npx create-domis@latest`));
22
+ process.exit(0);
58
23
  }
24
+
25
+ const r2 = await prompts({
26
+ type: 'select',
27
+ name: 'pack',
28
+ message: 'Qual pack deseja baixar?',
29
+ choices: [
30
+ { title: 'domisdocs-firebase-lite (R$49) - Fix 5min', value: 'domisdocs-firebase-lite' },
31
+ { title: 'domisdocs-firebase-pro (R$199) - Completo', value: 'domisdocs-firebase-pro' },
32
+ ]
33
+ });
34
+
35
+ const pack = r2.pack;
36
+ console.log(pc.cyan(`📦 Baixando ${pack} com PRO_KEY ${proKey.slice(0,4)}****...`));
37
+ try{
38
+ const emitter = degit(`Domisnnet/DomisPacks-Technical/packs/${pack}#main`, { cache:false, force:true, verbose:false });
39
+ await emitter.clone('.');
40
+ console.log(pc.green(`✅ ${pack} baixado! npm install e bora!`));
41
+ }catch(e){
42
+ console.log(pc.red(`❌ Erro: ${e.message}`));
43
+ console.log(pc.white(`Verifique convite GitHub + PRO_KEY. Suporte: github.com/Domisnnet/DomisDocs-Technical/discussions`));
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-domis",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI para puxar packs privados DomisPacks-Technical via PRO_KEY",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,4 +13,4 @@
13
13
  "picocolors": "^1.0.1",
14
14
  "prompts": "^2.4.2"
15
15
  }
16
- }
16
+ }