@ttt-productions/monitoring-core 0.13.3 → 0.13.4
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/capture-context.d.ts +19 -6
- package/dist/capture-context.d.ts.map +1 -1
- package/dist/capture-context.js +28 -6
- package/dist/capture-context.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,21 +2,34 @@
|
|
|
2
2
|
* Capture-context application — the one place that decides how a capture's
|
|
3
3
|
* context argument lands on a Sentry scope.
|
|
4
4
|
*
|
|
5
|
-
* Context keys become EXTRAS, with
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Context keys become EXTRAS, with two exceptions — the keys call sites pass
|
|
6
|
+
* meaning a FIRST-CLASS Sentry field rather than a free-form attachment:
|
|
7
|
+
*
|
|
8
|
+
* - `tags`, a flat string map, is applied as REAL Sentry tags
|
|
9
|
+
* (`scope.setTag`), so those values are searchable, filterable, and
|
|
10
|
+
* alert-routable;
|
|
11
|
+
* - `level`, one of the severity names, is applied as the capture's REAL
|
|
12
|
+
* severity (`scope.setLevel`), so a call site asking for `warning` is not
|
|
13
|
+
* reported as an error.
|
|
14
|
+
*
|
|
15
|
+
* Both are all-or-nothing: a value that does not fit the shape (a `tags` map
|
|
16
|
+
* with a non-string value, an unrecognized `level`) stays an ordinary extra, so
|
|
17
|
+
* nothing is ever dropped. A scope that cannot honour the field (no `setLevel`)
|
|
18
|
+
* also falls back to the extra.
|
|
10
19
|
*/
|
|
20
|
+
import type { MonitoringLevel } from "./types.js";
|
|
11
21
|
/**
|
|
12
22
|
* Narrow an arbitrary value to a flat `Record<string, string>`, or `null` when
|
|
13
23
|
* it is not one. An empty object qualifies (it carries no tags and no
|
|
14
24
|
* information, so it yields neither a tag nor an extra).
|
|
15
25
|
*/
|
|
16
26
|
export declare function asFlatStringTagMap(value: unknown): Record<string, string> | null;
|
|
27
|
+
/** Narrow a value to a monitoring severity name, or `null` when it is not one. */
|
|
28
|
+
export declare function asMonitoringLevel(value: unknown): MonitoringLevel | null;
|
|
17
29
|
/**
|
|
18
30
|
* Apply a capture context to a scope: real tags for a flat-string-map `tags`
|
|
19
|
-
* entry,
|
|
31
|
+
* entry, the real severity for a recognized `level`, extras for everything else.
|
|
32
|
+
* Tolerates a scope missing any of the methods.
|
|
20
33
|
*/
|
|
21
34
|
export declare function applyCaptureContext(scope: unknown, context: Record<string, unknown>): void;
|
|
22
35
|
//# sourceMappingURL=capture-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-context.d.ts","sourceRoot":"","sources":["../src/capture-context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capture-context.d.ts","sourceRoot":"","sources":["../src/capture-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAShF;AAID,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAExE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CA0B1F"}
|
package/dist/capture-context.js
CHANGED
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
* Capture-context application — the one place that decides how a capture's
|
|
3
3
|
* context argument lands on a Sentry scope.
|
|
4
4
|
*
|
|
5
|
-
* Context keys become EXTRAS, with
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Context keys become EXTRAS, with two exceptions — the keys call sites pass
|
|
6
|
+
* meaning a FIRST-CLASS Sentry field rather than a free-form attachment:
|
|
7
|
+
*
|
|
8
|
+
* - `tags`, a flat string map, is applied as REAL Sentry tags
|
|
9
|
+
* (`scope.setTag`), so those values are searchable, filterable, and
|
|
10
|
+
* alert-routable;
|
|
11
|
+
* - `level`, one of the severity names, is applied as the capture's REAL
|
|
12
|
+
* severity (`scope.setLevel`), so a call site asking for `warning` is not
|
|
13
|
+
* reported as an error.
|
|
14
|
+
*
|
|
15
|
+
* Both are all-or-nothing: a value that does not fit the shape (a `tags` map
|
|
16
|
+
* with a non-string value, an unrecognized `level`) stays an ordinary extra, so
|
|
17
|
+
* nothing is ever dropped. A scope that cannot honour the field (no `setLevel`)
|
|
18
|
+
* also falls back to the extra.
|
|
10
19
|
*/
|
|
11
20
|
/**
|
|
12
21
|
* Narrow an arbitrary value to a flat `Record<string, string>`, or `null` when
|
|
@@ -24,9 +33,15 @@ export function asFlatStringTagMap(value) {
|
|
|
24
33
|
}
|
|
25
34
|
return out;
|
|
26
35
|
}
|
|
36
|
+
const MONITORING_LEVELS = ["fatal", "error", "warning", "info", "debug"];
|
|
37
|
+
/** Narrow a value to a monitoring severity name, or `null` when it is not one. */
|
|
38
|
+
export function asMonitoringLevel(value) {
|
|
39
|
+
return typeof value === "string" && MONITORING_LEVELS.includes(value) ? value : null;
|
|
40
|
+
}
|
|
27
41
|
/**
|
|
28
42
|
* Apply a capture context to a scope: real tags for a flat-string-map `tags`
|
|
29
|
-
* entry,
|
|
43
|
+
* entry, the real severity for a recognized `level`, extras for everything else.
|
|
44
|
+
* Tolerates a scope missing any of the methods.
|
|
30
45
|
*/
|
|
31
46
|
export function applyCaptureContext(scope, context) {
|
|
32
47
|
const target = scope;
|
|
@@ -42,6 +57,13 @@ export function applyCaptureContext(scope, context) {
|
|
|
42
57
|
continue;
|
|
43
58
|
}
|
|
44
59
|
}
|
|
60
|
+
if (key === "level") {
|
|
61
|
+
const level = asMonitoringLevel(value);
|
|
62
|
+
if (level && typeof target?.setLevel === "function") {
|
|
63
|
+
target.setLevel(level);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
45
67
|
if (typeof target?.setExtra === "function")
|
|
46
68
|
target.setExtra(key, value);
|
|
47
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-context.js","sourceRoot":"","sources":["../src/capture-context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capture-context.js","sourceRoot":"","sources":["../src/capture-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAErF,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC5E,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3C,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,iBAAiB,GAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5F,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAyB,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5G,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc,EAAE,OAAgC;IAClF,MAAM,MAAM,GAAG,KAA8C,CAAC;IAE9D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnD,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;YACnB,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,OAAO,MAAM,EAAE,MAAM,KAAK,UAAU,EAAE,CAAC;oBACzC,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;wBACxD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;oBAClC,CAAC;gBACH,CAAC;gBACD,SAAS;YACX,CAAC;QACH,CAAC;QAED,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;YACpB,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACvC,IAAI,KAAK,IAAI,OAAO,MAAM,EAAE,QAAQ,KAAK,UAAU,EAAE,CAAC;gBACpD,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACvB,SAAS;YACX,CAAC;QACH,CAAC;QAED,IAAI,OAAO,MAAM,EAAE,QAAQ,KAAK,UAAU;YAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC","sourcesContent":["/**\n * Capture-context application — the one place that decides how a capture's\n * context argument lands on a Sentry scope.\n *\n * Context keys become EXTRAS, with two exceptions — the keys call sites pass\n * meaning a FIRST-CLASS Sentry field rather than a free-form attachment:\n *\n * - `tags`, a flat string map, is applied as REAL Sentry tags\n * (`scope.setTag`), so those values are searchable, filterable, and\n * alert-routable;\n * - `level`, one of the severity names, is applied as the capture's REAL\n * severity (`scope.setLevel`), so a call site asking for `warning` is not\n * reported as an error.\n *\n * Both are all-or-nothing: a value that does not fit the shape (a `tags` map\n * with a non-string value, an unrecognized `level`) stays an ordinary extra, so\n * nothing is ever dropped. A scope that cannot honour the field (no `setLevel`)\n * also falls back to the extra.\n */\n\nimport type { MonitoringLevel, ScopeLike } from \"./types.js\";\n\n/**\n * Narrow an arbitrary value to a flat `Record<string, string>`, or `null` when\n * it is not one. An empty object qualifies (it carries no tags and no\n * information, so it yields neither a tag nor an extra).\n */\nexport function asFlatStringTagMap(value: unknown): Record<string, string> | null {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return null;\n\n const out: Record<string, string> = {};\n for (const [key, entry] of Object.entries(value as Record<string, unknown>)) {\n if (typeof entry !== \"string\") return null;\n out[key] = entry;\n }\n return out;\n}\n\nconst MONITORING_LEVELS: readonly string[] = [\"fatal\", \"error\", \"warning\", \"info\", \"debug\"];\n\n/** Narrow a value to a monitoring severity name, or `null` when it is not one. */\nexport function asMonitoringLevel(value: unknown): MonitoringLevel | null {\n return typeof value === \"string\" && MONITORING_LEVELS.includes(value) ? (value as MonitoringLevel) : null;\n}\n\n/**\n * Apply a capture context to a scope: real tags for a flat-string-map `tags`\n * entry, the real severity for a recognized `level`, extras for everything else.\n * Tolerates a scope missing any of the methods.\n */\nexport function applyCaptureContext(scope: unknown, context: Record<string, unknown>): void {\n const target = scope as Partial<ScopeLike> | null | undefined;\n\n for (const [key, value] of Object.entries(context)) {\n if (key === \"tags\") {\n const tagMap = asFlatStringTagMap(value);\n if (tagMap) {\n if (typeof target?.setTag === \"function\") {\n for (const [tagKey, tagValue] of Object.entries(tagMap)) {\n target.setTag(tagKey, tagValue);\n }\n }\n continue;\n }\n }\n\n if (key === \"level\") {\n const level = asMonitoringLevel(value);\n if (level && typeof target?.setLevel === \"function\") {\n target.setLevel(level);\n continue;\n }\n }\n\n if (typeof target?.setExtra === \"function\") target.setExtra(key, value);\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { MonitoringInitOptions, MonitoringUser, MonitoringProvider, ScopeLike } from "./types.js";
|
|
1
|
+
export type { MonitoringInitOptions, MonitoringUser, MonitoringProvider, MonitoringLevel, ScopeLike } from "./types.js";
|
|
2
2
|
export type { MonitoringAdapter } from "./adapter.js";
|
|
3
3
|
export { initMonitoring, getMonitoringAdapter, setMonitoringAdapter, resetMonitoringAdapter } from "./init.js";
|
|
4
4
|
export { captureException, captureMessage, setUser, setTag, withScope, addBreadcrumb } from "./api.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACxH,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvG,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,WAAW,EACX,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,mBAAmB,EACnB,SAAS,EACT,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASvG,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,WAAW,EACX,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export type { MonitoringInitOptions, MonitoringUser, MonitoringProvider, ScopeLike } from \"./types.js\";\nexport type { MonitoringAdapter } from \"./adapter.js\";\n\nexport { initMonitoring, getMonitoringAdapter, setMonitoringAdapter, resetMonitoringAdapter } from \"./init.js\";\nexport { captureException, captureMessage, setUser, setTag, withScope, addBreadcrumb } from \"./api.js\";\n\nexport type {\n ForbiddenPattern,\n RedactStringOptions,\n ScrubbableEvent,\n TelemetryScrubberOptions,\n BeforeSendHook,\n} from \"./scrubber.js\";\nexport {\n REDACTION_PLACEHOLDER,\n DEFAULT_FORBIDDEN_PATTERNS,\n redactString,\n redactEvent,\n createTelemetryScrubber,\n} from \"./scrubber.js\";\n\nexport type {\n DefaultSafeEventKey,\n SafeEvent,\n BuildSafeEventOptions,\n} from \"./safe-event.js\";\nexport { DEFAULT_SAFE_EVENT_KEYS, buildSafeEvent } from \"./safe-event.js\";"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASvG,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,WAAW,EACX,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export type { MonitoringInitOptions, MonitoringUser, MonitoringProvider, MonitoringLevel, ScopeLike } from \"./types.js\";\nexport type { MonitoringAdapter } from \"./adapter.js\";\n\nexport { initMonitoring, getMonitoringAdapter, setMonitoringAdapter, resetMonitoringAdapter } from \"./init.js\";\nexport { captureException, captureMessage, setUser, setTag, withScope, addBreadcrumb } from \"./api.js\";\n\nexport type {\n ForbiddenPattern,\n RedactStringOptions,\n ScrubbableEvent,\n TelemetryScrubberOptions,\n BeforeSendHook,\n} from \"./scrubber.js\";\nexport {\n REDACTION_PLACEHOLDER,\n DEFAULT_FORBIDDEN_PATTERNS,\n redactString,\n redactEvent,\n createTelemetryScrubber,\n} from \"./scrubber.js\";\n\nexport type {\n DefaultSafeEventKey,\n SafeEvent,\n BuildSafeEventOptions,\n} from \"./safe-event.js\";\nexport { DEFAULT_SAFE_EVENT_KEYS, buildSafeEvent } from \"./safe-event.js\";"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -19,10 +19,15 @@ export type MonitoringUser = {
|
|
|
19
19
|
username?: string;
|
|
20
20
|
ip_address?: string;
|
|
21
21
|
};
|
|
22
|
+
/** The severity names every provider in this package understands. */
|
|
23
|
+
export type MonitoringLevel = "fatal" | "error" | "warning" | "info" | "debug";
|
|
22
24
|
export type ScopeLike = {
|
|
23
25
|
setTag: (key: string, value: string) => void;
|
|
24
26
|
setUser: (user: MonitoringUser | null) => void;
|
|
25
27
|
setExtra: (key: string, value: unknown) => void;
|
|
26
28
|
setContext: (key: string, context: Record<string, unknown>) => void;
|
|
29
|
+
/** Optional: real Sentry scopes have it, the noop/minimal scopes may not. A capture
|
|
30
|
+
* context's `level` is applied through this when present (see capture-context.ts). */
|
|
31
|
+
setLevel?: (level: MonitoringLevel) => void;
|
|
27
32
|
};
|
|
28
33
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;4CACwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;iGAE6F;IAC7F,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;4CACwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;iGAE6F;IAC7F,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,qEAAqE;AACrE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/E,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpE;2FACuF;IACvF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC7C,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MonitoringProvider = \"sentry\" | \"sentry-node\" | \"noop\";\n\nexport type MonitoringInitOptions = {\n provider: MonitoringProvider;\n dsn?: string;\n environment?: string;\n enabled?: boolean; // default true\n release?: string;\n /** Performance-trace sample rate (0–1), passed through to the provider's init.\n * Omit to use the provider default. */\n tracesSampleRate?: number;\n /** Provider integrations passed through to the SDK init — e.g. `[]` to disable the\n * default auto-integrations and keep init lightweight (the consuming app's Cloud\n * Functions bootstrap does this). Typed loosely: it is a provider-specific pass-through. */\n integrations?: unknown[];\n};\n\nexport type MonitoringUser = {\n id?: string;\n email?: string;\n username?: string;\n ip_address?: string;\n};\n\nexport type ScopeLike = {\n setTag: (key: string, value: string) => void;\n setUser: (user: MonitoringUser | null) => void;\n setExtra: (key: string, value: unknown) => void;\n setContext: (key: string, context: Record<string, unknown>) => void;\n};"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MonitoringProvider = \"sentry\" | \"sentry-node\" | \"noop\";\n\nexport type MonitoringInitOptions = {\n provider: MonitoringProvider;\n dsn?: string;\n environment?: string;\n enabled?: boolean; // default true\n release?: string;\n /** Performance-trace sample rate (0–1), passed through to the provider's init.\n * Omit to use the provider default. */\n tracesSampleRate?: number;\n /** Provider integrations passed through to the SDK init — e.g. `[]` to disable the\n * default auto-integrations and keep init lightweight (the consuming app's Cloud\n * Functions bootstrap does this). Typed loosely: it is a provider-specific pass-through. */\n integrations?: unknown[];\n};\n\nexport type MonitoringUser = {\n id?: string;\n email?: string;\n username?: string;\n ip_address?: string;\n};\n\n/** The severity names every provider in this package understands. */\nexport type MonitoringLevel = \"fatal\" | \"error\" | \"warning\" | \"info\" | \"debug\";\n\nexport type ScopeLike = {\n setTag: (key: string, value: string) => void;\n setUser: (user: MonitoringUser | null) => void;\n setExtra: (key: string, value: unknown) => void;\n setContext: (key: string, context: Record<string, unknown>) => void;\n /** Optional: real Sentry scopes have it, the noop/minimal scopes may not. A capture\n * context's `level` is applied through this when present (see capture-context.ts). */\n setLevel?: (level: MonitoringLevel) => void;\n};"]}
|