From f8135d3f83edfb17defb633aed9ae78475d4a0b4 Mon Sep 17 00:00:00 2001 From: Myastr0 <14167316+Myastr0@users.noreply.github.com> Date: Sun, 14 Dec 2025 16:30:17 +0100 Subject: [PATCH 1/2] fix(fix flat option with database destination): fix flat option with database destination --- .../synchronize-markdown-to-notion.feature.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/domains/synchronization/features/synchronize-markdown-to-notion.feature.ts b/src/domains/synchronization/features/synchronize-markdown-to-notion.feature.ts index 35477ad..ac132da 100644 --- a/src/domains/synchronization/features/synchronize-markdown-to-notion.feature.ts +++ b/src/domains/synchronization/features/synchronize-markdown-to-notion.feature.ts @@ -248,7 +248,8 @@ export class SynchronizeMarkdownToNotion { try { const childResults = await this.synchronizeChildNode({ childNode, - parentPageId: rootPageElement?.id ?? parentObjectId, + parentObjectId: rootPageElement?.id ?? parentObjectId, + parentObjectType: rootPageElement ? 'page' : parentObjectType, lockPage, forceNew, }); @@ -435,12 +436,14 @@ export class SynchronizeMarkdownToNotion { */ private async synchronizeChildNode({ childNode, - parentPageId, + parentObjectId, + parentObjectType, lockPage, forceNew, }: { childNode: TreeNode; - parentPageId: string; + parentObjectId: string; + parentObjectType: ObjectType; lockPage: boolean; forceNew: boolean; }): Promise { @@ -468,8 +471,8 @@ export class SynchronizeMarkdownToNotion { const newPage = await this.destinationRepository.createPage({ pageElement, - parentObjectId: parentPageId, - parentObjectType: 'page', + parentObjectId, + parentObjectType, }); this.logger.info(`Created Notion page for file: ${filePath}`); @@ -491,7 +494,8 @@ export class SynchronizeMarkdownToNotion { childNode.children.map(async (grandChild) => { const grandChildSyncResult = await this.synchronizeChildNode({ childNode: grandChild, - parentPageId: pageElement.id!, + parentObjectId: pageElement.id!, + parentObjectType: 'page', lockPage, forceNew, }); From 24df347a29a25980f6ae59cd671d4e49c7969cc1 Mon Sep 17 00:00:00 2001 From: Myastr0 <14167316+Myastr0@users.noreply.github.com> Date: Sun, 14 Dec 2025 16:30:39 +0100 Subject: [PATCH 2/2] build(build github action scripts): build github action scripts --- preview/index.js | 12 +++++++----- sync/index.js | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/preview/index.js b/preview/index.js index cc986f5..7cd272e 100644 --- a/preview/index.js +++ b/preview/index.js @@ -76596,7 +76596,8 @@ class SynchronizeMarkdownToNotion { try { const childResults = await this.synchronizeChildNode({ childNode, - parentPageId: rootPageElement?.id ?? parentObjectId, + parentObjectId: rootPageElement?.id ?? parentObjectId, + parentObjectType: rootPageElement ? 'page' : parentObjectType, lockPage, forceNew, }); @@ -76712,7 +76713,7 @@ class SynchronizeMarkdownToNotion { /** * Synchronizes a child node and its descendants recursively */ - async synchronizeChildNode({ childNode, parentPageId, lockPage, forceNew, }) { + async synchronizeChildNode({ childNode, parentObjectId, parentObjectType, lockPage, forceNew, }) { const syncResult = []; const filePath = childNode.filepath; this.logger.info(`Processing file: ${filePath}`); @@ -76734,8 +76735,8 @@ class SynchronizeMarkdownToNotion { } const newPage = await this.destinationRepository.createPage({ pageElement, - parentObjectId: parentPageId, - parentObjectType: 'page', + parentObjectId, + parentObjectType, }); this.logger.info(`Created Notion page for file: ${filePath}`); if (!newPage.pageId) { @@ -76751,7 +76752,8 @@ class SynchronizeMarkdownToNotion { await Promise.all(childNode.children.map(async (grandChild) => { const grandChildSyncResult = await this.synchronizeChildNode({ childNode: grandChild, - parentPageId: pageElement.id, + parentObjectId: pageElement.id, + parentObjectType: 'page', lockPage, forceNew, }); diff --git a/sync/index.js b/sync/index.js index ed98cf3..fa2138a 100644 --- a/sync/index.js +++ b/sync/index.js @@ -76645,7 +76645,8 @@ class SynchronizeMarkdownToNotion { try { const childResults = await this.synchronizeChildNode({ childNode, - parentPageId: rootPageElement?.id ?? parentObjectId, + parentObjectId: rootPageElement?.id ?? parentObjectId, + parentObjectType: rootPageElement ? 'page' : parentObjectType, lockPage, forceNew, }); @@ -76761,7 +76762,7 @@ class SynchronizeMarkdownToNotion { /** * Synchronizes a child node and its descendants recursively */ - async synchronizeChildNode({ childNode, parentPageId, lockPage, forceNew, }) { + async synchronizeChildNode({ childNode, parentObjectId, parentObjectType, lockPage, forceNew, }) { const syncResult = []; const filePath = childNode.filepath; this.logger.info(`Processing file: ${filePath}`); @@ -76783,8 +76784,8 @@ class SynchronizeMarkdownToNotion { } const newPage = await this.destinationRepository.createPage({ pageElement, - parentObjectId: parentPageId, - parentObjectType: 'page', + parentObjectId, + parentObjectType, }); this.logger.info(`Created Notion page for file: ${filePath}`); if (!newPage.pageId) { @@ -76800,7 +76801,8 @@ class SynchronizeMarkdownToNotion { await Promise.all(childNode.children.map(async (grandChild) => { const grandChildSyncResult = await this.synchronizeChildNode({ childNode: grandChild, - parentPageId: pageElement.id, + parentObjectId: pageElement.id, + parentObjectType: 'page', lockPage, forceNew, });