@utilix-tech/sdk 0.79.0 → 0.80.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,10 @@
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.80.0
6
+ - Add `diffJsonPatch`, `applyJsonPatch`, `generateJsonPatch` (json-patch): diff two JSON documents into an RFC 6902 JSON Patch operation list (add/remove/replace/move/copy/test), or apply a patch to a target document.
7
+ - Add `parseConnectionString` (connection-string-parser): parse a database connection URI (postgres, mysql, mongodb, redis, amqp, and similar) into its scheme, credentials, hosts, database, and query parameters.
8
+
5
9
  ## 0.79.0
6
10
  - Add `calculateRealRateOfReturn` (real-rate-of-return-calculator): apply the Fisher equation to solve for whichever of the nominal rate, inflation rate, or inflation-adjusted real rate is missing, given exactly two of the three.
7
11
  - Add `calculateRetryBackoffSchedule` (retry-backoff-calculator): compute the full sequence of delays an exponential-backoff retry policy would actually produce, optionally capped and with full/equal jitter ranges, plus the total best-case and worst-case wait across all retries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **706 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **712 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)
@@ -66,7 +66,8 @@ const { formatJson } = require("@utilix-tech/sdk/json");
66
66
 
67
67
  ```ts
68
68
  import { formatJson, minifyJson, diffJson, jsonToTypescript, jsonSchemaToTypescript, validateJson,
69
- evaluateJsonPath, resolveJsonPointer, applyJsonMergePatch, jsonToCsv, yamlToJson, jsonToYaml, getJsonStats } from "@utilix-tech/sdk/json";
69
+ evaluateJsonPath, resolveJsonPointer, applyJsonMergePatch, diffJsonPatch, applyJsonPatch,
70
+ jsonToCsv, yamlToJson, jsonToYaml, getJsonStats } from "@utilix-tech/sdk/json";
70
71
 
71
72
  // Format with 2-space indent
72
73
  formatJson('{"name":"alice","age":30}', { indent: 2 });
@@ -91,6 +92,12 @@ resolveJsonPointer('{"users":[{"name":"Alice"}]}', "/users/0/name");
91
92
  applyJsonMergePatch('{"a":"b","c":{"d":"e","f":"g"}}', '{"a":"z","c":{"f":null}}');
92
93
  // { result: { a: "z", c: { d: "e" } } }
93
94
 
95
+ // Diff two documents into an RFC 6902 JSON Patch, or apply one
96
+ diffJsonPatch({ a: 1 }, { a: 2 });
97
+ // [{ op: "replace", path: "/a", value: 2 }]
98
+ applyJsonPatch({ foo: "bar" }, [{ op: "add", path: "/baz", value: "qux" }]);
99
+ // { result: { foo: "bar", baz: "qux" } }
100
+
94
101
  // Convert JSON to CSV
95
102
  jsonToCsv('[{"a":1,"b":2}]');
96
103
 
@@ -773,7 +780,7 @@ generateCspHeader({ "default-src": ["'self'"], "script-src": ["'self'", "cdn.exa
773
780
  import { formatSql, minifySql, testRegex, formatHtml, formatGql,
774
781
  detectDialect, splitStatements, lookupMime, parseGithubUrl,
775
782
  detectRedos, analyzeRegexGroups, testGitignorePatterns, validateEditorConfig,
776
- validateTsconfig, validatePackageExports } from "@utilix-tech/sdk/code";
783
+ validateTsconfig, validatePackageExports, parseConnectionString } from "@utilix-tech/sdk/code";
777
784
 
778
785
  // SQL
779
786
  formatSql("SELECT id,name FROM users WHERE active=1 ORDER BY name");
@@ -806,6 +813,10 @@ lookupMime("image/jpeg"); // { kind: "mime", matches: [{ extension: "jpg", ...
806
813
  parseGithubUrl("https://github.com/facebook/react/pull/1234");
807
814
  // { owner: "facebook", repo: "react", type: "pull", number: 1234 }
808
815
 
816
+ // Database connection string parsing
817
+ parseConnectionString("postgres://user:pass@localhost:5432/mydb?sslmode=require");
818
+ // { scheme: "postgres", user: "user", password: "pass", hosts: [{ host: "localhost", port: 5432 }], database: "mydb", params: { sslmode: "require" } }
819
+
809
820
  // Regex ReDoS (catastrophic-backtracking) detection
810
821
  detectRedos("(a+)+");
811
822
  // { risk: "high", safe: false, findings: [{ type: "nested-quantifier", ... }] }
@@ -44,6 +44,7 @@ __export(code_exports, {
44
44
  minifySql: () => minifySql,
45
45
  normalizeRef: () => normalizeRef,
46
46
  parseCommitTrailers: () => parseCommitTrailers,
47
+ parseConnectionString: () => parseConnectionString,
47
48
  parseDockerImage: () => parseDockerImage,
48
49
  parseEnv: () => parseEnv,
49
50
  parseGitCommand: () => parseGitCommand,
@@ -3876,5 +3877,52 @@ function validateAria(html) {
3876
3877
  valid: issues.every((i) => i.severity !== "error")
3877
3878
  };
3878
3879
  }
3880
+ var CONNECTION_STRING_RE = /^([a-zA-Z][a-zA-Z0-9+.-]*):\/\/(?:([^@/?#]*)@)?([^/?#]*)(?:\/([^?#]*))?(?:\?([^#]*))?$/;
3881
+ function _parseConnectionHost(segment) {
3882
+ const ipv6Match = segment.match(/^\[([^\]]+)\](?::(\d+))?$/);
3883
+ if (ipv6Match) {
3884
+ return { host: ipv6Match[1], port: ipv6Match[2] ? parseInt(ipv6Match[2], 10) : null };
3885
+ }
3886
+ const lastColon = segment.lastIndexOf(":");
3887
+ if (lastColon === -1) return { host: segment, port: null };
3888
+ const portPart = segment.slice(lastColon + 1);
3889
+ if (!/^\d+$/.test(portPart)) return { host: segment, port: null };
3890
+ return { host: segment.slice(0, lastColon), port: parseInt(portPart, 10) };
3891
+ }
3892
+ function parseConnectionString(input) {
3893
+ if (!input || typeof input !== "string" || !input.trim()) {
3894
+ return { error: "Connection string is empty" };
3895
+ }
3896
+ const trimmed = input.trim();
3897
+ const match = trimmed.match(CONNECTION_STRING_RE);
3898
+ if (!match) {
3899
+ return { error: "Not a valid scheme://[user[:password]@]host[,host2][/database][?params] connection string" };
3900
+ }
3901
+ const [, scheme, userinfo, hostPart, databasePart, queryPart] = match;
3902
+ let user = null;
3903
+ let password = null;
3904
+ if (userinfo) {
3905
+ const sepIndex = userinfo.indexOf(":");
3906
+ if (sepIndex === -1) {
3907
+ user = decodeURIComponent(userinfo);
3908
+ } else {
3909
+ user = decodeURIComponent(userinfo.slice(0, sepIndex));
3910
+ password = decodeURIComponent(userinfo.slice(sepIndex + 1));
3911
+ }
3912
+ }
3913
+ const hosts = hostPart ? hostPart.split(",").filter(Boolean).map(_parseConnectionHost) : [];
3914
+ const database = databasePart ? decodeURIComponent(databasePart) : null;
3915
+ const params = {};
3916
+ if (queryPart) {
3917
+ for (const pair of queryPart.split("&")) {
3918
+ if (!pair) continue;
3919
+ const eqIndex = pair.indexOf("=");
3920
+ const key = eqIndex === -1 ? pair : pair.slice(0, eqIndex);
3921
+ const value = eqIndex === -1 ? "" : pair.slice(eqIndex + 1);
3922
+ params[decodeURIComponent(key)] = decodeURIComponent(value);
3923
+ }
3924
+ }
3925
+ return { scheme, user, password, hosts, database, params };
3926
+ }
3879
3927
 
3880
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validatePackageExports, validateTsconfig };
3928
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validatePackageExports, validateTsconfig };
@@ -5,13 +5,16 @@ import * as yaml from 'js-yaml';
5
5
  var json_exports = {};
6
6
  __export(json_exports, {
7
7
  applyJsonMergePatch: () => applyJsonMergePatch,
8
+ applyJsonPatch: () => applyJsonPatch,
8
9
  csvToJson: () => csvToJson,
9
10
  detectFormat: () => detectFormat,
10
11
  diffJson: () => diffJson,
12
+ diffJsonPatch: () => diffJsonPatch,
11
13
  evaluateJsonPath: () => evaluateJsonPath,
12
14
  formatDiffLine: () => formatDiffLine,
13
15
  formatJson: () => formatJson,
14
16
  generateExample: () => generateExample,
17
+ generateJsonPatch: () => generateJsonPatch,
15
18
  getJsonStats: () => getJsonStats,
16
19
  inferGoType: () => inferGoType,
17
20
  inferPythonType: () => inferPythonType,
@@ -1435,5 +1438,218 @@ function applyJsonMergePatch(targetJson, patchJson) {
1435
1438
  }
1436
1439
  return { result: mergeJsonPatch(target, patch) };
1437
1440
  }
1441
+ function _escapeJsonPointerToken(token) {
1442
+ return token.replace(/~/g, "~0").replace(/\//g, "~1");
1443
+ }
1444
+ function _unescapeJsonPointerToken(token) {
1445
+ return token.replace(/~1/g, "/").replace(/~0/g, "~");
1446
+ }
1447
+ function _parseJsonPointer(pointer) {
1448
+ if (pointer === "") return [];
1449
+ if (!pointer.startsWith("/")) throw new Error(`Invalid JSON Pointer "${pointer}": must start with "/"`);
1450
+ return pointer.slice(1).split("/").map(_unescapeJsonPointerToken);
1451
+ }
1452
+ function _isPlainObject(value) {
1453
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1454
+ }
1455
+ function _deepEqual(a, b) {
1456
+ if (a === b) return true;
1457
+ if (typeof a !== typeof b) return false;
1458
+ if (Array.isArray(a) || Array.isArray(b)) {
1459
+ if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
1460
+ return a.every((v, i) => _deepEqual(v, b[i]));
1461
+ }
1462
+ if (_isPlainObject(a) && _isPlainObject(b)) {
1463
+ const aKeys = Object.keys(a);
1464
+ const bKeys = Object.keys(b);
1465
+ if (aKeys.length !== bKeys.length) return false;
1466
+ return aKeys.every((k) => k in b && _deepEqual(a[k], b[k]));
1467
+ }
1468
+ return false;
1469
+ }
1470
+ function _getByTokens(doc, tokens) {
1471
+ let current = doc;
1472
+ for (const token of tokens) {
1473
+ if (Array.isArray(current)) {
1474
+ const index = token === "-" ? current.length - 1 : parseInt(token, 10);
1475
+ if (!Number.isInteger(index) || index < 0 || index >= current.length) return { found: false, value: void 0 };
1476
+ current = current[index];
1477
+ } else if (_isPlainObject(current)) {
1478
+ if (!(token in current)) return { found: false, value: void 0 };
1479
+ current = current[token];
1480
+ } else {
1481
+ return { found: false, value: void 0 };
1482
+ }
1483
+ }
1484
+ return { found: true, value: current };
1485
+ }
1486
+ function diffJsonPatch(a, b) {
1487
+ const ops = [];
1488
+ _diffValue(a, b, "", ops);
1489
+ return ops;
1490
+ }
1491
+ function _diffValue(a, b, path, ops) {
1492
+ if (_deepEqual(a, b)) return;
1493
+ if (_isPlainObject(a) && _isPlainObject(b)) {
1494
+ for (const key of Object.keys(a)) {
1495
+ if (!(key in b)) ops.push({ op: "remove", path: `${path}/${_escapeJsonPointerToken(key)}` });
1496
+ }
1497
+ for (const key of Object.keys(b)) {
1498
+ const childPath = `${path}/${_escapeJsonPointerToken(key)}`;
1499
+ if (!(key in a)) {
1500
+ ops.push({ op: "add", path: childPath, value: b[key] });
1501
+ } else {
1502
+ _diffValue(a[key], b[key], childPath, ops);
1503
+ }
1504
+ }
1505
+ return;
1506
+ }
1507
+ if (Array.isArray(a) && Array.isArray(b)) {
1508
+ const minLen = Math.min(a.length, b.length);
1509
+ for (let i = 0; i < minLen; i++) {
1510
+ _diffValue(a[i], b[i], `${path}/${i}`, ops);
1511
+ }
1512
+ if (b.length > a.length) {
1513
+ for (let i = a.length; i < b.length; i++) ops.push({ op: "add", path: `${path}/${i}`, value: b[i] });
1514
+ } else if (a.length > b.length) {
1515
+ for (let i = a.length - 1; i >= b.length; i--) ops.push({ op: "remove", path: `${path}/${i}` });
1516
+ }
1517
+ return;
1518
+ }
1519
+ ops.push({ op: "replace", path, value: b });
1520
+ }
1521
+ function applyJsonPatch(target, operations) {
1522
+ let doc = JSON.parse(JSON.stringify(target ?? null));
1523
+ const applyOne = (op, index) => {
1524
+ if (op.path === void 0 || op.op === void 0) return `Operation ${index}: missing "op" or "path"`;
1525
+ let tokens;
1526
+ try {
1527
+ tokens = _parseJsonPointer(op.path);
1528
+ } catch (e) {
1529
+ return `Operation ${index}: ${e.message}`;
1530
+ }
1531
+ const setAt = (tgtTokens, value) => {
1532
+ if (tgtTokens.length === 0) {
1533
+ doc = value;
1534
+ return null;
1535
+ }
1536
+ const parentTokens = tgtTokens.slice(0, -1);
1537
+ const lastToken = tgtTokens[tgtTokens.length - 1];
1538
+ const { found, value: parent } = _getByTokens(doc, parentTokens);
1539
+ if (!found) return `Operation ${index}: path "${op.path}" has no parent`;
1540
+ if (Array.isArray(parent)) {
1541
+ const idx = lastToken === "-" ? parent.length : parseInt(lastToken, 10);
1542
+ if (!Number.isInteger(idx) || idx < 0 || idx > parent.length) return `Operation ${index}: array index "${lastToken}" out of bounds`;
1543
+ parent.splice(idx, 0, value);
1544
+ } else if (_isPlainObject(parent)) {
1545
+ parent[lastToken] = value;
1546
+ } else {
1547
+ return `Operation ${index}: cannot add into a non-object, non-array value at "${op.path}"`;
1548
+ }
1549
+ return null;
1550
+ };
1551
+ const replaceAt = (tgtTokens, value) => {
1552
+ if (tgtTokens.length === 0) {
1553
+ doc = value;
1554
+ return null;
1555
+ }
1556
+ const parentTokens = tgtTokens.slice(0, -1);
1557
+ const lastToken = tgtTokens[tgtTokens.length - 1];
1558
+ const { found, value: parent } = _getByTokens(doc, parentTokens);
1559
+ if (!found) return `Operation ${index}: path "${op.path}" has no parent`;
1560
+ if (Array.isArray(parent)) {
1561
+ const idx = lastToken === "-" ? parent.length - 1 : parseInt(lastToken, 10);
1562
+ if (!Number.isInteger(idx) || idx < 0 || idx >= parent.length) return `Operation ${index}: array index "${lastToken}" out of bounds`;
1563
+ parent[idx] = value;
1564
+ } else if (_isPlainObject(parent)) {
1565
+ if (!(lastToken in parent)) return `Operation ${index}: path "${op.path}" does not exist`;
1566
+ parent[lastToken] = value;
1567
+ } else {
1568
+ return `Operation ${index}: cannot replace into a non-object, non-array value at "${op.path}"`;
1569
+ }
1570
+ return null;
1571
+ };
1572
+ const removeAt = (tgtTokens) => {
1573
+ if (tgtTokens.length === 0) return { error: `Operation ${index}: cannot remove the whole document (path "")` };
1574
+ const parentTokens = tgtTokens.slice(0, -1);
1575
+ const lastToken = tgtTokens[tgtTokens.length - 1];
1576
+ const { found, value: parent } = _getByTokens(doc, parentTokens);
1577
+ if (!found) return { error: `Operation ${index}: path "${op.path}" has no parent` };
1578
+ if (Array.isArray(parent)) {
1579
+ const idx = lastToken === "-" ? parent.length - 1 : parseInt(lastToken, 10);
1580
+ if (!Number.isInteger(idx) || idx < 0 || idx >= parent.length) return { error: `Operation ${index}: array index "${lastToken}" out of bounds` };
1581
+ const [removed] = parent.splice(idx, 1);
1582
+ return { error: null, removed };
1583
+ }
1584
+ if (_isPlainObject(parent)) {
1585
+ if (!(lastToken in parent)) return { error: `Operation ${index}: path "${op.path}" does not exist` };
1586
+ const removed = parent[lastToken];
1587
+ delete parent[lastToken];
1588
+ return { error: null, removed };
1589
+ }
1590
+ return { error: `Operation ${index}: cannot remove from a non-object, non-array value at "${op.path}"` };
1591
+ };
1592
+ switch (op.op) {
1593
+ case "add":
1594
+ return setAt(tokens, op.value);
1595
+ case "replace":
1596
+ return replaceAt(tokens, op.value);
1597
+ case "remove":
1598
+ return removeAt(tokens).error;
1599
+ case "test": {
1600
+ const { found, value } = _getByTokens(doc, tokens);
1601
+ if (!found) return `Operation ${index}: path "${op.path}" does not exist`;
1602
+ if (!_deepEqual(value, op.value)) return `Operation ${index}: test failed at "${op.path}"`;
1603
+ return null;
1604
+ }
1605
+ case "move": {
1606
+ if (!op.from) return `Operation ${index}: "move" requires "from"`;
1607
+ let fromTokens;
1608
+ try {
1609
+ fromTokens = _parseJsonPointer(op.from);
1610
+ } catch (e) {
1611
+ return `Operation ${index}: ${e.message}`;
1612
+ }
1613
+ const removal = removeAt(fromTokens);
1614
+ if (removal.error) return removal.error;
1615
+ return setAt(tokens, removal.removed);
1616
+ }
1617
+ case "copy": {
1618
+ if (!op.from) return `Operation ${index}: "copy" requires "from"`;
1619
+ let fromTokens;
1620
+ try {
1621
+ fromTokens = _parseJsonPointer(op.from);
1622
+ } catch (e) {
1623
+ return `Operation ${index}: ${e.message}`;
1624
+ }
1625
+ const { found, value } = _getByTokens(doc, fromTokens);
1626
+ if (!found) return `Operation ${index}: "from" path "${op.from}" does not exist`;
1627
+ return setAt(tokens, JSON.parse(JSON.stringify(value)));
1628
+ }
1629
+ default:
1630
+ return `Operation ${index}: unknown op "${op.op}"`;
1631
+ }
1632
+ };
1633
+ for (let i = 0; i < operations.length; i++) {
1634
+ const err = applyOne(operations[i], i);
1635
+ if (err) return { error: err };
1636
+ }
1637
+ return { result: doc };
1638
+ }
1639
+ function generateJsonPatch(aJson, bJson) {
1640
+ let a;
1641
+ try {
1642
+ a = JSON.parse(aJson);
1643
+ } catch {
1644
+ return { error: "First document is not valid JSON" };
1645
+ }
1646
+ let b;
1647
+ try {
1648
+ b = JSON.parse(bJson);
1649
+ } catch {
1650
+ return { error: "Second document is not valid JSON" };
1651
+ }
1652
+ return { patch: diffJsonPatch(a, b) };
1653
+ }
1438
1654
 
1439
- export { applyJsonMergePatch, csvToJson, detectFormat, diffJson, evaluateJsonPath, formatDiffLine, formatJson, generateExample, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, json_exports, mergeJsonPatch, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateJson, validateJsonPath, validateJsonString, yamlToJson };
1655
+ export { applyJsonMergePatch, applyJsonPatch, csvToJson, detectFormat, diffJson, diffJsonPatch, evaluateJsonPath, formatDiffLine, formatJson, generateExample, generateJsonPatch, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, json_exports, mergeJsonPatch, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateJson, validateJsonPath, validateJsonString, yamlToJson };
@@ -31,6 +31,7 @@
31
31
  * - git-commit-trailer-parser (parseCommitTrailers)
32
32
  * - markdown-footnote-extractor (extractMarkdownFootnotes)
33
33
  * - aria-validator (validateAria)
34
+ * - connection-string-parser (parseConnectionString)
34
35
  */
35
36
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
36
37
  declare const ALL_FLAGS: RegexFlag[];
@@ -649,6 +650,30 @@ interface AriaValidationResult {
649
650
  declare function validateAria(html: string): AriaValidationResult | {
650
651
  error: string;
651
652
  };
653
+ interface ConnectionStringHost {
654
+ host: string;
655
+ port: number | null;
656
+ }
657
+ interface ConnectionStringResult {
658
+ scheme: string;
659
+ user: string | null;
660
+ password: string | null;
661
+ hosts: ConnectionStringHost[];
662
+ database: string | null;
663
+ params: Record<string, string>;
664
+ }
665
+ /**
666
+ * Parses a database connection URI (postgres://, mysql://, mongodb://,
667
+ * mongodb+srv://, redis://, amqp://, and similar generic scheme://
668
+ * connection strings) into its scheme, credentials, one or more hosts
669
+ * (mongodb-style comma-separated host lists included), database/path, and
670
+ * query parameters. This is a pure, offline parse: it never attempts to
671
+ * connect, resolve DNS, or validate that the driver/scheme combination is
672
+ * real.
673
+ */
674
+ declare function parseConnectionString(input: string): ConnectionStringResult | {
675
+ error: string;
676
+ };
652
677
 
653
678
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
654
679
  type code_ApiEndpoint = ApiEndpoint;
@@ -659,6 +684,8 @@ declare const code_CHEATSHEET: typeof CHEATSHEET;
659
684
  type code_CheatsheetEntry = CheatsheetEntry;
660
685
  type code_CommitTrailer = CommitTrailer;
661
686
  type code_CommitTrailerResult = CommitTrailerResult;
687
+ type code_ConnectionStringHost = ConnectionStringHost;
688
+ type code_ConnectionStringResult = ConnectionStringResult;
662
689
  type code_ConventionalCommitFinding = ConventionalCommitFinding;
663
690
  type code_ConventionalCommitFooter = ConventionalCommitFooter;
664
691
  type code_ConventionalCommitOptions = ConventionalCommitOptions;
@@ -760,6 +787,7 @@ declare const code_minifyJs: typeof minifyJs;
760
787
  declare const code_minifySql: typeof minifySql;
761
788
  declare const code_normalizeRef: typeof normalizeRef;
762
789
  declare const code_parseCommitTrailers: typeof parseCommitTrailers;
790
+ declare const code_parseConnectionString: typeof parseConnectionString;
763
791
  declare const code_parseDockerImage: typeof parseDockerImage;
764
792
  declare const code_parseEnv: typeof parseEnv;
765
793
  declare const code_parseGitCommand: typeof parseGitCommand;
@@ -782,7 +810,7 @@ declare const code_validateEnvKey: typeof validateEnvKey;
782
810
  declare const code_validatePackageExports: typeof validatePackageExports;
783
811
  declare const code_validateTsconfig: typeof validateTsconfig;
784
812
  declare namespace code {
785
- 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_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_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 };
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 };
786
814
  }
787
815
 
788
- export { OPERATIONS as $, ALL_FLAGS as A, type EnvParseResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type ExportsIssue as F, type ExportsShape as G, type ExportsValidationResult as H, type GitCommandConfig as I, type GitCommandResult as J, type GitOperation as K, type GithubUrlInfo as L, type GithubUrlType as M, type GitignoreTestResult as N, type GqlFormatResult as O, type HtmlFormatResult as P, type HtmlMinifyOptions as Q, type HtmlMinifyResult as R, type JsMinifyOptions as S, type JsMinifyResult as T, MIME_TABLE as U, type MarkdownFootnoteDefinition as V, type MarkdownFootnoteReference as W, type MarkdownFootnoteResult as X, type MatchResult as Y, type MimeEntry as Z, type MimeLookupResult as _, type ApiEndpoint as a, removeEmptyAttributes as a$, type ParsedSpec as a0, type RedosFinding as a1, type RedosResult as a2, type RedosSeverity as a3, type RegexBackreferenceInfo as a4, type RegexError as a5, type RegexFlag as a6, type RegexGroupAnalysis as a7, type RegexGroupInfo as a8, type RegexGroupIssue as a9, envToJson as aA, extractMarkdownFootnotes as aB, extractSvgSpriteSymbols as aC, formatCss as aD, formatGql as aE, formatHtml as aF, formatSql as aG, getEndpointsByTag as aH, getHtmlStats as aI, getJsStats as aJ, getMethodColor as aK, isValidTag as aL, lintConventionalCommit as aM, lookupMime as aN, minifyCss as aO, minifyGql as aP, minifyHtml as aQ, minifyJs as aR, minifySql as aS, normalizeRef as aT, parseCommitTrailers as aU, parseDockerImage as aV, parseEnv as aW, parseGitCommand as aX, parseGithubUrl as aY, parseSpec as aZ, removeConsoleCalls as a_, type RegexMatch as aa, type RegexResult as ab, type RegexSuccess as ac, SQL_DEFAULT_OPTIONS as ad, type Segment as ae, type SpecVersion as af, type SqlDialect as ag, type SqlFormatOptions as ah, type SvgSpriteResult as ai, type SvgSpriteSymbol as aj, type TestPatternResult as ak, type TsconfigIssue as al, type TsconfigValidationResult as am, analyzeRegexGroups as an, auditDependencyRanges as ao, buildDockerPull as ap, buildDockerRun as aq, buildGitCommand as ar, collapseHtmlWhitespace as as, collapseJsWhitespace as at, countProperties as au, countRules as av, detectDialect as aw, detectOperationType as ax, detectRedos as ay, envToExport as az, type ApiInfo as b, removeHtmlComments as b0, removeJsComments as b1, removeRedundantAttributes as b2, searchCheatsheet as b3, searchEndpoints as b4, splitStatements as b5, testGitignorePatterns as b6, testPattern as b7, testRegex as b8, validateAria as b9, validateEditorConfig as ba, validateEnvKey as bb, validatePackageExports as bc, validateTsconfig as bd, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConventionalCommitFinding as i, type ConventionalCommitFooter as j, type ConventionalCommitOptions as k, type ConventionalCommitParsed as l, type ConventionalCommitResult as m, type ConventionalCommitSeverity as n, type CssResult as o, type DependencyAuditDuplicate as p, type DependencyAuditEntry as q, type DependencyAuditIssue as r, type DependencyAuditResult as s, type DependencyRangeType as t, type DependencySection as u, type DockerImageRef as v, type EditorConfigProperty as w, type EditorConfigSection as x, type EditorConfigValidationResult as y, type EnvEntry as z };
816
+ export { type MimeEntry 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 GitCommandConfig as K, type GitCommandResult as L, type GitOperation as M, type GithubUrlInfo as N, type GithubUrlType as O, type GitignoreTestResult as P, type GqlFormatResult as Q, type HtmlFormatResult as R, type HtmlMinifyOptions as S, type HtmlMinifyResult as T, type JsMinifyOptions as U, type JsMinifyResult as V, MIME_TABLE as W, type MarkdownFootnoteDefinition as X, type MarkdownFootnoteReference as Y, type MarkdownFootnoteResult as Z, type MatchResult as _, type ApiEndpoint as a, parseGithubUrl as a$, type MimeLookupResult as a0, OPERATIONS as a1, type ParsedSpec as a2, type RedosFinding as a3, type RedosResult as a4, type RedosSeverity as a5, type RegexBackreferenceInfo as a6, type RegexError as a7, type RegexFlag as a8, type RegexGroupAnalysis as a9, detectRedos as aA, envToExport as aB, envToJson as aC, extractMarkdownFootnotes as aD, extractSvgSpriteSymbols as aE, formatCss as aF, formatGql as aG, formatHtml as aH, formatSql as aI, getEndpointsByTag as aJ, getHtmlStats as aK, getJsStats as aL, getMethodColor as aM, isValidTag as aN, lintConventionalCommit as aO, lookupMime as aP, minifyCss as aQ, minifyGql as aR, minifyHtml as aS, minifyJs as aT, minifySql as aU, normalizeRef as aV, parseCommitTrailers as aW, parseConnectionString as aX, parseDockerImage as aY, parseEnv as aZ, parseGitCommand as a_, type RegexGroupInfo as aa, type RegexGroupIssue as ab, type RegexMatch as ac, type RegexResult as ad, type RegexSuccess as ae, SQL_DEFAULT_OPTIONS as af, type Segment as ag, type SpecVersion as ah, type SqlDialect as ai, type SqlFormatOptions as aj, type SvgSpriteResult as ak, type SvgSpriteSymbol as al, type TestPatternResult as am, type TsconfigIssue as an, type TsconfigValidationResult as ao, analyzeRegexGroups as ap, auditDependencyRanges as aq, buildDockerPull as ar, buildDockerRun as as, buildGitCommand as at, collapseHtmlWhitespace as au, collapseJsWhitespace as av, countProperties as aw, countRules as ax, detectDialect as ay, detectOperationType as az, type ApiInfo as b, parseSpec as b0, removeConsoleCalls as b1, removeEmptyAttributes as b2, removeHtmlComments as b3, removeJsComments as b4, removeRedundantAttributes as b5, searchCheatsheet as b6, searchEndpoints as b7, splitStatements as b8, testGitignorePatterns as b9, testPattern as ba, testRegex as bb, validateAria as bc, validateEditorConfig as bd, validateEnvKey as be, validatePackageExports as bf, validateTsconfig as bg, 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 };
@@ -31,6 +31,7 @@
31
31
  * - git-commit-trailer-parser (parseCommitTrailers)
32
32
  * - markdown-footnote-extractor (extractMarkdownFootnotes)
33
33
  * - aria-validator (validateAria)
34
+ * - connection-string-parser (parseConnectionString)
34
35
  */
35
36
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
36
37
  declare const ALL_FLAGS: RegexFlag[];
@@ -649,6 +650,30 @@ interface AriaValidationResult {
649
650
  declare function validateAria(html: string): AriaValidationResult | {
650
651
  error: string;
651
652
  };
653
+ interface ConnectionStringHost {
654
+ host: string;
655
+ port: number | null;
656
+ }
657
+ interface ConnectionStringResult {
658
+ scheme: string;
659
+ user: string | null;
660
+ password: string | null;
661
+ hosts: ConnectionStringHost[];
662
+ database: string | null;
663
+ params: Record<string, string>;
664
+ }
665
+ /**
666
+ * Parses a database connection URI (postgres://, mysql://, mongodb://,
667
+ * mongodb+srv://, redis://, amqp://, and similar generic scheme://
668
+ * connection strings) into its scheme, credentials, one or more hosts
669
+ * (mongodb-style comma-separated host lists included), database/path, and
670
+ * query parameters. This is a pure, offline parse: it never attempts to
671
+ * connect, resolve DNS, or validate that the driver/scheme combination is
672
+ * real.
673
+ */
674
+ declare function parseConnectionString(input: string): ConnectionStringResult | {
675
+ error: string;
676
+ };
652
677
 
653
678
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
654
679
  type code_ApiEndpoint = ApiEndpoint;
@@ -659,6 +684,8 @@ declare const code_CHEATSHEET: typeof CHEATSHEET;
659
684
  type code_CheatsheetEntry = CheatsheetEntry;
660
685
  type code_CommitTrailer = CommitTrailer;
661
686
  type code_CommitTrailerResult = CommitTrailerResult;
687
+ type code_ConnectionStringHost = ConnectionStringHost;
688
+ type code_ConnectionStringResult = ConnectionStringResult;
662
689
  type code_ConventionalCommitFinding = ConventionalCommitFinding;
663
690
  type code_ConventionalCommitFooter = ConventionalCommitFooter;
664
691
  type code_ConventionalCommitOptions = ConventionalCommitOptions;
@@ -760,6 +787,7 @@ declare const code_minifyJs: typeof minifyJs;
760
787
  declare const code_minifySql: typeof minifySql;
761
788
  declare const code_normalizeRef: typeof normalizeRef;
762
789
  declare const code_parseCommitTrailers: typeof parseCommitTrailers;
790
+ declare const code_parseConnectionString: typeof parseConnectionString;
763
791
  declare const code_parseDockerImage: typeof parseDockerImage;
764
792
  declare const code_parseEnv: typeof parseEnv;
765
793
  declare const code_parseGitCommand: typeof parseGitCommand;
@@ -782,7 +810,7 @@ declare const code_validateEnvKey: typeof validateEnvKey;
782
810
  declare const code_validatePackageExports: typeof validatePackageExports;
783
811
  declare const code_validateTsconfig: typeof validateTsconfig;
784
812
  declare namespace code {
785
- 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_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_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 };
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 };
786
814
  }
787
815
 
788
- export { OPERATIONS as $, ALL_FLAGS as A, type EnvParseResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type ExportsIssue as F, type ExportsShape as G, type ExportsValidationResult as H, type GitCommandConfig as I, type GitCommandResult as J, type GitOperation as K, type GithubUrlInfo as L, type GithubUrlType as M, type GitignoreTestResult as N, type GqlFormatResult as O, type HtmlFormatResult as P, type HtmlMinifyOptions as Q, type HtmlMinifyResult as R, type JsMinifyOptions as S, type JsMinifyResult as T, MIME_TABLE as U, type MarkdownFootnoteDefinition as V, type MarkdownFootnoteReference as W, type MarkdownFootnoteResult as X, type MatchResult as Y, type MimeEntry as Z, type MimeLookupResult as _, type ApiEndpoint as a, removeEmptyAttributes as a$, type ParsedSpec as a0, type RedosFinding as a1, type RedosResult as a2, type RedosSeverity as a3, type RegexBackreferenceInfo as a4, type RegexError as a5, type RegexFlag as a6, type RegexGroupAnalysis as a7, type RegexGroupInfo as a8, type RegexGroupIssue as a9, envToJson as aA, extractMarkdownFootnotes as aB, extractSvgSpriteSymbols as aC, formatCss as aD, formatGql as aE, formatHtml as aF, formatSql as aG, getEndpointsByTag as aH, getHtmlStats as aI, getJsStats as aJ, getMethodColor as aK, isValidTag as aL, lintConventionalCommit as aM, lookupMime as aN, minifyCss as aO, minifyGql as aP, minifyHtml as aQ, minifyJs as aR, minifySql as aS, normalizeRef as aT, parseCommitTrailers as aU, parseDockerImage as aV, parseEnv as aW, parseGitCommand as aX, parseGithubUrl as aY, parseSpec as aZ, removeConsoleCalls as a_, type RegexMatch as aa, type RegexResult as ab, type RegexSuccess as ac, SQL_DEFAULT_OPTIONS as ad, type Segment as ae, type SpecVersion as af, type SqlDialect as ag, type SqlFormatOptions as ah, type SvgSpriteResult as ai, type SvgSpriteSymbol as aj, type TestPatternResult as ak, type TsconfigIssue as al, type TsconfigValidationResult as am, analyzeRegexGroups as an, auditDependencyRanges as ao, buildDockerPull as ap, buildDockerRun as aq, buildGitCommand as ar, collapseHtmlWhitespace as as, collapseJsWhitespace as at, countProperties as au, countRules as av, detectDialect as aw, detectOperationType as ax, detectRedos as ay, envToExport as az, type ApiInfo as b, removeHtmlComments as b0, removeJsComments as b1, removeRedundantAttributes as b2, searchCheatsheet as b3, searchEndpoints as b4, splitStatements as b5, testGitignorePatterns as b6, testPattern as b7, testRegex as b8, validateAria as b9, validateEditorConfig as ba, validateEnvKey as bb, validatePackageExports as bc, validateTsconfig as bd, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConventionalCommitFinding as i, type ConventionalCommitFooter as j, type ConventionalCommitOptions as k, type ConventionalCommitParsed as l, type ConventionalCommitResult as m, type ConventionalCommitSeverity as n, type CssResult as o, type DependencyAuditDuplicate as p, type DependencyAuditEntry as q, type DependencyAuditIssue as r, type DependencyAuditResult as s, type DependencyRangeType as t, type DependencySection as u, type DockerImageRef as v, type EditorConfigProperty as w, type EditorConfigSection as x, type EditorConfigValidationResult as y, type EnvEntry as z };
816
+ export { type MimeEntry 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 GitCommandConfig as K, type GitCommandResult as L, type GitOperation as M, type GithubUrlInfo as N, type GithubUrlType as O, type GitignoreTestResult as P, type GqlFormatResult as Q, type HtmlFormatResult as R, type HtmlMinifyOptions as S, type HtmlMinifyResult as T, type JsMinifyOptions as U, type JsMinifyResult as V, MIME_TABLE as W, type MarkdownFootnoteDefinition as X, type MarkdownFootnoteReference as Y, type MarkdownFootnoteResult as Z, type MatchResult as _, type ApiEndpoint as a, parseGithubUrl as a$, type MimeLookupResult as a0, OPERATIONS as a1, type ParsedSpec as a2, type RedosFinding as a3, type RedosResult as a4, type RedosSeverity as a5, type RegexBackreferenceInfo as a6, type RegexError as a7, type RegexFlag as a8, type RegexGroupAnalysis as a9, detectRedos as aA, envToExport as aB, envToJson as aC, extractMarkdownFootnotes as aD, extractSvgSpriteSymbols as aE, formatCss as aF, formatGql as aG, formatHtml as aH, formatSql as aI, getEndpointsByTag as aJ, getHtmlStats as aK, getJsStats as aL, getMethodColor as aM, isValidTag as aN, lintConventionalCommit as aO, lookupMime as aP, minifyCss as aQ, minifyGql as aR, minifyHtml as aS, minifyJs as aT, minifySql as aU, normalizeRef as aV, parseCommitTrailers as aW, parseConnectionString as aX, parseDockerImage as aY, parseEnv as aZ, parseGitCommand as a_, type RegexGroupInfo as aa, type RegexGroupIssue as ab, type RegexMatch as ac, type RegexResult as ad, type RegexSuccess as ae, SQL_DEFAULT_OPTIONS as af, type Segment as ag, type SpecVersion as ah, type SqlDialect as ai, type SqlFormatOptions as aj, type SvgSpriteResult as ak, type SvgSpriteSymbol as al, type TestPatternResult as am, type TsconfigIssue as an, type TsconfigValidationResult as ao, analyzeRegexGroups as ap, auditDependencyRanges as aq, buildDockerPull as ar, buildDockerRun as as, buildGitCommand as at, collapseHtmlWhitespace as au, collapseJsWhitespace as av, countProperties as aw, countRules as ax, detectDialect as ay, detectOperationType as az, type ApiInfo as b, parseSpec as b0, removeConsoleCalls as b1, removeEmptyAttributes as b2, removeHtmlComments as b3, removeJsComments as b4, removeRedundantAttributes as b5, searchCheatsheet as b6, searchEndpoints as b7, splitStatements as b8, testGitignorePatterns as b9, testPattern as ba, testRegex as bb, validateAria as bc, validateEditorConfig as bd, validateEnvKey as be, validatePackageExports as bf, validateTsconfig as bg, 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 };