@runnerpro/backend 1.3.3 → 1.3.5
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.
|
@@ -133,8 +133,9 @@ const addShadowShareWorkoutmap = (context, useDefaultPhoto) => __awaiter(void 0,
|
|
|
133
133
|
const addImageShareWorkoutmap = (context, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
134
|
const image = yield jimp_1.default.read(data);
|
|
135
135
|
const filename2 = `share-${(0, uuidv4_1.uuid)()}.jpeg`;
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
const uploadsDir = path_1.default.resolve(process.cwd(), 'uploads');
|
|
137
|
+
yield image.cover(1080, 1080).writeAsync(path_1.default.join(uploadsDir, filename2));
|
|
138
|
+
const imagePath2 = path_1.default.join(uploadsDir, filename2);
|
|
138
139
|
const image2 = yield (0, canvas_1.loadImage)(imagePath2);
|
|
139
140
|
context.drawImage(image2, 0, 0, 1080, 1080);
|
|
140
141
|
context.fillStyle = 'rgba(0, 0, 0, 0.5)';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateShareMap.d.ts","sourceRoot":"","sources":["../../../../src/image/generateShareMap.ts"],"names":[],"mappings":";AAcA,QAAA,MAAM,gBAAgB,+DAkBrB,CAAA;
|
|
1
|
+
{"version":3,"file":"generateShareMap.d.ts","sourceRoot":"","sources":["../../../../src/image/generateShareMap.ts"],"names":[],"mappings":";AAcA,QAAA,MAAM,gBAAgB,+DAkBrB,CAAA;AA0HD,OAAO,EACL,gBAAgB,EACjB,CAAA"}
|