From 64a48a63250c674f1e028cc53e15e3d886dc99a3 Mon Sep 17 00:00:00 2001 From: Tyler Nieman Date: Wed, 29 May 2024 18:01:24 -0700 Subject: [PATCH 01/13] add problematic code blocks --- src/dg-testVault/015 Code blocks.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/dg-testVault/015 Code blocks.md diff --git a/src/dg-testVault/015 Code blocks.md b/src/dg-testVault/015 Code blocks.md new file mode 100644 index 00000000..1a6601d0 --- /dev/null +++ b/src/dg-testVault/015 Code blocks.md @@ -0,0 +1,23 @@ +--- +dg-publish: true +--- +These codeblocks should not be modified upon publish. + +Sample 1 +```jinja2 +{{ highlight_text }}{% if highlight_location and highlight_location_url %} ([via]({{highlight_location_url}})){% elif highlight_location %} ({{highlight_location}}){% endif %} ^rwhi{{highlight_id}} +{% if highlight_note %} +{{ highlight_note }} ^rwhi{{highlight_id}}_note +{% endif %} +``` + +Sample 2 +```md +In medieval Latin a florilegium (plural florilegia) was a compilation of excerpts from other writings. + The word is from the Latin flos (flower) and legere (to gather): literally a gathering of flowers, or collection of fine extracts from the body of a larger work. ([via](https://en.wikipedia.org/wiki/Florilegium)) ^rwhi724352030 +``` + +And for sanity, here's some block references outside of code blocks: +foobar ^test-123 +and another below +^test-456 \ No newline at end of file From b64b69fec712126f1b47e8c3bd6b726451e9daaa Mon Sep 17 00:00:00 2001 From: Tyler Nieman Date: Wed, 29 May 2024 20:06:11 -0700 Subject: [PATCH 02/13] dont replace block-ids in codeblocks --- src/compiler/GardenPageCompiler.ts | 17 +------ src/compiler/createBlockIDs.test.ts | 69 +++++++++++++++++++++++++++++ src/compiler/replaceBlockIDs.ts | 35 +++++++++++++++ 3 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 src/compiler/createBlockIDs.test.ts create mode 100644 src/compiler/replaceBlockIDs.ts diff --git a/src/compiler/GardenPageCompiler.ts b/src/compiler/GardenPageCompiler.ts index 1dc54acf..ec08fe4d 100644 --- a/src/compiler/GardenPageCompiler.ts +++ b/src/compiler/GardenPageCompiler.ts @@ -30,6 +30,7 @@ import { import Logger from "js-logger"; import { DataviewCompiler } from "./DataviewCompiler"; import { PublishFile } from "../publishFile/PublishFile"; +import { replaceBlockIDs } from "./replaceBlockIDs"; export interface Asset { path: string; @@ -144,21 +145,7 @@ export class GardenPageCompiler { }; createBlockIDs: TCompilerStep = () => (text: string) => { - const block_pattern = / \^([\w\d-]+)/g; - const complex_block_pattern = /\n\^([\w\d-]+)\n/g; - - text = text.replace( - complex_block_pattern, - (_match: string, $1: string) => { - return `{ #${$1}}\n\n`; - }, - ); - - text = text.replace(block_pattern, (match: string, $1: string) => { - return `\n{ #${$1}}\n`; - }); - - return text; + return replaceBlockIDs(text); }; removeObsidianComments: TCompilerStep = () => (text) => { diff --git a/src/compiler/createBlockIDs.test.ts b/src/compiler/createBlockIDs.test.ts new file mode 100644 index 00000000..9d4e1960 --- /dev/null +++ b/src/compiler/createBlockIDs.test.ts @@ -0,0 +1,69 @@ +import { replaceBlockIDs } from "./replaceBlockIDs"; + +describe("replaceBlockIDs", () => { + it("should replace block IDs in markdown", () => { + const EXPECTED_MARKDOWN = ` + # header + + foo ^block-id-1234 + + bar ^block-id-5678 + + below + ^block-id-9999 + `; + + const result = replaceBlockIDs(EXPECTED_MARKDOWN); + + expect(result).toBe(` + # header + + foo + { #block-id-1234} + + bar + { #block-id-5678} + + below + { #block-id-9999} + `); + }); + + it("should not replace block IDs in code blocks", () => { + const CODEBLOCK_WITH_BLOCKIDS = ` +\`\`\` +foobar. +this is a code block. +but it contains a block ID to try to fool the compiler +and, consequently, wreck your garden. +here it goes: ^block-id-1234 +and for fun, here's another: ^block-id-5678 +\`\`\` + +additionally, block IDs outside of code blocks should be replaced +for example, ^block-id-9999 +and ^block-id-0000 + `; + + const result = replaceBlockIDs(CODEBLOCK_WITH_BLOCKIDS); + + expect(result).toBe(` +\`\`\` +foobar. +this is a code block. +but it contains a block ID to try to fool the compiler +and, consequently, wreck your garden. +here it goes: ^block-id-1234 +and for fun, here's another: ^block-id-5678 +\`\`\` + +additionally, block IDs outside of code blocks should be replaced +for example, +{ #block-id-9999} + +and +{ #block-id-0000} + + `); + }); +}); diff --git a/src/compiler/replaceBlockIDs.ts b/src/compiler/replaceBlockIDs.ts new file mode 100644 index 00000000..50eb1a65 --- /dev/null +++ b/src/compiler/replaceBlockIDs.ts @@ -0,0 +1,35 @@ +export function replaceBlockIDs(markdown: string) { + const block_pattern = / \^([\w\d-]+)/g; + const complex_block_pattern = /\n\^([\w\d-]+)\n/g; + + // To ensure code blocks are not modified... + const codeBlockPattern = /```[\s\S]*?```/g; + + // Extract code blocks and replace them with placeholders + const codeBlocks: string[] = []; + + markdown = markdown.replace(codeBlockPattern, (match) => { + codeBlocks.push(match); + + return `{{CODE_BLOCK_${codeBlocks.length - 1}}}`; + }); + + // Replace patterns outside code blocks + markdown = markdown.replace( + complex_block_pattern, + (_match: string, $1: string) => { + return `{ #${$1}}\n\n`; + }, + ); + + markdown = markdown.replace(block_pattern, (_match: string, $1: string) => { + return `\n{ #${$1}}\n`; + }); + + // Reinsert code blocks + codeBlocks.forEach((block, index) => { + markdown = markdown.replace(`{{CODE_BLOCK_${index}}}`, block); + }); + + return markdown; +} From fc7d99b0bb72e01c3cf9b1aeabeb5a537a3ef63c Mon Sep 17 00:00:00 2001 From: Tyler Nieman Date: Mon, 10 Jun 2024 20:54:17 -0700 Subject: [PATCH 03/13] adjust createBlockIDs test + sample data --- src/compiler/createBlockIDs.test.ts | 10 +++------- src/dg-testVault/015 Code blocks.md | 13 ++++++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/compiler/createBlockIDs.test.ts b/src/compiler/createBlockIDs.test.ts index 9d4e1960..b05ab68b 100644 --- a/src/compiler/createBlockIDs.test.ts +++ b/src/compiler/createBlockIDs.test.ts @@ -8,9 +8,6 @@ describe("replaceBlockIDs", () => { foo ^block-id-1234 bar ^block-id-5678 - - below - ^block-id-9999 `; const result = replaceBlockIDs(EXPECTED_MARKDOWN); @@ -19,13 +16,12 @@ describe("replaceBlockIDs", () => { # header foo - { #block-id-1234} +{ #block-id-1234} + bar - { #block-id-5678} +{ #block-id-5678} - below - { #block-id-9999} `); }); diff --git a/src/dg-testVault/015 Code blocks.md b/src/dg-testVault/015 Code blocks.md index 1a6601d0..d6fe2b69 100644 --- a/src/dg-testVault/015 Code blocks.md +++ b/src/dg-testVault/015 Code blocks.md @@ -7,7 +7,7 @@ Sample 1 ```jinja2 {{ highlight_text }}{% if highlight_location and highlight_location_url %} ([via]({{highlight_location_url}})){% elif highlight_location %} ({{highlight_location}}){% endif %} ^rwhi{{highlight_id}} {% if highlight_note %} -{{ highlight_note }} ^rwhi{{highlight_id}}_note +{{ highlight_note }} ^rwhi{{highlight_id}}-note {% endif %} ``` @@ -17,7 +17,10 @@ In medieval Latin a florilegium (plural florilegia) was a compilation of excerpt The word is from the Latin flos (flower) and legere (to gather): literally a gathering of flowers, or collection of fine extracts from the body of a larger work. ([via](https://en.wikipedia.org/wiki/Florilegium)) ^rwhi724352030 ``` -And for sanity, here's some block references outside of code blocks: -foobar ^test-123 -and another below -^test-456 \ No newline at end of file +Sample 3 +``` +This codeblock has a transclusion syntax in it. +Check it out: ![[001 Links]] +``` + +And for sanity, here's some block references outside of code blocks: foobar ^test-123 \ No newline at end of file From 94adcf7ebe59c5bfadbf3c31f4cf4c3a0d7170f9 Mon Sep 17 00:00:00 2001 From: Tyler Nieman Date: Mon, 10 Jun 2024 21:03:11 -0700 Subject: [PATCH 04/13] update snapshot for code block preservation of block-id syntax --- src/test/snapshot/snapshot.md | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/test/snapshot/snapshot.md b/src/test/snapshot/snapshot.md index feb6017a..da1293df 100644 --- a/src/test/snapshot/snapshot.md +++ b/src/test/snapshot/snapshot.md @@ -343,6 +343,55 @@ this is just text i guess --- +========== +015 Code blocks.md +========== +--- +{"dg-publish":true,"permalink":"/015-code-blocks/"} +--- + +These codeblocks should not be modified upon publish. + +Sample 1 +```jinja2 +{{ highlight_text }}{% if highlight_location and highlight_location_url %} ([via]({{highlight_location_url}})){% elif highlight_location %} ({{highlight_location}}){% endif %} ^rwhi{{highlight_id}} +{% if highlight_note %} +{{ highlight_note }} ^rwhi{{highlight_id}}-note +{% endif %} +``` + +Sample 2 +```md +In medieval Latin a florilegium (plural florilegia) was a compilation of excerpts from other writings. + The word is from the Latin flos (flower) and legere (to gather): literally a gathering of flowers, or collection of fine extracts from the body of a larger work. ([via](https://en.wikipedia.org/wiki/Florilegium)) ^rwhi724352030 +``` + +Sample 3 +``` +This codeblock has a transclusion syntax in it. +Check it out: +
+ + + + +[[002 Hidden page]] + +[[003 Non published page]] + +[[000 Home| Aliased link to home]] + +[[000 Home | Link containing whitespace which works in obsidian but doesn't in garden :) - yes, this could be a ticket but lo and behold]] + + + +
+ +``` + +And for sanity, here's some block references outside of code blocks: foobar +{ #test-123} + ========== E Embeds/E02 PNG published.md ========== @@ -715,7 +764,7 @@ P Plugins/PD Dataview/PD3 Inline JS queries.md 3 -106 +108

A paragraph

/img/user/A Assets/travolta.png From 0257051f5fb628911150418b0b1ab43058cec662 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Tue, 11 Jun 2024 20:10:25 +0200 Subject: [PATCH 05/13] Roll back to one commit per delete, as I cannot get the batch deletion to work. --- main.ts | 16 ++++++++-------- manifest-beta.json | 2 +- manifest.json | 2 +- .../RepositoryConnection.ts | 7 ++++--- .../PublicationCenter/PublicationCenter.svelte | 18 +++++++++++++----- versions.json | 1 + 6 files changed, 28 insertions(+), 18 deletions(-) diff --git a/main.ts b/main.ts index d9ab083f..0a0a1061 100644 --- a/main.ts +++ b/main.ts @@ -246,15 +246,15 @@ export default class DigitalGarden extends Plugin { await publisher.publishBatch(filesToPublish); statusBar.incrementMultiple(filesToPublish.length); - await publisher.deleteBatch( - filesToDelete.map((f) => f.path), - ); - statusBar.incrementMultiple(filesToDelete.length); + for (const file of filesToDelete) { + await publisher.deleteNote(file.path); + statusBar.increment(); + } - await publisher.deleteBatch( - imagesToDelete.map((f) => f.path), - ); - statusBar.incrementMultiple(imagesToDelete.length); + for (const image of imagesToDelete) { + await publisher.deleteImage(image.path); + statusBar.increment(); + } statusBar.finish(8000); diff --git a/manifest-beta.json b/manifest-beta.json index bad5ac40..569f6703 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.57.0", + "version": "2.57.1", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/manifest.json b/manifest.json index 0812ada2..569f6703 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.56.2", + "version": "2.57.1", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/src/repositoryConnection/RepositoryConnection.ts b/src/repositoryConnection/RepositoryConnection.ts index 96a975d6..b36ff45d 100644 --- a/src/repositoryConnection/RepositoryConnection.ts +++ b/src/repositoryConnection/RepositoryConnection.ts @@ -201,6 +201,8 @@ export class RepositoryConnection { } } + // NB: Do not use this, it does not work for some reason. + //TODO: Fix this. For now use deleteNote and deleteImage instead async deleteFiles(filePaths: string[]) { const latestCommit = await this.getLatestCommit(); @@ -261,7 +263,6 @@ export class RepositoryConnection { "POST /repos/{owner}/{repo}/git/trees", { ...this.getBasePayload(), - base_tree: baseTreeSha, tree: newTreeEntries, }, ); @@ -281,10 +282,10 @@ export class RepositoryConnection { const defaultBranch = (await repoDataPromise).data.default_branch; await this.octokit.request( - "PATCH /repos/{owner}/{repo}/git/refs/heads/{branch}", + "PATCH /repos/{owner}/{repo}/git/refs/{ref}", { ...this.getBasePayload(), - branch: defaultBranch, + ref: `heads/${defaultBranch}`, sha: newCommit.data.sha, }, ); diff --git a/src/views/PublicationCenter/PublicationCenter.svelte b/src/views/PublicationCenter/PublicationCenter.svelte index a791729c..b4a2e135 100644 --- a/src/views/PublicationCenter/PublicationCenter.svelte +++ b/src/views/PublicationCenter/PublicationCenter.svelte @@ -190,12 +190,20 @@ await publisher.publishBatch(allNotesToPublish); publishedPaths = [...processingPaths]; + processingPaths = []; + for(const path of notesToDelete) { + processingPaths = [...processingPaths, path]; + await publisher.deleteNote(path); + processingPaths = processingPaths.filter((p) => p !== path); + publishedPaths = [...publishedPaths, path]; + } - const allNotesToDelete = [...notesToDelete, ...imagesToDelete]; - processingPaths = [...allNotesToDelete]; - - // need to wait for about 1 second to allow github to process the publish request - await publisher.deleteBatch(allNotesToDelete); + for(const path of imagesToDelete) { + processingPaths = [...processingPaths, path]; + await publisher.deleteImage(path); + processingPaths = processingPaths.filter((p) => p !== path); + publishedPaths = [...publishedPaths, path]; + } publishedPaths = [...publishedPaths, ...processingPaths]; processingPaths = []; }; diff --git a/versions.json b/versions.json index 61fb3696..8f4c6317 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { + "2.57.1": "0.12.0", "2.57.0": "0.12.0", "2.56.2": "0.12.0", "2.56.1": "0.12.0", From d566204527bfd0376d9eef0d76ebfa638fd455e8 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Tue, 11 Jun 2024 20:10:47 +0200 Subject: [PATCH 06/13] linting --- src/views/PublicationCenter/PublicationCenter.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/PublicationCenter/PublicationCenter.svelte b/src/views/PublicationCenter/PublicationCenter.svelte index b4a2e135..621564f8 100644 --- a/src/views/PublicationCenter/PublicationCenter.svelte +++ b/src/views/PublicationCenter/PublicationCenter.svelte @@ -191,14 +191,15 @@ publishedPaths = [...processingPaths]; processingPaths = []; - for(const path of notesToDelete) { + + for (const path of notesToDelete) { processingPaths = [...processingPaths, path]; await publisher.deleteNote(path); processingPaths = processingPaths.filter((p) => p !== path); publishedPaths = [...publishedPaths, path]; } - for(const path of imagesToDelete) { + for (const path of imagesToDelete) { processingPaths = [...processingPaths, path]; await publisher.deleteImage(path); processingPaths = processingPaths.filter((p) => p !== path); From d3c3b3f029d6d24d2f9dcb5676c43b7562b98ad6 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Thu, 13 Jun 2024 15:21:20 +0200 Subject: [PATCH 07/13] Fix #605 --- manifest-beta.json | 2 +- manifest.json | 2 +- src/repositoryConnection/RepositoryConnection.ts | 3 +-- versions.json | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest-beta.json b/manifest-beta.json index 569f6703..e2d70ccc 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.57.1", + "version": "2.57.2", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/manifest.json b/manifest.json index 569f6703..e2d70ccc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.57.1", + "version": "2.57.2", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/src/repositoryConnection/RepositoryConnection.ts b/src/repositoryConnection/RepositoryConnection.ts index b36ff45d..c5cf97f0 100644 --- a/src/repositoryConnection/RepositoryConnection.ts +++ b/src/repositoryConnection/RepositoryConnection.ts @@ -5,8 +5,7 @@ import { CompiledPublishFile } from "src/publishFile/PublishFile"; const logger = Logger.get("repository-connection"); const oktokitLogger = Logger.get("octokit"); -//TODO: Move to global constants -const IMAGE_PATH_BASE = "src/site/img/user/"; +const IMAGE_PATH_BASE = "src/site/"; const NOTE_PATH_BASE = "src/site/notes/"; interface IOctokitterInput { diff --git a/versions.json b/versions.json index 8f4c6317..7caf5ac9 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { + "2.57.2": "0.12.0", "2.57.1": "0.12.0", "2.57.0": "0.12.0", "2.56.2": "0.12.0", From 0bc3338363f3745033a53469244fc35ec821d3fb Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Wed, 14 Aug 2024 20:44:48 +0200 Subject: [PATCH 08/13] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 79e9820c..416e3d02 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Publish your notes to the web, for free. In your own personal garden. +![image](https://github.com/user-attachments/assets/101e7558-9d0c-452f-8859-f4bcedd26796) + + ## Docs Documentation and examples can be found at [dg-docs.ole.dev](https://dg-docs.ole.dev/). From fa5bbde705ad5bf71d76aac6dbce5bd31145d4da Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Tue, 8 Oct 2024 19:00:51 +0200 Subject: [PATCH 09/13] Typo fix --- src/publisher/Publisher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/publisher/Publisher.ts b/src/publisher/Publisher.ts index 60ac1cd0..21232ad7 100644 --- a/src/publisher/Publisher.ts +++ b/src/publisher/Publisher.ts @@ -95,7 +95,7 @@ export default class Publisher { return await this.delete(path, sha); } - /** If provided with sha, garden connection does not need to get it seperately! */ + /** If provided with sha, garden connection does not need to get it separately! */ public async delete(path: string, sha?: string): Promise { this.validateSettings(); From 600a4b04b9add4ffcc429129a2d65c663add7d79 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Tue, 8 Oct 2024 19:08:16 +0200 Subject: [PATCH 10/13] Disable broken commands --- main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 419df207..8a901e5f 100644 --- a/main.ts +++ b/main.ts @@ -2,7 +2,7 @@ import { Notice, Platform, Plugin, Workspace, addIcon } from "obsidian"; import Publisher from "./src/publisher/Publisher"; import QuartzSyncerSettings from "./src/models/settings"; import { bookHeart } from "./src/ui/suggest/constants"; -import { PublishStatusBar } from "./src/views/PublishStatusBar"; +//import { PublishStatusBar } from "./src/views/PublishStatusBar"; import { PublicationCenter } from "src/views/PublicationCenter/PublicationCenter"; import PublishStatusManager from "src/publisher/PublishStatusManager"; import ObsidianFrontMatterEngine from "src/publishFile/ObsidianFrontMatterEngine"; @@ -98,6 +98,7 @@ export default class QuartzSyncer extends Plugin { } async addCommands() { + /* this.addCommand({ id: "publish-note", name: "Publish Single Note", @@ -105,6 +106,7 @@ export default class QuartzSyncer extends Plugin { await this.publishSingleNote(); }, }); + */ if (this.settings["ENABLE_DEVELOPER_TOOLS"] && Platform.isDesktop) { Logger.info("Developer tools enabled"); @@ -133,6 +135,7 @@ export default class QuartzSyncer extends Plugin { }); } + /* this.addCommand({ id: "publish-multiple-notes", name: "Publish Multiple Notes", @@ -234,6 +237,7 @@ export default class QuartzSyncer extends Plugin { } }, }); +*/ this.addCommand({ id: "open-publish-modal", From 502f5c2453315fb990cc6aad9e7b9be0ca5899af Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Tue, 8 Oct 2024 19:08:43 +0200 Subject: [PATCH 11/13] Rename options for clarification --- src/views/PublicationCenter/PublicationCenter.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/PublicationCenter/PublicationCenter.svelte b/src/views/PublicationCenter/PublicationCenter.svelte index d78a84b2..49b28689 100644 --- a/src/views/PublicationCenter/PublicationCenter.svelte +++ b/src/views/PublicationCenter/PublicationCenter.svelte @@ -94,14 +94,14 @@ publishStatus && filePathsToTree( publishStatus.publishedNotes.map((note) => note.getPath()), - "Published Notes", + "Currently Published Notes", ); $: changedNotesTree = publishStatus && filePathsToTree( publishStatus.changedNotes.map((note) => note.getPath()), - "Changed Notes", + "Published Notes With Changes", ); $: deletedNoteTree = @@ -111,7 +111,7 @@ ...publishStatus.deletedNotePaths, ...publishStatus.deletedImagePaths, ].map((path) => path.path), - "Deleted Notes", + "Delete Published Notes", ); $: unpublishedNoteTree = @@ -245,7 +245,9 @@ {:else}
From aa8b2f38067ba56a3d23e2b16a4aa12e5e277e6b Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Tue, 8 Oct 2024 19:15:25 +0200 Subject: [PATCH 12/13] Update versions --- main.ts | 6 +- package-lock.json | 8 +-- package.json | 6 +- src/publisher/Publisher.ts | 2 +- versions.json | 111 +++---------------------------------- 5 files changed, 17 insertions(+), 116 deletions(-) diff --git a/main.ts b/main.ts index 8a901e5f..6a8a45ff 100644 --- a/main.ts +++ b/main.ts @@ -65,9 +65,7 @@ export default class QuartzSyncer extends Plugin { this.settings.logLevel && Logger.setLevel(this.settings.logLevel); - Logger.info( - "Digital garden log level set to " + Logger.getLevel().name, - ); + Logger.info("Quartz Syncer log level set to " + Logger.getLevel().name); this.addSettingTab(new QuartzSyncerSettingTab(this.app, this)); await this.addCommands(); @@ -120,7 +118,7 @@ export default class QuartzSyncer extends Plugin { import("./src/test/snapshot/generateSyncerSnapshot") .then((snapshotGen) => { this.addCommand({ - id: "generate-garden-snapshot", + id: "generate-syncer-snapshot", name: "Generate Syncer Snapshot", callback: async () => { await snapshotGen.generateSyncerSnapshot( diff --git a/package-lock.json b/package-lock.json index f1490d26..4df61281 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "obsidian-garden", - "version": "1.0.0", + "name": "quartz-syncer", + "version": "1.1.7", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "obsidian-garden", - "version": "1.0.0", + "name": "quartz-syncer", + "version": "1.1.7", "license": "MIT", "dependencies": { "@octokit/core": "^5.0.0", diff --git a/package.json b/package.json index 1f43ee43..a441cd0c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "obsidian-garden", - "version": "1.0.0", - "description": "A plugin used for publishing notes to a digital garden", + "name": "quartz-syncer", + "version": "1.1.7", + "description": "A plugin used for publishing notes to Quartz", "main": "main.js", "scripts": { "dev": "node esbuild.config.mjs", diff --git a/src/publisher/Publisher.ts b/src/publisher/Publisher.ts index 21232ad7..fb57d616 100644 --- a/src/publisher/Publisher.ts +++ b/src/publisher/Publisher.ts @@ -95,7 +95,7 @@ export default class Publisher { return await this.delete(path, sha); } - /** If provided with sha, garden connection does not need to get it separately! */ + /** If provided with sha, syncer connection does not need to get it separately! */ public async delete(path: string, sha?: string): Promise { this.validateSettings(); diff --git a/versions.json b/versions.json index 7caf5ac9..e9098c5d 100644 --- a/versions.json +++ b/versions.json @@ -1,108 +1,11 @@ { - "2.57.2": "0.12.0", - "2.57.1": "0.12.0", - "2.57.0": "0.12.0", - "2.56.2": "0.12.0", - "2.56.1": "0.12.0", - "2.56.0": "0.12.0", - "2.55.1": "0.12.0", - "2.55.0": "0.12.0", - "2.54.1": "0.12.0", - "2.54.0": "0.12.0", - "2.53.0": "0.12.0", - "2.52.0": "0.12.0", - "2.51.0": "0.12.0", - "2.50.5": "0.12.0", - "2.50.4": "0.12.0", - "2.50.3": "0.12.0", - "2.50.2": "0.12.0", - "2.50.1": "0.12.0", - "2.50.0": "0.12.0", - "2.49.1": "0.12.0", - "2.49.0": "0.12.0", - "2.48.0": "0.12.0", - "2.47.0": "0.12.0", - "2.46.0": "0.12.0", - "2.45.2": "0.12.0", - "2.45.1": "0.12.0", - "2.45.0": "0.12.0", - "2.44.0": "0.12.0", - "2.43.1": "0.12.0", - "2.43.0": "0.12.0", - "2.42.2": "0.12.0", - "2.42.1": "0.12.0", - "2.42.0": "0.12.0", - "2.41.1": "0.12.0", - "2.41.0": "0.12.0", - "2.40.0": "0.12.0", - "2.39.0": "0.12.0", - "2.38.0": "0.12.0", - "2.37.0": "0.12.0", - "2.36.0": "0.12.0", - "2.35.6": "0.12.0", - "2.35.5": "0.12.0", - "2.35.4": "0.12.0", - "2.35.3": "0.12.0", - "2.35.2": "0.12.0", - "2.35.1": "0.12.0", - "2.35.0": "0.12.0", - "2.34.0": "0.12.0", - "2.33.0": "0.12.0", - "2.32.0": "0.12.0", - "2.31.0": "0.12.0", - "2.30.0": "0.12.0", - "2.29.0": "0.12.0", - "2.28.1": "0.12.0", - "2.28.0": "0.12.0", - "2.27.0": "0.12.0", - "2.26.0": "0.12.0", - "2.23.4": "0.12.0", - "2.23.3": "0.12.0", - "2.23.2": "0.12.0", - "2.23.1": "0.12.0", - "2.23.0": "0.12.0", - "2.22.0": "0.12.0", - "2.21.0": "0.12.0", - "2.20.0": "0.12.0", - "2.19.0": "0.12.0", - "2.18.0": "0.12.0", - "2.17.0": "0.12.0", - "2.16.0": "0.12.0", - "2.15.0": "0.12.0", - "2.14.0": "0.12.0", - "2.13.1": "0.12.0", - "2.13.0": "0.12.0", - "2.12.0": "0.12.0", - "2.11.0": "0.12.0", - "2.10.0": "0.12.0", - "2.9.3": "0.12.0", - "2.9.2": "0.12.0", - "2.9.1": "0.12.0", - "2.9.0": "0.12.0", - "2.8.5": "0.12.0", - "2.8.4": "0.12.0", - "2.8.3": "0.12.0", - "2.8.2": "0.12.0", - "2.8.1": "0.12.0", - "2.8.0": "0.12.0", - "2.7.0": "0.12.0", - "2.6.2": "0.12.0", - "2.6.1": "0.12.0", - "2.6.0": "0.12.0", - "2.5.0": "0.12.0", - "2.4.0": "0.12.0", - "2.3.1": "0.12.0", - "2.3.0": "0.12.0", - "2.2.0": "0.12.0", - "2.1.3": "0.12.0", - "2.1.2": "0.12.0", - "2.1.1": "0.12.0", - "2.1.0": "0.12.0", - "2.0.0": "0.12.0", - "1.4.1": "0.12.0", - "1.4.0": "0.12.0", - "1.3.0": "0.12.0", - "1.2.0": "0.12.0", + "1.1.7": "0.12.0", + "1.1.6": "0.12.0", + "1.1.5": "0.12.0", + "1.1.4": "0.12.0", + "1.1.3": "0.12.0", + "1.1.2": "0.12.0", + "1.1.1": "0.12.0", "1.1.0": "0.12.0", "1.0.0": "0.12.0" } From d265d0e0e1ac644d09c584bdb4beef7d77a79d23 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Tue, 8 Oct 2024 21:43:20 +0200 Subject: [PATCH 13/13] Update targeting --- esbuild.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 19218af4..6c77d9db 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -21,7 +21,7 @@ esbuild.build({ bundle: true, external: ['obsidian', 'electron', ...builtins], format: 'cjs', - target: 'es2016', + target: 'es2018', logLevel: "info", sourcemap: prod ? false : 'inline', treeShaking: true,