(fsPath)
| 105706 | }; |
| 105707 | |
| 105708 | const resolveOfflineCacheFolder = function resolveOfflineCacheFolder(fsPath) { |
| 105709 | if (!offlineCacheFolder) { |
| 105710 | return fsPath; |
| 105711 | } |
| 105712 | |
| 105713 | const cacheRelativePath = getCachePath(fsPath); |
| 105714 | |
| 105715 | // if fsPath is not inside the cache, we shouldn't replace it (workspace) |
| 105716 | if (!cacheRelativePath) { |
| 105717 | return fsPath; |
| 105718 | } |
| 105719 | |
| 105720 | const components = cacheRelativePath.split(/\//g); |
| 105721 | const cacheEntry = components[0], |
| 105722 | internalPath = components.slice(1); |
| 105723 | |
| 105724 | |
| 105725 | return path.resolve(offlineCacheFolder, `${cacheEntry}${OFFLINE_CACHE_EXTENSION}`, internalPath.join('/')); |
| 105726 | }; |
| 105727 | |
| 105728 | const normalizePath = function normalizePath(fsPath) { |
| 105729 | return process.platform === 'win32' ? fsPath.replace(backwardSlashRegExp, '/') : fsPath; |
no test coverage detected