MCPcopy Index your code
hub / github.com/CoderLine/alphaTab / encodeWorkerAssetFileName

Function encodeWorkerAssetFileName

packages/vite/src/bridge/worker.ts:80–87  ·  view source on GitHub ↗
(fileName: string, workerCache: WorkerCache)

Source from the content-addressed store, hash-verified

78
79// https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/plugins/worker.ts#L149
80function encodeWorkerAssetFileName(fileName: string, workerCache: WorkerCache): string {
81 const { fileNameHash } = workerCache;
82 const hash = getHash(fileName);
83 if (!fileNameHash.get(hash)) {
84 fileNameHash.set(hash, fileName);
85 }
86 return `${WORKER_ASSET_ID}${hash}__`;
87}
88
89async function bundleWorkerEntry(config: ResolvedConfig, id: string): Promise<BundledWorkerChunk> {
90 const input = cleanUrl(id);

Callers 1

workerFileToUrlFunction · 0.85

Calls 3

getHashFunction · 0.90
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected