mirror of
https://github.com/tale/headplane.git
synced 2026-08-28 07:57:03 +00:00
chore: remove faker-js dependency
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { faker } from "@faker-js/faker";
|
|
||||||
import { Loader2, WifiOff } from "lucide-react";
|
import { Loader2, WifiOff } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { data, isRouteErrorResponse, type ShouldRevalidateFunction } from "react-router";
|
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) {
|
function generateHostname(username: string) {
|
||||||
const adjective = faker.word.adjective({ length: { min: 3, max: 6 } });
|
const hex = crypto.randomUUID().replace(/-/g, "").slice(0, 8);
|
||||||
const noun = faker.word.noun({ length: { min: 3, max: 6 } });
|
return `ssh-${hex}-${username}`;
|
||||||
return `ssh-${adjective}-${noun}-${username}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const links: Route.LinksFunction = () => [
|
export const links: Route.LinksFunction = () => [
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
"yaml": "2.8.2"
|
"yaml": "2.8.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@faker-js/faker": "10.3.0",
|
|
||||||
"@react-router/dev": "^7.13.1",
|
"@react-router/dev": "^7.13.1",
|
||||||
"@shopify/lang-jsonc": "^1.0.1",
|
"@shopify/lang-jsonc": "^1.0.1",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
|
|||||||
Generated
-9
@@ -122,9 +122,6 @@ importers:
|
|||||||
specifier: 2.8.2
|
specifier: 2.8.2
|
||||||
version: 2.8.2
|
version: 2.8.2
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@faker-js/faker':
|
|
||||||
specifier: 10.3.0
|
|
||||||
version: 10.3.0
|
|
||||||
'@react-router/dev':
|
'@react-router/dev':
|
||||||
specifier: ^7.13.1
|
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)
|
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]
|
cpu: [x64]
|
||||||
os: [win32]
|
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':
|
'@floating-ui/core@1.7.5':
|
||||||
resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==}
|
resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==}
|
||||||
|
|
||||||
@@ -5069,8 +5062,6 @@ snapshots:
|
|||||||
'@esbuild/win32-x64@0.27.3':
|
'@esbuild/win32-x64@0.27.3':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@faker-js/faker@10.3.0': {}
|
|
||||||
|
|
||||||
'@floating-ui/core@1.7.5':
|
'@floating-ui/core@1.7.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@floating-ui/utils': 0.2.11
|
'@floating-ui/utils': 0.2.11
|
||||||
|
|||||||
Reference in New Issue
Block a user