@tinacms/git-client
Advanced tools
Comparing version 0.1.2 to 0.1.3-alpha.0
@@ -0,1 +1,18 @@ | ||
/** | ||
Copyright 2019 Forestry.io Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
export declare class GitClient { | ||
@@ -68,2 +85,12 @@ private baseUrl; | ||
}): Promise<any>; | ||
/** | ||
* Resets the given files. | ||
*/ | ||
reset(data: { | ||
files: string[]; | ||
}): Promise<Response>; | ||
/** | ||
* Get the contents of a file for the most recent commit. | ||
*/ | ||
show(fileRelativePath: string): Promise<any>; | ||
} |
@@ -0,1 +1,18 @@ | ||
/** | ||
Copyright 2019 Forestry.io Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
export * from './git-client'; |
@@ -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);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=(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})}); |
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.3-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/git-client@0.1.0...@tinacms/git-client@0.1.3-alpha.0) (2019-10-09) | ||
**Note:** Version bump only for package @tinacms/git-client | ||
## [0.1.2](https://github.com/tinacms/tinacms/compare/@tinacms/git-client@0.1.2-alpha.0...@tinacms/git-client@0.1.2) (2019-10-07) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@tinacms/git-client", | ||
"version": "0.1.2", | ||
"version": "0.1.3-alpha.0", | ||
"main": "build/index.js", | ||
"types": "build/index.d.ts", | ||
"license": "MIT", | ||
"license": "Apache-2.0", | ||
"files": [ | ||
@@ -32,7 +32,7 @@ "build" | ||
"@types/jest": "^24.0.15", | ||
"cms-scripts": "^0.1.2", | ||
"cms-scripts": "^0.1.3-alpha.0", | ||
"jest": "^24.8.0", | ||
"ts-jest": "^24.0.2" | ||
}, | ||
"gitHead": "8876287e5fa2323d6be35d736492f9d39e767345" | ||
"gitHead": "762bc692cae2d49aadd1d37bc828fcfc65e0f37c" | ||
} |
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
17237
6
111
6