@azure/core-amqp
Advanced tools
Comparing version 1.0.0-dev.20191118.1 to 1.0.0-dev.20191204.1
@@ -0,1 +1,5 @@ | ||
## 1.0.0-preview.6 - 3rd December, 2019 | ||
* Treat ETIMEOUT error from dns.resolve as network disconnected. | ||
## 1.0.0-preview.5 - 29th October, 2019 | ||
@@ -2,0 +6,0 @@ |
@@ -51,5 +51,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
sendRequest(request, options = {}) { | ||
if (!options.timeoutInMs) { | ||
options.timeoutInMs = Constants.defaultOperationTimeoutInMs; | ||
} | ||
const timeoutInMs = options.timeoutInMs || Constants.defaultOperationTimeoutInMs; | ||
const aborter = options.abortSignal; | ||
@@ -148,3 +146,3 @@ return new Promise((resolve, reject) => { | ||
}; | ||
waitTimer = setTimeout(actionAfterTimeout, options.timeoutInMs); | ||
waitTimer = setTimeout(actionAfterTimeout, timeoutInMs); | ||
this.receiver.on(ReceiverEvents.message, messageCallback); | ||
@@ -151,0 +149,0 @@ log.reqres("[%s] %s request sent: %O", this.connection.id, request.to || "$managment", request); |
@@ -68,3 +68,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
resolve(host, function (err) { | ||
if (err && err.code === "ECONNREFUSED") { | ||
// List of possible DNS error codes: https://nodejs.org/dist/latest-v12.x/docs/api/dns.html#dns_error_codes | ||
if (err && (err.code === "ECONNREFUSED" || err.code === "ETIMEOUT")) { | ||
res(false); | ||
@@ -71,0 +72,0 @@ } |
{ | ||
"name": "@azure/core-amqp", | ||
"sdk-type": "client", | ||
"version": "1.0.0-dev.20191118.1", | ||
"version": "1.0.0-dev.20191204.1", | ||
"description": "Common library for amqp based azure sdks like @azure/event-hubs.", | ||
@@ -80,2 +80,3 @@ "author": "Microsoft Corporation", | ||
"@azure/identity": "^1.0.0", | ||
"@rollup/plugin-json": "^4.0.0", | ||
"@rollup/plugin-replace": "^2.2.0", | ||
@@ -85,3 +86,2 @@ "@types/chai": "^4.1.6", | ||
"@types/debug": "^4.1.4", | ||
"@types/dotenv": "^6.1.0", | ||
"@types/jssha": "^2.0.0", | ||
@@ -96,4 +96,4 @@ "@types/mocha": "^5.2.5", | ||
"chai-as-promised": "^7.1.1", | ||
"cross-env": "^5.2.0", | ||
"dotenv": "^8.0.0", | ||
"cross-env": "^6.0.3", | ||
"dotenv": "^8.2.0", | ||
"eslint": "^6.1.0", | ||
@@ -112,3 +112,3 @@ "eslint-config-prettier": "^6.0.0", | ||
"prettier": "^1.16.4", | ||
"puppeteer": "^1.11.0", | ||
"puppeteer": "^2.0.0", | ||
"rhea": "^1.0.4", | ||
@@ -120,3 +120,2 @@ "rhea-promise": "^1.0.0", | ||
"rollup-plugin-inject": "^3.0.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-multi-entry": "^2.1.0", | ||
@@ -123,0 +122,0 @@ "rollup-plugin-node-globals": "^1.4.0", |
@@ -233,3 +233,3 @@ # Azure Core AMQP client library for AMQP operations | ||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/2dfd6bc1f29cd2485b696e64858467042ad2c339/CONTRIBUTING.md) to learn more about how to build and test the code. | ||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/72bb17fa22d8426555b78e1372dc7ae658ff20a9/CONTRIBUTING.md) to learn more about how to build and test the code. | ||
@@ -236,0 +236,0 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). |
@@ -84,5 +84,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
sendRequest(request: AmqpMessage, options: SendRequestOptions = {}): Promise<AmqpMessage> { | ||
if (!options.timeoutInMs) { | ||
options.timeoutInMs = Constants.defaultOperationTimeoutInMs; | ||
} | ||
const timeoutInMs = options.timeoutInMs || Constants.defaultOperationTimeoutInMs; | ||
@@ -218,3 +216,3 @@ const aborter: AbortSignalLike | undefined = options.abortSignal; | ||
waitTimer = setTimeout(actionAfterTimeout, options.timeoutInMs); | ||
waitTimer = setTimeout(actionAfterTimeout, timeoutInMs); | ||
this.receiver.on(ReceiverEvents.message, messageCallback); | ||
@@ -221,0 +219,0 @@ |
@@ -146,3 +146,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
resolve(host, function(err: any): void { | ||
if (err && err.code === "ECONNREFUSED") { | ||
// List of possible DNS error codes: https://nodejs.org/dist/latest-v12.x/docs/api/dns.html#dns_error_codes | ||
if (err && (err.code === "ECONNREFUSED" || err.code === "ETIMEOUT")) { | ||
res(false); | ||
@@ -149,0 +150,0 @@ } else { |
@@ -15,1 +15,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
declare var navigator: Navigator; | ||
declare var window: Window; |
{ | ||
"extends": "../../../tsconfig.package", | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, | ||
"module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | ||
"declaration": true /* Generates corresponding '.d.ts' file. */, | ||
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, | ||
"sourceMap": true /* Generates corresponding '.map' file. */, | ||
"outDir": "./dist-esm" /* Redirect output structure to the directory. */, | ||
"declarationDir": "./typings" /* Output directory for generated declaration files.*/, | ||
"importHelpers": true /* Import emit helpers from 'tslib'. */, | ||
/* Strict Type-Checking Options */ | ||
"strict": true /* Enable all strict type-checking options. */, | ||
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */, | ||
/* Additional Checks */ | ||
"noUnusedLocals": true /* Report errors on unused locals. */, | ||
/* Module Resolution Options */ | ||
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, | ||
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
/* Experimental Options */ | ||
"forceConsistentCasingInFileNames": true, | ||
/* Other options */ | ||
"newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, | ||
"allowJs": false /* Don't allow JavaScript files to be compiled.*/, | ||
"target": "es6", | ||
"outDir": "./dist-esm", | ||
"declarationDir": "./typings", | ||
"resolveJsonModule": true | ||
@@ -35,0 +8,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2242379
48
22572