Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 52d4917

Browse files
Removing request from cli (#913)
Co-authored-by: Vishwac Sena Kannan <[email protected]>
1 parent 4ac1279 commit 52d4917

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 22 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/chatdown/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@microsoft/bf-cli-command": "1.0.0",
99
"@oclif/command": "~1.5.19",
1010
"@oclif/config": "~1.13.3",
11+
"@oclif/errors": "~1.2.2",
1112
"botframework-schema": "^4.5.1",
1213
"chalk": "2.4.1",
1314
"cli-table3": "^0.5.1",
@@ -17,9 +18,8 @@
1718
"latest-version": "^4.0.0",
1819
"mime-types": "^2.1.18",
1920
"minimist": "^1.2.0",
21+
"node-fetch": "~2.6.0",
2022
"please-upgrade-node": "^3.0.1",
21-
"request": "^2.88.0",
22-
"request-promise-native": "^1.0.5",
2323
"semver": "^5.5.1",
2424
"tslib": "^1.9.3",
2525
"window-size": "^1.1.0"

packages/chatdown/utils/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ChannelAccount = require('./serializable/channelAccount');
1717
const ConversationAccount = require('./serializable/conversationAccount');
1818
const Attachment = require('./serializable/attachment');
1919
const chalk = require('chalk');
20-
const request = require('request-promise-native');
20+
const request = require('node-fetch');
2121
const NEWLINE = require('os').EOL;
2222
let activityId = 1;
2323

@@ -482,9 +482,8 @@ async function addAttachment(activity, arg) {
482482
contentType = mime.lookup(contentUrl) || cardContentTypes[path.extname(contentUrl)];
483483

484484
if (!contentType && contentUrl && contentUrl.indexOf('http') == 0) {
485-
let options = { method: 'HEAD', uri: contentUrl };
486-
let response = await request(options);
487-
contentType = response['content-type'].split(';')[0];
485+
let response = await request(contentUrl, {method: 'HEAD'});
486+
contentType = response.headers.get('content-type').split(';')[0];
488487
}
489488
}
490489

packages/qnamaker/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
"pascal-case": "^2.0.1",
5858
"readline": "^1.3.0",
5959
"readline-sync": "^1.4.9",
60-
"request": "^2.88.0",
61-
"request-promise-native": "^1.0.5",
6260
"rimraf": "^2.6.3",
6361
"semver": "^5.5.1",
6462
"tslib": "^1.10.0",

packages/qnamaker/utils/api/qnaLegacy.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright(c) Microsoft Corporation.All rights reserved.
33
* Licensed under the MIT License.
44
*/
5-
const request = require('request-promise-native');
65

76
const { ServiceBase } = require('./serviceBase');
87
class QnaLegacy extends ServiceBase {

0 commit comments

Comments
 (0)