Merge
This commit is contained in:
commit
89a563eaf9
|
@ -5,40 +5,36 @@ module.exports = Self => {
|
||||||
Self.remoteMethodCtx('uploadFile', {
|
Self.remoteMethodCtx('uploadFile', {
|
||||||
description: 'Uploads a file and inserts into dms model',
|
description: 'Uploads a file and inserts into dms model',
|
||||||
accessType: 'WRITE',
|
accessType: 'WRITE',
|
||||||
accepts: [{
|
accepts: [
|
||||||
arg: 'options',
|
{
|
||||||
type: 'object'
|
arg: 'options',
|
||||||
},
|
type: 'object'
|
||||||
{
|
}, {
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: ''
|
||||||
},
|
}, {
|
||||||
{
|
arg: 'companyId',
|
||||||
arg: 'companyId',
|
type: 'Number',
|
||||||
type: 'Number',
|
description: ''
|
||||||
description: ''
|
}, {
|
||||||
},
|
arg: 'dmsTypeId',
|
||||||
{
|
type: 'Number',
|
||||||
arg: 'dmsTypeId',
|
description: ''
|
||||||
type: 'Number',
|
}, {
|
||||||
description: ''
|
arg: 'reference',
|
||||||
},
|
type: 'String',
|
||||||
{
|
description: ''
|
||||||
arg: 'reference',
|
}, {
|
||||||
type: 'String',
|
arg: 'description',
|
||||||
description: ''
|
type: 'String',
|
||||||
},
|
description: ''
|
||||||
{
|
}, {
|
||||||
arg: 'description',
|
arg: 'hasFile',
|
||||||
type: 'String',
|
type: 'Boolean',
|
||||||
description: ''
|
description: ''
|
||||||
},
|
}
|
||||||
{
|
],
|
||||||
arg: 'hasFile',
|
|
||||||
type: 'Boolean',
|
|
||||||
description: ''
|
|
||||||
}],
|
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
root: true
|
root: true
|
||||||
|
@ -49,17 +45,24 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.uploadFile = async(ctx, options = {}) => {
|
Self.uploadFile = async(ctx, options) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const storageConnector = Self.app.dataSources.storage.connector;
|
const storageConnector = Self.app.dataSources.storage.connector;
|
||||||
const myUserId = ctx.req.accessToken.userId;
|
const myUserId = ctx.req.accessToken.userId;
|
||||||
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}});
|
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}});
|
||||||
const args = ctx.args;
|
const args = ctx.args;
|
||||||
const fileOptions = {};
|
const fileOptions = {};
|
||||||
const hasParentTransaction = options && options.transaction;
|
|
||||||
|
|
||||||
if (!options.transaction)
|
let tx;
|
||||||
options.transaction = await Self.beginTransaction({});
|
let myOptions = {};
|
||||||
|
|
||||||
|
if (typeof options == 'object')
|
||||||
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
|
if (!myOptions.transaction) {
|
||||||
|
tx = await Self.beginTransaction({});
|
||||||
|
myOptions.transaction = tx;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const hasWriteRole = await models.DmsType.hasWriteRole(ctx, args.dmsTypeId);
|
const hasWriteRole = await models.DmsType.hasWriteRole(ctx, args.dmsTypeId);
|
||||||
|
@ -83,11 +86,11 @@ module.exports = Self => {
|
||||||
reference: args.reference,
|
reference: args.reference,
|
||||||
description: args.description,
|
description: args.description,
|
||||||
hasFile: args.hasFile
|
hasFile: args.hasFile
|
||||||
}, options).then(newDms => {
|
}, myOptions).then(newDms => {
|
||||||
const extension = storageConnector.getFileExtension(file.name);
|
const extension = storageConnector.getFileExtension(file.name);
|
||||||
const fileName = `${newDms.id}.${extension}`;
|
const fileName = `${newDms.id}.${extension}`;
|
||||||
|
|
||||||
return newDms.updateAttribute('file', fileName, options);
|
return newDms.updateAttribute('file', fileName, myOptions);
|
||||||
}).then(dms => {
|
}).then(dms => {
|
||||||
return models.Container.getContainer('temp').then(container => {
|
return models.Container.getContainer('temp').then(container => {
|
||||||
const originPath = `${container.client.root}/${container.name}/${file.name}`;
|
const originPath = `${container.client.root}/${container.name}/${file.name}`;
|
||||||
|
@ -104,14 +107,10 @@ module.exports = Self => {
|
||||||
|
|
||||||
const resolvedPromise = await Promise.all(promises);
|
const resolvedPromise = await Promise.all(promises);
|
||||||
|
|
||||||
if (!hasParentTransaction)
|
if (tx) await tx.commit();
|
||||||
await options.transaction.commit();
|
|
||||||
|
|
||||||
return resolvedPromise;
|
return resolvedPromise;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!hasParentTransaction)
|
if (tx) await tx.rollback();
|
||||||
await options.transaction.rollback();
|
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -112,7 +112,7 @@ module.exports = function(Self) {
|
||||||
for (let key1 in ctx.Model.relations) {
|
for (let key1 in ctx.Model.relations) {
|
||||||
let val1 = ctx.Model.relations[key1];
|
let val1 = ctx.Model.relations[key1];
|
||||||
if (val1.keyFrom == key && key != 'id') {
|
if (val1.keyFrom == key && key != 'id') {
|
||||||
let recordSet = await ctx.Model.app.models[val1.modelTo.modelName].findById(val, options);
|
let recordSet = await ctx.Model.app.models[val1.modelTo.modelName].findById(val, null, options);
|
||||||
|
|
||||||
let showField = val1.modelTo && val1.modelTo.definition.settings.log && val1.modelTo.definition.settings.log.showField && recordSet && recordSet[val1.modelTo.definition.settings.log.showField];
|
let showField = val1.modelTo && val1.modelTo.definition.settings.log && val1.modelTo.definition.settings.log.showField && recordSet && recordSet[val1.modelTo.definition.settings.log.showField];
|
||||||
if (!showField) {
|
if (!showField) {
|
||||||
|
|
|
@ -11,6 +11,20 @@ module.exports = function(Self) {
|
||||||
setup() {
|
setup() {
|
||||||
Self.super_.setup.call(this);
|
Self.super_.setup.call(this);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setting a global transaction timeout to find out if the service
|
||||||
|
* is blocked because the connection pool is empty.
|
||||||
|
*/
|
||||||
|
this.once('dataSourceAttached', () => {
|
||||||
|
let orgBeginTransaction = this.beginTransaction;
|
||||||
|
this.beginTransaction = function(options, cb) {
|
||||||
|
options = options || {};
|
||||||
|
if (!options.timeout)
|
||||||
|
options.timeout = 30000;
|
||||||
|
return orgBeginTransaction.call(this, options, cb);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
// Register field ACL validation
|
// Register field ACL validation
|
||||||
/* this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx));
|
/* this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx));
|
||||||
this.beforeRemote('updateAll', ctx => this.checkUpdateAcls(ctx));
|
this.beforeRemote('updateAll', ctx => this.checkUpdateAcls(ctx));
|
||||||
|
@ -41,10 +55,11 @@ module.exports = function(Self) {
|
||||||
},
|
},
|
||||||
|
|
||||||
async crud(deletes, updates, creates) {
|
async crud(deletes, updates, creates) {
|
||||||
let transaction = await this.beginTransaction({});
|
let tx = await this.beginTransaction({});
|
||||||
let options = {transaction};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
if (deletes) {
|
if (deletes) {
|
||||||
let promises = [];
|
let promises = [];
|
||||||
for (let id of deletes)
|
for (let id of deletes)
|
||||||
|
@ -65,9 +80,9 @@ module.exports = function(Self) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"strong-error-handler": {
|
"strong-error-handler": {
|
||||||
"params": {
|
"params": {
|
||||||
"debug": true,
|
"debug": true,
|
||||||
"log": true
|
"log": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
},
|
},
|
||||||
"final:after": {
|
"final:after": {
|
||||||
"./middleware/error-handler": {},
|
"./middleware/error-handler": {},
|
||||||
"strong-error-handler": {}
|
"strong-error-handler": {
|
||||||
|
"params": {
|
||||||
|
"log": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
const UserError = require('../../util/user-error');
|
const UserError = require('../../util/user-error');
|
||||||
|
const logToConsole = require('strong-error-handler/lib/logger');
|
||||||
|
|
||||||
module.exports = function() {
|
module.exports = function() {
|
||||||
return function(err, req, res, next) {
|
return function(err, req, res, next) {
|
||||||
|
@ -23,6 +24,9 @@ module.exports = function() {
|
||||||
if (err.sqlState == '45000')
|
if (err.sqlState == '45000')
|
||||||
return next(new UserError(req.__(err.sqlMessage)));
|
return next(new UserError(req.__(err.sqlMessage)));
|
||||||
|
|
||||||
|
if (!err.statusCode || err.statusCode >= 500)
|
||||||
|
logToConsole(req, err);
|
||||||
|
|
||||||
next(err);
|
next(err);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,39 +21,40 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.clone = async id => {
|
Self.clone = async id => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const transaction = await Self.beginTransaction({});
|
const tx = await Self.beginTransaction({});
|
||||||
const options = {transaction};
|
|
||||||
|
|
||||||
// Find original zone
|
|
||||||
const zone = await models.Zone.findOne({
|
|
||||||
fields: [
|
|
||||||
'name',
|
|
||||||
'hour',
|
|
||||||
'warehouseFk',
|
|
||||||
'agencyModeFk',
|
|
||||||
'travelingDays',
|
|
||||||
'price',
|
|
||||||
'bonus',
|
|
||||||
'isVolumetric'],
|
|
||||||
where: {id}
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
const hour = zone.hour;
|
|
||||||
const offset = hour.getTimezoneOffset() * 60000;
|
|
||||||
hour.setTime(hour.getTime() + offset);
|
|
||||||
|
|
||||||
// Find all original included geolocations
|
|
||||||
const includedGeo = await models.ZoneIncluded.find({
|
|
||||||
fields: ['geoFk', 'isIncluded'],
|
|
||||||
where: {zoneFk: id}
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
// Find all original selected days
|
|
||||||
const calendarDays = await models.ZoneCalendar.find({
|
|
||||||
where: {zoneFk: id}
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
|
// Find original zone
|
||||||
|
const zone = await models.Zone.findOne({
|
||||||
|
fields: [
|
||||||
|
'name',
|
||||||
|
'hour',
|
||||||
|
'warehouseFk',
|
||||||
|
'agencyModeFk',
|
||||||
|
'travelingDays',
|
||||||
|
'price',
|
||||||
|
'bonus',
|
||||||
|
'isVolumetric'],
|
||||||
|
where: {id}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
const hour = zone.hour;
|
||||||
|
const offset = hour.getTimezoneOffset() * 60000;
|
||||||
|
hour.setTime(hour.getTime() + offset);
|
||||||
|
|
||||||
|
// Find all original included geolocations
|
||||||
|
const includedGeo = await models.ZoneIncluded.find({
|
||||||
|
fields: ['geoFk', 'isIncluded'],
|
||||||
|
where: {zoneFk: id}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
// Find all original selected days
|
||||||
|
const calendarDays = await models.ZoneCalendar.find({
|
||||||
|
where: {zoneFk: id}
|
||||||
|
}, options);
|
||||||
|
|
||||||
const newZone = await Self.create(zone, options);
|
const newZone = await Self.create(zone, options);
|
||||||
const newIncludedGeo = includedGeo.map(included => {
|
const newIncludedGeo = includedGeo.map(included => {
|
||||||
included.zoneFk = newZone.id;
|
included.zoneFk = newZone.id;
|
||||||
|
@ -66,11 +67,11 @@ module.exports = Self => {
|
||||||
|
|
||||||
await models.ZoneIncluded.create(newIncludedGeo, options);
|
await models.ZoneIncluded.create(newIncludedGeo, options);
|
||||||
await models.ZoneCalendar.create(newCalendayDays, options);
|
await models.ZoneCalendar.create(newCalendayDays, options);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return newZone;
|
return newZone;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
async function addSalesToTicket(salesToRefund, ticketFk, transaction) {
|
async function addSalesToTicket(salesToRefund, ticketFk, options) {
|
||||||
let formatedSales = [];
|
let formatedSales = [];
|
||||||
salesToRefund.forEach(sale => {
|
salesToRefund.forEach(sale => {
|
||||||
let formatedSale = {
|
let formatedSale = {
|
||||||
|
@ -35,10 +35,10 @@ module.exports = Self => {
|
||||||
};
|
};
|
||||||
formatedSales.push(formatedSale);
|
formatedSales.push(formatedSale);
|
||||||
});
|
});
|
||||||
return await Self.app.models.Sale.create(formatedSales, transaction);
|
return await Self.app.models.Sale.create(formatedSales, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function insertIntoClaimEnd(createdSales, claimId, workerId, transaction) {
|
async function insertIntoClaimEnd(createdSales, claimId, workerId, options) {
|
||||||
let formatedSales = [];
|
let formatedSales = [];
|
||||||
createdSales.forEach(sale => {
|
createdSales.forEach(sale => {
|
||||||
let formatedSale = {
|
let formatedSale = {
|
||||||
|
@ -48,17 +48,17 @@ module.exports = Self => {
|
||||||
};
|
};
|
||||||
formatedSales.push(formatedSale);
|
formatedSales.push(formatedSale);
|
||||||
});
|
});
|
||||||
return await Self.app.models.ClaimEnd.create(formatedSales, transaction);
|
return await Self.app.models.ClaimEnd.create(formatedSales, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveObservation(observation, transaction) {
|
async function saveObservation(observation, options) {
|
||||||
let query = `INSERT INTO vn.ticketObservation(ticketFk, observationTypeFk, description) VALUES(?, ?, ?)
|
let query = `INSERT INTO vn.ticketObservation(ticketFk, observationTypeFk, description) VALUES(?, ?, ?)
|
||||||
ON DUPLICATE KEY UPDATE description = CONCAT(vn.ticketObservation.description, VALUES(description),' ')`;
|
ON DUPLICATE KEY UPDATE description = CONCAT(vn.ticketObservation.description, VALUES(description),' ')`;
|
||||||
await Self.rawSql(query, [
|
await Self.rawSql(query, [
|
||||||
observation.ticketFk,
|
observation.ticketFk,
|
||||||
observation.observationTypeFk,
|
observation.observationTypeFk,
|
||||||
observation.description
|
observation.description
|
||||||
], transaction);
|
], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
Self.importToNewRefundTicket = async(ctx, id) => {
|
Self.importToNewRefundTicket = async(ctx, id) => {
|
||||||
|
@ -109,37 +109,39 @@ module.exports = Self => {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let newRefundTicket = await models.Ticket.new(ctx, params, {transaction: transaction});
|
let options = {transaction: tx};
|
||||||
|
|
||||||
|
let newRefundTicket = await models.Ticket.new(ctx, params, options);
|
||||||
|
|
||||||
let observation = {
|
let observation = {
|
||||||
description: `Reclama ticket: ${claim.ticketFk}`,
|
description: `Reclama ticket: ${claim.ticketFk}`,
|
||||||
ticketFk: newRefundTicket.id,
|
ticketFk: newRefundTicket.id,
|
||||||
observationTypeFk: obsevationType.id
|
observationTypeFk: obsevationType.id
|
||||||
};
|
};
|
||||||
await saveObservation(observation, {transaction: transaction});
|
await saveObservation(observation, options);
|
||||||
|
|
||||||
await models.TicketTracking.create({
|
await models.TicketTracking.create({
|
||||||
ticketFk: newRefundTicket.id,
|
ticketFk: newRefundTicket.id,
|
||||||
stateFk: state.id,
|
stateFk: state.id,
|
||||||
workerFk: worker.id
|
workerFk: worker.id
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
let salesToRefund = await models.ClaimBeginning.find(salesFilter);
|
let salesToRefund = await models.ClaimBeginning.find(salesFilter);
|
||||||
let createdSales = await addSalesToTicket(salesToRefund, newRefundTicket.id, {transaction: transaction});
|
let createdSales = await addSalesToTicket(salesToRefund, newRefundTicket.id, options);
|
||||||
insertIntoClaimEnd(createdSales, id, worker.id, {transaction: transaction});
|
insertIntoClaimEnd(createdSales, id, worker.id, options);
|
||||||
|
|
||||||
await Self.rawSql('CALL vn.ticketCalculateClon(?, ?)', [
|
await Self.rawSql('CALL vn.ticketCalculateClon(?, ?)', [
|
||||||
newRefundTicket.id, claim.ticketFk
|
newRefundTicket.id, claim.ticketFk
|
||||||
], {transaction: transaction});
|
], options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return newRefundTicket;
|
return newRefundTicket;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,27 +26,29 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.createFromSales = async(ctx, params) => {
|
Self.createFromSales = async(ctx, params) => {
|
||||||
let model = Self.app.models;
|
let model = Self.app.models;
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let userId = ctx.req.accessToken.userId;
|
let userId = ctx.req.accessToken.userId;
|
||||||
let worker = await Self.app.models.Worker.findOne({where: {userFk: userId}});
|
let worker = await Self.app.models.Worker.findOne({where: {userFk: userId}});
|
||||||
|
|
||||||
params.claim.workerFk = worker.id;
|
params.claim.workerFk = worker.id;
|
||||||
let newClaim = await Self.create(params.claim, {transaction});
|
let newClaim = await Self.create(params.claim, options);
|
||||||
let promises = [];
|
let promises = [];
|
||||||
for (let i = 0; i < params.sales.length; i++) {
|
for (let i = 0; i < params.sales.length; i++) {
|
||||||
promises.push(model.ClaimBeginning.create(
|
promises.push(model.ClaimBeginning.create({
|
||||||
{saleFk: params.sales[i].id,
|
saleFk: params.sales[i].id,
|
||||||
claimFk: newClaim.id,
|
claimFk: newClaim.id,
|
||||||
quantity: params.sales[i].quantity},
|
quantity: params.sales[i].quantity
|
||||||
{transaction}));
|
}, options));
|
||||||
}
|
}
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return newClaim;
|
return newClaim;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,8 +30,10 @@ module.exports = Self => {
|
||||||
where: {claimFk: params.claimFk}
|
where: {claimFk: params.claimFk}
|
||||||
});
|
});
|
||||||
|
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
for (let i = 0; i < claimEnds.length; i++) {
|
for (let i = 0; i < claimEnds.length; i++) {
|
||||||
const claimEnd = claimEnds[i];
|
const claimEnd = claimEnds[i];
|
||||||
const destination = claimEnd.claimDestination();
|
const destination = claimEnd.claimDestination();
|
||||||
|
@ -45,7 +47,7 @@ module.exports = Self => {
|
||||||
addressFk: addressFk,
|
addressFk: addressFk,
|
||||||
companyFk: sale.ticket().companyFk,
|
companyFk: sale.ticket().companyFk,
|
||||||
warehouseFk: sale.ticket().warehouseFk
|
warehouseFk: sale.ticket().warehouseFk
|
||||||
}, transaction);
|
}, options);
|
||||||
|
|
||||||
let address = await models.Address.findOne({
|
let address = await models.Address.findOne({
|
||||||
where: {id: addressFk}
|
where: {id: addressFk}
|
||||||
|
@ -58,7 +60,7 @@ module.exports = Self => {
|
||||||
warehouseFk: sale.ticket().warehouseFk,
|
warehouseFk: sale.ticket().warehouseFk,
|
||||||
companyFk: sale.ticket().companyFk,
|
companyFk: sale.ticket().companyFk,
|
||||||
userId: userId
|
userId: userId
|
||||||
}, transaction);
|
}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
await models.Sale.create({
|
await models.Sale.create({
|
||||||
|
@ -68,7 +70,7 @@ module.exports = Self => {
|
||||||
quantity: -sale.quantity,
|
quantity: -sale.quantity,
|
||||||
price: sale.price,
|
price: sale.price,
|
||||||
discount: 100
|
discount: 100
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
if (sale.ticket().client().salesPerson()) {
|
if (sale.ticket().client().salesPerson()) {
|
||||||
await sendMessage(ctx, {
|
await sendMessage(ctx, {
|
||||||
|
@ -78,20 +80,20 @@ module.exports = Self => {
|
||||||
quantity: sale.quantity,
|
quantity: sale.quantity,
|
||||||
concept: sale.concept,
|
concept: sale.concept,
|
||||||
nickname: address.nickname
|
nickname: address.nickname
|
||||||
}, transaction);
|
}, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let claim = await Self.findById(params.claimFk);
|
let claim = await Self.findById(params.claimFk);
|
||||||
claim = await claim.updateAttributes({
|
claim = await claim.updateAttributes({
|
||||||
claimStateFk: resolvedState
|
claimStateFk: resolvedState
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return claim;
|
return claim;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -117,7 +119,7 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTicketId(params, transaction) {
|
async function getTicketId(params, options) {
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
currentDate.setHours(null, null, null);
|
currentDate.setHours(null, null, null);
|
||||||
|
|
||||||
|
@ -129,12 +131,12 @@ module.exports = Self => {
|
||||||
shipped: currentDate,
|
shipped: currentDate,
|
||||||
landed: currentDate
|
landed: currentDate
|
||||||
}
|
}
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
return ticket && ticket.id;
|
return ticket && ticket.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createTicket(ctx, params, transaction) {
|
async function createTicket(ctx, params, options) {
|
||||||
let ticket = await Self.app.models.Ticket.new(ctx,
|
let ticket = await Self.app.models.Ticket.new(ctx,
|
||||||
{
|
{
|
||||||
shipped: new Date(),
|
shipped: new Date(),
|
||||||
|
@ -144,18 +146,18 @@ module.exports = Self => {
|
||||||
companyFk: params.companyFk,
|
companyFk: params.companyFk,
|
||||||
addressFk: params.addressFk,
|
addressFk: params.addressFk,
|
||||||
userId: params.userId
|
userId: params.userId
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
return ticket.id;
|
return ticket.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendMessage(ctx, params, transaction) {
|
async function sendMessage(ctx, params, options) {
|
||||||
const message = `Envio ${params.quantity} unidades de "${params.concept}" (#${params.itemFk}) a `
|
const message = `Envio ${params.quantity} unidades de "${params.concept}" (#${params.itemFk}) a `
|
||||||
+ `"${params.nickname}" provenientes del ticket #${params.ticketFk}`;
|
+ `"${params.nickname}" provenientes del ticket #${params.ticketFk}`;
|
||||||
|
|
||||||
await Self.app.models.Message.send(ctx, {
|
await Self.app.models.Message.send(ctx, {
|
||||||
recipientFk: params.recipientFk,
|
recipientFk: params.recipientFk,
|
||||||
message: message
|
message: message
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -129,29 +129,28 @@
|
||||||
enable="true">
|
enable="true">
|
||||||
</vn-spinner>
|
</vn-spinner>
|
||||||
<div ng-if="$ctrl.mana != null">
|
<div ng-if="$ctrl.mana != null">
|
||||||
<vn-horizontal pad-medium class="header">
|
<vn-horizontal pad-medium class="header">
|
||||||
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<div pad-medium>
|
<div pad-medium>
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
vn-focus
|
vn-focus
|
||||||
label="Discount"
|
label="Discount"
|
||||||
model="$ctrl.newDiscount"
|
model="$ctrl.newDiscount"
|
||||||
type="text"
|
type="text"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
on-change="$ctrl.updateDiscount()">
|
on-change="$ctrl.updateDiscount()">
|
||||||
<t-right-icons>
|
<t-right-icons>
|
||||||
<span class="filter">€</span>
|
<span class="filter">€</span>
|
||||||
</t-right-icons>
|
</t-right-icons>
|
||||||
</vn-input-number>
|
</vn-input-number>
|
||||||
<div class="simulator">
|
<div class="simulator">
|
||||||
<p class="simulatorTitle" translate>New price</p>
|
<p class="simulatorTitle" translate>New price</p>
|
||||||
<p>{{($ctrl.saleClaimed.quantity * $ctrl.saleClaimed.sale.price) -
|
<p>{{($ctrl.saleClaimed.quantity * $ctrl.saleClaimed.sale.price) -
|
||||||
(($ctrl.newDiscount * ($ctrl.saleClaimed.quantity * $ctrl.saleClaimed.sale.price))/100)
|
(($ctrl.newDiscount * ($ctrl.saleClaimed.quantity * $ctrl.saleClaimed.sale.price))/100)
|
||||||
| currency: 'EUR':2}}
|
| currency: 'EUR':2}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</vn-popover>
|
</vn-popover>
|
||||||
<p>
|
|
|
@ -19,23 +19,25 @@ module.exports = function(Self) {
|
||||||
Self.createDefaultAddress = async data => {
|
Self.createDefaultAddress = async data => {
|
||||||
const Address = Self.app.models.Address;
|
const Address = Self.app.models.Address;
|
||||||
const Client = Self.app.models.Client;
|
const Client = Self.app.models.Client;
|
||||||
const transaction = await Address.beginTransaction({});
|
const tx = await Address.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let address = data.address;
|
let address = data.address;
|
||||||
let newAddress = await Address.create(address, {transaction});
|
let newAddress = await Address.create(address, options);
|
||||||
let client = await Client.findById(address.clientFk, {transaction});
|
let client = await Client.findById(address.clientFk, options);
|
||||||
|
|
||||||
if (data.isDefaultAddress) {
|
if (data.isDefaultAddress) {
|
||||||
await client.updateAttributes({
|
await client.updateAttributes({
|
||||||
defaultAddressFk: newAddress.id
|
defaultAddressFk: newAddress.id
|
||||||
}, {transaction});
|
}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
return newAddress;
|
return newAddress;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,15 +19,17 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.confirmTransaction = async(ctx, id) => {
|
Self.confirmTransaction = async(ctx, id) => {
|
||||||
let transaction = await Self.beginTransaction({});
|
|
||||||
let userId = ctx.req.accessToken.userId;
|
let userId = ctx.req.accessToken.userId;
|
||||||
|
let tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let oldTpvTransaction = await Self.app.models.TpvTransaction.findById(id, {options: transaction});
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let confirm = await Self.rawSql('CALL hedera.tpvTransactionConfirmById(?)', [id], {options: transaction});
|
let oldTpvTransaction = await Self.app.models.TpvTransaction.findById(id, null, options);
|
||||||
|
|
||||||
let tpvTransaction = await Self.app.models.TpvTransaction.findById(id, {options: transaction});
|
let confirm = await Self.rawSql('CALL hedera.tpvTransactionConfirmById(?)', [id], options);
|
||||||
|
|
||||||
|
let tpvTransaction = await Self.app.models.TpvTransaction.findById(id, null, options);
|
||||||
|
|
||||||
let oldInstance = {status: oldTpvTransaction.status};
|
let oldInstance = {status: oldTpvTransaction.status};
|
||||||
let newInstance = {status: tpvTransaction.status};
|
let newInstance = {status: tpvTransaction.status};
|
||||||
|
@ -42,12 +44,12 @@ module.exports = Self => {
|
||||||
newInstance: newInstance
|
newInstance: newInstance
|
||||||
};
|
};
|
||||||
|
|
||||||
await Self.app.models.ClientLog.create(logRecord, {options: transaction});
|
await Self.app.models.ClientLog.create(logRecord, options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
return confirm;
|
return confirm;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,10 +25,12 @@ module.exports = function(Self) {
|
||||||
};
|
};
|
||||||
const Account = Self.app.models.Account;
|
const Account = Self.app.models.Account;
|
||||||
const Address = Self.app.models.Address;
|
const Address = Self.app.models.Address;
|
||||||
const transaction = await Account.beginTransaction({});
|
const tx = await Account.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let account = await Account.create(user, {transaction});
|
let options = {transaction: tx};
|
||||||
|
|
||||||
|
let account = await Account.create(user, options);
|
||||||
let client = await Self.create({
|
let client = await Self.create({
|
||||||
id: account.id,
|
id: account.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
|
@ -42,7 +44,7 @@ module.exports = function(Self) {
|
||||||
provinceFk: data.provinceFk,
|
provinceFk: data.provinceFk,
|
||||||
countryFk: data.countryFk,
|
countryFk: data.countryFk,
|
||||||
isEqualizated: data.isEqualizated
|
isEqualizated: data.isEqualizated
|
||||||
}, {transaction});
|
}, options);
|
||||||
|
|
||||||
|
|
||||||
let address = await Address.create({
|
let address = await Address.create({
|
||||||
|
@ -54,16 +56,16 @@ module.exports = function(Self) {
|
||||||
provinceFk: client.provinceFk,
|
provinceFk: client.provinceFk,
|
||||||
isEqualizated: client.isEqualizated,
|
isEqualizated: client.isEqualizated,
|
||||||
isActive: true
|
isActive: true
|
||||||
}, {transaction});
|
}, options);
|
||||||
|
|
||||||
await client.updateAttributes({
|
await client.updateAttributes({
|
||||||
defaultAddressFk: address.id
|
defaultAddressFk: address.id
|
||||||
}, {transaction});
|
}, options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
return client;
|
return client;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,11 +50,12 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.uploadFile = async(ctx, id) => {
|
Self.uploadFile = async(ctx, id) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const transaction = await Self.beginTransaction({});
|
|
||||||
const options = {transaction};
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
|
const tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const uploadedFiles = await models.Dms.uploadFile(ctx, options);
|
const uploadedFiles = await models.Dms.uploadFile(ctx, options);
|
||||||
uploadedFiles.forEach(dms => {
|
uploadedFiles.forEach(dms => {
|
||||||
const newClientDms = models.ClientDms.create({
|
const newClientDms = models.ClientDms.create({
|
||||||
|
@ -66,11 +67,11 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
const resolvedPromises = await Promise.all(promises);
|
const resolvedPromises = await Promise.all(promises);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return resolvedPromises;
|
return resolvedPromises;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,11 +23,13 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.createWithInsurance = async(data, ctx) => {
|
Self.createWithInsurance = async(data, ctx) => {
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let classificationSchema = {client: data.clientFk, started: data.started};
|
let classificationSchema = {client: data.clientFk, started: data.started};
|
||||||
let newClassification = await Self.create(classificationSchema, {transaction});
|
let newClassification = await Self.create(classificationSchema, options);
|
||||||
let CreditInsurance = Self.app.models.CreditInsurance;
|
let CreditInsurance = Self.app.models.CreditInsurance;
|
||||||
let insuranceSchema = {
|
let insuranceSchema = {
|
||||||
creditClassification: newClassification.id,
|
creditClassification: newClassification.id,
|
||||||
|
@ -35,13 +37,13 @@ module.exports = Self => {
|
||||||
grade: data.grade
|
grade: data.grade
|
||||||
};
|
};
|
||||||
|
|
||||||
let newCreditInsurance = await CreditInsurance.create(insuranceSchema, {transaction});
|
let newCreditInsurance = await CreditInsurance.create(insuranceSchema, options);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
await CreditInsurance.messageSend(newCreditInsurance, ctx.req.accessToken);
|
await CreditInsurance.messageSend(newCreditInsurance, ctx.req.accessToken);
|
||||||
|
|
||||||
return newClassification;
|
return newClassification;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,24 +21,24 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.delete = async id => {
|
Self.delete = async id => {
|
||||||
const transaction = await Self.beginTransaction({});
|
const tx = await Self.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let invoiceOut = await Self.findById(id);
|
let invoiceOut = await Self.findById(id);
|
||||||
let tickets = await Self.app.models.Ticket.find({where: {refFk: invoiceOut.ref}});
|
let tickets = await Self.app.models.Ticket.find({where: {refFk: invoiceOut.ref}});
|
||||||
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
tickets.forEach(ticket => {
|
tickets.forEach(ticket => {
|
||||||
promises.push(ticket.updateAttribute('refFk', null, {transaction}));
|
promises.push(ticket.updateAttribute('refFk', null, options));
|
||||||
});
|
});
|
||||||
|
|
||||||
return Promise.all(promises).then(async() => {
|
await Promise.all(promises);
|
||||||
await invoiceOut.destroy({transaction});
|
await invoiceOut.destroy(options);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
return tickets;
|
||||||
return tickets;
|
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,11 +24,13 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const invoiceReportFk = 30; // FIXME - Should be deprecated
|
const invoiceReportFk = 30; // FIXME - Should be deprecated
|
||||||
const worker = await models.Worker.findOne({where: {userFk: userId}});
|
const worker = await models.Worker.findOne({where: {userFk: userId}});
|
||||||
const transaction = await Self.beginTransaction({});
|
const tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
// Remove all invoice references from tickets
|
// Remove all invoice references from tickets
|
||||||
const invoiceOut = await models.InvoiceOut.findById(id, {transaction});
|
const invoiceOut = await models.InvoiceOut.findById(id, null, options);
|
||||||
await invoiceOut.updateAttributes({
|
await invoiceOut.updateAttributes({
|
||||||
hasPdf: false
|
hasPdf: false
|
||||||
});
|
});
|
||||||
|
@ -36,13 +38,13 @@ module.exports = Self => {
|
||||||
// Send to print queue
|
// Send to print queue
|
||||||
await Self.rawSql(`
|
await Self.rawSql(`
|
||||||
INSERT INTO vn.printServerQueue (reportFk, param1, workerFk)
|
INSERT INTO vn.printServerQueue (reportFk, param1, workerFk)
|
||||||
VALUES (?, ?, ?)`, [invoiceReportFk, id, worker.id], {transaction});
|
VALUES (?, ?, ?)`, [invoiceReportFk, id, worker.id], options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return invoiceOut;
|
return invoiceOut;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,11 +23,12 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.clone = async itemId => {
|
Self.clone = async itemId => {
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
let options = {transaction};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const origin = await Self.findById(itemId, options);
|
let options = {transaction: tx};
|
||||||
|
|
||||||
|
const origin = await Self.findById(itemId, null, options);
|
||||||
if (!origin)
|
if (!origin)
|
||||||
throw new UserError(`That item doesn't exists`);
|
throw new UserError(`That item doesn't exists`);
|
||||||
|
|
||||||
|
@ -46,11 +47,10 @@ module.exports = Self => {
|
||||||
await cloneTags(origin.id, newItem.id, promises, options);
|
await cloneTags(origin.id, newItem.id, promises, options);
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return newItem;
|
return newItem;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,16 +33,18 @@ module.exports = Self => {
|
||||||
throw new UserError(`You don't have enough privileges to do that`);
|
throw new UserError(`You don't have enough privileges to do that`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let provisionalName = params.provisionalName;
|
let provisionalName = params.provisionalName;
|
||||||
delete params.provisionalName;
|
delete params.provisionalName;
|
||||||
|
|
||||||
let item = await Self.app.models.Item.create(params, {transaction: transaction});
|
let item = await Self.app.models.Item.create(params, options);
|
||||||
|
|
||||||
let typeTags = await Self.app.models.ItemTypeTag.find({where: {itemTypeFk: item.typeFk}});
|
let typeTags = await Self.app.models.ItemTypeTag.find({where: {itemTypeFk: item.typeFk}});
|
||||||
let query = `SET @isTriggerDisabled = TRUE`;
|
let query = `SET @isTriggerDisabled = TRUE`;
|
||||||
await Self.rawSql(query, null, {transaction: transaction});
|
await Self.rawSql(query, null, options);
|
||||||
|
|
||||||
let nameTag = await Self.app.models.Tag.findOne({where: {name: 'Nombre temporal'}});
|
let nameTag = await Self.app.models.Tag.findOne({where: {name: 'Nombre temporal'}});
|
||||||
|
|
||||||
|
@ -53,18 +55,18 @@ module.exports = Self => {
|
||||||
newTags.push({itemFk: item.id, tagFk: typeTag.tagFk, value: '', priority: typeTag.priority});
|
newTags.push({itemFk: item.id, tagFk: typeTag.tagFk, value: '', priority: typeTag.priority});
|
||||||
});
|
});
|
||||||
|
|
||||||
await Self.app.models.ItemTag.create(newTags, {transaction: transaction});
|
await Self.app.models.ItemTag.create(newTags, options);
|
||||||
|
|
||||||
query = `SET @isTriggerDisabled = FALSE`;
|
query = `SET @isTriggerDisabled = FALSE`;
|
||||||
await Self.rawSql(query, null, {transaction: transaction});
|
await Self.rawSql(query, null, options);
|
||||||
|
|
||||||
|
|
||||||
query = `CALL vn.itemRefreshTags(?)`;
|
query = `CALL vn.itemRefreshTags(?)`;
|
||||||
await Self.rawSql(query, [item.id], {transaction: transaction});
|
await Self.rawSql(query, [item.id], options);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
return item;
|
return item;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,15 +42,17 @@ module.exports = Self => {
|
||||||
where: {description: 'Corregido'}
|
where: {description: 'Corregido'}
|
||||||
});
|
});
|
||||||
|
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let item = await models.Item.findById(itemFk);
|
let item = await models.Item.findById(itemFk);
|
||||||
|
|
||||||
let ticketFk = await getTicketId({
|
let ticketFk = await getTicketId({
|
||||||
clientFk: itemDestination.address.clientFk,
|
clientFk: itemDestination.address.clientFk,
|
||||||
addressFk: itemDestination.addressFk,
|
addressFk: itemDestination.addressFk,
|
||||||
warehouseFk: warehouseFk
|
warehouseFk: warehouseFk
|
||||||
}, transaction);
|
}, options);
|
||||||
|
|
||||||
if (!ticketFk) {
|
if (!ticketFk) {
|
||||||
ticketFk = await createTicket(ctx, {
|
ticketFk = await createTicket(ctx, {
|
||||||
|
@ -58,15 +60,15 @@ module.exports = Self => {
|
||||||
addressFk: itemDestination.addressFk,
|
addressFk: itemDestination.addressFk,
|
||||||
warehouseFk: warehouseFk,
|
warehouseFk: warehouseFk,
|
||||||
userId: userId
|
userId: userId
|
||||||
}, transaction);
|
}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let query = `
|
let query = `
|
||||||
CALL vn.getItemVisibleAvailable(?,curdate(),?,?)`;
|
CALL vn.getItemVisibleAvailable(?,curdate(),?,?)`;
|
||||||
|
|
||||||
let options = [itemFk, warehouseFk, true];
|
let params = [itemFk, warehouseFk, true];
|
||||||
let [res] = await Self.rawSql(query, options, {transaction: transaction});
|
let [res] = await Self.rawSql(query, params, options);
|
||||||
|
|
||||||
let newQuantity = res[0].visible - quantity;
|
let newQuantity = res[0].visible - quantity;
|
||||||
|
|
||||||
|
@ -76,16 +78,16 @@ module.exports = Self => {
|
||||||
concept: item.name,
|
concept: item.name,
|
||||||
quantity: newQuantity,
|
quantity: newQuantity,
|
||||||
discount: 100
|
discount: 100
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
return ticketFk;
|
return ticketFk;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createTicket(ctx, params, transaction) {
|
async function createTicket(ctx, params, options) {
|
||||||
let ticket = await Self.app.models.Ticket.new(
|
let ticket = await Self.app.models.Ticket.new(
|
||||||
ctx,
|
ctx,
|
||||||
{
|
{
|
||||||
|
@ -96,13 +98,13 @@ module.exports = Self => {
|
||||||
companyFk: params.companyFk,
|
companyFk: params.companyFk,
|
||||||
addressFk: params.addressFk,
|
addressFk: params.addressFk,
|
||||||
userId: params.userId
|
userId: params.userId
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
return ticket.id;
|
return ticket.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function getTicketId(params, transaction) {
|
async function getTicketId(params, options) {
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
currentDate.setHours(null, null, null);
|
currentDate.setHours(null, null, null);
|
||||||
|
|
||||||
|
@ -113,7 +115,7 @@ module.exports = Self => {
|
||||||
shipped: currentDate,
|
shipped: currentDate,
|
||||||
landed: currentDate
|
landed: currentDate
|
||||||
}
|
}
|
||||||
}, {transaction: transaction});
|
}, options);
|
||||||
|
|
||||||
return ticket && ticket.id;
|
return ticket && ticket.id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('item clone()', () => {
|
fdescribe('item clone()', () => {
|
||||||
let nextItemId;
|
let nextItemId;
|
||||||
|
|
||||||
beforeEach(async() => {
|
beforeEach(async() => {
|
||||||
|
|
|
@ -26,8 +26,6 @@ module.exports = Self => {
|
||||||
let currentTicket = await models.Ticket.findById(params.currentTicket.currentTicketId);
|
let currentTicket = await models.Ticket.findById(params.currentTicket.currentTicketId);
|
||||||
let newTicketData = {};
|
let newTicketData = {};
|
||||||
let receiverTicket = params.receiverTicket;
|
let receiverTicket = params.receiverTicket;
|
||||||
let transaction = await Self.beginTransaction({});
|
|
||||||
let options = {transaction};
|
|
||||||
|
|
||||||
let isCurrentTicketEditable = await models.Ticket.isEditable(params.currentTicket.currentTicketId);
|
let isCurrentTicketEditable = await models.Ticket.isEditable(params.currentTicket.currentTicketId);
|
||||||
if (!isCurrentTicketEditable)
|
if (!isCurrentTicketEditable)
|
||||||
|
@ -55,7 +53,11 @@ module.exports = Self => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
if (!params.receiverTicket.id)
|
if (!params.receiverTicket.id)
|
||||||
receiverTicket = await models.Ticket.new(ctx, newTicketData, options);
|
receiverTicket = await models.Ticket.new(ctx, newTicketData, options);
|
||||||
|
|
||||||
|
@ -74,11 +76,11 @@ module.exports = Self => {
|
||||||
promises.push(currentTicket.updateAttributes({isDeleted: true}, options));
|
promises.push(currentTicket.updateAttributes({isDeleted: true}, options));
|
||||||
|
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return receiverTicket;
|
return receiverTicket;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,10 +30,11 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.updatePrice = async(id, newPrice) => {
|
Self.updatePrice = async(id, newPrice) => {
|
||||||
let models = Self.app.models;
|
let models = Self.app.models;
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
let options = {transaction};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let filter = {
|
let filter = {
|
||||||
fields: ['id', 'ticketFk', 'price'],
|
fields: ['id', 'ticketFk', 'price'],
|
||||||
include: {
|
include: {
|
||||||
|
@ -86,9 +87,9 @@ module.exports = Self => {
|
||||||
query = `call vn.manaSpellersRequery(?)`;
|
query = `call vn.manaSpellersRequery(?)`;
|
||||||
await Self.rawSql(query, [salesPerson], options);
|
await Self.rawSql(query, [salesPerson], options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,10 +32,11 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.confirm = async ctx => {
|
Self.confirm = async ctx => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
let transaction = await Self.beginTransaction({});
|
let tx = await Self.beginTransaction({});
|
||||||
let options = {transaction: transaction};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let item = await models.Item.findById(ctx.args.itemFk);
|
let item = await models.Item.findById(ctx.args.itemFk);
|
||||||
if (!item)
|
if (!item)
|
||||||
throw new UserError(`That item doesn't exists`);
|
throw new UserError(`That item doesn't exists`);
|
||||||
|
@ -88,9 +89,9 @@ module.exports = Self => {
|
||||||
message: message
|
message: message
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,19 +26,20 @@ module.exports = function(Self) {
|
||||||
|
|
||||||
Self.makeInvoice = async(ctx, id) => {
|
Self.makeInvoice = async(ctx, id) => {
|
||||||
let userId = ctx.req.accessToken.userId;
|
let userId = ctx.req.accessToken.userId;
|
||||||
let models = Self.app.models;
|
let $ = Self.app.models;
|
||||||
|
let tx = await Self.beginTransaction({});
|
||||||
let options = {};
|
|
||||||
options.transaction = await Self.beginTransaction({});
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let ticket = await models.Ticket.findById(id, {fields: ['id', 'clientFk', 'companyFk']});
|
let options = {transaction: tx};
|
||||||
|
|
||||||
let clientCanBeInvoiced = await models.Client.canBeInvoiced(ticket.clientFk);
|
let filter = {fields: ['id', 'clientFk', 'companyFk']};
|
||||||
|
let ticket = await $.Ticket.findById(id, filter, options);
|
||||||
|
|
||||||
|
let clientCanBeInvoiced = await $.Client.canBeInvoiced(ticket.clientFk);
|
||||||
if (!clientCanBeInvoiced)
|
if (!clientCanBeInvoiced)
|
||||||
throw new UserError(`This client can't be invoiced`);
|
throw new UserError(`This client can't be invoiced`);
|
||||||
|
|
||||||
let ticketCanBeInvoiced = await models.Ticket.canBeInvoiced(ticket.id);
|
let ticketCanBeInvoiced = await $.Ticket.canBeInvoiced(ticket.id);
|
||||||
if (!ticketCanBeInvoiced)
|
if (!ticketCanBeInvoiced)
|
||||||
throw new UserError(`This ticket can't be invoiced`);
|
throw new UserError(`This ticket can't be invoiced`);
|
||||||
|
|
||||||
|
@ -50,9 +51,12 @@ module.exports = function(Self) {
|
||||||
query = `CALL vn.invoiceFromTicket(?)`;
|
query = `CALL vn.invoiceFromTicket(?)`;
|
||||||
await Self.rawSql(query, [ticket.id], options);
|
await Self.rawSql(query, [ticket.id], options);
|
||||||
|
|
||||||
query = `CALL vn.invoiceOutMake(?, ?, @invoiceId);
|
result = await Self.rawSql(
|
||||||
SELECT @invoiceId AS invoiceId;`;
|
`CALL vn.invoiceOutMake(?, ?, @invoiceId);
|
||||||
result = await Self.rawSql(query, [serial, null], options);
|
SELECT @invoiceId AS invoiceId;`,
|
||||||
|
[serial, null],
|
||||||
|
options
|
||||||
|
);
|
||||||
let invoice = result[1][0].invoiceId;
|
let invoice = result[1][0].invoiceId;
|
||||||
|
|
||||||
if (serial != 'R' && invoice) {
|
if (serial != 'R' && invoice) {
|
||||||
|
@ -60,15 +64,15 @@ module.exports = function(Self) {
|
||||||
await Self.rawSql(query, [invoice], options);
|
await Self.rawSql(query, [invoice], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
let user = await Self.app.models.Worker.findOne({where: {userFk: userId}});
|
let user = await $.Worker.findOne({where: {userFk: userId}}, options);
|
||||||
|
|
||||||
query = `INSERT INTO printServerQueue(reportFk, param1, workerFk) VALUES (?, ?, ?)`;
|
query = `INSERT INTO printServerQueue(reportFk, param1, workerFk) VALUES (?, ?, ?)`;
|
||||||
await Self.rawSql(query, [3, invoice, user.id], options);
|
await Self.rawSql(query, [3, invoice, user.id], options);
|
||||||
await options.transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return {invoiceFk: invoice, serial};
|
return {invoiceFk: invoice, serial};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
options.transaction.rollback();
|
await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,8 +21,9 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.new = async(ctx, params, transaction) => {
|
Self.new = async(ctx, params, options) => {
|
||||||
let address = await Self.app.models.Address.findOne({
|
let $ = Self.app.models;
|
||||||
|
let address = await $.Address.findOne({
|
||||||
where: {id: params.addressFk},
|
where: {id: params.addressFk},
|
||||||
fields: ['id', 'clientFk'],
|
fields: ['id', 'clientFk'],
|
||||||
include: [
|
include: [
|
||||||
|
@ -41,7 +42,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
let agencyMode;
|
let agencyMode;
|
||||||
if (params && params.agencyModeFk)
|
if (params && params.agencyModeFk)
|
||||||
agencyMode = await Self.app.models.AgencyMode.findById(params.agencyModeFk);
|
agencyMode = await $.AgencyMode.findById(params.agencyModeFk);
|
||||||
|
|
||||||
if (address.client().type().code === 'normal' && (!agencyMode || agencyMode.code != 'refund')) {
|
if (address.client().type().code === 'normal' && (!agencyMode || agencyMode.code != 'refund')) {
|
||||||
if (address.client().isFreezed)
|
if (address.client().isFreezed)
|
||||||
|
@ -51,12 +52,19 @@ module.exports = Self => {
|
||||||
throw new UserError(`You can't create a ticket for a inactive client`);
|
throw new UserError(`You can't create a ticket for a inactive client`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!transaction || !transaction.commit)
|
let tx;
|
||||||
transaction = await Self.beginTransaction({});
|
|
||||||
|
if ((typeof options) != 'object')
|
||||||
|
options = {};
|
||||||
|
|
||||||
|
if (!options.transaction) {
|
||||||
|
tx = await Self.beginTransaction({});
|
||||||
|
options.transaction = tx;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!params.shipped && params.landed) {
|
if (!params.shipped && params.landed) {
|
||||||
params.shipped = await Self.app.models.Agency.getShipped(ctx, {
|
params.shipped = await $.Agency.getShipped(ctx, {
|
||||||
landed: params.landed,
|
landed: params.landed,
|
||||||
addressFk: address.id,
|
addressFk: address.id,
|
||||||
agencyModeFk: params.agencyModeFk,
|
agencyModeFk: params.agencyModeFk,
|
||||||
|
@ -65,7 +73,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.shipped && !params.landed) {
|
if (params.shipped && !params.landed) {
|
||||||
const landedResult = await Self.app.models.Agency.getLanded(ctx, {
|
const landedResult = await $.Agency.getLanded(ctx, {
|
||||||
shipped: params.shipped,
|
shipped: params.shipped,
|
||||||
addressFk: address.id,
|
addressFk: address.id,
|
||||||
agencyModeFk: params.agencyModeFk,
|
agencyModeFk: params.agencyModeFk,
|
||||||
|
@ -89,9 +97,9 @@ module.exports = Self => {
|
||||||
params.routeFk || null,
|
params.routeFk || null,
|
||||||
params.landed,
|
params.landed,
|
||||||
params.userId
|
params.userId
|
||||||
], {options: transaction});
|
], options);
|
||||||
|
|
||||||
let ticket = await Self.app.models.Ticket.findById(result[1][0].newTicketId, {options: transaction});
|
let ticket = await $.Ticket.findById(result[1][0].newTicketId, null, options);
|
||||||
let cleanInstance = JSON.parse(JSON.stringify(ticket));
|
let cleanInstance = JSON.parse(JSON.stringify(ticket));
|
||||||
|
|
||||||
let logRecord = {
|
let logRecord = {
|
||||||
|
@ -104,12 +112,12 @@ module.exports = Self => {
|
||||||
newInstance: cleanInstance
|
newInstance: cleanInstance
|
||||||
};
|
};
|
||||||
|
|
||||||
await Self.app.models.TicketLog.create(logRecord, {options: transaction});
|
await $.TicketLog.create(logRecord, options);
|
||||||
|
|
||||||
await transaction.commit();
|
if (tx) await tx.commit();
|
||||||
return await ticket;
|
return await ticket;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await transaction.rollback();
|
if (tx) await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,10 +36,11 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.updateDiscount = async(id, salesIds, newDiscount) => {
|
Self.updateDiscount = async(id, salesIds, newDiscount) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const transaction = await Self.beginTransaction({});
|
const tx = await Self.beginTransaction({});
|
||||||
const options = {transaction};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id', 'ticketFk', 'price'],
|
fields: ['id', 'ticketFk', 'price'],
|
||||||
where: {
|
where: {
|
||||||
|
@ -112,9 +113,9 @@ module.exports = Self => {
|
||||||
query = `call vn.manaSpellersRequery(?)`;
|
query = `call vn.manaSpellersRequery(?)`;
|
||||||
await Self.rawSql(query, [salesPersonId], options);
|
await Self.rawSql(query, [salesPersonId], options);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,11 +50,12 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.uploadFile = async(ctx, id) => {
|
Self.uploadFile = async(ctx, id) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const transaction = await Self.beginTransaction({});
|
|
||||||
const options = {transaction};
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
|
const tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const uploadedFiles = await models.Dms.uploadFile(ctx, options);
|
const uploadedFiles = await models.Dms.uploadFile(ctx, options);
|
||||||
uploadedFiles.forEach(dms => {
|
uploadedFiles.forEach(dms => {
|
||||||
const newTicketDms = models.TicketDms.create({
|
const newTicketDms = models.TicketDms.create({
|
||||||
|
@ -66,11 +67,11 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
const resolvedPromises = await Promise.all(promises);
|
const resolvedPromises = await Promise.all(promises);
|
||||||
|
|
||||||
await transaction.commit();
|
await tx.commit();
|
||||||
|
|
||||||
return resolvedPromises;
|
return resolvedPromises;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await transaction.rollback();
|
await tx.rollback();
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1513,7 +1513,7 @@
|
||||||
},
|
},
|
||||||
"util": {
|
"util": {
|
||||||
"version": "0.10.3",
|
"version": "0.10.3",
|
||||||
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
"resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
||||||
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -1551,15 +1551,23 @@
|
||||||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
|
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
|
||||||
},
|
},
|
||||||
"async-done": {
|
"async-done": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
|
||||||
"integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==",
|
"integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"end-of-stream": "^1.1.0",
|
"end-of-stream": "^1.1.0",
|
||||||
"once": "^1.3.2",
|
"once": "^1.3.2",
|
||||||
"process-nextick-args": "^1.0.7",
|
"process-nextick-args": "^2.0.0",
|
||||||
"stream-exhaust": "^1.0.1"
|
"stream-exhaust": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"process-nextick-args": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"async-each": {
|
"async-each": {
|
||||||
|
@ -1783,7 +1791,7 @@
|
||||||
"base": {
|
"base": {
|
||||||
"version": "0.11.2",
|
"version": "0.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
|
||||||
"integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=",
|
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"cache-base": "^1.0.1",
|
"cache-base": "^1.0.1",
|
||||||
|
@ -2486,7 +2494,7 @@
|
||||||
"cache-base": {
|
"cache-base": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
|
||||||
"integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=",
|
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"collection-visit": "^1.0.0",
|
"collection-visit": "^1.0.0",
|
||||||
|
@ -2661,7 +2669,7 @@
|
||||||
"class-utils": {
|
"class-utils": {
|
||||||
"version": "0.3.6",
|
"version": "0.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
||||||
"integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=",
|
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"arr-union": "^3.1.0",
|
"arr-union": "^3.1.0",
|
||||||
|
@ -2818,7 +2826,7 @@
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -3360,13 +3368,13 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsesc": {
|
"jsesc": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||||
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"regexpu-core": {
|
"regexpu-core": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
|
||||||
"integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
|
"integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -3377,13 +3385,13 @@
|
||||||
},
|
},
|
||||||
"regjsgen": {
|
"regjsgen": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
|
||||||
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
|
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"regjsparser": {
|
"regjsparser": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
"resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
|
||||||
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
|
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -3857,7 +3865,7 @@
|
||||||
"dot-prop": {
|
"dot-prop": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
||||||
"integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=",
|
"integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-obj": "^1.0.0"
|
"is-obj": "^1.0.0"
|
||||||
|
@ -4023,7 +4031,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": {
|
"fs-extra": {
|
||||||
"version": "0.30.0",
|
"version": "0.30.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
|
"resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
|
||||||
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
|
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -4036,7 +4044,7 @@
|
||||||
},
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -4332,14 +4340,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"es6-weak-map": {
|
"es6-weak-map": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
||||||
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
|
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"d": "1",
|
"d": "1",
|
||||||
"es5-ext": "^0.10.14",
|
"es5-ext": "^0.10.46",
|
||||||
"es6-iterator": "^2.0.1",
|
"es6-iterator": "^2.0.3",
|
||||||
"es6-symbol": "^3.1.1"
|
"es6-symbol": "^3.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5025,7 +5033,7 @@
|
||||||
},
|
},
|
||||||
"file-loader": {
|
"file-loader": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
|
"resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
|
||||||
"integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
|
"integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -5126,9 +5134,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fined": {
|
"fined": {
|
||||||
"version": "1.1.1",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
|
||||||
"integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==",
|
"integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"expand-tilde": "^2.0.2",
|
"expand-tilde": "^2.0.2",
|
||||||
|
@ -6125,9 +6133,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.3",
|
"version": "7.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
|
||||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
|
@ -6166,7 +6174,7 @@
|
||||||
"global-modules": {
|
"global-modules": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
|
||||||
"integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=",
|
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"global-prefix": "^1.0.1",
|
"global-prefix": "^1.0.1",
|
||||||
|
@ -7022,7 +7030,7 @@
|
||||||
},
|
},
|
||||||
"kind-of": {
|
"kind-of": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
|
||||||
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
|
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -7206,7 +7214,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es6-promise": {
|
"es6-promise": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
|
"resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
|
||||||
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=",
|
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -8219,7 +8227,7 @@
|
||||||
"is-plain-object": {
|
"is-plain-object": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||||
"integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
|
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"isobject": "^3.0.1"
|
"isobject": "^3.0.1"
|
||||||
|
@ -8410,7 +8418,7 @@
|
||||||
},
|
},
|
||||||
"jasmine-core": {
|
"jasmine-core": {
|
||||||
"version": "2.99.1",
|
"version": "2.99.1",
|
||||||
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz",
|
"resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz",
|
||||||
"integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=",
|
"integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -8427,7 +8435,7 @@
|
||||||
"jasmine-spec-reporter": {
|
"jasmine-spec-reporter": {
|
||||||
"version": "4.2.1",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz",
|
||||||
"integrity": "sha1-HWMq7ANBZwrTJPkrqEtLMrNeniI=",
|
"integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"colors": "1.1.2"
|
"colors": "1.1.2"
|
||||||
|
@ -8693,7 +8701,7 @@
|
||||||
"karma-chrome-launcher": {
|
"karma-chrome-launcher": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
|
||||||
"integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
|
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs-access": "^1.0.0",
|
"fs-access": "^1.0.0",
|
||||||
|
@ -8875,19 +8883,42 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"liftoff": {
|
"liftoff": {
|
||||||
"version": "2.5.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
|
||||||
"integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=",
|
"integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"extend": "^3.0.0",
|
"extend": "^3.0.0",
|
||||||
"findup-sync": "^2.0.0",
|
"findup-sync": "^3.0.0",
|
||||||
"fined": "^1.0.1",
|
"fined": "^1.0.1",
|
||||||
"flagged-respawn": "^1.0.0",
|
"flagged-respawn": "^1.0.0",
|
||||||
"is-plain-object": "^2.0.4",
|
"is-plain-object": "^2.0.4",
|
||||||
"object.map": "^1.0.0",
|
"object.map": "^1.0.0",
|
||||||
"rechoir": "^0.6.2",
|
"rechoir": "^0.6.2",
|
||||||
"resolve": "^1.1.7"
|
"resolve": "^1.1.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"findup-sync": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"detect-file": "^1.0.0",
|
||||||
|
"is-glob": "^4.0.0",
|
||||||
|
"micromatch": "^3.0.4",
|
||||||
|
"resolve-dir": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-glob": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-extglob": "^2.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"load-json-file": {
|
"load-json-file": {
|
||||||
|
@ -10667,7 +10698,7 @@
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||||
},
|
},
|
||||||
"minstache": {
|
"minstache": {
|
||||||
|
@ -10681,7 +10712,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": {
|
"commander": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz",
|
"resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz",
|
||||||
"integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=",
|
"integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -11209,7 +11240,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsesc": {
|
"jsesc": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||||
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
|
@ -11839,7 +11870,8 @@
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
@ -11867,6 +11899,7 @@
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
|
@ -11881,7 +11914,8 @@
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
@ -12010,7 +12044,8 @@
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
|
@ -12022,6 +12057,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
|
@ -12036,6 +12072,7 @@
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
|
@ -12043,7 +12080,8 @@
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.5",
|
||||||
|
@ -12149,7 +12187,8 @@
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
|
@ -12304,6 +12343,7 @@
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -12411,9 +12451,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"now-and-later": {
|
"now-and-later": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
|
||||||
"integrity": "sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4=",
|
"integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"once": "^1.3.2"
|
"once": "^1.3.2"
|
||||||
|
@ -12652,7 +12692,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.10",
|
"version": "0.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||||
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -13300,7 +13340,7 @@
|
||||||
},
|
},
|
||||||
"pretty-bytes": {
|
"pretty-bytes": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
|
"resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
|
||||||
"integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
|
"integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -13371,7 +13411,7 @@
|
||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "1.1.14",
|
"version": "1.1.14",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -13383,13 +13423,13 @@
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "0.10.31",
|
"version": "0.10.31",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"through2": {
|
"through2": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
|
"resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
|
||||||
"integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
|
"integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -14289,7 +14329,7 @@
|
||||||
},
|
},
|
||||||
"safe-regex": {
|
"safe-regex": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||||
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -14414,7 +14454,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.4.4",
|
"version": "0.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||||
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -14554,7 +14594,7 @@
|
||||||
"set-value": {
|
"set-value": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
|
||||||
"integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=",
|
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"extend-shallow": "^2.0.1",
|
"extend-shallow": "^2.0.1",
|
||||||
|
@ -14670,7 +14710,7 @@
|
||||||
},
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -14746,7 +14786,7 @@
|
||||||
"snapdragon-node": {
|
"snapdragon-node": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
|
||||||
"integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=",
|
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"define-property": "^1.0.0",
|
"define-property": "^1.0.0",
|
||||||
|
@ -14797,7 +14837,7 @@
|
||||||
"snapdragon-util": {
|
"snapdragon-util": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
|
||||||
"integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=",
|
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"kind-of": "^3.2.0"
|
"kind-of": "^3.2.0"
|
||||||
|
@ -15153,7 +15193,7 @@
|
||||||
"split-string": {
|
"split-string": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||||
"integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=",
|
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"extend-shallow": "^3.0.0"
|
"extend-shallow": "^3.0.0"
|
||||||
|
@ -15345,7 +15385,7 @@
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -16238,7 +16278,7 @@
|
||||||
"touch": {
|
"touch": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
||||||
"integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
|
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"nopt": "~1.0.10"
|
"nopt": "~1.0.10"
|
||||||
|
@ -16452,9 +16492,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"undertaker": {
|
"undertaker": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
|
||||||
"integrity": "sha1-M52kZGJS0ILcN45wgGcpl1DhG0k=",
|
"integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"arr-flatten": "^1.0.1",
|
"arr-flatten": "^1.0.1",
|
||||||
|
@ -16724,7 +16764,7 @@
|
||||||
"useragent": {
|
"useragent": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
|
||||||
"integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=",
|
"integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "4.1.x",
|
"lru-cache": "4.1.x",
|
||||||
|
@ -16789,9 +16829,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"v8flags": {
|
"v8flags": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz",
|
||||||
"integrity": "sha512-MtivA7GF24yMPte9Rp/BWGCYQNaUj86zeYxV/x2RRJMKagImbbv3u8iJC57lNhWLPcGLJmHcHmFWkNsplbbLWw==",
|
"integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"homedir-polyfill": "^1.0.1"
|
"homedir-polyfill": "^1.0.1"
|
||||||
|
@ -17461,7 +17501,7 @@
|
||||||
},
|
},
|
||||||
"globby": {
|
"globby": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||||
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -17474,7 +17514,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pify": {
|
"pify": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
"eslint-plugin-jasmine": "^2.10.1",
|
"eslint-plugin-jasmine": "^2.10.1",
|
||||||
"fancy-log": "^1.3.2",
|
"fancy-log": "^1.3.2",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.2",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-env": "^0.4.0",
|
"gulp-env": "^0.4.0",
|
||||||
"gulp-file": "^0.4.0",
|
"gulp-file": "^0.4.0",
|
||||||
|
|
Loading…
Reference in New Issue