@contrail/cli 3.4.4-alpha.7adb62a → 3.4.4-alpha.e5b7d5d

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@contrail/loader/README.md +0 -0
  3. package/node_modules/@contrail/loader/lib/index.d.ts +941 -0
  4. package/node_modules/@contrail/loader/lib/index.js +12492 -0
  5. package/node_modules/@contrail/loader/lib/index.js.map +1 -0
  6. package/node_modules/@contrail/loader/package.json +70 -0
  7. package/node_modules/csv-parse/LICENSE +21 -0
  8. package/node_modules/csv-parse/README.md +86 -0
  9. package/node_modules/csv-parse/dist/cjs/index.cjs +1424 -0
  10. package/node_modules/csv-parse/dist/cjs/index.d.cts +283 -0
  11. package/node_modules/csv-parse/dist/cjs/sync.cjs +1336 -0
  12. package/node_modules/csv-parse/dist/cjs/sync.d.cts +11 -0
  13. package/node_modules/csv-parse/dist/esm/index.d.ts +283 -0
  14. package/node_modules/csv-parse/dist/esm/index.js +6544 -0
  15. package/node_modules/csv-parse/dist/esm/sync.d.ts +11 -0
  16. package/node_modules/csv-parse/dist/esm/sync.js +3305 -0
  17. package/node_modules/csv-parse/dist/iife/index.js +6553 -0
  18. package/node_modules/csv-parse/dist/iife/sync.js +3313 -0
  19. package/node_modules/csv-parse/dist/umd/index.js +6554 -0
  20. package/node_modules/csv-parse/dist/umd/sync.js +3314 -0
  21. package/node_modules/csv-parse/lib/api/CsvError.js +19 -0
  22. package/node_modules/csv-parse/lib/api/index.js +729 -0
  23. package/node_modules/csv-parse/lib/api/init_state.js +58 -0
  24. package/node_modules/csv-parse/lib/api/normalize_columns_array.js +33 -0
  25. package/node_modules/csv-parse/lib/api/normalize_options.js +448 -0
  26. package/node_modules/csv-parse/lib/index.d.ts +283 -0
  27. package/node_modules/csv-parse/lib/index.js +121 -0
  28. package/node_modules/csv-parse/lib/stream.js +27 -0
  29. package/node_modules/csv-parse/lib/sync.d.ts +11 -0
  30. package/node_modules/csv-parse/lib/sync.js +27 -0
  31. package/node_modules/csv-parse/lib/utils/ResizeableBuffer.js +64 -0
  32. package/node_modules/csv-parse/lib/utils/is_object.js +6 -0
  33. package/node_modules/csv-parse/lib/utils/underscore.js +8 -0
  34. package/node_modules/csv-parse/package.json +142 -0
  35. package/oclif.manifest.json +1 -1
  36. package/package.json +3 -1
@@ -0,0 +1,283 @@
1
+ // Original definitions in https://github.com/DefinitelyTyped/DefinitelyTyped by: David Muller <https://github.com/davidm77>
2
+
3
+ /// <reference types="node" />
4
+
5
+ import * as stream from "stream";
6
+
7
+ export type Callback = (err: CsvError | undefined, records: any | undefined, info: Info) => void;
8
+
9
+ export interface Parser extends stream.Transform {}
10
+
11
+ export class Parser {
12
+ constructor(options: Options);
13
+
14
+ __push(line: any): any;
15
+
16
+ __write(chars: any, end: any, callback: any): any;
17
+
18
+ readonly options: Options
19
+
20
+ readonly info: Info;
21
+ }
22
+
23
+ export interface CastingContext {
24
+ readonly column: number | string;
25
+ readonly empty_lines: number;
26
+ readonly error: CsvError;
27
+ readonly header: boolean;
28
+ readonly index: number;
29
+ readonly quoting: boolean;
30
+ readonly lines: number;
31
+ readonly records: number;
32
+ readonly invalid_field_length: number;
33
+ }
34
+
35
+ export type CastingFunction = (value: string, context: CastingContext) => any;
36
+
37
+ export type CastingDateFunction = (value: string, context: CastingContext) => Date;
38
+
39
+ export type ColumnOption = string | undefined | null | false | { name: string };
40
+
41
+ /*
42
+ Note, could not `extends stream.TransformOptions` because encoding can be
43
+ BufferEncoding and undefined as well as null which is not defined in the
44
+ extended type.
45
+ */
46
+ export interface Options {
47
+ /**
48
+ * If true, the parser will attempt to convert read data types to native types.
49
+ * @deprecated Use {@link cast}
50
+ */
51
+ auto_parse?: boolean | CastingFunction;
52
+ autoParse?: boolean | CastingFunction;
53
+ /**
54
+ * If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option.
55
+ * @deprecated Use {@link cast_date}
56
+ */
57
+ auto_parse_date?: boolean | CastingDateFunction;
58
+ autoParseDate?: boolean | CastingDateFunction;
59
+ /**
60
+ * If true, detect and exclude the byte order mark (BOM) from the CSV input if present.
61
+ */
62
+ bom?: boolean;
63
+ /**
64
+ * If true, the parser will attempt to convert input string to native types.
65
+ * If a function, receive the value as first argument, a context as second argument and return a new value. More information about the context properties is available below.
66
+ */
67
+ cast?: boolean | CastingFunction;
68
+ /**
69
+ * If true, the parser will attempt to convert input string to dates.
70
+ * If a function, receive the value as argument and return a new value. It requires the "auto_parse" option. Be careful, it relies on Date.parse.
71
+ */
72
+ cast_date?: boolean | CastingDateFunction;
73
+ castDate?: boolean | CastingDateFunction;
74
+ /**
75
+ * List of fields as an array,
76
+ * a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line,
77
+ * default to null,
78
+ * affect the result data set in the sense that records will be objects instead of arrays.
79
+ */
80
+ columns?: ColumnOption[] | boolean | ((record: any) => ColumnOption[]);
81
+ /**
82
+ * Convert values into an array of values when columns are activated and
83
+ * when multiple columns of the same name are found.
84
+ */
85
+ group_columns_by_name?: boolean;
86
+ groupColumnsByName?: boolean;
87
+ /**
88
+ * Treat all the characters after this one as a comment, default to '' (disabled).
89
+ */
90
+ comment?: string;
91
+ /**
92
+ * Restrict the definition of comments to a full line. Comment characters
93
+ * defined in the middle of the line are not interpreted as such. The
94
+ * option require the activation of comments.
95
+ */
96
+ comment_no_infix?: boolean;
97
+ /**
98
+ * Set the field delimiter. One character only, defaults to comma.
99
+ */
100
+ delimiter?: string | string[] | Buffer;
101
+ /**
102
+ * Set the source and destination encoding, a value of `null` returns buffer instead of strings.
103
+ */
104
+ encoding?: BufferEncoding | undefined;
105
+ /**
106
+ * Set the escape character, one character only, defaults to double quotes.
107
+ */
108
+ escape?: string | null | false | Buffer;
109
+ /**
110
+ * Start handling records from the requested number of records.
111
+ */
112
+ from?: number;
113
+ /**
114
+ * Start handling records from the requested line number.
115
+ */
116
+ from_line?: number;
117
+ fromLine?: number;
118
+ /**
119
+ * Don't interpret delimiters as such in the last field according to the number of fields calculated from the number of columns, the option require the presence of the `column` option when `true`.
120
+ */
121
+ ignore_last_delimiters?: boolean | number;
122
+ /**
123
+ * Generate two properties `info` and `record` where `info` is a snapshot of the info object at the time the record was created and `record` is the parsed array or object.
124
+ */
125
+ info?: boolean;
126
+ /**
127
+ * If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false.
128
+ * Does not remove whitespace in a quoted field.
129
+ */
130
+ ltrim?: boolean;
131
+ /**
132
+ * Maximum numer of characters to be contained in the field and line buffers before an exception is raised,
133
+ * used to guard against a wrong delimiter or record_delimiter,
134
+ * default to 128000 characters.
135
+ */
136
+ max_record_size?: number;
137
+ maxRecordSize?: number;
138
+ /**
139
+ * Name of header-record title to name objects by.
140
+ */
141
+ objname?: string;
142
+ /**
143
+ * Alter and filter records by executing a user defined function.
144
+ */
145
+ on_record?: (record: any, context: CastingContext) => any;
146
+ onRecord?: (record: any, context: CastingContext) => any;
147
+ /**
148
+ * Optional character surrounding a field, one character only, defaults to double quotes.
149
+ */
150
+ quote?: string | boolean | Buffer | null;
151
+ /**
152
+ * Generate two properties raw and row where raw is the original CSV row content and row is the parsed array or object.
153
+ */
154
+ raw?: boolean;
155
+ /**
156
+ * Discard inconsistent columns count, default to false.
157
+ */
158
+ relax_column_count?: boolean;
159
+ relaxColumnCount?: boolean;
160
+ /**
161
+ * Discard inconsistent columns count when the record contains less fields than expected, default to false.
162
+ */
163
+ relax_column_count_less?: boolean;
164
+ relaxColumnCountLess?: boolean;
165
+ /**
166
+ * Discard inconsistent columns count when the record contains more fields than expected, default to false.
167
+ */
168
+ relax_column_count_more?: boolean;
169
+ relaxColumnCountMore?: boolean;
170
+ /**
171
+ * Preserve quotes inside unquoted field.
172
+ */
173
+ relax_quotes?: boolean;
174
+ relaxQuotes?: boolean;
175
+ /**
176
+ * One or multiple characters used to delimit record rows; defaults to auto discovery if not provided.
177
+ * Supported auto discovery method are Linux ("\n"), Apple ("\r") and Windows ("\r\n") row delimiters.
178
+ */
179
+ record_delimiter?: string | string[] | Buffer | Buffer[];
180
+ recordDelimiter?: string | string[] | Buffer | Buffer[];
181
+ /**
182
+ * If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false.
183
+ * Does not remove whitespace in a quoted field.
184
+ */
185
+ rtrim?: boolean;
186
+ /**
187
+ * Dont generate empty values for empty lines.
188
+ * Defaults to false
189
+ */
190
+ skip_empty_lines?: boolean;
191
+ skipEmptyLines?: boolean;
192
+ /**
193
+ * Skip a line with error found inside and directly go process the next line.
194
+ */
195
+ skip_records_with_error?: boolean;
196
+ skipRecordsWithError?: boolean;
197
+ /**
198
+ * Don't generate records for lines containing empty column values (column matching /\s*\/), defaults to false.
199
+ */
200
+ skip_records_with_empty_values?: boolean;
201
+ skipRecordsWithEmptyValues?: boolean;
202
+ /**
203
+ * Stop handling records after the requested number of records.
204
+ */
205
+ to?: number;
206
+ /**
207
+ * Stop handling records after the requested line number.
208
+ */
209
+ to_line?: number;
210
+ toLine?: number;
211
+ /**
212
+ * If true, ignore whitespace immediately around the delimiter, defaults to false.
213
+ * Does not remove whitespace in a quoted field.
214
+ */
215
+ trim?: boolean;
216
+ }
217
+
218
+ export interface Info {
219
+ /**
220
+ * Count the number of lines being fully commented.
221
+ */
222
+ readonly comment_lines: number;
223
+ /**
224
+ * Count the number of processed empty lines.
225
+ */
226
+ readonly empty_lines: number;
227
+ /**
228
+ * The number of lines encountered in the source dataset, start at 1 for the first line.
229
+ */
230
+ readonly lines: number;
231
+ /**
232
+ * Count the number of processed records.
233
+ */
234
+ readonly records: number;
235
+ /**
236
+ * Count of the number of processed bytes.
237
+ */
238
+ readonly bytes: number;
239
+ /**
240
+ * Number of non uniform records when `relax_column_count` is true.
241
+ */
242
+ readonly invalid_field_length: number;
243
+ /**
244
+ * Normalized verion of `options.columns` when `options.columns` is true, boolean otherwise.
245
+ */
246
+ readonly columns: boolean | { name: string }[] | { disabled: true }[];
247
+ }
248
+
249
+ export type CsvErrorCode =
250
+ 'CSV_INVALID_OPTION_BOM'
251
+ | 'CSV_INVALID_OPTION_CAST'
252
+ | 'CSV_INVALID_OPTION_CAST_DATE'
253
+ | 'CSV_INVALID_OPTION_COLUMNS'
254
+ | 'CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME'
255
+ | 'CSV_INVALID_OPTION_COMMENT'
256
+ | 'CSV_INVALID_OPTION_DELIMITER'
257
+ | 'CSV_INVALID_OPTION_ON_RECORD'
258
+ | 'CSV_INVALID_CLOSING_QUOTE'
259
+ | 'INVALID_OPENING_QUOTE'
260
+ | 'CSV_INVALID_COLUMN_MAPPING'
261
+ | 'CSV_INVALID_ARGUMENT'
262
+ | 'CSV_INVALID_COLUMN_DEFINITION'
263
+ | 'CSV_MAX_RECORD_SIZE'
264
+ | 'CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE'
265
+ | 'CSV_QUOTE_NOT_CLOSED'
266
+ | 'CSV_RECORD_INCONSISTENT_FIELDS_LENGTH'
267
+ | 'CSV_RECORD_INCONSISTENT_COLUMNS'
268
+ | 'CSV_OPTION_COLUMNS_MISSING_NAME'
269
+
270
+ export class CsvError extends Error {
271
+ readonly code: CsvErrorCode;
272
+ [key: string]: any;
273
+
274
+ constructor(code: CsvErrorCode, message: string | string[], options?: Options, ...contexts: any[]);
275
+ }
276
+
277
+ declare function parse(input: Buffer | string, options?: Options, callback?: Callback): Parser;
278
+ declare function parse(input: Buffer | string, callback?: Callback): Parser;
279
+ declare function parse(options?: Options, callback?: Callback): Parser;
280
+ declare function parse(callback?: Callback): Parser;
281
+
282
+ // export default parse;
283
+ export { parse }
@@ -0,0 +1,121 @@
1
+
2
+ /*
3
+ CSV Parse
4
+
5
+ Please look at the [project documentation](https://csv.js.org/parse/) for
6
+ additional information.
7
+ */
8
+
9
+ import { Transform } from 'stream';
10
+ import {is_object} from './utils/is_object.js';
11
+ import {transform} from './api/index.js';
12
+ import {CsvError} from './api/CsvError.js';
13
+
14
+ class Parser extends Transform {
15
+ constructor(opts = {}){
16
+ super({...{readableObjectMode: true}, ...opts, encoding: null});
17
+ this.api = transform(opts);
18
+ this.api.options.on_skip = (err, chunk) => {
19
+ this.emit('skip', err, chunk);
20
+ };
21
+ // Backward compatibility
22
+ this.state = this.api.state;
23
+ this.options = this.api.options;
24
+ this.info = this.api.info;
25
+ }
26
+ // Implementation of `Transform._transform`
27
+ _transform(buf, _, callback){
28
+ if(this.state.stop === true){
29
+ return;
30
+ }
31
+ const err = this.api.parse(buf, false, (record) => {
32
+ this.push(record);
33
+ }, () => {
34
+ this.push(null);
35
+ this.end();
36
+ // Fix #333 and break #410
37
+ // ko: api.stream.iterator.coffee
38
+ // ko with v21.4.0, ok with node v20.5.1: api.stream.finished # aborted (with generate())
39
+ // ko: api.stream.finished # aborted (with Readable)
40
+ // this.destroy()
41
+ // Fix #410 and partially break #333
42
+ // ok: api.stream.iterator.coffee
43
+ // ok: api.stream.finished # aborted (with generate())
44
+ // broken: api.stream.finished # aborted (with Readable)
45
+ this.on('end', this.destroy);
46
+ });
47
+ if(err !== undefined){
48
+ this.state.stop = true;
49
+ }
50
+ callback(err);
51
+ }
52
+ // Implementation of `Transform._flush`
53
+ _flush(callback){
54
+ if(this.state.stop === true){
55
+ return;
56
+ }
57
+ const err = this.api.parse(undefined, true, (record) => {
58
+ this.push(record);
59
+ }, () => {
60
+ this.push(null);
61
+ this.on('end', this.destroy);
62
+ });
63
+ callback(err);
64
+ }
65
+ }
66
+
67
+ const parse = function(){
68
+ let data, options, callback;
69
+ for(const i in arguments){
70
+ const argument = arguments[i];
71
+ const type = typeof argument;
72
+ if(data === undefined && (typeof argument === 'string' || Buffer.isBuffer(argument))){
73
+ data = argument;
74
+ }else if(options === undefined && is_object(argument)){
75
+ options = argument;
76
+ }else if(callback === undefined && type === 'function'){
77
+ callback = argument;
78
+ }else{
79
+ throw new CsvError('CSV_INVALID_ARGUMENT', [
80
+ 'Invalid argument:',
81
+ `got ${JSON.stringify(argument)} at index ${i}`
82
+ ], options || {});
83
+ }
84
+ }
85
+ const parser = new Parser(options);
86
+ if(callback){
87
+ const records = options === undefined || options.objname === undefined ? [] : {};
88
+ parser.on('readable', function(){
89
+ let record;
90
+ while((record = this.read()) !== null){
91
+ if(options === undefined || options.objname === undefined){
92
+ records.push(record);
93
+ }else{
94
+ records[record[0]] = record[1];
95
+ }
96
+ }
97
+ });
98
+ parser.on('error', function(err){
99
+ callback(err, undefined, parser.api.__infoDataSet());
100
+ });
101
+ parser.on('end', function(){
102
+ callback(undefined, records, parser.api.__infoDataSet());
103
+ });
104
+ }
105
+ if(data !== undefined){
106
+ const writer = function(){
107
+ parser.write(data);
108
+ parser.end();
109
+ };
110
+ // Support Deno, Rollup doesnt provide a shim for setImmediate
111
+ if(typeof setImmediate === 'function'){
112
+ setImmediate(writer);
113
+ }else{
114
+ setTimeout(writer, 0);
115
+ }
116
+ }
117
+ return parser;
118
+ };
119
+
120
+ // export default parse
121
+ export { parse, Parser, CsvError };
@@ -0,0 +1,27 @@
1
+
2
+ import {
3
+ TransformStream,
4
+ } from 'node:stream/web';
5
+ import {transform} from './api/index.js';
6
+
7
+ const parse = (opts) => {
8
+ const api = transform(opts);
9
+ return new TransformStream({
10
+ async transform(chunk, controller) {
11
+ api.parse(chunk, false, (record) => {
12
+ controller.enqueue(record);
13
+ }, () => {
14
+ controller.close();
15
+ });
16
+ },
17
+ async flush(controller){
18
+ api.parse(undefined, true, (record) => {
19
+ controller.enqueue(record);
20
+ }, () => {
21
+ controller.close();
22
+ });
23
+ }
24
+ });
25
+ };
26
+
27
+ export {parse};
@@ -0,0 +1,11 @@
1
+
2
+ import { Options } from './index.js';
3
+
4
+ declare function parse(input: Buffer | string, options?: Options): any;
5
+ // export default parse;
6
+ export { parse };
7
+
8
+ export {
9
+ CastingContext, CastingFunction, CastingDateFunction,
10
+ ColumnOption, Options, Info, CsvErrorCode, CsvError
11
+ } from './index.js';
@@ -0,0 +1,27 @@
1
+
2
+ import {CsvError, transform} from './api/index.js';
3
+
4
+ const parse = function(data, opts={}){
5
+ if(typeof data === 'string'){
6
+ data = Buffer.from(data);
7
+ }
8
+ const records = opts && opts.objname ? {} : [];
9
+ const parser = transform(opts);
10
+ const push = (record) => {
11
+ if(parser.options.objname === undefined)
12
+ records.push(record);
13
+ else{
14
+ records[record[0]] = record[1];
15
+ }
16
+ };
17
+ const close = () => {};
18
+ const err1 = parser.parse(data, false, push, close);
19
+ if(err1 !== undefined) throw err1;
20
+ const err2 = parser.parse(undefined, true, push, close);
21
+ if(err2 !== undefined) throw err2;
22
+ return records;
23
+ };
24
+
25
+ // export default parse
26
+ export { parse };
27
+ export { CsvError };
@@ -0,0 +1,64 @@
1
+
2
+ class ResizeableBuffer{
3
+ constructor(size=100){
4
+ this.size = size;
5
+ this.length = 0;
6
+ this.buf = Buffer.allocUnsafe(size);
7
+ }
8
+ prepend(val){
9
+ if(Buffer.isBuffer(val)){
10
+ const length = this.length + val.length;
11
+ if(length >= this.size){
12
+ this.resize();
13
+ if(length >= this.size){
14
+ throw Error('INVALID_BUFFER_STATE');
15
+ }
16
+ }
17
+ const buf = this.buf;
18
+ this.buf = Buffer.allocUnsafe(this.size);
19
+ val.copy(this.buf, 0);
20
+ buf.copy(this.buf, val.length);
21
+ this.length += val.length;
22
+ }else{
23
+ const length = this.length++;
24
+ if(length === this.size){
25
+ this.resize();
26
+ }
27
+ const buf = this.clone();
28
+ this.buf[0] = val;
29
+ buf.copy(this.buf,1, 0, length);
30
+ }
31
+ }
32
+ append(val){
33
+ const length = this.length++;
34
+ if(length === this.size){
35
+ this.resize();
36
+ }
37
+ this.buf[length] = val;
38
+ }
39
+ clone(){
40
+ return Buffer.from(this.buf.slice(0, this.length));
41
+ }
42
+ resize(){
43
+ const length = this.length;
44
+ this.size = this.size * 2;
45
+ const buf = Buffer.allocUnsafe(this.size);
46
+ this.buf.copy(buf,0, 0, length);
47
+ this.buf = buf;
48
+ }
49
+ toString(encoding){
50
+ if(encoding){
51
+ return this.buf.slice(0, this.length).toString(encoding);
52
+ }else{
53
+ return Uint8Array.prototype.slice.call(this.buf.slice(0, this.length));
54
+ }
55
+ }
56
+ toJSON(){
57
+ return this.toString('utf8');
58
+ }
59
+ reset(){
60
+ this.length = 0;
61
+ }
62
+ }
63
+
64
+ export default ResizeableBuffer;
@@ -0,0 +1,6 @@
1
+
2
+ const is_object = function(obj){
3
+ return (typeof obj === 'object' && obj !== null && !Array.isArray(obj));
4
+ };
5
+
6
+ export {is_object};
@@ -0,0 +1,8 @@
1
+
2
+ const underscore = function(str){
3
+ return str.replace(/([A-Z])/g, function(_, match){
4
+ return '_' + match.toLowerCase();
5
+ });
6
+ };
7
+
8
+ export {underscore};
@@ -0,0 +1,142 @@
1
+ {
2
+ "version": "5.5.5",
3
+ "name": "csv-parse",
4
+ "description": "CSV parsing implementing the Node.js `stream.Transform` API",
5
+ "keywords": [
6
+ "csv",
7
+ "parse",
8
+ "parser",
9
+ "convert",
10
+ "tsv",
11
+ "stream",
12
+ "backend",
13
+ "frontend"
14
+ ],
15
+ "author": "David Worms <david@adaltas.com> (https://www.adaltas.com)",
16
+ "contributors": [
17
+ "David Worms <david@adaltas.com> (https://www.adaltas.com)",
18
+ "Will White (https://github.com/willwhite)",
19
+ "Justin Latimer (https://github.com/justinlatimer)",
20
+ "jonseymour (https://github.com/jonseymour)",
21
+ "pascalopitz (https://github.com/pascalopitz)",
22
+ "Josh Pschorr (https://github.com/jpschorr)",
23
+ "Elad Ben-Israel (https://github.com/eladb)",
24
+ "Philippe Plantier (https://github.com/phipla)",
25
+ "Tim Oxley (https://github.com/timoxley)",
26
+ "Damon Oehlman (https://github.com/DamonOehlman)",
27
+ "Alexandru Topliceanu (https://github.com/topliceanu)",
28
+ "Visup (https://github.com/visup)",
29
+ "Edmund von der Burg (https://github.com/evdb)",
30
+ "Douglas Christopher Wilson (https://github.com/dougwilson)",
31
+ "Joe Eaves (https://github.com/Joeasaurus)",
32
+ "Mark Stosberg (https://github.com/markstos)"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "import": {
37
+ "types": "./lib/index.d.ts",
38
+ "default": "./lib/index.js"
39
+ },
40
+ "require": {
41
+ "types": "./dist/cjs/index.d.cts",
42
+ "default": "./dist/cjs/index.cjs"
43
+ }
44
+ },
45
+ "./sync": {
46
+ "import": {
47
+ "types": "./lib/sync.d.ts",
48
+ "default": "./lib/sync.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/cjs/sync.d.cts",
52
+ "default": "./dist/cjs/sync.cjs"
53
+ }
54
+ },
55
+ "./browser/esm": {
56
+ "types": "./dist/esm/index.d.ts",
57
+ "default": "./dist/esm/index.js"
58
+ },
59
+ "./browser/esm/sync": {
60
+ "types": "./dist/esm/sync.d.ts",
61
+ "default": "./dist/esm/sync.js"
62
+ }
63
+ },
64
+ "devDependencies": {
65
+ "@rollup/plugin-eslint": "^9.0.4",
66
+ "@rollup/plugin-node-resolve": "^15.2.1",
67
+ "@types/mocha": "^10.0.1",
68
+ "@types/node": "^20.5.6",
69
+ "coffeelint": "^2.1.0",
70
+ "coffeescript": "^2.7.0",
71
+ "csv-generate": "^4.4.0",
72
+ "csv-spectrum": "^1.0.0",
73
+ "each": "^2.4.0",
74
+ "eslint": "^8.47.0",
75
+ "mocha": "^10.2.0",
76
+ "pad": "^3.2.0",
77
+ "rollup": "^3.28.1",
78
+ "rollup-plugin-node-builtins": "^2.1.2",
79
+ "rollup-plugin-node-globals": "^1.4.0",
80
+ "should": "^13.2.3",
81
+ "stream-transform": "^3.3.1",
82
+ "ts-node": "^10.9.1",
83
+ "typescript": "^5.2.2"
84
+ },
85
+ "files": [
86
+ "dist",
87
+ "lib"
88
+ ],
89
+ "homepage": "https://csv.js.org/parse",
90
+ "license": "MIT",
91
+ "main": "./dist/cjs/index.cjs",
92
+ "mocha": {
93
+ "inline-diffs": true,
94
+ "loader": "./test/loaders/all.js",
95
+ "recursive": true,
96
+ "reporter": "spec",
97
+ "require": [
98
+ "should"
99
+ ],
100
+ "throw-deprecation": true,
101
+ "timeout": 40000
102
+ },
103
+ "repository": {
104
+ "type": "git",
105
+ "url": "https://github.com/adaltas/node-csv.git",
106
+ "directory": "packages/csv-parse"
107
+ },
108
+ "scripts": {
109
+ "build": "npm run build:rollup && npm run build:ts",
110
+ "build:rollup": "npx rollup -c",
111
+ "build:ts": "cp lib/index.d.ts dist/cjs/index.d.cts && cp lib/sync.d.ts dist/cjs/sync.d.cts && cp lib/*.ts dist/esm",
112
+ "postbuild:ts": "find dist/cjs -name '*.d.cts' -exec sh -c \"sed -i \"s/\\.js'/\\.cjs'/g\" {} || sed -i '' \"s/\\.js'/\\.cjs'/g\" {}\" \\;",
113
+ "lint": "npm run lint:lib && npm run lint:samples && npm run lint:test",
114
+ "postlint": "tsc --noEmit true",
115
+ "lint:lib": "eslint --fix lib/*.js",
116
+ "lint:samples": "eslint --fix samples/*.js",
117
+ "lint:test": "coffeelint --fix test/*.coffee",
118
+ "preversion": "npm run build && git add dist",
119
+ "pretest": "npm run build",
120
+ "test": "mocha 'test/**/*.{coffee,ts}'",
121
+ "test:legacy": "mocha --ignore test/api.web_stream.coffee --ignore test/api.stream.finished.coffee --ignore test/api.stream.iterator.coffee --loader=./test/loaders/legacy/all.js 'test/**/*.{coffee,ts}'"
122
+ },
123
+ "type": "module",
124
+ "types": "dist/esm/index.d.ts",
125
+ "typesVersions": {
126
+ "*": {
127
+ ".": [
128
+ "dist/esm/index.d.ts"
129
+ ],
130
+ "sync": [
131
+ "dist/esm/sync.d.ts"
132
+ ],
133
+ "browser/esm": [
134
+ "dist/esm/index.d.ts"
135
+ ],
136
+ "browser/esm/sync": [
137
+ "dist/esm/sync.d.ts"
138
+ ]
139
+ }
140
+ },
141
+ "gitHead": "410e7b172ce19e975825fcc95dbcfc0340f75af2"
142
+ }