kasy-cli 1.16.0 → 1.18.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 +16 -2
- package/lib/commands/add.js +52 -19
- package/lib/commands/configure.js +548 -0
- package/lib/commands/deploy.js +4 -4
- package/lib/commands/doctor.js +54 -6
- package/lib/commands/favicon.js +4 -4
- package/lib/commands/icon.js +5 -5
- package/lib/commands/new.js +404 -213
- package/lib/commands/remove.js +14 -3
- package/lib/commands/run.js +208 -6
- package/lib/commands/splash.js +5 -5
- package/lib/commands/update.js +9 -9
- package/lib/scaffold/CHANGELOG.json +23 -0
- package/lib/scaffold/backends/api/patch/README.md +3 -2
- package/lib/scaffold/backends/firebase/enable-auth-via-cli.js +108 -0
- package/lib/scaffold/backends/firebase/setup-from-scratch.js +44 -5
- package/lib/scaffold/backends/supabase/patch/README.md +3 -2
- package/lib/scaffold/generate.js +24 -8
- package/lib/scaffold/shared/generator-utils.js +52 -8
- package/lib/scaffold/shared/post-build.js +113 -31
- package/lib/scaffold/shared/template-strings.js +6 -0
- package/lib/utils/brand.js +16 -12
- package/lib/utils/flutter-run.js +139 -11
- package/lib/utils/i18n/messages-en.js +85 -7
- package/lib/utils/i18n/messages-es.js +85 -7
- package/lib/utils/i18n/messages-pt.js +86 -8
- package/lib/utils/ui.js +79 -4
- package/package.json +1 -1
- package/templates/firebase/README.en.md +18 -8
- package/templates/firebase/README.es.md +18 -8
- package/templates/firebase/README.md +18 -8
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidget.kt +68 -45
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidgetReceiver.kt +37 -0
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/OpenAppAction.kt +26 -0
- package/templates/firebase/android/app/src/main/res/drawable/widget_add_button.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_bg.xml +7 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_inner.xml +6 -6
- package/templates/firebase/android/app/src/main/res/drawable/widget_plan_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable/widget_preview_image.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_pro_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/layout/widget_preview.xml +3 -3
- package/templates/firebase/android/app/src/main/res/values/colors.xml +32 -0
- package/templates/firebase/assets/images/splash_logo_dark.png +0 -0
- package/templates/firebase/assets/images/splash_logo_dark_android12.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light_android12.png +0 -0
- package/templates/firebase/docs/revenuecat-setup.es.md +28 -8
- package/templates/firebase/docs/revenuecat-setup.pt.md +28 -8
- package/templates/firebase/ios/HomeWidgetExtension/MyWidget.swift +75 -29
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png +0 -0
- package/templates/firebase/ios/Runner/Base.lproj/LaunchScreen.storyboard +1 -1
- package/templates/firebase/lib/components/components.dart +1 -0
- package/templates/firebase/lib/components/kasy_avatar.dart +65 -17
- package/templates/firebase/lib/components/kasy_avatar_presets.dart +121 -97
- package/templates/firebase/lib/components/kasy_button.dart +8 -8
- package/templates/firebase/lib/components/kasy_date_picker.dart +834 -0
- package/templates/firebase/lib/components/kasy_tabs.dart +145 -61
- package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +45 -53
- package/templates/firebase/lib/features/home/home_components_preview_registry.dart +565 -77
- package/templates/firebase/lib/features/settings/ui/components/language_switcher.dart +10 -5
- package/templates/firebase/lib/i18n/en.i18n.json +2 -1
- package/templates/firebase/lib/i18n/es.i18n.json +2 -1
- package/templates/firebase/lib/i18n/pt.i18n.json +2 -1
- package/templates/firebase/lib/router.dart +15 -1
- package/templates/firebase/pubspec.yaml +1 -1
- package/templates/firebase/web/index.html +9 -0
- package/templates/firebase/web/splash/img/dark-1x.png +0 -0
- package/templates/firebase/web/splash/img/dark-2x.png +0 -0
- package/templates/firebase/web/splash/img/dark-3x.png +0 -0
- package/templates/firebase/web/splash/img/dark-4x.png +0 -0
- package/templates/firebase/web/splash/img/light-1x.png +0 -0
- package/templates/firebase/web/splash/img/light-2x.png +0 -0
- package/templates/firebase/web/splash/img/light-3x.png +0 -0
- package/templates/firebase/web/splash/img/light-4x.png +0 -0
|
@@ -96,15 +96,20 @@ class LanguageSwitcher extends ConsumerWidget {
|
|
|
96
96
|
return _LocaleOptionTile(
|
|
97
97
|
locale: locale,
|
|
98
98
|
isSelected: isSelected,
|
|
99
|
-
onTap: () {
|
|
99
|
+
onTap: () async {
|
|
100
100
|
// Close the sheet FIRST. Awaiting work before pop
|
|
101
101
|
// races with the rebuild triggered by setLocale and
|
|
102
102
|
// crashed Navigator.pop with !_debugLocked.
|
|
103
103
|
Navigator.pop(sheetContext);
|
|
104
|
-
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
104
|
+
// Await setLocale so the locale bundle finishes loading
|
|
105
|
+
// BEFORE the widget tries to read its translations.
|
|
106
|
+
// Slang lazy-loads non-base locales and its loadLocale
|
|
107
|
+
// returns immediately when another caller (this setLocale)
|
|
108
|
+
// is already loading — so a parallel updateForLocale would
|
|
109
|
+
// see translations not yet in the map and silently fall
|
|
110
|
+
// back to the base locale (English). That was the root
|
|
111
|
+
// cause of "first language tap doesn't update the widget".
|
|
112
|
+
await LocaleSettings.setLocale(locale);
|
|
108
113
|
unawaited(
|
|
109
114
|
ref
|
|
110
115
|
.read(sharedPreferencesProvider)
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "We'll be here when you're back",
|
|
532
532
|
"plan_free": "Free plan",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Your time is limited.\nDon't live someone else's life.\nHave the courage to follow your intuition.\nEverything else is secondary.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "Te esperamos de vuelta",
|
|
532
532
|
"plan_free": "Plan gratuito",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Tu tiempo es limitado.\nNo vivas la vida de otra persona.\nTen el coraje de seguir tu intuición.\nTodo lo demás es secundario.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "Aguardamos seu retorno",
|
|
532
532
|
"plan_free": "Plano grátis",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Seu tempo é limitado.\nNão viva a vida de outra pessoa.\nTenha coragem de seguir sua intuição.\nTodo o resto é secundário.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -24,6 +24,7 @@ import 'package:kasy_kit/features/settings/ui/components/admin/admin_routes.dart
|
|
|
24
24
|
import 'package:kasy_kit/features/settings/ui/components/admin/send_push_notification_page.dart';
|
|
25
25
|
import 'package:kasy_kit/features/subscription/ui/component/premium_page_factory.dart';
|
|
26
26
|
import 'package:kasy_kit/features/subscription/ui/premium_page.dart';
|
|
27
|
+
import 'package:logger/logger.dart';
|
|
27
28
|
|
|
28
29
|
final goRouterProvider = Provider<GoRouter>((ref) => generateRouter());
|
|
29
30
|
|
|
@@ -41,7 +42,20 @@ GoRouter generateRouter({
|
|
|
41
42
|
return GoRouter(
|
|
42
43
|
initialLocation: '/',
|
|
43
44
|
navigatorKey: navigatorKey,
|
|
44
|
-
|
|
45
|
+
// Catches unknown routes (e.g. an Android warm-start from the home widget
|
|
46
|
+
// landed on a stale URI) and silently sends the user home instead of
|
|
47
|
+
// surfacing a dead-end "404" page. We log the offending URI so a real
|
|
48
|
+
// misconfigured route doesn't get masked.
|
|
49
|
+
// Note: GoRouter doesn't accept both onException and errorBuilder, so the
|
|
50
|
+
// /404 GoRoute below is what reaches PageNotFound when explicitly navigated.
|
|
51
|
+
onException: (context, state, router) {
|
|
52
|
+
Logger().w(
|
|
53
|
+
'GoRouter caught unknown route → "${state.uri}" '
|
|
54
|
+
'(matched: "${state.matchedLocation}", error: ${state.error}). '
|
|
55
|
+
'Redirecting to "/".',
|
|
56
|
+
);
|
|
57
|
+
router.go('/');
|
|
58
|
+
},
|
|
45
59
|
observers: [
|
|
46
60
|
AnalyticsObserver(analyticsApi: MixpanelAnalyticsApi.instance()),
|
|
47
61
|
|
|
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|
|
16
16
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
|
17
17
|
# In Windows, build-name is used as the major, minor, and patch parts
|
|
18
18
|
# of the product and file versions while build-number is used as the build suffix.
|
|
19
|
-
version: 1.0.0+
|
|
19
|
+
version: 1.0.0+33
|
|
20
20
|
|
|
21
21
|
environment:
|
|
22
22
|
sdk: ^3.11.0
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
43
49
|
<style id="splash-screen-style">
|
|
44
50
|
html {
|
|
45
51
|
height: 100%
|
|
@@ -123,6 +129,9 @@
|
|
|
123
129
|
|
|
124
130
|
|
|
125
131
|
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
126
135
|
<script src="flutter_bootstrap.js" async=""></script>
|
|
127
136
|
<script src="./local_notifications.js"></script>
|
|
128
137
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|