tencentcloud-sdk-nodejs 4.0.1042-beta.0 → 4.0.1042-beta.1

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.
@@ -1,7 +1,7 @@
1
- import * as QueryString from "querystring";
1
+ import QueryString from "querystring";
2
2
  import { URL } from "url";
3
- import * as isStream from "is-stream";
4
- import * as getStream from "get-stream";
3
+ import isStream from "is-stream";
4
+ import getStream from "get-stream";
5
5
  import FormData from "form-data";
6
6
  import Sign from "../sign";
7
7
  import fetch from "./fetch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs",
3
- "version": "4.0.1042-beta.0",
3
+ "version": "4.0.1042-beta.1",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "./tencentcloud/index.js",
6
6
  "module": "./es/index.js",
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HttpConnection = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const QueryString = tslib_1.__importStar(require("querystring"));
5
+ const querystring_1 = tslib_1.__importDefault(require("querystring"));
6
6
  const url_1 = require("url");
7
- const isStream = tslib_1.__importStar(require("is-stream"));
8
- const getStream = tslib_1.__importStar(require("get-stream"));
7
+ const is_stream_1 = tslib_1.__importDefault(require("is-stream"));
8
+ const get_stream_1 = tslib_1.__importDefault(require("get-stream"));
9
9
  const form_data_1 = tslib_1.__importDefault(require("form-data"));
10
10
  const sign_1 = tslib_1.__importDefault(require("../sign"));
11
11
  const fetch_1 = tslib_1.__importDefault(require("./fetch"));
@@ -22,11 +22,11 @@ class HttpConnection {
22
22
  signal,
23
23
  };
24
24
  if (method === "GET") {
25
- url += "?" + QueryString.stringify(data);
25
+ url += "?" + querystring_1.default.stringify(data);
26
26
  }
27
27
  else {
28
28
  config.headers["Content-Type"] = "application/x-www-form-urlencoded";
29
- config.body = QueryString.stringify(data);
29
+ config.body = querystring_1.default.stringify(data);
30
30
  }
31
31
  return await fetch_1.default(url, config);
32
32
  }
@@ -38,7 +38,7 @@ class HttpConnection {
38
38
  let payload = "";
39
39
  if (method === "GET") {
40
40
  data = mergeData(data);
41
- url += "?" + QueryString.stringify(data);
41
+ url += "?" + querystring_1.default.stringify(data);
42
42
  }
43
43
  if (method === "POST") {
44
44
  payload = data;
@@ -106,8 +106,8 @@ class HttpConnection {
106
106
  exports.HttpConnection = HttpConnection;
107
107
  async function convertReadStreamToBuffer(data) {
108
108
  for (const key in data) {
109
- if (isStream(data[key])) {
110
- data[key] = await getStream.buffer(data[key]);
109
+ if (is_stream_1.default(data[key])) {
110
+ data[key] = await get_stream_1.default.buffer(data[key]);
111
111
  }
112
112
  }
113
113
  }
@@ -151,7 +151,7 @@ function isArray(x) {
151
151
  return Array.isArray(x);
152
152
  }
153
153
  function isObject(x) {
154
- return typeof x === "object" && !isArray(x) && !isStream(x) && !isBuffer(x) && x !== null;
154
+ return typeof x === "object" && !isArray(x) && !is_stream_1.default(x) && !isBuffer(x) && x !== null;
155
155
  }
156
156
  function isNull(x) {
157
157
  return x === null;