From 223a4fa25e4af2cfd5a6a7c377e40ca4701f1f70 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Thu, 7 Nov 2024 14:27:59 -0800 Subject: [PATCH 1/4] Fix bug where wrapInit wasn't called on v2 callable functions. --- src/v2/providers/https.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/v2/providers/https.ts b/src/v2/providers/https.ts index 16ad9038c..e1d75ad48 100644 --- a/src/v2/providers/https.ts +++ b/src/v2/providers/https.ts @@ -58,11 +58,11 @@ export interface HttpsOptions extends Omit - | Expression - | ResetValue; + | SupportedRegion + | string + | Array + | Expression + | ResetValue; /** If true, allows CORS on requests to this function. * If this is a `string` or `RegExp`, allows requests from domains that match the provided value. @@ -390,7 +390,7 @@ export function onCall>( fixedLen ); - func = wrapTraceContext(func); + func = wrapTraceContext(withInit(func)); Object.defineProperty(func, "__trigger", { get: () => { From 994b07d7f9243638334e2c8ae175ed15ef2eadfc Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Thu, 7 Nov 2024 14:29:45 -0800 Subject: [PATCH 2/4] Add changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb..06d666fe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fix bug where wrapInit wasn't called on v2 callable functions. (#1634) From a4d384c4a39b9dbb6dce68b9f4fed69a102c69a9 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Thu, 7 Nov 2024 14:34:11 -0800 Subject: [PATCH 3/4] Fix formatting issue. --- src/v2/providers/https.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/v2/providers/https.ts b/src/v2/providers/https.ts index e1d75ad48..d6c0c73b2 100644 --- a/src/v2/providers/https.ts +++ b/src/v2/providers/https.ts @@ -58,11 +58,11 @@ export interface HttpsOptions extends Omit - | Expression - | ResetValue; + | SupportedRegion + | string + | Array + | Expression + | ResetValue; /** If true, allows CORS on requests to this function. * If this is a `string` or `RegExp`, allows requests from domains that match the provided value. From fc9713a7f6183e23d019c4eb8b6a2924c46dab56 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Thu, 7 Nov 2024 14:51:28 -0800 Subject: [PATCH 4/4] Fix formatting. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6dd3f0d..669a7dba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,2 @@ - Fix bug where wrapInit wasn't called on v2 callable functions. (#1634) -- Add support for callable function to return streaming response (#1629) \ No newline at end of file +- Add support for callable function to return streaming response (#1629)