@birdie-so/snippet 1.1.1 → 1.1.3
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 +7 -0
- package/package.json +5 -3
- package/src/index.d.ts +26 -19
- package/src/index.js +2 -1
package/README.md
CHANGED
|
@@ -41,6 +41,13 @@ initBirdie({
|
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
|
|
44
|
+
// Optional setting to remove response bodies when collecting logs
|
|
45
|
+
settings: {
|
|
46
|
+
privacy: {
|
|
47
|
+
mask_response_body: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
|
|
44
51
|
// Optional hook once Birdie is ready
|
|
45
52
|
onReady(birdie) {
|
|
46
53
|
// you can register for the following events
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@birdie-so/snippet",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Helper for integrating the Birdie screen recording snippet into modern JavaScript apps. Requires a Birdie account.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
7
|
-
"exports": {
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.js"
|
|
9
|
+
},
|
|
8
10
|
"types": "src/index.d.ts",
|
|
9
11
|
"keywords": [
|
|
10
12
|
"birdie",
|
|
@@ -26,4 +28,4 @@
|
|
|
26
28
|
"src/",
|
|
27
29
|
"README.md"
|
|
28
30
|
]
|
|
29
|
-
}
|
|
31
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ export interface BirdieSettings {
|
|
|
23
23
|
* Re-registering the same event replaces the previous handler (prevents double fires on remount/HMR).
|
|
24
24
|
*/
|
|
25
25
|
singleHandlerPerEvent?: boolean;
|
|
26
|
+
|
|
27
|
+
settings?: {
|
|
28
|
+
privacy?: {
|
|
29
|
+
mask_response_body?: boolean;
|
|
30
|
+
};
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
// export interface BirdieAPI {
|
|
@@ -34,31 +41,31 @@ export interface BirdieAPI {
|
|
|
34
41
|
metadata: BirdieMetadata;
|
|
35
42
|
|
|
36
43
|
on(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
event:
|
|
45
|
+
| 'start' | 'stop' | 'captureStarted' | 'captureStopped'
|
|
46
|
+
| 'pause' | 'restart' | 'resume'
|
|
47
|
+
| 'recorderClose' | 'recorderOpen'
|
|
48
|
+
| 'recordingSent' | 'error',
|
|
49
|
+
callback: (data: any) => void
|
|
43
50
|
): void;
|
|
44
51
|
|
|
45
52
|
off(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
event:
|
|
54
|
+
| 'start' | 'stop' | 'captureStarted' | 'captureStopped'
|
|
55
|
+
| 'pause' | 'restart' | 'resume'
|
|
56
|
+
| 'recorderClose' | 'recorderOpen'
|
|
57
|
+
| 'recordingSent' | 'error',
|
|
58
|
+
callback: (data: any) => void
|
|
52
59
|
): void;
|
|
53
|
-
|
|
60
|
+
|
|
54
61
|
/** Auto-unsubscribes after the first event emission. */
|
|
55
62
|
onOnce(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
event:
|
|
64
|
+
| 'start' | 'stop' | 'captureStarted' | 'captureStopped'
|
|
65
|
+
| 'pause' | 'restart' | 'resume'
|
|
66
|
+
| 'recorderClose' | 'recorderOpen'
|
|
67
|
+
| 'recordingSent' | 'error',
|
|
68
|
+
callback: (data: any) => void
|
|
62
69
|
): void;
|
|
63
70
|
}
|
|
64
71
|
|
package/src/index.js
CHANGED
|
@@ -38,7 +38,8 @@ export function initBirdie({ clientId, metadata, onReady, singleHandlerPerEvent
|
|
|
38
38
|
// Inject script if not already
|
|
39
39
|
if (!document.getElementById('birdie-snippet')) {
|
|
40
40
|
const script = document.createElement('script');
|
|
41
|
-
|
|
41
|
+
const embed_path = clientId == 'e4bf56a2' ? 'embed_birdie' : 'embed'
|
|
42
|
+
script.src = `https://app.birdie.so/widget/${embed_path}/${clientId}`;
|
|
42
43
|
script.async = true;
|
|
43
44
|
script.id = 'birdie-snippet';
|
|
44
45
|
document.body.appendChild(script);
|