Skip to content

Commit 23f5d23

Browse files
author
Al Manning
committed
more debugging info
1 parent 1d005e2 commit 23f5d23

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

src/publish/confluence/confluence-helper.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ export const updateImagePaths = (body: ContentBody): ContentBody => {
612612
return body;
613613
}
614614

615+
console.log("updateImagePaths call findAttachments");
615616
const attachments = findAttachments(bodyValue);
616617

617618
const withReplacedImages: string = bodyValue.replaceAll(
@@ -628,11 +629,10 @@ export const findAttachments = (
628629
publishFiles: string[] = [],
629630
filePathParam: string = ""
630631
): string[] => {
631-
632-
console.log('findAttachments');
633-
console.log('bodyValue', bodyValue);
634-
console.log('publishFiles', publishFiles);
635-
console.log('filePathParam', filePathParam);
632+
console.log("findAttachments called");
633+
console.log("bodyValue", bodyValue);
634+
console.log("publishFiles", publishFiles);
635+
console.log("filePathParam", filePathParam);
636636

637637
const filePath = pathWithForwardSlashes(filePathParam);
638638

@@ -656,5 +656,7 @@ export const findAttachments = (
656656
});
657657
}
658658

659+
console.log("uniqueResult", uniqueResult);
660+
659661
return uniqueResult ?? [];
660662
};

src/publish/confluence/confluence.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,11 @@ async function publish(
351351
titleToUpdate: string = title,
352352
fileName: string = ""
353353
): Promise<Content> => {
354+
console.log("update content");
355+
354356
const previousPage = await client.getContent(id);
355357

358+
console.log("findAttachments update");
356359
const attachmentsToUpload: string[] = findAttachments(
357360
body.storage.value,
358361
publishFiles.files,
@@ -486,17 +489,19 @@ async function publish(
486489
createParent: ConfluenceParent = parent,
487490
fileNameParam: string = ""
488491
): Promise<Content> => {
492+
console.log("create content");
493+
489494
const createTitle = await uniquifyTitle(titleToCreate);
490495

491496
const fileName = pathWithForwardSlashes(fileNameParam);
492-
497+
console.log("findAttachments");
493498
const attachmentsToUpload: string[] = findAttachments(
494499
body.storage.value,
495500
publishFiles.files,
496501
fileName
497502
);
498503

499-
console.log('attachmentsToUpload', attachmentsToUpload);
504+
console.log("attachmentsToUpload", attachmentsToUpload);
500505

501506
trace("attachmentsToUpload", attachmentsToUpload, LogPrefix.ATTACHMENT);
502507
const updatedBody: ContentBody = updateImagePaths(body);
@@ -639,7 +644,7 @@ async function publish(
639644
server,
640645
siteParent
641646
);
642-
647+
console.log("changeList", changeList);
643648
trace("changelist", changeList);
644649

645650
let pathsToId: Record<string, string> = {}; // build from existing site

0 commit comments

Comments
 (0)