From e17eddf496c41c5bc5e7870b30f1df1ddfdee2ce Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 21 Dec 2018 13:40:08 +0100 Subject: [PATCH] # 814 Separated service modules from services --- .eslintrc.yml | 2 ++ services/loopback/server/server.js | 12 ++++++------ .../server => modules/agency}/model-config.json | 0 .../agency}/models/zone-calendar.json | 0 .../common => modules/agency}/models/zone-geo.json | 0 .../agency}/models/zone-included.json | 0 .../{agency/common => modules/agency}/models/zone.js | 0 .../common => modules/agency}/models/zone.json | 0 .../claim}/methods/claim-end/importTicketSales.js | 0 .../claim-end/specs/importTicketSales.spec.js | 0 .../server => modules/claim}/model-config.json | 0 .../claim}/models/claim-development.json | 0 .../common => modules/claim}/models/claim-end.js | 0 .../common => modules/claim}/models/claim-end.json | 0 .../claim}/models/claim-reason.json | 0 .../claim}/models/claim-redelivery.json | 0 .../claim}/models/claim-responsible.json | 0 .../claim}/models/claim-result.json | 0 .../common => modules/claim}/models/claim-state.json | 0 .../credit-classification/createWithInsurance.js | 0 .../createWithInsurance.spec.js | 0 .../client}/methods/greuge/specs/sumAmount.spec.js | 0 .../client}/methods/greuge/sumAmount.js | 0 .../client}/methods/receipt/filter.js | 0 .../client}/methods/receipt/specs/filter.spec.js | 0 .../client}/methods/recovery/hasActiveRecovery.js | 0 .../server => modules/client}/model-config.json | 0 .../client}/models/address-observation.js | 0 .../client}/models/address-observation.json | 0 .../client}/models/bank-entity.json | 0 .../client}/models/client-contact.js | 0 .../client}/models/client-contact.json | 0 .../client}/models/client-credit.json | 0 .../client}/models/client-observation.js | 0 .../client}/models/client-observation.json | 0 .../client}/models/client-risk.json | 0 .../client}/models/client-sample.js | 0 .../client}/models/client-sample.json | 0 .../client}/models/credit-classification.js | 0 .../client}/models/credit-classification.json | 0 .../client}/models/credit-insurance.js | 0 .../client}/models/credit-insurance.json | 0 .../common => modules/client}/models/defaulter.json | 0 .../client}/models/greuge-type.json | 0 .../common => modules/client}/models/greuge.js | 0 .../common => modules/client}/models/greuge.json | 0 .../client}/models/invoice-out.json | 0 .../client}/models/mandate-type.json | 0 .../common => modules/client}/models/mandate.json | 0 .../client}/models/observation-type.json | 0 .../common => modules/client}/models/receipt.js | 0 .../common => modules/client}/models/receipt.json | 0 .../common => modules/client}/models/recovery.js | 0 .../common => modules/client}/models/recovery.json | 0 .../common => modules/client}/models/sample.json | 0 .../common => modules/client}/models/tpv-error.json | 0 .../client}/models/tpv-merchant.json | 0 .../client}/models/tpv-response.json | 0 .../{item/server => modules/item}/model-config.json | 0 .../{item/common => modules/item}/models/genus.json | 0 .../common => modules/item}/models/item-barcode.js | 0 .../common => modules/item}/models/item-barcode.json | 0 .../item}/models/item-botanical.json | 0 .../common => modules/item}/models/item-log.json | 0 .../common => modules/item}/models/item-niche.js | 0 .../common => modules/item}/models/item-niche.json | 0 .../item}/models/item-placement.json | 0 .../common => modules/item}/models/itemTypeTag.json | 0 .../{item/common => modules/item}/models/specie.json | 0 .../order}/methods/order-row/addToOrder.js | 0 .../order}/methods/order-row/removes.js | 0 .../methods/order-row/specs/addToOrder.spec.js | 0 .../order}/methods/order-row/specs/removes.spec.js | 0 .../server => modules/order}/model-config.json | 0 .../common => modules/order}/models/order-row.js | 0 .../common => modules/order}/models/order-row.json | 0 .../server => modules/route}/model-config.json | 0 .../common => modules/route}/models/delivery.json | 0 .../common => modules/route}/models/vehicle.json | 0 .../ticket}/methods/expedition/filter.js | 0 .../ticket}/methods/packaging/listPackaging.js | 0 .../methods/packaging/specs/listPackaging.spec.js | 0 .../methods/sale-tracking/listSaleTracking.js | 0 .../sale-tracking/specs/listSaleTracking.spec.js | 0 .../server => modules/ticket}/model-config.json | 0 .../ticket}/models/annual-average-invoiced.json | 0 .../ticket}/models/component-rate.json | 0 .../ticket}/models/component-type-rate.json | 0 .../common => modules/ticket}/models/expedition.js | 0 .../common => modules/ticket}/models/expedition.json | 0 .../common => modules/ticket}/models/packaging.js | 0 .../common => modules/ticket}/models/packaging.json | 0 .../ticket}/models/sale-checked.json | 0 .../ticket}/models/sale-component.json | 0 .../ticket}/models/sale-tracking.js | 0 .../ticket}/models/sale-tracking.json | 0 .../ticket}/models/specs/ticket-packaging.spec.js | 0 .../ticket}/models/ticket-packaging.js | 0 .../ticket}/models/ticket-packaging.json | 0 .../ticket}/models/ticket-update-action.json | 0 .../ticket}/models/ticket-weekly.json | 0 .../server => modules/travel}/model-config.json | 0 .../common => modules/travel}/models/travel.json | 0 services/order/common/locale/es.json | 3 --- services/travel/common/locale/es.json | 1 - services_tests.js | 2 +- 106 files changed, 9 insertions(+), 11 deletions(-) rename services/{agency/server => modules/agency}/model-config.json (100%) rename services/{agency/common => modules/agency}/models/zone-calendar.json (100%) rename services/{agency/common => modules/agency}/models/zone-geo.json (100%) rename services/{agency/common => modules/agency}/models/zone-included.json (100%) rename services/{agency/common => modules/agency}/models/zone.js (100%) rename services/{agency/common => modules/agency}/models/zone.json (100%) rename services/{claim/common => modules/claim}/methods/claim-end/importTicketSales.js (100%) rename services/{claim/common => modules/claim}/methods/claim-end/specs/importTicketSales.spec.js (100%) rename services/{claim/server => modules/claim}/model-config.json (100%) rename services/{claim/common => modules/claim}/models/claim-development.json (100%) rename services/{claim/common => modules/claim}/models/claim-end.js (100%) rename services/{claim/common => modules/claim}/models/claim-end.json (100%) rename services/{claim/common => modules/claim}/models/claim-reason.json (100%) rename services/{claim/common => modules/claim}/models/claim-redelivery.json (100%) rename services/{claim/common => modules/claim}/models/claim-responsible.json (100%) rename services/{claim/common => modules/claim}/models/claim-result.json (100%) rename services/{claim/common => modules/claim}/models/claim-state.json (100%) rename services/{client/common => modules/client}/methods/credit-classification/createWithInsurance.js (100%) rename services/{client/common => modules/client}/methods/credit-classification/createWithInsurance.spec.js (100%) rename services/{client/common => modules/client}/methods/greuge/specs/sumAmount.spec.js (100%) rename services/{client/common => modules/client}/methods/greuge/sumAmount.js (100%) rename services/{client/common => modules/client}/methods/receipt/filter.js (100%) rename services/{client/common => modules/client}/methods/receipt/specs/filter.spec.js (100%) rename services/{client/common => modules/client}/methods/recovery/hasActiveRecovery.js (100%) rename services/{client/server => modules/client}/model-config.json (100%) rename services/{client/common => modules/client}/models/address-observation.js (100%) rename services/{client/common => modules/client}/models/address-observation.json (100%) rename services/{client/common => modules/client}/models/bank-entity.json (100%) rename services/{client/common => modules/client}/models/client-contact.js (100%) rename services/{client/common => modules/client}/models/client-contact.json (100%) rename services/{client/common => modules/client}/models/client-credit.json (100%) rename services/{client/common => modules/client}/models/client-observation.js (100%) rename services/{client/common => modules/client}/models/client-observation.json (100%) rename services/{client/common => modules/client}/models/client-risk.json (100%) rename services/{client/common => modules/client}/models/client-sample.js (100%) rename services/{client/common => modules/client}/models/client-sample.json (100%) rename services/{client/common => modules/client}/models/credit-classification.js (100%) rename services/{client/common => modules/client}/models/credit-classification.json (100%) rename services/{client/common => modules/client}/models/credit-insurance.js (100%) rename services/{client/common => modules/client}/models/credit-insurance.json (100%) rename services/{client/common => modules/client}/models/defaulter.json (100%) rename services/{client/common => modules/client}/models/greuge-type.json (100%) rename services/{client/common => modules/client}/models/greuge.js (100%) rename services/{client/common => modules/client}/models/greuge.json (100%) rename services/{client/common => modules/client}/models/invoice-out.json (100%) rename services/{client/common => modules/client}/models/mandate-type.json (100%) rename services/{client/common => modules/client}/models/mandate.json (100%) rename services/{client/common => modules/client}/models/observation-type.json (100%) rename services/{client/common => modules/client}/models/receipt.js (100%) rename services/{client/common => modules/client}/models/receipt.json (100%) rename services/{client/common => modules/client}/models/recovery.js (100%) rename services/{client/common => modules/client}/models/recovery.json (100%) rename services/{client/common => modules/client}/models/sample.json (100%) rename services/{client/common => modules/client}/models/tpv-error.json (100%) rename services/{client/common => modules/client}/models/tpv-merchant.json (100%) rename services/{client/common => modules/client}/models/tpv-response.json (100%) rename services/{item/server => modules/item}/model-config.json (100%) rename services/{item/common => modules/item}/models/genus.json (100%) rename services/{item/common => modules/item}/models/item-barcode.js (100%) rename services/{item/common => modules/item}/models/item-barcode.json (100%) rename services/{item/common => modules/item}/models/item-botanical.json (100%) rename services/{item/common => modules/item}/models/item-log.json (100%) rename services/{item/common => modules/item}/models/item-niche.js (100%) rename services/{item/common => modules/item}/models/item-niche.json (100%) rename services/{item/common => modules/item}/models/item-placement.json (100%) rename services/{item/common => modules/item}/models/itemTypeTag.json (100%) rename services/{item/common => modules/item}/models/specie.json (100%) rename services/{order/common => modules/order}/methods/order-row/addToOrder.js (100%) rename services/{order/common => modules/order}/methods/order-row/removes.js (100%) rename services/{order/common => modules/order}/methods/order-row/specs/addToOrder.spec.js (100%) rename services/{order/common => modules/order}/methods/order-row/specs/removes.spec.js (100%) rename services/{order/server => modules/order}/model-config.json (100%) rename services/{order/common => modules/order}/models/order-row.js (100%) rename services/{order/common => modules/order}/models/order-row.json (100%) rename services/{route/server => modules/route}/model-config.json (100%) rename services/{route/common => modules/route}/models/delivery.json (100%) rename services/{route/common => modules/route}/models/vehicle.json (100%) rename services/{ticket/common => modules/ticket}/methods/expedition/filter.js (100%) rename services/{ticket/common => modules/ticket}/methods/packaging/listPackaging.js (100%) rename services/{ticket/common => modules/ticket}/methods/packaging/specs/listPackaging.spec.js (100%) rename services/{ticket/common => modules/ticket}/methods/sale-tracking/listSaleTracking.js (100%) rename services/{ticket/common => modules/ticket}/methods/sale-tracking/specs/listSaleTracking.spec.js (100%) rename services/{ticket/server => modules/ticket}/model-config.json (100%) rename services/{ticket/common => modules/ticket}/models/annual-average-invoiced.json (100%) rename services/{ticket/common => modules/ticket}/models/component-rate.json (100%) rename services/{ticket/common => modules/ticket}/models/component-type-rate.json (100%) rename services/{ticket/common => modules/ticket}/models/expedition.js (100%) rename services/{ticket/common => modules/ticket}/models/expedition.json (100%) rename services/{ticket/common => modules/ticket}/models/packaging.js (100%) rename services/{ticket/common => modules/ticket}/models/packaging.json (100%) rename services/{ticket/common => modules/ticket}/models/sale-checked.json (100%) rename services/{ticket/common => modules/ticket}/models/sale-component.json (100%) rename services/{ticket/common => modules/ticket}/models/sale-tracking.js (100%) rename services/{ticket/common => modules/ticket}/models/sale-tracking.json (100%) rename services/{ticket/common => modules/ticket}/models/specs/ticket-packaging.spec.js (100%) rename services/{ticket/common => modules/ticket}/models/ticket-packaging.js (100%) rename services/{ticket/common => modules/ticket}/models/ticket-packaging.json (100%) rename services/{ticket/common => modules/ticket}/models/ticket-update-action.json (100%) rename services/{ticket/common => modules/ticket}/models/ticket-weekly.json (100%) rename services/{travel/server => modules/travel}/model-config.json (100%) rename services/{travel/common => modules/travel}/models/travel.json (100%) delete mode 100644 services/order/common/locale/es.json delete mode 100644 services/travel/common/locale/es.json diff --git a/.eslintrc.yml b/.eslintrc.yml index 233dd57c7..3b82d0a90 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -25,6 +25,8 @@ rules: comma-dangle: 0 bracketSpacing: 0 space-infix-ops: 1 + no-invalid-this: 0 + space-before-function-paren: [error, never] prefer-const: 0 curly: [error, multi-or-nest] indent: [error, 4] diff --git a/services/loopback/server/server.js b/services/loopback/server/server.js index 7c9a5b69b..8461a3f11 100644 --- a/services/loopback/server/server.js +++ b/services/loopback/server/server.js @@ -108,7 +108,7 @@ let config = require('./config.json'); for (let key in config) app.set(key, config[key]); -let servicesDir = `${__dirname}/../..`; +let servicesDir = `${__dirname}/../../modules`; let modelConfigFiles = [ `${__dirname}/model-config.json` @@ -127,13 +127,13 @@ let bootDirs = [ `${__dirname}/boot` ]; -let services = require(`${servicesDir}/services.yml`); +let services = require(`../../services.yml`); for (let service of services) { let baseDir = `${servicesDir}/${service}`; - modelConfigFiles.push(`${baseDir}/server/model-config.json`); - modelSources.push(`${baseDir}/common/models`); - mixinDirs.push(`${baseDir}/common/mixins`); - bootDirs.push(`${baseDir}/server/boot`); + modelConfigFiles.push(`${baseDir}/model-config.json`); + modelSources.push(`${baseDir}/models`); + mixinDirs.push(`${baseDir}/mixins`); + bootDirs.push(`${baseDir}/boot`); } let models = {}; diff --git a/services/agency/server/model-config.json b/services/modules/agency/model-config.json similarity index 100% rename from services/agency/server/model-config.json rename to services/modules/agency/model-config.json diff --git a/services/agency/common/models/zone-calendar.json b/services/modules/agency/models/zone-calendar.json similarity index 100% rename from services/agency/common/models/zone-calendar.json rename to services/modules/agency/models/zone-calendar.json diff --git a/services/agency/common/models/zone-geo.json b/services/modules/agency/models/zone-geo.json similarity index 100% rename from services/agency/common/models/zone-geo.json rename to services/modules/agency/models/zone-geo.json diff --git a/services/agency/common/models/zone-included.json b/services/modules/agency/models/zone-included.json similarity index 100% rename from services/agency/common/models/zone-included.json rename to services/modules/agency/models/zone-included.json diff --git a/services/agency/common/models/zone.js b/services/modules/agency/models/zone.js similarity index 100% rename from services/agency/common/models/zone.js rename to services/modules/agency/models/zone.js diff --git a/services/agency/common/models/zone.json b/services/modules/agency/models/zone.json similarity index 100% rename from services/agency/common/models/zone.json rename to services/modules/agency/models/zone.json diff --git a/services/claim/common/methods/claim-end/importTicketSales.js b/services/modules/claim/methods/claim-end/importTicketSales.js similarity index 100% rename from services/claim/common/methods/claim-end/importTicketSales.js rename to services/modules/claim/methods/claim-end/importTicketSales.js diff --git a/services/claim/common/methods/claim-end/specs/importTicketSales.spec.js b/services/modules/claim/methods/claim-end/specs/importTicketSales.spec.js similarity index 100% rename from services/claim/common/methods/claim-end/specs/importTicketSales.spec.js rename to services/modules/claim/methods/claim-end/specs/importTicketSales.spec.js diff --git a/services/claim/server/model-config.json b/services/modules/claim/model-config.json similarity index 100% rename from services/claim/server/model-config.json rename to services/modules/claim/model-config.json diff --git a/services/claim/common/models/claim-development.json b/services/modules/claim/models/claim-development.json similarity index 100% rename from services/claim/common/models/claim-development.json rename to services/modules/claim/models/claim-development.json diff --git a/services/claim/common/models/claim-end.js b/services/modules/claim/models/claim-end.js similarity index 100% rename from services/claim/common/models/claim-end.js rename to services/modules/claim/models/claim-end.js diff --git a/services/claim/common/models/claim-end.json b/services/modules/claim/models/claim-end.json similarity index 100% rename from services/claim/common/models/claim-end.json rename to services/modules/claim/models/claim-end.json diff --git a/services/claim/common/models/claim-reason.json b/services/modules/claim/models/claim-reason.json similarity index 100% rename from services/claim/common/models/claim-reason.json rename to services/modules/claim/models/claim-reason.json diff --git a/services/claim/common/models/claim-redelivery.json b/services/modules/claim/models/claim-redelivery.json similarity index 100% rename from services/claim/common/models/claim-redelivery.json rename to services/modules/claim/models/claim-redelivery.json diff --git a/services/claim/common/models/claim-responsible.json b/services/modules/claim/models/claim-responsible.json similarity index 100% rename from services/claim/common/models/claim-responsible.json rename to services/modules/claim/models/claim-responsible.json diff --git a/services/claim/common/models/claim-result.json b/services/modules/claim/models/claim-result.json similarity index 100% rename from services/claim/common/models/claim-result.json rename to services/modules/claim/models/claim-result.json diff --git a/services/claim/common/models/claim-state.json b/services/modules/claim/models/claim-state.json similarity index 100% rename from services/claim/common/models/claim-state.json rename to services/modules/claim/models/claim-state.json diff --git a/services/client/common/methods/credit-classification/createWithInsurance.js b/services/modules/client/methods/credit-classification/createWithInsurance.js similarity index 100% rename from services/client/common/methods/credit-classification/createWithInsurance.js rename to services/modules/client/methods/credit-classification/createWithInsurance.js diff --git a/services/client/common/methods/credit-classification/createWithInsurance.spec.js b/services/modules/client/methods/credit-classification/createWithInsurance.spec.js similarity index 100% rename from services/client/common/methods/credit-classification/createWithInsurance.spec.js rename to services/modules/client/methods/credit-classification/createWithInsurance.spec.js diff --git a/services/client/common/methods/greuge/specs/sumAmount.spec.js b/services/modules/client/methods/greuge/specs/sumAmount.spec.js similarity index 100% rename from services/client/common/methods/greuge/specs/sumAmount.spec.js rename to services/modules/client/methods/greuge/specs/sumAmount.spec.js diff --git a/services/client/common/methods/greuge/sumAmount.js b/services/modules/client/methods/greuge/sumAmount.js similarity index 100% rename from services/client/common/methods/greuge/sumAmount.js rename to services/modules/client/methods/greuge/sumAmount.js diff --git a/services/client/common/methods/receipt/filter.js b/services/modules/client/methods/receipt/filter.js similarity index 100% rename from services/client/common/methods/receipt/filter.js rename to services/modules/client/methods/receipt/filter.js diff --git a/services/client/common/methods/receipt/specs/filter.spec.js b/services/modules/client/methods/receipt/specs/filter.spec.js similarity index 100% rename from services/client/common/methods/receipt/specs/filter.spec.js rename to services/modules/client/methods/receipt/specs/filter.spec.js diff --git a/services/client/common/methods/recovery/hasActiveRecovery.js b/services/modules/client/methods/recovery/hasActiveRecovery.js similarity index 100% rename from services/client/common/methods/recovery/hasActiveRecovery.js rename to services/modules/client/methods/recovery/hasActiveRecovery.js diff --git a/services/client/server/model-config.json b/services/modules/client/model-config.json similarity index 100% rename from services/client/server/model-config.json rename to services/modules/client/model-config.json diff --git a/services/client/common/models/address-observation.js b/services/modules/client/models/address-observation.js similarity index 100% rename from services/client/common/models/address-observation.js rename to services/modules/client/models/address-observation.js diff --git a/services/client/common/models/address-observation.json b/services/modules/client/models/address-observation.json similarity index 100% rename from services/client/common/models/address-observation.json rename to services/modules/client/models/address-observation.json diff --git a/services/client/common/models/bank-entity.json b/services/modules/client/models/bank-entity.json similarity index 100% rename from services/client/common/models/bank-entity.json rename to services/modules/client/models/bank-entity.json diff --git a/services/client/common/models/client-contact.js b/services/modules/client/models/client-contact.js similarity index 100% rename from services/client/common/models/client-contact.js rename to services/modules/client/models/client-contact.js diff --git a/services/client/common/models/client-contact.json b/services/modules/client/models/client-contact.json similarity index 100% rename from services/client/common/models/client-contact.json rename to services/modules/client/models/client-contact.json diff --git a/services/client/common/models/client-credit.json b/services/modules/client/models/client-credit.json similarity index 100% rename from services/client/common/models/client-credit.json rename to services/modules/client/models/client-credit.json diff --git a/services/client/common/models/client-observation.js b/services/modules/client/models/client-observation.js similarity index 100% rename from services/client/common/models/client-observation.js rename to services/modules/client/models/client-observation.js diff --git a/services/client/common/models/client-observation.json b/services/modules/client/models/client-observation.json similarity index 100% rename from services/client/common/models/client-observation.json rename to services/modules/client/models/client-observation.json diff --git a/services/client/common/models/client-risk.json b/services/modules/client/models/client-risk.json similarity index 100% rename from services/client/common/models/client-risk.json rename to services/modules/client/models/client-risk.json diff --git a/services/client/common/models/client-sample.js b/services/modules/client/models/client-sample.js similarity index 100% rename from services/client/common/models/client-sample.js rename to services/modules/client/models/client-sample.js diff --git a/services/client/common/models/client-sample.json b/services/modules/client/models/client-sample.json similarity index 100% rename from services/client/common/models/client-sample.json rename to services/modules/client/models/client-sample.json diff --git a/services/client/common/models/credit-classification.js b/services/modules/client/models/credit-classification.js similarity index 100% rename from services/client/common/models/credit-classification.js rename to services/modules/client/models/credit-classification.js diff --git a/services/client/common/models/credit-classification.json b/services/modules/client/models/credit-classification.json similarity index 100% rename from services/client/common/models/credit-classification.json rename to services/modules/client/models/credit-classification.json diff --git a/services/client/common/models/credit-insurance.js b/services/modules/client/models/credit-insurance.js similarity index 100% rename from services/client/common/models/credit-insurance.js rename to services/modules/client/models/credit-insurance.js diff --git a/services/client/common/models/credit-insurance.json b/services/modules/client/models/credit-insurance.json similarity index 100% rename from services/client/common/models/credit-insurance.json rename to services/modules/client/models/credit-insurance.json diff --git a/services/client/common/models/defaulter.json b/services/modules/client/models/defaulter.json similarity index 100% rename from services/client/common/models/defaulter.json rename to services/modules/client/models/defaulter.json diff --git a/services/client/common/models/greuge-type.json b/services/modules/client/models/greuge-type.json similarity index 100% rename from services/client/common/models/greuge-type.json rename to services/modules/client/models/greuge-type.json diff --git a/services/client/common/models/greuge.js b/services/modules/client/models/greuge.js similarity index 100% rename from services/client/common/models/greuge.js rename to services/modules/client/models/greuge.js diff --git a/services/client/common/models/greuge.json b/services/modules/client/models/greuge.json similarity index 100% rename from services/client/common/models/greuge.json rename to services/modules/client/models/greuge.json diff --git a/services/client/common/models/invoice-out.json b/services/modules/client/models/invoice-out.json similarity index 100% rename from services/client/common/models/invoice-out.json rename to services/modules/client/models/invoice-out.json diff --git a/services/client/common/models/mandate-type.json b/services/modules/client/models/mandate-type.json similarity index 100% rename from services/client/common/models/mandate-type.json rename to services/modules/client/models/mandate-type.json diff --git a/services/client/common/models/mandate.json b/services/modules/client/models/mandate.json similarity index 100% rename from services/client/common/models/mandate.json rename to services/modules/client/models/mandate.json diff --git a/services/client/common/models/observation-type.json b/services/modules/client/models/observation-type.json similarity index 100% rename from services/client/common/models/observation-type.json rename to services/modules/client/models/observation-type.json diff --git a/services/client/common/models/receipt.js b/services/modules/client/models/receipt.js similarity index 100% rename from services/client/common/models/receipt.js rename to services/modules/client/models/receipt.js diff --git a/services/client/common/models/receipt.json b/services/modules/client/models/receipt.json similarity index 100% rename from services/client/common/models/receipt.json rename to services/modules/client/models/receipt.json diff --git a/services/client/common/models/recovery.js b/services/modules/client/models/recovery.js similarity index 100% rename from services/client/common/models/recovery.js rename to services/modules/client/models/recovery.js diff --git a/services/client/common/models/recovery.json b/services/modules/client/models/recovery.json similarity index 100% rename from services/client/common/models/recovery.json rename to services/modules/client/models/recovery.json diff --git a/services/client/common/models/sample.json b/services/modules/client/models/sample.json similarity index 100% rename from services/client/common/models/sample.json rename to services/modules/client/models/sample.json diff --git a/services/client/common/models/tpv-error.json b/services/modules/client/models/tpv-error.json similarity index 100% rename from services/client/common/models/tpv-error.json rename to services/modules/client/models/tpv-error.json diff --git a/services/client/common/models/tpv-merchant.json b/services/modules/client/models/tpv-merchant.json similarity index 100% rename from services/client/common/models/tpv-merchant.json rename to services/modules/client/models/tpv-merchant.json diff --git a/services/client/common/models/tpv-response.json b/services/modules/client/models/tpv-response.json similarity index 100% rename from services/client/common/models/tpv-response.json rename to services/modules/client/models/tpv-response.json diff --git a/services/item/server/model-config.json b/services/modules/item/model-config.json similarity index 100% rename from services/item/server/model-config.json rename to services/modules/item/model-config.json diff --git a/services/item/common/models/genus.json b/services/modules/item/models/genus.json similarity index 100% rename from services/item/common/models/genus.json rename to services/modules/item/models/genus.json diff --git a/services/item/common/models/item-barcode.js b/services/modules/item/models/item-barcode.js similarity index 100% rename from services/item/common/models/item-barcode.js rename to services/modules/item/models/item-barcode.js diff --git a/services/item/common/models/item-barcode.json b/services/modules/item/models/item-barcode.json similarity index 100% rename from services/item/common/models/item-barcode.json rename to services/modules/item/models/item-barcode.json diff --git a/services/item/common/models/item-botanical.json b/services/modules/item/models/item-botanical.json similarity index 100% rename from services/item/common/models/item-botanical.json rename to services/modules/item/models/item-botanical.json diff --git a/services/item/common/models/item-log.json b/services/modules/item/models/item-log.json similarity index 100% rename from services/item/common/models/item-log.json rename to services/modules/item/models/item-log.json diff --git a/services/item/common/models/item-niche.js b/services/modules/item/models/item-niche.js similarity index 100% rename from services/item/common/models/item-niche.js rename to services/modules/item/models/item-niche.js diff --git a/services/item/common/models/item-niche.json b/services/modules/item/models/item-niche.json similarity index 100% rename from services/item/common/models/item-niche.json rename to services/modules/item/models/item-niche.json diff --git a/services/item/common/models/item-placement.json b/services/modules/item/models/item-placement.json similarity index 100% rename from services/item/common/models/item-placement.json rename to services/modules/item/models/item-placement.json diff --git a/services/item/common/models/itemTypeTag.json b/services/modules/item/models/itemTypeTag.json similarity index 100% rename from services/item/common/models/itemTypeTag.json rename to services/modules/item/models/itemTypeTag.json diff --git a/services/item/common/models/specie.json b/services/modules/item/models/specie.json similarity index 100% rename from services/item/common/models/specie.json rename to services/modules/item/models/specie.json diff --git a/services/order/common/methods/order-row/addToOrder.js b/services/modules/order/methods/order-row/addToOrder.js similarity index 100% rename from services/order/common/methods/order-row/addToOrder.js rename to services/modules/order/methods/order-row/addToOrder.js diff --git a/services/order/common/methods/order-row/removes.js b/services/modules/order/methods/order-row/removes.js similarity index 100% rename from services/order/common/methods/order-row/removes.js rename to services/modules/order/methods/order-row/removes.js diff --git a/services/order/common/methods/order-row/specs/addToOrder.spec.js b/services/modules/order/methods/order-row/specs/addToOrder.spec.js similarity index 100% rename from services/order/common/methods/order-row/specs/addToOrder.spec.js rename to services/modules/order/methods/order-row/specs/addToOrder.spec.js diff --git a/services/order/common/methods/order-row/specs/removes.spec.js b/services/modules/order/methods/order-row/specs/removes.spec.js similarity index 100% rename from services/order/common/methods/order-row/specs/removes.spec.js rename to services/modules/order/methods/order-row/specs/removes.spec.js diff --git a/services/order/server/model-config.json b/services/modules/order/model-config.json similarity index 100% rename from services/order/server/model-config.json rename to services/modules/order/model-config.json diff --git a/services/order/common/models/order-row.js b/services/modules/order/models/order-row.js similarity index 100% rename from services/order/common/models/order-row.js rename to services/modules/order/models/order-row.js diff --git a/services/order/common/models/order-row.json b/services/modules/order/models/order-row.json similarity index 100% rename from services/order/common/models/order-row.json rename to services/modules/order/models/order-row.json diff --git a/services/route/server/model-config.json b/services/modules/route/model-config.json similarity index 100% rename from services/route/server/model-config.json rename to services/modules/route/model-config.json diff --git a/services/route/common/models/delivery.json b/services/modules/route/models/delivery.json similarity index 100% rename from services/route/common/models/delivery.json rename to services/modules/route/models/delivery.json diff --git a/services/route/common/models/vehicle.json b/services/modules/route/models/vehicle.json similarity index 100% rename from services/route/common/models/vehicle.json rename to services/modules/route/models/vehicle.json diff --git a/services/ticket/common/methods/expedition/filter.js b/services/modules/ticket/methods/expedition/filter.js similarity index 100% rename from services/ticket/common/methods/expedition/filter.js rename to services/modules/ticket/methods/expedition/filter.js diff --git a/services/ticket/common/methods/packaging/listPackaging.js b/services/modules/ticket/methods/packaging/listPackaging.js similarity index 100% rename from services/ticket/common/methods/packaging/listPackaging.js rename to services/modules/ticket/methods/packaging/listPackaging.js diff --git a/services/ticket/common/methods/packaging/specs/listPackaging.spec.js b/services/modules/ticket/methods/packaging/specs/listPackaging.spec.js similarity index 100% rename from services/ticket/common/methods/packaging/specs/listPackaging.spec.js rename to services/modules/ticket/methods/packaging/specs/listPackaging.spec.js diff --git a/services/ticket/common/methods/sale-tracking/listSaleTracking.js b/services/modules/ticket/methods/sale-tracking/listSaleTracking.js similarity index 100% rename from services/ticket/common/methods/sale-tracking/listSaleTracking.js rename to services/modules/ticket/methods/sale-tracking/listSaleTracking.js diff --git a/services/ticket/common/methods/sale-tracking/specs/listSaleTracking.spec.js b/services/modules/ticket/methods/sale-tracking/specs/listSaleTracking.spec.js similarity index 100% rename from services/ticket/common/methods/sale-tracking/specs/listSaleTracking.spec.js rename to services/modules/ticket/methods/sale-tracking/specs/listSaleTracking.spec.js diff --git a/services/ticket/server/model-config.json b/services/modules/ticket/model-config.json similarity index 100% rename from services/ticket/server/model-config.json rename to services/modules/ticket/model-config.json diff --git a/services/ticket/common/models/annual-average-invoiced.json b/services/modules/ticket/models/annual-average-invoiced.json similarity index 100% rename from services/ticket/common/models/annual-average-invoiced.json rename to services/modules/ticket/models/annual-average-invoiced.json diff --git a/services/ticket/common/models/component-rate.json b/services/modules/ticket/models/component-rate.json similarity index 100% rename from services/ticket/common/models/component-rate.json rename to services/modules/ticket/models/component-rate.json diff --git a/services/ticket/common/models/component-type-rate.json b/services/modules/ticket/models/component-type-rate.json similarity index 100% rename from services/ticket/common/models/component-type-rate.json rename to services/modules/ticket/models/component-type-rate.json diff --git a/services/ticket/common/models/expedition.js b/services/modules/ticket/models/expedition.js similarity index 100% rename from services/ticket/common/models/expedition.js rename to services/modules/ticket/models/expedition.js diff --git a/services/ticket/common/models/expedition.json b/services/modules/ticket/models/expedition.json similarity index 100% rename from services/ticket/common/models/expedition.json rename to services/modules/ticket/models/expedition.json diff --git a/services/ticket/common/models/packaging.js b/services/modules/ticket/models/packaging.js similarity index 100% rename from services/ticket/common/models/packaging.js rename to services/modules/ticket/models/packaging.js diff --git a/services/ticket/common/models/packaging.json b/services/modules/ticket/models/packaging.json similarity index 100% rename from services/ticket/common/models/packaging.json rename to services/modules/ticket/models/packaging.json diff --git a/services/ticket/common/models/sale-checked.json b/services/modules/ticket/models/sale-checked.json similarity index 100% rename from services/ticket/common/models/sale-checked.json rename to services/modules/ticket/models/sale-checked.json diff --git a/services/ticket/common/models/sale-component.json b/services/modules/ticket/models/sale-component.json similarity index 100% rename from services/ticket/common/models/sale-component.json rename to services/modules/ticket/models/sale-component.json diff --git a/services/ticket/common/models/sale-tracking.js b/services/modules/ticket/models/sale-tracking.js similarity index 100% rename from services/ticket/common/models/sale-tracking.js rename to services/modules/ticket/models/sale-tracking.js diff --git a/services/ticket/common/models/sale-tracking.json b/services/modules/ticket/models/sale-tracking.json similarity index 100% rename from services/ticket/common/models/sale-tracking.json rename to services/modules/ticket/models/sale-tracking.json diff --git a/services/ticket/common/models/specs/ticket-packaging.spec.js b/services/modules/ticket/models/specs/ticket-packaging.spec.js similarity index 100% rename from services/ticket/common/models/specs/ticket-packaging.spec.js rename to services/modules/ticket/models/specs/ticket-packaging.spec.js diff --git a/services/ticket/common/models/ticket-packaging.js b/services/modules/ticket/models/ticket-packaging.js similarity index 100% rename from services/ticket/common/models/ticket-packaging.js rename to services/modules/ticket/models/ticket-packaging.js diff --git a/services/ticket/common/models/ticket-packaging.json b/services/modules/ticket/models/ticket-packaging.json similarity index 100% rename from services/ticket/common/models/ticket-packaging.json rename to services/modules/ticket/models/ticket-packaging.json diff --git a/services/ticket/common/models/ticket-update-action.json b/services/modules/ticket/models/ticket-update-action.json similarity index 100% rename from services/ticket/common/models/ticket-update-action.json rename to services/modules/ticket/models/ticket-update-action.json diff --git a/services/ticket/common/models/ticket-weekly.json b/services/modules/ticket/models/ticket-weekly.json similarity index 100% rename from services/ticket/common/models/ticket-weekly.json rename to services/modules/ticket/models/ticket-weekly.json diff --git a/services/travel/server/model-config.json b/services/modules/travel/model-config.json similarity index 100% rename from services/travel/server/model-config.json rename to services/modules/travel/model-config.json diff --git a/services/travel/common/models/travel.json b/services/modules/travel/models/travel.json similarity index 100% rename from services/travel/common/models/travel.json rename to services/modules/travel/models/travel.json diff --git a/services/order/common/locale/es.json b/services/order/common/locale/es.json deleted file mode 100644 index 5fa92d9e9..000000000 --- a/services/order/common/locale/es.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "This order is not editable": "Esta orden no se puede editar" -} diff --git a/services/travel/common/locale/es.json b/services/travel/common/locale/es.json deleted file mode 100644 index 0967ef424..000000000 --- a/services/travel/common/locale/es.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/services_tests.js b/services_tests.js index b9cabe5d2..c6cb3aa89 100644 --- a/services_tests.js +++ b/services_tests.js @@ -24,7 +24,7 @@ let serviceSpecs = [ let services = require(`./services/services.yml`); for (let service of services) - serviceSpecs.push(`${service}/**/*[sS]pec.js`); + serviceSpecs.push(`modules/${service}/**/*[sS]pec.js`); jasmine.loadConfig({ spec_dir: 'services',