@es-git/core
Advanced tools
Comparing version 0.8.3 to 0.9.0
@@ -8,3 +8,3 @@ export default class AsyncBuffer { | ||
readonly pos: number; | ||
private nextData(length); | ||
private nextData; | ||
next(): Promise<number>; | ||
@@ -23,1 +23,2 @@ next(length: number): Promise<Uint8Array>; | ||
} | ||
//# sourceMappingURL=AsyncBuffer.d.ts.map |
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } | ||
var __asyncValues = (this && this.__asyncValues) || function (o) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator]; | ||
return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); | ||
var m = o[Symbol.asyncIterator], i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
}; | ||
@@ -13,3 +15,3 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
@@ -84,2 +86,3 @@ function reject(value) { resume("throw", value); } | ||
return __asyncGenerator(this, arguments, function* rest_1() { | ||
var e_1, _a; | ||
if (length !== undefined) { | ||
@@ -92,14 +95,14 @@ while (length > this.data.length - this.pointer) { | ||
else { | ||
yield yield __await(this.next(chunkSize)); | ||
yield yield __await(yield __await(this.next(chunkSize))); | ||
length -= chunkSize; | ||
} | ||
} | ||
yield yield __await(this.next(length)); | ||
yield yield __await(yield __await(this.next(length))); | ||
} | ||
else { | ||
yield yield __await(this.next(this.data.length - this.pointer)); | ||
yield yield __await(yield __await(this.next(this.data.length - this.pointer))); | ||
try { | ||
for (var _a = __asyncValues(this.source), _b; _b = yield __await(_a.next()), !_b.done;) { | ||
const chunk = yield __await(_b.value); | ||
yield yield __await(chunk); | ||
for (var _b = __asyncValues(this.source), _c; _c = yield __await(_b.next()), !_c.done;) { | ||
const chunk = yield yield __await(__await(_c.value)); | ||
yield yield __await(yield __await(chunk)); | ||
} | ||
@@ -110,3 +113,3 @@ } | ||
try { | ||
if (_b && !_b.done && (_c = _a.return)) yield __await(_c.call(_a)); | ||
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); | ||
} | ||
@@ -116,3 +119,2 @@ finally { if (e_1) throw e_1.error; } | ||
} | ||
var e_1, _c; | ||
}); | ||
@@ -135,5 +137,6 @@ } | ||
async complete() { | ||
var e_2, _a; | ||
try { | ||
for (var _a = __asyncValues(this.rest()), _b; _b = await _a.next(), !_b.done;) { | ||
const rest = await _b.value; | ||
for (var _b = __asyncValues(this.rest()), _c; _c = await _b.next(), !_c.done;) { | ||
const rest = await _c.value; | ||
} | ||
@@ -144,9 +147,8 @@ } | ||
try { | ||
if (_b && !_b.done && (_c = _a.return)) await _c.call(_a); | ||
if (_c && !_c.done && (_a = _b.return)) await _a.call(_b); | ||
} | ||
finally { if (e_2) throw e_2.error; } | ||
} | ||
var e_2, _c; | ||
} | ||
} | ||
//# sourceMappingURL=AsyncBuffer.js.map |
export {}; | ||
//# sourceMappingURL=AsyncBuffer.test.d.ts.map |
@@ -19,1 +19,2 @@ export default class Buffer { | ||
} | ||
//# sourceMappingURL=Buffer.d.ts.map |
export {}; | ||
//# sourceMappingURL=Buffer.test.d.ts.map |
@@ -5,3 +5,3 @@ export { decode, encode, concat, flatten, fromDec, fromHex, fromOct, fromDecChar, fromHexChar, packHash, unpackHash, toHexChar, NEWLINE } from './utils'; | ||
blob = 49152, | ||
file = 57344, | ||
file = 57344 | ||
} | ||
@@ -14,3 +14,3 @@ export declare enum Mode { | ||
sym = 40960, | ||
commit = 57344, | ||
commit = 57344 | ||
} | ||
@@ -22,3 +22,3 @@ export declare enum Type { | ||
blob = "blob", | ||
tag = "tag", | ||
tag = "tag" | ||
} | ||
@@ -43,1 +43,2 @@ export declare function isBlob(mode: number): boolean; | ||
export { default as sha1, Sha1 } from './sha1'; | ||
//# sourceMappingURL=index.d.ts.map |
export {}; | ||
//# sourceMappingURL=index.test.d.ts.map |
@@ -9,1 +9,2 @@ export interface Sha1 { | ||
export default function sha1(buffer: string | number[] | Uint8Array): string; | ||
//# sourceMappingURL=sha1.d.ts.map |
@@ -10,1 +10,2 @@ declare const encoder: { | ||
export { decoder as TextDecoder, encoder as TextEncoder }; | ||
//# sourceMappingURL=text-encoding.browser.d.ts.map |
@@ -14,1 +14,2 @@ export declare const NEWLINE: number; | ||
export declare function toHexChar(val: number): number; | ||
//# sourceMappingURL=utils.d.ts.map |
export {}; | ||
//# sourceMappingURL=utils.test.d.ts.map |
@@ -48,4 +48,19 @@ "use strict"; | ||
if (!_symbol2.default.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[_symbol2.default.asyncIterator]; | ||
return m ? m.call(o) : typeof __values === "function" ? __values(o) : (0, _getIterator3.default)(o); | ||
var m = o[_symbol2.default.asyncIterator], | ||
i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : (0, _getIterator3.default)(o), i = {}, verb("next"), verb("throw"), verb("return"), i[_symbol2.default.asyncIterator] = function () { | ||
return this; | ||
}, i); | ||
function verb(n) { | ||
i[n] = o[n] && function (v) { | ||
return new _promise2.default(function (resolve, reject) { | ||
v = o[n](v), settle(resolve, reject, v.done, v.value); | ||
}); | ||
}; | ||
} | ||
function settle(resolve, reject, d, v) { | ||
_promise2.default.resolve(v).then(function (v) { | ||
resolve({ value: v, done: d }); | ||
}, reject); | ||
} | ||
}; | ||
@@ -315,3 +330,3 @@ var __asyncGenerator = undefined && undefined.__asyncGenerator || function (thisArg, _arguments, generator) { | ||
return __asyncGenerator(this, arguments, /*#__PURE__*/_regenerator2.default.mark(function rest_1() { | ||
var chunkSize, _a, _b, chunk, e_1, _c; | ||
var e_1, _a, chunkSize, _b, _c, chunk; | ||
@@ -323,3 +338,3 @@ return _regenerator2.default.wrap(function rest_1$(_context6) { | ||
if (!(length !== undefined)) { | ||
_context6.next = 21; | ||
_context6.next = 29; | ||
break; | ||
@@ -330,3 +345,3 @@ } | ||
if (!(length > this.data.length - this.pointer)) { | ||
_context6.next = 15; | ||
_context6.next = 19; | ||
break; | ||
@@ -346,98 +361,126 @@ } | ||
case 6: | ||
_context6.next = 13; | ||
_context6.next = 17; | ||
break; | ||
case 8: | ||
_context6.next = 10; | ||
_context6.t0 = __await; | ||
_context6.next = 11; | ||
return __await(this.next(chunkSize)); | ||
case 10: | ||
_context6.next = 12; | ||
case 11: | ||
_context6.t1 = _context6.sent; | ||
_context6.next = 14; | ||
return (0, _context6.t0)(_context6.t1); | ||
case 14: | ||
_context6.next = 16; | ||
return _context6.sent; | ||
case 12: | ||
case 16: | ||
length -= chunkSize; | ||
case 13: | ||
case 17: | ||
_context6.next = 1; | ||
break; | ||
case 15: | ||
_context6.next = 17; | ||
case 19: | ||
_context6.t2 = __await; | ||
_context6.next = 22; | ||
return __await(this.next(length)); | ||
case 17: | ||
_context6.next = 19; | ||
case 22: | ||
_context6.t3 = _context6.sent; | ||
_context6.next = 25; | ||
return (0, _context6.t2)(_context6.t3); | ||
case 25: | ||
_context6.next = 27; | ||
return _context6.sent; | ||
case 19: | ||
_context6.next = 55; | ||
case 27: | ||
_context6.next = 73; | ||
break; | ||
case 21: | ||
_context6.next = 23; | ||
case 29: | ||
_context6.t4 = __await; | ||
_context6.next = 32; | ||
return __await(this.next(this.data.length - this.pointer)); | ||
case 23: | ||
_context6.next = 25; | ||
case 32: | ||
_context6.t5 = _context6.sent; | ||
_context6.next = 35; | ||
return (0, _context6.t4)(_context6.t5); | ||
case 35: | ||
_context6.next = 37; | ||
return _context6.sent; | ||
case 25: | ||
_context6.prev = 25; | ||
_a = __asyncValues(this.source); | ||
case 37: | ||
_context6.prev = 37; | ||
_b = __asyncValues(this.source); | ||
case 27: | ||
_context6.next = 29; | ||
return __await(_a.next()); | ||
case 39: | ||
_context6.next = 41; | ||
return __await(_b.next()); | ||
case 29: | ||
_b = _context6.sent; | ||
case 41: | ||
_c = _context6.sent; | ||
if (_b.done) { | ||
_context6.next = 40; | ||
if (_c.done) { | ||
_context6.next = 58; | ||
break; | ||
} | ||
_context6.next = 33; | ||
return __await(_b.value); | ||
_context6.next = 45; | ||
return __await(__await(_c.value)); | ||
case 33: | ||
case 45: | ||
_context6.next = 47; | ||
return _context6.sent; | ||
case 47: | ||
chunk = _context6.sent; | ||
_context6.next = 36; | ||
_context6.t6 = __await; | ||
_context6.next = 51; | ||
return __await(chunk); | ||
case 36: | ||
_context6.next = 38; | ||
case 51: | ||
_context6.t7 = _context6.sent; | ||
_context6.next = 54; | ||
return (0, _context6.t6)(_context6.t7); | ||
case 54: | ||
_context6.next = 56; | ||
return _context6.sent; | ||
case 38: | ||
_context6.next = 27; | ||
case 56: | ||
_context6.next = 39; | ||
break; | ||
case 40: | ||
_context6.next = 45; | ||
case 58: | ||
_context6.next = 63; | ||
break; | ||
case 42: | ||
_context6.prev = 42; | ||
_context6.t0 = _context6["catch"](25); | ||
e_1 = { error: _context6.t0 }; | ||
case 60: | ||
_context6.prev = 60; | ||
_context6.t8 = _context6["catch"](37); | ||
e_1 = { error: _context6.t8 }; | ||
case 45: | ||
_context6.prev = 45; | ||
_context6.prev = 46; | ||
case 63: | ||
_context6.prev = 63; | ||
_context6.prev = 64; | ||
if (!(_b && !_b.done && (_c = _a.return))) { | ||
_context6.next = 50; | ||
if (!(_c && !_c.done && (_a = _b.return))) { | ||
_context6.next = 68; | ||
break; | ||
} | ||
_context6.next = 50; | ||
return __await(_c.call(_a)); | ||
_context6.next = 68; | ||
return __await(_a.call(_b)); | ||
case 50: | ||
_context6.prev = 50; | ||
case 68: | ||
_context6.prev = 68; | ||
if (!e_1) { | ||
_context6.next = 53; | ||
_context6.next = 71; | ||
break; | ||
@@ -448,9 +491,9 @@ } | ||
case 53: | ||
return _context6.finish(50); | ||
case 71: | ||
return _context6.finish(68); | ||
case 54: | ||
return _context6.finish(45); | ||
case 72: | ||
return _context6.finish(63); | ||
case 55: | ||
case 73: | ||
case "end": | ||
@@ -460,3 +503,3 @@ return _context6.stop(); | ||
} | ||
}, rest_1, this, [[25, 42, 45, 55], [46,, 50, 54]]); | ||
}, rest_1, this, [[37, 60, 63, 73], [64,, 68, 72]]); | ||
})); | ||
@@ -544,3 +587,3 @@ } | ||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() { | ||
var _a, _b, rest, e_2, _c; | ||
var e_2, _a, _b, _c, rest; | ||
@@ -552,12 +595,12 @@ return _regenerator2.default.wrap(function _callee8$(_context9) { | ||
_context9.prev = 0; | ||
_a = __asyncValues(this.rest()); | ||
_b = __asyncValues(this.rest()); | ||
case 2: | ||
_context9.next = 4; | ||
return _a.next(); | ||
return _b.next(); | ||
case 4: | ||
_b = _context9.sent; | ||
_c = _context9.sent; | ||
if (_b.done) { | ||
if (_c.done) { | ||
_context9.next = 11; | ||
@@ -568,3 +611,3 @@ break; | ||
_context9.next = 8; | ||
return _b.value; | ||
return _c.value; | ||
@@ -591,3 +634,3 @@ case 8: | ||
if (!(_b && !_b.done && (_c = _a.return))) { | ||
if (!(_c && !_c.done && (_a = _b.return))) { | ||
_context9.next = 21; | ||
@@ -598,3 +641,3 @@ break; | ||
_context9.next = 21; | ||
return _c.call(_a); | ||
return _a.call(_b); | ||
@@ -601,0 +644,0 @@ case 21: |
{ | ||
"name": "@es-git/core", | ||
"version": "0.8.3", | ||
"version": "0.9.0", | ||
"description": "", | ||
@@ -45,5 +45,5 @@ "main": "js/index.js", | ||
"dependencies": { | ||
"@es-git/mix": "^0.1.2", | ||
"@es-git/mix": "^0.9.0", | ||
"text-encoding": "^0.6.4" | ||
} | ||
} |
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 not supported yet
179032
62
2129
+ Added@es-git/mix@0.9.0(transitive)
- Removed@es-git/mix@0.1.2(transitive)
Updated@es-git/mix@^0.9.0