File size: 2,083 Bytes
fea495a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import type { Project } from '../../../build/swc/types';
import { type StackFrame } from '../../lib/parse-stack';
type WebpackMappingContext = {
    bundler: 'webpack';
    isServer: boolean;
    isEdgeServer: boolean;
    isAppDirectory: boolean;
    clientStats: () => any;
    serverStats: () => any;
    edgeServerStats: () => any;
    rootDirectory: string;
};
type TurbopackMappingContext = {
    bundler: 'turbopack';
    isServer: boolean;
    isEdgeServer: boolean;
    isAppDirectory: boolean;
    project: Project;
    projectPath: string;
};
export type MappingContext = WebpackMappingContext | TurbopackMappingContext;
export declare function mapFramesUsingBundler(frames: StackFrame[], ctx: MappingContext): Promise<import("../../../next-devtools/server/shared").OriginalStackFramesResponse>;
export declare function getSourceMappedStackFrames(stackTrace: string, ctx: MappingContext, distDir: string, ignore?: boolean): Promise<{
    kind: "stack";
    stack: string;
    frameCode?: undefined;
    frames?: undefined;
} | {
    kind: "all-ignored";
    stack?: undefined;
    frameCode?: undefined;
    frames?: undefined;
} | {
    kind: "with-frame-code";
    frameCode: string;
    stack: string;
    frames: ({
        kind: "rejected";
        frameText: string;
        codeFrame: null;
    } | {
        kind: "success";
        frameText: string;
        codeFrame: string | null;
    })[];
} | {
    kind: "mapped-stack";
    stack: string;
    frames: ({
        kind: "rejected";
        frameText: string;
        codeFrame: null;
    } | {
        kind: "success";
        frameText: string;
        codeFrame: string | null;
    })[];
    frameCode?: undefined;
}>;
export declare const withLocation: ({ original, stack, }: {
    original: Array<any>;
    stack: string | null;
}, ctx: MappingContext, distDir: string, config: boolean | {
    logDepth?: number;
    showSourceLocation?: boolean;
}) => Promise<any[]>;
export declare const getConsoleLocation: (mapped: Awaited<ReturnType<typeof getSourceMappedStackFrames>>) => string | null;
export {};