create-rubrica 0.3.0 → 0.3.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/dist/index.js +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1277,7 +1277,7 @@ Configure-as em: https://dashboard.convex.dev`
1277
1277
  }
1278
1278
 
1279
1279
  // src/commands/setup.ts
1280
- import { outro as outro4, text as text2, password, spinner, isCancel as isCancel5, cancel as cancel5 } from "@clack/prompts";
1280
+ import { outro as outro4, text as text2, password, spinner, isCancel as isCancel5, cancel as cancel5, log as log3 } from "@clack/prompts";
1281
1281
  import * as nodeFsPromises13 from "fs/promises";
1282
1282
  import * as path8 from "path";
1283
1283
  import * as nodeCrypto from "crypto";
@@ -1382,14 +1382,14 @@ async function runSetup(deps = {}) {
1382
1382
  message: "TELEGRAM_BOT_TOKEN (Enter para pular):",
1383
1383
  initialValue: ""
1384
1384
  });
1385
- if (!isCancel5(telegramToken) && telegramToken.trim()) {
1385
+ if (!isCancel5(telegramToken) && telegramToken && telegramToken.trim()) {
1386
1386
  execFileSync("npx", ["convex", "env", "set", "--", "TELEGRAM_BOT_TOKEN", telegramToken], { stdio: "pipe" });
1387
1387
  }
1388
1388
  const telegramChatId = await text2({
1389
1389
  message: "TELEGRAM_ADMIN_CHAT_ID (Enter para pular):",
1390
1390
  initialValue: ""
1391
1391
  });
1392
- if (!isCancel5(telegramChatId) && telegramChatId.trim()) {
1392
+ if (!isCancel5(telegramChatId) && telegramChatId && telegramChatId.trim()) {
1393
1393
  execFileSync("npx", ["convex", "env", "set", "--", "TELEGRAM_ADMIN_CHAT_ID", telegramChatId], { stdio: "pipe" });
1394
1394
  }
1395
1395
  }
@@ -1402,7 +1402,7 @@ async function runSetup(deps = {}) {
1402
1402
  message: "OPENROUTER_API_KEY (Enter para pular):",
1403
1403
  initialValue: ""
1404
1404
  });
1405
- if (!isCancel5(openrouterKey) && openrouterKey.trim()) {
1405
+ if (!isCancel5(openrouterKey) && openrouterKey && openrouterKey.trim()) {
1406
1406
  execFileSync("npx", ["convex", "env", "set", "--", "OPENROUTER_API_KEY", openrouterKey], { stdio: "pipe" });
1407
1407
  }
1408
1408
  }
@@ -1411,14 +1411,14 @@ async function runSetup(deps = {}) {
1411
1411
  message: "STRIPE_WEBHOOK_SECRET (Enter para pular):",
1412
1412
  initialValue: ""
1413
1413
  });
1414
- if (!isCancel5(stripeSecret) && stripeSecret.trim()) {
1414
+ if (!isCancel5(stripeSecret) && stripeSecret && stripeSecret.trim()) {
1415
1415
  execFileSync("npx", ["convex", "env", "set", "--", "STRIPE_WEBHOOK_SECRET", stripeSecret], { stdio: "pipe" });
1416
1416
  }
1417
1417
  const asaasToken = await text2({
1418
1418
  message: "ASAAS_WEBHOOK_TOKEN (Enter para pular):",
1419
1419
  initialValue: ""
1420
1420
  });
1421
- if (!isCancel5(asaasToken) && asaasToken.trim()) {
1421
+ if (!isCancel5(asaasToken) && asaasToken && asaasToken.trim()) {
1422
1422
  execFileSync("npx", ["convex", "env", "set", "--", "ASAAS_WEBHOOK_TOKEN", asaasToken], { stdio: "pipe" });
1423
1423
  }
1424
1424
  }
@@ -1463,11 +1463,11 @@ async function runSetup(deps = {}) {
1463
1463
  const e = err;
1464
1464
  const output = e.stdout?.toString() ?? e.stderr?.toString() ?? e.message ?? "";
1465
1465
  if (output.includes("Root user already exists")) {
1466
- cancel5("Admin j\xE1 configurado. Para redefinir, acesse o Convex Dashboard.");
1466
+ log3.warn("Admin j\xE1 configurado \u2014 credenciais mantidas. Para redefinir, acesse o Convex Dashboard.");
1467
1467
  } else {
1468
1468
  cancel5(`Erro ao criar usu\xE1rio root: ${output || String(err)}`);
1469
+ return;
1469
1470
  }
1470
- return;
1471
1471
  }
1472
1472
  if (plugins["proposals"]) {
1473
1473
  try {
@@ -1487,14 +1487,14 @@ async function runSetup(deps = {}) {
1487
1487
  message: "VERCEL_DEPLOY_HOOK_URL (Enter para pular):",
1488
1488
  initialValue: ""
1489
1489
  });
1490
- if (!isCancel5(vercelHookUrl) && vercelHookUrl.trim()) {
1490
+ if (!isCancel5(vercelHookUrl) && vercelHookUrl && vercelHookUrl.trim()) {
1491
1491
  execFileSync("npx", ["convex", "env", "set", "--", "VERCEL_DEPLOY_HOOK_URL", vercelHookUrl], { stdio: "pipe" });
1492
1492
  }
1493
1493
  const vercelWebhookSecret = await text2({
1494
1494
  message: "VERCEL_WEBHOOK_SECRET (Enter para pular):",
1495
1495
  initialValue: ""
1496
1496
  });
1497
- if (!isCancel5(vercelWebhookSecret) && vercelWebhookSecret.trim()) {
1497
+ if (!isCancel5(vercelWebhookSecret) && vercelWebhookSecret && vercelWebhookSecret.trim()) {
1498
1498
  execFileSync("npx", ["convex", "env", "set", "--", "VERCEL_WEBHOOK_SECRET", vercelWebhookSecret], { stdio: "pipe" });
1499
1499
  }
1500
1500
  const profession = await text2({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rubrica",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "CLI para criar e configurar projetos Rubrica — portfólio profissional com React + Convex",
5
5
  "type": "module",
6
6
  "bin": {