@utilix-tech/sdk 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +21 -5
- package/dist/{chunk-7AJRK57W.js → chunk-47RI5V3B.js} +31 -1
- package/dist/{chunk-UTHAHRQ7.js → chunk-DBNTO3YO.js} +79 -1
- package/dist/{chunk-UUT5HNST.js → chunk-JL7YTXRB.js} +81 -1
- package/dist/{chunk-YEXQDI3J.js → chunk-RZUNTYEH.js} +40 -1
- package/dist/{code-BK-x8hVx.d.cts → code-KXoRsHtl.d.cts} +21 -2
- package/dist/{code-BK-x8hVx.d.ts → code-KXoRsHtl.d.ts} +21 -2
- package/dist/{data-CFeS9kes.d.cts → data-BCf3dm-E.d.cts} +28 -2
- package/dist/{data-CFeS9kes.d.ts → data-BCf3dm-E.d.ts} +28 -2
- package/dist/index.cjs +227 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/{network-X0EfH9Xq.d.cts → network-CnKUQT4g.d.cts} +36 -2
- package/dist/{network-X0EfH9Xq.d.ts → network-CnKUQT4g.d.ts} +36 -2
- package/dist/tools/code.cjs +80 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/data.cjs +39 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/network.cjs +78 -0
- package/dist/tools/network.d.cts +1 -1
- package/dist/tools/network.d.ts +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/units.cjs +30 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-c90DW-OZ.d.cts → units-HQrMCiNM.d.cts} +34 -2
- package/dist/{units-c90DW-OZ.d.ts → units-HQrMCiNM.d.ts} +34 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.38.0
|
|
6
|
+
- Add `compareUnitPrices` (unit-price-comparator): compare two or more package options by price and quantity to find the true cost per unit, flag the cheapest, and report how much more expensive each other option is by percentage.
|
|
7
|
+
- Add `csvToSqlInsert` (csv-to-sql-insert-generator): convert CSV data with a header row into parameterless SQL INSERT statements, with basic type inference (numbers/booleans unquoted, empty cells NULL) and ANSI/MySQL identifier quoting.
|
|
8
|
+
|
|
9
|
+
## 0.37.0
|
|
10
|
+
- 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.
|
|
11
|
+
- 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.
|
|
12
|
+
|
|
5
13
|
## 0.36.0
|
|
6
14
|
- 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`.
|
|
7
15
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**606 developer utility functions for Node.js: runs locally, no API key required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
6
6
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
@@ -193,7 +193,7 @@ import { parseCsv, csvToJson, validateYaml, tomlToJson, jsonToToml,
|
|
|
193
193
|
formatXml, xmlToJson, jsonToXml, parseIni,
|
|
194
194
|
validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
|
|
195
195
|
parseSubtitles, convertSubtitles, shiftSubtitles, parseFrontMatter,
|
|
196
|
-
generateMarkdownToc } from "@utilix-tech/sdk/data";
|
|
196
|
+
generateMarkdownToc, csvToSqlInsert } from "@utilix-tech/sdk/data";
|
|
197
197
|
|
|
198
198
|
// CSV
|
|
199
199
|
const rows = parseCsv("name,age\nalice,30\nbob,25");
|
|
@@ -235,6 +235,10 @@ parseFrontMatter("---\ntitle: Hello World\ntags: [foo, bar]\n---\n# Body");
|
|
|
235
235
|
// Markdown table of contents: ATX headings -> nested links with GitHub-style slugs
|
|
236
236
|
generateMarkdownToc("# Title\n\n## Section One\n\n## Section Two\n");
|
|
237
237
|
// { toc: "- [Title](#title)\n - [Section One](#section-one)\n - [Section Two](#section-two)", entries: [...] }
|
|
238
|
+
|
|
239
|
+
// CSV to SQL INSERT statements, with basic type inference and identifier quoting
|
|
240
|
+
csvToSqlInsert("name,age\nAlice,30\nBob,25", { tableName: "users" });
|
|
241
|
+
// { sql: 'INSERT INTO "users" ("name", "age") VALUES (\'Alice\', 30);\n...', rowCount: 2, ... }
|
|
238
242
|
```
|
|
239
243
|
|
|
240
244
|
---
|
|
@@ -296,7 +300,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
296
300
|
### `/units`: Conversions
|
|
297
301
|
|
|
298
302
|
```ts
|
|
299
|
-
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi } from "@utilix-tech/sdk/units";
|
|
303
|
+
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices } from "@utilix-tech/sdk/units";
|
|
300
304
|
|
|
301
305
|
// File sizes
|
|
302
306
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -394,6 +398,10 @@ calculateEmi(500000, 8.5, 5, "years");
|
|
|
394
398
|
// ROI: return on investment percent, plus annualized (CAGR) return if years is given
|
|
395
399
|
calculateRoi({ initialValue: 1000, finalValue: 1610.51, years: 5 });
|
|
396
400
|
// { profit: 610.51, roiPercent: 61.051, annualizedReturnPercent: 10, ... }
|
|
401
|
+
|
|
402
|
+
// Unit price comparator: true cost per unit across package options, flags the cheapest
|
|
403
|
+
compareUnitPrices([{ label: "12-pack", price: 6, quantity: 12 }, { label: "24-pack", price: 10, quantity: 24 }]);
|
|
404
|
+
// { items: [...], bestLabel: "24-pack" }
|
|
397
405
|
```
|
|
398
406
|
|
|
399
407
|
---
|
|
@@ -404,7 +412,7 @@ calculateRoi({ initialValue: 1000, finalValue: 1610.51, years: 5 });
|
|
|
404
412
|
import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
405
413
|
searchStatusCodes, buildGeoUrl, countryCodeToFlag,
|
|
406
414
|
parseHar, validateSitemap, validateRobotsTxt,
|
|
407
|
-
parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader } from "@utilix-tech/sdk/network";
|
|
415
|
+
parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader } from "@utilix-tech/sdk/network";
|
|
408
416
|
|
|
409
417
|
getStatusCode(404);
|
|
410
418
|
// { code: 404, text: "Not Found", description: "...", category: "Client Error" }
|
|
@@ -451,6 +459,10 @@ parseIpv6Address("2001:db8::ff00:42:8329");
|
|
|
451
459
|
// Build an HTTP Link header from URL/rel pairs (preload, preconnect, canonical, pagination, etc.)
|
|
452
460
|
buildLinkHeader([{ url: "/fonts/inter.woff2", rel: "preload", as: "font", type: "font/woff2", crossorigin: true }]);
|
|
453
461
|
// { header: '</fonts/inter.woff2>; rel="preload"; as="font"; type="font/woff2"; crossorigin', links: [...], warnings: [] }
|
|
462
|
+
|
|
463
|
+
// Parse and validate a Set-Cookie header's attribute combination
|
|
464
|
+
checkSetCookieHeader("session=abc123; SameSite=None");
|
|
465
|
+
// { cookie: {...}, issues: ["SameSite=None requires the Secure attribute..."], warnings: [...], valid: false }
|
|
454
466
|
```
|
|
455
467
|
|
|
456
468
|
---
|
|
@@ -500,7 +512,7 @@ generateCspHeader({ "default-src": ["'self'"], "script-src": ["'self'", "cdn.exa
|
|
|
500
512
|
```ts
|
|
501
513
|
import { formatSql, minifySql, testRegex, formatHtml, formatGql,
|
|
502
514
|
detectDialect, splitStatements, lookupMime, parseGithubUrl,
|
|
503
|
-
detectRedos } from "@utilix-tech/sdk/code";
|
|
515
|
+
detectRedos, testGitignorePatterns } from "@utilix-tech/sdk/code";
|
|
504
516
|
|
|
505
517
|
// SQL
|
|
506
518
|
formatSql("SELECT id,name FROM users WHERE active=1 ORDER BY name");
|
|
@@ -536,6 +548,10 @@ parseGithubUrl("https://github.com/facebook/react/pull/1234");
|
|
|
536
548
|
// Regex ReDoS (catastrophic-backtracking) detection
|
|
537
549
|
detectRedos("(a+)+");
|
|
538
550
|
// { risk: "high", safe: false, findings: [{ type: "nested-quantifier", ... }] }
|
|
551
|
+
|
|
552
|
+
// Test paths against a .gitignore file's patterns
|
|
553
|
+
testGitignorePatterns("node_modules/\n*.log", ["node_modules/foo.js", "debug.log", "src/index.js"]);
|
|
554
|
+
// [{ path: "node_modules/foo.js", ignored: true, matchedPattern: "node_modules/", matchedLine: 1 }, ...]
|
|
539
555
|
```
|
|
540
556
|
|
|
541
557
|
---
|
|
@@ -35,6 +35,7 @@ __export(units_exports, {
|
|
|
35
35
|
calculateTipSplit: () => calculateTipSplit,
|
|
36
36
|
calculateVideoBitrate: () => calculateVideoBitrate,
|
|
37
37
|
compareSemver: () => compareSemver,
|
|
38
|
+
compareUnitPrices: () => compareUnitPrices,
|
|
38
39
|
convert: () => convert,
|
|
39
40
|
convertAprApy: () => convertAprApy,
|
|
40
41
|
convertBytes: () => convertBytes,
|
|
@@ -1837,5 +1838,34 @@ function calculateRoi(input) {
|
|
|
1837
1838
|
}
|
|
1838
1839
|
return result;
|
|
1839
1840
|
}
|
|
1841
|
+
function compareUnitPrices(items) {
|
|
1842
|
+
if (!Array.isArray(items) || items.length < 2) {
|
|
1843
|
+
return { error: "At least 2 items are required to compare" };
|
|
1844
|
+
}
|
|
1845
|
+
for (const item of items) {
|
|
1846
|
+
if (!item.label || typeof item.label !== "string") {
|
|
1847
|
+
return { error: "Each item must have a non-empty label" };
|
|
1848
|
+
}
|
|
1849
|
+
if (!Number.isFinite(item.price) || item.price <= 0) {
|
|
1850
|
+
return { error: `Item "${item.label}" must have a price greater than zero` };
|
|
1851
|
+
}
|
|
1852
|
+
if (!Number.isFinite(item.quantity) || item.quantity <= 0) {
|
|
1853
|
+
return { error: `Item "${item.label}" must have a quantity greater than zero` };
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
1857
|
+
const unitPrices = items.map((item) => item.price / item.quantity);
|
|
1858
|
+
const bestUnitPrice = Math.min(...unitPrices);
|
|
1859
|
+
const results = items.map((item, i) => ({
|
|
1860
|
+
label: item.label,
|
|
1861
|
+
price: round4(item.price),
|
|
1862
|
+
quantity: round4(item.quantity),
|
|
1863
|
+
unitPrice: round4(unitPrices[i]),
|
|
1864
|
+
isBest: unitPrices[i] === bestUnitPrice,
|
|
1865
|
+
percentMoreThanBest: round4((unitPrices[i] - bestUnitPrice) / bestUnitPrice * 100)
|
|
1866
|
+
}));
|
|
1867
|
+
const bestLabel = results.find((r) => r.isBest).label;
|
|
1868
|
+
return { items: results, bestLabel };
|
|
1869
|
+
}
|
|
1840
1870
|
|
|
1841
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
1871
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
@@ -14,6 +14,7 @@ __export(network_exports, {
|
|
|
14
14
|
buildLinkHeader: () => buildLinkHeader,
|
|
15
15
|
buildMapUrl: () => buildMapUrl,
|
|
16
16
|
buildReferrerPolicy: () => buildReferrerPolicy,
|
|
17
|
+
checkSetCookieHeader: () => checkSetCookieHeader,
|
|
17
18
|
countryCodeToFlag: () => countryCodeToFlag,
|
|
18
19
|
formatCoordinates: () => formatCoordinates,
|
|
19
20
|
formatTtl: () => formatTtl,
|
|
@@ -2052,5 +2053,82 @@ function parseIpv6Address(input) {
|
|
|
2052
2053
|
addressType: classifyIpv6(expandedGroups)
|
|
2053
2054
|
};
|
|
2054
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
|
+
}
|
|
2055
2133
|
|
|
2056
|
-
export { DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, REFERRER_POLICY_VALUES, STATUS_CODES, buildCacheControl, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, 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 };
|
|
@@ -7,6 +7,7 @@ var data_exports = {};
|
|
|
7
7
|
__export(data_exports, {
|
|
8
8
|
convertSubtitles: () => convertSubtitles,
|
|
9
9
|
csvToJson: () => csvToJson,
|
|
10
|
+
csvToSqlInsert: () => csvToSqlInsert,
|
|
10
11
|
detectDelimiter: () => detectDelimiter,
|
|
11
12
|
detectSubtitleFormat: () => detectSubtitleFormat,
|
|
12
13
|
diffEnvExample: () => diffEnvExample,
|
|
@@ -1461,5 +1462,43 @@ function generateMarkdownToc(markdown, options = {}) {
|
|
|
1461
1462
|
});
|
|
1462
1463
|
return { toc: tocLines.join("\n"), entries };
|
|
1463
1464
|
}
|
|
1465
|
+
function quoteSqlIdentifier(name, dialect) {
|
|
1466
|
+
if (dialect === "mysql") return "`" + name.replace(/`/g, "``") + "`";
|
|
1467
|
+
return '"' + name.replace(/"/g, '""') + '"';
|
|
1468
|
+
}
|
|
1469
|
+
function formatSqlValue(raw) {
|
|
1470
|
+
const trimmed = raw.trim();
|
|
1471
|
+
if (trimmed === "") return "NULL";
|
|
1472
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) return trimmed;
|
|
1473
|
+
if (/^(true|false)$/i.test(trimmed)) return trimmed.toLowerCase();
|
|
1474
|
+
return "'" + trimmed.replace(/'/g, "''") + "'";
|
|
1475
|
+
}
|
|
1476
|
+
function csvToSqlInsert(input, options) {
|
|
1477
|
+
const parsed = parseCsv(input);
|
|
1478
|
+
if ("error" in parsed) return parsed;
|
|
1479
|
+
const tableName = options?.tableName?.trim() || "my_table";
|
|
1480
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(tableName)) {
|
|
1481
|
+
return { error: "tableName must start with a letter or underscore and contain only letters, digits, and underscores" };
|
|
1482
|
+
}
|
|
1483
|
+
const dialect = options?.dialect === "mysql" ? "mysql" : "ansi";
|
|
1484
|
+
const batchSize = options?.batchSize !== void 0 && Number.isFinite(options.batchSize) && options.batchSize > 0 ? Math.floor(options.batchSize) : 1;
|
|
1485
|
+
const columns = parsed.headers.map((h) => h.trim());
|
|
1486
|
+
const quotedTable = quoteSqlIdentifier(tableName, dialect);
|
|
1487
|
+
const quotedColumns = columns.map((c) => quoteSqlIdentifier(c, dialect)).join(", ");
|
|
1488
|
+
const statements = [];
|
|
1489
|
+
for (let i = 0; i < parsed.rows.length; i += batchSize) {
|
|
1490
|
+
const batch = parsed.rows.slice(i, i + batchSize);
|
|
1491
|
+
const tuples = batch.map(
|
|
1492
|
+
(row) => "(" + columns.map((_, idx) => formatSqlValue(row[idx] ?? "")).join(", ") + ")"
|
|
1493
|
+
);
|
|
1494
|
+
statements.push(`INSERT INTO ${quotedTable} (${quotedColumns}) VALUES ${tuples.join(", ")};`);
|
|
1495
|
+
}
|
|
1496
|
+
return {
|
|
1497
|
+
sql: statements.join("\n"),
|
|
1498
|
+
rowCount: parsed.rows.length,
|
|
1499
|
+
columnCount: columns.length,
|
|
1500
|
+
columns
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1464
1503
|
|
|
1465
|
-
export { convertSubtitles, csvToJson, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
1504
|
+
export { convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
@@ -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 {
|
|
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 {
|
|
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 };
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* - subtitle-converter: parseSubtitleTimestamp, formatSubtitleTimestamp, detectSubtitleFormat, parseSubtitles, serializeSubtitles, convertSubtitles, shiftSubtitles
|
|
16
16
|
* - markdown-front-matter-parser: parseFrontMatter
|
|
17
17
|
* - markdown-toc-generator: generateMarkdownToc
|
|
18
|
+
* - csv-to-sql-insert-generator: csvToSqlInsert
|
|
18
19
|
*/
|
|
19
20
|
interface ValidationResult {
|
|
20
21
|
valid: boolean;
|
|
@@ -320,9 +321,33 @@ interface MarkdownTocResult {
|
|
|
320
321
|
declare function generateMarkdownToc(markdown: string, options?: MarkdownTocOptions): MarkdownTocResult | {
|
|
321
322
|
error: string;
|
|
322
323
|
};
|
|
324
|
+
interface CsvToSqlOptions {
|
|
325
|
+
tableName?: string;
|
|
326
|
+
dialect?: 'ansi' | 'mysql';
|
|
327
|
+
batchSize?: number;
|
|
328
|
+
}
|
|
329
|
+
interface CsvToSqlResult {
|
|
330
|
+
sql: string;
|
|
331
|
+
rowCount: number;
|
|
332
|
+
columnCount: number;
|
|
333
|
+
columns: string[];
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Paste CSV/TSV data and get parameterless SQL INSERT statements back, with
|
|
337
|
+
* basic type inference: unquoted for integers/decimals and true/false,
|
|
338
|
+
* NULL for empty cells, single-quoted (with '' escaping) for everything
|
|
339
|
+
* else. Column and table identifiers are quoted per the chosen dialect
|
|
340
|
+
* (ANSI double quotes or MySQL backticks) so reserved words and mixed-case
|
|
341
|
+
* names round-trip safely.
|
|
342
|
+
*/
|
|
343
|
+
declare function csvToSqlInsert(input: string, options?: CsvToSqlOptions): CsvToSqlResult | {
|
|
344
|
+
error: string;
|
|
345
|
+
};
|
|
323
346
|
|
|
324
347
|
type data_ConvertedSubtitles = ConvertedSubtitles;
|
|
325
348
|
type data_CsvParseResult = CsvParseResult;
|
|
349
|
+
type data_CsvToSqlOptions = CsvToSqlOptions;
|
|
350
|
+
type data_CsvToSqlResult = CsvToSqlResult;
|
|
326
351
|
type data_EnvDiffError = EnvDiffError;
|
|
327
352
|
type data_EnvDiffResult = EnvDiffResult;
|
|
328
353
|
type data_EnvEntry = EnvEntry;
|
|
@@ -346,6 +371,7 @@ type data_XmlFormatResult = XmlFormatResult;
|
|
|
346
371
|
type data_XmlToJsonOptions = XmlToJsonOptions;
|
|
347
372
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
348
373
|
declare const data_csvToJson: typeof csvToJson;
|
|
374
|
+
declare const data_csvToSqlInsert: typeof csvToSqlInsert;
|
|
349
375
|
declare const data_detectDelimiter: typeof detectDelimiter;
|
|
350
376
|
declare const data_detectSubtitleFormat: typeof detectSubtitleFormat;
|
|
351
377
|
declare const data_diffEnvExample: typeof diffEnvExample;
|
|
@@ -390,7 +416,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
390
416
|
declare const data_validateYaml: typeof validateYaml;
|
|
391
417
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
392
418
|
declare namespace data {
|
|
393
|
-
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
419
|
+
export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
394
420
|
}
|
|
395
421
|
|
|
396
|
-
export {
|
|
422
|
+
export { parseCsv as $, formatXml as A, generateMarkdownToc as B, type ConvertedSubtitles as C, getSection as D, type EnvDiffError as E, type FrontMatterError as F, getSectionNames as G, getTomlStats as H, type IniSection as I, getXmlStats as J, getYamlStats as K, iniToJson as L, type MarkdownTocEntry as M, type NdjsonLineResult as N, jsonArrayToNdjson as O, type ParseOptions as P, jsonToIni as Q, jsonToToml as R, type SubtitleCue as S, type TomlFormatResult as T, jsonToXml as U, type ValidationResult as V, minifyNdjson as W, type XmlFormatResult as X, minifyToml as Y, minifyXml as Z, ndjsonToJsonArray as _, type CsvParseResult as a, parseEnv as a0, parseFrontMatter as a1, parseIni as a2, parseSubtitleTimestamp as a3, parseSubtitles as a4, parseXmlToObject as a5, serializeSubtitles as a6, shiftSubtitles as a7, stringifyIni as a8, toCsvString as a9, tomlToJson as aa, validateEnvKey as ab, validateIni as ac, validateNdjson as ad, validateToml as ae, validateXml as af, validateYaml as ag, xmlToJson as ah, type CsvToSqlOptions as b, type CsvToSqlResult as c, data as d, type EnvDiffResult as e, type EnvEntry as f, type EnvParseResult as g, type FrontMatterResult as h, type MarkdownTocOptions as i, type MarkdownTocResult as j, type NdjsonValidateResult as k, type ParsedIni as l, type ParsedSubtitles as m, type SubtitleFormat as n, type XmlToJsonOptions as o, convertSubtitles as p, csvToJson as q, csvToSqlInsert as r, detectDelimiter as s, detectSubtitleFormat as t, diffEnvExample as u, envToExport as v, envToJson as w, formatNdjson as x, formatSubtitleTimestamp as y, formatToml as z };
|