@design-edito/tools 0.2.6 → 0.2.7
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.
- package/agnostic/arrays/index.js +9 -9
- package/agnostic/arrays/random-pick/index.js +4 -4
- package/agnostic/colors/index.js +6 -6
- package/agnostic/css/index.js +17 -17
- package/agnostic/css/styles-set/index.js +4 -4
- package/agnostic/errors/index.js +2 -2
- package/agnostic/html/hyper-json/cast/index.js +2 -2
- package/agnostic/html/hyper-json/index.js +3 -3
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +2 -2
- package/agnostic/html/hyper-json/tree/index.js +2 -2
- package/agnostic/html/hyper-json/utils/index.js +2 -2
- package/agnostic/html/index.js +9 -9
- package/agnostic/html/sanitize/index.js +4 -4
- package/agnostic/html/selector-to-element/index.js +4 -4
- package/agnostic/html/string-to-nodes/index.js +5 -5
- package/agnostic/misc/assert/index.js +3 -3
- package/agnostic/misc/index.js +21 -21
- package/agnostic/misc/lorem-ipsum/index.js +11 -11
- package/agnostic/numbers/index.js +3 -3
- package/agnostic/objects/index.js +10 -10
- package/agnostic/optim/index.js +3 -3
- package/agnostic/strings/index.js +14 -14
- package/agnostic/strings/parse-table/index.d.ts +30 -29
- package/agnostic/strings/parse-table/index.js +1 -3
- package/chunks/{chunk-XJ23DJY4.js → chunk-7GIJUKYP.js} +1 -1
- package/chunks/{chunk-RLE5EX57.js → chunk-7SQPSZJS.js} +18 -18
- package/chunks/{chunk-C7SRAQMW.js → chunk-AQBJ6HNB.js} +1 -1
- package/chunks/{chunk-LC3QKFGF.js → chunk-IOEX4WMM.js} +1 -1
- package/chunks/{chunk-62OUFTLX.js → chunk-LW37RZBH.js} +5 -5
- package/chunks/{chunk-VZ5NCIDH.js → chunk-MXGOSLJF.js} +3 -3
- package/chunks/{chunk-FESC3CF3.js → chunk-O7NVF55C.js} +13 -25
- package/chunks/{chunk-X5HMM3LD.js → chunk-SKBOSWM2.js} +1 -1
- package/chunks/{chunk-P2H6PV4O.js → chunk-TIER4TF4.js} +1 -1
- package/chunks/{chunk-E4FJHD5R.js → chunk-WAMSK4A3.js} +1 -1
- package/chunks/{chunk-QGV62GWS.js → chunk-WD3CE5WS.js} +2 -2
- package/chunks/{chunk-Z3TF5XAN.js → chunk-WLZD64PA.js} +7 -7
- package/chunks/{chunk-RDQJSWRC.js → chunk-XB3EGDBI.js} +1 -1
- package/chunks/{chunk-CQEDNACN.js → chunk-ZBBU2P4D.js} +2 -2
- package/node/@aws-s3/index.js +7 -7
- package/node/@aws-s3/storage/directory/index.js +6 -6
- package/node/@aws-s3/storage/file/index.js +7 -7
- package/node/@aws-s3/storage/index.js +7 -7
- package/node/@google-cloud/index.js +10 -10
- package/node/@google-cloud/storage/bucket/index.js +4 -4
- package/node/@google-cloud/storage/directory/index.js +6 -6
- package/node/@google-cloud/storage/file/index.js +9 -9
- package/node/@google-cloud/storage/index.js +14 -14
- package/node/cloud-storage/index.js +36 -36
- package/node/cloud-storage/operations/copy-dir/index.js +2 -2
- package/node/cloud-storage/operations/copy-file/index.js +2 -2
- package/node/cloud-storage/operations/download-file/index.js +2 -2
- package/node/cloud-storage/operations/exists-file/index.js +2 -2
- package/node/cloud-storage/operations/index.js +43 -43
- package/node/cloud-storage/operations/list-dir/index.js +2 -2
- package/node/cloud-storage/operations/move-dir/index.js +2 -2
- package/node/cloud-storage/operations/move-file/index.js +2 -2
- package/node/cloud-storage/operations/remove-dir/index.js +2 -2
- package/node/cloud-storage/operations/remove-file/index.js +2 -2
- package/node/cloud-storage/operations/stat-file/index.js +2 -2
- package/node/cloud-storage/operations/upload-file/index.js +2 -2
- package/node/files/index.js +4 -4
- package/node/ftps/directory/index.js +4 -4
- package/node/ftps/index.js +5 -5
- package/node/images/index.js +9 -9
- package/node/images/transform/index.js +9 -9
- package/node/sftp/directory/index.js +6 -6
- package/node/sftp/file/index.js +7 -7
- package/node/sftp/index.js +6 -6
- package/package.json +1 -1
- package/chunks/{chunk-CA3UPHYO.js → chunk-6AYH6N4T.js} +3 -3
- package/chunks/{chunk-E3TOIVFR.js → chunk-A7K5DUP7.js} +5 -5
- package/chunks/{chunk-FS6LRTDK.js → chunk-AK5LBEW3.js} +3 -3
- package/chunks/{chunk-DPQRXSZH.js → chunk-E7JWKPHC.js} +3 -3
- package/chunks/{chunk-NOLQR5RW.js → chunk-I3LKH6JC.js} +3 -3
- package/chunks/{chunk-H4LW6FP3.js → chunk-IH6TPXGZ.js} +3 -3
- package/chunks/{chunk-EOTOFHUR.js → chunk-IIMYMEJ6.js} +3 -3
- package/chunks/{chunk-OA7Y2A5T.js → chunk-JZ6QNL7U.js} +3 -3
- package/chunks/{chunk-INGSSBWK.js → chunk-KXIEPXDI.js} +6 -6
- package/chunks/{chunk-24ZUWYIR.js → chunk-MRCJT2LW.js} +3 -3
- package/chunks/{chunk-646R6BQZ.js → chunk-N7TMNMOK.js} +3 -3
- package/chunks/{chunk-UK4HNSEJ.js → chunk-NSB5NOKA.js} +3 -3
- package/chunks/{chunk-IWZAUQGO.js → chunk-QUPIMVDB.js} +6 -6
- package/chunks/{chunk-6NLNUGBI.js → chunk-RG5U7D3R.js} +3 -3
- package/chunks/{chunk-QJMBTRGK.js → chunk-UEAMPAHK.js} +3 -3
- package/chunks/{chunk-XMTCLFKS.js → chunk-VCCKYSSJ.js} +3 -3
- package/chunks/{chunk-2KT7AKRW.js → chunk-WH6BPDAC.js} +3 -3
- package/chunks/{chunk-CATUHE6P.js → chunk-X5F6XGEP.js} +5 -5
- package/chunks/{chunk-2GM4JNN6.js → chunk-X5K3KE5O.js} +8 -8
- package/chunks/{chunk-WVZLCXVN.js → chunk-XUIBDINM.js} +3 -3
- package/chunks/{chunk-X7HEBG3G.js → chunk-YBCIFNYC.js} +24 -24
- package/chunks/{chunk-FYYLWTSR.js → chunk-ZBAKY6DB.js} +5 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Outcome } from '../../misc/outcome';
|
2
|
-
type
|
2
|
+
export type ParseTableLineModeOptions<T extends Record<string, string>> = {
|
3
3
|
inputToLines: (input: string) => string[];
|
4
4
|
headLinePos: number;
|
5
5
|
headLineToHeaders: (input: string) => string[];
|
@@ -7,7 +7,7 @@ type ParseTableOptionsDelimiterBased<T extends Record<string, string>> = {
|
|
7
7
|
bodyLineToCellValue: (input: string) => string[];
|
8
8
|
schema: (obj: unknown) => T;
|
9
9
|
};
|
10
|
-
type
|
10
|
+
export type ParseTableColumnModeOptions<T extends Record<string, string>> = {
|
11
11
|
inputToLines: (input: string) => string[];
|
12
12
|
headLinePos: number;
|
13
13
|
bodyLinesBounds: [number, number];
|
@@ -16,51 +16,56 @@ type ParseTableOptionsColumnSlice<T extends Record<string, string>> = {
|
|
16
16
|
valueRefine: (value: string) => string;
|
17
17
|
schema: (obj: unknown) => T;
|
18
18
|
};
|
19
|
-
export type ParseTableOptions<T extends Record<string, string>> =
|
20
|
-
export declare const defaultOptions: ParseTableOptions<any>;
|
19
|
+
export type ParseTableOptions<T extends Record<string, string>> = ParseTableLineModeOptions<T> | ParseTableColumnModeOptions<T>;
|
21
20
|
/**
|
22
21
|
* Parses a tabular string input into an array of objects, where each object represents a row in the table.
|
23
22
|
*
|
24
23
|
* There are two parsing modes:
|
25
24
|
*
|
26
|
-
* 1. **Delimiter-based parsing**
|
27
|
-
* - The table is split into rows and then into cells using
|
25
|
+
* 1. **Delimiter-based parsing** (default)
|
26
|
+
* - The table is split into rows and then into cells using functions such as splitting on `\n` and `\t`.
|
28
27
|
* - The header row is parsed into an array of header names, which are mapped to each cell value.
|
28
|
+
* - Defaults: `inputToLines = s => s.split('\n')`, `headLinePos = 0`, `headLineToHeaders = h => h.split('\t')`,
|
29
|
+
* `bodyLinesBounds = [0, Infinity]`, `bodyLineToCellValue = r => r.split('\t')`.
|
29
30
|
*
|
30
31
|
* 2. **Column-slice parsing**
|
31
32
|
* - The table is split into fixed-width columns based on start indices provided in `options.columns`.
|
32
33
|
* - The header row and body rows are sliced using these column boundaries.
|
33
34
|
* - Each header and cell value can be refined with user-provided functions.
|
35
|
+
* - Defaults: `inputToLines = s => s.split('\n')`, `headLinePos = 0`, `bodyLinesBounds = [1, Infinity]`,
|
36
|
+
* `headerRefine = h => h`, `valueRefine = v => v`.
|
34
37
|
*
|
35
38
|
* @template T - The type of the objects in the resulting array, extending `Record<string, string>`.
|
36
39
|
* @param {string} table - The string representation of the table to be parsed.
|
37
|
-
* @param {ParseTableOptions<T
|
40
|
+
* @param {Partial<ParseTableOptions<T>> & { schema: (obj: unknown) => T }} options - Configuration options for parsing the table.
|
38
41
|
*
|
39
|
-
* ###
|
40
|
-
* @param {function(string): string[]} options.inputToLines - Function to split the input string into lines.
|
41
|
-
* @param {number} options.headLinePos - The index of the header line in the lines array.
|
42
|
-
* @param {[number, number]} options.bodyLinesBounds - Tuple `[start, end]` indicating the range of lines to parse as body rows.
|
42
|
+
* ### Required
|
43
43
|
* @param {function(unknown): T} options.schema - Function to validate and transform each row object.
|
44
44
|
*
|
45
|
-
* ###
|
46
|
-
* @param {function(string): string[]} options.
|
47
|
-
* @param {
|
45
|
+
* ### Common (optional)
|
46
|
+
* @param {function(string): string[]} [options.inputToLines] - Function to split the input string into lines. Default: `s => s.split('\n')`.
|
47
|
+
* @param {number} [options.headLinePos] - Index of the header line. Default: `0`.
|
48
|
+
* @param {[number, number]} [options.bodyLinesBounds] - Tuple `[start, end]` indicating the range of lines to parse as body rows.
|
48
49
|
*
|
49
|
-
* ###
|
50
|
-
* @param {
|
51
|
-
* @param {function(string): string} options.
|
52
|
-
* @param {function(string): string} options.valueRefine - Function to clean or normalize cell values.
|
50
|
+
* ### Delimiter-based (optional, used when `columns` is not provided)
|
51
|
+
* @param {function(string): string[]} [options.headLineToHeaders] - Function to parse the header line into an array of header names. Default: `h => h.split('\t')`.
|
52
|
+
* @param {function(string): string[]} [options.bodyLineToCellValue] - Function to parse each body line into an array of cell values. Default: `r => r.split('\t')`.
|
53
53
|
*
|
54
|
-
*
|
54
|
+
* ### Column-slice (optional, used when `columns` is provided)
|
55
|
+
* @param {number[]} [options.columns] - Starting indices for each column. The last column extends to the end of the line.
|
56
|
+
* @param {function(string): string} [options.headerRefine] - Function to clean or normalize header names. Default: `h => h`.
|
57
|
+
* @param {function(string): string} [options.valueRefine] - Function to clean or normalize cell values. Default: `v => v`.
|
58
|
+
*
|
59
|
+
* @returns {Outcome.Either<T[], string>} An `Outcome` containing either:
|
55
60
|
* - `success = true` with an array of parsed row objects, or
|
56
61
|
* - `success = false` with an error message.
|
57
62
|
*
|
58
|
-
* @throws Will
|
63
|
+
* @throws Will return a failure outcome if the header line cannot be found.
|
59
64
|
*
|
60
65
|
* @example
|
61
|
-
* // Delimiter-based parsing
|
66
|
+
* // Delimiter-based parsing (default)
|
62
67
|
* const table = 'name\tage\nAlice\t30\nBob\t25';
|
63
|
-
* const result = parseTable(table);
|
68
|
+
* const result = parseTable(table, { schema: row => row });
|
64
69
|
* if (result.success) {
|
65
70
|
* console.log(result.payload); // [{ name: 'Alice', age: '30' }, { name: 'Bob', age: '25' }]
|
66
71
|
* }
|
@@ -69,13 +74,10 @@ export declare const defaultOptions: ParseTableOptions<any>;
|
|
69
74
|
* // Column-slice parsing
|
70
75
|
* const table = 'Name Age\nAlice 30 \nBob 25 ';
|
71
76
|
* const result = parseTable(table, {
|
72
|
-
*
|
73
|
-
*
|
74
|
-
* bodyLinesBounds: [1, Infinity],
|
75
|
-
* columns: [0, 10, 15], // start indices for each column
|
77
|
+
* schema: row => row,
|
78
|
+
* columns: [0, 10, 15],
|
76
79
|
* headerRefine: h => h.trim(),
|
77
|
-
* valueRefine: v => v.trim()
|
78
|
-
* schema: row => row
|
80
|
+
* valueRefine: v => v.trim()
|
79
81
|
* });
|
80
82
|
* if (result.success) {
|
81
83
|
* console.log(result.payload); // [{ Name: 'Alice', Age: '30' }, { Name: 'Bob', Age: '25' }]
|
@@ -84,4 +86,3 @@ export declare const defaultOptions: ParseTableOptions<any>;
|
|
84
86
|
export declare function parseTable<T extends Record<string, string>>(table: string, _options: Partial<ParseTableOptions<T>> & {
|
85
87
|
schema: (obj: unknown) => T;
|
86
88
|
}): Outcome.Either<T[], string>;
|
87
|
-
export {};
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import {
|
2
|
-
defaultOptions,
|
3
2
|
parseTable
|
4
|
-
} from "../../../chunks/chunk-
|
3
|
+
} from "../../../chunks/chunk-O7NVF55C.js";
|
5
4
|
import "../../../chunks/chunk-JMU5PDBD.js";
|
6
5
|
import "../../../chunks/chunk-WSFCRVEQ.js";
|
7
6
|
export {
|
8
|
-
defaultOptions,
|
9
7
|
parseTable
|
10
8
|
};
|
@@ -1,36 +1,36 @@
|
|
1
|
-
import {
|
2
|
-
move_file_exports
|
3
|
-
} from "./chunk-646R6BQZ.js";
|
4
1
|
import {
|
5
2
|
remove_file_exports
|
6
|
-
} from "./chunk-
|
7
|
-
import {
|
8
|
-
stat_file_exports
|
9
|
-
} from "./chunk-UK4HNSEJ.js";
|
3
|
+
} from "./chunk-IH6TPXGZ.js";
|
10
4
|
import {
|
11
5
|
upload_file_exports
|
12
|
-
} from "./chunk-
|
13
|
-
import {
|
14
|
-
copy_dir_exports
|
15
|
-
} from "./chunk-6NLNUGBI.js";
|
6
|
+
} from "./chunk-I3LKH6JC.js";
|
16
7
|
import {
|
17
8
|
copy_file_exports
|
18
|
-
} from "./chunk-
|
9
|
+
} from "./chunk-JZ6QNL7U.js";
|
19
10
|
import {
|
20
11
|
download_file_exports
|
21
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-IIMYMEJ6.js";
|
22
13
|
import {
|
23
14
|
exists_file_exports
|
24
|
-
} from "./chunk-
|
15
|
+
} from "./chunk-MRCJT2LW.js";
|
25
16
|
import {
|
26
17
|
list_dir_exports
|
27
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-E7JWKPHC.js";
|
28
19
|
import {
|
29
|
-
|
30
|
-
} from "./chunk-
|
20
|
+
move_file_exports
|
21
|
+
} from "./chunk-N7TMNMOK.js";
|
31
22
|
import {
|
32
23
|
move_dir_exports
|
33
|
-
} from "./chunk-
|
24
|
+
} from "./chunk-AK5LBEW3.js";
|
25
|
+
import {
|
26
|
+
remove_dir_exports
|
27
|
+
} from "./chunk-6AYH6N4T.js";
|
28
|
+
import {
|
29
|
+
stat_file_exports
|
30
|
+
} from "./chunk-NSB5NOKA.js";
|
31
|
+
import {
|
32
|
+
copy_dir_exports
|
33
|
+
} from "./chunk-RG5U7D3R.js";
|
34
34
|
import {
|
35
35
|
__export
|
36
36
|
} from "./chunk-WSFCRVEQ.js";
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-
|
2
|
+
bucket_exports
|
3
|
+
} from "./chunk-UEAMPAHK.js";
|
4
4
|
import {
|
5
5
|
directory_exports
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-X5F6XGEP.js";
|
7
7
|
import {
|
8
|
-
|
9
|
-
} from "./chunk-
|
8
|
+
file_exports
|
9
|
+
} from "./chunk-X5K3KE5O.js";
|
10
10
|
import {
|
11
11
|
__export
|
12
12
|
} from "./chunk-WSFCRVEQ.js";
|
@@ -3,36 +3,25 @@ import {
|
|
3
3
|
} from "./chunk-JMU5PDBD.js";
|
4
4
|
|
5
5
|
// src/agnostic/strings/parse-table/index.ts
|
6
|
-
var
|
6
|
+
var defaultLineModeOptions = {
|
7
7
|
inputToLines: (i) => i.split("\n"),
|
8
8
|
headLinePos: 0,
|
9
|
-
headLineToHeaders: (
|
10
|
-
bodyLinesBounds: [
|
9
|
+
headLineToHeaders: (h) => h.split(" "),
|
10
|
+
bodyLinesBounds: [0, Infinity],
|
11
11
|
bodyLineToCellValue: (i) => i.split(" "),
|
12
12
|
schema: (i) => i
|
13
13
|
};
|
14
|
+
var defaultColumnModeOptions = {
|
15
|
+
inputToLines: (i) => i.split("\n"),
|
16
|
+
headLinePos: 0,
|
17
|
+
bodyLinesBounds: [1, Infinity],
|
18
|
+
columns: [],
|
19
|
+
headerRefine: (h) => h,
|
20
|
+
valueRefine: (v) => v,
|
21
|
+
schema: (i) => i
|
22
|
+
};
|
14
23
|
function parseTable(table, _options) {
|
15
|
-
|
16
|
-
if ("columns" in _options) {
|
17
|
-
options = {
|
18
|
-
inputToLines: (i) => i.split("\n"),
|
19
|
-
headLinePos: 0,
|
20
|
-
bodyLinesBounds: [1, Infinity],
|
21
|
-
columns: [],
|
22
|
-
headerRefine: (h) => h,
|
23
|
-
valueRefine: (v) => v,
|
24
|
-
..._options
|
25
|
-
};
|
26
|
-
} else {
|
27
|
-
options = {
|
28
|
-
inputToLines: (i) => i.split("\n"),
|
29
|
-
headLinePos: 0,
|
30
|
-
headLineToHeaders: (h) => h.split(" "),
|
31
|
-
bodyLinesBounds: [0, Infinity],
|
32
|
-
bodyLineToCellValue: (i) => i.split(" "),
|
33
|
-
..._options
|
34
|
-
};
|
35
|
-
}
|
24
|
+
const options = "columns" in _options ? { ...defaultColumnModeOptions, ..._options } : { ...defaultLineModeOptions, ..._options };
|
36
25
|
const lines = options.inputToLines(table);
|
37
26
|
const headLine = lines.at(options.headLinePos);
|
38
27
|
if (headLine === void 0) return Outcome.makeFailure("Head line not found");
|
@@ -76,6 +65,5 @@ function parseTable(table, _options) {
|
|
76
65
|
}
|
77
66
|
|
78
67
|
export {
|
79
|
-
defaultOptions,
|
80
68
|
parseTable
|
81
69
|
};
|
@@ -1,19 +1,19 @@
|
|
1
|
+
import {
|
2
|
+
shuffle
|
3
|
+
} from "./chunk-VJJIYJMY.js";
|
1
4
|
import {
|
2
5
|
findDuplicates
|
3
6
|
} from "./chunk-YS6WMSWC.js";
|
7
|
+
import {
|
8
|
+
randomPick,
|
9
|
+
randomPickMany
|
10
|
+
} from "./chunk-AQBJ6HNB.js";
|
4
11
|
import {
|
5
12
|
make
|
6
13
|
} from "./chunk-RLAZR3NL.js";
|
7
14
|
import {
|
8
15
|
isArrayOf
|
9
16
|
} from "./chunk-6RGDWX4A.js";
|
10
|
-
import {
|
11
|
-
randomPick,
|
12
|
-
randomPickMany
|
13
|
-
} from "./chunk-C7SRAQMW.js";
|
14
|
-
import {
|
15
|
-
shuffle
|
16
|
-
} from "./chunk-VJJIYJMY.js";
|
17
17
|
|
18
18
|
// src/agnostic/arrays/index.tsx
|
19
19
|
var Arrays;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
Sanitize
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-XB3EGDBI.js";
|
4
4
|
import {
|
5
5
|
register
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-TIER4TF4.js";
|
7
7
|
|
8
8
|
// src/agnostic/html/string-to-nodes/index.ts
|
9
9
|
function stringToNodes(dirtyStr, options) {
|
package/node/@aws-s3/index.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
import {
|
2
2
|
storage_exports
|
3
|
-
} from "../../chunks/chunk-
|
4
|
-
import "../../chunks/chunk-
|
5
|
-
import "../../chunks/chunk-
|
6
|
-
import "../../chunks/chunk-QWZ4ZNFA.js";
|
3
|
+
} from "../../chunks/chunk-WD3CE5WS.js";
|
4
|
+
import "../../chunks/chunk-ZBAKY6DB.js";
|
5
|
+
import "../../chunks/chunk-QUPIMVDB.js";
|
7
6
|
import "../../chunks/chunk-3TKBCG7Y.js";
|
8
|
-
import "../../chunks/chunk-VROZGPC5.js";
|
9
7
|
import "../../chunks/chunk-FD5WR2A5.js";
|
10
|
-
import "../../chunks/chunk-4XBUJAQU.js";
|
11
8
|
import "../../chunks/chunk-C6QTHDDM.js";
|
12
9
|
import "../../chunks/chunk-IV75M3KE.js";
|
13
10
|
import "../../chunks/chunk-ZEZCYPLQ.js";
|
14
11
|
import "../../chunks/chunk-ZSUG52DO.js";
|
15
|
-
import "../../chunks/chunk-
|
12
|
+
import "../../chunks/chunk-QWZ4ZNFA.js";
|
16
13
|
import "../../chunks/chunk-ON6LC3HE.js";
|
14
|
+
import "../../chunks/chunk-4XSDRT23.js";
|
15
|
+
import "../../chunks/chunk-VROZGPC5.js";
|
16
|
+
import "../../chunks/chunk-4XBUJAQU.js";
|
17
17
|
import "../../chunks/chunk-JMU5PDBD.js";
|
18
18
|
import "../../chunks/chunk-FENXVJYO.js";
|
19
19
|
import "../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import "../../../../chunks/chunk-
|
2
|
-
import {
|
3
|
-
copy_dir_exports
|
4
|
-
} from "../../../../chunks/chunk-4XBUJAQU.js";
|
1
|
+
import "../../../../chunks/chunk-ZBAKY6DB.js";
|
5
2
|
import {
|
6
3
|
list_exports
|
7
4
|
} from "../../../../chunks/chunk-ZSUG52DO.js";
|
5
|
+
import {
|
6
|
+
move_dir_exports
|
7
|
+
} from "../../../../chunks/chunk-ON6LC3HE.js";
|
8
8
|
import {
|
9
9
|
remove_dir_exports
|
10
10
|
} from "../../../../chunks/chunk-4XSDRT23.js";
|
11
11
|
import {
|
12
|
-
|
13
|
-
} from "../../../../chunks/chunk-
|
12
|
+
copy_dir_exports
|
13
|
+
} from "../../../../chunks/chunk-4XBUJAQU.js";
|
14
14
|
import "../../../../chunks/chunk-JMU5PDBD.js";
|
15
15
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
16
16
|
import "../../../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,13 +1,7 @@
|
|
1
|
-
import "../../../../chunks/chunk-
|
2
|
-
import {
|
3
|
-
move_exports
|
4
|
-
} from "../../../../chunks/chunk-QWZ4ZNFA.js";
|
1
|
+
import "../../../../chunks/chunk-QUPIMVDB.js";
|
5
2
|
import {
|
6
3
|
remove_exports
|
7
4
|
} from "../../../../chunks/chunk-3TKBCG7Y.js";
|
8
|
-
import {
|
9
|
-
stat_exports
|
10
|
-
} from "../../../../chunks/chunk-VROZGPC5.js";
|
11
5
|
import {
|
12
6
|
upload_exports
|
13
7
|
} from "../../../../chunks/chunk-FD5WR2A5.js";
|
@@ -20,6 +14,12 @@ import {
|
|
20
14
|
import {
|
21
15
|
exists_exports
|
22
16
|
} from "../../../../chunks/chunk-ZEZCYPLQ.js";
|
17
|
+
import {
|
18
|
+
move_exports
|
19
|
+
} from "../../../../chunks/chunk-QWZ4ZNFA.js";
|
20
|
+
import {
|
21
|
+
stat_exports
|
22
|
+
} from "../../../../chunks/chunk-VROZGPC5.js";
|
23
23
|
import "../../../../chunks/chunk-JMU5PDBD.js";
|
24
24
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
25
25
|
import "../../../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,21 +1,21 @@
|
|
1
|
-
import "../../../chunks/chunk-
|
1
|
+
import "../../../chunks/chunk-WD3CE5WS.js";
|
2
2
|
import {
|
3
3
|
directory_exports
|
4
|
-
} from "../../../chunks/chunk-
|
4
|
+
} from "../../../chunks/chunk-ZBAKY6DB.js";
|
5
5
|
import {
|
6
6
|
file_exports
|
7
|
-
} from "../../../chunks/chunk-
|
8
|
-
import "../../../chunks/chunk-QWZ4ZNFA.js";
|
7
|
+
} from "../../../chunks/chunk-QUPIMVDB.js";
|
9
8
|
import "../../../chunks/chunk-3TKBCG7Y.js";
|
10
|
-
import "../../../chunks/chunk-VROZGPC5.js";
|
11
9
|
import "../../../chunks/chunk-FD5WR2A5.js";
|
12
|
-
import "../../../chunks/chunk-4XBUJAQU.js";
|
13
10
|
import "../../../chunks/chunk-C6QTHDDM.js";
|
14
11
|
import "../../../chunks/chunk-IV75M3KE.js";
|
15
12
|
import "../../../chunks/chunk-ZEZCYPLQ.js";
|
16
13
|
import "../../../chunks/chunk-ZSUG52DO.js";
|
17
|
-
import "../../../chunks/chunk-
|
14
|
+
import "../../../chunks/chunk-QWZ4ZNFA.js";
|
18
15
|
import "../../../chunks/chunk-ON6LC3HE.js";
|
16
|
+
import "../../../chunks/chunk-4XSDRT23.js";
|
17
|
+
import "../../../chunks/chunk-VROZGPC5.js";
|
18
|
+
import "../../../chunks/chunk-4XBUJAQU.js";
|
19
19
|
import "../../../chunks/chunk-JMU5PDBD.js";
|
20
20
|
import "../../../chunks/chunk-FENXVJYO.js";
|
21
21
|
import "../../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,26 +1,26 @@
|
|
1
1
|
import {
|
2
2
|
storage_exports
|
3
|
-
} from "../../chunks/chunk-
|
4
|
-
import "../../chunks/chunk-
|
3
|
+
} from "../../chunks/chunk-LW37RZBH.js";
|
4
|
+
import "../../chunks/chunk-UEAMPAHK.js";
|
5
|
+
import "../../chunks/chunk-ZNA7SWFK.js";
|
6
|
+
import "../../chunks/chunk-X5F6XGEP.js";
|
7
|
+
import "../../chunks/chunk-X5K3KE5O.js";
|
5
8
|
import "../../chunks/chunk-G5RRNREY.js";
|
6
|
-
import "../../chunks/chunk-HWVEI3RH.js";
|
7
9
|
import "../../chunks/chunk-PAIUCLVK.js";
|
8
10
|
import "../../chunks/chunk-42K3MQQ5.js";
|
9
11
|
import "../../chunks/chunk-YKPA3MQL.js";
|
10
|
-
import "../../chunks/chunk-
|
11
|
-
import "../../chunks/chunk-QJMBTRGK.js";
|
12
|
-
import "../../chunks/chunk-ZNA7SWFK.js";
|
13
|
-
import "../../chunks/chunk-6IYUA43Q.js";
|
12
|
+
import "../../chunks/chunk-HWVEI3RH.js";
|
14
13
|
import "../../chunks/chunk-7J7CYOXU.js";
|
15
|
-
import "../../chunks/chunk-W3RXHN5I.js";
|
16
14
|
import "../../chunks/chunk-FB3GNE2B.js";
|
17
|
-
import "../../chunks/chunk-V3L55I2S.js";
|
18
15
|
import "../../chunks/chunk-CWZFRUBS.js";
|
19
16
|
import "../../chunks/chunk-2JH4TCT2.js";
|
20
17
|
import "../../chunks/chunk-5VHFXWFM.js";
|
21
18
|
import "../../chunks/chunk-37TRFYZT.js";
|
22
|
-
import "../../chunks/chunk-
|
19
|
+
import "../../chunks/chunk-6IYUA43Q.js";
|
23
20
|
import "../../chunks/chunk-BWYH445G.js";
|
21
|
+
import "../../chunks/chunk-QLDN574K.js";
|
22
|
+
import "../../chunks/chunk-W3RXHN5I.js";
|
23
|
+
import "../../chunks/chunk-V3L55I2S.js";
|
24
24
|
import "../../chunks/chunk-JMU5PDBD.js";
|
25
25
|
import "../../chunks/chunk-FENXVJYO.js";
|
26
26
|
import "../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import "../../../../chunks/chunk-
|
1
|
+
import "../../../../chunks/chunk-UEAMPAHK.js";
|
2
2
|
import {
|
3
3
|
get_metadata_exports
|
4
4
|
} from "../../../../chunks/chunk-ZNA7SWFK.js";
|
5
5
|
import {
|
6
6
|
list_exports
|
7
7
|
} from "../../../../chunks/chunk-37TRFYZT.js";
|
8
|
-
import {
|
9
|
-
remove_dir_exports
|
10
|
-
} from "../../../../chunks/chunk-QLDN574K.js";
|
11
8
|
import {
|
12
9
|
move_dir_exports
|
13
10
|
} from "../../../../chunks/chunk-BWYH445G.js";
|
11
|
+
import {
|
12
|
+
remove_dir_exports
|
13
|
+
} from "../../../../chunks/chunk-QLDN574K.js";
|
14
14
|
import "../../../../chunks/chunk-JMU5PDBD.js";
|
15
15
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
16
16
|
import "../../../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import "../../../../chunks/chunk-
|
2
|
-
import {
|
3
|
-
copy_dir_exports
|
4
|
-
} from "../../../../chunks/chunk-V3L55I2S.js";
|
1
|
+
import "../../../../chunks/chunk-X5F6XGEP.js";
|
5
2
|
import {
|
6
3
|
list_exports
|
7
4
|
} from "../../../../chunks/chunk-37TRFYZT.js";
|
5
|
+
import {
|
6
|
+
move_dir_exports
|
7
|
+
} from "../../../../chunks/chunk-BWYH445G.js";
|
8
8
|
import {
|
9
9
|
remove_dir_exports
|
10
10
|
} from "../../../../chunks/chunk-QLDN574K.js";
|
11
11
|
import {
|
12
|
-
|
13
|
-
} from "../../../../chunks/chunk-
|
12
|
+
copy_dir_exports
|
13
|
+
} from "../../../../chunks/chunk-V3L55I2S.js";
|
14
14
|
import "../../../../chunks/chunk-JMU5PDBD.js";
|
15
15
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
16
16
|
import "../../../../chunks/chunk-WSFCRVEQ.js";
|
@@ -1,10 +1,7 @@
|
|
1
|
-
import "../../../../chunks/chunk-
|
1
|
+
import "../../../../chunks/chunk-X5K3KE5O.js";
|
2
2
|
import {
|
3
3
|
revoke_signed_urls_exports
|
4
4
|
} from "../../../../chunks/chunk-G5RRNREY.js";
|
5
|
-
import {
|
6
|
-
update_metadata_exports
|
7
|
-
} from "../../../../chunks/chunk-HWVEI3RH.js";
|
8
5
|
import {
|
9
6
|
generate_signed_url_exports
|
10
7
|
} from "../../../../chunks/chunk-PAIUCLVK.js";
|
@@ -15,14 +12,11 @@ import {
|
|
15
12
|
get_permissions_exports
|
16
13
|
} from "../../../../chunks/chunk-YKPA3MQL.js";
|
17
14
|
import {
|
18
|
-
|
19
|
-
} from "../../../../chunks/chunk-
|
15
|
+
update_metadata_exports
|
16
|
+
} from "../../../../chunks/chunk-HWVEI3RH.js";
|
20
17
|
import {
|
21
18
|
remove_exports
|
22
19
|
} from "../../../../chunks/chunk-7J7CYOXU.js";
|
23
|
-
import {
|
24
|
-
stat_exports
|
25
|
-
} from "../../../../chunks/chunk-W3RXHN5I.js";
|
26
20
|
import {
|
27
21
|
upload_exports
|
28
22
|
} from "../../../../chunks/chunk-FB3GNE2B.js";
|
@@ -35,6 +29,12 @@ import {
|
|
35
29
|
import {
|
36
30
|
exists_exports
|
37
31
|
} from "../../../../chunks/chunk-5VHFXWFM.js";
|
32
|
+
import {
|
33
|
+
move_exports
|
34
|
+
} from "../../../../chunks/chunk-6IYUA43Q.js";
|
35
|
+
import {
|
36
|
+
stat_exports
|
37
|
+
} from "../../../../chunks/chunk-W3RXHN5I.js";
|
38
38
|
import "../../../../chunks/chunk-JMU5PDBD.js";
|
39
39
|
import "../../../../chunks/chunk-FENXVJYO.js";
|
40
40
|
import "../../../../chunks/chunk-WSFCRVEQ.js";
|