@datapos/datapos-tool-csv-parse 0.0.78 → 0.0.80
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.
|
@@ -3389,12 +3389,10 @@ class ri {
|
|
|
3389
3389
|
* Determine schema configuration.
|
|
3390
3390
|
*/
|
|
3391
3391
|
async determineSchemaConfig(e, r, n) {
|
|
3392
|
-
const i = Xn(r), { records: o, valueDelimiterId: s } = await Kn(r, n);
|
|
3393
|
-
console.log(3333, o);
|
|
3394
|
-
const f = [], a = [];
|
|
3392
|
+
const i = Xn(r), { records: o, valueDelimiterId: s } = await Kn(r, n), f = [], a = [];
|
|
3395
3393
|
for (const l of o) {
|
|
3396
3394
|
const c = e.parseRecord(a, l, !0);
|
|
3397
|
-
|
|
3395
|
+
f.push(c);
|
|
3398
3396
|
}
|
|
3399
3397
|
return {
|
|
3400
3398
|
recordDelimiterId: i,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Options as ParseOptions, Parser } from 'csv-parse/browser/esm';
|
|
2
2
|
import { EngineUtilities } from '@datapos/datapos-shared/engine';
|
|
3
3
|
import { RetrieveRecordsOptions, RetrieveRecordsSummary } from '@datapos/datapos-shared/component/connector';
|
|
4
|
-
import { RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared/component/dataView';
|
|
4
|
+
import { ParseResult, RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared/component/dataView';
|
|
5
5
|
type StreamParsedRecord = string[];
|
|
6
6
|
/**
|
|
7
7
|
* Schema configuration.
|
|
8
8
|
*/
|
|
9
9
|
interface SchemaConfig {
|
|
10
10
|
recordDelimiterId: RecordDelimiterId;
|
|
11
|
-
records:
|
|
11
|
+
records: ParseResult[][];
|
|
12
12
|
valueDelimiterId: ValueDelimiterId;
|
|
13
13
|
}
|
|
14
14
|
/** Tool. */
|