@utilix-tech/sdk 0.53.0 → 0.55.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/CHANGELOG.md +8 -0
- package/README.md +35 -9
- package/dist/{chunk-3KIUADK4.js → chunk-56VFNHVO.js} +55 -1
- package/dist/{chunk-Y7YY733Z.js → chunk-DEBIH7QS.js} +58 -1
- package/dist/{chunk-K4ZERKBD.js → chunk-JW4NG2GN.js} +119 -1
- package/dist/{chunk-NKN656TQ.js → chunk-LI63MAZU.js} +39 -1
- package/dist/{code-B_gDkRAx.d.cts → code-rxidGgvB.d.cts} +28 -2
- package/dist/{code-B_gDkRAx.d.ts → code-rxidGgvB.d.ts} +28 -2
- package/dist/{data-CupeugaR.d.cts → data-Cvyg8ZXo.d.cts} +35 -2
- package/dist/{data-CupeugaR.d.ts → data-Cvyg8ZXo.d.ts} +35 -2
- package/dist/index.cjs +267 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/{network-DelcJeJa.d.cts → network-C6IcHeMB.d.cts} +51 -2
- package/dist/{network-DelcJeJa.d.ts → network-C6IcHeMB.d.ts} +51 -2
- package/dist/tools/code.cjs +118 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/data.cjs +54 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/network.cjs +57 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/units.cjs +38 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-p-1Ikx7l.d.cts → units-BM1l5LG9.d.cts} +37 -2
- package/dist/{units-p-1Ikx7l.d.ts → units-BM1l5LG9.d.ts} +37 -2
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* - gitignore-tester (testGitignorePatterns)
|
|
25
25
|
* - editorconfig-validator (validateEditorConfig)
|
|
26
26
|
* - tsconfig-validator (validateTsconfig)
|
|
27
|
+
* - package-json-exports-validator (validatePackageExports)
|
|
27
28
|
*/
|
|
28
29
|
type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
|
|
29
30
|
declare const ALL_FLAGS: RegexFlag[];
|
|
@@ -449,6 +450,27 @@ interface TsconfigValidationResult {
|
|
|
449
450
|
declare function validateTsconfig(text: string): TsconfigValidationResult | {
|
|
450
451
|
error: string;
|
|
451
452
|
};
|
|
453
|
+
interface ExportsIssue {
|
|
454
|
+
severity: 'error' | 'warning';
|
|
455
|
+
path: string;
|
|
456
|
+
message: string;
|
|
457
|
+
}
|
|
458
|
+
type ExportsShape = 'string' | 'array' | 'conditions' | 'subpaths' | 'null';
|
|
459
|
+
interface ExportsValidationResult {
|
|
460
|
+
parsed: true;
|
|
461
|
+
exportsShape: ExportsShape;
|
|
462
|
+
subpaths: string[];
|
|
463
|
+
issues: ExportsIssue[];
|
|
464
|
+
valid: boolean;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Validate a package.json's "exports" field: flag common dual-package
|
|
468
|
+
* (ESM/CJS) misconfigurations. Accepts the full package.json text (only the
|
|
469
|
+
* "exports" field is read).
|
|
470
|
+
*/
|
|
471
|
+
declare function validatePackageExports(packageJsonText: string): ExportsValidationResult | {
|
|
472
|
+
error: string;
|
|
473
|
+
};
|
|
452
474
|
|
|
453
475
|
declare const code_ALL_FLAGS: typeof ALL_FLAGS;
|
|
454
476
|
type code_ApiEndpoint = ApiEndpoint;
|
|
@@ -470,6 +492,9 @@ type code_EditorConfigSection = EditorConfigSection;
|
|
|
470
492
|
type code_EditorConfigValidationResult = EditorConfigValidationResult;
|
|
471
493
|
type code_EnvEntry = EnvEntry;
|
|
472
494
|
type code_EnvParseResult = EnvParseResult;
|
|
495
|
+
type code_ExportsIssue = ExportsIssue;
|
|
496
|
+
type code_ExportsShape = ExportsShape;
|
|
497
|
+
type code_ExportsValidationResult = ExportsValidationResult;
|
|
473
498
|
type code_GitCommandConfig = GitCommandConfig;
|
|
474
499
|
type code_GitCommandResult = GitCommandResult;
|
|
475
500
|
type code_GitOperation = GitOperation;
|
|
@@ -551,9 +576,10 @@ declare const code_testPattern: typeof testPattern;
|
|
|
551
576
|
declare const code_testRegex: typeof testRegex;
|
|
552
577
|
declare const code_validateEditorConfig: typeof validateEditorConfig;
|
|
553
578
|
declare const code_validateEnvKey: typeof validateEnvKey;
|
|
579
|
+
declare const code_validatePackageExports: typeof validatePackageExports;
|
|
554
580
|
declare const code_validateTsconfig: typeof validateTsconfig;
|
|
555
581
|
declare namespace code {
|
|
556
|
-
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateTsconfig as validateTsconfig };
|
|
582
|
+
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
|
|
557
583
|
}
|
|
558
584
|
|
|
559
|
-
export { type
|
|
585
|
+
export { type SqlDialect as $, ALL_FLAGS as A, type HtmlMinifyOptions as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type HtmlMinifyResult as F, type GitCommandConfig as G, type HtmlFormatResult as H, type JsMinifyResult as I, type JsMinifyOptions as J, type MatchResult as K, type MimeEntry as L, MIME_TABLE as M, type MimeLookupResult as N, OPERATIONS as O, type ParsedSpec as P, type RedosResult as Q, type RedosFinding as R, type RedosSeverity as S, type RegexError as T, type RegexFlag as U, type RegexMatch as V, type RegexResult as W, type RegexSuccess as X, SQL_DEFAULT_OPTIONS as Y, type Segment as Z, type SpecVersion as _, type ApiEndpoint as a, type SqlFormatOptions as a0, type TestPatternResult as a1, type TsconfigIssue as a2, type TsconfigValidationResult as a3, buildDockerPull as a4, buildDockerRun as a5, buildGitCommand as a6, collapseHtmlWhitespace as a7, collapseJsWhitespace as a8, countProperties as a9, parseGithubUrl as aA, parseSpec as aB, removeConsoleCalls as aC, removeEmptyAttributes as aD, removeHtmlComments as aE, removeJsComments as aF, removeRedundantAttributes as aG, searchCheatsheet as aH, searchEndpoints as aI, splitStatements as aJ, testGitignorePatterns as aK, testPattern as aL, testRegex as aM, validateEditorConfig as aN, validateEnvKey as aO, validatePackageExports as aP, validateTsconfig as aQ, countRules as aa, detectDialect as ab, detectOperationType as ac, detectRedos as ad, envToExport as ae, envToJson as af, formatCss as ag, formatGql as ah, formatHtml as ai, formatSql as aj, getEndpointsByTag as ak, getHtmlStats as al, getJsStats as am, getMethodColor as an, isValidTag as ao, lintConventionalCommit as ap, lookupMime as aq, minifyCss as ar, minifyGql as as, minifyHtml as at, minifyJs as au, minifySql as av, normalizeRef as aw, parseDockerImage as ax, parseEnv as ay, parseGitCommand as az, type ApiInfo as b, code as c, type CheatsheetEntry as d, type ConventionalCommitFinding as e, type ConventionalCommitFooter as f, type ConventionalCommitOptions as g, type ConventionalCommitParsed as h, type ConventionalCommitResult as i, type ConventionalCommitSeverity as j, type CssResult as k, type DockerImageRef as l, type EditorConfigProperty as m, type EditorConfigSection as n, type EditorConfigValidationResult as o, type EnvEntry as p, type EnvParseResult as q, type ExportsIssue as r, type ExportsShape as s, type ExportsValidationResult as t, type GitCommandResult as u, type GitOperation as v, type GithubUrlInfo as w, type GithubUrlType as x, type GitignoreTestResult as y, type GqlFormatResult as z };
|
|
@@ -405,6 +405,34 @@ interface CsvDuplicateResult {
|
|
|
405
405
|
declare function findCsvDuplicateRows(input: string, options?: CsvDuplicateOptions): CsvDuplicateResult | {
|
|
406
406
|
error: string;
|
|
407
407
|
};
|
|
408
|
+
type CsvColumnType = 'integer' | 'float' | 'boolean' | 'date' | 'string';
|
|
409
|
+
interface CsvColumnTypeOptions {
|
|
410
|
+
delimiter?: string;
|
|
411
|
+
hasHeader?: boolean;
|
|
412
|
+
}
|
|
413
|
+
interface CsvColumnTypeInfo {
|
|
414
|
+
name: string;
|
|
415
|
+
inferredType: CsvColumnType;
|
|
416
|
+
nullable: boolean;
|
|
417
|
+
nullCount: number;
|
|
418
|
+
totalCount: number;
|
|
419
|
+
sampleValues: string[];
|
|
420
|
+
}
|
|
421
|
+
interface CsvColumnTypeResult {
|
|
422
|
+
columns: CsvColumnTypeInfo[];
|
|
423
|
+
rowCount: number;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Parse CSV/TSV data and infer each column's data type (integer, float,
|
|
427
|
+
* boolean, ISO 8601 date, or string) by classifying every non-empty value
|
|
428
|
+
* and finding the tightest type that fits them all: all-integer values
|
|
429
|
+
* infer as integer, a mix of integers and decimals infers as float, and
|
|
430
|
+
* any value that doesn't fit a narrower type falls back to string. Empty
|
|
431
|
+
* cells don't affect the inferred type but do mark the column nullable.
|
|
432
|
+
*/
|
|
433
|
+
declare function inferCsvColumnTypes(input: string, options?: CsvColumnTypeOptions): CsvColumnTypeResult | {
|
|
434
|
+
error: string;
|
|
435
|
+
};
|
|
408
436
|
interface YamlAnchorInfo {
|
|
409
437
|
name: string;
|
|
410
438
|
line: number;
|
|
@@ -462,6 +490,10 @@ declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTa
|
|
|
462
490
|
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
463
491
|
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
464
492
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
493
|
+
type data_CsvColumnType = CsvColumnType;
|
|
494
|
+
type data_CsvColumnTypeInfo = CsvColumnTypeInfo;
|
|
495
|
+
type data_CsvColumnTypeOptions = CsvColumnTypeOptions;
|
|
496
|
+
type data_CsvColumnTypeResult = CsvColumnTypeResult;
|
|
465
497
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
466
498
|
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
467
499
|
type data_CsvDuplicateResult = CsvDuplicateResult;
|
|
@@ -516,6 +548,7 @@ declare const data_getSectionNames: typeof getSectionNames;
|
|
|
516
548
|
declare const data_getTomlStats: typeof getTomlStats;
|
|
517
549
|
declare const data_getXmlStats: typeof getXmlStats;
|
|
518
550
|
declare const data_getYamlStats: typeof getYamlStats;
|
|
551
|
+
declare const data_inferCsvColumnTypes: typeof inferCsvColumnTypes;
|
|
519
552
|
declare const data_iniToJson: typeof iniToJson;
|
|
520
553
|
declare const data_jsonArrayToNdjson: typeof jsonArrayToNdjson;
|
|
521
554
|
declare const data_jsonToIni: typeof jsonToIni;
|
|
@@ -546,7 +579,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
546
579
|
declare const data_validateYaml: typeof validateYaml;
|
|
547
580
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
548
581
|
declare namespace data {
|
|
549
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
582
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
550
583
|
}
|
|
551
584
|
|
|
552
|
-
export {
|
|
585
|
+
export { formatSubtitleTimestamp as $, type XmlToJsonOptions as A, type YamlAnchorResolveError as B, type CaptionSpeedCue as C, type YamlAnchorResolveResult as D, type EnvDiffError as E, type FrontMatterError as F, analyzeCaptionSpeed as G, calculateMarkdownTaskListProgress as H, type IniSection as I, convertSubtitles as J, csvToJson as K, csvToSqlInsert as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, detectDelimiter as O, type ParseOptions as P, detectSubtitleFormat as Q, diffEnvExample as R, type SubtitleCue as S, type TomlFormatResult as T, envToExport as U, type ValidationResult as V, envToJson as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, findCsvDuplicateRows as Z, formatNdjson as _, type CaptionSpeedResult as a, formatToml as a0, formatXml as a1, generateMarkdownToc as a2, getSection as a3, getSectionNames as a4, getTomlStats as a5, getXmlStats as a6, getYamlStats as a7, inferCsvColumnTypes as a8, iniToJson as a9, validateYaml as aA, xmlToJson as aB, jsonArrayToNdjson as aa, jsonToIni as ab, jsonToToml as ac, jsonToXml as ad, minifyNdjson as ae, minifyToml as af, minifyXml as ag, ndjsonToJsonArray as ah, parseCsv as ai, parseEnv as aj, parseFrontMatter as ak, parseIni as al, parseSubtitleTimestamp as am, parseSubtitles as an, parseXmlToObject as ao, resolveYamlAnchors as ap, serializeSubtitles as aq, shiftSubtitles as ar, stringifyIni as as, toCsvString as at, tomlToJson as au, validateEnvKey as av, validateIni as aw, validateNdjson as ax, validateToml as ay, validateXml as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTaskListProgressResult as r, type MarkdownTaskListSectionSummary as s, type MarkdownTocEntry as t, type MarkdownTocOptions as u, type MarkdownTocResult as v, type NdjsonValidateResult as w, type ParsedIni as x, type ParsedSubtitles as y, type SubtitleFormat as z };
|
|
@@ -405,6 +405,34 @@ interface CsvDuplicateResult {
|
|
|
405
405
|
declare function findCsvDuplicateRows(input: string, options?: CsvDuplicateOptions): CsvDuplicateResult | {
|
|
406
406
|
error: string;
|
|
407
407
|
};
|
|
408
|
+
type CsvColumnType = 'integer' | 'float' | 'boolean' | 'date' | 'string';
|
|
409
|
+
interface CsvColumnTypeOptions {
|
|
410
|
+
delimiter?: string;
|
|
411
|
+
hasHeader?: boolean;
|
|
412
|
+
}
|
|
413
|
+
interface CsvColumnTypeInfo {
|
|
414
|
+
name: string;
|
|
415
|
+
inferredType: CsvColumnType;
|
|
416
|
+
nullable: boolean;
|
|
417
|
+
nullCount: number;
|
|
418
|
+
totalCount: number;
|
|
419
|
+
sampleValues: string[];
|
|
420
|
+
}
|
|
421
|
+
interface CsvColumnTypeResult {
|
|
422
|
+
columns: CsvColumnTypeInfo[];
|
|
423
|
+
rowCount: number;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Parse CSV/TSV data and infer each column's data type (integer, float,
|
|
427
|
+
* boolean, ISO 8601 date, or string) by classifying every non-empty value
|
|
428
|
+
* and finding the tightest type that fits them all: all-integer values
|
|
429
|
+
* infer as integer, a mix of integers and decimals infers as float, and
|
|
430
|
+
* any value that doesn't fit a narrower type falls back to string. Empty
|
|
431
|
+
* cells don't affect the inferred type but do mark the column nullable.
|
|
432
|
+
*/
|
|
433
|
+
declare function inferCsvColumnTypes(input: string, options?: CsvColumnTypeOptions): CsvColumnTypeResult | {
|
|
434
|
+
error: string;
|
|
435
|
+
};
|
|
408
436
|
interface YamlAnchorInfo {
|
|
409
437
|
name: string;
|
|
410
438
|
line: number;
|
|
@@ -462,6 +490,10 @@ declare function calculateMarkdownTaskListProgress(markdown: string): MarkdownTa
|
|
|
462
490
|
type data_CaptionSpeedCue = CaptionSpeedCue;
|
|
463
491
|
type data_CaptionSpeedResult = CaptionSpeedResult;
|
|
464
492
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
493
|
+
type data_CsvColumnType = CsvColumnType;
|
|
494
|
+
type data_CsvColumnTypeInfo = CsvColumnTypeInfo;
|
|
495
|
+
type data_CsvColumnTypeOptions = CsvColumnTypeOptions;
|
|
496
|
+
type data_CsvColumnTypeResult = CsvColumnTypeResult;
|
|
465
497
|
type data_CsvDuplicateGroup = CsvDuplicateGroup;
|
|
466
498
|
type data_CsvDuplicateOptions = CsvDuplicateOptions;
|
|
467
499
|
type data_CsvDuplicateResult = CsvDuplicateResult;
|
|
@@ -516,6 +548,7 @@ declare const data_getSectionNames: typeof getSectionNames;
|
|
|
516
548
|
declare const data_getTomlStats: typeof getTomlStats;
|
|
517
549
|
declare const data_getXmlStats: typeof getXmlStats;
|
|
518
550
|
declare const data_getYamlStats: typeof getYamlStats;
|
|
551
|
+
declare const data_inferCsvColumnTypes: typeof inferCsvColumnTypes;
|
|
519
552
|
declare const data_iniToJson: typeof iniToJson;
|
|
520
553
|
declare const data_jsonArrayToNdjson: typeof jsonArrayToNdjson;
|
|
521
554
|
declare const data_jsonToIni: typeof jsonToIni;
|
|
@@ -546,7 +579,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
546
579
|
declare const data_validateYaml: typeof validateYaml;
|
|
547
580
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
548
581
|
declare namespace data {
|
|
549
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
582
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
550
583
|
}
|
|
551
584
|
|
|
552
|
-
export {
|
|
585
|
+
export { formatSubtitleTimestamp as $, type XmlToJsonOptions as A, type YamlAnchorResolveError as B, type CaptionSpeedCue as C, type YamlAnchorResolveResult as D, type EnvDiffError as E, type FrontMatterError as F, analyzeCaptionSpeed as G, calculateMarkdownTaskListProgress as H, type IniSection as I, convertSubtitles as J, csvToJson as K, csvToSqlInsert as L, type MarkdownTaskListItem as M, type NdjsonLineResult as N, detectDelimiter as O, type ParseOptions as P, detectSubtitleFormat as Q, diffEnvExample as R, type SubtitleCue as S, type TomlFormatResult as T, envToExport as U, type ValidationResult as V, envToJson as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, findCsvDuplicateRows as Z, formatNdjson as _, type CaptionSpeedResult as a, formatToml as a0, formatXml as a1, generateMarkdownToc as a2, getSection as a3, getSectionNames as a4, getTomlStats as a5, getXmlStats as a6, getYamlStats as a7, inferCsvColumnTypes as a8, iniToJson as a9, validateYaml as aA, xmlToJson as aB, jsonArrayToNdjson as aa, jsonToIni as ab, jsonToToml as ac, jsonToXml as ad, minifyNdjson as ae, minifyToml as af, minifyXml as ag, ndjsonToJsonArray as ah, parseCsv as ai, parseEnv as aj, parseFrontMatter as ak, parseIni as al, parseSubtitleTimestamp as am, parseSubtitles as an, parseXmlToObject as ao, resolveYamlAnchors as ap, serializeSubtitles as aq, shiftSubtitles as ar, stringifyIni as as, toCsvString as at, tomlToJson as au, validateEnvKey as av, validateIni as aw, validateNdjson as ax, validateToml as ay, validateXml as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTaskListProgressResult as r, type MarkdownTaskListSectionSummary as s, type MarkdownTocEntry as t, type MarkdownTocOptions as u, type MarkdownTocResult as v, type NdjsonValidateResult as w, type ParsedIni as x, type ParsedSubtitles as y, type SubtitleFormat as z };
|
package/dist/index.cjs
CHANGED
|
@@ -5172,6 +5172,7 @@ __export(data_exports, {
|
|
|
5172
5172
|
getTomlStats: () => getTomlStats,
|
|
5173
5173
|
getXmlStats: () => getXmlStats,
|
|
5174
5174
|
getYamlStats: () => getYamlStats,
|
|
5175
|
+
inferCsvColumnTypes: () => inferCsvColumnTypes,
|
|
5175
5176
|
iniToJson: () => iniToJson,
|
|
5176
5177
|
jsonArrayToNdjson: () => jsonArrayToNdjson,
|
|
5177
5178
|
jsonToIni: () => jsonToIni,
|
|
@@ -6756,6 +6757,59 @@ function findCsvDuplicateRows(input, options) {
|
|
|
6756
6757
|
uniqueRowCount: parsed.rows.length - duplicateRowCount + duplicateGroups.length
|
|
6757
6758
|
};
|
|
6758
6759
|
}
|
|
6760
|
+
var _ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/;
|
|
6761
|
+
function _classifyCsvValue(raw) {
|
|
6762
|
+
const v = raw.trim();
|
|
6763
|
+
if (v === "") return "empty";
|
|
6764
|
+
if (/^(true|false)$/i.test(v)) return "boolean";
|
|
6765
|
+
if (/^-?\d+$/.test(v)) return "integer";
|
|
6766
|
+
if (/^-?\d+\.\d+$/.test(v)) return "float";
|
|
6767
|
+
if (_ISO_DATE_RE.test(v)) return "date";
|
|
6768
|
+
return "string";
|
|
6769
|
+
}
|
|
6770
|
+
function inferCsvColumnTypes(input, options) {
|
|
6771
|
+
const parsed = parseCsv(input, {
|
|
6772
|
+
delimiter: options?.delimiter ?? ",",
|
|
6773
|
+
hasHeader: options?.hasHeader !== false
|
|
6774
|
+
});
|
|
6775
|
+
if ("error" in parsed) return parsed;
|
|
6776
|
+
const columns = parsed.headers.map((name, colIdx) => {
|
|
6777
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6778
|
+
let sawString = false;
|
|
6779
|
+
let nullCount = 0;
|
|
6780
|
+
const sampleValues = [];
|
|
6781
|
+
for (const row of parsed.rows) {
|
|
6782
|
+
const raw = row[colIdx] ?? "";
|
|
6783
|
+
const kind = _classifyCsvValue(raw);
|
|
6784
|
+
if (kind === "empty") {
|
|
6785
|
+
nullCount++;
|
|
6786
|
+
continue;
|
|
6787
|
+
}
|
|
6788
|
+
if (sampleValues.length < 3) sampleValues.push(raw);
|
|
6789
|
+
if (kind === "string") sawString = true;
|
|
6790
|
+
else seen.add(kind);
|
|
6791
|
+
}
|
|
6792
|
+
let inferredType;
|
|
6793
|
+
if (sawString || seen.size === 0) {
|
|
6794
|
+
inferredType = "string";
|
|
6795
|
+
} else if (seen.size === 1) {
|
|
6796
|
+
inferredType = [...seen][0];
|
|
6797
|
+
} else if (seen.has("integer") && seen.has("float") && seen.size === 2) {
|
|
6798
|
+
inferredType = "float";
|
|
6799
|
+
} else {
|
|
6800
|
+
inferredType = "string";
|
|
6801
|
+
}
|
|
6802
|
+
return {
|
|
6803
|
+
name,
|
|
6804
|
+
inferredType,
|
|
6805
|
+
nullable: nullCount > 0,
|
|
6806
|
+
nullCount,
|
|
6807
|
+
totalCount: parsed.rows.length,
|
|
6808
|
+
sampleValues
|
|
6809
|
+
};
|
|
6810
|
+
});
|
|
6811
|
+
return { columns, rowCount: parsed.rows.length };
|
|
6812
|
+
}
|
|
6759
6813
|
var _YAML_ANCHOR_RE = /(?:^|\s)&([A-Za-z0-9_.-]+)/g;
|
|
6760
6814
|
var _YAML_ALIAS_RE = /(?:^|\s)\*([A-Za-z0-9_.-]+)/g;
|
|
6761
6815
|
function _stripYamlLineComment(line) {
|
|
@@ -8291,6 +8345,7 @@ __export(units_exports, {
|
|
|
8291
8345
|
calculateChange: () => calculateChange,
|
|
8292
8346
|
calculateCompoundInterest: () => calculateCompoundInterest,
|
|
8293
8347
|
calculateCreditUtilization: () => calculateCreditUtilization,
|
|
8348
|
+
calculateDebtToIncomeRatio: () => calculateDebtToIncomeRatio,
|
|
8294
8349
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
8295
8350
|
calculateDiscount: () => calculateDiscount,
|
|
8296
8351
|
calculateEmi: () => calculateEmi,
|
|
@@ -10496,6 +10551,43 @@ function calculateCreditUtilization(accounts) {
|
|
|
10496
10551
|
overallTier: _classifyUtilization(overallUtilizationPercent)
|
|
10497
10552
|
};
|
|
10498
10553
|
}
|
|
10554
|
+
function _classifyDti(percent) {
|
|
10555
|
+
if (percent < 36) return "healthy";
|
|
10556
|
+
if (percent < 43) return "moderate";
|
|
10557
|
+
if (percent < 50) return "high";
|
|
10558
|
+
return "severe";
|
|
10559
|
+
}
|
|
10560
|
+
function calculateDebtToIncomeRatio(debts, grossMonthlyIncome) {
|
|
10561
|
+
if (!Array.isArray(debts) || debts.length === 0) {
|
|
10562
|
+
return { error: "debts must be a non-empty array" };
|
|
10563
|
+
}
|
|
10564
|
+
if (typeof grossMonthlyIncome !== "number" || !Number.isFinite(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
|
|
10565
|
+
return { error: "grossMonthlyIncome must be a finite number greater than zero" };
|
|
10566
|
+
}
|
|
10567
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10568
|
+
let totalMonthlyDebt = 0;
|
|
10569
|
+
const results = [];
|
|
10570
|
+
for (let i = 0; i < debts.length; i++) {
|
|
10571
|
+
const debt = debts[i];
|
|
10572
|
+
if (typeof debt.amount !== "number" || !Number.isFinite(debt.amount) || debt.amount < 0) {
|
|
10573
|
+
return { error: `debt ${i + 1}: amount must be a finite, non-negative number` };
|
|
10574
|
+
}
|
|
10575
|
+
totalMonthlyDebt += debt.amount;
|
|
10576
|
+
results.push({
|
|
10577
|
+
label: debt.label?.trim() || `Debt ${i + 1}`,
|
|
10578
|
+
amount: debt.amount,
|
|
10579
|
+
percentOfIncome: round23(debt.amount / grossMonthlyIncome * 100)
|
|
10580
|
+
});
|
|
10581
|
+
}
|
|
10582
|
+
const dtiPercent = round23(totalMonthlyDebt / grossMonthlyIncome * 100);
|
|
10583
|
+
return {
|
|
10584
|
+
debts: results,
|
|
10585
|
+
totalMonthlyDebt: round23(totalMonthlyDebt),
|
|
10586
|
+
grossMonthlyIncome,
|
|
10587
|
+
dtiPercent,
|
|
10588
|
+
tier: _classifyDti(dtiPercent)
|
|
10589
|
+
};
|
|
10590
|
+
}
|
|
10499
10591
|
|
|
10500
10592
|
// src/tools/network.ts
|
|
10501
10593
|
var network_exports = {};
|
|
@@ -10507,7 +10599,9 @@ __export(network_exports, {
|
|
|
10507
10599
|
PERMISSIONS_POLICY_FEATURES: () => PERMISSIONS_POLICY_FEATURES,
|
|
10508
10600
|
REFERRER_POLICY_VALUES: () => REFERRER_POLICY_VALUES,
|
|
10509
10601
|
STATUS_CODES: () => STATUS_CODES,
|
|
10602
|
+
X_CONTENT_TYPE_OPTIONS_HEADER: () => X_CONTENT_TYPE_OPTIONS_HEADER,
|
|
10510
10603
|
analyzeEmailHeaders: () => analyzeEmailHeaders,
|
|
10604
|
+
assessContentTypeRisk: () => assessContentTypeRisk,
|
|
10511
10605
|
buildCacheControl: () => buildCacheControl,
|
|
10512
10606
|
buildClientHints: () => buildClientHints,
|
|
10513
10607
|
buildContentDisposition: () => buildContentDisposition,
|
|
@@ -10519,6 +10613,7 @@ __export(network_exports, {
|
|
|
10519
10613
|
buildRangeHeader: () => buildRangeHeader,
|
|
10520
10614
|
buildReferrerPolicy: () => buildReferrerPolicy,
|
|
10521
10615
|
buildVaryHeader: () => buildVaryHeader,
|
|
10616
|
+
buildXContentTypeOptionsHeader: () => buildXContentTypeOptionsHeader,
|
|
10522
10617
|
checkSetCookieHeader: () => checkSetCookieHeader,
|
|
10523
10618
|
countryCodeToFlag: () => countryCodeToFlag,
|
|
10524
10619
|
formatCoordinates: () => formatCoordinates,
|
|
@@ -10544,6 +10639,7 @@ __export(network_exports, {
|
|
|
10544
10639
|
parsePermissionsPolicy: () => parsePermissionsPolicy,
|
|
10545
10640
|
parseUserAgent: () => parseUserAgent,
|
|
10546
10641
|
parseVaryHeader: () => parseVaryHeader,
|
|
10642
|
+
parseXContentTypeOptionsHeader: () => parseXContentTypeOptionsHeader,
|
|
10547
10643
|
searchHeaders: () => searchHeaders,
|
|
10548
10644
|
searchStatusCodes: () => searchStatusCodes,
|
|
10549
10645
|
splitSitemap: () => splitSitemap,
|
|
@@ -13272,6 +13368,59 @@ function parseContentDisposition(header) {
|
|
|
13272
13368
|
}
|
|
13273
13369
|
return { type, filename, filenameIsExtended, params };
|
|
13274
13370
|
}
|
|
13371
|
+
var X_CONTENT_TYPE_OPTIONS_HEADER = "X-Content-Type-Options: nosniff";
|
|
13372
|
+
function buildXContentTypeOptionsHeader() {
|
|
13373
|
+
return {
|
|
13374
|
+
header: X_CONTENT_TYPE_OPTIONS_HEADER,
|
|
13375
|
+
value: "nosniff",
|
|
13376
|
+
explanation: `Tells the browser to strictly honor the declared Content-Type header instead of "sniffing" a response's bytes to guess its real type. Without it, a browser that decides an oddly-typed response looks like HTML or JavaScript may render or execute it, letting a file that was only ever meant to be downloaded or displayed as plain text be used to run a cross-site scripting attack.`
|
|
13377
|
+
};
|
|
13378
|
+
}
|
|
13379
|
+
function parseXContentTypeOptionsHeader(rawHeader) {
|
|
13380
|
+
if (typeof rawHeader !== "string" || rawHeader.trim() === "") return { error: "Provide a header line or value to check" };
|
|
13381
|
+
const withoutLabel = rawHeader.trim().replace(/^x-content-type-options\s*:\s*/i, "");
|
|
13382
|
+
const value = withoutLabel.trim();
|
|
13383
|
+
if (value.toLowerCase() === "nosniff") {
|
|
13384
|
+
return { raw: value, valid: true, message: "Valid. The browser will not MIME-sniff this response." };
|
|
13385
|
+
}
|
|
13386
|
+
if (value === "") {
|
|
13387
|
+
return { error: 'No value found after "X-Content-Type-Options:"' };
|
|
13388
|
+
}
|
|
13389
|
+
return { raw: value, valid: false, message: `"${value}" is not a recognized value. The only value browsers act on is "nosniff" (case-insensitive); anything else is silently ignored, same as omitting the header.` };
|
|
13390
|
+
}
|
|
13391
|
+
var X_CONTENT_TYPE_EXACT_RISK_TABLE = {
|
|
13392
|
+
"text/plain": { risk: "high", reason: "Browsers historically sniff text/plain responses and may render them as HTML if the body looks like markup, letting user-controlled text (comments, error pages, logs) execute as script." },
|
|
13393
|
+
"application/octet-stream": { risk: "high", reason: "A generic fallback type with no format hint, so browsers are the most likely to sniff its real content and may render it as HTML." },
|
|
13394
|
+
"": { risk: "high", reason: "A missing Content-Type header gives the browser nothing to trust, so it falls back to sniffing the response body entirely." }
|
|
13395
|
+
};
|
|
13396
|
+
var X_CONTENT_TYPE_PREFIX_RISK_TABLE = [
|
|
13397
|
+
{ prefix: "text/html", risk: "medium", reason: "Already interpreted as HTML, so sniffing mostly matters if the type is wrong on purpose; nosniff still protects against a mismatched charset or embedded polyglot content." },
|
|
13398
|
+
{ prefix: "image/", risk: "low", reason: 'Browsers rarely upgrade an image response to HTML, but a crafted "GIFAR"-style polyglot file can still be sniffed as HTML in older engines.' },
|
|
13399
|
+
{ prefix: "audio/", risk: "low", reason: "Media types are rarely reinterpreted as HTML by modern sniffing algorithms." },
|
|
13400
|
+
{ prefix: "video/", risk: "low", reason: "Media types are rarely reinterpreted as HTML by modern sniffing algorithms." },
|
|
13401
|
+
{ prefix: "font/", risk: "low", reason: "Font types are rarely reinterpreted as HTML by modern sniffing algorithms." },
|
|
13402
|
+
{ prefix: "application/pdf", risk: "low", reason: "PDF has a strong magic-number signature, so sniffing rarely reclassifies it, though nosniff is still worth setting for user-uploaded PDFs." },
|
|
13403
|
+
{ prefix: "application/json", risk: "medium", reason: "Structurally distinct from HTML, but user-controlled JSONP-style responses served with a wrong or missing type have been used in real sniffing attacks." },
|
|
13404
|
+
{ prefix: "application/javascript", risk: "medium", reason: "Already executable; nosniff mainly protects against it being served where a script tag was not expected, such as inside an <img> or <object> tag." },
|
|
13405
|
+
{ prefix: "application/xml", risk: "medium", reason: "XML can be reinterpreted in ways that overlap with HTML/XHTML parsing in some legacy sniffing paths." }
|
|
13406
|
+
];
|
|
13407
|
+
function assessContentTypeRisk(contentType) {
|
|
13408
|
+
if (typeof contentType !== "string") return { error: "contentType must be a string" };
|
|
13409
|
+
const normalized = contentType.trim().toLowerCase().split(";")[0].trim();
|
|
13410
|
+
if (normalized in X_CONTENT_TYPE_EXACT_RISK_TABLE) {
|
|
13411
|
+
const entry = X_CONTENT_TYPE_EXACT_RISK_TABLE[normalized];
|
|
13412
|
+
return { contentType: contentType.trim() || "(empty)", risk: entry.risk, reason: entry.reason };
|
|
13413
|
+
}
|
|
13414
|
+
const prefixMatch = X_CONTENT_TYPE_PREFIX_RISK_TABLE.find((e) => normalized.startsWith(e.prefix));
|
|
13415
|
+
if (prefixMatch) {
|
|
13416
|
+
return { contentType: contentType.trim(), risk: prefixMatch.risk, reason: prefixMatch.reason };
|
|
13417
|
+
}
|
|
13418
|
+
return {
|
|
13419
|
+
contentType: contentType.trim(),
|
|
13420
|
+
risk: "medium",
|
|
13421
|
+
reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
|
|
13422
|
+
};
|
|
13423
|
+
}
|
|
13275
13424
|
|
|
13276
13425
|
// src/tools/api.ts
|
|
13277
13426
|
var api_exports = {};
|
|
@@ -14637,6 +14786,7 @@ __export(code_exports, {
|
|
|
14637
14786
|
testRegex: () => testRegex,
|
|
14638
14787
|
validateEditorConfig: () => validateEditorConfig,
|
|
14639
14788
|
validateEnvKey: () => validateEnvKey2,
|
|
14789
|
+
validatePackageExports: () => validatePackageExports,
|
|
14640
14790
|
validateTsconfig: () => validateTsconfig
|
|
14641
14791
|
});
|
|
14642
14792
|
var ALL_FLAGS = ["g", "i", "m", "s", "u"];
|
|
@@ -17856,6 +18006,123 @@ function validateTsconfig(text) {
|
|
|
17856
18006
|
const valid = !issues.some((i) => i.severity === "error");
|
|
17857
18007
|
return { parsed: true, topLevelKeys, compilerOptionKeys, issues, valid };
|
|
17858
18008
|
}
|
|
18009
|
+
function collectExportsStringLeaves(value, out = []) {
|
|
18010
|
+
if (typeof value === "string") out.push(value);
|
|
18011
|
+
else if (Array.isArray(value)) value.forEach((v) => collectExportsStringLeaves(v, out));
|
|
18012
|
+
else if (value && typeof value === "object") Object.values(value).forEach((v) => collectExportsStringLeaves(v, out));
|
|
18013
|
+
return out;
|
|
18014
|
+
}
|
|
18015
|
+
function checkExportsPatternMatch(key, value, path, issues) {
|
|
18016
|
+
const keyHasStar = key.includes("*");
|
|
18017
|
+
const leaves = collectExportsStringLeaves(value);
|
|
18018
|
+
if (keyHasStar) {
|
|
18019
|
+
const bad = leaves.filter((l) => !l.includes("*"));
|
|
18020
|
+
if (bad.length > 0) {
|
|
18021
|
+
issues.push({ severity: "error", path, message: `pattern key "${key}" contains "*" but target ${bad.map((l) => `"${l}"`).join(", ")} has no "*" to receive the matched text` });
|
|
18022
|
+
}
|
|
18023
|
+
} else {
|
|
18024
|
+
const bad = leaves.filter((l) => l.includes("*"));
|
|
18025
|
+
if (bad.length > 0) {
|
|
18026
|
+
issues.push({ severity: "error", path, message: `target ${bad.map((l) => `"${l}"`).join(", ")} contains "*" but key "${key}" has no "*" pattern to match against` });
|
|
18027
|
+
}
|
|
18028
|
+
}
|
|
18029
|
+
}
|
|
18030
|
+
function validateExportsValue(value, path, issues) {
|
|
18031
|
+
if (value === null) return;
|
|
18032
|
+
if (typeof value === "string") {
|
|
18033
|
+
if (!value.startsWith("./")) {
|
|
18034
|
+
issues.push({ severity: "error", path, message: `target "${value}" must start with "./"` });
|
|
18035
|
+
}
|
|
18036
|
+
return;
|
|
18037
|
+
}
|
|
18038
|
+
if (Array.isArray(value)) {
|
|
18039
|
+
if (value.length === 0) {
|
|
18040
|
+
issues.push({ severity: "warning", path, message: "empty fallback array will never resolve" });
|
|
18041
|
+
}
|
|
18042
|
+
value.forEach((v, i) => validateExportsValue(v, `${path}[${i}]`, issues));
|
|
18043
|
+
return;
|
|
18044
|
+
}
|
|
18045
|
+
if (typeof value === "object") {
|
|
18046
|
+
const obj = value;
|
|
18047
|
+
const keys = Object.keys(obj);
|
|
18048
|
+
if (keys.length === 0) {
|
|
18049
|
+
issues.push({ severity: "warning", path, message: "empty object will never resolve" });
|
|
18050
|
+
return;
|
|
18051
|
+
}
|
|
18052
|
+
const hasDotKeys = keys.some((k) => k.startsWith("."));
|
|
18053
|
+
const hasNonDotKeys = keys.some((k) => !k.startsWith("."));
|
|
18054
|
+
if (hasDotKeys && hasNonDotKeys) {
|
|
18055
|
+
issues.push({ severity: "error", path, message: 'cannot mix subpath keys (starting with ".") with condition keys in the same object' });
|
|
18056
|
+
return;
|
|
18057
|
+
}
|
|
18058
|
+
if (hasDotKeys) {
|
|
18059
|
+
for (const key of keys) {
|
|
18060
|
+
const subpath = `${path}["${key}"]`;
|
|
18061
|
+
if (key !== "." && !key.startsWith("./")) {
|
|
18062
|
+
issues.push({ severity: "error", path: subpath, message: `subpath key "${key}" must be "." or start with "./"` });
|
|
18063
|
+
}
|
|
18064
|
+
checkExportsPatternMatch(key, obj[key], subpath, issues);
|
|
18065
|
+
validateExportsValue(obj[key], subpath, issues);
|
|
18066
|
+
}
|
|
18067
|
+
return;
|
|
18068
|
+
}
|
|
18069
|
+
if (keys.includes("types") && keys[0] !== "types") {
|
|
18070
|
+
issues.push({ severity: "warning", path, message: '"types" condition should be listed first so TypeScript resolves it before any other condition matches' });
|
|
18071
|
+
}
|
|
18072
|
+
if (keys.includes("default") && keys[keys.length - 1] !== "default") {
|
|
18073
|
+
issues.push({ severity: "warning", path, message: '"default" condition should be listed last; conditions are matched in order and anything after "default" is unreachable' });
|
|
18074
|
+
}
|
|
18075
|
+
if ((keys.includes("import") || keys.includes("require")) && !keys.includes("default")) {
|
|
18076
|
+
issues.push({ severity: "warning", path, message: 'no "default" fallback condition; resolution fails for any importer using a condition not listed here' });
|
|
18077
|
+
}
|
|
18078
|
+
const requireVal = obj.require;
|
|
18079
|
+
if (typeof requireVal === "string" && requireVal.endsWith(".mjs")) {
|
|
18080
|
+
issues.push({ severity: "error", path: `${path}.require`, message: `"require" condition points to a .mjs file ("${requireVal}"), but .mjs is always treated as ESM and cannot be required` });
|
|
18081
|
+
}
|
|
18082
|
+
const importVal = obj.import;
|
|
18083
|
+
if (typeof importVal === "string" && importVal.endsWith(".cjs")) {
|
|
18084
|
+
issues.push({ severity: "error", path: `${path}.import`, message: `"import" condition points to a .cjs file ("${importVal}"), but .cjs is always treated as CommonJS and cannot be imported as ESM` });
|
|
18085
|
+
}
|
|
18086
|
+
for (const key of keys) {
|
|
18087
|
+
validateExportsValue(obj[key], `${path}.${key}`, issues);
|
|
18088
|
+
}
|
|
18089
|
+
return;
|
|
18090
|
+
}
|
|
18091
|
+
issues.push({ severity: "error", path, message: `unexpected value type at "${path}"` });
|
|
18092
|
+
}
|
|
18093
|
+
function validatePackageExports(packageJsonText) {
|
|
18094
|
+
if (!packageJsonText || !packageJsonText.trim()) return { error: "Input is empty" };
|
|
18095
|
+
let parsed;
|
|
18096
|
+
try {
|
|
18097
|
+
parsed = JSON.parse(packageJsonText);
|
|
18098
|
+
} catch (e) {
|
|
18099
|
+
return { error: `Invalid JSON: ${e.message}` };
|
|
18100
|
+
}
|
|
18101
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
18102
|
+
return { error: "Root of package.json must be an object" };
|
|
18103
|
+
}
|
|
18104
|
+
const obj = parsed;
|
|
18105
|
+
if (!("exports" in obj)) return { error: 'package.json has no "exports" field' };
|
|
18106
|
+
const exportsValue = obj.exports;
|
|
18107
|
+
const issues = [];
|
|
18108
|
+
let exportsShape;
|
|
18109
|
+
if (exportsValue === null) {
|
|
18110
|
+
exportsShape = "null";
|
|
18111
|
+
} else if (typeof exportsValue === "string") {
|
|
18112
|
+
exportsShape = "string";
|
|
18113
|
+
} else if (Array.isArray(exportsValue)) {
|
|
18114
|
+
exportsShape = "array";
|
|
18115
|
+
} else if (typeof exportsValue === "object") {
|
|
18116
|
+
const keys = Object.keys(exportsValue);
|
|
18117
|
+
exportsShape = keys.some((k) => k.startsWith(".")) ? "subpaths" : "conditions";
|
|
18118
|
+
} else {
|
|
18119
|
+
return { error: '"exports" must be a string, array, object, or null' };
|
|
18120
|
+
}
|
|
18121
|
+
validateExportsValue(exportsValue, "exports", issues);
|
|
18122
|
+
const subpaths = exportsShape === "subpaths" ? Object.keys(exportsValue) : ["."];
|
|
18123
|
+
const valid = !issues.some((i) => i.severity === "error");
|
|
18124
|
+
return { parsed: true, exportsShape, subpaths, issues, valid };
|
|
18125
|
+
}
|
|
17859
18126
|
|
|
17860
18127
|
// src/tools/color.ts
|
|
17861
18128
|
var color_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -2,13 +2,13 @@ export { j as json } from './json-Ta9JykSB.cjs';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.cjs';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.cjs';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.cjs';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-Cvyg8ZXo.cjs';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.cjs';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM1l5LG9.cjs';
|
|
9
|
+
export { n as network } from './network-C6IcHeMB.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-rxidGgvB.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.cjs';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ export { j as json } from './json-Ta9JykSB.js';
|
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.js';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.js';
|
|
4
4
|
export { t as text } from './text-DWUcY8H1.js';
|
|
5
|
-
export { d as data } from './data-
|
|
5
|
+
export { d as data } from './data-Cvyg8ZXo.js';
|
|
6
6
|
export { g as generators } from './generators-Du8cBesn.js';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.js';
|
|
8
|
-
export { u as units } from './units-
|
|
9
|
-
export { n as network } from './network-
|
|
8
|
+
export { u as units } from './units-BM1l5LG9.js';
|
|
9
|
+
export { n as network } from './network-C6IcHeMB.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-rxidGgvB.js';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.js';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.js';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.js';
|