-
Notifications
You must be signed in to change notification settings - Fork 154
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
Refactor Firebase JS externals using Web v9 modular SDK #319
Merged
Merged
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
21d2264
Refactor app and database modules
shepeliev ea7fa10
Refactor auth
shepeliev 3846b15
Refactor firestore
shepeliev 9e4422e
Revert formatting
shepeliev bd371ed
Revert formatting
shepeliev 6d3b904
Refactor remote config
shepeliev 99bceab
Refactor functions
shepeliev 322d629
Refactor installations
shepeliev 17e4ef3
Fix firestore tests
shepeliev fb4bd1c
Fix DataSnapshot size
shepeliev ab53f6f
Fix database tests
shepeliev b6eb04b
Revert non-js changes
shepeliev 4ff80b2
Fix infinite test task
shepeliev 79e4635
Split externals
shepeliev 94ef863
Fix Android test results path
shepeliev e6fccc3
Increase waiting connection to database timeout
shepeliev 1d36094
Merge branch 'master' into refactor-web-version-9
shepeliev 18364b3
Merge branch 'master' into refactor-web-version-9
shepeliev a9b9f33
Fixes after merging upstream master branch
shepeliev 117ac63
Enable firebase-database JS tests
shepeliev 541ea99
Move externals to related modules
shepeliev dd2e9d7
Add externals signInWithPopup, signInWithRedirect, getRedirectResult
shepeliev d3b1721
Merge branch 'master' into refactor-web-version-9
shepeliev 5bb89b8
Resolve conflicts
shepeliev d66734c
Fix tests
shepeliev de2d1e2
Switch firebase-database tests to karma
shepeliev 6e65b8a
Increase JS tests timeout
shepeliev f6d0156
Rename externals.kt to Unsubscribe.kt
shepeliev fddc5b8
Increase JS tests timeout for modules that interact with Firebase emu…
shepeliev cfbc082
Merge branch 'master' into refactor-web-version-9
shepeliev ff85d16
Merge branch 'master' into refactor-web-version-9-shepeliev
nbransby be096bd
upgrade storage to js v9
nbransby a7e335f
fix js tests
nbransby 7b78af4
Merge branch 'master' into refactor-web-version-9
nbransby 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
32 changes: 32 additions & 0 deletions
32
firebase-app/src/jsMain/kotlin/dev/gitlive/firebase/externals/app.kt
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,32 @@ | ||
@file:JsModule("firebase/app") | ||
@file:JsNonModule | ||
|
||
package dev.gitlive.firebase.externals | ||
|
||
import kotlin.js.Promise | ||
|
||
external fun initializeApp(options: Any, name: String = definedExternally): FirebaseApp | ||
|
||
external fun getApp(name: String = definedExternally): FirebaseApp | ||
|
||
external fun getApps(): Array<FirebaseApp> | ||
|
||
external fun deleteApp(app: FirebaseApp): Promise<Unit> | ||
|
||
external interface FirebaseApp { | ||
val automaticDataCollectionEnabled: Boolean | ||
val name: String | ||
val options: FirebaseOptions | ||
} | ||
|
||
external interface FirebaseOptions { | ||
val apiKey: String | ||
val appId : String | ||
val authDomain: String? | ||
val databaseURL: String? | ||
val measurementId: String? | ||
val messagingSenderId: String? | ||
val gaTrackingId: String? | ||
val projectId: String? | ||
val storageBucket: String? | ||
} |
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
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.
Since we are using
kotlinx-coroutines-test
the result of runTest must be immediately returned from each test in JS.