@checkstack/healthcheck-frontend 0.4.2 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @checkstack/healthcheck-frontend
2
2
 
3
+ ## 0.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - dd07c14: Fix collector add button failing in HTTP contexts by replacing `crypto.randomUUID()` with the `uuid` package
8
+
3
9
  ## 0.4.2
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-frontend",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "scripts": {
@@ -26,13 +26,14 @@
26
26
  "react-router-dom": "^6.20.0",
27
27
  "react-simple-code-editor": "^0.14.1",
28
28
  "recharts": "^3.6.0",
29
+ "uuid": "^13.0.0",
29
30
  "zod": "^4.2.1"
30
31
  },
31
32
  "devDependencies": {
33
+ "@checkstack/scripts": "workspace:*",
34
+ "@checkstack/tsconfig": "workspace:*",
32
35
  "@types/prismjs": "^1.26.5",
33
- "typescript": "^5.0.0",
34
36
  "@types/react": "^18.2.0",
35
- "@checkstack/tsconfig": "workspace:*",
36
- "@checkstack/scripts": "workspace:*"
37
+ "typescript": "^5.0.0"
37
38
  }
38
39
  }
@@ -22,6 +22,7 @@ import {
22
22
  Badge,
23
23
  } from "@checkstack/ui";
24
24
  import { Plus, Trash2 } from "lucide-react";
25
+ import { v4 as generateId } from "uuid";
25
26
  import { isBuiltInCollector } from "../hooks/useCollectors";
26
27
  import { AssertionBuilder, type Assertion } from "./AssertionBuilder";
27
28
 
@@ -67,20 +68,20 @@ export const CollectorList: React.FC<CollectorListProps> = ({
67
68
  (index: number, isValid: boolean) => {
68
69
  setValidityMap((prev) => ({ ...prev, [index]: isValid }));
69
70
  },
70
- []
71
+ [],
71
72
  );
72
73
  // Separate built-in and external collectors
73
74
  const builtInCollectors = availableCollectors.filter((c) =>
74
- isBuiltInCollector(c.id, strategyId)
75
+ isBuiltInCollector(c.id, strategyId),
75
76
  );
76
77
  const externalCollectors = availableCollectors.filter(
77
- (c) => !isBuiltInCollector(c.id, strategyId)
78
+ (c) => !isBuiltInCollector(c.id, strategyId),
78
79
  );
79
80
 
80
81
  // Get collectors that can still be added
81
82
  const getAddableCollectors = () => {
82
83
  const configuredIds = new Set(
83
- configuredCollectors.map((c) => c.collectorId)
84
+ configuredCollectors.map((c) => c.collectorId),
84
85
  );
85
86
 
86
87
  return availableCollectors.filter((c) => {
@@ -100,7 +101,7 @@ export const CollectorList: React.FC<CollectorListProps> = ({
100
101
  if (!collector) return;
101
102
 
102
103
  const newEntry: CollectorConfigEntry = {
103
- id: crypto.randomUUID(),
104
+ id: generateId(),
104
105
  collectorId,
105
106
  config: {},
106
107
  assertions: [],
@@ -122,7 +123,7 @@ export const CollectorList: React.FC<CollectorListProps> = ({
122
123
 
123
124
  const handleConfigChange = (
124
125
  index: number,
125
- config: Record<string, unknown>
126
+ config: Record<string, unknown>,
126
127
  ) => {
127
128
  const updated = [...configuredCollectors];
128
129
  updated[index] = { ...updated[index], config };
@@ -224,7 +225,7 @@ export const CollectorList: React.FC<CollectorListProps> = ({
224
225
  const collector = getCollectorDetails(entry.collectorId);
225
226
  const isBuiltIn = isBuiltInCollector(
226
227
  entry.collectorId,
227
- strategyId
228
+ strategyId,
228
229
  );
229
230
 
230
231
  return (