@checkstack/frontend 0.4.0 → 0.4.2

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,41 @@
1
1
  # @checkstack/frontend
2
2
 
3
+ ## 0.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e7f346c: fix: suggest a `BASE_URL` value derived from the URL the user actually opened on the misconfiguration error screen, instead of always recommending `http://localhost:3000`. Makes the diagnostic actionable when the app is reached over a LAN IP, custom port, or proxied domain.
8
+ - @checkstack/about-frontend@0.2.14
9
+ - @checkstack/announcement-frontend@0.2.15
10
+ - @checkstack/auth-frontend@0.5.32
11
+ - @checkstack/catalog-frontend@0.9.0
12
+ - @checkstack/command-frontend@0.2.33
13
+ - @checkstack/common@0.7.0
14
+ - @checkstack/dependency-frontend@0.3.4
15
+ - @checkstack/frontend-api@0.4.1
16
+ - @checkstack/signal-common@0.2.0
17
+ - @checkstack/signal-frontend@0.1.0
18
+ - @checkstack/ui@1.7.0
19
+
20
+ ## 0.4.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [32d52c6]
25
+ - Updated dependencies [32d52c6]
26
+ - Updated dependencies [32d52c6]
27
+ - Updated dependencies [32d52c6]
28
+ - Updated dependencies [32d52c6]
29
+ - Updated dependencies [32d52c6]
30
+ - @checkstack/catalog-frontend@0.9.0
31
+ - @checkstack/frontend-api@0.4.1
32
+ - @checkstack/auth-frontend@0.5.32
33
+ - @checkstack/ui@1.7.0
34
+ - @checkstack/command-frontend@0.2.33
35
+ - @checkstack/dependency-frontend@0.3.4
36
+ - @checkstack/about-frontend@0.2.14
37
+ - @checkstack/announcement-frontend@0.2.15
38
+
3
39
  ## 0.4.0
4
40
 
5
41
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/frontend",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "checkstack": {
5
5
  "type": "frontend"
6
6
  },
@@ -9,23 +9,23 @@
9
9
  "dev": "vite",
10
10
  "build:vendor": "vite build --config vite.config.vendor.ts",
11
11
  "build": "bun run build:vendor && vite build",
12
- "typecheck": "tsc --noEmit",
12
+ "typecheck": "tsgo -b",
13
13
  "lint": "bun run lint:code",
14
14
  "preview": "vite preview",
15
15
  "lint:code": "eslint . --max-warnings 0"
16
16
  },
17
17
  "dependencies": {
18
- "@checkstack/about-frontend": "0.2.12",
19
- "@checkstack/announcement-frontend": "0.2.13",
20
- "@checkstack/auth-frontend": "0.5.30",
21
- "@checkstack/catalog-frontend": "0.8.6",
22
- "@checkstack/command-frontend": "0.2.31",
18
+ "@checkstack/about-frontend": "0.2.14",
19
+ "@checkstack/announcement-frontend": "0.2.15",
20
+ "@checkstack/auth-frontend": "0.5.32",
21
+ "@checkstack/catalog-frontend": "0.9.0",
22
+ "@checkstack/command-frontend": "0.2.33",
23
23
  "@checkstack/common": "0.7.0",
24
- "@checkstack/dependency-frontend": "0.3.2",
25
- "@checkstack/frontend-api": "0.3.11",
26
- "@checkstack/signal-common": "0.1.10",
27
- "@checkstack/signal-frontend": "0.0.16",
28
- "@checkstack/ui": "1.6.0",
24
+ "@checkstack/dependency-frontend": "0.3.4",
25
+ "@checkstack/frontend-api": "0.4.1",
26
+ "@checkstack/signal-common": "0.2.0",
27
+ "@checkstack/signal-frontend": "0.1.0",
28
+ "@checkstack/ui": "1.7.0",
29
29
  "@orpc/client": "^1.13.14",
30
30
  "@tanstack/react-query": "^5.64.0",
31
31
  "@tanstack/react-query-devtools": "^5.64.0",
package/src/App.tsx CHANGED
@@ -249,6 +249,13 @@ function AppWithApis() {
249
249
  // Config probe failed — baseUrl is not reachable (misconfigured BASE_URL).
250
250
  // Surface a clear diagnostic rather than a broken empty dashboard.
251
251
  if (!runtimeConfig || configError) {
252
+ // Derive the suggested BASE_URL from the URL the user actually has open
253
+ // in their browser — that's almost certainly the value they want.
254
+ const suggestedBaseUrl =
255
+ globalThis.window !== undefined && globalThis.location?.origin
256
+ ? globalThis.location.origin
257
+ : "http://localhost:3000";
258
+
252
259
  return (
253
260
  <div className="h-screen flex items-center justify-center bg-background p-8">
254
261
  <div className="max-w-lg w-full rounded-xl border border-destructive/50 bg-destructive/10 p-8 space-y-4 text-center">
@@ -264,9 +271,9 @@ function AppWithApis() {
264
271
  </p>
265
272
  <div className="text-left bg-muted rounded-lg p-4 space-y-1 text-sm font-mono">
266
273
  <p className="text-muted-foreground">
267
- # For a default Docker setup:
274
+ # Based on the URL you opened, try:
268
275
  </p>
269
- <p className="text-foreground">BASE_URL=http://localhost:3000</p>
276
+ <p className="text-foreground">BASE_URL={suggestedBaseUrl}</p>
270
277
  </div>
271
278
  <p className="text-sm text-muted-foreground">
272
279
  After updating your{" "}
@@ -23,15 +23,15 @@ export async function loadPlugins(overrideModules?: Record<string, unknown>) {
23
23
  if (overrideModules) {
24
24
  modules = overrideModules;
25
25
  } else {
26
- const coreModules =
27
- // @ts-expect-error - Vite specific property
28
- import.meta.glob("../../*-frontend/src/index.tsx", { eager: true });
29
-
30
- const pluginModules =
31
- // @ts-expect-error - Vite specific property
32
- import.meta.glob("../../../plugins/*-frontend/src/index.tsx", {
33
- eager: true,
34
- });
26
+ const coreModules = import.meta.glob(
27
+ "../../*-frontend/src/index.tsx",
28
+ { eager: true },
29
+ );
30
+
31
+ const pluginModules = import.meta.glob(
32
+ "../../../plugins/*-frontend/src/index.tsx",
33
+ { eager: true },
34
+ );
35
35
 
36
36
  modules = { ...coreModules, ...pluginModules };
37
37
  }
package/tsconfig.json CHANGED
@@ -1,6 +1,47 @@
1
1
  {
2
2
  "extends": "@checkstack/tsconfig/frontend.json",
3
+ "compilerOptions": {
4
+ "types": [
5
+ "bun",
6
+ "vite/client"
7
+ ]
8
+ },
3
9
  "include": [
4
10
  "src"
11
+ ],
12
+ "references": [
13
+ {
14
+ "path": "../about-frontend"
15
+ },
16
+ {
17
+ "path": "../announcement-frontend"
18
+ },
19
+ {
20
+ "path": "../auth-frontend"
21
+ },
22
+ {
23
+ "path": "../catalog-frontend"
24
+ },
25
+ {
26
+ "path": "../command-frontend"
27
+ },
28
+ {
29
+ "path": "../common"
30
+ },
31
+ {
32
+ "path": "../dependency-frontend"
33
+ },
34
+ {
35
+ "path": "../frontend-api"
36
+ },
37
+ {
38
+ "path": "../signal-common"
39
+ },
40
+ {
41
+ "path": "../signal-frontend"
42
+ },
43
+ {
44
+ "path": "../ui"
45
+ }
5
46
  ]
6
- }
47
+ }
package/vite.config.ts CHANGED
@@ -22,6 +22,10 @@ export default defineConfig(() => {
22
22
  ws: true, // Enable WebSocket proxy
23
23
  },
24
24
  "/assets": backendUrl,
25
+ // Platform endpoints (probes etc.) under /.checkstack/* — proxied
26
+ // here for dev convenience so e.g.
27
+ // `curl http://localhost:5173/.checkstack/ready` works.
28
+ "/.checkstack": backendUrl,
25
29
  },
26
30
  },
27
31
  // ============================================================