Skip to content

Commit

Permalink
fix: botFrameworkClientFetchImpl function missing headers from Zod va… (
Browse files Browse the repository at this point in the history
#3963)

* fix: botFrameworkClientFetchImpl function missing headers from Zod validation (#3959)

* Fix Zod missing headers validation error

* Remove nullish coalescing operator for headers

* Clean up botFrameworkClientFetchImpl headers validation

* Update botFrameworkClientImpl.ts

Co-authored-by: MartLuc <18757147+MartinLuccanera@users.noreply.github.com>

* fix: add more release branches

Co-authored-by: Joel Mut <62260472+sw-joelmut@users.noreply.github.com>
Co-authored-by: MartLuc <18757147+MartinLuccanera@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 28, 2021
1 parent 2d7961c commit e863249
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/depcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-repoutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'
pull_request:
branches:
- main
- '4.12'
- '4.13'
- '4.14'
- '4.15'

jobs:
ci:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import { ok } from 'assert';

const botFrameworkClientFetchImpl: typeof fetch = async (input, init) => {
const url = z.string().parse(input);
const { body } = z.object({ body: z.string() }).parse(init);
const { body, headers } = z.object({ body: z.string(), headers: z.record(z.string()).optional() }).parse(init);

const response = await axios.post(url, JSON.parse(body), {
headers: z.record(z.string()).parse(init.headers ?? {}),
headers,
validateStatus: () => true,
});

Expand Down

0 comments on commit e863249

Please sign in to comment.