@datapos/datapos-tool-csv-parse 0.0.75 → 0.0.76

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 @@ u.prototype.slice = function(e, r) {
532
532
  }
533
533
  return i;
534
534
  };
535
- function L(t, e, r) {
535
+ function T(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
  u.prototype.readUIntLE = function(e, r, n) {
540
- e = e | 0, r = r | 0, n || L(e, r, this.length);
540
+ e = e | 0, r = r | 0, n || T(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
  u.prototype.readUIntBE = function(e, r, n) {
546
- e = e | 0, r = r | 0, n || L(e, r, this.length);
546
+ e = e | 0, r = r | 0, n || T(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
  u.prototype.readUInt8 = function(e, r) {
552
- return r || L(e, 1, this.length), this[e];
552
+ return r || T(e, 1, this.length), this[e];
553
553
  };
554
554
  u.prototype.readUInt16LE = function(e, r) {
555
- return r || L(e, 2, this.length), this[e] | this[e + 1] << 8;
555
+ return r || T(e, 2, this.length), this[e] | this[e + 1] << 8;
556
556
  };
557
557
  u.prototype.readUInt16BE = function(e, r) {
558
- return r || L(e, 2, this.length), this[e] << 8 | this[e + 1];
558
+ return r || T(e, 2, this.length), this[e] << 8 | this[e + 1];
559
559
  };
560
560
  u.prototype.readUInt32LE = function(e, r) {
561
- return r || L(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
561
+ return r || T(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
562
562
  };
563
563
  u.prototype.readUInt32BE = function(e, r) {
564
- return r || L(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
564
+ return r || T(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
565
565
  };
566
566
  u.prototype.readIntLE = function(e, r, n) {
567
- e = e | 0, r = r | 0, n || L(e, r, this.length);
567
+ e = e | 0, r = r | 0, n || T(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
  u.prototype.readIntBE = function(e, r, n) {
573
- e = e | 0, r = r | 0, n || L(e, r, this.length);
573
+ e = e | 0, r = r | 0, n || T(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
  u.prototype.readInt8 = function(e, r) {
579
- return r || L(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
579
+ return r || T(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
580
580
  };
581
581
  u.prototype.readInt16LE = function(e, r) {
582
- r || L(e, 2, this.length);
582
+ r || T(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
  u.prototype.readInt16BE = function(e, r) {
587
- r || L(e, 2, this.length);
587
+ r || T(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
  u.prototype.readInt32LE = function(e, r) {
592
- return r || L(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
592
+ return r || T(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
593
593
  };
594
594
  u.prototype.readInt32BE = function(e, r) {
595
- return r || L(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
595
+ return r || T(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
596
596
  };
597
597
  u.prototype.readFloatLE = function(e, r) {
598
- return r || L(e, 4, this.length), ve(this, e, !0, 23, 4);
598
+ return r || T(e, 4, this.length), ve(this, e, !0, 23, 4);
599
599
  };
600
600
  u.prototype.readFloatBE = function(e, r) {
601
- return r || L(e, 4, this.length), ve(this, e, !1, 23, 4);
601
+ return r || T(e, 4, this.length), ve(this, e, !1, 23, 4);
602
602
  };
603
603
  u.prototype.readDoubleLE = function(e, r) {
604
- return r || L(e, 8, this.length), ve(this, e, !0, 52, 8);
604
+ return r || T(e, 8, this.length), ve(this, e, !0, 52, 8);
605
605
  };
606
606
  u.prototype.readDoubleBE = function(e, r) {
607
- return r || L(e, 8, this.length), ve(this, e, !1, 52, 8);
607
+ return r || T(e, 8, this.length), ve(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');
@@ -910,7 +910,7 @@ function Ar(t, e, r, n, i, o) {
910
910
  for (var s = t.length, f = ae(t, s), a = 0; a < s; ++a)
911
911
  f[a].call(r, n, i, o);
912
912
  }
913
- function Lr(t, e, r, n) {
913
+ function Tr(t, e, r, n) {
914
914
  if (e)
915
915
  t.apply(r, n);
916
916
  else
@@ -955,7 +955,7 @@ m.prototype.emit = function(e) {
955
955
  default:
956
956
  for (o = new Array(i - 1), s = 1; s < i; s++)
957
957
  o[s - 1] = arguments[s];
958
- Lr(n, c, this, o);
958
+ Tr(n, c, this, o);
959
959
  }
960
960
  return !0;
961
961
  };
@@ -972,11 +972,11 @@ function It(t, e, r, n) {
972
972
  else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), !s.warned && (i = Rt(t), i && i > 0 && s.length > i)) {
973
973
  s.warned = !0;
974
974
  var f = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + e + " listeners added. Use emitter.setMaxListeners() to increase limit");
975
- f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = s.length, Tr(f);
975
+ f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = s.length, Lr(f);
976
976
  }
977
977
  return t;
978
978
  }
979
- function Tr(t) {
979
+ function Lr(t) {
980
980
  typeof console.warn == "function" ? console.warn(t) : console.log(t);
981
981
  }
982
982
  m.prototype.addListener = function(e, r) {
@@ -1090,13 +1090,13 @@ function Nr(t) {
1090
1090
  function At() {
1091
1091
  throw new Error("setTimeout has not been defined");
1092
1092
  }
1093
- function Lt() {
1093
+ function Tt() {
1094
1094
  throw new Error("clearTimeout has not been defined");
1095
1095
  }
1096
- var Y = At, W = Lt;
1096
+ var Y = At, W = Tt;
1097
1097
  typeof ie.setTimeout == "function" && (Y = setTimeout);
1098
1098
  typeof ie.clearTimeout == "function" && (W = clearTimeout);
1099
- function Tt(t) {
1099
+ function Lt(t) {
1100
1100
  if (Y === setTimeout)
1101
1101
  return setTimeout(t, 0);
1102
1102
  if ((Y === At || !Y) && setTimeout)
@@ -1114,7 +1114,7 @@ function Tt(t) {
1114
1114
  function Fr(t) {
1115
1115
  if (W === clearTimeout)
1116
1116
  return clearTimeout(t);
1117
- if ((W === Lt || !W) && clearTimeout)
1117
+ if ((W === Tt || !W) && clearTimeout)
1118
1118
  return W = clearTimeout, clearTimeout(t);
1119
1119
  try {
1120
1120
  return W(t);
@@ -1132,7 +1132,7 @@ function Mr() {
1132
1132
  }
1133
1133
  function Dt() {
1134
1134
  if (!ne) {
1135
- var t = Tt(Mr);
1135
+ var t = Lt(Mr);
1136
1136
  ne = !0;
1137
1137
  for (var e = z.length; e; ) {
1138
1138
  for (ee = z, z = []; ++me < e; )
@@ -1147,7 +1147,7 @@ function B(t) {
1147
1147
  if (arguments.length > 1)
1148
1148
  for (var r = 1; r < arguments.length; r++)
1149
1149
  e[r - 1] = arguments[r];
1150
- z.push(new Nt(t, e)), z.length === 1 && !ne && Tt(Dt);
1150
+ z.push(new Nt(t, e)), z.length === 1 && !ne && Lt(Dt);
1151
1151
  }
1152
1152
  function Nt(t, e) {
1153
1153
  this.fun = t, this.array = e;
@@ -1292,18 +1292,18 @@ function ye(t, e, r) {
1292
1292
  if (i)
1293
1293
  return i;
1294
1294
  var o = Object.keys(e), s = qr(o);
1295
- if (t.showHidden && (o = Object.getOwnPropertyNames(e)), Te(e) && (o.indexOf("message") >= 0 || o.indexOf("description") >= 0))
1295
+ if (t.showHidden && (o = Object.getOwnPropertyNames(e)), Le(e) && (o.indexOf("message") >= 0 || o.indexOf("description") >= 0))
1296
1296
  return Ae(e);
1297
1297
  if (o.length === 0) {
1298
1298
  if (De(e)) {
1299
1299
  var f = e.name ? ": " + e.name : "";
1300
1300
  return t.stylize("[Function" + f + "]", "special");
1301
1301
  }
1302
- if (Le(e))
1302
+ if (Te(e))
1303
1303
  return t.stylize(RegExp.prototype.toString.call(e), "regexp");
1304
1304
  if (et(e))
1305
1305
  return t.stylize(Date.prototype.toString.call(e), "date");
1306
- if (Te(e))
1306
+ if (Le(e))
1307
1307
  return Ae(e);
1308
1308
  }
1309
1309
  var a = "", l = !1, h = ["{", "}"];
@@ -1311,10 +1311,10 @@ function ye(t, e, r) {
1311
1311
  var c = e.name ? ": " + e.name : "";
1312
1312
  a = " [Function" + c + "]";
1313
1313
  }
1314
- if (Le(e) && (a = " " + RegExp.prototype.toString.call(e)), et(e) && (a = " " + Date.prototype.toUTCString.call(e)), Te(e) && (a = " " + Ae(e)), o.length === 0 && (!l || e.length == 0))
1314
+ if (Te(e) && (a = " " + RegExp.prototype.toString.call(e)), et(e) && (a = " " + Date.prototype.toUTCString.call(e)), Le(e) && (a = " " + Ae(e)), o.length === 0 && (!l || e.length == 0))
1315
1315
  return h[0] + a + h[1];
1316
1316
  if (r < 0)
1317
- return Le(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
1317
+ return Te(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
1318
1318
  t.seen.push(e);
1319
1319
  var p;
1320
1320
  return l ? p = Vr(t, e, r, s, o) : p = o.map(function(g) {
@@ -1405,7 +1405,7 @@ function Ye(t) {
1405
1405
  function Q(t) {
1406
1406
  return t === void 0;
1407
1407
  }
1408
- function Le(t) {
1408
+ function Te(t) {
1409
1409
  return ue(t) && We(t) === "[object RegExp]";
1410
1410
  }
1411
1411
  function ue(t) {
@@ -1414,7 +1414,7 @@ function ue(t) {
1414
1414
  function et(t) {
1415
1415
  return ue(t) && We(t) === "[object Date]";
1416
1416
  }
1417
- function Te(t) {
1417
+ function Le(t) {
1418
1418
  return ue(t) && (We(t) === "[object Error]" || t instanceof Error);
1419
1419
  }
1420
1420
  function De(t) {
@@ -1855,8 +1855,8 @@ function $t(t, e) {
1855
1855
  if (t[r] === e) return r;
1856
1856
  return -1;
1857
1857
  }
1858
- T.WritableState = He;
1859
- oe(T, m);
1858
+ L.WritableState = He;
1859
+ oe(L, m);
1860
1860
  function wn() {
1861
1861
  }
1862
1862
  function yn(t, e, r) {
@@ -1880,11 +1880,11 @@ He.prototype.getBuffer = function() {
1880
1880
  r.push(e), e = e.next;
1881
1881
  return r;
1882
1882
  };
1883
- function T(t) {
1884
- if (!(this instanceof T) && !(this instanceof M)) return new T(t);
1883
+ function L(t) {
1884
+ if (!(this instanceof L) && !(this instanceof M)) return new L(t);
1885
1885
  this._writableState = new He(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), m.call(this);
1886
1886
  }
1887
- T.prototype.pipe = function() {
1887
+ L.prototype.pipe = function() {
1888
1888
  this.emit("error", new Error("Cannot pipe, not readable"));
1889
1889
  };
1890
1890
  function vn(t, e) {
@@ -1895,19 +1895,19 @@ function bn(t, e, r, n) {
1895
1895
  var i = !0, o = !1;
1896
1896
  return r === null ? o = new TypeError("May not write null values to stream") : !u.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o), B(n, o), i = !1), i;
1897
1897
  }
1898
- T.prototype.write = function(t, e, r) {
1898
+ L.prototype.write = function(t, e, r) {
1899
1899
  var n = this._writableState, i = !1;
1900
1900
  return typeof e == "function" && (r = e, e = null), u.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = wn), n.ended ? vn(this, r) : bn(this, n, t, r) && (n.pendingcb++, i = xn(this, n, t, e, r)), i;
1901
1901
  };
1902
- T.prototype.cork = function() {
1902
+ L.prototype.cork = function() {
1903
1903
  var t = this._writableState;
1904
1904
  t.corked++;
1905
1905
  };
1906
- T.prototype.uncork = function() {
1906
+ L.prototype.uncork = function() {
1907
1907
  var t = this._writableState;
1908
1908
  t.corked && (t.corked--, !t.writing && !t.corked && !t.finished && !t.bufferProcessing && t.bufferedRequest && jt(this, t));
1909
1909
  };
1910
- T.prototype.setDefaultEncoding = function(e) {
1910
+ L.prototype.setDefaultEncoding = function(e) {
1911
1911
  if (typeof e == "string" && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + e);
1912
1912
  return this._writableState.defaultEncoding = e, this;
1913
1913
  };
@@ -1968,11 +1968,11 @@ function jt(t, e) {
1968
1968
  }
1969
1969
  e.bufferedRequestCount = 0, e.bufferedRequest = r, e.bufferProcessing = !1;
1970
1970
  }
1971
- T.prototype._write = function(t, e, r) {
1971
+ L.prototype._write = function(t, e, r) {
1972
1972
  r(new Error("not implemented"));
1973
1973
  };
1974
- T.prototype._writev = null;
1975
- T.prototype.end = function(t, e, r) {
1974
+ L.prototype._writev = null;
1975
+ L.prototype.end = function(t, e, r) {
1976
1976
  var n = this._writableState;
1977
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
  };
@@ -2001,23 +2001,23 @@ function Vt(t) {
2001
2001
  };
2002
2002
  }
2003
2003
  oe(M, C);
2004
- var st = Object.keys(T.prototype);
2004
+ var st = Object.keys(L.prototype);
2005
2005
  for (var Fe = 0; Fe < st.length; Fe++) {
2006
2006
  var Me = st[Fe];
2007
- M.prototype[Me] || (M.prototype[Me] = T.prototype[Me]);
2007
+ M.prototype[Me] || (M.prototype[Me] = L.prototype[Me]);
2008
2008
  }
2009
2009
  function M(t) {
2010
2010
  if (!(this instanceof M)) return new M(t);
2011
- C.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", An);
2011
+ C.call(this, t), L.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", An);
2012
2012
  }
2013
2013
  function An() {
2014
- this.allowHalfOpen || this._writableState.ended || B(Ln, this);
2014
+ this.allowHalfOpen || this._writableState.ended || B(Tn, this);
2015
2015
  }
2016
- function Ln(t) {
2016
+ function Tn(t) {
2017
2017
  t.end();
2018
2018
  }
2019
2019
  oe(k, M);
2020
- function Tn(t) {
2020
+ function Ln(t) {
2021
2021
  this.afterTransform = function(e, r) {
2022
2022
  return Dn(t, e, r);
2023
2023
  }, this.needTransform = !1, this.transforming = !1, this.writecb = null, this.writechunk = null, this.writeencoding = null;
@@ -2033,7 +2033,7 @@ function Dn(t, e, r) {
2033
2033
  }
2034
2034
  function k(t) {
2035
2035
  if (!(this instanceof k)) return new k(t);
2036
- M.call(this, t), this._transformState = new Tn(this);
2036
+ M.call(this, t), this._transformState = new Ln(this);
2037
2037
  var e = this;
2038
2038
  this._readableState.needReadable = !0, this._readableState.sync = !1, t && (typeof t.transform == "function" && (this._transform = t.transform), typeof t.flush == "function" && (this._flush = t.flush)), this.once("prefinish", function() {
2039
2039
  typeof this._flush == "function" ? this._flush(function(r) {
@@ -2075,7 +2075,7 @@ fe.prototype._transform = function(t, e, r) {
2075
2075
  };
2076
2076
  oe(V, m);
2077
2077
  V.Readable = C;
2078
- V.Writable = T;
2078
+ V.Writable = L;
2079
2079
  V.Duplex = M;
2080
2080
  V.Transform = k;
2081
2081
  V.PassThrough = fe;
@@ -3507,7 +3507,7 @@ function ti(t) {
3507
3507
  byteCount: t?.info.bytes ?? -1,
3508
3508
  commentLineCount: t?.info.comment_lines ?? -1,
3509
3509
  emptyLineCount: t?.info.empty_lines ?? -1,
3510
- invalidFieldLengthCount: t?.info.invalid_field_length ?? -1,
3510
+ nonUniformRecordCount: t?.info.invalid_field_length ?? -1,
3511
3511
  lineCount: t?.info.lines ?? -1,
3512
3512
  recordCount: t?.info.records ?? -1
3513
3513
  };
@@ -1,5 +1,5 @@
1
1
  import { Options as ParseOptions, Parser } from 'csv-parse/browser/esm';
2
- import { RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared';
2
+ import { RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared/component/dataView';
3
3
  import { RetrieveRecordsOptions, RetrieveRecordsSummary } from '@datapos/datapos-shared/component/connector';
4
4
  /**
5
5
  * Parse record and parsed record buffer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-tool-csv-parse",
3
- "version": "0.0.75",
3
+ "version": "0.0.76",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -26,15 +26,15 @@
26
26
  ],
27
27
  "prettier": "@datapos/datapos-development/prettierrc",
28
28
  "dependencies": {
29
- "@datapos/datapos-shared": "^0.3.412",
29
+ "@datapos/datapos-shared": "^0.3.451",
30
30
  "csv-parse": "^6.1.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@datapos/datapos-development": "^0.3.438",
34
- "@datapos/eslint-config-datapos": "^1.0.34",
34
+ "@datapos/eslint-config-datapos": "^1.0.35",
35
35
  "@types/node": "^25.0.3",
36
- "@typescript-eslint/eslint-plugin": "^8.50.1",
37
- "@typescript-eslint/parser": "^8.50.1",
36
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
37
+ "@typescript-eslint/parser": "^8.51.0",
38
38
  "eslint": "^9.39.2",
39
39
  "eslint-import-resolver-typescript": "^4.4.4",
40
40
  "eslint-plugin-import": "^2.32.0",