FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Switch to axios to support proxy server when merging. by chrimc62 · Pull Request #1190 · microsoft/botframework-cli · GitHub

This repository was archived by the owner on Jan 15, 2025. It is now read-only.
/ botframework-cli Public archive

Switch to axios to support proxy server when merging. - #1190

Merged
Emilio Munoz (munozemilio) merged 5 commits into
mainfrom
chrimc/proxy
Apr 15, 2021
Merged

Switch to axios to support proxy server when merging.#1190
Emilio Munoz (munozemilio) merged 5 commits into
mainfrom
chrimc/proxy

Conversation

Copy link
Copy Markdown

Normalize sorting to reduce variation.

Normalize sorting to reduce variation.
const filePrefix = 'file:///'

// Get JSON from a URL.
export default async function getJSON(url: string): Promise<any> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

async function getJSON<T = any>(url: string): Promise<T> { ... } allows some flexibility without forcing everyone to accept any. You may have to add return resp.data as T as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The purpose of this function is to return JSON. Why do we need the flexibility?


In reply to: 612850256 [](ancestors = 612850256)

*/

import * as fs from 'fs-extra'
const axios = require('axios')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It seems odd to mix and match import/require. Is there a convention here Emilio Munoz (@munozemilio)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Generally speaking I do import when TS and otherwise do require. Happy if there is a better pattern.


In reply to: 612850391 [](ancestors = 612850391)

Comment thread packages/dialog/package.json Outdated
"@types/xml2js": "^0.4.4",
"ajv": "^6.12.2",
"axios": "~0.21.1",
"axios-https-proxy": "^0.1.1",

Emilio Munoz (munozemilio) Apr 14, 2021
edited by chrimc62
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There is a warning thrown for the same implementation in LU: npm WARN axios-https-proxy@0.1.1 requires a peer of axios@^0.18.0 but none is installed. You must install peer dependencies yourself.

Please sync with Shuai Wang (@cosmicshuai) since the same fix will be done in LU #Resolved

Dong Lei (boydc2014) Apr 14, 2021
edited by chrimc62
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Synced will Shuai Wang (@cosmicshuai), we had a cleaner way to remove this dependency and the warning. Shuai Wang (@cosmicshuai) how about you commit to this PR for this? #Resolved

Shuai Wang (cosmicshuai) Apr 14, 2021
edited by chrimc62
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

removed axios-https-proxy and commit a change to handle the https proxy setting locally. #Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

CIL

Copy link
Copy Markdown
Contributor

Emilio Munoz (@munozemilio) I modified the code, and removed the dependency of axios-https-proxy. It will no longer throwing this warning.
I tested the luis publish command via a https proxy.

Emilio Munoz (munozemilio) commented Apr 14, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Emilio Munoz (@munozemilio) I modified the code, and removed the dependency of axios-https-proxy. It will no longer throwing this warning.
I tested the luis publish command via a https proxy.

Shuai Wang (@cosmicshuai) Where is the "Accessing non-existing property" warning coming from?

Copy link
Copy Markdown
Contributor

Emilio Munoz (@munozemilio) I modified the code, and removed the dependency of axios-https-proxy. It will no longer throwing this warning.
I tested the luis publish command via a https proxy.

Shuai Wang (@cosmicshuai) Where is the "Accessing non-existing property" warning coming from?

That's comming from anltr on node14, which Shuai is on.

Emilio Munoz (munozemilio) deleted the chrimc/proxy branch April 15, 2021 02:05
Emilio Munoz (munozemilio) pushed a commit that referenced this pull request Apr 15, 2021
* Switch to axios to support proxy server when merging.
Normalize sorting to reduce variation.

* modify https proxy setting

* refactor

* fix lint

* fix lint

Co-authored-by: Chris McConnell <chrimc>
Co-authored-by: cosmicshuai <shuai_uf@outlook.com>
Emilio Munoz (munozemilio) added a commit that referenced this pull request Apr 15, 2021
* Switch to axios to support proxy server when merging. (#1190)

* Switch to axios to support proxy server when merging.
Normalize sorting to reduce variation.

* modify https proxy setting

* refactor

* fix lint

* fix lint

Co-authored-by: Chris McConnell <chrimc>
Co-authored-by: cosmicshuai <shuai_uf@outlook.com>

* Update orchestrator-core reference to 4.13.0 + fix for orchestrator:add (#1197)

* Update package.json

* Update datasourcehelper.ts

* Update add.ts

* Update pnpm-lock.yaml

* Update botbuilder-lg to 4.13.0 (#1198)

Co-authored-by: Chris McConnell <chrimc@microsoft.com>
Co-authored-by: cosmicshuai <shuai_uf@outlook.com>
Co-authored-by: Tien Suwandy <tiens@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL