Socket
Socket
Sign inDemoInstall

aws-crt

Package Overview
Dependencies
Maintainers
4
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-crt - npm Package Compare versions

Comparing version 1.20.1 to 1.21.0

2

dist.browser/browser/auth.js

@@ -36,3 +36,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -39,0 +39,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

@@ -30,4 +30,4 @@ /**

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -34,0 +34,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -40,4 +40,4 @@ "use strict";

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -44,0 +44,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -169,3 +169,3 @@ /**

*/
export declare type HttpStreamResponse = (status_code: number, headers: HttpHeaders) => void;
export type HttpStreamResponse = (status_code: number, headers: HttpHeaders) => void;
/**

@@ -172,0 +172,0 @@ * Represents a single http message exchange (request/response) in HTTP.

@@ -50,3 +50,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -245,21 +245,24 @@ if (y = 0, t) op = [op[0] & 2, t.value];

HttpHeaders.prototype[Symbol.iterator] = function () {
var _a, _b, _i, key, values, values_1, values_1_1, entry, e_3_1;
var e_3, _c;
return __generator(this, function (_d) {
switch (_d.label) {
var _a, _b, _c, _i, key, values, values_1, values_1_1, entry, e_3_1;
var e_3, _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_a = [];
for (_b in this.headers)
_a.push(_b);
_a = this.headers;
_b = [];
for (_c in _a)
_b.push(_c);
_i = 0;
_d.label = 1;
_e.label = 1;
case 1:
if (!(_i < _a.length)) return [3 /*break*/, 10];
key = _a[_i];
if (!(_i < _b.length)) return [3 /*break*/, 10];
_c = _b[_i];
if (!(_c in _a)) return [3 /*break*/, 9];
key = _c;
values = this.headers[key];
_d.label = 2;
_e.label = 2;
case 2:
_d.trys.push([2, 7, 8, 9]);
_e.trys.push([2, 7, 8, 9]);
values_1 = (e_3 = void 0, __values(values)), values_1_1 = values_1.next();
_d.label = 3;
_e.label = 3;
case 3:

@@ -270,4 +273,4 @@ if (!!values_1_1.done) return [3 /*break*/, 6];

case 4:
_d.sent();
_d.label = 5;
_e.sent();
_e.label = 5;
case 5:

@@ -278,3 +281,3 @@ values_1_1 = values_1.next();

case 7:
e_3_1 = _d.sent();
e_3_1 = _e.sent();
e_3 = { error: e_3_1 };

@@ -284,3 +287,3 @@ return [3 /*break*/, 9];

try {
if (values_1_1 && !values_1_1.done && (_c = values_1.return)) _c.call(values_1);
if (values_1_1 && !values_1_1.done && (_d = values_1.return)) _d.call(values_1);
}

@@ -287,0 +290,0 @@ finally { if (e_3) throw e_3.error; }

@@ -24,3 +24,3 @@ /**

export declare function is_alpn_available(): boolean;
export declare type BodyData = string | object | ArrayBuffer | ArrayBufferView | Blob | File;
export type BodyData = string | object | ArrayBuffer | ArrayBufferView | Blob | File;
/**

@@ -50,3 +50,3 @@ * Wrapper for any sort of body data in requests. As the browser does not implement streaming,

*/
export declare type TlsContextOptions = any;
export type TlsContextOptions = any;
/**

@@ -53,0 +53,0 @@ * TLS options that are unique to a given connection using a shared TlsContext.

@@ -15,3 +15,3 @@ import * as WebsocketUtils from "./ws";

*/
export declare type MqttConnectionError = (error: CrtError) => void;
export type MqttConnectionError = (error: CrtError) => void;
/**

@@ -25,3 +25,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionInterrupted = (error: CrtError) => void;
export type MqttConnectionInterrupted = (error: CrtError) => void;
/**

@@ -37,3 +37,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionSuccess = (callback_data: OnConnectionSuccessResult) => void;
export type MqttConnectionSuccess = (callback_data: OnConnectionSuccessResult) => void;
/**

@@ -49,3 +49,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has failed

*/
export declare type MqttConnectionFailure = (callback_data: OnConnectionFailedResult) => void;
export type MqttConnectionFailure = (callback_data: OnConnectionFailedResult) => void;
/**

@@ -60,11 +60,11 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionClosed = (callback_data: OnConnectionClosedResult) => void;
export type MqttConnectionClosed = (callback_data: OnConnectionClosedResult) => void;
/**
* @category MQTT
*/
export declare type WebsocketOptions = WebsocketUtils.WebsocketOptions;
export type WebsocketOptions = WebsocketUtils.WebsocketOptions;
/**
* @category MQTT
*/
export declare type AWSCredentials = auth.AWSCredentials;
export type AWSCredentials = auth.AWSCredentials;
/**

@@ -71,0 +71,0 @@ * Configuration options for an MQTT connection

@@ -59,3 +59,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -62,0 +62,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

@@ -21,3 +21,3 @@ /**

*/
export declare type Mqtt5WebsocketUrlFactory = () => string;
export type Mqtt5WebsocketUrlFactory = () => string;
/**

@@ -81,3 +81,3 @@ * Type of url to construct when establishing an MQTT5 connection over websockets

*/
export declare type Mqtt5WebsocketUrlFactoryOptions = Mqtt5WebsocketUrlFactoryWsOptions | Mqtt5WebsocketUrlFactoryWssOptions | Mqtt5WebsocketUrlFactorySigv4Options | Mqtt5WebsocketUrlFactoryCustomOptions;
export type Mqtt5WebsocketUrlFactoryOptions = Mqtt5WebsocketUrlFactoryWsOptions | Mqtt5WebsocketUrlFactoryWssOptions | Mqtt5WebsocketUrlFactorySigv4Options | Mqtt5WebsocketUrlFactoryCustomOptions;
/**

@@ -84,0 +84,0 @@ * Browser-specific websocket configuration options for connection establishment

@@ -62,3 +62,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -65,0 +65,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

@@ -9,3 +9,3 @@ /** @internal */

/** @internal */
export declare type KeySplitter = (key: string) => string[];
export type KeySplitter = (key: string) => string[];
/** @internal */

@@ -12,0 +12,0 @@ export declare enum TrieOp {

@@ -14,3 +14,3 @@ /// <reference types="node" />

*/
export declare type CancelListener = () => void;
export type CancelListener = () => void;
/**

@@ -51,3 +51,3 @@ * Abstract interface for an object capable of cancelling asynchronous operations.

*/
export declare type EventEmitterFactory = () => EventEmitter;
export type EventEmitterFactory = () => EventEmitter;
/**

@@ -54,0 +54,0 @@ * Configuration options for the CRT implementation of ICancelController

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

*/
export declare type Hashable = string | ArrayBuffer | DataView | Buffer;
export type Hashable = string | ArrayBuffer | DataView | Buffer;

@@ -14,3 +14,3 @@ /// <reference types="node" />

*/
export declare type EventKey = string | symbol;
export type EventKey = string | symbol;
/**

@@ -17,0 +17,0 @@ * Provides buffered event emitting semantics, similar to many Node-style streams.

@@ -27,3 +27,3 @@ /**

*/
export declare type HttpHeader = [string, string];
export type HttpHeader = [string, string];
/**

@@ -126,3 +126,3 @@ * Common interface for a set of HTTP headers.

*/
export declare type HttpClientConnectionConnected = () => void;
export type HttpClientConnectionConnected = () => void;
/**

@@ -135,3 +135,3 @@ * Listener signature for event emitted from an {@link HttpClientConnection} when an error occurs

*/
export declare type HttpClientConnectionError = (error: Error) => void;
export type HttpClientConnectionError = (error: Error) => void;
/**

@@ -142,3 +142,3 @@ * Listener signature for event emitted from an {@link HttpClientConnection} when the connection has been closed

*/
export declare type HttpClientConnectionClosed = () => void;
export type HttpClientConnectionClosed = () => void;
/**

@@ -151,3 +151,3 @@ * Listener signature for event emitted from an {@link HttpClientStream} when http response data is available

*/
export declare type HttpStreamData = (body_data: ArrayBuffer) => void;
export type HttpStreamData = (body_data: ArrayBuffer) => void;
/**

@@ -160,3 +160,3 @@ * Listener signature for event emitted from an {@link HttpClientStream} when an http stream error occurs

*/
export declare type HttpStreamError = (error: Error) => void;
export type HttpStreamError = (error: Error) => void;
/**

@@ -167,2 +167,2 @@ * Listener signature for event emitted from an {@link HttpClientStream} when the http stream has completed.

*/
export declare type HttpStreamComplete = () => void;
export type HttpStreamComplete = () => void;

@@ -49,3 +49,3 @@ /**

*/
export declare type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
export type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
/**

@@ -64,3 +64,3 @@ * Function called upon receipt of a Publish message on a subscribed topic.

*/
export declare type OnMessageCallback = (topic: string, payload: ArrayBuffer, dup: boolean, qos: QoS, retain: boolean) => void;
export type OnMessageCallback = (topic: string, payload: ArrayBuffer, dup: boolean, qos: QoS, retain: boolean) => void;
/**

@@ -159,3 +159,3 @@ * Every request sent returns an MqttRequest

*/
export declare type MqttConnectionConnected = (session_present: boolean) => void;
export type MqttConnectionConnected = (session_present: boolean) => void;
/**

@@ -167,3 +167,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has fully disconnected

*/
export declare type MqttConnectionDisconnected = () => void;
export type MqttConnectionDisconnected = () => void;
/**

@@ -178,3 +178,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection successfully

*/
export declare type MqttConnectionResumed = (return_code: number, session_present: boolean) => void;
export type MqttConnectionResumed = (return_code: number, session_present: boolean) => void;
/**

@@ -181,0 +181,0 @@ * Const value for max reconnection back off time

@@ -521,7 +521,7 @@ /**

*/
export declare type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
export type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
/**
* Valid types for MQTT5 packet binary data fields (other than PUBLISH payload)
*/
export declare type BinaryData = ArrayBuffer | ArrayBufferView;
export type BinaryData = ArrayBuffer | ArrayBufferView;
/**

@@ -528,0 +528,0 @@ * MQTT message delivery quality of service.

@@ -287,27 +287,27 @@ /**

*/
export declare type ErrorEventListener = (error: ICrtError) => void;
export type ErrorEventListener = (error: ICrtError) => void;
/**
* Client Stopped lifecycle event listener signature
*/
export declare type StoppedEventListener = (eventData: StoppedEvent) => void;
export type StoppedEventListener = (eventData: StoppedEvent) => void;
/**
* Client AttemptingConnect lifecycle event listener signature
*/
export declare type AttemptingConnectEventListener = (eventData: AttemptingConnectEvent) => void;
export type AttemptingConnectEventListener = (eventData: AttemptingConnectEvent) => void;
/**
* Client ConnectionSuccess lifecycle event listener signature
*/
export declare type ConnectionSuccessEventListener = (eventData: ConnectionSuccessEvent) => void;
export type ConnectionSuccessEventListener = (eventData: ConnectionSuccessEvent) => void;
/**
* Client ConnectionFailure lifecycle event listener signature
*/
export declare type ConnectionFailureEventListener = (eventData: ConnectionFailureEvent) => void;
export type ConnectionFailureEventListener = (eventData: ConnectionFailureEvent) => void;
/**
* Client Disconnection lifecycle event listener signature
*/
export declare type DisconnectionEventListener = (eventData: DisconnectionEvent) => void;
export type DisconnectionEventListener = (eventData: DisconnectionEvent) => void;
/**
* Message received event listener signature
*/
export declare type MessageReceivedEventListener = (eventData: MessageReceivedEvent) => void;
export type MessageReceivedEventListener = (eventData: MessageReceivedEvent) => void;
/**

@@ -320,3 +320,3 @@ * Polymorphic success result for publish actions:

*/
export declare type PublishCompletionResult = mqtt5_packet.PubackPacket | undefined;
export type PublishCompletionResult = mqtt5_packet.PubackPacket | undefined;
/**

@@ -323,0 +323,0 @@ * Shared MQTT5 client interface across browser and node.

@@ -12,3 +12,3 @@ /**

*/
export declare type PromiseCleanupFunctor = () => void;
export type PromiseCleanupFunctor = () => void;
/**

@@ -49,7 +49,7 @@ * A helper function that takes a promise and creates a wrapper promise that invokes a cleanup function when the inner

*/
export declare type LiftedResolver<ResultType> = (value: ResultType) => void;
export type LiftedResolver<ResultType> = (value: ResultType) => void;
/**
* Generic type signature for a promise rejection function
*/
export declare type LiftedRejecter = (error?: any) => void;
export type LiftedRejecter = (error?: any) => void;
/**

@@ -56,0 +56,0 @@ * A promise variant that makes the resolve and reject functions available for external invocations.

@@ -21,3 +21,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -24,0 +24,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

@@ -14,3 +14,3 @@ /// <reference types="node" />

*/
export declare type CancelListener = () => void;
export type CancelListener = () => void;
/**

@@ -51,3 +51,3 @@ * Abstract interface for an object capable of cancelling asynchronous operations.

*/
export declare type EventEmitterFactory = () => EventEmitter;
export type EventEmitterFactory = () => EventEmitter;
/**

@@ -54,0 +54,0 @@ * Configuration options for the CRT implementation of ICancelController

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

*/
export declare type Hashable = string | ArrayBuffer | DataView | Buffer;
export type Hashable = string | ArrayBuffer | DataView | Buffer;

@@ -14,3 +14,3 @@ /// <reference types="node" />

*/
export declare type EventKey = string | symbol;
export type EventKey = string | symbol;
/**

@@ -17,0 +17,0 @@ * Provides buffered event emitting semantics, similar to many Node-style streams.

@@ -27,3 +27,3 @@ /**

*/
export declare type HttpHeader = [string, string];
export type HttpHeader = [string, string];
/**

@@ -126,3 +126,3 @@ * Common interface for a set of HTTP headers.

*/
export declare type HttpClientConnectionConnected = () => void;
export type HttpClientConnectionConnected = () => void;
/**

@@ -135,3 +135,3 @@ * Listener signature for event emitted from an {@link HttpClientConnection} when an error occurs

*/
export declare type HttpClientConnectionError = (error: Error) => void;
export type HttpClientConnectionError = (error: Error) => void;
/**

@@ -142,3 +142,3 @@ * Listener signature for event emitted from an {@link HttpClientConnection} when the connection has been closed

*/
export declare type HttpClientConnectionClosed = () => void;
export type HttpClientConnectionClosed = () => void;
/**

@@ -151,3 +151,3 @@ * Listener signature for event emitted from an {@link HttpClientStream} when http response data is available

*/
export declare type HttpStreamData = (body_data: ArrayBuffer) => void;
export type HttpStreamData = (body_data: ArrayBuffer) => void;
/**

@@ -160,3 +160,3 @@ * Listener signature for event emitted from an {@link HttpClientStream} when an http stream error occurs

*/
export declare type HttpStreamError = (error: Error) => void;
export type HttpStreamError = (error: Error) => void;
/**

@@ -167,2 +167,2 @@ * Listener signature for event emitted from an {@link HttpClientStream} when the http stream has completed.

*/
export declare type HttpStreamComplete = () => void;
export type HttpStreamComplete = () => void;

@@ -49,3 +49,3 @@ /**

*/
export declare type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
export type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
/**

@@ -64,3 +64,3 @@ * Function called upon receipt of a Publish message on a subscribed topic.

*/
export declare type OnMessageCallback = (topic: string, payload: ArrayBuffer, dup: boolean, qos: QoS, retain: boolean) => void;
export type OnMessageCallback = (topic: string, payload: ArrayBuffer, dup: boolean, qos: QoS, retain: boolean) => void;
/**

@@ -159,3 +159,3 @@ * Every request sent returns an MqttRequest

*/
export declare type MqttConnectionConnected = (session_present: boolean) => void;
export type MqttConnectionConnected = (session_present: boolean) => void;
/**

@@ -167,3 +167,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has fully disconnected

*/
export declare type MqttConnectionDisconnected = () => void;
export type MqttConnectionDisconnected = () => void;
/**

@@ -178,3 +178,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection successfully

*/
export declare type MqttConnectionResumed = (return_code: number, session_present: boolean) => void;
export type MqttConnectionResumed = (return_code: number, session_present: boolean) => void;
/**

@@ -181,0 +181,0 @@ * Const value for max reconnection back off time

@@ -521,7 +521,7 @@ /**

*/
export declare type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
export type Payload = string | Record<string, unknown> | ArrayBuffer | ArrayBufferView;
/**
* Valid types for MQTT5 packet binary data fields (other than PUBLISH payload)
*/
export declare type BinaryData = ArrayBuffer | ArrayBufferView;
export type BinaryData = ArrayBuffer | ArrayBufferView;
/**

@@ -528,0 +528,0 @@ * MQTT message delivery quality of service.

@@ -287,27 +287,27 @@ /**

*/
export declare type ErrorEventListener = (error: ICrtError) => void;
export type ErrorEventListener = (error: ICrtError) => void;
/**
* Client Stopped lifecycle event listener signature
*/
export declare type StoppedEventListener = (eventData: StoppedEvent) => void;
export type StoppedEventListener = (eventData: StoppedEvent) => void;
/**
* Client AttemptingConnect lifecycle event listener signature
*/
export declare type AttemptingConnectEventListener = (eventData: AttemptingConnectEvent) => void;
export type AttemptingConnectEventListener = (eventData: AttemptingConnectEvent) => void;
/**
* Client ConnectionSuccess lifecycle event listener signature
*/
export declare type ConnectionSuccessEventListener = (eventData: ConnectionSuccessEvent) => void;
export type ConnectionSuccessEventListener = (eventData: ConnectionSuccessEvent) => void;
/**
* Client ConnectionFailure lifecycle event listener signature
*/
export declare type ConnectionFailureEventListener = (eventData: ConnectionFailureEvent) => void;
export type ConnectionFailureEventListener = (eventData: ConnectionFailureEvent) => void;
/**
* Client Disconnection lifecycle event listener signature
*/
export declare type DisconnectionEventListener = (eventData: DisconnectionEvent) => void;
export type DisconnectionEventListener = (eventData: DisconnectionEvent) => void;
/**
* Message received event listener signature
*/
export declare type MessageReceivedEventListener = (eventData: MessageReceivedEvent) => void;
export type MessageReceivedEventListener = (eventData: MessageReceivedEvent) => void;
/**

@@ -320,3 +320,3 @@ * Polymorphic success result for publish actions:

*/
export declare type PublishCompletionResult = mqtt5_packet.PubackPacket | undefined;
export type PublishCompletionResult = mqtt5_packet.PubackPacket | undefined;
/**

@@ -323,0 +323,0 @@ * Shared MQTT5 client interface across browser and node.

@@ -12,3 +12,3 @@ /**

*/
export declare type PromiseCleanupFunctor = () => void;
export type PromiseCleanupFunctor = () => void;
/**

@@ -49,7 +49,7 @@ * A helper function that takes a promise and creates a wrapper promise that invokes a cleanup function when the inner

*/
export declare type LiftedResolver<ResultType> = (value: ResultType) => void;
export type LiftedResolver<ResultType> = (value: ResultType) => void;
/**
* Generic type signature for a promise rejection function
*/
export declare type LiftedRejecter = (error?: any) => void;
export type LiftedRejecter = (error?: any) => void;
/**

@@ -56,0 +56,0 @@ * A promise variant that makes the resolve and reject functions available for external invocations.

@@ -31,4 +31,4 @@ /**

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -35,0 +35,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -52,4 +52,4 @@ "use strict";

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -56,0 +56,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -86,8 +86,20 @@ "use strict";

const bin_path = path.resolve(source_root, 'bin');
const search_paths = [
path.join(bin_path, platformDir, binary_name),
let search_paths = [
path.join(bin_path, platformDir, binary_name) + '.node',
];
/*
* Environment variables can inject (at lower-priority) paths into the search process as well. Support both relative
* and absolute path overrides.
*/
let relative_path = process.env.AWS_CRT_NODEJS_BINARY_RELATIVE_PATH;
if (relative_path) {
let final_path = path.resolve(__dirname, ...relative_path.split(path.sep));
search_paths.push(final_path);
}
if (process.env.AWS_CRT_NODEJS_BINARY_ABSOLUTE_PATH) {
search_paths.push(process.env.AWS_CRT_NODEJS_BINARY_ABSOLUTE_PATH);
}
let binding;
for (const path of search_paths) {
if ((0, fs_1.existsSync)(path + '.node')) {
if ((0, fs_1.existsSync)(path)) {
binding = require(path);

@@ -94,0 +106,0 @@ break;

@@ -43,4 +43,4 @@ import { BufferedEventEmitter } from "../common/event";

*/
export declare type Payload = string | ArrayBuffer | ArrayBufferView;
declare type HeaderValue = undefined | /* BooleanTrue, BooleanFalse */ number | /* byte, int16, int32, timestamp */ string | /* string */ Payload;
export type Payload = string | ArrayBuffer | ArrayBufferView;
type HeaderValue = undefined | /* BooleanTrue, BooleanFalse */ number | /* byte, int16, int32, timestamp */ string | /* string */ Payload;
/**

@@ -360,7 +360,7 @@ * Wrapper class for event stream message headers. Similar to HTTP, a header is a name-value pair. Unlike HTTP, the

*/
export declare type MessageListener = (eventData: MessageEvent) => void;
export type MessageListener = (eventData: MessageEvent) => void;
/**
* Signature for a handler that listens to event stream disconnection events.
*/
export declare type DisconnectionListener = (eventData: DisconnectionEvent) => void;
export type DisconnectionListener = (eventData: DisconnectionEvent) => void;
declare const ClientConnection_base: {

@@ -458,3 +458,3 @@ new (...args: any[]): {

*/
export declare type StreamEndedListener = (eventData: StreamEndedEvent) => void;
export type StreamEndedListener = (eventData: StreamEndedEvent) => void;
declare const ClientStream_base: {

@@ -461,0 +461,0 @@ new (...args: any[]): {

@@ -22,3 +22,3 @@ /**

*/
export declare type HttpHeaders = crt_native.HttpHeaders;
export type HttpHeaders = crt_native.HttpHeaders;
/**

@@ -29,3 +29,3 @@ * @category HTTP

/** @internal */
declare type nativeHttpRequest = crt_native.HttpRequest;
type nativeHttpRequest = crt_native.HttpRequest;
/** @internal */

@@ -206,3 +206,3 @@ declare const nativeHttpRequest: typeof crt_native.HttpRequest;

*/
export declare type HttpStreamHeaders = (headers: HttpHeaders) => void;
export type HttpStreamHeaders = (headers: HttpHeaders) => void;
/**

@@ -216,3 +216,3 @@ * Listener signature for event emitted from an {@link HttpClientStream} when the http response headers have arrived.

*/
export declare type HttpStreamResponse = (status_code: number, headers: HttpHeaders) => void;
export type HttpStreamResponse = (status_code: number, headers: HttpHeaders) => void;
/**

@@ -219,0 +219,0 @@ * Stream that sends a request and receives a response.

@@ -152,2 +152,16 @@ "use strict";

class HttpClientConnection extends HttpConnection {
_on_setup(native_handle, error_code) {
if (error_code) {
this.emit('error', new error_1.CrtError(error_code));
return;
}
this.emit('connect');
}
_on_shutdown(native_handle, error_code) {
if (error_code) {
this.emit('error', new error_1.CrtError(error_code));
return;
}
this.emit('close');
}
/** Asynchronously establish a new HttpClientConnection.

@@ -177,16 +191,2 @@ * @param bootstrap Client bootstrap to use when initiating socket connection. Leave undefined to use the

}
_on_setup(native_handle, error_code) {
if (error_code) {
this.emit('error', new error_1.CrtError(error_code));
return;
}
this.emit('connect');
}
_on_shutdown(native_handle, error_code) {
if (error_code) {
this.emit('error', new error_1.CrtError(error_code));
return;
}
this.emit('close');
}
/**

@@ -193,0 +193,0 @@ * Create {@link HttpClientStream} to carry out the request/response exchange.

@@ -16,3 +16,3 @@ import { NativeResource } from "./native_resource";

*/
export declare type MqttConnectionError = (error: CrtError) => void;
export type MqttConnectionError = (error: CrtError) => void;
/**

@@ -26,3 +26,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionInterrupted = (error: CrtError) => void;
export type MqttConnectionInterrupted = (error: CrtError) => void;
/**

@@ -38,3 +38,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionSucess = (callback_data: OnConnectionSuccessResult) => void;
export type MqttConnectionSucess = (callback_data: OnConnectionSuccessResult) => void;
/**

@@ -50,3 +50,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionFailure = (callback_data: OnConnectionFailedResult) => void;
export type MqttConnectionFailure = (callback_data: OnConnectionFailedResult) => void;
/**

@@ -61,3 +61,3 @@ * Listener signature for event emitted from an {@link MqttClientConnection} when the connection has been

*/
export declare type MqttConnectionClosed = (callback_data: OnConnectionClosedResult) => void;
export type MqttConnectionClosed = (callback_data: OnConnectionClosedResult) => void;
/**

@@ -71,3 +71,3 @@ * MQTT client

/**
* @param bootstrap The {@link ClientBootstrap} to use for socket connections. Leave undefined to use the
* @param bootstrap The {@link io.ClientBootstrap} to use for socket connections. Leave undefined to use the
* default system-wide bootstrap (recommended).

@@ -74,0 +74,0 @@ */

@@ -70,3 +70,3 @@ "use strict";

/**
* @param bootstrap The {@link ClientBootstrap} to use for socket connections. Leave undefined to use the
* @param bootstrap The {@link io.ClientBootstrap} to use for socket connections. Leave undefined to use the
* default system-wide bootstrap (recommended).

@@ -73,0 +73,0 @@ */

@@ -12,3 +12,3 @@ import { BufferedEventEmitter } from '../common/event';

*/
export declare type WebsocketHandshakeTransform = (request: http.HttpRequest, done: (error_code?: number) => void) => void;
export type WebsocketHandshakeTransform = (request: http.HttpRequest, done: (error_code?: number) => void) => void;
/**

@@ -15,0 +15,0 @@ * Information about the client's queue of operations

@@ -12,3 +12,3 @@ /**

/** @internal */
declare type Ctor<T> = new (...args: any[]) => T;
type Ctor<T> = new (...args: any[]) => T;
/**

@@ -15,0 +15,0 @@ * Represents an object allocated natively inside the AWS CRT which also

@@ -42,4 +42,4 @@ /*

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -46,0 +46,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -14,3 +14,3 @@ /*

import { SocketOptions } from "./io";
import { MqttConnectionConfig, MqttWill } from "./mqtt";
import { MqttClientConnection, MqttConnectionConfig, MqttWill } from "./mqtt";
import * as platform from "../common/platform";

@@ -17,0 +17,0 @@ import * as iot_shared from "../common/aws_iot_shared"

@@ -44,4 +44,4 @@ /*

/**
* Builder pattern class to create an {@link Mqtt5ClientConfig} which can then be used to create
* an {@link Mqtt5Client}, configured for use with AWS IoT.
* Builder pattern class to create an {@link mqtt5.Mqtt5ClientConfig} which can then be used to create
* an {@link mqtt5.Mqtt5Client}, configured for use with AWS IoT.
*

@@ -48,0 +48,0 @@ * [MQTT5 Client User Guide](https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md)

@@ -12,3 +12,3 @@ /*

import { MqttConnectionConfig, MqttWill} from "./mqtt";
import { MqttClientConnection, MqttConnectionConfig, MqttWill} from "./mqtt";
import { DEFAULT_RECONNECT_MIN_SEC, DEFAULT_RECONNECT_MAX_SEC} from "../common/mqtt"

@@ -15,0 +15,0 @@ import * as io from "./io";

@@ -61,9 +61,23 @@ /*

const search_paths = [
path.join(bin_path, platformDir, binary_name),
let search_paths = [
path.join(bin_path, platformDir, binary_name) + '.node',
];
/*
* Environment variables can inject (at lower-priority) paths into the search process as well. Support both relative
* and absolute path overrides.
*/
let relative_path = process.env.AWS_CRT_NODEJS_BINARY_RELATIVE_PATH;
if (relative_path) {
let final_path = path.resolve(__dirname, ...relative_path.split(path.sep))
search_paths.push(final_path);
}
if (process.env.AWS_CRT_NODEJS_BINARY_ABSOLUTE_PATH) {
search_paths.push(process.env.AWS_CRT_NODEJS_BINARY_ABSOLUTE_PATH);
}
let binding;
for (const path of search_paths) {
if (existsSync(path + '.node')) {
if (existsSync(path)) {
binding = require(path);

@@ -70,0 +84,0 @@ break;

@@ -105,3 +105,3 @@ /*

/**
* @param bootstrap The {@link ClientBootstrap} to use for socket connections. Leave undefined to use the
* @param bootstrap The {@link io.ClientBootstrap} to use for socket connections. Leave undefined to use the
* default system-wide bootstrap (recommended).

@@ -108,0 +108,0 @@ */

{
"name": "aws-crt",
"version": "1.20.1",
"version": "1.21.0",
"description": "NodeJS/browser bindings to the aws-c-* libraries",

@@ -34,5 +34,6 @@ "homepage": "https://github.com/awslabs/aws-crt-nodejs",

"@types/puppeteer": "^5.4.7",
"@types/uuid": "^3.4.8",
"@types/uuid": "^3.4.13",
"@types/ws": "^7.4.7",
"aws-sdk": "^2.848.0",
"aws-sdk": "^2.1537.0",
"cmake-js": "^7.3.0",
"https-proxy-agent": "^5.0.1",

@@ -43,10 +44,9 @@ "jest": "^27.2.1",

"puppeteer": "^3.3.0",
"tar": "^6.2.0",
"ts-jest": "^27.0.5",
"typedoc": "^0.22.18",
"typedoc-plugin-merge-modules": "^3.1.0",
"typescript": "^4.7.4",
"typedoc": "^0.24.8",
"typedoc-plugin-merge-modules": "^5.1.0",
"typescript": "^4.9.5",
"uuid": "^8.3.2",
"yargs": "^17.2.1",
"cmake-js": "^7.2.1",
"tar": "^6.1.11"
"yargs": "^17.2.1"
},

@@ -59,5 +59,5 @@ "dependencies": {

"crypto-js": "^4.2.0",
"mqtt": "^4.3.7",
"mqtt": "^4.3.8",
"process": "^0.11.10"
}
}

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 not supported yet

Sorry, the diff of this file is not supported yet

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