@datapos/datapos-tool-csv-parse 0.0.54 → 0.0.56

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.
@@ -3394,7 +3394,7 @@ class Zn {
3394
3394
  c || (c = !0, y(), i.signal.aborted || i.abort(x), f(x));
3395
3395
  };
3396
3396
  i.signal.addEventListener("abort", y, { once: !0 }), (async () => {
3397
- u = ut(e), h = this.constructRowBuffer({ chunk: o, chunkSize: r.chunkSize ?? Hn }), u.on("readable", () => {
3397
+ u = ut(r), h = this.constructRowBuffer({ chunk: o, chunkSize: e.chunkSize ?? Hn }), u.on("readable", () => {
3398
3398
  try {
3399
3399
  if (u == null || h == null) return;
3400
3400
  let R;
@@ -3412,7 +3412,7 @@ class Zn {
3412
3412
  if (!x.ok || x.body == null)
3413
3413
  throw await Yn(x, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
3414
3414
  l = x.body.getReader();
3415
- const S = new TextDecoder(r.encodingId);
3415
+ const S = new TextDecoder(e.encodingId);
3416
3416
  let w = await l.read();
3417
3417
  for (; !w.done; ) {
3418
3418
  if (c) return;
@@ -3445,7 +3445,7 @@ class Zn {
3445
3445
  const l = n.pop();
3446
3446
  if (l != null)
3447
3447
  return l.length = 0, l;
3448
- const h = new Array(r);
3448
+ const h = Array.from({ length: r });
3449
3449
  return h.length = 0, h;
3450
3450
  }
3451
3451
  }
@@ -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, abortController: AbortController, chunk: (records: (string[] | Record<string, unknown>)[]) => void): Promise<RetrieveRecordsSummary>;
8
+ parseStream(retrieveRecordsOptions: RetrieveRecordsOptions, parseOptions: ParseOptions, url: string, abortController: AbortController, chunk: (records: (string[] | Record<string, unknown>)[]) => void): Promise<RetrieveRecordsSummary>;
9
9
  /** Parse string. */
10
10
  parseString(): void;
11
11
  /** Construct row buffer. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-tool-csv-parse",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "private": false,