New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fis-scaffold-kernel

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-scaffold-kernel - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

39

lib/github.js
var util = require('./util.js');
var exports = module.exports = function (option) {
this.repos = option.repos || 'https://codeload.github.com/';
this.postfix = '/tar.gz/';
exports.repos = option.repos || 'https://codeload.github.com/';
exports.postfix = '/tar.gz/';
};
function downloadFromGithub(address, version, cb, progress) {
util.download(exports.repos + address + exports.postfix + version, {}, cb, progress);
}
function downloadFromMirror(address, version, cb, progress) {
var parts = address.split('/');
var ns = parts[0];
var repos = parts[1];
var folder = ns.substring(4);
util.download('http://fis-cloud.bj.bcebos.com/' + folder + '/' + repos + '/' + version + '/all2.tar.gz?responseContentDisposition=attachment', null, function(error) {
if (error) {
console.log('Download From Mirror fail, fallback to github self.');
return downloadFromGithub(address, version, cb, progress);
}
return cb.apply(this, arguments);
}, progress);
}
exports.prototype.download = function (id, cb, progress) {

@@ -12,3 +35,3 @@ if (!id) {

}
var util = require('./util.js');
var c = id.split('@');

@@ -18,4 +41,8 @@ if (!c[1]) {

}
var url = this.repos + c[0] + this.postfix + c[1];
util.download(url, {}, cb, progress);
};
if (c[0].indexOf('fis-components/') === 0 || c[0].indexOf('fis-scaffold/') === 0) {
return downloadFromMirror(c[0], c[1], cb, progress);
}
downloadFromGithub(c[0], c[1], cb, progress);
};

2

package.json
{
"name": "fis-scaffold-kernel",
"version": "0.0.21",
"version": "0.0.22",
"description": "fis-scaffold-kernel",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc