@rafikidota/cuba-ofertas-scraping 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/index.d.ts +7 -0
- package/dist/modules/index.js +7 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/processor/processor.module.js +5 -3
- package/dist/modules/processor/processor.module.js.map +1 -1
- package/dist/modules/rabbitmq/rabbitmq.module.d.ts +3 -1
- package/dist/modules/rabbitmq/rabbitmq.module.js +21 -20
- package/dist/modules/rabbitmq/rabbitmq.module.js.map +1 -1
- package/dist/modules/rabbitmq/types/queue.config.d.ts +4 -0
- package/dist/modules/rabbitmq/types/queue.config.js +3 -0
- package/dist/modules/rabbitmq/types/queue.config.js.map +1 -0
- package/dist/modules/repository/config/database.config.d.ts +5 -0
- package/dist/modules/repository/config/database.config.js +23 -0
- package/dist/modules/repository/config/database.config.js.map +1 -0
- package/dist/modules/repository/entities/category.entity.d.ts +6 -0
- package/dist/modules/repository/entities/category.entity.js +36 -0
- package/dist/modules/repository/entities/category.entity.js.map +1 -0
- package/dist/modules/repository/entities/image.entity.d.ts +5 -0
- package/dist/modules/repository/entities/image.entity.js +32 -0
- package/dist/modules/repository/entities/image.entity.js.map +1 -0
- package/dist/modules/repository/entities/product.entity.d.ts +27 -0
- package/dist/modules/repository/entities/product.entity.js +120 -0
- package/dist/modules/repository/entities/product.entity.js.map +1 -0
- package/dist/modules/repository/entities/provider.entity.d.ts +5 -0
- package/dist/modules/repository/entities/provider.entity.js +32 -0
- package/dist/modules/repository/entities/provider.entity.js.map +1 -0
- package/dist/modules/repository/entities/province.entity.d.ts +6 -0
- package/dist/modules/repository/entities/province.entity.js +36 -0
- package/dist/modules/repository/entities/province.entity.js.map +1 -0
- package/dist/modules/repository/repository.module.d.ts +3 -0
- package/dist/modules/repository/repository.module.js +34 -13
- package/dist/modules/repository/repository.module.js.map +1 -1
- package/dist/modules/repository/repository.service.d.ts +6 -16
- package/dist/modules/repository/repository.service.js +14 -59
- package/dist/modules/repository/repository.service.js.map +1 -1
- package/dist/modules/repository/services/category.repository.service.d.ts +7 -5
- package/dist/modules/repository/services/category.repository.service.js +39 -16
- package/dist/modules/repository/services/category.repository.service.js.map +1 -1
- package/dist/modules/repository/services/image.repository.service.d.ts +7 -5
- package/dist/modules/repository/services/image.repository.service.js +39 -16
- package/dist/modules/repository/services/image.repository.service.js.map +1 -1
- package/dist/modules/repository/services/product.repository.service.d.ts +8 -5
- package/dist/modules/repository/services/product.repository.service.js +45 -17
- package/dist/modules/repository/services/product.repository.service.js.map +1 -1
- package/dist/modules/repository/services/provider.repository.service.d.ts +7 -5
- package/dist/modules/repository/services/provider.repository.service.js +39 -16
- package/dist/modules/repository/services/provider.repository.service.js.map +1 -1
- package/dist/modules/repository/services/province.repository.service.d.ts +7 -5
- package/dist/modules/repository/services/province.repository.service.js +39 -16
- package/dist/modules/repository/services/province.repository.service.js.map +1 -1
- package/package.json +5 -1
package/dist/modules/index.d.ts
CHANGED
|
@@ -24,10 +24,17 @@ export * from './publisher/publisher.module';
|
|
|
24
24
|
export * from './publisher/publisher.service';
|
|
25
25
|
export * from './rabbitmq/env/rabbitmq.env.config';
|
|
26
26
|
export * from './rabbitmq/env/rabbitmq.env.validation';
|
|
27
|
+
export * from './rabbitmq/types/queue.config';
|
|
27
28
|
export * from './rabbitmq/rabbitmq.module';
|
|
28
29
|
export * from './rabbitmq/rabbitmq.service';
|
|
29
30
|
export * from './repository/repository.module';
|
|
30
31
|
export * from './repository/repository.service';
|
|
32
|
+
export * from './repository/services/category.repository.service';
|
|
33
|
+
export * from './repository/services/image.repository.service';
|
|
34
|
+
export * from './repository/services/product.repository.service';
|
|
35
|
+
export * from './repository/services/provider.repository.service';
|
|
36
|
+
export * from './repository/services/province.repository.service';
|
|
37
|
+
export * from './repository/config/database.config';
|
|
31
38
|
export * from './storage/storage.module';
|
|
32
39
|
export * from './storage/storage.service';
|
|
33
40
|
export * from './telegram/env/telegram.env.config';
|
package/dist/modules/index.js
CHANGED
|
@@ -40,10 +40,17 @@ __exportStar(require("./publisher/publisher.module"), exports);
|
|
|
40
40
|
__exportStar(require("./publisher/publisher.service"), exports);
|
|
41
41
|
__exportStar(require("./rabbitmq/env/rabbitmq.env.config"), exports);
|
|
42
42
|
__exportStar(require("./rabbitmq/env/rabbitmq.env.validation"), exports);
|
|
43
|
+
__exportStar(require("./rabbitmq/types/queue.config"), exports);
|
|
43
44
|
__exportStar(require("./rabbitmq/rabbitmq.module"), exports);
|
|
44
45
|
__exportStar(require("./rabbitmq/rabbitmq.service"), exports);
|
|
45
46
|
__exportStar(require("./repository/repository.module"), exports);
|
|
46
47
|
__exportStar(require("./repository/repository.service"), exports);
|
|
48
|
+
__exportStar(require("./repository/services/category.repository.service"), exports);
|
|
49
|
+
__exportStar(require("./repository/services/image.repository.service"), exports);
|
|
50
|
+
__exportStar(require("./repository/services/product.repository.service"), exports);
|
|
51
|
+
__exportStar(require("./repository/services/provider.repository.service"), exports);
|
|
52
|
+
__exportStar(require("./repository/services/province.repository.service"), exports);
|
|
53
|
+
__exportStar(require("./repository/config/database.config"), exports);
|
|
47
54
|
__exportStar(require("./storage/storage.module"), exports);
|
|
48
55
|
__exportStar(require("./storage/storage.service"), exports);
|
|
49
56
|
__exportStar(require("./telegram/env/telegram.env.config"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,8EAA4D;AAC5D,sFAAoE;AACpE,oFAAkE;AAClE,8EAA4D;AAE5D,iEAA+C;AAC/C,kEAAgD;AAEhD,iEAA+C;AAC/C,qEAAmD;AACnD,2DAAyC;AACzC,4DAA0C;AAC1C,6EAA2D;AAC3D,6EAA2D;AAC3D,8EAA4D;AAE5D,yDAAuC;AAEvC,uDAAqC;AACrC,wDAAsC;AACtC,+DAA6C;AAC7C,mEAAiD;AAEjD,+DAA6C;AAC7C,gEAA8C;AAE9C,+DAA6C;AAC7C,gEAA8C;AAE9C,qEAAmD;AACnD,yEAAuD;AACvD,6DAA2C;AAC3C,8DAA4C;AAE5C,iEAA+C;AAC/C,kEAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,8EAA4D;AAC5D,sFAAoE;AACpE,oFAAkE;AAClE,8EAA4D;AAE5D,iEAA+C;AAC/C,kEAAgD;AAEhD,iEAA+C;AAC/C,qEAAmD;AACnD,2DAAyC;AACzC,4DAA0C;AAC1C,6EAA2D;AAC3D,6EAA2D;AAC3D,8EAA4D;AAE5D,yDAAuC;AAEvC,uDAAqC;AACrC,wDAAsC;AACtC,+DAA6C;AAC7C,mEAAiD;AAEjD,+DAA6C;AAC7C,gEAA8C;AAE9C,+DAA6C;AAC7C,gEAA8C;AAE9C,qEAAmD;AACnD,yEAAuD;AACvD,gEAA8C;AAC9C,6DAA2C;AAC3C,8DAA4C;AAE5C,iEAA+C;AAC/C,kEAAgD;AAChD,oFAAkE;AAClE,iFAA+D;AAC/D,mFAAiE;AACjE,oFAAkE;AAClE,oFAAkE;AAClE,sEAAoD;AAEpD,2DAAyC;AACzC,4DAA0C;AAE1C,qEAAmD;AACnD,yEAAuD;AACvD,6DAA2C;AAC3C,8DAA4C;AAE5C,6DAA2C;AAC3C,8DAA4C;AAE5C,uEAAqD;AACrD,2EAAyD;AACzD,+DAA6C;AAC7C,gEAA8C"}
|
|
@@ -18,9 +18,11 @@ exports.ProcessorModule = ProcessorModule;
|
|
|
18
18
|
exports.ProcessorModule = ProcessorModule = __decorate([
|
|
19
19
|
(0, common_1.Module)({
|
|
20
20
|
imports: [
|
|
21
|
-
rabbitmq_module_1.RabbitMQModule.
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
rabbitmq_module_1.RabbitMQModule.forQueues([
|
|
22
|
+
{ queue: queue_name_1.QueueName.DEV, token: queue_token_1.QueueToken.DEV },
|
|
23
|
+
{ queue: queue_name_1.QueueName.QA, token: queue_token_1.QueueToken.QA },
|
|
24
|
+
{ queue: queue_name_1.QueueName.PROD, token: queue_token_1.QueueToken.PROD },
|
|
25
|
+
]),
|
|
24
26
|
],
|
|
25
27
|
providers: [processor_service_1.ProcessorService],
|
|
26
28
|
exports: [processor_service_1.ProcessorService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor.module.js","sourceRoot":"","sources":["../../../src/modules/processor/processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,iEAA6D;AAC7D,2DAAuD;AACvD,kDAA8C;AAC9C,oDAAgD;
|
|
1
|
+
{"version":3,"file":"processor.module.js","sourceRoot":"","sources":["../../../src/modules/processor/processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,iEAA6D;AAC7D,2DAAuD;AACvD,kDAA8C;AAC9C,oDAAgD;AAazC,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAX3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,gCAAc,CAAC,SAAS,CAAC;gBACvB,EAAE,KAAK,EAAE,sBAAS,CAAC,GAAG,EAAE,KAAK,EAAE,wBAAU,CAAC,GAAG,EAAE;gBAC/C,EAAE,KAAK,EAAE,sBAAS,CAAC,EAAE,EAAE,KAAK,EAAE,wBAAU,CAAC,EAAE,EAAE;gBAC7C,EAAE,KAAK,EAAE,sBAAS,CAAC,IAAI,EAAE,KAAK,EAAE,wBAAU,CAAC,IAAI,EAAE;aAClD,CAAC;SACH;QACD,SAAS,EAAE,CAAC,oCAAgB,CAAC;QAC7B,OAAO,EAAE,CAAC,oCAAgB,CAAC;KAC5B,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { QueueConfig } from './types/queue.config';
|
|
2
3
|
export declare class RabbitMQModule {
|
|
3
|
-
static
|
|
4
|
+
static forQueues(queues: QueueConfig[]): DynamicModule;
|
|
5
|
+
static forRoot(queue: string, token?: string): DynamicModule;
|
|
4
6
|
}
|
|
@@ -16,35 +16,36 @@ const config_2 = require("@nestjs/config");
|
|
|
16
16
|
const rabbitmq_env_config_1 = require("./env/rabbitmq.env.config");
|
|
17
17
|
const rabbitmq_1 = require("../../common/constant/rabbitmq");
|
|
18
18
|
let RabbitMQModule = RabbitMQModule_1 = class RabbitMQModule {
|
|
19
|
-
static
|
|
20
|
-
const
|
|
19
|
+
static forQueues(queues) {
|
|
20
|
+
const clients = queues.map((config) => ({
|
|
21
|
+
name: config.token,
|
|
22
|
+
imports: [config_1.ConfigModule],
|
|
23
|
+
inject: [config_2.ConfigService],
|
|
24
|
+
useFactory: (service) => {
|
|
25
|
+
const server = service.get(rabbitmq_1.RABBITMQ_SERVER_URL);
|
|
26
|
+
return {
|
|
27
|
+
transport: microservices_2.Transport.RMQ,
|
|
28
|
+
options: {
|
|
29
|
+
urls: [server],
|
|
30
|
+
queue: config.queue,
|
|
31
|
+
queueOptions: { durable: true },
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
}));
|
|
21
36
|
return {
|
|
22
37
|
module: RabbitMQModule_1,
|
|
23
38
|
imports: [
|
|
24
39
|
config_1.ConfigModule.forFeature(rabbitmq_env_config_1.RabbitmqEnvConfig),
|
|
25
|
-
microservices_1.ClientsModule.registerAsync(
|
|
26
|
-
{
|
|
27
|
-
name: ServiceToken,
|
|
28
|
-
imports: [config_1.ConfigModule],
|
|
29
|
-
inject: [config_2.ConfigService],
|
|
30
|
-
useFactory: (service) => {
|
|
31
|
-
const server = service.get(rabbitmq_1.RABBITMQ_SERVER_URL);
|
|
32
|
-
return {
|
|
33
|
-
transport: microservices_2.Transport.RMQ,
|
|
34
|
-
options: {
|
|
35
|
-
urls: [server],
|
|
36
|
-
queue,
|
|
37
|
-
queueOptions: { durable: true },
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
]),
|
|
40
|
+
microservices_1.ClientsModule.registerAsync(clients),
|
|
43
41
|
],
|
|
44
42
|
exports: [microservices_1.ClientsModule],
|
|
45
43
|
providers: [],
|
|
46
44
|
};
|
|
47
45
|
}
|
|
46
|
+
static forRoot(queue, token = 'RABBITMQ_SERVICE') {
|
|
47
|
+
return this.forQueues([{ queue, token }]);
|
|
48
|
+
}
|
|
48
49
|
};
|
|
49
50
|
exports.RabbitMQModule = RabbitMQModule;
|
|
50
51
|
exports.RabbitMQModule = RabbitMQModule = RabbitMQModule_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rabbitmq.module.js","sourceRoot":"","sources":["../../../src/modules/rabbitmq/rabbitmq.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAwC;AAExC,yDAAsD;AACtD,yDAAkD;AAClD,2CAA8C;AAC9C,2CAA+C;AAE/C,mEAA8D;AAC9D,6DAAqE;
|
|
1
|
+
{"version":3,"file":"rabbitmq.module.js","sourceRoot":"","sources":["../../../src/modules/rabbitmq/rabbitmq.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAwC;AAExC,yDAAsD;AACtD,yDAAkD;AAClD,2CAA8C;AAC9C,2CAA+C;AAE/C,mEAA8D;AAC9D,6DAAqE;AAI9D,IAAM,cAAc,sBAApB,MAAM,cAAc;IACzB,MAAM,CAAC,SAAS,CAAC,MAAqB;QACpC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACtC,IAAI,EAAE,MAAM,CAAC,KAAK;YAClB,OAAO,EAAE,CAAC,qBAAY,CAAC;YACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;YACvB,UAAU,EAAE,CAAC,OAAsB,EAAE,EAAE;gBACrC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAS,8BAAmB,CAAC,CAAC;gBACxD,OAAO;oBACL,SAAS,EAAE,yBAAS,CAAC,GAAY;oBACjC,OAAO,EAAE;wBACP,IAAI,EAAE,CAAC,MAAM,CAAC;wBACd,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;qBAChC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,MAAM,EAAE,gBAAc;YACtB,OAAO,EAAE;gBACP,qBAAY,CAAC,UAAU,CAAC,uCAAiB,CAAC;gBAC1C,6BAAa,CAAC,aAAa,CAAC,OAAO,CAAC;aACrC;YACD,OAAO,EAAE,CAAC,6BAAa,CAAC;YACxB,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,KAAa,EAAE,KAAK,GAAG,kBAAkB;QACtD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF,CAAA;AAjCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,cAAc,CAiC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.config.js","sourceRoot":"","sources":["../../../../src/modules/rabbitmq/types/queue.config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
2
|
+
import { ImageEntity } from '../entities/image.entity';
|
|
3
|
+
import { ProvinceEntity } from '../entities/province.entity';
|
|
4
|
+
export declare const ENTITIES: (typeof ProvinceEntity | typeof ImageEntity)[];
|
|
5
|
+
export declare const DefaultDatabaseConfig: TypeOrmModuleOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultDatabaseConfig = exports.ENTITIES = void 0;
|
|
4
|
+
const product_entity_1 = require("../entities/product.entity");
|
|
5
|
+
const category_entity_1 = require("../entities/category.entity");
|
|
6
|
+
const image_entity_1 = require("../entities/image.entity");
|
|
7
|
+
const provider_entity_1 = require("../entities/provider.entity");
|
|
8
|
+
const province_entity_1 = require("../entities/province.entity");
|
|
9
|
+
exports.ENTITIES = [
|
|
10
|
+
product_entity_1.ProductEntity,
|
|
11
|
+
category_entity_1.CategoryEntity,
|
|
12
|
+
image_entity_1.ImageEntity,
|
|
13
|
+
provider_entity_1.ProviderEntity,
|
|
14
|
+
province_entity_1.ProvinceEntity,
|
|
15
|
+
];
|
|
16
|
+
exports.DefaultDatabaseConfig = {
|
|
17
|
+
type: 'better-sqlite3',
|
|
18
|
+
database: './data/scraping.db',
|
|
19
|
+
synchronize: true,
|
|
20
|
+
logging: false,
|
|
21
|
+
entities: exports.ENTITIES,
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=database.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.config.js","sourceRoot":"","sources":["../../../../src/modules/repository/config/database.config.ts"],"names":[],"mappings":";;;AACA,+DAA2D;AAC3D,iEAA6D;AAC7D,2DAAuD;AACvD,iEAA6D;AAC7D,iEAA6D;AAEhD,QAAA,QAAQ,GAAG;IACtB,8BAAa;IACb,gCAAc;IACd,0BAAW;IACX,gCAAc;IACd,gCAAc;CACf,CAAC;AAEW,QAAA,qBAAqB,GAAyB;IACzD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,oBAAoB;IAC9B,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,gBAAQ;CACnB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CategoryEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let CategoryEntity = class CategoryEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.CategoryEntity = CategoryEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], CategoryEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CategoryEntity.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CategoryEntity.prototype, "url", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CategoryEntity.prototype, "parentId", void 0);
|
|
33
|
+
exports.CategoryEntity = CategoryEntity = __decorate([
|
|
34
|
+
(0, typeorm_1.Entity)('categories')
|
|
35
|
+
], CategoryEntity);
|
|
36
|
+
//# sourceMappingURL=category.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../../src/modules/repository/entities/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AAGjD,IAAM,cAAc,GAApB,MAAM,cAAc;CAY1B,CAAA;AAZY,wCAAc;AAEzB;IADC,IAAA,uBAAa,GAAE;;0CACL;AAGX;IADC,IAAA,gBAAM,GAAE;;4CACI;AAGb;IADC,IAAA,gBAAM,GAAE;;2CACG;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACT;yBAXP,cAAc;IAD1B,IAAA,gBAAM,EAAC,YAAY,CAAC;GACR,cAAc,CAY1B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ImageEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ImageEntity = class ImageEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.ImageEntity = ImageEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], ImageEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ImageEntity.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ImageEntity.prototype, "url", void 0);
|
|
29
|
+
exports.ImageEntity = ImageEntity = __decorate([
|
|
30
|
+
(0, typeorm_1.Entity)('images')
|
|
31
|
+
], ImageEntity);
|
|
32
|
+
//# sourceMappingURL=image.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.entity.js","sourceRoot":"","sources":["../../../../src/modules/repository/entities/image.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AAGjD,IAAM,WAAW,GAAjB,MAAM,WAAW;CASvB,CAAA;AATY,kCAAW;AAEtB;IADC,IAAA,uBAAa,GAAE;;uCACL;AAGX;IADC,IAAA,gBAAM,GAAE;;yCACI;AAGb;IADC,IAAA,gBAAM,GAAE;;wCACG;sBARD,WAAW;IADvB,IAAA,gBAAM,EAAC,QAAQ,CAAC;GACJ,WAAW,CASvB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare class ProductEntity {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
description: string;
|
|
6
|
+
currentPrice: number;
|
|
7
|
+
oldPrice: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
categories: string[];
|
|
10
|
+
mainCategory: string;
|
|
11
|
+
image: string;
|
|
12
|
+
extraImages: string[];
|
|
13
|
+
manufacturer: string;
|
|
14
|
+
provider: string;
|
|
15
|
+
provinces: string[];
|
|
16
|
+
freeShipping: boolean;
|
|
17
|
+
orders: number;
|
|
18
|
+
rating: number;
|
|
19
|
+
reviewsCount: number;
|
|
20
|
+
stockQuantity: number;
|
|
21
|
+
priceByWeight: number;
|
|
22
|
+
currencyByWeight: string;
|
|
23
|
+
weightUnit: number;
|
|
24
|
+
buyPrice: number;
|
|
25
|
+
classification: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ProductEntity = class ProductEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.ProductEntity = ProductEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], ProductEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ProductEntity.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ProductEntity.prototype, "url", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ProductEntity.prototype, "description", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], ProductEntity.prototype, "currentPrice", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true, default: 0 }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ProductEntity.prototype, "oldPrice", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ nullable: true, default: 'USD' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ProductEntity.prototype, "currency", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], ProductEntity.prototype, "categories", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], ProductEntity.prototype, "mainCategory", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], ProductEntity.prototype, "image", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], ProductEntity.prototype, "extraImages", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], ProductEntity.prototype, "manufacturer", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ProductEntity.prototype, "provider", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], ProductEntity.prototype, "provinces", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true, default: false }),
|
|
75
|
+
__metadata("design:type", Boolean)
|
|
76
|
+
], ProductEntity.prototype, "freeShipping", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true, default: 0 }),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], ProductEntity.prototype, "orders", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true, default: 0 }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], ProductEntity.prototype, "rating", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true, default: 0 }),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], ProductEntity.prototype, "reviewsCount", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true, default: 0 }),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], ProductEntity.prototype, "stockQuantity", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true, default: 0 }),
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
|
+
], ProductEntity.prototype, "priceByWeight", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], ProductEntity.prototype, "currencyByWeight", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true, default: 0 }),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], ProductEntity.prototype, "weightUnit", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({ type: 'float', nullable: true, default: 0 }),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], ProductEntity.prototype, "buyPrice", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], ProductEntity.prototype, "classification", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], ProductEntity.prototype, "slug", void 0);
|
|
117
|
+
exports.ProductEntity = ProductEntity = __decorate([
|
|
118
|
+
(0, typeorm_1.Entity)('products')
|
|
119
|
+
], ProductEntity);
|
|
120
|
+
//# sourceMappingURL=product.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../src/modules/repository/entities/product.entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProviderEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ProviderEntity = class ProviderEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.ProviderEntity = ProviderEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], ProviderEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ProviderEntity.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ProviderEntity.prototype, "url", void 0);
|
|
29
|
+
exports.ProviderEntity = ProviderEntity = __decorate([
|
|
30
|
+
(0, typeorm_1.Entity)('providers')
|
|
31
|
+
], ProviderEntity);
|
|
32
|
+
//# sourceMappingURL=provider.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.entity.js","sourceRoot":"","sources":["../../../../src/modules/repository/entities/provider.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AAGjD,IAAM,cAAc,GAApB,MAAM,cAAc;CAS1B,CAAA;AATY,wCAAc;AAEzB;IADC,IAAA,uBAAa,GAAE;;0CACL;AAGX;IADC,IAAA,gBAAM,GAAE;;4CACI;AAGb;IADC,IAAA,gBAAM,GAAE;;2CACG;yBARD,cAAc;IAD1B,IAAA,gBAAM,EAAC,WAAW,CAAC;GACP,cAAc,CAS1B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProvinceEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ProvinceEntity = class ProvinceEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.ProvinceEntity = ProvinceEntity;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], ProvinceEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ProvinceEntity.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
27
|
+
__metadata("design:type", Array)
|
|
28
|
+
], ProvinceEntity.prototype, "municipalities", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true, default: false }),
|
|
31
|
+
__metadata("design:type", Boolean)
|
|
32
|
+
], ProvinceEntity.prototype, "hasProducts", void 0);
|
|
33
|
+
exports.ProvinceEntity = ProvinceEntity = __decorate([
|
|
34
|
+
(0, typeorm_1.Entity)('provinces')
|
|
35
|
+
], ProvinceEntity);
|
|
36
|
+
//# sourceMappingURL=province.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"province.entity.js","sourceRoot":"","sources":["../../../../src/modules/repository/entities/province.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AAGjD,IAAM,cAAc,GAApB,MAAM,cAAc;CAY1B,CAAA;AAZY,wCAAc;AAEzB;IADC,IAAA,uBAAa,GAAE;;0CACL;AAGX;IADC,IAAA,gBAAM,GAAE;;4CACI;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACzB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mDACtC;yBAXX,cAAc;IAD1B,IAAA,gBAAM,EAAC,WAAW,CAAC;GACP,cAAc,CAY1B"}
|
|
@@ -5,29 +5,50 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var RepositoryModule_1;
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.RepositoryModule = void 0;
|
|
10
11
|
const common_1 = require("@nestjs/common");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
11
13
|
const repository_service_1 = require("./repository.service");
|
|
12
14
|
const category_repository_service_1 = require("./services/category.repository.service");
|
|
13
15
|
const product_repository_service_1 = require("./services/product.repository.service");
|
|
14
16
|
const provider_repository_service_1 = require("./services/provider.repository.service");
|
|
15
17
|
const province_repository_service_1 = require("./services/province.repository.service");
|
|
16
18
|
const image_repository_service_1 = require("./services/image.repository.service");
|
|
17
|
-
|
|
19
|
+
const database_config_1 = require("./config/database.config");
|
|
20
|
+
let RepositoryModule = RepositoryModule_1 = class RepositoryModule {
|
|
21
|
+
static forRoot(config) {
|
|
22
|
+
const db = { ...database_config_1.DefaultDatabaseConfig, ...config };
|
|
23
|
+
return {
|
|
24
|
+
global: true,
|
|
25
|
+
module: RepositoryModule_1,
|
|
26
|
+
imports: [
|
|
27
|
+
typeorm_1.TypeOrmModule.forRoot({ ...db }),
|
|
28
|
+
typeorm_1.TypeOrmModule.forFeature(database_config_1.ENTITIES),
|
|
29
|
+
],
|
|
30
|
+
providers: [
|
|
31
|
+
repository_service_1.RepositoryService,
|
|
32
|
+
category_repository_service_1.CategoryRepositoryService,
|
|
33
|
+
image_repository_service_1.ImageRepositoryService,
|
|
34
|
+
product_repository_service_1.ProductRepositoryService,
|
|
35
|
+
provider_repository_service_1.ProviderRepositoryService,
|
|
36
|
+
province_repository_service_1.ProvinceRepositoryService,
|
|
37
|
+
],
|
|
38
|
+
exports: [
|
|
39
|
+
typeorm_1.TypeOrmModule,
|
|
40
|
+
repository_service_1.RepositoryService,
|
|
41
|
+
category_repository_service_1.CategoryRepositoryService,
|
|
42
|
+
image_repository_service_1.ImageRepositoryService,
|
|
43
|
+
product_repository_service_1.ProductRepositoryService,
|
|
44
|
+
provider_repository_service_1.ProviderRepositoryService,
|
|
45
|
+
province_repository_service_1.ProvinceRepositoryService,
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
18
49
|
};
|
|
19
50
|
exports.RepositoryModule = RepositoryModule;
|
|
20
|
-
exports.RepositoryModule = RepositoryModule = __decorate([
|
|
21
|
-
(0, common_1.Module)({
|
|
22
|
-
providers: [
|
|
23
|
-
repository_service_1.RepositoryService,
|
|
24
|
-
category_repository_service_1.CategoryRepositoryService,
|
|
25
|
-
image_repository_service_1.ImageRepositoryService,
|
|
26
|
-
product_repository_service_1.ProductRepositoryService,
|
|
27
|
-
provider_repository_service_1.ProviderRepositoryService,
|
|
28
|
-
province_repository_service_1.ProvinceRepositoryService,
|
|
29
|
-
],
|
|
30
|
-
exports: [repository_service_1.RepositoryService],
|
|
31
|
-
})
|
|
51
|
+
exports.RepositoryModule = RepositoryModule = RepositoryModule_1 = __decorate([
|
|
52
|
+
(0, common_1.Module)({})
|
|
32
53
|
], RepositoryModule);
|
|
33
54
|
//# sourceMappingURL=repository.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.module.js","sourceRoot":"","sources":["../../../src/modules/repository/repository.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repository.module.js","sourceRoot":"","sources":["../../../src/modules/repository/repository.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,6CAAsE;AAEtE,6DAAyD;AACzD,wFAAmF;AACnF,sFAAiF;AACjF,wFAAmF;AACnF,wFAAmF;AACnF,kFAA6E;AAC7E,8DAA2E;AAGpE,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAC3B,MAAM,CAAC,OAAO,CAAC,MAAsC;QACnD,MAAM,EAAE,GAAG,EAAE,GAAG,uCAAqB,EAAE,GAAG,MAAM,EAA0B,CAAC;QAE3E,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,kBAAgB;YACxB,OAAO,EAAE;gBACP,uBAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;gBAChC,uBAAa,CAAC,UAAU,CAAC,0BAAQ,CAAC;aACnC;YACD,SAAS,EAAE;gBACT,sCAAiB;gBACjB,uDAAyB;gBACzB,iDAAsB;gBACtB,qDAAwB;gBACxB,uDAAyB;gBACzB,uDAAyB;aAC1B;YACD,OAAO,EAAE;gBACP,uBAAa;gBACb,sCAAiB;gBACjB,uDAAyB;gBACzB,iDAAsB;gBACtB,qDAAwB;gBACxB,uDAAyB;gBACzB,uDAAyB;aAC1B;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA9BY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gBAAgB,CA8B5B"}
|