@cdklabs/cdk-ecs-codedeploy 0.0.392 → 0.0.394

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.
Files changed (68) hide show
  1. package/.jsii +3 -3
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  6. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/auth/httpAuthSchemeProvider.js +3 -1
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-es/auth/httpAuthSchemeProvider.js +3 -1
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-types/auth/httpAuthSchemeProvider.d.ts +15 -1
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +1 -0
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.d.ts +1 -0
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +1 -0
  12. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +3 -0
  13. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  14. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  15. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  16. package/node_modules/@aws-sdk/client-codedeploy/package.json +2 -2
  17. package/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +3 -1
  18. package/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js +3 -1
  19. package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +15 -1
  20. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +1 -0
  21. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +1 -0
  22. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +1 -0
  23. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +3 -0
  24. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  25. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  26. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  27. package/node_modules/@aws-sdk/client-sso/package.json +1 -1
  28. package/node_modules/@aws-sdk/credential-provider-ini/package.json +4 -4
  29. package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -4
  30. package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  31. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +3 -1
  33. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +3 -1
  34. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +3 -1
  35. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +3 -1
  36. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/auth/httpAuthSchemeProvider.d.ts +15 -1
  37. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +1 -0
  38. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  39. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +1 -0
  40. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +15 -1
  41. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +1 -0
  42. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
  43. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +1 -0
  44. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthSchemeProvider.d.ts +3 -0
  45. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +4 -0
  46. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +4 -0
  47. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +4 -0
  48. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +3 -0
  49. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +4 -0
  50. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +4 -0
  51. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +4 -0
  52. package/node_modules/@aws-sdk/nested-clients/package.json +1 -1
  53. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  54. package/node_modules/@smithy/core/dist-cjs/index.js +27 -1
  55. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +1 -0
  56. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +4 -1
  57. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +20 -0
  58. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +2 -1
  59. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/resolveAuthOptions.d.ts +10 -0
  60. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +2 -1
  61. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/resolveAuthOptions.d.ts +10 -0
  62. package/node_modules/@smithy/core/package.json +1 -1
  63. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  64. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  65. package/node_modules/@smithy/smithy-client/package.json +3 -3
  66. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  67. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  68. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
2
- import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
2
+ import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
3
3
  import { SSOOIDCClientResolvedConfig } from "../SSOOIDCClient";
4
4
  /**
5
5
  * @internal
@@ -29,6 +29,13 @@ export declare const defaultSSOOIDCHttpAuthSchemeProvider: SSOOIDCHttpAuthScheme
29
29
  * @internal
30
30
  */
31
31
  export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
32
+ /**
33
+ * A comma-separated list of case-sensitive auth scheme names.
34
+ * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
35
+ * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
36
+ * @public
37
+ */
38
+ authSchemePreference?: string[] | Provider<string[]>;
32
39
  /**
33
40
  * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
34
41
  * @internal
@@ -44,6 +51,13 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
44
51
  * @internal
45
52
  */
46
53
  export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
54
+ /**
55
+ * A comma-separated list of case-sensitive auth scheme names.
56
+ * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
57
+ * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
58
+ * @public
59
+ */
60
+ readonly authSchemePreference: Provider<string[]>;
47
61
  /**
48
62
  * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
49
63
  * @internal
@@ -37,6 +37,7 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
37
37
  }) => import("@smithy/types").EndpointV2;
38
38
  tls?: boolean | undefined;
39
39
  serviceConfiguredEndpoint?: undefined;
40
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
40
41
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
41
42
  schemeId: string;
42
43
  identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
@@ -37,6 +37,7 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
37
37
  }) => import("@smithy/types").EndpointV2;
38
38
  tls?: boolean | undefined;
39
39
  serviceConfiguredEndpoint?: undefined;
40
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
40
41
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
41
42
  schemeId: string;
42
43
  identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
@@ -36,6 +36,7 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
36
36
  }) => import("@smithy/types").EndpointV2;
37
37
  tls?: boolean | undefined;
38
38
  serviceConfiguredEndpoint?: undefined;
39
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
39
40
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
40
41
  schemeId: string;
41
42
  identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
@@ -1,5 +1,5 @@
1
1
  import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
2
- import { Client, HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
2
+ import { Client, HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
3
3
  import { STSClientResolvedConfig } from "../STSClient";
4
4
  /**
5
5
  * @internal
@@ -39,6 +39,13 @@ export declare const resolveStsAuthConfig: <T>(input: T & StsAuthInputConfig) =>
39
39
  * @internal
40
40
  */
41
41
  export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AwsSdkSigV4AuthInputConfig {
42
+ /**
43
+ * A comma-separated list of case-sensitive auth scheme names.
44
+ * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
45
+ * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
46
+ * @public
47
+ */
48
+ authSchemePreference?: string[] | Provider<string[]>;
42
49
  /**
43
50
  * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
44
51
  * @internal
@@ -54,6 +61,13 @@ export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AwsSdkSig
54
61
  * @internal
55
62
  */
56
63
  export interface HttpAuthSchemeResolvedConfig extends StsAuthResolvedConfig, AwsSdkSigV4AuthResolvedConfig {
64
+ /**
65
+ * A comma-separated list of case-sensitive auth scheme names.
66
+ * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
67
+ * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
68
+ * @public
69
+ */
70
+ readonly authSchemePreference: Provider<string[]>;
57
71
  /**
58
72
  * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
59
73
  * @internal
@@ -38,6 +38,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
38
38
  } | undefined) => import("@smithy/types").EndpointV2;
39
39
  tls?: boolean | undefined;
40
40
  serviceConfiguredEndpoint?: undefined;
41
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
41
42
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
42
43
  schemeId: string;
43
44
  identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
@@ -45,6 +45,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
45
45
  } | undefined) => import("@smithy/types").EndpointV2;
46
46
  tls?: boolean | undefined;
47
47
  serviceConfiguredEndpoint?: undefined;
48
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
48
49
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
49
50
  credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
50
51
  signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
@@ -37,6 +37,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
37
37
  } | undefined) => import("@smithy/types").EndpointV2;
38
38
  tls?: boolean | undefined;
39
39
  serviceConfiguredEndpoint?: undefined;
40
+ authSchemePreference?: string[] | import("@smithy/types").Provider<string[]> | undefined;
40
41
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
41
42
  schemeId: string;
42
43
  identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
@@ -9,6 +9,7 @@ import {
9
9
  HttpAuthSchemeParameters,
10
10
  HttpAuthSchemeParametersProvider,
11
11
  HttpAuthSchemeProvider,
12
+ Provider,
12
13
  } from "@smithy/types";
13
14
  import { SSOOIDCClientResolvedConfig } from "../SSOOIDCClient";
14
15
  export interface SSOOIDCHttpAuthSchemeParameters
@@ -31,11 +32,13 @@ export interface SSOOIDCHttpAuthSchemeProvider
31
32
  extends HttpAuthSchemeProvider<SSOOIDCHttpAuthSchemeParameters> {}
32
33
  export declare const defaultSSOOIDCHttpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider;
33
34
  export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
35
+ authSchemePreference?: string[] | Provider<string[]>;
34
36
  httpAuthSchemes?: HttpAuthScheme[];
35
37
  httpAuthSchemeProvider?: SSOOIDCHttpAuthSchemeProvider;
36
38
  }
37
39
  export interface HttpAuthSchemeResolvedConfig
38
40
  extends AwsSdkSigV4AuthResolvedConfig {
41
+ readonly authSchemePreference: Provider<string[]>;
39
42
  readonly httpAuthSchemes: HttpAuthScheme[];
40
43
  readonly httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider;
41
44
  }
@@ -67,6 +67,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
67
67
  ) => import("@smithy/types").EndpointV2;
68
68
  tls?: boolean | undefined;
69
69
  serviceConfiguredEndpoint?: undefined;
70
+ authSchemePreference?:
71
+ | string[]
72
+ | import("@smithy/types").Provider<string[]>
73
+ | undefined;
70
74
  httpAuthSchemes:
71
75
  | import("@smithy/types").HttpAuthScheme[]
72
76
  | (
@@ -64,6 +64,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
64
64
  ) => import("@smithy/types").EndpointV2;
65
65
  tls?: boolean | undefined;
66
66
  serviceConfiguredEndpoint?: undefined;
67
+ authSchemePreference?:
68
+ | string[]
69
+ | import("@smithy/types").Provider<string[]>
70
+ | undefined;
67
71
  httpAuthSchemes:
68
72
  | import("@smithy/types").HttpAuthScheme[]
69
73
  | (
@@ -71,6 +71,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
71
71
  ) => import("@smithy/types").EndpointV2;
72
72
  tls?: boolean | undefined;
73
73
  serviceConfiguredEndpoint?: undefined;
74
+ authSchemePreference?:
75
+ | string[]
76
+ | import("@smithy/types").Provider<string[]>
77
+ | undefined;
74
78
  httpAuthSchemes:
75
79
  | import("@smithy/types").HttpAuthScheme[]
76
80
  | (
@@ -10,6 +10,7 @@ import {
10
10
  HttpAuthSchemeParameters,
11
11
  HttpAuthSchemeParametersProvider,
12
12
  HttpAuthSchemeProvider,
13
+ Provider,
13
14
  } from "@smithy/types";
14
15
  import { STSClientResolvedConfig } from "../STSClient";
15
16
  export interface STSHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
@@ -40,12 +41,14 @@ export declare const resolveStsAuthConfig: <T>(
40
41
  export interface HttpAuthSchemeInputConfig
41
42
  extends StsAuthInputConfig,
42
43
  AwsSdkSigV4AuthInputConfig {
44
+ authSchemePreference?: string[] | Provider<string[]>;
43
45
  httpAuthSchemes?: HttpAuthScheme[];
44
46
  httpAuthSchemeProvider?: STSHttpAuthSchemeProvider;
45
47
  }
46
48
  export interface HttpAuthSchemeResolvedConfig
47
49
  extends StsAuthResolvedConfig,
48
50
  AwsSdkSigV4AuthResolvedConfig {
51
+ readonly authSchemePreference: Provider<string[]>;
49
52
  readonly httpAuthSchemes: HttpAuthScheme[];
50
53
  readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider;
51
54
  }
@@ -74,6 +74,10 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
74
74
  ) => import("@smithy/types").EndpointV2;
75
75
  tls?: boolean | undefined;
76
76
  serviceConfiguredEndpoint?: undefined;
77
+ authSchemePreference?:
78
+ | string[]
79
+ | import("@smithy/types").Provider<string[]>
80
+ | undefined;
77
81
  httpAuthSchemes:
78
82
  | import("@smithy/types").HttpAuthScheme[]
79
83
  | (
@@ -84,6 +84,10 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
84
84
  ) => import("@smithy/types").EndpointV2;
85
85
  tls?: boolean | undefined;
86
86
  serviceConfiguredEndpoint?: undefined;
87
+ authSchemePreference?:
88
+ | string[]
89
+ | import("@smithy/types").Provider<string[]>
90
+ | undefined;
87
91
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
88
92
  credentials?:
89
93
  | import("@smithy/types").AwsCredentialIdentity
@@ -78,6 +78,10 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
78
78
  ) => import("@smithy/types").EndpointV2;
79
79
  tls?: boolean | undefined;
80
80
  serviceConfiguredEndpoint?: undefined;
81
+ authSchemePreference?:
82
+ | string[]
83
+ | import("@smithy/types").Provider<string[]>
84
+ | undefined;
81
85
  httpAuthSchemes:
82
86
  | import("@smithy/types").HttpAuthScheme[]
83
87
  | (
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/nested-clients",
3
- "version": "3.796.0",
3
+ "version": "3.797.0",
4
4
  "description": "Nested clients for AWS SDK packages.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.796.0",
3
+ "version": "3.797.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@aws-sdk/nested-clients": "3.796.0",
30
+ "@aws-sdk/nested-clients": "3.797.0",
31
31
  "@aws-sdk/types": "3.775.0",
32
32
  "@smithy/property-provider": "^4.0.2",
33
33
  "@smithy/shared-ini-file-loader": "^4.0.2",
@@ -51,6 +51,30 @@ var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.
51
51
 
52
52
  // src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts
53
53
  var import_util_middleware = require("@smithy/util-middleware");
54
+
55
+ // src/middleware-http-auth-scheme/resolveAuthOptions.ts
56
+ var resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => {
57
+ if (!authSchemePreference || authSchemePreference.length === 0) {
58
+ return candidateAuthOptions;
59
+ }
60
+ const preferredAuthOptions = [];
61
+ for (const preferredSchemeName of authSchemePreference) {
62
+ for (const candidateAuthOption of candidateAuthOptions) {
63
+ const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
64
+ if (candidateAuthSchemeName === preferredSchemeName) {
65
+ preferredAuthOptions.push(candidateAuthOption);
66
+ }
67
+ }
68
+ }
69
+ for (const candidateAuthOption of candidateAuthOptions) {
70
+ if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
71
+ preferredAuthOptions.push(candidateAuthOption);
72
+ }
73
+ }
74
+ return preferredAuthOptions;
75
+ }, "resolveAuthOptions");
76
+
77
+ // src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts
54
78
  function convertHttpAuthSchemesToMap(httpAuthSchemes) {
55
79
  const map = /* @__PURE__ */ new Map();
56
80
  for (const scheme of httpAuthSchemes) {
@@ -63,10 +87,12 @@ var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (ne
63
87
  const options = config.httpAuthSchemeProvider(
64
88
  await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)
65
89
  );
90
+ const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
91
+ const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
66
92
  const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
67
93
  const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
68
94
  const failureReasons = [];
69
- for (const option of options) {
95
+ for (const option of resolvedOptions) {
70
96
  const scheme = authSchemes.get(option.schemeId);
71
97
  if (!scheme) {
72
98
  failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
@@ -0,0 +1 @@
1
+ module.exports = require("../index.js");
@@ -1,5 +1,6 @@
1
1
  import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
2
2
  import { getSmithyContext } from "@smithy/util-middleware";
3
+ import { resolveAuthOptions } from "./resolveAuthOptions";
3
4
  function convertHttpAuthSchemesToMap(httpAuthSchemes) {
4
5
  const map = new Map();
5
6
  for (const scheme of httpAuthSchemes) {
@@ -9,10 +10,12 @@ function convertHttpAuthSchemesToMap(httpAuthSchemes) {
9
10
  }
10
11
  export const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
11
12
  const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
13
+ const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
14
+ const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
12
15
  const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
13
16
  const smithyContext = getSmithyContext(context);
14
17
  const failureReasons = [];
15
- for (const option of options) {
18
+ for (const option of resolvedOptions) {
16
19
  const scheme = authSchemes.get(option.schemeId);
17
20
  if (!scheme) {
18
21
  failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
@@ -0,0 +1,20 @@
1
+ export const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
2
+ if (!authSchemePreference || authSchemePreference.length === 0) {
3
+ return candidateAuthOptions;
4
+ }
5
+ const preferredAuthOptions = [];
6
+ for (const preferredSchemeName of authSchemePreference) {
7
+ for (const candidateAuthOption of candidateAuthOptions) {
8
+ const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
9
+ if (candidateAuthSchemeName === preferredSchemeName) {
10
+ preferredAuthOptions.push(candidateAuthOption);
11
+ }
12
+ }
13
+ }
14
+ for (const candidateAuthOption of candidateAuthOptions) {
15
+ if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
16
+ preferredAuthOptions.push(candidateAuthOption);
17
+ }
18
+ }
19
+ return preferredAuthOptions;
20
+ };
@@ -1,8 +1,9 @@
1
- import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types";
1
+ import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, Provider, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
5
5
  export interface PreviouslyResolved<TParameters extends HttpAuthSchemeParameters> {
6
+ authSchemePreference?: Provider<string[]>;
6
7
  httpAuthSchemes: HttpAuthScheme[];
7
8
  httpAuthSchemeProvider: HttpAuthSchemeProvider<TParameters>;
8
9
  }
@@ -0,0 +1,10 @@
1
+ import { HttpAuthOption } from "@smithy/types";
2
+ /**
3
+ * Resolves list of auth options based on the supported ones, vs the preference list.
4
+ *
5
+ * @param candidateAuthOptions list of supported auth options selected by the standard
6
+ * resolution process (model-based, endpoints 2.0, etc.)
7
+ * @param authSchemePreference list of auth schemes preferred by user.
8
+ * @returns
9
+ */
10
+ export declare const resolveAuthOptions: (candidateAuthOptions: HttpAuthOption[], authSchemePreference: string[]) => HttpAuthOption[];
@@ -1,8 +1,9 @@
1
- import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types";
1
+ import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, Provider, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
5
5
  export interface PreviouslyResolved<TParameters extends HttpAuthSchemeParameters> {
6
+ authSchemePreference?: Provider<string[]>;
6
7
  httpAuthSchemes: HttpAuthScheme[];
7
8
  httpAuthSchemeProvider: HttpAuthSchemeProvider<TParameters>;
8
9
  }
@@ -0,0 +1,10 @@
1
+ import { HttpAuthOption } from "@smithy/types";
2
+ /**
3
+ * Resolves list of auth options based on the supported ones, vs the preference list.
4
+ *
5
+ * @param candidateAuthOptions list of supported auth options selected by the standard
6
+ * resolution process (model-based, endpoints 2.0, etc.)
7
+ * @param authSchemePreference list of auth schemes preferred by user.
8
+ * @returns
9
+ */
10
+ export declare const resolveAuthOptions: (candidateAuthOptions: HttpAuthOption[], authSchemePreference: string[]) => HttpAuthOption[];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "4.1.0",
3
+ "version": "4.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 middleware-endpoint",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/core": "^3.2.0",
27
+ "@smithy/core": "^3.3.0",
28
28
  "@smithy/middleware-serde": "^4.0.3",
29
29
  "@smithy/node-config-provider": "^4.0.2",
30
30
  "@smithy/shared-ini-file-loader": "^4.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "4.1.0",
3
+ "version": "4.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 middleware-retry",
@@ -36,7 +36,7 @@
36
36
  "@smithy/node-config-provider": "^4.0.2",
37
37
  "@smithy/protocol-http": "^5.1.0",
38
38
  "@smithy/service-error-classification": "^4.0.2",
39
- "@smithy/smithy-client": "^4.2.0",
39
+ "@smithy/smithy-client": "^4.2.1",
40
40
  "@smithy/types": "^4.2.0",
41
41
  "@smithy/util-middleware": "^4.0.2",
42
42
  "@smithy/util-retry": "^4.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "4.2.0",
3
+ "version": "4.2.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",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/core": "^3.2.0",
28
- "@smithy/middleware-endpoint": "^4.1.0",
27
+ "@smithy/core": "^3.3.0",
28
+ "@smithy/middleware-endpoint": "^4.1.1",
29
29
  "@smithy/middleware-stack": "^4.0.2",
30
30
  "@smithy/protocol-http": "^5.1.0",
31
31
  "@smithy/types": "^4.2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "4.0.8",
3
+ "version": "4.0.9",
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",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
26
  "@smithy/property-provider": "^4.0.2",
27
- "@smithy/smithy-client": "^4.2.0",
27
+ "@smithy/smithy-client": "^4.2.1",
28
28
  "@smithy/types": "^4.2.0",
29
29
  "bowser": "^2.11.0",
30
30
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "4.0.8",
3
+ "version": "4.0.9",
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-node",
@@ -27,7 +27,7 @@
27
27
  "@smithy/credential-provider-imds": "^4.0.2",
28
28
  "@smithy/node-config-provider": "^4.0.2",
29
29
  "@smithy/property-provider": "^4.0.2",
30
- "@smithy/smithy-client": "^4.2.0",
30
+ "@smithy/smithy-client": "^4.2.1",
31
31
  "@smithy/types": "^4.2.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
package/package.json CHANGED
@@ -83,7 +83,7 @@
83
83
  "aws-cdk-lib": "2.139.0",
84
84
  "aws-sdk-client-mock": "^4.1.0",
85
85
  "aws-sdk-client-mock-jest": "^4.1.0",
86
- "cdk-nag": "^2.35.79",
86
+ "cdk-nag": "^2.35.82",
87
87
  "cdklabs-projen-project-types": "^0.1.204",
88
88
  "commit-and-tag-version": "^12",
89
89
  "constructs": "10.0.5",
@@ -109,7 +109,7 @@
109
109
  "constructs": "^10.0.5"
110
110
  },
111
111
  "dependencies": {
112
- "@aws-sdk/client-codedeploy": "^3.796.0",
112
+ "@aws-sdk/client-codedeploy": "^3.797.0",
113
113
  "jmespath": "^0.16.0"
114
114
  },
115
115
  "bundledDependencies": [
@@ -127,7 +127,7 @@
127
127
  "publishConfig": {
128
128
  "access": "public"
129
129
  },
130
- "version": "0.0.392",
130
+ "version": "0.0.394",
131
131
  "jest": {
132
132
  "coverageProvider": "v8",
133
133
  "testMatch": [