Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amrkmn/x
/ functions
Functions
149 in github.com/amrkmn/x
⨍
Functions
149
◇
Types & classes
37
↓ 55 callers
Method
info
(scope: string, message: string, ...args: unknown[])
scripts/log.ts:288
↓ 20 callers
Method
error
(scope: string, message: string, ...args: unknown[])
scripts/log.ts:296
↓ 16 callers
Function
asString
(value: unknown, path: string)
src/lib/validation.ts:7
↓ 11 callers
Method
log
(level: LogLevel, message: string, ...args: unknown[])
scripts/log.ts:86
↓ 10 callers
Function
calculateFileChecksum
(filePath: string)
scripts/cache/files.ts:7
↓ 9 callers
Function
fileExists
(client: S3Client, key: string)
scripts/cache/client.ts:53
↓ 8 callers
Function
formatBytes
(bytes: number)
tests/cache-format.test.ts:5
↓ 8 callers
Method
progress
(current: number, bytes?: number)
scripts/log.ts:204
↓ 7 callers
Method
complete
(stats: { valid?: number; invalid?: number; missing?: number; bytes?: number })
scripts/log.ts:231
↓ 7 callers
Function
findExtensionUpdates
( data: ExtensionsData, options: FindExtensionUpdatesOptions )
scripts/extensions.ts:226
↓ 7 callers
Function
generateCacheKey
()
scripts/cache/utils.ts:71
↓ 7 callers
Method
message
(scope: string, message: string)
scripts/log.ts:68
↓ 7 callers
Function
writeJsonToS3
(key: string, data: any)
scripts/cache/utils.ts:78
↓ 6 callers
Function
createExtensionsData
()
tests/update-pipeline.test.ts:21
↓ 6 callers
Function
ensureDir
(dir: string)
scripts/cache/files.ts:164
↓ 6 callers
Function
formatSourceName
(sourceName: string)
src/lib/search/utils.ts:4
↓ 6 callers
Function
formatTransferStats
( bytes: number, elapsedSeconds: number, totalBytes?: number )
scripts/log.ts:40
↓ 6 callers
Function
generateInstanceId
()
scripts/cache/lock.ts:16
↓ 6 callers
Function
getObject
(client: S3Client, key: string)
scripts/cache/client.ts:61
↓ 6 callers
Function
isLockStale
(lock: CacheLock, currentHostname: string)
tests/cache-lock.test.ts:43
↓ 6 callers
Function
parseSourceUrlExt
(source: string)
tests/extensions-source.test.ts:99
↓ 5 callers
Function
asRecord
(value: unknown, path: string)
src/lib/validation.ts:37
↓ 5 callers
Function
fetch
(request: Request, env: any)
scripts/worker.ts:2
↓ 5 callers
Function
getMetadataKey
(cacheKey: string)
scripts/cache/metadata.ts:10
↓ 5 callers
Function
getMetadataKey
(cacheKey: string)
tests/cache-metadata.test.ts:5
↓ 5 callers
Function
loadManifest
(s3: S3Client)
scripts/cache/manifest.ts:9
↓ 4 callers
Function
cleanupDir
(dir: string)
scripts/cache/files.ts:170
↓ 4 callers
Method
counter
( scope: string, label: string, totalItems: number, totalBytes?: number,
scripts/log.ts:304
↓ 4 callers
Function
debounce
( func: T, wait: number )
src/lib/search/debounce.ts:5
↓ 4 callers
Function
deleteObject
(client: S3Client, key: string)
scripts/cache/client.ts:66
↓ 4 callers
Function
findCacheByKey
(manifest: CacheManifest, key: string)
scripts/cache/manifest.ts:62
↓ 4 callers
Function
findSourceByFormattedName
( formattedName: string, availableSources: string[] )
src/lib/search/utils.ts:11
↓ 4 callers
Function
getClient
()
scripts/cache/client.ts:37
↓ 4 callers
Function
persistQuickUpdates
(updated: boolean)
scripts/task.ts:65
↓ 4 callers
Function
runTask
(args = process.argv.slice(2))
scripts/task.ts:183
↓ 4 callers
Function
setupTestRepo
(dir: string, files: Record<string, string> = {})
tests/update-pipeline.test.ts:54
↓ 4 callers
Method
warn
(scope: string, message: string, ...args: unknown[])
scripts/log.ts:292
↓ 3 callers
Function
asArray
(value: unknown, path: string)
src/lib/validation.ts:30
↓ 3 callers
Function
asString
(value: unknown, path: string)
scripts/validation.ts:7
↓ 3 callers
Method
endProgressLine
()
scripts/log.ts:105
↓ 3 callers
Function
findCacheByPrefix
(manifest: CacheManifest, prefix: string)
scripts/cache/manifest.ts:66
↓ 3 callers
Function
generateDataJson
( data?: ExtensionsData, options: GenerateDataOptions = {} )
scripts/extensions.ts:159
↓ 3 callers
Function
isRecord
(value: unknown)
scripts/validation.ts:3
↓ 3 callers
Function
loadExtensionsData
(path = EXTENSIONS_FILE)
scripts/extensions.ts:79
↓ 3 callers
Function
loadMetadata
(s3: S3Client, cacheKey: string)
scripts/cache/metadata.ts:76
↓ 3 callers
Function
parseAppData
(value: unknown)
src/lib/validation.ts:90
↓ 3 callers
Function
restoreStaticCache
()
scripts/task.ts:53
↓ 3 callers
Function
saveManifest
(manifest: CacheManifest)
scripts/cache/manifest.ts:30
↓ 3 callers
Method
transfer
(prefix: string, totalBytes?: number)
scripts/log.ts:300
↓ 3 callers
Function
updateMeilisearch
()
scripts/meilisearch.ts:7
↓ 2 callers
Function
asOptionalString
(value: unknown, path: string)
src/lib/validation.ts:22
↓ 2 callers
Function
cacheExists
(s3: S3Client, key: string)
scripts/cache/s3.ts:18
↓ 2 callers
Function
checksumFiles
(paths: string[])
scripts/cache/files.ts:138
↓ 2 callers
Function
cleanupStaleCache
(s3: S3Client, key: string)
scripts/cache/s3.ts:20
↓ 2 callers
Function
collectFileEntries
( paths: string[] )
scripts/cache/files.ts:83
↓ 2 callers
Function
compressToTar
( paths: string[], outputPath: string )
scripts/cache/files.ts:103
↓ 2 callers
Function
deleteMetadata
(s3: S3Client, cacheKey: string)
scripts/cache/metadata.ts:127
↓ 2 callers
Method
elapsedSeconds
()
scripts/log.ts:200
↓ 2 callers
Function
expectSingleDebouncedResult
(results: number[], expected: number)
tests/debounce.test.ts:4
↓ 2 callers
Function
extractTar
(tarPath: string, destPath = '.')
scripts/cache/files.ts:53
↓ 2 callers
Function
findCachesByPrefix
(manifest: CacheManifest, prefix: string)
scripts/cache/manifest.ts:71
↓ 2 callers
Function
formatBytes
(bytes: number)
scripts/cache.ts:26
↓ 2 callers
Function
initMinisearch
(extensions: EnrichedExtension[])
src/lib/search/minisearch.ts:12
↓ 2 callers
Method
message
(bytes: number)
scripts/log.ts:149
↓ 2 callers
Function
parseExtension
(value: unknown, path: string)
src/lib/validation.ts:50
↓ 2 callers
Function
parseExtensionsData
( value: unknown )
scripts/validation.ts:38
↓ 2 callers
Function
parseSearchIndex
(value: unknown)
src/lib/validation.ts:118
↓ 2 callers
Function
parseSourceUrl
(source: string)
scripts/extensions.ts:193
↓ 2 callers
Method
prefix
(scope: string)
scripts/log.ts:62
↓ 2 callers
Method
progressPrefix
(prefix: string)
scripts/log.ts:72
↓ 2 callers
Function
removeCacheEntry
(s3: S3Client, key: string)
scripts/cache/manifest.ts:56
↓ 2 callers
Function
rewriteMirroredIndexFiles
(dest: string, key: string)
scripts/extensions.ts:55
↓ 2 callers
Function
saveExtensionsData
( data: ExtensionsData, path = EXTENSIONS_FILE )
scripts/extensions.ts:83
↓ 2 callers
Function
saveMetadata
( key: string, files: Record<string, FileMetadata>, cacheFilePath: string, timestamp?: number
scripts/cache/metadata.ts:14
↓ 2 callers
Function
saveStaticCache
()
scripts/task.ts:61
↓ 2 callers
Function
updateBothAccessTimes
( s3: S3Client, cacheKey: string, metadata: CacheMetadata )
scripts/cache/metadata.ts:109
↓ 2 callers
Function
updateExtensions
( command: 'check' | 'static' | 'full', args: string[] )
scripts/task.ts:124
↓ 2 callers
Function
uploadToS3
( key: string, data: Uint8Array | ArrayBuffer | Blob | ReadableStream<Uint8Array>, options?: {
scripts/cache/client.ts:118
↓ 1 callers
Function
acquireLock
(s3: S3Client, instanceId: string)
scripts/cache/lock.ts:70
↓ 1 callers
Function
addCacheEntry
( s3: S3Client, key: string, hash: string, timestamp: number )
scripts/cache/manifest.ts:34
↓ 1 callers
Function
applyCommitUpdates
(data: ExtensionsData, updates: ExtensionUpdate[])
scripts/extensions.ts:286
↓ 1 callers
Function
asNsfw
(value: unknown, path: string)
src/lib/validation.ts:44
↓ 1 callers
Function
asOptionalNumber
(value: unknown, path: string)
src/lib/validation.ts:14
↓ 1 callers
Function
buildEndpoint
* Builds the endpoint URL. For virtual-hosted style, the bucket is prepended * as a subdomain: https://{bucket}.{host}/... * For path-style, the ori
scripts/cache/client.ts:27
↓ 1 callers
Function
cleanupOldCaches
(s3: S3Client, prefix: string)
scripts/cache/s3.ts:58
↓ 1 callers
Function
cloneRepository
(source: string, temp: string)
scripts/extensions.ts:292
↓ 1 callers
Function
createFileUploadStream
( sourcePath: string, totalBytes: number, onProgress: (bytes: number) => void )
scripts/cache/utils.ts:85
↓ 1 callers
Function
downloadCache
(s3: S3Client, key: string, targetPath: string)
scripts/cache.ts:30
↓ 1 callers
Function
downloadFileFromS3
( s3: S3Client, key: string, targetPath: string )
scripts/cache/utils.ts:132
↓ 1 callers
Function
finalizeFullUpdate
( command: 'static' | 'full', useCache: boolean, data: Awaited<ReturnType<typeof loadExtensionsDat
scripts/task.ts:82
↓ 1 callers
Function
generateSearchIndexJson
( data: ExtensionsData, staticDir = STATIC_DIR, searchIndexFile = SEARCH_INDEX_FILE )
scripts/extensions.ts:106
↓ 1 callers
Function
getFilterOptionsFallback
()
src/lib/search/minisearch.ts:99
↓ 1 callers
Function
getGitDir
()
scripts/setup-hooks.ts:14
↓ 1 callers
Function
handleQuickUpdates
( data: Awaited<ReturnType<typeof loadExtensionsData>>, updates: Awaited<ReturnType<typeof findExtensi
scripts/task.ts:69
↓ 1 callers
Function
isInteractiveTerminal
()
scripts/log.ts:15
↓ 1 callers
Function
isLockStale
* Checks if a lock is stale based on Restic's algorithm: * 1. If timestamp is older than LOCK_TIMEOUT_MS (30 min), it's stale * 2. If on same machin
scripts/cache/lock.ts:39
↓ 1 callers
Function
isProcessRunning
* Checks if a process is still running (only works on same machine). * Uses Node.js process.kill(pid, 0) which doesn't actually kill but checks exist
scripts/cache/lock.ts:24
↓ 1 callers
Function
isRecord
(value: unknown)
src/lib/validation.ts:3
↓ 1 callers
Function
loadSyncedCommits
(dataFile = DATA_FILE)
scripts/extensions.ts:209
↓ 1 callers
Function
main
()
scripts/sync.ts:5
next →
1–100 of 149, ranked by callers