MCPcopy
hub / github.com/microsoft/vscode / resolveAmdNodeModulePath

Function resolveAmdNodeModulePath

src/vs/amdX.ts:231–240  ·  view source on GitHub ↗
(nodeModuleName: string, pathInsideNodeModule: string)

Source from the content-addressed store, hash-verified

229}
230
231export function resolveAmdNodeModulePath(nodeModuleName: string, pathInsideNodeModule: string): string {
232 const product = globalThis._VSCODE_PRODUCT_JSON as unknown as IProductConfiguration;
233 const isBuilt = Boolean((product ?? globalThis.vscode?.context?.configuration()?.product)?.commit);
234 const useASAR = (canASAR && isBuilt && !platform.isWeb);
235
236 const nodeModulePath = `${nodeModuleName}/${pathInsideNodeModule}`;
237 const actualNodeModulesPath = (useASAR ? nodeModulesAsarPath : nodeModulesPath);
238 const resourcePath: AppResourcePath = `${actualNodeModulesPath}/${nodeModulePath}`;
239 return FileAccess.asBrowserUri(resourcePath).toString(true);
240}

Callers 4

ensureKatexStylesMethod · 0.85
loadExternalModuleFunction · 0.85
getWasmBytesMethod · 0.85

Calls 4

BooleanEnum · 0.85
configurationMethod · 0.65
toStringMethod · 0.65
asBrowserUriMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…