Skip to content

Commit

Permalink
Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
saberzero1 committed May 10, 2024
1 parent 02ca07b commit 63883ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "quartz-syncer",
"name": "Quartz Syncer",
"version": "1.1.5",
"version": "1.1.6",
"minAppVersion": "0.12.0",
"description": "Sync Obsidian Markdown for Quartz",
"author": "Emile Bangma",
Expand Down
19 changes: 10 additions & 9 deletions src/repositoryConnection/RepositoryConnection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Octokit } from "@octokit/core";
import Logger from "js-logger";
import { Base64 } from "js-base64";
import { CompiledPublishFile } from "src/publishFile/PublishFile";

const logger = Logger.get("repository-connection");
Expand Down Expand Up @@ -214,15 +213,17 @@ export class RepositoryConnection {

const normalizePath = (path: string) => {
path = path.replace(/\.\.\//g, "");
path.startsWith("/") ? path.slice(1) : path;
path.startsWith("/")

Check warning on line 216 in src/repositoryConnection/RepositoryConnection.ts

View workflow job for this annotation

GitHub Actions / lint-and-check-formatting

Expected blank line before this statement
? `${this.contentFolder}${path}`
: `${this.contentFolder}/${path}`;
};

const filesToDelete = filePaths.map((path) => {
if (path.endsWith(".md")) {
return `${this.contentFolder}/${normalizePath(path)}`;
return normalizePath(path);
}

return `${this.contentFolder}/${normalizePath(path)}`;
return normalizePath(path);
});

const repoDataPromise = this.octokit.request(
Expand Down Expand Up @@ -315,7 +316,9 @@ export class RepositoryConnection {

const normalizePath = (path: string) => {
path = path.replace(/\.\.\//g, "");
path.startsWith("/") ? path.slice(1) : path;
path.startsWith("/")

Check warning on line 319 in src/repositoryConnection/RepositoryConnection.ts

View workflow job for this annotation

GitHub Actions / lint-and-check-formatting

Expected blank line before this statement
? `${this.contentFolder}${path}`
: `${this.contentFolder}/${path}`;
};

const treePromises = files.map(async (file) => {
Expand All @@ -332,9 +335,7 @@ export class RepositoryConnection {
);

return {
path: `${this.contentFolder}/${normalizePath(
file.getPath(),
)}`,
path: normalizePath(file.getPath()),
mode: "100644",
type: "blob",
sha: blob.data.sha,
Expand All @@ -352,7 +353,7 @@ export class RepositoryConnection {
"POST /repos/{owner}/{repo}/git/blobs",
{
...this.getBasePayload(),
content: Base64.encode(asset.content),
content: asset.content,
encoding: "base64",
},
);
Expand Down

0 comments on commit 63883ce

Please sign in to comment.