├── docs └── screenshots │ ├── ribbon.png │ ├── commands.png │ └── settings.png ├── manifest.json ├── tsconfig.json ├── src ├── custom.d.ts ├── ConfluenceSettingTab.ts ├── adaptors │ └── obsidian.ts ├── CompletedModal.tsx ├── MyBaseClient.ts ├── main.ts └── ConfluencePerPageForm.tsx ├── package.json ├── esbuild.config.mjs ├── README.md ├── LICENSE └── CHANGELOG.md /docs/screenshots/ribbon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markdown-confluence/obsidian-integration/HEAD/docs/screenshots/ribbon.png -------------------------------------------------------------------------------- /docs/screenshots/commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markdown-confluence/obsidian-integration/HEAD/docs/screenshots/commands.png -------------------------------------------------------------------------------- /docs/screenshots/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markdown-confluence/obsidian-integration/HEAD/docs/screenshots/settings.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "confluence-integration", 3 | "name": "Confluence Integration", 4 | "version": "5.5.2", 5 | "minAppVersion": "1.0.0", 6 | "description": "This plugin allows you to publish your notes to Confluence", 7 | "author": "andymac4182", 8 | "authorUrl": "https://github.com/andymac4182", 9 | "isDesktopOnly": true 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions":{ 4 | "baseUrl":".", 5 | "rootDir": "src", 6 | "outDir": "dist", 7 | "declarationDir": "dist", 8 | "noEmit": true, 9 | "skipLibCheck": true, 10 | }, 11 | "include":[ "**/*.ts", "**/*.tsx" ], 12 | "exclude": ["node_modules", "packages/**/dist/*", "dist/*", "**/*.test.ts", "**/jest.config.ts"] 13 | } -------------------------------------------------------------------------------- /src/custom.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.txt" { 2 | const content: string; 3 | export default content; 4 | } 5 | 6 | declare module "*.json" { 7 | const content: unknown; 8 | export default content; 9 | } 10 | 11 | declare module "mermaid_renderer.esbuild" { 12 | const content: Buffer; 13 | export default content; 14 | } 15 | 16 | declare module "sort-any" { 17 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 18 | export default function sortAny(item: T): T; 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "obsidian-confluence", 3 | "version": "5.5.2", 4 | "description": "This library allows you to publish your notes to Confluence", 5 | "main": "main.js", 6 | "type": "module", 7 | "scripts": { 8 | "dev": "node esbuild.config.mjs", 9 | "build": "tsc && node esbuild.config.mjs production", 10 | "fmt": "npx prettier --write src/", 11 | "lint": "eslint --ignore-path ../../.eslintignore --ext .jsx,tsx,.js,.ts src/", 12 | "prettier-check": "npx prettier --check src/" 13 | }, 14 | "keywords": [], 15 | "author": "andymac4182", 16 | "license": "Apache 2.0", 17 | "devDependencies": { 18 | "@types/mime-types": "^2.1.1", 19 | "@types/react-dom": "^18.0.11", 20 | "obsidian": "1.1.1" 21 | }, 22 | "dependencies": { 23 | "confluence.js": "^1.6.3", 24 | "mime-types": "^2.1.35", 25 | "react": "^16.14.0", 26 | "react-dom": "^16.14.0", 27 | "@markdown-confluence/lib": "5.5.2", 28 | "@markdown-confluence/mermaid-electron-renderer": "5.5.2" 29 | }, 30 | "resolutions": { 31 | "prosemirror-model": "1.14.3" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /esbuild.config.mjs: -------------------------------------------------------------------------------- 1 | import esbuild from "esbuild"; 2 | import process from "process"; 3 | import builtins from 'builtin-modules' 4 | import { writeFileSync } from 'fs'; 5 | 6 | 7 | const banner = 8 | `/* 9 | THIS IS A GENERATED/BUNDLED FILE BY ESBUILD 10 | if you want to view the source, please visit the github repository of this plugin 11 | */ 12 | `; 13 | 14 | const prod = (process.argv[2] === 'production'); 15 | 16 | const buildConfig = { 17 | banner: { 18 | js: banner, 19 | }, 20 | entryPoints: ['src/main.ts'], 21 | bundle: true, 22 | external: [ 23 | 'obsidian', 24 | 'electron', 25 | '@codemirror/autocomplete', 26 | '@codemirror/collab', 27 | '@codemirror/commands', 28 | '@codemirror/language', 29 | '@codemirror/lint', 30 | '@codemirror/search', 31 | '@codemirror/state', 32 | '@codemirror/view', 33 | '@lezer/common', 34 | '@lezer/highlight', 35 | '@lezer/lr', 36 | ...builtins 37 | ], 38 | format: 'cjs', 39 | target: 'chrome106', 40 | logLevel: "info", 41 | sourcemap: prod ? false : 'inline', 42 | treeShaking: true, 43 | outdir: prod ? 'dist' : '../../dev-vault/.obsidian/plugins/obsidian-confluence', 44 | mainFields: ['module', 'main'], 45 | minify: true, 46 | metafile: true, 47 | }; 48 | 49 | if (prod) { 50 | const buildResult = await esbuild.build(buildConfig); 51 | writeFileSync("./dist/meta.json", JSON.stringify(buildResult.metafile)); 52 | } else { 53 | const context = await esbuild.context(buildConfig); 54 | await context.watch(); 55 | } 56 | -------------------------------------------------------------------------------- /src/ConfluenceSettingTab.ts: -------------------------------------------------------------------------------- 1 | import { App, Setting, PluginSettingTab } from "obsidian"; 2 | import ConfluencePlugin from "./main"; 3 | 4 | export class ConfluenceSettingTab extends PluginSettingTab { 5 | plugin: ConfluencePlugin; 6 | 7 | constructor(app: App, plugin: ConfluencePlugin) { 8 | super(app, plugin); 9 | this.plugin = plugin; 10 | } 11 | 12 | display(): void { 13 | const { containerEl } = this; 14 | 15 | containerEl.empty(); 16 | 17 | containerEl.createEl("h2", { 18 | text: "Settings for connecting to Atlassian Confluence", 19 | }); 20 | 21 | new Setting(containerEl) 22 | .setName("Confluence Domain") 23 | .setDesc('Confluence Domain eg "https://mysite.atlassian.net"') 24 | .addText((text) => 25 | text 26 | .setPlaceholder("https://mysite.atlassian.net") 27 | .setValue(this.plugin.settings.confluenceBaseUrl) 28 | .onChange(async (value) => { 29 | this.plugin.settings.confluenceBaseUrl = value; 30 | await this.plugin.saveSettings(); 31 | }), 32 | ); 33 | 34 | new Setting(containerEl) 35 | .setName("Atlassian Username") 36 | .setDesc('eg "username@domain.com"') 37 | .addText((text) => 38 | text 39 | .setPlaceholder("username@domain.com") 40 | .setValue(this.plugin.settings.atlassianUserName) 41 | .onChange(async (value) => { 42 | this.plugin.settings.atlassianUserName = value; 43 | await this.plugin.saveSettings(); 44 | }), 45 | ); 46 | 47 | new Setting(containerEl) 48 | .setName("Atlassian API Token") 49 | .setDesc("") 50 | .addText((text) => 51 | text 52 | .setPlaceholder("") 53 | .setValue(this.plugin.settings.atlassianApiToken) 54 | .onChange(async (value) => { 55 | this.plugin.settings.atlassianApiToken = value; 56 | await this.plugin.saveSettings(); 57 | }), 58 | ); 59 | 60 | new Setting(containerEl) 61 | .setName("Confluence Parent Page ID") 62 | .setDesc("Page ID to publish files under") 63 | .addText((text) => 64 | text 65 | .setPlaceholder("23232345645") 66 | .setValue(this.plugin.settings.confluenceParentId) 67 | .onChange(async (value) => { 68 | this.plugin.settings.confluenceParentId = value; 69 | await this.plugin.saveSettings(); 70 | }), 71 | ); 72 | 73 | new Setting(containerEl) 74 | .setName("Folder to publish") 75 | .setDesc( 76 | "Publish all files except notes that are excluded using YAML Frontmatter", 77 | ) 78 | .addText((text) => 79 | text 80 | .setPlaceholder("") 81 | .setValue(this.plugin.settings.folderToPublish) 82 | .onChange(async (value) => { 83 | this.plugin.settings.folderToPublish = value; 84 | await this.plugin.saveSettings(); 85 | }), 86 | ); 87 | 88 | new Setting(containerEl) 89 | .setName("First Header Page Name") 90 | .setDesc("First header replaces file name as page title") 91 | .addToggle((toggle) => 92 | toggle 93 | .setValue(this.plugin.settings.firstHeadingPageTitle) 94 | .onChange(async (value) => { 95 | this.plugin.settings.firstHeadingPageTitle = value; 96 | await this.plugin.saveSettings(); 97 | }), 98 | ); 99 | 100 | new Setting(containerEl) 101 | .setName("Mermaid Diagram Theme") 102 | .setDesc("Pick the theme to apply to mermaid diagrams") 103 | .addDropdown((dropdown) => { 104 | /* eslint-disable @typescript-eslint/naming-convention */ 105 | dropdown 106 | .addOptions({ 107 | "match-obsidian": "Match Obsidian", 108 | "light-obsidian": "Obsidian Theme - Light", 109 | "dark-obsidian": "Obsidian Theme - Dark", 110 | default: "Mermaid - Default", 111 | neutral: "Mermaid - Neutral", 112 | dark: "Mermaid - Dark", 113 | forest: "Mermaid - Forest", 114 | }) 115 | .setValue(this.plugin.settings.mermaidTheme) 116 | .onChange(async (value) => { 117 | // @ts-expect-error 118 | this.plugin.settings.mermaidTheme = value; 119 | await this.plugin.saveSettings(); 120 | }); 121 | /* eslint-enable @typescript-eslint/naming-convention */ 122 | }); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Obsidian Confluence Integration Plugin 2 | 3 | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/markdown-confluence/markdown-confluence/badge)](https://api.securityscorecards.dev/projects/github.com/markdown-confluence/markdown-confluence) 4 | 5 | Copyright (c) 2022 Atlassian Pty Ltd 6 | 7 | Copyright (c) 2022 Atlassian US, Inc. 8 | 9 | `Obsidian Confluence Integration Plugin` is an open-source plugin for [Obsidian.md](https://obsidian.md/) that allows you to publish markdown content from Obsidian to [Atlassian Confluence](https://www.atlassian.com/software/confluence). It supports [Obsidian markdown extensions](https://help.obsidian.md/How+to/Format+your+notes) for richer content and includes a CLI for pushing markdown files from the command line. Currently, the plugin only supports Atlassian Cloud instances. 10 | 11 | ## Features 12 | 13 | - Publish Obsidian notes to Atlassian Confluence 14 | - Support for Obsidian markdown extensions 15 | - CLI for pushing markdown files from disk 16 | - Commands and ribbon icon for easy access 17 | 18 | ## Issues 19 | Please log issues to https://github.com/markdown-confluence/markdown-confluence/issues as this is where the code is being developed. 20 | 21 | ## Getting Started 22 | 23 | 1. Install the `confluence-integration` plugin from Obsidian's community plugins browser. 24 | 2. Open the plugin settings and configure the following fields: 25 | 26 | - `Confluence Base URL`: The base URL of your Atlassian Confluence instance (e.g., `https://your-domain.atlassian.net`) 27 | - `Confluence Parent Id`: The Confluence page ID where your notes will be published as child pages 28 | - `Atlassian User Name`: Your Atlassian account's email address 29 | - `Atlassian API Token`: Your Atlassian API token. You can generate one from your [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens). 30 | - `Folder To Publish`: The name of the folder in Obsidian containing the notes you want to publish (default: "Confluence Pages") 31 | 32 | ![Settings](./docs/screenshots/settings.png) 33 | 34 | ## Usage 35 | 36 | ### Ribbon Icon 37 | 38 | Click the cloud icon in the ribbon to publish the notes from the configured folder to Confluence. 39 | 40 | ![Ribbon icon](./docs/screenshots/ribbon.png) 41 | 42 | 43 | ### Commands 44 | 45 | Use the command palette (`Ctrl/Cmd + P`) to execute the "Publish All to Confluence" command, which publishes all the notes from the configured folder to Confluence. 46 | 47 | ![Commands](./docs/screenshots/commands.png) 48 | 49 | ### connie-publish Frontmatter 50 | 51 | To publish pages outside the `folderToPublish`, add the `connie-publish` YAML frontmatter to your notes: 52 | 53 | ```yaml 54 | --- 55 | connie-publish: true 56 | --- 57 | ``` 58 | 59 | ### Example Workflow 60 | 1. Install and configure the `confluence-integration` plugin. 61 | 2. Create a folder in your Obsidian vault named "Confluence Pages" (or the folder name you specified in the settings). 62 | 3. Add notes to this folder or add the connie-publish frontmatter to other notes. 63 | 4. Click the cloud icon in the ribbon or use the "Publish All to Confluence" command to publish your notes to Confluence. 64 | 65 | ### Contributing 66 | Contributions are welcome! If you have a feature request, bug report, or want to improve the plugin, please open an issue or submit a pull request on the GitHub repository. 67 | 68 | ### License 69 | This project is licensed under the [Apache 2.0](https://github.com/markdown-confluence/markdown-confluence/blob/main/LICENSE) License. 70 | 71 | ## Disclaimer: 72 | The Apache license is only applicable to the Obsidian Confluence Integration (“Integration“), not to any third parties' services, websites, content or platforms that this Integration may enable you to connect with. In another word, there is no license granted to you by the above identified licensor(s) to access any third-party services, websites, content, or platforms. You are solely responsible for obtaining licenses from such third parties to use and access their services and to comply with their license terms. Please do not disclose any passwords, credentials, or tokens to any third-party service in your contribution to this Obsidian Confluence Integration project.” 73 | -------------------------------------------------------------------------------- /src/adaptors/obsidian.ts: -------------------------------------------------------------------------------- 1 | import { Vault, MetadataCache, App, TFile } from "obsidian"; 2 | import { 3 | ConfluenceUploadSettings, 4 | BinaryFile, 5 | FilesToUpload, 6 | LoaderAdaptor, 7 | MarkdownFile, 8 | ConfluencePageConfig, 9 | } from "@markdown-confluence/lib"; 10 | import { lookup } from "mime-types"; 11 | 12 | export default class ObsidianAdaptor implements LoaderAdaptor { 13 | vault: Vault; 14 | metadataCache: MetadataCache; 15 | settings: ConfluenceUploadSettings.ConfluenceSettings; 16 | app: App; 17 | 18 | constructor( 19 | vault: Vault, 20 | metadataCache: MetadataCache, 21 | settings: ConfluenceUploadSettings.ConfluenceSettings, 22 | app: App, 23 | ) { 24 | this.vault = vault; 25 | this.metadataCache = metadataCache; 26 | this.settings = settings; 27 | this.app = app; 28 | } 29 | 30 | async getMarkdownFilesToUpload(): Promise { 31 | const files = this.vault.getMarkdownFiles(); 32 | const filesToPublish = []; 33 | for (const file of files) { 34 | try { 35 | if (file.path.endsWith(".excalidraw")) { 36 | continue; 37 | } 38 | 39 | const fileFM = this.metadataCache.getCache(file.path); 40 | if (!fileFM) { 41 | throw new Error("Missing File in Metadata Cache"); 42 | } 43 | const frontMatter = fileFM.frontmatter; 44 | 45 | if ( 46 | (file.path.startsWith(this.settings.folderToPublish) && 47 | (!frontMatter || 48 | frontMatter["connie-publish"] !== false)) || 49 | (frontMatter && frontMatter["connie-publish"] === true) 50 | ) { 51 | filesToPublish.push(file); 52 | } 53 | } catch { 54 | //ignore 55 | } 56 | } 57 | const filesToUpload = []; 58 | 59 | for (const file of filesToPublish) { 60 | const markdownFile = await this.loadMarkdownFile(file.path); 61 | filesToUpload.push(markdownFile); 62 | } 63 | 64 | return filesToUpload; 65 | } 66 | 67 | async loadMarkdownFile(absoluteFilePath: string): Promise { 68 | const file = this.app.vault.getAbstractFileByPath(absoluteFilePath); 69 | if (!(file instanceof TFile)) { 70 | throw new Error("Not a TFile"); 71 | } 72 | 73 | const fileFM = this.metadataCache.getCache(file.path); 74 | if (!fileFM) { 75 | throw new Error("Missing File in Metadata Cache"); 76 | } 77 | const frontMatter = fileFM.frontmatter; 78 | 79 | const parsedFrontMatter: Record = {}; 80 | if (frontMatter) { 81 | for (const [key, value] of Object.entries(frontMatter)) { 82 | parsedFrontMatter[key] = value; 83 | } 84 | } 85 | 86 | return { 87 | pageTitle: file.basename, 88 | folderName: file.parent.name, 89 | absoluteFilePath: file.path, 90 | fileName: file.name, 91 | contents: await this.vault.cachedRead(file), 92 | frontmatter: parsedFrontMatter, 93 | }; 94 | } 95 | 96 | async readBinary( 97 | path: string, 98 | referencedFromFilePath: string, 99 | ): Promise { 100 | const testing = this.metadataCache.getFirstLinkpathDest( 101 | path, 102 | referencedFromFilePath, 103 | ); 104 | if (testing) { 105 | const files = await this.vault.readBinary(testing); 106 | const mimeType = 107 | lookup(testing.extension) || "application/octet-stream"; 108 | return { 109 | contents: files, 110 | filePath: testing.path, 111 | filename: testing.name, 112 | mimeType: mimeType, 113 | }; 114 | } 115 | 116 | return false; 117 | } 118 | async updateMarkdownValues( 119 | absoluteFilePath: string, 120 | values: Partial, 121 | ): Promise { 122 | const config = ConfluencePageConfig.conniePerPageConfig; 123 | const file = this.app.vault.getAbstractFileByPath(absoluteFilePath); 124 | if (file instanceof TFile) { 125 | this.app.fileManager.processFrontMatter(file, (fm) => { 126 | for (const propertyKey in config) { 127 | if (!config.hasOwnProperty(propertyKey)) { 128 | continue; 129 | } 130 | 131 | const { key } = 132 | config[ 133 | propertyKey as keyof ConfluencePageConfig.ConfluencePerPageConfig 134 | ]; 135 | const value = 136 | values[ 137 | propertyKey as keyof ConfluencePageConfig.ConfluencePerPageAllValues 138 | ]; 139 | if (propertyKey in values) { 140 | fm[key] = value; 141 | } 142 | } 143 | }); 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /src/CompletedModal.tsx: -------------------------------------------------------------------------------- 1 | import { Modal, App } from "obsidian"; 2 | import ReactDOM from "react-dom"; 3 | import React, { useState } from "react"; 4 | import { UploadAdfFileResult } from "@markdown-confluence/lib"; 5 | 6 | export interface FailedFile { 7 | fileName: string; 8 | reason: string; 9 | } 10 | 11 | export interface UploadResults { 12 | errorMessage: string | null; 13 | failedFiles: FailedFile[]; 14 | filesUploadResult: UploadAdfFileResult[]; 15 | } 16 | 17 | export interface UploadResultsProps { 18 | uploadResults: UploadResults; 19 | } 20 | 21 | const CompletedView: React.FC = ({ uploadResults }) => { 22 | const { errorMessage, failedFiles, filesUploadResult } = uploadResults; 23 | const [expanded, setExpanded] = useState(false); 24 | 25 | const countResults = { 26 | content: { same: 0, updated: 0 }, 27 | images: { same: 0, updated: 0 }, 28 | labels: { same: 0, updated: 0 }, 29 | }; 30 | 31 | filesUploadResult.forEach((result) => { 32 | countResults.content[result.contentResult]++; 33 | countResults.images[result.imageResult]++; 34 | countResults.labels[result.labelResult]++; 35 | }); 36 | 37 | const renderUpdatedFiles = (type: "content" | "image" | "label") => { 38 | return filesUploadResult 39 | .filter((result) => result[`${type}Result`] === "updated") 40 | .map((result, index) => ( 41 |
  • 42 | 43 | {result.adfFile.absoluteFilePath} 44 | 45 |
  • 46 | )); 47 | }; 48 | 49 | return ( 50 |
    51 |
    52 |

    Confluence Publish

    53 |
    54 | {errorMessage ? ( 55 |
    56 |

    Error

    57 |

    {errorMessage}

    58 |
    59 | ) : ( 60 | <> 61 |
    62 |

    Successful Uploads

    63 |

    64 | {filesUploadResult.length} file(s) uploaded 65 | successfully. 66 |

    67 |
    68 | 69 | {failedFiles.length > 0 && ( 70 |
    71 |

    Failed Uploads

    72 |

    73 | {failedFiles.length} file(s) failed to upload. 74 |

    75 |
      76 | {failedFiles.map((file, index) => ( 77 |
    • 78 | {file.fileName}:{" "} 79 | {file.reason} 80 |
    • 81 | ))} 82 |
    83 |
    84 | )} 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
    TypeSameUpdated
    Content{countResults.content.same}{countResults.content.updated}
    Images{countResults.images.same}{countResults.images.updated}
    Labels{countResults.labels.same}{countResults.labels.updated}
    112 |
    113 | 116 | {expanded && ( 117 |
    118 |
    119 |

    Updated Content

    120 |
      {renderUpdatedFiles("content")}
    121 |
    122 |
    123 |

    Updated Images

    124 |
      {renderUpdatedFiles("image")}
    125 |
    126 |
    127 |

    Updated Labels

    128 |
      {renderUpdatedFiles("label")}
    129 |
    130 |
    131 | )} 132 |
    133 | 134 | )} 135 |
    136 | ); 137 | }; 138 | 139 | export class CompletedModal extends Modal { 140 | uploadResults: UploadResultsProps; 141 | 142 | constructor(app: App, uploadResults: UploadResultsProps) { 143 | super(app); 144 | this.uploadResults = uploadResults; 145 | } 146 | 147 | override onOpen() { 148 | const { contentEl } = this; 149 | ReactDOM.render( 150 | React.createElement(CompletedView, this.uploadResults), 151 | contentEl, 152 | ); 153 | } 154 | 155 | override onClose() { 156 | const { contentEl } = this; 157 | ReactDOM.unmountComponentAtNode(contentEl); 158 | contentEl.empty(); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/MyBaseClient.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Api, 3 | Callback, 4 | Client, 5 | Config, 6 | RequestConfig, 7 | AuthenticationService, 8 | } from "confluence.js"; 9 | import { requestUrl } from "obsidian"; 10 | import { RequiredConfluenceClient } from "@markdown-confluence/lib"; 11 | 12 | const ATLASSIAN_TOKEN_CHECK_FLAG = "X-Atlassian-Token"; 13 | const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = "no-check"; 14 | 15 | export class MyBaseClient implements Client { 16 | protected urlSuffix = "/wiki/rest"; 17 | 18 | constructor(protected readonly config: Config) {} 19 | 20 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 21 | protected paramSerializer(parameters: Record): string { 22 | const parts: string[] = []; 23 | 24 | Object.entries(parameters).forEach(([key, value]) => { 25 | if (value === null || typeof value === "undefined") { 26 | return; 27 | } 28 | 29 | if (Array.isArray(value)) { 30 | // eslint-disable-next-line no-param-reassign 31 | value = value.join(","); 32 | } 33 | 34 | if (value instanceof Date) { 35 | // eslint-disable-next-line no-param-reassign 36 | value = value.toISOString(); 37 | } else if (value !== null && typeof value === "object") { 38 | // eslint-disable-next-line no-param-reassign 39 | value = JSON.stringify(value); 40 | } else if (value instanceof Function) { 41 | const part = value(); 42 | 43 | return part && parts.push(part); 44 | } 45 | 46 | parts.push(`${this.encode(key)}=${this.encode(value)}`); 47 | 48 | return; 49 | }); 50 | 51 | return parts.join("&"); 52 | } 53 | 54 | protected encode(value: string) { 55 | return encodeURIComponent(value) 56 | .replace(/%3A/gi, ":") 57 | .replace(/%24/g, "$") 58 | .replace(/%2C/gi, ",") 59 | .replace(/%20/g, "+") 60 | .replace(/%5B/gi, "[") 61 | .replace(/%5D/gi, "]"); 62 | } 63 | 64 | protected removeUndefinedProperties( 65 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 66 | obj: Record, 67 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 68 | ): Record { 69 | return Object.entries(obj) 70 | .filter(([, value]) => typeof value !== "undefined") 71 | .reduce( 72 | (accumulator, [key, value]) => ({ 73 | ...accumulator, 74 | [key]: value, 75 | }), 76 | {}, 77 | ); 78 | } 79 | 80 | async sendRequest( 81 | requestConfig: RequestConfig, 82 | callback: never, 83 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 84 | telemetryData?: any, 85 | ): Promise; 86 | async sendRequest( 87 | requestConfig: RequestConfig, 88 | callback: Callback, 89 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 90 | telemetryData?: any, 91 | ): Promise; 92 | async sendRequest( 93 | requestConfig: RequestConfig, 94 | callback: Callback | never, 95 | ): Promise { 96 | try { 97 | const contentType = (requestConfig.headers ?? {})[ 98 | "content-type" 99 | ]?.toString(); 100 | if (requestConfig.headers && contentType) { 101 | requestConfig.headers["Content-Type"] = contentType; 102 | delete requestConfig?.headers["content-type"]; 103 | } 104 | 105 | const params = this.paramSerializer(requestConfig.params); 106 | 107 | const requestContentType = 108 | (requestConfig.headers ?? {})["Content-Type"]?.toString() ?? 109 | "application/json"; 110 | 111 | const requestBody = requestContentType.startsWith( 112 | "multipart/form-data", 113 | ) 114 | ? [ 115 | requestConfig.data.getHeaders(), 116 | requestConfig.data.getBuffer().buffer, 117 | ] 118 | : [{}, JSON.stringify(requestConfig.data)]; 119 | 120 | const modifiedRequestConfig = { 121 | ...requestConfig, 122 | headers: this.removeUndefinedProperties({ 123 | "User-Agent": "Obsidian.md", 124 | Accept: "application/json", 125 | [ATLASSIAN_TOKEN_CHECK_FLAG]: this.config 126 | .noCheckAtlassianToken 127 | ? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE 128 | : undefined, 129 | ...this.config.baseRequestConfig?.headers, 130 | Authorization: 131 | await AuthenticationService.getAuthenticationToken( 132 | this.config.authentication, 133 | { 134 | // eslint-disable-next-line @typescript-eslint/naming-convention 135 | baseURL: this.config.host, 136 | url: `${this.config.host}${this.urlSuffix}`, 137 | method: requestConfig.method ?? "GET", 138 | }, 139 | ), 140 | ...requestConfig.headers, 141 | "Content-Type": requestContentType, 142 | ...requestBody[0], 143 | }), 144 | url: `${this.config.host}${this.urlSuffix}${requestConfig.url}?${params}`, 145 | body: requestBody[1], 146 | method: requestConfig.method?.toUpperCase() ?? "GET", 147 | contentType: requestContentType, 148 | throw: false, 149 | }; 150 | delete modifiedRequestConfig.data; 151 | 152 | const response = await requestUrl(modifiedRequestConfig); 153 | 154 | if (response.status >= 400) { 155 | throw new HTTPError(`Received a ${response.status}`, { 156 | status: response.status, 157 | data: response.text, 158 | }); 159 | } 160 | 161 | const callbackResponseHandler = 162 | callback && ((data: T): void => callback(null, data)); 163 | const defaultResponseHandler = (data: T): T => data; 164 | 165 | const responseHandler = 166 | callbackResponseHandler ?? defaultResponseHandler; 167 | 168 | this.config.middlewares?.onResponse?.(response.json); 169 | 170 | return responseHandler(response.json); 171 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 172 | } catch (e: any) { 173 | console.warn({ httpError: e, requestConfig }); 174 | const err = 175 | this.config.newErrorHandling && e.isAxiosError 176 | ? e.response.data 177 | : e; 178 | 179 | const callbackErrorHandler = 180 | callback && ((error: Config.Error) => callback(error)); 181 | const defaultErrorHandler = (error: Error) => { 182 | throw error; 183 | }; 184 | 185 | const errorHandler = callbackErrorHandler ?? defaultErrorHandler; 186 | 187 | this.config.middlewares?.onError?.(err); 188 | 189 | return errorHandler(err); 190 | } 191 | } 192 | } 193 | 194 | export interface ErrorData { 195 | data: unknown; 196 | status: number; 197 | } 198 | 199 | export class HTTPError extends Error { 200 | constructor( 201 | msg: string, 202 | public response: ErrorData, 203 | ) { 204 | super(msg); 205 | 206 | // Set the prototype explicitly. 207 | Object.setPrototypeOf(this, HTTPError.prototype); 208 | } 209 | } 210 | 211 | export class ObsidianConfluenceClient 212 | extends MyBaseClient 213 | implements RequiredConfluenceClient 214 | { 215 | content = new Api.Content(this); 216 | space = new Api.Space(this); 217 | contentAttachments = new Api.ContentAttachments(this); 218 | contentLabels = new Api.ContentLabels(this); 219 | users = new Api.Users(this); 220 | } 221 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { Plugin, Notice, MarkdownView, Workspace, loadMermaid } from "obsidian"; 2 | import { 3 | ConfluenceUploadSettings, 4 | Publisher, 5 | ConfluencePageConfig, 6 | StaticSettingsLoader, 7 | renderADFDoc, 8 | MermaidRendererPlugin, 9 | UploadAdfFileResult, 10 | } from "@markdown-confluence/lib"; 11 | import { ElectronMermaidRenderer } from "@markdown-confluence/mermaid-electron-renderer"; 12 | import { ConfluenceSettingTab } from "./ConfluenceSettingTab"; 13 | import ObsidianAdaptor from "./adaptors/obsidian"; 14 | import { CompletedModal } from "./CompletedModal"; 15 | import { ObsidianConfluenceClient } from "./MyBaseClient"; 16 | import { 17 | ConfluencePerPageForm, 18 | ConfluencePerPageUIValues, 19 | mapFrontmatterToConfluencePerPageUIValues, 20 | } from "./ConfluencePerPageForm"; 21 | import { Mermaid } from "mermaid"; 22 | 23 | export interface ObsidianPluginSettings 24 | extends ConfluenceUploadSettings.ConfluenceSettings { 25 | mermaidTheme: 26 | | "match-obsidian" 27 | | "light-obsidian" 28 | | "dark-obsidian" 29 | | "default" 30 | | "neutral" 31 | | "dark" 32 | | "forest"; 33 | } 34 | 35 | interface FailedFile { 36 | fileName: string; 37 | reason: string; 38 | } 39 | 40 | interface UploadResults { 41 | errorMessage: string | null; 42 | failedFiles: FailedFile[]; 43 | filesUploadResult: UploadAdfFileResult[]; 44 | } 45 | 46 | export default class ConfluencePlugin extends Plugin { 47 | settings!: ObsidianPluginSettings; 48 | private isSyncing = false; 49 | workspace!: Workspace; 50 | publisher!: Publisher; 51 | adaptor!: ObsidianAdaptor; 52 | 53 | activeLeafPath(workspace: Workspace) { 54 | return workspace.getActiveViewOfType(MarkdownView)?.file.path; 55 | } 56 | 57 | async init() { 58 | await this.loadSettings(); 59 | const { vault, metadataCache, workspace } = this.app; 60 | this.workspace = workspace; 61 | this.adaptor = new ObsidianAdaptor( 62 | vault, 63 | metadataCache, 64 | this.settings, 65 | this.app, 66 | ); 67 | 68 | const mermaidItems = await this.getMermaidItems(); 69 | const mermaidRenderer = new ElectronMermaidRenderer( 70 | mermaidItems.extraStyleSheets, 71 | mermaidItems.extraStyles, 72 | mermaidItems.mermaidConfig, 73 | mermaidItems.bodyStyles, 74 | ); 75 | const confluenceClient = new ObsidianConfluenceClient({ 76 | host: this.settings.confluenceBaseUrl, 77 | authentication: { 78 | basic: { 79 | email: this.settings.atlassianUserName, 80 | apiToken: this.settings.atlassianApiToken, 81 | }, 82 | }, 83 | middlewares: { 84 | onError(e) { 85 | if ("response" in e && "data" in e.response) { 86 | e.message = 87 | typeof e.response.data === "string" 88 | ? e.response.data 89 | : JSON.stringify(e.response.data); 90 | } 91 | }, 92 | }, 93 | }); 94 | 95 | const settingsLoader = new StaticSettingsLoader(this.settings); 96 | this.publisher = new Publisher( 97 | this.adaptor, 98 | settingsLoader, 99 | confluenceClient, 100 | [new MermaidRendererPlugin(mermaidRenderer)], 101 | ); 102 | } 103 | 104 | async getMermaidItems() { 105 | const extraStyles: string[] = []; 106 | const extraStyleSheets: string[] = []; 107 | let bodyStyles = ""; 108 | const body = document.querySelector("body") as HTMLBodyElement; 109 | 110 | switch (this.settings.mermaidTheme) { 111 | case "default": 112 | case "neutral": 113 | case "dark": 114 | case "forest": 115 | return { 116 | extraStyleSheets, 117 | extraStyles, 118 | mermaidConfig: { theme: this.settings.mermaidTheme }, 119 | bodyStyles, 120 | }; 121 | case "match-obsidian": 122 | bodyStyles = body.className; 123 | break; 124 | case "dark-obsidian": 125 | bodyStyles = "theme-dark"; 126 | break; 127 | case "light-obsidian": 128 | bodyStyles = "theme-dark"; 129 | break; 130 | default: 131 | throw new Error("Missing theme"); 132 | } 133 | 134 | extraStyleSheets.push("app://obsidian.md/app.css"); 135 | 136 | // @ts-expect-error 137 | const cssTheme = this.app.vault?.getConfig("cssTheme") as string; 138 | if (cssTheme) { 139 | const fileExists = await this.app.vault.adapter.exists( 140 | `.obsidian/themes/${cssTheme}/theme.css`, 141 | ); 142 | if (fileExists) { 143 | const themeCss = await this.app.vault.adapter.read( 144 | `.obsidian/themes/${cssTheme}/theme.css`, 145 | ); 146 | extraStyles.push(themeCss); 147 | } 148 | } 149 | 150 | const cssSnippets = 151 | // @ts-expect-error 152 | (this.app.vault?.getConfig("enabledCssSnippets") as string[]) ?? []; 153 | for (const snippet of cssSnippets) { 154 | const fileExists = await this.app.vault.adapter.exists( 155 | `.obsidian/snippets/${snippet}.css`, 156 | ); 157 | if (fileExists) { 158 | const themeCss = await this.app.vault.adapter.read( 159 | `.obsidian/snippets/${snippet}.css`, 160 | ); 161 | extraStyles.push(themeCss); 162 | } 163 | } 164 | 165 | return { 166 | extraStyleSheets, 167 | extraStyles, 168 | mermaidConfig: ( 169 | (await loadMermaid()) as Mermaid 170 | ).mermaidAPI.getConfig(), 171 | bodyStyles, 172 | }; 173 | } 174 | 175 | async doPublish(publishFilter?: string): Promise { 176 | const adrFiles = await this.publisher.publish(publishFilter); 177 | 178 | const returnVal: UploadResults = { 179 | errorMessage: null, 180 | failedFiles: [], 181 | filesUploadResult: [], 182 | }; 183 | 184 | adrFiles.forEach((element) => { 185 | if (element.successfulUploadResult) { 186 | returnVal.filesUploadResult.push( 187 | element.successfulUploadResult, 188 | ); 189 | return; 190 | } 191 | 192 | returnVal.failedFiles.push({ 193 | fileName: element.node.file.absoluteFilePath, 194 | reason: element.reason ?? "No Reason Provided", 195 | }); 196 | }); 197 | 198 | return returnVal; 199 | } 200 | 201 | override async onload() { 202 | await this.init(); 203 | 204 | this.addRibbonIcon("cloud", "Publish to Confluence", async () => { 205 | if (this.isSyncing) { 206 | new Notice("Syncing already on going"); 207 | return; 208 | } 209 | this.isSyncing = true; 210 | try { 211 | const stats = await this.doPublish(); 212 | new CompletedModal(this.app, { 213 | uploadResults: stats, 214 | }).open(); 215 | } catch (error) { 216 | if (error instanceof Error) { 217 | new CompletedModal(this.app, { 218 | uploadResults: { 219 | errorMessage: error.message, 220 | failedFiles: [], 221 | filesUploadResult: [], 222 | }, 223 | }).open(); 224 | } else { 225 | new CompletedModal(this.app, { 226 | uploadResults: { 227 | errorMessage: JSON.stringify(error), 228 | failedFiles: [], 229 | filesUploadResult: [], 230 | }, 231 | }).open(); 232 | } 233 | } finally { 234 | this.isSyncing = false; 235 | } 236 | }); 237 | 238 | this.addCommand({ 239 | id: "adf-to-markdown", 240 | name: "ADF To Markdown", 241 | callback: async () => { 242 | console.log("HMMMM"); 243 | const json = JSON.parse( 244 | '{"type":"doc","content":[{"type":"paragraph","content":[{"text":"Testing","type":"text"}]}],"version":1}', 245 | ); 246 | console.log({ json }); 247 | 248 | const confluenceClient = new ObsidianConfluenceClient({ 249 | host: this.settings.confluenceBaseUrl, 250 | authentication: { 251 | basic: { 252 | email: this.settings.atlassianUserName, 253 | apiToken: this.settings.atlassianApiToken, 254 | }, 255 | }, 256 | }); 257 | const testingPage = 258 | await confluenceClient.content.getContentById({ 259 | id: "9732097", 260 | expand: ["body.atlas_doc_format", "space"], 261 | }); 262 | const adf = JSON.parse( 263 | testingPage.body?.atlas_doc_format?.value || 264 | '{type: "doc", content:[]}', 265 | ); 266 | renderADFDoc(adf); 267 | }, 268 | }); 269 | 270 | this.addCommand({ 271 | id: "publish-current", 272 | name: "Publish Current File to Confluence", 273 | checkCallback: (checking: boolean) => { 274 | if (!this.isSyncing) { 275 | if (!checking) { 276 | this.isSyncing = true; 277 | this.doPublish(this.activeLeafPath(this.workspace)) 278 | .then((stats) => { 279 | new CompletedModal(this.app, { 280 | uploadResults: stats, 281 | }).open(); 282 | }) 283 | .catch((error) => { 284 | if (error instanceof Error) { 285 | new CompletedModal(this.app, { 286 | uploadResults: { 287 | errorMessage: error.message, 288 | failedFiles: [], 289 | filesUploadResult: [], 290 | }, 291 | }).open(); 292 | } else { 293 | new CompletedModal(this.app, { 294 | uploadResults: { 295 | errorMessage: JSON.stringify(error), 296 | failedFiles: [], 297 | filesUploadResult: [], 298 | }, 299 | }).open(); 300 | } 301 | }) 302 | .finally(() => { 303 | this.isSyncing = false; 304 | }); 305 | } 306 | return true; 307 | } 308 | return true; 309 | }, 310 | }); 311 | 312 | this.addCommand({ 313 | id: "publish-all", 314 | name: "Publish All to Confluence", 315 | checkCallback: (checking: boolean) => { 316 | if (!this.isSyncing) { 317 | if (!checking) { 318 | this.isSyncing = true; 319 | this.doPublish() 320 | .then((stats) => { 321 | new CompletedModal(this.app, { 322 | uploadResults: stats, 323 | }).open(); 324 | }) 325 | .catch((error) => { 326 | if (error instanceof Error) { 327 | new CompletedModal(this.app, { 328 | uploadResults: { 329 | errorMessage: error.message, 330 | failedFiles: [], 331 | filesUploadResult: [], 332 | }, 333 | }).open(); 334 | } else { 335 | new CompletedModal(this.app, { 336 | uploadResults: { 337 | errorMessage: JSON.stringify(error), 338 | failedFiles: [], 339 | filesUploadResult: [], 340 | }, 341 | }).open(); 342 | } 343 | }) 344 | .finally(() => { 345 | this.isSyncing = false; 346 | }); 347 | } 348 | } 349 | return true; 350 | }, 351 | }); 352 | 353 | this.addCommand({ 354 | id: "enable-publishing", 355 | name: "Enable publishing to Confluence", 356 | editorCheckCallback: (checking, _editor, view) => { 357 | if (!view.file) { 358 | return false; 359 | } 360 | 361 | if (checking) { 362 | const frontMatter = this.app.metadataCache.getCache( 363 | view.file.path, 364 | )?.frontmatter; 365 | const file = view.file; 366 | const enabledForPublishing = 367 | (file.path.startsWith(this.settings.folderToPublish) && 368 | (!frontMatter || 369 | frontMatter["connie-publish"] !== false)) || 370 | (frontMatter && frontMatter["connie-publish"] === true); 371 | return !enabledForPublishing; 372 | } 373 | 374 | this.app.fileManager.processFrontMatter( 375 | view.file, 376 | (frontmatter) => { 377 | if ( 378 | view.file && 379 | view.file.path.startsWith( 380 | this.settings.folderToPublish, 381 | ) 382 | ) { 383 | delete frontmatter["connie-publish"]; 384 | } else { 385 | frontmatter["connie-publish"] = true; 386 | } 387 | }, 388 | ); 389 | return true; 390 | }, 391 | }); 392 | 393 | this.addCommand({ 394 | id: "disable-publishing", 395 | name: "Disable publishing to Confluence", 396 | editorCheckCallback: (checking, _editor, view) => { 397 | if (!view.file) { 398 | return false; 399 | } 400 | 401 | if (checking) { 402 | const frontMatter = this.app.metadataCache.getCache( 403 | view.file.path, 404 | )?.frontmatter; 405 | const file = view.file; 406 | const enabledForPublishing = 407 | (file.path.startsWith(this.settings.folderToPublish) && 408 | (!frontMatter || 409 | frontMatter["connie-publish"] !== false)) || 410 | (frontMatter && frontMatter["connie-publish"] === true); 411 | return enabledForPublishing; 412 | } 413 | 414 | this.app.fileManager.processFrontMatter( 415 | view.file, 416 | (frontmatter) => { 417 | if ( 418 | view.file && 419 | view.file.path.startsWith( 420 | this.settings.folderToPublish, 421 | ) 422 | ) { 423 | frontmatter["connie-publish"] = false; 424 | } else { 425 | delete frontmatter["connie-publish"]; 426 | } 427 | }, 428 | ); 429 | return true; 430 | }, 431 | }); 432 | 433 | this.addCommand({ 434 | id: "page-settings", 435 | name: "Update Confluence Page Settings", 436 | editorCallback: (_editor, view) => { 437 | if (!view.file) { 438 | return false; 439 | } 440 | 441 | const frontMatter = this.app.metadataCache.getCache( 442 | view.file.path, 443 | )?.frontmatter; 444 | 445 | const file = view.file; 446 | 447 | new ConfluencePerPageForm(this.app, { 448 | config: ConfluencePageConfig.conniePerPageConfig, 449 | initialValues: 450 | mapFrontmatterToConfluencePerPageUIValues(frontMatter), 451 | onSubmit: (values, close) => { 452 | const valuesToSet: Partial = 453 | {}; 454 | for (const propertyKey in values) { 455 | if ( 456 | Object.prototype.hasOwnProperty.call( 457 | values, 458 | propertyKey, 459 | ) 460 | ) { 461 | const element = 462 | values[ 463 | propertyKey as keyof ConfluencePerPageUIValues 464 | ]; 465 | if (element.isSet) { 466 | valuesToSet[ 467 | propertyKey as keyof ConfluencePerPageUIValues 468 | ] = element.value as never; 469 | } 470 | } 471 | } 472 | this.adaptor.updateMarkdownValues( 473 | file.path, 474 | valuesToSet, 475 | ); 476 | close(); 477 | }, 478 | }).open(); 479 | return true; 480 | }, 481 | }); 482 | 483 | this.addSettingTab(new ConfluenceSettingTab(this.app, this)); 484 | } 485 | 486 | override async onunload() {} 487 | 488 | async loadSettings() { 489 | this.settings = Object.assign( 490 | {}, 491 | ConfluenceUploadSettings.DEFAULT_SETTINGS, 492 | { mermaidTheme: "match-obsidian" }, 493 | await this.loadData(), 494 | ); 495 | } 496 | 497 | async saveSettings() { 498 | await this.saveData(this.settings); 499 | await this.init(); 500 | } 501 | } 502 | -------------------------------------------------------------------------------- /src/ConfluencePerPageForm.tsx: -------------------------------------------------------------------------------- 1 | import { Modal, App, FrontMatterCache } from "obsidian"; 2 | import ReactDOM from "react-dom"; 3 | import React, { useState, ChangeEvent } from "react"; 4 | import { ConfluencePageConfig } from "@markdown-confluence/lib"; 5 | import { Property } from "csstype"; 6 | 7 | export type ConfluencePerPageUIValues = { 8 | [K in keyof ConfluencePageConfig.ConfluencePerPageConfig]: { 9 | value: 10 | | ConfluencePageConfig.ConfluencePerPageConfig[K]["default"] 11 | | undefined; 12 | isSet: boolean; 13 | }; 14 | }; 15 | 16 | export function mapFrontmatterToConfluencePerPageUIValues( 17 | frontmatter: FrontMatterCache | undefined, 18 | ): ConfluencePerPageUIValues { 19 | const config = ConfluencePageConfig.conniePerPageConfig; 20 | const result: Partial = {}; 21 | 22 | if (!frontmatter) { 23 | throw new Error("Missing frontmatter"); 24 | } 25 | 26 | for (const propertyKey in config) { 27 | if (config.hasOwnProperty(propertyKey)) { 28 | const { 29 | key, 30 | inputType, 31 | default: defaultValue, 32 | } = config[ 33 | propertyKey as keyof ConfluencePageConfig.ConfluencePerPageConfig 34 | ]; 35 | const frontmatterValue = frontmatter[key]; 36 | 37 | if (frontmatterValue !== undefined) { 38 | result[propertyKey as keyof ConfluencePerPageUIValues] = { 39 | value: frontmatterValue, 40 | isSet: true, 41 | }; 42 | } else { 43 | switch (inputType) { 44 | case "options": 45 | case "array-text": 46 | result[propertyKey as keyof ConfluencePerPageUIValues] = 47 | { value: defaultValue as never, isSet: false }; 48 | break; 49 | case "boolean": 50 | case "text": 51 | result[propertyKey as keyof ConfluencePerPageUIValues] = 52 | { value: undefined, isSet: false }; 53 | break; 54 | default: 55 | throw new Error("Missing case for inputType"); 56 | } 57 | } 58 | } 59 | } 60 | return result as ConfluencePerPageUIValues; 61 | } 62 | 63 | interface FormProps { 64 | config: ConfluencePageConfig.ConfluencePerPageConfig; 65 | initialValues: ConfluencePerPageUIValues; 66 | onSubmit: (values: ConfluencePerPageUIValues) => void; 67 | } 68 | 69 | interface ModalProps { 70 | config: ConfluencePageConfig.ConfluencePerPageConfig; 71 | initialValues: ConfluencePerPageUIValues; 72 | onSubmit: (values: ConfluencePerPageUIValues, close: () => void) => void; 73 | } 74 | 75 | const handleChange = ( 76 | key: string, 77 | value: unknown, 78 | inputValidator: ConfluencePageConfig.InputValidator, 79 | setValues: React.Dispatch>, 80 | setErrors: React.Dispatch>>, 81 | isSetValue: boolean, 82 | ) => { 83 | const validationResult = inputValidator(value); 84 | 85 | setValues((prevValues) => ({ 86 | ...prevValues, 87 | [key]: { 88 | ...prevValues[key as keyof ConfluencePerPageUIValues], 89 | ...(isSetValue ? { isSet: value } : { value }), 90 | }, 91 | })); 92 | setErrors((prevErrors) => ({ 93 | ...prevErrors, 94 | [key]: validationResult.valid ? [] : validationResult.errors, 95 | })); 96 | }; 97 | 98 | const styles = { 99 | errorTd: { 100 | columnSpan: "all" as Property.ColumnSpan, 101 | color: "red", 102 | }, 103 | }; 104 | 105 | const renderTextInput = ( 106 | key: string, 107 | config: ConfluencePageConfig.FrontmatterConfig, 108 | values: ConfluencePerPageUIValues, 109 | errors: Record, 110 | setValues: React.Dispatch>, 111 | setErrors: React.Dispatch>>, 112 | ) => ( 113 | <> 114 | 115 | 116 | 117 | 118 | 119 | ) => 127 | handleChange( 128 | key, 129 | e.target.value, 130 | config.inputValidator, 131 | setValues, 132 | setErrors, 133 | false, 134 | ) 135 | } 136 | /> 137 | 138 | 139 | ) => 147 | handleChange( 148 | key, 149 | e.target.checked, 150 | config.inputValidator, 151 | setValues, 152 | setErrors, 153 | true, 154 | ) 155 | } 156 | /> 157 | 158 | 159 | 160 | {(errors[key]?.length ?? 0) > 0 && ( 161 | 162 |
    163 | {(errors[key] ?? []).map((error) => ( 164 |

    {error.message}

    165 | ))} 166 |
    167 | 168 | )} 169 | 170 | 171 | ); 172 | 173 | const renderArrayText = ( 174 | key: string, 175 | config: ConfluencePageConfig.FrontmatterConfig, 176 | values: ConfluencePerPageUIValues, 177 | errors: Record, 178 | setValues: React.Dispatch>, 179 | setErrors: React.Dispatch>>, 180 | ) => ( 181 | <> 182 | 183 | 184 | 185 | 186 | 187 | {( 188 | values[key as keyof ConfluencePerPageUIValues] 189 | .value as unknown as string[] 190 | ).map((value, index) => ( 191 | ) => { 196 | const newArray = [ 197 | ...(values[ 198 | key as keyof ConfluencePerPageUIValues 199 | ].value as unknown as string[]), 200 | ]; 201 | newArray[index] = e.target.value; 202 | handleChange( 203 | key, 204 | newArray, 205 | config.inputValidator, 206 | setValues, 207 | setErrors, 208 | false, 209 | ); 210 | }} 211 | /> 212 | ))} 213 | 233 | 234 | 235 | ) => 243 | handleChange( 244 | key, 245 | e.target.checked, 246 | config.inputValidator, 247 | setValues, 248 | setErrors, 249 | true, 250 | ) 251 | } 252 | /> 253 | 254 | 255 | 256 | {(errors[key]?.length ?? 0) > 0 && ( 257 | 258 |
    259 | {(errors[key] ?? []).map((error) => ( 260 |

    {error.message}

    261 | ))} 262 |
    263 | 264 | )} 265 | 266 | 267 | ); 268 | 269 | const renderBoolean = ( 270 | key: string, 271 | config: ConfluencePageConfig.FrontmatterConfig, 272 | values: ConfluencePerPageUIValues, 273 | errors: Record, 274 | setValues: React.Dispatch>, 275 | setErrors: React.Dispatch>>, 276 | ) => ( 277 | <> 278 | 279 | 280 | 281 | 282 | 283 | ) => 291 | handleChange( 292 | key, 293 | e.target.checked, 294 | config.inputValidator, 295 | setValues, 296 | setErrors, 297 | false, 298 | ) 299 | } 300 | /> 301 | 302 | 303 | ) => 311 | handleChange( 312 | key, 313 | e.target.checked, 314 | config.inputValidator, 315 | setValues, 316 | setErrors, 317 | true, 318 | ) 319 | } 320 | /> 321 | 322 | 323 | 324 | {(errors[key]?.length ?? 0) > 0 && ( 325 | 326 |
    327 | {(errors[key] ?? []).map((error) => ( 328 |

    {error.message}

    329 | ))} 330 |
    331 | 332 | )} 333 | 334 | 335 | ); 336 | const renderOptions = ( 337 | key: string, 338 | config: ConfluencePageConfig.FrontmatterConfig< 339 | ConfluencePageConfig.PageContentType, 340 | "options" 341 | >, 342 | values: ConfluencePerPageUIValues, 343 | errors: Record, 344 | setValues: React.Dispatch>, 345 | setErrors: React.Dispatch>>, 346 | ) => ( 347 | <> 348 | 349 | 350 | 351 | 352 | 353 | 377 | 378 | 379 | ) => 387 | handleChange( 388 | key, 389 | e.target.checked, 390 | config.inputValidator, 391 | setValues, 392 | setErrors, 393 | true, 394 | ) 395 | } 396 | /> 397 | 398 | 399 | 400 | {(errors[key]?.length ?? 0) > 0 && ( 401 | 402 |
    403 | {(errors[key] ?? []).map((error) => ( 404 |

    {error.message}

    405 | ))} 406 |
    407 | 408 | )} 409 | 410 | 411 | ); 412 | 413 | const ConfluenceForm: React.FC = ({ 414 | config, 415 | initialValues, 416 | onSubmit, 417 | }) => { 418 | const [values, setValues] = 419 | useState(initialValues); 420 | const [errors, setErrors] = useState>({}); 421 | 422 | const handleSubmit = (e: React.FormEvent) => { 423 | e.preventDefault(); 424 | onSubmit(values as ConfluencePerPageUIValues); 425 | }; 426 | 427 | return ( 428 |
    429 |

    Update Confluence Page Settings

    430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | {Object.entries(config).map(([key, config]) => { 440 | switch (config.inputType) { 441 | case "text": 442 | return renderTextInput( 443 | key, 444 | config as ConfluencePageConfig.FrontmatterConfig< 445 | string, 446 | "text" 447 | >, 448 | values, 449 | errors, 450 | setValues, 451 | setErrors, 452 | ); 453 | case "array-text": 454 | return renderArrayText( 455 | key, 456 | config as ConfluencePageConfig.FrontmatterConfig< 457 | string[], 458 | "array-text" 459 | >, 460 | values, 461 | errors, 462 | setValues, 463 | setErrors, 464 | ); 465 | case "boolean": 466 | return renderBoolean( 467 | key, 468 | config as ConfluencePageConfig.FrontmatterConfig< 469 | boolean, 470 | "boolean" 471 | >, 472 | values, 473 | errors, 474 | setValues, 475 | setErrors, 476 | ); 477 | case "options": 478 | return renderOptions( 479 | key, 480 | config as ConfluencePageConfig.FrontmatterConfig< 481 | ConfluencePageConfig.PageContentType, 482 | "options" 483 | >, 484 | values, 485 | errors, 486 | setValues, 487 | setErrors, 488 | ); 489 | default: 490 | return null; 491 | } 492 | })} 493 | 494 |
    YAML KeyValueUpdate
    495 | 496 |
    497 | ); 498 | }; 499 | 500 | export class ConfluencePerPageForm extends Modal { 501 | modalProps: ModalProps; 502 | 503 | constructor(app: App, modalProps: ModalProps) { 504 | super(app); 505 | this.modalProps = modalProps; 506 | } 507 | 508 | override onOpen() { 509 | const { contentEl } = this; 510 | const test: FormProps = { 511 | ...this.modalProps, 512 | onSubmit: (values) => { 513 | const boundClose = this.close.bind(this); 514 | this.modalProps.onSubmit(values, boundClose); 515 | }, 516 | }; 517 | ReactDOM.render(React.createElement(ConfluenceForm, test), contentEl); 518 | } 519 | 520 | override onClose() { 521 | const { contentEl } = this; 522 | ReactDOM.unmountComponentAtNode(contentEl); 523 | contentEl.empty(); 524 | } 525 | } 526 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ### Dependencies 4 | 5 | * The following workspace dependencies were updated 6 | * dependencies 7 | * @markdown-confluence/lib bumped from 3.0.4 to 3.0.0 8 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.0.4 to 3.0.0 9 | 10 | ## [5.5.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.5.1...obsidian-confluence-v5.5.2) (2023-09-24) 11 | 12 | 13 | ### Miscellaneous Chores 14 | 15 | * **obsidian-confluence:** Synchronize obsidian packages versions 16 | 17 | 18 | ### Dependencies 19 | 20 | * The following workspace dependencies were updated 21 | * dependencies 22 | * @markdown-confluence/lib bumped from 5.5.1 to 5.5.2 23 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.5.1 to 5.5.2 24 | 25 | ## [5.5.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.5.0...obsidian-confluence-v5.5.1) (2023-09-24) 26 | 27 | 28 | ### Miscellaneous Chores 29 | 30 | * **obsidian-confluence:** Synchronize obsidian packages versions 31 | 32 | 33 | ### Dependencies 34 | 35 | * The following workspace dependencies were updated 36 | * dependencies 37 | * @markdown-confluence/lib bumped from 5.5.0 to 5.5.1 38 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.5.0 to 5.5.1 39 | 40 | ## [5.5.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.4.0...obsidian-confluence-v5.5.0) (2023-06-29) 41 | 42 | 43 | ### Miscellaneous Chores 44 | 45 | * **obsidian-confluence:** Synchronize obsidian packages versions 46 | 47 | 48 | ### Dependencies 49 | 50 | * The following workspace dependencies were updated 51 | * dependencies 52 | * @markdown-confluence/lib bumped from 5.4.0 to 5.5.0 53 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.4.0 to 5.5.0 54 | 55 | ## [5.4.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.3.0...obsidian-confluence-v5.4.0) (2023-05-12) 56 | 57 | 58 | ### Features 59 | 60 | * Handle 404 when pageId included in YAML. Set to not publish and remove bad pageId ([33dde01](https://github.com/markdown-confluence/markdown-confluence/commit/33dde014ccc24368f065eec0a92dba3755644fc8)) 61 | 62 | 63 | ### Dependencies 64 | 65 | * The following workspace dependencies were updated 66 | * dependencies 67 | * @markdown-confluence/lib bumped from 5.3.0 to 5.4.0 68 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.3.0 to 5.4.0 69 | 70 | ## [5.3.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.6...obsidian-confluence-v5.3.0) (2023-05-11) 71 | 72 | 73 | ### Features 74 | 75 | * Move ImageUpload and MermaidRendering to plugins to allow for more plugins easily ([cfae670](https://github.com/markdown-confluence/markdown-confluence/commit/cfae670d3bc94c4a88d02936c94ca9c1ab47ce9e)) 76 | 77 | 78 | ### Dependencies 79 | 80 | * The following workspace dependencies were updated 81 | * dependencies 82 | * @markdown-confluence/lib bumped from 5.2.6 to 5.3.0 83 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.6 to 5.3.0 84 | 85 | ## [5.2.6](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.5...obsidian-confluence-v5.2.6) (2023-05-11) 86 | 87 | 88 | ### Miscellaneous Chores 89 | 90 | * **obsidian-confluence:** Synchronize obsidian packages versions 91 | 92 | 93 | ### Dependencies 94 | 95 | * The following workspace dependencies were updated 96 | * dependencies 97 | * @markdown-confluence/lib bumped from 5.2.5 to 5.2.6 98 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.5 to 5.2.6 99 | 100 | ## [5.2.5](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.4...obsidian-confluence-v5.2.5) (2023-05-10) 101 | 102 | 103 | ### Bug Fixes 104 | 105 | * Only load CSS that exists for obsidian styles ([c825559](https://github.com/markdown-confluence/markdown-confluence/commit/c825559c4c318d665996d4da0b2488666c44fcaa)) 106 | 107 | 108 | ### Dependencies 109 | 110 | * The following workspace dependencies were updated 111 | * dependencies 112 | * @markdown-confluence/lib bumped from 5.2.4 to 5.2.5 113 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.4 to 5.2.5 114 | 115 | ## [5.2.4](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.3...obsidian-confluence-v5.2.4) (2023-05-10) 116 | 117 | 118 | ### Miscellaneous Chores 119 | 120 | * **obsidian-confluence:** Synchronize obsidian packages versions 121 | 122 | 123 | ### Dependencies 124 | 125 | * The following workspace dependencies were updated 126 | * dependencies 127 | * @markdown-confluence/lib bumped from 5.2.3 to 5.2.4 128 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.3 to 5.2.4 129 | 130 | ## [5.2.3](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.2...obsidian-confluence-v5.2.3) (2023-05-10) 131 | 132 | 133 | ### Miscellaneous Chores 134 | 135 | * **obsidian-confluence:** Synchronize obsidian packages versions 136 | 137 | 138 | ### Dependencies 139 | 140 | * The following workspace dependencies were updated 141 | * dependencies 142 | * @markdown-confluence/lib bumped from 5.2.2 to 5.2.3 143 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.2 to 5.2.3 144 | 145 | ## [5.2.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.1...obsidian-confluence-v5.2.2) (2023-05-10) 146 | 147 | 148 | ### Miscellaneous Chores 149 | 150 | * **obsidian-confluence:** Synchronize obsidian packages versions 151 | 152 | 153 | ### Dependencies 154 | 155 | * The following workspace dependencies were updated 156 | * dependencies 157 | * @markdown-confluence/lib bumped from 5.2.1 to 5.2.2 158 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.1 to 5.2.2 159 | 160 | ## [5.2.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.0...obsidian-confluence-v5.2.1) (2023-05-10) 161 | 162 | 163 | ### Miscellaneous Chores 164 | 165 | * **obsidian-confluence:** Synchronize obsidian packages versions 166 | 167 | 168 | ### Dependencies 169 | 170 | * The following workspace dependencies were updated 171 | * dependencies 172 | * @markdown-confluence/lib bumped from 5.2.0 to 5.2.1 173 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.2.0 to 5.2.1 174 | 175 | ## [5.2.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.1.0...obsidian-confluence-v5.2.0) (2023-05-09) 176 | 177 | 178 | ### Miscellaneous Chores 179 | 180 | * **obsidian-confluence:** Synchronize obsidian packages versions 181 | 182 | 183 | ### Dependencies 184 | 185 | * The following workspace dependencies were updated 186 | * dependencies 187 | * @markdown-confluence/lib bumped from 5.1.0 to 5.2.0 188 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.1.0 to 5.2.0 189 | 190 | ## [5.1.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.0.1...obsidian-confluence-v5.1.0) (2023-05-09) 191 | 192 | 193 | ### Features 194 | 195 | * ADF To Markdown ([7257893](https://github.com/markdown-confluence/markdown-confluence/commit/725789372481baef6ba20aaf37a82dc5ca126b2e)) 196 | 197 | 198 | ### Bug Fixes 199 | 200 | * Move SettingsLoaders to own files to help with TreeShaking ([f241a11](https://github.com/markdown-confluence/markdown-confluence/commit/f241a11a3967d8a06e827ec100dca15533d38902)) 201 | 202 | 203 | ### Documentation 204 | 205 | * Update Obsidian docs to remove need for BRAT install ([9fc8fc8](https://github.com/markdown-confluence/markdown-confluence/commit/9fc8fc8236c369b53c3d5bdcc63777525f30a0c9)) 206 | 207 | 208 | ### Dependencies 209 | 210 | * The following workspace dependencies were updated 211 | * dependencies 212 | * @markdown-confluence/lib bumped from 5.0.1 to 5.1.0 213 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.0.1 to 5.1.0 214 | 215 | ## [5.0.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.0.0...obsidian-confluence-v5.0.1) (2023-05-03) 216 | 217 | 218 | ### Documentation 219 | 220 | * Add note about logging issues to mono repo ([19992f6](https://github.com/markdown-confluence/markdown-confluence/commit/19992f6705e0882025a1f8100b4ef42903df71e8)) 221 | * Fix docs when they are published to obsidian-integration repo ([bb5887b](https://github.com/markdown-confluence/markdown-confluence/commit/bb5887b96fcd27678c52552576defd0fda8dcf19)) 222 | 223 | 224 | ### Dependencies 225 | 226 | * The following workspace dependencies were updated 227 | * dependencies 228 | * @markdown-confluence/lib bumped from 5.0.0 to 5.0.1 229 | * @markdown-confluence/mermaid-electron-renderer bumped from 5.0.0 to 5.0.1 230 | 231 | ## [5.0.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.9.0...obsidian-confluence-v5.0.0) (2023-05-03) 232 | 233 | 234 | ### ⚠ BREAKING CHANGES 235 | 236 | * Remove ADFView. It adds a lot of complexity and size to Obsidian Plugin. If you need it log an issue and I will create a separate plugin for that feature. 237 | 238 | ### Features 239 | 240 | * Apply themes from Obsidian to Mermaid ([b599336](https://github.com/markdown-confluence/markdown-confluence/commit/b5993369e03cdcc0bdbdd6c83f0b6a18dd8effaa)) 241 | * Enable and fix all strict type checks ([c16ee2d](https://github.com/markdown-confluence/markdown-confluence/commit/c16ee2d83b6e30065f8c607afda652c4c21af6b3)) 242 | * Remove ADFView. It adds a lot of complexity and size to Obsidian Plugin ([74c8436](https://github.com/markdown-confluence/markdown-confluence/commit/74c84360bf0fe2afeafd4d769f11b41a5f9d6e03)) 243 | 244 | 245 | ### Bug Fixes 246 | 247 | * frontmatterHeader adds content direct to ADF instead of Markdown now ([1230878](https://github.com/markdown-confluence/markdown-confluence/commit/12308783ae23fbb2fbcd9f39871bf4429c47e18b)) 248 | * Remove ADFView from main.ts ([a21abbd](https://github.com/markdown-confluence/markdown-confluence/commit/a21abbd28c8a63cc09989b0cf9ad7d43fc5e56ae)) 249 | 250 | 251 | ### Documentation 252 | 253 | * amended the broken readme image paths for obsidian package ([97876cf](https://github.com/markdown-confluence/markdown-confluence/commit/97876cf7c55e3ac4de89d85a70dfd4ba4e8b3f15)) 254 | 255 | 256 | ### Dependencies 257 | 258 | * The following workspace dependencies were updated 259 | * dependencies 260 | * @markdown-confluence/lib bumped from 4.9.0 to 5.0.0 261 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.9.0 to 5.0.0 262 | 263 | ## [4.9.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.8.0...obsidian-confluence-v4.9.0) (2023-04-30) 264 | 265 | 266 | ### Miscellaneous Chores 267 | 268 | * **obsidian-confluence:** Synchronize obsidian packages versions 269 | 270 | 271 | ### Dependencies 272 | 273 | * The following workspace dependencies were updated 274 | * dependencies 275 | * @markdown-confluence/lib bumped from 4.8.0 to 4.9.0 276 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.8.0 to 4.9.0 277 | 278 | ## [4.8.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.5...obsidian-confluence-v4.8.0) (2023-04-30) 279 | 280 | 281 | ### Features 282 | 283 | * Add new setting to allow you to use the first heading as the page title. ([ec4e426](https://github.com/markdown-confluence/markdown-confluence/commit/ec4e426700d241c29f84ac25b28893f28f20a555)) 284 | 285 | 286 | ### Dependencies 287 | 288 | * The following workspace dependencies were updated 289 | * dependencies 290 | * @markdown-confluence/lib bumped from 4.7.5 to 4.8.0 291 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.5 to 4.8.0 292 | 293 | ## [4.7.5](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.4...obsidian-confluence-v4.7.5) (2023-04-30) 294 | 295 | 296 | ### Bug Fixes 297 | 298 | * Handle #hash links better for names that have spaces and handle internal links ([7ad345a](https://github.com/markdown-confluence/markdown-confluence/commit/7ad345af210e346517535faa7a08d801b1660ded)) 299 | 300 | 301 | ### Dependencies 302 | 303 | * The following workspace dependencies were updated 304 | * dependencies 305 | * @markdown-confluence/lib bumped from 4.7.4 to 4.7.5 306 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.4 to 4.7.5 307 | 308 | ## [4.7.4](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.3...obsidian-confluence-v4.7.4) (2023-04-29) 309 | 310 | 311 | ### Miscellaneous Chores 312 | 313 | * **obsidian-confluence:** Synchronize obsidian packages versions 314 | 315 | 316 | ### Dependencies 317 | 318 | * The following workspace dependencies were updated 319 | * dependencies 320 | * @markdown-confluence/lib bumped from 4.7.3 to 4.7.4 321 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.3 to 4.7.4 322 | 323 | ## [4.7.3](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.2...obsidian-confluence-v4.7.3) (2023-04-29) 324 | 325 | 326 | ### Miscellaneous Chores 327 | 328 | * **obsidian-confluence:** Synchronize obsidian packages versions 329 | 330 | 331 | ### Dependencies 332 | 333 | * The following workspace dependencies were updated 334 | * dependencies 335 | * @markdown-confluence/lib bumped from 4.7.2 to 4.7.3 336 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.2 to 4.7.3 337 | 338 | ## [4.7.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.1...obsidian-confluence-v4.7.2) (2023-04-28) 339 | 340 | 341 | ### Miscellaneous Chores 342 | 343 | * **obsidian-confluence:** Synchronize obsidian packages versions 344 | 345 | 346 | ### Dependencies 347 | 348 | * The following workspace dependencies were updated 349 | * dependencies 350 | * @markdown-confluence/lib bumped from 4.7.1 to 4.7.2 351 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.1 to 4.7.2 352 | 353 | ## [4.7.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.7.0...obsidian-confluence-v4.7.1) (2023-04-28) 354 | 355 | 356 | ### Miscellaneous Chores 357 | 358 | * **obsidian-confluence:** Synchronize obsidian packages versions 359 | 360 | 361 | ### Dependencies 362 | 363 | * The following workspace dependencies were updated 364 | * dependencies 365 | * @markdown-confluence/lib bumped from 4.7.0 to 4.7.1 366 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.7.0 to 4.7.1 367 | 368 | ## [4.7.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.6.4...obsidian-confluence-v4.7.0) (2023-04-28) 369 | 370 | 371 | ### Features 372 | 373 | * Add links to updated pages on Completed Dialog ([65c1a42](https://github.com/markdown-confluence/markdown-confluence/commit/65c1a42b7b039512d5582b055f8adfb4f25333c8)) 374 | 375 | 376 | ### Bug Fixes 377 | 378 | * fmt ([91ff4e9](https://github.com/markdown-confluence/markdown-confluence/commit/91ff4e99135b90709ab3f185873b98ce94eb7242)) 379 | 380 | 381 | ### Documentation 382 | 383 | * Update repo and org names to match new names ([404a85b](https://github.com/markdown-confluence/markdown-confluence/commit/404a85b206704873d57c233131ba4f564c4ccd86)) 384 | 385 | 386 | ### Dependencies 387 | 388 | * The following workspace dependencies were updated 389 | * dependencies 390 | * @markdown-confluence/lib bumped from 4.6.4 to 4.7.0 391 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.6.4 to 4.7.0 392 | 393 | ## [4.6.4](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.6.3...obsidian-confluence-v4.6.4) (2023-04-28) 394 | 395 | 396 | ### Miscellaneous Chores 397 | 398 | * **obsidian-confluence:** Synchronize obsidian packages versions 399 | 400 | 401 | ### Dependencies 402 | 403 | * The following workspace dependencies were updated 404 | * dependencies 405 | * @markdown-confluence/lib bumped from 4.6.3 to 4.6.4 406 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.6.3 to 4.6.4 407 | 408 | ## [4.6.3](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.6.2...obsidian-confluence-v4.6.3) (2023-04-28) 409 | 410 | 411 | ### Miscellaneous Chores 412 | 413 | * **obsidian-confluence:** Synchronize obsidian packages versions 414 | 415 | 416 | ### Dependencies 417 | 418 | * The following workspace dependencies were updated 419 | * dependencies 420 | * @markdown-confluence/lib bumped from 4.6.2 to 4.6.3 421 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.6.2 to 4.6.3 422 | 423 | ## [4.6.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.6.1...obsidian-confluence-v4.6.2) (2023-04-28) 424 | 425 | 426 | ### Miscellaneous Chores 427 | 428 | * **obsidian-confluence:** Synchronize obsidian packages versions 429 | 430 | 431 | ### Dependencies 432 | 433 | * The following workspace dependencies were updated 434 | * dependencies 435 | * @markdown-confluence/lib bumped from 4.6.1 to 4.6.2 436 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.6.1 to 4.6.2 437 | 438 | ## [4.6.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.6.0...obsidian-confluence-v4.6.1) (2023-04-28) 439 | 440 | 441 | ### Miscellaneous Chores 442 | 443 | * **obsidian-confluence:** Synchronize obsidian packages versions 444 | 445 | 446 | ### Dependencies 447 | 448 | * The following workspace dependencies were updated 449 | * dependencies 450 | * @markdown-confluence/lib bumped from 4.6.0 to 4.6.1 451 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.6.0 to 4.6.1 452 | 453 | ## [4.6.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.5.0...obsidian-confluence-v4.6.0) (2023-04-28) 454 | 455 | 456 | ### Miscellaneous Chores 457 | 458 | * **obsidian-confluence:** Synchronize obsidian packages versions 459 | 460 | 461 | ### Dependencies 462 | 463 | * The following workspace dependencies were updated 464 | * dependencies 465 | * @markdown-confluence/lib bumped from 4.5.0 to 4.6.0 466 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.5.0 to 4.6.0 467 | 468 | ## [4.5.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.4.0...obsidian-confluence-v4.5.0) (2023-04-28) 469 | 470 | 471 | ### Miscellaneous Chores 472 | 473 | * **obsidian-confluence:** Synchronize obsidian packages versions 474 | 475 | 476 | ### Dependencies 477 | 478 | * The following workspace dependencies were updated 479 | * dependencies 480 | * @markdown-confluence/lib bumped from 4.4.0 to 4.5.0 481 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.4.0 to 4.5.0 482 | 483 | ## [4.4.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.3.0...obsidian-confluence-v4.4.0) (2023-04-27) 484 | 485 | 486 | ### Miscellaneous Chores 487 | 488 | * **obsidian-confluence:** Synchronize obsidian packages versions 489 | 490 | 491 | ### Dependencies 492 | 493 | * The following workspace dependencies were updated 494 | * dependencies 495 | * @markdown-confluence/lib bumped from 4.3.0 to 4.4.0 496 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.3.0 to 4.4.0 497 | 498 | ## [4.3.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.8...obsidian-confluence-v4.3.0) (2023-04-27) 499 | 500 | 501 | ### Dependencies 502 | 503 | * adf-utils for Obsidian ([3784f95](https://github.com/markdown-confluence/markdown-confluence/commit/3784f9536f642092330ca12f67fdf8047c7c88d3)) 504 | * **deps:** bump @atlaskit/editor-json-transformer from 8.8.3 to 8.8.4 ([b9a4496](https://github.com/markdown-confluence/markdown-confluence/commit/b9a4496c9963b8da44dc89a602865077fa912028)) 505 | * **deps:** bump @atlaskit/renderer from 107.3.2 to 107.3.3 ([252f911](https://github.com/markdown-confluence/markdown-confluence/commit/252f911d42bcdeee1febadfbd6e90e226416b990)) 506 | * The following workspace dependencies were updated 507 | * dependencies 508 | * @markdown-confluence/lib bumped from 4.2.8 to 4.3.0 509 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.8 to 4.3.0 510 | 511 | ## [4.2.8](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.7...obsidian-confluence-v4.2.8) (2023-04-26) 512 | 513 | 514 | ### Miscellaneous Chores 515 | 516 | * **obsidian-confluence:** Synchronize obsidian packages versions 517 | 518 | 519 | ### Dependencies 520 | 521 | * The following workspace dependencies were updated 522 | * dependencies 523 | * @markdown-confluence/lib bumped from 4.2.7 to 4.2.8 524 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.7 to 4.2.8 525 | 526 | ## [4.2.7](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.6...obsidian-confluence-v4.2.7) (2023-04-26) 527 | 528 | 529 | ### Miscellaneous Chores 530 | 531 | * **obsidian-confluence:** Synchronize obsidian packages versions 532 | 533 | 534 | ### Dependencies 535 | 536 | * The following workspace dependencies were updated 537 | * dependencies 538 | * @markdown-confluence/lib bumped from 4.2.6 to 4.2.7 539 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.6 to 4.2.7 540 | 541 | ## [4.2.6](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.5...obsidian-confluence-v4.2.6) (2023-04-26) 542 | 543 | 544 | ### Miscellaneous Chores 545 | 546 | * **obsidian-confluence:** Synchronize obsidian packages versions 547 | 548 | 549 | ### Dependencies 550 | 551 | * The following workspace dependencies were updated 552 | * dependencies 553 | * @markdown-confluence/lib bumped from 4.2.5 to 4.2.6 554 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.5 to 4.2.6 555 | 556 | ## [4.2.5](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.4...obsidian-confluence-v4.2.5) (2023-04-26) 557 | 558 | 559 | ### Miscellaneous Chores 560 | 561 | * **obsidian-confluence:** Synchronize obsidian packages versions 562 | 563 | 564 | ### Dependencies 565 | 566 | * The following workspace dependencies were updated 567 | * dependencies 568 | * @markdown-confluence/lib bumped from 4.2.4 to 4.2.5 569 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.4 to 4.2.5 570 | 571 | ## [4.2.4](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.3...obsidian-confluence-v4.2.4) (2023-04-26) 572 | 573 | 574 | ### Bug Fixes 575 | 576 | * Include README for Obsidian repo and copy obsidian package source into repo to be stamped with release tag ([0ac4de3](https://github.com/markdown-confluence/markdown-confluence/commit/0ac4de3f2d37609c49dab043f47a51a83dd594f8)) 577 | 578 | 579 | ### Dependencies 580 | 581 | * The following workspace dependencies were updated 582 | * dependencies 583 | * @markdown-confluence/lib bumped from 4.2.3 to 4.2.4 584 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.3 to 4.2.4 585 | 586 | ## [4.2.3](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.2...obsidian-confluence-v4.2.3) (2023-04-26) 587 | 588 | 589 | ### Bug Fixes 590 | 591 | * Bump version ([f22975a](https://github.com/markdown-confluence/markdown-confluence/commit/f22975a0899fa895b06f6ec3be6046d7958e08d5)) 592 | 593 | 594 | ### Dependencies 595 | 596 | * The following workspace dependencies were updated 597 | * dependencies 598 | * @markdown-confluence/lib bumped from 4.2.2 to 4.2.3 599 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.2 to 4.2.3 600 | 601 | ## [4.2.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.1...obsidian-confluence-v4.2.2) (2023-04-26) 602 | 603 | 604 | ### Bug Fixes 605 | 606 | * Rename links to align with repo rename ([742e98c](https://github.com/markdown-confluence/markdown-confluence/commit/742e98c3b6d29caab074e7a09d744120069b2d99)) 607 | 608 | 609 | ### Dependencies 610 | 611 | * The following workspace dependencies were updated 612 | * dependencies 613 | * @markdown-confluence/lib bumped from 4.2.1 to 4.2.2 614 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.1 to 4.2.2 615 | 616 | ## [4.2.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.2.0...obsidian-confluence-v4.2.1) (2023-04-26) 617 | 618 | 619 | ### Miscellaneous Chores 620 | 621 | * **obsidian-confluence:** Synchronize obsidian packages versions 622 | 623 | 624 | ### Dependencies 625 | 626 | * The following workspace dependencies were updated 627 | * dependencies 628 | * @markdown-confluence/lib bumped from 4.2.0 to 4.2.1 629 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.2.0 to 4.2.1 630 | 631 | ## [4.2.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.1.1...obsidian-confluence-v4.2.0) (2023-04-26) 632 | 633 | 634 | ### Miscellaneous Chores 635 | 636 | * **obsidian-confluence:** Synchronize obsidian packages versions 637 | 638 | 639 | ### Dependencies 640 | 641 | * The following workspace dependencies were updated 642 | * dependencies 643 | * @markdown-confluence/lib bumped from 4.1.1 to 4.2.0 644 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.1.1 to 4.2.0 645 | 646 | ## [4.1.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.1.0...obsidian-confluence-v4.1.1) (2023-04-26) 647 | 648 | 649 | ### Miscellaneous Chores 650 | 651 | * **obsidian-confluence:** Synchronize obsidian packages versions 652 | 653 | 654 | ### Dependencies 655 | 656 | * The following workspace dependencies were updated 657 | * dependencies 658 | * @markdown-confluence/lib bumped from 4.1.0 to 4.1.1 659 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.1.0 to 4.1.1 660 | 661 | ## [4.1.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.0.4...obsidian-confluence-v4.1.0) (2023-04-26) 662 | 663 | 664 | ### Miscellaneous Chores 665 | 666 | * **obsidian-confluence:** Synchronize obsidian packages versions 667 | 668 | 669 | ### Dependencies 670 | 671 | * The following workspace dependencies were updated 672 | * dependencies 673 | * @markdown-confluence/lib bumped from 4.0.4 to 4.1.0 674 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.0.4 to 4.1.0 675 | 676 | ## [4.0.4](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.0.3...obsidian-confluence-v4.0.4) (2023-04-26) 677 | 678 | 679 | ### Miscellaneous Chores 680 | 681 | * **obsidian-confluence:** Synchronize obsidian packages versions 682 | 683 | 684 | ### Dependencies 685 | 686 | * The following workspace dependencies were updated 687 | * dependencies 688 | * @markdown-confluence/lib bumped from 4.0.3 to 4.0.4 689 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.0.3 to 4.0.4 690 | 691 | ## [4.0.3](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.0.2...obsidian-confluence-v4.0.3) (2023-04-26) 692 | 693 | 694 | ### Bug Fixes 695 | 696 | * Update Token to support packages ([73d3b54](https://github.com/markdown-confluence/markdown-confluence/commit/73d3b544781c927cf847dfe34e839201cb5b92d2)) 697 | 698 | 699 | ### Dependencies 700 | 701 | * The following workspace dependencies were updated 702 | * dependencies 703 | * @markdown-confluence/lib bumped from 4.0.2 to 4.0.3 704 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.0.2 to 4.0.3 705 | 706 | ## [4.0.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.0.1...obsidian-confluence-v4.0.2) (2023-04-26) 707 | 708 | 709 | ### Miscellaneous Chores 710 | 711 | * **obsidian-confluence:** Synchronize obsidian packages versions 712 | 713 | 714 | ### Dependencies 715 | 716 | * The following workspace dependencies were updated 717 | * dependencies 718 | * @markdown-confluence/lib bumped from 4.0.1 to 4.0.2 719 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.0.1 to 4.0.2 720 | 721 | ## [4.0.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v4.0.0...obsidian-confluence-v4.0.1) (2023-04-26) 722 | 723 | 724 | ### Miscellaneous Chores 725 | 726 | * **obsidian-confluence:** Synchronize obsidian packages versions 727 | 728 | 729 | ### Dependencies 730 | 731 | * The following workspace dependencies were updated 732 | * dependencies 733 | * @markdown-confluence/lib bumped from 4.0.0 to 4.0.1 734 | * @markdown-confluence/mermaid-electron-renderer bumped from 4.0.0 to 4.0.1 735 | 736 | ## [4.0.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.7.0...obsidian-confluence-v4.0.0) (2023-04-26) 737 | 738 | 739 | ### ⚠ BREAKING CHANGES 740 | 741 | * No longer bundling the lib package to help with tree shaking and code navigation 742 | 743 | ### Features 744 | 745 | * Initial CLI version ([85b4aff](https://github.com/markdown-confluence/markdown-confluence/commit/85b4aff13921accf6dd376e18929f3a19087757e)) 746 | 747 | 748 | ### Dependencies 749 | 750 | * The following workspace dependencies were updated 751 | * dependencies 752 | * @markdown-confluence/lib bumped from 3.7.0 to 4.0.0 753 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.7.0 to 4.0.0 754 | 755 | ## [3.7.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.6.1...obsidian-confluence-v3.7.0) (2023-04-24) 756 | 757 | 758 | ### Features 759 | 760 | * Make ADF the same as what Confluence returns. ([a223c72](https://github.com/markdown-confluence/markdown-confluence/commit/a223c72057fe154f3a47916fb97e1c92830bdf7c)) 761 | * Map Inline Comments with best effort ([b1d8db3](https://github.com/markdown-confluence/markdown-confluence/commit/b1d8db3eb1d68ebc06c614052ea41693f47842e2)) 762 | 763 | 764 | ### Bug Fixes 765 | 766 | * Add category when uploading Sarif file ([3fb888b](https://github.com/markdown-confluence/markdown-confluence/commit/3fb888b9600aea095892c50dc210779df709c240)) 767 | 768 | 769 | ### Dependencies 770 | 771 | * The following workspace dependencies were updated 772 | * dependencies 773 | * @markdown-confluence/lib bumped from 3.6.1 to 3.7.0 774 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.6.1 to 3.7.0 775 | 776 | ## [3.6.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.6.0...obsidian-confluence-v3.6.1) (2023-04-21) 777 | 778 | 779 | ### Miscellaneous Chores 780 | 781 | * **obsidian-confluence:** Synchronize obsidian packages versions 782 | 783 | 784 | ### Dependencies 785 | 786 | * The following workspace dependencies were updated 787 | * dependencies 788 | * @markdown-confluence/lib bumped from 3.6.0 to 3.6.1 789 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.6.0 to 3.6.1 790 | 791 | ## [3.6.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.5.0...obsidian-confluence-v3.6.0) (2023-04-21) 792 | 793 | 794 | ### Miscellaneous Chores 795 | 796 | * **obsidian-confluence:** Synchronize obsidian packages versions 797 | 798 | 799 | ### Dependencies 800 | 801 | * The following workspace dependencies were updated 802 | * dependencies 803 | * @markdown-confluence/lib bumped from 3.5.0 to 3.6.0 804 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.5.0 to 3.6.0 805 | 806 | ## [3.5.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.4.1...obsidian-confluence-v3.5.0) (2023-04-21) 807 | 808 | 809 | ### Bug Fixes 810 | 811 | * Add missing homepage and bugs to package.json ([c920345](https://github.com/markdown-confluence/markdown-confluence/commit/c92034563ce2f8d11a40ed2c68b104807eace3be)) 812 | 813 | 814 | ### Dependencies 815 | 816 | * The following workspace dependencies were updated 817 | * dependencies 818 | * @markdown-confluence/lib bumped from 3.4.1 to 3.5.0 819 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.4.1 to 3.5.0 820 | 821 | ## [3.4.1](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.4.0...obsidian-confluence-v3.4.1) (2023-04-20) 822 | 823 | 824 | ### Miscellaneous Chores 825 | 826 | * **obsidian-confluence:** Synchronize obsidian packages versions 827 | 828 | 829 | ### Dependencies 830 | 831 | * The following workspace dependencies were updated 832 | * dependencies 833 | * @markdown-confluence/lib bumped from 3.4.0 to 3.4.1 834 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.4.0 to 3.4.1 835 | 836 | ## [3.4.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.3.0...obsidian-confluence-v3.4.0) (2023-04-20) 837 | 838 | 839 | ### Features 840 | 841 | * **blog:** Blog support. ([e0bdc24](https://github.com/markdown-confluence/markdown-confluence/commit/e0bdc248c9845f4a609f7d9f9c7de388ea183b12)) 842 | * Update Confluence Page Settings Command ([a7d395e](https://github.com/markdown-confluence/markdown-confluence/commit/a7d395e5a2ddc9323a683bc9c877f8878740422a)) 843 | * Write `connie-publish: true` to all files that have been published to ensure even if you move the files they still will be published. ([a7d395e](https://github.com/markdown-confluence/markdown-confluence/commit/a7d395e5a2ddc9323a683bc9c877f8878740422a)) 844 | 845 | 846 | ### Dependencies 847 | 848 | * The following workspace dependencies were updated 849 | * dependencies 850 | * @markdown-confluence/lib bumped from 3.3.0 to 3.4.0 851 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.3.0 to 3.4.0 852 | 853 | ## [3.3.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.2.0...obsidian-confluence-v3.3.0) (2023-04-18) 854 | 855 | 856 | ### Features 857 | 858 | * Update a page when you are the last modifier ([5c42d77](https://github.com/markdown-confluence/markdown-confluence/commit/5c42d7787cf4c53098759ac221a81369e033df3d)) 859 | 860 | 861 | ### Bug Fixes 862 | 863 | * npm fmt ([206269c](https://github.com/markdown-confluence/markdown-confluence/commit/206269cc887eb75659dd77673318715eb3db1457)) 864 | * Updates requested https://github.com/obsidianmd/obsidian-releases/pull/1867#issuecomment-1512710718 ([47c4bf9](https://github.com/markdown-confluence/markdown-confluence/commit/47c4bf9d6ba2efb70e2ae62d59623f13f5db9183)) 865 | 866 | 867 | ### Dependencies 868 | 869 | * The following workspace dependencies were updated 870 | * dependencies 871 | * @markdown-confluence/lib bumped from 3.2.0 to 3.3.0 872 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.2.0 to 3.3.0 873 | 874 | ## [3.2.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.1.0...obsidian-confluence-v3.2.0) (2023-04-18) 875 | 876 | 877 | ### Miscellaneous Chores 878 | 879 | * **obsidian-confluence:** Synchronize obsidian packages versions 880 | 881 | 882 | ### Dependencies 883 | 884 | * The following workspace dependencies were updated 885 | * dependencies 886 | * @markdown-confluence/lib bumped from 3.1.0 to 3.2.0 887 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.1.0 to 3.2.0 888 | 889 | ## [3.1.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.0.2...obsidian-confluence-v3.1.0) (2023-04-18) 890 | 891 | 892 | ### Bug Fixes 893 | 894 | * Bump version ([a798554](https://github.com/markdown-confluence/markdown-confluence/commit/a798554d470e880ab53f689412b0c6aeab269d2c)) 895 | 896 | 897 | ### Dependencies 898 | 899 | * The following workspace dependencies were updated 900 | * dependencies 901 | * @markdown-confluence/lib bumped from 3.0.1 to 3.1.0 902 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.0.1 to 3.1.0 903 | 904 | ## [3.0.2](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v3.0.0...obsidian-confluence-v3.0.2) (2023-04-18) 905 | 906 | 907 | ### Bug Fixes 908 | 909 | * Bump obsidian version ([c42e0d2](https://github.com/markdown-confluence/markdown-confluence/commit/c42e0d2335c52a4beddcb0273e17ad287b9166ea)) 910 | * Bump version I hope ([39b93eb](https://github.com/markdown-confluence/markdown-confluence/commit/39b93eba447f2a1f706ff6e65e7e8cabea08bf75)) 911 | * noEmit for Obsidian package ([7a36a92](https://github.com/markdown-confluence/markdown-confluence/commit/7a36a924f8bd8b97b53d6bdaf8132e8f36191192)) 912 | * **ReleasePlease:** Fix to use a different name for package due to the actual obsidian package ([3f94f7e](https://github.com/markdown-confluence/markdown-confluence/commit/3f94f7e15745139f7530ae1f86b0334f7d6ff184)) 913 | 914 | 915 | ### Miscellaneous Chores 916 | 917 | * release 2.0.0 ([a9eae0c](https://github.com/markdown-confluence/markdown-confluence/commit/a9eae0cf43f20e3eb57096792c78f7215e6f2dd0)) 918 | * release 3.0.0 ([cc12c74](https://github.com/markdown-confluence/markdown-confluence/commit/cc12c74227dd7f6f0ed2d52b5120d7b727aa37a1)) 919 | 920 | 921 | ### Dependencies 922 | 923 | * The following workspace dependencies were updated 924 | * dependencies 925 | * @markdown-confluence/lib bumped from 3.0.0 to 3.0.1 926 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.0.0 to 3.0.1 927 | 928 | ## [3.0.0](https://github.com/markdown-confluence/markdown-confluence/compare/v3.0.5...3.0.0) (2023-04-18) 929 | 930 | 931 | ### Bug Fixes 932 | 933 | * Bump obsidian version ([c42e0d2](https://github.com/markdown-confluence/markdown-confluence/commit/c42e0d2335c52a4beddcb0273e17ad287b9166ea)) 934 | * Bump version I hope ([39b93eb](https://github.com/markdown-confluence/markdown-confluence/commit/39b93eba447f2a1f706ff6e65e7e8cabea08bf75)) 935 | * noEmit for Obsidian package ([7a36a92](https://github.com/markdown-confluence/markdown-confluence/commit/7a36a924f8bd8b97b53d6bdaf8132e8f36191192)) 936 | * **ReleasePlease:** Fix to use a different name for package due to the actual obsidian package ([3f94f7e](https://github.com/markdown-confluence/markdown-confluence/commit/3f94f7e15745139f7530ae1f86b0334f7d6ff184)) 937 | 938 | 939 | ### Miscellaneous Chores 940 | 941 | * release 2.0.0 ([a9eae0c](https://github.com/markdown-confluence/markdown-confluence/commit/a9eae0cf43f20e3eb57096792c78f7215e6f2dd0)) 942 | * release 3.0.0 ([cc12c74](https://github.com/markdown-confluence/markdown-confluence/commit/cc12c74227dd7f6f0ed2d52b5120d7b727aa37a1)) 943 | 944 | ## [3.0.0](https://github.com/markdown-confluence/markdown-confluence/compare/3.0.1...3.0.0) (2023-04-18) 945 | 946 | 947 | ### Bug Fixes 948 | 949 | * Bump obsidian version ([c42e0d2](https://github.com/markdown-confluence/markdown-confluence/commit/c42e0d2335c52a4beddcb0273e17ad287b9166ea)) 950 | * Bump version I hope ([39b93eb](https://github.com/markdown-confluence/markdown-confluence/commit/39b93eba447f2a1f706ff6e65e7e8cabea08bf75)) 951 | * **ReleasePlease:** Fix to use a different name for package due to the actual obsidian package ([3f94f7e](https://github.com/markdown-confluence/markdown-confluence/commit/3f94f7e15745139f7530ae1f86b0334f7d6ff184)) 952 | 953 | 954 | ### Miscellaneous Chores 955 | 956 | * release 2.0.0 ([a9eae0c](https://github.com/markdown-confluence/markdown-confluence/commit/a9eae0cf43f20e3eb57096792c78f7215e6f2dd0)) 957 | * release 3.0.0 ([cc12c74](https://github.com/markdown-confluence/markdown-confluence/commit/cc12c74227dd7f6f0ed2d52b5120d7b727aa37a1)) 958 | 959 | 960 | ### Dependencies 961 | 962 | * The following workspace dependencies were updated 963 | * dependencies 964 | * @markdown-confluence/lib bumped from 3.0.1 to 3.0.0 965 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.0.1 to 3.0.0 966 | 967 | ## [3.0.1](https://github.com/markdown-confluence/markdown-confluence/compare/3.0.0...3.0.1) (2023-04-18) 968 | 969 | 970 | ### Bug Fixes 971 | 972 | * Bump obsidian version ([c42e0d2](https://github.com/markdown-confluence/markdown-confluence/commit/c42e0d2335c52a4beddcb0273e17ad287b9166ea)) 973 | * Bump version I hope ([39b93eb](https://github.com/markdown-confluence/markdown-confluence/commit/39b93eba447f2a1f706ff6e65e7e8cabea08bf75)) 974 | 975 | 976 | ### Dependencies 977 | 978 | * The following workspace dependencies were updated 979 | * dependencies 980 | * @markdown-confluence/lib bumped from 3.0.0 to 3.0.1 981 | * @markdown-confluence/mermaid-electron-renderer bumped from 3.0.0 to 3.0.1 982 | 983 | ## [3.0.0](https://github.com/markdown-confluence/markdown-confluence/compare/2.1.1...3.0.0) (2023-04-18) 984 | 985 | 986 | ### Bug Fixes 987 | 988 | * **ReleasePlease:** Fix to use a different name for package due to the actual obsidian package ([3f94f7e](https://github.com/markdown-confluence/markdown-confluence/commit/3f94f7e15745139f7530ae1f86b0334f7d6ff184)) 989 | 990 | 991 | ### Miscellaneous Chores 992 | 993 | * release 2.0.0 ([a9eae0c](https://github.com/markdown-confluence/markdown-confluence/commit/a9eae0cf43f20e3eb57096792c78f7215e6f2dd0)) 994 | * release 3.0.0 ([cc12c74](https://github.com/markdown-confluence/markdown-confluence/commit/cc12c74227dd7f6f0ed2d52b5120d7b727aa37a1)) 995 | 996 | 997 | ### Dependencies 998 | 999 | * The following workspace dependencies were updated 1000 | * dependencies 1001 | * @markdown-confluence/lib bumped from * to 3.0.0 1002 | * @markdown-confluence/mermaid-electron-renderer bumped from * to 3.0.0 1003 | --------------------------------------------------------------------------------