Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Discontinue the package (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored May 6, 2022
1 parent 9f8462c commit 7fe1881
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 61 deletions.
4 changes: 4 additions & 0 deletions firebase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 9.0.3

- Mark the package as discontinued.

## 9.0.2

- Updated documented and tested JS library version to `8.10.0` (August 19, 2021).
Expand Down
122 changes: 62 additions & 60 deletions firebase/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[![Pub Package](https://img.shields.io/pub/v/firebase.svg)](https://pub.dev/packages/firebase)
[![Dart CI](https://github.com/FirebaseExtended/firebase-dart/workflows/Dart%20CI/badge.svg?branch=master)](https://github.com/FirebaseExtended/firebase-dart/actions?query=workflow%3A%22Dart+CI%22+branch%3Amaster)

**PLEASE NOTE:** If you're looking for a package to use in your Flutter app, please have a look at the official documentation: [firebase.flutter.dev](https://firebase.flutter.dev/).
# This package is discontinued and will receive no further updates

## Status
_Feel free to fork the repository and use/extend the code for your needs._

![Status: Experimental](https://img.shields.io/badge/Status-Experimental-blue)

This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.
**PLEASE NOTE:** If you're looking for a package to use in your Flutter app,
please have a look at the official documentation:
[firebase.google.com/docs/flutter](https://firebase.google.com/docs/flutter/).

## Introduction

**NOTE:** This package provides three libraries:

- For browser-based applications:
[`package:firebase/firebase.dart` and `package:firebase/firestore.dart`](#using-this-package-for-browser-applications)
are wrappers over the [Firebase JS API](https://firebase.google.com/docs/reference/js/).
are wrappers over the
[Firebase JS API](https://firebase.google.com/docs/reference/js/).

- For the Dart VM and Fuchsia:
[`package:firebase/firebase_io.dart`](#using-this-package-with-the-dart-vm-and-fuchsia)
Expand All @@ -25,7 +25,8 @@ This repository is maintained by Googlers but is not a supported Firebase produc

### Other platforms

- Flutter: [FlutterFire plugins](https://github.com/flutter/plugins/blob/master/FlutterFire.md)
- Flutter:
[FlutterFire plugins](https://github.com/flutter/plugins/blob/master/FlutterFire.md)

- Node (via dart2js): [Anatoly Pulyaevskiy](https://github.com/pulyaevskiy) has
been working on unofficial wrappers.
Expand All @@ -40,17 +41,16 @@ You can find more information on how to use Firebase on the
Don't forget to setup correct **rules** for your
[realtime database](https://firebase.google.com/docs/database/security/),
[storage](https://firebase.google.com/docs/storage/security/) and/or
[firestore](https://firebase.google.com/docs/firestore/security/get-started)
in the Firebase console.
[firestore](https://firebase.google.com/docs/firestore/security/get-started) in
the Firebase console.

If you want to use [Firestore](https://firebase.google.com/docs/firestore/quickstart),
you need to enable it in the Firebase console and include the
If you want to use
[Firestore](https://firebase.google.com/docs/firestore/quickstart), you need to
enable it in the Firebase console and include the
[additional js script](#do-you-need-to-use-firestore).

Authentication also has to be enabled in the Firebase console.
For more info, see the
[next section](#before-tests-and-examples-are-run)
in this document.
Authentication also has to be enabled in the Firebase console. For more info,
see the [next section](#before-tests-and-examples-are-run) in this document.

## Using this package for browser applications

Expand All @@ -66,8 +66,8 @@ For example:
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
```

The firestore library is available in `firestore.dart`. You can find an
example how to use this library in the [example/firestore](example/firestore).
The firestore library is available in `firestore.dart`. You can find an example
how to use this library in the [example/firestore](example/firestore).

### Real-time Database Example

Expand Down Expand Up @@ -124,12 +124,12 @@ void main() {

This library also contains a dart:io client.

Create an instance of `FirebaseClient` and then use the appropriate
method (`GET`, `PUT`, `POST`, `DELETE` or `PATCH`).
More info in the
Create an instance of `FirebaseClient` and then use the appropriate method
(`GET`, `PUT`, `POST`, `DELETE` or `PATCH`). More info in the
[official documentation](https://firebase.google.com/docs/reference/rest/database/).

The dart:io client also supports authentication. See the documentation on how to get
The dart:io client also supports authentication. See the documentation on how to
get
[auth credentials](https://firebase.google.com/docs/reference/rest/database/user-auth).

```dart
Expand All @@ -154,13 +154,14 @@ void main() {
## Examples

You can find more examples on realtime database, auth, storage and firestore in
the [example](https://github.com/FirebaseExtended/firebase-dart/tree/master/example)
the
[example](https://github.com/FirebaseExtended/firebase-dart/tree/master/example)
folder.

## Dart Dev Summit 2016 demo app

[Demo app](https://github.com/Janamou/firebase-demo)
which uses Google login, realtime database and storage.
[Demo app](https://github.com/Janamou/firebase-demo) which uses Google login,
realtime database and storage.

## Before tests and examples are run

Expand All @@ -175,9 +176,8 @@ with configuration for your Firebase project.
To run the io tests, you need to provide the `service_account.json` file. Go to
`Settings/Project settings/Service accounts` tab in your project's Firebase
console, select the `Firebase Admin SDK` and click on the
`Generate new private key` button, which downloads you a file.
Rename the file to `service_account.json` and put it into the `lib/src/assets`
folder.
`Generate new private key` button, which downloads you a file. Rename the file
to `service_account.json` and put it into the `lib/src/assets` folder.

> Warning: Use the contents of
> [`lib/src/assets`](https://github.com/FirebaseExtended/firebase-dart/tree/master/lib/src/assets)
Expand All @@ -189,8 +189,8 @@ No special action needed here.

### Auth tests and example

Auth tests and some examples need to have **Auth providers** correctly set.
The following providers need to be enabled in Firebase console,
Auth tests and some examples need to have **Auth providers** correctly set. The
following providers need to be enabled in Firebase console,
`Auth/Sign-in method` section:

- E-mail/password
Expand All @@ -212,10 +212,9 @@ write to database. Update your rules in Firebase console,
}
```

> Warning: At the moment, anybody can read and write to your database.
> You _usually_ don't want to have this in your production apps.
> You can find more information on how to setup correct database rules in the
> official
> Warning: At the moment, anybody can read and write to your database. You
> _usually_ don't want to have this in your production apps. You can find more
> information on how to setup correct database rules in the official
> [Firebase documentation](https://firebase.google.com/docs/database/security/).
### Firestore tests and example
Expand All @@ -237,21 +236,20 @@ service cloud.firestore {
}
```

> Warning: At the moment, anybody can read and write to your Firestore.
> You _usually_ don't want to have this in your production apps.
> You can find more information on how to setup correct Firestore rules in the
> official
> Warning: At the moment, anybody can read and write to your Firestore. You
> _usually_ don't want to have this in your production apps. You can find more
> information on how to setup correct Firestore rules in the official
> [Firebase documentation](https://firebase.google.com/docs/firestore/security/get-started).
You also need to include the additional `firebase-firestore.js` script.
See [more info](#do-you-need-to-use-firestore).
You also need to include the additional `firebase-firestore.js` script. See
[more info](#do-you-need-to-use-firestore).

### Storage tests and example

Storage tests and example need to have **public rules** to be able to read and
write to storage. Firebase Storage Rules Version 2 is
[required](https://firebase.google.com/docs/storage/web/list-files) for `list` and
`listAll`. Update your rules in Firebase console, `Storage/Rules` section
[required](https://firebase.google.com/docs/storage/web/list-files) for `list`
and `listAll`. Update your rules in Firebase console, `Storage/Rules` section
to:

```
Expand All @@ -265,25 +263,26 @@ service firebase.storage {
}
```

> Warning: At the moment, anybody can read and write to your storage.
> You _usually_ don't want to have this in your production apps.
> You can find more information on how to setup correct storage rules in the
> official
> Warning: At the moment, anybody can read and write to your storage. You
> _usually_ don't want to have this in your production apps. You can find more
> information on how to setup correct storage rules in the official
> [Firebase documentation](https://firebase.google.com/docs/storage/security/).
### Remote Config example

In order to use Remote Config functionality in your web app, you need to include the following
script in your `.html` file, in addition to the other Firebase scripts:
In order to use Remote Config functionality in your web app, you need to include
the following script in your `.html` file, in addition to the other Firebase
scripts:

```html
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-remote-config.js"></script>
```

Remote config parameters are defined in Firebase console. Three data types are supported by the API:
String, Number, and Boolean. All values are stored by Firebase as strings. It's your
responsibility to assure that numbers and booleans are defined appropriately. A boolean
value can be represented as either of: `0/1`, `true/false`, `t/f`, `yes/no`, `y/n`, `on/off`.
Remote config parameters are defined in Firebase console. Three data types are
supported by the API: String, Number, and Boolean. All values are stored by
Firebase as strings. It's your responsibility to assure that numbers and
booleans are defined appropriately. A boolean value can be represented as either
of: `0/1`, `true/false`, `t/f`, `yes/no`, `y/n`, `on/off`.

For example:

Expand All @@ -308,21 +307,24 @@ print('counter: ${rc.getNumber("counter").toInt()}'); // <-- 2
print('flag: ${rc.getBoolean("flag")}'); // <-- true
```

Refer to [Remote Config Documentation](https://firebase.google.com/docs/remote-config) for more details.
Refer to
[Remote Config Documentation](https://firebase.google.com/docs/remote-config)
for more details.

### Remote Config tests

In order to test remote config, you need to obtain service account credentials
for your Firebase project. Each Firebase project has a default service account
that will work for this purpose. The service account can be found in the
GCP console by choosing the project, then in the menu: IAM & admin > Service accounts.
that will work for this purpose. The service account can be found in the GCP
console by choosing the project, then in the menu: IAM & admin > Service
accounts.

Once you have located the service account, choose Actions > Create key.
Pick JSON as the format. Put the JSON file in `lib/src/assets/service_account.json`.
Once you have located the service account, choose Actions > Create key. Pick
JSON as the format. Put the JSON file in `lib/src/assets/service_account.json`.

Ensure that the remote config for your project is empty. The unit test will refuse
to run with the following message if it detects that the remote config of the project
is not empty on start:
Ensure that the remote config for your project is empty. The unit test will
refuse to run with the following message if it detects that the remote config of
the project is not empty on start:

```
This unit test requires remote config to be empty.
Expand Down
1 change: 1 addition & 0 deletions firebase/lib/firebase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/// services are accessed.
///
/// See: <https://firebase.google.com/docs/reference/js/firebase>.
@Deprecated('This package will receive no further updates.')
library firebase;

export 'src/analytics.dart';
Expand Down
3 changes: 3 additions & 0 deletions firebase/lib/firebase_io.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@Deprecated('This package will receive no further updates.')
library firebase.firebase_io;

import 'dart:async';
import 'dart:convert';

Expand Down
1 change: 1 addition & 0 deletions firebase/lib/firestore.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// Firestore service.
///
/// See: <https://firebase.google.com/docs/reference/js/firebase.firestore>.
@Deprecated('This package will receive no further updates.')
library firebase_firestore;

export 'src/firestore.dart' hide jsifyFieldValue;
2 changes: 1 addition & 1 deletion firebase/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firebase
description: Firebase libraries for Dart on the web and server
version: 9.0.3-dev
version: 9.0.3
repository: https://github.com/FirebaseExtended/firebase-dart

environment:
Expand Down

0 comments on commit 7fe1881

Please sign in to comment.