Socket
Socket
Sign inDemoInstall

duoms

Package Overview
Dependencies
152
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.5 to 0.2.6

build/as/new.html

1

lib/duoms.js

@@ -29,2 +29,3 @@ #!/usr/bin/env node

.option('-t, --test', '发布项目到测试环境(默认值)')
.option('-a, --all', '发布项目到所有环境')
.option('-d, --dir [value]', '指定发布目录')

@@ -31,0 +32,0 @@ .action(push);

@@ -87,2 +87,8 @@ #!/usr/bin/env node

//禁用项目名
var ban = pack_info.name.replace(/\s/g, '').match(/\bdev\b/) || [];
if(ban[0]){
return console.warn(colors.warn('禁止使用'+ban[0]+'作为项目名'));
}
//遍历文件

@@ -109,3 +115,10 @@ var files = readDirRcs(root, function(file) {

oss(files, root, target);
if(cmd.all){
[path.join('dev/', pack_info.name)
,pack_info.name].forEach(function(item){
oss(files, root, path.join(item, dir));
});
} else {
oss(files, root, target);
}
}

@@ -116,2 +129,5 @@

console.log('');
console.log(colors.warn(/^dev\//.test(target) ? '测试环境' : '正式环境'));
//验证是否进行了OSS配置

@@ -191,3 +207,3 @@ var duomsPath = path.join(os.homedir(), '.duomsConfig.js');

// 打印发布信息
console.log(colors.help('发布文件: ' + file));
console.log(colors.help('发布文件: ' + (file||target)) + colors.warn(' ( http://m.fine3q.com/'+ path.join(target, file) +' )'));

@@ -212,3 +228,3 @@ // 将 Object 推送到 OSS

if (queue.length === 0) {
parseOSSRet(queue);
parseOSSRet(queue, target);
}

@@ -221,3 +237,3 @@ });

// 解析 OSS 发布结果
function parseOSSRet(queue) {
function parseOSSRet(queue, target) {
var fails = queue.ret.filter(function(item) {

@@ -228,3 +244,3 @@ return item.success === false;

console.log(
colors.help('\t共发布文件: "'),
colors.help('\t'+ colors.warn(/^dev\//.test(target) ? '测试环境' : '正式环境') +'共发布文件: "'),
colors.warn(queue.ret.length),

@@ -231,0 +247,0 @@ colors.help('" 个')

2

package.json
{
"name": "duoms",
"version": "0.2.5",
"version": "0.2.6",
"description": "剁手管理系统基础服务",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc