@aws-sdk/core 3.662.0 → 3.664.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/submodules/client/index.ts
22
22
  var client_exports = {};
23
23
  __export(client_exports, {
24
- emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion
24
+ emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
25
+ setFeature: () => setFeature
25
26
  });
26
27
  module.exports = __toCommonJS(client_exports);
27
28
 
@@ -41,7 +42,21 @@ More information can be found at: https://a.co/74kJMmI`
41
42
  );
42
43
  }
43
44
  }, "emitWarningIfUnsupportedVersion");
45
+
46
+ // src/submodules/client/setFeature.ts
47
+ function setFeature(context, feature, value) {
48
+ if (!context.__aws_sdk_context) {
49
+ context.__aws_sdk_context = {
50
+ features: {}
51
+ };
52
+ } else if (!context.__aws_sdk_context.features) {
53
+ context.__aws_sdk_context.features = {};
54
+ }
55
+ context.__aws_sdk_context.features[feature] = value;
56
+ }
57
+ __name(setFeature, "setFeature");
44
58
  // Annotate the CommonJS export names for ESM import in node:
45
59
  0 && (module.exports = {
46
- emitWarningIfUnsupportedVersion
60
+ emitWarningIfUnsupportedVersion,
61
+ setFeature
47
62
  });
@@ -1 +1,2 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export * from "./setFeature";
@@ -0,0 +1,11 @@
1
+ export function setFeature(context, feature, value) {
2
+ if (!context.__aws_sdk_context) {
3
+ context.__aws_sdk_context = {
4
+ features: {},
5
+ };
6
+ }
7
+ else if (!context.__aws_sdk_context.features) {
8
+ context.__aws_sdk_context.features = {};
9
+ }
10
+ context.__aws_sdk_context.features[feature] = value;
11
+ }
@@ -1 +1,2 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export * from "./setFeature";
@@ -0,0 +1,12 @@
1
+ import type { AwsHandlerExecutionContext, AwsSdkFeatures } from "@aws-sdk/types";
2
+ /**
3
+ * @internal
4
+ * Indicates to the request context that a given feature is active.
5
+ *
6
+ * @param context - handler execution context.
7
+ * @param feature - readable name of feature.
8
+ * @param value - encoding value of feature. This is required because the
9
+ * specification asks the SDK not to include a runtime lookup of all
10
+ * the feature identifiers.
11
+ */
12
+ export declare function setFeature<F extends keyof AwsSdkFeatures>(context: AwsHandlerExecutionContext, feature: F, value: AwsSdkFeatures[F]): void;
@@ -1 +1,2 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export * from "./setFeature";
@@ -0,0 +1,6 @@
1
+ import { AwsHandlerExecutionContext, AwsSdkFeatures } from "@aws-sdk/types";
2
+ export declare function setFeature<F extends keyof AwsSdkFeatures>(
3
+ context: AwsHandlerExecutionContext,
4
+ feature: F,
5
+ value: AwsSdkFeatures[F]
6
+ ): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -79,6 +79,7 @@
79
79
  },
80
80
  "license": "Apache-2.0",
81
81
  "dependencies": {
82
+ "@aws-sdk/types": "3.664.0",
82
83
  "@smithy/core": "^2.4.7",
83
84
  "@smithy/node-config-provider": "^3.1.8",
84
85
  "@smithy/property-provider": "^3.1.7",