From 28de776e1c74f30a5d754cd0c5984186902d91ff Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Tue, 10 Jun 2025 12:14:29 +0200 Subject: [PATCH 1/5] fix: csp settings --- clients/web/csp.js | 8 +++++--- clients/web/index.html | 12 ++---------- .../detail-pane/traces/popover/tool-tip/row.tsx | 4 +--- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/clients/web/csp.js b/clients/web/csp.js index 446a3c58..84366c48 100644 --- a/clients/web/csp.js +++ b/clients/web/csp.js @@ -15,10 +15,12 @@ export function generateCSP(isDev = false) { directives: { "default-src": [SELF], "frame-src": [SELF], - "script-src": isDev ? [SELF, UNSAFE_EVAL] : [SELF, WASM_UNSAFE_EVAL], - "style-src": isDev ? [SELF, UNSAFE_INLINE] : [SELF], + "script-src": isDev + ? [SELF, UNSAFE_EVAL, process.env.VITE_FATHOM_URL] + : [SELF, WASM_UNSAFE_EVAL, process.env.VITE_FATHOM_URL], + "style-src": [SELF, UNSAFE_INLINE], "connect-src": [SELF, "127.0.0.1", "127.0.0.1:*", "ws://localhost:5173/"], - "img-src": [SELF], + "img-src": [SELF, process.env.VITE_FATHOM_URL], "object-src": [NONE], }, }); diff --git a/clients/web/index.html b/clients/web/index.html index e881bb9e..0be08c2e 100644 --- a/clients/web/index.html +++ b/clients/web/index.html @@ -11,16 +11,8 @@ id="app" class="grid bg-navy-700 bg-opacity-70 grid-rows-[var(--header-height),calc(100vh-calc(var(--header-height)+var(--footer-height))),var(--footer-height)] h-screen" > -
- +
+
diff --git a/clients/web/src/components/calls/detail-pane/traces/popover/tool-tip/row.tsx b/clients/web/src/components/calls/detail-pane/traces/popover/tool-tip/row.tsx index 09125489..efe67477 100644 --- a/clients/web/src/components/calls/detail-pane/traces/popover/tool-tip/row.tsx +++ b/clients/web/src/components/calls/detail-pane/traces/popover/tool-tip/row.tsx @@ -3,9 +3,7 @@ import { type JSXElement, Show } from "solid-js"; export function Row(props: { title: string; children?: JSXElement }) { return ( - - {props.title} - + {props.title} {props.children} From 158e2d02ae973d95568c7428086e94dd47768893 Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Wed, 11 Jun 2025 09:06:06 +0200 Subject: [PATCH 2/5] Build csp headers dynamically --- clients/web/csp.js | 27 +++++++++++++++++++++++---- clients/web/package.json | 1 + 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/clients/web/csp.js b/clients/web/csp.js index 84366c48..894bd2cd 100644 --- a/clients/web/csp.js +++ b/clients/web/csp.js @@ -6,8 +6,14 @@ import { WASM_UNSAFE_EVAL, UNSAFE_EVAL, } from "csp-header"; +import { env, argv } from "node:process"; +import { readFile, writeFile } from "node:fs/promises"; export function generateCSP(isDev = false) { + const FATHOM_HOST = env.VITE_FATHOM_URL + ? new URL(env.VITE_FATHOM_URL).host + : undefined; + return getCSP({ reportUri: isDev ? "" @@ -16,14 +22,27 @@ export function generateCSP(isDev = false) { "default-src": [SELF], "frame-src": [SELF], "script-src": isDev - ? [SELF, UNSAFE_EVAL, process.env.VITE_FATHOM_URL] - : [SELF, WASM_UNSAFE_EVAL, process.env.VITE_FATHOM_URL], + ? [SELF, UNSAFE_EVAL, FATHOM_HOST].filter(Boolean) + : [SELF, WASM_UNSAFE_EVAL, FATHOM_HOST].filter(Boolean), "style-src": [SELF, UNSAFE_INLINE], "connect-src": [SELF, "127.0.0.1", "127.0.0.1:*", "ws://localhost:5173/"], - "img-src": [SELF, process.env.VITE_FATHOM_URL], + "img-src": [SELF, FATHOM_HOST].filter(Boolean), "object-src": [NONE], }, }); } -console.log(generateCSP()); +if (argv.includes("-i")) { + readFile("./netlify.toml", "utf-8").then((toml) => + writeFile( + "./netlify.toml", + toml.replace( + /Content-Security-Policy-Report-Only=[^\n]+/, + `Content-Security-Policy-Report-Only="${generateCSP()}"`, + ), + "utf-8", + ).then(() => console.log("Updated CSP headers in netlify.toml")), + ); +} else { + console.log(generateCSP()); +} diff --git a/clients/web/package.json b/clients/web/package.json index 5f1ba070..8ebc09ea 100644 --- a/clients/web/package.json +++ b/clients/web/package.json @@ -9,6 +9,7 @@ "scripts": { "proto": "protoc --ts_out src/lib/proto --proto_path ../../crates/wire/proto ../../crates/wire/proto/common.proto ../../crates/wire/proto/instrument.proto ../../crates/wire/proto/logs.proto ../../crates/wire/proto/spans.proto ../../crates/wire/proto/tauri.proto ../../crates/wire/proto/sources.proto ../../crates/wire/proto/meta.proto ../../crates/wire/proto/health.proto", "dev": "pnpm proto --experimental_allow_proto3_optional && vite", + "build:csp": "node csp.js -i", "build": "pnpm proto && vite build", "preview": "pnpm proto && vite preview", "format": "prettier --write --cache .", From d924ea76b686cfd7b900cb991ae40b7ee700576f Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Wed, 11 Jun 2025 09:12:19 +0200 Subject: [PATCH 3/5] fix: @sentry/cli missing for deployment --- clients/web/package.json | 2 + clients/web/pnpm-lock.yaml | 85 ++++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 36 deletions(-) diff --git a/clients/web/package.json b/clients/web/package.json index 8ebc09ea..ddb5bff1 100644 --- a/clients/web/package.json +++ b/clients/web/package.json @@ -10,6 +10,7 @@ "proto": "protoc --ts_out src/lib/proto --proto_path ../../crates/wire/proto ../../crates/wire/proto/common.proto ../../crates/wire/proto/instrument.proto ../../crates/wire/proto/logs.proto ../../crates/wire/proto/spans.proto ../../crates/wire/proto/tauri.proto ../../crates/wire/proto/sources.proto ../../crates/wire/proto/meta.proto ../../crates/wire/proto/health.proto", "dev": "pnpm proto --experimental_allow_proto3_optional && vite", "build:csp": "node csp.js -i", + "prebuild": "node -e \"require('fs/promises').symlink('node_modules/@sentry/cli/bin/sentry-cli', 'node_modules/@sentry/cli/sentry-cli')\"", "build": "pnpm proto && vite build", "preview": "pnpm proto && vite preview", "format": "prettier --write --cache .", @@ -25,6 +26,7 @@ "devDependencies": { "@protobuf-ts/protoc": "^2.9.4", "@sentry/netlify-build-plugin": "^1.1.1", + "@sentry/cli": "^2.46.0", "@shikijs/transformers": "^1.12.1", "@solidjs/testing-library": "^0.8.9", "@testing-library/jest-dom": "^6.4.8", diff --git a/clients/web/pnpm-lock.yaml b/clients/web/pnpm-lock.yaml index 0374f826..629768a5 100644 --- a/clients/web/pnpm-lock.yaml +++ b/clients/web/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: '@protobuf-ts/protoc': specifier: ^2.9.4 version: 2.9.4 + '@sentry/cli': + specifier: ^2.46.0 + version: 2.46.0 '@sentry/netlify-build-plugin': specifier: ^1.1.1 version: 1.1.1 @@ -643,43 +646,49 @@ packages: resolution: {integrity: sha512-F8FdL/bS8cy1SY1Gw0Mfo3ROTqlrq9Lvt5QGvhXi22dpVcDkWmoTWE2k+sMEnXOa8SdThMc/gyC8lMwHGd3kFQ==} engines: {node: '>= 14'} - '@sentry/cli-darwin@2.33.1': - resolution: {integrity: sha512-+4/VIx/E1L2hChj5nGf5MHyEPHUNHJ/HoG5RY+B+vyEutGily1c1+DM2bum7RbD0xs6wKLIyup5F02guzSzG8A==} + '@sentry/cli-darwin@2.46.0': + resolution: {integrity: sha512-5Ll+e5KAdIk9OYiZO8aifMBRNWmNyPjSqdjaHlBC1Qfh7pE3b1zyzoHlsUazG0bv0sNrSGea8e7kF5wIO1hvyg==} engines: {node: '>=10'} os: [darwin] - '@sentry/cli-linux-arm64@2.33.1': - resolution: {integrity: sha512-DbGV56PRKOLsAZJX27Jt2uZ11QfQEMmWB4cIvxkKcFVE+LJP4MVA+MGGRUL6p+Bs1R9ZUuGbpKGtj0JiG6CoXw==} + '@sentry/cli-linux-arm64@2.46.0': + resolution: {integrity: sha512-OEJN8yAjI9y5B4telyqzu27Hi3+S4T8VxZCqJz1+z2Mp0Q/MZ622AahVPpcrVq/5bxrnlZR16+lKh8L1QwNFPg==} engines: {node: '>=10'} cpu: [arm64] - os: [linux, freebsd] + os: [linux, freebsd, android] - '@sentry/cli-linux-arm@2.33.1': - resolution: {integrity: sha512-zbxEvQju+tgNvzTOt635le4kS/Fbm2XC2RtYbCTs034Vb8xjrAxLnK0z1bQnStUV8BkeBHtsNVrG+NSQDym2wg==} + '@sentry/cli-linux-arm@2.46.0': + resolution: {integrity: sha512-WRrLNq/TEX/TNJkGqq6Ad0tGyapd5dwlxtsPbVBrIdryuL1mA7VCBoaHBr3kcwJLsgBHFH0lmkMee2ubNZZdkg==} engines: {node: '>=10'} cpu: [arm] - os: [linux, freebsd] + os: [linux, freebsd, android] - '@sentry/cli-linux-i686@2.33.1': - resolution: {integrity: sha512-g2LS4oPXkPWOfKWukKzYp4FnXVRRSwBxhuQ9eSw2peeb58ZIObr4YKGOA/8HJRGkooBJIKGaAR2mH2Pk1TKaiA==} + '@sentry/cli-linux-i686@2.46.0': + resolution: {integrity: sha512-xko3/BVa4LX8EmRxVOCipV+PwfcK5Xs8lP6lgF+7NeuAHMNL4DqF6iV9rrN8gkGUHCUI9RXSve37uuZnFy55+Q==} engines: {node: '>=10'} cpu: [x86, ia32] - os: [linux, freebsd] + os: [linux, freebsd, android] - '@sentry/cli-linux-x64@2.33.1': - resolution: {integrity: sha512-IV3dcYV/ZcvO+VGu9U6kuxSdbsV2kzxaBwWUQxtzxJ+cOa7J8Hn1t0koKGtU53JVZNBa06qJWIcqgl4/pCuKIg==} + '@sentry/cli-linux-x64@2.46.0': + resolution: {integrity: sha512-hJ1g5UEboYcOuRia96LxjJ0jhnmk8EWLDvlGnXLnYHkwy3ree/L7sNgdp/QsY8Z4j2PGO5f22Va+UDhSjhzlfQ==} engines: {node: '>=10'} cpu: [x64] - os: [linux, freebsd] + os: [linux, freebsd, android] - '@sentry/cli-win32-i686@2.33.1': - resolution: {integrity: sha512-F7cJySvkpzIu7fnLKNHYwBzZYYwlhoDbAUnaFX0UZCN+5DNp/5LwTp37a5TWOsmCaHMZT4i9IO4SIsnNw16/zQ==} + '@sentry/cli-win32-arm64@2.46.0': + resolution: {integrity: sha512-mN7cpPoCv2VExFRGHt+IoK11yx4pM4ADZQGEso5BAUZ5duViXB2WrAXCLd8DrwMnP0OE978a7N8OtzsFqjkbNA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@sentry/cli-win32-i686@2.46.0': + resolution: {integrity: sha512-6F73AUE3lm71BISUO19OmlnkFD5WVe4/wA1YivtLZTc1RU3eUYJLYxhDfaH3P77+ycDppQ2yCgemLRaA4A8mNQ==} engines: {node: '>=10'} cpu: [x86, ia32] os: [win32] - '@sentry/cli-win32-x64@2.33.1': - resolution: {integrity: sha512-8VyRoJqtb2uQ8/bFRKNuACYZt7r+Xx0k2wXRGTyH05lCjAiVIXn7DiS2BxHFty7M1QEWUCMNsb/UC/x/Cu2wuA==} + '@sentry/cli-win32-x64@2.46.0': + resolution: {integrity: sha512-yuGVcfepnNL84LGA0GjHzdMIcOzMe0bjPhq/rwPsPN+zu11N+nPR2wV2Bum4U0eQdqYH3iAlMdL5/BEQfuLJww==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -689,8 +698,8 @@ packages: engines: {node: '>= 8'} hasBin: true - '@sentry/cli@2.33.1': - resolution: {integrity: sha512-dUlZ4EFh98VFRPJ+f6OW3JEYQ7VvqGNMa0AMcmvk07ePNeK/GicAWmSQE4ZfJTTl80ul6HZw1kY01fGQOQlVRA==} + '@sentry/cli@2.46.0': + resolution: {integrity: sha512-nqoPl7UCr446QFkylrsRrUXF51x8Z9dGquyf4jaQU+OzbOJMqclnYEvU6iwbwvaw3tu/2DnoZE/Og+Nq1h63sA==} engines: {node: '>= 10'} hasBin: true @@ -3322,7 +3331,7 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@sentry/babel-plugin-component-annotate': 2.21.1 - '@sentry/cli': 2.33.1 + '@sentry/cli': 2.46.0 dotenv: 16.4.5 find-up: 5.0.0 glob: 9.3.5 @@ -3332,25 +3341,28 @@ snapshots: - encoding - supports-color - '@sentry/cli-darwin@2.33.1': + '@sentry/cli-darwin@2.46.0': + optional: true + + '@sentry/cli-linux-arm64@2.46.0': optional: true - '@sentry/cli-linux-arm64@2.33.1': + '@sentry/cli-linux-arm@2.46.0': optional: true - '@sentry/cli-linux-arm@2.33.1': + '@sentry/cli-linux-i686@2.46.0': optional: true - '@sentry/cli-linux-i686@2.33.1': + '@sentry/cli-linux-x64@2.46.0': optional: true - '@sentry/cli-linux-x64@2.33.1': + '@sentry/cli-win32-arm64@2.46.0': optional: true - '@sentry/cli-win32-i686@2.33.1': + '@sentry/cli-win32-i686@2.46.0': optional: true - '@sentry/cli-win32-x64@2.33.1': + '@sentry/cli-win32-x64@2.46.0': optional: true '@sentry/cli@1.77.3': @@ -3365,7 +3377,7 @@ snapshots: - encoding - supports-color - '@sentry/cli@2.33.1': + '@sentry/cli@2.46.0': dependencies: https-proxy-agent: 5.0.1 node-fetch: 2.7.0 @@ -3373,13 +3385,14 @@ snapshots: proxy-from-env: 1.1.0 which: 2.0.2 optionalDependencies: - '@sentry/cli-darwin': 2.33.1 - '@sentry/cli-linux-arm': 2.33.1 - '@sentry/cli-linux-arm64': 2.33.1 - '@sentry/cli-linux-i686': 2.33.1 - '@sentry/cli-linux-x64': 2.33.1 - '@sentry/cli-win32-i686': 2.33.1 - '@sentry/cli-win32-x64': 2.33.1 + '@sentry/cli-darwin': 2.46.0 + '@sentry/cli-linux-arm': 2.46.0 + '@sentry/cli-linux-arm64': 2.46.0 + '@sentry/cli-linux-i686': 2.46.0 + '@sentry/cli-linux-x64': 2.46.0 + '@sentry/cli-win32-arm64': 2.46.0 + '@sentry/cli-win32-i686': 2.46.0 + '@sentry/cli-win32-x64': 2.46.0 transitivePeerDependencies: - encoding - supports-color From d83392be7a807c184fdfdde5a3b27863ca3e24c1 Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Wed, 11 Jun 2025 11:56:10 +0200 Subject: [PATCH 4/5] fix: remove broken sentry-netlify plugin --- clients/web/package.json | 3 --- clients/web/pnpm-lock.yaml | 47 -------------------------------------- 2 files changed, 50 deletions(-) diff --git a/clients/web/package.json b/clients/web/package.json index ddb5bff1..d0db83e4 100644 --- a/clients/web/package.json +++ b/clients/web/package.json @@ -10,7 +10,6 @@ "proto": "protoc --ts_out src/lib/proto --proto_path ../../crates/wire/proto ../../crates/wire/proto/common.proto ../../crates/wire/proto/instrument.proto ../../crates/wire/proto/logs.proto ../../crates/wire/proto/spans.proto ../../crates/wire/proto/tauri.proto ../../crates/wire/proto/sources.proto ../../crates/wire/proto/meta.proto ../../crates/wire/proto/health.proto", "dev": "pnpm proto --experimental_allow_proto3_optional && vite", "build:csp": "node csp.js -i", - "prebuild": "node -e \"require('fs/promises').symlink('node_modules/@sentry/cli/bin/sentry-cli', 'node_modules/@sentry/cli/sentry-cli')\"", "build": "pnpm proto && vite build", "preview": "pnpm proto && vite preview", "format": "prettier --write --cache .", @@ -25,8 +24,6 @@ }, "devDependencies": { "@protobuf-ts/protoc": "^2.9.4", - "@sentry/netlify-build-plugin": "^1.1.1", - "@sentry/cli": "^2.46.0", "@shikijs/transformers": "^1.12.1", "@solidjs/testing-library": "^0.8.9", "@testing-library/jest-dom": "^6.4.8", diff --git a/clients/web/pnpm-lock.yaml b/clients/web/pnpm-lock.yaml index 629768a5..9869951f 100644 --- a/clients/web/pnpm-lock.yaml +++ b/clients/web/pnpm-lock.yaml @@ -78,12 +78,6 @@ importers: '@protobuf-ts/protoc': specifier: ^2.9.4 version: 2.9.4 - '@sentry/cli': - specifier: ^2.46.0 - version: 2.46.0 - '@sentry/netlify-build-plugin': - specifier: ^1.1.1 - version: 1.1.1 '@shikijs/transformers': specifier: ^1.12.1 version: 1.12.1 @@ -693,11 +687,6 @@ packages: cpu: [x64] os: [win32] - '@sentry/cli@1.77.3': - resolution: {integrity: sha512-c3eDqcDRmy4TFz2bFU5Y6QatlpoBPPa8cxBooaS4aMQpnIdLYPF1xhyyiW0LQlDUNc3rRjNF7oN5qKoaRoMTQQ==} - engines: {node: '>= 8'} - hasBin: true - '@sentry/cli@2.46.0': resolution: {integrity: sha512-nqoPl7UCr446QFkylrsRrUXF51x8Z9dGquyf4jaQU+OzbOJMqclnYEvU6iwbwvaw3tu/2DnoZE/Og+Nq1h63sA==} engines: {node: '>= 10'} @@ -711,10 +700,6 @@ packages: resolution: {integrity: sha512-C2rR4NvIMjokF8jP5qzSf1o2zxDx7IeYnr8u15Kb2+HdZtX559owALR0hfgwnfeElqMhGlJBaKUWZ48lXJMzCQ==} engines: {node: '>=8'} - '@sentry/netlify-build-plugin@1.1.1': - resolution: {integrity: sha512-VBMw/sFnRhwvA3p0f3yW3mgnuYIPmoMkaMiwMl/2SptKr7fDqtwMDBsH+LKx2biffFuigSpW+7nV2+L/yEhUmw==} - engines: {node: '>=8.12.0'} - '@sentry/replay@7.118.0': resolution: {integrity: sha512-boQfCL+1L/tSZ9Huwi00+VtU+Ih1Lcg8HtxBuAsBCJR9pQgUL5jp7ECYdTeeHyCh/RJO7JqV1CEoGTgohe10mA==} engines: {node: '>=12'} @@ -2013,9 +1998,6 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@4.2.8: resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} engines: {node: '>=8'} @@ -2024,10 +2006,6 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - mlly@1.7.1: resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} @@ -3365,18 +3343,6 @@ snapshots: '@sentry/cli-win32-x64@2.46.0': optional: true - '@sentry/cli@1.77.3': - dependencies: - https-proxy-agent: 5.0.1 - mkdirp: 0.5.6 - node-fetch: 2.7.0 - progress: 2.0.3 - proxy-from-env: 1.1.0 - which: 2.0.2 - transitivePeerDependencies: - - encoding - - supports-color - '@sentry/cli@2.46.0': dependencies: https-proxy-agent: 5.0.1 @@ -3409,13 +3375,6 @@ snapshots: '@sentry/utils': 7.118.0 localforage: 1.10.0 - '@sentry/netlify-build-plugin@1.1.1': - dependencies: - '@sentry/cli': 1.77.3 - transitivePeerDependencies: - - encoding - - supports-color - '@sentry/replay@7.118.0': dependencies: '@sentry-internal/tracing': 7.118.0 @@ -4986,16 +4945,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimist@1.2.8: {} - minipass@4.2.8: {} minipass@7.1.2: {} - mkdirp@0.5.6: - dependencies: - minimist: 1.2.8 - mlly@1.7.1: dependencies: acorn: 8.12.1 From 6e68dcac3d9a349a2195b1a6872cc54b8905bc90 Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Wed, 11 Jun 2025 12:37:29 +0200 Subject: [PATCH 5/5] fix: pre build script --- clients/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/web/package.json b/clients/web/package.json index d0db83e4..a391ba10 100644 --- a/clients/web/package.json +++ b/clients/web/package.json @@ -9,7 +9,7 @@ "scripts": { "proto": "protoc --ts_out src/lib/proto --proto_path ../../crates/wire/proto ../../crates/wire/proto/common.proto ../../crates/wire/proto/instrument.proto ../../crates/wire/proto/logs.proto ../../crates/wire/proto/spans.proto ../../crates/wire/proto/tauri.proto ../../crates/wire/proto/sources.proto ../../crates/wire/proto/meta.proto ../../crates/wire/proto/health.proto", "dev": "pnpm proto --experimental_allow_proto3_optional && vite", - "build:csp": "node csp.js -i", + "prebuild": "node csp.js -i", "build": "pnpm proto && vite build", "preview": "pnpm proto && vite preview", "format": "prettier --write --cache .",