Skip to content

Commit 97c2479

Browse files
authored
Merge branch 'main' into inlined.ext-opt
2 parents 9a9dd4d + 107f7dc commit 97c2479

589 files changed

Lines changed: 38089 additions & 11836 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Update Pub/Sub Emulator
3+
description: How to update the Pub/Sub emulator
4+
---
5+
6+
# Update Pub/Sub Emulator
7+
8+
1. **Update Local Emulator**
9+
Run the following command to make sure you have the latest version of the pubsub emulator installed via gcloud:
10+
```bash
11+
gcloud components update pubsub-emulator
12+
```
13+
14+
2. **Locate Emulator Directory**
15+
The emulator represents a directory likely located at `<gcloud-install-path>/platform/pubsub-emulator`.
16+
You can find the exact path by running the emulator and checking the output, or by inspecting where `gcloud` is installed (e.g. `which gcloud` usually points to a bin directory, and the platform directory is a sibling of `bin`).
17+
Verify the version by running the emulator or checking the `VERSION` file if it exists.
18+
19+
3. **Package the Emulator**
20+
Zip the directory found in the previous step. Name it `pubsub-emulator-<version>.zip`.
21+
Ensure the zip structure is such that the top-level directory inside the zip is `pubsub-emulator`.
22+
*Note: The existing code expects the binary at `pubsub-emulator-<version>/pubsub-emulator/bin/cloud-pubsub-emulator` inside the cache, which usually means the zip contains a root folder `pubsub-emulator`.*
23+
24+
4. **Upload to Storage**
25+
Upload the zip file to the Firebase preview bucket:
26+
```bash
27+
gsutil cp pubsub-emulator-<version>.zip gs://firebase-preview-drop/emulator/
28+
```
29+
Make the file publicly readable if necessary (usually the bucket permissions handle this, or use `gsutil acl ch -u AllUsers:R ...`).
30+
31+
**Note:** For the version 0.8.27 update, this step was already done.
32+
33+
5. **Calculate Metadata**
34+
Calculate the file size in bytes, MD5 checksum, and SHA256 checksum of the zip file.
35+
```bash
36+
# Size
37+
ls -l pubsub-emulator-<version>.zip
38+
39+
# MD5 (macOS: `md5`, Linux: `md5sum`)
40+
md5 pubsub-emulator-<version>.zip
41+
42+
# SHA256 (macOS: `shasum -a 256`, Linux: `sha256sum`)
43+
shasum -a 256 pubsub-emulator-<version>.zip
44+
```
45+
46+
6. **Update Configuration**
47+
Edit `src/emulator/downloadableEmulatorInfo.json`:
48+
- Update `pubsub.version` to the new version.
49+
- Update `pubsub.expectedSize`.
50+
- Update `pubsub.expectedChecksum` (MD5).
51+
- Update `pubsub.expectedChecksumSHA256`.
52+
- Update `pubsub.remoteUrl` and `pubsub.downloadPathRelativeToCacheDir`.
53+
54+
7. **Verify**
55+
Run the emulators to ensure the new version is downloaded and starts correctly.
56+
```bash
57+
firebase emulators:start --only pubsub
58+
```
59+
60+
8. **Add a Changelog Entry**
61+
Add a changelog entry to `CHANGELOG.md` like '- Updated Pub/Sub emulator to version <version>'
62+

.claude-plugin/marketplace.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "firebase",
3+
"owner": {
4+
"name": "Firebase",
5+
"email": "firebase-support@google.com"
6+
},
7+
"metadata": {
8+
"description": "Official Claude plugin for Firebase to help understand and manage your Firebase project, resources, and data",
9+
"version": "1.0.0"
10+
},
11+
"plugins": [
12+
{
13+
"name": "firebase",
14+
"description": "Claude plugin for Firebase that installs the Firebase MCP server and helps to manage Firebase projects, add backend services, add AI features, deploy & host apps, and more",
15+
"version": "1.0.0",
16+
"author": {
17+
"name": "Firebase",
18+
"url": "https://firebase.google.com/"
19+
},
20+
"homepage": "https://github.com/firebase/firebase-tools",
21+
"repository": "https://github.com/firebase/firebase-tools.git",
22+
"license": "MIT",
23+
"keywords": [
24+
"firebase",
25+
"mcp",
26+
"cloud",
27+
"firestore",
28+
"database",
29+
"hosting",
30+
"functions",
31+
"cli"
32+
],
33+
"category": "development",
34+
"tags": ["firebase", "backend", "database", "cloud-services"],
35+
"mcpServers": {
36+
"firebase": {
37+
"description": "Firebase MCP server for understanding and managing your Firebase project, resources, and data",
38+
"command": "npx",
39+
"args": ["-y", "firebase-tools", "mcp", "--dir", "."],
40+
"env": {
41+
"IS_FIREBASE_MCP": "true"
42+
}
43+
}
44+
},
45+
"source": "./"
46+
}
47+
]
48+
}

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ node_modules
55
standalone
66
templates
77
.firebase
8+
scripts/agent-evals/output
9+
scripts/agent-evals/node_modules
10+
scripts/agent-evals/lib
11+
scripts/agent-evals/templates
12+
julesbot
13+
.agent

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Run `npm test` to make sure your changes compile properly and the tests all pass
1414

1515
### Scenarios Tested
1616

17-
<!-- Write a list of all the user journeys and edge cases you've tested. Instructions for manual testing can be found at https://github.com/firebase/firebase-tools/blob/master/.github/CONTRIBUTING.md#development-setup -->
17+
<!-- Write a list of all the user journeys and edge cases you've tested. Instructions for manual testing can be found at https://github.com/firebase/firebase-tools/blob/main/.github/CONTRIBUTING.md#development-setup -->
1818

1919
### Sample Commands
2020

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
37
- package-ecosystem: "npm"
48
directory: "/"
59
schedule:

.github/workflows/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ The following secrets must be defined on the project:
1515
| ----------------------------- | ------------------------------------------------------------------------------ |
1616
| `FBTOOLS_TARGET_PROJECT` | The project ID that should be used for integration tests |
1717
| `service_account_json_base64` | A base64-encoded service account JSON file with access to the selected project |
18+
| `GEMINI_API_KEY` | The Gemini API Key used for Agent Evals |

.github/workflows/agent-evals.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Agent Evals
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Run every 6 hours
7+
- cron: "0 */6 * * *"
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: agent-evals-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CI: true
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
node-version:
25+
- "20"
26+
env:
27+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v3
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
cache: npm
34+
cache-dependency-path: npm-shrinkwrap.json
35+
36+
- run: npm i -g npm@9.5
37+
- run: npm install -g @google/gemini-cli
38+
- run: npm ci
39+
- run: npm install
40+
working-directory: scripts/agent-evals
41+
- name: "Run agent-evals tests"
42+
run: |-
43+
set -euo pipefail
44+
45+
# Create temporary directories and clean them up when we're done
46+
TEMP_STDOUT="$(mktemp -p "${RUNNER_TEMP}" gemini-out.XXXXXXXXXX)"
47+
TEMP_STDERR="$(mktemp -p "${RUNNER_TEMP}" gemini-err.XXXXXXXXXX)"
48+
function cleanup {
49+
rm -f "${TEMP_STDOUT}" "${TEMP_STDERR}"
50+
}
51+
trap cleanup EXIT
52+
53+
npm run test 2> "${TEMP_STDERR}" 1> "${TEMP_STDOUT}"
54+
55+
# Write the logs and errors to GITHUB_OUTPUT
56+
mkdir -p gemini-artifacts
57+
cp "${TEMP_STDOUT}" gemini-artifacts/stdout.log
58+
cp "${TEMP_STDERR}" gemini-artifacts/stderr.log
59+
cat "${TEMP_STDOUT}" >> "${GITHUB_OUTPUT}"
60+
echo "EOF" >> "${GITHUB_OUTPUT}"
61+
cat "${TEMP_STDERR}" >> "${GITHUB_OUTPUT}"
62+
echo "EOF" >> "${GITHUB_OUTPUT}"
63+
64+
working-directory: scripts/agent-evals

.github/workflows/node-test.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
node-version:
4949
- "20"
5050
- "22"
51+
- "24"
5152
steps:
5253
- uses: actions/checkout@v4
5354
- uses: actions/setup-node@v3
@@ -84,7 +85,7 @@ jobs:
8485
# - name: Setup Java JDK
8586
# uses: actions/setup-java@v3.3.0
8687
# with:
87-
# java-version: 17
88+
# java-version: 21
8889
# distribution: temurin
8990

9091
# - uses: actions/checkout@v4
@@ -125,13 +126,35 @@ jobs:
125126
# - uses: codecov/codecov-action@v3
126127
# if: matrix.node-version == '20'
127128

129+
agent_evals_build:
130+
runs-on: ubuntu-latest
131+
strategy:
132+
matrix:
133+
node-version:
134+
- "22"
135+
steps:
136+
- uses: actions/checkout@v4
137+
- uses: actions/setup-node@v3
138+
with:
139+
node-version: ${{ matrix.node-version }}
140+
cache: npm
141+
cache-dependency-path: scripts/agent-evals/package-lock.json
142+
143+
- run: npm i -g npm@9.5
144+
- run: npm ci
145+
- run: npm install
146+
working-directory: scripts/agent-evals
147+
- run: npm run build
148+
working-directory: scripts/agent-evals
149+
128150
unit:
129151
runs-on: ubuntu-latest
130152
strategy:
131153
matrix:
132154
node-version:
133155
- "20"
134156
- "22"
157+
- "24"
135158
steps:
136159
- uses: actions/checkout@v4
137160
- uses: actions/setup-node@v3
@@ -188,6 +211,11 @@ jobs:
188211
node-version: ${{ matrix.node-version }}
189212
cache: npm
190213
cache-dependency-path: npm-shrinkwrap.json
214+
- name: Setup Java JDK
215+
uses: actions/setup-java@v3.3.0
216+
with:
217+
java-version: 21
218+
distribution: temurin
191219
- name: Setup Chrome
192220
uses: browser-actions/setup-chrome@v1.7.2
193221
with:
@@ -242,12 +270,12 @@ jobs:
242270
# - npm run test:storage-emulator-integration
243271
# - npm run test:dataconnect-deploy # TODO (joehanley): Reenable this - it should be safe to run in parallel
244272
# - npm run test:dataconnect-emulator # TODO (joehanley): Figure out why this is failing
245-
- npm run test:frameworks
273+
# - npm run test:frameworks
246274
steps:
247275
- name: Setup Java JDK
248276
uses: actions/setup-java@v3.3.0
249277
with:
250-
java-version: 17
278+
java-version: 21
251279
distribution: temurin
252280

253281
- uses: actions/checkout@v4
@@ -280,15 +308,14 @@ jobs:
280308
matrix:
281309
node-version:
282310
- "20"
283-
- "22"
284311

285312
steps:
286313
- uses: actions/checkout@v4
287314
- name: Use Node.js ${{ matrix.node-version }}
288315
uses: actions/setup-node@v3
289316
with:
290317
node-version: ${{ matrix.node-version }}
291-
- run: npm i -g npm@9.5
318+
- run: npm i -g npm@11.9
292319
# --ignore-scripts prevents the `prepare` script from being run.
293320
- run: npm install --package-lock-only --ignore-scripts
294321
- run: "git diff --exit-code -- npm-shrinkwrap.json || (echo 'Error: npm-shrinkwrap.json is changed during npm install! Please make sure to use npm >= 8 and commit npm-shrinkwrap.json.' && false)"
@@ -300,15 +327,14 @@ jobs:
300327
matrix:
301328
node-version:
302329
- "20"
303-
- "22"
304330

305331
steps:
306332
- uses: actions/checkout@v4
307333
- name: Use Node.js ${{ matrix.node-version }}
308334
uses: actions/setup-node@v3
309335
with:
310336
node-version: ${{ matrix.node-version }}
311-
- run: npm i -g npm@9.5
337+
- run: npm i -g npm@11.9
312338
# --ignore-scripts prevents the `prepare` script from being run.
313339
- run: "(cd firebase-vscode && npm install --package-lock-only --ignore-scripts)"
314340
- run: "git diff --exit-code -- firebase-vscode/package-lock.json || (echo 'Error: firebase-vscode/package-lock.json is changed during npm install! Please make sure to use npm >= 8 and commit firebase-vscode/package-lock.json.' && false)"
@@ -320,7 +346,6 @@ jobs:
320346
matrix:
321347
node-version:
322348
- "20"
323-
- "22"
324349

325350
steps:
326351
- uses: actions/checkout@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ src/test/emulators/extensions/firebase/storage-resize-images@0.1.18/functions/pa
33
src/test/emulators/extensions/firebase/storage-resize-images@0.1.18/functions/package-lock.json
44
scripts/functions-deploy-tests/**/package-lock.json
55
scripts/functions-discover-tests/**/**/package-lock.json
6+
scripts/agent-evals/output
67
.dataconnect
78
*-debug.log
89

@@ -27,6 +28,8 @@ yarn.lock
2728
scripts/*.json
2829

2930
lib/
31+
!scripts/agent-evals/templates/crashlytics-flutter/lib/
3032
dev/
3133
clean/
3234
.gemini/
35+
.env

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
/scripts/frameworks-tests/vite-project/**
66
/scripts/webframeworks-deploy-tests/angular/**
77
/scripts/webframeworks-deploy-tests/nextjs/**
8+
/scripts/agent-evals/output/**
89
/src/frameworks/docs/**
910
/prompts
11+
/.agent
1012

1113
# Intentionally invalid YAML file:
1214
/src/test/fixtures/extension-yamls/invalid/extension.yaml

0 commit comments

Comments
 (0)