smoonb 0.0.82 → 0.0.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smoonb",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "Complete Supabase backup and migration tool - EXPERIMENTAL VERSION - USE AT YOUR OWN RISK",
5
5
  "preferGlobal": false,
6
6
  "preventGlobalInstall": true,
@@ -266,7 +266,7 @@
266
266
  "env.language.english": "English",
267
267
  "env.language.portuguese": "Portuguese (pt-BR)",
268
268
  "env.language.saved": "Default language saved: {lang}",
269
- "env.language.applied": "Language applied! The next messages will be displayed in the selected language.",
269
+ "env.language.note": "Note: The language change will be effective in the next commands. The current process will continue in the initial language.",
270
270
 
271
271
  "backup.components.edgeFunctions.title": "Edge Functions:",
272
272
  "backup.components.edgeFunctions.description1": "We will delete existing functions in the supabase/functions folder, reset the link",
@@ -266,7 +266,7 @@
266
266
  "env.language.english": "Inglês (English)",
267
267
  "env.language.portuguese": "Português (pt-BR)",
268
268
  "env.language.saved": "Idioma padrão salvo: {lang}",
269
- "env.language.applied": "Idioma aplicado! As próximas mensagens serão exibidas no idioma selecionado.",
269
+ "env.language.note": "Nota: A mudança de idioma será efetiva nos próximos comandos. O processo atual continuará no idioma inicial.",
270
270
 
271
271
  "backup.components.edgeFunctions.title": "Edge Functions:",
272
272
  "backup.components.edgeFunctions.description1": "Vamos apagar as funções existentes na pasta supabase/functions, fazer um reset no link",
@@ -84,12 +84,7 @@ async function mapEnvVariablesInteractively(env, expectedKeys) {
84
84
  };
85
85
  }
86
86
 
87
- // Função getT que sempre acessa global.smoonbI18n dinamicamente
88
- // Isso permite que a mudança de idioma seja aplicada em tempo real
89
- const getT = (id, vars) => {
90
- const currentT = global.smoonbI18n?.t || t;
91
- return currentT(id, vars);
92
- };
87
+ const getT = global.smoonbI18n?.t || t;
93
88
 
94
89
  for (const expected of expectedKeys) {
95
90
  console.log(chalk.blue(`\n🔧 ${getT('env.mapping.title', { variable: expected })}`));
@@ -238,28 +233,15 @@ async function mapEnvVariablesInteractively(env, expectedKeys) {
238
233
  }]);
239
234
 
240
235
  finalEnv.SMOONB_LANG = selectedLang;
241
-
242
- // Re-inicializar i18n com o novo idioma para aplicar mudança em tempo real
243
- const { initI18n } = require('../i18n');
244
- const newI18n = initI18n(process.argv, { ...process.env, SMOONB_LANG: selectedLang });
245
- Object.assign(global.smoonbI18n, newI18n);
246
-
247
- // getT agora funciona dinamicamente, sempre acessando global.smoonbI18n?.t
248
- // Então não precisamos atualizar nada, apenas usar getT normalmente
249
236
  console.log(chalk.green(`✅ ${getT('env.language.saved', { lang: selectedLang })}`));
250
- console.log(chalk.cyan(`🌐 ${getT('env.language.applied')}`));
237
+ console.log(chalk.yellow(`💡 ${getT('env.language.note')}`));
251
238
  }
252
239
 
253
240
  return { finalEnv, dePara };
254
241
  }
255
242
 
256
243
  async function askComponentsFlags() {
257
- // Função getT que sempre acessa global.smoonbI18n dinamicamente
258
- // Isso permite que a mudança de idioma seja aplicada em tempo real
259
- const getT = (id, vars) => {
260
- const currentT = global.smoonbI18n?.t || t;
261
- return currentT(id, vars);
262
- };
244
+ const getT = global.smoonbI18n?.t || t;
263
245
 
264
246
  // Explicação sobre Edge Functions
265
247
  console.log(chalk.cyan(`\n⚡ ${getT('backup.components.edgeFunctions.title')}`));