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

@lumigo/node-core

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lumigo/node-core - npm Package Compare versions

Comparing version 1.11.0 to 1.12.0

3

lib/common/httpUtils.d.ts

@@ -1,2 +0,2 @@

import { RequestRawData } from '../types/spans';
import { HttpRawRequest, HttpRawResponse, RequestRawData } from '../types/spans';
export declare const keyToOmitRegexes: () => RegExp[];

@@ -6,4 +6,5 @@ export declare const prune: (str: string | object, maxLength: number) => string;

export declare function scrub(payload: any, headers: any, sizeLimit: number, truncated?: boolean): string;
export declare function scrubRequestDataPayload(requestData: HttpRawRequest | HttpRawResponse): string;
export declare const shouldScrubDomain: (url: any, domains?: any) => boolean;
export declare const spanHasErrors: (requestRawData: RequestRawData) => boolean;
export declare const decodeHttpBody: (httpBody: any, hasError: boolean) => any | string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeHttpBody = exports.spanHasErrors = exports.shouldScrubDomain = exports.scrub = exports.payloadStringify = exports.prune = exports.keyToOmitRegexes = void 0;
exports.decodeHttpBody = exports.spanHasErrors = exports.shouldScrubDomain = exports.scrubRequestDataPayload = exports.scrub = exports.payloadStringify = exports.prune = exports.keyToOmitRegexes = void 0;
const utils_1 = require("../utils");

@@ -139,2 +139,9 @@ const utils_2 = require("../utils");

exports.scrub = scrub;
function scrubRequestDataPayload(requestData) {
const { truncated, headers, body: payload } = requestData;
const isError = (0, exports.spanHasErrors)(requestData);
const sizeLimit = (0, utils_1.getEventEntitySize)(isError);
return scrub((0, exports.decodeHttpBody)(payload, isError), headers, sizeLimit, truncated);
}
exports.scrubRequestDataPayload = scrubRequestDataPayload;
const domainScrubbers = () => JSON.parse(process.env.LUMIGO_DOMAINS_SCRUBBER || utils_1.LUMIGO_DEFAULT_DOMAIN_SCRUBBERS).map((x) => new RegExp(x, 'i'));

@@ -181,6 +188,6 @@ const shouldScrubDomain = (url, domains = domainScrubbers()) => {

if ((_e = requestData.response) === null || _e === void 0 ? void 0 : _e.body) {
res.response.body = scrub((0, exports.decodeHttpBody)(requestData.response.body, isError), requestData.response.headers, sizeLimit, requestData.response.truncated);
res.response.body = scrubRequestDataPayload(requestData.response);
}
if ((_f = requestData.request) === null || _f === void 0 ? void 0 : _f.body) {
res.request.body = scrub((0, exports.decodeHttpBody)(request.body, isError), request.headers, sizeLimit, requestData.request.truncated);
res.request.body = scrubRequestDataPayload(requestData.response);
}

@@ -187,0 +194,0 @@ if ((_g = requestData.request) === null || _g === void 0 ? void 0 : _g.headers) {

export * from './httpUtils';
export * from './functionUtils';
export * from '../utils';

@@ -18,2 +18,4 @@ "use strict";

__exportStar(require("./httpUtils"), exports);
__exportStar(require("./functionUtils"), exports);
__exportStar(require("../utils"), exports);
//# sourceMappingURL=index.js.map

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

export * from './spans';
export * as SpanTypes from './spans';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./spans"), exports);
exports.SpanTypes = void 0;
exports.SpanTypes = require("./spans");
//# sourceMappingURL=index.js.map
{
"name": "@lumigo/node-core",
"version": "1.11.0",
"version": "1.12.0",
"description": "Lumigo core node sdk",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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