MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / gatherSm

Function gatherSm

src/test/common/sourceMapRepository.test.ts:48–64  ·  view source on GitHub ↗
(list: FileGlobList)

Source from the content-addressed store, hash-verified

46 });
47
48 const gatherSm = async (list: FileGlobList) => {
49 type TReturn = {
50 sourceMapUrl: string;
51 compiledPath: string;
52 };
53 const result = await r.streamChildrenWithSourcemaps<TReturn, TReturn>({
54 files: list,
55 processMap: async m => {
56 const { cacheKey, ...rest } = m;
57 expect(cacheKey).to.be.within(Date.now() - 60 * 1000, Date.now() + 1000);
58 rest.compiledPath = fixDriveLetterAndSlashes(rest.compiledPath);
59 return rest;
60 },
61 onProcessedMap: r => r,
62 });
63 return result.values.sort((a, b) => a.compiledPath.length - b.compiledPath.length);
64 };
65 const gatherSmNames = async (list: FileGlobList) => {
66 const result = await gatherSm(list);
67 return result.map(r => fixDriveLetterAndSlashes(r.compiledPath));

Callers 2

gatherSmNamesFunction · 0.85

Calls 1

fixDriveLetterAndSlashesFunction · 0.90

Tested by

no test coverage detected