@wildix/wilma-agents-client 1.0.14 → 1.0.15
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.
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const smithy_react_native_1 = require("@wildix/smithy-react-native");
|
|
5
6
|
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
7
|
const getRuntimeConfig = (config) => {
|
|
7
8
|
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
9
|
+
(0, smithy_react_native_1.installReactNativeGlobals)();
|
|
8
10
|
return {
|
|
9
11
|
...browserDefaults,
|
|
10
12
|
...config,
|
|
11
13
|
runtime: "react-native",
|
|
14
|
+
requestHandler: smithy_react_native_1.XhrHttpHandler.create(config?.requestHandler),
|
|
12
15
|
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
16
|
};
|
|
14
17
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { installReactNativeGlobals, XhrHttpHandler as RequestHandler } from "@wildix/smithy-react-native";
|
|
2
3
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
4
|
export const getRuntimeConfig = (config) => {
|
|
4
5
|
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
6
|
+
installReactNativeGlobals();
|
|
5
7
|
return {
|
|
6
8
|
...browserDefaults,
|
|
7
9
|
...config,
|
|
8
10
|
runtime: "react-native",
|
|
11
|
+
requestHandler: RequestHandler.create(config?.requestHandler),
|
|
9
12
|
sha256: config?.sha256 ?? Sha256,
|
|
10
13
|
};
|
|
11
14
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { XhrHttpHandler as RequestHandler } from "@wildix/smithy-react-native";
|
|
1
2
|
import type { WilmaAgentsClientConfig } from "./WilmaAgentsClient";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*/
|
|
5
6
|
export declare const getRuntimeConfig: (config: WilmaAgentsClientConfig) => {
|
|
6
7
|
runtime: string;
|
|
8
|
+
requestHandler: RequestHandler;
|
|
7
9
|
sha256: import("@smithy/types").HashConstructor;
|
|
8
|
-
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
9
10
|
cacheMiddleware?: boolean;
|
|
10
11
|
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core/protocols").AwsRestJsonProtocol;
|
|
11
12
|
protocolSettings: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wilma-agents-client",
|
|
3
3
|
"description": "@wildix/wilma-agents-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.15",
|
|
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",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"@smithy/core": "^3.24.5",
|
|
25
25
|
"@smithy/fetch-http-handler": "^5.4.5",
|
|
26
26
|
"@smithy/node-http-handler": "^4.7.5",
|
|
27
|
-
"@smithy/types": "^4.14.2"
|
|
27
|
+
"@smithy/types": "^4.14.2",
|
|
28
|
+
"@wildix/smithy-react-native": "^1.0.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@tsconfig/node20": "20.1.8",
|
|
@@ -48,10 +49,11 @@
|
|
|
48
49
|
"dist-*/**"
|
|
49
50
|
],
|
|
50
51
|
"license": "Apache-2.0",
|
|
51
|
-
"browser": {
|
|
52
|
-
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
53
|
-
},
|
|
54
52
|
"react-native": {
|
|
53
|
+
"@aws-sdk/core/client": "@aws-sdk/core/dist-es/submodules/client/index.native.js",
|
|
55
54
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
55
|
+
},
|
|
56
|
+
"browser": {
|
|
57
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
56
58
|
}
|
|
57
59
|
}
|