diff --git a/app/routes/ssh/page.tsx b/app/routes/ssh/page.tsx index 23686c6..a46520e 100644 --- a/app/routes/ssh/page.tsx +++ b/app/routes/ssh/page.tsx @@ -1,4 +1,3 @@ -import { faker } from "@faker-js/faker"; import { Loader2, WifiOff } from "lucide-react"; import { useEffect, useState } from "react"; import { data, isRouteErrorResponse, type ShouldRevalidateFunction } from "react-router"; @@ -99,9 +98,8 @@ export async function loader({ request, params, context }: Route.LoaderArgs) { } function generateHostname(username: string) { - const adjective = faker.word.adjective({ length: { min: 3, max: 6 } }); - const noun = faker.word.noun({ length: { min: 3, max: 6 } }); - return `ssh-${adjective}-${noun}-${username}`; + const hex = crypto.randomUUID().replace(/-/g, "").slice(0, 8); + return `ssh-${hex}-${username}`; } export const links: Route.LinksFunction = () => [ diff --git a/package.json b/package.json index c990a55..49fc1e8 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "yaml": "2.8.2" }, "devDependencies": { - "@faker-js/faker": "10.3.0", "@react-router/dev": "^7.13.1", "@shopify/lang-jsonc": "^1.0.1", "@tailwindcss/vite": "^4.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a14c89..cfa3039 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -122,9 +122,6 @@ importers: specifier: 2.8.2 version: 2.8.2 devDependencies: - '@faker-js/faker': - specifier: 10.3.0 - version: 10.3.0 '@react-router/dev': specifier: ^7.13.1 version: 7.13.1(@types/node@25.3.1)(jiti@2.6.1)(lightningcss@1.32.0)(react-router@7.13.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(terser@5.39.0)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.0(@types/node@25.3.1)(esbuild@0.27.3)(jiti@2.6.1)(terser@5.39.0)(tsx@4.21.0)(yaml@2.8.2))(yaml@2.8.2) @@ -1000,10 +997,6 @@ packages: cpu: [x64] os: [win32] - '@faker-js/faker@10.3.0': - resolution: {integrity: sha512-It0Sne6P3szg7JIi6CgKbvTZoMjxBZhcv91ZrqrNuaZQfB5WoqYYbzCUOq89YR+VY8juY9M1vDWmDDa2TzfXCw==} - engines: {node: ^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0, npm: '>=10'} - '@floating-ui/core@1.7.5': resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} @@ -5069,8 +5062,6 @@ snapshots: '@esbuild/win32-x64@0.27.3': optional: true - '@faker-js/faker@10.3.0': {} - '@floating-ui/core@1.7.5': dependencies: '@floating-ui/utils': 0.2.11