@bytebrand/export-cars 1.0.13 → 1.0.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/export-cars",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "bytebrand",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=14.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "096d9d9ff57b54b5fe3ac91597e463cd657f1a69"
|
|
68
68
|
}
|
|
@@ -90,17 +90,16 @@ export class MobileExporter implements Exporter {
|
|
|
90
90
|
imageUrls.map(async (imageUrl, index) => {
|
|
91
91
|
const response = await lastValueFrom(
|
|
92
92
|
this.httpService.get(imageUrl, {
|
|
93
|
-
responseType: '
|
|
93
|
+
responseType: 'arraybuffer',
|
|
94
94
|
}),
|
|
95
95
|
);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`${vehicleId}_${index + 1}${extname(imageUrl) || '.jpg'}`,
|
|
101
|
-
),
|
|
96
|
+
const imageFile = join(
|
|
97
|
+
this.configService.config.pathesConfig.localConvertedDirectory,
|
|
98
|
+
'images',
|
|
99
|
+
`${vehicleId}_${index + 1}${extname(imageUrl) || '.jpg'}`,
|
|
102
100
|
);
|
|
103
|
-
|
|
101
|
+
|
|
102
|
+
return writeFile(imageFile, response.data, { flag: 'w' });
|
|
104
103
|
}),
|
|
105
104
|
);
|
|
106
105
|
}
|
package/src/main.ts
CHANGED
|
@@ -3,12 +3,6 @@ import { CommandFactory } from 'nest-commander';
|
|
|
3
3
|
import { AppModule } from './app.module';
|
|
4
4
|
|
|
5
5
|
async function bootstrap() {
|
|
6
|
-
// setInterval(() => {
|
|
7
|
-
// Object.entries(process.memoryUsage()).forEach(item =>
|
|
8
|
-
// console.log(`${item[0]}: ${(item[1] / 1024 / 1024).toFixed(4)} MB`),
|
|
9
|
-
// );
|
|
10
|
-
// console.log('\n');
|
|
11
|
-
// }, 10000);
|
|
12
6
|
try {
|
|
13
7
|
await CommandFactory.run(AppModule, console);
|
|
14
8
|
LoggerService.complete();
|