From 4f4d3d53482ac72657fe1a9fc55c819a6d80ba08 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Wed, 11 May 2022 12:40:43 -0400 Subject: [PATCH 1/5] update root readme --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index cb5f028ce4..72835404d2 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ To learn how to get started with Cloud Functions for Firebase by having a look a This repository contains a few categories of samples: 1. [**Quickstarts**](#quickstarts) are minimal examples for each types of triggers. + 1. [**Cloud Functions v2 public preview**](#v2) samples show how to use the public preview of [Cloud Functions for Firebase v2](https://firebase.google.com/docs/functions/beta). 1. [**Development Environment Samples and Boilerplates**](#environment) illustrates how to get started with different, commonly used JavaScript development patterns such as Typescript, React SSR, ES2017 etc... 1. [**Image Processing**](#image) shows a few ways where you can process and transform images using Cloud Functions such as generating thumbnails, converting images extracting metadata... @@ -59,6 +60,47 @@ This quickstart sample demonstrates using **Cloud Functions** triggered by **Pub This quickstart demonstrates how to trigger a function in response to the completion of a test matrix in **Firebase Test Lab**. + +## Cloud Functions v2 public preview + +> Note: Cloud Functions for Firebase v2 is a public preview. This means that the functionality might change in backward-incompatible ways. A preview release is not subject to any SLA or deprecation policy and may receive limited or no support. + +See [the Firebase docs](https://firebase.google.com/docs/functions/beta) for more information about the v2 public preview. + +### [HTTPS: Time Server](/2nd-gen/time-server/) + +A minimal HTTPS example. + +### [Task Queues: Back-up images from an API](/2nd-gen/taskqueues-backup-images/) + +See how to use Task Queues to meter traffic to a rate-limited API. + +### [Firebase Alerts: Send crash reports to Discord](/2nd-gen/alerts-to-discord/) + +Trigger a function based on a Firebase Alert, and send information about the alert to a channel in a Discord server. + +### [Custom Events: Save image metadata](/2nd-gen/custom-events/) + +Learn how to trigger a function based on an event sent by an extension + +### [Callables: Add numbers and sanitize text](/2nd-gen/callable-functions/) + +See how to write a v2 function that can easily be triggered from an app. + +### [PubSub: Hello world](/2nd-gen/pubsub-helloworld/) + +A minimal PubSub example. + +### [Storage: Generate image thumbnails](/2nd-gen/thumbnails/) + +Resize images after they're added to a Storage bucket. + +### Unit testing + +- [Test with Jest](/2nd-gen/test-functions-jest/) + - [Test with Jest and TypeScript](/2nd-gen/test-functions-jest-ts/) +- [Test with Mocha](/2nd-gen/test-functions-mocha/) + ## Development Boilerplates From bf7ce84dde2987a86c7025f5e8ce7b2e070b673e Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Wed, 11 May 2022 12:41:51 -0400 Subject: [PATCH 2/5] rearrange sample readmes --- 2nd-gen/callable-functions/{functions => }/README.md | 0 2nd-gen/custom-events/{functions => }/ README.md | 0 2nd-gen/pubsub-helloworld/{functions => }/README.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename 2nd-gen/callable-functions/{functions => }/README.md (100%) rename 2nd-gen/custom-events/{functions => }/ README.md (100%) rename 2nd-gen/pubsub-helloworld/{functions => }/README.md (100%) diff --git a/2nd-gen/callable-functions/functions/README.md b/2nd-gen/callable-functions/README.md similarity index 100% rename from 2nd-gen/callable-functions/functions/README.md rename to 2nd-gen/callable-functions/README.md diff --git a/2nd-gen/custom-events/functions/ README.md b/2nd-gen/custom-events/ README.md similarity index 100% rename from 2nd-gen/custom-events/functions/ README.md rename to 2nd-gen/custom-events/ README.md diff --git a/2nd-gen/pubsub-helloworld/functions/README.md b/2nd-gen/pubsub-helloworld/README.md similarity index 100% rename from 2nd-gen/pubsub-helloworld/functions/README.md rename to 2nd-gen/pubsub-helloworld/README.md From 1b3194489ec4a5f0b0b7a7e1ad681987af90d473 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Wed, 11 May 2022 12:56:00 -0400 Subject: [PATCH 3/5] address review feedback --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72835404d2..1a0513adce 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This repository contains a few categories of samples: 1. [**Cloud Functions v2 public preview**](#v2) samples show how to use the public preview of [Cloud Functions for Firebase v2](https://firebase.google.com/docs/functions/beta). 1. [**Development Environment Samples and Boilerplates**](#environment) illustrates how to get started with different, commonly used JavaScript development patterns such as Typescript, React SSR, ES2017 etc... - 1. [**Image Processing**](#image) shows a few ways where you can process and transform images using Cloud Functions such as generating thumbnails, converting images extracting metadata... + 1. [**Image Processing**](#image) shows a few ways you can process and transform images using Cloud Functions such as generating thumbnails, converting images extracting metadata... 1. [**Firebase Realtime Database Data Consistency**](#rtdb) shows how to implement automatic data consistency such as keeping a count of children, having a max amount of node childs, cleaning up old data etc... for your Realtime Database. 1. [**Other common usecases**](#other) a set of other common usecases for Cloud Functions. @@ -173,7 +173,7 @@ Uses a Realtime Database trigger. -## Other common usecases +## Solve other common use cases ### [Send FCM notifications](fcm-notifications) From ff52db3555da2b45d922ff18778f5ae513108597 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Wed, 11 May 2022 12:57:39 -0400 Subject: [PATCH 4/5] remove readme from gen2 folder --- 2nd-gen/README.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 2nd-gen/README.md diff --git a/2nd-gen/README.md b/2nd-gen/README.md deleted file mode 100644 index fec732a63a..0000000000 --- a/2nd-gen/README.md +++ /dev/null @@ -1 +0,0 @@ -# TODO: readme \ No newline at end of file From c78425eaca151d2d10599ba2e9b043ca7fd7c82b Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Wed, 11 May 2022 12:58:18 -0400 Subject: [PATCH 5/5] oxford comma --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a0513adce..b73e9f97c9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This repository contains a few categories of samples: 1. [**Quickstarts**](#quickstarts) are minimal examples for each types of triggers. 1. [**Cloud Functions v2 public preview**](#v2) samples show how to use the public preview of [Cloud Functions for Firebase v2](https://firebase.google.com/docs/functions/beta). 1. [**Development Environment Samples and Boilerplates**](#environment) illustrates how to get started with -different, commonly used JavaScript development patterns such as Typescript, React SSR, ES2017 etc... +different, commonly used JavaScript development patterns such as Typescript, React SSR, and ES2017. 1. [**Image Processing**](#image) shows a few ways you can process and transform images using Cloud Functions such as generating thumbnails, converting images extracting metadata... 1. [**Firebase Realtime Database Data Consistency**](#rtdb) shows how to implement automatic data consistency such as keeping a count of children, having a max amount of node childs, cleaning up old data etc... for your Realtime Database. 1. [**Other common usecases**](#other) a set of other common usecases for Cloud Functions.