Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@activepieces/pieces-common

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@activepieces/pieces-common - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

10

package.json
{
"name": "@activepieces/pieces-common",
"version": "0.2.2",
"version": "0.2.3",
"type": "commonjs",

@@ -11,6 +11,6 @@ "dependencies": {

"nanoid": "^3.3.4",
"semver": "7.5.3",
"@activepieces/pieces-framework": "0.6.10",
"@activepieces/shared": "0.6.4",
"tslib": "1.14.1"
"semver": "7.5.4",
"@activepieces/pieces-framework": "0.6.17",
"@activepieces/shared": "0.8.3",
"tslib": "2.6.1"
},

@@ -17,0 +17,0 @@ "main": "./src/index.js",

@@ -0,7 +1,7 @@

import { DelegatingAuthenticationConverter } from './delegating-authentication-converter';
import type { HttpClient } from './http-client';
import type { HttpHeaders } from './http-headers';
import type { HttpMessageBody } from './http-message-body';
import type { HttpRequest } from './http-request';
import type { HttpHeaders } from './http-headers';
import { HttpResponse } from './http-response';
import { DelegatingAuthenticationConverter } from './delegating-authentication-converter';
export declare abstract class BaseHttpClient implements HttpClient {

@@ -8,0 +8,0 @@ private readonly baseUrl;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseHttpClient = void 0;
const node_url_1 = require("node:url");
const http_header_1 = require("./http-header");
const media_type_1 = require("./media-type");
const node_url_1 = require("node:url");
class BaseHttpClient {

@@ -22,2 +22,3 @@ constructor(baseUrl, authenticationConverter) {

getHeaders(request) {
var _a;
let requestHeaders = {

@@ -30,3 +31,10 @@ [http_header_1.HttpHeader.ACCEPT]: media_type_1.MediaType.APPLICATION_JSON,

if (request.body) {
requestHeaders[http_header_1.HttpHeader.CONTENT_TYPE] = media_type_1.MediaType.APPLICATION_JSON;
switch ((_a = request.headers) === null || _a === void 0 ? void 0 : _a['Content-Type']) {
case 'text/csv':
requestHeaders[http_header_1.HttpHeader.CONTENT_TYPE] = media_type_1.MediaType.TEXT_CSV;
break;
default:
requestHeaders[http_header_1.HttpHeader.CONTENT_TYPE] = media_type_1.MediaType.APPLICATION_JSON;
break;
}
}

@@ -33,0 +41,0 @@ if (request.headers) {

export declare enum MediaType {
APPLICATION_JSON = "application/json"
APPLICATION_JSON = "application/json",
TEXT_CSV = "text/csv"
}

@@ -7,3 +7,4 @@ "use strict";

MediaType["APPLICATION_JSON"] = "application/json";
MediaType["TEXT_CSV"] = "text/csv";
})(MediaType || (exports.MediaType = MediaType = {}));
//# sourceMappingURL=media-type.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc