@aws-sdk/middleware-sdk-machinelearning 3.901.0 → 3.910.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +35 -67
  2. package/package.json +4 -4
package/dist-cjs/index.js CHANGED
@@ -1,74 +1,42 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
20
2
 
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- getPredictEndpointPlugin: () => getPredictEndpointPlugin,
25
- predictEndpointMiddleware: () => predictEndpointMiddleware,
26
- predictEndpointMiddlewareOptions: () => predictEndpointMiddlewareOptions
27
- });
28
- module.exports = __toCommonJS(index_exports);
3
+ var protocolHttp = require('@smithy/protocol-http');
29
4
 
30
- // src/predict-endpoint.ts
31
- var import_protocol_http = require("@smithy/protocol-http");
32
5
  function predictEndpointMiddleware(options) {
33
- return (next) => async (args) => {
34
- const { input } = args;
35
- let { request } = args;
36
- if (import_protocol_http.HttpRequest.isInstance(request)) {
37
- if (input.PredictEndpoint) {
38
- const endpoint = options.urlParser(input.PredictEndpoint);
39
- request = {
40
- ...request,
41
- hostname: endpoint.hostname,
42
- path: endpoint.path,
43
- port: endpoint.port,
44
- protocol: endpoint.protocol,
45
- query: endpoint.query ?? {}
46
- };
47
- }
48
- }
49
- return next({
50
- ...args,
51
- request
52
- });
53
- };
6
+ return (next) => async (args) => {
7
+ const { input } = args;
8
+ let { request } = args;
9
+ if (protocolHttp.HttpRequest.isInstance(request)) {
10
+ if (input.PredictEndpoint) {
11
+ const endpoint = options.urlParser(input.PredictEndpoint);
12
+ request = {
13
+ ...request,
14
+ hostname: endpoint.hostname,
15
+ path: endpoint.path,
16
+ port: endpoint.port,
17
+ protocol: endpoint.protocol,
18
+ query: endpoint.query ?? {},
19
+ };
20
+ }
21
+ }
22
+ return next({
23
+ ...args,
24
+ request,
25
+ });
26
+ };
54
27
  }
55
- __name(predictEndpointMiddleware, "predictEndpointMiddleware");
56
- var predictEndpointMiddlewareOptions = {
57
- step: "build",
58
- tags: ["PREDICT_ENDPOINT"],
59
- name: "predictEndpointMiddleware",
60
- override: true
28
+ const predictEndpointMiddlewareOptions = {
29
+ step: "build",
30
+ tags: ["PREDICT_ENDPOINT"],
31
+ name: "predictEndpointMiddleware",
32
+ override: true,
61
33
  };
62
- var getPredictEndpointPlugin = /* @__PURE__ */ __name((config) => ({
63
- applyToStack: /* @__PURE__ */ __name((clientStack) => {
64
- clientStack.add(predictEndpointMiddleware(config), predictEndpointMiddlewareOptions);
65
- }, "applyToStack")
66
- }), "getPredictEndpointPlugin");
67
- // Annotate the CommonJS export names for ESM import in node:
68
-
69
- 0 && (module.exports = {
70
- predictEndpointMiddlewareOptions,
71
- getPredictEndpointPlugin,
72
- predictEndpointMiddleware
34
+ const getPredictEndpointPlugin = (config) => ({
35
+ applyToStack: (clientStack) => {
36
+ clientStack.add(predictEndpointMiddleware(config), predictEndpointMiddlewareOptions);
37
+ },
73
38
  });
74
39
 
40
+ exports.getPredictEndpointPlugin = getPredictEndpointPlugin;
41
+ exports.predictEndpointMiddleware = predictEndpointMiddleware;
42
+ exports.predictEndpointMiddlewareOptions = predictEndpointMiddlewareOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-machinelearning",
3
- "version": "3.901.0",
3
+ "version": "3.910.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-sdk-machinelearning",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/types": "3.901.0",
28
- "@smithy/protocol-http": "^5.3.0",
29
- "@smithy/types": "^4.6.0",
27
+ "@aws-sdk/types": "3.910.0",
28
+ "@smithy/protocol-http": "^5.3.2",
29
+ "@smithy/types": "^4.7.1",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {