mirror of https://github.com/buster-so/buster.git
fix imports and installs
This commit is contained in:
parent
a3343845ef
commit
b2ada52789
|
@ -7,9 +7,6 @@ const __dirname = dirname(__filename);
|
|||
|
||||
const apiUrl = new URL(env.NEXT_PUBLIC_API_URL).origin;
|
||||
const api2Url = new URL(env.NEXT_PUBLIC_API2_URL).origin;
|
||||
const wsUrl = new URL(env.NEXT_PUBLIC_WEB_SOCKET_URL).origin
|
||||
.replace('https', 'wss')
|
||||
.replace('http', 'ws');
|
||||
|
||||
// Function to create CSP header with dynamic API URLs
|
||||
const createCspHeader = (isEmbed = false) => {
|
||||
|
@ -34,7 +31,7 @@ const createCspHeader = (isEmbed = false) => {
|
|||
// Frame sources
|
||||
"frame-src 'self' https://vercel.live",
|
||||
// Connect sources for API calls
|
||||
`connect-src 'self' ${localDomains} https://*.vercel.app https://*.supabase.co wss://*.supabase.co https://*.posthog.com ${apiUrl} ${api2Url} ${wsUrl}`
|
||||
`connect-src 'self' ${localDomains} https://*.vercel.app https://*.supabase.co wss://*.supabase.co https://*.posthog.com ${apiUrl} ${api2Url}`
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim(),
|
||||
// Media
|
||||
|
|
|
@ -25,7 +25,8 @@ const clientEnvSchema = z.object({
|
|||
NEXT_PUBLIC_WEB_SOCKET_URL: z
|
||||
.string()
|
||||
.min(1, { message: 'NEXT_PUBLIC_WEB_SOCKET_URL is required' })
|
||||
.url({ message: 'NEXT_PUBLIC_WEB_SOCKET_URL must be a valid URL' }),
|
||||
.url({ message: 'NEXT_PUBLIC_WEB_SOCKET_URL must be a valid URL' })
|
||||
.optional(),
|
||||
NEXT_PUBLIC_URL: z
|
||||
.string()
|
||||
.min(1, { message: 'NEXT_PUBLIC_URL is required' })
|
||||
|
|
|
@ -13,8 +13,7 @@ import { useMemoizedFn } from '@/hooks';
|
|||
import { useWebSocket } from '@/hooks/useWebSocket';
|
||||
import type { SupabaseContextReturnType } from '../../Supabase';
|
||||
import { useSupabaseContext } from '../../Supabase';
|
||||
|
||||
const BUSTER_WS_URL = `${process.env.NEXT_PUBLIC_WEB_SOCKET_URL}/api/v1/ws`;
|
||||
import { BUSTER_WS_URL } from './config';
|
||||
|
||||
export type BusterOnCallback = {
|
||||
callback: BusterSocketResponse['callback'];
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
"trigger/**/*.js",
|
||||
"vitest.config.ts",
|
||||
"biome.json",
|
||||
"package.json",
|
||||
"turbo.json"
|
||||
"./package.json",
|
||||
"./turbo.json"
|
||||
],
|
||||
"ignore": [
|
||||
"**/node_modules/**",
|
||||
|
@ -102,7 +102,7 @@
|
|||
"packages/**/node_modules/**",
|
||||
"packages/**/dist/**",
|
||||
"packages/**/build/**",
|
||||
"web/**"
|
||||
"apps/web/**"
|
||||
]
|
||||
},
|
||||
"overrides": [
|
||||
|
|
14
package.json
14
package.json
|
@ -7,7 +7,6 @@
|
|||
"check": "biome check ${1:-.}",
|
||||
"check:fix": "biome check --write ${1:-.}",
|
||||
"ci:check": "pnpm run check && pnpm run typecheck",
|
||||
"new:package": "bun run scripts/new-package.ts",
|
||||
"db:check": "pnpm --filter @buster/database run db:check",
|
||||
"db:generate": "pnpm --filter @buster/database run db:generate",
|
||||
"db:introspect": "pnpm --filter @buster/database run db:introspect",
|
||||
|
@ -20,12 +19,13 @@
|
|||
"db:studio": "pnpm --filter @buster/database run db:studio",
|
||||
"dev": "turbo dev",
|
||||
"dev:db-init": "turbo run dev:init --filter \"@buster/database\"",
|
||||
"dev:server:reset": "pnpm run dev:db-init && turbo run dev --filter \"@buster-app/server\"",
|
||||
"dev:server": "turbo run dev --filter \"@buster-app/server\"",
|
||||
"dev:server:reset": "pnpm run dev:db-init && turbo run dev --filter \"@buster-app/server\"",
|
||||
"evals": "bash scripts/evals.sh",
|
||||
"format": "biome format ${1:-.}",
|
||||
"format:fix": "biome format --write ${1:-.}",
|
||||
"lint": "turbo lint",
|
||||
"new:package": "bun run scripts/new-package.ts",
|
||||
"test": "dotenv -e .env -- turbo test",
|
||||
"test:coverage": "turbo test:coverage",
|
||||
"test:ui": "vitest --ui",
|
||||
|
@ -37,13 +37,15 @@
|
|||
"typecheck": "turbo typecheck",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^16.5.0",
|
||||
"dotenv-cli": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@types/node": "^20.17.57",
|
||||
"dotenv": "^16.5.0",
|
||||
"dotenv-cli": "^8.0.0",
|
||||
"vitest": "catalog:",
|
||||
"turbo": "^2.5.4"
|
||||
"turbo": "^2.5.4",
|
||||
"vitest": "catalog:"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bun": "^1.2.15",
|
||||
|
|
|
@ -50,6 +50,12 @@ importers:
|
|||
bun:
|
||||
specifier: ^1.2.15
|
||||
version: 1.2.16
|
||||
dotenv:
|
||||
specifier: ^16.5.0
|
||||
version: 16.5.0
|
||||
dotenv-cli:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
typescript:
|
||||
specifier: ^5
|
||||
version: 5.8.3
|
||||
|
@ -60,12 +66,6 @@ importers:
|
|||
'@types/node':
|
||||
specifier: ^20.17.57
|
||||
version: 20.19.1
|
||||
dotenv:
|
||||
specifier: ^16.5.0
|
||||
version: 16.5.0
|
||||
dotenv-cli:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
turbo:
|
||||
specifier: ^2.5.4
|
||||
version: 2.5.4
|
||||
|
@ -18432,8 +18432,8 @@ snapshots:
|
|||
'@typescript-eslint/parser': 8.34.1(eslint@8.57.1)(typescript@5.8.3)
|
||||
eslint: 8.57.1
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1)
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
|
||||
eslint-plugin-react: 7.37.5(eslint@8.57.1)
|
||||
eslint-plugin-react-hooks: 5.2.0(eslint@8.57.1)
|
||||
|
@ -18456,7 +18456,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1):
|
||||
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1):
|
||||
dependencies:
|
||||
'@nolyfill/is-core-module': 1.0.39
|
||||
debug: 4.4.1
|
||||
|
@ -18467,22 +18467,22 @@ snapshots:
|
|||
tinyglobby: 0.2.14
|
||||
unrs-resolver: 1.9.0
|
||||
optionalDependencies:
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 8.34.1(eslint@8.57.1)(typescript@5.8.3)
|
||||
eslint: 8.57.1
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
|
||||
eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1):
|
||||
dependencies:
|
||||
'@rtsao/scc': 1.1.0
|
||||
array-includes: 3.1.9
|
||||
|
@ -18493,7 +18493,7 @@ snapshots:
|
|||
doctrine: 2.1.0
|
||||
eslint: 8.57.1
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.34.1(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
||||
hasown: 2.0.2
|
||||
is-core-module: 2.16.1
|
||||
is-glob: 4.0.3
|
||||
|
|
Loading…
Reference in New Issue