-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from shepeliev/refactor-web-version-9
Refactor Firebase JS externals using Web v9 modular SDK
- Loading branch information
Showing
69 changed files
with
1,500 additions
and
1,147 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Some tests are fluky in GitHub Actions, so we increase the timeout. | ||
config.set({ | ||
client: { | ||
mocha: { | ||
timeout: 5000 | ||
} | ||
}, | ||
}); |
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.