@utilix-tech/sdk 0.73.0 → 0.75.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 +14 -5
- package/dist/{api-C8rImfka.d.cts → api-CQnIUrVB.d.cts} +26 -2
- package/dist/{api-C8rImfka.d.ts → api-CQnIUrVB.d.ts} +26 -2
- package/dist/{chunk-XOUKIGJ4.js → chunk-RP574L5Z.js} +101 -1
- package/dist/{chunk-4S63T7Y4.js → chunk-U2HREMZU.js} +37 -2
- package/dist/{chunk-DAD2ZOTJ.js → chunk-XT2BQWXT.js} +163 -1
- package/dist/{code-CoeD4Fmq.d.ts → code-46xO9xFf.d.cts} +32 -2
- package/dist/{code-CoeD4Fmq.d.cts → code-46xO9xFf.d.ts} +32 -2
- package/dist/index.cjs +298 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/tools/api.cjs +35 -0
- package/dist/tools/api.d.cts +1 -1
- package/dist/tools/api.d.ts +1 -1
- package/dist/tools/api.js +1 -1
- package/dist/tools/code.cjs +162 -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/units.cjs +100 -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-BgaUAUG5.d.cts → units-BqegyALA.d.cts} +70 -2
- package/dist/{units-BgaUAUG5.d.ts → units-BqegyALA.d.ts} +70 -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.75.0
|
|
6
|
+
- Add `verifyWebhookSignature` (webhook-signature-verifier): recompute an HMAC over a raw webhook payload and compare it to a provided signature, supporting the `sha256=` prefix style (Stripe/GitHub-style webhooks) plus raw hex or base64 encoding.
|
|
7
|
+
- Add `calculateTransferTime` and `calculateRequiredBandwidth` (data-transfer-time-estimator): estimate the theoretical time to transfer a file over a connection of a given speed, or the reverse: the bandwidth required to hit a target time.
|
|
8
|
+
|
|
9
|
+
## 0.74.0
|
|
10
|
+
- Add `calculateLoanPrepaymentPenalty` (loan-prepayment-penalty-calculator): compute the dollar penalty cost of paying a loan off early, given its payoff balance and a prepayment penalty structure (a flat percent of balance, or a fixed number of months of interest).
|
|
11
|
+
- Add `validateAria` (aria-validator): check every role and aria-* attribute in an HTML snippet against a curated WAI-ARIA 1.2 role table, flagging unknown roles, disallowed attributes, and missing required states.
|
|
12
|
+
|
|
5
13
|
## 0.73.0
|
|
6
14
|
- Add `calculateMortgagePoints` (mortgage-points-calculator): compare a loan with no discount points against the same loan at a reduced rate bought with points, and compute the monthly savings and break-even month.
|
|
7
15
|
- Add `calculateCookieSizeBudget` (cookie-size-budget-calculator): parse a Cookie header's name=value pairs and compute each cookie's and the total header's byte size against RFC 6265's per-cookie limit and a configurable budget.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**702 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)
|
|
@@ -343,7 +343,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
343
343
|
### `/units`: Conversions
|
|
344
344
|
|
|
345
345
|
```ts
|
|
346
|
-
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, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateBlendedLoanRate, calculateFreelancerRate, calculateExtraPaymentPayoff, calculateLoanRefinance, validateVin, validateIsin } from "@utilix-tech/sdk/units";
|
|
346
|
+
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, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateBlendedLoanRate, calculateFreelancerRate, calculateExtraPaymentPayoff, calculateLoanRefinance, validateVin, validateIsin, calculateLoanPrepaymentPenalty } from "@utilix-tech/sdk/units";
|
|
347
347
|
|
|
348
348
|
// File sizes
|
|
349
349
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -513,6 +513,10 @@ validateIsin("US0378331005");
|
|
|
513
513
|
// Mortgage discount points break-even: monthly savings and the month the points cost is recouped
|
|
514
514
|
calculateMortgagePoints(300000, 6.5, 360, 1, 0.25);
|
|
515
515
|
// { pointsCost: 3000, monthlySavings: 49.05, breakEvenMonths: 62, totalInterestSavings: 17660.91, ... }
|
|
516
|
+
|
|
517
|
+
// Loan prepayment penalty: dollar cost of paying a loan off early
|
|
518
|
+
calculateLoanPrepaymentPenalty(10000, "percent-of-balance", { penaltyPercent: 2 });
|
|
519
|
+
// { payoffBalance: 10000, penaltyAmount: 200, effectivePenaltyPercent: 2, totalPayoffCost: 10200 }
|
|
516
520
|
```
|
|
517
521
|
|
|
518
522
|
---
|
|
@@ -822,6 +826,11 @@ parseCommitTrailers("Fix bug\n\nSigned-off-by: A <a@example.com>");
|
|
|
822
826
|
import { extractMarkdownFootnotes } from "@utilix-tech/sdk/code";
|
|
823
827
|
extractMarkdownFootnotes("A claim[^1].\n\n[^1]: The source.");
|
|
824
828
|
// { definitionCount: 1, referenceCount: 1, definitions: [{ label: "1", text: "The source." }], unresolvedReferences: [], unusedDefinitions: [] }
|
|
829
|
+
|
|
830
|
+
// Validate every role and aria-* attribute in an HTML snippet against a curated WAI-ARIA 1.2 role table
|
|
831
|
+
import { validateAria } from "@utilix-tech/sdk/code";
|
|
832
|
+
validateAria('<div role="checkbox">Opt in</div>');
|
|
833
|
+
// { elementCount: 1, elementsWithRoleOrAria: 1, valid: false, issues: [{ severity: "error", message: 'role="checkbox" is missing required attribute aria-checked', ... }] }
|
|
825
834
|
```
|
|
826
835
|
|
|
827
836
|
---
|
|
@@ -986,10 +995,10 @@ readMidiInfo(new Uint8Array(midiBytes));
|
|
|
986
995
|
| `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, NDJSON record deduplicator, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer, Markdown table column aligner |
|
|
987
996
|
| `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
|
|
988
997
|
| `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
|
|
989
|
-
| `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator |
|
|
998
|
+
| `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator, data transfer time / required bandwidth estimator |
|
|
990
999
|
| `@utilix-tech/sdk/network` | HTTP status codes, IP validation, country flags, geolocation URLs, HAR file parsing, User-Agent parsing, IPv6 address compress/expand, Permissions-Policy header builder, Client Hints header builder/parser, Content-Disposition header builder/parser, X-Content-Type-Options header builder/risk assessor, sitemap.xml validator, sitemap index splitter, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup, Strict-Transport-Security (HSTS) header builder/parser, X-Robots-Tag header builder/parser, WebSocket frame opcode reference/lookup, robots meta tag builder/parser, Cookie header byte-size budget calculator |
|
|
991
|
-
| `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator |
|
|
992
|
-
| `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor |
|
|
1000
|
+
| `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator, webhook HMAC signature verifier |
|
|
1001
|
+
| `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor, ARIA role & attribute validator |
|
|
993
1002
|
| `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
|
|
994
1003
|
| `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
|
|
995
1004
|
| `@utilix-tech/sdk/misc` | SVG optimize/sanitize, file size format, Unicode inspector |
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* encodeUrlComponent, decodeUrlComponent, isValidUrl, normalizeUrl
|
|
15
15
|
* - og-meta : parseMetaTags, validateOgTags, generateMetaHtml
|
|
16
16
|
* - totp-hotp-generator : generateHotp, generateTotp
|
|
17
|
+
* - webhook-signature-verifier : verifyWebhookSignature
|
|
17
18
|
*
|
|
18
19
|
* Node 18+ only. All crypto uses node:crypto; no browser-only APIs.
|
|
19
20
|
*/
|
|
@@ -333,6 +334,26 @@ interface TotpResult {
|
|
|
333
334
|
declare function generateTotp(secret: string, options?: TotpOptions): TotpResult | {
|
|
334
335
|
error: string;
|
|
335
336
|
};
|
|
337
|
+
type WebhookHashAlgorithm = 'sha1' | 'sha256' | 'sha512';
|
|
338
|
+
interface WebhookSignatureResult {
|
|
339
|
+
valid: boolean;
|
|
340
|
+
algorithm: WebhookHashAlgorithm;
|
|
341
|
+
expectedHex: string;
|
|
342
|
+
expectedBase64: string;
|
|
343
|
+
providedSignature: string;
|
|
344
|
+
matchedEncoding: 'hex' | 'base64' | null;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Recomputes an HMAC over a raw webhook payload and compares it to a
|
|
348
|
+
* provided signature, the check every webhook receiver (Stripe, GitHub,
|
|
349
|
+
* Shopify, etc.) has to do before trusting a request. Accepts a signature
|
|
350
|
+
* with or without the common `sha256=` prefix style, and matches against
|
|
351
|
+
* either hex or base64 encoding since providers differ on which they send.
|
|
352
|
+
* Comparison is constant-time to avoid leaking timing information.
|
|
353
|
+
*/
|
|
354
|
+
declare function verifyWebhookSignature(payload: string, secret: string, signature: string, algorithm?: WebhookHashAlgorithm): WebhookSignatureResult | {
|
|
355
|
+
error: string;
|
|
356
|
+
};
|
|
336
357
|
|
|
337
358
|
declare const api_COMMON_HEADERS: typeof COMMON_HEADERS;
|
|
338
359
|
declare const api_COMMON_PRESETS: typeof COMMON_PRESETS;
|
|
@@ -378,6 +399,8 @@ type api_TargetLanguage = TargetLanguage;
|
|
|
378
399
|
type api_TotpOptions = TotpOptions;
|
|
379
400
|
type api_TotpResult = TotpResult;
|
|
380
401
|
type api_TwitterTags = TwitterTags;
|
|
402
|
+
type api_WebhookHashAlgorithm = WebhookHashAlgorithm;
|
|
403
|
+
type api_WebhookSignatureResult = WebhookSignatureResult;
|
|
381
404
|
declare const api_addParam: typeof addParam;
|
|
382
405
|
declare const api_base64urlDecode: typeof base64urlDecode;
|
|
383
406
|
declare const api_base64urlEncode: typeof base64urlEncode;
|
|
@@ -414,8 +437,9 @@ declare const api_signJwt: typeof signJwt;
|
|
|
414
437
|
declare const api_validateCorsConfig: typeof validateCorsConfig;
|
|
415
438
|
declare const api_validateCspConfig: typeof validateCspConfig;
|
|
416
439
|
declare const api_validateOgTags: typeof validateOgTags;
|
|
440
|
+
declare const api_verifyWebhookSignature: typeof verifyWebhookSignature;
|
|
417
441
|
declare namespace api {
|
|
418
|
-
export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags };
|
|
442
|
+
export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, type api_WebhookHashAlgorithm as WebhookHashAlgorithm, type api_WebhookSignatureResult as WebhookSignatureResult, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags, api_verifyWebhookSignature as verifyWebhookSignature };
|
|
419
443
|
}
|
|
420
444
|
|
|
421
|
-
export {
|
|
445
|
+
export { computeJwkThumbprint as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, type WebhookSignatureResult as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, addParam as U, base64urlDecode as V, type WebhookHashAlgorithm as W, base64urlEncode as X, buildCurl as Y, buildCurlMultiline as Z, buildUrl as _, api as a, convertToCode as a0, decodeJwt as a1, decodeUrlComponent as a2, detectFormat as a3, encodeUrlComponent as a4, extractJsonPaths as a5, formatJwtJson as a6, formatResponse as a7, generateCors as a8, generateCspHeader as a9, generateFullHeader as aa, generateHotp as ab, generateMetaHtml as ac, generateTotp as ad, getParam as ae, getStats as af, isValidUrl as ag, normalizeUrl as ah, parseCspHeader as ai, parseCurl as aj, parseCurlCommand as ak, parseJwks as al, parseMetaTags as am, parseUrl as an, removeParam as ao, signJwt as ap, validateCorsConfig as aq, validateCspConfig as ar, validateOgTags as as, verifyWebhookSignature as at, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* encodeUrlComponent, decodeUrlComponent, isValidUrl, normalizeUrl
|
|
15
15
|
* - og-meta : parseMetaTags, validateOgTags, generateMetaHtml
|
|
16
16
|
* - totp-hotp-generator : generateHotp, generateTotp
|
|
17
|
+
* - webhook-signature-verifier : verifyWebhookSignature
|
|
17
18
|
*
|
|
18
19
|
* Node 18+ only. All crypto uses node:crypto; no browser-only APIs.
|
|
19
20
|
*/
|
|
@@ -333,6 +334,26 @@ interface TotpResult {
|
|
|
333
334
|
declare function generateTotp(secret: string, options?: TotpOptions): TotpResult | {
|
|
334
335
|
error: string;
|
|
335
336
|
};
|
|
337
|
+
type WebhookHashAlgorithm = 'sha1' | 'sha256' | 'sha512';
|
|
338
|
+
interface WebhookSignatureResult {
|
|
339
|
+
valid: boolean;
|
|
340
|
+
algorithm: WebhookHashAlgorithm;
|
|
341
|
+
expectedHex: string;
|
|
342
|
+
expectedBase64: string;
|
|
343
|
+
providedSignature: string;
|
|
344
|
+
matchedEncoding: 'hex' | 'base64' | null;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Recomputes an HMAC over a raw webhook payload and compares it to a
|
|
348
|
+
* provided signature, the check every webhook receiver (Stripe, GitHub,
|
|
349
|
+
* Shopify, etc.) has to do before trusting a request. Accepts a signature
|
|
350
|
+
* with or without the common `sha256=` prefix style, and matches against
|
|
351
|
+
* either hex or base64 encoding since providers differ on which they send.
|
|
352
|
+
* Comparison is constant-time to avoid leaking timing information.
|
|
353
|
+
*/
|
|
354
|
+
declare function verifyWebhookSignature(payload: string, secret: string, signature: string, algorithm?: WebhookHashAlgorithm): WebhookSignatureResult | {
|
|
355
|
+
error: string;
|
|
356
|
+
};
|
|
336
357
|
|
|
337
358
|
declare const api_COMMON_HEADERS: typeof COMMON_HEADERS;
|
|
338
359
|
declare const api_COMMON_PRESETS: typeof COMMON_PRESETS;
|
|
@@ -378,6 +399,8 @@ type api_TargetLanguage = TargetLanguage;
|
|
|
378
399
|
type api_TotpOptions = TotpOptions;
|
|
379
400
|
type api_TotpResult = TotpResult;
|
|
380
401
|
type api_TwitterTags = TwitterTags;
|
|
402
|
+
type api_WebhookHashAlgorithm = WebhookHashAlgorithm;
|
|
403
|
+
type api_WebhookSignatureResult = WebhookSignatureResult;
|
|
381
404
|
declare const api_addParam: typeof addParam;
|
|
382
405
|
declare const api_base64urlDecode: typeof base64urlDecode;
|
|
383
406
|
declare const api_base64urlEncode: typeof base64urlEncode;
|
|
@@ -414,8 +437,9 @@ declare const api_signJwt: typeof signJwt;
|
|
|
414
437
|
declare const api_validateCorsConfig: typeof validateCorsConfig;
|
|
415
438
|
declare const api_validateCspConfig: typeof validateCspConfig;
|
|
416
439
|
declare const api_validateOgTags: typeof validateOgTags;
|
|
440
|
+
declare const api_verifyWebhookSignature: typeof verifyWebhookSignature;
|
|
417
441
|
declare namespace api {
|
|
418
|
-
export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags };
|
|
442
|
+
export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, type api_WebhookHashAlgorithm as WebhookHashAlgorithm, type api_WebhookSignatureResult as WebhookSignatureResult, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags, api_verifyWebhookSignature as verifyWebhookSignature };
|
|
419
443
|
}
|
|
420
444
|
|
|
421
|
-
export {
|
|
445
|
+
export { computeJwkThumbprint as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, type WebhookSignatureResult as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, addParam as U, base64urlDecode as V, type WebhookHashAlgorithm as W, base64urlEncode as X, buildCurl as Y, buildCurlMultiline as Z, buildUrl as _, api as a, convertToCode as a0, decodeJwt as a1, decodeUrlComponent as a2, detectFormat as a3, encodeUrlComponent as a4, extractJsonPaths as a5, formatJwtJson as a6, formatResponse as a7, generateCors as a8, generateCspHeader as a9, generateFullHeader as aa, generateHotp as ab, generateMetaHtml as ac, generateTotp as ad, getParam as ae, getStats as af, isValidUrl as ag, normalizeUrl as ah, parseCspHeader as ai, parseCurl as aj, parseCurlCommand as ak, parseJwks as al, parseMetaTags as am, parseUrl as an, removeParam as ao, signJwt as ap, validateCorsConfig as aq, validateCspConfig as ar, validateOgTags as as, verifyWebhookSignature as at, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
|
|
@@ -37,12 +37,14 @@ __export(units_exports, {
|
|
|
37
37
|
calculateFreelancerRate: () => calculateFreelancerRate,
|
|
38
38
|
calculateGpa: () => calculateGpa,
|
|
39
39
|
calculateLoan: () => calculateLoan,
|
|
40
|
+
calculateLoanPrepaymentPenalty: () => calculateLoanPrepaymentPenalty,
|
|
40
41
|
calculateLoanRefinance: () => calculateLoanRefinance,
|
|
41
42
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
42
43
|
calculateMortgagePoints: () => calculateMortgagePoints,
|
|
43
44
|
calculateMovingAverages: () => calculateMovingAverages,
|
|
44
45
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
45
46
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
47
|
+
calculateRequiredBandwidth: () => calculateRequiredBandwidth,
|
|
46
48
|
calculateRoi: () => calculateRoi,
|
|
47
49
|
calculateRuleOf72: () => calculateRuleOf72,
|
|
48
50
|
calculateSavingsGoal: () => calculateSavingsGoal,
|
|
@@ -51,6 +53,7 @@ __export(units_exports, {
|
|
|
51
53
|
calculateTaxEquivalentYield: () => calculateTaxEquivalentYield,
|
|
52
54
|
calculateTimeValue: () => calculateTimeValue,
|
|
53
55
|
calculateTipSplit: () => calculateTipSplit,
|
|
56
|
+
calculateTransferTime: () => calculateTransferTime,
|
|
54
57
|
calculateVideoBitrate: () => calculateVideoBitrate,
|
|
55
58
|
compareSemver: () => compareSemver,
|
|
56
59
|
compareUnitPrices: () => compareUnitPrices,
|
|
@@ -2662,5 +2665,102 @@ function calculateMortgagePoints(loanAmount, baseRatePercent, termMonths, points
|
|
|
2662
2665
|
totalInterestSavings: round2(withoutPoints.totalInterest - withPoints.totalInterest)
|
|
2663
2666
|
};
|
|
2664
2667
|
}
|
|
2668
|
+
function calculateLoanPrepaymentPenalty(payoffBalance, penaltyType, params) {
|
|
2669
|
+
if (!Number.isFinite(payoffBalance) || payoffBalance <= 0) {
|
|
2670
|
+
return { error: "Payoff balance must be a positive number" };
|
|
2671
|
+
}
|
|
2672
|
+
if (penaltyType !== "percent-of-balance" && penaltyType !== "months-of-interest") {
|
|
2673
|
+
return { error: 'penaltyType must be "percent-of-balance" or "months-of-interest"' };
|
|
2674
|
+
}
|
|
2675
|
+
let penaltyAmount;
|
|
2676
|
+
if (penaltyType === "percent-of-balance") {
|
|
2677
|
+
const penaltyPercent = params.penaltyPercent;
|
|
2678
|
+
if (!Number.isFinite(penaltyPercent) || penaltyPercent < 0) {
|
|
2679
|
+
return { error: "penaltyPercent must be zero or a positive number" };
|
|
2680
|
+
}
|
|
2681
|
+
penaltyAmount = round2(payoffBalance * (penaltyPercent / 100));
|
|
2682
|
+
} else {
|
|
2683
|
+
const monthsOfInterest = params.monthsOfInterest;
|
|
2684
|
+
const annualRatePercent = params.annualRatePercent;
|
|
2685
|
+
if (!Number.isFinite(monthsOfInterest) || monthsOfInterest < 0) {
|
|
2686
|
+
return { error: "monthsOfInterest must be zero or a positive number" };
|
|
2687
|
+
}
|
|
2688
|
+
if (!Number.isFinite(annualRatePercent) || annualRatePercent < 0) {
|
|
2689
|
+
return { error: "annualRatePercent must be zero or a positive number" };
|
|
2690
|
+
}
|
|
2691
|
+
const monthlyInterest = payoffBalance * (annualRatePercent / 100 / 12);
|
|
2692
|
+
penaltyAmount = round2(monthlyInterest * monthsOfInterest);
|
|
2693
|
+
}
|
|
2694
|
+
return {
|
|
2695
|
+
payoffBalance: round2(payoffBalance),
|
|
2696
|
+
penaltyType,
|
|
2697
|
+
penaltyAmount,
|
|
2698
|
+
effectivePenaltyPercent: round2(penaltyAmount / payoffBalance * 100),
|
|
2699
|
+
totalPayoffCost: round2(payoffBalance + penaltyAmount)
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
var FILE_SIZE_UNIT_BYTES = {
|
|
2703
|
+
B: 1,
|
|
2704
|
+
KB: 1e3,
|
|
2705
|
+
MB: 1e6,
|
|
2706
|
+
GB: 1e9,
|
|
2707
|
+
TB: 1e12
|
|
2708
|
+
};
|
|
2709
|
+
var SPEED_UNIT_BITS_PER_SECOND = {
|
|
2710
|
+
Kbps: 1e3,
|
|
2711
|
+
Mbps: 1e6,
|
|
2712
|
+
Gbps: 1e9,
|
|
2713
|
+
KBps: 1e3 * 8,
|
|
2714
|
+
MBps: 1e6 * 8,
|
|
2715
|
+
GBps: 1e9 * 8
|
|
2716
|
+
};
|
|
2717
|
+
function formatDurationSeconds(totalSeconds) {
|
|
2718
|
+
if (totalSeconds < 1) return `${(totalSeconds * 1e3).toFixed(0)}ms`;
|
|
2719
|
+
if (totalSeconds < 60) {
|
|
2720
|
+
const decimals = totalSeconds < 10 && totalSeconds % 1 !== 0 ? 1 : 0;
|
|
2721
|
+
return `${totalSeconds.toFixed(decimals)}s`;
|
|
2722
|
+
}
|
|
2723
|
+
const days = Math.floor(totalSeconds / 86400);
|
|
2724
|
+
const hours = Math.floor(totalSeconds % 86400 / 3600);
|
|
2725
|
+
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
2726
|
+
const seconds = Math.round(totalSeconds % 60);
|
|
2727
|
+
const parts = [];
|
|
2728
|
+
if (days > 0) parts.push(`${days}d`);
|
|
2729
|
+
if (hours > 0) parts.push(`${hours}h`);
|
|
2730
|
+
if (minutes > 0) parts.push(`${minutes}m`);
|
|
2731
|
+
if (seconds > 0 || parts.length === 0) parts.push(`${seconds}s`);
|
|
2732
|
+
return parts.join(" ");
|
|
2733
|
+
}
|
|
2734
|
+
function calculateTransferTime(fileSize, fileSizeUnit, speed, speedUnit) {
|
|
2735
|
+
if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
|
|
2736
|
+
if (!Number.isFinite(speed) || speed <= 0) return { error: "Connection speed must be a positive number" };
|
|
2737
|
+
if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
|
|
2738
|
+
if (!(speedUnit in SPEED_UNIT_BITS_PER_SECOND)) return { error: `Unsupported speed unit: ${speedUnit}` };
|
|
2739
|
+
const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
|
|
2740
|
+
const speedBitsPerSecond = speed * SPEED_UNIT_BITS_PER_SECOND[speedUnit];
|
|
2741
|
+
const transferTimeSeconds = fileSizeBytes * 8 / speedBitsPerSecond;
|
|
2742
|
+
return {
|
|
2743
|
+
fileSizeBytes,
|
|
2744
|
+
speedBitsPerSecond,
|
|
2745
|
+
transferTimeSeconds,
|
|
2746
|
+
formattedTime: formatDurationSeconds(transferTimeSeconds)
|
|
2747
|
+
};
|
|
2748
|
+
}
|
|
2749
|
+
function calculateRequiredBandwidth(fileSize, fileSizeUnit, targetSeconds) {
|
|
2750
|
+
if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
|
|
2751
|
+
if (!Number.isFinite(targetSeconds) || targetSeconds <= 0) {
|
|
2752
|
+
return { error: "Target time must be a positive number of seconds" };
|
|
2753
|
+
}
|
|
2754
|
+
if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
|
|
2755
|
+
const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
|
|
2756
|
+
const requiredBitsPerSecond = fileSizeBytes * 8 / targetSeconds;
|
|
2757
|
+
return {
|
|
2758
|
+
fileSizeBytes,
|
|
2759
|
+
targetSeconds,
|
|
2760
|
+
requiredBitsPerSecond,
|
|
2761
|
+
requiredMbps: requiredBitsPerSecond / 1e6,
|
|
2762
|
+
requiredMBps: requiredBitsPerSecond / 8 / 1e6
|
|
2763
|
+
};
|
|
2764
|
+
}
|
|
2665
2765
|
|
|
2666
|
-
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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, 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, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
|
|
2766
|
+
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, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, 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, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
|
|
@@ -46,7 +46,8 @@ __export(api_exports, {
|
|
|
46
46
|
signJwt: () => signJwt,
|
|
47
47
|
validateCorsConfig: () => validateCorsConfig,
|
|
48
48
|
validateCspConfig: () => validateCspConfig,
|
|
49
|
-
validateOgTags: () => validateOgTags
|
|
49
|
+
validateOgTags: () => validateOgTags,
|
|
50
|
+
verifyWebhookSignature: () => verifyWebhookSignature
|
|
50
51
|
});
|
|
51
52
|
function escapeShell(value) {
|
|
52
53
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
@@ -1379,5 +1380,39 @@ function generateTotp(secret, options = {}) {
|
|
|
1379
1380
|
const secondsRemaining = periodSeconds - timestamp % periodSeconds;
|
|
1380
1381
|
return { ...hotp, periodSeconds, secondsRemaining };
|
|
1381
1382
|
}
|
|
1383
|
+
var WEBHOOK_HASH_ALGORITHMS = ["sha1", "sha256", "sha512"];
|
|
1384
|
+
function constantTimeEqual(a, b) {
|
|
1385
|
+
if (a.length !== b.length) return false;
|
|
1386
|
+
let diff = 0;
|
|
1387
|
+
for (let i = 0; i < a.length; i++) diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
1388
|
+
return diff === 0;
|
|
1389
|
+
}
|
|
1390
|
+
function verifyWebhookSignature(payload, secret, signature, algorithm = "sha256") {
|
|
1391
|
+
if (!payload) return { error: "Payload is required" };
|
|
1392
|
+
if (!secret) return { error: "Secret is required" };
|
|
1393
|
+
if (!signature || !signature.trim()) return { error: "Signature is required" };
|
|
1394
|
+
if (!WEBHOOK_HASH_ALGORITHMS.includes(algorithm)) {
|
|
1395
|
+
return { error: "Algorithm must be one of sha1, sha256, sha512" };
|
|
1396
|
+
}
|
|
1397
|
+
const trimmedSignature = signature.trim();
|
|
1398
|
+
const prefixMatch = trimmedSignature.match(/^(sha1|sha256|sha512)=(.+)$/i);
|
|
1399
|
+
const providedSignature = prefixMatch ? prefixMatch[2].trim() : trimmedSignature;
|
|
1400
|
+
const expectedHex = createHmac(algorithm, secret).update(payload, "utf8").digest("hex");
|
|
1401
|
+
const expectedBase64 = createHmac(algorithm, secret).update(payload, "utf8").digest("base64");
|
|
1402
|
+
let matchedEncoding = null;
|
|
1403
|
+
if (constantTimeEqual(providedSignature.toLowerCase(), expectedHex.toLowerCase())) {
|
|
1404
|
+
matchedEncoding = "hex";
|
|
1405
|
+
} else if (constantTimeEqual(providedSignature, expectedBase64)) {
|
|
1406
|
+
matchedEncoding = "base64";
|
|
1407
|
+
}
|
|
1408
|
+
return {
|
|
1409
|
+
valid: matchedEncoding !== null,
|
|
1410
|
+
algorithm,
|
|
1411
|
+
expectedHex,
|
|
1412
|
+
expectedBase64,
|
|
1413
|
+
providedSignature: trimmedSignature,
|
|
1414
|
+
matchedEncoding
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1382
1417
|
|
|
1383
|
-
export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, api_exports, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags };
|
|
1418
|
+
export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, api_exports, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags, verifyWebhookSignature };
|
|
@@ -60,6 +60,7 @@ __export(code_exports, {
|
|
|
60
60
|
testGitignorePatterns: () => testGitignorePatterns,
|
|
61
61
|
testPattern: () => testPattern,
|
|
62
62
|
testRegex: () => testRegex,
|
|
63
|
+
validateAria: () => validateAria,
|
|
63
64
|
validateEditorConfig: () => validateEditorConfig,
|
|
64
65
|
validateEnvKey: () => validateEnvKey,
|
|
65
66
|
validatePackageExports: () => validatePackageExports,
|
|
@@ -3714,5 +3715,166 @@ function extractMarkdownFootnotes(markdown) {
|
|
|
3714
3715
|
}
|
|
3715
3716
|
return { definitionCount: definitions.length, referenceCount, definitions, references, unresolvedReferences, unusedDefinitions };
|
|
3716
3717
|
}
|
|
3718
|
+
var ARIA_GLOBAL_ATTRS = /* @__PURE__ */ new Set([
|
|
3719
|
+
"aria-atomic",
|
|
3720
|
+
"aria-busy",
|
|
3721
|
+
"aria-controls",
|
|
3722
|
+
"aria-current",
|
|
3723
|
+
"aria-describedby",
|
|
3724
|
+
"aria-details",
|
|
3725
|
+
"aria-disabled",
|
|
3726
|
+
"aria-dropeffect",
|
|
3727
|
+
"aria-errormessage",
|
|
3728
|
+
"aria-flowto",
|
|
3729
|
+
"aria-grabbed",
|
|
3730
|
+
"aria-haspopup",
|
|
3731
|
+
"aria-hidden",
|
|
3732
|
+
"aria-invalid",
|
|
3733
|
+
"aria-keyshortcuts",
|
|
3734
|
+
"aria-label",
|
|
3735
|
+
"aria-labelledby",
|
|
3736
|
+
"aria-live",
|
|
3737
|
+
"aria-owns",
|
|
3738
|
+
"aria-relevant",
|
|
3739
|
+
"aria-roledescription"
|
|
3740
|
+
]);
|
|
3741
|
+
var ARIA_ROLE_TABLE = {
|
|
3742
|
+
alert: { supported: ["aria-live", "aria-atomic"] },
|
|
3743
|
+
alertdialog: { supported: ["aria-modal"] },
|
|
3744
|
+
article: {},
|
|
3745
|
+
banner: {},
|
|
3746
|
+
button: { supported: ["aria-pressed", "aria-expanded", "aria-disabled"] },
|
|
3747
|
+
checkbox: { required: ["aria-checked"], supported: ["aria-readonly"] },
|
|
3748
|
+
columnheader: { supported: ["aria-sort", "aria-selected", "aria-readonly"] },
|
|
3749
|
+
combobox: { required: ["aria-expanded"], supported: ["aria-controls", "aria-autocomplete", "aria-activedescendant"] },
|
|
3750
|
+
complementary: {},
|
|
3751
|
+
contentinfo: {},
|
|
3752
|
+
dialog: { supported: ["aria-modal"] },
|
|
3753
|
+
form: {},
|
|
3754
|
+
grid: { supported: ["aria-multiselectable", "aria-activedescendant", "aria-level", "aria-readonly"] },
|
|
3755
|
+
gridcell: { supported: ["aria-selected", "aria-readonly", "aria-expanded"] },
|
|
3756
|
+
group: { supported: ["aria-activedescendant", "aria-disabled"] },
|
|
3757
|
+
heading: { required: ["aria-level"] },
|
|
3758
|
+
img: {},
|
|
3759
|
+
link: { supported: ["aria-disabled", "aria-expanded"] },
|
|
3760
|
+
list: {},
|
|
3761
|
+
listbox: { supported: ["aria-multiselectable", "aria-activedescendant", "aria-orientation"] },
|
|
3762
|
+
listitem: { supported: ["aria-level", "aria-posinset", "aria-setsize"] },
|
|
3763
|
+
log: { supported: ["aria-live", "aria-atomic"] },
|
|
3764
|
+
main: {},
|
|
3765
|
+
marquee: {},
|
|
3766
|
+
menu: { supported: ["aria-orientation", "aria-activedescendant"] },
|
|
3767
|
+
menubar: { supported: ["aria-orientation", "aria-activedescendant"] },
|
|
3768
|
+
menuitem: { supported: ["aria-disabled"] },
|
|
3769
|
+
menuitemcheckbox: { required: ["aria-checked"] },
|
|
3770
|
+
menuitemradio: { required: ["aria-checked"] },
|
|
3771
|
+
meter: { required: ["aria-valuenow"], supported: ["aria-valuemin", "aria-valuemax", "aria-valuetext"] },
|
|
3772
|
+
navigation: {},
|
|
3773
|
+
none: {},
|
|
3774
|
+
option: { supported: ["aria-selected", "aria-checked", "aria-posinset", "aria-setsize"] },
|
|
3775
|
+
presentation: {},
|
|
3776
|
+
progressbar: { supported: ["aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"] },
|
|
3777
|
+
radio: { required: ["aria-checked"] },
|
|
3778
|
+
radiogroup: { supported: ["aria-activedescendant"] },
|
|
3779
|
+
region: {},
|
|
3780
|
+
row: { supported: ["aria-selected", "aria-level", "aria-expanded"] },
|
|
3781
|
+
rowheader: { supported: ["aria-sort", "aria-selected", "aria-readonly"] },
|
|
3782
|
+
scrollbar: { required: ["aria-valuenow", "aria-controls"], supported: ["aria-valuemin", "aria-valuemax", "aria-orientation"] },
|
|
3783
|
+
search: {},
|
|
3784
|
+
searchbox: { supported: ["aria-multiline", "aria-placeholder", "aria-readonly", "aria-required", "aria-activedescendant", "aria-autocomplete"] },
|
|
3785
|
+
separator: { supported: ["aria-orientation", "aria-valuenow", "aria-valuemin", "aria-valuemax"] },
|
|
3786
|
+
slider: { required: ["aria-valuenow"], supported: ["aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-orientation"] },
|
|
3787
|
+
spinbutton: { supported: ["aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-required"] },
|
|
3788
|
+
status: { supported: ["aria-live", "aria-atomic"] },
|
|
3789
|
+
switch: { required: ["aria-checked"] },
|
|
3790
|
+
tab: { supported: ["aria-selected", "aria-controls", "aria-disabled"] },
|
|
3791
|
+
table: { supported: ["aria-colcount", "aria-rowcount"] },
|
|
3792
|
+
tablist: { supported: ["aria-orientation", "aria-activedescendant", "aria-level"] },
|
|
3793
|
+
tabpanel: {},
|
|
3794
|
+
textbox: { supported: ["aria-multiline", "aria-placeholder", "aria-readonly", "aria-required", "aria-activedescendant", "aria-autocomplete"] },
|
|
3795
|
+
timer: {},
|
|
3796
|
+
toolbar: { supported: ["aria-orientation"] },
|
|
3797
|
+
tooltip: {},
|
|
3798
|
+
tree: { supported: ["aria-multiselectable", "aria-activedescendant", "aria-orientation"] },
|
|
3799
|
+
treegrid: { supported: ["aria-multiselectable", "aria-activedescendant", "aria-orientation", "aria-level", "aria-readonly"] },
|
|
3800
|
+
treeitem: { supported: ["aria-expanded", "aria-selected", "aria-checked", "aria-level"] }
|
|
3801
|
+
};
|
|
3802
|
+
var ARIA_ALL_KNOWN_ATTRS = new Set(ARIA_GLOBAL_ATTRS);
|
|
3803
|
+
for (const entry of Object.values(ARIA_ROLE_TABLE)) {
|
|
3804
|
+
for (const a of entry.required ?? []) ARIA_ALL_KNOWN_ATTRS.add(a);
|
|
3805
|
+
for (const a of entry.supported ?? []) ARIA_ALL_KNOWN_ATTRS.add(a);
|
|
3806
|
+
}
|
|
3807
|
+
var TAG_REGEX = /<([a-zA-Z][a-zA-Z0-9]*)\b((?:[^>"'/]|"[^"]*"|'[^']*')*)\/?>/g;
|
|
3808
|
+
var ATTR_REGEX = /([a-zA-Z][a-zA-Z0-9-]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
3809
|
+
function parseElements(html) {
|
|
3810
|
+
const elements = [];
|
|
3811
|
+
let match;
|
|
3812
|
+
TAG_REGEX.lastIndex = 0;
|
|
3813
|
+
while ((match = TAG_REGEX.exec(html)) !== null) {
|
|
3814
|
+
const tag = match[1].toLowerCase();
|
|
3815
|
+
if (tag === "script" || tag === "style" || tag === "!--") continue;
|
|
3816
|
+
const attrsStr = match[2] ?? "";
|
|
3817
|
+
const attrs = {};
|
|
3818
|
+
let attrMatch;
|
|
3819
|
+
ATTR_REGEX.lastIndex = 0;
|
|
3820
|
+
while ((attrMatch = ATTR_REGEX.exec(attrsStr)) !== null) {
|
|
3821
|
+
const name = attrMatch[1].toLowerCase();
|
|
3822
|
+
const value = attrMatch[2] ?? attrMatch[3] ?? "";
|
|
3823
|
+
attrs[name] = value;
|
|
3824
|
+
}
|
|
3825
|
+
elements.push({ tag, attrs, raw: match[0].length > 80 ? match[0].slice(0, 77) + "..." : match[0] });
|
|
3826
|
+
}
|
|
3827
|
+
return elements;
|
|
3828
|
+
}
|
|
3829
|
+
function validateAria(html) {
|
|
3830
|
+
if (!html || !html.trim()) return { error: "Input is empty" };
|
|
3831
|
+
const elements = parseElements(html);
|
|
3832
|
+
if (elements.length === 0) return { error: "No HTML elements found" };
|
|
3833
|
+
const issues = [];
|
|
3834
|
+
let elementsWithRoleOrAria = 0;
|
|
3835
|
+
for (const el of elements) {
|
|
3836
|
+
const roleAttr = el.attrs["role"];
|
|
3837
|
+
const ariaAttrNames = Object.keys(el.attrs).filter((a) => a.startsWith("aria-"));
|
|
3838
|
+
if (roleAttr === void 0 && ariaAttrNames.length === 0) continue;
|
|
3839
|
+
elementsWithRoleOrAria++;
|
|
3840
|
+
const roles = roleAttr !== void 0 ? roleAttr.trim().split(/\s+/).filter(Boolean) : [];
|
|
3841
|
+
const knownRoles = roles.filter((r) => Object.prototype.hasOwnProperty.call(ARIA_ROLE_TABLE, r));
|
|
3842
|
+
const unknownRoles = roles.filter((r) => !Object.prototype.hasOwnProperty.call(ARIA_ROLE_TABLE, r));
|
|
3843
|
+
for (const r of unknownRoles) {
|
|
3844
|
+
issues.push({ element: el.raw, role: r, severity: "error", message: `Unknown ARIA role "${r}"` });
|
|
3845
|
+
}
|
|
3846
|
+
const primaryRole = knownRoles[0];
|
|
3847
|
+
const roleDef = primaryRole ? ARIA_ROLE_TABLE[primaryRole] : void 0;
|
|
3848
|
+
if (roleDef?.required) {
|
|
3849
|
+
for (const req of roleDef.required) {
|
|
3850
|
+
if (el.attrs[req] === void 0) {
|
|
3851
|
+
issues.push({ element: el.raw, role: primaryRole, severity: "error", message: `role="${primaryRole}" is missing required attribute ${req}` });
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
for (const attrName of ariaAttrNames) {
|
|
3856
|
+
if (ARIA_GLOBAL_ATTRS.has(attrName)) continue;
|
|
3857
|
+
if (roleDef) {
|
|
3858
|
+
const allowed = /* @__PURE__ */ new Set([...roleDef.required ?? [], ...roleDef.supported ?? []]);
|
|
3859
|
+
if (!allowed.has(attrName)) {
|
|
3860
|
+
issues.push({
|
|
3861
|
+
element: el.raw,
|
|
3862
|
+
role: primaryRole ?? null,
|
|
3863
|
+
severity: "error",
|
|
3864
|
+
message: primaryRole ? `${attrName} is not permitted on role="${primaryRole}"` : `${attrName} is not a global aria-* attribute`
|
|
3865
|
+
});
|
|
3866
|
+
}
|
|
3867
|
+
} else if (!ARIA_ALL_KNOWN_ATTRS.has(attrName)) {
|
|
3868
|
+
issues.push({ element: el.raw, role: null, severity: "warning", message: `${attrName} is not a recognized aria-* attribute (possible typo)` });
|
|
3869
|
+
}
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
return {
|
|
3873
|
+
elementCount: elements.length,
|
|
3874
|
+
elementsWithRoleOrAria,
|
|
3875
|
+
issues,
|
|
3876
|
+
valid: issues.every((i) => i.severity !== "error")
|
|
3877
|
+
};
|
|
3878
|
+
}
|
|
3717
3879
|
|
|
3718
|
-
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, validateEditorConfig, validateEnvKey, validatePackageExports, validateTsconfig };
|
|
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 };
|