Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-iot-device-sdk-v2

Package Overview
Dependencies
Maintainers
4
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-iot-device-sdk-v2 - npm Package Compare versions

Comparing version 1.16.0 to 1.16.1

4

dist/eventstream_rpc.d.ts

@@ -377,2 +377,6 @@ /// <reference types="node" />

getStream(): eventstream.ClientStream;
/**
* Set this operation state to be "Ended" so that closing the operation will not send a terminate message.
*/
setStateEnded(): void;
}

@@ -379,0 +383,0 @@ /**

@@ -485,2 +485,8 @@ "use strict";

getStream() { return this.stream; }
/**
* Set this operation state to be "Ended" so that closing the operation will not send a terminate message.
*/
setStateEnded() {
this.state = OperationState.Ended;
}
}

@@ -514,2 +520,3 @@ /**

let resultPromise = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
var _a;
try {

@@ -530,2 +537,6 @@ let stream = this.operation.getStream();

let message = yield responsePromise;
// If the server terminated the stream, then set the operation to be ended immediately
if (((_a = message.flags) !== null && _a !== void 0 ? _a : 0) & aws_crt_1.eventstream.MessageFlags.TerminateStream) {
this.operation.setStateEnded();
}
let response = deserializeResponse(this.serviceModel, this.operationConfig.name, message);

@@ -577,2 +588,3 @@ resolve(response);

return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
var _a;
try {

@@ -596,2 +608,10 @@ let stream = this.operation.getStream();

let response = deserializeResponse(this.serviceModel, this.operationConfig.name, message);
// If the server terminated the stream, then set the operation to be ended immediately
if (((_a = message.flags) !== null && _a !== void 0 ? _a : 0) & aws_crt_1.eventstream.MessageFlags.TerminateStream) {
this.operation.setStateEnded();
// Server hung up on us. Immediately cleanup the operation state.
// Do this before resolving the promise so that any user-initiated
// requests will see the correct state, which is that the operation is closed.
yield this.close();
}
resolve(response);

@@ -598,0 +618,0 @@ }

@@ -788,2 +788,9 @@ /*

getStream() : eventstream.ClientStream { return this.stream; }
/**
* Set this operation state to be "Ended" so that closing the operation will not send a terminate message.
*/
setStateEnded() {
this.state = OperationState.Ended;
}
}

@@ -841,2 +848,7 @@

let message : eventstream.Message = await responsePromise;
// If the server terminated the stream, then set the operation to be ended immediately
if ((message.flags ?? 0) & eventstream.MessageFlags.TerminateStream) {
this.operation.setStateEnded();
}
let response : ResponseType = deserializeResponse(this.serviceModel, this.operationConfig.name, message);

@@ -933,2 +945,11 @@

// If the server terminated the stream, then set the operation to be ended immediately
if ((message.flags ?? 0) & eventstream.MessageFlags.TerminateStream) {
this.operation.setStateEnded();
// Server hung up on us. Immediately cleanup the operation state.
// Do this before resolving the promise so that any user-initiated
// requests will see the correct state, which is that the operation is closed.
await this.close();
}
resolve(response);

@@ -935,0 +956,0 @@ } catch (e) {

2

package.json
{
"name": "aws-iot-device-sdk-v2",
"version": "1.16.0",
"version": "1.16.1",
"description": "NodeJS API for the AWS IoT service",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/aws/aws-iot-device-sdk-js-v2",

# AWS IoT Device SDK for JavaScript v2
This document provides information about the AWS IoT device SDK for Javascript V2.
If you have any issues or feature requests, please file an issue or pull request.
This document provides information about the AWS IoT device SDK for Javascript V2. This SDK is built on the [AWS Common Runtime](https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html)
This SDK is built on the AWS Common Runtime, a collection of libraries
([aws-c-common](https://github.com/awslabs/aws-c-common),
[aws-c-io](https://github.com/awslabs/aws-c-io),
[aws-c-mqtt](https://github.com/awslabs/aws-c-mqtt),
[aws-c-http](https://github.com/awslabs/aws-c-http),
[aws-c-cal](https://github.com/awslabs/aws-c-cal) ...) written in C to be
cross-platform, high-performance, secure, and reliable. The libraries are bound
to JS by the [awscrt](https://github.com/awslabs/aws-crt-nodejs) package.
*__Jump To:__*

@@ -20,3 +10,3 @@ * [Installation](#installation)

* [FAQ](./documents/FAQ.md)
* [Giving Feedback and Contributions](#giving-feedback-and-contributions)
* [API Docs](https://aws.github.io/aws-iot-device-sdk-js-v2/)
* [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -27,14 +17,5 @@

[discussion thread](https://github.com/awslabs/aws-crt-nodejs/discussions/468)
has been created for any questions or feedback you may have. We do not yet have a concrete timeline for when the
has been created for any questions or feedback you may have. We do not yet have a concrete timeline for when the
update will happen.
## What's New
The SDK now supports Greengrass IPC. See the [Greengrass IPC User Guide](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/GreengrassIPC.md)
or the [API Documentation](https://aws.github.io/aws-iot-device-sdk-js-v2/node/modules/greengrasscoreipc.html) for more information.
The SDK now supports MQTT5. See the [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)
or the API Documentation for [NodeJS](https://awslabs.github.io/aws-crt-nodejs/node/modules/mqtt5.html) or
the [browser](https://awslabs.github.io/aws-crt-nodejs/browser/modules/mqtt5.html) for more information. There is also a [MQTT5 sample for NodeJS](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/samples/node/pub_sub_mqtt5) and a [MQTT5 sample for the browser](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/samples/browser/pub_sub_mqtt5).
## Installation

@@ -78,27 +59,2 @@

### Build the V2 SDK and CRT from source
``` sh
# Create a workspace directory to hold all the SDK files.
mkdir sdk-workspace
cd sdk-workspace
# Clone the CRT repository.
# (Use the latest version of the CRT here instead of "v1.12.4").
git clone --branch v1.12.4 --recurse-submodules https://github.com/awslabs/aws-crt-nodejs.git
# Ensure all submodules are properly updated.
cd aws-crt-nodejs
git submodule update --init --recursive
cd ..
# Clone the SDK repository.
git clone --recursive https://github.com/aws/aws-iot-device-sdk-js-v2.git
# Ensure all submodules are properly updated.
cd aws-iot-device-sdk-js-v2
git submodule update --init --recursive
# Install the CRT.
npm install ../aws-crt-nodejs
# Install the SDK.
npm install
# Then you can run the samples following the instructions in the samples README.
```
## Samples

@@ -110,9 +66,9 @@

The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-iot-device-sdk-js-v2/issues) and choose from one of our templates for guidance, bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag #aws-iot or If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
The best way to interact with our team is through GitHub. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-js-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-js-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
Please make sure to check out our resources too before opening an issue:
* Our [FAQ](./documents/FAQ.md)
* [API Documentation](https://aws.github.io/aws-iot-device-sdk-js-v2/)
* Our [Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
* [FAQ](./documents/FAQ.md)
* [API Docs](https://aws.github.io/aws-iot-device-sdk-js-v2/)
* [IoT Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
* [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -126,11 +82,3 @@ * Check for similar [Issues](https://github.com/aws/aws-iot-device-sdk-js-v2/issues)

is provided by code that been generated from a model of the service.
## Giving Feedback and Contributions
We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels.
* [Contributions Guidelines](./documents/CONTRIBUTING.md)
* Articulate your feature request or upvote existing ones on our [Issues](https://github.com/aws/aws-iot-device-sdk-js-v2/issues?q=is%3Aissue+is%3Aopen+label%3Afeature-request) page.
* Create discussion questions [here](https://github.com/aws/aws-iot-device-sdk-js-v2/discussions)
* Find a bug open an [issue](https://github.com/aws/aws-iot-device-sdk-js-v2/issues)

@@ -141,2 +89,2 @@ ## License

Latest released version: v1.16.0
Latest released version: v1.16.1

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc