@bytebrand/export-cars 1.0.6 → 1.0.8
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/export.command.js +3 -5
- package/dist/export.command.js.map +1 -1
- package/dist/main.js +15 -2
- package/dist/main.js.map +1 -1
- package/dist/services/loader.service.js +1 -1
- package/dist/services/loader.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/export.command.ts +1 -3
- package/src/main.ts +21 -2
- package/src/services/loader.service.ts +1 -1
package/dist/export.command.js
CHANGED
|
@@ -8,7 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var ExportRunner_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.ExportRunner = void 0;
|
|
14
13
|
const nest_commander_1 = require("nest-commander");
|
|
@@ -16,11 +15,11 @@ const config_service_1 = require("./services/config.service");
|
|
|
16
15
|
const common_1 = require("@nestjs/common");
|
|
17
16
|
const export_schema_1 = require("./export.schema");
|
|
18
17
|
const core_1 = require("@nestjs/core");
|
|
19
|
-
let ExportRunner =
|
|
18
|
+
let ExportRunner = class ExportRunner extends nest_commander_1.CommandRunner {
|
|
20
19
|
inquirer;
|
|
21
20
|
configService;
|
|
22
21
|
moduleRef;
|
|
23
|
-
logger = new common_1.Logger(
|
|
22
|
+
logger = new common_1.Logger();
|
|
24
23
|
constructor(inquirer, configService, moduleRef) {
|
|
25
24
|
super();
|
|
26
25
|
this.inquirer = inquirer;
|
|
@@ -33,10 +32,9 @@ let ExportRunner = ExportRunner_1 = class ExportRunner extends nest_commander_1.
|
|
|
33
32
|
this.configService.config = new export_schema_1.exportSchema[input.params.exportType].config(input.params);
|
|
34
33
|
const exporter = await this.moduleRef.create(export_schema_1.exportSchema[input.params.exportType].exporter);
|
|
35
34
|
await exporter.export();
|
|
36
|
-
this.logger.log({ complete: 1, code: 0 });
|
|
37
35
|
}
|
|
38
36
|
};
|
|
39
|
-
ExportRunner =
|
|
37
|
+
ExportRunner = __decorate([
|
|
40
38
|
(0, nest_commander_1.Command)({
|
|
41
39
|
name: 'export',
|
|
42
40
|
options: { isDefault: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.command.js","sourceRoot":"","sources":["../src/export.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.command.js","sourceRoot":"","sources":["../src/export.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAyE;AACzE,8DAA0D;AAE1D,2CAAwC;AACxC,mDAA+C;AAC/C,uCAAyC;AAOlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,8BAAa;IAI1B;IACT;IACA;IALO,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAEvC,YACmB,QAAyB,EAClC,aAA4B,EAC5B,SAAoB;QAE5B,KAAK,EAAE,CAAC;QAJS,aAAQ,GAAR,QAAQ,CAAiB;QAClC,kBAAa,GAAb,aAAa,CAAe;QAC5B,cAAS,GAAT,SAAS,CAAW;IAG9B,CAAC;IAED,KAAK,CAAC,GAAG;QACP,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAmB,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAE9F,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEzE,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,IAAI,4BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3F,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAW,4BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvG,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC;CACF,CAAA;AApBY,YAAY;IAJxB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7B,CAAC;qCAK6B,gCAAe;QACnB,8BAAa;QACjB,gBAAS;GANnB,YAAY,CAoBxB;AApBY,oCAAY"}
|
package/dist/main.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const common_1 = require("@nestjs/common");
|
|
4
3
|
const nest_commander_1 = require("nest-commander");
|
|
5
4
|
const app_module_1 = require("./app.module");
|
|
5
|
+
const nest_winston_1 = require("nest-winston");
|
|
6
|
+
const winston_1 = require("winston");
|
|
6
7
|
async function bootstrap() {
|
|
7
|
-
|
|
8
|
+
try {
|
|
9
|
+
await nest_commander_1.CommandFactory.run(app_module_1.AppModule, nest_winston_1.WinstonModule.createLogger({
|
|
10
|
+
transports: [
|
|
11
|
+
new winston_1.transports.Console({
|
|
12
|
+
format: winston_1.format.combine(winston_1.format.splat(), winston_1.format.simple(), winston_1.format.colorize({ all: true })),
|
|
13
|
+
}),
|
|
14
|
+
],
|
|
15
|
+
}));
|
|
16
|
+
console.log({ complete: 1, code: 0 });
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
console.error({ description: e.message || e, complete: 1, code: 1 });
|
|
20
|
+
}
|
|
8
21
|
}
|
|
9
22
|
bootstrap();
|
|
10
23
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,mDAAgD;AAChD,6CAAyC;AACzC,+CAA6C;AAC7C,qCAAmF;AAEnF,KAAK,UAAU,SAAS;IACtB,IAAI;QACF,MAAM,+BAAc,CAAC,GAAG,CACtB,sBAAS,EACT,4BAAa,CAAC,YAAY,CAAC;YACzB,UAAU,EAAE;gBACV,IAAI,oBAAiB,CAAC,OAAO,CAAC;oBAC5B,MAAM,EAAE,gBAAa,CAAC,OAAO,CAC3B,gBAAa,CAAC,KAAK,EAAE,EACrB,gBAAa,CAAC,MAAM,EAAE,EACtB,gBAAa,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CACtC;iBACF,CAAC;aACH;SACF,CAAC,CACH,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;KACvC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;KACtE;AACH,CAAC;AAED,SAAS,EAAE,CAAC"}
|
|
@@ -30,7 +30,7 @@ let LoaderService = LoaderService_1 = class LoaderService {
|
|
|
30
30
|
this.loader.onChunk(async (chunk) => {
|
|
31
31
|
await fn(chunk);
|
|
32
32
|
const progress = ((0, lodash_1.toNumber)(chunk.id) + 1) / chunk.total;
|
|
33
|
-
this.logger.log(progress < 1 ? progress : 1);
|
|
33
|
+
this.logger.log(`progress - ${progress < 1 ? progress : 1}`);
|
|
34
34
|
});
|
|
35
35
|
this.loader.onError(reject);
|
|
36
36
|
return this.loader.start().then(resolve);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.service.js","sourceRoot":"","sources":["../../src/services/loader.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oDAAoF;AACpF,qDAAiD;AACjD,mCAAkC;AAG3B,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGJ;IAFH,MAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IAEzD,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE5C,MAAM,CAAoB;IAElC,OAAO,CAAC,EAA8C;QACpD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAO,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAuB,EAAE,EAAE;gBACpD,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;gBAEhB,MAAM,QAAQ,GAAG,CAAC,IAAA,iBAAQ,EAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;gBACxD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/
|
|
1
|
+
{"version":3,"file":"loader.service.js","sourceRoot":"","sources":["../../src/services/loader.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oDAAoF;AACpF,qDAAiD;AACjD,mCAAkC;AAG3B,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGJ;IAFH,MAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CA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