@cloudcare/guance-front-tools 1.0.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/.prettierignore +3 -0
- package/.prettierrc +6 -0
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/cli.js +16 -0
- package/lib/cjs/generated/browserSessionReplay.d.ts +703 -0
- package/lib/cjs/generated/browserSessionReplay.js +6 -0
- package/lib/cjs/generated/dashboardCharts.d.ts +1372 -0
- package/lib/cjs/generated/dashboardCharts.js +6 -0
- package/lib/cjs/generated/mobileSessionReplay.d.ts +653 -0
- package/lib/cjs/generated/mobileSessionReplay.js +6 -0
- package/lib/cjs/generated/sessionReplay.d.ts +1190 -0
- package/lib/cjs/generated/sessionReplay.js +6 -0
- package/lib/cjs/src/dashboard-charts.d.ts +1 -0
- package/lib/cjs/src/dashboard-charts.js +17 -0
- package/lib/cjs/src/index.d.ts +2 -0
- package/lib/cjs/src/index.js +18 -0
- package/lib/cjs/src/session-replay-browser.d.ts +58 -0
- package/lib/cjs/src/session-replay-browser.js +69 -0
- package/lib/cjs/src/session-replay-mobile.d.ts +30 -0
- package/lib/cjs/src/session-replay-mobile.js +42 -0
- package/lib/cjs/src/session-replay.d.ts +30 -0
- package/lib/cjs/src/session-replay.js +49 -0
- package/lib/esm/generated/browserSessionReplay.d.ts +703 -0
- package/lib/esm/generated/browserSessionReplay.js +5 -0
- package/lib/esm/generated/dashboardCharts.d.ts +1372 -0
- package/lib/esm/generated/dashboardCharts.js +5 -0
- package/lib/esm/generated/mobileSessionReplay.d.ts +653 -0
- package/lib/esm/generated/mobileSessionReplay.js +5 -0
- package/lib/esm/generated/sessionReplay.d.ts +1190 -0
- package/lib/esm/generated/sessionReplay.js +5 -0
- package/lib/esm/src/dashboard-charts.d.ts +1 -0
- package/lib/esm/src/dashboard-charts.js +1 -0
- package/lib/esm/src/index.d.ts +2 -0
- package/lib/esm/src/index.js +2 -0
- package/lib/esm/src/session-replay-browser.d.ts +58 -0
- package/lib/esm/src/session-replay-browser.js +52 -0
- package/lib/esm/src/session-replay-mobile.d.ts +30 -0
- package/lib/esm/src/session-replay-mobile.js +25 -0
- package/lib/esm/src/session-replay.d.ts +30 -0
- package/lib/esm/src/session-replay.js +24 -0
- package/lib/example/grafana-dashboard.json +2205 -0
- package/lib/example/guance-covert-test.json +629 -0
- package/lib/example/guance-dashboard-1.json +672 -0
- package/lib/example/guance-dashboard.json +2841 -0
- package/lib/scripts/grafana-covert-to-guance.d.ts +1 -0
- package/lib/scripts/grafana-covert-to-guance.js +367 -0
- package/lib/scripts/grafana-covert-to-guance.ts +374 -0
- package/lib/scripts/grafana-dashbord.d.ts +2220 -0
- package/lib/scripts/grafana-dashbord.js +1 -0
- package/lib/scripts/grafana-dashbord.ts +2427 -0
- package/lib/src/dashboard-charts.ts +1 -0
- package/lib/src/index.ts +2 -0
- package/lib/src/session-replay-browser.ts +98 -0
- package/lib/src/session-replay-mobile.ts +54 -0
- package/lib/src/session-replay.ts +61 -0
- package/package.json +45 -0
- package/samples/dashboard/dashboard.json +2842 -0
- package/samples/dashboard/promql-dashboard.json +2175 -0
- package/samples/session-replay/mobile/record/full-snapshot-record.json +51 -0
- package/samples/session-replay/mobile/record/has-focus-record.json +7 -0
- package/samples/session-replay/mobile/record/incremental-snapshot-record.json +74 -0
- package/samples/session-replay/mobile/record/metadata-record.json +8 -0
- package/samples/session-replay/mobile/record/view-end-record.json +4 -0
- package/samples/session-replay/mobile/segment/segment.json +110 -0
- package/schemas/charts/chart-schema.json +73 -0
- package/schemas/charts/common/common-chart-types-schema.json +37 -0
- package/schemas/charts/common/common-vars-item-schema.json +117 -0
- package/schemas/charts/common/common-vars-schema.json +10 -0
- package/schemas/charts/dashboard-schema.json +73 -0
- package/schemas/charts/query/queries-schema.json +10 -0
- package/schemas/charts/query/query-item-schema.json +42 -0
- package/schemas/charts/settings/_common-settings-connect-null-schema.json +7 -0
- package/schemas/charts/settings/_common-settings-gradual-color-schema.json +72 -0
- package/schemas/charts/settings/_common-settings-groupby-schema.json +22 -0
- package/schemas/charts/settings/_common-settings-legend-position-schema.json +14 -0
- package/schemas/charts/settings/_common-settings-legend-values-schema.json +19 -0
- package/schemas/charts/settings/_common-settings-open-stack-schema.json +8 -0
- package/schemas/charts/settings/_common-settings-show-label-schema.json +8 -0
- package/schemas/charts/settings/_common-settings-show-line-schema.json +8 -0
- package/schemas/charts/settings/_common-settings-stack-content-schema.json +12 -0
- package/schemas/charts/settings/_common-settings-stack-type-schema.json +11 -0
- package/schemas/charts/settings/chart-alarm-settings-schema.json +48 -0
- package/schemas/charts/settings/chart-bar-settings-schema.json +69 -0
- package/schemas/charts/settings/chart-chinamap-settings-schema.json +102 -0
- package/schemas/charts/settings/chart-funnel-settings-schema.json +34 -0
- package/schemas/charts/settings/chart-gauge-settings-schema.json +65 -0
- package/schemas/charts/settings/chart-heatmap-settings-schema.json +50 -0
- package/schemas/charts/settings/chart-hexgon-settings-schema.json +90 -0
- package/schemas/charts/settings/chart-histogram-settings-schema.json +47 -0
- package/schemas/charts/settings/chart-iframe-settings-schema.json +24 -0
- package/schemas/charts/settings/chart-log-settings-schema.json +84 -0
- package/schemas/charts/settings/chart-object-settings-schema.json +52 -0
- package/schemas/charts/settings/chart-picture-settings-schema.json +46 -0
- package/schemas/charts/settings/chart-pie-settings-schema.json +90 -0
- package/schemas/charts/settings/chart-sankey-settings-schema.json +34 -0
- package/schemas/charts/settings/chart-scatter-bubble-settings-schema.json +31 -0
- package/schemas/charts/settings/chart-sequence-settings-schema.json +76 -0
- package/schemas/charts/settings/chart-singlestat-settings-schema.json +163 -0
- package/schemas/charts/settings/chart-table-settings-schema.json +184 -0
- package/schemas/charts/settings/chart-text-settings-schema.json +20 -0
- package/schemas/charts/settings/chart-toplist-settings-schema.json +117 -0
- package/schemas/charts/settings/chart-topology-settings-schema.json +71 -0
- package/schemas/charts/settings/chart-treemap-settings-schema.json +66 -0
- package/schemas/charts/settings/chart-worldmap-settings-schema.json +102 -0
- package/schemas/charts/settings/common-settings-schema.json +82 -0
- package/schemas/charts/settings/settings-alias-schema.json +47 -0
- package/schemas/charts/settings/settings-chart-type-schema.json +27 -0
- package/schemas/charts/settings/settings-colors-schema.json +46 -0
- package/schemas/charts/settings/settings-compare-schema.json +58 -0
- package/schemas/charts/settings/settings-fixed-time-schema.json +49 -0
- package/schemas/charts/settings/settings-levels-schema.json +33 -0
- package/schemas/charts/settings/settings-schema.json +79 -0
- package/schemas/charts/settings/settings-time-schema.json +47 -0
- package/schemas/charts/settings/settings-unit-items-schema.json +226 -0
- package/schemas/charts/settings/settings-units-schema.json +60 -0
- package/schemas/dashboard-schema.json +5 -0
- package/schemas/session-replay/browser/attribute-mutation-schema.json +21 -0
- package/schemas/session-replay/browser/attributes-schema.json +10 -0
- package/schemas/session-replay/browser/cdata-node-schema.json +19 -0
- package/schemas/session-replay/browser/creation-reason-schema.json +17 -0
- package/schemas/session-replay/browser/document-fragment-node-schema.json +35 -0
- package/schemas/session-replay/browser/document-node-schema.json +30 -0
- package/schemas/session-replay/browser/document-type-node-schema.json +28 -0
- package/schemas/session-replay/browser/element-node-schema.json +33 -0
- package/schemas/session-replay/browser/frustration-record-schema.json +49 -0
- package/schemas/session-replay/browser/full-snapshot-record-schema.json +26 -0
- package/schemas/session-replay/browser/incremental-data-schema.json +36 -0
- package/schemas/session-replay/browser/incremental-snapshot-record-schema.json +29 -0
- package/schemas/session-replay/browser/input-data-schema.json +27 -0
- package/schemas/session-replay/browser/input-state-schema.json +27 -0
- package/schemas/session-replay/browser/media-interaction-data-schema.json +23 -0
- package/schemas/session-replay/browser/media-interaction-schema.json +20 -0
- package/schemas/session-replay/browser/mouse-interaction-data-schema.json +23 -0
- package/schemas/session-replay/browser/mouse-interaction-schema.json +47 -0
- package/schemas/session-replay/browser/mouse-move-data-schema.json +23 -0
- package/schemas/session-replay/browser/mouse-position-schema.json +26 -0
- package/schemas/session-replay/browser/mutation-data-schema.json +23 -0
- package/schemas/session-replay/browser/mutation-payload-schema.json +42 -0
- package/schemas/session-replay/browser/node-added-mutation-schema.json +41 -0
- package/schemas/session-replay/browser/node-removed-mutation-schema.json +18 -0
- package/schemas/session-replay/browser/node-schema.json +28 -0
- package/schemas/session-replay/browser/record-schema.json +30 -0
- package/schemas/session-replay/browser/scroll-data-schema.json +23 -0
- package/schemas/session-replay/browser/scroll-position-schema.json +22 -0
- package/schemas/session-replay/browser/segment-metadata-schema.json +28 -0
- package/schemas/session-replay/browser/segment-schema.json +25 -0
- package/schemas/session-replay/browser/serialized-node-schema.json +15 -0
- package/schemas/session-replay/browser/serialized-node-with-id-schema.json +21 -0
- package/schemas/session-replay/browser/stylesheet-rule-add-schema.json +28 -0
- package/schemas/session-replay/browser/stylesheet-rule-data-schema.json +23 -0
- package/schemas/session-replay/browser/stylesheet-rule-delete-schema.json +24 -0
- package/schemas/session-replay/browser/stylesheet-rule-schema.json +29 -0
- package/schemas/session-replay/browser/stylesheet-schema.json +30 -0
- package/schemas/session-replay/browser/text-mutation-schema.json +27 -0
- package/schemas/session-replay/browser/text-node-schema.json +23 -0
- package/schemas/session-replay/common/_common-record-schema.json +14 -0
- package/schemas/session-replay/common/_common-segment-metadata-schema.json +30 -0
- package/schemas/session-replay/common/_slot-supported-common-record-schema.json +21 -0
- package/schemas/session-replay/common/focus-record-schema.json +34 -0
- package/schemas/session-replay/common/meta-record-schema.json +42 -0
- package/schemas/session-replay/common/pointer-interaction-data-schema.json +23 -0
- package/schemas/session-replay/common/pointer-interaction-schema.json +34 -0
- package/schemas/session-replay/common/segment-context-schema.json +46 -0
- package/schemas/session-replay/common/view-end-record-schema.json +23 -0
- package/schemas/session-replay/common/viewport-resize-data-schema.json +23 -0
- package/schemas/session-replay/common/viewport-resize-dimension-schema.json +18 -0
- package/schemas/session-replay/common/visual-viewport-record-schema.json +50 -0
- package/schemas/session-replay/full-snapshot-record-schema.json +14 -0
- package/schemas/session-replay/incremental-data-schema.json +14 -0
- package/schemas/session-replay/incremental-snapshot-record-schema.json +14 -0
- package/schemas/session-replay/mobile/_common-shape-wireframe-schema.json +22 -0
- package/schemas/session-replay/mobile/_common-shape-wireframe-update-schema.json +22 -0
- package/schemas/session-replay/mobile/_common-wireframe-schema.json +38 -0
- package/schemas/session-replay/mobile/_common-wireframe-update-schema.json +38 -0
- package/schemas/session-replay/mobile/full-snapshot-record-schema.json +38 -0
- package/schemas/session-replay/mobile/image-wireframe-schema.json +43 -0
- package/schemas/session-replay/mobile/image-wireframe-update-schema.json +43 -0
- package/schemas/session-replay/mobile/incremental-data-schema.json +21 -0
- package/schemas/session-replay/mobile/incremental-snapshot-record-schema.json +26 -0
- package/schemas/session-replay/mobile/mutation-data-schema.json +23 -0
- package/schemas/session-replay/mobile/mutation-payload-schema.json +55 -0
- package/schemas/session-replay/mobile/placeholder-wireframe-schema.json +28 -0
- package/schemas/session-replay/mobile/placeholder-wireframe-update-schema.json +28 -0
- package/schemas/session-replay/mobile/record-schema.json +27 -0
- package/schemas/session-replay/mobile/segment-metadata-schema.json +25 -0
- package/schemas/session-replay/mobile/segment-schema.json +25 -0
- package/schemas/session-replay/mobile/shape-border-schema.json +25 -0
- package/schemas/session-replay/mobile/shape-style-schema.json +29 -0
- package/schemas/session-replay/mobile/shape-wireframe-schema.json +23 -0
- package/schemas/session-replay/mobile/shape-wireframe-update-schema.json +23 -0
- package/schemas/session-replay/mobile/text-position-schema.json +57 -0
- package/schemas/session-replay/mobile/text-style-schema.json +31 -0
- package/schemas/session-replay/mobile/text-wireframe-schema.json +34 -0
- package/schemas/session-replay/mobile/text-wireframe-update-schema.json +34 -0
- package/schemas/session-replay/mobile/touch-data-schema.json +51 -0
- package/schemas/session-replay/mobile/webview-wireframe-schema.json +33 -0
- package/schemas/session-replay/mobile/webview-wireframe-update-schema.json +33 -0
- package/schemas/session-replay/mobile/wireframe-clip-schema.json +29 -0
- package/schemas/session-replay/mobile/wireframe-schema.json +24 -0
- package/schemas/session-replay/mobile/wireframe-update-mutation-schema.json +24 -0
- package/schemas/session-replay/mutation-data-schema.json +14 -0
- package/schemas/session-replay/mutation-payload-schema.json +14 -0
- package/schemas/session-replay/record-schema.json +14 -0
- package/schemas/session-replay/segment-metadata-schema.json +14 -0
- package/schemas/session-replay/segment-schema.json +15 -0
- package/schemas/session-replay-browser-schema.json +5 -0
- package/schemas/session-replay-mobile-schema.json +5 -0
- package/schemas/session-replay-schema.json +33 -0
- package/scripts/generate.mjs +96 -0
- package/scripts/utils.mjs +16 -0
- package/scripts/validate.mjs +144 -0
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +13 -0
- package/tsconfig.script.json +15 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../generated/dashboardCharts'
|
package/lib/src/index.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type * as SessionReplay from '../generated/browserSessionReplay'
|
|
2
|
+
|
|
3
|
+
export * from '../generated/browserSessionReplay'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* For backward compatibility reasons, `undefined` should be accepted as a possible value for Browser segments, too.
|
|
7
|
+
**/
|
|
8
|
+
export const BrowserSource = {
|
|
9
|
+
Browser: 'browser',
|
|
10
|
+
} as const
|
|
11
|
+
|
|
12
|
+
export type BrowserSource = typeof BrowserSource[keyof typeof BrowserSource]
|
|
13
|
+
|
|
14
|
+
export const RecordType: {
|
|
15
|
+
FullSnapshot: SessionReplay.BrowserFullSnapshotRecord['type']
|
|
16
|
+
IncrementalSnapshot: SessionReplay.BrowserIncrementalSnapshotRecord['type']
|
|
17
|
+
Meta: SessionReplay.MetaRecord['type']
|
|
18
|
+
Focus: SessionReplay.FocusRecord['type']
|
|
19
|
+
ViewEnd: SessionReplay.ViewEndRecord['type']
|
|
20
|
+
VisualViewport: SessionReplay.VisualViewportRecord['type']
|
|
21
|
+
FrustrationRecord: SessionReplay.FrustrationRecord['type']
|
|
22
|
+
} = {
|
|
23
|
+
FullSnapshot: 2,
|
|
24
|
+
IncrementalSnapshot: 3,
|
|
25
|
+
Meta: 4,
|
|
26
|
+
Focus: 6,
|
|
27
|
+
ViewEnd: 7,
|
|
28
|
+
VisualViewport: 8,
|
|
29
|
+
FrustrationRecord: 9,
|
|
30
|
+
} as const
|
|
31
|
+
|
|
32
|
+
export type RecordType = typeof RecordType[keyof typeof RecordType]
|
|
33
|
+
|
|
34
|
+
export const NodeType: {
|
|
35
|
+
Document: SessionReplay.DocumentNode['type']
|
|
36
|
+
DocumentType: SessionReplay.DocumentTypeNode['type']
|
|
37
|
+
Element: SessionReplay.ElementNode['type']
|
|
38
|
+
Text: SessionReplay.TextNode['type']
|
|
39
|
+
CDATA: SessionReplay.CDataNode['type']
|
|
40
|
+
DocumentFragment: SessionReplay.DocumentFragmentNode['type']
|
|
41
|
+
} = {
|
|
42
|
+
Document: 0,
|
|
43
|
+
DocumentType: 1,
|
|
44
|
+
Element: 2,
|
|
45
|
+
Text: 3,
|
|
46
|
+
CDATA: 4,
|
|
47
|
+
DocumentFragment: 11,
|
|
48
|
+
} as const
|
|
49
|
+
|
|
50
|
+
export type NodeType = typeof NodeType[keyof typeof NodeType]
|
|
51
|
+
|
|
52
|
+
export const IncrementalSource: {
|
|
53
|
+
Mutation: SessionReplay.BrowserMutationData['source']
|
|
54
|
+
MouseMove: Exclude<SessionReplay.MousemoveData['source'], 6>
|
|
55
|
+
MouseInteraction: SessionReplay.MouseInteractionData['source']
|
|
56
|
+
Scroll: SessionReplay.ScrollData['source']
|
|
57
|
+
ViewportResize: SessionReplay.ViewportResizeData['source']
|
|
58
|
+
Input: SessionReplay.InputData['source']
|
|
59
|
+
TouchMove: Exclude<SessionReplay.MousemoveData['source'], 1>
|
|
60
|
+
MediaInteraction: SessionReplay.MediaInteractionData['source']
|
|
61
|
+
StyleSheetRule: SessionReplay.StyleSheetRuleData['source']
|
|
62
|
+
PointerInteraction: SessionReplay.PointerInteractionData['source']
|
|
63
|
+
} = {
|
|
64
|
+
Mutation: 0,
|
|
65
|
+
MouseMove: 1,
|
|
66
|
+
MouseInteraction: 2,
|
|
67
|
+
Scroll: 3,
|
|
68
|
+
ViewportResize: 4,
|
|
69
|
+
Input: 5,
|
|
70
|
+
TouchMove: 6,
|
|
71
|
+
MediaInteraction: 7,
|
|
72
|
+
StyleSheetRule: 8,
|
|
73
|
+
PointerInteraction: 9,
|
|
74
|
+
// Font : 10,
|
|
75
|
+
} as const
|
|
76
|
+
|
|
77
|
+
export type IncrementalSource = typeof IncrementalSource[keyof typeof IncrementalSource]
|
|
78
|
+
|
|
79
|
+
export const MouseInteractionType = {
|
|
80
|
+
MouseUp: 0,
|
|
81
|
+
MouseDown: 1,
|
|
82
|
+
Click: 2,
|
|
83
|
+
ContextMenu: 3,
|
|
84
|
+
DblClick: 4,
|
|
85
|
+
Focus: 5,
|
|
86
|
+
Blur: 6,
|
|
87
|
+
TouchStart: 7,
|
|
88
|
+
TouchEnd: 9,
|
|
89
|
+
} as const
|
|
90
|
+
|
|
91
|
+
export type MouseInteractionType = typeof MouseInteractionType[keyof typeof MouseInteractionType]
|
|
92
|
+
|
|
93
|
+
export const MediaInteractionType = {
|
|
94
|
+
Play: 0,
|
|
95
|
+
Pause: 1,
|
|
96
|
+
} as const
|
|
97
|
+
|
|
98
|
+
export type MediaInteractionType = typeof MediaInteractionType[keyof typeof MediaInteractionType]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type * as SessionReplay from '../generated/mobileSessionReplay'
|
|
2
|
+
|
|
3
|
+
export * from '../generated/mobileSessionReplay'
|
|
4
|
+
|
|
5
|
+
export const MobileSource = {
|
|
6
|
+
Android: 'android',
|
|
7
|
+
Ios: 'ios',
|
|
8
|
+
Flutter: 'flutter',
|
|
9
|
+
ReactNative: 'react-native',
|
|
10
|
+
} as const
|
|
11
|
+
|
|
12
|
+
export type MobileSource = typeof MobileSource[keyof typeof MobileSource]
|
|
13
|
+
|
|
14
|
+
export const RecordType: {
|
|
15
|
+
FullSnapshot: SessionReplay.MobileFullSnapshotRecord['type']
|
|
16
|
+
IncrementalSnapshot: SessionReplay.MobileIncrementalSnapshotRecord['type']
|
|
17
|
+
Meta: SessionReplay.MetaRecord['type']
|
|
18
|
+
Focus: SessionReplay.FocusRecord['type']
|
|
19
|
+
ViewEnd: SessionReplay.ViewEndRecord['type']
|
|
20
|
+
VisualViewport: SessionReplay.VisualViewportRecord['type']
|
|
21
|
+
} = {
|
|
22
|
+
FullSnapshot: 10,
|
|
23
|
+
IncrementalSnapshot: 11,
|
|
24
|
+
Meta: 4,
|
|
25
|
+
Focus: 6,
|
|
26
|
+
ViewEnd: 7,
|
|
27
|
+
VisualViewport: 8,
|
|
28
|
+
} as const
|
|
29
|
+
|
|
30
|
+
export type RecordType = typeof RecordType[keyof typeof RecordType]
|
|
31
|
+
|
|
32
|
+
export const WireframeType: {
|
|
33
|
+
Shape: SessionReplay.ShapeWireframe['type']
|
|
34
|
+
Text: SessionReplay.TextWireframe['type']
|
|
35
|
+
} = {
|
|
36
|
+
Shape: 'shape',
|
|
37
|
+
Text: 'text',
|
|
38
|
+
} as const
|
|
39
|
+
|
|
40
|
+
export type WireframeType = typeof WireframeType[keyof typeof WireframeType]
|
|
41
|
+
|
|
42
|
+
export const IncrementalSource: {
|
|
43
|
+
Mutation: SessionReplay.MobileMutationData['source']
|
|
44
|
+
Touch: SessionReplay.TouchData['source']
|
|
45
|
+
ViewportResize: SessionReplay.ViewportResizeData['source']
|
|
46
|
+
PointerInteraction: SessionReplay.PointerInteractionData['source']
|
|
47
|
+
} = {
|
|
48
|
+
Mutation: 0,
|
|
49
|
+
Touch: 2,
|
|
50
|
+
ViewportResize: 4,
|
|
51
|
+
PointerInteraction: 9,
|
|
52
|
+
} as const
|
|
53
|
+
|
|
54
|
+
export type IncrementalSource = typeof IncrementalSource[keyof typeof IncrementalSource]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IncrementalSource as BrowserIncrementalSource,
|
|
3
|
+
RecordType as BrowserRecordType,
|
|
4
|
+
} from './session-replay-browser'
|
|
5
|
+
import type {
|
|
6
|
+
IncrementalSource as MobileIncrementalSource,
|
|
7
|
+
RecordType as MobileRecordType,
|
|
8
|
+
} from './session-replay-mobile'
|
|
9
|
+
|
|
10
|
+
export * from '../generated/sessionReplay'
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
BrowserSource,
|
|
14
|
+
NodeType,
|
|
15
|
+
IncrementalSource as BrowserIncrementalSource,
|
|
16
|
+
MouseInteractionType,
|
|
17
|
+
MediaInteractionType,
|
|
18
|
+
} from './session-replay-browser'
|
|
19
|
+
export { IncrementalSource as MobileIncrementalSource, MobileSource, WireframeType } from './session-replay-mobile'
|
|
20
|
+
|
|
21
|
+
export const RecordType: {
|
|
22
|
+
BrowserFullSnapshot: typeof BrowserRecordType.FullSnapshot
|
|
23
|
+
BrowserIncrementalSnapshot: typeof BrowserRecordType.IncrementalSnapshot
|
|
24
|
+
Meta: typeof BrowserRecordType.Meta
|
|
25
|
+
Focus: typeof BrowserRecordType.Focus
|
|
26
|
+
ViewEnd: typeof BrowserRecordType.ViewEnd
|
|
27
|
+
VisualViewport: typeof BrowserRecordType.VisualViewport
|
|
28
|
+
FrustrationRecord: typeof BrowserRecordType.FrustrationRecord
|
|
29
|
+
MobileFullSnapshot: typeof MobileRecordType.FullSnapshot
|
|
30
|
+
MobileIncrementalSnapshot: typeof MobileRecordType.IncrementalSnapshot
|
|
31
|
+
} = {
|
|
32
|
+
BrowserFullSnapshot: 2,
|
|
33
|
+
BrowserIncrementalSnapshot: 3,
|
|
34
|
+
Meta: 4,
|
|
35
|
+
Focus: 6,
|
|
36
|
+
ViewEnd: 7,
|
|
37
|
+
VisualViewport: 8,
|
|
38
|
+
FrustrationRecord: 9,
|
|
39
|
+
MobileFullSnapshot: 10,
|
|
40
|
+
MobileIncrementalSnapshot: 11,
|
|
41
|
+
} as const
|
|
42
|
+
|
|
43
|
+
export type RecordType = typeof RecordType[keyof typeof RecordType]
|
|
44
|
+
|
|
45
|
+
export type IncrementalSource = BrowserIncrementalSource | MobileIncrementalSource
|
|
46
|
+
|
|
47
|
+
export const PointerEventType = {
|
|
48
|
+
PointerDown: 'down',
|
|
49
|
+
PointerUp: 'up',
|
|
50
|
+
PointerMove: 'move',
|
|
51
|
+
} as const
|
|
52
|
+
|
|
53
|
+
export type PointerEventType = typeof PointerEventType[keyof typeof PointerEventType]
|
|
54
|
+
|
|
55
|
+
export const PointerType = {
|
|
56
|
+
Mouse: 'mouse',
|
|
57
|
+
Touch: 'touch',
|
|
58
|
+
Pen: 'pen',
|
|
59
|
+
} as const
|
|
60
|
+
|
|
61
|
+
export type PointerType = typeof PointerType[keyof typeof PointerType]
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cloudcare/guance-front-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"config": {
|
|
8
|
+
"path:generated": "./lib/generated"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"grafanaCovertToGuance": "cli.js"
|
|
12
|
+
},
|
|
13
|
+
"description": "观测云前端工具",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "lib/cjs/src/index.js",
|
|
16
|
+
"types": "lib/cjs/src/index.d.ts",
|
|
17
|
+
"module": "lib/esm/src/index.js",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "npm run clean && npm run generate && npm run build:cjs && npm run build:esm && npm run build:script",
|
|
20
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
21
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
22
|
+
"build:script": "tsc -p tsconfig.script.json",
|
|
23
|
+
"clean": "rm -rf ./lib/generated && rm -rf ./lib/esm && rm -rf ./lib/cjs",
|
|
24
|
+
"generate": "node scripts/generate.mjs",
|
|
25
|
+
"format": "prettier -c .",
|
|
26
|
+
"validate": "node scripts/validate.mjs"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"ajv": "8.11.0",
|
|
30
|
+
"install": "^0.13.0",
|
|
31
|
+
"json-schema-to-typescript": "^15.0.2",
|
|
32
|
+
"npm": "^10.8.3",
|
|
33
|
+
"prettier": "2.7.1",
|
|
34
|
+
"typescript": ">=4.5",
|
|
35
|
+
"@types/node": "^12.20.55"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=12.7.0"
|
|
39
|
+
},
|
|
40
|
+
"author": "",
|
|
41
|
+
"license": "ISC",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"yargs": "^17.7.2"
|
|
44
|
+
}
|
|
45
|
+
}
|