kasy-cli 1.8.2 → 1.9.0
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/bin/kasy.js
CHANGED
|
@@ -107,14 +107,55 @@ function createLocalizedHelpConfig(t) {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
const visibleCommands = helper.visibleCommands(cmd);
|
|
111
|
+
if (visibleCommands.length > 0) {
|
|
112
|
+
const isRoot = cmd.parent === null || cmd.parent === undefined;
|
|
113
|
+
if (isRoot) {
|
|
114
|
+
// Group root commands by intent for easier scanning by non-devs.
|
|
115
|
+
const groups = [
|
|
116
|
+
{ id: 'start', ids: ['new', 'doctor', 'features'] },
|
|
117
|
+
{ id: 'work', ids: ['add', 'remove', 'update', 'run'] },
|
|
118
|
+
{ id: 'publish', ids: ['deploy', 'check', 'ios', 'codemagic'] },
|
|
119
|
+
{ id: 'maintenance', ids: ['upgrade', 'version', 'uninstall', 'docs', 'notifications'] },
|
|
120
|
+
{ id: 'advanced', ids: ['setup', 'validate'] },
|
|
121
|
+
];
|
|
122
|
+
const knownIds = new Set(groups.flatMap((g) => g.ids));
|
|
123
|
+
const byName = new Map(visibleCommands.map((c) => [c.name(), c]));
|
|
124
|
+
for (const group of groups) {
|
|
125
|
+
const items = group.ids
|
|
126
|
+
.map((id) => byName.get(id))
|
|
127
|
+
.filter(Boolean)
|
|
128
|
+
.map((sub) =>
|
|
129
|
+
formatItem(
|
|
130
|
+
localizeSubcommandTerm(helper.subcommandTerm(sub)),
|
|
131
|
+
helper.subcommandDescription(sub)
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
if (items.length === 0) continue;
|
|
135
|
+
output = output.concat([`${t(`cli.help.group.${group.id}`)}:`, formatList(items), '']);
|
|
136
|
+
}
|
|
137
|
+
const otherItems = visibleCommands
|
|
138
|
+
.filter((c) => !knownIds.has(c.name()))
|
|
139
|
+
.map((sub) =>
|
|
140
|
+
formatItem(
|
|
141
|
+
localizeSubcommandTerm(helper.subcommandTerm(sub)),
|
|
142
|
+
helper.subcommandDescription(sub)
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
if (otherItems.length > 0) {
|
|
146
|
+
output = output.concat([`${t('cli.help.group.other')}:`, formatList(otherItems), '']);
|
|
147
|
+
}
|
|
148
|
+
output = output.concat([helper.wrap(t('cli.help.tip'), helpWidth, 0), '']);
|
|
149
|
+
} else {
|
|
150
|
+
// Subcommand help — keep the flat list (no grouping).
|
|
151
|
+
const commandList = visibleCommands.map((subcommand) =>
|
|
152
|
+
formatItem(
|
|
153
|
+
localizeSubcommandTerm(helper.subcommandTerm(subcommand)),
|
|
154
|
+
helper.subcommandDescription(subcommand)
|
|
155
|
+
)
|
|
156
|
+
);
|
|
157
|
+
output = output.concat([`${t('cli.help.heading.commands')}:`, formatList(commandList), '']);
|
|
158
|
+
}
|
|
118
159
|
}
|
|
119
160
|
|
|
120
161
|
return output.join('\n');
|
package/lib/utils/i18n.js
CHANGED
|
@@ -22,8 +22,15 @@ const MESSAGES = {
|
|
|
22
22
|
'cli.help.heading.options': 'Options',
|
|
23
23
|
'cli.help.heading.globalOptions': 'Global Options',
|
|
24
24
|
'cli.help.heading.commands': 'Commands',
|
|
25
|
-
'cli.
|
|
26
|
-
'cli.
|
|
25
|
+
'cli.help.group.start': '🚀 Get started',
|
|
26
|
+
'cli.help.group.work': '🛠 Work on your app',
|
|
27
|
+
'cli.help.group.publish': '📤 Publish & test',
|
|
28
|
+
'cli.help.group.maintenance': '⚙️ Kasy CLI maintenance',
|
|
29
|
+
'cli.help.group.advanced': '🔧 Advanced',
|
|
30
|
+
'cli.help.group.other': 'Other',
|
|
31
|
+
'cli.help.tip': 'Tip: run `kasy <command> --help` for details. Use --lang pt|en|es to switch language.',
|
|
32
|
+
'cli.command.setup.description': '📱 (advanced) Set up an existing Flutter project',
|
|
33
|
+
'cli.command.new.description': '✨ Create a new app (e.g.: kasy new my-app)',
|
|
27
34
|
'cli.command.new.projectName': 'project name',
|
|
28
35
|
'cli.command.new.projectNameArg': 'Project folder name',
|
|
29
36
|
'prompt.projectName.enter': "What's your project name?",
|
|
@@ -36,13 +43,13 @@ const MESSAGES = {
|
|
|
36
43
|
'cli.command.setup.backendOption': 'Backend adapter (firebase, supabase, api)',
|
|
37
44
|
'cli.command.setup.featuresOption': 'Comma separated optional features (web,widget,llm_chat,revenuecat,ci)',
|
|
38
45
|
'cli.command.help.paramName': 'command',
|
|
39
|
-
'cli.command.doctor.description': '🩺 Check
|
|
40
|
-
'cli.command.modules.description': '🧩
|
|
41
|
-
'cli.command.validate.description': '✅ Validate
|
|
46
|
+
'cli.command.doctor.description': '🩺 Check if your computer is ready to run Kasy',
|
|
47
|
+
'cli.command.modules.description': '🧩 Show what comes included and what you can add',
|
|
48
|
+
'cli.command.validate.description': '✅ (advanced) Validate backend + feature combinations',
|
|
42
49
|
'cli.command.validate.analyzeOnlyOption': 'Run flutter analyze only (skip builds)',
|
|
43
|
-
'cli.command.version.description': '🏷️
|
|
44
|
-
'cli.command.upgrade.description': '⬆️
|
|
45
|
-
'cli.command.uninstall.description': '🗑️
|
|
50
|
+
'cli.command.version.description': '🏷️ Show the installed Kasy version',
|
|
51
|
+
'cli.command.upgrade.description': '⬆️ Update the Kasy CLI to the latest version',
|
|
52
|
+
'cli.command.uninstall.description': '🗑️ Uninstall Kasy from this computer',
|
|
46
53
|
'cli.command.upgrade.running': 'Updating kasy CLI...',
|
|
47
54
|
'cli.command.upgrade.done': 'kasy updated successfully!',
|
|
48
55
|
'cli.command.uninstall.running': 'Uninstalling kasy CLI...',
|
|
@@ -264,20 +271,20 @@ const MESSAGES = {
|
|
|
264
271
|
|
|
265
272
|
'new.firebase.success.deployStep': '• Deploy backend (from inside the project folder):',
|
|
266
273
|
|
|
267
|
-
'cli.command.deploy.description': '
|
|
268
|
-
'cli.command.check.description': '🔔 Check push notifications setup (use --fix to
|
|
274
|
+
'cli.command.deploy.description': '📤 Publish the server to Firebase or Supabase',
|
|
275
|
+
'cli.command.check.description': '🔔 Check push notifications setup (use --fix to fix it)',
|
|
269
276
|
'deploy.q.project': 'Firebase Project ID:',
|
|
270
277
|
'deploy.q.serviceAccount': 'Path to service account JSON:',
|
|
271
278
|
'deploy.detected.project': '✓ Firebase project detected:',
|
|
272
279
|
'deploy.detected.serviceAccount': '✓ Service account detected:',
|
|
273
280
|
'deploy.error.notProject': 'No firebase.json found in this directory. Run kasy deploy from inside the project folder.',
|
|
274
281
|
|
|
275
|
-
'cli.command.ios.description': '
|
|
282
|
+
'cli.command.ios.description': '🍎 Publish the app to the App Store (Mac needed)',
|
|
276
283
|
'cli.command.ios.configure.description': 'Configure Apple API credentials for local IPA upload',
|
|
277
284
|
'cli.command.ios.release.description': 'Bump build, create IPA, and upload to App Store Connect',
|
|
278
285
|
'cli.command.ios.build.description': 'Build IPA only (no upload)',
|
|
279
286
|
'cli.command.ios.clean.description': 'Clean Flutter/Xcode caches before a failed iOS build',
|
|
280
|
-
'cli.command.codemagic.description': '
|
|
287
|
+
'cli.command.codemagic.description': '☁️ Build the app in the cloud (no Mac needed)',
|
|
281
288
|
'cli.command.codemagic.configure.description': 'Configure Codemagic API credentials',
|
|
282
289
|
'cli.command.codemagic.release.description': 'Start a Codemagic iOS workflow build',
|
|
283
290
|
'cli.command.codemagic.status.description': 'Show Codemagic build status by ID',
|
|
@@ -594,7 +601,7 @@ const MESSAGES = {
|
|
|
594
601
|
'new.internet.warning': '📶 Make sure you have a stable internet connection — this step requires network access.',
|
|
595
602
|
|
|
596
603
|
// run command
|
|
597
|
-
'cli.command.run.description': '▶ Run
|
|
604
|
+
'cli.command.run.description': '▶ Run your app on phone, simulator, or browser',
|
|
598
605
|
'run.launching': 'Launching Flutter app...',
|
|
599
606
|
'run.updateHint.prefix': 'Project improvements available —',
|
|
600
607
|
'run.updateHint.suffix': 'to see what\'s new',
|
|
@@ -612,13 +619,13 @@ const MESSAGES = {
|
|
|
612
619
|
'doctor.project.noModules': 'No optional features active',
|
|
613
620
|
|
|
614
621
|
// add command
|
|
615
|
-
'cli.command.add.description': '➕ Add a feature to
|
|
622
|
+
'cli.command.add.description': '➕ Add a new feature to your app (e.g.: kasy add ai_chat)',
|
|
616
623
|
|
|
617
624
|
// docs command
|
|
618
|
-
'cli.command.docs.description': '📖
|
|
625
|
+
'cli.command.docs.description': '📖 Open the full documentation',
|
|
619
626
|
|
|
620
627
|
// notifications command
|
|
621
|
-
'cli.command.notifications.description': '🔔
|
|
628
|
+
'cli.command.notifications.description': '🔔 Edit the text of local notifications and reminders',
|
|
622
629
|
'cli.command.notifications.text.description': 'Set titles and bodies shown in local notifications',
|
|
623
630
|
'notifications.error.notKasyProject': 'No kit_setup.json found. Run this command from inside a Kasy project.',
|
|
624
631
|
'notifications.error.noI18n': 'lib/i18n/*.i18n.json not found in this project.',
|
|
@@ -682,7 +689,7 @@ const MESSAGES = {
|
|
|
682
689
|
'add.llm_chat.nextSteps.supabase': '\n Next steps:\n 1. The LLM_CHAT_ENDPOINT in .vscode/launch.json has been pre-filled.\n 2. Run the app: kasy run\n',
|
|
683
690
|
'add.llm_chat.nextSteps.supabase.deployFailed': '\n Next steps:\n 1. Deploy manually: supabase functions deploy llm-chat --no-verify-jwt\n 2. The LLM_CHAT_ENDPOINT in .vscode/launch.json has been pre-filled.\n 3. Run the app: kasy run\n',
|
|
684
691
|
'add.llm_chat.nextSteps.api': '\n Next steps:\n 1. Create an endpoint on your server that accepts {message, history} and calls your LLM.\n 2. Update LLM_CHAT_ENDPOINT in .vscode/launch.json with your endpoint URL.\n 3. Run the app: kasy run\n',
|
|
685
|
-
'cli.command.remove.description': '🗑️
|
|
692
|
+
'cli.command.remove.description': '🗑️ Remove a feature you no longer use (e.g.: kasy remove sentry)',
|
|
686
693
|
'remove.error.noModule': 'Provide a feature name. Usage: kasy remove <feature>',
|
|
687
694
|
'remove.error.notKasyProject': 'No kit_setup.json found. Run this command from inside a Kasy project.',
|
|
688
695
|
'remove.error.unknownModule': 'Unknown feature: {module}\nAvailable: {list}',
|
|
@@ -699,7 +706,7 @@ const MESSAGES = {
|
|
|
699
706
|
'remove.success': 'Feature "{module}" removed successfully.',
|
|
700
707
|
'remove.warn.ci': 'CI files removed. If you had custom workflow files, restore them from git.',
|
|
701
708
|
'remove.warn.sentry.shared': 'sentry_flutter kept — still required by active features (revenuecat/facebook).',
|
|
702
|
-
'cli.command.update.description': '⬆️
|
|
709
|
+
'cli.command.update.description': '⬆️ Update parts of your app to the latest (e.g.: kasy update components)',
|
|
703
710
|
'cli.command.update.targetArg': 'Target to update (e.g. revenuecat, sentry, components)',
|
|
704
711
|
'update.error.noProject': 'No kit_setup.json found. Run this command from inside a Kasy project.',
|
|
705
712
|
'update.error.unknownModule': 'Unknown feature: {module}\nAvailable: {list}',
|
|
@@ -742,40 +749,47 @@ const MESSAGES = {
|
|
|
742
749
|
'cli.tagline': 'Crie apps móveis sem dor de configuração',
|
|
743
750
|
'cli.description': 'Crie apps Flutter sem dor de configuração.',
|
|
744
751
|
'cli.usage': '<comando> [argumentos]',
|
|
745
|
-
'cli.option.version': 'Mostrar
|
|
752
|
+
'cli.option.version': 'Mostrar versão instalada',
|
|
746
753
|
'cli.option.lang': 'Idioma (en, pt, es)',
|
|
747
754
|
'cli.help.afterError': '(execute com --help para detalhes de uso)',
|
|
748
|
-
'cli.help.more': 'Execute "{command}" para detalhes de um comando
|
|
755
|
+
'cli.help.more': 'Execute "{command}" para detalhes de um comando específico.',
|
|
749
756
|
'cli.help.quickStart': 'Criar um novo app:',
|
|
750
757
|
'cli.help.optionDescription': 'Mostrar ajuda do comando',
|
|
751
758
|
'cli.help.commandDescription': 'Mostrar ajuda do comando',
|
|
752
|
-
'cli.help.inline.options': '[
|
|
759
|
+
'cli.help.inline.options': '[opções]',
|
|
753
760
|
'cli.help.heading.usage': 'Uso',
|
|
754
761
|
'cli.help.heading.arguments': 'Argumentos',
|
|
755
|
-
'cli.help.heading.options': '
|
|
756
|
-
'cli.help.heading.globalOptions': '
|
|
762
|
+
'cli.help.heading.options': 'Opções',
|
|
763
|
+
'cli.help.heading.globalOptions': 'Opções globais',
|
|
757
764
|
'cli.help.heading.commands': 'Comandos',
|
|
758
|
-
'cli.
|
|
759
|
-
'cli.
|
|
765
|
+
'cli.help.group.start': '🚀 Para começar',
|
|
766
|
+
'cli.help.group.work': '🛠 Trabalhar no app',
|
|
767
|
+
'cli.help.group.publish': '📤 Publicar e testar',
|
|
768
|
+
'cli.help.group.maintenance': '⚙️ Manutenção da Kasy CLI',
|
|
769
|
+
'cli.help.group.advanced': '🔧 Avançado',
|
|
770
|
+
'cli.help.group.other': 'Outros',
|
|
771
|
+
'cli.help.tip': 'Dica: rode `kasy <comando> --help` para detalhes. Use --lang pt|en|es para mudar o idioma.',
|
|
772
|
+
'cli.command.setup.description': '📱 (avançado) Configura um projeto Flutter existente',
|
|
773
|
+
'cli.command.new.description': '✨ Cria um app novo (ex: kasy new meu-app)',
|
|
760
774
|
'cli.command.new.projectName': 'nome do projeto',
|
|
761
775
|
'cli.command.new.projectNameArg': 'Nome da pasta do projeto',
|
|
762
776
|
'prompt.projectName.enter': 'Qual o nome do seu projeto?',
|
|
763
777
|
'prompt.projectName.required': 'O nome do projeto é obrigatório.',
|
|
764
778
|
'prompt.projectName.default': 'meu_app',
|
|
765
|
-
'cli.command.setup.directoryName': '
|
|
779
|
+
'cli.command.setup.directoryName': 'diretório',
|
|
766
780
|
'cli.command.setup.directoryArg': 'Diretório de destino (padrão: pasta atual .)',
|
|
767
781
|
'cli.command.setup.langName': 'idioma',
|
|
768
782
|
'cli.command.setup.langOption': 'Idioma dos prompts (en, pt, es)',
|
|
769
783
|
'cli.command.setup.backendOption': 'Adapter de backend (firebase, supabase, api)',
|
|
770
784
|
'cli.command.setup.featuresOption': 'Features opcionais separadas por virgula (web,widget,llm_chat,revenuecat,ci)',
|
|
771
785
|
'cli.command.help.paramName': 'comando',
|
|
772
|
-
'cli.command.doctor.description': '🩺 Verifica
|
|
773
|
-
'cli.command.modules.description': '🧩
|
|
774
|
-
'cli.command.validate.description': '✅ Valida
|
|
786
|
+
'cli.command.doctor.description': '🩺 Verifica se o seu computador está pronto para rodar a Kasy',
|
|
787
|
+
'cli.command.modules.description': '🧩 Mostra o que já vem incluso e o que você pode adicionar',
|
|
788
|
+
'cli.command.validate.description': '✅ (avançado) Valida combinações de backend e features',
|
|
775
789
|
'cli.command.validate.analyzeOnlyOption': 'Executa apenas flutter analyze (sem build)',
|
|
776
|
-
'cli.command.version.description': '🏷️ Mostra a
|
|
777
|
-
'cli.command.upgrade.description': '⬆️
|
|
778
|
-
'cli.command.uninstall.description': '🗑️
|
|
790
|
+
'cli.command.version.description': '🏷️ Mostra a versão instalada da Kasy',
|
|
791
|
+
'cli.command.upgrade.description': '⬆️ Atualiza a Kasy CLI para a versão mais recente',
|
|
792
|
+
'cli.command.uninstall.description': '🗑️ Desinstala a Kasy deste computador',
|
|
779
793
|
'cli.command.upgrade.running': 'Atualizando a CLI kasy...',
|
|
780
794
|
'cli.command.upgrade.done': 'kasy atualizado com sucesso!',
|
|
781
795
|
'cli.command.uninstall.running': 'Desinstalando a CLI kasy...',
|
|
@@ -997,20 +1011,20 @@ const MESSAGES = {
|
|
|
997
1011
|
|
|
998
1012
|
'new.firebase.success.deployStep': '• Deploy do backend (de dentro da pasta do projeto):',
|
|
999
1013
|
|
|
1000
|
-
'cli.command.deploy.description': '
|
|
1001
|
-
'cli.command.check.description': '🔔
|
|
1014
|
+
'cli.command.deploy.description': '📤 Publica o servidor no Firebase ou Supabase',
|
|
1015
|
+
'cli.command.check.description': '🔔 Confere se as notificações push estão configuradas (use --fix para corrigir)',
|
|
1002
1016
|
'deploy.q.project': 'Firebase Project ID:',
|
|
1003
1017
|
'deploy.q.serviceAccount': 'Caminho para o service account JSON:',
|
|
1004
1018
|
'deploy.detected.project': '✓ Projeto Firebase detectado:',
|
|
1005
1019
|
'deploy.detected.serviceAccount': '✓ Service account detectado:',
|
|
1006
1020
|
'deploy.error.notProject': 'Nenhum firebase.json encontrado. Execute kasy deploy de dentro da pasta do projeto.',
|
|
1007
1021
|
|
|
1008
|
-
'cli.command.ios.description': '
|
|
1022
|
+
'cli.command.ios.description': '🍎 Publica o app na App Store (precisa de Mac)',
|
|
1009
1023
|
'cli.command.ios.configure.description': 'Configurar credenciais Apple para envio local do IPA',
|
|
1010
1024
|
'cli.command.ios.release.description': 'Incrementa build, gera IPA e envia para App Store Connect',
|
|
1011
1025
|
'cli.command.ios.build.description': 'Só gera o IPA (sem enviar)',
|
|
1012
1026
|
'cli.command.ios.clean.description': 'Limpa caches Flutter/Xcode após falha no build iOS',
|
|
1013
|
-
'cli.command.codemagic.description': '
|
|
1027
|
+
'cli.command.codemagic.description': '☁️ Compila o app na nuvem (sem precisar de Mac)',
|
|
1014
1028
|
'cli.command.codemagic.configure.description': 'Configurar credenciais da API Codemagic',
|
|
1015
1029
|
'cli.command.codemagic.release.description': 'Iniciar build do workflow iOS no Codemagic',
|
|
1016
1030
|
'cli.command.codemagic.status.description': 'Status do build Codemagic por ID',
|
|
@@ -1327,7 +1341,7 @@ const MESSAGES = {
|
|
|
1327
1341
|
'new.internet.warning': '📶 Verifique se voce esta com uma internet estavel — esta etapa precisa de conexao.',
|
|
1328
1342
|
|
|
1329
1343
|
// run command
|
|
1330
|
-
'cli.command.run.description': '▶
|
|
1344
|
+
'cli.command.run.description': '▶ Roda o app no celular, simulador ou navegador',
|
|
1331
1345
|
'run.launching': 'Iniciando app Flutter...',
|
|
1332
1346
|
'run.updateHint.prefix': 'Melhorias disponíveis para o projeto —',
|
|
1333
1347
|
'run.updateHint.suffix': 'para ver o que há de novo',
|
|
@@ -1345,13 +1359,13 @@ const MESSAGES = {
|
|
|
1345
1359
|
'doctor.project.noModules': 'Nenhuma feature opcional ativa',
|
|
1346
1360
|
|
|
1347
1361
|
// add command
|
|
1348
|
-
'cli.command.add.description': '➕ Adiciona
|
|
1362
|
+
'cli.command.add.description': '➕ Adiciona algo novo ao app (ex: kasy add ai_chat)',
|
|
1349
1363
|
|
|
1350
1364
|
// docs command
|
|
1351
|
-
'cli.command.docs.description': '📖
|
|
1365
|
+
'cli.command.docs.description': '📖 Abre a documentação completa',
|
|
1352
1366
|
|
|
1353
1367
|
// notifications command
|
|
1354
|
-
'cli.command.notifications.description': '🔔
|
|
1368
|
+
'cli.command.notifications.description': '🔔 Edita os textos das notificações locais e lembretes',
|
|
1355
1369
|
'cli.command.notifications.text.description': 'Define titulos e mensagens das notificacoes locais',
|
|
1356
1370
|
'notifications.error.notKasyProject': 'kit_setup.json nao encontrado. Execute dentro de um projeto Kasy.',
|
|
1357
1371
|
'notifications.error.noI18n': 'lib/i18n/*.i18n.json nao encontrado neste projeto.',
|
|
@@ -1415,7 +1429,7 @@ const MESSAGES = {
|
|
|
1415
1429
|
'add.llm_chat.nextSteps.supabase': '\n Proximos passos:\n 1. O LLM_CHAT_ENDPOINT no .vscode/launch.json ja foi preenchido.\n 2. Rode o app: kasy run\n',
|
|
1416
1430
|
'add.llm_chat.nextSteps.supabase.deployFailed': '\n Proximos passos:\n 1. Deploy manual: supabase functions deploy llm-chat --no-verify-jwt\n 2. O LLM_CHAT_ENDPOINT no .vscode/launch.json ja foi preenchido.\n 3. Rode o app: kasy run\n',
|
|
1417
1431
|
'add.llm_chat.nextSteps.api': '\n Proximos passos:\n 1. Crie um endpoint no seu servidor que aceite {message, history} e chame sua LLM.\n 2. Atualize LLM_CHAT_ENDPOINT no .vscode/launch.json com a URL do seu endpoint.\n 3. Rode o app: kasy run\n',
|
|
1418
|
-
'cli.command.remove.description': '🗑️
|
|
1432
|
+
'cli.command.remove.description': '🗑️ Remove algo que você não usa mais (ex: kasy remove sentry)',
|
|
1419
1433
|
'remove.error.noModule': 'Informe o nome da feature. Uso: kasy remove <feature>',
|
|
1420
1434
|
'remove.error.notKasyProject': 'kit_setup.json nao encontrado. Execute este comando dentro de um projeto Kasy.',
|
|
1421
1435
|
'remove.error.unknownModule': 'Feature desconhecida: {module}\nDisponiveis: {list}',
|
|
@@ -1432,7 +1446,7 @@ const MESSAGES = {
|
|
|
1432
1446
|
'remove.success': 'Feature "{module}" removida com sucesso.',
|
|
1433
1447
|
'remove.warn.ci': 'Arquivos de CI removidos. Se tinha workflows customizados, restaure-os pelo git.',
|
|
1434
1448
|
'remove.warn.sentry.shared': 'sentry_flutter mantido — ainda necessario para features ativas (revenuecat/facebook).',
|
|
1435
|
-
'cli.command.update.description': '⬆️
|
|
1449
|
+
'cli.command.update.description': '⬆️ Atualiza partes do app para a última versão (ex: kasy update components)',
|
|
1436
1450
|
'cli.command.update.targetArg': 'Alvo para atualizar (ex.: revenuecat, sentry, components)',
|
|
1437
1451
|
'update.error.noProject': 'kit_setup.json nao encontrado. Execute dentro de um projeto Kasy.',
|
|
1438
1452
|
'update.error.unknownModule': 'Modulo desconhecido: {module}\nDisponiveis: {list}',
|
|
@@ -1475,10 +1489,10 @@ const MESSAGES = {
|
|
|
1475
1489
|
'cli.tagline': 'Crea apps móviles sin dolor de configuración',
|
|
1476
1490
|
'cli.description': 'Crea apps Flutter sin dolor de configuración.',
|
|
1477
1491
|
'cli.usage': '<comando> [argumentos]',
|
|
1478
|
-
'cli.option.version': 'Mostrar
|
|
1492
|
+
'cli.option.version': 'Mostrar versión instalada',
|
|
1479
1493
|
'cli.option.lang': 'Idioma (en, pt, es)',
|
|
1480
1494
|
'cli.help.afterError': '(ejecuta con --help para detalles de uso)',
|
|
1481
|
-
'cli.help.more': 'Ejecuta "{command}" para detalles de un comando
|
|
1495
|
+
'cli.help.more': 'Ejecuta "{command}" para detalles de un comando específico.',
|
|
1482
1496
|
'cli.help.quickStart': 'Crear un nuevo app:',
|
|
1483
1497
|
'cli.help.optionDescription': 'Mostrar ayuda del comando',
|
|
1484
1498
|
'cli.help.commandDescription': 'Mostrar ayuda del comando',
|
|
@@ -1486,10 +1500,17 @@ const MESSAGES = {
|
|
|
1486
1500
|
'cli.help.heading.usage': 'Uso',
|
|
1487
1501
|
'cli.help.heading.arguments': 'Argumentos',
|
|
1488
1502
|
'cli.help.heading.options': 'Opciones',
|
|
1489
|
-
'cli.help.heading.globalOptions': 'Opciones
|
|
1503
|
+
'cli.help.heading.globalOptions': 'Opciones globales',
|
|
1490
1504
|
'cli.help.heading.commands': 'Comandos',
|
|
1491
|
-
'cli.
|
|
1492
|
-
'cli.
|
|
1505
|
+
'cli.help.group.start': '🚀 Para empezar',
|
|
1506
|
+
'cli.help.group.work': '🛠 Trabajar en tu app',
|
|
1507
|
+
'cli.help.group.publish': '📤 Publicar y probar',
|
|
1508
|
+
'cli.help.group.maintenance': '⚙️ Mantenimiento de Kasy CLI',
|
|
1509
|
+
'cli.help.group.advanced': '🔧 Avanzado',
|
|
1510
|
+
'cli.help.group.other': 'Otros',
|
|
1511
|
+
'cli.help.tip': 'Tip: ejecuta `kasy <comando> --help` para más detalles. Usa --lang pt|en|es para cambiar idioma.',
|
|
1512
|
+
'cli.command.setup.description': '📱 (avanzado) Configura un proyecto Flutter existente',
|
|
1513
|
+
'cli.command.new.description': '✨ Crea una app nueva (ej: kasy new mi-app)',
|
|
1493
1514
|
'cli.command.new.projectName': 'nombre del proyecto',
|
|
1494
1515
|
'cli.command.new.projectNameArg': 'Nombre de la carpeta del proyecto',
|
|
1495
1516
|
'prompt.projectName.enter': '¿Cuál es el nombre de tu proyecto?',
|
|
@@ -1502,13 +1523,13 @@ const MESSAGES = {
|
|
|
1502
1523
|
'cli.command.setup.backendOption': 'Adapter de backend (firebase, supabase, api)',
|
|
1503
1524
|
'cli.command.setup.featuresOption': 'Features opcionales separadas por coma (web,widget,llm_chat,revenuecat,ci)',
|
|
1504
1525
|
'cli.command.help.paramName': 'comando',
|
|
1505
|
-
'cli.command.doctor.description': '🩺 Verifica
|
|
1506
|
-
'cli.command.modules.description': '🧩
|
|
1507
|
-
'cli.command.validate.description': '✅ Valida combinaciones
|
|
1526
|
+
'cli.command.doctor.description': '🩺 Verifica si tu computadora está lista para correr Kasy',
|
|
1527
|
+
'cli.command.modules.description': '🧩 Muestra lo que viene incluido y lo que puedes añadir',
|
|
1528
|
+
'cli.command.validate.description': '✅ (avanzado) Valida combinaciones de backend y features',
|
|
1508
1529
|
'cli.command.validate.analyzeOnlyOption': 'Ejecuta solo flutter analyze (sin build)',
|
|
1509
|
-
'cli.command.version.description': '🏷️ Muestra la
|
|
1510
|
-
'cli.command.upgrade.description': '⬆️
|
|
1511
|
-
'cli.command.uninstall.description': '🗑️
|
|
1530
|
+
'cli.command.version.description': '🏷️ Muestra la versión instalada de Kasy',
|
|
1531
|
+
'cli.command.upgrade.description': '⬆️ Actualiza la Kasy CLI a la última versión',
|
|
1532
|
+
'cli.command.uninstall.description': '🗑️ Desinstala Kasy de esta computadora',
|
|
1512
1533
|
'cli.command.upgrade.running': 'Actualizando la CLI kasy...',
|
|
1513
1534
|
'cli.command.upgrade.done': 'kasy actualizado correctamente!',
|
|
1514
1535
|
'cli.command.uninstall.running': 'Desinstalando la CLI kasy...',
|
|
@@ -1732,20 +1753,20 @@ const MESSAGES = {
|
|
|
1732
1753
|
|
|
1733
1754
|
'new.firebase.success.deployStep': '• Desplegar backend (desde dentro de la carpeta del proyecto):',
|
|
1734
1755
|
|
|
1735
|
-
'cli.command.deploy.description': '
|
|
1736
|
-
'cli.command.check.description': '🔔 Verifica
|
|
1756
|
+
'cli.command.deploy.description': '📤 Publica el servidor en Firebase o Supabase',
|
|
1757
|
+
'cli.command.check.description': '🔔 Verifica si las notificaciones push están configuradas (usa --fix para arreglar)',
|
|
1737
1758
|
'deploy.q.project': 'Firebase Project ID:',
|
|
1738
1759
|
'deploy.q.serviceAccount': 'Ruta al service account JSON:',
|
|
1739
1760
|
'deploy.detected.project': '✓ Proyecto Firebase detectado:',
|
|
1740
1761
|
'deploy.detected.serviceAccount': '✓ Service account detectado:',
|
|
1741
1762
|
'deploy.error.notProject': 'No se encontro firebase.json. Ejecute kasy deploy desde dentro de la carpeta del proyecto.',
|
|
1742
1763
|
|
|
1743
|
-
'cli.command.ios.description': '
|
|
1764
|
+
'cli.command.ios.description': '🍎 Publica la app en la App Store (necesita Mac)',
|
|
1744
1765
|
'cli.command.ios.configure.description': 'Configurar credenciales Apple para subida local del IPA',
|
|
1745
1766
|
'cli.command.ios.release.description': 'Incrementa build, genera IPA y sube a App Store Connect',
|
|
1746
1767
|
'cli.command.ios.build.description': 'Solo genera el IPA (sin subir)',
|
|
1747
1768
|
'cli.command.ios.clean.description': 'Limpia cachés Flutter/Xcode tras fallo en build iOS',
|
|
1748
|
-
'cli.command.codemagic.description': '
|
|
1769
|
+
'cli.command.codemagic.description': '☁️ Compila la app en la nube (sin necesitar Mac)',
|
|
1749
1770
|
'cli.command.codemagic.configure.description': 'Configurar credenciales API de Codemagic',
|
|
1750
1771
|
'cli.command.codemagic.release.description': 'Iniciar build del workflow iOS en Codemagic',
|
|
1751
1772
|
'cli.command.codemagic.status.description': 'Estado del build Codemagic por ID',
|
|
@@ -2060,7 +2081,7 @@ const MESSAGES = {
|
|
|
2060
2081
|
'new.internet.warning': '📶 Asegurate de tener una conexion a internet estable — este paso requiere red.',
|
|
2061
2082
|
|
|
2062
2083
|
// run command
|
|
2063
|
-
'cli.command.run.description': '▶
|
|
2084
|
+
'cli.command.run.description': '▶ Corre la app en celular, simulador o navegador',
|
|
2064
2085
|
'run.launching': 'Iniciando app Flutter...',
|
|
2065
2086
|
'run.updateHint.prefix': 'Mejoras disponibles para el proyecto —',
|
|
2066
2087
|
'run.updateHint.suffix': 'para ver las novedades',
|
|
@@ -2078,13 +2099,13 @@ const MESSAGES = {
|
|
|
2078
2099
|
'doctor.project.noModules': 'Ninguna feature opcional activa',
|
|
2079
2100
|
|
|
2080
2101
|
// add command
|
|
2081
|
-
'cli.command.add.description': '➕
|
|
2102
|
+
'cli.command.add.description': '➕ Añade algo nuevo a tu app (ej: kasy add ai_chat)',
|
|
2082
2103
|
|
|
2083
2104
|
// docs command
|
|
2084
|
-
'cli.command.docs.description': '📖
|
|
2105
|
+
'cli.command.docs.description': '📖 Abre la documentación completa',
|
|
2085
2106
|
|
|
2086
2107
|
// notifications command
|
|
2087
|
-
'cli.command.notifications.description': '🔔
|
|
2108
|
+
'cli.command.notifications.description': '🔔 Edita los textos de las notificaciones locales y recordatorios',
|
|
2088
2109
|
'cli.command.notifications.text.description': 'Define titulos y mensajes de notificaciones locales',
|
|
2089
2110
|
'notifications.error.notKasyProject': 'No se encontro kit_setup.json. Ejecuta dentro de un proyecto Kasy.',
|
|
2090
2111
|
'notifications.error.noI18n': 'lib/i18n/*.i18n.json no encontrado en este proyecto.',
|
|
@@ -2148,7 +2169,7 @@ const MESSAGES = {
|
|
|
2148
2169
|
'add.llm_chat.nextSteps.supabase': '\n Proximos pasos:\n 1. El LLM_CHAT_ENDPOINT en .vscode/launch.json ya fue pre-llenado.\n 2. Corre el app: kasy run\n',
|
|
2149
2170
|
'add.llm_chat.nextSteps.supabase.deployFailed': '\n Proximos pasos:\n 1. Deploy manual: supabase functions deploy llm-chat --no-verify-jwt\n 2. El LLM_CHAT_ENDPOINT en .vscode/launch.json ya fue pre-llenado.\n 3. Corre el app: kasy run\n',
|
|
2150
2171
|
'add.llm_chat.nextSteps.api': '\n Proximos pasos:\n 1. Crea un endpoint en tu servidor que acepte {message, history} y llame tu LLM.\n 2. Actualiza LLM_CHAT_ENDPOINT en .vscode/launch.json con la URL de tu endpoint.\n 3. Corre el app: kasy run\n',
|
|
2151
|
-
'cli.command.remove.description': '🗑️
|
|
2172
|
+
'cli.command.remove.description': '🗑️ Elimina algo que ya no usas (ej: kasy remove sentry)',
|
|
2152
2173
|
'remove.error.noModule': 'Ingresa el nombre de la feature. Uso: kasy remove <feature>',
|
|
2153
2174
|
'remove.error.notKasyProject': 'kit_setup.json no encontrado. Ejecuta este comando dentro de un proyecto Kasy.',
|
|
2154
2175
|
'remove.error.unknownModule': 'Modulo desconocido: {module}\nDisponibles: {list}',
|
|
@@ -2165,7 +2186,7 @@ const MESSAGES = {
|
|
|
2165
2186
|
'remove.success': 'Feature "{module}" eliminada exitosamente.',
|
|
2166
2187
|
'remove.warn.ci': 'Archivos de CI eliminados. Si tenias workflows personalizados, restauralos desde git.',
|
|
2167
2188
|
'remove.warn.sentry.shared': 'sentry_flutter conservado — todavia requerido por features activas (revenuecat/facebook).',
|
|
2168
|
-
'cli.command.update.description': '⬆️
|
|
2189
|
+
'cli.command.update.description': '⬆️ Actualiza partes de tu app a la última versión (ej: kasy update components)',
|
|
2169
2190
|
'cli.command.update.targetArg': 'Objetivo a actualizar (ej.: revenuecat, sentry, components)',
|
|
2170
2191
|
'update.error.noProject': 'kit_setup.json no encontrado. Ejecuta dentro de un proyecto Kasy.',
|
|
2171
2192
|
'update.error.unknownModule': 'Modulo desconocido: {module}\nDisponibles: {list}',
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
|
|
2
2
|
import 'package:flutter/material.dart';
|
|
3
3
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
4
4
|
import 'package:kasy_kit/core/config/features.dart';
|
|
5
|
+
import 'package:kasy_kit/core/data/models/user.dart';
|
|
5
6
|
import 'package:kasy_kit/core/guards/guard.dart';
|
|
6
7
|
import 'package:kasy_kit/core/states/user_state_notifier.dart';
|
|
7
8
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
@@ -44,9 +45,14 @@ class UserInfosGuard extends ConsumerWidget {
|
|
|
44
45
|
// Native: all users (including guests with no ID) go through onboarding.
|
|
45
46
|
// Guests are never forced to /signin here; individual features that
|
|
46
47
|
// require authentication redirect to /signin on their own.
|
|
48
|
+
// Authenticated users skip onboarding: they already committed to an account
|
|
49
|
+
// (e.g. returning user signing back in after the anonymous session was
|
|
50
|
+
// discarded by `credential-already-in-use`).
|
|
47
51
|
return Guard(
|
|
48
52
|
canActivate: Future.value(
|
|
49
|
-
!withOnboarding ||
|
|
53
|
+
!withOnboarding ||
|
|
54
|
+
authState.user.isOnboarded ||
|
|
55
|
+
authState.user is AuthenticatedUserData,
|
|
50
56
|
),
|
|
51
57
|
fallbackRoute: fallbackRoute,
|
|
52
58
|
child: child,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
2
2
|
import 'package:cloud_functions/cloud_functions.dart';
|
|
3
3
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
|
4
|
+
import 'package:flutter/services.dart';
|
|
4
5
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
5
6
|
import 'package:kasy_kit/core/data/api/base_api_exceptions.dart';
|
|
6
7
|
import 'package:kasy_kit/features/notifications/api/entities/notifications_entity.dart';
|
|
@@ -224,6 +225,12 @@ class FirebaseNotificationsApi implements NotificationsApi {
|
|
|
224
225
|
try {
|
|
225
226
|
final agg = await query.count().get();
|
|
226
227
|
yield agg.count ?? 0;
|
|
228
|
+
} on FirebaseException catch (e) {
|
|
229
|
+
if (e.code == 'permission-denied') return;
|
|
230
|
+
_logger.e('unreadNotifications error: $e');
|
|
231
|
+
} on PlatformException catch (e) {
|
|
232
|
+
if (e.code == 'permission-denied') return;
|
|
233
|
+
_logger.e('unreadNotifications error: $e');
|
|
227
234
|
} catch (e, s) {
|
|
228
235
|
_logger.e('unreadNotifications error: $e: $s');
|
|
229
236
|
}
|