@aws-sdk/client-cloudfront-keyvaluestore 3.1075.0 → 3.1076.0
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/index.js +611 -15
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -1
- package/package.json +9 -9
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -122
- package/dist-cjs/endpoint/bdd.js +0 -56
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/CloudFrontKeyValueStoreServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -85
- package/dist-cjs/runtimeConfig.browser.js +0 -32
- package/dist-cjs/runtimeConfig.js +0 -46
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -45
- package/dist-cjs/schemas/schemas_0.js +0 -231
|
@@ -23,7 +23,13 @@ export declare const getRuntimeConfig: (
|
|
|
23
23
|
| RequestHandler;
|
|
24
24
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
25
25
|
sha256: import("@smithy/types").HashConstructor;
|
|
26
|
-
streamCollector:
|
|
26
|
+
streamCollector: (
|
|
27
|
+
stream:
|
|
28
|
+
| import("stream").Readable
|
|
29
|
+
| import("stream/web").ReadableStream
|
|
30
|
+
| ReadableStream
|
|
31
|
+
| Blob
|
|
32
|
+
) => Promise<Uint8Array>;
|
|
27
33
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
28
34
|
(boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
29
35
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
@@ -27,7 +27,13 @@ export declare const getRuntimeConfig: (
|
|
|
27
27
|
sigv4aSigningRegionSet:
|
|
28
28
|
| string[]
|
|
29
29
|
| import("@smithy/types").Provider<string[] | undefined>;
|
|
30
|
-
streamCollector:
|
|
30
|
+
streamCollector: (
|
|
31
|
+
stream:
|
|
32
|
+
| import("stream").Readable
|
|
33
|
+
| import("stream/web").ReadableStream
|
|
34
|
+
| ReadableStream
|
|
35
|
+
| Blob
|
|
36
|
+
) => Promise<Uint8Array>;
|
|
31
37
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
32
38
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
33
39
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -22,7 +22,13 @@ export declare const getRuntimeConfig: (
|
|
|
22
22
|
apiVersion: string;
|
|
23
23
|
urlParser: import("@smithy/types").UrlParser;
|
|
24
24
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
25
|
-
streamCollector:
|
|
25
|
+
streamCollector: (
|
|
26
|
+
stream:
|
|
27
|
+
| import("stream").Readable
|
|
28
|
+
| import("stream/web").ReadableStream
|
|
29
|
+
| ReadableStream
|
|
30
|
+
| Blob
|
|
31
|
+
) => Promise<Uint8Array>;
|
|
26
32
|
base64Decoder: import("@smithy/types").Decoder;
|
|
27
33
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
28
34
|
utf8Decoder: import("@smithy/types").Decoder;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudfront-keyvaluestore",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudfront Keyvaluestore Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1076.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/core": "^3.974.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
26
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
27
|
-
"@aws-sdk/types": "^3.973.
|
|
28
|
-
"@smithy/core": "^3.
|
|
29
|
-
"@smithy/fetch-http-handler": "^5.
|
|
30
|
-
"@smithy/node-http-handler": "^4.
|
|
31
|
-
"@smithy/types": "^4.
|
|
24
|
+
"@aws-sdk/core": "^3.974.24",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.59",
|
|
26
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.36",
|
|
27
|
+
"@aws-sdk/types": "^3.973.14",
|
|
28
|
+
"@smithy/core": "^3.27.0",
|
|
29
|
+
"@smithy/fetch-http-handler": "^5.6.0",
|
|
30
|
+
"@smithy/node-http-handler": "^4.9.0",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
const { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
3
|
-
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
4
|
-
const { resolveParams } = require("@smithy/core/endpoints");
|
|
5
|
-
const { defaultEndpointResolver } = require("../endpoint/endpointResolver");
|
|
6
|
-
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
7
|
-
if (!input) {
|
|
8
|
-
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
9
|
-
}
|
|
10
|
-
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
11
|
-
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
|
|
12
|
-
?.getEndpointParameterInstructions;
|
|
13
|
-
if (!instructionsFn) {
|
|
14
|
-
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
15
|
-
}
|
|
16
|
-
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
17
|
-
return Object.assign(defaultParameters, endpointParameters);
|
|
18
|
-
};
|
|
19
|
-
const _defaultCloudFrontKeyValueStoreHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
20
|
-
return {
|
|
21
|
-
operation: getSmithyContext(context).operation,
|
|
22
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
23
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
24
|
-
})(),
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
exports.defaultCloudFrontKeyValueStoreHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultCloudFrontKeyValueStoreHttpAuthSchemeParametersProvider);
|
|
28
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
29
|
-
return {
|
|
30
|
-
schemeId: "aws.auth#sigv4",
|
|
31
|
-
signingProperties: {
|
|
32
|
-
name: "cloudfront-keyvaluestore",
|
|
33
|
-
region: authParameters.region,
|
|
34
|
-
},
|
|
35
|
-
propertiesExtractor: (config, context) => ({
|
|
36
|
-
signingProperties: {
|
|
37
|
-
config,
|
|
38
|
-
context,
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
|
44
|
-
return {
|
|
45
|
-
schemeId: "aws.auth#sigv4a",
|
|
46
|
-
signingProperties: {
|
|
47
|
-
name: "cloudfront-keyvaluestore",
|
|
48
|
-
region: authParameters.region,
|
|
49
|
-
},
|
|
50
|
-
propertiesExtractor: (config, context) => ({
|
|
51
|
-
signingProperties: {
|
|
52
|
-
config,
|
|
53
|
-
context,
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
59
|
-
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
60
|
-
const endpoint = defaultEndpointResolver(authParameters);
|
|
61
|
-
const authSchemes = endpoint.properties?.authSchemes;
|
|
62
|
-
if (!authSchemes) {
|
|
63
|
-
return defaultHttpAuthSchemeResolver(authParameters);
|
|
64
|
-
}
|
|
65
|
-
const options = [];
|
|
66
|
-
for (const scheme of authSchemes) {
|
|
67
|
-
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
|
68
|
-
const name = resolvedName.toLowerCase();
|
|
69
|
-
if (resolvedName !== name) {
|
|
70
|
-
console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
|
71
|
-
}
|
|
72
|
-
let schemeId;
|
|
73
|
-
if (name === "sigv4a") {
|
|
74
|
-
schemeId = "aws.auth#sigv4a";
|
|
75
|
-
const sigv4Present = authSchemes.find((s) => {
|
|
76
|
-
const name = s.name.toLowerCase();
|
|
77
|
-
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
78
|
-
});
|
|
79
|
-
if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else if (name.startsWith("sigv4")) {
|
|
84
|
-
schemeId = "aws.auth#sigv4";
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
|
88
|
-
}
|
|
89
|
-
const createOption = createHttpAuthOptionFunctions[schemeId];
|
|
90
|
-
if (!createOption) {
|
|
91
|
-
throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
|
92
|
-
}
|
|
93
|
-
const option = createOption(authParameters);
|
|
94
|
-
option.schemeId = schemeId;
|
|
95
|
-
option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
|
|
96
|
-
options.push(option);
|
|
97
|
-
}
|
|
98
|
-
return options;
|
|
99
|
-
};
|
|
100
|
-
return endpointRuleSetHttpAuthSchemeProvider;
|
|
101
|
-
};
|
|
102
|
-
const _defaultCloudFrontKeyValueStoreHttpAuthSchemeProvider = (authParameters) => {
|
|
103
|
-
const options = [];
|
|
104
|
-
switch (authParameters.operation) {
|
|
105
|
-
default: {
|
|
106
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
107
|
-
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return options;
|
|
111
|
-
};
|
|
112
|
-
exports.defaultCloudFrontKeyValueStoreHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultCloudFrontKeyValueStoreHttpAuthSchemeProvider, {
|
|
113
|
-
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
114
|
-
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
115
|
-
});
|
|
116
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
117
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
118
|
-
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
|
|
119
|
-
return Object.assign(config_1, {
|
|
120
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
121
|
-
});
|
|
122
|
-
};
|
package/dist-cjs/endpoint/bdd.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
2
|
-
const o = "ref";
|
|
3
|
-
const a = -1, b = "isSet", c = "parsedArn", d = "stringEquals", e = "getAttr", f = "arnType", g = "partitionResult", h = { [o]: c }, i = { [o]: f }, j = { "fn": e, "argv": [h, "partition"] }, k = { "authSchemes": [{ "name": "sigv4a", "signingName": "cloudfront-keyvaluestore", "signingRegionSet": ["*"] }] }, l = [{ [o]: "KvsARN" }], m = [{ [o]: "Region" }], n = [{ [o]: "Endpoint" }];
|
|
4
|
-
const _data = {
|
|
5
|
-
conditions: [
|
|
6
|
-
["booleanEquals", [{ [o]: "UseFIPS" }, true]],
|
|
7
|
-
[b, l],
|
|
8
|
-
["aws.parseArn", l, c],
|
|
9
|
-
[d, [{ fn: e, argv: [h, "service"] }, "cloudfront"]],
|
|
10
|
-
[d, [{ fn: e, argv: [h, "region"] }, ""]],
|
|
11
|
-
[e, [h, "resourceId[0]"], f],
|
|
12
|
-
[d, [i, ""]],
|
|
13
|
-
[d, [i, "key-value-store"]],
|
|
14
|
-
[d, [j, "aws"]],
|
|
15
|
-
[b, m],
|
|
16
|
-
["aws.partition", m, g],
|
|
17
|
-
[d, [j, { fn: e, argv: [{ [o]: g }, "name"] }]],
|
|
18
|
-
[b, n],
|
|
19
|
-
["parseURL", n, "url"]
|
|
20
|
-
],
|
|
21
|
-
results: [
|
|
22
|
-
[a],
|
|
23
|
-
["{url#scheme}://{parsedArn#accountId}.{url#authority}{url#path}", k],
|
|
24
|
-
[a, "Provided endpoint is not a valid URL"],
|
|
25
|
-
["https://{parsedArn#accountId}.cloudfront-kvs.global.api.aws", k],
|
|
26
|
-
[a, "Client was configured for partition `{partitionResult#name}` but Kvs ARN has `{parsedArn#partition}`"],
|
|
27
|
-
[a, "CloudFront-KeyValueStore is not supported in partition `{parsedArn#partition}`"],
|
|
28
|
-
[a, "ARN resource type is invalid. Expected `key-value-store`, found: `{arnType}`"],
|
|
29
|
-
[a, "No resource type found in the KVS ARN. Resource type must be `key-value-store`."],
|
|
30
|
-
[a, "Provided ARN must be a global resource ARN. Found: `{parsedArn#region}`"],
|
|
31
|
-
[a, "Provided ARN is not a valid CloudFront Service ARN. Found: `{parsedArn#service}`"],
|
|
32
|
-
[a, "KVS ARN must be a valid ARN"],
|
|
33
|
-
[a, "KVS ARN must be provided to use this service"],
|
|
34
|
-
[a, "Invalid Configuration: FIPS is not supported with CloudFront-KeyValueStore."]
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
const root = 2;
|
|
38
|
-
const r = 100_000_000;
|
|
39
|
-
const nodes = new Int32Array([
|
|
40
|
-
-1, 1, -1,
|
|
41
|
-
0, r + 12, 3,
|
|
42
|
-
1, 4, r + 11,
|
|
43
|
-
2, 5, r + 10,
|
|
44
|
-
3, 6, r + 9,
|
|
45
|
-
4, 7, r + 8,
|
|
46
|
-
5, 8, r + 7,
|
|
47
|
-
6, r + 7, 9,
|
|
48
|
-
7, 10, r + 6,
|
|
49
|
-
8, 11, r + 5,
|
|
50
|
-
9, 12, 14,
|
|
51
|
-
10, 13, 14,
|
|
52
|
-
11, 14, r + 4,
|
|
53
|
-
12, 15, r + 3,
|
|
54
|
-
13, r + 1, r + 2,
|
|
55
|
-
]);
|
|
56
|
-
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
-
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
-
const { bdd } = require("./bdd");
|
|
4
|
-
const cache = new EndpointCache({
|
|
5
|
-
size: 50,
|
|
6
|
-
params: ["Endpoint", "KvsARN", "Region", "UseFIPS"],
|
|
7
|
-
});
|
|
8
|
-
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
-
endpointParams: endpointParams,
|
|
11
|
-
logger: context.logger,
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
14
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
-
exports.__ServiceException = __ServiceException;
|
|
3
|
-
exports.CloudFrontKeyValueStoreServiceException = class CloudFrontKeyValueStoreServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, CloudFrontKeyValueStoreServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
const { CloudFrontKeyValueStoreServiceException: __BaseException } = require("./CloudFrontKeyValueStoreServiceException");
|
|
2
|
-
exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
|
|
3
|
-
name = "AccessDeniedException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
Message;
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "AccessDeniedException",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts,
|
|
11
|
-
});
|
|
12
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
13
|
-
this.Message = opts.Message;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
exports.ConflictException = class ConflictException extends __BaseException {
|
|
17
|
-
name = "ConflictException";
|
|
18
|
-
$fault = "client";
|
|
19
|
-
Message;
|
|
20
|
-
constructor(opts) {
|
|
21
|
-
super({
|
|
22
|
-
name: "ConflictException",
|
|
23
|
-
$fault: "client",
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
27
|
-
this.Message = opts.Message;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.InternalServerException = class InternalServerException extends __BaseException {
|
|
31
|
-
name = "InternalServerException";
|
|
32
|
-
$fault = "server";
|
|
33
|
-
Message;
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "InternalServerException",
|
|
37
|
-
$fault: "server",
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
41
|
-
this.Message = opts.Message;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
|
|
45
|
-
name = "ResourceNotFoundException";
|
|
46
|
-
$fault = "client";
|
|
47
|
-
Message;
|
|
48
|
-
constructor(opts) {
|
|
49
|
-
super({
|
|
50
|
-
name: "ResourceNotFoundException",
|
|
51
|
-
$fault: "client",
|
|
52
|
-
...opts,
|
|
53
|
-
});
|
|
54
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
55
|
-
this.Message = opts.Message;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
|
|
59
|
-
name = "ServiceQuotaExceededException";
|
|
60
|
-
$fault = "client";
|
|
61
|
-
Message;
|
|
62
|
-
constructor(opts) {
|
|
63
|
-
super({
|
|
64
|
-
name: "ServiceQuotaExceededException",
|
|
65
|
-
$fault: "client",
|
|
66
|
-
...opts,
|
|
67
|
-
});
|
|
68
|
-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
69
|
-
this.Message = opts.Message;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
exports.ValidationException = class ValidationException extends __BaseException {
|
|
73
|
-
name = "ValidationException";
|
|
74
|
-
$fault = "client";
|
|
75
|
-
Message;
|
|
76
|
-
constructor(opts) {
|
|
77
|
-
super({
|
|
78
|
-
name: "ValidationException",
|
|
79
|
-
$fault: "client",
|
|
80
|
-
...opts,
|
|
81
|
-
});
|
|
82
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
83
|
-
this.Message = opts.Message;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
-
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
-
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
-
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
-
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
7
|
-
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
8
|
-
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
9
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
10
|
-
const getRuntimeConfig = (config) => {
|
|
11
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
-
return {
|
|
15
|
-
...clientSharedValues,
|
|
16
|
-
...config,
|
|
17
|
-
runtime: "browser",
|
|
18
|
-
defaultsMode,
|
|
19
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
21
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
22
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
23
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
24
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
25
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
26
|
-
sha256: config?.sha256 ?? Sha256,
|
|
27
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
28
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
29
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
-
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
-
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
-
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
6
|
-
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
7
|
-
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
8
|
-
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
9
|
-
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
10
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
11
|
-
const getRuntimeConfig = (config) => {
|
|
12
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
awsCheckVersion(process.version);
|
|
17
|
-
const loaderConfig = {
|
|
18
|
-
profile: config?.profile,
|
|
19
|
-
logger: clientSharedValues.logger,
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
...clientSharedValues,
|
|
23
|
-
...config,
|
|
24
|
-
runtime: "node",
|
|
25
|
-
defaultsMode,
|
|
26
|
-
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
-
retryMode: config?.retryMode ??
|
|
34
|
-
loadNodeConfig({
|
|
35
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
-
}, config),
|
|
38
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
-
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
41
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
3
|
-
const getRuntimeConfig = (config) => {
|
|
4
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
-
return {
|
|
6
|
-
...browserDefaults,
|
|
7
|
-
...config,
|
|
8
|
-
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
|
|
3
|
-
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
4
|
-
const { NoOpLogger } = require("@smithy/core/client");
|
|
5
|
-
const { parseUrl } = require("@smithy/core/protocols");
|
|
6
|
-
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
7
|
-
const { defaultCloudFrontKeyValueStoreHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
8
|
-
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
9
|
-
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
10
|
-
exports.getRuntimeConfig = (config) => {
|
|
11
|
-
return {
|
|
12
|
-
apiVersion: "2022-07-26",
|
|
13
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
-
extensions: config?.extensions ?? [],
|
|
18
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCloudFrontKeyValueStoreHttpAuthSchemeProvider,
|
|
19
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
-
{
|
|
21
|
-
schemeId: "aws.auth#sigv4",
|
|
22
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
-
signer: new AwsSdkSigV4Signer(),
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
schemeId: "aws.auth#sigv4a",
|
|
27
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
28
|
-
signer: new AwsSdkSigV4ASigner(),
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
32
|
-
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
33
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
34
|
-
defaultNamespace: "com.amazonaws.cloudfrontkeyvaluestore",
|
|
35
|
-
errorTypeRegistries,
|
|
36
|
-
version: "2022-07-26",
|
|
37
|
-
serviceTarget: "CloudFrontKeyValueStore",
|
|
38
|
-
},
|
|
39
|
-
serviceId: config?.serviceId ?? "CloudFront KeyValueStore",
|
|
40
|
-
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
41
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
42
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
43
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
44
|
-
};
|
|
45
|
-
};
|