Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
536c60a
refactor: initializeApp() with optional params, add multi-app support…
demolaf Nov 24, 2025
dccbde7
feat(*): Add version generation to workspace packages
Ehesp Nov 24, 2025
6b3fcce
feat: googleapis_auth_utils package, refactor: http.Client to AuthCli…
demolaf Nov 26, 2025
55bc07a
feat(auth): add support for tenants (#103)
Lyokone Dec 2, 2025
368fc67
refactor: HTTP clients and add AppRegistry tests (#108)
demolaf Dec 2, 2025
cf734d5
feat: sign() on AuthClient (#109)
demolaf Dec 5, 2025
331f4d9
feat(auth): add getAccessToken() method to Credential, AppCheck tests…
demolaf Dec 5, 2025
8321902
feat: added ProjectConfigManager, removed dynamicLinkDomain, missing …
demolaf Dec 11, 2025
495d9d9
feat: add TOTP MFA support and improve Auth test coverage (#114)
demolaf Dec 18, 2025
b76c3c8
feat: adds missing apis for firebase Messaging service and tests (#115)
demolaf Jan 5, 2026
8d29820
feat: add Functions Task Queue API with emulator support and tests (#…
demolaf Jan 5, 2026
9623f31
feat: add automated documentation generation and GitHub Pages deploym…
demolaf Jan 5, 2026
61bfe94
refactor: Security Rules - use the default storage bucket from AppOpt…
demolaf Jan 5, 2026
7d62d70
chore: improve READMEs
Ehesp Jan 6, 2026
99f3f20
chore: improve README readability
Ehesp Jan 6, 2026
b6bd399
chore: improve README readability
Ehesp Jan 6, 2026
6d38423
refactor: remove public API constructors for Firebase services (#120)
demolaf Jan 8, 2026
f7577d6
refactor(firestore): standalone googleapis_firestore package and mult…
demolaf Jan 13, 2026
6efb960
refactor(firestore): update Firestore initialization to use settings …
demolaf Jan 16, 2026
4521303
chore: cleanup
demolaf Jan 16, 2026
3b0fdab
test(firebase_app): update tests to use MockAuthClient and run in zon…
demolaf Jan 16, 2026
9139b1f
remove TODOs
demolaf Jan 16, 2026
898ea1d
feat: add `getQuery` method to Firestore transactions for transaction…
kartikey321 Jan 16, 2026
fbfd1ff
feat(firestore): BulkWriter apis and tests (#123)
demolaf Jan 16, 2026
77dde2b
feat: add support for vector search and query explain
demolaf Jan 16, 2026
b5f2243
feat(firestore): add query partitioning support with QueryPartition A…
demolaf Jan 19, 2026
5f99014
refactor(firestore): update getPartitions to handle paginated API res…
demolaf Jan 19, 2026
0ec7a55
feat: add support for vector search and query explain (#125)
demolaf Jan 20, 2026
04ae340
fix: merge conflicts
demolaf Jan 20, 2026
8cd062e
feat(firestore): add query partitioning support with QueryPartition A…
demolaf Jan 20, 2026
79bff02
feat: add `getQuery` method to Firestore transactions for transaction…
kartikey321 Jan 16, 2026
903ba72
Merge branch 'next' of github.com:invertase/dart_firebase_admin into …
demolaf Jan 20, 2026
347dd7c
restore: mock tests changes
demolaf Jan 20, 2026
a836bf0
Merge branch 'next' of github.com:invertase/dart_firebase_admin into …
demolaf Jan 20, 2026
e5e838b
feat: add `getQuery` method to Firestore transactions for transaction…
kartikey321 Jan 16, 2026
bc4697f
refactor: update tests to use `runZoned` for environment mocking
demolaf Jan 22, 2026
01a2be5
feat(storage): add signed URL generation support (#128)
demolaf Jan 28, 2026
69892fd
feat(storage): storage service integration with FirebaseApp and emula…
demolaf Jan 29, 2026
4c10dc8
fix: always use rethrow (#131)
kevmoo Jan 29, 2026
d71e331
test(storage): add comprehensive file operation tests (#130)
demolaf Jan 29, 2026
40f9b10
refactor: sign method to use IAMCredentialsApi for signing blobs
demolaf Feb 4, 2026
09b3e40
refactor(tests): remove redundant project ID tests and streamline IAM…
demolaf Feb 4, 2026
2fc5584
feat(firestore): add aggregation query support in transactions (#127)
kartikey321 Feb 9, 2026
dd0ac1b
refactor: remove unused helper functions for AuthClient impersonation
demolaf Feb 9, 2026
34f29f1
chore: lint errors
demolaf Feb 9, 2026
44b47f0
refactor: remove googleapis_auth_utils dependency (#165)
demolaf Feb 12, 2026
a822838
feat: added recursiveDelete(), withConverter(null) and tests (#164)
demolaf Feb 13, 2026
4496fd7
chore: update README
demolaf Feb 13, 2026
afbb976
chore: update README and examples for Firebase services (#166)
demolaf Feb 17, 2026
e22c9fa
Merge branch 'next' of github.com:invertase/dart_firebase_admin into …
demolaf Feb 17, 2026
361f450
test: firebase app tests and fixes (#168)
demolaf Feb 18, 2026
4304fa3
Update packages for googleapis_auth breaking changes (#170)
kevmoo Feb 18, 2026
89b7842
feat: extension on FirebaseApp for serviceAccountEmail() and sign() a…
demolaf Feb 19, 2026
5642501
feat: add X-Firebase-Client usage tracking header to all outgoing SDK…
demolaf Feb 19, 2026
223cc57
test: add WriteBatch tests for create and update operations (#177)
demolaf Feb 26, 2026
c43ddd4
refactor: rename to google_cloud_firestore (#180)
demolaf Feb 27, 2026
577f533
test(firestore): add unit tests for core internals (#183)
demolaf Mar 5, 2026
f0d4c7a
refactor: migrate from googleapis_storage to google_cloud_storage (#182)
demolaf Mar 6, 2026
8f91d52
refactor: remove googleapis_storage documentation from index.html
demolaf Mar 6, 2026
5aeac6a
test: add Workload Identity Federation tests for Firebase app initial…
demolaf Mar 10, 2026
0237e18
chore: update CHANGELOG (#187)
demolaf Mar 12, 2026
6f3d37d
refactor: update build.yml to add integration testing and clean up au…
demolaf Mar 16, 2026
10c920a
fix: coverage condition in build.yml
demolaf Mar 16, 2026
38b8088
refactor: use environment variables to communicate `gcs.Storage` conf…
brianquinlan Mar 16, 2026
09d25a8
refactor: remove duplicate test for create custom token
demolaf Mar 16, 2026
3bcb849
chore: add license headers (#190)
demolaf Mar 17, 2026
cbd88eb
Revert "chore: add license headers (#190)"
demolaf Mar 18, 2026
5b17041
chore: update contributing guidelines and google_cloud_storage depend…
demolaf Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 173 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ jobs:
pub-${{ matrix.dart-version }}-
pub-

- name: Install dependencies
run: dart pub get && cd example && dart pub get && cd -
- name: Install Melos
run: dart pub global activate melos
working-directory: .

- name: Bootstrap workspace
run: melos bootstrap
working-directory: .

- name: Check format
run: dart format --set-exit-if-changed .
Expand All @@ -70,10 +75,15 @@ jobs:
working-directory: packages/dart_firebase_admin

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- uses: actions/setup-node@v4

- uses: subosito/flutter-action@v2.7.1
Expand Down Expand Up @@ -102,30 +112,82 @@ jobs:
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
echo "PUB_CACHE=$HOME/.pub-cache" >> $GITHUB_ENV

- name: Install Melos
run: dart pub global activate melos
working-directory: .

- name: Bootstrap workspace
run: melos bootstrap
working-directory: .

- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Install dependencies
run: dart pub get && cd example && dart pub get && cd -
- name: Run dart_firebase_admin tests with coverage
run: ${{ github.workspace }}/scripts/coverage.sh

- name: Run google_cloud_firestore tests with coverage
run: ${{ github.workspace }}/scripts/firestore-coverage.sh

- name: Setup gcloud credentials
- name: Merge coverage reports
run: |
mkdir -p $HOME/.config/gcloud
echo '${{ secrets.CREDS }}' > $HOME/.config/gcloud/application_default_credentials.json

- name: Run tests with coverage
run: ${{ github.workspace }}/scripts/coverage.sh
# Save individual package coverage files before merging
cp coverage.lcov coverage_admin.lcov
cp ../google_cloud_firestore/coverage.lcov coverage_firestore.lcov

# Merge coverage reports from all packages (relative to packages/dart_firebase_admin)
# Only merge files that exist
COVERAGE_FILES=""
[ -f coverage.lcov ] && COVERAGE_FILES="$COVERAGE_FILES coverage.lcov"
[ -f ../google_cloud_firestore/coverage.lcov ] && COVERAGE_FILES="$COVERAGE_FILES ../google_cloud_firestore/coverage.lcov"

if [ -n "$COVERAGE_FILES" ]; then
cat $COVERAGE_FILES > merged_coverage.lcov
mv merged_coverage.lcov coverage.lcov
else
echo "No coverage files found!"
exit 1
fi

- name: Check coverage threshold and generate report
if: matrix.dart-version == 'stable'
id: coverage
run: |
dart pub global activate coverage

# Generate coverage report
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage.lcov --packages=.dart_tool/package_config.json --report-on=lib

# Calculate total coverage
# Calculate coverage for each package
calculate_coverage() {
local file=$1
if [ -f "$file" ]; then
local total=$(grep -E "^LF:" "$file" | awk -F: '{sum+=$2} END {print sum}')
local hit=$(grep -E "^LH:" "$file" | awk -F: '{sum+=$2} END {print sum}')
if [ "$total" -gt 0 ]; then
local pct=$(awk "BEGIN {printf \"%.2f\", ($hit/$total)*100}")
echo "$pct|$hit|$total"
else
echo "0.00|0|0"
fi
else
echo "0.00|0|0"
fi
}

# Get individual package coverage from saved copies
ADMIN_COV=$(calculate_coverage "coverage_admin.lcov")
FIRESTORE_COV=$(calculate_coverage "coverage_firestore.lcov")
STORAGE_COV=$(calculate_coverage "coverage_storage.lcov")

ADMIN_PCT=$(echo $ADMIN_COV | cut -d'|' -f1)
ADMIN_HIT=$(echo $ADMIN_COV | cut -d'|' -f2)
ADMIN_TOTAL=$(echo $ADMIN_COV | cut -d'|' -f3)

FIRESTORE_PCT=$(echo $FIRESTORE_COV | cut -d'|' -f1)
FIRESTORE_HIT=$(echo $FIRESTORE_COV | cut -d'|' -f2)
FIRESTORE_TOTAL=$(echo $FIRESTORE_COV | cut -d'|' -f3)

STORAGE_PCT=$(echo $STORAGE_COV | cut -d'|' -f1)
STORAGE_HIT=$(echo $STORAGE_COV | cut -d'|' -f2)
STORAGE_TOTAL=$(echo $STORAGE_COV | cut -d'|' -f3)

# Calculate total coverage from merged file
TOTAL_LINES=$(grep -E "^(DA|LF):" coverage.lcov | grep "^LF:" | awk -F: '{sum+=$2} END {print sum}')
HIT_LINES=$(grep -E "^(DA|LH):" coverage.lcov | grep "^LH:" | awk -F: '{sum+=$2} END {print sum}')

Expand All @@ -135,11 +197,21 @@ jobs:
COVERAGE_PCT="0.00"
fi

# Output for GitHub Actions
echo "coverage=${COVERAGE_PCT}" >> $GITHUB_OUTPUT
echo "total_lines=${TOTAL_LINES}" >> $GITHUB_OUTPUT
echo "hit_lines=${HIT_LINES}" >> $GITHUB_OUTPUT

echo "Coverage: ${COVERAGE_PCT}% (${HIT_LINES}/${TOTAL_LINES} lines)"
echo "admin_coverage=${ADMIN_PCT}" >> $GITHUB_OUTPUT
echo "firestore_coverage=${FIRESTORE_PCT}" >> $GITHUB_OUTPUT
echo "storage_coverage=${STORAGE_PCT}" >> $GITHUB_OUTPUT

# Console output
echo "=== Coverage Report ==="
echo "dart_firebase_admin: ${ADMIN_PCT}% (${ADMIN_HIT}/${ADMIN_TOTAL} lines)"
echo "google_cloud_firestore: ${FIRESTORE_PCT}% (${FIRESTORE_HIT}/${FIRESTORE_TOTAL} lines)"
echo "----------------------"
echo "Total: ${COVERAGE_PCT}% (${HIT_LINES}/${TOTAL_LINES} lines)"

# Check threshold
if (( $(echo "$COVERAGE_PCT < 40" | bc -l) )); then
Expand All @@ -150,22 +222,31 @@ jobs:
fi

- name: Comment coverage on PR
if: matrix.dart-version == 'stable' && github.event_name == 'pull_request'
if: matrix.dart-version == 'stable' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
uses: actions/github-script@v6
with:
script: |
const coverage = '${{ steps.coverage.outputs.coverage }}';
const status = '${{ steps.coverage.outputs.status }}';
const hitLines = '${{ steps.coverage.outputs.hit_lines }}';
const totalLines = '${{ steps.coverage.outputs.total_lines }}';
const adminCov = '${{ steps.coverage.outputs.admin_coverage }}';
const firestoreCov = '${{ steps.coverage.outputs.firestore_coverage }}';
const storageCov = '${{ steps.coverage.outputs.storage_coverage }}';

const body = `## Coverage Report

${status}

**Coverage:** ${coverage}%
**Total Coverage:** ${coverage}%
**Lines Covered:** ${hitLines}/${totalLines}

### Package Breakdown
| Package | Coverage |
|---------|----------|
| dart_firebase_admin | ${adminCov}% |
| google_cloud_firestore | ${firestoreCov}% |

_Minimum threshold: 40%_`;

// Find existing comment
Expand Down Expand Up @@ -207,10 +288,74 @@ jobs:
flags: unittests
fail_ci_if_error: false

test-integration:
name: Test - Integration (Dart ${{ matrix.dart-version }})
runs-on: ubuntu-latest
# Skip for fork PRs — secrets are not available
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
permissions:
contents: 'read'
id-token: 'write'

strategy:
fail-fast: false
matrix:
dart-version: [stable, beta]

defaults:
run:
working-directory: packages/dart_firebase_admin

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: subosito/flutter-action@v2.7.1
with:
channel: ${{ matrix.dart-version }}

- name: Authenticate to Google Cloud/Firebase
uses: google-github-actions/auth@v2
with:
workload_identity_provider: '${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.SERVICE_ACCOUNT }}'

- name: Cache pub dependencies
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: pub-${{ matrix.dart-version }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pub-${{ matrix.dart-version }}-
pub-

- name: Add pub cache bin to PATH
run: |
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
echo "PUB_CACHE=$HOME/.pub-cache" >> $GITHUB_ENV

- name: Install Melos
run: dart pub global activate melos
working-directory: .

- name: Bootstrap workspace
run: melos bootstrap
working-directory: .

- name: Run integration tests
run: dart test test/app/firebase_app_prod_test.dart --concurrency=1

build:
name: Build verification (Dart ${{ matrix.dart-version }})
runs-on: ubuntu-latest
needs: [lint, test]
needs: [lint, test, test-integration]
# Run even if test-integration was skipped (fork PRs), but not if lint or test failed
if: |
always() &&
needs.lint.result == 'success' &&
needs.test.result == 'success' &&
(needs.test-integration.result == 'success' || needs.test-integration.result == 'skipped')

strategy:
fail-fast: false
Expand All @@ -237,8 +382,13 @@ jobs:
pub-${{ matrix.dart-version }}-
pub-

- name: Install dependencies
run: dart pub get && cd example && dart pub get && cd -
- name: Install Melos
run: dart pub global activate melos
working-directory: .

- name: Bootstrap workspace
run: melos bootstrap
working-directory: .

- name: Verify package
run: dart pub publish --dry-run
68 changes: 68 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Deploy Documentation

on:
push:
branches:
- next
pull_request:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@v2
with:
channel: stable

- name: Cache pub dependencies
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: pub-docs-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pub-docs-
pub-

- name: Install Melos
run: dart pub global activate melos

- name: Bootstrap workspace
run: melos bootstrap

- name: Generate documentation
run: melos run docs --no-select

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: doc

deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
firebase-debug.log
ui-debug.log
firestore-debug.log
coverage.lcov

node_modules
packages/dart_firebase_admin/test/client/package-lock.json

build
coverage
doc/api

.DS_Store
.atom/
Expand All @@ -32,4 +34,4 @@ pubspec.lock

service-account.json

**/pubspec_overrides.yaml
**/pubspec_overrides.yaml
1 change: 0 additions & 1 deletion all_lint_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,4 @@ linter:
- use_string_in_part_of_directives
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- void_checks
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include: all_lint_rules.yaml
analyzer:
exclude:
- packages/dart_firebase_admin/example_server_app/**
language:
strict-casts: true
strict-inference: true
Expand Down
Loading
Loading