Skip to content

Commit b1843f0

Browse files
committed
Merge branch 'master' into zip-deploy-4
2 parents dba4631 + 2db9277 commit b1843f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1556
-377
lines changed
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+

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ scripts/agent-evals/output
99
scripts/agent-evals/node_modules
1010
scripts/agent-evals/lib
1111
scripts/agent-evals/templates
12-
julesbot
12+
julesbot
13+
.agent

.github/workflows/node-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ jobs:
315315
uses: actions/setup-node@v3
316316
with:
317317
node-version: ${{ matrix.node-version }}
318-
- run: npm i -g npm@9.5
318+
- run: npm i -g npm@11.9
319319
# --ignore-scripts prevents the `prepare` script from being run.
320320
- run: npm install --package-lock-only --ignore-scripts
321321
- 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)"
@@ -334,7 +334,7 @@ jobs:
334334
uses: actions/setup-node@v3
335335
with:
336336
node-version: ${{ matrix.node-version }}
337-
- run: npm i -g npm@9.5
337+
- run: npm i -g npm@11.9
338338
# --ignore-scripts prevents the `prepare` script from being run.
339339
- run: "(cd firebase-vscode && npm install --package-lock-only --ignore-scripts)"
340340
- 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)"

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/scripts/agent-evals/output/**
99
/src/frameworks/docs/**
1010
/prompts
11+
/.agent
1112

1213
# Intentionally invalid YAML file:
1314
/src/test/fixtures/extension-yamls/invalid/extension.yaml

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
- Added initial zip deploy support in functions deploy for HTTP functions (#9707)
2-
- Fixes an issue where Python was missing from the firebase-tools Docker image (#9855).

firebase-vscode/package-lock.json

Lines changed: 0 additions & 152 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm-shrinkwrap.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase-tools",
3-
"version": "15.5.1",
3+
"version": "15.6.0",
44
"description": "Command-Line Interface for Firebase",
55
"main": "./lib/index.js",
66
"mcpName": "io.github.firebase/firebase-mcp",

schema/firebase-config.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,42 @@
1616
],
1717
"type": "string"
1818
},
19+
"AuthConfig": {
20+
"additionalProperties": false,
21+
"properties": {
22+
"providers": {
23+
"additionalProperties": false,
24+
"properties": {
25+
"anonymous": {
26+
"type": "boolean"
27+
},
28+
"emailPassword": {
29+
"type": "boolean"
30+
},
31+
"googleSignIn": {
32+
"additionalProperties": false,
33+
"properties": {
34+
"authorizedRedirectUris": {
35+
"items": {
36+
"type": "string"
37+
},
38+
"type": "array"
39+
},
40+
"oAuthBrandDisplayName": {
41+
"type": "string"
42+
},
43+
"supportEmail": {
44+
"type": "string"
45+
}
46+
},
47+
"type": "object"
48+
}
49+
},
50+
"type": "object"
51+
}
52+
},
53+
"type": "object"
54+
},
1955
"DataConnectSingle": {
2056
"additionalProperties": false,
2157
"properties": {
@@ -1161,6 +1197,9 @@
11611197
}
11621198
]
11631199
},
1200+
"auth": {
1201+
"$ref": "#/definitions/AuthConfig"
1202+
},
11641203
"database": {
11651204
"anyOf": [
11661205
{

scripts/build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ RUN curl -fsSL --output hub.tgz https://github.com/github/hub/releases/download/
1111
RUN tar --strip-components=2 -C /usr/bin -xf hub.tgz hub-linux-amd64-2.14.2/bin/hub
1212

1313
# Upgrade npm to 10.
14-
RUN npm install --global npm@10.8
14+
RUN npm install --global npm@11.9

0 commit comments

Comments
 (0)