1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Added Findify v6.9.15 and detection of framework-bundles

This commit is contained in:
nobody42
2020-03-24 08:03:08 +01:00
parent 7007aee18a
commit 447c6d2c97
26 changed files with 3869 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ requestAnalyzer._matchBasePath = function (hostMappings, channelPath) {
requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) {
let resourcePath, versionNumber, resourcePattern;
let resourcePath, versionNumber, resourcePattern, filename, bundle;
resourcePath = channelPath.replace(basePath, '');
@@ -122,11 +122,19 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
version = versionNumber && versionNumber[0] || targetPath.match(Resource.VERSION_EXPRESSION);
}
// Get bundle name
bundle = helpers.determineBundle(channelPath);
if(bundle !== '') {
filename = channelPath.split('/').pop();
targetPath = targetPath + filename;
}
// Prepare and return a local target.
return {
'source': channelHost,
'version': version,
'path': targetPath
'path': targetPath,
'bundle': bundle
};
}
}