File tree Expand file tree Collapse file tree 5 files changed +312
-44
lines changed
Expand file tree Collapse file tree 5 files changed +312
-44
lines changed Original file line number Diff line number Diff line change @@ -18,29 +18,16 @@ export function flush(telemetry: Telemetry): Promise<void>;
1818export function getTelemetry(app ? : FirebaseApp ): Telemetry ;
1919
2020// @public (undocumented)
21- export type InstrumentationOnRequestError = (error : unknown , errorRequest : Readonly <{
22- path: string ;
23- method: string ;
24- headers: NodeJS .Dict <string | string []>;
25- }>, errorContext : Readonly <RequestErrorContext >) => void | Promise <void >;
26-
27- // @public
28- export const nextOnRequestError: InstrumentationOnRequestError ;
29-
30- // @public
31- export interface RequestErrorContext {
32- // (undocumented)
33- renderSource? : ' react-server-components' | ' react-server-components-payload' | ' server-rendering' ;
21+ export namespace Instrumentation {
22+ // Warning: (ae-forgotten-export) The symbol "InstrumentationOnRequestError" needs to be exported by the entry point index.d.ts
23+ //
3424 // (undocumented)
35- revalidateReason: ' on-demand' | ' stale' | undefined ;
36- // (undocumented)
37- routePath: string ;
38- // (undocumented)
39- routerKind: ' Pages Router' | ' App Router' ;
40- // (undocumented)
41- routeType: ' render' | ' route' | ' action' | ' middleware' ;
25+ export type onRequestError = InstrumentationOnRequestError ;
4226}
4327
28+ // @public
29+ export const nextOnRequestError: Instrumentation .onRequestError ;
30+
4431// @public
4532export interface Telemetry {
4633 app: FirebaseApp ;
Original file line number Diff line number Diff line change 66 "enabled" : true ,
77 "untrimmedFilePath" : " <projectFolder>/dist/<unscopedPackageName>.d.ts" ,
88 "betaTrimmedFilePath" : " <projectFolder>/dist/<unscopedPackageName>-public.d.ts"
9- }
9+ },
10+ "bundledPackages" : [" next" ]
1011}
Original file line number Diff line number Diff line change 5858 "@firebase/app" : " 0.14.2" ,
5959 "@opentelemetry/sdk-trace-web" : " 2.1.0" ,
6060 "@rollup/plugin-json" : " 6.1.0" ,
61+ "next" : " 15.5.2" ,
6162 "rollup" : " 2.79.2" ,
6263 "rollup-plugin-replace" : " 2.2.0" ,
6364 "rollup-plugin-typescript2" : " 0.36.0" ,
Original file line number Diff line number Diff line change 1717
1818import { getApp } from '@firebase/app' ;
1919import { captureError , getTelemetry } from './api' ;
20+ // eslint-disable-next-line import/no-extraneous-dependencies
21+ import { Instrumentation } from 'next' ;
2022
21- // The following types mirror those from Next at v15.5
22- export interface RequestErrorContext {
23- routerKind : 'Pages Router' | 'App Router' ;
24- routePath : string ;
25- routeType : 'render' | 'route' | 'action' | 'middleware' ;
26- renderSource ?:
27- | 'react-server-components'
28- | 'react-server-components-payload'
29- | 'server-rendering' ;
30- revalidateReason : 'on-demand' | 'stale' | undefined ;
31- }
32- export type InstrumentationOnRequestError = (
33- error : unknown ,
34- errorRequest : Readonly < {
35- path : string ;
36- method : string ;
37- headers : NodeJS . Dict < string | string [ ] > ;
38- } > ,
39- errorContext : Readonly < RequestErrorContext >
40- ) => void | Promise < void > ;
23+ export { Instrumentation } ;
4124
4225/**
4326 * Automatically report uncaught errors from server routes to Firebase Telemetry.
@@ -50,7 +33,7 @@ export type InstrumentationOnRequestError = (
5033 *
5134 * @public
5235 */
53- export const nextOnRequestError : InstrumentationOnRequestError = async (
36+ export const nextOnRequestError : Instrumentation . onRequestError = async (
5437 error ,
5538 errorRequest ,
5639 errorContext
You can’t perform that action at this time.
0 commit comments