diff --git a/core/files.js b/core/files.js index f3350c55..d6f9d6c4 100644 --- a/core/files.js +++ b/core/files.js @@ -110,6 +110,9 @@ var files = { // MooTools 'resources/mootools/1.6.0/mootools-core.min.jsm': true, + // P2P Media Loader Core + 'resources/p2p-media-loader-core/0.6.2/p2p-media-loader-core.min.jsm': true, + // Prototype 'resources/prototype/1.7.3.0/prototype.jsm': true, diff --git a/core/mappings.js b/core/mappings.js index eefef160..f14c6142 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -158,6 +158,7 @@ var mappings = { 'moment@{version}/moment.min.': resources.moment, 'mootools@{version}/lib/mootools-core-{version}-server.': resources.mootools, 'mootools@{version}/lib/mootools-core-{version}-server.min.': resources.mootools, + 'p2p-media-loader-core@latest/build/p2p-media-loader-core.min.js': resources.p2pMediaLoaderCore, 'swfobject@{version}/index.js': resources.swfobject, 'scriptaculous-js@{version}/scriptaculous.': resources.scriptaculous, 'underscore@{version}/underscore.': resources.underscore, diff --git a/core/request-analyzer.js b/core/request-analyzer.js index 82553e3b..37839098 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -106,7 +106,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber); // Replace the requested version with the latest depending on major version - version = helpers.setLastVersion(targetPath, versionNumber); + version = helpers.setLastVersion(targetPath, versionNumber).toString(); targetPath = targetPath.replace(versionNumber, version); hostShorthands = shorthands[channelHost]; @@ -132,7 +132,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel // Prepare and return a local target. return { 'source': channelHost, - 'version': version.toString(), + 'version': version, 'path': targetPath, 'bundle': bundle }; diff --git a/core/resources.js b/core/resources.js index 23738e18..b47cf5d1 100644 --- a/core/resources.js +++ b/core/resources.js @@ -149,6 +149,11 @@ var resources = { 'path': 'resources/mootools/{version}/mootools-core.min.jsm', 'type': 'application/javascript' }, + // P2P Media Loader Core + 'p2pMediaLoaderCore': { + 'path': 'resources/p2p-media-loader-core/{version}/p2p-media-loader-core.min.jsm', + 'type': 'application/javascript' + }, // page.js 'pageJs': { 'path': 'resources/page.js/{version}/page.min.jsm', diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index a5ca8020..6de83419 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -246,6 +246,8 @@ helpers.determineResourceName = function (filename) { return 'Modernizr'; case 'mootools-yui-compressed.jsm': return 'MooTools'; + case 'p2p-media-loader-core.min.jsm': + return 'P2P Media Loader Core'; case 'page.min.jsm': return 'page.js'; case 'prototype.jsm': @@ -316,11 +318,11 @@ helpers.formatVersion = function (version) { } }; -helpers.setLastVersion = function (type, versionNumber) { +helpers.setLastVersion = function (type, version) { - let version, requestVersion; - if(versionNumber != null && versionNumber != undefined) { - requestVersion = versionNumber.toString(); + let requestVersion; + if(version != null && version != undefined) { + requestVersion = version.toString(); } if (type.includes('/angularjs/1.')) { version = '1.7.9'; @@ -382,6 +384,8 @@ helpers.setLastVersion = function (type, versionNumber) { version = '2.24.0'; } else if (type.includes('/mootools/1.')) { version = '1.6.0'; + } else if (type.includes('p2p-media-loader-core')) { + version = '0.6.2'; } else if (type.includes('/page.js/1.')) { version = '1.7.1'; } else if (type.includes('/prototype/1.')) { diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 4f8e8571..e661dc44 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -33,6 +33,7 @@