@datapos/datapos-tool-csv-parse 0.0.94 → 0.0.96
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.
|
@@ -3431,6 +3431,7 @@ class ri {
|
|
|
3431
3431
|
};
|
|
3432
3432
|
(async () => {
|
|
3433
3433
|
a = je({
|
|
3434
|
+
// ...DEFAULT_OPTIONS,
|
|
3434
3435
|
...r,
|
|
3435
3436
|
cast: (R, F) => ({ value: R, wasValueQuoted: F.quoting })
|
|
3436
3437
|
}), h = ei({ chunk: o, chunkSize: e.chunkSize ?? Gn }), a.on("readable", () => {
|
|
@@ -3479,6 +3480,7 @@ async function Kn(t, e) {
|
|
|
3479
3480
|
try {
|
|
3480
3481
|
let f = 0, a, l = 0, h = 0;
|
|
3481
3482
|
const c = je({
|
|
3483
|
+
// ...DEFAULT_OPTIONS,
|
|
3482
3484
|
cast: (d, p) => ({ value: d, wasValueQuoted: p.quoting }),
|
|
3483
3485
|
delimiter: s,
|
|
3484
3486
|
relax_column_count: !0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Options
|
|
1
|
+
import { Options, Parser } from 'csv-parse/browser/esm';
|
|
2
2
|
import { EngineUtilities } from '@datapos/datapos-shared/engine';
|
|
3
3
|
import { ConnectionColumnConfig, RetrieveRecordsOptions, RetrieveRecordsSummary } from '@datapos/datapos-shared/component/connector';
|
|
4
4
|
import { InferenceRecord, ParsingRecord, RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared/component/dataView';
|
|
@@ -15,7 +15,7 @@ interface SchemaConfig {
|
|
|
15
15
|
/** Tool. */
|
|
16
16
|
declare class Tool {
|
|
17
17
|
/** Build parser. */
|
|
18
|
-
buildParser(options:
|
|
18
|
+
buildParser(options: Options): Parser;
|
|
19
19
|
/**
|
|
20
20
|
* Infer schema.
|
|
21
21
|
*/
|
|
@@ -23,7 +23,7 @@ declare class Tool {
|
|
|
23
23
|
/**
|
|
24
24
|
* Parse stream.
|
|
25
25
|
*/
|
|
26
|
-
parseStream(retrieveRecordsOptions: RetrieveRecordsOptions, parseOptions:
|
|
26
|
+
parseStream(retrieveRecordsOptions: RetrieveRecordsOptions, parseOptions: Options, url: string, abortController: AbortController, chunk: (records: ParsingRecord[]) => void): Promise<RetrieveRecordsSummary>;
|
|
27
27
|
}
|
|
28
|
-
export type { Options
|
|
28
|
+
export type { Options, Parser } from 'csv-parse/browser/esm';
|
|
29
29
|
export { Tool };
|