@flareapp/js 2.8.0 → 2.9.0
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/browser.cjs +42 -29
- package/dist/browser.d.cts +5 -2
- package/dist/browser.d.mts +5 -2
- package/dist/browser.mjs +18 -6
- package/dist/{componentProfiler-CoH2m13n.mjs → catchWindowErrors-C0gSVGiF.mjs} +1181 -882
- package/dist/{componentProfiler-C6qY96Bt.cjs → catchWindowErrors-cR2D7kju.cjs} +1192 -887
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{spanTypes-CjF1_Uqi.d.mts → spanTypes-7-nEycOc.d.mts} +33 -39
- package/dist/{spanTypes-iA1RdfLw.d.cts → spanTypes-TMgJEZ7G.d.cts} +32 -38
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_catchWindowErrors = require('./catchWindowErrors-cR2D7kju.cjs');
|
|
3
3
|
const require_browser = require('./browser.cjs');
|
|
4
4
|
let _flareapp_core = require("@flareapp/core");
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ let _flareapp_core = require("@flareapp/core");
|
|
|
7
7
|
const flare = new require_browser.Flare();
|
|
8
8
|
if (typeof window !== "undefined" && window) {
|
|
9
9
|
window.flare = flare;
|
|
10
|
-
|
|
10
|
+
require_catchWindowErrors.catchWindowErrors();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
@@ -54,7 +54,7 @@ Object.defineProperty(exports, 'convertToError', {
|
|
|
54
54
|
return _flareapp_core.convertToError;
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
exports.createFlareResolver =
|
|
57
|
+
exports.createFlareResolver = require_catchWindowErrors.createFlareResolver;
|
|
58
58
|
exports.flare = flare;
|
|
59
59
|
Object.defineProperty(exports, 'redactFullPath', {
|
|
60
60
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as createFlareResolver } from "./spanTypes-TMgJEZ7G.cjs";
|
|
2
2
|
import { Flare } from "./browser.cjs";
|
|
3
3
|
import { AttributeValue, Attributes, Config, ContextCollector, DEFAULT_URL_DENYLIST, EntryPointHandler, FileReader, FlushFn, FlushScheduler, Framework, FrameworkName, GlobalScopeProvider, Glow, Logger, MessageLevel, NullFileReader, OverriddenGrouping, Report, Scope, ScopeProvider, SdkInfo, SpanEvent, StackFrame, User, convertToError, redactObjectValues, redactUrlQuery, redactUrlQuery as redactFullPath, resolveDenylist, toCustomContext } from "@flareapp/core";
|
|
4
4
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as createFlareResolver } from "./spanTypes-7-nEycOc.mjs";
|
|
2
2
|
import { Flare } from "./browser.mjs";
|
|
3
3
|
import { AttributeValue, Attributes, Config, ContextCollector, DEFAULT_URL_DENYLIST, EntryPointHandler, FileReader, FlushFn, FlushScheduler, Framework, FrameworkName, GlobalScopeProvider, Glow, Logger, MessageLevel, NullFileReader, OverriddenGrouping, Report, Scope, ScopeProvider, SdkInfo, SpanEvent, StackFrame, User, convertToError, redactObjectValues, redactUrlQuery, redactUrlQuery as redactFullPath, resolveDenylist, toCustomContext } from "@flareapp/core";
|
|
4
4
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as createFlareResolver, t as catchWindowErrors } from "./catchWindowErrors-C0gSVGiF.mjs";
|
|
2
2
|
import { Flare } from "./browser.mjs";
|
|
3
3
|
import { DEFAULT_URL_DENYLIST, FrameworkName, GlobalScopeProvider, Logger, NullFileReader, Scope, convertToError, redactObjectValues, redactUrlQuery, redactUrlQuery as redactFullPath, resolveDenylist, toCustomContext } from "@flareapp/core";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Flare as Flare$1 } from "./browser.mjs";
|
|
2
|
-
import { Attributes, BrowserSpanType, Config, ContextCollector, FileReader, FlushFn, FlushScheduler, defaultNowNano } from "@flareapp/core";
|
|
2
|
+
import { Attributes, BrowserSpanType as BrowserSpanType$1, Config, ContextCollector, FileReader, FlushFn, FlushScheduler, defaultNowNano } from "@flareapp/core";
|
|
3
3
|
|
|
4
4
|
//#region src/createFlareResolver.d.ts
|
|
5
5
|
/**
|
|
@@ -42,15 +42,12 @@ declare class BrowserFlushScheduler implements FlushScheduler {
|
|
|
42
42
|
register(flush: FlushFn): void;
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/
|
|
45
|
+
//#region src/instrumentation/navigation/types.d.ts
|
|
46
46
|
type RouteName = {
|
|
47
47
|
name: string;
|
|
48
48
|
source: 'route' | 'url';
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* or superseded navigation reports where it ended rather than where it opened. Omit to keep the url
|
|
52
|
-
* the root started with.
|
|
53
|
-
*/
|
|
49
|
+
/** Where the navigation ends. Set on a redirect so the final url is reported; leave out to keep
|
|
50
|
+
* the url the root opened with. */
|
|
54
51
|
url?: string;
|
|
55
52
|
};
|
|
56
53
|
type NavigationSource = {
|
|
@@ -63,30 +60,42 @@ type NavigationSource = {
|
|
|
63
60
|
settleNavigation(route: RouteName): void;
|
|
64
61
|
unregister(): void;
|
|
65
62
|
};
|
|
66
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/instrumentation/navigation/utils.d.ts
|
|
67
65
|
declare function currentPath(): string;
|
|
68
|
-
|
|
69
|
-
* Prefers the router's parameterized template over the raw path, so names aggregate per route rather
|
|
70
|
-
* than per url. `derive` runs inside a try: a router that throws on an unresolved match chain falls back
|
|
71
|
-
* to the url name instead of taking the host down.
|
|
72
|
-
*/
|
|
66
|
+
declare function currentHref(): string;
|
|
73
67
|
declare function routeName(derive: () => string | undefined, fallbackPath: string, url?: string): RouteName;
|
|
74
68
|
/**
|
|
75
|
-
* `build` is the router's own href builder (vue-router
|
|
76
|
-
*
|
|
77
|
-
* `/product/p01`
|
|
69
|
+
* `build` is the router's own href builder (vue-router `resolve`, React Router `createHref`). It puts
|
|
70
|
+
* the app's base path and hash prefix back. Without it, an app served from `/app/` reports
|
|
71
|
+
* `/product/p01` instead of `/app/product/p01`. If `build` throws, we use `fallback`.
|
|
78
72
|
*/
|
|
79
|
-
declare function resolveHref(build: () => string | null | undefined,
|
|
73
|
+
declare function resolveHref(build: () => string | null | undefined, fallbackHref: string): string | undefined;
|
|
80
74
|
//#endregion
|
|
81
|
-
//#region src/
|
|
75
|
+
//#region src/instrumentation/navigation/navigationBus.d.ts
|
|
82
76
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
77
|
+
* Hands navigation to a framework router: while registered, the built-in History detection stays
|
|
78
|
+
* quiet and the router drives every step through the returned handle. The newest registration wins
|
|
79
|
+
* and a stale handle no-ops, because HMR can replace a router that still holds one.
|
|
86
80
|
*/
|
|
87
81
|
declare function registerNavigationSource(): NavigationSource;
|
|
88
82
|
//#endregion
|
|
89
|
-
//#region src/tracing/
|
|
83
|
+
//#region src/tracing/utils/absoluteHref.d.ts
|
|
84
|
+
/**
|
|
85
|
+
* Resolve a router-reported href against the page we are on. Returns the `URL`, so a caller that
|
|
86
|
+
* wants the pathname as well as the href does not parse it a second time.
|
|
87
|
+
*
|
|
88
|
+
* Undefined outside a browser or for an unparseable href, so the caller can leave its attribute alone.
|
|
89
|
+
*/
|
|
90
|
+
declare function absoluteUrl(href: string | null | undefined): URL | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The href form of `absoluteUrl`. Pass one built by the router's own `createHref`/`resolve` (see
|
|
93
|
+
* `resolveHref`), not a bare path: routers strip the app's base path, so `origin + path` yields an
|
|
94
|
+
* address the server does not have.
|
|
95
|
+
*/
|
|
96
|
+
declare function absoluteHref(href: string | null | undefined): string | undefined;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/tracing/utils/instrumentationGuard.d.ts
|
|
90
99
|
/** For a callback the host invokes: a router guard, a store subscriber, ... */
|
|
91
100
|
declare function insulate<A extends unknown[]>(fn: (...a: A) => void): (...a: A) => void;
|
|
92
101
|
/** Invoke a teardown fn now (if present), swallowing any throw. For cleanup chains. */
|
|
@@ -107,22 +116,7 @@ type TrackTeardown = (teardown: (() => void) | null | undefined) => void;
|
|
|
107
116
|
*/
|
|
108
117
|
declare function instrumentOnce<T extends object>(target: T, install: (track: TrackTeardown) => void): () => void;
|
|
109
118
|
//#endregion
|
|
110
|
-
//#region src/tracing/
|
|
111
|
-
/**
|
|
112
|
-
* Resolve a router-reported href against the page we are on. Returns the `URL`, so a caller that
|
|
113
|
-
* wants the pathname as well as the href does not parse it a second time.
|
|
114
|
-
*
|
|
115
|
-
* Undefined outside a browser or for an unparseable href, so the caller can leave its attribute alone.
|
|
116
|
-
*/
|
|
117
|
-
declare function absoluteUrl(href: string | null | undefined): URL | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* The href form of `absoluteUrl`. Pass one built by the router's own `createHref`/`resolve` (see
|
|
120
|
-
* `resolveHref`), not a bare path: routers strip the app's base path, so `origin + path` yields an
|
|
121
|
-
* address the server does not have.
|
|
122
|
-
*/
|
|
123
|
-
declare function absoluteHref(href: string | null | undefined): string | undefined;
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/tracing/componentProfiler.d.ts
|
|
119
|
+
//#region src/tracing/roots/componentProfiler.d.ts
|
|
126
120
|
type ComponentTraceContext = {
|
|
127
121
|
traceId: string;
|
|
128
122
|
parentSpanId: string;
|
|
@@ -158,4 +152,4 @@ type ComponentSpanRecord = {
|
|
|
158
152
|
*/
|
|
159
153
|
declare function recordComponentSpan(record: ComponentSpanRecord): void;
|
|
160
154
|
//#endregion
|
|
161
|
-
export {
|
|
155
|
+
export { FetchFileReader as C, createFlareResolver as E, BrowserFlushScheduler as S, catchWindowErrors as T, currentPath as _, nowNano as a, NavigationSource as b, resolveComponentParent as c, insulate as d, safeInvoke as f, currentHref as g, registerNavigationSource as h, activeComponentRoot as i, TrackTeardown as l, absoluteUrl as m, ComponentSpanRecord as n, recordComponentSpan as o, absoluteHref as p, ComponentTraceContext as r, reserveSpanId as s, BrowserSpanType$1 as t, instrumentOnce as u, resolveHref as v, collectBrowser as w, RouteName as x, routeName as y };
|
|
@@ -42,15 +42,12 @@ declare class BrowserFlushScheduler implements FlushScheduler {
|
|
|
42
42
|
register(flush: FlushFn): void;
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/
|
|
45
|
+
//#region src/instrumentation/navigation/types.d.ts
|
|
46
46
|
type RouteName = {
|
|
47
47
|
name: string;
|
|
48
48
|
source: 'route' | 'url';
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* or superseded navigation reports where it ended rather than where it opened. Omit to keep the url
|
|
52
|
-
* the root started with.
|
|
53
|
-
*/
|
|
49
|
+
/** Where the navigation ends. Set on a redirect so the final url is reported; leave out to keep
|
|
50
|
+
* the url the root opened with. */
|
|
54
51
|
url?: string;
|
|
55
52
|
};
|
|
56
53
|
type NavigationSource = {
|
|
@@ -63,30 +60,42 @@ type NavigationSource = {
|
|
|
63
60
|
settleNavigation(route: RouteName): void;
|
|
64
61
|
unregister(): void;
|
|
65
62
|
};
|
|
66
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/instrumentation/navigation/utils.d.ts
|
|
67
65
|
declare function currentPath(): string;
|
|
68
|
-
|
|
69
|
-
* Prefers the router's parameterized template over the raw path, so names aggregate per route rather
|
|
70
|
-
* than per url. `derive` runs inside a try: a router that throws on an unresolved match chain falls back
|
|
71
|
-
* to the url name instead of taking the host down.
|
|
72
|
-
*/
|
|
66
|
+
declare function currentHref(): string;
|
|
73
67
|
declare function routeName(derive: () => string | undefined, fallbackPath: string, url?: string): RouteName;
|
|
74
68
|
/**
|
|
75
|
-
* `build` is the router's own href builder (vue-router
|
|
76
|
-
*
|
|
77
|
-
* `/product/p01`
|
|
69
|
+
* `build` is the router's own href builder (vue-router `resolve`, React Router `createHref`). It puts
|
|
70
|
+
* the app's base path and hash prefix back. Without it, an app served from `/app/` reports
|
|
71
|
+
* `/product/p01` instead of `/app/product/p01`. If `build` throws, we use `fallback`.
|
|
78
72
|
*/
|
|
79
|
-
declare function resolveHref(build: () => string | null | undefined,
|
|
73
|
+
declare function resolveHref(build: () => string | null | undefined, fallbackHref: string): string | undefined;
|
|
80
74
|
//#endregion
|
|
81
|
-
//#region src/
|
|
75
|
+
//#region src/instrumentation/navigation/navigationBus.d.ts
|
|
82
76
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
77
|
+
* Hands navigation to a framework router: while registered, the built-in History detection stays
|
|
78
|
+
* quiet and the router drives every step through the returned handle. The newest registration wins
|
|
79
|
+
* and a stale handle no-ops, because HMR can replace a router that still holds one.
|
|
86
80
|
*/
|
|
87
81
|
declare function registerNavigationSource(): NavigationSource;
|
|
88
82
|
//#endregion
|
|
89
|
-
//#region src/tracing/
|
|
83
|
+
//#region src/tracing/utils/absoluteHref.d.ts
|
|
84
|
+
/**
|
|
85
|
+
* Resolve a router-reported href against the page we are on. Returns the `URL`, so a caller that
|
|
86
|
+
* wants the pathname as well as the href does not parse it a second time.
|
|
87
|
+
*
|
|
88
|
+
* Undefined outside a browser or for an unparseable href, so the caller can leave its attribute alone.
|
|
89
|
+
*/
|
|
90
|
+
declare function absoluteUrl(href: string | null | undefined): URL | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The href form of `absoluteUrl`. Pass one built by the router's own `createHref`/`resolve` (see
|
|
93
|
+
* `resolveHref`), not a bare path: routers strip the app's base path, so `origin + path` yields an
|
|
94
|
+
* address the server does not have.
|
|
95
|
+
*/
|
|
96
|
+
declare function absoluteHref(href: string | null | undefined): string | undefined;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/tracing/utils/instrumentationGuard.d.ts
|
|
90
99
|
/** For a callback the host invokes: a router guard, a store subscriber, ... */
|
|
91
100
|
declare function insulate<A extends unknown[]>(fn: (...a: A) => void): (...a: A) => void;
|
|
92
101
|
/** Invoke a teardown fn now (if present), swallowing any throw. For cleanup chains. */
|
|
@@ -107,22 +116,7 @@ type TrackTeardown = (teardown: (() => void) | null | undefined) => void;
|
|
|
107
116
|
*/
|
|
108
117
|
declare function instrumentOnce<T extends object>(target: T, install: (track: TrackTeardown) => void): () => void;
|
|
109
118
|
//#endregion
|
|
110
|
-
//#region src/tracing/
|
|
111
|
-
/**
|
|
112
|
-
* Resolve a router-reported href against the page we are on. Returns the `URL`, so a caller that
|
|
113
|
-
* wants the pathname as well as the href does not parse it a second time.
|
|
114
|
-
*
|
|
115
|
-
* Undefined outside a browser or for an unparseable href, so the caller can leave its attribute alone.
|
|
116
|
-
*/
|
|
117
|
-
declare function absoluteUrl(href: string | null | undefined): URL | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* The href form of `absoluteUrl`. Pass one built by the router's own `createHref`/`resolve` (see
|
|
120
|
-
* `resolveHref`), not a bare path: routers strip the app's base path, so `origin + path` yields an
|
|
121
|
-
* address the server does not have.
|
|
122
|
-
*/
|
|
123
|
-
declare function absoluteHref(href: string | null | undefined): string | undefined;
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/tracing/componentProfiler.d.ts
|
|
119
|
+
//#region src/tracing/roots/componentProfiler.d.ts
|
|
126
120
|
type ComponentTraceContext = {
|
|
127
121
|
traceId: string;
|
|
128
122
|
parentSpanId: string;
|
|
@@ -158,4 +152,4 @@ type ComponentSpanRecord = {
|
|
|
158
152
|
*/
|
|
159
153
|
declare function recordComponentSpan(record: ComponentSpanRecord): void;
|
|
160
154
|
//#endregion
|
|
161
|
-
export {
|
|
155
|
+
export { FetchFileReader as C, createFlareResolver as E, BrowserFlushScheduler as S, catchWindowErrors as T, currentPath as _, nowNano as a, NavigationSource as b, resolveComponentParent as c, insulate as d, safeInvoke as f, currentHref as g, registerNavigationSource as h, activeComponentRoot as i, TrackTeardown as l, absoluteUrl as m, ComponentSpanRecord as n, recordComponentSpan as o, absoluteHref as p, ComponentTraceContext as r, reserveSpanId as s, BrowserSpanType as t, instrumentOnce as u, resolveHref as v, collectBrowser as w, RouteName as x, routeName as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flareapp/js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "JavaScript client for flareapp.io",
|
|
5
5
|
"homepage": "https://flareapp.io",
|
|
6
6
|
"bugs": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"release": "release-it"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@flareapp/core": "2.
|
|
62
|
+
"@flareapp/core": "2.9.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@flareapp/test-helpers": "*",
|