bugstash 0.1.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/index.cjs +5156 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +112 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +5119 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { LogEntry, NetworkEntry, ErrorEntry, Breadcrumb, PerformanceMetrics, AuthUser, APIResponse, AuthTokens, AnnotationShape, BugStashConfig } from './types';
|
|
2
|
+
export { APIResponse, AnnotationShape, AuthTokens, AuthUser, Breadcrumb, BugReport, BugStashConfig, DuplicateMatch, ErrorEntry, Integration, IntegrationType, LivePin, LogEntry, Member, NetworkEntry, OrgBranding, Organization, PerformanceMetrics, PinComment, PlanLimits, Project, QuotaStatus, ReportContext, SourceMap, TwoFactorSetup, TwoFactorStatus, Webhook, WebhookEvent } from './types';
|
|
3
|
+
|
|
4
|
+
declare function setTheme(themeId: string): void;
|
|
5
|
+
declare function getCurrentThemeId(): string;
|
|
6
|
+
declare function setLayout(layoutId: string): void;
|
|
7
|
+
declare function getCurrentLayoutId(): string;
|
|
8
|
+
|
|
9
|
+
declare function getLogs(): LogEntry[];
|
|
10
|
+
declare function clearLogs(): void;
|
|
11
|
+
|
|
12
|
+
declare function getNetworkCaptures(): NetworkEntry[];
|
|
13
|
+
declare function getFailedNetworkCaptures(): NetworkEntry[];
|
|
14
|
+
declare function clearNetworkCaptures(): void;
|
|
15
|
+
|
|
16
|
+
declare function getErrors(): ErrorEntry[];
|
|
17
|
+
declare function clearErrors(): void;
|
|
18
|
+
|
|
19
|
+
declare function addBreadcrumb(crumb: Breadcrumb): void;
|
|
20
|
+
declare function getBreadcrumbs(): Breadcrumb[];
|
|
21
|
+
declare function clearBreadcrumbs(): void;
|
|
22
|
+
|
|
23
|
+
declare function getPerformanceMetrics(): PerformanceMetrics | null;
|
|
24
|
+
|
|
25
|
+
declare function getCurrentUser(): AuthUser | null;
|
|
26
|
+
declare function login(email: string, password: string, projectId: string): Promise<APIResponse<{
|
|
27
|
+
user: AuthUser;
|
|
28
|
+
tokens: AuthTokens;
|
|
29
|
+
}>>;
|
|
30
|
+
declare function logout(): Promise<void>;
|
|
31
|
+
|
|
32
|
+
interface BsTheme {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
preview: [string, string];
|
|
36
|
+
vars: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
declare function getThemes(): BsTheme[];
|
|
39
|
+
declare function getThemeById(id: string): BsTheme | undefined;
|
|
40
|
+
|
|
41
|
+
interface BsLayout {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
tabPosition: 'top' | 'left' | 'bottom';
|
|
46
|
+
}
|
|
47
|
+
declare function getLayouts(): BsLayout[];
|
|
48
|
+
declare function getLayoutById(id: string): BsLayout | undefined;
|
|
49
|
+
|
|
50
|
+
declare function togglePinMode(enabled?: boolean): boolean;
|
|
51
|
+
declare function isPinModeActive(): boolean;
|
|
52
|
+
|
|
53
|
+
declare function isConnected(): boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Annotation drawing tool for screenshots.
|
|
57
|
+
* Provides a canvas overlay for drawing arrows, rectangles, circles, and freehand on screenshots.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
interface AnnotationResult {
|
|
61
|
+
dataUrl: string;
|
|
62
|
+
annotations: AnnotationShape[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Opens the annotation editor overlay on a screenshot.
|
|
66
|
+
* Returns a promise that resolves when the user saves or cancels.
|
|
67
|
+
*/
|
|
68
|
+
declare function openAnnotationEditor(screenshotDataUrl: string): Promise<AnnotationResult | null>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* PII/sensitive data redaction for captured data.
|
|
72
|
+
* Masks passwords, tokens, credit cards, SSNs, emails in captured logs and network data.
|
|
73
|
+
*/
|
|
74
|
+
/** Redact sensitive data from a string. */
|
|
75
|
+
declare function redactString(input: string): string;
|
|
76
|
+
/** Redact sensitive data from serialized objects. */
|
|
77
|
+
declare function redactObject(obj: any): any;
|
|
78
|
+
|
|
79
|
+
declare const BugStash: {
|
|
80
|
+
init(options: BugStashConfig): void;
|
|
81
|
+
destroy(): void;
|
|
82
|
+
getLogs: typeof getLogs;
|
|
83
|
+
clearLogs: typeof clearLogs;
|
|
84
|
+
getNetworkCaptures: typeof getNetworkCaptures;
|
|
85
|
+
getFailedNetworkCaptures: typeof getFailedNetworkCaptures;
|
|
86
|
+
clearNetworkCaptures: typeof clearNetworkCaptures;
|
|
87
|
+
getErrors: typeof getErrors;
|
|
88
|
+
clearErrors: typeof clearErrors;
|
|
89
|
+
getBreadcrumbs: typeof getBreadcrumbs;
|
|
90
|
+
clearBreadcrumbs: typeof clearBreadcrumbs;
|
|
91
|
+
getPerformanceMetrics: typeof getPerformanceMetrics;
|
|
92
|
+
addBreadcrumb: typeof addBreadcrumb;
|
|
93
|
+
getThemes: typeof getThemes;
|
|
94
|
+
getThemeById: typeof getThemeById;
|
|
95
|
+
setTheme: typeof setTheme;
|
|
96
|
+
getCurrentThemeId: typeof getCurrentThemeId;
|
|
97
|
+
getLayouts: typeof getLayouts;
|
|
98
|
+
getLayoutById: typeof getLayoutById;
|
|
99
|
+
setLayout: typeof setLayout;
|
|
100
|
+
getCurrentLayoutId: typeof getCurrentLayoutId;
|
|
101
|
+
getCurrentUser: typeof getCurrentUser;
|
|
102
|
+
login: typeof login;
|
|
103
|
+
logout: typeof logout;
|
|
104
|
+
togglePinMode: typeof togglePinMode;
|
|
105
|
+
isPinModeActive: typeof isPinModeActive;
|
|
106
|
+
isConnected: typeof isConnected;
|
|
107
|
+
openAnnotationEditor: typeof openAnnotationEditor;
|
|
108
|
+
redactString: typeof redactString;
|
|
109
|
+
redactObject: typeof redactObject;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { type AnnotationResult, BugStash, BugStash as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { LogEntry, NetworkEntry, ErrorEntry, Breadcrumb, PerformanceMetrics, AuthUser, APIResponse, AuthTokens, AnnotationShape, BugStashConfig } from './types';
|
|
2
|
+
export { APIResponse, AnnotationShape, AuthTokens, AuthUser, Breadcrumb, BugReport, BugStashConfig, DuplicateMatch, ErrorEntry, Integration, IntegrationType, LivePin, LogEntry, Member, NetworkEntry, OrgBranding, Organization, PerformanceMetrics, PinComment, PlanLimits, Project, QuotaStatus, ReportContext, SourceMap, TwoFactorSetup, TwoFactorStatus, Webhook, WebhookEvent } from './types';
|
|
3
|
+
|
|
4
|
+
declare function setTheme(themeId: string): void;
|
|
5
|
+
declare function getCurrentThemeId(): string;
|
|
6
|
+
declare function setLayout(layoutId: string): void;
|
|
7
|
+
declare function getCurrentLayoutId(): string;
|
|
8
|
+
|
|
9
|
+
declare function getLogs(): LogEntry[];
|
|
10
|
+
declare function clearLogs(): void;
|
|
11
|
+
|
|
12
|
+
declare function getNetworkCaptures(): NetworkEntry[];
|
|
13
|
+
declare function getFailedNetworkCaptures(): NetworkEntry[];
|
|
14
|
+
declare function clearNetworkCaptures(): void;
|
|
15
|
+
|
|
16
|
+
declare function getErrors(): ErrorEntry[];
|
|
17
|
+
declare function clearErrors(): void;
|
|
18
|
+
|
|
19
|
+
declare function addBreadcrumb(crumb: Breadcrumb): void;
|
|
20
|
+
declare function getBreadcrumbs(): Breadcrumb[];
|
|
21
|
+
declare function clearBreadcrumbs(): void;
|
|
22
|
+
|
|
23
|
+
declare function getPerformanceMetrics(): PerformanceMetrics | null;
|
|
24
|
+
|
|
25
|
+
declare function getCurrentUser(): AuthUser | null;
|
|
26
|
+
declare function login(email: string, password: string, projectId: string): Promise<APIResponse<{
|
|
27
|
+
user: AuthUser;
|
|
28
|
+
tokens: AuthTokens;
|
|
29
|
+
}>>;
|
|
30
|
+
declare function logout(): Promise<void>;
|
|
31
|
+
|
|
32
|
+
interface BsTheme {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
preview: [string, string];
|
|
36
|
+
vars: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
declare function getThemes(): BsTheme[];
|
|
39
|
+
declare function getThemeById(id: string): BsTheme | undefined;
|
|
40
|
+
|
|
41
|
+
interface BsLayout {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
tabPosition: 'top' | 'left' | 'bottom';
|
|
46
|
+
}
|
|
47
|
+
declare function getLayouts(): BsLayout[];
|
|
48
|
+
declare function getLayoutById(id: string): BsLayout | undefined;
|
|
49
|
+
|
|
50
|
+
declare function togglePinMode(enabled?: boolean): boolean;
|
|
51
|
+
declare function isPinModeActive(): boolean;
|
|
52
|
+
|
|
53
|
+
declare function isConnected(): boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Annotation drawing tool for screenshots.
|
|
57
|
+
* Provides a canvas overlay for drawing arrows, rectangles, circles, and freehand on screenshots.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
interface AnnotationResult {
|
|
61
|
+
dataUrl: string;
|
|
62
|
+
annotations: AnnotationShape[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Opens the annotation editor overlay on a screenshot.
|
|
66
|
+
* Returns a promise that resolves when the user saves or cancels.
|
|
67
|
+
*/
|
|
68
|
+
declare function openAnnotationEditor(screenshotDataUrl: string): Promise<AnnotationResult | null>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* PII/sensitive data redaction for captured data.
|
|
72
|
+
* Masks passwords, tokens, credit cards, SSNs, emails in captured logs and network data.
|
|
73
|
+
*/
|
|
74
|
+
/** Redact sensitive data from a string. */
|
|
75
|
+
declare function redactString(input: string): string;
|
|
76
|
+
/** Redact sensitive data from serialized objects. */
|
|
77
|
+
declare function redactObject(obj: any): any;
|
|
78
|
+
|
|
79
|
+
declare const BugStash: {
|
|
80
|
+
init(options: BugStashConfig): void;
|
|
81
|
+
destroy(): void;
|
|
82
|
+
getLogs: typeof getLogs;
|
|
83
|
+
clearLogs: typeof clearLogs;
|
|
84
|
+
getNetworkCaptures: typeof getNetworkCaptures;
|
|
85
|
+
getFailedNetworkCaptures: typeof getFailedNetworkCaptures;
|
|
86
|
+
clearNetworkCaptures: typeof clearNetworkCaptures;
|
|
87
|
+
getErrors: typeof getErrors;
|
|
88
|
+
clearErrors: typeof clearErrors;
|
|
89
|
+
getBreadcrumbs: typeof getBreadcrumbs;
|
|
90
|
+
clearBreadcrumbs: typeof clearBreadcrumbs;
|
|
91
|
+
getPerformanceMetrics: typeof getPerformanceMetrics;
|
|
92
|
+
addBreadcrumb: typeof addBreadcrumb;
|
|
93
|
+
getThemes: typeof getThemes;
|
|
94
|
+
getThemeById: typeof getThemeById;
|
|
95
|
+
setTheme: typeof setTheme;
|
|
96
|
+
getCurrentThemeId: typeof getCurrentThemeId;
|
|
97
|
+
getLayouts: typeof getLayouts;
|
|
98
|
+
getLayoutById: typeof getLayoutById;
|
|
99
|
+
setLayout: typeof setLayout;
|
|
100
|
+
getCurrentLayoutId: typeof getCurrentLayoutId;
|
|
101
|
+
getCurrentUser: typeof getCurrentUser;
|
|
102
|
+
login: typeof login;
|
|
103
|
+
logout: typeof logout;
|
|
104
|
+
togglePinMode: typeof togglePinMode;
|
|
105
|
+
isPinModeActive: typeof isPinModeActive;
|
|
106
|
+
isConnected: typeof isConnected;
|
|
107
|
+
openAnnotationEditor: typeof openAnnotationEditor;
|
|
108
|
+
redactString: typeof redactString;
|
|
109
|
+
redactObject: typeof redactObject;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { type AnnotationResult, BugStash, BugStash as default };
|