@aws-sdk/region-config-resolver 3.972.14 → 3.972.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.
- package/dist-cjs/index.js +10 -33
- package/dist-es/index.js +1 -3
- package/dist-types/index.d.ts +2 -3
- package/package.json +5 -24
- package/dist-cjs/regionConfig/stsRegionDefaultResolver.browser.js +0 -6
- package/dist-cjs/regionConfig/stsRegionDefaultResolver.js +0 -19
- package/dist-cjs/regionConfig/stsRegionDefaultResolver.native.js +0 -6
- package/dist-es/extensions/index.js +0 -15
- package/dist-es/regionConfig/awsRegionConfig.js +0 -2
- package/dist-es/regionConfig/stsRegionDefaultResolver.browser.js +0 -3
- package/dist-es/regionConfig/stsRegionDefaultResolver.js +0 -15
- package/dist-es/regionConfig/stsRegionDefaultResolver.native.js +0 -3
- package/dist-types/extensions/index.d.ts +0 -16
- package/dist-types/regionConfig/awsRegionConfig.d.ts +0 -15
- package/dist-types/regionConfig/stsRegionDefaultResolver.browser.d.ts +0 -4
- package/dist-types/regionConfig/stsRegionDefaultResolver.d.ts +0 -14
- package/dist-types/regionConfig/stsRegionDefaultResolver.native.d.ts +0 -4
- package/dist-types/ts3.4/extensions/index.d.ts +0 -14
- package/dist-types/ts3.4/index.d.ts +0 -3
- package/dist-types/ts3.4/regionConfig/awsRegionConfig.d.ts +0 -8
- package/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.browser.d.ts +0 -1
- package/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.d.ts +0 -7
- package/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.native.d.ts +0 -1
package/dist-cjs/index.js
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var config = require('@smithy/core/config');
|
|
3
|
+
var client = require('@aws-sdk/core/client');
|
|
5
4
|
|
|
6
|
-
const getAwsRegionExtensionConfiguration = (runtimeConfig) => {
|
|
7
|
-
return {
|
|
8
|
-
setRegion(region) {
|
|
9
|
-
runtimeConfig.region = region;
|
|
10
|
-
},
|
|
11
|
-
region() {
|
|
12
|
-
return runtimeConfig.region;
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
|
|
17
|
-
return {
|
|
18
|
-
region: awsRegionExtensionConfiguration.region(),
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
5
|
|
|
22
|
-
exports.NODE_REGION_CONFIG_FILE_OPTIONS = config.NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
23
|
-
exports.NODE_REGION_CONFIG_OPTIONS = config.NODE_REGION_CONFIG_OPTIONS;
|
|
24
|
-
exports.REGION_ENV_NAME = config.REGION_ENV_NAME;
|
|
25
|
-
exports.REGION_INI_NAME = config.REGION_INI_NAME;
|
|
26
|
-
exports.resolveRegionConfig = config.resolveRegionConfig;
|
|
27
|
-
exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration;
|
|
28
|
-
exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration;
|
|
29
|
-
Object.prototype.hasOwnProperty.call(stsRegionDefaultResolver, '__proto__') &&
|
|
30
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
31
|
-
Object.defineProperty(exports, '__proto__', {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
value: stsRegionDefaultResolver['__proto__']
|
|
34
|
-
});
|
|
35
6
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
7
|
+
exports.NODE_REGION_CONFIG_FILE_OPTIONS = client.NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
8
|
+
exports.NODE_REGION_CONFIG_OPTIONS = client.NODE_REGION_CONFIG_OPTIONS;
|
|
9
|
+
exports.REGION_ENV_NAME = client.REGION_ENV_NAME;
|
|
10
|
+
exports.REGION_INI_NAME = client.REGION_INI_NAME;
|
|
11
|
+
exports.getAwsRegionExtensionConfiguration = client.getAwsRegionExtensionConfiguration;
|
|
12
|
+
exports.resolveAwsRegionExtensionConfiguration = client.resolveAwsRegionExtensionConfiguration;
|
|
13
|
+
exports.resolveRegionConfig = client.resolveRegionConfig;
|
|
14
|
+
exports.stsRegionDefaultResolver = client.stsRegionDefaultResolver;
|
|
15
|
+
exports.warning = client.stsRegionWarning;
|
package/dist-es/index.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from "./regionConfig/awsRegionConfig";
|
|
3
|
-
export * from "./regionConfig/stsRegionDefaultResolver";
|
|
1
|
+
export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, stsRegionDefaultResolver, stsRegionWarning as warning, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/core/client";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from "./regionConfig/stsRegionDefaultResolver";
|
|
1
|
+
export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, stsRegionDefaultResolver, stsRegionWarning as warning, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/core/client";
|
|
2
|
+
export type { RegionInputConfig, RegionResolvedConfig, RegionExtensionRuntimeConfigType } from "@aws-sdk/core/client";
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/region-config-resolver",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.15",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline region-config-resolver",
|
|
7
7
|
"build:es": "tsc -p tsconfig.es.json",
|
|
8
8
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
9
9
|
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
-
"
|
|
11
|
-
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
12
|
-
"extract:docs": "api-extractor run --local",
|
|
13
|
-
"test": "yarn g:vitest run",
|
|
14
|
-
"test:watch": "yarn g:vitest watch"
|
|
10
|
+
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo"
|
|
15
11
|
},
|
|
16
12
|
"main": "./dist-cjs/index.js",
|
|
17
13
|
"module": "./dist-es/index.js",
|
|
@@ -23,42 +19,27 @@
|
|
|
23
19
|
},
|
|
24
20
|
"license": "Apache-2.0",
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/
|
|
27
|
-
"@smithy/core": "^3.24.1",
|
|
28
|
-
"@smithy/types": "^4.14.1",
|
|
22
|
+
"@aws-sdk/core": "^3.974.11",
|
|
29
23
|
"tslib": "^2.6.2"
|
|
30
24
|
},
|
|
31
25
|
"devDependencies": {
|
|
32
26
|
"@tsconfig/recommended": "1.0.1",
|
|
33
27
|
"concurrently": "7.0.0",
|
|
34
|
-
"downlevel-dts": "0.10.1",
|
|
35
28
|
"premove": "4.0.0",
|
|
36
29
|
"typescript": "~5.8.3"
|
|
37
30
|
},
|
|
38
31
|
"engines": {
|
|
39
32
|
"node": ">=20.0.0"
|
|
40
33
|
},
|
|
41
|
-
"typesVersions": {
|
|
42
|
-
"<4.5": {
|
|
43
|
-
"dist-types/*": [
|
|
44
|
-
"dist-types/ts3.4/*"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
34
|
"files": [
|
|
49
35
|
"dist-*/**"
|
|
50
36
|
],
|
|
37
|
+
"browser": {},
|
|
38
|
+
"react-native": {},
|
|
51
39
|
"homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages-internal/region-config-resolver",
|
|
52
40
|
"repository": {
|
|
53
41
|
"type": "git",
|
|
54
42
|
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
55
43
|
"directory": "packages-internal/region-config-resolver"
|
|
56
|
-
},
|
|
57
|
-
"browser": {
|
|
58
|
-
"./dist-es/regionConfig/stsRegionDefaultResolver": "./dist-es/regionConfig/stsRegionDefaultResolver.browser"
|
|
59
|
-
},
|
|
60
|
-
"react-native": {
|
|
61
|
-
"./dist-es/regionConfig/stsRegionDefaultResolver": "./dist-es/regionConfig/stsRegionDefaultResolver.native",
|
|
62
|
-
"./dist-cjs/regionConfig/stsRegionDefaultResolver": "./dist-cjs/regionConfig/stsRegionDefaultResolver.native"
|
|
63
44
|
}
|
|
64
45
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.warning = void 0;
|
|
4
|
-
exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
|
|
5
|
-
const config_1 = require("@smithy/core/config");
|
|
6
|
-
function stsRegionDefaultResolver(loaderConfig = {}) {
|
|
7
|
-
return (0, config_1.loadConfig)({
|
|
8
|
-
...config_1.NODE_REGION_CONFIG_OPTIONS,
|
|
9
|
-
async default() {
|
|
10
|
-
if (!exports.warning.silence) {
|
|
11
|
-
console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
|
|
12
|
-
}
|
|
13
|
-
return "us-east-1";
|
|
14
|
-
},
|
|
15
|
-
}, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
|
|
16
|
-
}
|
|
17
|
-
exports.warning = {
|
|
18
|
-
silence: false,
|
|
19
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
-
return {
|
|
3
|
-
setRegion(region) {
|
|
4
|
-
runtimeConfig.region = region;
|
|
5
|
-
},
|
|
6
|
-
region() {
|
|
7
|
-
return runtimeConfig.region;
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
|
|
12
|
-
return {
|
|
13
|
-
region: awsRegionExtensionConfiguration.region(),
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, } from "@smithy/core/config";
|
|
2
|
-
export function stsRegionDefaultResolver(loaderConfig = {}) {
|
|
3
|
-
return loadConfig({
|
|
4
|
-
...NODE_REGION_CONFIG_OPTIONS,
|
|
5
|
-
async default() {
|
|
6
|
-
if (!warning.silence) {
|
|
7
|
-
console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
|
|
8
|
-
}
|
|
9
|
-
return "us-east-1";
|
|
10
|
-
},
|
|
11
|
-
}, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
|
|
12
|
-
}
|
|
13
|
-
export const warning = {
|
|
14
|
-
silence: false,
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
|
-
import type { Provider } from "@smithy/types";
|
|
3
|
-
export type RegionExtensionRuntimeConfigType = Partial<{
|
|
4
|
-
region: string | Provider<string>;
|
|
5
|
-
}>;
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare const getAwsRegionExtensionConfiguration: (runtimeConfig: RegionExtensionRuntimeConfigType) => {
|
|
10
|
-
setRegion(region: Provider<string>): void;
|
|
11
|
-
region(): Provider<string>;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export declare const resolveAwsRegionExtensionConfiguration: (awsRegionExtensionConfiguration: AwsRegionExtensionConfiguration) => RegionExtensionRuntimeConfigType;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Backward compatibility re-export alias.
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from "@smithy/core/config";
|
|
6
|
-
/**
|
|
7
|
-
* Backward compatibility re-export alias.
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export type { RegionInputConfig, RegionResolvedConfig } from "@smithy/core/config";
|
|
11
|
-
/**
|
|
12
|
-
* Backward compatibility re-export alias.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export { resolveRegionConfig } from "@smithy/core/config";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type LocalConfigOptions } from "@smithy/core/config";
|
|
2
|
-
/**
|
|
3
|
-
* Default region provider for STS when used as an inner client.
|
|
4
|
-
* Differs from the default region resolver in that us-east-1 is the fallback instead of throwing an error.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare function stsRegionDefaultResolver(loaderConfig?: LocalConfigOptions): import("@smithy/types").Provider<string>;
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare const warning: {
|
|
13
|
-
silence: boolean;
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
|
-
import { Provider } from "@smithy/types";
|
|
3
|
-
export type RegionExtensionRuntimeConfigType = Partial<{
|
|
4
|
-
region: string | Provider<string>;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const getAwsRegionExtensionConfiguration: (
|
|
7
|
-
runtimeConfig: RegionExtensionRuntimeConfigType
|
|
8
|
-
) => {
|
|
9
|
-
setRegion(region: Provider<string>): void;
|
|
10
|
-
region(): Provider<string>;
|
|
11
|
-
};
|
|
12
|
-
export declare const resolveAwsRegionExtensionConfiguration: (
|
|
13
|
-
awsRegionExtensionConfiguration: AwsRegionExtensionConfiguration
|
|
14
|
-
) => RegionExtensionRuntimeConfigType;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
REGION_ENV_NAME,
|
|
3
|
-
REGION_INI_NAME,
|
|
4
|
-
NODE_REGION_CONFIG_OPTIONS,
|
|
5
|
-
NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
6
|
-
} from "@smithy/core/config";
|
|
7
|
-
export { RegionInputConfig, RegionResolvedConfig } from "@smithy/core/config";
|
|
8
|
-
export { resolveRegionConfig } from "@smithy/core/config";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function stsRegionDefaultResolver(): () => Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function stsRegionDefaultResolver(): () => Promise<string>;
|