@statly/observe 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SJ7C46AP.mjs → chunk-RLSLJL6N.js} +7 -8
- package/dist/{chunk-7AITSJLP.mjs → chunk-RUEXBTHM.js} +2 -2
- package/dist/{cli.mjs → cli.cjs} +26 -3
- package/dist/cli.js +3 -26
- package/dist/index.cjs +2837 -0
- package/dist/{index.d.mts → index.d.cts} +4 -4
- package/dist/index.js +62 -2789
- package/dist/integrations/express.cjs +1108 -0
- package/dist/integrations/express.js +8 -1107
- package/dist/integrations/fastify.cjs +1117 -0
- package/dist/integrations/fastify.js +9 -1115
- package/dist/integrations/nextjs.cjs +1167 -0
- package/dist/integrations/nextjs.js +12 -1162
- package/dist/logger/index.cjs +1483 -0
- package/dist/logger/index.js +30 -1457
- package/dist/{telemetry-CXHOTW3Y.mjs → telemetry-JOMOMZ25.js} +1 -1
- package/package.json +3 -2
- package/dist/index.mjs +0 -111
- package/dist/integrations/express.mjs +0 -10
- package/dist/integrations/fastify.mjs +0 -12
- package/dist/integrations/nextjs.mjs +0 -18
- package/dist/logger/index.mjs +0 -56
- /package/dist/{chunk-J5AHUFP2.mjs → chunk-NKQPBSKX.js} +0 -0
- /package/dist/{cli.d.mts → cli.d.cts} +0 -0
- /package/dist/integrations/{express.d.mts → express.d.cts} +0 -0
- /package/dist/integrations/{fastify.d.mts → fastify.d.cts} +0 -0
- /package/dist/integrations/{nextjs.d.mts → nextjs.d.cts} +0 -0
- /package/dist/logger/{index.d.mts → index.d.cts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TelemetryProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NKQPBSKX.js";
|
|
4
4
|
|
|
5
5
|
// src/transport.ts
|
|
6
6
|
var Transport = class {
|
|
@@ -300,13 +300,12 @@ var ConsoleIntegration = class {
|
|
|
300
300
|
return;
|
|
301
301
|
}
|
|
302
302
|
this.originalMethods[level] = originalMethod;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
self.callback({
|
|
303
|
+
console[level] = (...args) => {
|
|
304
|
+
if (this.callback) {
|
|
305
|
+
this.callback({
|
|
307
306
|
category: "console",
|
|
308
|
-
message:
|
|
309
|
-
level:
|
|
307
|
+
message: this.formatArgs(args),
|
|
308
|
+
level: this.mapLevel(level),
|
|
310
309
|
data: args.length > 1 ? { arguments: args } : void 0
|
|
311
310
|
});
|
|
312
311
|
}
|
|
@@ -467,7 +466,7 @@ var StatlyClient = class {
|
|
|
467
466
|
* Execute a function within a trace span
|
|
468
467
|
*/
|
|
469
468
|
async trace(name, operation, tags) {
|
|
470
|
-
const { trace: traceFn } = await import("./telemetry-
|
|
469
|
+
const { trace: traceFn } = await import("./telemetry-JOMOMZ25.js");
|
|
471
470
|
return traceFn(name, operation, tags);
|
|
472
471
|
}
|
|
473
472
|
/**
|
|
@@ -47,7 +47,7 @@ var SENSITIVE_KEYS = /* @__PURE__ */ new Set([
|
|
|
47
47
|
]);
|
|
48
48
|
var SCRUB_PATTERNS = {
|
|
49
49
|
apiKey: {
|
|
50
|
-
regex: /(?:api[_-]?key|apikey)\s*[=:]\s*["']?([a-zA-Z0-9_
|
|
50
|
+
regex: /(?:api[_-]?key|apikey)\s*[=:]\s*["']?([a-zA-Z0-9_-]{20,})["']?/gi,
|
|
51
51
|
description: "API keys in various formats"
|
|
52
52
|
},
|
|
53
53
|
password: {
|
|
@@ -55,7 +55,7 @@ var SCRUB_PATTERNS = {
|
|
|
55
55
|
description: "Passwords and secrets"
|
|
56
56
|
},
|
|
57
57
|
token: {
|
|
58
|
-
regex: /(?:bearer\s+|token\s*[=:]\s*["']?)([a-zA-Z0-
|
|
58
|
+
regex: /(?:bearer\s+|token\s*[=:]\s*["']?)([a-zA-Z0-9._-]{20,})["']?/gi,
|
|
59
59
|
description: "Bearer tokens and auth tokens"
|
|
60
60
|
},
|
|
61
61
|
creditCard: {
|
package/dist/{cli.mjs → cli.cjs}
RENAMED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
2
25
|
|
|
3
26
|
// src/cli.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
27
|
+
var readline = __toESM(require("readline"), 1);
|
|
28
|
+
var fs = __toESM(require("fs"), 1);
|
|
29
|
+
var path = __toESM(require("path"), 1);
|
|
7
30
|
var COLORS = {
|
|
8
31
|
reset: "\x1B[0m",
|
|
9
32
|
bright: "\x1B[1m",
|
package/dist/cli.js
CHANGED
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
-
mod
|
|
24
|
-
));
|
|
25
2
|
|
|
26
3
|
// src/cli.ts
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
import * as readline from "readline";
|
|
5
|
+
import * as fs from "fs";
|
|
6
|
+
import * as path from "path";
|
|
30
7
|
var COLORS = {
|
|
31
8
|
reset: "\x1B[0m",
|
|
32
9
|
bright: "\x1B[1m",
|