Comparing version 1.0.22 to 1.0.23
{ | ||
"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])) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1662825
38507
12
+ Addedrequest@~2.12.0
+ Addedrequest@2.12.0(transitive)
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)