Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tpm

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tpm - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

5

package.json
{
"name": "tpm",
"version": "1.0.22",
"version": "1.0.23",
"description": "Static Package Manager",

@@ -28,4 +28,5 @@ "author": "Longhao Luo <lhluo@tudou.com>",

"ssh2": "~0.2.5",
"scp2": "0.1.0"
"scp2": "0.1.0",
"request": "~2.12.0"
}
}

@@ -7,2 +7,3 @@

var ChildProcess = require('child_process');
var Request = require('request');

@@ -64,2 +65,8 @@ var Util = require(__dirname + '/../util');

// 转换成相对路径
function getRelativePath(path) {
var dirPath = Path.resolve(config.root);
return Path.relative(dirPath, path).split(Path.sep).join('/');
}
var distDirPath = Path.resolve(config.root + '/dist');

@@ -72,2 +79,29 @@

// 列出未上线的所有图片文件
if (args[0] == 'img') {
var imgList = Util.grepPaths(distDirPath + '/img', function(path) {
return /\.(jpg|png|gif|ico|swf)$/.test(path);
});
var pathCount = imgList.length;
var pathList = [];
imgList.forEach(function(path) {
var url = 'http://css.tudouui.com/v3/' + getRelativePath(path);
Request(url, function (error, response, body) {
pathCount--;
if (response.statusCode == 404) {
pathList.push(path);
Util.warn('[GET] ' + url + ' [' + response.statusCode + '] ' + pathCount);
} else {
Util.info('[GET] ' + url + ' [' + response.statusCode + '] ' + pathCount);
}
if (pathCount === 0) {
setTimeout(function() {
openEmail(config, '', pathList);
}, 0);
}
});
});
return;
}
// 根据SVN版本号输出列表

@@ -74,0 +108,0 @@ if (/^\d+$/.test(args[0])) {

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