@datapos/datapos-tool-csv-parse 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -532,79 +532,79 @@ a.prototype.slice = function(e, r) {
|
|
|
532
532
|
}
|
|
533
533
|
return i;
|
|
534
534
|
};
|
|
535
|
-
function
|
|
535
|
+
function C(t, e, r) {
|
|
536
536
|
if (t % 1 !== 0 || t < 0) throw new RangeError("offset is not uint");
|
|
537
537
|
if (t + e > r) throw new RangeError("Trying to access beyond buffer length");
|
|
538
538
|
}
|
|
539
539
|
a.prototype.readUIntLE = function(e, r, n) {
|
|
540
|
-
e = e | 0, r = r | 0, n ||
|
|
540
|
+
e = e | 0, r = r | 0, n || C(e, r, this.length);
|
|
541
541
|
for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
|
|
542
542
|
i += this[e + s] * o;
|
|
543
543
|
return i;
|
|
544
544
|
};
|
|
545
545
|
a.prototype.readUIntBE = function(e, r, n) {
|
|
546
|
-
e = e | 0, r = r | 0, n ||
|
|
546
|
+
e = e | 0, r = r | 0, n || C(e, r, this.length);
|
|
547
547
|
for (var i = this[e + --r], o = 1; r > 0 && (o *= 256); )
|
|
548
548
|
i += this[e + --r] * o;
|
|
549
549
|
return i;
|
|
550
550
|
};
|
|
551
551
|
a.prototype.readUInt8 = function(e, r) {
|
|
552
|
-
return r ||
|
|
552
|
+
return r || C(e, 1, this.length), this[e];
|
|
553
553
|
};
|
|
554
554
|
a.prototype.readUInt16LE = function(e, r) {
|
|
555
|
-
return r ||
|
|
555
|
+
return r || C(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
556
556
|
};
|
|
557
557
|
a.prototype.readUInt16BE = function(e, r) {
|
|
558
|
-
return r ||
|
|
558
|
+
return r || C(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
559
559
|
};
|
|
560
560
|
a.prototype.readUInt32LE = function(e, r) {
|
|
561
|
-
return r ||
|
|
561
|
+
return r || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
562
562
|
};
|
|
563
563
|
a.prototype.readUInt32BE = function(e, r) {
|
|
564
|
-
return r ||
|
|
564
|
+
return r || C(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
565
565
|
};
|
|
566
566
|
a.prototype.readIntLE = function(e, r, n) {
|
|
567
|
-
e = e | 0, r = r | 0, n ||
|
|
567
|
+
e = e | 0, r = r | 0, n || C(e, r, this.length);
|
|
568
568
|
for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
|
|
569
569
|
i += this[e + s] * o;
|
|
570
570
|
return o *= 128, i >= o && (i -= Math.pow(2, 8 * r)), i;
|
|
571
571
|
};
|
|
572
572
|
a.prototype.readIntBE = function(e, r, n) {
|
|
573
|
-
e = e | 0, r = r | 0, n ||
|
|
573
|
+
e = e | 0, r = r | 0, n || C(e, r, this.length);
|
|
574
574
|
for (var i = r, o = 1, s = this[e + --i]; i > 0 && (o *= 256); )
|
|
575
575
|
s += this[e + --i] * o;
|
|
576
576
|
return o *= 128, s >= o && (s -= Math.pow(2, 8 * r)), s;
|
|
577
577
|
};
|
|
578
578
|
a.prototype.readInt8 = function(e, r) {
|
|
579
|
-
return r ||
|
|
579
|
+
return r || C(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
580
580
|
};
|
|
581
581
|
a.prototype.readInt16LE = function(e, r) {
|
|
582
|
-
r ||
|
|
582
|
+
r || C(e, 2, this.length);
|
|
583
583
|
var n = this[e] | this[e + 1] << 8;
|
|
584
584
|
return n & 32768 ? n | 4294901760 : n;
|
|
585
585
|
};
|
|
586
586
|
a.prototype.readInt16BE = function(e, r) {
|
|
587
|
-
r ||
|
|
587
|
+
r || C(e, 2, this.length);
|
|
588
588
|
var n = this[e + 1] | this[e] << 8;
|
|
589
589
|
return n & 32768 ? n | 4294901760 : n;
|
|
590
590
|
};
|
|
591
591
|
a.prototype.readInt32LE = function(e, r) {
|
|
592
|
-
return r ||
|
|
592
|
+
return r || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
593
593
|
};
|
|
594
594
|
a.prototype.readInt32BE = function(e, r) {
|
|
595
|
-
return r ||
|
|
595
|
+
return r || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
596
596
|
};
|
|
597
597
|
a.prototype.readFloatLE = function(e, r) {
|
|
598
|
-
return r ||
|
|
598
|
+
return r || C(e, 4, this.length), be(this, e, !0, 23, 4);
|
|
599
599
|
};
|
|
600
600
|
a.prototype.readFloatBE = function(e, r) {
|
|
601
|
-
return r ||
|
|
601
|
+
return r || C(e, 4, this.length), be(this, e, !1, 23, 4);
|
|
602
602
|
};
|
|
603
603
|
a.prototype.readDoubleLE = function(e, r) {
|
|
604
|
-
return r ||
|
|
604
|
+
return r || C(e, 8, this.length), be(this, e, !0, 52, 8);
|
|
605
605
|
};
|
|
606
606
|
a.prototype.readDoubleBE = function(e, r) {
|
|
607
|
-
return r ||
|
|
607
|
+
return r || C(e, 8, this.length), be(this, e, !1, 52, 8);
|
|
608
608
|
};
|
|
609
609
|
function N(t, e, r, n, i, o) {
|
|
610
610
|
if (!$(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
@@ -855,7 +855,7 @@ function xt(t) {
|
|
|
855
855
|
function Sr(t) {
|
|
856
856
|
return typeof t.readFloatLE == "function" && typeof t.slice == "function" && xt(t.slice(0, 0));
|
|
857
857
|
}
|
|
858
|
-
var
|
|
858
|
+
var Oe;
|
|
859
859
|
function Q() {
|
|
860
860
|
}
|
|
861
861
|
Q.prototype = /* @__PURE__ */ Object.create(null);
|
|
@@ -869,7 +869,7 @@ m.prototype._events = void 0;
|
|
|
869
869
|
m.prototype._maxListeners = void 0;
|
|
870
870
|
m.defaultMaxListeners = 10;
|
|
871
871
|
m.init = function() {
|
|
872
|
-
this.domain = null, m.usingDomains &&
|
|
872
|
+
this.domain = null, m.usingDomains && Oe.active && !(this instanceof Oe.Domain) && (this.domain = Oe.active), (!this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = new Q(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
873
873
|
};
|
|
874
874
|
m.prototype.setMaxListeners = function(e) {
|
|
875
875
|
if (typeof e != "number" || e < 0 || isNaN(e))
|
|
@@ -896,14 +896,14 @@ function Ir(t, e, r, n) {
|
|
|
896
896
|
for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
|
|
897
897
|
o[s].call(r, n);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Or(t, e, r, n, i) {
|
|
900
900
|
if (e)
|
|
901
901
|
t.call(r, n, i);
|
|
902
902
|
else
|
|
903
903
|
for (var o = t.length, s = ae(t, o), f = 0; f < o; ++f)
|
|
904
904
|
s[f].call(r, n, i);
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Cr(t, e, r, n, i, o) {
|
|
907
907
|
if (e)
|
|
908
908
|
t.call(r, n, i, o);
|
|
909
909
|
else
|
|
@@ -946,10 +946,10 @@ m.prototype.emit = function(e) {
|
|
|
946
946
|
Ir(n, c, this, arguments[1]);
|
|
947
947
|
break;
|
|
948
948
|
case 3:
|
|
949
|
-
|
|
949
|
+
Or(n, c, this, arguments[1], arguments[2]);
|
|
950
950
|
break;
|
|
951
951
|
case 4:
|
|
952
|
-
|
|
952
|
+
Cr(n, c, this, arguments[1], arguments[2], arguments[3]);
|
|
953
953
|
break;
|
|
954
954
|
// slower
|
|
955
955
|
default:
|
|
@@ -1055,10 +1055,10 @@ m.prototype.listeners = function(e) {
|
|
|
1055
1055
|
return i ? (r = i[e], r ? typeof r == "function" ? n = [r.listener || r] : n = Nr(r) : n = []) : n = [], n;
|
|
1056
1056
|
};
|
|
1057
1057
|
m.listenerCount = function(t, e) {
|
|
1058
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
1058
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Ot.call(t, e);
|
|
1059
1059
|
};
|
|
1060
|
-
m.prototype.listenerCount =
|
|
1061
|
-
function
|
|
1060
|
+
m.prototype.listenerCount = Ot;
|
|
1061
|
+
function Ot(t) {
|
|
1062
1062
|
var e = this._events;
|
|
1063
1063
|
if (e) {
|
|
1064
1064
|
var r = e[t];
|
|
@@ -1087,19 +1087,19 @@ function Nr(t) {
|
|
|
1087
1087
|
e[r] = t[r].listener || t[r];
|
|
1088
1088
|
return e;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function Ct() {
|
|
1091
1091
|
throw new Error("setTimeout has not been defined");
|
|
1092
1092
|
}
|
|
1093
1093
|
function Tt() {
|
|
1094
1094
|
throw new Error("clearTimeout has not been defined");
|
|
1095
1095
|
}
|
|
1096
|
-
var Y =
|
|
1096
|
+
var Y = Ct, W = Tt;
|
|
1097
1097
|
typeof ie.setTimeout == "function" && (Y = setTimeout);
|
|
1098
1098
|
typeof ie.clearTimeout == "function" && (W = clearTimeout);
|
|
1099
1099
|
function At(t) {
|
|
1100
1100
|
if (Y === setTimeout)
|
|
1101
1101
|
return setTimeout(t, 0);
|
|
1102
|
-
if ((Y ===
|
|
1102
|
+
if ((Y === Ct || !Y) && setTimeout)
|
|
1103
1103
|
return Y = setTimeout, setTimeout(t, 0);
|
|
1104
1104
|
try {
|
|
1105
1105
|
return Y(t, 0);
|
|
@@ -1221,10 +1221,10 @@ function Dt(t, e) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return n;
|
|
1223
1223
|
}
|
|
1224
|
-
var pe = {},
|
|
1224
|
+
var pe = {}, Ce;
|
|
1225
1225
|
function kr(t) {
|
|
1226
|
-
if (H(
|
|
1227
|
-
if (new RegExp("\\b" + t + "\\b", "i").test(
|
|
1226
|
+
if (H(Ce) && (Ce = ge.env.NODE_DEBUG || ""), t = t.toUpperCase(), !pe[t])
|
|
1227
|
+
if (new RegExp("\\b" + t + "\\b", "i").test(Ce)) {
|
|
1228
1228
|
var e = 0;
|
|
1229
1229
|
pe[t] = function() {
|
|
1230
1230
|
var r = Ur.apply(null, arguments);
|
|
@@ -1974,7 +1974,7 @@ T.prototype._write = function(t, e, r) {
|
|
|
1974
1974
|
T.prototype._writev = null;
|
|
1975
1975
|
T.prototype.end = function(t, e, r) {
|
|
1976
1976
|
var n = this._writableState;
|
|
1977
|
-
typeof t == "function" ? (r = t, t = null, e = null) : typeof e == "function" && (r = e, e = null), t != null && this.write(t, e), n.corked && (n.corked = 1, this.uncork()), !n.ending && !n.finished &&
|
|
1977
|
+
typeof t == "function" ? (r = t, t = null, e = null) : typeof e == "function" && (r = e, e = null), t != null && this.write(t, e), n.corked && (n.corked = 1, this.uncork()), !n.ending && !n.finished && On(this, n, r);
|
|
1978
1978
|
};
|
|
1979
1979
|
function jt(t) {
|
|
1980
1980
|
return t.ending && t.length === 0 && t.bufferedRequest === null && !t.finished && !t.writing;
|
|
@@ -1986,7 +1986,7 @@ function qt(t, e) {
|
|
|
1986
1986
|
var r = jt(e);
|
|
1987
1987
|
return r && (e.pendingcb === 0 ? (nt(t, e), e.finished = !0, t.emit("finish")) : nt(t, e)), r;
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function On(t, e, r) {
|
|
1990
1990
|
e.ending = !0, qt(t, e), r && (e.finished ? B(r) : t.once("finish", r)), e.ended = !0, t.writable = !1;
|
|
1991
1991
|
}
|
|
1992
1992
|
function zt(t) {
|
|
@@ -2008,9 +2008,9 @@ for (var Fe = 0; Fe < it.length; Fe++) {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
function M(t) {
|
|
2010
2010
|
if (!(this instanceof M)) return new M(t);
|
|
2011
|
-
x.call(this, t), T.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end",
|
|
2011
|
+
x.call(this, t), T.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Cn);
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function Cn() {
|
|
2014
2014
|
this.allowHalfOpen || this._writableState.ended || B(Tn, this);
|
|
2015
2015
|
}
|
|
2016
2016
|
function Tn(t) {
|
|
@@ -2725,8 +2725,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2725
2725
|
...this.original_options,
|
|
2726
2726
|
encoding: R
|
|
2727
2727
|
});
|
|
2728
|
-
for (const
|
|
2729
|
-
this.options[
|
|
2728
|
+
for (const O in ce)
|
|
2729
|
+
this.options[O] = ce[O];
|
|
2730
2730
|
({ comment: y, escape: A, quote: U } = this.options);
|
|
2731
2731
|
break;
|
|
2732
2732
|
}
|
|
@@ -2759,14 +2759,14 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2759
2759
|
}
|
|
2760
2760
|
if (this.state.commenting === !1 && this.__isQuote(b, d))
|
|
2761
2761
|
if (this.state.quoting === !0) {
|
|
2762
|
-
const
|
|
2762
|
+
const O = b[d + U.length], Z = g && this.__isCharTrimable(b, d + U.length), j = y !== null && this.__compareBytes(y, b, d + U.length, O), X = this.__isDelimiter(
|
|
2763
2763
|
b,
|
|
2764
2764
|
d + U.length,
|
|
2765
|
-
|
|
2766
|
-
), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(b, d + U.length) : this.__isRecordDelimiter(
|
|
2765
|
+
O
|
|
2766
|
+
), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(b, d + U.length) : this.__isRecordDelimiter(O, b, d + U.length);
|
|
2767
2767
|
if (A !== null && this.__isEscape(b, d, R) && this.__isQuote(b, d + A.length))
|
|
2768
2768
|
d += A.length - 1;
|
|
2769
|
-
else if (!
|
|
2769
|
+
else if (!O || X || de || j || Z) {
|
|
2770
2770
|
this.state.quoting = !1, this.state.wasQuoting = !0, d += U.length - 1;
|
|
2771
2771
|
continue;
|
|
2772
2772
|
} else if (I === !1) {
|
|
@@ -2775,7 +2775,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2775
2775
|
"CSV_INVALID_CLOSING_QUOTE",
|
|
2776
2776
|
[
|
|
2777
2777
|
"Invalid Closing Quote:",
|
|
2778
|
-
`got "${String.fromCharCode(
|
|
2778
|
+
`got "${String.fromCharCode(O)}"`,
|
|
2779
2779
|
`at line ${this.info.lines}`,
|
|
2780
2780
|
"instead of delimiter, record delimiter, trimable character",
|
|
2781
2781
|
"(if activated) or comment"
|
|
@@ -2789,18 +2789,18 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2789
2789
|
this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(U), d += U.length - 1;
|
|
2790
2790
|
} else if (this.state.field.length !== 0) {
|
|
2791
2791
|
if (I === !1) {
|
|
2792
|
-
const
|
|
2792
|
+
const O = this.__infoField(), Z = Object.keys(re).map(
|
|
2793
2793
|
(X) => re[X].equals(this.state.field.toString()) ? X : !1
|
|
2794
2794
|
).filter(Boolean)[0], j = this.__error(
|
|
2795
2795
|
new _(
|
|
2796
2796
|
"INVALID_OPENING_QUOTE",
|
|
2797
2797
|
[
|
|
2798
2798
|
"Invalid Opening Quote:",
|
|
2799
|
-
`a quote is found on field ${JSON.stringify(
|
|
2799
|
+
`a quote is found on field ${JSON.stringify(O.column)} at line ${O.lines}, value is ${JSON.stringify(this.state.field.toString(l))}`,
|
|
2800
2800
|
Z ? `(${Z} bom)` : void 0
|
|
2801
2801
|
],
|
|
2802
2802
|
this.options,
|
|
2803
|
-
|
|
2803
|
+
O,
|
|
2804
2804
|
{
|
|
2805
2805
|
field: this.state.field
|
|
2806
2806
|
}
|
|
@@ -2813,27 +2813,27 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2813
2813
|
continue;
|
|
2814
2814
|
}
|
|
2815
2815
|
if (this.state.quoting === !1) {
|
|
2816
|
-
const
|
|
2816
|
+
const O = this.__isRecordDelimiter(
|
|
2817
2817
|
R,
|
|
2818
2818
|
b,
|
|
2819
2819
|
d
|
|
2820
2820
|
);
|
|
2821
|
-
if (
|
|
2821
|
+
if (O !== 0) {
|
|
2822
2822
|
if (this.state.commenting && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0)
|
|
2823
2823
|
this.info.comment_lines++;
|
|
2824
2824
|
else {
|
|
2825
2825
|
if (this.state.enabled === !1 && this.info.lines + (this.state.wasRowDelimiter === !0 ? 1 : 0) >= h) {
|
|
2826
|
-
this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d +=
|
|
2826
|
+
this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += O - 1;
|
|
2827
2827
|
continue;
|
|
2828
2828
|
}
|
|
2829
2829
|
if (D === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
|
|
2830
|
-
this.info.empty_lines++, d +=
|
|
2830
|
+
this.info.empty_lines++, d += O - 1;
|
|
2831
2831
|
continue;
|
|
2832
2832
|
}
|
|
2833
2833
|
this.info.bytes = this.state.bufBytesStart + d;
|
|
2834
2834
|
const X = this.__onField();
|
|
2835
2835
|
if (X !== void 0) return X;
|
|
2836
|
-
this.info.bytes = this.state.bufBytesStart + d +
|
|
2836
|
+
this.info.bytes = this.state.bufBytesStart + d + O;
|
|
2837
2837
|
const de = this.__onRecord(o);
|
|
2838
2838
|
if (de !== void 0) return de;
|
|
2839
2839
|
if (S !== -1 && this.info.records >= S) {
|
|
@@ -2841,7 +2841,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
|
|
|
2841
2841
|
return;
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
this.state.commenting = !1, d +=
|
|
2844
|
+
this.state.commenting = !1, d += O - 1;
|
|
2845
2845
|
continue;
|
|
2846
2846
|
}
|
|
2847
2847
|
if (this.state.commenting)
|
|
@@ -3384,28 +3384,35 @@ class Gn {
|
|
|
3384
3384
|
return new Promise((o, s) => {
|
|
3385
3385
|
let f, u, l, h = !1;
|
|
3386
3386
|
const c = (p) => {
|
|
3387
|
-
console.log(
|
|
3387
|
+
if (console.log(1111, p), !h) {
|
|
3388
|
+
h = !0, i.signal.aborted || i.abort(p instanceof Error ? p : new Error("Parser aborted due to an unknown error."));
|
|
3389
|
+
try {
|
|
3390
|
+
u?.cancel();
|
|
3391
|
+
} catch {
|
|
3392
|
+
}
|
|
3393
|
+
console.log(2222, p), s(p);
|
|
3394
|
+
}
|
|
3388
3395
|
};
|
|
3389
3396
|
(async () => {
|
|
3390
|
-
|
|
3397
|
+
f = ut(e), l = this.constructRowBuffer({ chunk: r.chunk, chunkSize: r.chunkSize ?? Qn }), f.on("readable", () => {
|
|
3391
3398
|
try {
|
|
3392
3399
|
if (f == null || l == null) return;
|
|
3393
3400
|
let g;
|
|
3394
3401
|
for (; (g = f.read()) != null; )
|
|
3395
|
-
i.throwIfAborted(), l.push(g);
|
|
3402
|
+
i.signal.throwIfAborted(), l.push(g);
|
|
3396
3403
|
} catch (g) {
|
|
3397
3404
|
c(g);
|
|
3398
3405
|
}
|
|
3399
3406
|
}), f.on("error", (g) => c(g)), f.on("end", () => {
|
|
3400
|
-
h || (l?.flush(), console.log(
|
|
3407
|
+
h || (l?.flush(), console.log(3333, this.constructSummary(f)), o(this.constructSummary(f)));
|
|
3401
3408
|
});
|
|
3402
|
-
const p = await fetch(encodeURI(n), { signal: i });
|
|
3409
|
+
const p = await fetch(encodeURI(n), { signal: i.signal });
|
|
3403
3410
|
if (!p.ok || p.body == null)
|
|
3404
3411
|
throw await Yn(p, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
|
|
3405
3412
|
u = p.body.pipeThrough(new TextDecoderStream(r.encodingId)).getReader();
|
|
3406
3413
|
let I = await u.read();
|
|
3407
3414
|
for (; !I.done; )
|
|
3408
|
-
i.throwIfAborted(), await this.writeToParser(f, I.value), I = await u.read();
|
|
3415
|
+
i.signal.throwIfAborted(), await this.writeToParser(f, I.value), I = await u.read();
|
|
3409
3416
|
f.end();
|
|
3410
3417
|
})().catch((p) => c(p));
|
|
3411
3418
|
});
|
|
@@ -5,7 +5,7 @@ declare class Tool {
|
|
|
5
5
|
/** Build parser. */
|
|
6
6
|
buildParser(options: ParseOptions): Parser;
|
|
7
7
|
/** Parse stream. */
|
|
8
|
-
parseStream(parseOptions: ParseOptions, retrieveRecordsOptions: RetrieveRecordsOptions, url: string,
|
|
8
|
+
parseStream(parseOptions: ParseOptions, retrieveRecordsOptions: RetrieveRecordsOptions, url: string, abortController: AbortController): Promise<RetrieveRecordsSummary>;
|
|
9
9
|
/** Parse string. */
|
|
10
10
|
parseString(): void;
|
|
11
11
|
/** Construct row buffer. */
|