@social-mail/social-mail-web-server 1.4.714 → 1.4.715

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": "@social-mail/social-mail-web-server",
3
- "version": "1.4.714",
3
+ "version": "1.4.715",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -129,7 +129,7 @@ export default class SnapshotService {
129
129
 
130
130
  let html = await file.readAsText();
131
131
 
132
- html = await this.updateHtmlContent(html, siteRoot);
132
+ html = await this.updateHtmlContent(html, siteRoot, file.fileName);
133
133
 
134
134
  if (html) {
135
135
  const htmlFile = await this.tempFileService.createFrom(source.name, Buffer.from(html, "utf8"), "text/html");
@@ -285,7 +285,7 @@ export default class SnapshotService {
285
285
  return { query, link };
286
286
  }
287
287
 
288
- async rewriteLink(link: string, parentPath: string) {
288
+ async rewriteLink(link: string, parentPath: string, srcFileName?: string) {
289
289
  if (!link) {
290
290
  return;
291
291
  }
@@ -339,7 +339,7 @@ export default class SnapshotService {
339
339
 
340
340
  const child = await this.findSnapshotChildren(paths);
341
341
  if (!child) {
342
- console.warn(`No link found for ${link} with path ${paths.join("/")} in ${this.root.appFileID}, original: ${originalLink}`);
342
+ console.warn(`No link found for ${link} with path ${paths.join("/")} in ${this.root.appFileID}, original: ${originalLink}, ${parentPath}, ${srcFileName}`);
343
343
  return;
344
344
  }
345
345
 
@@ -349,7 +349,7 @@ export default class SnapshotService {
349
349
 
350
350
  }
351
351
 
352
- async updateHtmlContent(html: string, parentPath: string) {
352
+ async updateHtmlContent(html: string, parentPath: string,fileName: string) {
353
353
 
354
354
  const { root } = this;
355
355
 
@@ -404,7 +404,7 @@ export default class SnapshotService {
404
404
  if (!link) {
405
405
  continue;
406
406
  }
407
- link = await this.rewriteLink(link, parentPath);
407
+ link = await this.rewriteLink(link, parentPath, fileName);
408
408
  if (link) {
409
409
  changedSet.push(`${link} ${tokens[1]}`);
410
410
  }