@aws-sdk/polly-request-presigner 3.1068.0 → 3.1070.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 +8 -10
  2. package/package.json +7 -7
package/dist-cjs/index.js CHANGED
@@ -1,13 +1,11 @@
1
- 'use strict';
2
-
3
- var clientPolly = require('@aws-sdk/client-polly');
4
- var util = require('@aws-sdk/core/util');
5
- var protocols = require('@smithy/core/protocols');
6
- var signatureV4 = require('@smithy/signature-v4');
1
+ const { SynthesizeSpeechCommand } = require("@aws-sdk/client-polly");
2
+ const { formatUrl } = require("@aws-sdk/core/util");
3
+ const { HttpRequest } = require("@smithy/core/protocols");
4
+ const { SignatureV4 } = require("@smithy/signature-v4");
7
5
 
8
6
  const getSignedUrl = async (client, command, options = {}) => {
9
7
  const { credentials } = client.config;
10
- const signer = new signatureV4.SignatureV4({
8
+ const signer = new SignatureV4({
11
9
  service: options.service || "polly",
12
10
  uriEscapePath: options.uriEscapePath || false,
13
11
  ...client.config,
@@ -15,7 +13,7 @@ const getSignedUrl = async (client, command, options = {}) => {
15
13
  });
16
14
  const presignInterceptMiddleware = (next, context) => async (args) => {
17
15
  const { request } = args;
18
- if (!protocols.HttpRequest.isInstance(request)) {
16
+ if (!HttpRequest.isInstance(request)) {
19
17
  throw new Error("Request to be presigned is not an valid HTTP request.");
20
18
  }
21
19
  request.method = "GET";
@@ -58,11 +56,11 @@ const getSignedUrl = async (client, command, options = {}) => {
58
56
  finally {
59
57
  client.middlewareStack.remove("presignInterceptMiddleware");
60
58
  }
61
- return util.formatUrl(presigned);
59
+ return formatUrl(presigned);
62
60
  };
63
61
 
64
62
  const getSynthesizeSpeechUrl = async (input) => {
65
- const command = new clientPolly.SynthesizeSpeechCommand(input.params);
63
+ const command = new SynthesizeSpeechCommand(input.params);
66
64
  const options = input.options || {};
67
65
  return await getSignedUrl(input.client, command, options);
68
66
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@aws-sdk/polly-request-presigner",
3
- "version": "3.1068.0",
3
+ "version": "3.1070.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline",
7
- "build:es": "tsc -p tsconfig.es.json",
7
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
8
8
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
9
- "build:types": "tsc -p tsconfig.types.json",
9
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
10
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",
11
+ "clean": "premove dist-cjs dist-es dist-types",
12
12
  "extract:docs": "api-extractor run --local",
13
13
  "test": "yarn g:vitest run",
14
14
  "test:watch": "yarn g:vitest watch",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@aws-sdk/client-polly": "3.1068.0",
29
- "@aws-sdk/core": "^3.974.20",
30
- "@aws-sdk/types": "^3.973.12",
28
+ "@aws-sdk/client-polly": "3.1070.0",
29
+ "@aws-sdk/core": "^3.974.21",
30
+ "@aws-sdk/types": "^3.973.13",
31
31
  "@smithy/core": "^3.24.6",
32
32
  "@smithy/signature-v4": "^5.4.6",
33
33
  "@smithy/types": "^4.14.3",