Commit 766b3054 by 孙亚楠

dd

parent 4521fa81
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动程序",
"program": "${workspaceFolder}/xggsve-invoice/main.js"
}
]
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ var settings = {
salt: "%iatpD1gcxz7iF#B",
defaultpwd: "987456",
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 4001,
port: process.env.NODE_PORT || 3105,
reqEsAddr: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
......
node_modules/
.idea
npm-debug.log
dump.rdb
.DS_Store
/.project
.package-lock.json
*.csv
.vscode/launch.json
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
var rule =require("../../../utils/invoiceRule/rule");
class ActionAPI extends APIBase {
constructor() {
super();
......@@ -27,74 +28,70 @@ class ActionAPI extends APIBase {
async sjbOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
case "verification": // 验证该商户是不是存在正在审核的发票
opResult = await this.applySve.apiVerificationByBusinessmenCreditCode(action_body);
break;
case "calcInvoice": // 发票试算接口
opResult = await this.applySve.apiCalcInvoice(action_body);
case "verificationAndCalculation": // 发票试算接口
opResult = await rule.dispatcher(action_body);
break;
case "saveInvoice": // 发票申请单提交接口
case "saveInvoice": // 发票保存
opResult = await this.applySve.apiSaveInvoice(action_body);
break;
case "queryApplyInvoices": // 发票申请列表(平台)
opResult = await this.applySve.apiQueryApplyInvoices(action_body);
break;
case "queryInvoices": // 发票列表(平台)
opResult = await this.invoiceSve.apiQueryInvoices(action_body);
case "queryTxPayment": //查看完税证明
opResult = await this.invoiceSve.apiQueryTxPayment(action_body);
break;
case "delivererApplyInvoices": //发票申请列表(交付商)
opResult = await this.delivererSve.apiDelivererApplyInvoices(action_body);
case "apiCancelInvoice": // 发票申请单撤回
opResult = await this.applySve.apiCancelInvoice(action_body);
break;
case "delivererInvoices": //发票列表(交付商)
opResult = await this.delivererSve.apiDelInvs(action_body);
break;
case "queryInvoice": // 发票明细(平台)
opResult = await this.applySve.apiQueryInvoice(action_body);
break;
case "queryInvoiceDeliverer": // 发票明细(交付商)
opResult = await this.delivererSve.apiQueryInvoiceDeliverer(action_body);
case "queryApplyInvoices": // 发票申请列表(平台)
opResult = await this.applySve.apiQueryApplyInvoices(action_body);
break;
case "apiCancelInvoice": // 发票申请单撤回
opResult = await this.applySve.apiCancelInvoice(action_body);
case "queryInvoices": // 发票列表(平台)
opResult = await this.invoiceSve.apiQueryInvoices(action_body);
break;
case "queryProcess": // 查看业务办理(平台)
opResult = await this.delivererSve.apiQueryProcess(action_body);
case "queryInvoice": // 发票明细(平台)
opResult = await this.applySve.apiQueryInvoice(action_body);
break;
case "platformAssignment": // 平台审批
case "platformAssignment": // 平台审批
opResult = await this.applySve.apiAssignment(action_body);
break;
case "delivererAssignment": //交付商审批
opResult = await this.delivererSve.apiAssignment(action_body);
break;
case "txPayment": //完税证明更新
opResult = await this.invoiceSve.apiTxPayment(action_body);
case "updateEmail": //平台更新邮寄地址
opResult = await this.delivererSve.apiUpEmNo(action_body);
break;
case "queryTxPayment": //完税证明更新
opResult = await this.invoiceSve.apiQueryTxPayment(action_body);
case "queryProcess": // 查看业务办理(平台)
opResult = await this.delivererSve.apiQueryProcess(action_body);
break;
case "redRushInvoice": //红冲
case "redRushInvoice": //红冲
opResult = await this.applySve.apiRedRushInvoice(action_body);
break;
case "updateEmail": //平台更新邮寄地址
opResult = await this.delivererSve.apiUpEmNo(action_body);
break;
case "statTransData": //交易数据
case "statTransData": //交易数据
opResult = await this.applySve.apiStatTransData(action_body);
break;
case "statBusinessData": //发票办理
case "statBusinessData": //发票办理
opResult = await this.applySve.apiStatBusinessData(action_body);
break;
case "statDeliverData": //交付商业务概览
case "statDeliverData": //交付商业务概览
opResult = await this.delivererSve.apiStatDeliverData(action_body);
break;
case "delStatTransData": //交易数据(交付商)
case "delivererApplyInvoices": //发票申请列表(交付商)
opResult = await this.delivererSve.apiDelivererApplyInvoices(action_body);
break;
case "delivererInvoices": //发票列表(交付商)
opResult = await this.delivererSve.apiDelInvs(action_body);
break;
case "queryInvoiceDeliverer": // 发票明细(交付商)
opResult = await this.delivererSve.apiQueryInvoiceDeliverer(action_body);
break;
case "delivererAssignment": //交付商审批
opResult = await this.delivererSve.apiAssignment(action_body);
break;
case "txPayment": //完税证明更新
opResult = await this.invoiceSve.apiTxPayment(action_body);
break;
case "delStatTransData": //交易数据(交付商)
opResult = await this.delivererSve.apiDelStatTransData(action_body);
break;
case "delStatBusinessData": //发票办理(交付商)
case "delStatBusinessData": //发票办理(交付商)
opResult = await this.delivererSve.apiDelStatBusinessData(action_body);
break;
default:
......
......@@ -19,6 +19,7 @@ module.exports = (db, DataTypes) => {
merchantAccount: {type: DataTypes.STRING,field: 'merchant_account', allowNull: false, comment:'账号' },
//销售方信息
businessmenType:{type: DataTypes.STRING,field: 'businessmen_type', allowNull: false, comment:'销售方类型 10 个体工商户 20 自然人' },
businessmenId:{type: DataTypes.STRING,field: 'businessmen_id', allowNull: false, comment:'销售方id' },
businessmenCreditCode:{type: DataTypes.STRING,field: 'businessmen_credit_code', allowNull: false, comment:'个体户社会统一信息用代码' },
businessmenName:{type: DataTypes.STRING,field: 'businessmen_name', allowNull: false, comment:'销售方名称' },
......@@ -32,6 +33,8 @@ module.exports = (db, DataTypes) => {
//发票信息
// invoiceNo:{type: DataTypes.STRING,field: 'invoice_no', allowNull: true, comment:'发票编号' },
type:{type: DataTypes.INTEGER,field: 'type', allowNull: false, defaultValue:10, comment:'发票类型:10 普通发票 20 增值税专用发票 30 电子发票' },
ruleCode:{type: DataTypes.STRING,field: 'rule_code', allowNull: false, comment:'算法编码 10 个体工商户算法 20 自然人算法 ...'},
ruleParams:{type: DataTypes.STRING,field: 'rule_params', allowNull: false, comment:'算法参数编码 10 个体工商户算法参数 20 自然人算法参数 ...'},
invoiceAmount:{type: DataTypes.BIGINT,field: 'invoice_amount', allowNull: false, comment:'发票总额' },
statements:{type: DataTypes.STRING,field: 'statements', allowNull: false, comment:'结算单' },
contract:{type: DataTypes.STRING,field: 'contract', allowNull: false, comment:'合同' },
......
......@@ -8,18 +8,20 @@ module.exports = (db, DataTypes) => {
return db.define("invoice", {
applyNo:{type: DataTypes.STRING,field: 'apply_no', allowNull: false, comment:'发票申请号' },
merchantId: {type: DataTypes.STRING,field: 'merchant_id', allowNull: true, comment:'个体工商户id(购买方id)' },
businessmenType:{type: DataTypes.STRING,field: 'businessmen_type', allowNull: false, comment:'销售方类型 10 个体工商户 20 自然人' },
businessmenId:{type: DataTypes.STRING,field: 'businessmen_id', allowNull: false, comment:'销售方id' },
ruleCode:{type: DataTypes.STRING,field: 'rule_code', allowNull: false, comment:'算法编码 10 个体工商户算法 20 自然人算法 ...'},
ruleParams:{type: DataTypes.STRING,field: 'rule_params', allowNull: false, comment:'算法参数编码 10 个体工商户算法参数 20 自然人算法参数 ...'},
status:{ type: DataTypes.INTEGER, field: 'status', allowNull: true, comment:'审核状态 1030 待处理 1040 交付商关闭 1050 已开具 1060 代审核 1070 审核通过 1080 已邮寄'},
//已开具
invoiceNo:{type: DataTypes.STRING,field: 'invoice_no', allowNull: true, comment:'发票编号' },
invoiceTime: { type: DataTypes.DATE, field: 'invoice_time', allowNull: true, defaultValue: DataTypes.NOW,comment:'开票时间',
get() {
let res = moment(this.getDataValue('updatedAt')).add(8).format('YYYY-MM-DD HH:mm:ss');
return res;
}
},
invoiceTime: { type: DataTypes.DATE, field: 'invoice_time', allowNull: true, defaultValue: DataTypes.NOW,comment:'开票时间'},
invoiceImg:{type: DataTypes.STRING,field: 'invoice_img', allowNull: true, comment:'发票照片' },
//拒绝原因
//reason:{type: DataTypes.STRING,field: 'reason', allowNull: true, comment:'拒绝原因' },
//完税
taxNo:{type: DataTypes.STRING,field: 'tax_no', allowNull: true, comment:'完税批号'},
complateTax: {type:DataTypes.INTEGER,field: 'complate_tax', allowNull: true, defaultValue:0,comment:'是否完税 0 未完成 1 已完成',
......@@ -28,30 +30,14 @@ module.exports = (db, DataTypes) => {
var v = isInvalid=='1'?"已完成":"未完成";
return v;
},},
taxTime: { type: DataTypes.DATE, field: 'tax_time', allowNull: true, defaultValue: DataTypes.NOW,comment:'完税时间',
get() {
let res = moment(this.getDataValue('taxTime')).add(8).format('YYYY-MM-DD HH:mm:ss');
return res;
}},
taxTime: { type: DataTypes.DATE, field: 'tax_time', allowNull: true, defaultValue: DataTypes.NOW,comment:'完税时间'},
taxVoucher:{type: DataTypes.STRING,field: 'tax_voucher', allowNull: true, comment:'完税照片' },
//邮寄相关
mailNo:{type: DataTypes.STRING,field: 'mail_no', allowNull: true, comment:'快递单号' },
redStatus:{ type: DataTypes.STRING, field: 'red_status', allowNull: false, defaultValue: '1',
comment:'红冲状态 1:未红冲 2:红冲中 3 红冲失败 4 红冲成功'
},
createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW,comment:'发票创建时间',
get() {
let res = moment(this.getDataValue('createdAt')).add(8).format('YYYY-MM-DD HH:mm:ss');
return res;
}},
updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW ,comment:'更新时间',
get() {
let res = moment(this.getDataValue('updatedAt')).add(8).format('YYYY-MM-DD HH:mm:ss');
return res;
}},
redStatus:{ type: DataTypes.STRING, field: 'red_status', allowNull: false, defaultValue: '1',comment:'红冲状态 1:未红冲 2:红冲中 3 红冲失败 4 红冲成功' },
createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW,comment:'发票创建时间'},
updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW ,comment:'更新时间'},
deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true, comment:'删除时间'},
},{
timestamps: true,
......
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const Decimal = require('decimal.js');
const moment = require('moment');
var rule =require("../../../utils/invoiceRule/rule");
const Decimal = require('decimal.js');
class ApplyService extends ServiceBase {
constructor() {
super("invoice", ServiceBase.getDaoName(ApplyService));
......@@ -21,68 +22,7 @@ class ApplyService extends ServiceBase {
/**
* 保存发票信息
* @param {*} params 参数
* params:{
* invoiceAmount:100000, //发票金额
* invoiceTime:"2019-12-12", //开票时间
* serviceRate:"0.03", //服务费率
* businessmenId:1, //商户id
* perCalWay:1, //个税计算方式 1:年
* valCalWay:1, //增值税计算方式 1:月 2:季度
* taxIncPriRat:0.03, //不含税价百分比
* taxCostPriRat:0.96, //核定成本费用率
* perIncTaxRange:[ //税额范围
* {
* minValue:0,
* rate:"0",
* quiCalDed:0,
* maxValue:3000000
* }
* ],
* valAddTaxRange:[
* {
* minValue:0,
* zengzhiRate:0,
* fujiaRate:0,
* maxValue:3000000
* }
* ],
* merchantId:xxx, //商户id 可以为空
* merchantName:xxx, //抬头
* merchantCreditCode:xxx,//纳税人识别号
* merchantAddr:xxx, //地址
* merchantMobile:xxx, //电话
* merchantBank:xxx, //开户行
* mercahntAccount:xxx, //开户账号
* businessmenCreditCode:xxx, //销售方社会统一信用代码
* businessName:xxx, //销售方名称
* isBank:xxx, //销售方是否开户
* taxAuthorities:xxx, //税务报道机构
*
* invoiceNo:xxx, //发票编号,
* type:1, //发票类型 10 普通发票 20 增值税专用发票 30 电子发票
* statements:xxx, //结算单子
* contract:xxx, //合同
* settleImg:xxx, //开票凭证
* applyId:xxx, //开票申请id 如果是红冲状态则需要传
* invoiceContent:xxx, //开票内容
*
* personalIncomeTax:xxx, //个税 不需要
* additionalTax:xxx, //附加税 不需要
* valueAddedTax:xxx, //增值税 不需要
* serviceCharge:xxx, //服务费 不需要
*
* applyMobile:xxx, //申请电话
*
* payWay:xxx, //付款方式
* payAccount:xxx, //付款账户
* isPay:xxx, //是否付款
*
* mailAddr:xxx, //邮寄地址
* mailMobile:xxx, //邮寄电话
* mailTo:xxx, //邮寄人
* }
*/
*/
async apiSaveInvoice(params) {
try {
let res = await this.saveInvoice(params);
......@@ -91,45 +31,6 @@ class ApplyService extends ServiceBase {
return system.getResult(null, `系统错误 错误信息:${error}`);
}
}
/**
* 计算各种费率(试算)
* @param {*} pobj
* @param {*}
* params:{
* invoiceAmount:100000, //发票金额
* invoiceTime:"2019-12-12", //开票时间
* businessmenCreditCode:"xxx", //纳税人识别号
* serviceRate:"0.03", //服务费率
* businessmenId:1, //商户id
* perCalWay:1, //个税计算方式 1:年
* valCalWay:1, //增值税计算方式 1:月 2:季度
* taxIncPriRat:0.03, //不含税价百分比
* taxCostPriRat:0.96, //核定成本费用率
* perIncTaxRange:[
* {
* minValue:0,
* rate:"0",
* quiCalDed:0,
* maxValue:3000000
* }
* ],
* valAddTaxRange:[
* {
* minValue:0,
* zengzhiRate:0,
* fujiaRate:0,
* maxValue:3000000
* }
* ],
* }*/
async apiCalcInvoice(params) {
let result = await this.calcInvoice(params);
if (!result.hasOwnProperty('status')) {
return system.getResult(result);
}
return result;
}
/**
* 查询申请列表(平台)
......@@ -162,6 +63,7 @@ class ApplyService extends ServiceBase {
}
}
/**
* 发票撤回
* @param params
......@@ -247,7 +149,7 @@ class ApplyService extends ServiceBase {
try {
return await this.statTransData(params);
} catch (error) {
return system.getResult(-1,`系统错误 错误信息 ${error}`);
return system.getResult(-1, `系统错误 错误信息 ${error}`);
}
}
......@@ -263,7 +165,49 @@ class ApplyService extends ServiceBase {
return system.getResult(null, "接口异常");
}
}
//===========================================================================================
/**
* 插入发票
* @param {*} params
*/
async saveInvoice(params) {
try {
//试算
let val = await rule.dispatcher(params);
params.personalIncomeTax = this.trim(val.personalIncomeTax);
params.additionalTax = this.trim(val.additionalTax);
params.valueAddedTax = this.trim(val.valueAddedTax);
params.serviceCharge = this.trim(val.serviceCharge);
params.isPay = (params.isPay) ? 1 : 0;
params.status = "1000";
params.customerStatus = "1000";
params.ruleCode = this.trim(params.ruleCode);
params.ruleParams = JSON.stringify(params.ruleParams);
await this.db.transaction(async (t) => {
//插入发票申请单
let _apply = await this.dao.create(params, t);
//插入一条发票信息
await this.invoiceDao.model.create({
id: _apply.id,
applyNo: _apply.applyNo,
merchantId: _apply.merchantId,
businessmenId: params.businessmenId,
businessmenType: params.businessmenType,
ruleCode: params.ruleCode,
ruleParams: params.ruleParams
}, t);
});
return system.getResultSuccess();
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 发票办理(平台)
* @param {*} params
......@@ -284,7 +228,7 @@ class ApplyService extends ServiceBase {
// 先按照订单状态查
var statMap = await this.dao.statByStatus(begin, end);
// 已开具 1050
result.completeCount = this.addStatCount(statMap, ['1050']);
// 待申请审核 1000
......@@ -309,7 +253,7 @@ class ApplyService extends ServiceBase {
serviceChange: 0,
};
var type = Number(params.type || 1);
var begin, end;
// 取开始时间
if (type == 1) {
......@@ -317,12 +261,12 @@ class ApplyService extends ServiceBase {
} else if (type == 2) {
begin = moment().subtract(1, "months").format("YYYY-MM") + "-01 00:00:00";
}
// echart数据
var days = [];
var dayCounts = [];
var priceCounts = [];
// 处理查询业务
if (type == 1 || type == 2) { // 取结束时间
end = moment(begin).add(1, "months").subtract(1, 'days').format("YYYY-MM-DD") + " 23:59:59";
......@@ -355,17 +299,17 @@ class ApplyService extends ServiceBase {
priceCounts.push(system.f2y(ditem.serviceChange || 0));
}
}
var invoiceApplyData = await this.dao.statInvoiceByTime(begin, end) || {};
result.invoiceCount = invoiceApplyData.invoiceCount;
result.serviceChange = system.f2y(invoiceApplyData.serviceChange);
result.days = days;
result.dayCounts = dayCounts;
result.priceCounts = priceCounts;
return system.getResultSuccess(result);
} catch (error) {
return system.getResult(null,`系统错误 错误信息 ${error}`);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
......@@ -450,473 +394,6 @@ class ApplyService extends ServiceBase {
}
}
/**
* 插入发票
* @param {*} params
*/
async saveInvoice(params) {
try {
//判断是否存在发票
let _invoiceIsHas = await this.dao.model.findOne({
where: {
merchantId: this.trim(params.merchantId),
applyNo: this.trim(params.applyNo)
}
});
if (_invoiceIsHas) {
return system.getResult(null, `发票已存在,请勿重复提交。`);
}
//试算
let val = await this.calcInvoice(params);
if (val.code != -1) {
params.personalIncomeTax = this.trim(val.personalIncomeTax);
params.additionalTax = this.trim(val.additionalTax);
params.valueAddedTax = this.trim(val.valueAddedTax);
params.serviceCharge = this.trim(val.serviceCharge);
params.isPay = (params.isPay) ? 1 : 0;
params.status = "1000";
params.customerStatus = "1000";
}
//标识是不是被红冲了
let flag = false;
if (params.invoiceId) {
//校验发票存在不
let _invoice = await this.invoiceDao.findOne({
where: {
id: this.trim(params.invoiceId)
}
});
if (!_invoice) {
return system.getResult(null, `此发票不能红冲`);
}
params.parentId = this.trim(params.invoiceId);
params.isInvalid = 1;
flag = true;
}
let res = await this.db.transaction(async (t) => {
//插入发票申请单
let _apply = await this.dao.create(params, t);
//插入一条发票信息
await this.invoiceDao.model.create({
id: _apply.id,
applyNo: _apply.applyNo,
merchantId: _apply.merchantId
}, t);
//如果parentId不为空则需要将此id的发票状态改成红冲
if (flag) {
//根该发票状态
await this.invoiceDao.update({
status: this.invoiceStatus.cancleInvoice,
id: this.trim(params.invoiceId)
}, t);
//根该发票申请表中状态
await this.dao.update({
status: this.invoiceStatus.cancelInvoice,
customerStatus: this.invoiceStatus.cancelInvoice,
id: this.trim(params.invoiceId)
});
}
});
return system.getResultSuccess();
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 查询bussinessmenId下已完成的不含税价发票总额度
* @param {*} bussinessmenId
*/
getSubTotalAmount(subTotal) {
let result = {};
if (subTotal >= this.MAX_TOTAL_AMOUNT) {
result.status = -1;
result.msg = "该商户发票总额已达到最大额度!";
return result;
} else {
result.status = 0;
if (subTotal >= this.WARNING_AMOUNT && subTotal <= this.MAX_TOTAL_AMOUNT) {
result.msg = `本次开票累计金额已达到${subTotal}元`;
} else {
result.msg = "ok";
}
return result;
}
}
/**
* 查询当前 申请单是否存在
* @param {*} creditCode 统一社会信用编码
*/
async verificationByBusinessmenCreditCode(businessmenCreditCode) {
let invoices = await this.dao.model.findAll({
where: {
businessmenCreditCode: businessmenCreditCode,
status: {
[this.db.Op.in]: ['1000', '0090']
}
}
});
let res = {};
if (!invoices || invoices.length > 0) {
res.status = -1;
res.msg = "该商户发票正在申请中,请等待审核通过或者撤回才能再次申请";
} else {
res.msg = "ok";
res.data = [];
res.status = 0;
}
return res;
}
/**
* 校验各种费率 的合法性
* @param {*} params
* params
*/
verificationParams(params) {
let res = {};
if (params.taxIncPriRat > 10000 || params.serviceRate > 10000 || params.taxCostPriRat > 10000) {
res.status = -1;
res.msg = "参数错误,所有费率都应小于1";
} else {
params.taxIncPriRat = new Decimal(params.taxIncPriRat).div(10000).toFixed(4);
params.taxCostPriRat = new Decimal(params.taxCostPriRat).div(10000).toFixed(4);
params.serviceRate = new Decimal(params.serviceRate).div(10000).toFixed(4);
res.status = 0;
res.msg = "ok";
}
return res;
}
/**
* 累计不含税价
* @param {*} businessmenId 商户id
* @param {*} taxIncPriRat 不含税价百分比
* @param {*} invoiceAmount 发票总额
* @param {*} type 计算类型 1:个税 2:增值税
* @param {*} valCalWay 增值税计算类型 1:月 2:季度 3:年
* @param {*} perCalWay 增值税计算类型 1:月 2:季度 3:年
* @param {*} invoiceTime 格式 YYYY-MM-DD hh:mm:ss
*/
async calAccumulatedPriceExcludingTax(businessmenId, businessmenCreditCode, taxIncPriRat, invoiceAmount, type, valCalWay, perCalWay, invoiceTime) {
let now = moment(invoiceTime),
startTime, attribute;
if (type === 1) { //个税
attribute = `invoiceAmount`;
if (perCalWay === 3) { //按照年
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (perCalWay === 2) { //按照季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
} else { //按照月
let _month = now.month() < 10 ? "0" + now.month() : now.month();
startTime = `${now.get('year')}-${_month}-01 00:00:00`;
}
} else {
attribute = `valueAddedTax`;
if (valCalWay === 1) { //月
startTime = `${now.get('year')}-${now.month()}-01 00:00:00`;
} else if (valCalWay === 2) { //季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
} else { //年
startTime = `${now.get('year')}-01-01 00:00:00`;
}
}
console.log("本年度开始的时间:" + startTime + " 至今:" + now.format("YYYY-MM-DD hh:mm:ss"));
let beforeAmount = await this.dao.model.sum(attribute, {
where: {
businessmenId: businessmenId,
businessmenCreditCode: businessmenCreditCode,
status: {
[this.db.Op.in]: ['1020', '1030', '1040', '1050', '1060', '1070', '1080', '1090', '1100', '1200', '1300']
},
invoiceTime: {
[this.db.Op.between]: [startTime, now.format("YYYY-MM-DD hh:mm:ss")],
}
}
});
beforeAmount = isNaN(beforeAmount) ? 0 : beforeAmount;
let res = new Decimal(invoiceAmount).plus(beforeAmount).div(Decimal.add(1, taxIncPriRat)).toFixed(2);
console.log("当前累计金额 :" + res);
return res;
}
/**
* 计算累计利润
* @param {*} x1 年累计金额
* @param {*} taxCostPriRat 核定成本费用率
*/
calAccumulatedProfit(x1, taxCostPriRat) {
if (taxCostPriRat == 0) {
return 0;
} else {
return new Decimal(x1).mul(Decimal.sub(1, taxCostPriRat)).toFixed(2);
}
}
/**
* 计算累计税值
* @param {*} businessmenId
* @param {*} type 计算类型 1:个税 2:增值税
* @param {*} valCalWay 增值税计算类型 1:月 2:季度
*
*/
async calCumulativeProfit(businessmenId, type, valCalWay) {
let now = moment(),
startTime, attribute;
if (type == 1) {
attribute = `personalIncomeTax`;
startTime = `${now.get('year')}-01-01 00:00:00`;
} else {
attribute = `valueAddedTax`;
if (valCalWay === 1) { //月
startTime = `${now.get('year')}-${now.month()}-01 00:00:00`;
} else { //季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
}
}
console.log("本年度开始的时间:" + startTime + " 至今:" + now.format("YYYY-MM-DD hh:mm:ss"));
let cumulativeProfit = await this.dao.model.sum(attribute, {
where: {
businessmenId: businessmenId,
status: this.invoiceStatus.auditPass,
invoiceTime: {
[this.db.Op.between]: [startTime, now.format("YYYY-MM-DD hh:mm:ss")],
}
}
});
return cumulativeProfit || 0;
}
/**
* 计算个税
* @param {*} x2 //累计不含说价
* @param {*} taxPer //个税税率
* @param {*} quiCalDed //速算扣除数
* @param {*} cumulativeProfit //累计缴纳的个税
*/
calTaxPersonal(x2, taxPer, quiCalDed, cumulativeProfit) {
x2 = x2 || 0;
quiCalDed = quiCalDed || 0;
taxPer = taxPer || 0;
cumulativeProfit = cumulativeProfit || 0;
if (taxPer == 0) {
return 0;
}
return (new Decimal(x2).mul(taxPer).div(100).sub(quiCalDed).sub(cumulativeProfit)).toFixed(2);
}
/**
* 计算附加税
* @param {*} valueAddedTax
* @param {*} addTaxRat
*/
calAddTax(valueAddedTax, addTaxRat) {
if (addTaxRat == 0) {
return 0
} else {
return new Decimal(valueAddedTax).mul(addTaxRat).div(100).toFixed(2);
}
}
/**
* 计算税率值
* @param {*} amount 金额
* @param {*} taxRange 税率范围
* @param {*} type 类型 1:个税 2 增值税
*/
calRateRange(amount, taxRange, type) {
let res = {};
if (type === this.PER_TAX) {
for (let item of taxRange) {
if (item.minValue <= amount && amount <= item.maxValue) {
res.taxPer = item.rate;
res.quiCalDed = item.quiCalDed;
break;
}
}
} else {
for (let item of taxRange) {
if (item.minValue <= amount && amount <= item.maxValue) {
res.valAddTaxRat = item.zengzhiRate;
res.addTaxRat = item.fujiaRate;
break;
}
}
}
//校验费率
// for (const key in res) {
// if(Number(res[key])>100){
// return {code:-1,msg:"费率不能大于1"};
// }
// }
res.status = 0;
return res;
}
/**
* 计算增值税
* @param {*} x3 //累计不含说价
* @param {*} valAddTaxRat //增值税率
* @param {*} cumulativeProfitOfvalTax //累计缴纳的增值税
*/
calValTax(x3, valAddTaxRat, cumulativeProfitOfvalTax) {
if (valAddTaxRat == 0) {
return 0;
}
let res = new Decimal(x3).mul(valAddTaxRat).div(100).sub(cumulativeProfitOfvalTax).toFixed(2);
return res;
}
/**
* 发票费用计算
* @param {*} params
*
* params:{
* invoiceAmount:100000, //发票金额
* invoiceTime:"2019-12-12", //开票时间
* businessmenCreditCode:"xxx", //纳税人识别号
* serviceRate:"0.03", //服务费率
* perCalWay:1, //个税计算方式 1:月 2:季度 3:年
* valCalWay:1, //增值税计算方式 1:月 2:季度 3:年
* businessmenId:1, //商户id
* taxIncPriRat:0.03, //不含税价百分比
* taxCostPriRat:0.96, //核定成本费用率
* perIncTaxRange:[
* {
* minValue:0,
* rate:"0",
* quiCalDed:0,
* maxValue:3000000
* }
* ],
* valAddTaxRange:[
* {
* minValue:0,
* zengzhiRate:0,
* fujiaRate:0,
* maxValue:3000000
* }
* ],
* }
*
*/
async calcInvoice(params) {
if (Number(this.trim(params.invoiceAmount)) > this.MAX_TOTAL_AMOUNT) {
return {
status: -1,
msg: `开票金额大于可开发票的最大金额`,
data: null
}
}
//参数验证: 验证所有的利率 都必须小于1
let vpr = this.verificationParams(params);
if (vpr.status === -1) {
return vpr;
}
// 验证发票是否存在或未完成
let invoiceRes = await this.verificationByBusinessmenCreditCode(this.trim(params.businessmenCreditCode));
if (invoiceRes.status === -1 || invoiceRes.data.length > 0) {
return invoiceRes;
}
// 服务费率
let serviceRate = Number(params.serviceRate || 0);
let serviceCharge = Number((params.invoiceAmount * serviceRate) / 100).toFixed(0) || 0;
//计算累计不含税价 businessmenId,businessmenCreditCode,taxIncPriRat,invoiceAmount,type,valCalWay,perCalWay,invoiceTime
let x1 = await this.calAccumulatedPriceExcludingTax(params.businessmenId, params.businessmenCreditCode, params.taxIncPriRat, params.invoiceAmount, this.PER_TAX, null, params.perCalWay, params.invoiceTime);
console.log("个税 累计不含税价总额:" + x1);
//判断总额度是否大于最大开票额度
let subTotalRes = this.getSubTotalAmount(x1);
//返回警告信息
let warning = "";
if (subTotalRes.status === -1) {
return subTotalRes;
} else {
if (subTotalRes.msg != "ok") {
warning = subTotalRes.msg;
}
}
//计算累计利润
let x2 = this.calAccumulatedProfit(x1, params.taxCostPriRat);
//根据 cumulativeProfit 查找对应梯度的个税税率和速算扣除数
let calRateRangeResForPer = this.calRateRange(x2, params.perIncTaxRange, this.PER_TAX);
//这块处理有问题
if (calRateRangeResForPer.status === -1) {
return calRateRangeResForPer;
}
let {
taxPer,
quiCalDed
} = calRateRangeResForPer;
//计算年累计的个税
let cumulativeProfit = await this.calCumulativeProfit(params.businessmenId, this.PER_TAX, params.valCalWay);
//计算个税
let personalIncomeTax = this.calTaxPersonal(x2, taxPer, quiCalDed, cumulativeProfit);
/*计算增值税*/
//计算累计不含税价
let x3 = await this.calAccumulatedPriceExcludingTax(params.businessmenId, params.businessmenCreditCode, params.taxIncPriRat, params.invoiceAmount, this.VAL_TAX, params.valCalWay, null, params.invoiceTime);
console.log("增值税 累计不含税价总额:" + x3);
//根据 cumulativeProfitOfvalTax 查找对应梯度的个税税率
let calRateRangeResForVal = this.calRateRange(x3, params.valAddTaxRange, this.VAL_TAX);
if (calRateRangeResForVal.code === -1) {
return calRateRangeResForVal;
}
let {
valAddTaxRat,
addTaxRat
} = calRateRangeResForVal;
//计算年累计的增值税
let cumulativeProfitOfvalTax = await this.calCumulativeProfit(params.businessmenId, this.VAL_TAX, params.valCalWay);
//计算增值税
let valueAddedTax = this.calValTax(x3, valAddTaxRat, cumulativeProfitOfvalTax);
//附加税
let additionalTax = this.calAddTax(valueAddedTax, addTaxRat);
let res = {
serviceCharge: serviceCharge, //服务费
personalIncomeTax: personalIncomeTax, //个税
valueAddedTax: valueAddedTax, //附加税
additionalTax: additionalTax, //附加税
warning: warning //警告信息
}
console.log("计算的各种税额:" + JSON.stringify(res));
return res;
}
async getByApplyNo(params) {
var merchantId = params.merchantId || params.merchant_id;
var applyNo = params.applyNo;
......@@ -1083,13 +560,13 @@ class ApplyService extends ServiceBase {
_apply.status = params.nextStatus;
_apply.remark = params.remark;
_apply.isPay = Number(params.isPay);
if(params.nextStatus=="1010"){
_apply.customerStatus="1010";
if (params.nextStatus == "1010") {
_apply.customerStatus = "1010";
}
try {
let res = await _apply.save();
if (_apply.parentId && params.nextStatus =="1010") {
await this.invoiceDao.update({id: _apply.parentId, redStatus: '3'});
if (_apply.parentId && params.nextStatus == "1010") {
await this.invoiceDao.update({ id: _apply.parentId, redStatus: '3' });
}
return system.getResultSuccess();
} catch (error) {
......@@ -1179,8 +656,8 @@ class ApplyService extends ServiceBase {
await this.dao.update(applyData, t);
await this.invoiceDao.update(invoiceData, t);
if(_apply.parentId) {
await this.invoiceDao.update({id: _apply.parentId, redStatus: '4'}, t);
if (_apply.parentId) {
await this.invoiceDao.update({ id: _apply.parentId, redStatus: '4' }, t);
}
}).catch(error => {
......@@ -1200,13 +677,13 @@ class ApplyService extends ServiceBase {
if (!_apply) {
return system.getResult(null, `发票不存在,请核对发票ID`);
}
let _deliverer=await this.delivererDao.model.findOne({
where:{
id:_apply.delivererId
let _deliverer = await this.delivererDao.model.findOne({
where: {
id: _apply.delivererId
}
});
if(!_deliverer){
return system.getResult(null,`交付商不存在,请联系管理员`);
if (!_deliverer) {
return system.getResult(null, `交付商不存在,请联系管理员`);
}
await this.db.transaction(async (t) => {
//更新 申请单和发票单
......@@ -1219,12 +696,12 @@ class ApplyService extends ServiceBase {
id: _apply.id
}, t);
if(_deliverer.id){
if (_deliverer.id) {
//提交审核信息
await this.delivererDao.update({
auditContent:this.trim(auditContent),
id:_deliverer.id
});
auditContent: this.trim(auditContent),
id: _deliverer.id
});
}
}).catch(error => {
return system.getResult(null, `系统错误 错误信息 ${error}`);
......@@ -1284,7 +761,6 @@ class ApplyService extends ServiceBase {
return _apply;
}
/**
* 发票申请列表查询(平台)
* @param {*} params
......@@ -1300,8 +776,8 @@ class ApplyService extends ServiceBase {
}
if (this.trim(params.invoiceTime)) {
where.invoiceTime = {
[this.db.Op.gte]:this.trim(params.invoiceTime)
}
[this.db.Op.gte]: this.trim(params.invoiceTime)
}
}
if (this.trim(params.type)) {
where.type = this.trim(params.type);
......@@ -1335,10 +811,10 @@ class ApplyService extends ServiceBase {
item.type = "普通发票";
} else if (item.type == "20") {
item.type = "增值税专用发票";
} else if(item.type=="30"){
} else if (item.type == "30") {
item.type = "电子发票";
}else{
item.type="";
} else {
item.type = "";
}
let _invoice = await this.invoiceDao.model.findOne({
where: {
......@@ -1382,15 +858,167 @@ class ApplyService extends ServiceBase {
addStatCount(statusMap, statuses) {
var count = 0;
if(!statuses) {
if (!statuses) {
return count;
}
for(var status of statuses) {
for (var status of statuses) {
count = count + Number(statusMap[status] || 0);
}
return count;
}
//查询发票状态 只有在状态为 '1000','0090' 或者信息不存在的情况下 验证成功 参考 applySve.verificationByBusinessmenCreditCode接口
async verificationInvoiceStatus(businessmenType, businessmenId, businessmenCreditCode) {
try {
let condition = {
businessmenType: businessmenType,
businessmenId: businessmenId,
status: {
[this.db.Op.in]: ['1000', '0090']
}
};
if (businessmenCreditCode) {
condition.businessmenCreditCode = businessmenCreditCode;
}
let invoices = await this.dao.model.findAll({
where: condition,
attributes: ["id", "status"]
});
if (!invoices) { return false; }
for (let item of invoices) {
if (!item) { continue; }
if (item['status'] != "1000" || item['status'] != "0090") {
return false;
}
}
return true;
} catch (error) {
return false;
}
}
/**
* 累计不含税价
* @param {*} businessmenId 商户id
* @param {*} taxIncPriRat 不含税价百分比
* @param {*} invoiceAmount 发票总额
* @param {*} type 计算类型 1:个税 2:增值税
* @param {*} valCalWay 增值税计算类型 1:月 2:季度 3:年
* @param {*} perCalWay 增值税计算类型 1:月 2:季度 3:年
* @param {*} invoiceTime 格式 YYYY-MM-DD hh:mm:ss
*/
async calAccumulatedPriceExcludingTax(businessmenId,businessmenType, businessmenCreditCode, taxIncPriRat, invoiceAmount, type, valCalWay, perCalWay, invoiceTime) {
try {
let now = moment(invoiceTime),startTime, attribute;
if (type === 1) { //个税
attribute = `invoiceAmount`;
if (perCalWay === 3) { //按照年
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (perCalWay === 2) { //按照季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
} else { //按照月
let _month = now.month() < 10 ? "0" + now.month() : now.month();
startTime = `${now.get('year')}-${_month}-01 00:00:00`;
}
} else {
attribute = `valueAddedTax`;
if (valCalWay === 1) { //月
startTime = `${now.get('year')}-${now.month()}-01 00:00:00`;
} else if (valCalWay === 2) { //季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
} else { //年
startTime = `${now.get('year')}-01-01 00:00:00`;
}
}
console.log("本年度开始的时间:" + startTime + " 至今:" + now.format("YYYY-MM-DD hh:mm:ss"));
let condition = {
businessmenId: businessmenId,
businessmenType:businessmenType,
status: {
[this.db.Op.in]: ['1020', '1030', '1040', '1050', '1060', '1070', '1080', '1090', '1100', '1200', '1300']
},
invoiceTime: {
[this.db.Op.between]: [startTime, now.format("YYYY-MM-DD hh:mm:ss")],
}
};
if(businessmenCreditCode){
condition.businessmenCreditCode=businessmenCreditCode;
}
let beforeAmount = await this.dao.model.sum(attribute, {
where: condition
});
beforeAmount = isNaN(beforeAmount) ? 0 : beforeAmount;
let res = new Decimal(invoiceAmount).plus(beforeAmount).div(Decimal.add(1, taxIncPriRat)).toFixed(2);
console.log("当前累计金额 :" + res);
return res;
} catch (error) {
console.log(error);
return system.getResult(-1,`系统错误 错误信息 ${error}`);
}
}
/**
* 计算累计税值
* @param {*} businessmenId
* @param {*} type 计算类型 1:个税 2:增值税
* @param {*} valCalWay 增值税计算类型 1:月 2:季度
*
*/
async calCumulativeProfit(businessmenId,businessmenType, type, valCalWay) {
let now = moment(),
startTime, attribute;
if (type == 1) {
attribute = `personalIncomeTax`;
startTime = `${now.get('year')}-01-01 00:00:00`;
} else {
attribute = `valueAddedTax`;
if (valCalWay === 1) { //月
startTime = `${now.get('year')}-${now.month()}-01 00:00:00`;
} else { //季度
let quarter = now.quarter();
if (1 == quarter) { //第一季度
startTime = `${now.get('year')}-01-01 00:00:00`;
} else if (2 == quarter) {
startTime = `${now.get('year')}-04-01 00:00:00`;
} else if (3 == quarter) {
startTime = `${now.get('year')}-07-01 00:00:00`;
} else {
startTime = `${now.get('year')}-10-01 00:00:00`;
}
}
}
console.log("本年度开始的时间:" + startTime + " 至今:" + now.format("YYYY-MM-DD hh:mm:ss"));
let cumulativeProfit = await this.dao.model.sum(attribute, {
where: {
businessmenId: businessmenId,
businessmenType: businessmenType,
status: this.invoiceStatus.auditPass,
invoiceTime: {
[this.db.Op.between]: [startTime, now.format("YYYY-MM-DD hh:mm:ss")],
}
}
});
return cumulativeProfit || 0;
}
}
module.exports = ApplyService;
\ No newline at end of file
/**
* 1 算法文件命名规则 : calInvoice + 销售方编码
* 2 如果算法中途出现异常 则需直接return
* 3 如果算法顺利执行 返回参数中除包含必须的四个税值外,还需要包含一个累计不含税价字段 字段名称为 "x1"
*/
const system = require("../../../system");
const applySve = system.getObject("service.invoice.applySve");
const Decimal = require('decimal.js');
const PER_TAX = 1; //个税
const VAL_TAX = 2; //增值税
/**
* 试算接口
* 注意:1 由于销售方类型不同 所以算法不同 需要对参数验证单独处理
*/
module.exports.calcInvoice = async (params) => {
try {
// 服务费率
let serviceRate = Number(params.serviceRate || 0);
let serviceCharge = Number((params.invoiceAmount * serviceRate) / 100).toFixed(0) || 0;
//计算累计不含税价 businessmenId,businessmenCreditCode,taxIncPriRat,invoiceAmount,type,valCalWay,perCalWay,invoiceTime
let x1 = await applySve.calAccumulatedPriceExcludingTax(params.businessmenId, params.businessmenType, params.businessmenCreditCode, params.taxIncPriRat, params.invoiceAmount, PER_TAX, null, params.perCalWay, params.invoiceTime);
console.log("个税 累计不含税价总额:" + x1);
//计算累计利润
let x2 = calAccumulatedProfit(x1, params.taxCostPriRat);
//根据 cumulativeProfit 查找对应梯度的个税税率和速算扣除数
let calRateRangeResForPer = calRateRange(x2, params.perIncTaxRange, PER_TAX);
let { taxPer, quiCalDed } = calRateRangeResForPer;
//计算年累计的个税
let cumulativeProfit = await applySve.calCumulativeProfit(params.businessmenId,params.businessmenType, PER_TAX, params.valCalWay);
//计算个税
let personalIncomeTax = calTaxPersonal(x2, taxPer, quiCalDed, cumulativeProfit);
/*计算增值税*/
//计算累计不含税价
let x3 = await applySve.calAccumulatedPriceExcludingTax(params.businessmenId,params.businessmenType, params.businessmenCreditCode, params.taxIncPriRat, params.invoiceAmount, VAL_TAX, params.valCalWay, null, params.invoiceTime);
console.log("增值税 累计不含税价总额:" + x3);
//根据 cumulativeProfitOfvalTax 查找对应梯度的个税税率
let calRateRangeResForVal = calRateRange(x3, params.valAddTaxRange, VAL_TAX);
let {valAddTaxRat,addTaxRat} = calRateRangeResForVal;
//计算年累计的增值税
let cumulativeProfitOfvalTax = await applySve.calCumulativeProfit(params.businessmenId,params.businessmenType, VAL_TAX, params.valCalWay);
//计算增值税
let valueAddedTax = calValTax(x3, valAddTaxRat, cumulativeProfitOfvalTax);
//附加税
let additionalTax = calAddTax(valueAddedTax, addTaxRat);
let res = {
x1: x1, //累计不含税价
serviceCharge: serviceCharge, //服务费
personalIncomeTax: personalIncomeTax, //个税
valueAddedTax: valueAddedTax, //附加税
additionalTax: additionalTax, //附加税
}
console.log("计算的各种税额:" + JSON.stringify(res));
return res;
} catch (error) {
return system.getResult(-1,`系统错误 错误信息 ${error}`);
}
}
/**
* 计算累计利润
* @param {*} x1 年累计金额
* @param {*} taxCostPriRat 核定成本费用率
*/
let calAccumulatedProfit = (x1, taxCostPriRat) => {
if (taxCostPriRat == 0) {
return 0;
} else {
return new Decimal(x1).mul(Decimal.sub(1, taxCostPriRat)).toFixed(2);
}
}
/**
* 计算税率值
* @param {*} amount 金额
* @param {*} taxRange 税率范围
* @param {*} type 类型 1:个税 2 增值税
*/
let calRateRange = (amount, taxRange, type) => {
let res = {};
if (type === PER_TAX) {
for (let item of taxRange) {
if (item.minValue <= amount && amount <= item.maxValue) {
res.taxPer = item.rate;
res.quiCalDed = item.quiCalDed;
break;
}
}
} else {
for (let item of taxRange) {
if (item.minValue <= amount && amount <= item.maxValue) {
res.valAddTaxRat = item.zengzhiRate;
res.addTaxRat = item.fujiaRate;
break;
}
}
}
return res;
}
/**
* 计算个税
* @param {*} x2 //累计不含说价
* @param {*} taxPer //个税税率
* @param {*} quiCalDed //速算扣除数
* @param {*} cumulativeProfit //累计缴纳的个税
*/
let calTaxPersonal=(x2, taxPer, quiCalDed, cumulativeProfit)=>{
x2 = x2 || 0;
quiCalDed = quiCalDed || 0;
taxPer = taxPer || 0;
cumulativeProfit = cumulativeProfit || 0;
if (taxPer == 0) {
return 0;
}
return (new Decimal(x2).mul(taxPer).div(100).sub(quiCalDed).sub(cumulativeProfit)).toFixed(2);
}
/**
* 计算税率值
* @param {*} amount 金额
* @param {*} taxRange 税率范围
* @param {*} type 类型 1:个税 2 增值税
*/
// let calRateRange=(amount, taxRange, type)=>{
// let res = {};
// if (type === PER_TAX) {
// for (let item of taxRange) {
// if (item.minValue <= amount && amount <= item.maxValue) {
// res.taxPer = item.rate;
// res.quiCalDed = item.quiCalDed;
// break;
// }
// }
// } else {
// for (let item of taxRange) {
// if (item.minValue <= amount && amount <= item.maxValue) {
// res.valAddTaxRat = item.zengzhiRate;
// res.addTaxRat = item.fujiaRate;
// break;
// }
// }
// }
// return res;
// }
/**
* 计算增值税
* @param {*} x3 //累计不含说价
* @param {*} valAddTaxRat //增值税率
* @param {*} cumulativeProfitOfvalTax //累计缴纳的增值税
*/
let calValTax=(x3, valAddTaxRat, cumulativeProfitOfvalTax)=>{
if (valAddTaxRat == 0) {
return 0;
}
let res = new Decimal(x3).mul(valAddTaxRat).div(100).sub(cumulativeProfitOfvalTax).toFixed(2);
return res;
}
/**
* 计算附加税
* @param {*} valueAddedTax
* @param {*} addTaxRat
*/
let calAddTax=(valueAddedTax, addTaxRat)=>{
if (addTaxRat == 0) {
return 0
} else {
return new Decimal(valueAddedTax).mul(addTaxRat).div(100).toFixed(2);
}
}
/**
* 格式化参数
*/
module.exports.formatParams=(params)=>{
//后期添加格式化参数信息
params=verificationParams(params);
return params;
}
/**
* 校验各种费率 的合法性
* @param {*} params
* params
*/
let verificationParams = (params) => {
if (params.taxIncPriRat > 10000 || params.serviceRate > 10000 || params.taxCostPriRat > 10000) {
return system.getResult(-1,`参数错误 费率不合法`);
} else {
params.taxIncPriRat = new Decimal(params.taxIncPriRat).div(10000).toFixed(4);
params.taxCostPriRat = new Decimal(params.taxCostPriRat).div(10000).toFixed(4);
params.serviceRate = new Decimal(params.serviceRate).div(10000).toFixed(4);
}
return params;
}
\ No newline at end of file
//去除空格
module.exports.trim=(o)=> {
if(!o) {
return "";
}
return o.toString().trim();
}
\ No newline at end of file
/**
* 发票配置文件
*/
module.exports={
//根据销售方区别不同的配置信息
/**
* @MAX_AMOUNT 最大的金额 单位分
*
* 10:个体工商胡 20:自然人
*/
"10":{
MAX_AMOUNT:500000000,
WARNING_AMOUNT:400000000
},
"20":{
MAX_AMOUNT:400000000,
WARNING_AMOUNT:300000000
}
}
\ No newline at end of file
/**
* 发票计税算法-参数字典表
*/
const common = require("./common");
const system = require("../../system");
const valApi=require("./validate");
/**
* 算法分发器
*/
module.exports.dispatcher=async (params)=>{
try {
if(!params.businessmenType){
return system.getResult(-1,`参数错误 销售方类型不能为空`);
}
//加载算法类
let businessmenType = common.trim(params.businessmenType);
let filePath =`./algorithm/calInvoice${businessmenType}`;
console.log(filePath);
let calInvApi = require(filePath);
if(!calInvApi){
return system.getResult(-1,`系统错误 错误信息 算法不存在`);
}
let valCon ={};
//验证参数
valCon.businessmenType=common.trim(params.businessmenType);
valCon.businessmenId=common.trim(params.businessmenId);
valCon.businessmenCreditCode=common.trim(params.businessmenCreditCode);
valCon.invoiceAmount=common.trim(params.invoiceAmount);
//格式化参数
let calCon = calInvApi.formatParams(params);
if(calCon.hasOwnProperty("status")){
return calCon;
}
//计算参数
return await valApi.validate(valCon,calInvApi.calcInvoice,calCon);
} catch (error) {
console.log(error);
return system.getResult(-1,`参数错误 销售方类型不存在`);
}
}
const invoiceConfig = require("./invoiceConfig");
const system = require("../../system");
const common = require("./common");
const applySve = system.getObject("service.invoice.applySve");
const Decimal = require('decimal.js');
/**
* 开票验证
* 注意:验证和测试高度耦合(需要传入测试计算方法)
* @businessmenType 用户类别
* @businessmenId 销售方ID
* @businessmenCreditCode 非必添 销售方统一社会信用代码
* @invoiceAmount 开票金额
* @fn 试算方法
*/
module.exports.validate=async (params,fn,formate)=>{
let businessmenType = common.trim(params.businessmenType);
let businessmenId = common.trim(params.businessmenId);
let businessmenCreditCode = common.trim(params.businessmenCreditCode);
let invoiceAmount = Number(common.trim(params.invoiceAmount));
if(!businessmenType || !invoiceAmount || !businessmenId){
return system.getResult(-1,`参数错误 销售方信息参数有误 请核对参数`);
}
//获取配置文件信息
let busCon = invoiceConfig[businessmenType];
if(!busCon){
return system.getResult(-1,`参数错误 销售方类型不能为空`);
}
if(busCon.MAX_AMOUNT<params.invoiceAmount){
return system.getResult(-1,`开票金额超出最大范围`);
}
//试算获取累计含税价
let calAmount = await fn(formate);
if(calAmount.hasOwnProperty("status")){
return system.getResult(-1,`计算参数错误 请核对税率、金额以及销售方信息`);
}
_totalAmount = Decimal(calAmount.x1).plus(invoiceAmount).toNumber();
if(busCon.MAX_AMOUNT<_totalAmount){
return system.getResult(-1,`累计开票金额超出本年度最大金额`);
}
let warning = "";
if(busCon.WARNING_AMOUNT<_totalAmount){
warning=`累计开票金额达到${_totalAmount}`;
}
//查询发票状态 只有在状态为 '1000','0090' 或者信息不存在的情况下 验证成功 参考 applySve.verificationByBusinessmenCreditCode接口
let isLegal = await applySve.verificationInvoiceStatus(businessmenType,businessmenId,businessmenCreditCode);
if(!isLegal){
return system.getResult(-1,`验证失败 此用户存在未完成的发票`);
}
//移除累计税价
delete calAmount.x1;
if(warning){
calAmount.warning=warning;
}
return system.getResult(calAmount);
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ var settings = {
salt: "%iatpD1gcxz7iF#B",
defaultpwd: "987456",
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 4001,
port: process.env.NODE_PORT || 3105,
reqEsAddr: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
......
......@@ -26,8 +26,7 @@
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"accepts": {
"version": "1.3.5",
......@@ -43,6 +42,11 @@
"resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz",
"integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg=="
},
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
},
"agent-base": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
......@@ -136,8 +140,7 @@
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
......@@ -257,6 +260,11 @@
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
"dev": true
},
"arraybuffer.slice": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
"integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
......@@ -286,6 +294,11 @@
"integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=",
"dev": true
},
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"async-listener": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.9.tgz",
......@@ -372,11 +385,15 @@
}
}
},
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"base": {
"version": "0.11.2",
......@@ -433,6 +450,16 @@
}
}
},
"base64-arraybuffer": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
},
"base64id": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
"integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY="
},
"basic-auth": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz",
......@@ -464,6 +491,19 @@
"integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
"dev": true
},
"better-assert": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"requires": {
"callsite": "1.0.0"
}
},
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
......@@ -513,7 +553,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -566,8 +605,7 @@
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8="
},
"builtin-status-codes": {
"version": "3.0.0",
......@@ -628,6 +666,11 @@
"unset-value": "^1.0.0"
}
},
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
},
"camelcase": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
......@@ -736,6 +779,19 @@
}
}
},
"cli-color": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
"requires": {
"ansi-regex": "^2.1.1",
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"memoizee": "^0.4.14",
"timers-ext": "^0.1.5"
}
},
"cli-cursor": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
......@@ -755,7 +811,6 @@
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
......@@ -814,8 +869,7 @@
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"collection-visit": {
"version": "1.0.0",
......@@ -863,17 +917,25 @@
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
},
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
"dev": true
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
"integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"concat-stream": {
"version": "1.6.2",
......@@ -886,6 +948,15 @@
"typedarray": "^0.0.6"
}
},
"config-chain": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
"integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==",
"requires": {
"ini": "^1.3.4",
"proto-list": "~1.2.1"
}
},
"connect-redis": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/connect-redis/-/connect-redis-3.3.3.tgz",
......@@ -1001,6 +1072,16 @@
"boom": "2.x.x"
}
},
"crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
},
"crypto-js": {
"version": "3.1.9-1",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz",
"integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg="
},
"currently-unhandled": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
......@@ -1010,6 +1091,15 @@
"array-find-index": "^1.0.1"
}
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
......@@ -1040,8 +1130,12 @@
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"decimal": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/decimal/-/decimal-0.0.2.tgz",
"integrity": "sha1-GUPsUjaKD996NywsEM8fy8kbk+M="
},
"decimal.js": {
"version": "10.2.0",
......@@ -1276,6 +1370,38 @@
"jsbn": "~0.1.0"
}
},
"editorconfig": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
"integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
"requires": {
"commander": "^2.19.0",
"lru-cache": "^4.1.5",
"semver": "^5.6.0",
"sigmund": "^1.0.1"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
}
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......@@ -1354,11 +1480,96 @@
"resolved": "https://registry.npmjs.org/end-or-error/-/end-or-error-1.0.1.tgz",
"integrity": "sha1-3HpiEP5403L+4kqLSJnb0VVBTcs="
},
"engine.io": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.0.tgz",
"integrity": "sha512-XCyYVWzcHnK5cMz7G4VTu2W7zJS7SM1QkcelghyIk/FmobWBtXE7fwhBusEKvCSqc3bMh8fNFMlUkCKTFRxH2w==",
"requires": {
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "0.3.1",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"ws": "^7.1.2"
},
"dependencies": {
"base64id": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog=="
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"engine.io-client": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.0.tgz",
"integrity": "sha512-a4J5QO2k99CM2a0b12IznnyQndoEvtA4UAldhGzKqnHf42I3Qs2W5SPnDvatZRcMaNZs4IevVicBPayxYt6FwA==",
"requires": {
"component-emitter": "1.2.1",
"component-inherit": "0.0.3",
"debug": "~4.1.0",
"engine.io-parser": "~2.2.0",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"ws": "~6.1.0",
"xmlhttprequest-ssl": "~1.5.4",
"yeast": "0.1.2"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
"requires": {
"async-limiter": "~1.0.0"
}
}
}
},
"engine.io-parser": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz",
"integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==",
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
"base64-arraybuffer": "0.1.5",
"blob": "0.0.5",
"has-binary2": "~1.0.2"
}
},
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"dev": true,
"requires": {
"is-arrayish": "^0.2.1"
}
......@@ -1372,6 +1583,26 @@
"escape-html": "~1.0.3"
}
},
"es5-ext": {
"version": "0.10.52",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz",
"integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==",
"requires": {
"es6-iterator": "~2.0.3",
"es6-symbol": "~3.1.2",
"next-tick": "~1.0.0"
}
},
"es6-iterator": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
"integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
"requires": {
"d": "1",
"es5-ext": "^0.10.35",
"es6-symbol": "^3.1.1"
}
},
"es6-promise": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
......@@ -1385,6 +1616,26 @@
"es6-promise": "^4.0.3"
}
},
"es6-symbol": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
"requires": {
"d": "^1.0.1",
"ext": "^1.1.2"
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es6-symbol": "^3.1.1"
}
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
......@@ -1428,6 +1679,41 @@
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
},
"event-emitter": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
"integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
"requires": {
"d": "1",
"es5-ext": "~0.10.14"
}
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
}
}
},
"exif-js": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/exif-js/-/exif-js-2.3.0.tgz",
......@@ -1647,6 +1933,21 @@
"utils-merge": "1.0.1"
}
},
"ext": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz",
"integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==",
"requires": {
"type": "^2.0.0"
},
"dependencies": {
"type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
"integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow=="
}
}
},
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
......@@ -1931,11 +2232,27 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-extra": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
},
"dependencies": {
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
}
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fstream": {
"version": "1.0.11",
......@@ -2036,8 +2353,7 @@
"get-caller-file": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
"dev": true
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U="
},
"get-ready": {
"version": "1.0.0",
......@@ -2050,6 +2366,11 @@
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
"dev": true
},
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-uri": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz",
......@@ -2839,6 +3160,26 @@
"ansi-regex": "^2.0.0"
}
},
"has-binary2": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
"integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"requires": {
"isarray": "2.0.1"
},
"dependencies": {
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
......@@ -2922,8 +3263,7 @@
"hosted-git-info": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz",
"integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
"dev": true
"integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw=="
},
"http-errors": {
"version": "1.6.3",
......@@ -3016,6 +3356,11 @@
"repeating": "^2.0.0"
}
},
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
},
"inflection": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz",
......@@ -3025,7 +3370,6 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
......@@ -3039,8 +3383,7 @@
"ini": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"dev": true
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"interpret": {
"version": "1.1.0",
......@@ -3051,8 +3394,7 @@
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"dev": true
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
},
"ip": {
"version": "1.1.5",
......@@ -3097,8 +3439,7 @@
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-bluebird": {
"version": "1.0.2",
......@@ -3115,7 +3456,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"dev": true,
"requires": {
"builtin-modules": "^1.0.0"
}
......@@ -3189,7 +3529,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -3268,6 +3607,11 @@
"isobject": "^3.0.1"
}
},
"is-promise": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
......@@ -3283,6 +3627,11 @@
"is-unc-path": "^1.0.0"
}
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-type-of": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-type-of/-/is-type-of-1.2.0.tgz",
......@@ -3347,6 +3696,50 @@
"integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ==",
"dev": true
},
"js-beautify": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.10.2.tgz",
"integrity": "sha512-ZtBYyNUYJIsBWERnQP0rPN9KjkrDfJcMjuVGcvXOUJrD1zmOGwhRwQ4msG+HJ+Ni/FA7+sRQEMYVzdTQDvnzvQ==",
"requires": {
"config-chain": "^1.1.12",
"editorconfig": "^0.15.3",
"glob": "^7.1.3",
"mkdirp": "~0.5.1",
"nopt": "~4.0.1"
},
"dependencies": {
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
}
}
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
......@@ -3372,6 +3765,22 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
},
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
},
"dependencies": {
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"optional": true
}
}
},
"jsonpointer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
......@@ -3405,7 +3814,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"dev": true,
"requires": {
"invert-kv": "^1.0.0"
}
......@@ -3465,6 +3873,22 @@
}
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
},
"dependencies": {
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
}
}
},
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
......@@ -3759,6 +4183,14 @@
"yallist": "^2.1.2"
}
},
"lru-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
"integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=",
"requires": {
"es5-ext": "~0.10.2"
}
},
"make-iterator": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
......@@ -3805,6 +4237,29 @@
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"requires": {
"mimic-fn": "^1.0.0"
}
},
"memoizee": {
"version": "0.4.14",
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz",
"integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==",
"requires": {
"d": "1",
"es5-ext": "^0.10.45",
"es6-weak-map": "^2.0.2",
"event-emitter": "^0.3.5",
"is-promise": "^2.1",
"lru-queue": "0.1",
"next-tick": "1",
"timers-ext": "^0.1.5"
}
},
"meow": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
......@@ -3883,6 +4338,11 @@
"mime-db": "~1.33.0"
}
},
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
"minimatch": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
......@@ -4113,6 +4573,20 @@
"resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU="
},
"next-tick": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
},
"node-cron": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz",
"integrity": "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==",
"requires": {
"opencollective-postinstall": "^2.0.0",
"tz-offset": "0.0.1"
}
},
"node-gyp": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz",
......@@ -4363,7 +4837,6 @@
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"dev": true,
"requires": {
"hosted-git-info": "^2.1.4",
"is-builtin-module": "^1.0.0",
......@@ -4382,6 +4855,14 @@
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "^2.0.0"
}
},
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
......@@ -4403,8 +4884,7 @@
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.8.2",
......@@ -4417,6 +4897,11 @@
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
"integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
},
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
......@@ -4505,7 +4990,6 @@
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
"integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
"dev": true,
"requires": {
"wrappy": "1"
}
......@@ -4516,6 +5000,11 @@
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
"dev": true
},
"opencollective-postinstall": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
},
"opentype.js": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-0.7.3.tgz",
......@@ -4569,8 +5058,7 @@
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-locale": {
"version": "1.4.0",
......@@ -4593,14 +5081,12 @@
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"dev": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
......@@ -4614,6 +5100,32 @@
"minimist": "^1.1.0"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"requires": {
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"requires": {
"p-limit": "^1.1.0"
}
},
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
},
"pac-proxy-agent": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz",
......@@ -4666,7 +5178,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"dev": true,
"requires": {
"error-ex": "^1.2.0"
}
......@@ -4677,6 +5188,22 @@
"integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
"dev": true
},
"parseqs": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
"integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseuri": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
"integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseurl": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
......@@ -4700,14 +5227,17 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-parse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
"dev": true
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
},
"path-root": {
"version": "0.1.1",
......@@ -4757,8 +5287,7 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"pinkie": {
"version": "2.0.4",
......@@ -4902,6 +5431,11 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"proto-list": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
"integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk="
},
"proxy-addr": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
......@@ -5145,14 +5679,12 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"resize-observer-polyfill": {
"version": "1.5.0",
......@@ -5163,7 +5695,6 @@
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
"integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
"dev": true,
"requires": {
"path-parse": "^1.0.5"
}
......@@ -5436,6 +5967,154 @@
}
}
},
"sequelize-cli": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-4.1.1.tgz",
"integrity": "sha512-dcQuE6fwMayB7c+3ICwzMIc3ZBjUY4ieAJvbV/+sL41dMlf4IRh2swD78DAbA6/cT1kRQLbieUvZJnIebddD0g==",
"requires": {
"bluebird": "^3.5.1",
"cli-color": "^1.2.0",
"fs-extra": "^5.0.0",
"js-beautify": "^1.7.4",
"lodash": "^4.17.5",
"resolve": "^1.5.0",
"umzug": "^2.1.0",
"yargs": "^8.0.2"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
},
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "^2.0.0"
}
},
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
"pify": "^2.0.0",
"strip-bom": "^3.0.0"
}
},
"os-locale": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"requires": {
"execa": "^0.7.0",
"lcid": "^1.0.0",
"mem": "^1.1.0"
}
},
"path-type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
"requires": {
"pify": "^2.0.0"
}
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
"requires": {
"load-json-file": "^2.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^2.0.0"
}
},
"read-pkg-up": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
"requires": {
"find-up": "^2.0.0",
"read-pkg": "^2.0.0"
}
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
}
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"yargs": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
"requires": {
"camelcase": "^4.1.0",
"cliui": "^3.2.0",
"decamelize": "^1.1.1",
"get-caller-file": "^1.0.1",
"os-locale": "^2.0.0",
"read-pkg-up": "^2.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^7.0.0"
}
},
"yargs-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
"integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
"requires": {
"camelcase": "^4.1.0"
}
}
}
},
"sequencify": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
......@@ -5487,8 +6166,7 @@
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"set-value": {
"version": "2.0.0",
......@@ -5527,6 +6205,19 @@
"crypt": ">= 0.0.1"
}
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"shimmer": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.0.tgz",
......@@ -5535,14 +6226,12 @@
"sigmund": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
"integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
"dev": true
"integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"smart-buffer": {
"version": "1.1.15",
......@@ -5671,6 +6360,135 @@
"hoek": "2.x.x"
}
},
"socket.io": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz",
"integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==",
"requires": {
"debug": "~4.1.0",
"engine.io": "~3.4.0",
"has-binary2": "~1.0.2",
"socket.io-adapter": "~1.1.0",
"socket.io-client": "2.3.0",
"socket.io-parser": "~3.4.0"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"socket.io-adapter": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
"integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs="
},
"socket.io-client": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz",
"integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==",
"requires": {
"backo2": "1.0.2",
"base64-arraybuffer": "0.1.5",
"component-bind": "1.0.0",
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"engine.io-client": "~3.4.0",
"has-binary2": "~1.0.2",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"object-component": "0.0.3",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"socket.io-parser": "~3.3.0",
"to-array": "0.1.4"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"socket.io-parser": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz",
"integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~3.1.0",
"isarray": "2.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
}
}
},
"socket.io-parser": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.0.tgz",
"integrity": "sha512-/G/VOI+3DBp0+DJKW4KesGnQkQPFmUCbA/oO2QGT6CWxU7hLGWqU3tyuzeSK/dqcyeHsQg1vTe9jiZI8GU9SCQ==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~4.1.0",
"isarray": "2.0.1"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"socks": {
"version": "1.1.10",
"resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
......@@ -5723,7 +6541,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz",
"integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==",
"dev": true,
"requires": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
......@@ -5732,14 +6549,12 @@
"spdx-exceptions": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz",
"integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==",
"dev": true
"integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg=="
},
"spdx-expression-parse": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
"dev": true,
"requires": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
......@@ -5748,8 +6563,7 @@
"spdx-license-ids": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz",
"integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==",
"dev": true
"integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA=="
},
"split-string": {
"version": "3.1.0",
......@@ -5843,7 +6657,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -5868,7 +6681,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -5883,6 +6695,11 @@
"is-utf8": "^0.2.0"
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strip-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
......@@ -6026,11 +6843,25 @@
"integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
"dev": true
},
"timers-ext": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
"integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
"requires": {
"es5-ext": "~0.10.46",
"next-tick": "1"
}
},
"tiny-inflate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.2.tgz",
"integrity": "sha1-k9nez/yIBb1X6uQxDwt0Xptvs6c="
},
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
},
"to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
......@@ -6143,6 +6974,11 @@
"dev": true,
"optional": true
},
"type": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
},
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
......@@ -6165,6 +7001,11 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"tz-offset": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz",
"integrity": "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ=="
},
"uid-safe": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
......@@ -6173,6 +7014,22 @@
"random-bytes": "~1.0.0"
}
},
"umzug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/umzug/-/umzug-2.2.0.tgz",
"integrity": "sha512-xZLW76ax70pND9bx3wqwb8zqkFGzZIK8dIHD9WdNy/CrNfjWcwQgQkGCuUqcuwEBvUm+g07z+qWvY+pxDmMEEw==",
"requires": {
"babel-runtime": "^6.23.0",
"bluebird": "^3.5.3"
},
"dependencies": {
"bluebird": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz",
"integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg=="
}
}
},
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
......@@ -6220,6 +7077,11 @@
"integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
"dev": true
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
......@@ -6345,7 +7207,6 @@
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz",
"integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==",
"dev": true,
"requires": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
......@@ -6516,7 +7377,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
......@@ -6525,8 +7385,15 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.0.tgz",
"integrity": "sha512-+SqNqFbwTm/0DC18KYzIsMTnEWpLwJsiasW/O17la4iDRRIO9uaHbvKiAS3AHgTiuuWerK/brj4O6MYZkei9xg==",
"requires": {
"async-limiter": "^1.0.0"
}
},
"xml2js": {
"version": "0.4.19",
......@@ -6542,6 +7409,11 @@
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
},
"xregexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
......@@ -6555,8 +7427,7 @@
"y18n": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
"dev": true
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
},
"yallist": {
"version": "2.1.2",
......@@ -6608,6 +7479,11 @@
"dev": true
}
}
},
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment