From 0fe78a2b8f5b96eec51cc6cffca335d26d7653d0 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 28 May 2020 08:07:26 +0200 Subject: [PATCH 01/35] 2176 - Added contextmenu --- front/core/components/contextmenu/index.html | 5 ++ front/core/components/contextmenu/index.js | 68 ++++++++++++++++++++ front/core/components/index.js | 1 + modules/client/front/index/index.js | 4 ++ modules/item/front/index/index.html | 11 +++- 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 front/core/components/contextmenu/index.html create mode 100755 front/core/components/contextmenu/index.js diff --git a/front/core/components/contextmenu/index.html b/front/core/components/contextmenu/index.html new file mode 100644 index 000000000..0028c1186 --- /dev/null +++ b/front/core/components/contextmenu/index.html @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js new file mode 100755 index 000000000..9bd1c0d24 --- /dev/null +++ b/front/core/components/contextmenu/index.js @@ -0,0 +1,68 @@ +import ngModule from '../../module'; +export default class Contextmenu { + constructor($element, $, $window) { + this.$element = $element; + this.element = $element[0]; + this.$ = $; + this.$window = $window; + // this.displayMode = 'relative'; + + // Foreach element, apply an addEventListener??? + /* + document.body.addEventListener('contextmenu', event => { + if (!event.defaultPrevented) + event.preventDefault(); + + const target = event.target; + const rect = target.getBoundingClientRect(); + + console.log('ScreenY', event.pageY); + console.log('OffsetY', event.pageX); + + const parent = $.contextmenu; + parent.style.top = event.pageY + 'px'; + parent.style.left = event.pageX + 'px'; + + $.menu.show(parent); + }); */ + } + + get target() { + return this._target; + } + + set target(value) { + this._target = value; + + if (!value) return; + + const target = document.querySelector(value);// Find elements + console.log(this.element); + + if (!target) return; + + target.addEventListener('contextmenu', event => { + if (!event.defaultPrevented) + event.preventDefault(); + + const parent = this.$.contextmenu; + parent.style.top = event.pageY + 'px'; + parent.style.left = event.pageX + 'px'; + + this.$.menu.show(parent); + }); + } +} + +Contextmenu.$inject = ['$element', '$scope', '$window']; + +ngModule.vnComponent('vnContextmenu', { + controller: Contextmenu, + template: require('./index.html'), + bindings: { + target: '@?' + }, + transclude: { + menu: '?slotMenu' + } +}); diff --git a/front/core/components/index.js b/front/core/components/index.js index 8f636cb4c..ea568bf2b 100644 --- a/front/core/components/index.js +++ b/front/core/components/index.js @@ -50,3 +50,4 @@ import './th'; import './treeview'; import './wday-picker'; import './datalist'; +import './contextmenu'; diff --git a/modules/client/front/index/index.js b/modules/client/front/index/index.js index f5400e05a..4832391ce 100644 --- a/modules/client/front/index/index.js +++ b/modules/client/front/index/index.js @@ -19,6 +19,10 @@ export default class Controller extends Section { this.$state.go(`ticket.index`, {q: JSON.stringify({clientFk: client.id})}); } + + filterBySelection() { + console.log('Filtro por seleccion'); + } } ngModule.component('vnClientIndex', { diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 0ee6a8815..6470f4640 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -122,4 +122,13 @@ - \ No newline at end of file + + + + Filter by selection + Exclude selection + Remove filter by selection + Order DESC + Order ASC + + \ No newline at end of file From 90ae1562ddfe0c6283776a3ef02855ccc30761ea Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 29 May 2020 11:10:58 +0200 Subject: [PATCH 02/35] Added filters --- front/core/components/contextmenu/index.html | 2 +- front/core/components/contextmenu/index.js | 138 +++++++++++++++--- modules/client/front/descriptor/index.html | 2 +- modules/client/front/descriptor/locale/es.yml | 2 +- modules/client/front/index/index.js | 4 - .../invoiceOut/front/descriptor/index.html | 2 +- modules/invoiceOut/front/descriptor/index.js | 7 + modules/item/front/index/index.html | 11 +- modules/ticket/back/methods/ticket/filter.js | 2 + modules/ticket/front/index/index.html | 24 ++- modules/ticket/front/index/index.js | 55 +++++++ modules/ticket/front/index/locale/es.yml | 5 +- 12 files changed, 211 insertions(+), 43 deletions(-) diff --git a/front/core/components/contextmenu/index.html b/front/core/components/contextmenu/index.html index 0028c1186..7e7cae138 100644 --- a/front/core/components/contextmenu/index.html +++ b/front/core/components/contextmenu/index.html @@ -1,5 +1,5 @@
- +
diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index 9bd1c0d24..a99009d50 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -1,10 +1,10 @@ import ngModule from '../../module'; export default class Contextmenu { - constructor($element, $, $window) { + constructor($element, $, $transclude) { this.$element = $element; this.element = $element[0]; this.$ = $; - this.$window = $window; + this.$transclude = $transclude; // this.displayMode = 'relative'; // Foreach element, apply an addEventListener??? @@ -27,40 +27,140 @@ export default class Contextmenu { }); */ } - get target() { - return this._target; + $onInit() { + /* const transcludeElement = this.element.querySelector('vn-menu'); + const content = angular.element(transcludeElement); + + this.$transclude(($clone, $scope) => { + this.$contentScope = $scope; + // $scope.$target = 'hola??'; + const list = angular.element(''); + list.append($clone); + + content.append(list); + }, null, 'menu'); */ } - set target(value) { - this._target = value; + get targets() { + return this._targets; + } + + set targets(value) { + this._targets = value; if (!value) return; - const target = document.querySelector(value);// Find elements - console.log(this.element); + for (let selector of value) { + const target = document.querySelector(selector);// Find elements + if (!target) continue; - if (!target) return; + target.addEventListener('contextmenu', event => { + if (!event.defaultPrevented) + event.preventDefault(); - target.addEventListener('contextmenu', event => { - if (!event.defaultPrevented) - event.preventDefault(); + const parent = this.$.contextmenu; + parent.style.top = event.pageY + 'px'; + parent.style.left = event.pageX + 'px'; - const parent = this.$.contextmenu; - parent.style.top = event.pageY + 'px'; - parent.style.left = event.pageX + 'px'; + this.eventTarget = event.target; - this.$.menu.show(parent); - }); + /* const menu = this.element.querySelector('vn-menu'); + const list = document.createElement('vn-list'); + menu.append(list); + + const transcludeElement = this.element.querySelector('vn-list'); + const content = angular.element(transcludeElement); + console.log(transcludeElement); + + this.$transclude(($clone, $scope) => { + this.$contentScope = $scope; + $scope.$target = 'hola??'; + console.log($clone); + content.append($clone); + }, null, 'menu'); */ + + this.$.menu.show(parent); + }); + } + } + + /* const transcludeElement = this.element.querySelector('vn-list'); + const content = angular.element(transcludeElement); + console.log(transcludeElement); + + this.$transclude(($clone, $scope) => { + this.$contentScope = $scope; + $scope.$target = 'hola??'; + content.append($clone); + }); */ + + filterBySelection() { + // const target = $event.target; + const model = this.model; + const target = this.eventTarget; + console.log(target); + + const table = target.closest('.vn-table'); + const headerCols = table.querySelectorAll('vn-thead vn-th'); + + const row = target.closest('.vn-tr'); + const col = target.closest('vn-td'); + + const rowIndex = row.getAttribute('data-index'); + + const columns = Array.from(row.querySelectorAll('vn-td')); + + const fieldIndex = columns.findIndex(column => column == col); + const fieldName = headerCols[fieldIndex].getAttribute('field'); + + const rowData = model.data[rowIndex]; + + const filter = {where: {}}; + filter['where'][fieldName] = rowData[fieldName]; + console.log(filter); + + model.addFilter(filter); + } + + excludeSelection() { + const model = this.model; + const target = this.eventTarget; + + const table = target.closest('.vn-table'); + const headerCols = table.querySelectorAll('vn-thead vn-th'); + + const row = target.closest('.vn-tr'); + const col = target.closest('vn-td'); + + const rowIndex = row.getAttribute('data-index'); + + const columns = Array.from(row.querySelectorAll('vn-td')); + + const fieldIndex = columns.findIndex(column => column == col); + const fieldName = headerCols[fieldIndex].getAttribute('field'); + + const rowData = model.data[rowIndex]; + + const filter = {where: {}}; + filter['where'][fieldName] = {neq: rowData[fieldName]}; + console.log(filter); + + model.addFilter(filter); + } + + removeFilter() { + this.model.removeFilter(); } } -Contextmenu.$inject = ['$element', '$scope', '$window']; +Contextmenu.$inject = ['$element', '$scope', '$transclude']; ngModule.vnComponent('vnContextmenu', { controller: Contextmenu, template: require('./index.html'), bindings: { - target: '@?' + targets: ' - Send consumer report + View consumer report diff --git a/modules/client/front/descriptor/locale/es.yml b/modules/client/front/descriptor/locale/es.yml index 88720ab44..3f59aede8 100644 --- a/modules/client/front/descriptor/locale/es.yml +++ b/modules/client/front/descriptor/locale/es.yml @@ -1,4 +1,4 @@ Simple ticket: Ticket simple -Send consumer report: Enviar informe de consumo +View consumer report: Ver informe de consumo From date: Fecha desde To date: Fecha hasta \ No newline at end of file diff --git a/modules/client/front/index/index.js b/modules/client/front/index/index.js index 4832391ce..f5400e05a 100644 --- a/modules/client/front/index/index.js +++ b/modules/client/front/index/index.js @@ -19,10 +19,6 @@ export default class Controller extends Section { this.$state.go(`ticket.index`, {q: JSON.stringify({clientFk: client.id})}); } - - filterBySelection() { - console.log('Filtro por seleccion'); - } } ngModule.component('vnClientIndex', { diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html index 9baebb636..093d9edf7 100644 --- a/modules/invoiceOut/front/descriptor/index.html +++ b/modules/invoiceOut/front/descriptor/index.html @@ -56,7 +56,7 @@
diff --git a/modules/invoiceOut/front/descriptor/index.js b/modules/invoiceOut/front/descriptor/index.js index f642c3ba7..cb4b131ac 100644 --- a/modules/invoiceOut/front/descriptor/index.js +++ b/modules/invoiceOut/front/descriptor/index.js @@ -22,6 +22,13 @@ class Controller extends Descriptor { .then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked'))); } + get filter() { + if (this.invoiceOut) + return JSON.stringify({refFk: this.invoiceOut.ref}); + + return null; + } + loadData() { const filter = { include: [ diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 6470f4640..0ee6a8815 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -122,13 +122,4 @@ - - - - Filter by selection - Exclude selection - Remove filter by selection - Order DESC - Order ASC - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index cedbe8f3b..a81f3794a 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -199,9 +199,11 @@ module.exports = Self => { t.routeFk, t.warehouseFk, t.clientFk, + a.provinceFk, p.name AS province, w.name AS warehouse, am.name AS agencyMode, + am.id AS agencyModeFk, st.name AS state, wk.lastName AS salesPerson, ts.stateFk as stateFk, diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index ab2501a13..150dcde8f 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -15,13 +15,13 @@ Id - Salesperson + Salesperson Date Hour Alias - Province - State - Agency + Province + State + Agency Warehouse Invoice Closure @@ -30,7 +30,7 @@ - @@ -151,3 +151,17 @@ + + + Filter by selection + Exclude selection + Remove filter + + Filter by selection 2 + Exclude selection 2 + Remove filter 2 + + + \ No newline at end of file diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index 59e5d949d..bb56f9cbf 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -92,6 +92,61 @@ export default class Controller extends Section { this.selectedTicket = ticket; this.$.summary.show(); } + + filterBySelection(target) { + // const target = $event.target; + const model = this.$.model; + console.log(target); + const table = target.closest('.vn-table'); + const headerCols = table.querySelectorAll('vn-thead vn-th'); + + const row = target.closest('.vn-tr'); + const col = target.closest('vn-td'); + + const rowIndex = row.getAttribute('data-index'); + + const columns = Array.from(row.querySelectorAll('vn-td')); + + const fieldIndex = columns.findIndex(column => column == col); + const fieldName = headerCols[fieldIndex].getAttribute('field'); + + const rowData = model.data[rowIndex]; + + const filter = {where: {}}; + filter['where'][fieldName] = rowData[fieldName]; + console.log(filter); + + model.addFilter(filter); + } + + excludeSelection($event, target) { + const model = this.$.model; + + const table = target.closest('.vn-table'); + const headerCols = table.querySelectorAll('vn-thead vn-th'); + + const row = target.closest('.vn-tr'); + const col = target.closest('vn-td'); + + const rowIndex = row.getAttribute('data-index'); + + const columns = Array.from(row.querySelectorAll('vn-td')); + + const fieldIndex = columns.findIndex(column => column == col); + const fieldName = headerCols[fieldIndex].getAttribute('field'); + + const rowData = model.data[rowIndex]; + + const filter = {where: {}}; + filter['where'][fieldName] = {neq: rowData[fieldName]}; + console.log(filter); + + model.addFilter(filter); + } + + removeFilter() { + this.$.model.removeFilter(); + } } ngModule.component('vnTicketIndex', { diff --git a/modules/ticket/front/index/locale/es.yml b/modules/ticket/front/index/locale/es.yml index dea55b199..acc8adc80 100644 --- a/modules/ticket/front/index/locale/es.yml +++ b/modules/ticket/front/index/locale/es.yml @@ -3,4 +3,7 @@ Go to lines: Ir a lineas Not available: No disponible Payment on account...: Pago a cuenta... Closure: Cierre -You cannot make a payment on account from multiple clients: No puedes realizar un pago a cuenta de clientes diferentes \ No newline at end of file +You cannot make a payment on account from multiple clients: No puedes realizar un pago a cuenta de clientes diferentes +Filter by selection: Filtro por selección +Exclude selection: Excluir selección +Remove filter: Eliminar filtro \ No newline at end of file From 3f1109aee30e11386bd34ae99119035ed32e9e13 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 29 May 2020 12:10:04 +0200 Subject: [PATCH 03/35] Test changes --- modules/ticket/back/methods/ticket/filter.js | 43 +++++++++++++++++++- modules/ticket/front/index/index.html | 4 +- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index a81f3794a..a7c545562 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -187,7 +187,7 @@ module.exports = Self => { stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); - stmt = new ParameterizedSQL( + /* stmt = new ParameterizedSQL( `CREATE TEMPORARY TABLE tmp.filter (INDEX (id)) ENGINE = MEMORY @@ -224,7 +224,46 @@ module.exports = Self => { LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.userFk`); + LEFT JOIN account.user u ON u.id = wk.userFk`); */ + stmt = new ParameterizedSQL( + `CREATE TEMPORARY TABLE tmp.filter + (INDEX (id)) + ENGINE = MEMORY + SELECT id, shipped, nickname, refFk, routeFk, warehouseFk + (SELECT + t.id, + t.shipped, + t.nickname, + t.refFk, + t.routeFk, + t.warehouseFk, + t.clientFk, + a.provinceFk, + p.name AS province, + w.name AS warehouse, + am.name AS agencyMode, + am.id AS agencyModeFk, + st.name AS state, + wk.lastName AS salesPerson, + ts.stateFk as stateFk, + ts.alertLevel as alertLevel, + ts.code as alertLevelCode, + u.nickname userNickname, + c.salesPersonFk, + z.hour zoneLanding, + HOUR(z.hour) zoneHour, + MINUTE(z.hour) zoneMinute + FROM ticket t + LEFT JOIN zone z ON z.id = t.zoneFk + LEFT JOIN address a ON a.id = t.addressFk + LEFT JOIN province p ON p.id = a.provinceFk + LEFT JOIN warehouse w ON w.id = t.warehouseFk + LEFT JOIN agencyMode am ON am.id = t.agencyModeFk + LEFT JOIN ticketState ts ON ts.ticketFk = t.id + LEFT JOIN state st ON st.id = ts.stateFk + LEFT JOIN client c ON c.id = t.clientFk + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.userFk)`); if (args.orderFk) { stmt.merge({ diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index 150dcde8f..a10ec6b06 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -15,11 +15,11 @@ Id - Salesperson + Salesperson Date Hour Alias - Province + Province State Agency Warehouse From 3a6efebfd92df4d2fd13d8c64eacafce2b4ef45d Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 4 Jun 2020 14:22:56 +0200 Subject: [PATCH 04/35] skipp back test and create task 2304 --- modules/claim/back/methods/claim/specs/regularizeClaim.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js b/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js index 8ebe41f25..bb608016f 100644 --- a/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js +++ b/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js @@ -1,6 +1,7 @@ const app = require('vn-loopback/server/server'); -describe('regularizeClaim()', () => { +// #2304 +xdescribe('regularizeClaim()', () => { const claimFk = 1; const pendentState = 1; const resolvedState = 3; From f340466daf2bdcb364a8ffdad7c95f29551e587c Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 4 Jun 2020 14:23:48 +0200 Subject: [PATCH 05/35] fix test 2296 --- modules/ticket/back/methods/ticket/specs/new.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/ticket/specs/new.spec.js b/modules/ticket/back/methods/ticket/specs/new.spec.js index 87bc89b12..f240ce372 100644 --- a/modules/ticket/back/methods/ticket/specs/new.spec.js +++ b/modules/ticket/back/methods/ticket/specs/new.spec.js @@ -1,7 +1,6 @@ const app = require('vn-loopback/server/server'); let UserError = require('vn-loopback/util/user-error'); - describe('ticket new()', () => { let ticket; let today = new Date(); @@ -69,7 +68,7 @@ describe('ticket new()', () => { clientId: 104, shipped: today, landed: today, - warehouseId: 1, + warehouseId: 2, companyId: 442, addressId: 4, agencyModeId: 1 From 81757fb9b5da15a8f1759f9bb78231fa397fedbb Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 4 Jun 2020 14:24:12 +0200 Subject: [PATCH 06/35] fix test 2302 --- modules/zone/back/methods/zone/specs/deleteZone.spec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/zone/back/methods/zone/specs/deleteZone.spec.js b/modules/zone/back/methods/zone/specs/deleteZone.spec.js index 74ae7751d..cb19a8e25 100644 --- a/modules/zone/back/methods/zone/specs/deleteZone.spec.js +++ b/modules/zone/back/methods/zone/specs/deleteZone.spec.js @@ -1,13 +1,16 @@ const app = require('vn-loopback/server/server'); +// 2302 describe('zone deletezone()', () => { - let zoneId = 1; + let zoneId = 9; let originalZoneTickets; let originalZone; + let originalZoneIncluded; beforeAll(async done => { originalZone = await app.models.Zone.findById(zoneId); originalZoneTickets = await app.models.Ticket.find({where: {zoneFk: zoneId}}); + originalZoneIncluded = await app.models.ZoneIncluded.find({where: {zoneFk: zoneId}}); done(); }); @@ -17,6 +20,9 @@ describe('zone deletezone()', () => { originalZoneTickets.forEach(async ticket => { await ticket.updateAttributes({zoneFk: zoneId}); }); + originalZoneIncluded.forEach(async zoneIncluded => { + await zoneIncluded.save(); + }); done(); }); From 13859375bd8860ea815e58318100494ab805e809 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 4 Jun 2020 14:44:38 +0200 Subject: [PATCH 07/35] 2296 - Prevent log with no new changes --- loopback/common/models/loggable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loopback/common/models/loggable.js b/loopback/common/models/loggable.js index ec6989717..7aecfe976 100644 --- a/loopback/common/models/loggable.js +++ b/loopback/common/models/loggable.js @@ -259,6 +259,10 @@ module.exports = function(Self) { removeUnloggable(definition, oldInstance); removeUnloggable(definition, newInstance); + // Prevent log with no new changes + const hasNewChanges = Object.keys(newInstance) != 0; + if (!hasNewChanges) return; + let logRecord = { originFk: originId, userFk: userFk, From 9056801869710ac6ce478947fd7a925bdeb4b55e Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 4 Jun 2020 14:46:55 +0200 Subject: [PATCH 08/35] Fix --- loopback/common/models/loggable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopback/common/models/loggable.js b/loopback/common/models/loggable.js index 7aecfe976..99a1ad39b 100644 --- a/loopback/common/models/loggable.js +++ b/loopback/common/models/loggable.js @@ -260,7 +260,7 @@ module.exports = function(Self) { removeUnloggable(definition, newInstance); // Prevent log with no new changes - const hasNewChanges = Object.keys(newInstance) != 0; + const hasNewChanges = Object.keys(newInstance).length; if (!hasNewChanges) return; let logRecord = { From e25b87213beff174494713319f068cc9269bf7fb Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 5 Jun 2020 08:23:52 +0200 Subject: [PATCH 09/35] 2305 - Added noReply param --- print/core/email.js | 3 ++- print/methods/closure.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/print/core/email.js b/print/core/email.js index cf6f8b663..f201be9a8 100644 --- a/print/core/email.js +++ b/print/core/email.js @@ -72,9 +72,10 @@ class Email extends Component { await getAttachments(this.path, this.attachments); const localeSubject = await this.getSubject(); + const replyTo = this.args.replyTo || this.args.auth.email; const options = { to: this.args.recipient, - replyTo: this.args.auth.email, + replyTo: replyTo, subject: localeSubject, html: rendered, attachments: attachments diff --git a/print/methods/closure.js b/print/methods/closure.js index c947a0468..3bcca9d4e 100644 --- a/print/methods/closure.js +++ b/print/methods/closure.js @@ -58,7 +58,8 @@ module.exports = app => { const args = Object.assign({ ticketId: ticket.id, recipientId: ticket.clientFk, - recipient: ticket.recipient + recipient: ticket.recipient, + replyTo: ticket.salesPersonEmail }, reqArgs); const email = new Email('delivery-note-link', args); From a81862baade9dd71d75f7c0265db5dd63a670dc9 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Fri, 5 Jun 2020 08:29:51 +0200 Subject: [PATCH 10/35] set deleteded skiped --- modules/ticket/back/methods/ticket/specs/setDeleted.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js index 6dce95916..7965b508c 100644 --- a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js +++ b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js @@ -1,7 +1,7 @@ const app = require('vn-loopback/server/server'); const models = app.models; -// 2296 Failing tests +// 2301 Failing tests xdescribe('ticket deleted()', () => { let ticket; let sale; From b40be5cca9d12dff176edae7e01e7bbbec6155e7 Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 5 Jun 2020 10:01:21 +0200 Subject: [PATCH 11/35] 2035 --- .../00-saleCalculateComponent.sql | 2 +- .../10190-PostErte/01-ticketCalculateClon.sql | 93 + .../10190-PostErte/01-ticket_cloneWeekly.sql | 132 ++ .../01-ticket_recalcComponents.sql | 93 + .../10190-PostErte/01-zone_getLanded.sql | 40 + db/tests/vn/zone_getLanded.spec.js | 16 +- modules/ticket/back/methods/ticket/new.js | 2 +- .../ticket/front/basic-data/step-one/index.js | 6 +- .../front/basic-data/step-one/index.spec.js | 8 +- .../front/basic-data/step-two/index.html | 2 +- modules/zone/back/methods/agency/getLanded.js | 12 +- .../methods/agency/specs/getLanded.spec.js | 3 +- package-lock.json | 1981 ++++++++++++++--- package.json | 10 +- 14 files changed, 2040 insertions(+), 360 deletions(-) create mode 100644 db/changes/10190-PostErte/01-ticketCalculateClon.sql create mode 100644 db/changes/10190-PostErte/01-ticket_cloneWeekly.sql create mode 100644 db/changes/10190-PostErte/01-ticket_recalcComponents.sql create mode 100644 db/changes/10190-PostErte/01-zone_getLanded.sql diff --git a/db/changes/10190-PostErte/00-saleCalculateComponent.sql b/db/changes/10190-PostErte/00-saleCalculateComponent.sql index b627c6182..8ab498f57 100644 --- a/db/changes/10190-PostErte/00-saleCalculateComponent.sql +++ b/db/changes/10190-PostErte/00-saleCalculateComponent.sql @@ -45,7 +45,7 @@ proc: BEGIN IF vLanded IS NULL OR vZoneFk IS NULL THEN - CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk); + CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk, TRUE); IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN CALL util.throw('There is no zone for these parameters'); diff --git a/db/changes/10190-PostErte/01-ticketCalculateClon.sql b/db/changes/10190-PostErte/01-ticketCalculateClon.sql new file mode 100644 index 000000000..6e2906f6a --- /dev/null +++ b/db/changes/10190-PostErte/01-ticketCalculateClon.sql @@ -0,0 +1,93 @@ +USE `vn`; +DROP procedure IF EXISTS `ticketCalculateClon`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT) +BEGIN +/* + * Recalcula los componentes un ticket clonado, + * las lineas a precio cero fuerza para que tengan precio, el resto lo respeta + * @param vTicketNew nuevo ticket clonado + * @param vTicketOld icket original, a partir del qual se clonara el nuevo +*/ + DECLARE vShipped DATE; + DECLARE vClient INT; + DECLARE vWarehouse SMALLINT; + DECLARE vAgencyMode INT; + DECLARE vAddress INT; + DECLARE vLanded DATE; + DECLARE vAgency INT; + DECLARE vZoneFk INT; + + REPLACE INTO orderTicket(orderFk,ticketFk) + SELECT orderFk, vTicketNew + FROM orderTicket + WHERE ticketFk = vTicketOld; + + SELECT t.clientFk, t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk, t.zoneFk + INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency, vZoneFk + FROM agencyMode a + JOIN ticket t ON t.agencyModeFk = a.id + WHERE t.id = vTicketNew; + + IF vLanded IS NULL THEN + CALL zone_getLanded(vShipped, vAddress, vAgency, vWarehouse, TRUE); + UPDATE ticket t + JOIN tmp.zoneGetLanded zgl ON t.warehouseFk = zgl.warehouseFk + SET t.landed = zgl.landed, + t.zone = zgl.zoneFk + WHERE t.id = vTicketNew; + + SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1; + DROP TEMPORARY TABLE IF EXISTS tmp.zoneGetLanded; + END IF; + + -- rellena la tabla tmp.buyUltimate con la ultima compra + CALL buyUltimate(vWarehouse, vShipped); + + DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; + CREATE TEMPORARY TABLE tmp.ticketLot + SELECT vWarehouse warehouseFk, NULL available, s.itemFk, bu.buyFk, vZoneFk zoneFk + FROM sale s + LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk + WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk; + + CALL catalog_componentPrepare(); + CALL catalog_componentCalculate(vZoneFk, vAddress, vAgencyMode, vWarehouse); + + -- Bionizamos lineas con Preu = 0 + DROP TEMPORARY TABLE IF EXISTS tmp.sale; + CREATE TEMPORARY TABLE tmp.sale + (PRIMARY KEY (saleFk)) ENGINE = MEMORY + SELECT s.id saleFk, vWarehouse warehouseFk + FROM sale s + JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew AND s.price = 0; + + CALL ticketComponentUpdateSale(1); + + -- Bionizamos lineas con Preu > 0 + DROP TEMPORARY TABLE IF EXISTS tmp.sale; + CREATE TEMPORARY TABLE tmp.sale + (PRIMARY KEY (saleFk)) ENGINE = MEMORY + SELECT s.id saleFk, vWarehouse warehouseFk + FROM sale s + JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew + AND s.price > 0; + + CALL ticketComponentUpdateSale(6); + + -- Log + CALL `logAdd`(vTicketNew, 'update', ' ticket' , 'Bioniza Ticket'); + + -- Limpieza + CALL catalog_componentPurge(); + DROP TEMPORARY TABLE IF EXISTS + tmp.buyUltimate, + tmp.sale, + tmp.zoneGetLanded; + +END$$ + +DELIMITER ; + diff --git a/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql b/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql new file mode 100644 index 000000000..137386ac9 --- /dev/null +++ b/db/changes/10190-PostErte/01-ticket_cloneWeekly.sql @@ -0,0 +1,132 @@ +USE `vn`; +DROP procedure IF EXISTS `ticket_cloneWeekly`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `ticket_cloneWeekly`(IN vWeek INT) +BEGIN + DECLARE vIsDone BOOL; + DECLARE vLanding DATE; + DECLARE vShipment DATE; + DECLARE vWarehouse INT; + DECLARE vTicket INT; + DECLARE vWeekDay INT; + DECLARE vClient INT; + DECLARE vEmpresa INT; + DECLARE vAddressFk INT; + DECLARE vAgencyModeFk INT; + DECLARE vNewTicket INT; + DECLARE vYear INT; + + DECLARE rsTicket CURSOR FOR + SELECT tw.ticketFk, weekDay, t.clientFk, t.warehouseFk, t.companyFk, t.addressFk, tw.agencyModeFk + FROM ticketWeekly tw + JOIN ticket t ON tt.ticketFk = t.id; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE; + + SET vYear = YEAR(CURDATE()) + IF(vWeek < WEEK(CURDATE()),1, 0); + + OPEN rsTicket; + + myLoop: LOOP + BEGIN + DECLARE vError TEXT; + DECLARE vSalesPersonEmail VARCHAR(150); + DECLARE vMailSent BOOL; + DECLARE vSubject VARCHAR(150); + DECLARE vMessage TEXT; + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 + vError = MESSAGE_TEXT; + END; + + SET vIsDone = FALSE; + FETCH rsTicket INTO vTicket, vWeekDay, vClient, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk; + + IF vIsDone THEN + + LEAVE myLoop; + END IF; + SELECT date INTO vShipment + FROM `time` + WHERE `year` = vYear AND `week` = vWeek + AND WEEKDAY(date) = vWeekDay; + + -- busca si el ticket ya ha sido clonado + IF (SELECT COUNT(*) FROM vn.ticket tOrig + JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk + JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id + JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk + JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk + WHERE tOrig.id = vTicket AND DATE(tClon.shipped) = vShipment) > 0 + THEN + ITERATE myLoop; + END IF; + CALL vn.zone_getLanded(vShipment, vAddressFk, vAgencyModeFk, vWarehouse, TRUE); + + SELECT landed INTO vLanding from tmp.zoneGetLanded LIMIT 1; + + CALL vn.ticketCreateWithoutZone(vClient, vShipment, vWarehouse, vEmpresa, vAddressFk, vAgencyModeFk, NULL, vLanding, account.userGetId(), vNewTicket); + + IF (vLanding IS NULL) THEN + + SELECT e.email INTO vSalesPersonEmail + FROM vn.client c + JOIN vn.worker sp ON sp.id = c.salesPersonFk + JOIN account.emailUser e ON e.userFk = sp.userFk + WHERE c.id = vClient; + + SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', vTicket, + ' para el dia: ', vShipment); + SET vMessage = CONCAT('No se ha podido clonar el ticket ', vTicket, + ' para el dia: ', vShipment, + ' porque no hay una zona de envío disponible. Se ha creado el ticket: ', vNewTicket, + ' pero ha que revisar las fechas y la agencia'); + + SELECT COUNT(*) INTO vMailSent + FROM vn.mail + WHERE sender = vSalesPersonEmail + AND subject = vSubject; + + IF NOT vMailSent THEN + INSERT INTO vn.mail (sender,`subject`,body) + VALUES (vSalesPersonEmail, vSubject, vMessage); + END IF; + CALL vn.ticketStateUpdate (vNewTicket, 'FIXING'); + END IF; + + INSERT INTO vn.sale (ticketFk, itemFk, concept, quantity, price, discount, priceFixed, isPriceFixed) + SELECT vNewTicket, saleOrig.itemFk , saleOrig.concept , saleOrig.quantity, saleOrig.price , saleOrig.discount, saleOrig.priceFixed, saleOrig.isPriceFixed + FROM vn.ticket tOrig + JOIN vn.sale saleOrig ON tOrig.id = saleOrig.ticketFk + LEFT JOIN vn.saleCloned sc ON sc.saleOriginalFk = saleOrig.id + LEFT JOIN vn.sale saleClon ON saleClon.id = sc.saleClonedFk + LEFT JOIN vn.ticket tClon ON tClon.id = saleClon.ticketFk AND DATE(tClon.shipped) = vShipment + WHERE tOrig.id = vTicket AND saleClon.id IS NULL; + + INSERT IGNORE INTO vn.saleCloned(saleOriginalFk, saleClonedFk) + SELECT saleOriginal.id, saleClon.id + FROM vn.sale saleOriginal + JOIN vn.sale saleClon ON saleOriginal.itemFk = saleClon.itemFk AND saleOriginal.quantity = saleClon.quantity + WHERE saleOriginal.ticketFk = vTicket AND saleClon.ticketFk = vNewTicket; + + INSERT INTO ticketRequest (description, ordered, shipped, salesPersonCode, buyerCode, quantity, price, + itemFk ,clientFk, response, total, buyed, saleFk) + SELECT tr.description, tr.ordered, tr.shipped, tr.salesPersonCode, tr.buyerCode, tr.quantity, tr.price, + tr.itemFk, tr.clientFk, tr.response, tr.total, tr.buyed, tr.saleFk + FROM sale s JOIN ticketRequest tr ON tr.saleFk = s.id + JOIN sale s2 ON s.concept = s2.concept AND s.quantity = s2.quantity AND m.Id_Article = m2.Id_Article + WHERE s.ticketFk = vTicket AND s2.ticketFk = vNewTicket; + + CALL vn.ticketCalculateClon(vNewTicket, vTicket); + END; + END LOOP; + + CLOSE rsTicket; + +END$$ + +DELIMITER ; + diff --git a/db/changes/10190-PostErte/01-ticket_recalcComponents.sql b/db/changes/10190-PostErte/01-ticket_recalcComponents.sql new file mode 100644 index 000000000..8a8f71ea4 --- /dev/null +++ b/db/changes/10190-PostErte/01-ticket_recalcComponents.sql @@ -0,0 +1,93 @@ +USE `vn`; +DROP procedure IF EXISTS `ticket_recalcComponents`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `ticket_recalcComponents`(IN vTicketFk BIGINT, vIsTicketEditable BOOLEAN) +proc: BEGIN + +/** + * Este procedimiento recalcula los componentes de un ticket, + * eliminando los componentes existentes e insertandolos de nuevo + * + * @param vTicketFk Id del ticket + * @param vIsTicketEditable si no se quiere forzar llamar con NULL + */ + DECLARE vShipped DATE; + DECLARE vWarehouseFk SMALLINT; + DECLARE vAgencyModeFk INT; + DECLARE vAddressFk INT; + DECLARE vLanded DATE; + DECLARE vZoneFk INTEGER; + + IF vIsTicketEditable IS NULL THEN + SELECT IFNULL(ts.alertLevel,0) = 0 AND IFNULL(t.refFk,'') = '' + INTO vIsTicketEditable + FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket + WHERE id = vTicketFk; + END IF; + + SELECT t.warehouseFk, + t.shipped, + t.addressFk, + t.agencyModeFk, + t.landed, + t.zoneFk + INTO vWarehouseFk, vShipped, vAddressFk, vAgencyModeFk, vLanded, vZoneFk + FROM ticket t LEFT JOIN ticketState ts ON t.id = ts.ticket + WHERE t.id = vTicketFk; + + IF vLanded IS NULL OR vZoneFk IS NULL THEN + + CALL zone_getLanded(vShipped, vAddressFk, vAgencyModeFk, vWarehouseFk, TRUE); + + IF (SELECT COUNT(*) FROM tmp.zoneGetLanded LIMIT 1) = 0 THEN + CALL util.throw('There is no zone for these parameters'); + END IF; + + UPDATE ticket t + SET t.landed = (SELECT landed FROM tmp.zoneGetLanded LIMIT 1) + WHERE t.id = vTicketFk AND t.landed IS NULL; + + IF vZoneFk IS NULL THEN + SELECT zoneFk INTO vZoneFk FROM tmp.zoneGetLanded LIMIT 1; + UPDATE ticket t + SET t.zoneFk = vZoneFk + WHERE t.id = vTicketFk AND t.zoneFk IS NULL; + END IF; + DROP TEMPORARY TABLE tmp.zoneGetLanded; + + END IF; + + -- rellena la tabla buyUltimate con la ultima compra + CALL buyUltimate (vWarehouseFk, vShipped); + + DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; + CREATE TEMPORARY TABLE tmp.ticketLot + SELECT vWarehouseFk warehouseFk, NULL available, + s.itemFk, bu.buyFk, vZoneFk zoneFk + FROM sale s + LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk + WHERE s.ticketFk = vTicketFk + GROUP BY s.itemFk; + + CALL catalog_componentPrepare(); + CALL catalog_componentCalculate(vZoneFk, vAddressFk, vShipped, vWarehouseFk); + + DROP TEMPORARY TABLE IF EXISTS tmp.sale; + CREATE TEMPORARY TABLE tmp.sale + (PRIMARY KEY (saleFk)) ENGINE = MEMORY + SELECT id saleFk, vWarehouseFk warehouseFk + FROM sale s + WHERE s.ticketFk = vTicketFk; + + -- si el ticket esta facturado, respeta los precios + CALL ticketComponentUpdateSale(IF(vIsTicketEditable, 1, 6)); + + CALL catalog_componentPurge(); + DROP TEMPORARY TABLE + tmp.buyUltimate, + tmp.sale; +END$$ + +DELIMITER ; \ No newline at end of file diff --git a/db/changes/10190-PostErte/01-zone_getLanded.sql b/db/changes/10190-PostErte/01-zone_getLanded.sql new file mode 100644 index 000000000..4ddac0112 --- /dev/null +++ b/db/changes/10190-PostErte/01-zone_getLanded.sql @@ -0,0 +1,40 @@ +USE `vn`; +DROP procedure IF EXISTS `zone_getLanded`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN) +BEGIN +/** +* Devuelve una tabla temporal con el dia de recepcion para vShipped. +* +* @param vShipped Fecha de preparacion de mercancia +* @param vAddressFk Id de consignatario, %NULL para recogida +* @param vAgencyModeFk Id agencia +* @param vWarehouseFk vWarehouseFk +* @table tmp.zoneGetLanded Datos de recepción +*/ + + CALL zone_getFromGeo(address_getGeo(vAddressFk)); + CALL zone_getOptionsForShipment(vShipped, vShowExpiredZones); + + DROP TEMPORARY TABLE IF EXISTS tmp.zoneGetLanded; + CREATE TEMPORARY TABLE tmp.zoneGetLanded + ENGINE = MEMORY + SELECT vWarehouseFk warehouseFk, + TIMESTAMPADD(DAY,zo.travelingDays, vShipped) landed, + zo.zoneFk + FROM tmp.zoneOption zo + JOIN zone z ON z.id = zo.zoneFk + JOIN zoneWarehouse zw ON zw.zoneFk = z.id + WHERE agencyModeFk = vAgencyModeFk + AND zw.warehouseFk = vWarehouseFk; + + DROP TEMPORARY TABLE + tmp.zone, + tmp.zoneOption; + +END$$ + +DELIMITER ; + diff --git a/db/tests/vn/zone_getLanded.spec.js b/db/tests/vn/zone_getLanded.spec.js index 92c3f435b..6673879e4 100644 --- a/db/tests/vn/zone_getLanded.spec.js +++ b/db/tests/vn/zone_getLanded.spec.js @@ -11,12 +11,14 @@ describe('zone zone_getLanded()', () => { let params = { addressFk: 121, agencyModeFk: 7, - warehouseFk: 1}; + warehouseFk: 1, + showExpiredZones: true}; - stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL -1 DAY), ?, ?, ?)', [ + stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL -1 DAY), ?, ?, ?, ?)', [ params.addressFk, params.agencyModeFk, - params.warehouseFk + params.warehouseFk, + params.showExpiredZones ]); stmts.push(stmt); @@ -42,12 +44,14 @@ describe('zone zone_getLanded()', () => { let params = { addressFk: 121, agencyModeFk: 7, - warehouseFk: 1}; + warehouseFk: 1, + showExpiredZones: false}; - stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL +2 DAY), ?, ?, ?)', [ + stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL +2 DAY), ?, ?, ?, ?)', [ params.addressFk, params.agencyModeFk, - params.warehouseFk + params.warehouseFk, + params.showExpiredZones ]); stmts.push(stmt); diff --git a/modules/ticket/back/methods/ticket/new.js b/modules/ticket/back/methods/ticket/new.js index 7c4b3adb4..43fbf62e7 100644 --- a/modules/ticket/back/methods/ticket/new.js +++ b/modules/ticket/back/methods/ticket/new.js @@ -105,7 +105,7 @@ module.exports = Self => { if (shipped && !landed) { const landedResult = await models.Agency.getLanded(shipped, - address.id, agencyModeId, warehouseId); + address.id, agencyModeId, warehouseId, false); landed = landedResult && landedResult.landed; } diff --git a/modules/ticket/front/basic-data/step-one/index.js b/modules/ticket/front/basic-data/step-one/index.js index f6655a221..6cfa51a1f 100644 --- a/modules/ticket/front/basic-data/step-one/index.js +++ b/modules/ticket/front/basic-data/step-one/index.js @@ -75,7 +75,8 @@ class Controller extends Component { shipped: value, addressFk: this.ticket.addressFk, agencyModeFk: this.ticket.agencyModeFk, - warehouseFk: this.ticket.warehouseFk + warehouseFk: this.ticket.warehouseFk, + showExpiredZones: false }); } @@ -104,7 +105,8 @@ class Controller extends Component { shipped: this.ticket.shipped, addressFk: this.ticket.addressFk, agencyModeFk: value, - warehouseFk: this.ticket.warehouseFk + warehouseFk: this.ticket.warehouseFk, + showExpiredZones: false }); } } diff --git a/modules/ticket/front/basic-data/step-one/index.spec.js b/modules/ticket/front/basic-data/step-one/index.spec.js index a0673cbbe..43842f5a1 100644 --- a/modules/ticket/front/basic-data/step-one/index.spec.js +++ b/modules/ticket/front/basic-data/step-one/index.spec.js @@ -2,15 +2,13 @@ import './index.js'; describe('Ticket', () => { describe('Component vnTicketBasicDataStepOne', () => { - let $state; let controller; let $httpBackend; let $httpParamSerializer; beforeEach(ngModule('ticket')); - beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, _$httpParamSerializer_) => { - $state = _$state_; + beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => { $httpBackend = _$httpBackend_; $httpParamSerializer = _$httpParamSerializer_; const $element = angular.element(''); @@ -127,6 +125,7 @@ describe('Ticket', () => { shipped: shipped, addressFk: 121, agencyModeFk: 7, + showExpiredZones: false, warehouseFk: 1 }; controller.shipped = shipped; @@ -177,7 +176,8 @@ describe('Ticket', () => { shipped: shipped, addressFk: 121, agencyModeFk: agencyModeId, - warehouseFk: 1 + warehouseFk: 1, + showExpiredZones: false, }; controller.ticket.shipped = shipped; controller.agencyModeId = 8; diff --git a/modules/ticket/front/basic-data/step-two/index.html b/modules/ticket/front/basic-data/step-two/index.html index 474e39342..eebfed2d2 100644 --- a/modules/ticket/front/basic-data/step-two/index.html +++ b/modules/ticket/front/basic-data/step-two/index.html @@ -3,7 +3,7 @@ data="ticketUpdateActions" auto-load="true"> - +
{ arg: 'warehouseFk', type: 'number', required: true + }, + { + arg: 'showExpiredZones', + type: 'boolean', + required: true }], returns: { type: 'object', @@ -34,14 +39,15 @@ module.exports = Self => { } }); - Self.getLanded = async(shipped, addressFk, agencyModeFk, warehouseFk) => { + Self.getLanded = async(shipped, addressFk, agencyModeFk, warehouseFk, showExpiredZones) => { let stmts = []; stmts.push(new ParameterizedSQL( - `CALL vn.zone_getLanded(?, ?, ?, ?)`, [ + `CALL vn.zone_getLanded(?, ?, ?, ?, ?)`, [ shipped, addressFk, agencyModeFk, - warehouseFk + warehouseFk, + showExpiredZones ] )); diff --git a/modules/zone/back/methods/agency/specs/getLanded.spec.js b/modules/zone/back/methods/agency/specs/getLanded.spec.js index 15c0f1ca9..c24379530 100644 --- a/modules/zone/back/methods/agency/specs/getLanded.spec.js +++ b/modules/zone/back/methods/agency/specs/getLanded.spec.js @@ -7,7 +7,8 @@ describe('agency getLanded()', () => { const addressFk = 121; const agencyModeFk = 7; const warehouseFk = 1; - let result = await app.models.Agency.getLanded(shipped, addressFk, agencyModeFk, warehouseFk); + const showExpiredZones = true; + let result = await app.models.Agency.getLanded(shipped, addressFk, agencyModeFk, warehouseFk, showExpiredZones); expect(result.landed).toBeDefined(); }); diff --git a/package-lock.json b/package-lock.json index 4a34836a4..466817559 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2419,6 +2419,21 @@ "resolved": "https://registry.npmjs.org/@kyleshockey/object-assign-deep/-/object-assign-deep-0.4.2.tgz", "integrity": "sha1-hJAPDu/DcnmPR1G1JigwuCCJIuw=" }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@types/babel__core": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz", @@ -2474,6 +2489,12 @@ "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/connect": { "version": "3.4.32", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", @@ -2858,9 +2879,9 @@ } }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "acorn-globals": { @@ -4460,6 +4481,12 @@ "isarray": "^1.0.0" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, "buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -4505,7 +4532,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -4517,7 +4544,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -4591,6 +4618,38 @@ "unset-value": "^1.0.0" } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4615,7 +4674,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -4888,6 +4947,15 @@ "shallow-clone": "^3.0.0" } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", @@ -4970,9 +5038,9 @@ "dev": true }, "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true }, "combined-stream": { @@ -5113,9 +5181,9 @@ "dev": true }, "consolidate": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.14.5.tgz", - "integrity": "sha1-WiUEe8dvcwcmZ8jLUsmJiI9JTGM=", + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", "dev": true, "requires": { "bluebird": "^3.1.1" @@ -5509,6 +5577,15 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -5558,6 +5635,12 @@ "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", "dev": true }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -6135,6 +6218,12 @@ "es6-symbol": "^3.1.1" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -6143,7 +6232,8 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "escodegen": { "version": "1.12.0", @@ -6346,9 +6436,9 @@ "integrity": "sha1-YZegldX7a1folC9v1+qtY6CclFI=" }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", "dev": true }, "events": { @@ -6611,15 +6701,15 @@ } }, "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", + "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", "dev": true, "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" + "concat-stream": "^1.6.2", + "debug": "^2.6.9", + "mkdirp": "^0.5.4", + "yauzl": "^2.10.0" }, "dependencies": { "concat-stream": { @@ -6633,6 +6723,25 @@ "readable-stream": "^2.2.2", "typedarray": "^0.0.6" } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } } }, @@ -6682,6 +6791,11 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, "fast-text-encoding": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.0.tgz", @@ -6711,15 +6825,6 @@ "bser": "^2.0.0" } }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, "feature-policy": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", @@ -6937,9 +7042,9 @@ } }, "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", + "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", "dev": true, "requires": { "debug": "^3.0.0" @@ -7070,12 +7175,12 @@ } }, "fs-readfile-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fs-readfile-promise/-/fs-readfile-promise-2.0.1.tgz", - "integrity": "sha1-gAI4I5gfn//+AWCei+Zo9prknnA=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-readfile-promise/-/fs-readfile-promise-3.0.1.tgz", + "integrity": "sha512-LsSxMeaJdYH27XrW7Dmq0Gx63mioULCRel63B5VeELYLavi1wF5s0XfsIdKDFdCL9hsfQ2qBvXJszQtQJ9h17A==", "dev": true, "requires": { - "graceful-fs": "^4.1.2" + "graceful-fs": "^4.1.11" } }, "fs-write-stream-atomic": { @@ -7708,7 +7813,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -7996,13 +8101,13 @@ } }, "globule": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.0.tgz", - "integrity": "sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", + "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "~4.17.12", "minimatch": "~3.0.2" } }, @@ -8047,6 +8152,25 @@ "pify": "^4.0.0" } }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", @@ -8341,14 +8465,539 @@ } }, "gulp-nodemon": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/gulp-nodemon/-/gulp-nodemon-2.4.2.tgz", - "integrity": "sha512-r8ShC9yzL3lK5qUsTStMeZRwqLG6t2m4lEBVcfUYzVkiYSeYXu9xYXG5rfvzBOPZOZ2dWugTKr+zeWbnMnzWDA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/gulp-nodemon/-/gulp-nodemon-2.5.0.tgz", + "integrity": "sha512-vXfaP72xo2C6XOaXrNcLEM3QqDJ1x21S3x97U4YtzN2Rl2kH57++aFkAVxe6BafGRSTxs/xVfE/jNNlCv5Ym2Q==", "dev": true, "requires": { "colors": "^1.2.1", "gulp": "^4.0.0", - "nodemon": "^1.18.7" + "nodemon": "^2.0.2" + }, + "dependencies": { + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chokidar": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cli-boxes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "dot-prop": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "global-dirs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "dev": true, + "requires": { + "ini": "^1.3.5" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nodemon": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz", + "integrity": "sha512-Ltced+hIfTmaS28Zjv1BM552oQ3dbwPqI4+zI0SLgq+wpJhSyqgYude/aZa/3i31VCQWMfXJVxvu86abcam3uQ==", + "dev": true, + "requires": { + "chokidar": "^3.2.2", + "debug": "^3.2.6", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", + "semver": "^5.7.1", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.2", + "update-notifier": "^4.0.0" + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "registry-auth-token": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", + "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "term-size": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "update-notifier": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + } } }, "gulp-print": { @@ -8481,45 +9130,21 @@ } }, "gulp-wrap": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/gulp-wrap/-/gulp-wrap-0.13.0.tgz", - "integrity": "sha1-kPsLSieiZkM4Mv98YSLbXB7olMY=", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/gulp-wrap/-/gulp-wrap-0.15.0.tgz", + "integrity": "sha512-f17zkGObA+hE/FThlg55gfA0nsXbdmHK1WqzjjB2Ytq1TuhLR7JiCBJ3K4AlMzCyoFaCjfowos+VkToUNE0WTQ==", "dev": true, "requires": { - "consolidate": "^0.14.1", - "es6-promise": "^3.1.2", - "fs-readfile-promise": "^2.0.1", - "gulp-util": "^3.0.3", - "js-yaml": "^3.2.6", - "lodash": "^4.11.1", - "node.extend": "^1.1.2", - "through2": "^2.0.1", + "consolidate": "^0.15.1", + "es6-promise": "^4.2.6", + "fs-readfile-promise": "^3.0.1", + "js-yaml": "^3.13.0", + "lodash": "^4.17.11", + "node.extend": "2.0.2", + "plugin-error": "^1.0.1", + "through2": "^3.0.1", "tryit": "^1.0.1", "vinyl-bufferstream": "^1.0.1" - }, - "dependencies": { - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - } } }, "gulp-yaml": { @@ -8572,31 +9197,11 @@ } }, "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", "dev": true }, - "handlebars": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.0.tgz", - "integrity": "sha512-xkRtOt3/3DzTKMOt3xahj2M/EqNhY988T+imYSlMgs5fVhLN2fmKVVj0LtEGmb+3UUYV5Qmm1052Mm3dIQxOvw==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -8702,6 +9307,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -8856,9 +9467,15 @@ } }, "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz", + "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "html-loader": { @@ -8983,6 +9600,12 @@ } } }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -9013,16 +9636,10 @@ } } }, - "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", - "dev": true - }, "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "dev": true, "requires": { "eventemitter3": "^4.0.0", @@ -9101,6 +9718,11 @@ } } }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + }, "i18n": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.8.4.tgz", @@ -9206,9 +9828,9 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -9683,6 +10305,12 @@ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -9867,12 +10495,12 @@ } }, "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", "dev": true, "requires": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0" } }, "jade": { @@ -10112,8 +10740,7 @@ }, "yargs-parser": { "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "resolved": "", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -10549,9 +11176,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -10700,9 +11327,9 @@ "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", + "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", "dev": true }, "js-levenshtein": { @@ -10906,6 +11533,23 @@ "safe-buffer": "^5.0.1" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + }, + "dependencies": { + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + } + } + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -10913,9 +11557,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "kleur": { @@ -11227,9 +11871,9 @@ } }, "loglevel": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.6.tgz", - "integrity": "sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz", + "integrity": "sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==", "dev": true }, "long": { @@ -11374,38 +12018,179 @@ } }, "loopback-connector": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-4.8.0.tgz", - "integrity": "sha512-X5A4YaS6iifomym97ll/J/V+iPZ3Av69J6gmG3QXkq2JtzDtAOh6g2ITgo9aYJ/rzRf9HESH3Ys7aqeppDkpZQ==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-4.11.0.tgz", + "integrity": "sha512-kQH6wX4bf0NQOaeg87g9Uagn0LTIelCUdlcUV6XF29GTYs1D6tUfMwQZjELmTQ+C/jgnXHhpZdXb6D8PH6/IyA==", "requires": { - "async": "^2.1.5", - "bluebird": "^3.4.6", - "debug": "^3.1.0", + "async": "^3.2.0", + "bluebird": "^3.7.2", + "debug": "^4.1.1", "msgpack5": "^4.2.0", - "strong-globalize": "^4.1.1", - "uuid": "^3.0.1" + "strong-globalize": "^5.1.0", + "uuid": "^7.0.3" }, "dependencies": { "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "requires": { - "lodash": "^4.17.11" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "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" } }, + "execa": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.2.tgz", + "integrity": "sha512-QI2zLa6CjGWdiQsmSkZoGtDx2N+cQIGb3yNolGTdjSQzydzLgYYf8LRuagp7S7fPimjcrzUDSUFd/MgzELMi4Q==", + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "requires": { + "pump": "^3.0.0" + } + }, + "globalize": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.5.0.tgz", + "integrity": "sha512-76fcPQO/WLthtSwjgIZ/Zv2XSXqv9ifvl1PwIxJNCZNFHigGCpg3fBZ0poJ30b2kdDgofPkYl478lVZA6esESQ==", + "requires": { + "cldrjs": "^0.5.0" + } + }, + "invert-kv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", + "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "lcid": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", + "integrity": "sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==", + "requires": { + "invert-kv": "^3.0.0" + } + }, + "mem": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", + "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==", + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^2.1.0", + "p-is-promise": "^2.1.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "os-locale": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-5.0.0.tgz", + "integrity": "sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA==", + "requires": { + "execa": "^4.0.0", + "lcid": "^3.0.0", + "mem": "^5.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "strong-globalize": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-5.1.0.tgz", + "integrity": "sha512-9cooAb6kNMDFmTDybkkch1x7b+LuzZNva8oIr+MxXnvx9jcvw4/4DTSXPc53mG68G0Q9YOTYZkhDkWe/DiJ1Qg==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.1.1", + "globalize": "^1.5.0", + "lodash": "^4.17.15", + "md5": "^2.2.1", + "mkdirp": "^0.5.5", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + } + }, + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -11455,9 +12240,9 @@ } }, "loopback-datasource-juggler": { - "version": "3.31.1", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-3.31.1.tgz", - "integrity": "sha512-B33enq3yKcSsMha/xysomLG7y8rHuTOkKPtsZjg5P63PmtAPVZ8DaA5KJPQ8J5rNINdjVactVAvx7hd4h0cEQA==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-3.35.0.tgz", + "integrity": "sha512-Z4lxBxhNHJTro4M4tZgOrpi9/tmHyMsmquuKIFsgKJwQ3R7Zb6rMoaQ+VZoxmyFW+xLexVEM/tShOQbRjb8HVQ==", "requires": { "async": "^2.6.0", "bluebird": "^3.1.1", @@ -11474,14 +12259,6 @@ "uuid": "^3.0.1" }, "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "requires": { - "lodash": "^4.17.11" - } - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -11791,7 +12568,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -11910,6 +12687,12 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -11931,9 +12714,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mississippi": { "version": "3.0.0", @@ -12005,18 +12788,11 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "minimist": "^1.2.5" } }, "mktmpdir": { @@ -12085,6 +12861,19 @@ "sigmund": "~1.0.0" } }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, "ms": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", @@ -12420,7 +13209,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -12532,9 +13321,9 @@ } }, "node-sass": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz", - "integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -12551,7 +13340,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -12570,7 +13359,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -12625,9 +13414,9 @@ } }, "node.extend": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.8.tgz", - "integrity": "sha512-L/dvEBwyg3UowwqOUTyDsGBU6kjBQOpOhshio9V3i3BMPv5YUb9+mWNN8MK0IbWqT0AqaTSONZf0aTuMMahWgA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", "dev": true, "requires": { "has": "^1.0.3", @@ -12763,6 +13552,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, "now-and-later": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", @@ -12981,30 +13776,6 @@ "is-wsl": "^1.1.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, "optional": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", @@ -13055,7 +13826,7 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, @@ -13085,6 +13856,12 @@ "os-tmpdir": "^1.0.0" } }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -13415,6 +14192,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -13508,9 +14291,9 @@ "dev": true }, "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", + "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==", "dev": true, "requires": { "async": "^2.6.2", @@ -13637,6 +14420,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, "pretty-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", @@ -13798,6 +14587,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "puppeteer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.0.0.tgz", @@ -14461,6 +15259,15 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", @@ -14609,15 +15416,117 @@ } }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "sass-loader": { @@ -14762,12 +15671,6 @@ "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4=", "dev": true }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true - }, "serve-favicon": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", @@ -15134,13 +16037,22 @@ } }, "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", + "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", "dev": true, "requires": { "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "uuid": "^3.4.0", + "websocket-driver": "0.6.5" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "sockjs-client": { @@ -15271,9 +16183,9 @@ "dev": true }, "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -15330,9 +16242,9 @@ "dev": true }, "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -15588,6 +16500,11 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -15781,15 +16698,15 @@ } }, "strong-remoting": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/strong-remoting/-/strong-remoting-3.14.0.tgz", - "integrity": "sha512-kBOVMBIGW8fCv37G8uyvxBLO+ed0mF9z+gulAgOZfdIXWa0AgXhndpjTqAWvde+2iXt/n6odiyYvCUbXCrfBsQ==", + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/strong-remoting/-/strong-remoting-3.16.2.tgz", + "integrity": "sha512-Kj8dZh6q0F3GQTil2rkEt6WuQoQbXFRZ2AJG36iBPmxcVEE9bVhWXUYxcJIxXaGekCprxp8kfdLLN67yp0J4Hg==", "requires": { - "async": "^2.0.1", + "async": "^3.1.0", "body-parser": "^1.12.4", - "debug": "^3.1.0", - "depd": "^1.1.0", - "escape-string-regexp": "^1.0.5", + "debug": "^4.1.1", + "depd": "^2.0.0", + "escape-string-regexp": "^2.0.0", "eventemitter2": "^5.0.1", "express": "4.x", "inflection": "^1.7.1", @@ -15802,50 +16719,197 @@ "request": "^2.83.0", "sse": "0.0.8", "strong-error-handler": "^3.0.0", - "strong-globalize": "^4.1.0", + "strong-globalize": "^5.0.2", "traverse": "^0.6.6", "xml2js": "^0.4.8" }, "dependencies": { "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "requires": { - "lodash": "^4.17.11" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "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" } }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + }, + "execa": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.2.tgz", + "integrity": "sha512-QI2zLa6CjGWdiQsmSkZoGtDx2N+cQIGb3yNolGTdjSQzydzLgYYf8LRuagp7S7fPimjcrzUDSUFd/MgzELMi4Q==", + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "requires": { + "pump": "^3.0.0" + } + }, + "globalize": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.5.0.tgz", + "integrity": "sha512-76fcPQO/WLthtSwjgIZ/Zv2XSXqv9ifvl1PwIxJNCZNFHigGCpg3fBZ0poJ30b2kdDgofPkYl478lVZA6esESQ==", + "requires": { + "cldrjs": "^0.5.0" + } + }, + "invert-kv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", + "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "lcid": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", + "integrity": "sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==", + "requires": { + "invert-kv": "^3.0.0" + } + }, + "mem": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", + "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==", + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^2.1.0", + "p-is-promise": "^2.1.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "os-locale": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-5.0.0.tgz", + "integrity": "sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA==", + "requires": { + "execa": "^4.0.0", + "lcid": "^3.0.0", + "mem": "^5.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, "strong-error-handler": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-3.2.0.tgz", - "integrity": "sha512-WBU5itMkVPoEPf1W3ptb0AjtPvRWabDzVO4Lcy8MbJQUbo8vdWngLAcNQptQovdFoMGLgQAgJzZkelm6FRADuQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-3.4.0.tgz", + "integrity": "sha512-GbrDN/ACe3hlGgq7/001fc5TAo8tZxxudp7qqfCPXZzz8+h5tCHMZaotMeSyHDEEUFkyAUjdZva3BIBJIDdndw==", "requires": { "@types/express": "^4.16.0", "accepts": "^1.3.3", - "debug": "^3.1.0", + "debug": "^4.1.1", "ejs": "^2.6.1", + "fast-safe-stringify": "^2.0.6", "http-status": "^1.1.2", - "js2xmlparser": "^3.0.0", - "strong-globalize": "^4.1.0" + "js2xmlparser": "^4.0.0", + "strong-globalize": "^5.0.2" + }, + "dependencies": { + "js2xmlparser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", + "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", + "requires": { + "xmlcreate": "^2.0.3" + } + } } + }, + "strong-globalize": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-5.1.0.tgz", + "integrity": "sha512-9cooAb6kNMDFmTDybkkch1x7b+LuzZNva8oIr+MxXnvx9jcvw4/4DTSXPc53mG68G0Q9YOTYZkhDkWe/DiJ1Qg==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.1.1", + "globalize": "^1.5.0", + "lodash": "^4.17.15", + "md5": "^2.2.1", + "mkdirp": "^0.5.5", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "xmlcreate": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", + "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==" } } }, @@ -16099,22 +17163,31 @@ } }, "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz", + "integrity": "sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^3.1.0", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" }, "dependencies": { + "serialize-javascript": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", + "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -16363,6 +17436,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -16544,6 +17623,12 @@ "prelude-ls": "~1.1.2" } }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -16558,6 +17643,15 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", @@ -16883,6 +17977,15 @@ "requires-port": "^1.0.0" } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -17113,14 +18216,159 @@ } }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", + "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^3.4.0", "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true, + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "optional": true + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "watchpack-chokidar2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz", + "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + }, + "dependencies": { + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + } } }, "wbuf": { @@ -17170,9 +18418,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "ajv": { @@ -17346,9 +18594,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -17371,17 +18619,17 @@ }, "dependencies": { "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==", "dev": true } } }, "webpack-dev-server": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.10.1.tgz", - "integrity": "sha512-AGG4+XrrXn4rbZUueyNrQgO4KGnol+0wm3MPdqGLmmA+NofZl3blZQKxZ9BND6RDNuvAK9OMYClhjOSnxpWRoA==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", + "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -17392,31 +18640,31 @@ "debug": "^4.1.1", "del": "^4.1.1", "express": "^4.17.1", - "html-entities": "^1.2.1", + "html-entities": "^1.3.1", "http-proxy-middleware": "0.19.1", "import-local": "^2.0.0", "internal-ip": "^4.3.0", "ip": "^1.1.5", "is-absolute-url": "^3.0.3", "killable": "^1.0.1", - "loglevel": "^1.6.6", + "loglevel": "^1.6.8", "opn": "^5.5.0", "p-retry": "^3.0.1", - "portfinder": "^1.0.25", + "portfinder": "^1.0.26", "schema-utils": "^1.0.0", "selfsigned": "^1.10.7", "semver": "^6.3.0", "serve-index": "^1.9.1", - "sockjs": "0.3.19", + "sockjs": "0.3.20", "sockjs-client": "1.4.0", - "spdy": "^4.0.1", + "spdy": "^4.0.2", "strip-ansi": "^3.0.1", "supports-color": "^6.1.0", "url": "^0.11.0", "webpack-dev-middleware": "^3.7.2", "webpack-log": "^2.0.0", "ws": "^6.2.1", - "yargs": "12.0.5" + "yargs": "^13.3.2" }, "dependencies": { "ansi-regex": { @@ -17446,29 +18694,29 @@ } }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } } } @@ -17497,9 +18745,15 @@ "rimraf": "^2.6.3" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "globby": { "version": "6.1.0", - "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { @@ -17512,7 +18766,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } @@ -17554,6 +18808,12 @@ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", "dev": true }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -17569,6 +18829,34 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -17603,30 +18891,62 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -17681,20 +19001,18 @@ } }, "websocket-driver": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", - "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", "dev": true, "requires": { - "http-parser-js": ">=0.4.0 <0.4.11", - "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "whatwg-encoding": { @@ -18080,15 +19398,6 @@ "dev": true } } - }, - "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "dev": true, - "requires": { - "fd-slicer": "~1.0.1" - } } } } diff --git a/package.json b/package.json index c24022e5e..d92ff59a6 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,9 @@ "gulp-install": "^1.1.0", "gulp-jasmine": "^4.0.0", "gulp-merge-json": "^1.3.1", - "gulp-nodemon": "^2.4.2", + "gulp-nodemon": "^2.5.0", "gulp-print": "^2.0.1", - "gulp-wrap": "^0.13.0", + "gulp-wrap": "^0.15.0", "gulp-yaml": "^1.0.1", "html-loader": "^0.4.5", "html-loader-jest": "^0.2.1", @@ -71,9 +71,9 @@ "jest-junit": "^8.0.0", "json-loader": "^0.5.7", "merge-stream": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.5", "mysql2": "^1.7.0", - "node-sass": "^4.13.0", + "node-sass": "^4.14.1", "nodemon": "^1.19.4", "plugin-error": "^1.0.1", "puppeteer": "^2.0.0", @@ -82,7 +82,7 @@ "style-loader": "^0.23.1", "webpack": "^4.41.5", "webpack-cli": "^3.3.10", - "webpack-dev-server": "^3.10.1", + "webpack-dev-server": "^3.11.0", "webpack-merge": "^4.2.2", "yaml-loader": "^0.5.0" }, From 90541a4c1336eeb3f872389adcce0297e14b9afe Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Fri, 5 Jun 2020 12:13:05 +0200 Subject: [PATCH 12/35] fix client descriptor in log section --- modules/worker/front/log/index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/worker/front/log/index.html b/modules/worker/front/log/index.html index 7b2ffa445..eb9791997 100644 --- a/modules/worker/front/log/index.html +++ b/modules/worker/front/log/index.html @@ -52,8 +52,8 @@ {{::log.user.name | dashIfEmpty}} @@ -101,3 +101,6 @@ + + From 048f01305d6a63dab257a18bfc7fa9311162f640 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 5 Jun 2020 13:14:14 +0200 Subject: [PATCH 13/35] 2220 - Added clearDisabled param --- front/core/components/field/index.html | 2 +- front/core/components/field/index.js | 1 + front/core/components/field/index.spec.js | 24 +++++++++++++++++++++++ front/core/components/textarea/index.js | 1 + front/core/components/textarea/style.scss | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 front/core/components/field/index.spec.js create mode 100644 front/core/components/textarea/style.scss diff --git a/front/core/components/field/index.html b/front/core/components/field/index.html index b1b78be66..bd13f46d6 100644 --- a/front/core/components/field/index.html +++ b/front/core/components/field/index.html @@ -13,7 +13,7 @@
- diff --git a/front/core/components/field/index.js b/front/core/components/field/index.js index 81fd4cc6a..8d619e4a3 100644 --- a/front/core/components/field/index.js +++ b/front/core/components/field/index.js @@ -203,6 +203,7 @@ ngModule.vnComponent('vnField', { type: '@?', autocomplete: '@?', placeholder: '@?', + clearDisabled: ' { + let $element; + let controller; + + beforeEach(ngModule('vnCore')); + + beforeEach(inject(($compile, $rootScope) => { + $element = $compile(``)($rootScope); + controller = $element.controller('vnTextfield'); + })); + + afterEach(() => { + $element.remove(); + }); + + // Remove this block + describe('clearDisabled binding', () => { + it(`should enable the show property`, () => { + controller.clearDisabled = true; + + expect(controller.clearDisabled).toEqual(true); + }); + }); +}); diff --git a/front/core/components/textarea/index.js b/front/core/components/textarea/index.js index 1954b12c6..f8965830e 100644 --- a/front/core/components/textarea/index.js +++ b/front/core/components/textarea/index.js @@ -1,5 +1,6 @@ import ngModule from '../../module'; import Field from '../field'; +import './style.scss'; export default class Textarea extends Field { constructor($element, $scope, $compile) { diff --git a/front/core/components/textarea/style.scss b/front/core/components/textarea/style.scss new file mode 100644 index 000000000..2da8ad4d4 --- /dev/null +++ b/front/core/components/textarea/style.scss @@ -0,0 +1,8 @@ +.vn-textarea { + & > .container { + & > .icons { + display: flex; + align-items: flex-start; + } + } +} \ No newline at end of file From 56c9b08101fa00ffd780d3ed45d6c0b6a5944fa2 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Mon, 8 Jun 2020 07:52:23 +0200 Subject: [PATCH 14/35] fix show.descriptor --- modules/client/front/balance/index/index.html | 21 +++++++------------ modules/client/front/balance/index/index.js | 7 +++++++ modules/ticket/front/sale-checked/index.html | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/client/front/balance/index/index.html b/modules/client/front/balance/index/index.html index 7fe9c593b..7144c8b29 100644 --- a/modules/client/front/balance/index/index.html +++ b/modules/client/front/balance/index/index.html @@ -72,20 +72,13 @@ -
- - {{'BILL' | translate: {ref: balance.ref} }} - - - {{::balance.ref}} - -
+ + {{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }} +
{{::balance.bankFk}} {{::balance.debit | currency: 'EUR':2}} diff --git a/modules/client/front/balance/index/index.js b/modules/client/front/balance/index/index.js index 4030539ac..582456d85 100644 --- a/modules/client/front/balance/index/index.js +++ b/modules/client/front/balance/index/index.js @@ -72,6 +72,13 @@ class Controller extends Section { } }); } + + showInvoiceOutDescriptor(event, balance) { + if (!balance.isInvoice) return; + if (event.defaultPrevented) return; + + this.$.invoiceOutDescriptor.show(event.target, balance.id); + } } Controller.$inject = ['$element', '$scope']; diff --git a/modules/ticket/front/sale-checked/index.html b/modules/ticket/front/sale-checked/index.html index 78ed6dfdc..fd36aab59 100644 --- a/modules/ticket/front/sale-checked/index.html +++ b/modules/ticket/front/sale-checked/index.html @@ -29,7 +29,7 @@ {{::sale.itemFk | zeroFill:6}} From 762c39eb23d42e1e8dc302686fa69172575ab273 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 8 Jun 2020 07:52:30 +0200 Subject: [PATCH 15/35] :: para watcher --- modules/item/back/methods/item/createIntrastat.js | 2 -- modules/ticket/front/basic-data/step-two/index.html | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/item/back/methods/item/createIntrastat.js b/modules/item/back/methods/item/createIntrastat.js index 1a88d16e2..bd921f29a 100644 --- a/modules/item/back/methods/item/createIntrastat.js +++ b/modules/item/back/methods/item/createIntrastat.js @@ -1,5 +1,3 @@ -let UserError = require('vn-loopback/util/user-error'); - module.exports = Self => { Self.remoteMethod('createIntrastat', { description: 'Creates a new item intrastat', diff --git a/modules/ticket/front/basic-data/step-two/index.html b/modules/ticket/front/basic-data/step-two/index.html index eebfed2d2..39e7753fc 100644 --- a/modules/ticket/front/basic-data/step-two/index.html +++ b/modules/ticket/front/basic-data/step-two/index.html @@ -3,7 +3,7 @@ data="ticketUpdateActions" auto-load="true"> - +
Date: Mon, 8 Jun 2020 10:19:24 +0200 Subject: [PATCH 16/35] log web access --- back/models/account.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/back/models/account.js b/back/models/account.js index 64b59e704..28b426862 100644 --- a/back/models/account.js +++ b/back/models/account.js @@ -12,10 +12,26 @@ module.exports = Self => { message: `A client with that Web User name already exists` }); - Self.observe('before save', (ctx, next) => { + Self.observe('before save', async function(ctx, next) { if (ctx.currentInstance && ctx.currentInstance.id && ctx.data && ctx.data.password) ctx.data.password = md5(ctx.data.password); + if (ctx.data && (ctx.data.name || ctx.data.active)) { + let instance = JSON.parse(JSON.stringify(ctx.currentInstance)); + let userId = ctx.options.accessToken.userId; + console.log('ctx.data', ctx.data); + console.log('ctx.currentInstance', ctx.currentInstance); + let logRecord = { + originFk: ctx.currentInstance.id, + userFk: userId, + action: 'update', + changedModel: 'Account', + oldInstance: {name: instance.name, active: instance.active}, + newInstance: ctx.data + }; + await Self.app.models.ClientLog.create(logRecord); + } + next(); }); From e24c5b00e93c09737cce1365a4e614b21fd108ed Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Mon, 8 Jun 2020 11:05:17 +0200 Subject: [PATCH 17/35] fix descriptors --- modules/ticket/front/sale-checked/index.html | 2 +- modules/ticket/front/sale-checked/index.js | 14 ++++++++++++++ modules/worker/front/log/index.html | 9 +++------ modules/worker/front/log/index.js | 5 +++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/modules/ticket/front/sale-checked/index.html b/modules/ticket/front/sale-checked/index.html index fd36aab59..78ed6dfdc 100644 --- a/modules/ticket/front/sale-checked/index.html +++ b/modules/ticket/front/sale-checked/index.html @@ -29,7 +29,7 @@ {{::sale.itemFk | zeroFill:6}} diff --git a/modules/ticket/front/sale-checked/index.js b/modules/ticket/front/sale-checked/index.js index 5768785d8..37d63a485 100644 --- a/modules/ticket/front/sale-checked/index.js +++ b/modules/ticket/front/sale-checked/index.js @@ -17,6 +17,20 @@ class Controller extends Section { ] }; } + showDescriptor(event, sale) { + this.quicklinks = { + btnThree: { + icon: 'icon-transaction', + state: `item.card.diary({ + id: ${sale.itemFk}, + warehouseFk: ${this.ticket.warehouseFk}, + lineFk: ${sale.id} + })`, + tooltip: 'Item diary' + } + }; + this.$.descriptor.show(event.target, sale.itemFk); + } } ngModule.component('vnTicketSaleChecked', { diff --git a/modules/worker/front/log/index.html b/modules/worker/front/log/index.html index eb9791997..bfa60a8c3 100644 --- a/modules/worker/front/log/index.html +++ b/modules/worker/front/log/index.html @@ -32,7 +32,7 @@ Changed by: {{::log.user.name | dashIfEmpty}}
@@ -52,8 +52,8 @@ {{::log.user.name | dashIfEmpty}} @@ -101,6 +101,3 @@ - - diff --git a/modules/worker/front/log/index.js b/modules/worker/front/log/index.js index 421ffec63..325200aa9 100644 --- a/modules/worker/front/log/index.js +++ b/modules/worker/front/log/index.js @@ -57,6 +57,11 @@ export default class Controller extends Section { } return null; } + + showWorkerDescriptor(event, workerId) { + if (!workerId) return; + this.$.workerDescriptor.show(event.target, workerId); + } } ngModule.component('vnLog', { From ab1e8fb6220a4fd4d849f79326fb6bd8b060a6dc Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 8 Jun 2020 12:14:27 +0200 Subject: [PATCH 18/35] 2176 First working version --- front/core/components/contextmenu/index.js | 214 ++++++++++--------- modules/ticket/back/methods/ticket/filter.js | 110 ++++------ modules/ticket/front/index/index.html | 32 +-- modules/ticket/front/index/index.js | 55 ----- 4 files changed, 164 insertions(+), 247 deletions(-) diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index a99009d50..5f8a165a5 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -5,40 +5,6 @@ export default class Contextmenu { this.element = $element[0]; this.$ = $; this.$transclude = $transclude; - // this.displayMode = 'relative'; - - // Foreach element, apply an addEventListener??? - /* - document.body.addEventListener('contextmenu', event => { - if (!event.defaultPrevented) - event.preventDefault(); - - const target = event.target; - const rect = target.getBoundingClientRect(); - - console.log('ScreenY', event.pageY); - console.log('OffsetY', event.pageX); - - const parent = $.contextmenu; - parent.style.top = event.pageY + 'px'; - parent.style.left = event.pageX + 'px'; - - $.menu.show(parent); - }); */ - } - - $onInit() { - /* const transcludeElement = this.element.querySelector('vn-menu'); - const content = angular.element(transcludeElement); - - this.$transclude(($clone, $scope) => { - this.$contentScope = $scope; - // $scope.$target = 'hola??'; - const list = angular.element(''); - list.append($clone); - - content.append(list); - }, null, 'menu'); */ } get targets() { @@ -51,103 +17,143 @@ export default class Contextmenu { if (!value) return; for (let selector of value) { - const target = document.querySelector(selector);// Find elements + const target = document.querySelector(selector); if (!target) continue; target.addEventListener('contextmenu', event => { + this.target = event.target; + if (!event.defaultPrevented) event.preventDefault(); + if (!this.isFilterEnabled()) return; + const parent = this.$.contextmenu; parent.style.top = event.pageY + 'px'; parent.style.left = event.pageX + 'px'; - this.eventTarget = event.target; - - /* const menu = this.element.querySelector('vn-menu'); - const list = document.createElement('vn-list'); - menu.append(list); - - const transcludeElement = this.element.querySelector('vn-list'); - const content = angular.element(transcludeElement); - console.log(transcludeElement); - - this.$transclude(($clone, $scope) => { - this.$contentScope = $scope; - $scope.$target = 'hola??'; - console.log($clone); - content.append($clone); - }, null, 'menu'); */ - this.$.menu.show(parent); }); } } - /* const transcludeElement = this.element.querySelector('vn-list'); - const content = angular.element(transcludeElement); - console.log(transcludeElement); + get row() { + if (!this.target) return null; - this.$transclude(($clone, $scope) => { - this.$contentScope = $scope; - $scope.$target = 'hola??'; - content.append($clone); - }); */ + return this.target.closest('vn-tr, .vn-tr'); + } + get rowIndex() { + if (!this.row) return null; + const table = this.row.closest('vn-table, .vn-table'); + const tBody = table.querySelector('vn-tbody, .vn-tbody'); + const rows = tBody.querySelectorAll('vn-tr, .vn-tr'); + + return Array.from(rows).findIndex( + rowItem => rowItem == this.row + ); + } + + get rowData() { + const model = this.model; + const rowData = model.data[this.rowIndex]; + + return rowData; + } + + get cell() { + if (!this.target) return null; + + return this.target.closest('vn-td, .vn-td'); + } + + get cellIndex() { + if (!this.row) return null; + + const cells = this.row.querySelectorAll('vn-td, .vn-td'); + return Array.from(cells).findIndex( + cellItem => cellItem == this.cell + ); + } + + get rowHeader() { + if (!this.row) return null; + + const table = this.row.closest('vn-table, .vn-table'); + const headerCells = table && table.querySelectorAll('vn-thead vn-th'); + const headerCell = headerCells && headerCells[this.cellIndex]; + + return headerCell; + } + + /** + * Selected model field name + * + * @return {string} + */ + get fieldName() { + if (!this.rowHeader) return null; + + return this.rowHeader.getAttribute('field'); + } + + /** + * Selected field value + * + * @return {any} + */ + get fieldValue() { + return this.rowData[this.fieldName]; + } + + /** + * Returns true if filter is not disabled + * + * @return {Boolean} + */ + isFilterEnabled() { + if (!this.rowHeader) return true; + const isEnabled = this.rowHeader.getAttribute('filter-enabled'); + + return isEnabled != 'false'; + } + + /** + * Returns true if filter + * by selection is allowed + * + * @return {Boolean} + */ + isFilterAllowed() { + if (!this.target) return false; + const isTableCell = this.target.closest('vn-td, .vn-td'); + + return isTableCell && this.fieldName; + } + + /** + * Filter by current field selection + */ filterBySelection() { - // const target = $event.target; - const model = this.model; - const target = this.eventTarget; - console.log(target); - - const table = target.closest('.vn-table'); - const headerCols = table.querySelectorAll('vn-thead vn-th'); - - const row = target.closest('.vn-tr'); - const col = target.closest('vn-td'); - - const rowIndex = row.getAttribute('data-index'); - - const columns = Array.from(row.querySelectorAll('vn-td')); - - const fieldIndex = columns.findIndex(column => column == col); - const fieldName = headerCols[fieldIndex].getAttribute('field'); - - const rowData = model.data[rowIndex]; - const filter = {where: {}}; - filter['where'][fieldName] = rowData[fieldName]; - console.log(filter); + filter['where'][this.fieldName] = this.fieldValue; - model.addFilter(filter); + this.model.addFilter(filter); } + /** + * Exclude by current field selection + */ excludeSelection() { - const model = this.model; - const target = this.eventTarget; - - const table = target.closest('.vn-table'); - const headerCols = table.querySelectorAll('vn-thead vn-th'); - - const row = target.closest('.vn-tr'); - const col = target.closest('vn-td'); - - const rowIndex = row.getAttribute('data-index'); - - const columns = Array.from(row.querySelectorAll('vn-td')); - - const fieldIndex = columns.findIndex(column => column == col); - const fieldName = headerCols[fieldIndex].getAttribute('field'); - - const rowData = model.data[rowIndex]; - const filter = {where: {}}; - filter['where'][fieldName] = {neq: rowData[fieldName]}; - console.log(filter); + filter['where'][this.fieldName] = {neq: this.fieldValue}; - model.addFilter(filter); + this.model.addFilter(filter); } + /** + * Removes all applied filters + */ removeFilter() { this.model.removeFilter(); } diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index a7c545562..f191247cf 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -186,84 +186,46 @@ module.exports = Self => { let stmt; stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); - - /* stmt = new ParameterizedSQL( - `CREATE TEMPORARY TABLE tmp.filter - (INDEX (id)) - ENGINE = MEMORY - SELECT - t.id, - t.shipped, - t.nickname, - t.refFk, - t.routeFk, - t.warehouseFk, - t.clientFk, - a.provinceFk, - p.name AS province, - w.name AS warehouse, - am.name AS agencyMode, - am.id AS agencyModeFk, - st.name AS state, - wk.lastName AS salesPerson, - ts.stateFk as stateFk, - ts.alertLevel as alertLevel, - ts.code as alertLevelCode, - u.nickname userNickname, - c.salesPersonFk, - z.hour zoneLanding, - HOUR(z.hour) zoneHour, - MINUTE(z.hour) zoneMinute - FROM ticket t - LEFT JOIN zone z ON z.id = t.zoneFk - LEFT JOIN address a ON a.id = t.addressFk - LEFT JOIN province p ON p.id = a.provinceFk - LEFT JOIN warehouse w ON w.id = t.warehouseFk - LEFT JOIN agencyMode am ON am.id = t.agencyModeFk - LEFT JOIN ticketState ts ON ts.ticketFk = t.id - LEFT JOIN state st ON st.id = ts.stateFk - LEFT JOIN client c ON c.id = t.clientFk - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.userFk`); */ stmt = new ParameterizedSQL( `CREATE TEMPORARY TABLE tmp.filter (INDEX (id)) ENGINE = MEMORY - SELECT id, shipped, nickname, refFk, routeFk, warehouseFk - (SELECT - t.id, - t.shipped, - t.nickname, - t.refFk, - t.routeFk, - t.warehouseFk, - t.clientFk, - a.provinceFk, - p.name AS province, - w.name AS warehouse, - am.name AS agencyMode, - am.id AS agencyModeFk, - st.name AS state, - wk.lastName AS salesPerson, - ts.stateFk as stateFk, - ts.alertLevel as alertLevel, - ts.code as alertLevelCode, - u.nickname userNickname, - c.salesPersonFk, - z.hour zoneLanding, - HOUR(z.hour) zoneHour, - MINUTE(z.hour) zoneMinute - FROM ticket t - LEFT JOIN zone z ON z.id = t.zoneFk - LEFT JOIN address a ON a.id = t.addressFk - LEFT JOIN province p ON p.id = a.provinceFk - LEFT JOIN warehouse w ON w.id = t.warehouseFk - LEFT JOIN agencyMode am ON am.id = t.agencyModeFk - LEFT JOIN ticketState ts ON ts.ticketFk = t.id - LEFT JOIN state st ON st.id = ts.stateFk - LEFT JOIN client c ON c.id = t.clientFk - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.userFk)`); + SELECT * FROM ( + SELECT + t.id, + t.shipped, + CAST(DATE(t.shipped) AS CHAR) AS shippedDate, + t.nickname, + t.refFk, + t.routeFk, + t.warehouseFk, + t.clientFk, + a.provinceFk, + p.name AS province, + w.name AS warehouse, + am.name AS agencyMode, + am.id AS agencyModeFk, + st.name AS state, + wk.lastName AS salesPerson, + ts.stateFk as stateFk, + ts.alertLevel as alertLevel, + ts.code as alertLevelCode, + u.nickname userNickname, + c.salesPersonFk, + z.hour zoneLanding, + HOUR(z.hour) zoneHour, + MINUTE(z.hour) zoneMinute + FROM ticket t + LEFT JOIN zone z ON z.id = t.zoneFk + LEFT JOIN address a ON a.id = t.addressFk + LEFT JOIN province p ON p.id = a.provinceFk + LEFT JOIN warehouse w ON w.id = t.warehouseFk + LEFT JOIN agencyMode am ON am.id = t.agencyModeFk + LEFT JOIN ticketState ts ON ts.ticketFk = t.id + LEFT JOIN state st ON st.id = ts.stateFk + LEFT JOIN client c ON c.id = t.clientFk + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.userFk) t`); if (args.orderFk) { stmt.merge({ diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index a10ec6b06..ee6e53a12 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -15,14 +15,14 @@ Id - Salesperson - Date + Salesperson + Date Hour Alias - Province + Province State Agency - Warehouse + Warehouse Invoice Closure Total @@ -153,15 +153,19 @@ - Filter by selection - Exclude selection - Remove filter - - Filter by selection 2 - Exclude selection 2 - Remove filter 2 - + + Filter by selection + + + Exclude selection + + + Remove filter + \ No newline at end of file diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index bb56f9cbf..59e5d949d 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -92,61 +92,6 @@ export default class Controller extends Section { this.selectedTicket = ticket; this.$.summary.show(); } - - filterBySelection(target) { - // const target = $event.target; - const model = this.$.model; - console.log(target); - const table = target.closest('.vn-table'); - const headerCols = table.querySelectorAll('vn-thead vn-th'); - - const row = target.closest('.vn-tr'); - const col = target.closest('vn-td'); - - const rowIndex = row.getAttribute('data-index'); - - const columns = Array.from(row.querySelectorAll('vn-td')); - - const fieldIndex = columns.findIndex(column => column == col); - const fieldName = headerCols[fieldIndex].getAttribute('field'); - - const rowData = model.data[rowIndex]; - - const filter = {where: {}}; - filter['where'][fieldName] = rowData[fieldName]; - console.log(filter); - - model.addFilter(filter); - } - - excludeSelection($event, target) { - const model = this.$.model; - - const table = target.closest('.vn-table'); - const headerCols = table.querySelectorAll('vn-thead vn-th'); - - const row = target.closest('.vn-tr'); - const col = target.closest('vn-td'); - - const rowIndex = row.getAttribute('data-index'); - - const columns = Array.from(row.querySelectorAll('vn-td')); - - const fieldIndex = columns.findIndex(column => column == col); - const fieldName = headerCols[fieldIndex].getAttribute('field'); - - const rowData = model.data[rowIndex]; - - const filter = {where: {}}; - filter['where'][fieldName] = {neq: rowData[fieldName]}; - console.log(filter); - - model.addFilter(filter); - } - - removeFilter() { - this.$.model.removeFilter(); - } } ngModule.component('vnTicketIndex', { From 2a53d4bca5e7aa8f631497c54b4164c1f9ccffe3 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Mon, 8 Jun 2020 12:18:33 +0200 Subject: [PATCH 19/35] create hook in account --- back/models/account.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/back/models/account.js b/back/models/account.js index 28b426862..7cc196852 100644 --- a/back/models/account.js +++ b/back/models/account.js @@ -12,15 +12,13 @@ module.exports = Self => { message: `A client with that Web User name already exists` }); - Self.observe('before save', async function(ctx, next) { + Self.observe('before save', async function(ctx) { if (ctx.currentInstance && ctx.currentInstance.id && ctx.data && ctx.data.password) ctx.data.password = md5(ctx.data.password); - if (ctx.data && (ctx.data.name || ctx.data.active)) { + if (!ctx.isNewInstance && ctx.data && (ctx.data.name || ctx.data.active)) { let instance = JSON.parse(JSON.stringify(ctx.currentInstance)); let userId = ctx.options.accessToken.userId; - console.log('ctx.data', ctx.data); - console.log('ctx.currentInstance', ctx.currentInstance); let logRecord = { originFk: ctx.currentInstance.id, userFk: userId, @@ -31,8 +29,6 @@ module.exports = Self => { }; await Self.app.models.ClientLog.create(logRecord); } - - next(); }); Self.remoteMethod('getCurrentUserData', { From cc569769b039765c6467b73873d160738ceaa864 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Mon, 8 Jun 2020 12:48:23 +0200 Subject: [PATCH 20/35] fix client balance --- modules/client/front/balance/index/index.html | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/client/front/balance/index/index.html b/modules/client/front/balance/index/index.html index 7144c8b29..1ad7efad9 100644 --- a/modules/client/front/balance/index/index.html +++ b/modules/client/front/balance/index/index.html @@ -72,13 +72,20 @@ - - {{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }} - +
+ + {{'BILL' | translate: {ref: balance.ref} }} + + + {{::balance.ref}} + +
{{::balance.bankFk}} {{::balance.debit | currency: 'EUR':2}} From ba9a44dec1b9f0855c0cf30239fa206f8816c77e Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 8 Jun 2020 13:06:33 +0200 Subject: [PATCH 21/35] Updated back unit test --- modules/ticket/back/methods/ticket/filter.js | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index f191247cf..5f3332173 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -138,22 +138,22 @@ module.exports = Self => { switch (param) { case 'search': return /^\d+$/.test(value) - ? {'t.id': {inq: value}} - : {'t.nickname': {like: `%${value}%`}}; + ? {'id': {inq: value}} + : {'nickname': {like: `%${value}%`}}; case 'from': - return {'t.shipped': {gte: value}}; + return {'shipped': {gte: value}}; case 'to': - return {'t.shipped': {lte: value}}; + return {'shipped': {lte: value}}; case 'nickname': - return {'t.nickname': {like: `%${value}%`}}; + return {'nickname': {like: `%${value}%`}}; case 'refFk': - return {'t.refFk': value}; + return {'refFk': value}; case 'salesPersonFk': - return {'c.salesPersonFk': value}; + return {'salesPersonFk': value}; case 'provinceFk': - return {'a.provinceFk': value}; + return {'provinceFk': value}; case 'stateFk': - return {'ts.stateFk': value}; + return {'stateFk': value}; case 'mine': case 'myTeam': return {'c.salesPersonFk': {inq: teamIds}}; @@ -162,13 +162,13 @@ module.exports = Self => { case 'pending': if (value) { return {and: [ - {'st.alertLevel': 0}, - {'st.code': {neq: 'OK'}}, - {'st.code': {neq: 'BOARDING'}} + {'alertLevel': 0}, + {'alertLevelCode': {neq: 'OK'}}, + {'alertLevelCode': {neq: 'BOARDING'}} ]}; } else { return {and: [ - {'st.alertLevel': {gt: 0}} + {'alertLevel': {gt: 0}} ]}; } case 'id': From cda6e3762042fd2da538af785c8306aae6040d91 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 8 Jun 2020 13:07:34 +0200 Subject: [PATCH 22/35] Removed console.log --- modules/zone/front/descriptor/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/zone/front/descriptor/index.js b/modules/zone/front/descriptor/index.js index 4b51c8011..288267bfe 100644 --- a/modules/zone/front/descriptor/index.js +++ b/modules/zone/front/descriptor/index.js @@ -19,7 +19,6 @@ class Controller extends Descriptor { const ticketsAmount = res.data.length; if (ticketsAmount) { const params = {ticketsAmount}; - console.log('ticketsAmount', res.data); const question = $t('This zone contains tickets', params, null, null, 'sanitizeParameters'); this.$.deleteZone.question = question; this.$.deleteZone.show(); From 6883303bb1101917549814294448e4befc3377be Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 8 Jun 2020 13:15:48 +0200 Subject: [PATCH 23/35] Added scss file --- front/core/components/contextmenu/index.html | 2 +- front/core/components/contextmenu/index.js | 2 ++ front/core/components/contextmenu/style.scss | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 front/core/components/contextmenu/style.scss diff --git a/front/core/components/contextmenu/index.html b/front/core/components/contextmenu/index.html index 7e7cae138..600a5ca03 100644 --- a/front/core/components/contextmenu/index.html +++ b/front/core/components/contextmenu/index.html @@ -1,4 +1,4 @@ -
+
diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index 5f8a165a5..061d4cf09 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -1,4 +1,6 @@ import ngModule from '../../module'; +import './style.scss'; + export default class Contextmenu { constructor($element, $, $transclude) { this.$element = $element; diff --git a/front/core/components/contextmenu/style.scss b/front/core/components/contextmenu/style.scss new file mode 100644 index 000000000..eac46554e --- /dev/null +++ b/front/core/components/contextmenu/style.scss @@ -0,0 +1,3 @@ +section[vn-id="contextmenu"] { + position: absolute +} \ No newline at end of file From 05b5c452a991c4a6db10f222bb1ddb27e0965b37 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 8 Jun 2020 13:17:18 +0200 Subject: [PATCH 24/35] Removed attribute --- modules/ticket/front/index/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index ee6e53a12..07857c381 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -30,7 +30,7 @@ -
From 294021391d0b5ee97f85c670fb93924186816dee Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Tue, 9 Jun 2020 08:32:57 +0200 Subject: [PATCH 25/35] fix travel descritor --- modules/travel/front/descriptor/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/travel/front/descriptor/index.html b/modules/travel/front/descriptor/index.html index 3e3ef5cdd..a3e77f6d1 100644 --- a/modules/travel/front/descriptor/index.html +++ b/modules/travel/front/descriptor/index.html @@ -5,11 +5,11 @@
+ value="{{$ctrl.travel.warehouseIn.name}}"> + value="{{$ctrl.travel.warehouseOut.name}}"> Date: Tue, 9 Jun 2020 12:16:40 +0200 Subject: [PATCH 26/35] Contextmenu fixes --- front/core/components/contextmenu/index.js | 73 +++++++++++++++++--- modules/ticket/back/methods/ticket/filter.js | 32 ++++----- modules/ticket/front/index/index.html | 11 ++- modules/ticket/front/index/index.js | 32 +++++++++ modules/ticket/front/index/locale/es.yml | 3 +- 5 files changed, 122 insertions(+), 29 deletions(-) diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index 061d4cf09..b931c9539 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -1,4 +1,5 @@ import ngModule from '../../module'; +import {buildFilter} from 'vn-loopback/util/filter'; import './style.scss'; export default class Contextmenu { @@ -137,27 +138,80 @@ export default class Contextmenu { * Filter by current field selection */ filterBySelection() { - const filter = {where: {}}; - filter['where'][this.fieldName] = this.fieldValue; + let where = {[this.fieldName]: this.fieldValue}; + if (this.exprBuilder) { + where = buildFilter(where, (param, value) => + this.exprBuilder({param, value}) + ); + } - this.model.addFilter(filter); + this.model.addFilter({where}); } /** * Exclude by current field selection */ excludeSelection() { - const filter = {where: {}}; - filter['where'][this.fieldName] = {neq: this.fieldValue}; + let where = {[this.fieldName]: {neq: this.fieldValue}}; + if (this.exprBuilder) { + where = buildFilter(where, (param, value) => + this.exprBuilder({param, value}) + ); + } + console.log(where); - this.model.addFilter(filter); + this.model.addFilter({where}); + } + + removeFilter() { + const userFilter = this.model.userFilter; + const userParams = this.model.userParams; + const where = userFilter.where; + + let filterKey = this.fieldName; + if (this.exprBuilder) { + const param = this.exprBuilder({ + param: filterKey, + value: null + }); + [filterKey] = Object.keys(param); + } + + const whereKeys = Object.keys(where); + for (let key of whereKeys) + removeProp(where, filterKey, key); + + function removeProp(instance, findProp, prop) { + if (prop == findProp) + delete instance[prop]; + + if (prop === 'and') { + for (let [index, param] of instance[prop].entries()) { + if (param === undefined) + console.log('param undefined'); + + const [key] = Object.keys(param); + if (key == findProp) + instance[prop].splice(index, 1); + + if (instance[prop] instanceof Array) { + if (!instance[prop][index]) return; + const [firstKey] = Object.keys(instance[prop][index]); + removeProp(instance[prop][index], filterKey, firstKey); + } + } + } + } + + this.model.applyFilter(userFilter, userParams); } /** * Removes all applied filters */ - removeFilter() { - this.model.removeFilter(); + removeAllFilters() { + const userParams = this.model.userParams; + this.model.applyFilter(null, userParams); } } @@ -168,7 +222,8 @@ ngModule.vnComponent('vnContextmenu', { template: require('./index.html'), bindings: { targets: ' { switch (param) { case 'search': return /^\d+$/.test(value) - ? {'id': {inq: value}} - : {'nickname': {like: `%${value}%`}}; + ? {'t.id': {inq: value}} + : {'t.nickname': {like: `%${value}%`}}; case 'from': - return {'shipped': {gte: value}}; + return {'t.shipped': {gte: value}}; case 'to': - return {'shipped': {lte: value}}; + return {'t.shipped': {lte: value}}; case 'nickname': - return {'nickname': {like: `%${value}%`}}; + return {'t.nickname': {like: `%${value}%`}}; case 'refFk': - return {'refFk': value}; + return {'t.refFk': value}; case 'salesPersonFk': - return {'salesPersonFk': value}; + return {'c.salesPersonFk': value}; case 'provinceFk': - return {'provinceFk': value}; + return {'a.provinceFk': value}; case 'stateFk': - return {'stateFk': value}; + return {'ts.stateFk': value}; case 'mine': case 'myTeam': return {'c.salesPersonFk': {inq: teamIds}}; @@ -162,13 +162,13 @@ module.exports = Self => { case 'pending': if (value) { return {and: [ - {'alertLevel': 0}, - {'alertLevelCode': {neq: 'OK'}}, - {'alertLevelCode': {neq: 'BOARDING'}} + {'st.alertLevel': 0}, + {'st.code': {neq: 'OK'}}, + {'st.code': {neq: 'BOARDING'}} ]}; } else { return {and: [ - {'alertLevel': {gt: 0}} + {'st.alertLevel': {gt: 0}} ]}; } case 'id': @@ -190,7 +190,6 @@ module.exports = Self => { `CREATE TEMPORARY TABLE tmp.filter (INDEX (id)) ENGINE = MEMORY - SELECT * FROM ( SELECT t.id, t.shipped, @@ -214,7 +213,8 @@ module.exports = Self => { c.salesPersonFk, z.hour zoneLanding, HOUR(z.hour) zoneHour, - MINUTE(z.hour) zoneMinute + MINUTE(z.hour) zoneMinute, + CAST(z.hour AS CHAR) AS hour FROM ticket t LEFT JOIN zone z ON z.id = t.zoneFk LEFT JOIN address a ON a.id = t.addressFk @@ -225,7 +225,7 @@ module.exports = Self => { LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.userFk) t`); + LEFT JOIN account.user u ON u.id = wk.userFk`); if (args.orderFk) { stmt.merge({ diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index 07857c381..d7349e5e9 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -16,7 +16,7 @@ Id Salesperson - Date + Date Hour Alias Province @@ -24,7 +24,7 @@ Agency Warehouse Invoice - Closure + Closure Total @@ -151,7 +151,8 @@ - + Remove filter + + Remove all filters + \ No newline at end of file diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index 59e5d949d..a47b0acc9 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -92,6 +92,38 @@ export default class Controller extends Section { this.selectedTicket = ticket; this.$.summary.show(); } + + exprBuilder(param, value) { + switch (param) { + case 'stateFk': + return {'ts.stateFk': value}; + case 'salesPersonFk': + return {'c.salesPersonFk': value}; + case 'provinceFk': + return {'a.provinceFk': value}; + case 'hour': + return {'z.hour': value}; + case 'shipped': + return {'t.shipped': { + between: this.dateRange(value)} + }; + case 'id': + case 'refFk': + case 'nickname': + case 'agencyModeFk': + case 'warehouseFk': + return {[`t.${param}`]: value}; + } + } + + dateRange(value) { + const minHour = new Date(value); + minHour.setHours(0, 0, 0, 0); + const maxHour = new Date(value); + maxHour.setHours(23, 59, 59, 59); + + return [minHour, maxHour]; + } } ngModule.component('vnTicketIndex', { diff --git a/modules/ticket/front/index/locale/es.yml b/modules/ticket/front/index/locale/es.yml index acc8adc80..10eaba350 100644 --- a/modules/ticket/front/index/locale/es.yml +++ b/modules/ticket/front/index/locale/es.yml @@ -6,4 +6,5 @@ Closure: Cierre You cannot make a payment on account from multiple clients: No puedes realizar un pago a cuenta de clientes diferentes Filter by selection: Filtro por selección Exclude selection: Excluir selección -Remove filter: Eliminar filtro \ No newline at end of file +Remove filter: Quitar filtro por selección +Remove all filters: Eliminar todos los filtros \ No newline at end of file From ab776fc6526a8fc556642218f58ca360380bddc5 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 9 Jun 2020 12:43:14 +0200 Subject: [PATCH 27/35] Fixed remove filter --- front/core/components/contextmenu/index.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js index b931c9539..90c14b7e3 100755 --- a/front/core/components/contextmenu/index.js +++ b/front/core/components/contextmenu/index.js @@ -158,7 +158,6 @@ export default class Contextmenu { this.exprBuilder({param, value}) ); } - console.log(where); this.model.addFilter({where}); } @@ -187,18 +186,12 @@ export default class Contextmenu { if (prop === 'and') { for (let [index, param] of instance[prop].entries()) { - if (param === undefined) - console.log('param undefined'); - const [key] = Object.keys(param); if (key == findProp) instance[prop].splice(index, 1); - if (instance[prop] instanceof Array) { - if (!instance[prop][index]) return; - const [firstKey] = Object.keys(instance[prop][index]); - removeProp(instance[prop][index], filterKey, firstKey); - } + if (param[key] instanceof Array) + removeProp(param, filterKey, key); } } } From 4b262dc3ccf5621a3ce904519a221228f0755488 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 9 Jun 2020 13:18:29 +0200 Subject: [PATCH 28/35] Disabled contextmenu option --- modules/ticket/front/index/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index d7349e5e9..f75e9d9f7 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -165,6 +165,7 @@ Exclude selection Remove filter From 3cfb8b4730345399d67ac335323ea8517b98da34 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 10 Jun 2020 12:13:07 +0200 Subject: [PATCH 29/35] 2323 - Filter by myTeam fix --- modules/ticket/back/methods/ticket/filter.js | 43 +++++++++----------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 51979cf11..28de7b8ee 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -100,34 +100,27 @@ module.exports = Self => { }); Self.filter = async(ctx, filter) => { + const userId = ctx.req.accessToken.userId; const conn = Self.dataSource.connector; + const models = Self.app.models; const args = ctx.args; - let worker = await Self.app.models.Worker.findOne({ - where: {userFk: ctx.req.accessToken.userId}, - include: [ - {relation: 'collegues'} - ] - }); - - let teamIds = []; - - if (worker.collegues().length && args.myTeam) { - worker.collegues().forEach(collegue => { - teamIds.push(collegue.collegueFk); + // Apply filter by team + const teamMembersId = []; + if (args.myTeam != null) { + const worker = await models.Worker.findById(userId, { + include: { + relation: 'collegues' + } }); - } - - if (args.mine || (worker.collegues().length === 0 && args.myTeam)) { - worker = await Self.app.models.Worker.findOne({ - fields: ['id'], - where: {userFk: ctx.req.accessToken.userId} + const collegues = worker.collegues() || []; + collegues.forEach(collegue => { + teamMembersId.push(collegue.collegueFk); }); - teamIds = [worker && worker.id]; - } - if (ctx.args && (args.mine || args.myTeam)) - args.teamIds = teamIds; + if (teamMembersId.length == 0) + teamMembersId.push(userId); + } if (ctx.args && args.to) { const dateTo = args.to; @@ -156,7 +149,11 @@ module.exports = Self => { return {'ts.stateFk': value}; case 'mine': case 'myTeam': - return {'c.salesPersonFk': {inq: teamIds}}; + if (value) + return {'c.salesPersonFk': {inq: teamMembersId}}; + else + return {'c.salesPersonFk': {nin: teamMembersId}}; + case 'alertLevel': return {'ts.alertLevel': value}; case 'pending': From 4b1e79a43399e3f94a4ab1cfb5269a822f89d64c Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 10 Jun 2020 13:50:03 +0200 Subject: [PATCH 30/35] 2314 server side unit test fixed --- .../ticket/back/methods/ticket/setDeleted.js | 30 +-- .../methods/ticket/specs/setDeleted.spec.js | 183 ++++++------------ 2 files changed, 75 insertions(+), 138 deletions(-) diff --git a/modules/ticket/back/methods/ticket/setDeleted.js b/modules/ticket/back/methods/ticket/setDeleted.js index 06e443e94..fe244becd 100644 --- a/modules/ticket/back/methods/ticket/setDeleted.js +++ b/modules/ticket/back/methods/ticket/setDeleted.js @@ -43,18 +43,6 @@ module.exports = Self => { if (hasItemShelvingSales && !isSalesAssistant) throw new UserError(`You cannot delete a ticket that part of it is being prepared`); - if (hasItemShelvingSales && isSalesAssistant) { - const promises = []; - for (let sale of sales) { - if (sale.itemShelvingSale()) { - const itemShelvingSale = sale.itemShelvingSale(); - const destroyedShelving = models.ItemShelvingSale.destroyById(itemShelvingSale.id); - promises.push(destroyedShelving); - } - } - await Promise.all(promises); - } - // Check for existing claim const claimOfATicket = await models.Claim.findOne({where: {ticketFk: id}}); if (claimOfATicket) @@ -69,10 +57,23 @@ module.exports = Self => { if (hasPurchaseRequests) throw new UserError('You must delete all the buy requests first'); + // removes item shelvings + if (hasItemShelvingSales && isSalesAssistant) { + const promises = []; + for (let sale of sales) { + if (sale.itemShelvingSale()) { + const itemShelvingSale = sale.itemShelvingSale(); + const destroyedShelving = models.ItemShelvingSale.destroyById(itemShelvingSale.id); + promises.push(destroyedShelving); + } + } + await Promise.all(promises); + } + // Remove ticket greuges const ticketGreuges = await models.Greuge.find({where: {ticketFk: id}}); const ownGreuges = ticketGreuges.every(greuge => { - return greuge.ticketFk = id; + return greuge.ticketFk == id; }); if (ownGreuges) { for (const greuge of ticketGreuges) { @@ -104,7 +105,7 @@ module.exports = Self => { }] }); - // Change state to "fixing" if contains an stowaway + // Change state to "fixing" if contains an stowaway and removed the link between them let otherTicketId; if (ticket.stowaway()) otherTicketId = ticket.stowaway().shipFk; @@ -112,6 +113,7 @@ module.exports = Self => { otherTicketId = ticket.ship().id; if (otherTicketId) { + await models.Ticket.deleteStowaway(ctx, otherTicketId); await models.TicketTracking.changeState(ctx, { ticketFk: otherTicketId, code: 'FIXING' diff --git a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js index 7965b508c..0a73ad322 100644 --- a/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js +++ b/modules/ticket/back/methods/ticket/specs/setDeleted.spec.js @@ -1,116 +1,7 @@ const app = require('vn-loopback/server/server'); const models = app.models; -// 2301 Failing tests -xdescribe('ticket deleted()', () => { - let ticket; - let sale; - let deletedClaim; - - beforeAll(async done => { - let originalTicket = await models.Ticket.findOne({where: {id: 16}}); - originalTicket.id = null; - ticket = await models.Ticket.create(originalTicket); - sale = await models.Sale.create({ - ticketFk: ticket.id, - itemFk: 4, - concept: 'Melee weapon', - quantity: 10 - }); - - await models.ItemShelvingSale.create({ - itemShelvingFk: 1, - saleFk: sale.id, - quantity: 10, - userFk: 106 - }); - - done(); - }); - - afterAll(async done => { - const ticketId = 16; - const stowawayTicketId = 17; - const ctx = { - req: { - accessToken: {userId: 106}, - headers: { - origin: 'http://localhost:5000' - }, - __: () => {} - } - }; - await models.Ticket.destroyById(ticket.id); - const stowaway = await models.Stowaway.findOne({ - where: { - id: stowawayTicketId, - shipFk: ticketId - } - }); - await stowaway.destroy(); - await models.Claim.create(deletedClaim); - await models.TicketTracking.changeState(ctx, { - ticketFk: ticketId, - code: 'OK' - }); - await models.TicketTracking.changeState(ctx, { - ticketFk: stowawayTicketId, - code: 'OK' - }); - const orgTicket = await models.Ticket.findById(ticketId); - await orgTicket.updateAttribute('isDeleted', false); - done(); - }); - - it('should make sure the ticket is not deleted yet', async() => { - expect(ticket.isDeleted).toEqual(false); - }); - - it('should make sure the ticket sale has an item shelving', async() => { - const sales = await models.Sale.find({ - include: {relation: 'itemShelvingSale'}, - where: {ticketFk: ticket.id} - }); - const hasItemShelvingSales = sales.some(sale => { - return sale.itemShelvingSale(); - }); - - expect(hasItemShelvingSales).toEqual(true); - }); - - it('should set a ticket to deleted and remove all item shelvings', async() => { - const salesAssistantId = 21; - const ctx = { - req: { - accessToken: {userId: salesAssistantId}, - headers: { - origin: 'http://localhost:5000' - }, - __: () => {} - } - }; - await app.models.Ticket.setDeleted(ctx, ticket.id); - - let deletedTicket = await app.models.Ticket.findOne({ - where: {id: ticket.id}, - fields: ['isDeleted'] - }); - - expect(deletedTicket.isDeleted).toEqual(true); - }); - - it('should not have any item shelving', async() => { - const sales = await models.Sale.find({ - include: {relation: 'itemShelvingSale'}, - where: {ticketFk: ticket.id} - }); - const hasItemShelvingSales = sales.some(sale => { - return sale.itemShelvingSale(); - }); - - expect(hasItemShelvingSales).toEqual(false); - }); - +describe('ticket setDeleted()', () => { it('should throw an error if the given ticket has a claim', async() => { const ticketId = 16; const ctx = { @@ -134,13 +25,11 @@ xdescribe('ticket deleted()', () => { expect(error.message).toEqual('You must delete the claim id %d first'); }); - it('should delete the ticket and change the state to "FIXING" to the stowaway ticket', async() => { - const ticketId = 16; - const claimIdToRemove = 2; - const stowawayTicketId = 17; + it('should delete the ticket, remove the stowaway link and change the stowaway ticket state to "FIXING" and get ride of the itemshelving', async() => { + const employeeUser = 110; const ctx = { req: { - accessToken: {userId: 106}, + accessToken: {userId: employeeUser}, headers: { origin: 'http://localhost:5000' }, @@ -148,20 +37,66 @@ xdescribe('ticket deleted()', () => { } }; - await app.models.Stowaway.rawSql(` - INSERT INTO vn.stowaway(id, shipFk) - VALUES (?, ?)`, [stowawayTicketId, ticketId]); + let sampleTicket = await models.Ticket.findById(12); + let sampleStowaway = await models.Ticket.findById(13); - deletedClaim = await app.models.Claim.findById(claimIdToRemove); - await app.models.Claim.destroyById(claimIdToRemove); - await app.models.Ticket.setDeleted(ctx, ticketId); + sampleTicket.id = undefined; + let shipTicket = await models.Ticket.create(sampleTicket); - const stowawayTicket = await app.models.TicketState.findOne({ + sampleStowaway.id = undefined; + let stowawayTicket = await models.Ticket.create(sampleStowaway); + + await models.Stowaway.rawSql(` + INSERT INTO vn.stowaway(id, shipFk) + VALUES (?, ?)`, [stowawayTicket.id, shipTicket.id]); + + const boardingState = await models.State.findOne({ where: { - ticketFk: stowawayTicketId + code: 'BOARDING' + } + }); + await models.TicketTracking.create({ + ticketFk: stowawayTicket.id, + stateFk: boardingState.id, + workerFk: ctx.req.accessToken.userId + }); + + const okState = await models.State.findOne({ + where: { + code: 'OK' + } + }); + await models.TicketTracking.create({ + ticketFk: shipTicket.id, + stateFk: okState.id, + workerFk: ctx.req.accessToken.userId + }); + + let stowawayTicketState = await models.TicketState.findOne({ + where: { + ticketFk: stowawayTicket.id } }); - expect(stowawayTicket.code).toEqual('FIXING'); + let stowaway = await models.Stowaway.findById(shipTicket.id); + + expect(stowaway).toBeDefined(); + expect(stowawayTicketState.code).toEqual('BOARDING'); + + await models.Ticket.setDeleted(ctx, shipTicket.id); + + stowawayTicketState = await models.TicketState.findOne({ + where: { + ticketFk: stowawayTicket.id + } + }); + + stowaway = await models.Stowaway.findById(shipTicket.id); + + expect(stowaway).toBeNull(); + expect(stowawayTicketState.code).toEqual('FIXING'); + + await shipTicket.destroy(); + await stowawayTicket.destroy(); }); }); From 461fec7e64999d60d89e9d9d9529ba8e77d36d4d Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 10 Jun 2020 13:57:08 +0200 Subject: [PATCH 31/35] Updated unit test --- .../back/methods/ticket/specs/filter.spec.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js index faaeb82c0..7f744ba58 100644 --- a/modules/ticket/back/methods/ticket/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js @@ -1,6 +1,6 @@ const app = require('vn-loopback/server/server'); -describe('ticket filter()', () => { +fdescribe('ticket filter()', () => { it('should return the tickets matching the filter', async() => { const ctx = {req: {accessToken: {userId: 9}}, args: {}}; const filter = {order: 'id DESC'}; @@ -71,4 +71,20 @@ describe('ticket filter()', () => { expect(secondRow.state).toEqual('Entregado'); expect(thirdRow.state).toEqual('Entregado'); }); + + it('should return the tickets from the worker team', async() => { + const ctx = {req: {accessToken: {userId: 9}}, args: {myTeam: true}}; + const filter = {}; + const result = await app.models.Ticket.filter(ctx, filter); + + expect(result.length).toEqual(17); + }); + + it('should return the tickets that are not from the worker team', async() => { + const ctx = {req: {accessToken: {userId: 9}}, args: {myTeam: false}}; + const filter = {}; + const result = await app.models.Ticket.filter(ctx, filter); + + expect(result.length).toEqual(7); + }); }); From 5edfc59d97db84adc5f912a0da8af8c186e822cf Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 10 Jun 2020 13:57:32 +0200 Subject: [PATCH 32/35] Updated unit test --- modules/ticket/back/methods/ticket/specs/filter.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js index 7f744ba58..56d351f2e 100644 --- a/modules/ticket/back/methods/ticket/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js @@ -1,6 +1,6 @@ const app = require('vn-loopback/server/server'); -fdescribe('ticket filter()', () => { +describe('ticket filter()', () => { it('should return the tickets matching the filter', async() => { const ctx = {req: {accessToken: {userId: 9}}, args: {}}; const filter = {order: 'id DESC'}; From 54845da836d5c56784beb9ef6f6a6bd330b2ca93 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 10 Jun 2020 16:51:04 +0200 Subject: [PATCH 33/35] e2e isDeleted --- e2e/helpers/selectors.js | 5 +- e2e/paths/05-ticket/14_create_ticket.spec.js | 59 ++++++++++++++++++-- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 5cd24cda5..98236c8d5 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -10,7 +10,7 @@ export default { ticketsButton: '.modules-menu [ui-sref="ticket.index"]', invoiceOutButton: '.modules-menu [ui-sref="invoiceOut.index"]', claimsButton: '.modules-menu [ui-sref="claim.index"]', - returnToModuleIndexButton: 'a[ui-sref="order.index"]', + returnToModuleIndexButton: 'a[name="goToModuleIndex"]', homeButton: 'vn-topbar > div.side.start > a', userLocalWarehouse: '.user-popover vn-autocomplete[ng-model="$ctrl.localWarehouseFk"]', userLocalBank: '.user-popover vn-autocomplete[ng-model="$ctrl.localBankFk"]', @@ -365,7 +365,8 @@ export default { firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)', firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)', invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(7) > section > span', - setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button' + setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button', + returnToIndexButton: '' }, ticketsIndex: { openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js index 4ce2e5156..f377e9e39 100644 --- a/e2e/paths/05-ticket/14_create_ticket.spec.js +++ b/e2e/paths/05-ticket/14_create_ticket.spec.js @@ -4,6 +4,9 @@ import getBrowser from '../../helpers/puppeteer'; describe('Ticket create path', () => { let browser; let page; + let nextMonth = new Date(); + nextMonth.setMonth(nextMonth.getMonth() + 1); + let stowawayTicketId; beforeAll(async() => { browser = await getBrowser(); @@ -21,13 +24,9 @@ describe('Ticket create path', () => { }); it('should succeed to create a ticket', async() => { - const nextMonth = new Date(); - nextMonth.setMonth(nextMonth.getMonth() + 1); - - await page.autocompleteSearch(selectors.createTicketView.client, 'Tony Stark'); - await page.autocompleteSearch(selectors.createTicketView.address, 'Tony Stark'); + await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent'); await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth); - await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse One'); + await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse Two'); await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247'); await page.waitToClick(selectors.createTicketView.createButton); const message = await page.waitForSnackbar(); @@ -37,5 +36,53 @@ describe('Ticket create path', () => { it('should check the url is now the summary of the ticket', async() => { await page.waitForState('ticket.card.summary'); + stowawayTicketId = await page.waitToGetProperty('vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div', 'innerText'); + stowawayTicketId = stowawayTicketId.substring(1); + }); + + it('should again open the new ticket form', async() => { + await page.waitToClick(selectors.globalItems.returnToModuleIndexButton); + await page.waitToClick(selectors.ticketsIndex.newTicketButton); + await page.waitForState('ticket.create'); + }); + + it('should succeed to create another ticket for the same client', async() => { + await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent'); + await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth); + await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse One'); + await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247'); + await page.waitToClick(selectors.createTicketView.createButton); + const message = await page.waitForSnackbar(); + + expect(message.type).toBe('success'); + }); + + it('should check the url is now the summary of the created ticket', async() => { + await page.waitForState('ticket.card.summary'); + }); + + it('should make the previously created ticket the stowaway of the current ticket', async() => { + await page.waitToClick(selectors.ticketDescriptor.moreMenu); + await page.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway); + await page.waitToClick(selectors.ticketDescriptor.addStowawayDialogFirstTicket); + const message = await page.waitForSnackbar(); + + expect(message.type).toBe('success'); + }); + + it('should delete the current ticket', async() => { + await page.waitToClick(selectors.ticketDescriptor.moreMenu); + await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket); + await page.waitToClick(selectors.ticketDescriptor.acceptDeleteButton); + const message = await page.waitForSnackbar(); + + expect(message.type).toBe('success'); + }); + + it('should search for the stowaway ticket of the previously deleted ticket', async() => { + await page.accessToSearchResult(stowawayTicketId); + const result = await page.countElement(selectors.ticketDescriptor.shipButton); + + expect(result).toBe(0); }); }); From 1d591c7ddd746d25c77028ce910c7440aa0369c7 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Thu, 11 Jun 2020 09:00:50 +0200 Subject: [PATCH 34/35] removed unused selector --- e2e/helpers/selectors.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 98236c8d5..c89be697b 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -365,8 +365,7 @@ export default { firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)', firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)', invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(7) > section > span', - setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button', - returnToIndexButton: '' + setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button' }, ticketsIndex: { openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', From fadf36da69566f5ca86874a1d9e4b54158fb42b6 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Thu, 11 Jun 2020 09:20:44 +0200 Subject: [PATCH 35/35] added a css selector to selectors --- e2e/helpers/selectors.js | 3 ++- e2e/paths/05-ticket/14_create_ticket.spec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c89be697b..98533b8c3 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -365,7 +365,8 @@ export default { firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)', firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)', invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(7) > section > span', - setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button' + setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button', + descriptorTicketId: 'vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div' }, ticketsIndex: { openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js index f377e9e39..26c22ad3d 100644 --- a/e2e/paths/05-ticket/14_create_ticket.spec.js +++ b/e2e/paths/05-ticket/14_create_ticket.spec.js @@ -36,7 +36,7 @@ describe('Ticket create path', () => { it('should check the url is now the summary of the ticket', async() => { await page.waitForState('ticket.card.summary'); - stowawayTicketId = await page.waitToGetProperty('vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div', 'innerText'); + stowawayTicketId = await page.waitToGetProperty(selectors.ticketSummary.descriptorTicketId, 'innerText'); stowawayTicketId = stowawayTicketId.substring(1); });