@atlar-widgets/rasor-components-status 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/README.md +93 -0
- package/dist/index.iife.js +666 -0
- package/dist/index.iife.js.map +1 -0
- package/dist/src/ComponentsStatusWidget.d.ts +4 -0
- package/dist/src/components/ComponentCard.d.ts +6 -0
- package/dist/src/graphql/ops.d.ts +7 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types.d.ts +26 -0
- package/package.json +99 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
export declare const COMPONENTS_QUERY: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const HEARTBEAT_SUBSCRIPTION: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const PING_MUTATION: import("@apollo/client").DocumentNode;
|
|
5
|
+
export declare const pollingDocs: import("@apollo/client").DocumentNode[];
|
|
6
|
+
export declare const streamDocs: ReturnType<typeof gql>[];
|
|
7
|
+
export declare const mutationDocs: import("@apollo/client").DocumentNode[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ComponentState {
|
|
2
|
+
status?: string;
|
|
3
|
+
ts?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
host?: string;
|
|
6
|
+
running_since?: string;
|
|
7
|
+
connected?: boolean;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface Component {
|
|
11
|
+
name: string;
|
|
12
|
+
lastStatus: string;
|
|
13
|
+
lastSeen: string;
|
|
14
|
+
state: ComponentState;
|
|
15
|
+
}
|
|
16
|
+
export interface ComponentHeartbeat {
|
|
17
|
+
componentName: string;
|
|
18
|
+
seq: number;
|
|
19
|
+
interval: number;
|
|
20
|
+
ts: string;
|
|
21
|
+
lastSeen: string;
|
|
22
|
+
state: ComponentState;
|
|
23
|
+
}
|
|
24
|
+
export interface PingResult {
|
|
25
|
+
ttl: number;
|
|
26
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlar-widgets/rasor-components-status",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Components status widget — shows live heartbeat and status for all RASOR components",
|
|
5
|
+
"main": "dist/index.iife.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"sideEffects": true,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "vite build -c vite.config.lib.ts && tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap false --outDir dist",
|
|
13
|
+
"prepublishOnly": "npm run build",
|
|
14
|
+
"dev": "vite dev",
|
|
15
|
+
"test": "vitest run --coverage",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"format": "prettier --write \"**/*\"",
|
|
18
|
+
"format:check": "prettier --check \"**/*\"",
|
|
19
|
+
"prepare": "git config core.hooksPath .husky && chmod +x .husky/pre-commit || true"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@apollo/client": "^3",
|
|
23
|
+
"@reduxjs/toolkit": "^2",
|
|
24
|
+
"@ska-octopus-widget-sdk/widget-sdk": "^0.5.0",
|
|
25
|
+
"graphql": "^16",
|
|
26
|
+
"react": "^19",
|
|
27
|
+
"react-dom": "^19",
|
|
28
|
+
"react-redux": "^9.2.0",
|
|
29
|
+
"zen-observable-ts": "^1.2.5"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@apollo/client": "^3",
|
|
33
|
+
"@eslint/js": "^9.34.0",
|
|
34
|
+
"@reduxjs/toolkit": "^2",
|
|
35
|
+
"@ska-octopus-widget-sdk/widget-sdk": "^0.5.0",
|
|
36
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
37
|
+
"@testing-library/react": "^16.0.0",
|
|
38
|
+
"@types/node": "^20",
|
|
39
|
+
"@types/react": "^19",
|
|
40
|
+
"@types/react-dom": "^19",
|
|
41
|
+
"@vitejs/plugin-react": "^4",
|
|
42
|
+
"@vitest/coverage-v8": "^4.0.10",
|
|
43
|
+
"esbuild-css-modules-plugin": "^2.7.1",
|
|
44
|
+
"eslint": "^9.34.0",
|
|
45
|
+
"eslint-config-prettier": "^10.1.8",
|
|
46
|
+
"eslint-formatter-junit": "^8.40.0",
|
|
47
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
50
|
+
"globals": "^16.3.0",
|
|
51
|
+
"graphql": "^16",
|
|
52
|
+
"jsdom": "^26.1.0",
|
|
53
|
+
"junit-report-merger": "^8.0.0",
|
|
54
|
+
"lint-staged": "^16.1.6",
|
|
55
|
+
"prettier": "^3.6.2",
|
|
56
|
+
"react": "^19",
|
|
57
|
+
"react-dom": "^19",
|
|
58
|
+
"react-redux": "^9.2.0",
|
|
59
|
+
"tsup": "^8",
|
|
60
|
+
"typescript": "~5.7.2",
|
|
61
|
+
"typescript-eslint": "^8.42.0",
|
|
62
|
+
"vite": "^6",
|
|
63
|
+
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
64
|
+
"vitest": "^4.0.10",
|
|
65
|
+
"zen-observable-ts": "^1.2.5"
|
|
66
|
+
},
|
|
67
|
+
"overrides": {
|
|
68
|
+
"glob": "^11.0.1",
|
|
69
|
+
"sucrase": {
|
|
70
|
+
"glob": "^11.0.1"
|
|
71
|
+
},
|
|
72
|
+
"tsup": {
|
|
73
|
+
"sucrase": {
|
|
74
|
+
"glob": "^11.0.1"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"js-yaml": "^4.1.0",
|
|
78
|
+
"xmlbuilder2": {
|
|
79
|
+
"js-yaml": "^4.1.0"
|
|
80
|
+
},
|
|
81
|
+
"@testing-library/react": {
|
|
82
|
+
"react": "^19",
|
|
83
|
+
"react-dom": "^19"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"type": "module",
|
|
87
|
+
"lint-staged": {
|
|
88
|
+
"*.{js,jsx,ts,tsx}": [
|
|
89
|
+
"prettier --write",
|
|
90
|
+
"eslint --fix"
|
|
91
|
+
],
|
|
92
|
+
"*.{json,css,md,yml,yaml}": [
|
|
93
|
+
"prettier --write"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"engines": {
|
|
97
|
+
"node": ">=18"
|
|
98
|
+
}
|
|
99
|
+
}
|