@utilix-tech/sdk 0.35.0 → 0.37.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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
4
4
 
5
+ ## 0.37.0
6
+ - Add `checkSetCookieHeader` (same-site-cookie-checker): parse a Set-Cookie header value and validate its attribute combination, flagging SameSite=None missing Secure, __Host-/__Secure- prefix violations, a missing Secure attribute, and a Max-Age past 400 days.
7
+ - Add `testGitignorePatterns` (gitignore-tester): test a list of paths against a .gitignore file's patterns, following git's last-match-wins and negation rules, and report which pattern and line number decided each path's outcome.
8
+
9
+ ## 0.36.0
10
+ - Add `buildLinkHeader` (link-header-builder): build an HTTP Link response header from URL/rel pairs (preload, preconnect, prefetch, canonical, pagination, etc.), including the as/type/crossorigin attributes preload needs, plus a plain-English explanation of each entry and warnings for common mistakes like a preload missing `as`.
11
+
5
12
  ## 0.35.0
6
13
  - Add `calculateRoi` (roi-calculator): return on investment percent from an initial and final value, plus the annualized (CAGR) return given an optional holding period in years.
7
14
  - Add `searchEmoji`, `getEmojiByShortcode`, `getEmojiByChar`, `getEmojiByCategory`, `getEmojiCategories` (emoji-lookup): search a curated table of ~280 common emoji by name, keyword, or GitHub-style shortcode, or look one up exactly.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **600 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **604 developer utility functions for Node.js: runs locally, no API key required.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@utilix-tech/sdk?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@utilix-tech/sdk)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@utilix-tech/sdk?style=flat-square)](https://www.npmjs.com/package/@utilix-tech/sdk)
@@ -404,7 +404,7 @@ calculateRoi({ initialValue: 1000, finalValue: 1610.51, years: 5 });
404
404
  import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
405
405
  searchStatusCodes, buildGeoUrl, countryCodeToFlag,
406
406
  parseHar, validateSitemap, validateRobotsTxt,
407
- parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address } from "@utilix-tech/sdk/network";
407
+ parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader } from "@utilix-tech/sdk/network";
408
408
 
409
409
  getStatusCode(404);
410
410
  // { code: 404, text: "Not Found", description: "...", category: "Client Error" }
@@ -447,6 +447,14 @@ buildReferrerPolicy("strict-origin-when-cross-origin");
447
447
  parseIpv6Address("2001:db8::ff00:42:8329");
448
448
  // { expanded: "2001:0db8:0000:0000:0000:ff00:0042:8329", compressed: "2001:db8::ff00:42:8329",
449
449
  // groups: [...], zoneId: null, addressType: "documentation" }
450
+
451
+ // Build an HTTP Link header from URL/rel pairs (preload, preconnect, canonical, pagination, etc.)
452
+ buildLinkHeader([{ url: "/fonts/inter.woff2", rel: "preload", as: "font", type: "font/woff2", crossorigin: true }]);
453
+ // { header: '</fonts/inter.woff2>; rel="preload"; as="font"; type="font/woff2"; crossorigin', links: [...], warnings: [] }
454
+
455
+ // Parse and validate a Set-Cookie header's attribute combination
456
+ checkSetCookieHeader("session=abc123; SameSite=None");
457
+ // { cookie: {...}, issues: ["SameSite=None requires the Secure attribute..."], warnings: [...], valid: false }
450
458
  ```
451
459
 
452
460
  ---
@@ -496,7 +504,7 @@ generateCspHeader({ "default-src": ["'self'"], "script-src": ["'self'", "cdn.exa
496
504
  ```ts
497
505
  import { formatSql, minifySql, testRegex, formatHtml, formatGql,
498
506
  detectDialect, splitStatements, lookupMime, parseGithubUrl,
499
- detectRedos } from "@utilix-tech/sdk/code";
507
+ detectRedos, testGitignorePatterns } from "@utilix-tech/sdk/code";
500
508
 
501
509
  // SQL
502
510
  formatSql("SELECT id,name FROM users WHERE active=1 ORDER BY name");
@@ -532,6 +540,10 @@ parseGithubUrl("https://github.com/facebook/react/pull/1234");
532
540
  // Regex ReDoS (catastrophic-backtracking) detection
533
541
  detectRedos("(a+)+");
534
542
  // { risk: "high", safe: false, findings: [{ type: "nested-quantifier", ... }] }
543
+
544
+ // Test paths against a .gitignore file's patterns
545
+ testGitignorePatterns("node_modules/\n*.log", ["node_modules/foo.js", "debug.log", "src/index.js"]);
546
+ // [{ path: "node_modules/foo.js", ignored: true, matchedPattern: "node_modules/", matchedLine: 1 }, ...]
535
547
  ```
536
548
 
537
549
  ---
@@ -5,13 +5,16 @@ var network_exports = {};
5
5
  __export(network_exports, {
6
6
  DNS_RECORD_TYPES: () => DNS_RECORD_TYPES,
7
7
  HTTP_HEADERS: () => HTTP_HEADERS,
8
+ LINK_REL_VALUES: () => LINK_REL_VALUES,
8
9
  REFERRER_POLICY_VALUES: () => REFERRER_POLICY_VALUES,
9
10
  STATUS_CODES: () => STATUS_CODES,
10
11
  buildCacheControl: () => buildCacheControl,
11
12
  buildDnsQueryUrl: () => buildDnsQueryUrl,
12
13
  buildGeoUrl: () => buildGeoUrl,
14
+ buildLinkHeader: () => buildLinkHeader,
13
15
  buildMapUrl: () => buildMapUrl,
14
16
  buildReferrerPolicy: () => buildReferrerPolicy,
17
+ checkSetCookieHeader: () => checkSetCookieHeader,
15
18
  countryCodeToFlag: () => countryCodeToFlag,
16
19
  formatCoordinates: () => formatCoordinates,
17
20
  formatTtl: () => formatTtl,
@@ -1895,6 +1898,73 @@ function buildReferrerPolicy(policies) {
1895
1898
  const metaTag = `<meta name="referrer" content="${last.value}">`;
1896
1899
  return { header, headerName: "Referrer-Policy", snippet, metaTag, policies: entries, warnings };
1897
1900
  }
1901
+ var LINK_REL_VALUES = [
1902
+ "preload",
1903
+ "preconnect",
1904
+ "prefetch",
1905
+ "prerender",
1906
+ "dns-prefetch",
1907
+ "canonical",
1908
+ "next",
1909
+ "prev",
1910
+ "alternate",
1911
+ "stylesheet",
1912
+ "icon",
1913
+ "modulepreload"
1914
+ ];
1915
+ var _LINK_REL_INFO = {
1916
+ preload: "Tells the browser to fetch this resource early, before the parser would otherwise discover it, without blocking rendering. Requires an `as` attribute so the browser applies the right request priority and Content-Security-Policy check; omitting it commonly causes the resource to be fetched twice.",
1917
+ preconnect: "Tells the browser to start the connection handshake (DNS, TCP, TLS) to this origin early, before any real request to it is made, so the first actual request lands faster.",
1918
+ prefetch: "Tells the browser to fetch this resource at low priority for a likely future navigation and cache it. Unlike preload, it does not affect the current page load.",
1919
+ prerender: "Tells the browser to fetch and render this page in the background so navigating to it feels instant, at a real bandwidth and CPU cost if the user never navigates there.",
1920
+ "dns-prefetch": "Tells the browser to resolve this origin's DNS early, a lighter-weight version of preconnect that skips the TCP/TLS handshake.",
1921
+ canonical: "Tells search engines which URL is the authoritative version of this page, used to consolidate duplicate-content signals across query-string or protocol variants.",
1922
+ next: "Marks the next page in a paginated sequence, a hint search engines and some browsers use for pagination.",
1923
+ prev: "Marks the previous page in a paginated sequence.",
1924
+ alternate: "Points to an alternate version of this resource, such as a different language or an RSS feed.",
1925
+ stylesheet: 'Loads an external stylesheet, the same effect as a `<link rel="stylesheet">` tag but delivered as a response header instead.',
1926
+ icon: 'Points to this resource\'s favicon, the same effect as a `<link rel="icon">` tag but delivered as a response header instead.',
1927
+ modulepreload: "Tells the browser to fetch and parse this JavaScript module early, ahead of when the module graph would otherwise discover it."
1928
+ };
1929
+ function buildLinkHeader(links) {
1930
+ if (!Array.isArray(links) || links.length === 0) {
1931
+ return { error: "At least one link entry is required" };
1932
+ }
1933
+ const entries = [];
1934
+ for (const link of links) {
1935
+ const url = typeof link.url === "string" ? link.url.trim() : "";
1936
+ const rel = typeof link.rel === "string" ? link.rel.trim() : "";
1937
+ if (!url) return { error: "Each link entry requires a non-empty url" };
1938
+ if (!rel) return { error: "Each link entry requires a non-empty rel" };
1939
+ if (!LINK_REL_VALUES.includes(rel)) {
1940
+ return { error: `'${rel}' is not a supported rel value. Supported values: ${LINK_REL_VALUES.join(", ")}` };
1941
+ }
1942
+ const as = link.as?.trim() || void 0;
1943
+ const type = link.type?.trim() || void 0;
1944
+ const crossorigin = link.crossorigin === true;
1945
+ let value = `<${url}>; rel="${rel}"`;
1946
+ if (as) value += `; as="${as}"`;
1947
+ if (type) value += `; type="${type}"`;
1948
+ if (crossorigin) value += "; crossorigin";
1949
+ entries.push({ url, rel, as, type, crossorigin: crossorigin || void 0, value, explanation: _LINK_REL_INFO[rel] });
1950
+ }
1951
+ const warnings = [];
1952
+ for (const entry of entries) {
1953
+ if (entry.rel === "preload" && !entry.as) {
1954
+ warnings.push(`preload link for "${entry.url}" is missing an \`as\` attribute \u2014 the browser may fetch it twice or apply the wrong request priority.`);
1955
+ }
1956
+ if ((entry.rel === "preconnect" || entry.rel === "dns-prefetch") && (entry.as || entry.type)) {
1957
+ warnings.push(`${entry.rel} link for "${entry.url}" sets \`as\`/\`type\`, which it ignores since no specific resource is being fetched yet.`);
1958
+ }
1959
+ }
1960
+ const canonicalCount = entries.filter((e) => e.rel === "canonical").length;
1961
+ if (canonicalCount > 1) {
1962
+ warnings.push(`${canonicalCount} canonical links present \u2014 only one canonical URL should be declared per page.`);
1963
+ }
1964
+ const header = entries.map((e) => e.value).join(", ");
1965
+ const snippet = `Link: ${header}`;
1966
+ return { header, headerName: "Link", snippet, links: entries, warnings };
1967
+ }
1898
1968
  function isValidIpv6HexGroup(g) {
1899
1969
  return /^[0-9a-fA-F]{1,4}$/.test(g);
1900
1970
  }
@@ -1983,5 +2053,82 @@ function parseIpv6Address(input) {
1983
2053
  addressType: classifyIpv6(expandedGroups)
1984
2054
  };
1985
2055
  }
2056
+ var MAX_COOKIE_AGE_SECONDS = 400 * 24 * 60 * 60;
2057
+ function checkSetCookieHeader(header) {
2058
+ if (typeof header !== "string" || !header.trim()) {
2059
+ return { error: "A Set-Cookie header value is required" };
2060
+ }
2061
+ const parts = header.split(";").map((p) => p.trim()).filter(Boolean);
2062
+ const [nameValue, ...attrParts] = parts;
2063
+ const eqIdx = nameValue.indexOf("=");
2064
+ if (eqIdx === -1) return { error: "Missing name=value pair" };
2065
+ const name = nameValue.slice(0, eqIdx).trim();
2066
+ const value = nameValue.slice(eqIdx + 1).trim();
2067
+ if (!name) return { error: "Cookie name cannot be empty" };
2068
+ const cookie = {
2069
+ name,
2070
+ value,
2071
+ domain: null,
2072
+ path: null,
2073
+ expires: null,
2074
+ maxAge: null,
2075
+ secure: false,
2076
+ httpOnly: false,
2077
+ sameSite: null
2078
+ };
2079
+ for (const attr of attrParts) {
2080
+ const idx = attr.indexOf("=");
2081
+ const key = (idx === -1 ? attr : attr.slice(0, idx)).trim().toLowerCase();
2082
+ const val = idx === -1 ? "" : attr.slice(idx + 1).trim();
2083
+ switch (key) {
2084
+ case "domain":
2085
+ cookie.domain = val || null;
2086
+ break;
2087
+ case "path":
2088
+ cookie.path = val || null;
2089
+ break;
2090
+ case "expires":
2091
+ cookie.expires = val || null;
2092
+ break;
2093
+ case "max-age": {
2094
+ const n = Number(val);
2095
+ cookie.maxAge = Number.isFinite(n) ? n : null;
2096
+ break;
2097
+ }
2098
+ case "secure":
2099
+ cookie.secure = true;
2100
+ break;
2101
+ case "httponly":
2102
+ cookie.httpOnly = true;
2103
+ break;
2104
+ case "samesite": {
2105
+ const normalized = val.toLowerCase();
2106
+ if (normalized === "strict") cookie.sameSite = "Strict";
2107
+ else if (normalized === "lax") cookie.sameSite = "Lax";
2108
+ else if (normalized === "none") cookie.sameSite = "None";
2109
+ break;
2110
+ }
2111
+ }
2112
+ }
2113
+ const issues = [];
2114
+ const warnings = [];
2115
+ if (cookie.sameSite === "None" && !cookie.secure) {
2116
+ issues.push("SameSite=None requires the Secure attribute \u2014 modern browsers reject this cookie without it.");
2117
+ }
2118
+ if (name.startsWith("__Host-")) {
2119
+ if (!cookie.secure) issues.push("__Host- prefixed cookies require the Secure attribute.");
2120
+ if (cookie.domain) issues.push("__Host- prefixed cookies must not set a Domain attribute.");
2121
+ if (cookie.path !== "/") issues.push("__Host- prefixed cookies must set Path=/.");
2122
+ } else if (name.startsWith("__Secure-")) {
2123
+ if (!cookie.secure) issues.push("__Secure- prefixed cookies require the Secure attribute.");
2124
+ }
2125
+ if (!cookie.secure) {
2126
+ warnings.push("Missing Secure attribute \u2014 the cookie can be sent over a plain HTTP connection.");
2127
+ }
2128
+ if (cookie.maxAge !== null && cookie.maxAge > MAX_COOKIE_AGE_SECONDS) {
2129
+ warnings.push(`Max-Age (${cookie.maxAge}s) exceeds 400 days \u2014 Chromium-based browsers clamp cookie expiry to 400 days from when it's set, so this will be shortened.`);
2130
+ }
2131
+ return { cookie, issues, warnings, valid: issues.length === 0 };
2132
+ }
1986
2133
 
1987
- export { DNS_RECORD_TYPES, HTTP_HEADERS, REFERRER_POLICY_VALUES, STATUS_CODES, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildMapUrl, buildReferrerPolicy, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap };
2134
+ export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildReferrerPolicy, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseUserAgent, searchHeaders, searchStatusCodes, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateRobotsTxt, validateSitemap };
@@ -52,6 +52,7 @@ __export(code_exports, {
52
52
  searchCheatsheet: () => searchCheatsheet,
53
53
  searchEndpoints: () => searchEndpoints,
54
54
  splitStatements: () => splitStatements,
55
+ testGitignorePatterns: () => testGitignorePatterns,
55
56
  testPattern: () => testPattern,
56
57
  testRegex: () => testRegex,
57
58
  validateEnvKey: () => validateEnvKey
@@ -2860,5 +2861,84 @@ function lintConventionalCommit(message, options = {}) {
2860
2861
  const valid = !findings.some((f) => f.severity === "error");
2861
2862
  return { message, valid, parsed, findings };
2862
2863
  }
2864
+ function globSegmentToRegexSource(segment) {
2865
+ let out = "";
2866
+ for (let i = 0; i < segment.length; i++) {
2867
+ const c = segment[i];
2868
+ if (c === "*") {
2869
+ out += "[^/]*";
2870
+ } else if (c === "?") {
2871
+ out += "[^/]";
2872
+ } else if (c === "[") {
2873
+ const close = segment.indexOf("]", i + 1);
2874
+ if (close === -1) {
2875
+ out += "\\[";
2876
+ } else {
2877
+ let cls = segment.slice(i + 1, close);
2878
+ if (cls.startsWith("!")) cls = "^" + cls.slice(1);
2879
+ out += `[${cls}]`;
2880
+ i = close;
2881
+ }
2882
+ } else {
2883
+ out += c.replace(/[.+^${}()|\\]/g, "\\$&");
2884
+ }
2885
+ }
2886
+ return out;
2887
+ }
2888
+ function compileGitignorePattern(raw, line) {
2889
+ let pattern = raw.replace(/\s+$/, "");
2890
+ if (!pattern || pattern.startsWith("#")) return null;
2891
+ let negate = false;
2892
+ if (pattern.startsWith("!")) {
2893
+ negate = true;
2894
+ pattern = pattern.slice(1);
2895
+ }
2896
+ pattern = pattern.replace(/\\(.)/g, "$1");
2897
+ if (!pattern) return null;
2898
+ const dirOnly = pattern.endsWith("/") && !pattern.endsWith("\\/");
2899
+ if (dirOnly) pattern = pattern.slice(0, -1);
2900
+ const hasLeadingSlash = pattern.startsWith("/");
2901
+ if (hasLeadingSlash) pattern = pattern.slice(1);
2902
+ const anchored = hasLeadingSlash || pattern.includes("/");
2903
+ const segments = pattern.split("/");
2904
+ const regexParts = segments.map((seg) => {
2905
+ if (seg === "**") return "(?:.*)";
2906
+ return globSegmentToRegexSource(seg);
2907
+ });
2908
+ let body = regexParts.join("/");
2909
+ body = body.replace(/\(\?:\.\*\)\//g, "(?:.*/)?").replace(/\/\(\?:\.\*\)/g, "(?:/.*)?");
2910
+ const prefix = anchored ? "^" : "^(?:.*/)?";
2911
+ const suffix = "(?:/.*)?$";
2912
+ const regex = new RegExp(prefix + body + suffix);
2913
+ return { raw, line, negate, regex };
2914
+ }
2915
+ function testGitignorePatterns(gitignoreContent, paths) {
2916
+ if (typeof gitignoreContent !== "string" || !gitignoreContent.trim()) {
2917
+ return { error: "gitignore content is required" };
2918
+ }
2919
+ if (!Array.isArray(paths) || paths.length === 0) {
2920
+ return { error: "At least one path is required" };
2921
+ }
2922
+ const lines = gitignoreContent.split("\n");
2923
+ const patterns = [];
2924
+ lines.forEach((line, idx) => {
2925
+ const compiled = compileGitignorePattern(line, idx + 1);
2926
+ if (compiled) patterns.push(compiled);
2927
+ });
2928
+ return paths.map((rawPath) => {
2929
+ const path = rawPath.trim().replace(/^\.\//, "");
2930
+ let ignored = false;
2931
+ let matchedPattern = null;
2932
+ let matchedLine = null;
2933
+ for (const p of patterns) {
2934
+ if (p.regex.test(path)) {
2935
+ ignored = !p.negate;
2936
+ matchedPattern = p.raw.trim();
2937
+ matchedLine = p.line;
2938
+ }
2939
+ }
2940
+ return { path, ignored, matchedPattern, matchedLine };
2941
+ });
2942
+ }
2863
2943
 
2864
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testPattern, testRegex, validateEnvKey };
2944
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEnvKey };
@@ -21,6 +21,7 @@
21
21
  * - github-url-parser (parseGithubUrl)
22
22
  * - redos-detector (detectRedos)
23
23
  * - conventional-commit-linter (lintConventionalCommit)
24
+ * - gitignore-tester (testGitignorePatterns)
24
25
  */
25
26
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
26
27
  declare const ALL_FLAGS: RegexFlag[];
@@ -375,6 +376,22 @@ declare const DEFAULT_COMMIT_TYPES: string[];
375
376
  declare function lintConventionalCommit(message: string, options?: ConventionalCommitOptions): ConventionalCommitResult | {
376
377
  error: string;
377
378
  };
379
+ interface GitignoreTestResult {
380
+ path: string;
381
+ ignored: boolean;
382
+ matchedPattern: string | null;
383
+ matchedLine: number | null;
384
+ }
385
+ /**
386
+ * Test a list of paths against a .gitignore file's contents. Returns, for
387
+ * each path, whether it would be ignored and which pattern (and line number)
388
+ * decided that outcome, following the "last matching pattern wins, negation
389
+ * flips it" rule git itself uses. Paths should be relative, forward-slash
390
+ * separated, and use a trailing `/` to mark a directory.
391
+ */
392
+ declare function testGitignorePatterns(gitignoreContent: string, paths: string[]): GitignoreTestResult[] | {
393
+ error: string;
394
+ };
378
395
 
379
396
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
380
397
  type code_ApiEndpoint = ApiEndpoint;
@@ -397,6 +414,7 @@ type code_GitCommandResult = GitCommandResult;
397
414
  type code_GitOperation = GitOperation;
398
415
  type code_GithubUrlInfo = GithubUrlInfo;
399
416
  type code_GithubUrlType = GithubUrlType;
417
+ type code_GitignoreTestResult = GitignoreTestResult;
400
418
  type code_GqlFormatResult = GqlFormatResult;
401
419
  type code_HtmlFormatResult = HtmlFormatResult;
402
420
  type code_HtmlMinifyOptions = HtmlMinifyOptions;
@@ -465,11 +483,12 @@ declare const code_removeRedundantAttributes: typeof removeRedundantAttributes;
465
483
  declare const code_searchCheatsheet: typeof searchCheatsheet;
466
484
  declare const code_searchEndpoints: typeof searchEndpoints;
467
485
  declare const code_splitStatements: typeof splitStatements;
486
+ declare const code_testGitignorePatterns: typeof testGitignorePatterns;
468
487
  declare const code_testPattern: typeof testPattern;
469
488
  declare const code_testRegex: typeof testRegex;
470
489
  declare const code_validateEnvKey: typeof validateEnvKey;
471
490
  declare namespace code {
472
- 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_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_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, 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_testPattern as testPattern, code_testRegex as testRegex, code_validateEnvKey as validateEnvKey };
491
+ 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_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, 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_validateEnvKey as validateEnvKey };
473
492
  }
474
493
 
475
- export { countProperties as $, ALL_FLAGS as A, type RegexError as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EnvEntry as E, type RegexFlag as F, type GitCommandConfig as G, type HtmlFormatResult as H, type RegexMatch as I, type JsMinifyOptions as J, type RegexResult as K, type RegexSuccess as L, MIME_TABLE as M, type Segment as N, OPERATIONS as O, type ParsedSpec as P, type SpecVersion as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type SqlDialect as T, type SqlFormatOptions as U, type TestPatternResult as V, buildDockerPull as W, buildDockerRun as X, buildGitCommand as Y, collapseHtmlWhitespace as Z, collapseJsWhitespace as _, type ApiEndpoint as a, countRules as a0, detectDialect as a1, detectOperationType as a2, detectRedos as a3, envToExport as a4, envToJson as a5, formatCss as a6, formatGql as a7, formatHtml as a8, formatSql as a9, testPattern as aA, testRegex as aB, validateEnvKey as aC, getEndpointsByTag as aa, getHtmlStats as ab, getJsStats as ac, getMethodColor as ad, isValidTag as ae, lintConventionalCommit as af, lookupMime as ag, minifyCss as ah, minifyGql as ai, minifyHtml as aj, minifyJs as ak, minifySql as al, normalizeRef as am, parseDockerImage as an, parseEnv as ao, parseGitCommand as ap, parseGithubUrl as aq, parseSpec as ar, removeConsoleCalls as as, removeEmptyAttributes as at, removeHtmlComments as au, removeJsComments as av, removeRedundantAttributes as aw, searchCheatsheet as ax, searchEndpoints as ay, splitStatements 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 EnvParseResult as m, type GitCommandResult as n, type GitOperation as o, type GithubUrlInfo as p, type GithubUrlType as q, type GqlFormatResult as r, type HtmlMinifyOptions as s, type HtmlMinifyResult as t, type JsMinifyResult as u, type MatchResult as v, type MimeEntry as w, type MimeLookupResult as x, type RedosResult as y, type RedosSeverity as z };
494
+ export { collapseJsWhitespace as $, ALL_FLAGS as A, type RedosSeverity as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EnvEntry as E, type RegexError as F, type GitCommandConfig as G, type HtmlFormatResult as H, type RegexFlag as I, type JsMinifyOptions as J, type RegexMatch as K, type RegexResult as L, MIME_TABLE as M, type RegexSuccess as N, OPERATIONS as O, type ParsedSpec as P, type Segment as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type SpecVersion as T, type SqlDialect as U, type SqlFormatOptions as V, type TestPatternResult as W, buildDockerPull as X, buildDockerRun as Y, buildGitCommand as Z, collapseHtmlWhitespace as _, type ApiEndpoint as a, countProperties as a0, countRules as a1, detectDialect as a2, detectOperationType as a3, detectRedos as a4, envToExport as a5, envToJson as a6, formatCss as a7, formatGql as a8, formatHtml as a9, splitStatements as aA, testGitignorePatterns as aB, testPattern as aC, testRegex as aD, validateEnvKey as aE, formatSql as aa, getEndpointsByTag as ab, getHtmlStats as ac, getJsStats as ad, getMethodColor as ae, isValidTag as af, lintConventionalCommit as ag, lookupMime as ah, minifyCss as ai, minifyGql as aj, minifyHtml as ak, minifyJs as al, minifySql as am, normalizeRef as an, parseDockerImage as ao, parseEnv as ap, parseGitCommand as aq, parseGithubUrl as ar, parseSpec as as, removeConsoleCalls as at, removeEmptyAttributes as au, removeHtmlComments as av, removeJsComments as aw, removeRedundantAttributes as ax, searchCheatsheet as ay, searchEndpoints 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 EnvParseResult as m, type GitCommandResult as n, type GitOperation as o, type GithubUrlInfo as p, type GithubUrlType as q, type GitignoreTestResult as r, type GqlFormatResult as s, type HtmlMinifyOptions as t, type HtmlMinifyResult as u, type JsMinifyResult as v, type MatchResult as w, type MimeEntry as x, type MimeLookupResult as y, type RedosResult as z };
@@ -21,6 +21,7 @@
21
21
  * - github-url-parser (parseGithubUrl)
22
22
  * - redos-detector (detectRedos)
23
23
  * - conventional-commit-linter (lintConventionalCommit)
24
+ * - gitignore-tester (testGitignorePatterns)
24
25
  */
25
26
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
26
27
  declare const ALL_FLAGS: RegexFlag[];
@@ -375,6 +376,22 @@ declare const DEFAULT_COMMIT_TYPES: string[];
375
376
  declare function lintConventionalCommit(message: string, options?: ConventionalCommitOptions): ConventionalCommitResult | {
376
377
  error: string;
377
378
  };
379
+ interface GitignoreTestResult {
380
+ path: string;
381
+ ignored: boolean;
382
+ matchedPattern: string | null;
383
+ matchedLine: number | null;
384
+ }
385
+ /**
386
+ * Test a list of paths against a .gitignore file's contents. Returns, for
387
+ * each path, whether it would be ignored and which pattern (and line number)
388
+ * decided that outcome, following the "last matching pattern wins, negation
389
+ * flips it" rule git itself uses. Paths should be relative, forward-slash
390
+ * separated, and use a trailing `/` to mark a directory.
391
+ */
392
+ declare function testGitignorePatterns(gitignoreContent: string, paths: string[]): GitignoreTestResult[] | {
393
+ error: string;
394
+ };
378
395
 
379
396
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
380
397
  type code_ApiEndpoint = ApiEndpoint;
@@ -397,6 +414,7 @@ type code_GitCommandResult = GitCommandResult;
397
414
  type code_GitOperation = GitOperation;
398
415
  type code_GithubUrlInfo = GithubUrlInfo;
399
416
  type code_GithubUrlType = GithubUrlType;
417
+ type code_GitignoreTestResult = GitignoreTestResult;
400
418
  type code_GqlFormatResult = GqlFormatResult;
401
419
  type code_HtmlFormatResult = HtmlFormatResult;
402
420
  type code_HtmlMinifyOptions = HtmlMinifyOptions;
@@ -465,11 +483,12 @@ declare const code_removeRedundantAttributes: typeof removeRedundantAttributes;
465
483
  declare const code_searchCheatsheet: typeof searchCheatsheet;
466
484
  declare const code_searchEndpoints: typeof searchEndpoints;
467
485
  declare const code_splitStatements: typeof splitStatements;
486
+ declare const code_testGitignorePatterns: typeof testGitignorePatterns;
468
487
  declare const code_testPattern: typeof testPattern;
469
488
  declare const code_testRegex: typeof testRegex;
470
489
  declare const code_validateEnvKey: typeof validateEnvKey;
471
490
  declare namespace code {
472
- 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_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_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, 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_testPattern as testPattern, code_testRegex as testRegex, code_validateEnvKey as validateEnvKey };
491
+ 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_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, 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_validateEnvKey as validateEnvKey };
473
492
  }
474
493
 
475
- export { countProperties as $, ALL_FLAGS as A, type RegexError as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EnvEntry as E, type RegexFlag as F, type GitCommandConfig as G, type HtmlFormatResult as H, type RegexMatch as I, type JsMinifyOptions as J, type RegexResult as K, type RegexSuccess as L, MIME_TABLE as M, type Segment as N, OPERATIONS as O, type ParsedSpec as P, type SpecVersion as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type SqlDialect as T, type SqlFormatOptions as U, type TestPatternResult as V, buildDockerPull as W, buildDockerRun as X, buildGitCommand as Y, collapseHtmlWhitespace as Z, collapseJsWhitespace as _, type ApiEndpoint as a, countRules as a0, detectDialect as a1, detectOperationType as a2, detectRedos as a3, envToExport as a4, envToJson as a5, formatCss as a6, formatGql as a7, formatHtml as a8, formatSql as a9, testPattern as aA, testRegex as aB, validateEnvKey as aC, getEndpointsByTag as aa, getHtmlStats as ab, getJsStats as ac, getMethodColor as ad, isValidTag as ae, lintConventionalCommit as af, lookupMime as ag, minifyCss as ah, minifyGql as ai, minifyHtml as aj, minifyJs as ak, minifySql as al, normalizeRef as am, parseDockerImage as an, parseEnv as ao, parseGitCommand as ap, parseGithubUrl as aq, parseSpec as ar, removeConsoleCalls as as, removeEmptyAttributes as at, removeHtmlComments as au, removeJsComments as av, removeRedundantAttributes as aw, searchCheatsheet as ax, searchEndpoints as ay, splitStatements 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 EnvParseResult as m, type GitCommandResult as n, type GitOperation as o, type GithubUrlInfo as p, type GithubUrlType as q, type GqlFormatResult as r, type HtmlMinifyOptions as s, type HtmlMinifyResult as t, type JsMinifyResult as u, type MatchResult as v, type MimeEntry as w, type MimeLookupResult as x, type RedosResult as y, type RedosSeverity as z };
494
+ export { collapseJsWhitespace as $, ALL_FLAGS as A, type RedosSeverity as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EnvEntry as E, type RegexError as F, type GitCommandConfig as G, type HtmlFormatResult as H, type RegexFlag as I, type JsMinifyOptions as J, type RegexMatch as K, type RegexResult as L, MIME_TABLE as M, type RegexSuccess as N, OPERATIONS as O, type ParsedSpec as P, type Segment as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type SpecVersion as T, type SqlDialect as U, type SqlFormatOptions as V, type TestPatternResult as W, buildDockerPull as X, buildDockerRun as Y, buildGitCommand as Z, collapseHtmlWhitespace as _, type ApiEndpoint as a, countProperties as a0, countRules as a1, detectDialect as a2, detectOperationType as a3, detectRedos as a4, envToExport as a5, envToJson as a6, formatCss as a7, formatGql as a8, formatHtml as a9, splitStatements as aA, testGitignorePatterns as aB, testPattern as aC, testRegex as aD, validateEnvKey as aE, formatSql as aa, getEndpointsByTag as ab, getHtmlStats as ac, getJsStats as ad, getMethodColor as ae, isValidTag as af, lintConventionalCommit as ag, lookupMime as ah, minifyCss as ai, minifyGql as aj, minifyHtml as ak, minifyJs as al, minifySql as am, normalizeRef as an, parseDockerImage as ao, parseEnv as ap, parseGitCommand as aq, parseGithubUrl as ar, parseSpec as as, removeConsoleCalls as at, removeEmptyAttributes as au, removeHtmlComments as av, removeJsComments as aw, removeRedundantAttributes as ax, searchCheatsheet as ay, searchEndpoints 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 EnvParseResult as m, type GitCommandResult as n, type GitOperation as o, type GithubUrlInfo as p, type GithubUrlType as q, type GitignoreTestResult as r, type GqlFormatResult as s, type HtmlMinifyOptions as t, type HtmlMinifyResult as u, type JsMinifyResult as v, type MatchResult as w, type MimeEntry as x, type MimeLookupResult as y, type RedosResult as z };