Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Changelog

## 3.10.0 - (Seafoam Vienna)
## 3.10.0 - (Seafoam Vienna) - November 2020

### Highlights 3.10.0

- Merged 2 more Hacktoberfest contributions. Thanks to coding4funrocks! Great job!
- Happy Halloween release!

### Bugfixes and Improvements 3.10.0

- CLI: support for uploading files to data lake (#221)
- SDK: upload files to data lake (#221)
- SDK: signed Url generation for upload and download (#221)
- CLI: added support for direct calculation of KPI states to CLI mc kpi-calculation command
- SDK: feat: add support for direct interaction to TrendPrediction Client (#204) [#hacktoberfest, coding4funrocks]
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mindconnect/mindconnect-nodejs",
"version": "3.10.0-3",
"version": "3.10.0",
"description": "MindConnect Library for NodeJS (community based)",
"main": "./dist/src/index.js",
"browser": "./dist/src/index.bundle.js",
Expand Down
7 changes: 6 additions & 1 deletion src/api/sdk/data-lake/data-lake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as fs from "fs";
import { toQueryString } from "../../utils";
import { SdkClient } from "../common/sdk-client";
import { DataLakeModels } from "./data-lake.models";
const HttpsProxyAgent = require("https-proxy-agent");

export class DataLakeClient extends SdkClient {
private _baseUrl: string = "/api/datalake/v3";

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

const request: any = { method: "PUT", headers: {} };
const proxy = process.env.http_proxy || process.env.HTTP_PROXY;
const proxyHttpAgent: any = proxy ? new HttpsProxyAgent(proxy) : null;

const request: any = { method: "PUT", headers: {}, agent: proxyHttpAgent };
request.body = myBuffer;
const response = await fetch(signedUrl, request);
return response.headers;
Expand Down