Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firebase/firebase-tools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.34.0
Choose a base ref
...
head repository: firebase/firebase-tools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.35.0
Choose a head ref

Commits on Mar 11, 2025

  1. [firebase-release] Removed change log and reset repo after 13.34.0 re…

    …lease
    google-oss-bot committed Mar 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    362a895 View commit details

Commits on Mar 12, 2025

  1. Fix deploy with multiple target/site in firebase.json (#8314)

    * Fix deploy with multiple target/site in firebase.json
    
    * refactor isDeployingWebFramework and tests (#8315)
    
    * refactor isDeployingWebFramework and tests
    
    * comment
    
    * comments
    
    * comments
    
    * use same tests for site and config
    
    * Changelog
    
    ---------
    
    Co-authored-by: Leonardo Ortiz <leo@monogram.io>
    chalosalvador and leoortizz authored Mar 12, 2025
    Copy the full SHA
    bbc33ec View commit details

Commits on Mar 13, 2025

  1. update to 0.14.2 (#8319)

    hlshen authored Mar 13, 2025
    Copy the full SHA
    0622def View commit details
  2. fix broken doc links in fdc vs code ext (#8320)

    Co-authored-by: Harold Shen <hlshen@google.com>
    thatfiredev and hlshen authored Mar 13, 2025
    Copy the full SHA
    f25cd38 View commit details
  3. feat: support custom webpack and ngx-env builders (#7557)

    * feat: support custom webpack builder
    
    * fix: lint
    
    * feat: ngx env builder
    
    * fix: add changelog
    
    * support for different angular builders (#8256)
    
    * Added handling for different angular builders
    
    * Remove unused method from angular
    
    * Review changes, tests and cleaning
    
    * Removing empty jsdocs
    
    * Fixing tests
    
    * Update src/frameworks/angular/utils.ts
    
    ---------
    
    Co-authored-by: Leonardo Ortiz <leo@monogram.io>
    
    * top level describe for angular utils
    
    ---------
    
    Co-authored-by: Leonardo Ortiz <leo@monogram.io>
    Co-authored-by: Przemyslaw Sokolowski <bboy_sokol@o2.pl>
    Co-authored-by: James Daniels <jamesdaniels@google.com>
    4 people authored Mar 13, 2025
    Copy the full SHA
    11c6ffc View commit details

Commits on Mar 14, 2025

  1. Add a new command to setup a cleanup policy for functions artifacts (#…

    …8268)
    
    * Add new command to setup a cleanup policy
    
    * Refactor.
    
    * Nits.
    
    * nitnit
    
    * Nits.
    
    * Support --force.
    
    * Respond to PR comments.
    
    * Fix command path.
    
    * One liners.
    taeold authored Mar 14, 2025
    Copy the full SHA
    3bb75a0 View commit details

Commits on Mar 16, 2025

  1. Give more informative output for timeout error. (#8240)

    * Give more informative output for timeout error.
    
    * Forgot the $$
    
    * Link to documentation 🚀
    
    Co-authored-by: Daniel Lee <taeold@gmail.com>
    
    * Lint
    
    ---------
    
    Co-authored-by: Daniel Lee <taeold@gmail.com>
    MaitreyaBuddha and taeold authored Mar 16, 2025
    Copy the full SHA
    364ec96 View commit details

Commits on Mar 17, 2025

  1. Revamp execution to direct users to edit variables if missing require…

    …d variables (#8223)
    
    * refactor
    
    * temp
    
    * Revamp flow to send users to edit args w/ defaults provided
    
    * add test
    
    * fix test
    
    * changelog
    
    * Address comments
    
    * replace empty args with valid json
    hlshen authored Mar 17, 2025
    Copy the full SHA
    a37fa4a View commit details
  2. Fix GCF V2 Artifact Registry cleanup (#8318)

    * Update packageName to delete artifacts during function cleanup
    
    * Add example to packagePath
    
    * Add artifact name schema
    
    * Changelog
    
    * Update packageName to handle v1 and v2 deployments
    
    * Update tests
    chalosalvador authored Mar 17, 2025
    Copy the full SHA
    61afeba View commit details

Commits on Mar 18, 2025

  1. Add support for secrets in the App Hosting emulator (#8305)

    The emulator can now read secret references at startup. Care is taken to be fully reverse compatible so that projectId is only needed when loading a secret value from an id. Cloud Secrets Manager is only ever called if the customer tries to reference the secret.
    
    Future changes may evolve the best practice to move customers to using a secret reference, but must steer customers (hard) away from accidentally committing a plaintext secret to their repository.
    inlined authored Mar 18, 2025
    Copy the full SHA
    90b3f17 View commit details

Commits on Mar 19, 2025

  1. Make sure IAM user is created before schema setup / migration. (#8335)

    * Run createUser in getSchemaMetadata for now, will reduce calls later
    
    * Make setting up iam user explicit instead of implicit
    
    * Add changlog
    
    * Add quotes
    
    * fix lint
    tammam-g authored Mar 19, 2025
    Copy the full SHA
    51448f8 View commit details
  2. Increase body-parser limit for emulator UI (#8332)

    joehan authored Mar 19, 2025
    Copy the full SHA
    a885d59 View commit details
  3. Fixing extensions path recognition (#8331)

    * Fixing extensions path recognition
    
    * formats
    
    * Always check for fwd slashes
    
    * remove extra -
    joehan authored Mar 19, 2025
    Copy the full SHA
    07356d2 View commit details
  4. Bump FDC local toolkit to v1.9.0. (#8338)

    * Bump FDC local toolkit to v1.9.0.
    
    * Update changelog.
    rosalyntan authored Mar 19, 2025
    Copy the full SHA
    8850562 View commit details
  5. Added generated angular sdk support (#8291)

    maneesht authored Mar 19, 2025
    Copy the full SHA
    622a373 View commit details

Commits on Mar 20, 2025

  1. Bump FDC local toolkit to v1.9.1. (#8340)

    * Bump FDC local toolkit to v1.9.1.
    
    * Update changelog.
    rosalyntan authored Mar 20, 2025
    Copy the full SHA
    253ada1 View commit details
  2. Added apphosting and dataconnect links (#8235)

    * Added apphosting and dataconnect links
    
    * Added extensions to open command
    aalej authored Mar 20, 2025
    Copy the full SHA
    dffaa72 View commit details
  3. Fix swift template (#8345)

    joehan authored Mar 20, 2025
    Copy the full SHA
    9b89121 View commit details
  4. Improve fdc permissions setup (#8339)

    * Run createUser in getSchemaMetadata for now, will reduce calls later
    
    * Make setting up iam user explicit instead of implicit
    
    * Add changlog
    
    * improve schema diff
    
    * Add quotes
    
    * fix lint
    
    * Don't block schema deployment
    
    * Improve schema setup by making sure we execute changes in transaction, revoke users, and have sufficient permissions before diffing
    
    * Fix lint issues
    
    * Address code review comments
    
    * Reuse setupSchemaIfNecessary in grant roles function (DRY)
    tammam-g authored Mar 20, 2025
    Copy the full SHA
    57eed28 View commit details
  5. Provide firebase login credentials to Data connect emulator (#8342)

    joehan authored Mar 20, 2025
    Copy the full SHA
    accf614 View commit details
  6. Bump FDC local toolkit to 1.9.2. (#8347)

    * Bump FDC local toolkit to 1.9.2.
    
    * Update changelog.
    
    * Update CHANGELOG.md
    
    ---------
    
    Co-authored-by: joehan <joehanley@google.com>
    rosalyntan and joehan authored Mar 20, 2025
    Copy the full SHA
    25b8b9b View commit details
  7. More correct pg wire protocol error handling (#8348)

    joehan authored Mar 20, 2025
    Copy the full SHA
    72a312d View commit details
  8. 13.35.0

    google-oss-bot committed Mar 20, 2025
    Copy the full SHA
    a06c38d View commit details
Showing with 2,324 additions and 882 deletions.
  1. +14 −5 CHANGELOG.md
  2. +7 −0 firebase-vscode/CHANGELOG.md
  3. +11 −3 firebase-vscode/common/messaging/protocol.ts
  4. +2 −2 firebase-vscode/package-lock.json
  5. +1 −1 firebase-vscode/package.json
  6. +32 −25 firebase-vscode/src/data-connect/ad-hoc-mutations.ts
  7. 0 firebase-vscode/src/data-connect/{ → execution}/execution-history-provider.ts
  8. +1 −1 firebase-vscode/src/data-connect/{ → execution}/execution-store.ts
  9. +200 −11 firebase-vscode/src/data-connect/{ → execution}/execution.ts
  10. +1 −1 firebase-vscode/src/data-connect/index.ts
  11. +1 −1 firebase-vscode/src/data-connect/sdk-generation.ts
  12. +2 −0 firebase-vscode/src/test/default_wdio.conf.ts
  13. +0 −3 firebase-vscode/src/test/integration/fishfood/execution.ts
  14. +71 −0 firebase-vscode/src/test/integration/fishfood/exeuction-missing-variables.ts
  15. +1 −1 firebase-vscode/src/test/test_projects/fishfood/dataconnect/connectors/a/mutations.gql
  16. +18 −0 firebase-vscode/src/test/utils/page_objects/execution.ts
  17. +15 −5 firebase-vscode/src/test/utils/page_objects/notifications.ts
  18. +1 −1 firebase-vscode/webviews/SidebarApp.tsx
  19. +1 −1 firebase-vscode/webviews/components/ProjectSection.tsx
  20. +2 −2 firebase-vscode/webviews/data-connect/DataConnectExecutionResultsApp.tsx
  21. +11 −1 firebase-vscode/webviews/data-connect/data-connect-execution-configuration.entry.scss
  22. +40 −8 firebase-vscode/webviews/data-connect/data-connect-execution-configuration.entry.tsx
  23. +1 −1 firebase-vscode/webviews/data-connect/data-connect.entry.tsx
  24. +2 −2 npm-shrinkwrap.json
  25. +1 −1 package.json
  26. +22 −65 src/apphosting/config.spec.ts
  27. +8 −6 src/apphosting/config.ts
  28. +43 −186 src/apphosting/yaml.spec.ts
  29. +29 −63 src/apphosting/yaml.ts
  30. +4 −1 src/commands/dataconnect-sdk-generate.ts
  31. +1 −0 src/commands/dataconnect-sql-diff.ts
  32. +14 −2 src/commands/dataconnect-sql-setup.ts
  33. +178 −0 src/commands/functions-artifacts-setpolicy.ts
  34. +2 −0 src/commands/index.ts
  35. +3 −0 src/commands/open.ts
  36. +4 −2 src/dataconnect/build.ts
  37. +37 −25 src/dataconnect/fileUtils.spec.ts
  38. +8 −6 src/dataconnect/fileUtils.ts
  39. +51 −36 src/dataconnect/schemaMigration.ts
  40. +1 −0 src/dataconnect/types.ts
  41. +10 −0 src/defaultCredentials.ts
  42. +1 −0 src/deploy/dataconnect/prepare.ts
  43. +102 −28 src/deploy/functions/containerCleaner.spec.ts
  44. +45 −15 src/deploy/functions/containerCleaner.ts
  45. +3 −1 src/deploy/functions/runtimes/discovery/index.ts
  46. +78 −110 src/deploy/index.spec.ts
  47. +17 −7 src/deploy/index.ts
  48. +1 −1 src/emulator/ExpressBasedEmulator.ts
  49. +29 −99 src/emulator/apphosting/config.spec.ts
  50. +2 −0 src/emulator/apphosting/index.ts
  51. +95 −9 src/emulator/apphosting/serve.spec.ts
  52. +63 −8 src/emulator/apphosting/serve.ts
  53. +1 −0 src/emulator/controller.ts
  54. +9 −3 src/emulator/dataconnect/pgliteServer.ts
  55. +27 −5 src/emulator/dataconnectEmulator.ts
  56. +9 −9 src/emulator/downloadableEmulators.ts
  57. +29 −0 src/emulator/env.ts
  58. +11 −32 src/emulator/functionsEmulator.ts
  59. +10 −4 src/extensions/extensionsHelper.ts
  60. +39 −0 src/frameworks/angular/utils.spec.ts
  61. +62 −58 src/frameworks/angular/utils.ts
  62. +472 −0 src/functions/artifacts.spec.ts
  63. +179 −0 src/functions/artifacts.ts
  64. +69 −1 src/gcp/artifactregistry.ts
  65. +19 −3 src/gcp/cloudsql/connect.ts
  66. +72 −17 src/gcp/cloudsql/permissions_setup.ts
  67. +1 −1 src/init/features/dataconnect/index.ts
  68. +27 −2 src/init/features/dataconnect/sdk.ts
  69. +1 −1 templates/init/dataconnect/connector.yaml
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
- Fix webframeworks deployments when using `site` in `firebase.json`. (#8295)
- Add support for brownfield project onboard `dataconnect:sql:setup`. (#8150)
- Update the Firebase Data Connect local toolkit to v1.8.5, which includes the following changes: (#8310)
- Fix the `Int` and `Int64` scalars to correctly validate the `int32` and `int64` ranges, respectively.
- Fix the generated web SDK so that `pnpm` properly uses the `link` functionality.
- Added support for generated Angular SDKs for Data Connect
- App Hosting emulator can now load secret env vars. (#8305)
- Fixed webframeworks deployments when using multiple hosting sites in `firebase.json`. (#8314)
- Added a new command to setup a cleanup policy for functions artifacts. (#8268)
- Added support for 3rd party builders for Angular. (#7557)
- Fixed GCF V2 artifact cleanup by correctly encoding artifact names to match GCF V2's format. (#8318)
- Increase emulator UI body parser limit to match Storage emulator maximum. (#8329)
- Fixed Data Connect setup issues for fresh databases due to IAM user not being created. (#8335)
- Fixed an issue where `ext:install` used POSIX file seperators on Windows machines. (#8326)
- Updated the Firebase Data Connect local toolkit to v1.9.2, which adds support for generated Angular SDKs and updates Dart SDK fields to follow best practices. (#8347)
- Fixed an issue where credentials from `firebase login` would not be correctly provided to the Data Connect emulator.
- Fixed misleading comments in `firebase init dataconnect` `connector.yaml` template.
- Improved Data Connect SQL permissions to better handle tables owned by IAM roles. (#8339)
- Fixed an issue where the Data Connect emulator would crash after some SQL errors.
7 changes: 7 additions & 0 deletions firebase-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## NEXT

- [Added] Added rerun execution button in variables context
- [Added] Provide default required variables during execution

## 0.14.2

- Updated internal `firebase-tools` dependency to 13.34.0

## 0.14.1

- Updated internal `firebase-tools` dependency to 13.33.0
14 changes: 11 additions & 3 deletions firebase-vscode/common/messaging/protocol.ts
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@ export interface WebviewToExtensionParamsMap {

/** Opens settings page searching for Data Connect emualtor settings */
"fdc.open-emulator-settings": void;
/** Clears data from a running data connect emulator */

/** Clears data from a running data connect emulator */
"fdc.clear-emulator-data": void;

// Initialize "result" tab.
@@ -116,6 +116,11 @@ export interface WebviewToExtensionParamsMap {
executeLogin: void;

getDocsLink: void;

openJSONFile: string;

// called from execution panel
rerunExecution: void;
}

export interface DataConnectResults {
@@ -175,8 +180,11 @@ export interface ExtensionToWebviewParamsMap {
notifyPreviewChannelResponse: { id: string };

// data connect specific
notifyDataConnectArgs: string;

notifyDataConnectResults: DataConnectResults;
notifyDataConnectRequiredArgs: { args: string[] };

notifyLastOperation: string;

notifyIsLoadingUser: boolean;

4 changes: 2 additions & 2 deletions firebase-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion firebase-vscode/package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"publisher": "GoogleCloudTools",
"icon": "./resources/firebase_dataconnect_logo.png",
"description": "Firebase Data Connect for VSCode",
"version": "0.14.1",
"version": "0.14.2",
"engines": {
"vscode": "^1.69.0"
},
57 changes: 32 additions & 25 deletions firebase-vscode/src/data-connect/ad-hoc-mutations.ts
Original file line number Diff line number Diff line change
@@ -13,35 +13,17 @@ import {
isInputObjectType,
print,
} from "graphql";
import { checkIfFileExists, upsertFile } from "./file-utils";
import { upsertFile } from "./file-utils";
import { DataConnectService } from "./service";
import { DATA_CONNECT_EVENT_NAME } from "../analytics";
import { dataConnectConfigs } from "./config";
import { firstWhereDefined } from "../utils/signal";
import {AnalyticsLogger} from "../analytics";
import { AnalyticsLogger } from "../analytics";

export function registerAdHoc(
dataConnectService: DataConnectService,
analyticsLogger: AnalyticsLogger,
): Disposable {
const defaultScalarValues = {
Any: "{}",
AuthUID: '""',
Boolean: "false",
Date: `"${new Date().toISOString().substring(0, 10)}"`,
Float: "0",
ID: '""',
Int: "0",
Int64: "0",
String: '""',
Timestamp: `"${new Date().toISOString()}"`,
Vector: "[]",
};

function isDataConnectScalarType(fieldType: string): boolean {
return fieldType in defaultScalarValues;
}

/**
* Creates a playground file with an ad-hoc mutation
* File will be created (unsaved) in operations/ folder, with an auto-generated named based on the schema type
@@ -173,8 +155,8 @@ query {
);

await upsertFile(filePath, () => {
const preamble =
"# This is a file for you to write an un-named mutation. \n# Only one un-named mutation is allowed per file.";
const preamble =
"# This is a file for you to write an un-named mutation. \n# Only one un-named mutation is allowed per file.";
const adhocMutation = print(
makeAdHocMutation(Object.values(dataType.getFields()), ast.name.value),
);
@@ -190,7 +172,7 @@ query {

for (const field of fields) {
const type = getNamedType(field.type);
const defaultValue = getDefaultScalarValue(type.name);
const defaultValue = getDefaultScalarValueNode(type.name);
if (!defaultValue) {
continue;
}
@@ -229,8 +211,7 @@ query {
},
};
}

function getDefaultScalarValue(type: string): ValueNode | undefined {
function getDefaultScalarValueNode(type: string): ValueNode | undefined {
switch (type) {
case "Any":
return { kind: Kind.OBJECT, fields: [] };
@@ -276,3 +257,29 @@ query {
),
);
}


export function getDefaultScalarValue(type: string): string {
switch (type) {
case "Boolean":
return "false";
case "Date":
return new Date().toISOString().substring(0, 10);
case "Float":
return "0";
case "Int":
return "0";
case "Int64":
return "0";
case "String":
return "";
case "Timestamp":
return new Date().toISOString();
case "UUID":
return "11111111222233334444555555555555";
case "Vector":
return "[]";
default:
return "";
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { computed } from "@preact/signals-core";
import { ExecutionResult, OperationDefinitionNode } from "graphql";
import * as vscode from "vscode";
import { globalSignal } from "../utils/globals";
import { globalSignal } from "../../utils/globals";

export enum ExecutionState {
INIT,
Loading