Skip to main content

Documentation Index

Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

veryfront/utils

Internal utilities — runtime detection, structured logging, constants (breakpoints, timeouts, HTTP codes), hashing, memoization, and feature flags.

Import

import {
  __registerTraceContextGetter,
  computeCodeHash,
  computeHash,
  computeIntegrity,
  createJobUserLogger,
  createLockfileManager,
} from "veryfront/utils";

Examples

Structured logging

import { serverLogger } from "veryfront/utils";

serverLogger.info("Booting server", { project_id: "proj_123" });

Exports

Components

NameDescriptionSource
BREAKPOINT_LGShared breakpoint lg value.source
BREAKPOINT_MDShared breakpoint md value.source
BREAKPOINT_SMShared breakpoint sm value.source
BREAKPOINT_XLShared breakpoint xl value.source
BYTES_PER_KBShared bytes per kb value.source
DEFAULT_ALLOWED_CDN_HOSTSDefault value for allowed cdn hosts.source
DEFAULT_BUILD_CONCURRENCYDefault value for build concurrency.source
DEFAULT_DASHBOARD_PORTDefault port for development dashboard (matches veryfront.config.ts default)source
DEFAULT_LRU_MAX_ENTRIESDefault value for lru max entries.source
DEV_SERVER_ENDPOINTSShared dev server endpoints value.source
FORBIDDEN_PATH_PATTERNSShared forbidden path patterns value.source
HASH_SEED_DJB2Shared hash seed djb2 value.source
HASH_SEED_FNV1AShared hash seed fnv1 a value.source
HMR_CLIENT_RELOAD_DELAY_MSShared HMR client reload delay ms value.source
HMR_CLOSE_MESSAGE_TOO_LARGEShared HMR close message too large value.source
HMR_CLOSE_NORMALShared HMR close normal value.source
HMR_CLOSE_RATE_LIMITShared HMR close rate limit value.source
HMR_MAX_MESSAGE_SIZE_BYTESShared HMR max message size bytes value.source
HMR_MAX_MESSAGES_PER_MINUTEShared HMR max messages per minute value.source
HMR_RATE_LIMIT_WINDOW_MSShared HMR rate limit window ms value.source
HTTP_BAD_REQUESTShared HTTP bad request value.source
HTTP_CONTENT_TYPE_IMAGE_GIFShared HTTP content type image gif value.source
HTTP_CONTENT_TYPE_IMAGE_ICOShared HTTP content type image ico value.source
HTTP_CONTENT_TYPE_IMAGE_JPEGShared HTTP content type image jpeg value.source
HTTP_CONTENT_TYPE_IMAGE_PNGShared HTTP content type image png value.source
HTTP_CONTENT_TYPE_IMAGE_SVGShared HTTP content type image svg value.source
HTTP_CONTENT_TYPE_IMAGE_WEBPShared HTTP content type image webp value.source
HTTP_CONTENT_TYPESShared HTTP content types value.source
HTTP_MODULE_FETCH_TIMEOUT_MSShared HTTP module fetch timeout ms value.source
HTTP_NETWORK_CONNECT_TIMEOUTShared HTTP network connect timeout value.source
HTTP_NOT_FOUNDShared HTTP not found value.source
HTTP_NOT_IMPLEMENTEDShared HTTP not implemented value.source
HTTP_OKShared HTTP ok value.source
HTTP_REDIRECT_FOUNDShared HTTP redirect found value.source
HTTP_SERVER_ERRORShared HTTP server error value.source
HTTP_STATUS_CLIENT_ERROR_MINShared HTTP status client error min value.source
HTTP_STATUS_REDIRECT_MINShared HTTP status redirect min value.source
HTTP_STATUS_SERVER_ERROR_MINShared HTTP status server error min value.source
HTTP_STATUS_SUCCESS_MINShared HTTP status success min value.source
HTTP_UNAVAILABLEShared HTTP unavailable value.source
IMAGE_OPTIMIZATIONShared image optimization value.source
MAX_BATCH_SIZE****** Batch limits *******source
MAX_PATH_LENGTHMaximum value for path length.source
MAX_PATH_TRAVERSAL_DEPTHMaximum value for path traversal depth.source
MS_PER_SECONDShared ms per second value.source
PREFETCH_DEFAULT_DELAY_MSShared prefetch default delay ms value.source
PREFETCH_DEFAULT_TIMEOUT_MSShared prefetch default timeout ms value.source
PREFETCH_MAX_SIZE_BYTESShared prefetch max size bytes value.source
REACT_DEFAULT_VERSIONShared React default version value.source
RESPONSIVE_IMAGE_WIDTH_LGShared responsive image width lg value.source
RESPONSIVE_IMAGE_WIDTHSShared responsive image widths value.source
RSC_MANIFEST_CACHE_TTL_MSShared RSC manifest cache ttl ms value.source
TSX_LAYOUT_MAX_ENTRIESShared TSX layout max entries value.source
VERSIONShared version value.source
Z_INDEX_DEV_INDICATORShared z index dev indicator value.source
Z_INDEX_ERROR_OVERLAYShared z index error overlay value.source

Functions

NameDescriptionSource
__registerTraceContextGetterRegister the trace context getter. Called by trace-bridge.ts after OTLP initialization.source
computeCodeHashCompute code hash.source
computeHashCompute hash.source
computeIntegrityCompute integrity.source
createJobUserLoggerCreate job user logger.source
createLockfileManagerCreate lockfile manager.source
endRequestRequest payload for end.source
fnv1aHashFNV-1a hash for strings - returns hex stringsource
getBundleManifestStoreReturn bundle manifest store.source
getDenoStdNodeBaseReturn Deno std node base.source
getReactImportMapReturn React import map.source
hasBunRuntimeCheck whether Bun runtime is present.source
hasDenoRuntimeCheck whether Deno runtime is present.source
hasNodeProcessCheck whether node process is present.source
isCompiledBinaryDetect if the code is running in a compiled Deno binarysource
isEnabledCheck whether request performance timing is enabled.source
isRSCEnabledCheck whether RSC is enabled.source
memoizeMemoize.source
memoizeAsyncMemoize async.source
memoizeHashFNV-1a hash algorithm for fast cache key generation. 10-15x faster than JSON.stringify() and uses 70-80% less memory.source
normalizePathNormalizes path.source
parallelMapRun parallel map.source
refreshLoggerConfigRe-read logger configuration from environment variables. Call after loading .env files so the logger picks up any overrides.source
runWithRequestContextAsyncRun with request context async.source
shortHashCreate short hash.source
simpleHashCreate simple hash.source
startRequestRequest payload for start.source
startTimerStarts timer.source
timeAsyncTime async.source

Classes

NameDescriptionSource
MemoCacheImplement memo cache.source

Types

NameDescriptionSource
BundleCodePublic API contract for bundle code.source
BundleMetadataPublic API contract for bundle metadata.source
GlobalWithBunPublic API contract for global with Bun.source
GlobalWithDenoPublic API contract for global with Deno.source
GlobalWithProcessPublic API contract for global with process.source
HashBundleCodeSource bundle content used for hash computation.source
LockfileManagerPublic API contract for lockfile manager.source
LoggerPublic API contract for logger.source
RequestContextContext for request.source

Constants

NameDescriptionSource
agentLoggerShared agent logger value.source
bundlerLoggerShared bundler logger value.source
loggerShared logger value.source
rendererLoggerShared renderer logger value.source
serverLoggerShared server logger value.source