@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
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 CloudCare
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 观测云前端工具
|
|
2
|
+
|
|
3
|
+
## 使用
|
|
4
|
+
|
|
5
|
+
npm 下载
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
npm install @cloudcare/guance-front-tools
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 脚本
|
|
12
|
+
|
|
13
|
+
观测云目前提供 grafana dashboard json template 转换为 观测云仪表板 json 模版的 node 脚本
|
|
14
|
+
|
|
15
|
+
### 使用方式
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
$ npm install -g @cloudcare/guance-front-tools
|
|
19
|
+
|
|
20
|
+
# show usage information
|
|
21
|
+
$ grafanaCovertToGuance
|
|
22
|
+
|
|
23
|
+
# run task
|
|
24
|
+
$ grafanaCovertToGuance -d examples/grafana.json -o examples/guance.json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### 执行方式
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node grafanaCovertToGuance
|
|
31
|
+
```
|
package/cli.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2019 Adobe. All rights reserved.
|
|
4
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
+
* governing permissions and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { run } from './lib/scripts/grafana-covert-to-guance.js'
|
|
15
|
+
|
|
16
|
+
run(process.argv)
|