@atmaticai/agent-tools 1.0.3 → 1.1.0
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/dist/a2a/index.d.mts +169 -0
- package/dist/a2a/index.d.ts +169 -0
- package/dist/a2a/index.js +6012 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/index.mjs +5934 -0
- package/dist/a2a/index.mjs.map +1 -0
- package/dist/archive/index.d.mts +1 -0
- package/dist/archive/index.d.ts +1 -0
- package/dist/archive/index.js +90 -0
- package/dist/archive/index.js.map +1 -0
- package/dist/archive/index.mjs +80 -0
- package/dist/archive/index.mjs.map +1 -0
- package/dist/cli.js +4441 -164
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +4408 -161
- package/dist/cli.mjs.map +1 -1
- package/dist/color/index.d.mts +1 -0
- package/dist/color/index.d.ts +1 -0
- package/dist/color/index.js +347 -0
- package/dist/color/index.js.map +1 -0
- package/dist/color/index.mjs +336 -0
- package/dist/color/index.mjs.map +1 -0
- package/dist/crypto/index.d.mts +1 -0
- package/dist/crypto/index.d.ts +1 -0
- package/dist/crypto/index.js +116 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/crypto/index.mjs +108 -0
- package/dist/crypto/index.mjs.map +1 -0
- package/dist/csv/index.d.mts +1 -0
- package/dist/csv/index.d.ts +1 -0
- package/dist/csv/index.js +371 -0
- package/dist/csv/index.js.map +1 -0
- package/dist/csv/index.mjs +348 -0
- package/dist/csv/index.mjs.map +1 -0
- package/dist/datetime/index.d.mts +1 -0
- package/dist/datetime/index.d.ts +1 -0
- package/dist/datetime/index.js +234 -0
- package/dist/datetime/index.js.map +1 -0
- package/dist/datetime/index.mjs +224 -0
- package/dist/datetime/index.mjs.map +1 -0
- package/dist/diff/index.d.mts +2 -0
- package/dist/diff/index.d.ts +2 -0
- package/dist/diff/index.js +84 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/index.mjs +78 -0
- package/dist/diff/index.mjs.map +1 -0
- package/dist/excel/index.d.mts +1 -0
- package/dist/excel/index.d.ts +1 -0
- package/dist/excel/index.js +163 -0
- package/dist/excel/index.js.map +1 -0
- package/dist/excel/index.mjs +153 -0
- package/dist/excel/index.mjs.map +1 -0
- package/dist/image/index.d.mts +1 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +123 -0
- package/dist/image/index.js.map +1 -0
- package/dist/image/index.mjs +107 -0
- package/dist/image/index.mjs.map +1 -0
- package/dist/index--vbnYfdE.d.mts +142 -0
- package/dist/index--vbnYfdE.d.ts +142 -0
- package/dist/index-7FZQloN-.d.mts +62 -0
- package/dist/index-7FZQloN-.d.ts +62 -0
- package/dist/index-7XgaTVH5.d.mts +93 -0
- package/dist/index-7XgaTVH5.d.ts +93 -0
- package/dist/index-7bvFmh45.d.mts +87 -0
- package/dist/index-7bvFmh45.d.ts +87 -0
- package/dist/index-BDZcIVCU.d.mts +53 -0
- package/dist/index-BDZcIVCU.d.ts +53 -0
- package/dist/index-BKeYao0B.d.mts +320 -0
- package/dist/index-BKeYao0B.d.ts +320 -0
- package/dist/index-BN00EnUU.d.mts +55 -0
- package/dist/index-BN00EnUU.d.ts +55 -0
- package/dist/index-BZDcrPs-.d.mts +316 -0
- package/dist/index-BZDcrPs-.d.ts +316 -0
- package/dist/index-CQ1EukC4.d.mts +59 -0
- package/dist/index-CQ1EukC4.d.ts +59 -0
- package/dist/index-CgRVnFOt.d.mts +91 -0
- package/dist/index-CgRVnFOt.d.ts +91 -0
- package/dist/index-Dh47fgVS.d.mts +216 -0
- package/dist/index-Dh47fgVS.d.ts +216 -0
- package/dist/index-DjBDZzuj.d.mts +54 -0
- package/dist/index-DjBDZzuj.d.ts +54 -0
- package/dist/index-FFrvmr-n.d.mts +50 -0
- package/dist/index-FFrvmr-n.d.ts +50 -0
- package/dist/index-QWC8yIgW.d.mts +106 -0
- package/dist/index-QWC8yIgW.d.ts +106 -0
- package/dist/index-fJD8SORm.d.mts +61 -0
- package/dist/index-fJD8SORm.d.ts +61 -0
- package/dist/index-pPy_XDQU.d.mts +56 -0
- package/dist/index-pPy_XDQU.d.ts +56 -0
- package/dist/index-rwh9hdD9.d.mts +68 -0
- package/dist/index-rwh9hdD9.d.ts +68 -0
- package/dist/index-uXdkAfea.d.mts +93 -0
- package/dist/index-uXdkAfea.d.ts +93 -0
- package/dist/index.d.mts +25 -5
- package/dist/index.d.ts +25 -5
- package/dist/index.js +5195 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5145 -145
- package/dist/index.mjs.map +1 -1
- package/dist/json/index.d.mts +1 -0
- package/dist/json/index.d.ts +1 -0
- package/dist/json/index.js +599 -0
- package/dist/json/index.js.map +1 -0
- package/dist/json/index.mjs +552 -0
- package/dist/json/index.mjs.map +1 -0
- package/dist/markdown/index.d.mts +1 -0
- package/dist/markdown/index.d.ts +1 -0
- package/dist/markdown/index.js +151 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/markdown/index.mjs +139 -0
- package/dist/markdown/index.mjs.map +1 -0
- package/dist/math/index.d.mts +1 -0
- package/dist/math/index.d.ts +1 -0
- package/dist/math/index.js +247 -0
- package/dist/math/index.js.map +1 -0
- package/dist/math/index.mjs +240 -0
- package/dist/math/index.mjs.map +1 -0
- package/dist/pdf/index.d.mts +1 -0
- package/dist/pdf/index.d.ts +1 -0
- package/dist/pdf/index.js +628 -0
- package/dist/pdf/index.js.map +1 -0
- package/dist/pdf/index.mjs +598 -0
- package/dist/pdf/index.mjs.map +1 -0
- package/dist/physics/index.d.mts +1 -0
- package/dist/physics/index.d.ts +1 -0
- package/dist/physics/index.js +467 -0
- package/dist/physics/index.js.map +1 -0
- package/dist/physics/index.mjs +435 -0
- package/dist/physics/index.mjs.map +1 -0
- package/dist/regex/index.d.mts +1 -0
- package/dist/regex/index.d.ts +1 -0
- package/dist/regex/index.js +93 -0
- package/dist/regex/index.js.map +1 -0
- package/dist/regex/index.mjs +88 -0
- package/dist/regex/index.mjs.map +1 -0
- package/dist/settings/index.d.mts +41 -0
- package/dist/settings/index.d.ts +41 -0
- package/dist/settings/index.js +150 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/index.mjs +143 -0
- package/dist/settings/index.mjs.map +1 -0
- package/dist/sql/index.d.mts +1 -0
- package/dist/sql/index.d.ts +1 -0
- package/dist/sql/index.js +146 -0
- package/dist/sql/index.js.map +1 -0
- package/dist/sql/index.mjs +139 -0
- package/dist/sql/index.mjs.map +1 -0
- package/dist/structural/index.d.mts +1 -0
- package/dist/structural/index.d.ts +1 -0
- package/dist/structural/index.js +608 -0
- package/dist/structural/index.js.map +1 -0
- package/dist/structural/index.mjs +588 -0
- package/dist/structural/index.mjs.map +1 -0
- package/dist/text/index.d.mts +1 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.js +250 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/index.mjs +242 -0
- package/dist/text/index.mjs.map +1 -0
- package/dist/xml/index.d.mts +1 -0
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.js +188 -0
- package/dist/xml/index.js.map +1 -0
- package/dist/xml/index.mjs +180 -0
- package/dist/xml/index.mjs.map +1 -0
- package/package.json +138 -6
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
type CaseType = 'camel' | 'snake' | 'kebab' | 'pascal' | 'title' | 'sentence' | 'upper' | 'lower' | 'constant';
|
|
2
|
+
interface TextStats {
|
|
3
|
+
characters: number;
|
|
4
|
+
words: number;
|
|
5
|
+
sentences: number;
|
|
6
|
+
paragraphs: number;
|
|
7
|
+
lines: number;
|
|
8
|
+
readingTimeMs: number;
|
|
9
|
+
}
|
|
10
|
+
interface TruncateOptions {
|
|
11
|
+
length: number;
|
|
12
|
+
boundary?: 'character' | 'word';
|
|
13
|
+
suffix?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SimilarityResult {
|
|
16
|
+
distance: number;
|
|
17
|
+
similarity: number;
|
|
18
|
+
}
|
|
19
|
+
interface TemplateResult {
|
|
20
|
+
result: string;
|
|
21
|
+
missingKeys: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare function convertCase(input: string, to: CaseType): string;
|
|
25
|
+
|
|
26
|
+
declare function slugify(input: string, separator?: string): string;
|
|
27
|
+
|
|
28
|
+
declare function getTextStats(input: string): TextStats;
|
|
29
|
+
|
|
30
|
+
declare function truncate(input: string, options: TruncateOptions): string;
|
|
31
|
+
|
|
32
|
+
declare function generateLorem(count: number, unit?: 'words' | 'sentences' | 'paragraphs'): string;
|
|
33
|
+
|
|
34
|
+
declare function similarity(a: string, b: string): SimilarityResult;
|
|
35
|
+
|
|
36
|
+
declare function interpolate(template: string, variables: Record<string, string>): TemplateResult;
|
|
37
|
+
|
|
38
|
+
type index_CaseType = CaseType;
|
|
39
|
+
type index_SimilarityResult = SimilarityResult;
|
|
40
|
+
type index_TemplateResult = TemplateResult;
|
|
41
|
+
type index_TextStats = TextStats;
|
|
42
|
+
type index_TruncateOptions = TruncateOptions;
|
|
43
|
+
declare const index_convertCase: typeof convertCase;
|
|
44
|
+
declare const index_generateLorem: typeof generateLorem;
|
|
45
|
+
declare const index_getTextStats: typeof getTextStats;
|
|
46
|
+
declare const index_interpolate: typeof interpolate;
|
|
47
|
+
declare const index_similarity: typeof similarity;
|
|
48
|
+
declare const index_slugify: typeof slugify;
|
|
49
|
+
declare const index_truncate: typeof truncate;
|
|
50
|
+
declare namespace index {
|
|
51
|
+
export { type index_CaseType as CaseType, type index_SimilarityResult as SimilarityResult, type index_TemplateResult as TemplateResult, type index_TextStats as TextStats, type index_TruncateOptions as TruncateOptions, index_convertCase as convertCase, index_generateLorem as generateLorem, index_getTextStats as getTextStats, index_interpolate as interpolate, index_similarity as similarity, index_slugify as slugify, index_truncate as truncate };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { type CaseType as C, type SimilarityResult as S, type TemplateResult as T, type TextStats as a, type TruncateOptions as b, convertCase as c, getTextStats as d, interpolate as e, slugify as f, generateLorem as g, index as i, similarity as s, truncate as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
type CaseType = 'camel' | 'snake' | 'kebab' | 'pascal' | 'title' | 'sentence' | 'upper' | 'lower' | 'constant';
|
|
2
|
+
interface TextStats {
|
|
3
|
+
characters: number;
|
|
4
|
+
words: number;
|
|
5
|
+
sentences: number;
|
|
6
|
+
paragraphs: number;
|
|
7
|
+
lines: number;
|
|
8
|
+
readingTimeMs: number;
|
|
9
|
+
}
|
|
10
|
+
interface TruncateOptions {
|
|
11
|
+
length: number;
|
|
12
|
+
boundary?: 'character' | 'word';
|
|
13
|
+
suffix?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SimilarityResult {
|
|
16
|
+
distance: number;
|
|
17
|
+
similarity: number;
|
|
18
|
+
}
|
|
19
|
+
interface TemplateResult {
|
|
20
|
+
result: string;
|
|
21
|
+
missingKeys: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare function convertCase(input: string, to: CaseType): string;
|
|
25
|
+
|
|
26
|
+
declare function slugify(input: string, separator?: string): string;
|
|
27
|
+
|
|
28
|
+
declare function getTextStats(input: string): TextStats;
|
|
29
|
+
|
|
30
|
+
declare function truncate(input: string, options: TruncateOptions): string;
|
|
31
|
+
|
|
32
|
+
declare function generateLorem(count: number, unit?: 'words' | 'sentences' | 'paragraphs'): string;
|
|
33
|
+
|
|
34
|
+
declare function similarity(a: string, b: string): SimilarityResult;
|
|
35
|
+
|
|
36
|
+
declare function interpolate(template: string, variables: Record<string, string>): TemplateResult;
|
|
37
|
+
|
|
38
|
+
type index_CaseType = CaseType;
|
|
39
|
+
type index_SimilarityResult = SimilarityResult;
|
|
40
|
+
type index_TemplateResult = TemplateResult;
|
|
41
|
+
type index_TextStats = TextStats;
|
|
42
|
+
type index_TruncateOptions = TruncateOptions;
|
|
43
|
+
declare const index_convertCase: typeof convertCase;
|
|
44
|
+
declare const index_generateLorem: typeof generateLorem;
|
|
45
|
+
declare const index_getTextStats: typeof getTextStats;
|
|
46
|
+
declare const index_interpolate: typeof interpolate;
|
|
47
|
+
declare const index_similarity: typeof similarity;
|
|
48
|
+
declare const index_slugify: typeof slugify;
|
|
49
|
+
declare const index_truncate: typeof truncate;
|
|
50
|
+
declare namespace index {
|
|
51
|
+
export { type index_CaseType as CaseType, type index_SimilarityResult as SimilarityResult, type index_TemplateResult as TemplateResult, type index_TextStats as TextStats, type index_TruncateOptions as TruncateOptions, index_convertCase as convertCase, index_generateLorem as generateLorem, index_getTextStats as getTextStats, index_interpolate as interpolate, index_similarity as similarity, index_slugify as slugify, index_truncate as truncate };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { type CaseType as C, type SimilarityResult as S, type TemplateResult as T, type TextStats as a, type TruncateOptions as b, convertCase as c, getTextStats as d, interpolate as e, slugify as f, generateLorem as g, index as i, similarity as s, truncate as t };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
type ArchiveFormat = 'zip' | 'tar' | 'tar.gz';
|
|
2
|
+
interface ArchiveEntry {
|
|
3
|
+
path: string;
|
|
4
|
+
size: number;
|
|
5
|
+
compressedSize?: number;
|
|
6
|
+
isDirectory: boolean;
|
|
7
|
+
modified?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ArchiveCreateOptions {
|
|
10
|
+
format?: ArchiveFormat;
|
|
11
|
+
compressionLevel?: number;
|
|
12
|
+
}
|
|
13
|
+
interface ArchiveExtractOptions {
|
|
14
|
+
files?: string[];
|
|
15
|
+
}
|
|
16
|
+
interface ArchiveStats {
|
|
17
|
+
format: string;
|
|
18
|
+
fileCount: number;
|
|
19
|
+
directoryCount: number;
|
|
20
|
+
totalSize: number;
|
|
21
|
+
compressedSize: number;
|
|
22
|
+
entries: ArchiveEntry[];
|
|
23
|
+
}
|
|
24
|
+
interface ArchiveFile {
|
|
25
|
+
path: string;
|
|
26
|
+
content: Buffer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare function create(files: ArchiveFile[], options?: ArchiveCreateOptions): Promise<Uint8Array>;
|
|
30
|
+
|
|
31
|
+
declare function extract(file: Buffer | Uint8Array, options?: ArchiveExtractOptions): Promise<ArchiveFile[]>;
|
|
32
|
+
|
|
33
|
+
declare function list(file: Buffer | Uint8Array): Promise<ArchiveEntry[]>;
|
|
34
|
+
declare function getStats(file: Buffer | Uint8Array): Promise<ArchiveStats>;
|
|
35
|
+
|
|
36
|
+
type index_ArchiveCreateOptions = ArchiveCreateOptions;
|
|
37
|
+
type index_ArchiveEntry = ArchiveEntry;
|
|
38
|
+
type index_ArchiveExtractOptions = ArchiveExtractOptions;
|
|
39
|
+
type index_ArchiveFile = ArchiveFile;
|
|
40
|
+
type index_ArchiveFormat = ArchiveFormat;
|
|
41
|
+
type index_ArchiveStats = ArchiveStats;
|
|
42
|
+
declare const index_create: typeof create;
|
|
43
|
+
declare const index_extract: typeof extract;
|
|
44
|
+
declare const index_getStats: typeof getStats;
|
|
45
|
+
declare const index_list: typeof list;
|
|
46
|
+
declare namespace index {
|
|
47
|
+
export { type index_ArchiveCreateOptions as ArchiveCreateOptions, type index_ArchiveEntry as ArchiveEntry, type index_ArchiveExtractOptions as ArchiveExtractOptions, type index_ArchiveFile as ArchiveFile, type index_ArchiveFormat as ArchiveFormat, type index_ArchiveStats as ArchiveStats, index_create as create, index_extract as extract, index_getStats as getStats, index_list as list };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { type ArchiveCreateOptions as A, type ArchiveEntry as a, type ArchiveExtractOptions as b, type ArchiveFile as c, type ArchiveFormat as d, type ArchiveStats as e, create as f, extract as g, getStats as h, index as i, list as l };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
type ArchiveFormat = 'zip' | 'tar' | 'tar.gz';
|
|
2
|
+
interface ArchiveEntry {
|
|
3
|
+
path: string;
|
|
4
|
+
size: number;
|
|
5
|
+
compressedSize?: number;
|
|
6
|
+
isDirectory: boolean;
|
|
7
|
+
modified?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ArchiveCreateOptions {
|
|
10
|
+
format?: ArchiveFormat;
|
|
11
|
+
compressionLevel?: number;
|
|
12
|
+
}
|
|
13
|
+
interface ArchiveExtractOptions {
|
|
14
|
+
files?: string[];
|
|
15
|
+
}
|
|
16
|
+
interface ArchiveStats {
|
|
17
|
+
format: string;
|
|
18
|
+
fileCount: number;
|
|
19
|
+
directoryCount: number;
|
|
20
|
+
totalSize: number;
|
|
21
|
+
compressedSize: number;
|
|
22
|
+
entries: ArchiveEntry[];
|
|
23
|
+
}
|
|
24
|
+
interface ArchiveFile {
|
|
25
|
+
path: string;
|
|
26
|
+
content: Buffer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare function create(files: ArchiveFile[], options?: ArchiveCreateOptions): Promise<Uint8Array>;
|
|
30
|
+
|
|
31
|
+
declare function extract(file: Buffer | Uint8Array, options?: ArchiveExtractOptions): Promise<ArchiveFile[]>;
|
|
32
|
+
|
|
33
|
+
declare function list(file: Buffer | Uint8Array): Promise<ArchiveEntry[]>;
|
|
34
|
+
declare function getStats(file: Buffer | Uint8Array): Promise<ArchiveStats>;
|
|
35
|
+
|
|
36
|
+
type index_ArchiveCreateOptions = ArchiveCreateOptions;
|
|
37
|
+
type index_ArchiveEntry = ArchiveEntry;
|
|
38
|
+
type index_ArchiveExtractOptions = ArchiveExtractOptions;
|
|
39
|
+
type index_ArchiveFile = ArchiveFile;
|
|
40
|
+
type index_ArchiveFormat = ArchiveFormat;
|
|
41
|
+
type index_ArchiveStats = ArchiveStats;
|
|
42
|
+
declare const index_create: typeof create;
|
|
43
|
+
declare const index_extract: typeof extract;
|
|
44
|
+
declare const index_getStats: typeof getStats;
|
|
45
|
+
declare const index_list: typeof list;
|
|
46
|
+
declare namespace index {
|
|
47
|
+
export { type index_ArchiveCreateOptions as ArchiveCreateOptions, type index_ArchiveEntry as ArchiveEntry, type index_ArchiveExtractOptions as ArchiveExtractOptions, type index_ArchiveFile as ArchiveFile, type index_ArchiveFormat as ArchiveFormat, type index_ArchiveStats as ArchiveStats, index_create as create, index_extract as extract, index_getStats as getStats, index_list as list };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { type ArchiveCreateOptions as A, type ArchiveEntry as a, type ArchiveExtractOptions as b, type ArchiveFile as c, type ArchiveFormat as d, type ArchiveStats as e, create as f, extract as g, getStats as h, index as i, list as l };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
interface ParseOptions {
|
|
2
|
+
delimiter?: string;
|
|
3
|
+
header?: boolean;
|
|
4
|
+
skipRows?: number;
|
|
5
|
+
trimFields?: boolean;
|
|
6
|
+
dynamicTyping?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ParseResult {
|
|
9
|
+
data: Record<string, unknown>[];
|
|
10
|
+
headers: string[];
|
|
11
|
+
rowCount: number;
|
|
12
|
+
errors: ParseError[];
|
|
13
|
+
}
|
|
14
|
+
interface ParseError {
|
|
15
|
+
row: number;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
type FilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'startsWith' | 'endsWith' | 'matches' | 'isNull' | 'isNotNull';
|
|
19
|
+
interface Filter {
|
|
20
|
+
column: string;
|
|
21
|
+
operator: FilterOperator;
|
|
22
|
+
value?: unknown;
|
|
23
|
+
}
|
|
24
|
+
interface ColumnStats {
|
|
25
|
+
name: string;
|
|
26
|
+
type: 'string' | 'number' | 'boolean' | 'date' | 'mixed' | 'empty';
|
|
27
|
+
count: number;
|
|
28
|
+
nullCount: number;
|
|
29
|
+
uniqueCount: number;
|
|
30
|
+
min?: number | string;
|
|
31
|
+
max?: number | string;
|
|
32
|
+
mean?: number;
|
|
33
|
+
sum?: number;
|
|
34
|
+
topValues?: {
|
|
35
|
+
value: unknown;
|
|
36
|
+
count: number;
|
|
37
|
+
}[];
|
|
38
|
+
}
|
|
39
|
+
interface TransformOptions {
|
|
40
|
+
rename?: Record<string, string>;
|
|
41
|
+
select?: string[];
|
|
42
|
+
exclude?: string[];
|
|
43
|
+
derive?: Record<string, (row: Record<string, unknown>) => unknown>;
|
|
44
|
+
}
|
|
45
|
+
type ExportFormat = 'csv' | 'json' | 'jsonl' | 'tsv';
|
|
46
|
+
interface ExportOptions {
|
|
47
|
+
format: ExportFormat;
|
|
48
|
+
headers?: boolean;
|
|
49
|
+
delimiter?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare function parse(input: string, options?: ParseOptions): ParseResult;
|
|
53
|
+
declare function parseToArray(input: string, options?: ParseOptions): unknown[][];
|
|
54
|
+
declare function detectDelimiter(input: string): string;
|
|
55
|
+
declare function getHeaders(input: string, delimiter?: string): string[];
|
|
56
|
+
|
|
57
|
+
declare function filter(input: string, filters: Filter[]): string;
|
|
58
|
+
declare function filterData(data: Record<string, unknown>[], filters: Filter[]): Record<string, unknown>[];
|
|
59
|
+
declare function filterByColumn(input: string, column: string, operator: FilterOperator, value?: unknown): string;
|
|
60
|
+
|
|
61
|
+
declare function getStats(input: string): ColumnStats[];
|
|
62
|
+
declare function getStatsFromData(result: ParseResult): ColumnStats[];
|
|
63
|
+
declare function getColumnStats(input: string, column: string): ColumnStats | null;
|
|
64
|
+
|
|
65
|
+
declare function transform(input: string, options: TransformOptions): string;
|
|
66
|
+
declare function transformData(result: ParseResult, options: TransformOptions): ParseResult;
|
|
67
|
+
declare function sortData(data: Record<string, unknown>[], column: string, direction?: 'asc' | 'desc'): Record<string, unknown>[];
|
|
68
|
+
|
|
69
|
+
declare function exportData(input: string, options: ExportOptions): string;
|
|
70
|
+
declare function exportFromData(result: ParseResult, options: ExportOptions): string;
|
|
71
|
+
declare function toJson(input: string, pretty?: boolean): string;
|
|
72
|
+
declare function toJsonLines(input: string): string;
|
|
73
|
+
declare function toArray(input: string): Record<string, unknown>[];
|
|
74
|
+
|
|
75
|
+
type index_ColumnStats = ColumnStats;
|
|
76
|
+
type index_ExportFormat = ExportFormat;
|
|
77
|
+
type index_ExportOptions = ExportOptions;
|
|
78
|
+
type index_Filter = Filter;
|
|
79
|
+
type index_FilterOperator = FilterOperator;
|
|
80
|
+
type index_ParseError = ParseError;
|
|
81
|
+
type index_ParseOptions = ParseOptions;
|
|
82
|
+
type index_ParseResult = ParseResult;
|
|
83
|
+
type index_TransformOptions = TransformOptions;
|
|
84
|
+
declare const index_detectDelimiter: typeof detectDelimiter;
|
|
85
|
+
declare const index_exportData: typeof exportData;
|
|
86
|
+
declare const index_exportFromData: typeof exportFromData;
|
|
87
|
+
declare const index_filter: typeof filter;
|
|
88
|
+
declare const index_filterByColumn: typeof filterByColumn;
|
|
89
|
+
declare const index_filterData: typeof filterData;
|
|
90
|
+
declare const index_getColumnStats: typeof getColumnStats;
|
|
91
|
+
declare const index_getHeaders: typeof getHeaders;
|
|
92
|
+
declare const index_getStats: typeof getStats;
|
|
93
|
+
declare const index_getStatsFromData: typeof getStatsFromData;
|
|
94
|
+
declare const index_parse: typeof parse;
|
|
95
|
+
declare const index_parseToArray: typeof parseToArray;
|
|
96
|
+
declare const index_sortData: typeof sortData;
|
|
97
|
+
declare const index_toArray: typeof toArray;
|
|
98
|
+
declare const index_toJson: typeof toJson;
|
|
99
|
+
declare const index_toJsonLines: typeof toJsonLines;
|
|
100
|
+
declare const index_transform: typeof transform;
|
|
101
|
+
declare const index_transformData: typeof transformData;
|
|
102
|
+
declare namespace index {
|
|
103
|
+
export { type index_ColumnStats as ColumnStats, type index_ExportFormat as ExportFormat, type index_ExportOptions as ExportOptions, type index_Filter as Filter, type index_FilterOperator as FilterOperator, type index_ParseError as ParseError, type index_ParseOptions as ParseOptions, type index_ParseResult as ParseResult, type index_TransformOptions as TransformOptions, index_detectDelimiter as detectDelimiter, index_exportData as exportData, index_exportFromData as exportFromData, index_filter as filter, index_filterByColumn as filterByColumn, index_filterData as filterData, index_getColumnStats as getColumnStats, index_getHeaders as getHeaders, index_getStats as getStats, index_getStatsFromData as getStatsFromData, index_parse as parse, index_parseToArray as parseToArray, index_sortData as sortData, index_toArray as toArray, index_toJson as toJson, index_toJsonLines as toJsonLines, index_transform as transform, index_transformData as transformData };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { type ColumnStats as C, type ExportFormat as E, type Filter as F, type ParseError as P, type TransformOptions as T, type ExportOptions as a, type FilterOperator as b, type ParseOptions as c, type ParseResult as d, detectDelimiter as e, exportData as f, exportFromData as g, filter as h, index as i, filterByColumn as j, filterData as k, getColumnStats as l, getHeaders as m, getStats as n, getStatsFromData as o, parse as p, parseToArray as q, toJson as r, sortData as s, toArray as t, toJsonLines as u, transform as v, transformData as w };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
interface ParseOptions {
|
|
2
|
+
delimiter?: string;
|
|
3
|
+
header?: boolean;
|
|
4
|
+
skipRows?: number;
|
|
5
|
+
trimFields?: boolean;
|
|
6
|
+
dynamicTyping?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ParseResult {
|
|
9
|
+
data: Record<string, unknown>[];
|
|
10
|
+
headers: string[];
|
|
11
|
+
rowCount: number;
|
|
12
|
+
errors: ParseError[];
|
|
13
|
+
}
|
|
14
|
+
interface ParseError {
|
|
15
|
+
row: number;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
type FilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'startsWith' | 'endsWith' | 'matches' | 'isNull' | 'isNotNull';
|
|
19
|
+
interface Filter {
|
|
20
|
+
column: string;
|
|
21
|
+
operator: FilterOperator;
|
|
22
|
+
value?: unknown;
|
|
23
|
+
}
|
|
24
|
+
interface ColumnStats {
|
|
25
|
+
name: string;
|
|
26
|
+
type: 'string' | 'number' | 'boolean' | 'date' | 'mixed' | 'empty';
|
|
27
|
+
count: number;
|
|
28
|
+
nullCount: number;
|
|
29
|
+
uniqueCount: number;
|
|
30
|
+
min?: number | string;
|
|
31
|
+
max?: number | string;
|
|
32
|
+
mean?: number;
|
|
33
|
+
sum?: number;
|
|
34
|
+
topValues?: {
|
|
35
|
+
value: unknown;
|
|
36
|
+
count: number;
|
|
37
|
+
}[];
|
|
38
|
+
}
|
|
39
|
+
interface TransformOptions {
|
|
40
|
+
rename?: Record<string, string>;
|
|
41
|
+
select?: string[];
|
|
42
|
+
exclude?: string[];
|
|
43
|
+
derive?: Record<string, (row: Record<string, unknown>) => unknown>;
|
|
44
|
+
}
|
|
45
|
+
type ExportFormat = 'csv' | 'json' | 'jsonl' | 'tsv';
|
|
46
|
+
interface ExportOptions {
|
|
47
|
+
format: ExportFormat;
|
|
48
|
+
headers?: boolean;
|
|
49
|
+
delimiter?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare function parse(input: string, options?: ParseOptions): ParseResult;
|
|
53
|
+
declare function parseToArray(input: string, options?: ParseOptions): unknown[][];
|
|
54
|
+
declare function detectDelimiter(input: string): string;
|
|
55
|
+
declare function getHeaders(input: string, delimiter?: string): string[];
|
|
56
|
+
|
|
57
|
+
declare function filter(input: string, filters: Filter[]): string;
|
|
58
|
+
declare function filterData(data: Record<string, unknown>[], filters: Filter[]): Record<string, unknown>[];
|
|
59
|
+
declare function filterByColumn(input: string, column: string, operator: FilterOperator, value?: unknown): string;
|
|
60
|
+
|
|
61
|
+
declare function getStats(input: string): ColumnStats[];
|
|
62
|
+
declare function getStatsFromData(result: ParseResult): ColumnStats[];
|
|
63
|
+
declare function getColumnStats(input: string, column: string): ColumnStats | null;
|
|
64
|
+
|
|
65
|
+
declare function transform(input: string, options: TransformOptions): string;
|
|
66
|
+
declare function transformData(result: ParseResult, options: TransformOptions): ParseResult;
|
|
67
|
+
declare function sortData(data: Record<string, unknown>[], column: string, direction?: 'asc' | 'desc'): Record<string, unknown>[];
|
|
68
|
+
|
|
69
|
+
declare function exportData(input: string, options: ExportOptions): string;
|
|
70
|
+
declare function exportFromData(result: ParseResult, options: ExportOptions): string;
|
|
71
|
+
declare function toJson(input: string, pretty?: boolean): string;
|
|
72
|
+
declare function toJsonLines(input: string): string;
|
|
73
|
+
declare function toArray(input: string): Record<string, unknown>[];
|
|
74
|
+
|
|
75
|
+
type index_ColumnStats = ColumnStats;
|
|
76
|
+
type index_ExportFormat = ExportFormat;
|
|
77
|
+
type index_ExportOptions = ExportOptions;
|
|
78
|
+
type index_Filter = Filter;
|
|
79
|
+
type index_FilterOperator = FilterOperator;
|
|
80
|
+
type index_ParseError = ParseError;
|
|
81
|
+
type index_ParseOptions = ParseOptions;
|
|
82
|
+
type index_ParseResult = ParseResult;
|
|
83
|
+
type index_TransformOptions = TransformOptions;
|
|
84
|
+
declare const index_detectDelimiter: typeof detectDelimiter;
|
|
85
|
+
declare const index_exportData: typeof exportData;
|
|
86
|
+
declare const index_exportFromData: typeof exportFromData;
|
|
87
|
+
declare const index_filter: typeof filter;
|
|
88
|
+
declare const index_filterByColumn: typeof filterByColumn;
|
|
89
|
+
declare const index_filterData: typeof filterData;
|
|
90
|
+
declare const index_getColumnStats: typeof getColumnStats;
|
|
91
|
+
declare const index_getHeaders: typeof getHeaders;
|
|
92
|
+
declare const index_getStats: typeof getStats;
|
|
93
|
+
declare const index_getStatsFromData: typeof getStatsFromData;
|
|
94
|
+
declare const index_parse: typeof parse;
|
|
95
|
+
declare const index_parseToArray: typeof parseToArray;
|
|
96
|
+
declare const index_sortData: typeof sortData;
|
|
97
|
+
declare const index_toArray: typeof toArray;
|
|
98
|
+
declare const index_toJson: typeof toJson;
|
|
99
|
+
declare const index_toJsonLines: typeof toJsonLines;
|
|
100
|
+
declare const index_transform: typeof transform;
|
|
101
|
+
declare const index_transformData: typeof transformData;
|
|
102
|
+
declare namespace index {
|
|
103
|
+
export { type index_ColumnStats as ColumnStats, type index_ExportFormat as ExportFormat, type index_ExportOptions as ExportOptions, type index_Filter as Filter, type index_FilterOperator as FilterOperator, type index_ParseError as ParseError, type index_ParseOptions as ParseOptions, type index_ParseResult as ParseResult, type index_TransformOptions as TransformOptions, index_detectDelimiter as detectDelimiter, index_exportData as exportData, index_exportFromData as exportFromData, index_filter as filter, index_filterByColumn as filterByColumn, index_filterData as filterData, index_getColumnStats as getColumnStats, index_getHeaders as getHeaders, index_getStats as getStats, index_getStatsFromData as getStatsFromData, index_parse as parse, index_parseToArray as parseToArray, index_sortData as sortData, index_toArray as toArray, index_toJson as toJson, index_toJsonLines as toJsonLines, index_transform as transform, index_transformData as transformData };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { type ColumnStats as C, type ExportFormat as E, type Filter as F, type ParseError as P, type TransformOptions as T, type ExportOptions as a, type FilterOperator as b, type ParseOptions as c, type ParseResult as d, detectDelimiter as e, exportData as f, exportFromData as g, filter as h, index as i, filterByColumn as j, filterData as k, getColumnStats as l, getHeaders as m, getStats as n, getStatsFromData as o, parse as p, parseToArray as q, toJson as r, sortData as s, toArray as t, toJsonLines as u, transform as v, transformData as w };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
type HashAlgorithm = 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512';
|
|
2
|
+
type EncodingFormat = 'base64' | 'hex' | 'url' | 'html';
|
|
3
|
+
interface HashResult {
|
|
4
|
+
algorithm: HashAlgorithm;
|
|
5
|
+
hash: string;
|
|
6
|
+
inputLength: number;
|
|
7
|
+
}
|
|
8
|
+
interface HmacOptions {
|
|
9
|
+
algorithm?: HashAlgorithm;
|
|
10
|
+
}
|
|
11
|
+
interface HmacResult {
|
|
12
|
+
algorithm: HashAlgorithm;
|
|
13
|
+
hmac: string;
|
|
14
|
+
}
|
|
15
|
+
interface JwtPayload {
|
|
16
|
+
header: Record<string, unknown>;
|
|
17
|
+
payload: Record<string, unknown>;
|
|
18
|
+
signature: string;
|
|
19
|
+
expired?: boolean;
|
|
20
|
+
expiresAt?: string;
|
|
21
|
+
}
|
|
22
|
+
interface ChecksumResult {
|
|
23
|
+
algorithm: HashAlgorithm;
|
|
24
|
+
checksum: string;
|
|
25
|
+
sizeBytes: number;
|
|
26
|
+
}
|
|
27
|
+
interface UuidResult {
|
|
28
|
+
uuid: string;
|
|
29
|
+
version: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare function hash(input: string, algorithm?: HashAlgorithm): HashResult;
|
|
33
|
+
declare function hmac(input: string, key: string, options?: HmacOptions): HmacResult;
|
|
34
|
+
declare function checksum(data: Buffer | Uint8Array | string, algorithm?: HashAlgorithm): ChecksumResult;
|
|
35
|
+
declare function generateUuid(): UuidResult;
|
|
36
|
+
|
|
37
|
+
declare function encode(input: string, format: EncodingFormat): string;
|
|
38
|
+
declare function decode(input: string, format: EncodingFormat): string;
|
|
39
|
+
|
|
40
|
+
declare function decodeJwt(token: string): JwtPayload;
|
|
41
|
+
|
|
42
|
+
type index_ChecksumResult = ChecksumResult;
|
|
43
|
+
type index_EncodingFormat = EncodingFormat;
|
|
44
|
+
type index_HashAlgorithm = HashAlgorithm;
|
|
45
|
+
type index_HashResult = HashResult;
|
|
46
|
+
type index_HmacOptions = HmacOptions;
|
|
47
|
+
type index_HmacResult = HmacResult;
|
|
48
|
+
type index_JwtPayload = JwtPayload;
|
|
49
|
+
type index_UuidResult = UuidResult;
|
|
50
|
+
declare const index_checksum: typeof checksum;
|
|
51
|
+
declare const index_decode: typeof decode;
|
|
52
|
+
declare const index_decodeJwt: typeof decodeJwt;
|
|
53
|
+
declare const index_encode: typeof encode;
|
|
54
|
+
declare const index_generateUuid: typeof generateUuid;
|
|
55
|
+
declare const index_hash: typeof hash;
|
|
56
|
+
declare const index_hmac: typeof hmac;
|
|
57
|
+
declare namespace index {
|
|
58
|
+
export { type index_ChecksumResult as ChecksumResult, type index_EncodingFormat as EncodingFormat, type index_HashAlgorithm as HashAlgorithm, type index_HashResult as HashResult, type index_HmacOptions as HmacOptions, type index_HmacResult as HmacResult, type index_JwtPayload as JwtPayload, type index_UuidResult as UuidResult, index_checksum as checksum, index_decode as decode, index_decodeJwt as decodeJwt, index_encode as encode, index_generateUuid as generateUuid, index_hash as hash, index_hmac as hmac };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { type ChecksumResult as C, type EncodingFormat as E, type HashAlgorithm as H, type JwtPayload as J, type UuidResult as U, type HashResult as a, type HmacOptions as b, type HmacResult as c, checksum as d, decode as e, decodeJwt as f, encode as g, generateUuid as h, index as i, hash as j, hmac as k };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
type HashAlgorithm = 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512';
|
|
2
|
+
type EncodingFormat = 'base64' | 'hex' | 'url' | 'html';
|
|
3
|
+
interface HashResult {
|
|
4
|
+
algorithm: HashAlgorithm;
|
|
5
|
+
hash: string;
|
|
6
|
+
inputLength: number;
|
|
7
|
+
}
|
|
8
|
+
interface HmacOptions {
|
|
9
|
+
algorithm?: HashAlgorithm;
|
|
10
|
+
}
|
|
11
|
+
interface HmacResult {
|
|
12
|
+
algorithm: HashAlgorithm;
|
|
13
|
+
hmac: string;
|
|
14
|
+
}
|
|
15
|
+
interface JwtPayload {
|
|
16
|
+
header: Record<string, unknown>;
|
|
17
|
+
payload: Record<string, unknown>;
|
|
18
|
+
signature: string;
|
|
19
|
+
expired?: boolean;
|
|
20
|
+
expiresAt?: string;
|
|
21
|
+
}
|
|
22
|
+
interface ChecksumResult {
|
|
23
|
+
algorithm: HashAlgorithm;
|
|
24
|
+
checksum: string;
|
|
25
|
+
sizeBytes: number;
|
|
26
|
+
}
|
|
27
|
+
interface UuidResult {
|
|
28
|
+
uuid: string;
|
|
29
|
+
version: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare function hash(input: string, algorithm?: HashAlgorithm): HashResult;
|
|
33
|
+
declare function hmac(input: string, key: string, options?: HmacOptions): HmacResult;
|
|
34
|
+
declare function checksum(data: Buffer | Uint8Array | string, algorithm?: HashAlgorithm): ChecksumResult;
|
|
35
|
+
declare function generateUuid(): UuidResult;
|
|
36
|
+
|
|
37
|
+
declare function encode(input: string, format: EncodingFormat): string;
|
|
38
|
+
declare function decode(input: string, format: EncodingFormat): string;
|
|
39
|
+
|
|
40
|
+
declare function decodeJwt(token: string): JwtPayload;
|
|
41
|
+
|
|
42
|
+
type index_ChecksumResult = ChecksumResult;
|
|
43
|
+
type index_EncodingFormat = EncodingFormat;
|
|
44
|
+
type index_HashAlgorithm = HashAlgorithm;
|
|
45
|
+
type index_HashResult = HashResult;
|
|
46
|
+
type index_HmacOptions = HmacOptions;
|
|
47
|
+
type index_HmacResult = HmacResult;
|
|
48
|
+
type index_JwtPayload = JwtPayload;
|
|
49
|
+
type index_UuidResult = UuidResult;
|
|
50
|
+
declare const index_checksum: typeof checksum;
|
|
51
|
+
declare const index_decode: typeof decode;
|
|
52
|
+
declare const index_decodeJwt: typeof decodeJwt;
|
|
53
|
+
declare const index_encode: typeof encode;
|
|
54
|
+
declare const index_generateUuid: typeof generateUuid;
|
|
55
|
+
declare const index_hash: typeof hash;
|
|
56
|
+
declare const index_hmac: typeof hmac;
|
|
57
|
+
declare namespace index {
|
|
58
|
+
export { type index_ChecksumResult as ChecksumResult, type index_EncodingFormat as EncodingFormat, type index_HashAlgorithm as HashAlgorithm, type index_HashResult as HashResult, type index_HmacOptions as HmacOptions, type index_HmacResult as HmacResult, type index_JwtPayload as JwtPayload, type index_UuidResult as UuidResult, index_checksum as checksum, index_decode as decode, index_decodeJwt as decodeJwt, index_encode as encode, index_generateUuid as generateUuid, index_hash as hash, index_hmac as hmac };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { type ChecksumResult as C, type EncodingFormat as E, type HashAlgorithm as H, type JwtPayload as J, type UuidResult as U, type HashResult as a, type HmacOptions as b, type HmacResult as c, checksum as d, decode as e, decodeJwt as f, encode as g, generateUuid as h, index as i, hash as j, hmac as k };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type SqlDialect = 'mysql' | 'postgresql' | 'sqlite' | 'transactsql' | 'bigquery';
|
|
2
|
+
interface SqlFormatOptions {
|
|
3
|
+
dialect?: SqlDialect;
|
|
4
|
+
indent?: number;
|
|
5
|
+
uppercase?: boolean;
|
|
6
|
+
linesBetweenQueries?: number;
|
|
7
|
+
}
|
|
8
|
+
interface SqlValidationResult {
|
|
9
|
+
valid: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
ast?: unknown;
|
|
12
|
+
}
|
|
13
|
+
interface SqlParseResult {
|
|
14
|
+
type: string;
|
|
15
|
+
tables: string[];
|
|
16
|
+
columns: string[];
|
|
17
|
+
ast: unknown;
|
|
18
|
+
}
|
|
19
|
+
interface SqlConvertOptions {
|
|
20
|
+
from?: SqlDialect;
|
|
21
|
+
to: SqlDialect;
|
|
22
|
+
}
|
|
23
|
+
interface SqlStats {
|
|
24
|
+
queryCount: number;
|
|
25
|
+
queryTypes: Record<string, number>;
|
|
26
|
+
tables: string[];
|
|
27
|
+
joins: number;
|
|
28
|
+
subqueries: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare function format(input: string, options?: SqlFormatOptions): string;
|
|
32
|
+
declare function minify(input: string): string;
|
|
33
|
+
|
|
34
|
+
declare function parse(input: string, dialect?: SqlDialect): SqlParseResult;
|
|
35
|
+
declare function validate(input: string, dialect?: SqlDialect): SqlValidationResult;
|
|
36
|
+
declare function getStats(input: string, dialect?: SqlDialect): SqlStats;
|
|
37
|
+
|
|
38
|
+
declare function convert(input: string, options: SqlConvertOptions): string;
|
|
39
|
+
|
|
40
|
+
type index_SqlConvertOptions = SqlConvertOptions;
|
|
41
|
+
type index_SqlDialect = SqlDialect;
|
|
42
|
+
type index_SqlFormatOptions = SqlFormatOptions;
|
|
43
|
+
type index_SqlParseResult = SqlParseResult;
|
|
44
|
+
type index_SqlStats = SqlStats;
|
|
45
|
+
type index_SqlValidationResult = SqlValidationResult;
|
|
46
|
+
declare const index_convert: typeof convert;
|
|
47
|
+
declare const index_format: typeof format;
|
|
48
|
+
declare const index_getStats: typeof getStats;
|
|
49
|
+
declare const index_minify: typeof minify;
|
|
50
|
+
declare const index_parse: typeof parse;
|
|
51
|
+
declare const index_validate: typeof validate;
|
|
52
|
+
declare namespace index {
|
|
53
|
+
export { type index_SqlConvertOptions as SqlConvertOptions, type index_SqlDialect as SqlDialect, type index_SqlFormatOptions as SqlFormatOptions, type index_SqlParseResult as SqlParseResult, type index_SqlStats as SqlStats, type index_SqlValidationResult as SqlValidationResult, index_convert as convert, index_format as format, index_getStats as getStats, index_minify as minify, index_parse as parse, index_validate as validate };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { type SqlConvertOptions as S, type SqlDialect as a, type SqlFormatOptions as b, type SqlParseResult as c, type SqlStats as d, type SqlValidationResult as e, convert as f, format as g, getStats as h, index as i, minify as m, parse as p, validate as v };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type SqlDialect = 'mysql' | 'postgresql' | 'sqlite' | 'transactsql' | 'bigquery';
|
|
2
|
+
interface SqlFormatOptions {
|
|
3
|
+
dialect?: SqlDialect;
|
|
4
|
+
indent?: number;
|
|
5
|
+
uppercase?: boolean;
|
|
6
|
+
linesBetweenQueries?: number;
|
|
7
|
+
}
|
|
8
|
+
interface SqlValidationResult {
|
|
9
|
+
valid: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
ast?: unknown;
|
|
12
|
+
}
|
|
13
|
+
interface SqlParseResult {
|
|
14
|
+
type: string;
|
|
15
|
+
tables: string[];
|
|
16
|
+
columns: string[];
|
|
17
|
+
ast: unknown;
|
|
18
|
+
}
|
|
19
|
+
interface SqlConvertOptions {
|
|
20
|
+
from?: SqlDialect;
|
|
21
|
+
to: SqlDialect;
|
|
22
|
+
}
|
|
23
|
+
interface SqlStats {
|
|
24
|
+
queryCount: number;
|
|
25
|
+
queryTypes: Record<string, number>;
|
|
26
|
+
tables: string[];
|
|
27
|
+
joins: number;
|
|
28
|
+
subqueries: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare function format(input: string, options?: SqlFormatOptions): string;
|
|
32
|
+
declare function minify(input: string): string;
|
|
33
|
+
|
|
34
|
+
declare function parse(input: string, dialect?: SqlDialect): SqlParseResult;
|
|
35
|
+
declare function validate(input: string, dialect?: SqlDialect): SqlValidationResult;
|
|
36
|
+
declare function getStats(input: string, dialect?: SqlDialect): SqlStats;
|
|
37
|
+
|
|
38
|
+
declare function convert(input: string, options: SqlConvertOptions): string;
|
|
39
|
+
|
|
40
|
+
type index_SqlConvertOptions = SqlConvertOptions;
|
|
41
|
+
type index_SqlDialect = SqlDialect;
|
|
42
|
+
type index_SqlFormatOptions = SqlFormatOptions;
|
|
43
|
+
type index_SqlParseResult = SqlParseResult;
|
|
44
|
+
type index_SqlStats = SqlStats;
|
|
45
|
+
type index_SqlValidationResult = SqlValidationResult;
|
|
46
|
+
declare const index_convert: typeof convert;
|
|
47
|
+
declare const index_format: typeof format;
|
|
48
|
+
declare const index_getStats: typeof getStats;
|
|
49
|
+
declare const index_minify: typeof minify;
|
|
50
|
+
declare const index_parse: typeof parse;
|
|
51
|
+
declare const index_validate: typeof validate;
|
|
52
|
+
declare namespace index {
|
|
53
|
+
export { type index_SqlConvertOptions as SqlConvertOptions, type index_SqlDialect as SqlDialect, type index_SqlFormatOptions as SqlFormatOptions, type index_SqlParseResult as SqlParseResult, type index_SqlStats as SqlStats, type index_SqlValidationResult as SqlValidationResult, index_convert as convert, index_format as format, index_getStats as getStats, index_minify as minify, index_parse as parse, index_validate as validate };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { type SqlConvertOptions as S, type SqlDialect as a, type SqlFormatOptions as b, type SqlParseResult as c, type SqlStats as d, type SqlValidationResult as e, convert as f, format as g, getStats as h, index as i, minify as m, parse as p, validate as v };
|