Skip to content
Permalink
Browse files

Merge pull request #673 from ever-co/feature/shared-module-import-change

chore: fixing shared module imports
  • Loading branch information...
evereq committed Jul 9, 2019
2 parents a71ed60 + 9b2c161 commit d01d26fe45f335b309add7f058cf204a96e98620
@@ -1,7 +1,7 @@
import { Mutation, Query, ResolveProperty, Resolver } from '@nestjs/graphql';
import { CarriersService } from '../../services/carriers';
import { default as ICarrier } from '../../modules/server.common/interfaces/ICarrier';
import Carrier from '../../modules/server.common/entities/Carrier';
import { default as ICarrier } from '@modules/server.common/interfaces/ICarrier';
import Carrier from '@modules/server.common/entities/Carrier';
import { first, map } from 'rxjs/operators';
import { DevicesService } from '../../services/devices';
import {
@@ -1,7 +1,7 @@
import { Query, ResolveProperty, Resolver, Mutation } from '@nestjs/graphql';
import IOrder from '../../modules/server.common/interfaces/IOrder';
import IOrder from '@modules/server.common/interfaces/IOrder';
import CarriersService from '../../services/carriers/CarriersService';
import Order from '../../modules/server.common/entities/Order';
import Order from '@modules/server.common/entities/Order';
import { first } from 'rxjs/operators';
import OrderCarrierStatus from '@modules/server.common/enums/OrderCarrierStatus';
import OrderWarehouseStatus from '@modules/server.common/enums/OrderWarehouseStatus';
@@ -6,7 +6,7 @@ import {
IUserCreateObject,
IResponseGenerate1000Customers
} from '@modules/server.common/interfaces/IUser';
import User from '../../modules/server.common/entities/User';
import User from '@modules/server.common/entities/User';
import { DevicesService } from '../../services/devices';
import { UsersAuthService } from '../../services/users/UsersAuthService';
import {
@@ -4,15 +4,15 @@ import { createEverLogger } from '../../helpers/Log';
import { ProductsService } from '../products';
import { OrdersService } from '../orders';
import CarriersService from './CarriersService';
import Carrier from '../../modules/server.common/entities/Carrier';
import OrderCarrierStatus from '../../modules/server.common/enums/OrderCarrierStatus';
import Carrier from '@modules/server.common/entities/Carrier';
import OrderCarrierStatus from '@modules/server.common/enums/OrderCarrierStatus';
import { inject, injectable } from 'inversify';
import { WarehousesOrdersService } from '../warehouses';
import ICarrierOrdersRouter from '../../modules/server.common/routers/ICarrierOrdersRouter';
import ICarrierOrdersRouter from '@modules/server.common/routers/ICarrierOrdersRouter';
import { asyncListener, observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import Order from '../../modules/server.common/entities/Order';
import IOrder from '../../modules/server.common/interfaces/IOrder';
import Order from '@modules/server.common/entities/Order';
import IOrder from '@modules/server.common/interfaces/IOrder';
import {
GeoLocationsOrdersService,
GeoLocationOrdersOptions
@@ -1,22 +1,22 @@
import * as Logger from 'bunyan';
import CarrierStatus from '../../modules/server.common/enums/CarrierStatus';
import Carrier from '../../modules/server.common/entities/Carrier';
import CarrierStatus from '@modules/server.common/enums/CarrierStatus';
import Carrier from '@modules/server.common/entities/Carrier';
import { createEverLogger } from '../../helpers/Log';
import { DBService } from '@pyro/db-server';
import { inject, injectable } from 'inversify';
import ICarrierRouter, {
ICarrierLoginResponse,
ICarrierRegistrationInput
} from '../../modules/server.common/routers/ICarrierRouter';
} from '@modules/server.common/routers/ICarrierRouter';
import {
asyncListener,
observableListener,
routerName,
serialization
} from '@pyro/io';
import IService from '../IService';
import GeoLocation from '../../modules/server.common/entities/GeoLocation';
import IGeoLocation from '../../modules/server.common/interfaces/IGeoLocation';
import GeoLocation from '@modules/server.common/entities/GeoLocation';
import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation';
import { concat, of, Observable } from 'rxjs';
import { exhaustMap, filter, first, map, switchMap } from 'rxjs/operators';
import { env } from '../../env';
@@ -1,10 +1,10 @@
import { inject, injectable } from 'inversify';
import { OrdersService } from '../orders';
import Warehouse from '../../modules/server.common/entities/Warehouse';
import GeoLocation from '../../modules/server.common/entities/GeoLocation';
import Warehouse from '@modules/server.common/entities/Warehouse';
import GeoLocation from '@modules/server.common/entities/GeoLocation';
import * as _ from 'lodash';
import * as Logger from 'bunyan';
import Order from '../../modules/server.common/entities/Order';
import Order from '@modules/server.common/entities/Order';
import { createEverLogger } from '../../helpers/Log';
import { GeoLocationsWarehousesService } from './GeoLocationsWarehousesService';
import * as Bluebird from 'bluebird';
@@ -19,8 +19,8 @@ import {
serialization,
asyncListener
} from '@pyro/io';
import IGeoLocationOrdersRouter from '../../modules/server.common/routers/IGeoLocationOrdersRouter';
import IGeoLocation from '../../modules/server.common/interfaces/IGeoLocation';
import IGeoLocationOrdersRouter from '@modules/server.common/routers/IGeoLocationOrdersRouter';
import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation';
import IService from '../IService';
import { ExistenceEventType } from '@pyro/db-server';
import { concat, exhaustMap, filter, first, share } from 'rxjs/operators';
@@ -1,21 +1,21 @@
import { inject, injectable } from 'inversify';
import * as Logger from 'bunyan';
import { WarehousesService } from '../warehouses';
import Warehouse from '../../modules/server.common/entities/Warehouse';
import GeoLocation from '../../modules/server.common/entities/GeoLocation';
import ProductInfo from '../../modules/server.common/entities/ProductInfo';
import Warehouse from '@modules/server.common/entities/Warehouse';
import GeoLocation from '@modules/server.common/entities/GeoLocation';
import ProductInfo from '@modules/server.common/entities/ProductInfo';
import * as _ from 'lodash';
import Utils from '../../modules/server.common/utils';
import Utils from '@modules/server.common/utils';
import { createEverLogger } from '../../helpers/Log';
import { GeoLocationsWarehousesService } from './GeoLocationsWarehousesService';
import IGeoLocation from '../../modules/server.common/interfaces/IGeoLocation';
import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation';
import {
observableListener,
routerName,
serialization,
asyncListener
} from '@pyro/io';
import IGeoLocationProductsRouter from '../../modules/server.common/routers/IGeoLocationProductsRouter';
import IGeoLocationProductsRouter from '@modules/server.common/routers/IGeoLocationProductsRouter';
import IService from '../IService';
import { map, first } from 'rxjs/operators';
import IWarehouseProduct from '@modules/server.common/interfaces/IWarehouseProduct';
@@ -1,21 +1,21 @@
import { injectable } from 'inversify';
import * as Logger from 'bunyan';
import * as _ from 'lodash';
import Utils from '../../modules/server.common/utils';
import Utils from '@modules/server.common/utils';
import { createEverLogger } from '../../helpers/Log';
import { WarehousesService } from '../warehouses';
import GeoLocation from '../../modules/server.common/entities/GeoLocation';
import Warehouse from '../../modules/server.common/entities/Warehouse';
import IWarehouse from '../../modules/server.common/interfaces/IWarehouse';
import GeoLocation from '@modules/server.common/entities/GeoLocation';
import Warehouse from '@modules/server.common/entities/Warehouse';
import IWarehouse from '@modules/server.common/interfaces/IWarehouse';
import { Observable } from 'rxjs';
import {
observableListener,
routerName,
serialization,
asyncListener
} from '@pyro/io';
import IGeoLocation from '../../modules/server.common/interfaces/IGeoLocation';
import IGeoLocationWarehousesRouter from '../../modules/server.common/routers/IGeoLocationWarehousesRouter';
import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation';
import IGeoLocationWarehousesRouter from '@modules/server.common/routers/IGeoLocationWarehousesRouter';
import IService from '../IService';
import { ExistenceEventType } from '@pyro/db-server';
import { of } from 'rxjs/observable/of';
@@ -1,19 +1,19 @@
import { inject, injectable } from 'inversify';
import { createEverLogger } from '../../helpers/Log';
import { IInviteRequestCreateObject } from '@modules/server.common/interfaces/IInviteRequest';
import InviteRequest from '../../modules/server.common/entities/InviteRequest';
import InviteRequest from '@modules/server.common/entities/InviteRequest';
import { DBService, ExistenceEventType } from '@pyro/db-server';
import { InvitesService } from './InvitesService';
import { Subscription } from 'rxjs/Subscription';
import * as _ from 'lodash';
import Invite from '../../modules/server.common/entities/Invite';
import ILanguage from '../../modules/server.common/interfaces/ILanguage';
import Invite from '@modules/server.common/entities/Invite';
import ILanguage from '@modules/server.common/interfaces/ILanguage';
import * as requestPromise from 'request-promise';
import * as Bluebird from 'bluebird';
import { DevicesService } from '../devices';
import Device from '../../modules/server.common/entities/Device';
import * as notifications from '../../modules/server.common/notifications';
import IInviteRequestRouter from '../../modules/server.common/routers/IInviteRequestRouter';
import Device from '@modules/server.common/entities/Device';
import * as notifications from '@modules/server.common/notifications';
import IInviteRequestRouter from '@modules/server.common/routers/IInviteRequestRouter';
import { asyncListener, observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import { env } from '../../env';
@@ -1,15 +1,15 @@
import * as Logger from 'bunyan';
import { injectable } from 'inversify';
import Utils from '../../modules/server.common/utils';
import Utils from '@modules/server.common/utils';
import { createEverLogger } from '../../helpers/Log';
import Invite from '../../modules/server.common/entities/Invite';
import Invite from '@modules/server.common/entities/Invite';
import { DBService, ExistenceEventType } from '@pyro/db-server';
import { IInviteCreateObject } from '../../modules/server.common/interfaces/IInvite';
import IEnterByCode from '../../modules/server.common/interfaces/IEnterByCode';
import IEnterByLocation from '../../modules/server.common/interfaces/IEnterByLocation';
import IStreetLocation from '../../modules/server.common/interfaces/IStreetLocation';
import { IInviteCreateObject } from '@modules/server.common/interfaces/IInvite';
import IEnterByCode from '@modules/server.common/interfaces/IEnterByCode';
import IEnterByLocation from '@modules/server.common/interfaces/IEnterByLocation';
import IStreetLocation from '@modules/server.common/interfaces/IStreetLocation';
import { Observable } from 'rxjs';
import IInviteRouter from '../../modules/server.common/routers/IInviteRouter';
import IInviteRouter from '@modules/server.common/routers/IInviteRouter';
import { asyncListener, observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import { of } from 'rxjs/observable/of';
@@ -4,17 +4,17 @@ import { inject, injectable, LazyServiceIdentifer } from 'inversify';
import { env } from '../../env';
import { WarehousesService, WarehousesProductsService } from '../warehouses';
import { createEverLogger } from '../../helpers/Log';
import OrderCarrierStatus from '../../modules/server.common/enums/OrderCarrierStatus';
import OrderWarehouseStatus from '../../modules/server.common/enums/OrderWarehouseStatus';
import OrderCarrierStatus from '@modules/server.common/enums/OrderCarrierStatus';
import OrderWarehouseStatus from '@modules/server.common/enums/OrderWarehouseStatus';
import { UsersService } from '../users';
import Order from '../../modules/server.common/entities/Order';
import Order from '@modules/server.common/entities/Order';
import { DBService } from '@pyro/db-server';
import {
default as IOrder,
IOrderCreateObject
} from '../../modules/server.common/interfaces/IOrder';
} from '@modules/server.common/interfaces/IOrder';
import CarriersService from '../carriers/CarriersService';
import IOrderRouter from '../../modules/server.common/routers/IOrderRouter';
import IOrderRouter from '@modules/server.common/routers/IOrderRouter';
import { asyncListener, observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import * as Stripe from 'stripe';
@@ -430,9 +430,7 @@ export class OrdersService extends DBService<Order>

if (!wProduct) {
throw new Error(
`WarehouseOrdersService got call to create(userId, orderProducts) - But there is no product with the id ${
args.productId
}!`
`WarehouseOrdersService got call to create(userId, orderProducts) - But there is no product with the id ${args.productId}!`
);
}

@@ -538,9 +536,7 @@ export class OrdersService extends DBService<Order>

if (!wProduct) {
throw new Error(
`WarehouseOrdersService got call to create(userId, orderProducts) - But there is no product with the id ${
args.productId
}!`
`WarehouseOrdersService got call to create(userId, orderProducts) - But there is no product with the id ${args.productId}!`
);
}

@@ -2,11 +2,11 @@ import * as Logger from 'bunyan';
import { injectable } from 'inversify';
import { createEverLogger } from '../../helpers/Log';
import { DBService } from '@pyro/db-server';
import IProductsCategoryRouter from '../../modules/server.common/routers/IProductsCategoryRouter';
import IProductsCategoryRouter from '@modules/server.common/routers/IProductsCategoryRouter';
import { Observable } from 'rxjs';
import { asyncListener, observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import ProductsCategory from '../../modules/server.common/entities/ProductsCategory';
import ProductsCategory from '@modules/server.common/entities/ProductsCategory';
import { UpdateObject } from '@pyro/db/db-update-object';
import { CreateObject } from '@pyro/db/db-create-object';
import { first, switchMap, map } from 'rxjs/operators';
@@ -1,10 +1,10 @@
import * as Logger from 'bunyan';
import { injectable } from 'inversify';
import { createEverLogger } from '../../helpers/Log';
import Product from '../../modules/server.common/entities/Product';
import Product from '@modules/server.common/entities/Product';
import { DBService } from '@pyro/db-server';
import { default as IProduct } from '../../modules/server.common/interfaces/IProduct';
import IProductRouter from '../../modules/server.common/routers/IProductRouter';
import { default as IProduct } from '@modules/server.common/interfaces/IProduct';
import IProductRouter from '@modules/server.common/routers/IProductRouter';
import { Observable } from 'rxjs';
import {
asyncListener,
@@ -1,16 +1,16 @@
import { inject, injectable, LazyServiceIdentifer } from 'inversify';
import * as _ from 'lodash';
import { OrdersService } from '../orders';
import Order from '../../modules/server.common/entities/Order';
import Order from '@modules/server.common/entities/Order';
import { UsersService } from './UsersService';
import { createEverLogger } from '../../helpers/Log';
import IUserOrdersRouter from '../../modules/server.common/routers/IUserOrdersRouter';
import IUserOrdersRouter from '@modules/server.common/routers/IUserOrdersRouter';
import { observableListener, routerName } from '@pyro/io';
import IService from '../IService';
import { ExistenceEventType } from '@pyro/db-server';
import { concat, of, Observable } from 'rxjs';
import { exhaustMap, filter, share } from 'rxjs/operators';
import User from '../../modules/server.common/entities/User';
import User from '@modules/server.common/entities/User';
import mongoose = require('mongoose');
import { ObjectId } from 'mongodb';
import OrderCarrierStatus from '@modules/server.common/enums/OrderCarrierStatus';
@@ -1,24 +1,24 @@
import { injectable } from 'inversify';
import { createEverLogger } from '../../helpers/Log';
import * as Logger from 'bunyan';
import WarehouseProduct from '../../modules/server.common/entities/WarehouseProduct';
import WarehouseProduct from '@modules/server.common/entities/WarehouseProduct';
import { WarehousesService } from './WarehousesService';
import IWarehouseProduct, {
IWarehouseProductCreateObject
} from '../../modules/server.common/interfaces/IWarehouseProduct';
} from '@modules/server.common/interfaces/IWarehouseProduct';
import * as _ from 'lodash';
import Warehouse from '../../modules/server.common/entities/Warehouse';
import IWarehouse from '../../modules/server.common/interfaces/IWarehouse';
import Warehouse from '@modules/server.common/entities/Warehouse';
import IWarehouse from '@modules/server.common/interfaces/IWarehouse';
import { ExistenceEventType, DBService } from '@pyro/db-server';
import { Observable } from 'rxjs';
import IWarehouseProductsRouter from '../../modules/server.common/routers/IWarehouseProductsRouter';
import IWarehouseProductsRouter from '@modules/server.common/routers/IWarehouseProductsRouter';
import {
asyncListener,
observableListener,
routerName,
serialization
} from '@pyro/io';
import IProduct from '../../modules/server.common/interfaces/IProduct';
import IProduct from '@modules/server.common/interfaces/IProduct';
import IService from '../IService';
import { exhaustMap, first, map } from 'rxjs/operators';
import { of } from 'rxjs/observable/of';
@@ -460,9 +460,7 @@ export class WarehousesProductsService

if (product != null) {
this.log.info(
`Product price before: ${
product.price
} and we want to change it to: ${price}`
`Product price before: ${product.price} and we want to change it to: ${price}`
);
product.price = price;

@@ -515,9 +513,7 @@ export class WarehousesProductsService

if (product != null) {
this.log.info(
`Product count before remove: ${
product.count
} and we want to remove ${count} products`
`Product count before remove: ${product.count} and we want to remove ${count} products`
);

if (product.count >= count) {
@@ -582,9 +578,7 @@ export class WarehousesProductsService

if (product != null) {
this.log.info(
`Product sold count before decrease: ${
product.soldCount
} and we want to decrease ${count} products`
`Product sold count before decrease: ${product.soldCount} and we want to decrease ${count} products`
);

if (product.soldCount >= count) {
@@ -3,13 +3,13 @@ import * as _ from 'lodash';
import { inject, injectable } from 'inversify';
import { ProductsService } from '../products';
import { createEverLogger } from '../../helpers/Log';
import Warehouse from '../../modules/server.common/entities/Warehouse';
import { default as IWarehouse } from '../../modules/server.common/interfaces/IWarehouse';
import Warehouse from '@modules/server.common/entities/Warehouse';
import { default as IWarehouse } from '@modules/server.common/interfaces/IWarehouse';
import { IGeoLocationCreateObject } from '@modules/server.common/interfaces/IGeoLocation';
import { Observable } from 'rxjs';
import IWarehouseRouter, {
IWarehouseRegistrationInput
} from '../../modules/server.common/routers/IWarehouseRouter';
} from '@modules/server.common/routers/IWarehouseRouter';
import {
asyncListener,
observableListener,

0 comments on commit d01d26f

Please sign in to comment.
You can’t perform that action at this time.