-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable modules with commands #1656
Merged
Merged
Changes from 150 commits
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
2b7b58c
enable camera with npm run useCamera command
sharjeelyunus 63588f1
enable files module
sharjeelyunus fe07bf4
use utils for same tasks
sharjeelyunus 21ca13b
add permissions and descriptions
sharjeelyunus 6e3ebed
Enable camera and files modules for specified platforms
sharjeelyunus d7265d1
run commands with npm
sharjeelyunus ccfe89c
fix dart runner
sharjeelyunus d6a8941
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 9a5a803
enable multiple modules with a single command
sharjeelyunus fa501d1
define files paths in utils
sharjeelyunus 561e995
enable contacts modules with a command
sharjeelyunus a707668
use reusable components to update files
sharjeelyunus 594b7b2
refactoring + added exception for logs
sharjeelyunus 8c5135c
adding github workflow to test test the commands on each PR to preven…
sharjeelyunus 26b35d8
use starter as working directory for starter commands
sharjeelyunus 8a0b29a
setup flutter sdk for dart commands
sharjeelyunus a78e668
fix
sharjeelyunus fc226a1
exist on failure + test if workflow fails on error
sharjeelyunus ef7acc3
fix
sharjeelyunus 9a8ab81
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 06e3ea8
added commands for generate keystore, get sha keys + other fixes
sharjeelyunus bcd7953
fix generate keystore to accept password at least 6 char long
sharjeelyunus 526847c
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 6b5d3cd
initialize all modules with scripts
sharjeelyunus 6d991bc
location, google maps, and connect modules with commands
sharjeelyunus d58d8eb
enable deeplink with command for android
sharjeelyunus 74efb17
fix deeplink
sharjeelyunus 328e416
ask questions if arguments are not passed in the command
sharjeelyunus f9caf6f
fix: ask questions at once for all the modules when using `enable` co…
sharjeelyunus c71fd29
fix: ask multiple questions for enable command
sharjeelyunus bc678b8
enable deeplink for ios
sharjeelyunus f823039
options for platform choice, plus deeplink fix for web
sharjeelyunus 219fc19
fix: select multiple platforms
sharjeelyunus d3b31d7
fix location module to accept google maps key for each platform
sharjeelyunus 7bbee6c
option to enable qr code
sharjeelyunus 7a571f2
fix: add branch keys in ensemble.properties for deeplink
sharjeelyunus 9677da4
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus c922bff
enable notifications with command
sharjeelyunus 281df3d
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus a7fde4b
fix android permissions to include meta data as well
sharjeelyunus 480c5c0
throw error on if required values aren't provided
sharjeelyunus 1478c1a
fix
sharjeelyunus 9abf570
fix firebase initialization for notifications and analytics
sharjeelyunus 16206b8
run formatter after running the command
sharjeelyunus 8c8f17e
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 0ac6f26
fix firebase initialization
sharjeelyunus dbc4724
enable firebase analytics with command
sharjeelyunus 626890a
enable auth module with command
sharjeelyunus 4b578a1
bypass questions + refactor dart runner
sharjeelyunus 196c054
Add modules.js file for managing common parameters, modules, and scripts
sharjeelyunus 07cb967
fix bypass questions
sharjeelyunus ed840ed
refactoring file paths
sharjeelyunus c4d28af
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus d2b0ed3
retrieve ensemble git references dynamically
sharjeelyunus 176c9c1
refactor getEnsembleRef to parse git ref directly from pubspec.yaml c…
sharjeelyunus 7ca9844
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 0baccd0
add ensemble_version parameter to module scripts for dynamic git refe…
sharjeelyunus f5b1049
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus 14996d0
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus b6749f7
fix: update Kotlin and Gradle plugin versions in build.gradle
sharjeelyunus 2b68c1f
fix: downgrade Kotlin version and update Gradle plugin in build.gradle
sharjeelyunus b3409a2
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus fb67beb
fix: update .gitignore to correctly include node_modules directory
sharjeelyunus 0968c52
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus 4daed7a
added scripts for chat, bracket, network, bluetooth
TheNoumanDev e2036c2
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
TheNoumanDev c55018c
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus a1c3758
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 5fa9fa5
added script for biometric
TheNoumanDev 7c86fa9
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
TheNoumanDev bc7bd5f
fix: update Android build.gradle to configure Java compatibility
sharjeelyunus ec97534
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus 78d79be
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 22c989c
fix
sharjeelyunus efe377e
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus 1936dfd
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 8d7cced
fix: update FirebaseFirestore pod to version 10.25.0
sharjeelyunus 1240bba
Revert "fix: update FirebaseFirestore pod to version 10.25.0"
sharjeelyunus f99e0dc
fix: update Firebase dependencies to version 11.4.0
sharjeelyunus 65c58f8
fix: update Firebase dependencies to version 11.4.0
sharjeelyunus b662e91
fix: update GoogleUtilities dependencies to version 7.13.3 in Podfile…
sharjeelyunus fa0692c
fix: update GoogleUtilities dependencies to version 7.13.4 in Podfile…
sharjeelyunus 626dd72
fix: update GoogleUtilities dependencies to version 8.0 in Podfile.lock
sharjeelyunus 69e94d0
revert to firebase 10.25.0
sharjeelyunus f1b0733
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 0388056
refactor: remove Firebase web configuration prompts for notifications
sharjeelyunus 7906a1e
fix: update Firebase initialization to only run for Android and iOS p…
sharjeelyunus c2dfc8b
feat: enhance HTML update functionality to remove existing tags befor…
sharjeelyunus 103f905
fix: conditionally update ensemble modules for Android and iOS platfo…
sharjeelyunus 87b3853
feat: add description prompt for using location services always and w…
sharjeelyunus ec5654c
feat: add description for always and when in use location services on…
sharjeelyunus 641990b
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus ad0f676
fix: update EnsembleChat registration to use build method
sharjeelyunus cb67111
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus 66c6b6d
feat: add precise location description parameter for network info module
sharjeelyunus 738dd6e
fix: wrap module answer values in quotes for proper formatting
sharjeelyunus 6dad6e7
feat: update network info module to include necessary entitlements fo…
sharjeelyunus 47d27fe
fix: ensure arguments are properly quoted in dart_runner.js for consi…
sharjeelyunus 943cd92
refactor: simplify argument formatting in dart_runner.js by removing …
sharjeelyunus 6a33150
fix: improve argument parsing in dart_runner.js to escape quotes and …
sharjeelyunus 7b03977
feat: rename modules for consistency and add Google Maps and QR code …
sharjeelyunus 04823eb
refactor: standardize key naming conventions across modules
sharjeelyunus b1c8275
feat: rename 'chat' module to 'ai_chat' for clarity and consistency
sharjeelyunus d7d1926
feat: add Firebase Web configuration prompts and simplify initializat…
sharjeelyunus 6a0faca
feat: update command scripts for consistency and add new useConnect a…
sharjeelyunus 0578bfd
feat: enhance error handling in findScript function and improve argum…
sharjeelyunus f58ff5e
feat: update authentication client ID prompts to be optional and adju…
sharjeelyunus 1f046ac
feat: move precise location description validation to iOS permissions…
sharjeelyunus 7bef38b
feat: rename command scripts to use 'has' prefix for clarity
sharjeelyunus 42edfea
feat: update auth config to clear key values when no value is provided
sharjeelyunus c870a7b
feat: update web API argument names for consistency in firebase_utils
sharjeelyunus 3acaeca
feat: rename command scripts to use 'has' prefix for clarity
sharjeelyunus b8cf3c3
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus c3aa5a8
feat: remove getShaKeys script and related references
sharjeelyunus 75656c8
feat: add TypeScript configuration and implement dart runner with arg…
sharjeelyunus 01d6477
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 34b3d0d
fix: android compile issue
sharjeelyunus de4b682
added: update Firebase configuration handling for multiple platforms
sharjeelyunus dae8abc
added: enhance Firebase configuration prompts for Android, iOS, and W…
sharjeelyunus c00fc05
fix: comment out Firebase configuration update in analytics and notif…
sharjeelyunus 8c528db
added: implement Firebase configuration updates for Android build files
sharjeelyunus 81ddc09
added: implement console log configuration for Firebase analytics
sharjeelyunus 1efa839
added: enhance Firebase configuration for Android by adding implement…
sharjeelyunus 8d63e45
refactor: update Firebase initialization and configuration handling i…
sharjeelyunus 9e99bf6
refactor: streamline Firebase configuration updates for Android in an…
sharjeelyunus f96a658
added: implement ProGuard rules for Firebase and Google Play Services…
sharjeelyunus 356dcee
refactor: modify iOS client ID format in Info.plist update function
sharjeelyunus 722ba3e
refactor: enable Firebase initialization in analytics and notificatio…
sharjeelyunus 7438a3a
refactor: add ProGuard rules for plaid connect
sharjeelyunus f9471cf
refactor: remove redundant code in updateAuthConfig function
sharjeelyunus bc0a6ca
refactor: add OpenJSSE and Conscrypt dependencies for Android in enab…
sharjeelyunus e0ef4ff
refactor: update ProGuard rules for OkHttp and Conscrypt in constants…
sharjeelyunus 04b7890
refactor: enhance ProGuard rules for OkHttp, Conscrypt, Bouncy Castle…
sharjeelyunus 0487db6
refactor: update build.gradle to disable minification and resource sh…
sharjeelyunus a1992c9
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 0e263b5
feat: add platform-specific Firebase parameters for Android, iOS, and…
sharjeelyunus 6805eef
feat: update parameter structure to include platform-specific require…
sharjeelyunus 0d94acb
refactor: reorganize common parameters and scripts into utility_scrip…
sharjeelyunus c4898f5
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 9912289
fix: remove unused authentication configuration keys
sharjeelyunus 634ecfe
fix: add key to indicate app does not use non-exempt encryption for A…
sharjeelyunus 642e1d1
fix: update iOS client ID handling to remove suffix and reverse format
sharjeelyunus 4002841
feat: add Firebase Performance SDK integration script
sharjeelyunus a339310
fix: update dependency handling in Firebase Performance script
sharjeelyunus f97dbde
fix: remove unused ProGuard rules for connect module
sharjeelyunus e514d81
added moengage scripts
TheNoumanDev f3489d8
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus adf6630
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus afadc49
fix use latest version
sharjeelyunus ab29a7b
refactor: update ProGuard rules for Firebase integration
sharjeelyunus e891385
FIXME: adding proguard rules for now for moengage (remove it later)
sharjeelyunus 21db6a4
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 4cd4963
refactor: remove ProGuard rules file for moengage
sharjeelyunus af0dae9
Merge branch 'enable-modules-with-scripts' of https://github.com/Ense…
sharjeelyunus ac48c26
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus 107c3bf
chore: update FirebaseFirestore pod to version 11.6.0
sharjeelyunus f8ca8dd
chore: comment out Apple Sign In entitlement key in Runner.entitlements
sharjeelyunus ecdf74c
chore: comment out Apple Sign In entitlement key in Runner.entitlements
sharjeelyunus b33a7ca
Merge branch 'main' into enable-modules-with-scripts
sharjeelyunus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Test Commands in Starter | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-modules: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
defaults: | ||
run: | ||
working-directory: starter | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Flutter SDK | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run hasCamera command | ||
run: npm run hasCamera platform="ios,android" cameraDescription="Hello world" | ||
continue-on-error: false | ||
|
||
- name: Run hasFileManager command | ||
run: npm run hasFileManager platform="ios,android" photoLibraryDescription="Hello" musicDescription="world" | ||
continue-on-error: false | ||
|
||
- name: Run hasContacts command | ||
run: npm run hasContacts contactsDescription="Hello world" platform="ios,android" | ||
continue-on-error: false | ||
|
||
- name: Run hasConnect command | ||
run: npm run hasConnect platform="ios,android" cameraDescription="Hello world" contactsDescription="Hello world" | ||
continue-on-error: false | ||
|
||
- name: Run hasLocation command | ||
run: npm run hasLocation platform="ios,android" locationDescription="Hello world" alwaysUseLocationDescription="Hello world" inUseLocationDescription="Hello world" | ||
continue-on-error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "starter", | ||
"version": "1.0.0", | ||
"description": "This starter project enables running and deploying Ensemble-powered Apps across iOS, Android, and Web (other platforms are not yet fully supported). It also includes examples on how to integrate Ensemble pages into your existing Flutter App.", | ||
"main": "index.js", | ||
"directories": { | ||
"lib": "lib", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"enable": "ts-node src/dart_runner.ts enable", | ||
"hasCamera": "ts-node src/dart_runner.ts camera", | ||
"hasFileManager": "ts-node src/dart_runner.ts file_manager", | ||
"hasContacts": "ts-node src/dart_runner.ts contacts", | ||
"hasConnect": "ts-node src/dart_runner.ts plaid_connect", | ||
"hasLocation": "ts-node src/dart_runner.ts location", | ||
"hasDeeplink": "ts-node src/dart_runner.ts deeplink", | ||
"hasFirebaseAnalytics": "ts-node src/dart_runner.ts firebase_analytics", | ||
"hasMoengage": "ts-node src/dart_runner.ts moengage", | ||
"hasNotification": "ts-node src/dart_runner.ts notification", | ||
"hasBracket": "ts-node src/dart_runner.ts bracket", | ||
"hasNetworkInfo": "ts-node src/dart_runner.ts network_info", | ||
"hasChat": "ts-node src/dart_runner.ts ai_chat", | ||
"hasAuth": "ts-node src/dart_runner.ts auth", | ||
"hasBluetooth": "ts-node src/dart_runner.ts bluetooth", | ||
"hasBiometric": "ts-node src/dart_runner.ts biometric", | ||
"qrCodeEnabled": "ts-node src/dart_runner.ts qr_code", | ||
"hasGoogleMaps": "ts-node src/dart_runner.ts google_maps", | ||
"generate_keystore": "ts-node src/dart_runner.ts generateKeystore" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"inquirer": "^12.0.0", | ||
"prompts": "^2.4.2" | ||
}, | ||
"devDependencies": { | ||
"@types/inquirer": "^9.0.7", | ||
"@types/node": "^22.10.2", | ||
"@types/prompts": "^2.4.9", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const firebaseProguardRules = ''' | ||
# Keep Google Play Services classes | ||
-keep class com.google.android.gms.** { *; } | ||
-keep interface com.google.android.gms.** { *; } | ||
-dontwarn com.google.android.gms.** | ||
|
||
# Keep Firebase-related classes | ||
-keep class com.google.firebase.** { *; } | ||
-dontwarn com.google.firebase.** | ||
|
||
# Keep other necessary classes for Flutter | ||
-keep class io.flutter.** { *; } | ||
-dontwarn io.flutter.** | ||
'''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import 'dart:io'; | ||
|
||
import 'utils.dart'; | ||
import 'utils/firebase_utils.dart'; | ||
import 'utils/proguard_utils.dart'; | ||
import 'constants.dart'; | ||
|
||
// Adds the Firebase Performance SDK to the project | ||
void main(List<String> arguments) { | ||
List<String> platforms = getPlatforms(arguments); | ||
|
||
try { | ||
addDependency('firebase_performance', '^0.10.0+11'); | ||
|
||
if (platforms.contains('android')) { | ||
createProguardRules(firebaseProguardRules); | ||
addClasspathDependency( | ||
"classpath 'com.google.firebase:perf-plugin:1.4.2'"); | ||
addPluginDependency("apply plugin: 'com.google.firebase.firebase-perf'"); | ||
} | ||
|
||
// Configure iOS-specific settings | ||
if (platforms.contains('ios')) { | ||
addPod('FirebasePerformance'); | ||
} | ||
|
||
print( | ||
'Firebase Performance SDK enabled successfully for ${platforms.join(', ')}! 🎉'); | ||
exit(0); | ||
} catch (e) { | ||
print('Starter Error: $e'); | ||
exit(1); | ||
} | ||
} | ||
|
||
void addPod(String pod) { | ||
final podfile = File('ios/Podfile'); | ||
if (!podfile.existsSync()) { | ||
throw 'ios/Podfile not found'; | ||
} | ||
|
||
final lines = podfile.readAsLinesSync(); | ||
final newLines = <String>[]; | ||
bool added = false; | ||
|
||
for (var line in lines) { | ||
newLines.add(line); | ||
if (line.contains('use_frameworks!')) { | ||
newLines.add(" pod '$pod'"); | ||
added = true; | ||
} | ||
} | ||
|
||
if (!added) { | ||
throw 'use_frameworks! not found in ios/Podfile'; | ||
} | ||
|
||
podfile.writeAsStringSync(newLines.join('\n')); | ||
} | ||
|
||
void addDependency(String dependency, String version) { | ||
final pubspec = File(pubspecFilePath); | ||
if (!pubspec.existsSync()) { | ||
throw 'pubspec.yaml not found'; | ||
} | ||
|
||
final content = pubspec.readAsStringSync(); | ||
final dependenciesSection = | ||
RegExp(r'dependencies:', multiLine: true).firstMatch(content); | ||
|
||
if (dependenciesSection == null) { | ||
throw 'dependencies section not found in pubspec.yaml'; | ||
} | ||
|
||
final dependencyPattern = RegExp(r'\s+$dependency:\s+\S+'); | ||
if (dependencyPattern.hasMatch(content)) { | ||
return; | ||
} | ||
final newContent = content.replaceFirst( | ||
dependenciesSection.group(0)!, | ||
'${dependenciesSection.group(0)}\n $dependency: $version\n', | ||
); | ||
|
||
pubspec.writeAsStringSync(newContent); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to log, can you share which modules still breaks with out this manual override?
This was specifically add for high_chart which we removed, might want to update/remove other modules instead of force update on all package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these modules causes the problems
Not sure if others too, have to create builds 1 by 1 for each to be sure