Skip to content

Commit 90f3d1a

Browse files
committed
Update manifest for release.
1 parent dcca6e6 commit 90f3d1a

File tree

4 files changed

+62
-10
lines changed

4 files changed

+62
-10
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
* @markdown-confluence/lib bumped from 3.0.4 to 3.0.0
88
* @markdown-confluence/mermaid-electron-renderer bumped from 3.0.4 to 3.0.0
99

10+
## [5.3.0](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.6...obsidian-confluence-v5.3.0) (2023-05-11)
11+
12+
13+
### Features
14+
15+
* Move ImageUpload and MermaidRendering to plugins to allow for more plugins easily ([cfae670](https://github.com/markdown-confluence/markdown-confluence/commit/cfae670d3bc94c4a88d02936c94ca9c1ab47ce9e))
16+
17+
18+
### Dependencies
19+
20+
* The following workspace dependencies were updated
21+
* dependencies
22+
* @markdown-confluence/lib bumped from 5.2.6 to 5.3.0
23+
* @markdown-confluence/mermaid-electron-renderer bumped from 5.2.6 to 5.3.0
24+
1025
## [5.2.6](https://github.com/markdown-confluence/markdown-confluence/compare/obsidian-confluence-v5.2.5...obsidian-confluence-v5.2.6) (2023-05-11)
1126

1227

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "confluence-integration",
33
"name": "Confluence Integration",
4-
"version": "5.2.6",
4+
"version": "5.3.0",
55
"minAppVersion": "1.0.0",
66
"description": "This plugin allows you to publish your notes to Confluence",
77
"author": "andymac4182",

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-confluence",
3-
"version": "5.2.6",
3+
"version": "5.3.0",
44
"description": "This library allows you to publish your notes to Confluence",
55
"main": "main.js",
66
"type": "module",
@@ -24,8 +24,8 @@
2424
"mime-types": "^2.1.35",
2525
"react": "^16.14.0",
2626
"react-dom": "^16.14.0",
27-
"@markdown-confluence/lib": "5.2.6",
28-
"@markdown-confluence/mermaid-electron-renderer": "5.2.6"
27+
"@markdown-confluence/lib": "5.3.0",
28+
"@markdown-confluence/mermaid-electron-renderer": "5.3.0"
2929
},
3030
"resolutions": {
3131
"prosemirror-model": "1.14.3"

src/main.ts

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
ConfluencePageConfig,
66
StaticSettingsLoader,
77
renderADFDoc,
8+
MermaidRendererPlugin,
9+
UploadAdfFileResult,
810
} from "@markdown-confluence/lib";
911
import { ElectronMermaidRenderer } from "@markdown-confluence/mermaid-electron-renderer";
1012
import { ConfluenceSettingTab } from "./ConfluenceSettingTab";
@@ -30,6 +32,17 @@ export interface ObsidianPluginSettings
3032
| "forest";
3133
}
3234

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+
3346
export default class ConfluencePlugin extends Plugin {
3447
settings!: ObsidianPluginSettings;
3548
private isSyncing = false;
@@ -74,7 +87,7 @@ export default class ConfluencePlugin extends Plugin {
7487
this.adaptor,
7588
settingsLoader,
7689
confluenceClient,
77-
mermaidRenderer
90+
[new MermaidRendererPlugin(mermaidRenderer)]
7891
);
7992
}
8093

@@ -149,6 +162,32 @@ export default class ConfluencePlugin extends Plugin {
149162
};
150163
}
151164

165+
async doPublish(publishFilter?: string): Promise<UploadResults> {
166+
const adrFiles = await this.publisher.publish(publishFilter);
167+
168+
const returnVal: UploadResults = {
169+
errorMessage: null,
170+
failedFiles: [],
171+
filesUploadResult: [],
172+
};
173+
174+
adrFiles.forEach((element) => {
175+
if (element.successfulUploadResult) {
176+
returnVal.filesUploadResult.push(
177+
element.successfulUploadResult
178+
);
179+
return;
180+
}
181+
182+
returnVal.failedFiles.push({
183+
fileName: element.node.file.absoluteFilePath,
184+
reason: element.reason ?? "No Reason Provided",
185+
});
186+
});
187+
188+
return returnVal;
189+
}
190+
152191
override async onload() {
153192
await this.init();
154193

@@ -159,7 +198,7 @@ export default class ConfluencePlugin extends Plugin {
159198
}
160199
this.isSyncing = true;
161200
try {
162-
const stats = await this.publisher.doPublish();
201+
const stats = await this.doPublish();
163202
new CompletedModal(this.app, {
164203
uploadResults: stats,
165204
}).open();
@@ -225,8 +264,7 @@ export default class ConfluencePlugin extends Plugin {
225264
if (!this.isSyncing) {
226265
if (!checking) {
227266
this.isSyncing = true;
228-
this.publisher
229-
.doPublish(this.activeLeafPath(this.workspace))
267+
this.doPublish(this.activeLeafPath(this.workspace))
230268
.then((stats) => {
231269
new CompletedModal(this.app, {
232270
uploadResults: stats,
@@ -268,8 +306,7 @@ export default class ConfluencePlugin extends Plugin {
268306
if (!this.isSyncing) {
269307
if (!checking) {
270308
this.isSyncing = true;
271-
this.publisher
272-
.doPublish()
309+
this.doPublish()
273310
.then((stats) => {
274311
new CompletedModal(this.app, {
275312
uploadResults: stats,

0 commit comments

Comments
 (0)