@bytebrand/export-cars 1.0.11 → 1.0.12
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.12",
|
|
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": "a00f3e2f8028d22be76d15fbda2a5b143375ded3"
|
|
68
68
|
}
|
|
@@ -91,7 +91,7 @@ export class MobileExporter implements Exporter {
|
|
|
91
91
|
return new Promise((resolve, reject) => {
|
|
92
92
|
lastValueFrom(
|
|
93
93
|
this.httpService.get(imageUrl, {
|
|
94
|
-
|
|
94
|
+
responseType: 'arraybuffer',
|
|
95
95
|
}),
|
|
96
96
|
)
|
|
97
97
|
.then(async ({ data }) => {
|
|
@@ -102,15 +102,16 @@ export class MobileExporter implements Exporter {
|
|
|
102
102
|
// `${vehicleId}_${index + 1}${extname(imageUrl) || '.jpg'}`,
|
|
103
103
|
// ),
|
|
104
104
|
// );
|
|
105
|
+
// pipeline(data, writer).then(resolve).catch(reject);
|
|
106
|
+
|
|
105
107
|
const imageFile = join(
|
|
106
108
|
this.configService.config.pathesConfig.localConvertedDirectory,
|
|
107
109
|
'images',
|
|
108
110
|
`${vehicleId}_${index + 1}${extname(imageUrl) || '.jpg'}`,
|
|
109
111
|
);
|
|
110
112
|
|
|
111
|
-
await writeFile(imageFile,
|
|
113
|
+
await writeFile(imageFile, data, { flag: 'w' });
|
|
112
114
|
resolve(imageFile);
|
|
113
|
-
// pipeline(data, writer).then(resolve).catch(reject);
|
|
114
115
|
})
|
|
115
116
|
.catch(reject);
|
|
116
117
|
});
|