diff --git a/README.md b/README.md index b4c87765..7f971c19 100644 --- a/README.md +++ b/README.md @@ -225,22 +225,21 @@ https://github.com/sosuisen/inventory-manager - Automated conflict resolution :feet: - Automated JSON diff and patch :feet: - Automated combining of inconsistent repositories :feet: -- v0.4 Work on both Node.js and browser +- v0.4 Many data types and connection methods - API renewal to manage any data types :feet: - Remove native module (NodeGit) from default install :feet: - Add plugin system for remote connection (isomorphic-git or NodeGit) :feet: - Connect with SSH key pair :feet: - Add Front-Matter-Markdown format :feet: - - Connect to GitHub with OAuth :dog2:(Next) - - Work on browser - +- v0.5 Search + - Indexed Search :dog2:(Next) - Until v1.0 + - Connect to GitHub with OAuth + - Work on browser - Sync any data types - Replication - - Grep - Transaction (bulk) - - Tag - - Indexed Search + - GitLab and Bitbucket - Push server - Migration diff --git a/package-lock.json b/package-lock.json index 9ab20ebe..f852c19c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "git-documentdb", - "version": "0.4.7", + "version": "0.4.8-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "git-documentdb", - "version": "0.4.7", + "version": "0.4.8-alpha.2", "license": "MPL-2.0", "dependencies": { "@octokit/rest": "^18.3.5", @@ -16,7 +16,7 @@ "fs-extra": "^9.1.0", "git-documentdb-plugin-remote-nodegit": "^1.0.4", "git-documentdb-remote-errors": "^1.0.3", - "isomorphic-git": "^1.17.1", + "isomorphic-git": "^1.23.0", "js-yaml": "^4.1.0", "ot-json1": "^1.0.2", "rimraf": "^3.0.2", @@ -5405,9 +5405,9 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "node_modules/isomorphic-git": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.17.1.tgz", - "integrity": "sha512-JLZzAmc78yELH6+bZgMzqV0KGEi2duo+URWmyEnSbhhibHwDsMIlUw5tr1ZVHjC2CUQtU0X/5EY9Sbzsyx7nug==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.23.0.tgz", + "integrity": "sha512-7mQlnZivFwrU6B3CswvmoNtVN8jqF9BcLf80uk7yh4fNA8PhFjAfQigi2Hu/Io0cmIvpOc7vn0/Rq3KtL5Ph8g==", "dependencies": { "async-lock": "^1.1.0", "clean-git-ref": "^2.0.1", @@ -14687,9 +14687,9 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isomorphic-git": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.17.1.tgz", - "integrity": "sha512-JLZzAmc78yELH6+bZgMzqV0KGEi2duo+URWmyEnSbhhibHwDsMIlUw5tr1ZVHjC2CUQtU0X/5EY9Sbzsyx7nug==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.23.0.tgz", + "integrity": "sha512-7mQlnZivFwrU6B3CswvmoNtVN8jqF9BcLf80uk7yh4fNA8PhFjAfQigi2Hu/Io0cmIvpOc7vn0/Rq3KtL5Ph8g==", "requires": { "async-lock": "^1.1.0", "clean-git-ref": "^2.0.1", diff --git a/package.json b/package.json index fbf942c5..c91a863a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "git-documentdb", - "version": "0.4.7", + "version": "0.4.8", "description": "Offline-first database that syncs with Git", "main": "dist/main.js", "types": "dist/main.d.ts", @@ -84,7 +84,7 @@ "fs-extra": "^9.1.0", "git-documentdb-plugin-remote-nodegit": "^1.0.4", "git-documentdb-remote-errors": "^1.0.3", - "isomorphic-git": "^1.17.1", + "isomorphic-git": "^1.23.0", "js-yaml": "^4.1.0", "ot-json1": "^1.0.2", "rimraf": "^3.0.2", diff --git a/src/plugin/remote-isomorphic-git.ts b/src/plugin/remote-isomorphic-git.ts index 3dfecc3e..b96143bc 100644 --- a/src/plugin/remote-isomorphic-git.ts +++ b/src/plugin/remote-isomorphic-git.ts @@ -166,7 +166,7 @@ export async function clone ( } break; - case error.startsWith('HttpError: HTTP Error: 401 Authorization Required'): + case error.startsWith('HttpError: HTTP Error: 401'): throw new HTTPError401AuthorizationRequired(error); case error.startsWith('HttpError: HTTP Error: 404 Not Found'): @@ -280,7 +280,7 @@ export async function checkFetch ( } break; - case error.startsWith('HttpError: HTTP Error: 401 Authorization Required'): + case error.startsWith('HttpError: HTTP Error: 401'): throw new HTTPError401AuthorizationRequired(error); case error.startsWith('HttpError: HTTP Error: 404 Not Found'): @@ -393,7 +393,7 @@ export async function fetch ( } break; - case error.startsWith('HttpError: HTTP Error: 401 Authorization Required'): + case error.startsWith('HttpError: HTTP Error: 401'): throw new HTTPError401AuthorizationRequired(error); case error.startsWith('HttpError: HTTP Error: 404 Not Found'): @@ -511,7 +511,7 @@ export async function push ( } break; - case error.startsWith('HttpError: HTTP Error: 401 Authorization Required'): + case error.startsWith('HttpError: HTTP Error: 401'): throw new HTTPError401AuthorizationRequired(error); case error.startsWith('HttpError: HTTP Error: 404 Not Found'): diff --git a/src/utils.ts b/src/utils.ts index 4d1e44ef..f1eedad1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -85,7 +85,7 @@ export function toSortedJSONString (obj: Record) { } export function toYAML (obj: Record) { - return yaml.dump(obj, { sortKeys: true }); + return yaml.dump(obj, { sortKeys: true, lineWidth: -1 }); } export function toFrontMatterMarkdown (obj: Record) { @@ -103,7 +103,8 @@ export function toFrontMatterMarkdown (obj: Record) { return body; } - const frontMatter = '---\n' + yaml.dump(clone, { sortKeys: true }) + '---\n'; + const frontMatter = + '---\n' + yaml.dump(clone, { sortKeys: true, lineWidth: -1 }) + '---\n'; return frontMatter + body; }