@vectorx/cloud-toolkit 0.1.1 → 0.1.2

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.
@@ -101,9 +101,7 @@ let UploadService = class UploadService {
101
101
  const res = yield request_1.request.fetch({
102
102
  method: "POST",
103
103
  url: `${(0, config_1.getBaseUrl)()}/api/eros/mp/red/code/agent_pkg/develop/upload_pre_check`,
104
- headers: {
105
- "content-type": "application/json",
106
- },
104
+ headers: {},
107
105
  data: {
108
106
  query,
109
107
  body: params,
@@ -36,7 +36,10 @@ class Request {
36
36
  requestUrl = queryParams.toString() ? `${url}?${queryParams.toString()}` : url;
37
37
  if (method === "POST" && data.body) {
38
38
  requestBody = JSON.stringify(data.body);
39
- headers["Content-Type"] = "application/json";
39
+ const contentTypeKey = Object.keys(headers).find((key) => key.toLowerCase() === "content-type");
40
+ if (!contentTypeKey) {
41
+ headers["Content-Type"] = "application/json";
42
+ }
40
43
  }
41
44
  const hostFetch = env_helper_1.isIDE ? globalThis.fetch : node_fetch_1.default;
42
45
  const response = yield hostFetch(requestUrl, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorx/cloud-toolkit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "VectorX Cloud Toolkit",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "node": ">=18.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@vectorx/agent-simulator": "0.1.1",
25
- "@vectorx/functions-framework": "0.1.1",
24
+ "@vectorx/agent-simulator": "0.1.2",
25
+ "@vectorx/functions-framework": "0.1.2",
26
26
  "archiver": "^5.3.1",
27
27
  "cos-nodejs-sdk-v5": "2.x",
28
28
  "crypto": "^1.0.1",