New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@appsignal/nodejs

Package Overview
Dependencies
Maintainers
6
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsignal/nodejs - npm Package Compare versions

Comparing version

to
1.2.3

5

CHANGELOG.md
# Changelog
## 1.2.3
- Handle all non-dynamic paths as static routes in Next.js. PR #383
- Another fix for dynamic routes in Next PR #380
- Fixes for data handling PR #385
## 1.2.2

@@ -4,0 +9,0 @@ - Report the install status as unknown in diagnose PR #373

2

dist/client.d.ts

@@ -16,3 +16,3 @@ import { NodeClient, Metrics, Plugin, Tracer } from "@appsignal/types";

#private;
readonly VERSION = "1.2.3-beta.0";
readonly VERSION = "1.2.3";
config: Configuration;

@@ -19,0 +19,0 @@ agent: Agent;

import { HashMap } from "@appsignal/types";
import { datamap, dataarray } from "../extension";
export declare class Data {
static generate(data: Array<any> | HashMap<any>, filtered?: boolean): any;
static toJson(data: typeof datamap | typeof dataarray): any;
private static mapObject;
private static mapArray;
}

@@ -17,5 +17,8 @@ "use strict";

}
static mapObject(obj, filtered) {
static toJson(data) {
return JSON.parse(extension_1.datamap.toJson(data));
}
static mapObject(hash_value, filtered) {
let map = filtered ? extension_1.datamap.createFiltered() : extension_1.datamap.create();
Object.entries(obj).forEach(([key, value]) => {
Object.entries(hash_value).forEach(([key, value]) => {
switch (typeof value) {

@@ -33,23 +36,26 @@ case "string":

break;
case "bigint":
extension_1.datamap.setString(key, `bigint:${value}`, map);
break;
case "boolean":
extension_1.datamap.setBoolean(key, value, map);
break;
case "undefined":
extension_1.datamap.setString(key, "undefined", map);
break;
case "object":
// check null
if (!value) {
extension_1.datamap.setNull(key, map);
}
// check array
if (Array.isArray(value)) {
extension_1.datamap.setData(this.mapArray(value, filtered), map);
else if (Array.isArray(value)) {
extension_1.datamap.setData(key, this.mapArray(value, filtered), map);
}
// check for plain object
if ((value === null || value === void 0 ? void 0 : value.constructor.name) === "Object") {
extension_1.datamap.setData(this.mapObject(value, filtered), map);
else if ((value === null || value === void 0 ? void 0 : value.constructor.name) === "Object") {
extension_1.datamap.setData(key, this.mapObject(value, filtered), map);
}
else {
// attempt to co-erce whatever the data is to a string
extension_1.datamap.setString(key, String(value), map);
}
break;
default:
// attempt to co-erce whatever the data is to a string
extension_1.datamap.setString(String(value), map);
break;
}

@@ -59,5 +65,5 @@ });

}
static mapArray(arr, filtered) {
static mapArray(array_value, filtered) {
let array = extension_1.dataarray.create();
arr.forEach(value => {
array_value.forEach(value => {
switch (typeof value) {

@@ -75,5 +81,11 @@ case "string":

break;
case "bigint":
extension_1.dataarray.appendString(`bigint:${value}`, array);
break;
case "boolean":
extension_1.dataarray.appendBoolean(value, array);
break;
case "undefined":
extension_1.dataarray.appendString("undefined", array);
break;
case "object":

@@ -84,15 +96,13 @@ // check null

}
// check array
if (Array.isArray(value)) {
else if (Array.isArray(value)) {
extension_1.dataarray.appendData(this.mapArray(value, filtered), array);
}
// check for plain object
if ((value === null || value === void 0 ? void 0 : value.constructor.name) === "Object") {
else if ((value === null || value === void 0 ? void 0 : value.constructor.name) === "Object") {
extension_1.dataarray.appendData(this.mapObject(value, filtered), array);
}
else {
// attempt to co-erce whatever the data is to a string
extension_1.dataarray.appendString(String(value), array);
}
break;
default:
// attempt to co-erce whatever the data is to a string
extension_1.dataarray.appendString(String(value), array);
break;
}

@@ -99,0 +109,0 @@ });

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

export declare const VERSION = "1.2.3-beta.0";
export declare const VERSION = "1.2.3";
export declare const AGENT_VERSION = "d08ae6c";

@@ -5,3 +5,3 @@ "use strict";

// Do not touch this file, auto-generated by scripts/create-versionfile
exports.VERSION = "1.2.3-beta.0";
exports.VERSION = "1.2.3";
exports.AGENT_VERSION = "d08ae6c";
{
"name": "@appsignal/nodejs",
"version": "1.2.3-beta.0",
"version": "1.2.3",
"main": "dist/index",

@@ -19,3 +19,3 @@ "types": "dist/index",

"optionalDependencies": {
"@appsignal/nodejs-ext": "^1.2.3-beta.0"
"@appsignal/nodejs-ext": "^1.2.3"
},

@@ -39,3 +39,3 @@ "scripts": {

},
"gitHead": "46af2cf0972443e995b4c190d8ba58ecb8a81f37"
"gitHead": "b7751d89da53f60ccdc930876950926c5f9faea8"
}