@aws-sdk/region-config-resolver 3.972.13 → 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 CHANGED
@@ -1,38 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var stsRegionDefaultResolver = require('./regionConfig/stsRegionDefaultResolver');
4
- var configResolver = require('@smithy/config-resolver');
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 = configResolver.NODE_REGION_CONFIG_FILE_OPTIONS;
23
- exports.NODE_REGION_CONFIG_OPTIONS = configResolver.NODE_REGION_CONFIG_OPTIONS;
24
- exports.REGION_ENV_NAME = configResolver.REGION_ENV_NAME;
25
- exports.REGION_INI_NAME = configResolver.REGION_INI_NAME;
26
- exports.resolveRegionConfig = configResolver.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
- Object.keys(stsRegionDefaultResolver).forEach(function (k) {
37
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = stsRegionDefaultResolver[k];
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 * from "./extensions";
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";
@@ -1,3 +1,2 @@
1
- export * from "./extensions";
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";
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.13",
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
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
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,40 +19,27 @@
23
19
  },
24
20
  "license": "Apache-2.0",
25
21
  "dependencies": {
26
- "@aws-sdk/types": "^3.973.8",
27
- "@smithy/config-resolver": "^4.4.17",
28
- "@smithy/node-config-provider": "^4.3.14",
29
- "@smithy/types": "^4.14.1",
22
+ "@aws-sdk/core": "^3.974.11",
30
23
  "tslib": "^2.6.2"
31
24
  },
32
25
  "devDependencies": {
33
26
  "@tsconfig/recommended": "1.0.1",
34
27
  "concurrently": "7.0.0",
35
- "downlevel-dts": "0.10.1",
36
28
  "premove": "4.0.0",
37
29
  "typescript": "~5.8.3"
38
30
  },
39
31
  "engines": {
40
32
  "node": ">=20.0.0"
41
33
  },
42
- "typesVersions": {
43
- "<4.5": {
44
- "dist-types/*": [
45
- "dist-types/ts3.4/*"
46
- ]
47
- }
48
- },
49
34
  "files": [
50
35
  "dist-*/**"
51
36
  ],
37
+ "browser": {},
38
+ "react-native": {},
52
39
  "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages-internal/region-config-resolver",
53
40
  "repository": {
54
41
  "type": "git",
55
42
  "url": "https://github.com/aws/aws-sdk-js-v3.git",
56
43
  "directory": "packages-internal/region-config-resolver"
57
- },
58
- "browser": {
59
- "./dist-es/regionConfig/stsRegionDefaultResolver": "./dist-es/regionConfig/stsRegionDefaultResolver.browser"
60
- },
61
- "react-native": {}
44
+ }
62
45
  }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.warning = void 0;
4
- exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
5
- const config_resolver_1 = require("@smithy/config-resolver");
6
- const node_config_provider_1 = require("@smithy/node-config-provider");
7
- function stsRegionDefaultResolver(loaderConfig = {}) {
8
- return (0, node_config_provider_1.loadConfig)({
9
- ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS,
10
- async default() {
11
- if (!exports.warning.silence) {
12
- console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
13
- }
14
- return "us-east-1";
15
- },
16
- }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
17
- }
18
- exports.warning = {
19
- silence: false,
20
- };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
4
- function stsRegionDefaultResolver() {
5
- return async () => "us-east-1";
6
- }
@@ -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,2 +0,0 @@
1
- export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from "@smithy/config-resolver";
2
- export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1,3 +0,0 @@
1
- export function stsRegionDefaultResolver() {
2
- return async () => "us-east-1";
3
- }
@@ -1,16 +0,0 @@
1
- import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@smithy/config-resolver";
2
- import { loadConfig } from "@smithy/node-config-provider";
3
- export function stsRegionDefaultResolver(loaderConfig = {}) {
4
- return loadConfig({
5
- ...NODE_REGION_CONFIG_OPTIONS,
6
- async default() {
7
- if (!warning.silence) {
8
- console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
9
- }
10
- return "us-east-1";
11
- },
12
- }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
13
- }
14
- export const warning = {
15
- silence: false,
16
- };
@@ -1,3 +0,0 @@
1
- export function stsRegionDefaultResolver() {
2
- return async () => "us-east-1";
3
- }
@@ -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/config-resolver";
6
- /**
7
- * Backward compatibility re-export alias.
8
- * @internal
9
- */
10
- export type { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
11
- /**
12
- * Backward compatibility re-export alias.
13
- * @internal
14
- */
15
- export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare function stsRegionDefaultResolver(): () => Promise<string>;
@@ -1,14 +0,0 @@
1
- import { type LocalConfigOptions } from "@smithy/node-config-provider";
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,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare function stsRegionDefaultResolver(): () => Promise<string>;
@@ -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,3 +0,0 @@
1
- export * from "./extensions";
2
- export * from "./regionConfig/awsRegionConfig";
3
- export * from "./regionConfig/stsRegionDefaultResolver";
@@ -1,11 +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/config-resolver";
7
- export {
8
- RegionInputConfig,
9
- RegionResolvedConfig,
10
- } from "@smithy/config-resolver";
11
- export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1 +0,0 @@
1
- export declare function stsRegionDefaultResolver(): () => Promise<string>;
@@ -1,7 +0,0 @@
1
- import { LocalConfigOptions } from "@smithy/node-config-provider";
2
- export declare function stsRegionDefaultResolver(
3
- loaderConfig?: LocalConfigOptions
4
- ): import("@smithy/types").Provider<string>;
5
- export declare const warning: {
6
- silence: boolean;
7
- };
@@ -1 +0,0 @@
1
- export declare function stsRegionDefaultResolver(): () => Promise<string>;