@tinacms/git-client
Advanced tools
Comparing version 0.1.6 to 0.2.0-alpha.0
@@ -22,3 +22,3 @@ /** | ||
/** | ||
* An alias to `commitAndPush` | ||
* An alias to `commit` | ||
* | ||
@@ -55,3 +55,3 @@ * @deprecated | ||
*/ | ||
commitAndPush(data: { | ||
commit(data: { | ||
files: string[]; | ||
@@ -67,2 +67,8 @@ message?: string; | ||
*/ | ||
push(): Promise<any>; | ||
/** | ||
* | ||
* TODO: Add return type. | ||
* TODO: Remove `catch` | ||
*/ | ||
writeToDisk(data: { | ||
@@ -98,2 +104,11 @@ fileRelativePath: string; | ||
show(fileRelativePath: string): Promise<any>; | ||
/** | ||
* Get information about a local branch by name, or the current branch if no | ||
* name is specified. | ||
*/ | ||
branch(name?: string): Promise<any>; | ||
/** | ||
* Get a list of the names of all local branches. | ||
*/ | ||
branches(): Promise<any>; | ||
} |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@tinacms/git-client"]={})}(this,function(t){"use strict";var e=(o.prototype.onSubmit=function(t){return this.commitAndPush(t)},o.prototype.onChange=function(t){return this.writeToDisk(t)},o.prototype.onUploadMedia=function(t){return this.writeMediaToDisk(t)},o.prototype.onDelete=function(t){return this.deleteFromDisk(t)},o.prototype.isAuthenticated=function(){return!0},o.prototype.commitAndPush=function(t){return fetch(this.baseUrl+"/commit",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},o.prototype.writeToDisk=function(t){return fetch(this.baseUrl+"/"+encodeURIComponent(t.fileRelativePath),{method:"PUT",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},o.prototype.writeMediaToDisk=function(t){var e=new FormData;return e.append("file",t.content),e.append("directory",t.directory),fetch(this.baseUrl+"/upload",{method:"POST",body:e}).catch(function(t){console.error(t)})},o.prototype.deleteFromDisk=function(t){return fetch(this.baseUrl+"/"+encodeURIComponent(t.relPath),{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},o.prototype.reset=function(t){return fetch(this.baseUrl+"/reset",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})},o.prototype.show=function(t){return fetch(this.baseUrl+"/show/"+encodeURIComponent(t),{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(t){return t.json()})},o);function o(t){this.baseUrl=t}t.GitClient=e,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@tinacms/git-client"]={})}(this,function(t){"use strict";var e=(n.prototype.onSubmit=function(t){return this.commit(t)},n.prototype.onChange=function(t){return this.writeToDisk(t)},n.prototype.onUploadMedia=function(t){return this.writeMediaToDisk(t)},n.prototype.onDelete=function(t){return this.deleteFromDisk(t)},n.prototype.isAuthenticated=function(){return!0},n.prototype.commit=function(t){return fetch(this.baseUrl+"/commit",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},n.prototype.push=function(){return fetch(this.baseUrl+"/push",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"}}).catch(function(t){console.error(t)})},n.prototype.writeToDisk=function(t){return fetch(this.baseUrl+"/"+encodeURIComponent(t.fileRelativePath),{method:"PUT",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},n.prototype.writeMediaToDisk=function(t){var e=new FormData;return e.append("file",t.content),e.append("directory",t.directory),fetch(this.baseUrl+"/upload",{method:"POST",body:e}).catch(function(t){console.error(t)})},n.prototype.deleteFromDisk=function(t){return fetch(this.baseUrl+"/"+encodeURIComponent(t.relPath),{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}).catch(function(t){console.error(t)})},n.prototype.reset=function(t){return fetch(this.baseUrl+"/reset",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})},n.prototype.show=function(t){return fetch(this.baseUrl+"/show/"+encodeURIComponent(t),{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(t){return t.json()})},n.prototype.branch=function(t){return fetch(this.baseUrl+"/"+(t?"branches/"+t:"branch"),{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(t){return t.json()})},n.prototype.branches=function(){return fetch(this.baseUrl+"/branches",{headers:{"Content-Type":"application/json; charset=utf-8"}}).then(function(t){return t.json()})},n);function n(t){this.baseUrl=t}t.GitClient=e,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -6,4 +6,8 @@ # Change Log | ||
## [0.1.6](https://github.com/tinacms/tinacms/compare/@tinacms/git-client@0.1.6-alpha.0...@tinacms/git-client@0.1.6) (2019-10-28) | ||
## [0.2.0-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/git-client@0.1.6-alpha.0...@tinacms/git-client@0.2.0-alpha.0) (2019-10-28) | ||
**Note:** Version bump only for package @tinacms/git-client | ||
### Features | ||
- **git:** add branch API endpoints to client ([3e80033](https://github.com/tinacms/tinacms/commit/3e80033)) | ||
- **git:** implement push endpoint ([4db1284](https://github.com/tinacms/tinacms/commit/4db1284)) | ||
- **git:** implement pushOnCommit option ([4413a6e](https://github.com/tinacms/tinacms/commit/4413a6e)) |
{ | ||
"name": "@tinacms/git-client", | ||
"version": "0.1.6", | ||
"version": "0.2.0-alpha.0", | ||
"main": "build/index.js", | ||
@@ -31,3 +31,3 @@ "types": "build/index.d.ts", | ||
"devDependencies": { | ||
"@tinacms/scripts": "^0.1.6", | ||
"@tinacms/scripts": "^0.1.7-alpha.0", | ||
"@types/jest": "^24.0.15", | ||
@@ -37,3 +37,3 @@ "jest": "^24.8.0", | ||
}, | ||
"gitHead": "582ebc201cd0456fff23527116bb3fb2d4b6d774" | ||
"gitHead": "e208f01536ead10bf185cb6fc98e8536b5efa5c3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17318
128
9