@cdk8s/awscdk-resolver 0.0.108 → 0.0.110
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +18 -18
- package/node_modules/@aws-sdk/client-sso/package.json +15 -15
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +17 -17
- package/node_modules/@aws-sdk/client-sts/package.json +17 -17
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +12 -9
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +6 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +12 -9
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js +6 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts +3 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +70 -20
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +35 -14
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js +19 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +5 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +11 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -9
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +15 -11
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +11 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/remoteProvider.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +8 -6
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +6 -4
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/resolveProcessCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/resolveProcessCredentials.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +43 -21
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js +15 -7
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +21 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/validateSsoProfile.d.ts +3 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/validateSsoProfile.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +4 -2
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js +4 -2
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +2 -2
- package/node_modules/@smithy/core/README.md +35 -2
- package/node_modules/@smithy/core/package.json +19 -6
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +30 -22
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +17 -6
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js +11 -9
- package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +3 -3
- package/node_modules/@smithy/middleware-retry/package.json +3 -3
- package/node_modules/@smithy/node-config-provider/dist-cjs/getSelectorName.js +1 -0
- package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +21 -3
- package/node_modules/@smithy/node-config-provider/dist-es/fromEnv.js +3 -2
- package/node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js +2 -2
- package/node_modules/@smithy/node-config-provider/dist-es/getSelectorName.js +12 -0
- package/node_modules/@smithy/node-config-provider/dist-types/fromEnv.d.ts +2 -2
- package/node_modules/@smithy/node-config-provider/dist-types/getSelectorName.d.ts +9 -0
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromEnv.d.ts +2 -2
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/getSelectorName.d.ts +9 -0
- package/node_modules/@smithy/node-config-provider/package.json +3 -3
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +28 -10
- package/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +2 -3
- package/node_modules/@smithy/property-provider/dist-es/ProviderError.js +15 -4
- package/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +2 -3
- package/node_modules/@smithy/property-provider/dist-types/CredentialsProviderError.d.ts +16 -3
- package/node_modules/@smithy/property-provider/dist-types/ProviderError.d.ts +25 -3
- package/node_modules/@smithy/property-provider/dist-types/TokenProviderError.d.ts +16 -3
- package/node_modules/@smithy/property-provider/dist-types/ts3.4/CredentialsProviderError.d.ts +16 -3
- package/node_modules/@smithy/property-provider/dist-types/ts3.4/ProviderError.d.ts +25 -3
- package/node_modules/@smithy/property-provider/dist-types/ts3.4/TokenProviderError.d.ts +16 -3
- package/node_modules/@smithy/property-provider/package.json +1 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +5 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +5 -1
- package/node_modules/@smithy/shared-ini-file-loader/package.json +1 -1
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +3 -0
- package/node_modules/@smithy/smithy-client/dist-es/ser-utils.js +1 -0
- package/node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts +5 -0
- package/node_modules/@smithy/smithy-client/dist-types/ts3.4/ser-utils.d.ts +5 -0
- package/node_modules/@smithy/smithy-client/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-node/package.json +6 -6
- package/node_modules/@smithy/util-endpoints/package.json +2 -2
- package/package.json +6 -5
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-endpoint",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
26
|
"@smithy/middleware-serde": "^3.0.0",
|
27
|
-
"@smithy/node-config-provider": "^3.
|
28
|
-
"@smithy/shared-ini-file-loader": "^3.
|
27
|
+
"@smithy/node-config-provider": "^3.1.0",
|
28
|
+
"@smithy/shared-ini-file-loader": "^3.1.0",
|
29
29
|
"@smithy/types": "^3.0.0",
|
30
30
|
"@smithy/url-parser": "^3.0.0",
|
31
31
|
"@smithy/util-middleware": "^3.0.0",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/middleware-retry",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.3",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-retry",
|
@@ -31,10 +31,10 @@
|
|
31
31
|
},
|
32
32
|
"license": "Apache-2.0",
|
33
33
|
"dependencies": {
|
34
|
-
"@smithy/node-config-provider": "^3.
|
34
|
+
"@smithy/node-config-provider": "^3.1.0",
|
35
35
|
"@smithy/protocol-http": "^4.0.0",
|
36
36
|
"@smithy/service-error-classification": "^3.0.0",
|
37
|
-
"@smithy/smithy-client": "^3.
|
37
|
+
"@smithy/smithy-client": "^3.1.1",
|
38
38
|
"@smithy/types": "^3.0.0",
|
39
39
|
"@smithy/util-middleware": "^3.0.0",
|
40
40
|
"@smithy/util-retry": "^3.0.0",
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require("./index.js");
|
@@ -29,7 +29,23 @@ module.exports = __toCommonJS(src_exports);
|
|
29
29
|
|
30
30
|
// src/fromEnv.ts
|
31
31
|
var import_property_provider = require("@smithy/property-provider");
|
32
|
-
|
32
|
+
|
33
|
+
// src/getSelectorName.ts
|
34
|
+
function getSelectorName(functionString) {
|
35
|
+
try {
|
36
|
+
const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
|
37
|
+
constants.delete("CONFIG");
|
38
|
+
constants.delete("CONFIG_PREFIX_SEPARATOR");
|
39
|
+
constants.delete("ENV");
|
40
|
+
return [...constants].join(", ");
|
41
|
+
} catch (e) {
|
42
|
+
return functionString;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
__name(getSelectorName, "getSelectorName");
|
46
|
+
|
47
|
+
// src/fromEnv.ts
|
48
|
+
var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => {
|
33
49
|
try {
|
34
50
|
const config = envVarSelector(process.env);
|
35
51
|
if (config === void 0) {
|
@@ -38,7 +54,8 @@ var fromEnv = /* @__PURE__ */ __name((envVarSelector) => async () => {
|
|
38
54
|
return config;
|
39
55
|
} catch (e) {
|
40
56
|
throw new import_property_provider.CredentialsProviderError(
|
41
|
-
e.message || `
|
57
|
+
e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`,
|
58
|
+
{ logger }
|
42
59
|
);
|
43
60
|
}
|
44
61
|
}, "fromEnv");
|
@@ -61,7 +78,8 @@ var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredF
|
|
61
78
|
return configValue;
|
62
79
|
} catch (e) {
|
63
80
|
throw new import_property_provider.CredentialsProviderError(
|
64
|
-
e.message || `
|
81
|
+
e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`,
|
82
|
+
{ logger: init.logger }
|
65
83
|
);
|
66
84
|
}
|
67
85
|
}, "fromSharedConfigFiles");
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
2
|
-
|
2
|
+
import { getSelectorName } from "./getSelectorName";
|
3
|
+
export const fromEnv = (envVarSelector, logger) => async () => {
|
3
4
|
try {
|
4
5
|
const config = envVarSelector(process.env);
|
5
6
|
if (config === undefined) {
|
@@ -8,6 +9,6 @@ export const fromEnv = (envVarSelector) => async () => {
|
|
8
9
|
return config;
|
9
10
|
}
|
10
11
|
catch (e) {
|
11
|
-
throw new CredentialsProviderError(e.message || `
|
12
|
+
throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger });
|
12
13
|
}
|
13
14
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
2
2
|
import { getProfileName, loadSharedConfigFiles } from "@smithy/shared-ini-file-loader";
|
3
|
+
import { getSelectorName } from "./getSelectorName";
|
3
4
|
export const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
|
4
5
|
const profile = getProfileName(init);
|
5
6
|
const { configFile, credentialsFile } = await loadSharedConfigFiles(init);
|
@@ -17,7 +18,6 @@ export const fromSharedConfigFiles = (configSelector, { preferredFile = "config"
|
|
17
18
|
return configValue;
|
18
19
|
}
|
19
20
|
catch (e) {
|
20
|
-
throw new CredentialsProviderError(e.message ||
|
21
|
-
`Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`);
|
21
|
+
throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
|
22
22
|
}
|
23
23
|
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export function getSelectorName(functionString) {
|
2
|
+
try {
|
3
|
+
const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
|
4
|
+
constants.delete("CONFIG");
|
5
|
+
constants.delete("CONFIG_PREFIX_SEPARATOR");
|
6
|
+
constants.delete("ENV");
|
7
|
+
return [...constants].join(", ");
|
8
|
+
}
|
9
|
+
catch (e) {
|
10
|
+
return functionString;
|
11
|
+
}
|
12
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { Provider } from "@smithy/types";
|
1
|
+
import { Logger, Provider } from "@smithy/types";
|
2
2
|
export type GetterFromEnv<T> = (env: Record<string, string | undefined>) => T | undefined;
|
3
3
|
/**
|
4
4
|
* Get config value given the environment variable name or getter from
|
5
5
|
* environment variable.
|
6
6
|
*/
|
7
|
-
export declare const fromEnv: <T = string>(envVarSelector: GetterFromEnv<T
|
7
|
+
export declare const fromEnv: <T = string>(envVarSelector: GetterFromEnv<T>, logger?: Logger) => Provider<T>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Attempts to extract the name of the variable that the functional selector is looking for.
|
3
|
+
* Improves readability over the raw Function.toString() value.
|
4
|
+
* @internal
|
5
|
+
* @param functionString - function's string representation.
|
6
|
+
*
|
7
|
+
* @returns constant value used within the function.
|
8
|
+
*/
|
9
|
+
export declare function getSelectorName(functionString: string): string;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { Provider } from "@smithy/types";
|
1
|
+
import { Logger, Provider } from "@smithy/types";
|
2
2
|
export type GetterFromEnv<T> = (env: Record<string, string | undefined>) => T | undefined;
|
3
3
|
/**
|
4
4
|
* Get config value given the environment variable name or getter from
|
5
5
|
* environment variable.
|
6
6
|
*/
|
7
|
-
export declare const fromEnv: <T = string>(envVarSelector: GetterFromEnv<T
|
7
|
+
export declare const fromEnv: <T = string>(envVarSelector: GetterFromEnv<T>, logger?: Logger) => Provider<T>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Attempts to extract the name of the variable that the functional selector is looking for.
|
3
|
+
* Improves readability over the raw Function.toString() value.
|
4
|
+
* @internal
|
5
|
+
* @param functionString - function's string representation.
|
6
|
+
*
|
7
|
+
* @returns constant value used within the function.
|
8
|
+
*/
|
9
|
+
export declare function getSelectorName(functionString: string): string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/node-config-provider",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.1.0",
|
4
4
|
"description": "Load config default values from ini config files and environmental variable",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"module": "./dist-es/index.js",
|
25
25
|
"types": "./dist-types/index.d.ts",
|
26
26
|
"dependencies": {
|
27
|
-
"@smithy/property-provider": "^3.
|
28
|
-
"@smithy/shared-ini-file-loader": "^3.
|
27
|
+
"@smithy/property-provider": "^3.1.0",
|
28
|
+
"@smithy/shared-ini-file-loader": "^3.1.0",
|
29
29
|
"@smithy/types": "^3.0.0",
|
30
30
|
"tslib": "^2.6.2"
|
31
31
|
},
|
@@ -31,14 +31,28 @@ module.exports = __toCommonJS(src_exports);
|
|
31
31
|
|
32
32
|
// src/ProviderError.ts
|
33
33
|
var _ProviderError = class _ProviderError extends Error {
|
34
|
-
constructor(message,
|
34
|
+
constructor(message, options = true) {
|
35
|
+
var _a;
|
36
|
+
let logger;
|
37
|
+
let tryNextLink = true;
|
38
|
+
if (typeof options === "boolean") {
|
39
|
+
logger = void 0;
|
40
|
+
tryNextLink = options;
|
41
|
+
} else if (options != null && typeof options === "object") {
|
42
|
+
logger = options.logger;
|
43
|
+
tryNextLink = options.tryNextLink ?? true;
|
44
|
+
}
|
35
45
|
super(message);
|
36
|
-
this.tryNextLink = tryNextLink;
|
37
46
|
this.name = "ProviderError";
|
47
|
+
this.tryNextLink = tryNextLink;
|
38
48
|
Object.setPrototypeOf(this, _ProviderError.prototype);
|
49
|
+
(_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, `@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
|
39
50
|
}
|
40
|
-
|
41
|
-
|
51
|
+
/**
|
52
|
+
* @deprecated use new operator.
|
53
|
+
*/
|
54
|
+
static from(error, options = true) {
|
55
|
+
return Object.assign(new this(error.message, options), error);
|
42
56
|
}
|
43
57
|
};
|
44
58
|
__name(_ProviderError, "ProviderError");
|
@@ -46,9 +60,11 @@ var ProviderError = _ProviderError;
|
|
46
60
|
|
47
61
|
// src/CredentialsProviderError.ts
|
48
62
|
var _CredentialsProviderError = class _CredentialsProviderError extends ProviderError {
|
49
|
-
|
50
|
-
|
51
|
-
|
63
|
+
/**
|
64
|
+
* @override
|
65
|
+
*/
|
66
|
+
constructor(message, options = true) {
|
67
|
+
super(message, options);
|
52
68
|
this.name = "CredentialsProviderError";
|
53
69
|
Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
|
54
70
|
}
|
@@ -58,9 +74,11 @@ var CredentialsProviderError = _CredentialsProviderError;
|
|
58
74
|
|
59
75
|
// src/TokenProviderError.ts
|
60
76
|
var _TokenProviderError = class _TokenProviderError extends ProviderError {
|
61
|
-
|
62
|
-
|
63
|
-
|
77
|
+
/**
|
78
|
+
* @override
|
79
|
+
*/
|
80
|
+
constructor(message, options = true) {
|
81
|
+
super(message, options);
|
64
82
|
this.name = "TokenProviderError";
|
65
83
|
Object.setPrototypeOf(this, _TokenProviderError.prototype);
|
66
84
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { ProviderError } from "./ProviderError";
|
2
2
|
export class CredentialsProviderError extends ProviderError {
|
3
|
-
constructor(message,
|
4
|
-
super(message,
|
5
|
-
this.tryNextLink = tryNextLink;
|
3
|
+
constructor(message, options = true) {
|
4
|
+
super(message, options);
|
6
5
|
this.name = "CredentialsProviderError";
|
7
6
|
Object.setPrototypeOf(this, CredentialsProviderError.prototype);
|
8
7
|
}
|
@@ -1,11 +1,22 @@
|
|
1
1
|
export class ProviderError extends Error {
|
2
|
-
constructor(message,
|
2
|
+
constructor(message, options = true) {
|
3
|
+
let logger;
|
4
|
+
let tryNextLink = true;
|
5
|
+
if (typeof options === "boolean") {
|
6
|
+
logger = undefined;
|
7
|
+
tryNextLink = options;
|
8
|
+
}
|
9
|
+
else if (options != null && typeof options === "object") {
|
10
|
+
logger = options.logger;
|
11
|
+
tryNextLink = options.tryNextLink ?? true;
|
12
|
+
}
|
3
13
|
super(message);
|
4
|
-
this.tryNextLink = tryNextLink;
|
5
14
|
this.name = "ProviderError";
|
15
|
+
this.tryNextLink = tryNextLink;
|
6
16
|
Object.setPrototypeOf(this, ProviderError.prototype);
|
17
|
+
logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
|
7
18
|
}
|
8
|
-
static from(error,
|
9
|
-
return Object.assign(new this(error.message,
|
19
|
+
static from(error, options = true) {
|
20
|
+
return Object.assign(new this(error.message, options), error);
|
10
21
|
}
|
11
22
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { ProviderError } from "./ProviderError";
|
2
2
|
export class TokenProviderError extends ProviderError {
|
3
|
-
constructor(message,
|
4
|
-
super(message,
|
5
|
-
this.tryNextLink = tryNextLink;
|
3
|
+
constructor(message, options = true) {
|
4
|
+
super(message, options);
|
6
5
|
this.name = "TokenProviderError";
|
7
6
|
Object.setPrototypeOf(this, TokenProviderError.prototype);
|
8
7
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProviderError } from "./ProviderError";
|
1
|
+
import { ProviderError, ProviderErrorOptionsType } from "./ProviderError";
|
2
2
|
/**
|
3
3
|
* @public
|
4
4
|
*
|
@@ -11,7 +11,20 @@ import { ProviderError } from "./ProviderError";
|
|
11
11
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
12
12
|
*/
|
13
13
|
export declare class CredentialsProviderError extends ProviderError {
|
14
|
-
readonly tryNextLink: boolean;
|
15
14
|
name: string;
|
16
|
-
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* @deprecated constructor should be given a logger.
|
18
|
+
*/
|
19
|
+
constructor(message: string);
|
20
|
+
/**
|
21
|
+
* @override
|
22
|
+
* @deprecated constructor should be given a logger.
|
23
|
+
*/
|
24
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
25
|
+
/**
|
26
|
+
* @override
|
27
|
+
* This signature is preferred for logging capability.
|
28
|
+
*/
|
29
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
17
30
|
}
|
@@ -1,3 +1,11 @@
|
|
1
|
+
import { Logger } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* @public
|
4
|
+
*/
|
5
|
+
export type ProviderErrorOptionsType = {
|
6
|
+
tryNextLink?: boolean | undefined;
|
7
|
+
logger?: Logger;
|
8
|
+
};
|
1
9
|
/**
|
2
10
|
* @public
|
3
11
|
*
|
@@ -10,8 +18,22 @@
|
|
10
18
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
11
19
|
*/
|
12
20
|
export declare class ProviderError extends Error {
|
13
|
-
readonly tryNextLink: boolean;
|
14
21
|
name: string;
|
15
|
-
|
16
|
-
|
22
|
+
readonly tryNextLink: boolean;
|
23
|
+
/**
|
24
|
+
* @deprecated constructor should be given a logger.
|
25
|
+
*/
|
26
|
+
constructor(message: string);
|
27
|
+
/**
|
28
|
+
* @deprecated constructor should be given a logger.
|
29
|
+
*/
|
30
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
31
|
+
/**
|
32
|
+
* This signature is preferred for logging capability.
|
33
|
+
*/
|
34
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
35
|
+
/**
|
36
|
+
* @deprecated use new operator.
|
37
|
+
*/
|
38
|
+
static from(error: Error, options?: boolean | ProviderErrorOptionsType): ProviderError;
|
17
39
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProviderError } from "./ProviderError";
|
1
|
+
import { ProviderError, ProviderErrorOptionsType } from "./ProviderError";
|
2
2
|
/**
|
3
3
|
* @public
|
4
4
|
*
|
@@ -11,7 +11,20 @@ import { ProviderError } from "./ProviderError";
|
|
11
11
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
12
12
|
*/
|
13
13
|
export declare class TokenProviderError extends ProviderError {
|
14
|
-
readonly tryNextLink: boolean;
|
15
14
|
name: string;
|
16
|
-
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* @deprecated constructor should be given a logger.
|
18
|
+
*/
|
19
|
+
constructor(message: string);
|
20
|
+
/**
|
21
|
+
* @override
|
22
|
+
* @deprecated constructor should be given a logger.
|
23
|
+
*/
|
24
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
25
|
+
/**
|
26
|
+
* @override
|
27
|
+
* This signature is preferred for logging capability.
|
28
|
+
*/
|
29
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
17
30
|
}
|
package/node_modules/@smithy/property-provider/dist-types/ts3.4/CredentialsProviderError.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProviderError } from "./ProviderError";
|
1
|
+
import { ProviderError, ProviderErrorOptionsType } from "./ProviderError";
|
2
2
|
/**
|
3
3
|
* @public
|
4
4
|
*
|
@@ -11,7 +11,20 @@ import { ProviderError } from "./ProviderError";
|
|
11
11
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
12
12
|
*/
|
13
13
|
export declare class CredentialsProviderError extends ProviderError {
|
14
|
-
readonly tryNextLink: boolean;
|
15
14
|
name: string;
|
16
|
-
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* @deprecated constructor should be given a logger.
|
18
|
+
*/
|
19
|
+
constructor(message: string);
|
20
|
+
/**
|
21
|
+
* @override
|
22
|
+
* @deprecated constructor should be given a logger.
|
23
|
+
*/
|
24
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
25
|
+
/**
|
26
|
+
* @override
|
27
|
+
* This signature is preferred for logging capability.
|
28
|
+
*/
|
29
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
17
30
|
}
|
@@ -1,3 +1,11 @@
|
|
1
|
+
import { Logger } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* @public
|
4
|
+
*/
|
5
|
+
export type ProviderErrorOptionsType = {
|
6
|
+
tryNextLink?: boolean | undefined;
|
7
|
+
logger?: Logger;
|
8
|
+
};
|
1
9
|
/**
|
2
10
|
* @public
|
3
11
|
*
|
@@ -10,8 +18,22 @@
|
|
10
18
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
11
19
|
*/
|
12
20
|
export declare class ProviderError extends Error {
|
13
|
-
readonly tryNextLink: boolean;
|
14
21
|
name: string;
|
15
|
-
|
16
|
-
|
22
|
+
readonly tryNextLink: boolean;
|
23
|
+
/**
|
24
|
+
* @deprecated constructor should be given a logger.
|
25
|
+
*/
|
26
|
+
constructor(message: string);
|
27
|
+
/**
|
28
|
+
* @deprecated constructor should be given a logger.
|
29
|
+
*/
|
30
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
31
|
+
/**
|
32
|
+
* This signature is preferred for logging capability.
|
33
|
+
*/
|
34
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
35
|
+
/**
|
36
|
+
* @deprecated use new operator.
|
37
|
+
*/
|
38
|
+
static from(error: Error, options?: boolean | ProviderErrorOptionsType): ProviderError;
|
17
39
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProviderError } from "./ProviderError";
|
1
|
+
import { ProviderError, ProviderErrorOptionsType } from "./ProviderError";
|
2
2
|
/**
|
3
3
|
* @public
|
4
4
|
*
|
@@ -11,7 +11,20 @@ import { ProviderError } from "./ProviderError";
|
|
11
11
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
12
12
|
*/
|
13
13
|
export declare class TokenProviderError extends ProviderError {
|
14
|
-
readonly tryNextLink: boolean;
|
15
14
|
name: string;
|
16
|
-
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* @deprecated constructor should be given a logger.
|
18
|
+
*/
|
19
|
+
constructor(message: string);
|
20
|
+
/**
|
21
|
+
* @override
|
22
|
+
* @deprecated constructor should be given a logger.
|
23
|
+
*/
|
24
|
+
constructor(message: string, tryNextLink: boolean | undefined);
|
25
|
+
/**
|
26
|
+
* @override
|
27
|
+
* This signature is preferred for logging capability.
|
28
|
+
*/
|
29
|
+
constructor(message: string, options: ProviderErrorOptionsType);
|
17
30
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/property-provider",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.1.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline property-provider",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SharedConfigFiles } from "@smithy/types";
|
1
|
+
import { Logger, SharedConfigFiles } from "@smithy/types";
|
2
2
|
export interface SharedConfigInit {
|
3
3
|
/**
|
4
4
|
* The path at which to locate the ini credentials file. Defaults to the
|
@@ -17,6 +17,10 @@ export interface SharedConfigInit {
|
|
17
17
|
* property is set, the provider will always reload any configuration files loaded before.
|
18
18
|
*/
|
19
19
|
ignoreCache?: boolean;
|
20
|
+
/**
|
21
|
+
* For credential resolution trace logging.
|
22
|
+
*/
|
23
|
+
logger?: Logger;
|
20
24
|
}
|
21
25
|
export declare const CONFIG_PREFIX_SEPARATOR = ".";
|
22
26
|
export declare const loadSharedConfigFiles: (init?: SharedConfigInit) => Promise<SharedConfigFiles>;
|
package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SharedConfigFiles } from "@smithy/types";
|
1
|
+
import { Logger, SharedConfigFiles } from "@smithy/types";
|
2
2
|
export interface SharedConfigInit {
|
3
3
|
/**
|
4
4
|
* The path at which to locate the ini credentials file. Defaults to the
|
@@ -17,6 +17,10 @@ export interface SharedConfigInit {
|
|
17
17
|
* property is set, the provider will always reload any configuration files loaded before.
|
18
18
|
*/
|
19
19
|
ignoreCache?: boolean;
|
20
|
+
/**
|
21
|
+
* For credential resolution trace logging.
|
22
|
+
*/
|
23
|
+
logger?: Logger;
|
20
24
|
}
|
21
25
|
export declare const CONFIG_PREFIX_SEPARATOR = ".";
|
22
26
|
export declare const loadSharedConfigFiles: (init?: SharedConfigInit) => Promise<SharedConfigFiles>;
|
@@ -65,6 +65,7 @@ __export(src_exports, {
|
|
65
65
|
parseRfc7231DateTime: () => parseRfc7231DateTime,
|
66
66
|
resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,
|
67
67
|
resolvedPath: () => resolvedPath,
|
68
|
+
serializeDateTime: () => serializeDateTime,
|
68
69
|
serializeFloat: () => serializeFloat,
|
69
70
|
splitEvery: () => splitEvery,
|
70
71
|
strictParseByte: () => strictParseByte,
|
@@ -1141,6 +1142,7 @@ var serializeFloat = /* @__PURE__ */ __name((value) => {
|
|
1141
1142
|
return value;
|
1142
1143
|
}
|
1143
1144
|
}, "serializeFloat");
|
1145
|
+
var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime");
|
1144
1146
|
|
1145
1147
|
// src/serde-json.ts
|
1146
1148
|
var _json = /* @__PURE__ */ __name((obj) => {
|
@@ -1250,6 +1252,7 @@ __name(splitEvery, "splitEvery");
|
|
1250
1252
|
logger,
|
1251
1253
|
resolvedPath,
|
1252
1254
|
serializeFloat,
|
1255
|
+
serializeDateTime,
|
1253
1256
|
_json,
|
1254
1257
|
splitEvery
|
1255
1258
|
});
|
@@ -7,3 +7,8 @@
|
|
7
7
|
* @returns A number, or a string if the given number was non-numeric.
|
8
8
|
*/
|
9
9
|
export declare const serializeFloat: (value: number) => string | number;
|
10
|
+
/**
|
11
|
+
* @param date - to be serialized.
|
12
|
+
* @returns https://smithy.io/2.0/spec/protocol-traits.html#timestampformat-trait date-time format.
|
13
|
+
*/
|
14
|
+
export declare const serializeDateTime: (date: Date) => string;
|
@@ -7,3 +7,8 @@
|
|
7
7
|
* @returns A number, or a string if the given number was non-numeric.
|
8
8
|
*/
|
9
9
|
export declare const serializeFloat: (value: number) => string | number;
|
10
|
+
/**
|
11
|
+
* @param date - to be serialized.
|
12
|
+
* @returns https://smithy.io/2.0/spec/protocol-traits.html#timestampformat-trait date-time format.
|
13
|
+
*/
|
14
|
+
export declare const serializeDateTime: (date: Date) => string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/smithy-client",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.1.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline smithy-client",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
|
-
"@smithy/middleware-endpoint": "^3.0.
|
26
|
+
"@smithy/middleware-endpoint": "^3.0.1",
|
27
27
|
"@smithy/middleware-stack": "^3.0.0",
|
28
28
|
"@smithy/protocol-http": "^4.0.0",
|
29
29
|
"@smithy/types": "^3.0.0",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-defaults-mode-browser",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.3",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline util-defaults-mode-browser",
|
@@ -22,8 +22,8 @@
|
|
22
22
|
},
|
23
23
|
"license": "Apache-2.0",
|
24
24
|
"dependencies": {
|
25
|
-
"@smithy/property-provider": "^3.
|
26
|
-
"@smithy/smithy-client": "^3.
|
25
|
+
"@smithy/property-provider": "^3.1.0",
|
26
|
+
"@smithy/smithy-client": "^3.1.1",
|
27
27
|
"@smithy/types": "^3.0.0",
|
28
28
|
"bowser": "^2.11.0",
|
29
29
|
"tslib": "^2.6.2"
|