azure-iot-http-base
Advanced tools
Comparing version 1.12.1 to 1.12.2
@@ -59,3 +59,3 @@ // Copyright (c) Microsoft. All rights reserved. | ||
} | ||
let httpOptions = { | ||
const httpOptions = { | ||
path: path, | ||
@@ -102,3 +102,3 @@ method: method, | ||
} | ||
let httpReq = request(httpOptions, (response) => { | ||
const httpReq = request(httpOptions, (response) => { | ||
let responseBody = ''; | ||
@@ -116,3 +116,3 @@ response.on('error', (err) => { | ||
response - the Node.js http.IncomingMessage object returned by the transport]*/ | ||
let err = (response.statusCode >= 300) ? | ||
const err = (response.statusCode >= 300) ? | ||
new Error(response.statusMessage) : | ||
@@ -142,3 +142,3 @@ null; | ||
msg = new azure_iot_common_1.Message(body); | ||
for (let item in response.headers) { | ||
for (const item in response.headers) { | ||
if (item.search('iothub-') !== -1) { | ||
@@ -145,0 +145,0 @@ if (item.toLowerCase() === 'iothub-messageid') { |
import { SharedAccessSignature, X509 } from 'azure-iot-common'; | ||
import { Http as HttpBase, HttpRequestOptions } from './http'; | ||
import { AccessToken, TokenCredential } from '@azure/core-http'; | ||
import { AccessToken, TokenCredential } from '@azure/core-auth'; | ||
/** | ||
@@ -73,3 +73,3 @@ * @private | ||
*/ | ||
isAccessTokenCloseToExpiry(accessToken: AccessToken): Boolean; | ||
isAccessTokenCloseToExpiry(accessToken: AccessToken): boolean; | ||
/** | ||
@@ -76,0 +76,0 @@ * @private |
@@ -84,3 +84,3 @@ // Copyright (c) Microsoft. All rights reserved. | ||
- User-Agent: <version string>]*/ | ||
let httpHeaders = headers || {}; | ||
const httpHeaders = headers || {}; | ||
if (this._config.tokenCredential) { | ||
@@ -216,3 +216,3 @@ this.getToken().then((accessToken) => { | ||
let request; | ||
if (!!this._config.x509) { | ||
if (this._config.x509) { | ||
/* Codes_SRS_NODE_IOTHUB_REST_API_CLIENT_18_002: [ If an `x509` cert was passed into the constructor via the `config` object, `executeApiCall` shall use it to establish the TLS connection. ] */ | ||
@@ -219,0 +219,0 @@ request = this._http.buildRequest(method, path, httpHeaders, this._config.host, this._config.x509, requestCallback); |
@@ -8,2 +8,3 @@ // Copyright (c) Microsoft. All rights reserved. | ||
* The `azure-iot-http-base` module contains HTTP support code common to the Azure IoT Hub Device and Service SDKs. | ||
* | ||
* @private | ||
@@ -17,2 +18,2 @@ * @module azure-iot-http-base | ||
RestApiClient: require('./dist/rest_api_client.js').RestApiClient | ||
}; | ||
}; |
{ | ||
"name": "azure-iot-http-base", | ||
"version": "1.12.1", | ||
"version": "1.12.2", | ||
"description": "HTTP operations used by Azure IoT device and service SDKs", | ||
@@ -10,12 +10,22 @@ "author": "Microsoft Corporation", | ||
"dependencies": { | ||
"@azure/core-auth": "^1.4.0", | ||
"async": "^3.2.3", | ||
"azure-iot-common": "1.13.2", | ||
"debug": "^4.3.1", | ||
"es5-ext": "0.10.53", | ||
"debug": "^4.3.1", | ||
"azure-iot-common": "1.13.1", | ||
"uuid": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@azure/core-http": "^1.2.3", | ||
"@types/node": "^16.10.2", | ||
"@typescript-eslint/eslint-plugin": "^5.41.0", | ||
"@typescript-eslint/eslint-plugin-tslint": "^5.41.0", | ||
"@typescript-eslint/parser": "^5.41.0", | ||
"chai": "^4.3.3", | ||
"eslint": "^8.26.0", | ||
"eslint-plugin-jsdoc": "^39.3.25", | ||
"eslint-plugin-mocha": "^10.1.0", | ||
"eslint-plugin-no-null": "^1.0.2", | ||
"eslint-plugin-no-only-tests": "^3.1.0", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-security": "^1.5.0", | ||
"mocha": "^9.2.1", | ||
@@ -25,13 +35,12 @@ "nyc": "^15.0.0", | ||
"source-map-support": "^0.5.16", | ||
"ts-node": "^8.6.2", | ||
"tslint": "^6.1.3", | ||
"typescript": "4.4.4" | ||
}, | ||
"scripts": { | ||
"npmlockrefresh": "npm i --package-lock-only", | ||
"lint": "tslint --project . -c ../../../tslint.json", | ||
"srclint": "eslint src --ext .ts -f visualstudio", | ||
"tstlint": "eslint test --ext .js -f visualstudio", | ||
"lint": "npm run srclint && npm run tstlint", | ||
"build": "tsc", | ||
"unittest-min": "tsc && nyc --reporter lcov ../../../node_modules/mocha/bin/_mocha --reporter dot", | ||
"unittest-min": "tsc && nyc --reporter lcov ../../../node_modules/mocha/bin/_mocha --reporter dot test/_*_test*.js", | ||
"alltest-min": "tsc && nyc --reporter lcov ../../../node_modules/mocha/bin/_mocha --reporter dot test/_*_test*.js", | ||
"unittest": "tsc && nyc --reporter lcov --reporter text ../../../node_modules/mocha/bin/_mocha", | ||
"unittest": "tsc && nyc --reporter lcov --reporter text ../../../node_modules/mocha/bin/_mocha test/_*_test*.js", | ||
"alltest": "tsc && nyc --reporter lcov --reporter text ../../../node_modules/mocha/bin/_mocha test/_*_test*.js", | ||
@@ -70,4 +79,3 @@ "ci": "npm -s run lint && npm -s run build && npm -s run alltest-min", | ||
"full-trace": true, | ||
"bail": true, | ||
"spec": "test/**/_*_test.js" | ||
"bail": true | ||
}, | ||
@@ -74,0 +82,0 @@ "engines": { |
{ | ||
"compilerOptions": { | ||
"outDir": "./dist", | ||
"target":"es2018", | ||
"module": "commonjs", | ||
"sourceMap": true, | ||
"declaration": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"removeComments": false | ||
}, | ||
"include": [ | ||
"./src/**/*.ts" | ||
] | ||
"extends": "../../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "dist" | ||
}, | ||
"include": [ | ||
"./src/**/*.ts" | ||
] | ||
} |
47715
6
17
775
+ Added@azure/core-auth@^1.4.0
+ Added@azure/abort-controller@2.1.2(transitive)
+ Added@azure/core-auth@1.9.0(transitive)
+ Added@azure/core-util@1.11.0(transitive)
+ Addedazure-iot-common@1.13.2(transitive)
+ Addedtslib@2.8.1(transitive)
- Removedazure-iot-common@1.13.1(transitive)
Updatedazure-iot-common@1.13.2