Skip to content

Commit

Permalink
feat: update to latest version of clouevents sdk (#402)
Browse files Browse the repository at this point in the history
This commit updates to the latest CESDK which provides a generic interface for
CloudEvents. This is an additive, non-breaking change to our registration API
  • Loading branch information
matthewrobertson committed Dec 7, 2021
1 parent 2073558 commit bd36243
Show file tree
Hide file tree
Showing 12 changed files with 208 additions and 126 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Expand Up @@ -12,9 +12,9 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '14'
- name: Install dependencies
run: npm install
run: npm ci
- name: Build docs
run: npm run docs
- name: Ensure there are no changes in docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
registry-url: 'https://wombat-dressing-room.appspot.com'
- id: publish
env:
Expand Down
165 changes: 109 additions & 56 deletions docs/generated/api.json
@@ -1,7 +1,7 @@
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.18.19",
"toolVersion": "7.18.20",
"schemaVersion": 1004,
"oldestForwardsCompatibleVersion": 1001,
"tsdocConfig": {
Expand Down Expand Up @@ -180,7 +180,7 @@
},
{
"kind": "Content",
"text": "(functionName: string, handler: "
"text": "<T = unknown>(functionName: string, handler: "
},
{
"kind": "Reference",
Expand All @@ -189,7 +189,7 @@
},
{
"kind": "Content",
"text": ") => void"
"text": "<T>) => void"
}
],
"releaseTag": "Public",
Expand All @@ -206,10 +206,31 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface CloudEventFunction "
"text": "export interface CloudEventFunction<T = "
},
{
"kind": "Content",
"text": "unknown"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "CloudEventFunction",
"members": [
{
Expand All @@ -226,6 +247,10 @@
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": "): "
Expand All @@ -240,8 +265,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
"startIndex": 4,
"endIndex": 5
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -250,7 +275,7 @@
"parameterName": "cloudEvent",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"endIndex": 3
}
}
]
Expand All @@ -265,10 +290,31 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface CloudEventFunctionWithCallback "
"text": "export interface CloudEventFunctionWithCallback<T = "
},
{
"kind": "Content",
"text": "unknown"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "CloudEventFunctionWithCallback",
"members": [
{
Expand All @@ -285,6 +331,10 @@
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ", callback: "
Expand All @@ -308,8 +358,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -318,14 +368,14 @@
"parameterName": "cloudEvent",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"endIndex": 3
}
},
{
"parameterName": "callback",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
"startIndex": 4,
"endIndex": 5
}
}
]
Expand All @@ -340,7 +390,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface CloudFunctionsContext "
"text": "export interface CloudFunctionsContext "
}
],
"releaseTag": "Public",
Expand Down Expand Up @@ -476,6 +526,10 @@
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
"text": "<unknown>"
},
{
"kind": "Content",
"text": ";"
Expand All @@ -485,7 +539,7 @@
"name": "Context",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 4
"endIndex": 5
}
},
{
Expand All @@ -495,7 +549,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface Data "
"text": "export interface Data "
}
],
"releaseTag": "Public",
Expand Down Expand Up @@ -537,7 +591,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface EventFunction "
"text": "export interface EventFunction "
}
],
"releaseTag": "Public",
Expand Down Expand Up @@ -611,7 +665,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface EventFunctionWithCallback "
"text": "export interface EventFunctionWithCallback "
}
],
"releaseTag": "Public",
Expand Down Expand Up @@ -701,7 +755,15 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type HandlerFunction = "
"text": "export declare type HandlerFunction<T = "
},
{
"kind": "Content",
"text": "unknown"
},
{
"kind": "Content",
"text": "> = "
},
{
"kind": "Reference",
Expand Down Expand Up @@ -737,23 +799,40 @@
},
{
"kind": "Content",
"text": " | "
"text": "<T> | "
},
{
"kind": "Reference",
"text": "CloudEventFunctionWithCallback",
"canonicalReference": "@google-cloud/functions-framework!CloudEventFunctionWithCallback:interface"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "HandlerFunction",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"typeTokenRange": {
"startIndex": 1,
"endIndex": 10
"startIndex": 3,
"endIndex": 13
}
},
{
Expand Down Expand Up @@ -793,7 +872,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface HttpFunction "
"text": "export interface HttpFunction "
}
],
"releaseTag": "Public",
Expand All @@ -810,17 +889,17 @@
},
{
"kind": "Reference",
"text": "Request_2",
"canonicalReference": "@google-cloud/functions-framework!~Request_2:interface"
"text": "Request",
"canonicalReference": "@google-cloud/functions-framework!Request:interface"
},
{
"kind": "Content",
"text": ", res: "
},
{
"kind": "Reference",
"text": "Response_2",
"canonicalReference": "@google-cloud/functions-framework!~Response_2:type"
"text": "Response",
"canonicalReference": "@types/express!~e.Response:interface"
},
{
"kind": "Content",
Expand Down Expand Up @@ -903,7 +982,7 @@
"excerptTokens": [
{
"kind": "Content",
"text": "export declare interface LegacyEvent "
"text": "export interface LegacyEvent "
}
],
"releaseTag": "Public",
Expand Down Expand Up @@ -972,11 +1051,11 @@
"excerptTokens": [
{
"kind": "Content",
"text": "declare interface Request_2 extends "
"text": "export interface Request extends "
},
{
"kind": "Reference",
"text": "express.Request",
"text": "ExpressRequest",
"canonicalReference": "@types/express!~e.Request:interface"
},
{
Expand Down Expand Up @@ -1021,32 +1100,6 @@
"endIndex": 3
}
]
},
{
"kind": "TypeAlias",
"canonicalReference": "@google-cloud/functions-framework!Response_2:type",
"docComment": "/**\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "declare type Response_2 = "
},
{
"kind": "Reference",
"text": "express.Response",
"canonicalReference": "@types/express!~e.Response:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "Response_2",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
}
Expand Down

0 comments on commit bd36243

Please sign in to comment.