@wildix/xbees-kite-client 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/KiteClient.js
CHANGED
|
@@ -30,7 +30,9 @@ class KiteClient extends smithy_client_1.Client {
|
|
|
30
30
|
};
|
|
31
31
|
super(config);
|
|
32
32
|
this.config = config;
|
|
33
|
-
|
|
33
|
+
if (configuration.token) {
|
|
34
|
+
this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
35
|
+
}
|
|
34
36
|
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
35
37
|
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
36
38
|
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
package/dist-es/KiteClient.js
CHANGED
|
@@ -27,7 +27,9 @@ export class KiteClient extends __Client {
|
|
|
27
27
|
};
|
|
28
28
|
super(config);
|
|
29
29
|
this.config = config;
|
|
30
|
-
|
|
30
|
+
if (configuration.token) {
|
|
31
|
+
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
32
|
+
}
|
|
31
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
35
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -120,7 +120,7 @@ export type KiteClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOp
|
|
|
120
120
|
*/
|
|
121
121
|
export interface KiteClientConfig extends KiteClientConfigType {
|
|
122
122
|
env: 'stage' | 'stable' | 'prod';
|
|
123
|
-
token
|
|
123
|
+
token?: TokenProvider;
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* @public
|
|
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
14
14
|
sha256: import("@smithy/types").HashConstructor;
|
|
15
15
|
streamCollector: import("@smithy/types").StreamCollector;
|
|
16
16
|
env: "stage" | "stable" | "prod";
|
|
17
|
-
token
|
|
17
|
+
token?: import("@wildix/smithy-utils").TokenProvider | undefined;
|
|
18
18
|
apiVersion: string;
|
|
19
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
20
20
|
base64Decoder: import("@smithy/types").Decoder;
|
|
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
14
14
|
sha256: import("@smithy/types").HashConstructor;
|
|
15
15
|
streamCollector: import("@smithy/types").StreamCollector;
|
|
16
16
|
env: "stage" | "stable" | "prod";
|
|
17
|
-
token
|
|
17
|
+
token?: import("@wildix/smithy-utils").TokenProvider | undefined;
|
|
18
18
|
apiVersion: string;
|
|
19
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
20
20
|
base64Decoder: import("@smithy/types").Decoder;
|
|
@@ -6,7 +6,7 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
6
6
|
runtime: string;
|
|
7
7
|
sha256: import("@smithy/types").HashConstructor;
|
|
8
8
|
env: "stage" | "stable" | "prod";
|
|
9
|
-
token
|
|
9
|
+
token?: import("@wildix/smithy-utils").TokenProvider | undefined;
|
|
10
10
|
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
11
11
|
apiVersion: string;
|
|
12
12
|
urlParser: import("@smithy/types").UrlParser;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-kite-client",
|
|
3
3
|
"description": "@wildix/xbees-kite-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|