@spfn/monitor 0.1.0-beta.16 → 0.1.0-beta.17
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/index.d.ts +12 -12
- package/dist/server.d.ts +2 -2
- package/dist/server.js +8 -8
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/{index-C9IUDNIv.d.ts → index-BiN0PoSx.d.ts} +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _spfn_core_nextjs from '@spfn/core/nextjs';
|
|
2
2
|
import * as _spfn_core_route from '@spfn/core/route';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
|
-
import { M as MonitorStats, m as monitorRouter } from './index-
|
|
5
|
-
export { a as ERROR_GROUP_STATUSES, E as ErrorGroupStatus, b as LOG_LEVELS, L as LogLevel } from './index-
|
|
4
|
+
import { M as MonitorStats, m as monitorRouter } from './index-BiN0PoSx.js';
|
|
5
|
+
export { a as ERROR_GROUP_STATUSES, E as ErrorGroupStatus, b as LOG_LEVELS, L as LogLevel } from './index-BiN0PoSx.js';
|
|
6
6
|
import 'drizzle-orm/pg-core';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -33,14 +33,14 @@ declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
33
33
|
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
34
34
|
}>;
|
|
35
35
|
}, {}, {
|
|
36
|
-
status: "active" | "resolved" | "ignored";
|
|
37
|
-
path: string;
|
|
38
36
|
id: number;
|
|
39
37
|
fingerprint: string;
|
|
40
38
|
name: string;
|
|
41
39
|
message: string;
|
|
40
|
+
path: string;
|
|
42
41
|
method: string;
|
|
43
42
|
statusCode: number;
|
|
43
|
+
status: "active" | "resolved" | "ignored";
|
|
44
44
|
count: number;
|
|
45
45
|
firstSeenAt: Date;
|
|
46
46
|
lastSeenAt: Date;
|
|
@@ -54,14 +54,14 @@ declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
54
54
|
}>;
|
|
55
55
|
}, {}, {
|
|
56
56
|
group: {
|
|
57
|
-
status: "active" | "resolved" | "ignored";
|
|
58
|
-
path: string;
|
|
59
57
|
id: number;
|
|
60
58
|
fingerprint: string;
|
|
61
59
|
name: string;
|
|
62
60
|
message: string;
|
|
61
|
+
path: string;
|
|
63
62
|
method: string;
|
|
64
63
|
statusCode: number;
|
|
64
|
+
status: "active" | "resolved" | "ignored";
|
|
65
65
|
count: number;
|
|
66
66
|
firstSeenAt: Date;
|
|
67
67
|
lastSeenAt: Date;
|
|
@@ -70,15 +70,15 @@ declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
70
70
|
updatedAt: Date;
|
|
71
71
|
};
|
|
72
72
|
events: {
|
|
73
|
-
query: Record<string, string> | null;
|
|
74
73
|
id: number;
|
|
75
74
|
statusCode: number;
|
|
76
75
|
createdAt: Date;
|
|
77
76
|
updatedAt: Date;
|
|
78
|
-
|
|
77
|
+
query: Record<string, string> | null;
|
|
79
78
|
groupId: number;
|
|
80
79
|
requestId: string | null;
|
|
81
80
|
userId: string | null;
|
|
81
|
+
headers: Record<string, string> | null;
|
|
82
82
|
stackTrace: string | null;
|
|
83
83
|
metadata: Record<string, unknown> | null;
|
|
84
84
|
}[];
|
|
@@ -91,14 +91,14 @@ declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
91
91
|
status: _sinclair_typebox.TString;
|
|
92
92
|
}>;
|
|
93
93
|
}, {}, {
|
|
94
|
-
status: "active" | "resolved" | "ignored";
|
|
95
|
-
path: string;
|
|
96
94
|
id: number;
|
|
97
95
|
fingerprint: string;
|
|
98
96
|
name: string;
|
|
99
97
|
message: string;
|
|
98
|
+
path: string;
|
|
100
99
|
method: string;
|
|
101
100
|
statusCode: number;
|
|
101
|
+
status: "active" | "resolved" | "ignored";
|
|
102
102
|
count: number;
|
|
103
103
|
firstSeenAt: Date;
|
|
104
104
|
lastSeenAt: Date;
|
|
@@ -115,15 +115,15 @@ declare const monitorApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
|
|
|
115
115
|
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
116
116
|
}>;
|
|
117
117
|
}, {}, {
|
|
118
|
-
query: Record<string, string> | null;
|
|
119
118
|
id: number;
|
|
120
119
|
statusCode: number;
|
|
121
120
|
createdAt: Date;
|
|
122
121
|
updatedAt: Date;
|
|
123
|
-
|
|
122
|
+
query: Record<string, string> | null;
|
|
124
123
|
groupId: number;
|
|
125
124
|
requestId: string | null;
|
|
126
125
|
userId: string | null;
|
|
126
|
+
headers: Record<string, string> | null;
|
|
127
127
|
stackTrace: string | null;
|
|
128
128
|
metadata: Record<string, unknown> | null;
|
|
129
129
|
}[]>;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ErrorGroupStatus, c as ErrorGroup, N as NewErrorGroup, L as LogLevel, d as NewLog, e as Log } from './index-
|
|
2
|
-
export { a as ERROR_GROUP_STATUSES, b as LOG_LEVELS, M as MonitorStats, f as errorGroups, g as getMonitorStats, l as logs, m as monitorRouter } from './index-
|
|
1
|
+
import { E as ErrorGroupStatus, c as ErrorGroup, N as NewErrorGroup, L as LogLevel, d as NewLog, e as Log } from './index-BiN0PoSx.js';
|
|
2
|
+
export { a as ERROR_GROUP_STATUSES, b as LOG_LEVELS, M as MonitorStats, f as errorGroups, g as getMonitorStats, l as logs, m as monitorRouter } from './index-BiN0PoSx.js';
|
|
3
3
|
import { BaseRepository } from '@spfn/core/db';
|
|
4
4
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
5
5
|
import * as _spfn_core_logger from '@spfn/core/logger';
|
package/dist/server.js
CHANGED
|
@@ -963,14 +963,14 @@ function Number2(options) {
|
|
|
963
963
|
}
|
|
964
964
|
|
|
965
965
|
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
|
|
966
|
-
function
|
|
966
|
+
function String2(options) {
|
|
967
967
|
return CreateType({ [Kind]: "String", type: "string" }, options);
|
|
968
968
|
}
|
|
969
969
|
|
|
970
970
|
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
|
|
971
971
|
function* FromUnion(syntax) {
|
|
972
972
|
const trim = syntax.trim().replace(/"|'/g, "");
|
|
973
|
-
return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield
|
|
973
|
+
return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
|
|
974
974
|
const literals = trim.split("|").map((literal) => Literal(literal.trim()));
|
|
975
975
|
return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
|
|
976
976
|
})();
|
|
@@ -1687,7 +1687,7 @@ function FromPromise2(left, right) {
|
|
|
1687
1687
|
return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !type_exports.IsPromise(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.item, right.item));
|
|
1688
1688
|
}
|
|
1689
1689
|
function RecordKey(schema) {
|
|
1690
|
-
return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ?
|
|
1690
|
+
return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ? String2() : Throw("Unknown record key pattern");
|
|
1691
1691
|
}
|
|
1692
1692
|
function RecordValue(schema) {
|
|
1693
1693
|
return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
|
|
@@ -1707,8 +1707,8 @@ function FromRecord(left, right) {
|
|
|
1707
1707
|
return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsRecord(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
|
|
1708
1708
|
}
|
|
1709
1709
|
function FromRegExp(left, right) {
|
|
1710
|
-
const L = type_exports.IsRegExp(left) ?
|
|
1711
|
-
const R = type_exports.IsRegExp(right) ?
|
|
1710
|
+
const L = type_exports.IsRegExp(left) ? String2() : left;
|
|
1711
|
+
const R = type_exports.IsRegExp(right) ? String2() : right;
|
|
1712
1712
|
return Visit3(L, R);
|
|
1713
1713
|
}
|
|
1714
1714
|
function FromStringRight(left, right) {
|
|
@@ -1937,7 +1937,7 @@ function RecordPattern(record) {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
function RecordKey2(type) {
|
|
1939
1939
|
const pattern = RecordPattern(type);
|
|
1940
|
-
return pattern === PatternStringExact ?
|
|
1940
|
+
return pattern === PatternStringExact ? String2() : pattern === PatternNumberExact ? Number2() : String2({ pattern });
|
|
1941
1941
|
}
|
|
1942
1942
|
function RecordValue2(type) {
|
|
1943
1943
|
return type.patternProperties[RecordPattern(type)];
|
|
@@ -2606,7 +2606,7 @@ __export(type_exports2, {
|
|
|
2606
2606
|
Required: () => Required,
|
|
2607
2607
|
Rest: () => Rest,
|
|
2608
2608
|
ReturnType: () => ReturnType,
|
|
2609
|
-
String: () =>
|
|
2609
|
+
String: () => String2,
|
|
2610
2610
|
Symbol: () => Symbol2,
|
|
2611
2611
|
TemplateLiteral: () => TemplateLiteral,
|
|
2612
2612
|
Transform: () => Transform,
|
|
@@ -3302,7 +3302,7 @@ function createMonitorErrorHandler(options = {}) {
|
|
|
3302
3302
|
path: ctx.path,
|
|
3303
3303
|
method: ctx.method,
|
|
3304
3304
|
requestId: ctx.requestId,
|
|
3305
|
-
userId: ctx.userId,
|
|
3305
|
+
userId: ctx.userId != null ? String(ctx.userId) : void 0,
|
|
3306
3306
|
headers: ctx.request.headers,
|
|
3307
3307
|
query: ctx.request.query,
|
|
3308
3308
|
environment: options.environment
|