Граф коммитов

416 Коммитов

Автор SHA1 Сообщение Дата
Paul Faid d7059314fa Override client's default redirectPolicy for individual requests. The existing redirectPolicy
was not executed as node-fetch defaults to redirect= 'follow'. Redirects were processed before
they get to the redirectPolicy.
2021-03-15 22:17:52 +13:00
Jeremy Meng 3e5a870185 Merge remote-tracking branch 'upstream/master' into pr416 2021-02-11 19:31:45 +00:00
Jeremy Meng db82efeba9 Stop depending on @types/tunnel for createTunnel
Porting fix from v1.x branch https://github.com/Azure/ms-rest-js/pull/434
2021-02-11 19:12:16 +00:00
Jeremy Meng ae209262a3 Merge remote-tracking branch 'upstream/master' into pr416 2021-02-09 23:24:48 +00:00
Jeremy Meng 0651df2183 format 2021-02-09 21:03:15 +00:00
Jeremy Meng 6a9c5465c0 Merge remote-tracking branch 'upstream/master' into dom-shim 2021-02-09 21:01:42 +00:00
Jeremy Meng 079336a476 Merge remote-tracking branch 'upstream/master' into abort-event-handler-cleanup 2021-02-09 20:36:01 +00:00
deyaaeldeen 822510173b prepare for release 2021-02-09 19:58:57 +00:00
deyaaeldeen 9e8a613ce1 port the actual fix 2021-02-09 19:57:18 +00:00
Jeremy Meng a35540f17a update changelog and version number 2021-02-09 00:08:46 +00:00
Jeremy Meng ce4bb14981 Fix abort signal event handler memory leak
The issue is when the same abort signal is passed to multiple requests we keep
adding handlers without releasing them.

Porting fixes from

https://github.com/Azure/azure-sdk-for-js/pull/5649
https://github.com/Azure/azure-sdk-for-js/pull/12038
2021-02-09 00:02:39 +00:00
Jeremy Meng cc9ba9d3f4 Merge remote-tracking branch 'upstream/master' into dom-shim 2021-02-05 20:28:35 +00:00
Jeremy Meng 309746fe58 Prepare for 2.2.1 release
- combine changes into one unpublished version
- update changelog
2021-02-05 00:17:30 +00:00
Jeremy Meng 84cc877b1d Merge remote-tracking branch 'upstream/master' into dom-shim 2021-02-03 19:51:27 +00:00
Jeremy Meng 693c8dd43a Merge remote-tracking branch 'upstream/master' into throttling-retries 2021-02-03 01:10:17 +00:00
Jeremy Meng 436a2e0438 Minor tweaks
- set default retry limit to 3
- increase test time out
2021-02-03 01:06:17 +00:00
Jeremy Meng 24424afbab bump version 2021-02-03 00:57:10 +00:00
Jeremy Meng 773a3f053a Rework the use of lib: ["dom"]
Porting changes from @azure/core-http PR
https://github.com/Azure/azure-sdk-for-js/pull/7500.

- Keep lib: ["dom"] for ./scripts/ as it depends on a dev common tool which
depends on v10 @azure/storage-blob which depends on an older version of
ms-rest-js. Attempting to remove it resulting in compile errors. This folder is
only used in dev/CI.  It's not part of the shipping library.
2021-02-02 22:27:31 +00:00
Jeremy Meng d92dc45a26 Bump version to 2.2.2 2021-02-02 19:42:08 +00:00
Jeremy Meng a35708407d Merge remote-tracking branch 'upstream/master' into global-fetch-port-pr9880 2021-02-02 19:40:13 +00:00
Jeremy Meng 5c5e2d73c5 Merge remote-tracking branch 'upstream/master' into port-core-http-pr8803 2021-02-02 18:26:47 +00:00
Jeremy Meng 4208098ab1
Add Prettier and format code (#415)
* Add prettier and configs

* npm run format

* Fix tslint error

- Prettier broke lines but the // tslint:disable-next-line comments remains in
the old position. They should be before the applicable lines.

- Enforce `SwitchCase` indentation level of 1 to match prettier behavior.
2021-02-01 17:54:34 -08:00
Jeremy Meng 1f5ac124b1 Keep retrying on 429 responses
up to a limit in ThrottlingRetryPolicy.

- Remove `_handleResponse` callback that is used for testing. Use `sinon`
instead to verify that `retry()` has been called.

Addresses #394
2021-02-02 01:03:02 +00:00
Jeremy Meng 5506fa4c63 Address CR feedback
rename `err` to `error` in catch block to avoid shadowing
2021-02-01 23:40:46 +00:00
Jeremy Meng 763f66cda6 Avoid mutating global fetch
Porting fix from https://github.com/Azure/azure-sdk-for-js/pull/9880.
Use import node_fetch from "node-fetch" instead of import "node-fetch".

Resolves #383
2021-01-29 01:47:03 +00:00
Jeremy Meng 38b2115ad8 Fix issue of SystemErrorRetryPolicy not retrying
by porting fix from https://github.com/Azure/azure-sdk-for-js/pull/8803
2021-01-28 22:03:08 +00:00
Ramya Rao 977d5db945
Merge branch 'master' into add-identity-adapter 2021-01-25 17:50:23 -08:00
Jose Manuel Heredia Hidalgo 7ca0e990bd
Allow = character in parameter value (#408)
* Allow = character as parameter value

* Add trigger to PR validation

* Reset PR pipeline

* Fix test

* 2.1.1

* reset package version
2021-01-25 10:45:32 -06:00
deyaaeldeen 4d81e22e0b fix tests 2021-01-25 15:32:38 +00:00
deyaaeldeen 6cdf430ec5 update version in lib/util/constants.ts 2021-01-25 15:25:01 +00:00
deyaaeldeen 2a9b864a12 bump version number 2021-01-22 20:53:14 +00:00
deyaaeldeen c49d531c05 Adding TokenResponse 2021-01-22 20:48:09 +00:00
deyaaeldeen 24a61110f5 edit 2021-01-22 20:48:09 +00:00
deyaaeldeen 212668350d Add TokenCredential adapter 2021-01-22 20:48:09 +00:00
deyaaeldeen 3804556144 fix a build error involving xml2js 2021-01-22 16:01:56 +00:00
Josh Gummersall 2e999a39e6
Code review fixes 2020-10-08 11:13:56 -07:00
Josh Gummersall 2aa89252f4
Include clone fix
Fixes #405
2020-10-08 10:54:58 -07:00
Josh Gummersall 25c93f481e
Add agentPolicy if agentSettings exist 2020-10-02 17:11:50 -07:00
Josh Gummersall 7127027130
Add HTTP agent settings and policy
This commit introduces support for passing a custom HTTP and/or HTTPS
agent as a `ServiceClientOption` option, a `WebResource` option, or by
using the `agentPolicy` mechanism. This will provide users greater
control over how outbound requests are made when using this library via
Node.
2020-10-02 09:13:13 -07:00
Sarangan Rajamanickam f87a54a622
Code to load proxyPolicy browser js (#397)
* Code to load proxyPolicy browser js

* Release patch version
2020-07-23 19:31:32 -07:00
Jose Manuel Heredia Hidalgo 118158b6f9
Make sure parsed body is an array when expecting Sequence (#385)
* Make sure parsed body is an array when expecting Sequence

* Update lib/serviceClient.ts

Co-Authored-By: Ramya Rao <ramya.rao.a@outlook.com>

* Update changelog and constants

* Add test

* update changelog

* Remove unecessary format changes

Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>
2020-04-30 16:22:14 -07:00
Sarangan Rajamanickam 207af0c3bd Merge remote-tracking branch 'origin/master' into ArrayNullSpaceTabsFix 2020-04-30 14:46:53 -07:00
Jeff Fisher 448b48592b Fix version 2020-04-30 14:30:28 -07:00
Jeff Fisher cc05a18630 Widen RequestPolicyOptions 2020-04-30 13:49:58 -07:00
Sarangan Rajamanickam a18a992019 Code change to check if delimiter is tabs-spaces & value is null/undefined 2020-04-29 00:40:04 -07:00
Sarangan Rajamanickam 7d84d10ab4
Update lib/serviceClient.ts
Co-Authored-By: Ramya Rao <ramya.rao.a@outlook.com>
2020-04-27 17:18:16 -07:00
Sarangan Rajamanickam a84f5460e5 Merge remote-tracking branch 'origin/master' into Issue4244 2020-04-22 11:29:43 -07:00
Sarangan Rajamanickam 6f7090c7bb Changelog & Version Update modifications 2020-04-16 17:12:11 -07:00
Sarangan Rajamanickam 0fe3c7714d PR Comments 2020-04-15 15:57:56 -07:00
Sarangan Rajamanickam 8f0294a4bb Code changes to modify encoding step 2020-04-15 12:37:40 -07:00
Jeff Fisher 04565be47a Bump constant 2020-04-14 15:56:18 -07:00
Jeff Fisher 90053fa355 Widen usage of WebResource to interface 2020-04-14 15:35:46 -07:00
David Wilson 971cbb531a Fix ms-rest-js version string in util/constants.ts 2020-01-07 16:14:50 -08:00
David Wilson ee3a3cf25d Fix incorrect property typing in NavigatorEx 2020-01-07 16:11:17 -08:00
Anthony MacKinnon c7aca1feb4 Fix node-fetch require for webpack 2019-10-14 04:29:53 -04:00
Amar Zavery 096687b544 Ensure that a primitive type (string, number, boolean, null, undefined) response body with or without a `bodyMapper` is not flattened. 2019-07-30 19:15:46 -07:00
Amar Zavery 21541e9c06 updating the structure of defining additionalProperties properties in the mapper, the way it is done in autorest.typescript 2019-07-11 13:43:38 -07:00
Amar Zavery c50cc0d5f1 - compare model property name and the clientName of the polymorphic discriminator
- check explicitly that defaultValue is not undefined
- unskip test
2019-07-10 20:06:22 -07:00
Amar Zavery cb0c0a5279 serialization updates 2019-07-10 16:44:40 -07:00
Amar Zavery 71e156dd57 updated dependencies and dev dependencies. made modifications based on updated type definitions and modified rollup.config.ts as required by the latest version of node resolve rollup plugin. 2019-07-05 18:07:51 -07:00
Amar Zavery 6be8a02ff4 update package version in constants. 2019-07-05 15:11:46 -07:00
Amar Zavery ec2e21b4ef Create CookieJar in looseMode and setCookie with ignoreError to true for NodeFetchHttpClient 2019-07-05 14:54:52 -07:00
Kamil Pajdzik f0833599b9 Remove default case-insensitivity 2019-06-26 09:18:35 -07:00
Kamil Pajdzik 83d0a3275b Add handling string pattern 2019-06-25 17:08:42 -07:00
Kamil Pajdzik 5f3395fb8d Update tests to include Pattern constraint 2019-06-25 16:47:13 -07:00
Kamil Pajdzik 7b065ccaab
Add support for Fetch in Node.js environment (#351)
* Update version

* Add Fetch HTTP client (#342)

* Add Fetch HTTP client

* Reset version

* Update version

* Fix isNode method to return true in Electron apps

* Update Constants

* Fix incorrect undefined check in Axios client

* Add TSLint check. Fix TSLint errors (#344)

* Add TSLint check. Fix TSLint errors

* Add type to delay callback

* Update TypeScript

* Remove unnecessary types/xhr-mock package

* Fix missing delay import

* Reformat Fetch client

* Fix wrong union type

* Fix tests

* Normalize the safe-check

* Add script to run tests on dependent projects (#345)

* Add script to run tests on dependent projects

* Bump the version

* Fix logging statements

* Update constants

* Update Azure Pipelines configuration

* Fix Azure Pipeline job name

* Add gulp build command

* Add npm run local

* Flip order

* Add build step

* Add more logging

* Fix undefined result print

* Remove inheriting stdio

* Change to spawnSync

* Add more logging

* Remove build step

* Change exec to run from JS dev tools

* Add logger-js package

* Add build step back

* Add process.exit

* Add logging

* Change error logging

* Add command printing

* Extract options object

* Add fullOptions parameter

* Change NPM command name

* Remove logging

* Remove npm run test

* Await additional commands

* Add test command to package.json

* Add timeout

* Add test as separate task

* Change foreach to for

* Remove test from package.json command

* Uncomment npm install commands

* Add latest ms-rest-js to npm install

* Add autorest.typescript DevOps task

* Add npm link

* Change link to install

* Remove prepack script

* Change package name to ../..

* Remove rm -rf

* Add build step

* Add git checkout

* Add dependent project directory

* Remove git branch checkout

* Bump the version to 1.8.6

* Add git checkout

* Change branch name

* Add execution directory

* Remove git checkout

* Add tsc --version command

* Remove local ms-rest-js install

* Move .tmp folder

* Change .tmp path creation

* Fix path in Azure DevOps config

* Renable logging

* Add run to build command

* Move scripts back to TypeScript

* Improve logging

* Fixed #347 and #348

* nit fix

* bump version in the constant file.

* Address reiew feedback

* upgrade ci to run node 8, 10, 12 versions. Remove 6.x.

* Reformat mockHttp

* Add Fetch to browser

* Add Firefox Karma configuration

* Switch from isomorphic-fetch to cross-fetch

* Add cross-fetch to rollup configuration

* Remove buffer and streams from webpack test configuration

* Add Firefox karma launcher

* Add FetchMock for browser scenarios

* Extract platform specific code to child classes

* Bump the version

* Add proxy support to fetch client (#350)

* Remove cross-fetch

* Add proxy support

* Fix stream upload tests

* Extract ProxyAgent

* Bring XHR as default client for browsers

* Address feedback

* Bring back browser mock

* Add type

* Fix pass through mock

* Change import type

* Fix fetch import

* Change fetch reference

* Remove cross fetch from rollup config

* Remote unit.ts

* Add fallback fetch reference

* Fix constants

* Fix fetch bugs

* Upgrade TypeScript

* Remove unnecessary code from mock class

* Remove type

* Change vresion to preview

* Remove Method import

* Fix user agent tests

* Remove Method casting

* Remove Method type

* Disable ms-rest-azure-js installation in CI

* Fix pack order

* Add keep-alive support (#362)

* Remove remaining axios references

* Update documentation

* Add missing external packages in rollup config

* Add Keep-Alive changelog

* Bump the version
2019-06-24 09:01:20 -07:00
J. Kalyana Sundaram 94ed16d268 Incremented version and updated changelog per PR feedback. 2019-06-11 19:02:16 -07:00
J. Kalyana Sundaram f54dbfad07 Added domainCredentials for authentication to EventGrid domains. 2019-06-11 17:05:49 -07:00
Amar Zavery bbeb122737 Bring back the workaround of uppercasing method names as that is required for storage data plane library 2019-06-06 16:02:28 -07:00
Kamil Pajdzik 4273b5122e
Move testing dependent projects from a script to Azure Devops Pipeline (#357)
* Disable ms-rest-azure-js tests

* Refactor script

* Add debug statement

* Change test command

* Remove command line arguments

* Rename command

* Split the script

* Add directory creation

* Combine jobs

* Refactor script

* Remove workdir

* Add pwd script

* Change variable name

* Split jobs

* Add additional logging

* Add additional logging

* Add ls -a

* Combine jobs

* Add copying artifacts

* Move artifact to a folder

* Move artifact to a folder

* Rename artifact

* Add npm pack

* Add ls -a

* Fix path

* Add predefined variable

* Introduce variables

* Fix missing variable

* Add autorest.typescript testing

* Add ms-rest-azure-js publishing

* Add working directory parameter

* Fix dependent tasks

* Add debug statement

* Flip order of gulp build

* Bump the version

* Update Constants

* Add friendly job names

* Cleanup debug statements
2019-06-06 09:35:57 -07:00
Amar Zavery 73d900ba4b Set tranformResponse property of axios req. config to an identity function. 2019-06-04 16:32:26 -07:00
Amar Zavery bc6555f7e3 update version in constants.ts 2019-06-03 11:03:50 -07:00
Amar Zavery 0e1c327a8f Bumped version of axios to 0.19.0 2019-06-01 18:12:07 -07:00
Amar Zavery a14791b1c8 Address reiew feedback 2019-05-16 11:36:43 -07:00
Amar Zavery 482d5cb1d9 bump version in the constant file. 2019-05-16 11:31:18 -07:00
Amar Zavery 393b7901a0 nit fix 2019-05-16 11:14:42 -07:00
Amar Zavery 2c874ee8a7 Fixed #347 and #348 2019-05-16 11:11:57 -07:00
Kamil Pajdzik c7b3e6c70a
Add script to run tests on dependent projects (#345)
* Add script to run tests on dependent projects

* Bump the version

* Fix logging statements

* Update constants

* Update Azure Pipelines configuration

* Fix Azure Pipeline job name

* Add gulp build command

* Add npm run local

* Flip order

* Add build step

* Add more logging

* Fix undefined result print

* Remove inheriting stdio

* Change to spawnSync

* Add more logging

* Remove build step

* Change exec to run from JS dev tools

* Add logger-js package

* Add build step back

* Add process.exit

* Add logging

* Change error logging

* Add command printing

* Extract options object

* Add fullOptions parameter

* Change NPM command name

* Remove logging

* Remove npm run test

* Await additional commands

* Add test command to package.json

* Add timeout

* Add test as separate task

* Change foreach to for

* Remove test from package.json command

* Uncomment npm install commands

* Add latest ms-rest-js to npm install

* Add autorest.typescript DevOps task

* Add npm link

* Change link to install

* Remove prepack script

* Change package name to ../..

* Remove rm -rf

* Add build step

* Add git checkout

* Add dependent project directory

* Remove git branch checkout

* Bump the version to 1.8.6

* Add git checkout

* Change branch name

* Add execution directory

* Remove git checkout

* Add tsc --version command

* Remove local ms-rest-js install

* Move .tmp folder

* Change .tmp path creation

* Fix path in Azure DevOps config

* Renable logging

* Add run to build command

* Move scripts back to TypeScript

* Improve logging
2019-05-10 16:58:13 -07:00
Kamil Pajdzik a33131bf01 Merge remote-tracking branch 'origin/master' into kamip/is-node
# Conflicts:
#	lib/util/constants.ts
#	package.json
2019-05-07 11:41:06 -07:00
Kamil Pajdzik 62d85bfeb8
Add TSLint check. Fix TSLint errors (#344)
* Add TSLint check. Fix TSLint errors

* Add type to delay callback

* Update TypeScript

* Remove unnecessary types/xhr-mock package

* Fix missing delay import
2019-05-07 11:40:22 -07:00
Kamil Pajdzik ea7ceb86f1 Fix incorrect undefined check in Axios client 2019-05-07 09:31:27 -07:00
Kamil Pajdzik 67081bdf65 Update Constants 2019-05-07 09:28:04 -07:00
Kamil Pajdzik d5a12859b8 Fix isNode method to return true in Electron apps 2019-05-07 09:25:05 -07:00
a-hohaze e7fa52ff13 Fix http over https bug (#341)
* Fix http over https bug

* Update version

* Fix unit tests
2019-04-25 09:48:03 -07:00
Kamil Pajdzik 2d4e6b747d
Fix serialization issue when required object is empty (#337)
* Fix serialization issue when required object is empty

* Update constants
2019-04-01 13:14:01 -07:00
Jeremy Meng 8c54b3905f Add exports to several request policy factory methods (#336)
* Add exports to several request policy factory methods

They are useful when customizing the requestPolicyFactories array of a
ServiceClientOptions instance.

* Update version to 1.8.0
2019-03-19 11:09:15 -07:00
Dan Schulte da200d56ba
Merge branch 'master' into daschult/userAgentHeaderName 2019-02-11 10:21:57 -08:00
Dan Schulte b959c39e1f Update msRestVersion in constants.ts 2019-02-11 10:21:17 -08:00
Dan Schulte c71008a095 Add userAgentHeaderName to ServiceClientOptions 2019-02-11 10:06:57 -08:00
Kamil Pajdzik fafa26180e
Fix including proxy policy in browser (#328)
* Fix including proxy policy in browser
* Add browser tests
2019-01-30 13:21:26 -08:00
Kamil Pajdzik c1742fe6a8
Bring Axios interceptors back (#325)
* Bring Axios interceptors back

* Bump the constant version
2019-01-25 17:28:39 -08:00
Kamil Pajdzik 61795c9c50 Update http and https imports 2019-01-25 12:33:30 -08:00
Vlad Barosan 8aef86b9f5
Update constants.ts 2019-01-25 11:49:02 -08:00
Kamil Pajdzik 1ee5a40d50
Add HTTP(S) over HTTP(S) proxy support (#322)
* Add proxy support using tunnel package

# Conflicts:
#	lib/axiosHttpClient.ts
#	lib/policies/proxyPolicy.ts
#	lib/serviceClient.ts
#	package.json

* Fix incorrect merge

* Add tests

* Remove commented code

* Add tunnel to rollup configuration

* Fix test title casing

* Remove only

* Add axios client tests

* Mock buffer

* Remove rewire

* Fix default HTTP client tests

* Add some proxy tests

* Add support for HTTPS proxy

* Address PR comments
2019-01-25 09:22:30 -08:00
Kamil Pajdzik 4c2b1c5390
Fix default HTTP client tests (#321)
* Enable CORS

* Add empty line

* Add mock http proxy

* Fix few tests

* Remove axios workaround that was fixed in current release

* Fix all tests except download/upload progress

* Fix stream HTTP tests

* Delete testserver

* Remove reporting skipped tests as warning

* Remove .only

* Add nodeIt

* Fix Constants.ts

* Remove it.skip()
2019-01-22 11:46:55 -08:00
Kamil Pajdzik 1d960e1ad6
Add support for HTTP proxy (#315)
* Add support for HTTP proxy

* Fix overriding existing properties

* Bump the version to 1.5.0
2019-01-15 16:47:43 -08:00
Kamil Pajdzik 6b217db81d
Add karma for browser tests (#316)
* Add karma dependency

* Add karma extensions

* Add karma configuration

* Add karma script

* Add karma types

* Format configs

* Working TS scripts

* Move tests around

* Add nodeDescribe and browserDescribe

* Working karma bundle

* Add maps

* Trying to make karma-webpack working

* Fix uuid import

* Trying to make rollup work

* Working debug maps (not working regular tests)

* Working headless Chrome

* Add chrome debugging

* Fix config sharing

* Add TS mappings

* Fix rollup config

* Add TypeScript typings

* Rename multi entry typings

* Fix semicolon

* Make webpack work

* Working webpack

* Add webpack scripts

* Start XHR mocks

* Fix another test

* Skip defaultHttpClient tests

* Add browser test to the test script

* Update the version to 1.4.1
2019-01-15 15:00:06 -08:00
Dan Schulte 11b35172dd Add checkConstantsVersion.ts 2019-01-15 12:53:12 -08:00
Dan Schulte 0b8752cc00 Merge remote-tracking branch 'origin' into daschult/requestPolicyFactories 2019-01-15 10:57:28 -08:00
Dan Schulte a90d80f8d1 Working on requestPolicyFactories as a function 2019-01-15 10:57:10 -08:00