create-rubrica 2.1.0 → 2.1.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.
- package/dist/index.js +326 -37
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
var define_CORE_MODULES_default;
|
|
14
14
|
var init_define_CORE_MODULES = __esm({
|
|
15
15
|
"<define:__CORE_MODULES__>"() {
|
|
16
|
-
define_CORE_MODULES_default = { users: ["isSetupRequired", "me", "list", "create", "setRole", "remove", "suspend", "reactivate", "resetPassword", "changePassword", "actor", "assignRoleInternal", "clearMustChangePassword", "setupRoot", "findPasswordAccount", "afterPasswordReset", "passwordAccountOf", "afterAdminReset", "resetPasswordInternal"], audit: ["recent", "logFromAction", "hitRateLimit", "cleanup"], site: ["snapshot"], settings: ["get", "plugins", "update", "setPlugin", "init"], texts: ["list", "set", "reset"], media: ["generateUploadUrl", "save", "list", "folders", "get", "update", "remove"], pages: ["blockCatalog", "list", "get", "getByPath", "create", "update", "reorderBlocks", "setBlockVisible", "upsertBlock", "removeBlock", "publish", "unpublish", "remove", "restore", "removePermanently"], posts: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], projects: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], services: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], testimonials: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], faq: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], resume: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], routine: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], plans: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], team: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], contacts: ["list", "get", "unreadCount", "markRead", "markUnread", "archive", "unarchive", "remove", "destinations", "setDestinations", "failedDeliveries", "retryDelivery", "publicConfig", "submit", "deliveryContext", "deliver", "recordAttempt", "cleanup"], testimonialIntake: ["list", "approve", "reject", "submit"], privacy: ["exportData", "erase", "policyStatus", "policyDraft", "generatePolicy"], publish: ["status", "trigger", "begin", "finish", "markPublished"], translation: ["translate", "translateDocument", "applyDocument", "prepare", "apply"], commerce: ["notifyAdmin", "siteOrigins", "access", "recordInvalidWebhook", "exportPersonalData", "erasePersonalData"], proposals: ["list", "get", "versions", "getAcceptance", "create", "update", "resetPassword", "remove", "restore", "removePermanently", "getPublic", "checkSession", "generateSignatureUploadUrl", "getAcceptanceByToken", "createSession", "accept", "invalidateSessions", "cleanupExpiredSessions"], contractTemplates: ["list", "get", "getDefault", "create", "update", "remove", "setDefault", "seedDefault"], checkouts: ["status", "list", "get", "create", "remove", "restore", "removePermanently", "linkPlan", "unlinkPlan", "listLinks", "getByLink", "initiatePayment", "startFromLink", "getById", "claimPayment", "releasePayment", "setCustomerId", "clearCharge", "patchGatewayData", "markPaidByLink", "markRefundedByLink", "expireOldCheckouts", "cleanupPaymentEvents"], asaas: ["createCustomer", "createCharge", "deleteCharge", "listCustomers", "adminCreateCustomer", "adminDeleteCustomer", "listCharges", "getCharge", "adminCreateCharge", "cancelCharge", "listInvoices"], aiResumes: ["list", "get", "generate", "remove", "restore", "removePermanently", "cvSource", "save"], panel: ["validatePage", "mediaUsage", "replaceMedia"], seed: ["status", "apply", "patchSettings"] };
|
|
16
|
+
define_CORE_MODULES_default = { users: ["isSetupRequired", "me", "list", "create", "setRole", "remove", "suspend", "reactivate", "resetPassword", "changePassword", "actor", "assignRoleInternal", "clearMustChangePassword", "setupRoot", "findPasswordAccount", "afterPasswordReset", "passwordAccountOf", "afterAdminReset", "resetPasswordInternal"], audit: ["recent", "logFromAction", "hitRateLimit", "cleanup"], site: ["snapshot"], settings: ["get", "plugins", "update", "setPlugin", "init"], texts: ["list", "set", "reset"], media: ["generateUploadUrl", "save", "list", "folders", "get", "update", "normalizeFolders", "remove"], pages: ["blockCatalog", "list", "get", "getByPath", "create", "update", "reorderBlocks", "setBlockVisible", "upsertBlock", "removeBlock", "publish", "unpublish", "remove", "restore", "removePermanently"], posts: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], projects: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], services: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], testimonials: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], faq: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], resume: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], routine: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], plans: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], team: ["list", "get", "create", "update", "publish", "unpublish", "reorder", "remove", "restore", "removePermanently"], contacts: ["list", "get", "unreadCount", "markRead", "markUnread", "archive", "unarchive", "remove", "destinations", "setDestinations", "failedDeliveries", "retryDelivery", "publicConfig", "submit", "deliveryContext", "deliver", "recordAttempt", "cleanup"], testimonialIntake: ["list", "approve", "reject", "submit"], privacy: ["exportData", "erase", "policyStatus", "policyDraft", "generatePolicy"], publish: ["status", "trigger", "begin", "finish", "markPublished"], translation: ["translate", "translateDocument", "applyDocument", "prepare", "apply"], commerce: ["notifyAdmin", "siteOrigins", "access", "recordInvalidWebhook", "exportPersonalData", "erasePersonalData"], proposals: ["list", "get", "versions", "getAcceptance", "create", "update", "resetPassword", "remove", "restore", "removePermanently", "getPublic", "checkSession", "generateSignatureUploadUrl", "getAcceptanceByToken", "createSession", "accept", "invalidateSessions", "cleanupExpiredSessions"], contractTemplates: ["list", "get", "getDefault", "create", "update", "remove", "setDefault", "seedDefault"], checkouts: ["status", "list", "get", "create", "remove", "restore", "removePermanently", "linkPlan", "unlinkPlan", "listLinks", "getByLink", "initiatePayment", "startFromLink", "getById", "claimPayment", "releasePayment", "setCustomerId", "clearCharge", "patchGatewayData", "markPaidByLink", "markRefundedByLink", "expireOldCheckouts", "cleanupPaymentEvents"], asaas: ["createCustomer", "createCharge", "deleteCharge", "listCustomers", "adminCreateCustomer", "adminDeleteCustomer", "listCharges", "getCharge", "adminCreateCharge", "cancelCharge", "listInvoices"], aiResumes: ["list", "get", "generate", "remove", "restore", "removePermanently", "cvSource", "save"], panel: ["validatePage", "mediaUsage", "replaceMedia"], seed: ["status", "apply", "patchSettings"] };
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -496,7 +496,7 @@ var init_telemetry = __esm({
|
|
|
496
496
|
TELEMETRY_DOCS = "https://userubrica.vercel.app/docs/guia/telemetria";
|
|
497
497
|
TELEMETRY_TIMEOUT_MS = 2e3;
|
|
498
498
|
FORMAT_VERSION = 1;
|
|
499
|
-
CLI_VERSION = true ? "2.
|
|
499
|
+
CLI_VERSION = true ? "2.1.2" : "0.0.0";
|
|
500
500
|
OFF_VALUES = ["0", "false", "nao", "n\xE3o", "off", "desligada", "desligado"];
|
|
501
501
|
isOn = (value) => value !== void 0 && value !== "" && !["0", "false"].includes(value.toLowerCase());
|
|
502
502
|
NOTICE = `O Rubrica manda, sem dados pessoais, as escolhas feitas no CLI (tipo, tema, cores, plugins) para saber o que as pessoas mais usam.
|
|
@@ -586,17 +586,18 @@ async function evaluateInProject(projectDir, code) {
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
function findPackageDir(fromDir, pkg) {
|
|
589
|
+
let dir = fromDir;
|
|
590
|
+
for (; ; ) {
|
|
591
|
+
const candidate = join3(dir, "node_modules", pkg);
|
|
592
|
+
if (existsSync2(join3(candidate, "package.json"))) return candidate;
|
|
593
|
+
const parent = dirname2(dir);
|
|
594
|
+
if (parent === dir) break;
|
|
595
|
+
dir = parent;
|
|
596
|
+
}
|
|
589
597
|
try {
|
|
590
598
|
return dirname2(createRequire(join3(fromDir, "package.json")).resolve(`${pkg}/package.json`));
|
|
591
599
|
} catch {
|
|
592
|
-
|
|
593
|
-
for (; ; ) {
|
|
594
|
-
const candidate = join3(dir, "node_modules", pkg);
|
|
595
|
-
if (existsSync2(join3(candidate, "package.json"))) return candidate;
|
|
596
|
-
const parent = dirname2(dir);
|
|
597
|
-
if (parent === dir) return null;
|
|
598
|
-
dir = parent;
|
|
599
|
-
}
|
|
600
|
+
return null;
|
|
600
601
|
}
|
|
601
602
|
}
|
|
602
603
|
function installedVersion(projectDir, pkg) {
|
|
@@ -933,7 +934,7 @@ var init_package = __esm({
|
|
|
933
934
|
"../core/package.json"() {
|
|
934
935
|
package_default = {
|
|
935
936
|
name: "@rubrica/core",
|
|
936
|
-
version: "2.
|
|
937
|
+
version: "2.1.2",
|
|
937
938
|
description: "N\xFAcleo do Rubrica: contrato de blocos e temas, idiomas, integra\xE7\xE3o Astro, backend Convex, painel e MCP.",
|
|
938
939
|
type: "module",
|
|
939
940
|
license: "GPL-3.0-only",
|
|
@@ -996,7 +997,7 @@ var init_package = __esm({
|
|
|
996
997
|
"@types/node": "^22.0.0",
|
|
997
998
|
"@types/react": "^19.2.0",
|
|
998
999
|
"@types/react-dom": "^19.2.0",
|
|
999
|
-
astro: "^7.4.
|
|
1000
|
+
astro: "^7.4.11",
|
|
1000
1001
|
convex: "^1.49.0",
|
|
1001
1002
|
"convex-test": "^0.0.67",
|
|
1002
1003
|
"happy-dom": "^21.0.4",
|
|
@@ -1032,7 +1033,7 @@ var init_package2 = __esm({
|
|
|
1032
1033
|
"../mcp/package.json"() {
|
|
1033
1034
|
package_default2 = {
|
|
1034
1035
|
name: "@rubrica/mcp",
|
|
1035
|
-
version: "2.0.
|
|
1036
|
+
version: "2.0.2",
|
|
1036
1037
|
description: "Servidor MCP local do Rubrica: o agente edita p\xE1ginas, blocos e cole\xE7\xF5es do site pelo Convex do projeto, com o login de um usu\xE1rio do painel.",
|
|
1037
1038
|
type: "module",
|
|
1038
1039
|
license: "GPL-3.0-only",
|
|
@@ -1062,6 +1063,7 @@ var init_package2 = __esm({
|
|
|
1062
1063
|
},
|
|
1063
1064
|
scripts: {
|
|
1064
1065
|
build: "tsup",
|
|
1066
|
+
prepublishOnly: "pnpm run build",
|
|
1065
1067
|
check: "tsc --noEmit -p tsconfig.json",
|
|
1066
1068
|
test: "vitest run"
|
|
1067
1069
|
},
|
|
@@ -1325,6 +1327,20 @@ var init_ui_texts = __esm({
|
|
|
1325
1327
|
"blog.publishedAt": { pt: "Publicado em {date}", en: "Published on {date}", es: "Publicado el {date}" },
|
|
1326
1328
|
"blog.related": { pt: "Leia tamb\xE9m", en: "Read next", es: "Lee tambi\xE9n" },
|
|
1327
1329
|
"blog.allTags": { pt: "Todos", en: "All", es: "Todos" },
|
|
1330
|
+
// Lista e post do blog como na v1 (busca, destaques, RSS, autor e case relacionado).
|
|
1331
|
+
"blog.search": { pt: "Buscar artigos...", en: "Search articles...", es: "Buscar art\xEDculos..." },
|
|
1332
|
+
"blog.searchEmpty": { pt: "Nenhum artigo encontrado.", en: "No articles found.", es: "No se encontraron art\xEDculos." },
|
|
1333
|
+
"blog.featured": { pt: "Em destaque", en: "Featured", es: "Destacados" },
|
|
1334
|
+
"blog.featuredPrev": { pt: "Destaque anterior", en: "Previous featured post", es: "Destacado anterior" },
|
|
1335
|
+
"blog.featuredNext": { pt: "Pr\xF3ximo destaque", en: "Next featured post", es: "Siguiente destacado" },
|
|
1336
|
+
"blog.readNow": { pt: "Ler agora", en: "Read now", es: "Leer ahora" },
|
|
1337
|
+
"blog.rss": { pt: "RSS", en: "RSS", es: "RSS" },
|
|
1338
|
+
"blog.rssSubscribe": { pt: "Assinar o feed RSS", en: "Subscribe to the RSS feed", es: "Suscribirse al feed RSS" },
|
|
1339
|
+
"blog.back": { pt: "Voltar para o blog", en: "Back to the blog", es: "Volver al blog" },
|
|
1340
|
+
"blog.authorLine": { pt: "Escrevo sobre o que construo e lidero na pr\xE1tica.", en: "I write about what I build and lead in practice.", es: "Escribo sobre lo que construyo y lidero en la pr\xE1ctica." },
|
|
1341
|
+
"blog.authorCta": { pt: "Fale comigo", en: "Get in touch", es: "Hablemos" },
|
|
1342
|
+
"blog.relatedCase": { pt: "Case relacionado", en: "Related case study", es: "Caso relacionado" },
|
|
1343
|
+
"blog.readCase": { pt: "Ler o case", en: "Read the case study", es: "Leer el caso" },
|
|
1328
1344
|
"case.related": { pt: "Outros projetos", en: "More projects", es: "Otros proyectos" },
|
|
1329
1345
|
"case.client": { pt: "Cliente", en: "Client", es: "Cliente" },
|
|
1330
1346
|
"case.year": { pt: "Ano", en: "Year", es: "A\xF1o" },
|
|
@@ -1332,6 +1348,23 @@ var init_ui_texts = __esm({
|
|
|
1332
1348
|
"case.myRole": { pt: "Meu papel", en: "My role", es: "Mi rol" },
|
|
1333
1349
|
"case.back": { pt: "Voltar ao portf\xF3lio", en: "Back to the portfolio", es: "Volver al portafolio" },
|
|
1334
1350
|
"case.gallery": { pt: "Imagens do projeto", en: "Project images", es: "Im\xE1genes del proyecto" },
|
|
1351
|
+
"case.metrics": { pt: "Resultados em n\xFAmeros", en: "Results by the numbers", es: "Resultados en n\xFAmeros" },
|
|
1352
|
+
"case.details": { pt: "Ver detalhes", en: "View details", es: "Ver detalles" },
|
|
1353
|
+
"case.next": { pt: "Pr\xF3ximo case", en: "Next case study", es: "Siguiente caso" },
|
|
1354
|
+
"case.ctaTitle": { pt: "Precisa de algo parecido?", en: "Need something similar?", es: "\xBFNecesitas algo parecido?" },
|
|
1355
|
+
"case.ctaBody": {
|
|
1356
|
+
pt: "Conte o contexto do seu projeto e eu respondo com os pr\xF3ximos passos.",
|
|
1357
|
+
en: "Share your project context and I'll reply with the next steps.",
|
|
1358
|
+
es: "Cu\xE9ntame el contexto de tu proyecto y te respondo con los pr\xF3ximos pasos."
|
|
1359
|
+
},
|
|
1360
|
+
"case.ctaButton": { pt: "Falar sobre um projeto", en: "Talk about a project", es: "Hablar de un proyecto" },
|
|
1361
|
+
"cases.filter": { pt: "Filtrar por categoria", en: "Filter by category", es: "Filtrar por categor\xEDa" },
|
|
1362
|
+
"cases.all": { pt: "Todos", en: "All", es: "Todos" },
|
|
1363
|
+
"gallery.expand": { pt: "Expandir imagem", en: "Expand image", es: "Ampliar imagen" },
|
|
1364
|
+
"gallery.prev": { pt: "Imagem anterior", en: "Previous image", es: "Imagen anterior" },
|
|
1365
|
+
"gallery.next": { pt: "Pr\xF3xima imagem", en: "Next image", es: "Imagen siguiente" },
|
|
1366
|
+
"gallery.position": { pt: "{current} de {total}", en: "{current} of {total}", es: "{current} de {total}" },
|
|
1367
|
+
"gallery.close": { pt: "Fechar", en: "Close", es: "Cerrar" },
|
|
1335
1368
|
"resume.download": { pt: "Baixar curr\xEDculo em PDF", en: "Download r\xE9sum\xE9 (PDF)", es: "Descargar CV en PDF" },
|
|
1336
1369
|
"resume.experience": { pt: "Experi\xEAncia", en: "Experience", es: "Experiencia" },
|
|
1337
1370
|
"resume.education": { pt: "Forma\xE7\xE3o", en: "Education", es: "Formaci\xF3n" },
|
|
@@ -1357,6 +1390,9 @@ var init_ui_texts = __esm({
|
|
|
1357
1390
|
"case.view": { pt: "Ver case", en: "View case study", es: "Ver caso" },
|
|
1358
1391
|
"blog.filter": { pt: "Filtrar por etiqueta", en: "Filter by tag", es: "Filtrar por etiqueta" },
|
|
1359
1392
|
"testimonials.send": { pt: "Enviar um depoimento", en: "Send a testimonial", es: "Enviar un testimonio" },
|
|
1393
|
+
/** Quantos depoimentos a lista mostra ("(7 depoimentos)" ao lado do apoio, na v1). */
|
|
1394
|
+
"testimonials.count": { pt: "{count} depoimentos", en: "{count} testimonials", es: "{count} testimonios" },
|
|
1395
|
+
"testimonials.countOne": { pt: "1 depoimento", en: "1 testimonial", es: "1 testimonio" },
|
|
1360
1396
|
"contact.phone": { pt: "Telefone", en: "Phone", es: "Tel\xE9fono" },
|
|
1361
1397
|
"contact.channels": { pt: "Outros canais", en: "Other channels", es: "Otros canales" },
|
|
1362
1398
|
"contact.social": { pt: "Redes", en: "Social", es: "Redes" },
|
|
@@ -1405,6 +1441,12 @@ var init_ui_texts = __esm({
|
|
|
1405
1441
|
"contactForm.topic.job": { pt: "Tenho uma vaga", en: "I have a job opening", es: "Tengo una vacante" },
|
|
1406
1442
|
"contactForm.topic.talk": { pt: "Quero trocar uma ideia", en: "I'd like to chat", es: "Quiero conversar" },
|
|
1407
1443
|
"contactForm.topic.other": { pt: "Outro assunto", en: "Something else", es: "Otro asunto" },
|
|
1444
|
+
"contactForm.close": { pt: "Fechar", en: "Close", es: "Cerrar" },
|
|
1445
|
+
"contactForm.summary": { pt: "Revise e envie", en: "Review and send", es: "Revisa y env\xEDa" },
|
|
1446
|
+
"contactForm.summaryTopic": { pt: "Assunto", en: "Topic", es: "Asunto" },
|
|
1447
|
+
"contactForm.summaryContact": { pt: "Contato", en: "Contact", es: "Contacto" },
|
|
1448
|
+
"contactForm.linkedin": { pt: "LinkedIn", en: "LinkedIn", es: "LinkedIn" },
|
|
1449
|
+
"contactForm.company": { pt: "Empresa", en: "Company", es: "Empresa" },
|
|
1408
1450
|
"contactForm.success": { pt: "Mensagem enviada.", en: "Message sent.", es: "Mensaje enviado." },
|
|
1409
1451
|
"contactForm.successBody": { pt: "Obrigado pelo contato. Respondo assim que poss\xEDvel.", en: "Thanks for reaching out. I'll reply as soon as I can.", es: "Gracias por escribir. Responder\xE9 lo antes posible." },
|
|
1410
1452
|
"testimonialForm.open": { pt: "Enviar um depoimento", en: "Send a testimonial", es: "Enviar un testimonio" },
|
|
@@ -1424,12 +1466,22 @@ var init_ui_texts = __esm({
|
|
|
1424
1466
|
es: "La direcci\xF3n puede haber cambiado o la p\xE1gina no existe en este idioma."
|
|
1425
1467
|
},
|
|
1426
1468
|
"notFound.home": { pt: "Ir para a p\xE1gina inicial", en: "Go to the home page", es: "Ir a la p\xE1gina de inicio" },
|
|
1469
|
+
/** Rótulo e código de erro da tela de 404 em terminal (temas padrão e cyberpunk, como a v1). */
|
|
1470
|
+
"notFound.label": { pt: "Erro do sistema", en: "System error", es: "Error del sistema" },
|
|
1471
|
+
"notFound.code": { pt: "ERR_ROTA_NAO_ENCONTRADA", en: "ERR_ROUTE_NOT_FOUND", es: "ERR_RUTA_NO_ENCONTRADA" },
|
|
1427
1472
|
...APP_UI_TEXTS
|
|
1428
1473
|
};
|
|
1429
1474
|
EMPRESA_UI_TEXTS = {
|
|
1430
1475
|
"sidebar.talk": { pt: "Fale conosco", en: "Talk to us", es: "Hablemos" },
|
|
1431
1476
|
"case.myRole": { pt: "Nosso papel", en: "Our role", es: "Nuestro rol" },
|
|
1432
1477
|
"case.back": { pt: "Voltar aos cases", en: "Back to the case studies", es: "Volver a los casos" },
|
|
1478
|
+
"case.ctaBody": {
|
|
1479
|
+
pt: "Conte o contexto do seu projeto e respondemos com os pr\xF3ximos passos.",
|
|
1480
|
+
en: "Share your project context and we'll reply with the next steps.",
|
|
1481
|
+
es: "Cu\xE9ntanos el contexto de tu proyecto y te respondemos con los pr\xF3ximos pasos."
|
|
1482
|
+
},
|
|
1483
|
+
"blog.authorLine": { pt: "Escrevemos sobre o que constru\xEDmos na pr\xE1tica.", en: "We write about what we build in practice.", es: "Escribimos sobre lo que construimos en la pr\xE1ctica." },
|
|
1484
|
+
"blog.authorCta": { pt: "Fale conosco", en: "Talk to us", es: "Hablemos" },
|
|
1433
1485
|
"whatsapp.float": { pt: "Fale conosco no WhatsApp", en: "Chat with us on WhatsApp", es: "Habla con nosotros por WhatsApp" },
|
|
1434
1486
|
"contactForm.message": { pt: "Conte um pouco mais", en: "Tell us a bit more", es: "Cu\xE9ntanos un poco m\xE1s" },
|
|
1435
1487
|
"contactForm.you": { pt: "Como falar com voc\xEA?", en: "How can we reach you?", es: "\xBFC\xF3mo podemos contactarte?" },
|
|
@@ -2767,7 +2819,8 @@ var init_catalog = __esm({
|
|
|
2767
2819
|
label: "Convidar a enviar depoimento",
|
|
2768
2820
|
default: false,
|
|
2769
2821
|
help: "Mostra o bot\xE3o do assistente de depoimento (precisa do plugin testimonials-intake)."
|
|
2770
|
-
})
|
|
2822
|
+
}),
|
|
2823
|
+
cta: field.link({ label: "Link para todos", help: 'Ex.: "Ver todos os depoimentos", para a p\xE1gina de depoimentos. Opcional.' })
|
|
2771
2824
|
}
|
|
2772
2825
|
});
|
|
2773
2826
|
faq = defineBlock({
|
|
@@ -2798,13 +2851,24 @@ var init_catalog = __esm({
|
|
|
2798
2851
|
},
|
|
2799
2852
|
category: "comum",
|
|
2800
2853
|
plugin: "blog",
|
|
2854
|
+
// A busca é uma ilha que só filtra os cartões já no HTML (sem ela, a lista inteira aparece).
|
|
2855
|
+
interactive: true,
|
|
2856
|
+
enhances: true,
|
|
2857
|
+
islandOptIn: true,
|
|
2858
|
+
islandWhen: (f) => f.showSearch === true,
|
|
2801
2859
|
source: { collections: ["posts"], default: { collection: "posts", limit: 3, sort: "recent" } },
|
|
2802
2860
|
fields: {
|
|
2803
2861
|
anchor,
|
|
2804
2862
|
title: heading,
|
|
2805
2863
|
intro: intro3,
|
|
2806
2864
|
cta: field.link({ label: "Link para o blog" }),
|
|
2807
|
-
showTagFilter: field.boolean({ label: "Filtro por etiqueta", default: false })
|
|
2865
|
+
showTagFilter: field.boolean({ label: "Filtro por etiqueta", default: false }),
|
|
2866
|
+
showSearch: field.boolean({ label: "Busca por texto", default: false, help: "Campo que filtra os posts pelo t\xEDtulo, resumo e etiquetas (p\xE1gina do blog)." }),
|
|
2867
|
+
showFeatured: field.boolean({
|
|
2868
|
+
label: "Destaques no topo",
|
|
2869
|
+
default: false,
|
|
2870
|
+
help: "Os posts marcados como destaque num carrossel acima da lista, nos temas que o desenham (p\xE1gina do blog)."
|
|
2871
|
+
})
|
|
2808
2872
|
}
|
|
2809
2873
|
});
|
|
2810
2874
|
cta = defineBlock({
|
|
@@ -2850,7 +2914,59 @@ var init_catalog = __esm({
|
|
|
2850
2914
|
],
|
|
2851
2915
|
default: "wizard"
|
|
2852
2916
|
}),
|
|
2853
|
-
showChannels: field.boolean({ label: "Mostrar canais de contato", default: true })
|
|
2917
|
+
showChannels: field.boolean({ label: "Mostrar canais de contato", default: true }),
|
|
2918
|
+
presentation: field.select({
|
|
2919
|
+
label: "Onde aparece",
|
|
2920
|
+
options: [
|
|
2921
|
+
{ value: "inline", label: "Na p\xE1gina" },
|
|
2922
|
+
{ value: "dialog", label: "S\xF3 na janela de contato" }
|
|
2923
|
+
],
|
|
2924
|
+
default: "inline",
|
|
2925
|
+
help: "S\xF3 na janela: com um tema que tem janela de contato (padr\xE3o, cyberpunk), o bloco sai da p\xE1gina e a janela, que abre em toda p\xE1gina pelos bot\xF5es de contato, mostra o formul\xE1rio, o t\xEDtulo e o sobret\xEDtulo dele. Em tema sem janela, o bloco fica na p\xE1gina."
|
|
2926
|
+
}),
|
|
2927
|
+
eyebrow: field.text({ label: "Sobret\xEDtulo", maxLength: 80, help: "Linha curta acima do t\xEDtulo (ex.: portfolio / contato)." }),
|
|
2928
|
+
flows: field.list({
|
|
2929
|
+
label: "Assuntos do assistente",
|
|
2930
|
+
itemLabel: "Assunto",
|
|
2931
|
+
max: 6,
|
|
2932
|
+
help: "Opcional, para o formato assistente. Cada assunto tem as pr\xF3prias etapas; a primeira tela mostra os assuntos e o resumo para revisar vem no fim. Sem assuntos, o assistente pergunta o assunto, a mensagem e os dados.",
|
|
2933
|
+
of: {
|
|
2934
|
+
id: field.text({ label: "Identificador", localized: false, required: true, maxLength: 40, help: "Curto e sem espa\xE7os (ex.: projeto)." }),
|
|
2935
|
+
emoji: field.text({ label: "Emoji", localized: false, maxLength: 16 }),
|
|
2936
|
+
label: field.text({ label: "R\xF3tulo", required: true, maxLength: 80 }),
|
|
2937
|
+
steps: field.list({
|
|
2938
|
+
label: "Etapas",
|
|
2939
|
+
itemLabel: "Etapa",
|
|
2940
|
+
max: 8,
|
|
2941
|
+
help: "Sem a etapa de dados de contato, ela entra no fim.",
|
|
2942
|
+
of: {
|
|
2943
|
+
kind: field.select({
|
|
2944
|
+
label: "Tipo",
|
|
2945
|
+
options: [
|
|
2946
|
+
{ value: "choice", label: "Escolha entre op\xE7\xF5es" },
|
|
2947
|
+
{ value: "text", label: "Texto curto" },
|
|
2948
|
+
{ value: "textarea", label: "Texto longo (vai como mensagem)" },
|
|
2949
|
+
{ value: "contact", label: "Dados de contato" }
|
|
2950
|
+
],
|
|
2951
|
+
default: "choice"
|
|
2952
|
+
}),
|
|
2953
|
+
key: field.text({
|
|
2954
|
+
label: "Chave da resposta",
|
|
2955
|
+
localized: false,
|
|
2956
|
+
maxLength: 80,
|
|
2957
|
+
help: "Nome da resposta no pedido (ex.: prazo). Em texto curto, v\xE1rias chaves separadas por v\xEDrgula viram v\xE1rios campos."
|
|
2958
|
+
}),
|
|
2959
|
+
title: field.text({ label: "Pergunta", maxLength: 160 }),
|
|
2960
|
+
options: field.text({ label: "Op\xE7\xF5es", multiline: true, maxLength: 1500, help: "Uma por linha (tipo escolha)." }),
|
|
2961
|
+
placeholder: field.text({ label: "Exemplo dentro do campo", multiline: true, maxLength: 400, help: "Um por linha quando a etapa tem v\xE1rios campos." }),
|
|
2962
|
+
optional: field.boolean({ label: "Resposta opcional", default: false }),
|
|
2963
|
+
askPhone: field.boolean({ label: "Pedir telefone", default: false, help: "S\xF3 na etapa de dados de contato." }),
|
|
2964
|
+
askLinkedin: field.boolean({ label: "Pedir LinkedIn", default: false, help: "S\xF3 na etapa de dados de contato." }),
|
|
2965
|
+
askCompany: field.boolean({ label: "Pedir empresa", default: false, help: "S\xF3 na etapa de dados de contato." })
|
|
2966
|
+
}
|
|
2967
|
+
})
|
|
2968
|
+
}
|
|
2969
|
+
})
|
|
2854
2970
|
}
|
|
2855
2971
|
});
|
|
2856
2972
|
galeria = defineBlock({
|
|
@@ -3473,7 +3589,7 @@ var init_files = __esm({
|
|
|
3473
3589
|
PEERS = package_default.peerDependencies;
|
|
3474
3590
|
MCP_VERSION = package_default2.version;
|
|
3475
3591
|
defaultDependencySpecs = () => ({ core: `^${CORE_VERSION}`, theme: `^${CORE_VERSION}`, cli: `^${CLI_PACKAGE_VERSION}`, mcp: `^${MCP_VERSION}` });
|
|
3476
|
-
CLI_PACKAGE_VERSION = true ? "2.
|
|
3592
|
+
CLI_PACKAGE_VERSION = true ? "2.1.2" : CORE_VERSION;
|
|
3477
3593
|
MARK = {
|
|
3478
3594
|
themeStart: "// rubrica:tema:inicio",
|
|
3479
3595
|
themeEnd: "// rubrica:tema:fim",
|
|
@@ -4543,6 +4659,19 @@ Corrija e rode de novo: npx create-rubrica publicar`);
|
|
|
4543
4659
|
}
|
|
4544
4660
|
if (copied.length) log2.info(`Levei para o site publicado as integra\xE7\xF5es do computador: ${copied.join(", ")}.`);
|
|
4545
4661
|
};
|
|
4662
|
+
const syncBuildNotice = () => {
|
|
4663
|
+
let secret = convexEnvGet(prod, CALLBACK_SECRET);
|
|
4664
|
+
if (!secret) {
|
|
4665
|
+
secret = randomBytes3(32).toString("hex");
|
|
4666
|
+
convexEnvSet(prod, CALLBACK_SECRET, secret);
|
|
4667
|
+
}
|
|
4668
|
+
try {
|
|
4669
|
+
vercel(["env", "add", CALLBACK_SECRET, "production", "--value", secret, "--yes", "--force", "--sensitive"]);
|
|
4670
|
+
} catch (err) {
|
|
4671
|
+
log2.warn(`N\xE3o deu para gravar o ${CALLBACK_SECRET} na Vercel (o painel sai de "publicando" sozinho em alguns minutos):
|
|
4672
|
+
${tail(errorOutput(err))}`);
|
|
4673
|
+
}
|
|
4674
|
+
};
|
|
4546
4675
|
const configurePublishButton = async () => {
|
|
4547
4676
|
if (convexEnvGet(prod, "RUBRICA_DEPLOY_HOOK_URL")) return;
|
|
4548
4677
|
note2(
|
|
@@ -4567,6 +4696,7 @@ Corrija e rode de novo: npx create-rubrica publicar`);
|
|
|
4567
4696
|
if (!await confirm2("Publicar de novo com as mudan\xE7as que voc\xEA fez?", true)) throw new Cancelled(NOTHING);
|
|
4568
4697
|
ensureLogin();
|
|
4569
4698
|
syncIntegrations();
|
|
4699
|
+
syncBuildNotice();
|
|
4570
4700
|
await configurePublishButton();
|
|
4571
4701
|
deploy();
|
|
4572
4702
|
const siteUrl2 = productionUrl();
|
|
@@ -4649,6 +4779,7 @@ ${tail(errorOutput(err))}`);
|
|
|
4649
4779
|
for (const [key, value, sensitive] of vercelEnv) {
|
|
4650
4780
|
vercel(["env", "add", key, "production", "--value", value, "--yes", "--force", ...sensitive ? ["--sensitive"] : []]);
|
|
4651
4781
|
}
|
|
4782
|
+
syncBuildNotice();
|
|
4652
4783
|
updateState(projectDir, { producao: { convexUrl: urls.convexUrl, siteUrl } });
|
|
4653
4784
|
await configurePublishButton();
|
|
4654
4785
|
deploy();
|
|
@@ -4664,7 +4795,7 @@ ${tail(errorOutput(err))}`);
|
|
|
4664
4795
|
].join("\n")
|
|
4665
4796
|
);
|
|
4666
4797
|
}
|
|
4667
|
-
var NOTHING, DEPLOY_KEY_NAME, VERCELIGNORE;
|
|
4798
|
+
var NOTHING, DEPLOY_KEY_NAME, CALLBACK_SECRET, VERCELIGNORE;
|
|
4668
4799
|
var init_publish = __esm({
|
|
4669
4800
|
"src/commands/publish.ts"() {
|
|
4670
4801
|
"use strict";
|
|
@@ -4678,6 +4809,7 @@ var init_publish = __esm({
|
|
|
4678
4809
|
init_setup();
|
|
4679
4810
|
NOTHING = "Nada foi publicado.";
|
|
4680
4811
|
DEPLOY_KEY_NAME = "rubrica-vercel";
|
|
4812
|
+
CALLBACK_SECRET = "RUBRICA_DEPLOY_CALLBACK_SECRET";
|
|
4681
4813
|
VERCELIGNORE = ".env*\n!.env.example\nnode_modules\n.rubrica\n";
|
|
4682
4814
|
}
|
|
4683
4815
|
});
|
|
@@ -7428,6 +7560,10 @@ function toHtml(text2) {
|
|
|
7428
7560
|
const esc = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
7429
7561
|
return text2.split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean).map((p) => `<p>${esc(p).replace(/\n/g, "<br>")}</p>`).join("");
|
|
7430
7562
|
}
|
|
7563
|
+
function mediaFolderPath(path5) {
|
|
7564
|
+
const parts = (typeof path5 === "string" ? path5 : "").split("/").map((p) => p.trim().replace(/[^\p{L}\p{N}_ -]/gu, "-").slice(0, 60).trim()).filter(Boolean).slice(0, 6);
|
|
7565
|
+
return parts.length ? `/${parts.join("/")}` : "/";
|
|
7566
|
+
}
|
|
7431
7567
|
function slugify(text2) {
|
|
7432
7568
|
return text2.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "item";
|
|
7433
7569
|
}
|
|
@@ -7487,12 +7623,6 @@ function convertProjects(ctx, docs) {
|
|
|
7487
7623
|
const body = mapLoc(loc(cs[s.field], { enUS: csEn?.[s.field] }), toHtml);
|
|
7488
7624
|
if (hasText(body)) sections.push({ title: ctx.t(s.key), body });
|
|
7489
7625
|
}
|
|
7490
|
-
if (cs.metrics?.length) {
|
|
7491
|
-
const list2 = (metrics) => `<ul>${metrics.map((m) => `<li><strong>${m.value}</strong> ${m.label}</li>`).join("")}</ul>`;
|
|
7492
|
-
const body = { [PT]: list2(cs.metrics) };
|
|
7493
|
-
if (csEn?.metrics?.length) body[EN] = list2(csEn.metrics);
|
|
7494
|
-
sections.push({ title: ctx.t("portfolio.metrics"), body });
|
|
7495
|
-
}
|
|
7496
7626
|
if (cs.testimonial?.text) {
|
|
7497
7627
|
const t = cs.testimonial;
|
|
7498
7628
|
const quote = (text2, role) => `<blockquote><p>${text2}</p><footer>${t.author}${role ? `, ${role}` : ""}</footer></blockquote>`;
|
|
@@ -7504,6 +7634,7 @@ function convertProjects(ctx, docs) {
|
|
|
7504
7634
|
sections.push({ title: ctx.t("portfolio.testimonial"), body });
|
|
7505
7635
|
}
|
|
7506
7636
|
}
|
|
7637
|
+
const metrics = caseMetrics(cs?.metrics, csEn?.metrics);
|
|
7507
7638
|
const images = (d.imageIds ?? []).map((id) => ctx.image(id)).filter(Boolean);
|
|
7508
7639
|
const external = (d.externalImageUrls ?? []).map((url) => ({ url }));
|
|
7509
7640
|
const [cover, ...gallery] = [...images, ...external];
|
|
@@ -7518,6 +7649,7 @@ function convertProjects(ctx, docs) {
|
|
|
7518
7649
|
summary: loc(d.description, d.descriptionTranslations),
|
|
7519
7650
|
content: mapLoc(loc(d.longDescription, d.longDescriptionTranslations), toHtml),
|
|
7520
7651
|
sections: sections.length ? sections : void 0,
|
|
7652
|
+
metrics: metrics.length ? metrics : void 0,
|
|
7521
7653
|
cover,
|
|
7522
7654
|
gallery: gallery.length ? gallery : void 0,
|
|
7523
7655
|
role: cs ? loc(cs.role, { enUS: csEn?.role }) : void 0,
|
|
@@ -7532,6 +7664,14 @@ function convertProjects(ctx, docs) {
|
|
|
7532
7664
|
});
|
|
7533
7665
|
});
|
|
7534
7666
|
}
|
|
7667
|
+
function caseMetrics(pt, en) {
|
|
7668
|
+
return (pt ?? []).flatMap((m, i) => {
|
|
7669
|
+
const value = str2(m.value === void 0 ? void 0 : String(m.value));
|
|
7670
|
+
const label = loc(m.label, { enUS: en?.[i]?.label });
|
|
7671
|
+
if (!value || !hasText(label)) return [];
|
|
7672
|
+
return [compact({ value, label, icon: str2(m.icon) })];
|
|
7673
|
+
});
|
|
7674
|
+
}
|
|
7535
7675
|
function convertResume(ctx, docs) {
|
|
7536
7676
|
return docs.map((d) => {
|
|
7537
7677
|
const c = d.content ?? {};
|
|
@@ -7742,7 +7882,8 @@ function buildPages(ctx, input, plugins, report) {
|
|
|
7742
7882
|
title,
|
|
7743
7883
|
seo: m.seo && Object.keys(m.seo).length ? m.seo : void 0,
|
|
7744
7884
|
// `fields` é obrigatório no schema, mesmo vazio: fica fora do compact (que tira objetos vazios).
|
|
7745
|
-
|
|
7885
|
+
// A receita do tema pode trazer o bloco escondido (ex.: o contato da home num tema com a janela de contato).
|
|
7886
|
+
blocks: kept.map((b, i) => ({ ...compact({ id: ids[i], type: b.type, variant: b.variant, visible: b.visible !== false, source: b.source }), fields: b.fields ?? {} })),
|
|
7746
7887
|
published: true,
|
|
7747
7888
|
system: true,
|
|
7748
7889
|
createdAt: now,
|
|
@@ -7753,7 +7894,70 @@ function buildPages(ctx, input, plugins, report) {
|
|
|
7753
7894
|
}
|
|
7754
7895
|
return pages;
|
|
7755
7896
|
}
|
|
7756
|
-
function
|
|
7897
|
+
function locLines(texts) {
|
|
7898
|
+
const out = {};
|
|
7899
|
+
for (const locale of [PT, EN]) {
|
|
7900
|
+
const lines = texts.map((t) => t[locale] ?? t[PT] ?? "").filter(Boolean);
|
|
7901
|
+
if (lines.length) out[locale] = lines.join("\n");
|
|
7902
|
+
}
|
|
7903
|
+
return out;
|
|
7904
|
+
}
|
|
7905
|
+
function wizardOptions(ctx, prefix, defaults2) {
|
|
7906
|
+
const extra = [...ctx.siteTexts.keys(), ...Object.keys(ctx.projectTexts)].filter((k) => k.startsWith(prefix) && !k.slice(prefix.length).includes(".")).map((k) => k.slice(prefix.length));
|
|
7907
|
+
const ids = [.../* @__PURE__ */ new Set([...defaults2, ...extra])];
|
|
7908
|
+
return locLines(ids.map((id) => ctx.t(`${prefix}${id}`)).filter(hasText));
|
|
7909
|
+
}
|
|
7910
|
+
function contactWizardFields(ctx) {
|
|
7911
|
+
const flows = V1_WIZARD_FLOWS.map((flow) => ({
|
|
7912
|
+
id: flow.id,
|
|
7913
|
+
emoji: flow.emoji,
|
|
7914
|
+
label: ctx.t(`contactWizard.flows.${flow.id}.label`),
|
|
7915
|
+
steps: flow.steps.map((step) => {
|
|
7916
|
+
if (step.kind === "contact") {
|
|
7917
|
+
return compact({ kind: "contact", title: ctx.t("contactWizard.contact.title"), askPhone: step.askPhone, askLinkedin: step.askLinkedin, askCompany: step.askCompany });
|
|
7918
|
+
}
|
|
7919
|
+
const base3 = `contactWizard.${flow.id}.step${step.n}`;
|
|
7920
|
+
const placeholder = step.placeholders ? locLines(step.placeholders.map((p) => ctx.t(`${base3}.${p}`)).filter(hasText)) : {};
|
|
7921
|
+
return compact({
|
|
7922
|
+
kind: step.kind,
|
|
7923
|
+
key: step.key,
|
|
7924
|
+
title: ctx.t(`${base3}.title`),
|
|
7925
|
+
options: step.options ? wizardOptions(ctx, `${base3}.options.`, step.options) : void 0,
|
|
7926
|
+
placeholder: hasText(placeholder) ? placeholder : void 0
|
|
7927
|
+
});
|
|
7928
|
+
})
|
|
7929
|
+
}));
|
|
7930
|
+
return compact({
|
|
7931
|
+
anchor: "contato",
|
|
7932
|
+
presentation: "dialog",
|
|
7933
|
+
eyebrow: { [PT]: "portfolio / contato", [EN]: "portfolio / contato" },
|
|
7934
|
+
title: ctx.t("contactWizard.title"),
|
|
7935
|
+
intro: ctx.t("contactWizard.subtitle"),
|
|
7936
|
+
mode: "wizard",
|
|
7937
|
+
showChannels: false,
|
|
7938
|
+
flows
|
|
7939
|
+
});
|
|
7940
|
+
}
|
|
7941
|
+
function wizardUiTexts(ctx) {
|
|
7942
|
+
const step = ctx.t("contactWizard.step");
|
|
7943
|
+
const of = ctx.t("contactWizard.of");
|
|
7944
|
+
const stepOf = {};
|
|
7945
|
+
for (const locale of [PT, EN]) if (step[locale] && of[locale]) stepOf[locale] = `${step[locale]} {current} ${of[locale]} {total}`;
|
|
7946
|
+
const pairs = [
|
|
7947
|
+
["contactWizard.next", "form.next"],
|
|
7948
|
+
["contactWizard.back", "form.back"],
|
|
7949
|
+
["contactWizard.submit", "form.send"],
|
|
7950
|
+
["contactWizard.submitting", "form.sending"],
|
|
7951
|
+
["contactWizard.successTitle", "contactForm.success"],
|
|
7952
|
+
["contactWizard.successBody", "contactForm.successBody"],
|
|
7953
|
+
["contactWizard.summary.title", "contactForm.summary"],
|
|
7954
|
+
["contactWizard.summary.type", "contactForm.summaryTopic"],
|
|
7955
|
+
["contactWizard.summary.contact", "contactForm.summaryContact"],
|
|
7956
|
+
["common.close", "contactForm.close"]
|
|
7957
|
+
];
|
|
7958
|
+
return [{ v1: "contactWizard.step + contactWizard.of", v2: "form.step", value: stepOf }, ...pairs.map(([v1, v2]) => ({ v1, v2, value: ctx.t(v1) }))].filter((p) => hasText(p.value));
|
|
7959
|
+
}
|
|
7960
|
+
function buildUiTexts(ctx, report, now, plugins = {}) {
|
|
7757
7961
|
const out = [];
|
|
7758
7962
|
const availability = ctx.home.get("availability_status");
|
|
7759
7963
|
const fromHome = availability?.label ? locAny(availability.label) : {};
|
|
@@ -7782,6 +7986,13 @@ function buildUiTexts(ctx, report, now) {
|
|
|
7782
7986
|
out.push({ key: v2, value, updatedAt: now });
|
|
7783
7987
|
report.texts.ui.push({ v1: key, v2 });
|
|
7784
7988
|
}
|
|
7989
|
+
if (plugins["contact-wizard"] !== false) {
|
|
7990
|
+
for (const { v1, v2, value } of wizardUiTexts(ctx)) {
|
|
7991
|
+
if (out.some((t) => t.key === v2)) continue;
|
|
7992
|
+
out.push({ key: v2, value, updatedAt: now });
|
|
7993
|
+
report.texts.ui.push({ v1, v2 });
|
|
7994
|
+
}
|
|
7995
|
+
}
|
|
7785
7996
|
return out;
|
|
7786
7997
|
}
|
|
7787
7998
|
function adaptText(key, value) {
|
|
@@ -7815,8 +8026,11 @@ function convertV1(input) {
|
|
|
7815
8026
|
);
|
|
7816
8027
|
put("faq", "aboutFaq", (t.aboutFaq ?? []).map((d) => compact({ ...meta2(d), question: loc(d.question, d.questionTranslations), answer: mapLoc(loc(d.answer, d.answerTranslations), (s) => s), order: d.displayOrder, ...lifecycle(d) })));
|
|
7817
8028
|
const routine = t.aboutDailyRoutine ?? [];
|
|
7818
|
-
|
|
7819
|
-
|
|
8029
|
+
const span = (d) => {
|
|
8030
|
+
const s = str2(d.spanSize) || str2(d.span_size);
|
|
8031
|
+
return s === "1x2" || s === "2x1" || s === "2x2" ? s : void 0;
|
|
8032
|
+
};
|
|
8033
|
+
put("routine", "aboutDailyRoutine", routine.map((d) => compact({ ...meta2(d), title: loc(d.description, d.descriptionTranslations), image: ctx.image(d.imageId, d.imageUrl), span: span(d), order: d.displayOrder, ...lifecycle(d) })));
|
|
7820
8034
|
put("resumeItems", "resumeItems", convertResume(ctx, t.resumeItems ?? []));
|
|
7821
8035
|
put(
|
|
7822
8036
|
"media",
|
|
@@ -7833,7 +8047,7 @@ function convertV1(input) {
|
|
|
7833
8047
|
settings.navigation = v1Navigation(navigationFromPages(pages));
|
|
7834
8048
|
put("siteSettings", "", [compact({ ...settings, updatedAt: now })]);
|
|
7835
8049
|
put("pages", "", pages);
|
|
7836
|
-
put("uiTexts", "", buildUiTexts(ctx, report, now));
|
|
8050
|
+
put("uiTexts", "", buildUiTexts(ctx, report, now, plugins.record));
|
|
7837
8051
|
report.texts.sectionKeys = [...ctx.siteTexts.keys()].filter((k) => SECTION_KEYS.has(k)).length;
|
|
7838
8052
|
if (input.projectTexts) report.texts.projectKeys = Object.keys(input.projectTexts).filter((k) => ctx.fileCustomized(k)).length;
|
|
7839
8053
|
const business = convertBusiness(t, now);
|
|
@@ -7851,7 +8065,7 @@ function convertV1(input) {
|
|
|
7851
8065
|
for (const u of report.unknownTables) ctx.warnings.push(`Tabela pr\xF3pria do projeto na v1 (${u.table}, ${u.count} documentos): n\xE3o convertida. Leve-a para o convex/ do projeto v2 (schema e fun\xE7\xF5es) e importe \xE0 parte.`);
|
|
7852
8066
|
return { tables: out, sources, pending, report };
|
|
7853
8067
|
}
|
|
7854
|
-
var V1_TEXTS, PT, EN, LOCALES, V1_PLUGIN_DEFAULTS, TABLE_MAP, DROPPED_TABLES, str2, V1_NAV_ORDER, hasText, compact, meta2, lifecycle, MONTHS, PRESENT, Ctx, CASE_SECTIONS, link2, ABOUT_TEXT, RESULT_UNITS, NUMBER_WITH_UNIT, RESUME_SUMMARY, hasHeader, header, HOME_METRICS, SECTION_FILLERS, PAGE_META, SECTION_KEYS, UI_TEXT_MAP, V1_LABELS, UI_TEXT_ADAPT;
|
|
8068
|
+
var V1_TEXTS, PT, EN, LOCALES, V1_PLUGIN_DEFAULTS, TABLE_MAP, DROPPED_TABLES, str2, V1_NAV_ORDER, hasText, compact, meta2, lifecycle, MONTHS, PRESENT, Ctx, CASE_SECTIONS, link2, ABOUT_TEXT, RESULT_UNITS, NUMBER_WITH_UNIT, RESUME_SUMMARY, hasHeader, header, HOME_METRICS, SECTION_FILLERS, PAGE_META, SECTION_KEYS, UI_TEXT_MAP, V1_LABELS, UI_TEXT_ADAPT, V1_WIZARD_FLOWS;
|
|
7855
8069
|
var init_convert = __esm({
|
|
7856
8070
|
"src/migrate/convert.ts"() {
|
|
7857
8071
|
"use strict";
|
|
@@ -7952,7 +8166,7 @@ var init_convert = __esm({
|
|
|
7952
8166
|
this.tables = tables;
|
|
7953
8167
|
this.projectTexts = projectTexts;
|
|
7954
8168
|
for (const f of storage) if (typeof f.internalId === "string" && typeof f._id === "string") this.storageByUrlId.set(f.internalId, f._id);
|
|
7955
|
-
for (const f of tables.imageFolders ?? []) this.folders.set(f._id, f.path);
|
|
8169
|
+
for (const f of tables.imageFolders ?? []) this.folders.set(f._id, mediaFolderPath(f.path));
|
|
7956
8170
|
for (const m of tables.imageMetadata ?? []) this.media.set(m._id, m);
|
|
7957
8171
|
for (const t of tables.siteTexts ?? []) this.siteTexts.set(t.key, t);
|
|
7958
8172
|
for (const h of tables.homeContent ?? []) this.home.set(h.key, h.value);
|
|
@@ -8100,14 +8314,15 @@ var init_convert = __esm({
|
|
|
8100
8314
|
return hasText(body) ? { title: ctx.t("home.about.title"), body } : null;
|
|
8101
8315
|
},
|
|
8102
8316
|
servicos: (ctx) => ({ title: ctx.t("home.skills.title") }),
|
|
8103
|
-
depoimentos
|
|
8317
|
+
// "Ver todos os depoimentos" levava à página de depoimentos (que existe com o plugin ligado).
|
|
8318
|
+
depoimentos: (ctx, plugins) => compact({ title: ctx.t("home.testimonials.title"), allowSubmission: plugins["testimonials-intake"] !== false, cta: hasText(ctx.t("testimonials.viewAll")) ? link2(ctx.t("testimonials.viewAll"), "/depoimentos") : void 0 }),
|
|
8104
8319
|
cta: (ctx, plugins) => compact({
|
|
8105
8320
|
title: ctx.t("home.cta.title"),
|
|
8106
8321
|
body: ctx.t("home.cta.subtitle"),
|
|
8107
8322
|
primary: link2(ctx.t("home.cta.project"), "#contato"),
|
|
8108
8323
|
secondary: plugins["contact-wizard"] !== false ? link2(ctx.t("home.cta.job"), "#contato") : void 0
|
|
8109
8324
|
}),
|
|
8110
|
-
contato: (ctx, plugins) =>
|
|
8325
|
+
contato: (ctx, plugins) => plugins["contact-wizard"] === false ? { anchor: "contato", title: ctx.t("sidebar.contact"), mode: "channels", showChannels: true } : contactWizardFields(ctx),
|
|
8111
8326
|
"posts-recentes": (ctx) => compact({ title: ctx.t("blog.title"), cta: link2(ctx.t("blog.title"), "/blog") })
|
|
8112
8327
|
},
|
|
8113
8328
|
"/sobre": {
|
|
@@ -8147,7 +8362,13 @@ var init_convert = __esm({
|
|
|
8147
8362
|
},
|
|
8148
8363
|
"/blog": {
|
|
8149
8364
|
hero: (ctx) => header(ctx, "blog"),
|
|
8150
|
-
|
|
8365
|
+
// O blog da v1 sempre teve os destaques em carrossel, a busca e o filtro por etiquetas.
|
|
8366
|
+
"posts-recentes": (ctx, _p, recipe) => ({
|
|
8367
|
+
...hasHeader(recipe) ? {} : { title: ctx.t("blog.title"), intro: ctx.t("blog.subtitle") },
|
|
8368
|
+
showTagFilter: true,
|
|
8369
|
+
showSearch: true,
|
|
8370
|
+
showFeatured: true
|
|
8371
|
+
})
|
|
8151
8372
|
},
|
|
8152
8373
|
"/depoimentos": {
|
|
8153
8374
|
hero: (ctx) => header(ctx, "testimonials"),
|
|
@@ -8192,6 +8413,7 @@ var init_convert = __esm({
|
|
|
8192
8413
|
"portfolio.subtitle",
|
|
8193
8414
|
"testimonials.title",
|
|
8194
8415
|
"testimonials.subtitle",
|
|
8416
|
+
"testimonials.viewAll",
|
|
8195
8417
|
"home.greeting",
|
|
8196
8418
|
"navigation.home",
|
|
8197
8419
|
"navigation.about",
|
|
@@ -8213,7 +8435,6 @@ var init_convert = __esm({
|
|
|
8213
8435
|
"portfolio.decisions",
|
|
8214
8436
|
"portfolio.results",
|
|
8215
8437
|
"portfolio.learnings",
|
|
8216
|
-
"portfolio.metrics",
|
|
8217
8438
|
"portfolio.testimonial",
|
|
8218
8439
|
"portfolio.liveDemo",
|
|
8219
8440
|
"portfolio.code"
|
|
@@ -8221,7 +8442,8 @@ var init_convert = __esm({
|
|
|
8221
8442
|
UI_TEXT_MAP = {
|
|
8222
8443
|
"blog.readMore": "common.readMore",
|
|
8223
8444
|
"common.back": "common.back",
|
|
8224
|
-
|
|
8445
|
+
// O botão do envio de depoimento é o da ilha (`testimonialForm.open`).
|
|
8446
|
+
"testimonials.leaveTestimonial": "testimonialForm.open",
|
|
8225
8447
|
"testimonials.empty": "common.empty",
|
|
8226
8448
|
"resume.experience": "resume.experience",
|
|
8227
8449
|
"resume.education": "resume.education",
|
|
@@ -8237,7 +8459,25 @@ var init_convert = __esm({
|
|
|
8237
8459
|
"sidebar.downloadCV": "sidebar.downloadCV",
|
|
8238
8460
|
"portfolio.screenshots": "case.gallery",
|
|
8239
8461
|
"home.cases.read": "case.view",
|
|
8462
|
+
"portfolio.viewCase": "case.view",
|
|
8463
|
+
"portfolio.details": "case.details",
|
|
8464
|
+
"portfolio.all": "cases.all",
|
|
8465
|
+
"portfolio.metrics": "case.metrics",
|
|
8466
|
+
"portfolio.nextCase": "case.next",
|
|
8467
|
+
"portfolio.ctaTitle": "case.ctaTitle",
|
|
8468
|
+
"portfolio.ctaSubtitle": "case.ctaBody",
|
|
8469
|
+
"portfolio.ctaProject": "case.ctaButton",
|
|
8470
|
+
"portfolio.expandImage": "gallery.expand",
|
|
8471
|
+
"portfolio.previousImage": "gallery.prev",
|
|
8472
|
+
"portfolio.nextImage": "gallery.next",
|
|
8240
8473
|
"blog.filterByTags": "blog.filter",
|
|
8474
|
+
"blog.featured": "blog.featured",
|
|
8475
|
+
"blog.readNow": "blog.readNow",
|
|
8476
|
+
"blog.searchPlaceholder": "blog.search",
|
|
8477
|
+
"blog.backToBlog": "blog.back",
|
|
8478
|
+
"blog.authorCta": "blog.authorCta",
|
|
8479
|
+
"blog.authorLine": "blog.authorLine",
|
|
8480
|
+
"blog.relatedCase": "blog.relatedCase",
|
|
8241
8481
|
"sidebar.language": "nav.language",
|
|
8242
8482
|
"sidebar.menu": "nav.menu",
|
|
8243
8483
|
"contactWizard.contact.name": "form.name",
|
|
@@ -8248,6 +8488,8 @@ var init_convert = __esm({
|
|
|
8248
8488
|
"contactWizard.rateLimited": "form.rateLimited",
|
|
8249
8489
|
"contactWizard.back": "form.back",
|
|
8250
8490
|
"notFound.cta": "notFound.home",
|
|
8491
|
+
"notFound.label": "notFound.label",
|
|
8492
|
+
"notFound.errorCode": "notFound.code",
|
|
8251
8493
|
"portfolio.myRole": "case.role",
|
|
8252
8494
|
"home.availability.label": "hero.available"
|
|
8253
8495
|
};
|
|
@@ -8266,11 +8508,58 @@ var init_convert = __esm({
|
|
|
8266
8508
|
"sidebar.downloadCV",
|
|
8267
8509
|
"testimonials.leaveTestimonial",
|
|
8268
8510
|
"portfolio.screenshots",
|
|
8269
|
-
"blog.filterByTags"
|
|
8511
|
+
"blog.filterByTags",
|
|
8512
|
+
"portfolio.metrics",
|
|
8513
|
+
"notFound.cta",
|
|
8514
|
+
"blog.featured",
|
|
8515
|
+
"blog.backToBlog",
|
|
8516
|
+
"blog.authorCta"
|
|
8270
8517
|
];
|
|
8271
8518
|
UI_TEXT_ADAPT = {
|
|
8272
8519
|
"resume.showOlder": (s) => s.includes("{count}") ? s : `${s} ({count})`
|
|
8273
8520
|
};
|
|
8521
|
+
V1_WIZARD_FLOWS = [
|
|
8522
|
+
{
|
|
8523
|
+
id: "project",
|
|
8524
|
+
emoji: "\u{1F4BC}",
|
|
8525
|
+
steps: [
|
|
8526
|
+
{ kind: "choice", key: "projectType", n: 1, options: ["webapp", "mobile", "landing", "system", "consulting", "other"] },
|
|
8527
|
+
{ kind: "choice", key: "timeline", n: 2, options: ["urgent", "short", "medium", "flexible"] },
|
|
8528
|
+
{ kind: "choice", key: "budget", n: 3, options: ["small", "medium", "large", "enterprise", "unknown"] },
|
|
8529
|
+
{ kind: "textarea", key: "description", n: 4, placeholders: ["placeholder"] },
|
|
8530
|
+
{ kind: "contact", askPhone: true, askLinkedin: true }
|
|
8531
|
+
]
|
|
8532
|
+
},
|
|
8533
|
+
{
|
|
8534
|
+
id: "job",
|
|
8535
|
+
emoji: "\u{1F9D1}\u200D\u{1F4BC}",
|
|
8536
|
+
steps: [
|
|
8537
|
+
{ kind: "choice", key: "contractType", n: 1, options: ["clt", "pj", "freelance"] },
|
|
8538
|
+
{ kind: "choice", key: "modality", n: 2, options: ["remote", "hybrid", "onsite"] },
|
|
8539
|
+
{ kind: "choice", key: "area", n: 3, options: ["frontend", "fullstack", "techlead"] },
|
|
8540
|
+
{ kind: "text", key: "jobCompany,jobRole", n: 4, placeholders: ["companyPlaceholder", "rolePlaceholder"] },
|
|
8541
|
+
{ kind: "contact", askLinkedin: true }
|
|
8542
|
+
]
|
|
8543
|
+
},
|
|
8544
|
+
{
|
|
8545
|
+
id: "networking",
|
|
8546
|
+
emoji: "\u{1F91D}",
|
|
8547
|
+
steps: [
|
|
8548
|
+
{ kind: "choice", key: "howFound", n: 1, options: ["blog", "linkedin", "referral", "portfolio"] },
|
|
8549
|
+
{ kind: "textarea", key: "subject", n: 2, placeholders: ["placeholder"] },
|
|
8550
|
+
{ kind: "contact", askLinkedin: true }
|
|
8551
|
+
]
|
|
8552
|
+
},
|
|
8553
|
+
{
|
|
8554
|
+
id: "feedback",
|
|
8555
|
+
emoji: "\u{1F4AC}",
|
|
8556
|
+
steps: [
|
|
8557
|
+
{ kind: "choice", key: "about", n: 1, options: ["post", "project", "general"] },
|
|
8558
|
+
{ kind: "textarea", key: "message", n: 2, placeholders: ["placeholder"] },
|
|
8559
|
+
{ kind: "contact" }
|
|
8560
|
+
]
|
|
8561
|
+
}
|
|
8562
|
+
];
|
|
8274
8563
|
}
|
|
8275
8564
|
});
|
|
8276
8565
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rubrica",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "CLI do Rubrica v2: cria, configura, publica, atualiza e migra sites feitos com @rubrica/core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tsup": "^8.3.0",
|
|
47
47
|
"typescript": "^5.9.0",
|
|
48
48
|
"vitest": "^3.2.4",
|
|
49
|
-
"@rubrica/core": "^2.1.
|
|
49
|
+
"@rubrica/core": "^2.1.2"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup",
|