Skip to content

Commit c117e83

Browse files
authored
chore: release 3.10.0 (#223)
* feat: added support for http proxy to data-lake * chore: release 3.10.0 🎉 🎶 🚀
1 parent d841ab6 commit c117e83

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Changelog
22

3-
## 3.10.0 - (Seafoam Vienna)
3+
## 3.10.0 - (Seafoam Vienna) - November 2020
4+
5+
### Highlights 3.10.0
6+
7+
- Merged 2 more Hacktoberfest contributions. Thanks to coding4funrocks! Great job!
8+
- Happy Halloween release!
49

510
### Bugfixes and Improvements 3.10.0
611

712
- CLI: support for uploading files to data lake (#221)
13+
- SDK: upload files to data lake (#221)
814
- SDK: signed Url generation for upload and download (#221)
915
- CLI: added support for direct calculation of KPI states to CLI mc kpi-calculation command
1016
- SDK: feat: add support for direct interaction to TrendPrediction Client (#204) [#hacktoberfest, coding4funrocks]

package-lock.json

Lines changed: 1 addition & 1 deletion
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.10.0-3",
3+
"version": "3.10.0",
44
"description": "MindConnect Library for NodeJS (community based)",
55
"main": "./dist/src/index.js",
66
"browser": "./dist/src/index.bundle.js",

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import * as fs from "fs";
33
import { toQueryString } from "../../utils";
44
import { SdkClient } from "../common/sdk-client";
55
import { DataLakeModels } from "./data-lake.models";
6+
const HttpsProxyAgent = require("https-proxy-agent");
7+
68
export class DataLakeClient extends SdkClient {
79
private _baseUrl: string = "/api/datalake/v3";
810

@@ -171,7 +173,10 @@ export class DataLakeClient extends SdkClient {
171173
public async PutFile(file: string | Buffer, signedUrl: string): Promise<Headers> {
172174
const myBuffer = typeof file === "string" ? fs.readFileSync(file) : (file as Buffer);
173175

174-
const request: any = { method: "PUT", headers: {} };
176+
const proxy = process.env.http_proxy || process.env.HTTP_PROXY;
177+
const proxyHttpAgent: any = proxy ? new HttpsProxyAgent(proxy) : null;
178+
179+
const request: any = { method: "PUT", headers: {}, agent: proxyHttpAgent };
175180
request.body = myBuffer;
176181
const response = await fetch(signedUrl, request);
177182
return response.headers;

0 commit comments

Comments
 (0)