You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Migrate Node-1st-gen samples from functions.config to params (#1229)
* feat: Migrate Node-1st-gen samples from functions.config to params
Migrates all Cloud Functions for Firebase samples in the Node-1st-gen folder that use the functions.config API to the new params API.
This includes:
- Replacing `functions.config()` with `defineString` for non-sensitive data and `defineSecret` for sensitive data.
- Updating function definitions with `runWith({secrets: [...]})` where necessary.
- Moving API client initializations from the global scope into function handlers to ensure that parameter values are available at runtime.
- Updating all relevant README.md files and code comments to reflect the new configuration methods.
* feat(Node-1st-gen): Migrate functions.config to params
Migrates all 1st-gen Node.js samples from the deprecated functions.config API to the new params API.
- Updates all instances of functions.config() to use defineString() or defineSecret().
- Moves client initializations that depend on params into the function bodies.
- Updates variable names to lowerCamelCase to follow the recommended style.
- Updates all relevant README.md files to reflect the new configuration method using .env files and firebase functions:secrets:set.
- Verifies that all 1st-gen samples compile successfully after the changes.
* feat(Node-1st-gen): Migrate functions.config to params
Migrates all 1st-gen Node.js samples from the deprecated functions.config API to the new params API.
- Updates all instances of functions.config() to use defineString() or defineSecret().
- Moves client initializations that depend on params into the function bodies.
- Updates variable names to lowerCamelCase to follow the recommended style.
- Updates all relevant README.md files to reflect the new configuration method using .env files and firebase functions:secrets:set.
- Verifies that all 1st-gen samples compile successfully after the changes.
- Corrects the `runWith` secrets configuration to pass the secret objects directly.
- Refactors all client initializations to use the `onInit` hook.
- Fixes the `google-sheet-sync` trigger.
- Fixes inconsistent naming in `okta-auth` and `testlab-to-slack`.
- Fixes inefficient `cors` initialization in `okta-auth`.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: Node-1st-gen/bigquery-import/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,5 +26,9 @@ As an example we'll be using a simple logs database structure:
26
26
Set the `bigquery.datasetName` and `bigquery.tableName` Google Cloud environment variables to match the Dataset name and the Table name where you want the logs written to. For this use:
Copy file name to clipboardExpand all lines: Node-1st-gen/email-confirmation/README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,14 @@ The function triggers on changes to `/users/$uid` and exits if there are no chan
45
45
1. To be able to send emails with your Gmail account: enable access to [Less Secure Apps](https://www.google.com/settings/security/lesssecureapps) and [Display Unlock Captcha](https://accounts.google.com/DisplayUnlockCaptcha). For accounts with 2-step verification enabled [Generate an App Password](https://support.google.com/accounts/answer/185833).
46
46
1. Set the `gmail.email` and `gmail.password` Google Cloud environment variables to match the email and password of the Gmail account used to send emails (or the app password if your account has 2-step verification enabled). For this use:
Copy file name to clipboardExpand all lines: Node-1st-gen/fulltext-search/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,5 +50,6 @@ Enable Billing on your Firebase project by switching to the Blaze plan. You need
50
50
Set the `algolia.app_id` and `algolia.api_key` Google Cloud environment variables to match the Algolia application ID and API key of your account. For this use:
0 commit comments