@utilix-tech/sdk 0.80.0 → 0.81.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 +4 -0
- package/README.md +12 -3
- package/dist/{chunk-RYSN5JNA.js → chunk-FPFA4ZHC.js} +345 -1
- package/dist/{code-C4n621_i.d.cts → code-B8yHwP3m.d.cts} +55 -2
- package/dist/{code-C4n621_i.d.ts → code-B8yHwP3m.d.ts} +55 -2
- package/dist/index.cjs +344 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/code.cjs +344 -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/package.json +1 -1
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
* - markdown-footnote-extractor (extractMarkdownFootnotes)
|
|
33
33
|
* - aria-validator (validateAria)
|
|
34
34
|
* - connection-string-parser (parseConnectionString)
|
|
35
|
+
* - markdown-fence-lang-validator (validateFenceLanguageTags, KNOWN_LANGUAGE_TAGS)
|
|
36
|
+
* - sql-placeholder-counter (countSqlPlaceholders)
|
|
35
37
|
*/
|
|
36
38
|
type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
|
|
37
39
|
declare const ALL_FLAGS: RegexFlag[];
|
|
@@ -674,6 +676,48 @@ interface ConnectionStringResult {
|
|
|
674
676
|
declare function parseConnectionString(input: string): ConnectionStringResult | {
|
|
675
677
|
error: string;
|
|
676
678
|
};
|
|
679
|
+
type FenceTagIssueType = 'missing' | 'unknown' | 'inconsistent-case';
|
|
680
|
+
interface FenceTagIssue {
|
|
681
|
+
line: number;
|
|
682
|
+
tag: string;
|
|
683
|
+
issue: FenceTagIssueType;
|
|
684
|
+
suggestion?: string;
|
|
685
|
+
}
|
|
686
|
+
interface FenceValidationResult {
|
|
687
|
+
totalFences: number;
|
|
688
|
+
issues: FenceTagIssue[];
|
|
689
|
+
}
|
|
690
|
+
declare const KNOWN_LANGUAGE_TAGS: Set<string>;
|
|
691
|
+
/**
|
|
692
|
+
* Scans a Markdown document's fenced code blocks and flags ones with a
|
|
693
|
+
* missing, unknown, or inconsistently-cased language tag (compared against
|
|
694
|
+
* a curated list of common syntax-highlighter language identifiers).
|
|
695
|
+
*/
|
|
696
|
+
declare function validateFenceLanguageTags(markdown: string): FenceValidationResult;
|
|
697
|
+
type PlaceholderStyle = 'anonymous' | 'numbered' | 'named-colon' | 'named-at';
|
|
698
|
+
interface SqlPlaceholder {
|
|
699
|
+
style: PlaceholderStyle;
|
|
700
|
+
raw: string;
|
|
701
|
+
index: number;
|
|
702
|
+
name?: string;
|
|
703
|
+
number?: number;
|
|
704
|
+
}
|
|
705
|
+
interface SqlPlaceholderResult {
|
|
706
|
+
placeholders: SqlPlaceholder[];
|
|
707
|
+
counts: Record<PlaceholderStyle, number>;
|
|
708
|
+
stylesUsed: PlaceholderStyle[];
|
|
709
|
+
mixedStyles: boolean;
|
|
710
|
+
numberedGaps: number[];
|
|
711
|
+
numberedDuplicates: number[];
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Scans a SQL query string for positional (`?`, `$1`) and named (`:name`,
|
|
715
|
+
* `@name`) parameter placeholders, skipping over single/double-quoted
|
|
716
|
+
* string literals and line/block comments so a placeholder-looking
|
|
717
|
+
* character inside either is never counted. Postgres dollar-quoted string
|
|
718
|
+
* bodies (`$$...$$`) are not specially recognized.
|
|
719
|
+
*/
|
|
720
|
+
declare function countSqlPlaceholders(sql: string): SqlPlaceholderResult;
|
|
677
721
|
|
|
678
722
|
declare const code_ALL_FLAGS: typeof ALL_FLAGS;
|
|
679
723
|
type code_ApiEndpoint = ApiEndpoint;
|
|
@@ -710,6 +754,9 @@ type code_EnvParseResult = EnvParseResult;
|
|
|
710
754
|
type code_ExportsIssue = ExportsIssue;
|
|
711
755
|
type code_ExportsShape = ExportsShape;
|
|
712
756
|
type code_ExportsValidationResult = ExportsValidationResult;
|
|
757
|
+
type code_FenceTagIssue = FenceTagIssue;
|
|
758
|
+
type code_FenceTagIssueType = FenceTagIssueType;
|
|
759
|
+
type code_FenceValidationResult = FenceValidationResult;
|
|
713
760
|
type code_GitCommandConfig = GitCommandConfig;
|
|
714
761
|
type code_GitCommandResult = GitCommandResult;
|
|
715
762
|
type code_GitOperation = GitOperation;
|
|
@@ -722,6 +769,7 @@ type code_HtmlMinifyOptions = HtmlMinifyOptions;
|
|
|
722
769
|
type code_HtmlMinifyResult = HtmlMinifyResult;
|
|
723
770
|
type code_JsMinifyOptions = JsMinifyOptions;
|
|
724
771
|
type code_JsMinifyResult = JsMinifyResult;
|
|
772
|
+
declare const code_KNOWN_LANGUAGE_TAGS: typeof KNOWN_LANGUAGE_TAGS;
|
|
725
773
|
declare const code_MIME_TABLE: typeof MIME_TABLE;
|
|
726
774
|
type code_MarkdownFootnoteDefinition = MarkdownFootnoteDefinition;
|
|
727
775
|
type code_MarkdownFootnoteReference = MarkdownFootnoteReference;
|
|
@@ -731,6 +779,7 @@ type code_MimeEntry = MimeEntry;
|
|
|
731
779
|
type code_MimeLookupResult = MimeLookupResult;
|
|
732
780
|
declare const code_OPERATIONS: typeof OPERATIONS;
|
|
733
781
|
type code_ParsedSpec = ParsedSpec;
|
|
782
|
+
type code_PlaceholderStyle = PlaceholderStyle;
|
|
734
783
|
type code_RedosFinding = RedosFinding;
|
|
735
784
|
type code_RedosResult = RedosResult;
|
|
736
785
|
type code_RedosSeverity = RedosSeverity;
|
|
@@ -748,6 +797,8 @@ type code_Segment = Segment;
|
|
|
748
797
|
type code_SpecVersion = SpecVersion;
|
|
749
798
|
type code_SqlDialect = SqlDialect;
|
|
750
799
|
type code_SqlFormatOptions = SqlFormatOptions;
|
|
800
|
+
type code_SqlPlaceholder = SqlPlaceholder;
|
|
801
|
+
type code_SqlPlaceholderResult = SqlPlaceholderResult;
|
|
751
802
|
type code_SvgSpriteResult = SvgSpriteResult;
|
|
752
803
|
type code_SvgSpriteSymbol = SvgSpriteSymbol;
|
|
753
804
|
type code_TestPatternResult = TestPatternResult;
|
|
@@ -762,6 +813,7 @@ declare const code_collapseHtmlWhitespace: typeof collapseHtmlWhitespace;
|
|
|
762
813
|
declare const code_collapseJsWhitespace: typeof collapseJsWhitespace;
|
|
763
814
|
declare const code_countProperties: typeof countProperties;
|
|
764
815
|
declare const code_countRules: typeof countRules;
|
|
816
|
+
declare const code_countSqlPlaceholders: typeof countSqlPlaceholders;
|
|
765
817
|
declare const code_detectDialect: typeof detectDialect;
|
|
766
818
|
declare const code_detectOperationType: typeof detectOperationType;
|
|
767
819
|
declare const code_detectRedos: typeof detectRedos;
|
|
@@ -807,10 +859,11 @@ declare const code_testRegex: typeof testRegex;
|
|
|
807
859
|
declare const code_validateAria: typeof validateAria;
|
|
808
860
|
declare const code_validateEditorConfig: typeof validateEditorConfig;
|
|
809
861
|
declare const code_validateEnvKey: typeof validateEnvKey;
|
|
862
|
+
declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
|
|
810
863
|
declare const code_validatePackageExports: typeof validatePackageExports;
|
|
811
864
|
declare const code_validateTsconfig: typeof validateTsconfig;
|
|
812
865
|
declare namespace code {
|
|
813
|
-
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, 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_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, 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_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, 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_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, 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_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, 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_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, 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_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, 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_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
|
|
866
|
+
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, 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_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, 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_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, 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_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, 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_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, 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_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, 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_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, 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_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, 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_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
|
|
814
867
|
}
|
|
815
868
|
|
|
816
|
-
export { type
|
|
869
|
+
export { type MarkdownFootnoteDefinition as $, ALL_FLAGS as A, type EditorConfigValidationResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EnvEntry as F, type EnvParseResult as G, type ExportsIssue as H, type ExportsShape as I, type ExportsValidationResult as J, type FenceTagIssue as K, type FenceTagIssueType as L, type FenceValidationResult as M, type GitCommandConfig as N, type GitCommandResult as O, type GitOperation as P, type GithubUrlInfo as Q, type GithubUrlType as R, type GitignoreTestResult as S, type GqlFormatResult as T, type HtmlFormatResult as U, type HtmlMinifyOptions as V, type HtmlMinifyResult as W, type JsMinifyOptions as X, type JsMinifyResult as Y, KNOWN_LANGUAGE_TAGS as Z, MIME_TABLE as _, type ApiEndpoint as a, minifyJs as a$, type MarkdownFootnoteReference as a0, type MarkdownFootnoteResult as a1, type MatchResult as a2, type MimeEntry as a3, type MimeLookupResult as a4, OPERATIONS as a5, type ParsedSpec as a6, type PlaceholderStyle as a7, type RedosFinding as a8, type RedosResult as a9, buildGitCommand as aA, collapseHtmlWhitespace as aB, collapseJsWhitespace as aC, countProperties as aD, countRules as aE, countSqlPlaceholders as aF, detectDialect as aG, detectOperationType as aH, detectRedos as aI, envToExport as aJ, envToJson as aK, extractMarkdownFootnotes as aL, extractSvgSpriteSymbols as aM, formatCss as aN, formatGql as aO, formatHtml as aP, formatSql as aQ, getEndpointsByTag as aR, getHtmlStats as aS, getJsStats as aT, getMethodColor as aU, isValidTag as aV, lintConventionalCommit as aW, lookupMime as aX, minifyCss as aY, minifyGql as aZ, minifyHtml as a_, type RedosSeverity as aa, type RegexBackreferenceInfo as ab, type RegexError as ac, type RegexFlag as ad, type RegexGroupAnalysis as ae, type RegexGroupInfo as af, type RegexGroupIssue as ag, type RegexMatch as ah, type RegexResult as ai, type RegexSuccess as aj, SQL_DEFAULT_OPTIONS as ak, type Segment as al, type SpecVersion as am, type SqlDialect as an, type SqlFormatOptions as ao, type SqlPlaceholder as ap, type SqlPlaceholderResult as aq, type SvgSpriteResult as ar, type SvgSpriteSymbol as as, type TestPatternResult as at, type TsconfigIssue as au, type TsconfigValidationResult as av, analyzeRegexGroups as aw, auditDependencyRanges as ax, buildDockerPull as ay, buildDockerRun as az, type ApiInfo as b, minifySql as b0, normalizeRef as b1, parseCommitTrailers as b2, parseConnectionString as b3, parseDockerImage as b4, parseEnv as b5, parseGitCommand as b6, parseGithubUrl as b7, parseSpec as b8, removeConsoleCalls as b9, removeEmptyAttributes as ba, removeHtmlComments as bb, removeJsComments as bc, removeRedundantAttributes as bd, searchCheatsheet as be, searchEndpoints as bf, splitStatements as bg, testGitignorePatterns as bh, testPattern as bi, testRegex as bj, validateAria as bk, validateEditorConfig as bl, validateEnvKey as bm, validateFenceLanguageTags as bn, validatePackageExports as bo, validateTsconfig as bp, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type EditorConfigProperty as y, type EditorConfigSection as z };
|
package/dist/index.cjs
CHANGED
|
@@ -16736,6 +16736,7 @@ __export(code_exports, {
|
|
|
16736
16736
|
ALL_FLAGS: () => ALL_FLAGS,
|
|
16737
16737
|
CHEATSHEET: () => CHEATSHEET,
|
|
16738
16738
|
DEFAULT_COMMIT_TYPES: () => DEFAULT_COMMIT_TYPES,
|
|
16739
|
+
KNOWN_LANGUAGE_TAGS: () => KNOWN_LANGUAGE_TAGS,
|
|
16739
16740
|
MIME_TABLE: () => MIME_TABLE,
|
|
16740
16741
|
OPERATIONS: () => OPERATIONS,
|
|
16741
16742
|
SQL_DEFAULT_OPTIONS: () => SQL_DEFAULT_OPTIONS,
|
|
@@ -16748,6 +16749,7 @@ __export(code_exports, {
|
|
|
16748
16749
|
collapseJsWhitespace: () => collapseJsWhitespace,
|
|
16749
16750
|
countProperties: () => countProperties,
|
|
16750
16751
|
countRules: () => countRules,
|
|
16752
|
+
countSqlPlaceholders: () => countSqlPlaceholders,
|
|
16751
16753
|
detectDialect: () => detectDialect,
|
|
16752
16754
|
detectOperationType: () => detectOperationType,
|
|
16753
16755
|
detectRedos: () => detectRedos,
|
|
@@ -16793,6 +16795,7 @@ __export(code_exports, {
|
|
|
16793
16795
|
validateAria: () => validateAria,
|
|
16794
16796
|
validateEditorConfig: () => validateEditorConfig,
|
|
16795
16797
|
validateEnvKey: () => validateEnvKey2,
|
|
16798
|
+
validateFenceLanguageTags: () => validateFenceLanguageTags,
|
|
16796
16799
|
validatePackageExports: () => validatePackageExports,
|
|
16797
16800
|
validateTsconfig: () => validateTsconfig
|
|
16798
16801
|
});
|
|
@@ -20653,6 +20656,347 @@ function parseConnectionString(input) {
|
|
|
20653
20656
|
}
|
|
20654
20657
|
return { scheme, user, password, hosts, database, params };
|
|
20655
20658
|
}
|
|
20659
|
+
var KNOWN_LANGUAGE_TAGS = /* @__PURE__ */ new Set([
|
|
20660
|
+
"js",
|
|
20661
|
+
"jsx",
|
|
20662
|
+
"mjs",
|
|
20663
|
+
"cjs",
|
|
20664
|
+
"javascript",
|
|
20665
|
+
"ts",
|
|
20666
|
+
"tsx",
|
|
20667
|
+
"typescript",
|
|
20668
|
+
"json",
|
|
20669
|
+
"json5",
|
|
20670
|
+
"jsonc",
|
|
20671
|
+
"jsonl",
|
|
20672
|
+
"ndjson",
|
|
20673
|
+
"yaml",
|
|
20674
|
+
"yml",
|
|
20675
|
+
"toml",
|
|
20676
|
+
"ini",
|
|
20677
|
+
"cfg",
|
|
20678
|
+
"conf",
|
|
20679
|
+
"properties",
|
|
20680
|
+
"env",
|
|
20681
|
+
"dotenv",
|
|
20682
|
+
"html",
|
|
20683
|
+
"htm",
|
|
20684
|
+
"xml",
|
|
20685
|
+
"svg",
|
|
20686
|
+
"xhtml",
|
|
20687
|
+
"css",
|
|
20688
|
+
"scss",
|
|
20689
|
+
"sass",
|
|
20690
|
+
"less",
|
|
20691
|
+
"stylus",
|
|
20692
|
+
"styl",
|
|
20693
|
+
"markdown",
|
|
20694
|
+
"md",
|
|
20695
|
+
"mdx",
|
|
20696
|
+
"bash",
|
|
20697
|
+
"sh",
|
|
20698
|
+
"shell",
|
|
20699
|
+
"zsh",
|
|
20700
|
+
"fish",
|
|
20701
|
+
"console",
|
|
20702
|
+
"powershell",
|
|
20703
|
+
"ps1",
|
|
20704
|
+
"bat",
|
|
20705
|
+
"cmd",
|
|
20706
|
+
"python",
|
|
20707
|
+
"py",
|
|
20708
|
+
"py3",
|
|
20709
|
+
"ipynb",
|
|
20710
|
+
"ruby",
|
|
20711
|
+
"rb",
|
|
20712
|
+
"erb",
|
|
20713
|
+
"php",
|
|
20714
|
+
"java",
|
|
20715
|
+
"kotlin",
|
|
20716
|
+
"kt",
|
|
20717
|
+
"kts",
|
|
20718
|
+
"groovy",
|
|
20719
|
+
"gradle",
|
|
20720
|
+
"swift",
|
|
20721
|
+
"objectivec",
|
|
20722
|
+
"objc",
|
|
20723
|
+
"go",
|
|
20724
|
+
"golang",
|
|
20725
|
+
"rust",
|
|
20726
|
+
"rs",
|
|
20727
|
+
"c",
|
|
20728
|
+
"h",
|
|
20729
|
+
"cpp",
|
|
20730
|
+
"cc",
|
|
20731
|
+
"cxx",
|
|
20732
|
+
"hpp",
|
|
20733
|
+
"c++",
|
|
20734
|
+
"csharp",
|
|
20735
|
+
"cs",
|
|
20736
|
+
"fsharp",
|
|
20737
|
+
"fs",
|
|
20738
|
+
"perl",
|
|
20739
|
+
"pl",
|
|
20740
|
+
"lua",
|
|
20741
|
+
"r",
|
|
20742
|
+
"matlab",
|
|
20743
|
+
"m",
|
|
20744
|
+
"scala",
|
|
20745
|
+
"nim",
|
|
20746
|
+
"zig",
|
|
20747
|
+
"julia",
|
|
20748
|
+
"jl",
|
|
20749
|
+
"haskell",
|
|
20750
|
+
"hs",
|
|
20751
|
+
"elixir",
|
|
20752
|
+
"ex",
|
|
20753
|
+
"exs",
|
|
20754
|
+
"erlang",
|
|
20755
|
+
"erl",
|
|
20756
|
+
"clojure",
|
|
20757
|
+
"clj",
|
|
20758
|
+
"cljs",
|
|
20759
|
+
"dart",
|
|
20760
|
+
"ocaml",
|
|
20761
|
+
"ml",
|
|
20762
|
+
"sql",
|
|
20763
|
+
"mysql",
|
|
20764
|
+
"postgresql",
|
|
20765
|
+
"plsql",
|
|
20766
|
+
"sqlite",
|
|
20767
|
+
"graphql",
|
|
20768
|
+
"gql",
|
|
20769
|
+
"dockerfile",
|
|
20770
|
+
"docker",
|
|
20771
|
+
"makefile",
|
|
20772
|
+
"make",
|
|
20773
|
+
"cmake",
|
|
20774
|
+
"nginx",
|
|
20775
|
+
"apache",
|
|
20776
|
+
"diff",
|
|
20777
|
+
"patch",
|
|
20778
|
+
"git",
|
|
20779
|
+
"http",
|
|
20780
|
+
"proto",
|
|
20781
|
+
"protobuf",
|
|
20782
|
+
"csv",
|
|
20783
|
+
"tsv",
|
|
20784
|
+
"vim",
|
|
20785
|
+
"viml",
|
|
20786
|
+
"tex",
|
|
20787
|
+
"latex",
|
|
20788
|
+
"bibtex",
|
|
20789
|
+
"plaintext",
|
|
20790
|
+
"text",
|
|
20791
|
+
"txt",
|
|
20792
|
+
"nohighlight",
|
|
20793
|
+
"none",
|
|
20794
|
+
"asciidoc",
|
|
20795
|
+
"adoc",
|
|
20796
|
+
"rst",
|
|
20797
|
+
"vue",
|
|
20798
|
+
"svelte",
|
|
20799
|
+
"astro",
|
|
20800
|
+
"wasm",
|
|
20801
|
+
"wat",
|
|
20802
|
+
"handlebars",
|
|
20803
|
+
"hbs",
|
|
20804
|
+
"pug",
|
|
20805
|
+
"jade",
|
|
20806
|
+
"coffee",
|
|
20807
|
+
"coffeescript",
|
|
20808
|
+
"actionscript",
|
|
20809
|
+
"terraform",
|
|
20810
|
+
"tf",
|
|
20811
|
+
"hcl",
|
|
20812
|
+
"puppet",
|
|
20813
|
+
"ansible"
|
|
20814
|
+
]);
|
|
20815
|
+
function _parseFenceLine(line) {
|
|
20816
|
+
const match = line.match(/^( {0,3})(`{3,}|~{3,})(.*)$/);
|
|
20817
|
+
if (!match) return null;
|
|
20818
|
+
const [, indent, marker, rest] = match;
|
|
20819
|
+
const char = marker[0];
|
|
20820
|
+
if (char === "`" && rest.includes("`")) return null;
|
|
20821
|
+
return { indent: indent.length, char, length: marker.length, infoString: rest.trim() };
|
|
20822
|
+
}
|
|
20823
|
+
function _isClosingFence(line, fenceChar, fenceLength) {
|
|
20824
|
+
const match = line.match(/^ {0,3}(`+|~+)\s*$/);
|
|
20825
|
+
if (!match) return false;
|
|
20826
|
+
const marker = match[1];
|
|
20827
|
+
return marker[0] === fenceChar && marker.length >= fenceLength;
|
|
20828
|
+
}
|
|
20829
|
+
function validateFenceLanguageTags(markdown) {
|
|
20830
|
+
const lines = markdown.split("\n");
|
|
20831
|
+
const issues = [];
|
|
20832
|
+
let totalFences = 0;
|
|
20833
|
+
let open = null;
|
|
20834
|
+
for (let i = 0; i < lines.length; i++) {
|
|
20835
|
+
const lineNumber = i + 1;
|
|
20836
|
+
const line = lines[i];
|
|
20837
|
+
if (open) {
|
|
20838
|
+
if (_isClosingFence(line, open.char, open.length)) open = null;
|
|
20839
|
+
continue;
|
|
20840
|
+
}
|
|
20841
|
+
const fence = _parseFenceLine(line);
|
|
20842
|
+
if (!fence) continue;
|
|
20843
|
+
totalFences++;
|
|
20844
|
+
const tag = fence.infoString.split(/\s+/)[0] ?? "";
|
|
20845
|
+
open = { char: fence.char, length: fence.length };
|
|
20846
|
+
if (tag === "") {
|
|
20847
|
+
issues.push({ line: lineNumber, tag, issue: "missing" });
|
|
20848
|
+
continue;
|
|
20849
|
+
}
|
|
20850
|
+
const lower = tag.toLowerCase();
|
|
20851
|
+
if (!KNOWN_LANGUAGE_TAGS.has(lower)) {
|
|
20852
|
+
issues.push({ line: lineNumber, tag, issue: "unknown" });
|
|
20853
|
+
continue;
|
|
20854
|
+
}
|
|
20855
|
+
if (tag !== lower) {
|
|
20856
|
+
issues.push({ line: lineNumber, tag, issue: "inconsistent-case", suggestion: lower });
|
|
20857
|
+
}
|
|
20858
|
+
}
|
|
20859
|
+
return { totalFences, issues };
|
|
20860
|
+
}
|
|
20861
|
+
var _IDENT_START = /[A-Za-z_]/;
|
|
20862
|
+
var _IDENT_CHAR = /[A-Za-z0-9_]/;
|
|
20863
|
+
function _readIdentifier(sql, start) {
|
|
20864
|
+
let end = start;
|
|
20865
|
+
while (end < sql.length && _IDENT_CHAR.test(sql[end])) end++;
|
|
20866
|
+
return sql.slice(start, end);
|
|
20867
|
+
}
|
|
20868
|
+
function countSqlPlaceholders(sql) {
|
|
20869
|
+
const placeholders = [];
|
|
20870
|
+
let state = "normal";
|
|
20871
|
+
let i = 0;
|
|
20872
|
+
while (i < sql.length) {
|
|
20873
|
+
const ch = sql[i];
|
|
20874
|
+
const next = sql[i + 1];
|
|
20875
|
+
if (state === "single") {
|
|
20876
|
+
if (ch === "'" && next === "'") {
|
|
20877
|
+
i += 2;
|
|
20878
|
+
continue;
|
|
20879
|
+
}
|
|
20880
|
+
if (ch === "'") {
|
|
20881
|
+
state = "normal";
|
|
20882
|
+
i++;
|
|
20883
|
+
continue;
|
|
20884
|
+
}
|
|
20885
|
+
i++;
|
|
20886
|
+
continue;
|
|
20887
|
+
}
|
|
20888
|
+
if (state === "double") {
|
|
20889
|
+
if (ch === '"' && next === '"') {
|
|
20890
|
+
i += 2;
|
|
20891
|
+
continue;
|
|
20892
|
+
}
|
|
20893
|
+
if (ch === '"') {
|
|
20894
|
+
state = "normal";
|
|
20895
|
+
i++;
|
|
20896
|
+
continue;
|
|
20897
|
+
}
|
|
20898
|
+
i++;
|
|
20899
|
+
continue;
|
|
20900
|
+
}
|
|
20901
|
+
if (state === "line-comment") {
|
|
20902
|
+
if (ch === "\n") state = "normal";
|
|
20903
|
+
i++;
|
|
20904
|
+
continue;
|
|
20905
|
+
}
|
|
20906
|
+
if (state === "block-comment") {
|
|
20907
|
+
if (ch === "*" && next === "/") {
|
|
20908
|
+
state = "normal";
|
|
20909
|
+
i += 2;
|
|
20910
|
+
continue;
|
|
20911
|
+
}
|
|
20912
|
+
i++;
|
|
20913
|
+
continue;
|
|
20914
|
+
}
|
|
20915
|
+
if (ch === "'") {
|
|
20916
|
+
state = "single";
|
|
20917
|
+
i++;
|
|
20918
|
+
continue;
|
|
20919
|
+
}
|
|
20920
|
+
if (ch === '"') {
|
|
20921
|
+
state = "double";
|
|
20922
|
+
i++;
|
|
20923
|
+
continue;
|
|
20924
|
+
}
|
|
20925
|
+
if (ch === "-" && next === "-") {
|
|
20926
|
+
state = "line-comment";
|
|
20927
|
+
i += 2;
|
|
20928
|
+
continue;
|
|
20929
|
+
}
|
|
20930
|
+
if (ch === "/" && next === "*") {
|
|
20931
|
+
state = "block-comment";
|
|
20932
|
+
i += 2;
|
|
20933
|
+
continue;
|
|
20934
|
+
}
|
|
20935
|
+
if (ch === "?") {
|
|
20936
|
+
placeholders.push({ style: "anonymous", raw: "?", index: i });
|
|
20937
|
+
i++;
|
|
20938
|
+
continue;
|
|
20939
|
+
}
|
|
20940
|
+
if (ch === "$" && /[0-9]/.test(next ?? "")) {
|
|
20941
|
+
let end = i + 1;
|
|
20942
|
+
while (end < sql.length && /[0-9]/.test(sql[end])) end++;
|
|
20943
|
+
const raw = sql.slice(i, end);
|
|
20944
|
+
placeholders.push({ style: "numbered", raw, index: i, number: parseInt(raw.slice(1), 10) });
|
|
20945
|
+
i = end;
|
|
20946
|
+
continue;
|
|
20947
|
+
}
|
|
20948
|
+
if (ch === ":") {
|
|
20949
|
+
if (next === ":") {
|
|
20950
|
+
i += 2;
|
|
20951
|
+
continue;
|
|
20952
|
+
}
|
|
20953
|
+
if (next && _IDENT_START.test(next)) {
|
|
20954
|
+
const name = _readIdentifier(sql, i + 1);
|
|
20955
|
+
placeholders.push({ style: "named-colon", raw: `:${name}`, index: i, name });
|
|
20956
|
+
i += 1 + name.length;
|
|
20957
|
+
continue;
|
|
20958
|
+
}
|
|
20959
|
+
i++;
|
|
20960
|
+
continue;
|
|
20961
|
+
}
|
|
20962
|
+
if (ch === "@") {
|
|
20963
|
+
if (next === "@") {
|
|
20964
|
+
i += 2;
|
|
20965
|
+
continue;
|
|
20966
|
+
}
|
|
20967
|
+
if (next && _IDENT_START.test(next)) {
|
|
20968
|
+
const name = _readIdentifier(sql, i + 1);
|
|
20969
|
+
placeholders.push({ style: "named-at", raw: `@${name}`, index: i, name });
|
|
20970
|
+
i += 1 + name.length;
|
|
20971
|
+
continue;
|
|
20972
|
+
}
|
|
20973
|
+
i++;
|
|
20974
|
+
continue;
|
|
20975
|
+
}
|
|
20976
|
+
i++;
|
|
20977
|
+
}
|
|
20978
|
+
const counts = { anonymous: 0, numbered: 0, "named-colon": 0, "named-at": 0 };
|
|
20979
|
+
for (const p of placeholders) counts[p.style]++;
|
|
20980
|
+
const stylesUsed = ["anonymous", "numbered", "named-colon", "named-at"].filter((s) => counts[s] > 0);
|
|
20981
|
+
const numbers = placeholders.filter((p) => p.style === "numbered").map((p) => p.number);
|
|
20982
|
+
const maxNumber = numbers.length > 0 ? Math.max(...numbers) : 0;
|
|
20983
|
+
const seen = new Set(numbers);
|
|
20984
|
+
const numberedGaps = [];
|
|
20985
|
+
for (let n = 1; n < maxNumber; n++) {
|
|
20986
|
+
if (!seen.has(n)) numberedGaps.push(n);
|
|
20987
|
+
}
|
|
20988
|
+
const countedMap = /* @__PURE__ */ new Map();
|
|
20989
|
+
for (const n of numbers) countedMap.set(n, (countedMap.get(n) ?? 0) + 1);
|
|
20990
|
+
const numberedDuplicates = [...countedMap.entries()].filter(([, c]) => c > 1).map(([n]) => n).sort((a, b) => a - b);
|
|
20991
|
+
return {
|
|
20992
|
+
placeholders,
|
|
20993
|
+
counts,
|
|
20994
|
+
stylesUsed,
|
|
20995
|
+
mixedStyles: stylesUsed.length > 1,
|
|
20996
|
+
numberedGaps,
|
|
20997
|
+
numberedDuplicates
|
|
20998
|
+
};
|
|
20999
|
+
}
|
|
20656
21000
|
|
|
20657
21001
|
// src/tools/color.ts
|
|
20658
21002
|
var color_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ export { t as time } from './time-KqJjdqII.cjs';
|
|
|
8
8
|
export { u as units } from './units-D7YRRwei.cjs';
|
|
9
9
|
export { n as network } from './network-BskZe1n2.cjs';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.cjs';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-B8yHwP3m.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
|
@@ -8,7 +8,7 @@ export { t as time } from './time-KqJjdqII.js';
|
|
|
8
8
|
export { u as units } from './units-D7YRRwei.js';
|
|
9
9
|
export { n as network } from './network-BskZe1n2.js';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.js';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-B8yHwP3m.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';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { media_exports as media } from './chunk-ZWFZRDQ4.js';
|
|
|
2
2
|
export { units_exports as units } from './chunk-OFLNVDNX.js';
|
|
3
3
|
export { network_exports as network } from './chunk-KWS4ZCYG.js';
|
|
4
4
|
export { api_exports as api } from './chunk-U2HREMZU.js';
|
|
5
|
-
export { code_exports as code } from './chunk-
|
|
5
|
+
export { code_exports as code } from './chunk-FPFA4ZHC.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
7
7
|
export { css_exports as css } from './chunk-6YPV2AB5.js';
|
|
8
8
|
export { misc_exports as misc } from './chunk-GX7H6TAX.js';
|