@flareapp/js 2.1.0 → 2.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/README.md +5 -0
- package/dist/index.cjs +115 -556
- package/dist/index.d.cts +6 -123
- package/dist/index.d.mts +6 -123
- package/dist/index.mjs +68 -525
- package/package.json +6 -2
- package/CHANGELOG.md +0 -33
- package/tsconfig.json +0 -4
package/CHANGELOG.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
## 2.0.0
|
|
2
|
-
|
|
3
|
-
### Breaking changes
|
|
4
|
-
|
|
5
|
-
- **Endpoint changed.** SDK now POSTs to `https://ingress.flareapp.io/v1/errors`. Success response is `201 Created`. Auth header is `x-api-token`.
|
|
6
|
-
- **Wire format reshaped to match the server's canonical schema.**
|
|
7
|
-
- `Report` uses camelCase top-level fields (`exceptionClass`, `seenAtUnixNano`, `sourcemapVersionId`, `isLog`, `level`, `attributes`, `events`).
|
|
8
|
-
- `StackFrame` uses camelCase (`lineNumber`, `columnNumber`, `codeSnippet`, `isApplicationFrame`).
|
|
9
|
-
- `Context` is gone. User context is set via `addContext(name, value)` and `addContextGroup(group, value)`; both write into the flat `attributes` map under `context.custom` and `context.<group>`.
|
|
10
|
-
- Glows ride along as `php_glow`-typed entries in `events[]`.
|
|
11
|
-
- **`report()` second argument** is now an `Attributes` map (was a freeform context object). The third argument (solution provider parameters) is removed.
|
|
12
|
-
- **Config keys renamed:** `reportingUrl` → `ingestUrl`, `sourcemapVersion` → `sourcemapVersionId`.
|
|
13
|
-
- **Deprecated trailing setters removed:** `flare.beforeEvaluate = …`, `flare.beforeSubmit = …`, `flare.stage = …`. Use `flare.configure({ … })`.
|
|
14
|
-
- **`reportMessage` signature changed:** `reportMessage(message, level?, attributes?)`. The old `'Log INFO'` regex is gone, pass `level` directly.
|
|
15
|
-
- **Solutions API removed:** `registerSolutionProvider`, `Solution`, `SolutionProvider`, `SolutionProviderExtraParameters` are all deleted.
|
|
16
|
-
- **`flare.config` is now `Readonly<Config>`** and `flare.glows` is `readonly Glow[]`. Direct property mutation no longer works; use `configure()`.
|
|
17
|
-
|
|
18
|
-
### New
|
|
19
|
-
|
|
20
|
-
- **URL redaction.** Sensitive query-string parameters (`password`, `token`, `secret`, `authorization`, etc.) are automatically replaced with `[redacted]` in `url.full`, `url.query`, and `flare.entry_point.value` attributes. Configurable via `urlDenylist` (custom regex) and `replaceDefaultUrlDenylist` (boolean) config options.
|
|
21
|
-
- `DEFAULT_URL_DENYLIST`, `redactFullPath`, and `resolveDenylist` are exported for direct use by framework adapters.
|
|
22
|
-
- `setEntryPoint({ identifier?, name?, type? })` — mutable global setter for the entry-point handler. SPA framework adapters call this on every navigation.
|
|
23
|
-
- `setSdkInfo({ name, version })` — overridable SDK identity (default `@flareapp/js` + client version). Integrations override it.
|
|
24
|
-
- `setFramework({ name, version? })` — host framework attribution (e.g. React, Vue).
|
|
25
|
-
- `code` field auto-populated from `error.code` when present (string, ≤64 chars).
|
|
26
|
-
- Non-`Error` values passed to `report()` are coerced to `Error` instead of silently failing.
|
|
27
|
-
- Browser context attributes (`url.full`, `url.query`, `browser.user_agent`, `browser.viewport.*`, cookies, request data) are auto-collected on each report.
|
|
28
|
-
- New exported types: `SpanEvent`, `EntryPointHandler`, `Framework`, `SdkInfo`, `OverriddenGrouping`, `Attributes`, `AttributeValue`.
|
|
29
|
-
- **`sampleRate` config option.** Number between `0` and `1` (default `1`). Controls what fraction of errors are reported. Applies to `report()`, `reportMessage()`, and `reportUnhandledRejection()`.
|
|
30
|
-
|
|
31
|
-
### Notes
|
|
32
|
-
|
|
33
|
-
- `seenAtUnixNano` is now real nanoseconds (`Date.now() * 1_000_000`).
|
package/tsconfig.json
DELETED