isomorphic-git
Advanced tools
Comparing version 0.0.37 to 0.0.38
@@ -8,2 +8,3 @@ 'use strict'; | ||
/** @ignore */ | ||
var utils = { auth: utils_js.auth, oauth2: utils_js.oauth2 }; | ||
@@ -10,0 +11,0 @@ |
@@ -47,19 +47,20 @@ 'use strict'; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* | ||
* // Write config value | ||
* await config({ | ||
* await git.config({ | ||
* ...repo, | ||
* path: 'user.name', | ||
* value: 'Mr. Test' | ||
* path: '<@user.name@>', | ||
* value: '<@Mr. Test@>' | ||
* }) | ||
* | ||
* // Read config value | ||
* let value = await config({ | ||
* let value = await git.config({ | ||
* ...repo, | ||
* path: 'user.name' | ||
* path: '<@user.name@>' | ||
* }) | ||
* console.log(value) | ||
*/ | ||
var config = function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var dir = _ref.dir, | ||
@@ -151,13 +152,14 @@ _ref$gitdir = _ref.gitdir, | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await push({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let pushResponse = await git.push({ | ||
* ...repo, | ||
* remote: 'origin', | ||
* ref: 'master', | ||
* authUsername: process.env.GITHUB_TOKEN, | ||
* authPassword: process.env.GITHUB_TOKEN | ||
* remote: '<@origin@>', | ||
* ref: '<@master@>', | ||
* authUsername: <@process.env.GITHUB_TOKEN@>, | ||
* authPassword: <@process.env.GITHUB_TOKEN@> | ||
* }) | ||
* console.log(pushResponse) | ||
*/ | ||
};var push = function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _fs = _ref.fs, | ||
@@ -259,3 +261,3 @@ dir = _ref.dir, | ||
var listCommits = function () { | ||
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(_ref3) { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) { | ||
@@ -266,3 +268,3 @@ // Because git commits are named by their hash, there is no | ||
var walk = function () { | ||
var _ref6 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(oid) { | ||
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(oid) { | ||
var _ref7, type, object, commit, parents, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3; | ||
@@ -590,3 +592,3 @@ | ||
var listObjects = function () { | ||
var _ref9 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(_ref8) { | ||
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref8) { | ||
@@ -597,3 +599,3 @@ // We don't do the purest simplest recursion, because we can | ||
var walk = function () { | ||
var _ref10 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(oid) { | ||
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(oid) { | ||
var _ref11, type, object, commit, tree, _tree, _iteratorNormalCompletion5, _didIteratorError5, _iteratorError5, _iterator5, _step5, entry; | ||
@@ -802,3 +804,3 @@ | ||
var pack = function () { | ||
var _ref13 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee6(_ref12) { | ||
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref12) { | ||
var dir = _ref12.dir, | ||
@@ -947,3 +949,3 @@ _ref12$gitdir = _ref12.gitdir, | ||
var fetchPackfile = function () { | ||
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(_ref3) { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) { | ||
var _this = this; | ||
@@ -1211,3 +1213,3 @@ | ||
response.packetlines.pipe(through2(function () { | ||
var _ref5 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(data, enc, next) { | ||
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data, enc, next) { | ||
var line, _oid, _oid2; | ||
@@ -1314,11 +1316,12 @@ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await fetch({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log('done') | ||
*/ | ||
var fetch = function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var dir = _ref.dir, | ||
@@ -1415,3 +1418,3 @@ _ref$gitdir = _ref.gitdir, | ||
var unpack = function () { | ||
var _ref7 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(_ref6) { | ||
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref6) { | ||
var dir = _ref6.dir, | ||
@@ -1456,3 +1459,3 @@ _ref6$gitdir = _ref6.gitdir, | ||
inputStream.pipe(listpack()).pipe(through2.obj(function () { | ||
var _ref9 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(_ref8, enc, next) { | ||
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref8, enc, next) { | ||
var data = _ref8.data, | ||
@@ -1459,0 +1462,0 @@ type = _ref8.type, |
@@ -37,3 +37,3 @@ 'use strict'; | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _fs = _ref.fs, | ||
@@ -74,3 +74,3 @@ gitdir = _ref.gitdir; | ||
value: function () { | ||
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var _fs = _ref3.fs, | ||
@@ -124,3 +124,3 @@ gitdir = _ref3.gitdir, | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var fs = _ref.fs, | ||
@@ -170,3 +170,3 @@ gitdir = _ref.gitdir; | ||
value: function () { | ||
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var fs = _ref3.fs, | ||
@@ -269,3 +269,3 @@ gitdir = _ref3.gitdir, | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref, closure) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref, closure) { | ||
var _fs = _ref.fs, | ||
@@ -280,3 +280,3 @@ filepath = _ref.filepath; | ||
_context2.next = 3; | ||
return lock.acquire(filepath, _asyncToGenerator(_regeneratorRuntime.mark(function _callee() { | ||
return lock.acquire(filepath, _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { | ||
var index, rawIndexFile, buffer$$1; | ||
@@ -376,3 +376,3 @@ return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _fs = _ref.fs, | ||
@@ -537,3 +537,3 @@ dir = _ref.dir, | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _fs = _ref.fs, | ||
@@ -752,3 +752,3 @@ gitdir = _ref.gitdir, | ||
value: function () { | ||
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) { | ||
var gitdir = _ref3.gitdir, | ||
@@ -783,3 +783,3 @@ type = _ref3.type, | ||
value: function () { | ||
var _ref6 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(_ref5) { | ||
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) { | ||
var _fs = _ref5.fs, | ||
@@ -856,3 +856,3 @@ gitdir = _ref5.gitdir, | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) { | ||
var _fs = _ref.fs, | ||
@@ -1126,3 +1126,3 @@ gitdir = _ref.gitdir, | ||
value: function () { | ||
var _ref10 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref9) { | ||
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref9) { | ||
var _fs = _ref9.fs, | ||
@@ -1335,3 +1335,3 @@ gitdir = _ref9.gitdir, | ||
value: function () { | ||
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee() { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -1361,3 +1361,3 @@ while (1) { | ||
value: function () { | ||
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2() { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() { | ||
return _regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
@@ -1387,3 +1387,3 @@ while (1) { | ||
value: function () { | ||
var _ref3 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(service /*: string */) { | ||
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(service /*: string */) { | ||
var _this = this; | ||
@@ -1568,3 +1568,3 @@ | ||
value: function () { | ||
var _ref5 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(stream$$1 /*: ReadableStream */) { | ||
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(stream$$1 /*: ReadableStream */) { | ||
var service, _ref6, packetlines, packfile, result, response, read, line, lines, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _line, status, refAndMessage; | ||
@@ -1718,3 +1718,3 @@ | ||
value: function () { | ||
var _ref7 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(stream$$1 /*: ReadableStream */) { | ||
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(stream$$1 /*: ReadableStream */) { | ||
var service, res; | ||
@@ -1750,3 +1750,3 @@ return _regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
value: function () { | ||
var _ref9 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee7(_ref8) { | ||
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref8) { | ||
var _stream = _ref8.stream, | ||
@@ -1793,3 +1793,3 @@ service = _ref8.service; | ||
nextBit = function () { | ||
var _ref10 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee6() { | ||
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() { | ||
var line, error; | ||
@@ -1796,0 +1796,0 @@ return _regeneratorRuntime.wrap(function _callee6$(_context6) { |
@@ -97,3 +97,3 @@ 'use strict'; | ||
var sleep = function () { | ||
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(ms) { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ms) { | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -138,4 +138,4 @@ while (1) { | ||
var files = ["dist", "cli.js"]; | ||
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.6", "ini": "^1.3.4", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var dependencies = { "async-lock": "^1.1.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.8", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.7", "ini": "^1.3.5", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.6.1", "pad": "^2.0.3", "pako": "^1.0.6", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.2", "browserfs": "^1.4.3", "browserify": "^14.5.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.3", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.1.0", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.1.5", "npm-run-all": "^4.1.2", "nps": "^5.7.1", "nps-utils": "^1.5.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.3", "rollup-plugin-babel": "^3.0.3", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.1.0", "tape": "^4.8.0", "uglify-es": "^3.3.4", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var ava = { "source": ["dist/for-node/*"] }; | ||
@@ -142,0 +142,0 @@ var browserify = { "transform": ["browserify-shim"] }; |
@@ -33,4 +33,10 @@ import path from 'path'; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await add({...repo, filepath: 'README.md'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await new Promise((resolve, reject) => fs.writeFile( | ||
* '<@README.md@>', | ||
* `<<@# TEST@>>`, | ||
* (err) => err ? reject(err) : resolve() | ||
* )) | ||
* await git.add({...repo, filepath: '<@README.md@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -65,4 +71,5 @@ async function add({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await init(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.init(repo) | ||
* console.log('done') | ||
*/ | ||
@@ -96,16 +103,17 @@ async function init({ dir, gitdir = path.join(dir, '.git'), fs: _fs }) { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* | ||
* // Write config value | ||
* await config({ | ||
* await git.config({ | ||
* ...repo, | ||
* path: 'user.name', | ||
* value: 'Mr. Test' | ||
* path: '<@user.name@>', | ||
* value: '<@Mr. Test@>' | ||
* }) | ||
* | ||
* // Read config value | ||
* let value = await config({ | ||
* let value = await git.config({ | ||
* ...repo, | ||
* path: 'user.name' | ||
* path: '<@user.name@>' | ||
* }) | ||
* console.log(value) | ||
*/ | ||
@@ -156,8 +164,9 @@ async function config(_ref) { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await fetch({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log('done') | ||
*/ | ||
@@ -370,4 +379,5 @@ async function fetch({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await checkout({...repo, ref: 'master'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.checkout({...repo, ref: '<@master@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -455,8 +465,9 @@ async function checkout({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await clone({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.clone({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log(done) | ||
*/ | ||
@@ -553,11 +564,12 @@ async function clone({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let sha = await commit({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let sha = await git.commit({ | ||
* ...repo, | ||
* author: { | ||
* name: 'Mr. Test', | ||
* email: 'mrtest@example.com' | ||
* name: '<@Mr. Test@>', | ||
* email: '<@mrtest@example.com@>' | ||
* }, | ||
* message: 'Added the a.txt file' | ||
* message: '<@Added the a.txt file@>' | ||
* }) | ||
* console.log(sha) | ||
*/ | ||
@@ -641,4 +653,5 @@ async function commit({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let files = await listFiles(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let files = await git.listFiles(repo) | ||
* console.log(files) | ||
*/ | ||
@@ -668,4 +681,5 @@ async function listFiles({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let branches = await listBranches(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let branches = await git.listBranches(repo) | ||
* console.log(branches) | ||
*/ | ||
@@ -722,4 +736,4 @@ async function listBranches({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let commits = await log({...repo, depth: 5, ref: 'master'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let commits = await git.log({...repo, depth: 5, ref: '<@master@>'}) | ||
* console.log(commits) | ||
@@ -811,10 +825,11 @@ */ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await push({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let pushResponse = await git.push({ | ||
* ...repo, | ||
* remote: 'origin', | ||
* ref: 'master', | ||
* authUsername: process.env.GITHUB_TOKEN, | ||
* authPassword: process.env.GITHUB_TOKEN | ||
* remote: '<@origin@>', | ||
* ref: '<@master@>', | ||
* authUsername: <@process.env.GITHUB_TOKEN@>, | ||
* authPassword: <@process.env.GITHUB_TOKEN@> | ||
* }) | ||
* console.log(pushResponse) | ||
*/ | ||
@@ -1024,4 +1039,5 @@ };async function push({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await remove({...repo, filepath: 'README.md'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.remove({...repo, filepath: '<@README.md@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -1065,7 +1081,11 @@ async function remove({ | ||
* let repo = {fs, dir: '.'} | ||
* let keyids = verify({ | ||
* let keyids = await git.verify({ | ||
* ...repo, | ||
* ref: 'HEAD', | ||
* publicKeys: '-----BEGIN PGP PUBLIC KEY BLOCK-----...' | ||
* ref: '<@HEAD@>', | ||
* publicKeys: `<<@ | ||
* -----BEGIN PGP PUBLIC KEY BLOCK----- | ||
* ... | ||
* @>>` | ||
* }) | ||
* console.log(keyids) | ||
*/ | ||
@@ -1171,5 +1191,5 @@ async function verify({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let gitstatus = await status({...repo, filepath: 'README.md'}) | ||
* console.log(gitstatus) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let status = await git.status({...repo, filepath: '<@README.md@>'}) | ||
* console.log(status) | ||
*/ | ||
@@ -1288,7 +1308,7 @@ async function status({ | ||
* @example | ||
* let gitroot = await findRoot( { | ||
* let gitroot = await git.findRoot({ | ||
* fs, | ||
* filepath: '/path/to/some/gitrepo/path/to/some/file.txt' | ||
* filepath: '<@/path/to/some/gitrepo/path/to/some/file.txt@>' | ||
* }) | ||
* // gitroot = '/path/to/some/gitrepo' | ||
* console.log(gitroot) // '/path/to/some/gitrepo' | ||
*/ | ||
@@ -1317,5 +1337,9 @@ async function findRoot({ fs: _fs, filepath }) { | ||
* the correct version of the library and not a cached version. | ||
* | ||
* TODO: Semantic-release broke this, now it always says '0.0.0-development'. Need to add a | ||
* prepublishOnly script to find & replace that with the actual version number. | ||
* | ||
* @returns {string} version - the version string taken from package.json at publication time | ||
* @example | ||
* console.log(version()) | ||
* console.log(git.version()) | ||
*/ | ||
@@ -1337,4 +1361,4 @@ function version() { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await indexPack({...repo, filepath: 'pack-9cbd243a1caa4cb4bef976062434a958d82721a9.pack'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.indexPack({...repo, filepath: '<@pack-9cbd243a1caa4cb4bef976062434a958d82721a9.pack@>'}) | ||
*/ | ||
@@ -1375,15 +1399,11 @@ async function indexPack({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await commit({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let sha = await git.sign({ | ||
* ...repo, | ||
* author: { | ||
* name: 'Mr. Test', | ||
* email: 'mrtest@example.com' | ||
* }, | ||
* message: 'Added the a.txt file' | ||
* privateKeys: `<<@ | ||
* -----BEGIN PGP PRIVATE KEY BLOCK----- | ||
* ... | ||
* @>>` | ||
* }) | ||
* let sha = sign({ | ||
* ...repo, | ||
* privateKeys: '-----BEGIN PGP PRIVATE KEY BLOCK-----...' | ||
* }) | ||
* console.log(sha) | ||
*/ | ||
@@ -1390,0 +1410,0 @@ async function sign({ |
import { auth, oauth2 } from './utils.js'; | ||
/** @ignore */ | ||
const utils = { auth, oauth2 }; | ||
@@ -5,0 +6,0 @@ |
@@ -32,16 +32,17 @@ import path from 'path'; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* | ||
* // Write config value | ||
* await config({ | ||
* await git.config({ | ||
* ...repo, | ||
* path: 'user.name', | ||
* value: 'Mr. Test' | ||
* path: '<@user.name@>', | ||
* value: '<@Mr. Test@>' | ||
* }) | ||
* | ||
* // Read config value | ||
* let value = await config({ | ||
* let value = await git.config({ | ||
* ...repo, | ||
* path: 'user.name' | ||
* path: '<@user.name@>' | ||
* }) | ||
* console.log(value) | ||
*/ | ||
@@ -82,10 +83,11 @@ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await push({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let pushResponse = await git.push({ | ||
* ...repo, | ||
* remote: 'origin', | ||
* ref: 'master', | ||
* authUsername: process.env.GITHUB_TOKEN, | ||
* authPassword: process.env.GITHUB_TOKEN | ||
* remote: '<@origin@>', | ||
* ref: '<@master@>', | ||
* authUsername: <@process.env.GITHUB_TOKEN@>, | ||
* authPassword: <@process.env.GITHUB_TOKEN@> | ||
* }) | ||
* console.log(pushResponse) | ||
*/ | ||
@@ -258,8 +260,9 @@ }; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await fetch({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log('done') | ||
*/ | ||
@@ -266,0 +269,0 @@ |
@@ -85,4 +85,4 @@ import path from 'path'; | ||
var files = ["dist", "cli.js"]; | ||
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.6", "ini": "^1.3.4", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var dependencies = { "async-lock": "^1.1.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.8", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.7", "ini": "^1.3.5", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.6.1", "pad": "^2.0.3", "pako": "^1.0.6", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.2", "browserfs": "^1.4.3", "browserify": "^14.5.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.3", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.1.0", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.1.5", "npm-run-all": "^4.1.2", "nps": "^5.7.1", "nps-utils": "^1.5.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.3", "rollup-plugin-babel": "^3.0.3", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.1.0", "tape": "^4.8.0", "uglify-es": "^3.3.4", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var ava = { "source": ["dist/for-node/*"] }; | ||
@@ -89,0 +89,0 @@ var browserify = { "transform": ["browserify-shim"] }; |
@@ -39,4 +39,10 @@ 'use strict'; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await add({...repo, filepath: 'README.md'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await new Promise((resolve, reject) => fs.writeFile( | ||
* '<@README.md@>', | ||
* `<<@# TEST@>>`, | ||
* (err) => err ? reject(err) : resolve() | ||
* )) | ||
* await git.add({...repo, filepath: '<@README.md@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -71,4 +77,5 @@ async function add({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await init(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.init(repo) | ||
* console.log('done') | ||
*/ | ||
@@ -102,16 +109,17 @@ async function init({ dir, gitdir = path.join(dir, '.git'), fs: _fs }) { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* | ||
* // Write config value | ||
* await config({ | ||
* await git.config({ | ||
* ...repo, | ||
* path: 'user.name', | ||
* value: 'Mr. Test' | ||
* path: '<@user.name@>', | ||
* value: '<@Mr. Test@>' | ||
* }) | ||
* | ||
* // Read config value | ||
* let value = await config({ | ||
* let value = await git.config({ | ||
* ...repo, | ||
* path: 'user.name' | ||
* path: '<@user.name@>' | ||
* }) | ||
* console.log(value) | ||
*/ | ||
@@ -162,8 +170,9 @@ async function config(_ref) { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await fetch({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log('done') | ||
*/ | ||
@@ -376,4 +385,5 @@ async function fetch({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await checkout({...repo, ref: 'master'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.checkout({...repo, ref: '<@master@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -461,8 +471,9 @@ async function checkout({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await clone({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.clone({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log(done) | ||
*/ | ||
@@ -559,11 +570,12 @@ async function clone({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let sha = await commit({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let sha = await git.commit({ | ||
* ...repo, | ||
* author: { | ||
* name: 'Mr. Test', | ||
* email: 'mrtest@example.com' | ||
* name: '<@Mr. Test@>', | ||
* email: '<@mrtest@example.com@>' | ||
* }, | ||
* message: 'Added the a.txt file' | ||
* message: '<@Added the a.txt file@>' | ||
* }) | ||
* console.log(sha) | ||
*/ | ||
@@ -647,4 +659,5 @@ async function commit({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let files = await listFiles(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let files = await git.listFiles(repo) | ||
* console.log(files) | ||
*/ | ||
@@ -674,4 +687,5 @@ async function listFiles({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let branches = await listBranches(repo) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let branches = await git.listBranches(repo) | ||
* console.log(branches) | ||
*/ | ||
@@ -728,4 +742,4 @@ async function listBranches({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let commits = await log({...repo, depth: 5, ref: 'master'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let commits = await git.log({...repo, depth: 5, ref: '<@master@>'}) | ||
* console.log(commits) | ||
@@ -817,10 +831,11 @@ */ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await push({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let pushResponse = await git.push({ | ||
* ...repo, | ||
* remote: 'origin', | ||
* ref: 'master', | ||
* authUsername: process.env.GITHUB_TOKEN, | ||
* authPassword: process.env.GITHUB_TOKEN | ||
* remote: '<@origin@>', | ||
* ref: '<@master@>', | ||
* authUsername: <@process.env.GITHUB_TOKEN@>, | ||
* authPassword: <@process.env.GITHUB_TOKEN@> | ||
* }) | ||
* console.log(pushResponse) | ||
*/ | ||
@@ -1030,4 +1045,5 @@ };async function push({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await remove({...repo, filepath: 'README.md'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.remove({...repo, filepath: '<@README.md@>'}) | ||
* console.log('done') | ||
*/ | ||
@@ -1071,7 +1087,11 @@ async function remove({ | ||
* let repo = {fs, dir: '.'} | ||
* let keyids = verify({ | ||
* let keyids = await git.verify({ | ||
* ...repo, | ||
* ref: 'HEAD', | ||
* publicKeys: '-----BEGIN PGP PUBLIC KEY BLOCK-----...' | ||
* ref: '<@HEAD@>', | ||
* publicKeys: `<<@ | ||
* -----BEGIN PGP PUBLIC KEY BLOCK----- | ||
* ... | ||
* @>>` | ||
* }) | ||
* console.log(keyids) | ||
*/ | ||
@@ -1177,5 +1197,5 @@ async function verify({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let gitstatus = await status({...repo, filepath: 'README.md'}) | ||
* console.log(gitstatus) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let status = await git.status({...repo, filepath: '<@README.md@>'}) | ||
* console.log(status) | ||
*/ | ||
@@ -1294,7 +1314,7 @@ async function status({ | ||
* @example | ||
* let gitroot = await findRoot( { | ||
* let gitroot = await git.findRoot({ | ||
* fs, | ||
* filepath: '/path/to/some/gitrepo/path/to/some/file.txt' | ||
* filepath: '<@/path/to/some/gitrepo/path/to/some/file.txt@>' | ||
* }) | ||
* // gitroot = '/path/to/some/gitrepo' | ||
* console.log(gitroot) // '/path/to/some/gitrepo' | ||
*/ | ||
@@ -1323,5 +1343,9 @@ async function findRoot({ fs: _fs, filepath }) { | ||
* the correct version of the library and not a cached version. | ||
* | ||
* TODO: Semantic-release broke this, now it always says '0.0.0-development'. Need to add a | ||
* prepublishOnly script to find & replace that with the actual version number. | ||
* | ||
* @returns {string} version - the version string taken from package.json at publication time | ||
* @example | ||
* console.log(version()) | ||
* console.log(git.version()) | ||
*/ | ||
@@ -1343,4 +1367,4 @@ function version() { | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await indexPack({...repo, filepath: 'pack-9cbd243a1caa4cb4bef976062434a958d82721a9.pack'}) | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await git.indexPack({...repo, filepath: '<@pack-9cbd243a1caa4cb4bef976062434a958d82721a9.pack@>'}) | ||
*/ | ||
@@ -1381,15 +1405,11 @@ async function indexPack({ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await commit({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let sha = await git.sign({ | ||
* ...repo, | ||
* author: { | ||
* name: 'Mr. Test', | ||
* email: 'mrtest@example.com' | ||
* }, | ||
* message: 'Added the a.txt file' | ||
* privateKeys: `<<@ | ||
* -----BEGIN PGP PRIVATE KEY BLOCK----- | ||
* ... | ||
* @>>` | ||
* }) | ||
* let sha = sign({ | ||
* ...repo, | ||
* privateKeys: '-----BEGIN PGP PRIVATE KEY BLOCK-----...' | ||
* }) | ||
* console.log(sha) | ||
*/ | ||
@@ -1396,0 +1416,0 @@ async function sign({ |
@@ -8,2 +8,3 @@ 'use strict'; | ||
/** @ignore */ | ||
const utils = { auth: utils_js.auth, oauth2: utils_js.oauth2 }; | ||
@@ -10,0 +11,0 @@ |
@@ -38,16 +38,17 @@ 'use strict'; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* | ||
* // Write config value | ||
* await config({ | ||
* await git.config({ | ||
* ...repo, | ||
* path: 'user.name', | ||
* value: 'Mr. Test' | ||
* path: '<@user.name@>', | ||
* value: '<@Mr. Test@>' | ||
* }) | ||
* | ||
* // Read config value | ||
* let value = await config({ | ||
* let value = await git.config({ | ||
* ...repo, | ||
* path: 'user.name' | ||
* path: '<@user.name@>' | ||
* }) | ||
* console.log(value) | ||
*/ | ||
@@ -88,10 +89,11 @@ | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* await push({ | ||
* let repo = {fs, dir: '<@.@>'} | ||
* let pushResponse = await git.push({ | ||
* ...repo, | ||
* remote: 'origin', | ||
* ref: 'master', | ||
* authUsername: process.env.GITHUB_TOKEN, | ||
* authPassword: process.env.GITHUB_TOKEN | ||
* remote: '<@origin@>', | ||
* ref: '<@master@>', | ||
* authUsername: <@process.env.GITHUB_TOKEN@>, | ||
* authPassword: <@process.env.GITHUB_TOKEN@> | ||
* }) | ||
* console.log(pushResponse) | ||
*/ | ||
@@ -264,8 +266,9 @@ }; | ||
* @example | ||
* let repo = {fs, dir: '.'} | ||
* let repo = {fs, dir: '<@.@>'} | ||
* await fetch({ | ||
* ...repo, | ||
* url: 'https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git', | ||
* url: '<@https://cors-buster-jfpactjnem.now.sh/github.com/isomorphic-git/isomorphic-git@>', | ||
* depth: 1 | ||
* }) | ||
* console.log('done') | ||
*/ | ||
@@ -272,0 +275,0 @@ |
@@ -91,4 +91,4 @@ 'use strict'; | ||
var files = ["dist", "cli.js"]; | ||
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.6", "ini": "^1.3.4", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var dependencies = { "async-lock": "^1.1.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.8", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "crc": "^3.5.0", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ignore": "^3.3.7", "ini": "^1.3.5", "marky": "^1.2.0", "minimisted": "^2.0.0", "openpgp": "^2.6.1", "pad": "^2.0.3", "pako": "^1.0.6", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "through2": "^2.0.3" }; | ||
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.2", "browserfs": "^1.4.3", "browserify": "^14.5.0", "browserify-shim": "^3.8.14", "codecov": "^3.0.0", "doctoc": "^1.3.0", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-importpath-plugin": "^1.0.1", "esdoc-inject-script-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", "husky": "^0.14.3", "jest": "^22.0.4", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^2.0.0", "karma-browserify": "^5.1.3", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.1.0", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.1.5", "npm-run-all": "^4.1.2", "nps": "^5.7.1", "nps-utils": "^1.5.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^8.0.0", "rollup": "^0.53.3", "rollup-plugin-babel": "^3.0.3", "rollup-plugin-json": "^2.3.0", "semantic-release": "^8.2.0", "standard": "^10.0.3", "stream-equal": "^1.1.0", "tape": "^4.8.0", "uglify-es": "^3.3.4", "watch": "^1.0.2", "watchify": "^3.9.0" }; | ||
var ava = { "source": ["dist/for-node/*"] }; | ||
@@ -95,0 +95,0 @@ var browserify = { "transform": ["browserify-shim"] }; |
@@ -1,1 +0,1 @@ | ||
{"name":"isomorphic-git","version":"0.0.37","description":"A pure JavaScript implementation of git for node and browsers!","typings":"./src/index.d.ts","main":"dist/for-node/","browser":"dist/for-browserify/","module":"dist/for-future/","unpkg":"dist/bundle.umd.min.js","bin":{"isogit":"./cli.js"},"engines":{"node":">=7.6.0"},"scripts":{"start":"nps","test":"nps test","precommit":"nps format toc","prepush":"nps lint","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"https://github.com/isomorphic-git/isomorphic-git.git"},"keywords":["git","isomorphic"],"author":"William Hilton <wmhilton@gmail.com>","license":"Unlicense","bugs":{"url":"https://github.com/isomorphic-git/isomorphic-git/issues"},"homepage":"https://isomorphic-git.github.io/isomorphic-git","files":["dist","cli.js"],"dependencies":{"async-lock":"^1.0.0","await-stream-ready":"^1.0.1","babel-runtime":"^6.26.0","buffer":"^5.0.7","buffer-peek-stream":"^1.0.1","buffercursor":"0.0.12","crc":"^3.5.0","gartal":"^1.1.2","git-apply-delta":"0.0.7","git-list-pack":"0.0.10","ignore":"^3.3.6","ini":"^1.3.4","marky":"^1.2.0","minimisted":"^2.0.0","openpgp":"^2.5.10","pad":"^2.0.1","pako":"^1.0.5","pify":"^3.0.0","shasum":"^1.0.2","simple-concat":"^1.0.0","simple-get":"^2.7.0","through2":"^2.0.3"},"devDependencies":{"babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-es2015-modules-commonjs":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","ban-sensitive-files":"^1.9.0","browserfs":"^1.4.3","browserify":"^14.4.0","browserify-shim":"^3.8.14","codecov":"^3.0.0","doctoc":"^1.3.0","esdoc":"^1.0.4","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-importpath-plugin":"^1.0.1","esdoc-inject-script-plugin":"^1.0.0","esdoc-inject-style-plugin":"^1.0.0","esdoc-standard-plugin":"^1.0.0","husky":"^0.14.3","jest":"^22.0.4","jest-fixtures":"^0.6.0","jsonfile":"^4.0.0","karma":"^2.0.0","karma-browserify":"^5.1.1","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-sauce-launcher":"^1.2.0","karma-tap":"^3.1.1","lodash":"^4.17.4","nock":"^9.0.17","npm-run-all":"^4.1.1","nps":"^5.7.1","nps-utils":"^1.4.0","parse-header-stream":"^1.1.1","prettier-standard":"^8.0.0","rollup":"^0.53.0","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","semantic-release":"^8.2.0","standard":"^10.0.3","stream-equal":"^1.0.1","tape":"^4.8.0","uglify-es":"^3.1.2","watch":"^1.0.2","watchify":"^3.9.0"},"ava":{"source":["dist/for-node/*"]},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"fs":"global:fs"},"testling":{"files":"testling/basic-test.js","browsers":["chrome/latest","firefox/latest","ie/latest"]},"jest":{"testPathIgnorePatterns":["__helpers__"],"testEnvironment":"node"}} | ||
{"name":"isomorphic-git","version":"0.0.38","description":"A pure JavaScript implementation of git for node and browsers!","typings":"./src/index.d.ts","main":"dist/for-node/","browser":"dist/for-browserify/","module":"dist/for-future/","unpkg":"dist/bundle.umd.min.js","bin":{"isogit":"./cli.js"},"engines":{"node":">=7.6.0"},"scripts":{"start":"nps","test":"nps test","precommit":"nps format toc","prepush":"nps lint","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"https://github.com/isomorphic-git/isomorphic-git.git"},"keywords":["git","isomorphic"],"author":"William Hilton <wmhilton@gmail.com>","license":"Unlicense","bugs":{"url":"https://github.com/isomorphic-git/isomorphic-git/issues"},"homepage":"https://isomorphic-git.github.io/isomorphic-git","files":["dist","cli.js"],"dependencies":{"async-lock":"^1.1.0","await-stream-ready":"^1.0.1","babel-runtime":"^6.26.0","buffer":"^5.0.8","buffer-peek-stream":"^1.0.1","buffercursor":"0.0.12","crc":"^3.5.0","gartal":"^1.1.2","git-apply-delta":"0.0.7","git-list-pack":"0.0.10","ignore":"^3.3.7","ini":"^1.3.5","marky":"^1.2.0","minimisted":"^2.0.0","openpgp":"^2.6.1","pad":"^2.0.3","pako":"^1.0.6","pify":"^3.0.0","shasum":"^1.0.2","simple-concat":"^1.0.0","simple-get":"^2.7.0","through2":"^2.0.3"},"devDependencies":{"babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-es2015-modules-commonjs":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","ban-sensitive-files":"^1.9.2","browserfs":"^1.4.3","browserify":"^14.5.0","browserify-shim":"^3.8.14","codecov":"^3.0.0","doctoc":"^1.3.0","esdoc":"^1.0.4","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-importpath-plugin":"^1.0.1","esdoc-inject-script-plugin":"^1.0.0","esdoc-inject-style-plugin":"^1.0.0","esdoc-standard-plugin":"^1.0.0","husky":"^0.14.3","jest":"^22.0.4","jest-fixtures":"^0.6.0","jsonfile":"^4.0.0","karma":"^2.0.0","karma-browserify":"^5.1.3","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.1.0","karma-sauce-launcher":"^1.2.0","karma-tap":"^3.1.1","lodash":"^4.17.4","nock":"^9.1.5","npm-run-all":"^4.1.2","nps":"^5.7.1","nps-utils":"^1.5.0","parse-header-stream":"^1.1.1","prettier-standard":"^8.0.0","rollup":"^0.53.3","rollup-plugin-babel":"^3.0.3","rollup-plugin-json":"^2.3.0","semantic-release":"^8.2.0","standard":"^10.0.3","stream-equal":"^1.1.0","tape":"^4.8.0","uglify-es":"^3.3.4","watch":"^1.0.2","watchify":"^3.9.0"},"ava":{"source":["dist/for-node/*"]},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"fs":"global:fs"},"testling":{"files":"testling/basic-test.js","browsers":["chrome/latest","firefox/latest","ie/latest"]},"jest":{"testPathIgnorePatterns":["__helpers__"],"testEnvironment":"node"}} |
@@ -67,2 +67,13 @@ # isomorphic-git ![node version](https://img.shields.io/node/v/isomorphic-git.svg) [![Build Status](https://travis-ci.org/isomorphic-git/isomorphic-git.svg?branch=master)](https://travis-ci.org/isomorphic-git/isomorphic-git) [![codecov](https://codecov.io/gh/isomorphic-git/isomorphic-git/branch/master/graph/badge.svg)](https://codecov.io/gh/isomorphic-git/isomorphic-git) [![dependencies](https://david-dm.org/isomorphic-git/isomorphic-git/status.svg)](https://david-dm.org/isomorphic-git/isomorphic-git) [![Known Vulnerabilities](https://snyk.io/test/github/isomorphic-git/isomorphic-git/badge.svg)](https://snyk.io/test/github/isomorphic-git/isomorphic-git) | ||
### CORS support | ||
Unfortunately, due to the same-origin policy by default `isomorphic-git` can only clone from the same origin as the webpage it is running on. This is terribly inconvenient, as it means for all practical purposes cloning and pushing repos must be done through a [proxy](https://cors-buster-jfpactjnem.now.sh/). However, I am "being the change you want to see in the world" by making PRs to all the major git repository hosting services. | ||
- Gogs: [repo/http: add CORS headers to allow clone/push from browser agents #4970](https://github.com/gogits/gogs/pull/4970) | ||
- Gitlab: [Add CORS headers to git clone and git push #219](https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/219) | ||
- Bitbucket: TODO | ||
- Github: TODO | ||
It is literally just two lines of code to add the CORS headers!! Easy stuff. Surely it will happen. | ||
### Using as an npm module | ||
@@ -69,0 +80,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
26827
211
9315887
Updatedasync-lock@^1.1.0
Updatedbuffer@^5.0.8
Updatedignore@^3.3.7
Updatedini@^1.3.5
Updatedopenpgp@^2.6.1
Updatedpad@^2.0.3
Updatedpako@^1.0.6