Skip to content

Commit

Permalink
update axios and replace it in bf-connector (#4591)
Browse files Browse the repository at this point in the history
# Conflicts:
#	libraries/botframework-connector/package.json
  • Loading branch information
JhontSouth authored and Tracy Boehrer committed Dec 21, 2023
1 parent 2bedf24 commit d9b26a9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libraries/botbuilder-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@microsoft/bf-chatdown": "^4.15.0",
"axios": "^0.25.0",
"axios": "^1.6.0",
"unzipper": "^0.10.9"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@azure/core-http": "^3.0.2",
"@azure/msal-node": "^1.2.0",
"axios": "^0.25.0",
"axios": "^1.6.0",
"botbuilder-core": "4.1.6",
"botbuilder-stdlib": "4.1.6",
"botframework-connector": "4.1.6",
Expand Down
1 change: 0 additions & 1 deletion libraries/botframework-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@azure/core-http": "^3.0.2",
"@azure/identity": "^2.0.4",
"@azure/msal-node": "^1.2.0",
"axios": "^0.25.0",
"base64url": "^3.0.0",
"botbuilder-stdlib": "4.1.6",
"botframework-schema": "4.1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.

import * as z from 'zod';
import axios from 'axios';
import { Activity, ChannelAccount, InvokeResponse, RoleTypes } from 'botframework-schema';
import { BotFrameworkClient } from '../skills';
import { ConversationIdHttpHeaderName } from '../conversationConstants';
Expand All @@ -15,14 +14,14 @@ const botFrameworkClientFetchImpl: typeof fetch = async (input, init) => {
const url = z.string().parse(input);
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), {
const response = await fetch(url, {
body: JSON.parse(body),
headers,
validateStatus: () => true,
});

return {
status: response.status,
json: async () => response.data,
json: async () => response.body,
} as Response;
};

Expand Down
19 changes: 13 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3319,12 +3319,14 @@ axios@^0.24.0:
dependencies:
follow-redirects "^1.14.4"

axios@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a"
integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==
axios@^1.6.0:
version "1.6.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2"
integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==
dependencies:
follow-redirects "^1.14.7"
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

babel-loader@^8.0.6:
version "8.1.0"
Expand Down Expand Up @@ -6475,11 +6477,16 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.14.0, follow-redirects@^1.14.4, follow-redirects@^1.14.7:
follow-redirects@^1.14.0, follow-redirects@^1.14.4:
version "1.14.7"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==

follow-redirects@^1.15.0:
version "1.15.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==

for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand Down

0 comments on commit d9b26a9

Please sign in to comment.