Skip to content

Commit

Permalink
feat: add universal interop def
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Jun 21, 2024
1 parent 0610671 commit 5ea9abb
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 8 deletions.
4 changes: 1 addition & 3 deletions auth_node/lib/auth_universal.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export 'package:tekartik_firebase_auth/auth.dart';

export 'src/universal/auth_universal.dart';
export 'auth_universal_legacy.dart';
3 changes: 3 additions & 0 deletions auth_node/lib/auth_universal_interop.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'package:tekartik_firebase_auth/auth.dart';

export 'src/universal/auth_universal.dart';
3 changes: 3 additions & 0 deletions auth_node/lib/auth_universal_legacy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'package:tekartik_firebase_auth/auth.dart';

export 'src/universal_legacy/auth_universal.dart';
2 changes: 1 addition & 1 deletion auth_node/lib/src/universal/auth_universal_node.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:tekartik_firebase_auth/auth.dart';
import 'package:tekartik_firebase_auth_node/auth_node.dart';
import 'package:tekartik_firebase_auth_node/auth_node_interop.dart';

AuthService get authService => authServiceNode;
3 changes: 3 additions & 0 deletions auth_node/lib/src/universal_legacy/auth_universal.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'auth_universal_stub.dart'
if (dart.library.js) 'auth_universal_node.dart'
if (dart.library.io) 'auth_universal_io.dart';
4 changes: 4 additions & 0 deletions auth_node/lib/src/universal_legacy/auth_universal_io.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_auth/auth.dart';
import 'package:tekartik_firebase_auth_local/auth_local.dart';

AuthService get authService => authServiceLocal;
4 changes: 4 additions & 0 deletions auth_node/lib/src/universal_legacy/auth_universal_node.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_auth/auth.dart';
import 'package:tekartik_firebase_auth_node/auth_node.dart';

AuthService get authService => authServiceNode;
4 changes: 4 additions & 0 deletions auth_node/lib/src/universal_legacy/auth_universal_stub.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_auth/auth.dart';

AuthService get authService =>
throw UnsupportedError('authService on io or node only');
2 changes: 1 addition & 1 deletion storage_node/lib/src/universal/storage_universal_node.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:tekartik_firebase_storage/storage.dart';
import 'package:tekartik_firebase_storage_node/storage_node.dart';
import 'package:tekartik_firebase_storage_node/storage_node_interop.dart';

StorageService get storageService => storageServiceNode;
3 changes: 3 additions & 0 deletions storage_node/lib/src/universal_legacy/storage_universal.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'storage_universal_stub.dart'
if (dart.library.js) 'storage_universal_node.dart'
if (dart.library.io) 'storage_universal_io.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_storage/storage.dart';
import 'package:tekartik_firebase_storage_fs/storage_fs.dart';

StorageService get storageService => storageServiceMemory;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_storage/storage.dart';
import 'package:tekartik_firebase_storage_node/storage_node_legacy.dart';

StorageService get storageService => storageServiceNode;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'package:tekartik_firebase_storage/storage.dart';

StorageService get storageService =>
throw UnsupportedError('storageService on io or node only');
4 changes: 1 addition & 3 deletions storage_node/lib/storage_universal.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export 'package:tekartik_firebase_storage/storage.dart';

export 'src/universal/storage_universal.dart';
export 'storage_universal_legacy.dart';
3 changes: 3 additions & 0 deletions storage_node/lib/storage_universal_interop.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'package:tekartik_firebase_storage/storage.dart';

export 'src/universal/storage_universal.dart';
3 changes: 3 additions & 0 deletions storage_node/lib/storage_universal_legacy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'package:tekartik_firebase_storage/storage.dart';

export 'src/universal_legacy/storage_universal.dart';

0 comments on commit 5ea9abb

Please sign in to comment.