Updated device class for GWV2, Updated dependencies and tests

This commit is contained in:
Ethan Ann 2024-03-19 14:55:41 -04:00
Родитель 0768e4016c
Коммит 2bd7ee7113
15 изменённых файлов: 669 добавлений и 472 удалений

1083
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,21 +1,22 @@
{
"name": "azure-iothub",
"version": "1.16.4",
"version": "1.16.5",
"description": "Azure IoT SDK - IoT Hub",
"author": "Microsoft Corporation",
"license": "MIT",
"main": "iothub.js",
"typings": "iothub.d.ts",
"dependencies": {
"@azure/core-auth": "^1.4.0",
"@azure/identity": "^2.0.0",
"@azure/core-auth": "^1.7.0",
"@azure/identity": "^4.0.1",
"@azure/ms-rest-js": "^2.0.5",
"async": "^3.2.3",
"debug": "^4.3.1",
"getos": "^3.2.1",
"lodash": "^4.17.21",
"machina": "^4.0.2",
"rhea": "^1.0.15"
"rhea": "^1.0.15",
"ws": "^8.16.0"
},
"devDependencies": {
"@types/debug": "^4.1.5",

Просмотреть файл

@ -129,14 +129,6 @@ export class Device implements DeviceIdentity {
_.merge(this, userProps);
}
Object.defineProperty(this.authentication, 'SymmetricKey', {
enumerable: true,
get: function (): Device._SymmetricKey {
/*Codes_SRS_NODE_SERVICE_DEVICE_16_005: [The `authentication.SymmetricKey` property shall return the content of the `authentication.symmetricKey` property (the latter being the valid property returned by the IoT hub in the device description).]*/
return this.symmetricKey;
}
});
}
}
@ -150,7 +142,6 @@ export namespace Device {
export interface Authentication {
// eslint-disable-next-line @typescript-eslint/naming-convention
SymmetricKey?: _SymmetricKey;
symmetricKey?: _SymmetricKey;
x509Thumbprint?: X509Thumbprints;
}

Просмотреть файл

@ -4,7 +4,7 @@
'use strict';
const assert = require('chai').assert;
const errors = require('azure-iot-common').errors;
const errors = require('../dist/common-core/errors.js');
const translateError = require('../dist/amqp_service_errors.js').translateError;
describe('translateError', function () {

Просмотреть файл

@ -6,11 +6,11 @@ const sinon = require('sinon');
const EventEmitter = require('events').EventEmitter;
const Amqp = require('../dist/amqp.js').Amqp;
const assert = require('chai').assert;
const SharedAccessSignature = require('azure-iot-common').SharedAccessSignature;
const errors = require('azure-iot-common').errors;
const results = require('azure-iot-common').results;
const Message = require('azure-iot-common').Message;
const AmqpMessage = require('azure-iot-amqp-base').AmqpMessage;
const SharedAccessSignature = require('../dist/common-core/shared_access_signature.js').SharedAccessSignature;
const errors = require('../dist/common-core/errors.js');
const results = require('../dist/common-core/results.js');
const Message = require('../dist/common-core/message.js').Message;
const AmqpMessage = require('../dist/common-amqp/amqp_message.js').AmqpMessage;
const fakeConfig = {

Просмотреть файл

@ -5,7 +5,7 @@
const Amqp = require('../dist/amqp.js').Amqp;
const AmqpWs = require('../dist/amqp_ws.js').AmqpWs;
const assert = require('chai').assert;
const results = require('azure-iot-common').results;
const results = require('../dist/common-core/results.js');
const sinon = require('sinon');
describe('AmqpWs', function () {

Просмотреть файл

@ -6,8 +6,8 @@
const assert = require('chai').assert;
const Client = require('../dist/client.js').Client;
const errors = require('azure-iot-common').errors;
const Message = require('azure-iot-common').Message;
const errors = require('../dist/common-core/errors.js');
const Message = require('../dist/common-core/message.js').Message;
const debug = require('debug')('azure-iothub:_client_common_testrun');
function transportSpecificTests(opts) {

Просмотреть файл

@ -9,8 +9,8 @@ const sinon = require('sinon');
const EventEmitter = require('events').EventEmitter;
const Amqp = require('../dist/amqp.js').Amqp;
const Client = require('../dist/client.js').Client;
const Message = require('azure-iot-common').Message;
const errors = require('azure-iot-common').errors;
const errors = require('../dist/common-core/errors.js');
const Message = require('../dist/common-core/message.js').Message;
const SimulatedAmqp = require('./amqp_simulated.js');
const transportSpecificTests = require('./_client_common_testrun.js');

Просмотреть файл

@ -4,7 +4,7 @@
'use strict';
const assert = require('chai').assert;
const ArgumentError = require('azure-iot-common').errors.ArgumentError;
const ArgumentError = require('../dist/common-core/errors.js').ArgumentError;
const ConnectionString = require('../dist/connection_string.js');
const incompleteConnectionStrings = {

Просмотреть файл

@ -12,7 +12,7 @@ const JobClient = require('../dist/job_client').JobClient;
const ConnectionString = require('../iothub').ConnectionString;
const SharedAccessSignature = require('../iothub').SharedAccessSignature;
const DeviceMethod = require('../dist/device_method').DeviceMethod;
const RestApiClient = require('azure-iot-http-base').RestApiClient;
const RestApiClient = require('../dist/common-http/rest_api_client').RestApiClient;
const Query = require('../dist/query').Query;
const defaultMaxExecutionTimeInSeconds = 3600;

Просмотреть файл

@ -7,7 +7,7 @@ const assert = require('chai').assert;
const sinon = require('sinon');
const uuid = require('uuid');
const versionQueryString = require('../dist/version').versionQueryString;
const errors = require('azure-iot-common').errors;
const errors = require('../dist/common-core/errors.js');
const Registry = require('../dist/registry.js').Registry;
const Twin = require('../dist/twin.js').Twin;
const Query = require('../dist/query.js').Query;

Просмотреть файл

@ -6,7 +6,7 @@
const EventEmitter = require('events').EventEmitter;
const assert = require('chai').assert;
const sinon = require('sinon');
const Message = require('azure-iot-common').Message;
const Message = require('../dist/common-core/message.js').Message;
const ServiceReceiver = require('../dist/service_receiver.js').ServiceReceiver;
describe('ServiceReceiver', function () {

Просмотреть файл

@ -4,7 +4,7 @@
'use strict';
const assert = require('chai').assert;
const ArgumentError = require('azure-iot-common').errors.ArgumentError;
const ArgumentError = require('../dist/common-core/errors.js').ArgumentError;
const SharedAccessSignature = require('../dist/shared_access_signature.js');
const incompleteSignatures = {

Просмотреть файл

@ -5,7 +5,7 @@
const assert = require('chai').assert;
const sinon = require('sinon');
const errors = require('azure-iot-common').errors;
const errors = require('../dist/common-core/errors.js');
const Registry = require('../dist/registry.js').Registry;
const Twin = require('../dist/twin.js').Twin;

Просмотреть файл

@ -3,11 +3,11 @@
'use strict';
const errors = require('azure-iot-common').errors;
const results = require('azure-iot-common').results;
const errors = require('../dist/common-core/errors.js');
const results = require('../dist/common-core/results.js');
const EventEmitter = require('events').EventEmitter;
const util = require('util');
const AmqpReceiver = require('azure-iot-amqp-base').AmqpReceiver;
const AmqpReceiver = require('../dist/common-amqp/receiver_link.js').ReceiverLink;
function SimulatedAmqp() {
EventEmitter.call(this);