Skip to content

Commit 7efb52c

Browse files
authored
fix: mindsphere data lake on ali, feat: generate-html (#317)
* feat: markdown help * feat: IDL upload for alibaba cloud * chore: release alpha version 3.19.0-1 🎉 * chore: removed unused code
1 parent e2f52ea commit 7efb52c

File tree

10 files changed

+528
-331
lines changed

10 files changed

+528
-331
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ mindconnect-nodejs-win.exe
106106

107107
# Webstorm
108108
.idea
109+
110+
# markdown-help
111+
markdown-help/**

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ mindconnect-nodejs-win.exe
6363

6464
# Spellchecker files
6565
.spelling
66+
67+
# markdown-help
68+
markdown-help/**

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.19.0 - (Dove Vienna) - April 2022
4+
5+
- CLI: new `mdsp markdown-help` command to generate markdown help available at [opensource.mindsphere.io](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/index.html#tab1anchor2)
6+
- SDK: Data Lake - added support for mindsphere data upload in CN1 (on alibaba cloud) [[#316](https://github.com/mindsphere/mindconnect-nodejs/issues/316)]
7+
- Bumped most depedencies
8+
39
## 3.18.2 - (Hazelwood Vienna) - March 2022
410

511
- fixed missing date-fns dependency in package.json

package-lock.json

Lines changed: 138 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mindconnect/mindconnect-nodejs",
3-
"version": "3.18.2",
3+
"version": "3.19.0-1",
44
"description": "NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy",
55
"main": "./dist/src/index.js",
66
"browser": "./dist/src/index.bundle.js",

src/api/sdk/data-lake/data-lake.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,17 @@ export class DataLakeClient extends SdkClient {
149149
const proxy = process.env.http_proxy || process.env.HTTP_PROXY;
150150
const proxyHttpAgent: any = proxy ? new HttpsProxyAgent(proxy) : null;
151151

152-
// x-ms-blob is necessary on eu2 and is ignored on eu1
153-
const request: any = { method: "PUT", headers: { "x-ms-blob-type": "BlockBlob" }, agent: proxyHttpAgent };
152+
let headers;
153+
154+
// in china the Object Storage Service needs Content-Type to be application/octet-stream
155+
if (this.GetGateway().toLowerCase().includes("mindsphere-in.cn")) {
156+
headers = { "Content-Type": "application/octet-stream" };
157+
} else {
158+
// x-ms-blob is necessary on eu2 and is ignored on eu1
159+
headers = { "x-ms-blob-type": "BlockBlob" };
160+
}
161+
162+
const request: any = { method: "PUT", headers: headers, agent: proxyHttpAgent };
154163
request.body = myBuffer;
155164
const response = await fetch(signedUrl, request);
156165
return response.headers;

0 commit comments

Comments
 (0)