@utilix-tech/sdk 0.81.0 → 0.83.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 +7 -0
- package/README.md +14 -5
- package/dist/{ai_agent-DeCy0oZK.d.cts → ai_agent-B9wWLBDf.d.cts} +29 -2
- package/dist/{ai_agent-DeCy0oZK.d.ts → ai_agent-B9wWLBDf.d.ts} +29 -2
- package/dist/{chunk-HJLGUNSO.js → chunk-5VVC7BHS.js} +41 -1
- package/dist/{chunk-FPFA4ZHC.js → chunk-KXUHXQFO.js} +60 -1
- package/dist/{chunk-KWS4ZCYG.js → chunk-SW3J5CAI.js} +36 -1
- package/dist/{code-B8yHwP3m.d.cts → code-COUhffgE.d.cts} +42 -2
- package/dist/{code-B8yHwP3m.d.ts → code-COUhffgE.d.ts} +42 -2
- package/dist/index.cjs +134 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{network-BskZe1n2.d.cts → network-ylRtLPEs.d.cts} +29 -2
- package/dist/{network-BskZe1n2.d.ts → network-ylRtLPEs.d.ts} +29 -2
- package/dist/tools/ai_agent.cjs +40 -0
- package/dist/tools/ai_agent.d.cts +1 -1
- package/dist/tools/ai_agent.d.ts +1 -1
- package/dist/tools/ai_agent.js +1 -1
- package/dist/tools/code.cjs +59 -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/network.cjs +35 -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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.83.0
|
|
6
|
+
- Add `extractMarkdownLinkReferences` (markdown-link-reference-extractor): extract reference-style Markdown links (`[text][ref]`, the `[text][]` shortcut, and `![alt][ref]` image references) and match them against their `[ref]: url` definitions, flagging unresolved references and unused definitions.
|
|
7
|
+
- Add `extractPromptTemplateVariables` (prompt-template-variable-extractor): extract `{{variable}}`-style placeholders from a prompt template, report occurrence counts, flag duplicates, and optionally cross-check against a list of provided variable names.
|
|
8
|
+
|
|
9
|
+
## 0.82.0
|
|
10
|
+
- Add `generateRobotsTxt` (robots-txt-generator): build a robots.txt file from User-agent groups with Allow/Disallow rules and an optional Crawl-delay, plus a list of Sitemap URLs. The generator-side sibling of `validateRobotsTxt`.
|
|
11
|
+
|
|
5
12
|
## 0.81.0
|
|
6
13
|
- Add `validateFenceLanguageTags` (markdown-fence-lang-validator): scan a Markdown document's fenced code blocks and flag a missing, unknown, or inconsistently-cased language tag against a curated list of common syntax-highlighter identifiers.
|
|
7
14
|
- Add `countSqlPlaceholders` (sql-placeholder-counter): count positional (`?`, `$1`) and named (`:name`, `@name`) parameter placeholders in a SQL query, flagging mixed styles and numbered-sequence gaps or duplicates.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**718 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)
|
|
@@ -550,7 +550,7 @@ calculateRealRateOfReturn({ nominalRatePercent: 5, inflationRatePercent: 2 });
|
|
|
550
550
|
```ts
|
|
551
551
|
import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
552
552
|
searchStatusCodes, buildGeoUrl, countryCodeToFlag,
|
|
553
|
-
parseHar, validateSitemap, splitSitemap, validateRobotsTxt,
|
|
553
|
+
parseHar, validateSitemap, splitSitemap, validateRobotsTxt, generateRobotsTxt,
|
|
554
554
|
parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader, analyzeEmailHeaders,
|
|
555
555
|
buildRangeHeader, parseContentRangeHeader, buildVaryHeader, parseVaryHeader, validateManifest,
|
|
556
556
|
buildPermissionsPolicy, parsePermissionsPolicy, buildClientHints, parseClientHintHeaders,
|
|
@@ -594,6 +594,10 @@ splitSitemap("https://example.com/a\nhttps://example.com/b\nhttps://example.com/
|
|
|
594
594
|
validateRobotsTxt("User-agent: *\nDisallow: /admin\nSitemap: https://example.com/sitemap.xml");
|
|
595
595
|
// { groups: [...], sitemaps: [...], issues: [...], valid: true }
|
|
596
596
|
|
|
597
|
+
// Generate a robots.txt file from User-agent groups + sitemap URLs (the inverse of validateRobotsTxt)
|
|
598
|
+
generateRobotsTxt({ groups: [{ userAgents: ["*"], disallow: ["/admin"] }], sitemaps: ["https://example.com/sitemap.xml"] });
|
|
599
|
+
// { text: "User-agent: *\nDisallow: /admin\n\nSitemap: https://example.com/sitemap.xml\n" }
|
|
600
|
+
|
|
597
601
|
// Build and explain a Cache-Control response header from directives
|
|
598
602
|
buildCacheControl({ visibility: "public", maxAge: 3600, mustRevalidate: true });
|
|
599
603
|
// { header: "public, max-age=3600, must-revalidate", directives: [...], warnings: [] }
|
|
@@ -873,6 +877,11 @@ extractMarkdownFootnotes("A claim[^1].\n\n[^1]: The source.");
|
|
|
873
877
|
import { validateAria } from "@utilix-tech/sdk/code";
|
|
874
878
|
validateAria('<div role="checkbox">Opt in</div>');
|
|
875
879
|
// { elementCount: 1, elementsWithRoleOrAria: 1, valid: false, issues: [{ severity: "error", message: 'role="checkbox" is missing required attribute aria-checked', ... }] }
|
|
880
|
+
|
|
881
|
+
// Extract reference-style Markdown links ([text][ref], [text][], ![alt][ref]) and match them against [ref]: url definitions
|
|
882
|
+
import { extractMarkdownLinkReferences } from "@utilix-tech/sdk/code";
|
|
883
|
+
extractMarkdownLinkReferences("See the [docs][api-ref].\n\n[api-ref]: https://example.com/api \"API Reference\"");
|
|
884
|
+
// { referenceCount: 1, definitionCount: 1, resolved: [{ text: "docs", label: "api-ref", image: false, url: "https://example.com/api", title: "API Reference" }], unresolvedReferences: [], unusedDefinitions: [] }
|
|
876
885
|
```
|
|
877
886
|
|
|
878
887
|
---
|
|
@@ -1044,13 +1053,13 @@ readMidiInfo(new Uint8Array(midiBytes));
|
|
|
1044
1053
|
| `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
|
|
1045
1054
|
| `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
|
|
1046
1055
|
| `@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, real rate of return (Fisher equation) calculator |
|
|
1047
|
-
| `@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 |
|
|
1056
|
+
| `@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, robots.txt validator, robots.txt generator, 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 |
|
|
1048
1057
|
| `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator, webhook HMAC signature verifier |
|
|
1049
|
-
| `@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, database connection string parser, Markdown code fence language tag validator, SQL query parameter placeholder counter |
|
|
1058
|
+
| `@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, database connection string parser, Markdown code fence language tag validator, SQL query parameter placeholder counter, Markdown link reference extractor |
|
|
1050
1059
|
| `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
|
|
1051
1060
|
| `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
|
|
1052
1061
|
| `@utilix-tech/sdk/misc` | SVG optimize/sanitize, file size format, Unicode inspector |
|
|
1053
|
-
| `@utilix-tech/sdk/ai_agent` | Token estimate/trim, chunk text, extract URLs/JSON/keywords, sanitize HTML, flatten/merge JSON, dedupe lines, validate schema, PII/secret/injection detect, vector similarity, few-shot prompt formatter, tool-definition schema linter, retry/backoff schedule calculator |
|
|
1062
|
+
| `@utilix-tech/sdk/ai_agent` | Token estimate/trim, chunk text, extract URLs/JSON/keywords, sanitize HTML, flatten/merge JSON, dedupe lines, validate schema, PII/secret/injection detect, vector similarity, few-shot prompt formatter, tool-definition schema linter, retry/backoff schedule calculator, prompt template variable extractor |
|
|
1054
1063
|
| `@utilix-tech/sdk/media` | Image format & dimension reading from raw bytes (PNG, JPEG, GIF, WebP, BMP); PDF metadata reading; PDF page dimension/orientation listing; WAV audio info; ID3 tags; ICO favicon inspection; FLAC metadata reading; MP4/WebM video info; GIF frame/loop inspection |
|
|
1055
1064
|
|
|
1056
1065
|
---
|
|
@@ -409,6 +409,30 @@ interface RetryBackoffResult {
|
|
|
409
409
|
declare function calculateRetryBackoffSchedule(input: RetryBackoffInput): RetryBackoffResult | {
|
|
410
410
|
error: string;
|
|
411
411
|
};
|
|
412
|
+
interface PromptTemplateVariable {
|
|
413
|
+
name: string;
|
|
414
|
+
count: number;
|
|
415
|
+
}
|
|
416
|
+
interface PromptTemplateVariableResult {
|
|
417
|
+
variableCount: number;
|
|
418
|
+
variables: PromptTemplateVariable[];
|
|
419
|
+
duplicates: string[];
|
|
420
|
+
missing: string[];
|
|
421
|
+
unused: string[];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Extract every {{variable}}-style placeholder from a prompt template,
|
|
425
|
+
* reporting each unique variable's occurrence count and flagging ones used
|
|
426
|
+
* more than once. When providedVars is given, also cross-checks the
|
|
427
|
+
* template against it: variables the template uses but providedVars is
|
|
428
|
+
* missing, and names in providedVars the template never references. Only
|
|
429
|
+
* double-curly {{name}} syntax is recognized (dotted/dashed names like
|
|
430
|
+
* {{user.name}} are allowed); single-brace, triple-brace, and Jinja-style
|
|
431
|
+
* {% %} tags are out of scope.
|
|
432
|
+
*/
|
|
433
|
+
declare function extractPromptTemplateVariables(template: string, providedVars?: string[]): PromptTemplateVariableResult | {
|
|
434
|
+
error: string;
|
|
435
|
+
};
|
|
412
436
|
|
|
413
437
|
type ai_agent_ChunkStrategy = ChunkStrategy;
|
|
414
438
|
type ai_agent_CompressHtmlResult = CompressHtmlResult;
|
|
@@ -440,6 +464,8 @@ type ai_agent_ModelPricing = ModelPricing;
|
|
|
440
464
|
type ai_agent_PiiDetectResult = PiiDetectResult;
|
|
441
465
|
type ai_agent_PiiFinding = PiiFinding;
|
|
442
466
|
type ai_agent_PiiType = PiiType;
|
|
467
|
+
type ai_agent_PromptTemplateVariable = PromptTemplateVariable;
|
|
468
|
+
type ai_agent_PromptTemplateVariableResult = PromptTemplateVariableResult;
|
|
443
469
|
type ai_agent_RankedChunk = RankedChunk;
|
|
444
470
|
type ai_agent_RelevanceResult = RelevanceResult;
|
|
445
471
|
type ai_agent_RetryBackoffAttempt = RetryBackoffAttempt;
|
|
@@ -479,6 +505,7 @@ declare const ai_agent_expandQuery: typeof expandQuery;
|
|
|
479
505
|
declare const ai_agent_extractEntities: typeof extractEntities;
|
|
480
506
|
declare const ai_agent_extractJson: typeof extractJson;
|
|
481
507
|
declare const ai_agent_extractKeywords: typeof extractKeywords;
|
|
508
|
+
declare const ai_agent_extractPromptTemplateVariables: typeof extractPromptTemplateVariables;
|
|
482
509
|
declare const ai_agent_extractTables: typeof extractTables;
|
|
483
510
|
declare const ai_agent_extractUrls: typeof extractUrls;
|
|
484
511
|
declare const ai_agent_flattenJson: typeof flattenJson;
|
|
@@ -496,7 +523,7 @@ declare const ai_agent_unflattenJson: typeof unflattenJson;
|
|
|
496
523
|
declare const ai_agent_validateJsonSchema: typeof validateJsonSchema;
|
|
497
524
|
declare const ai_agent_vectorSimilarity: typeof vectorSimilarity;
|
|
498
525
|
declare namespace ai_agent {
|
|
499
|
-
export { type ai_agent_ChunkStrategy as ChunkStrategy, type ai_agent_CompressHtmlResult as CompressHtmlResult, type ai_agent_CompressJsonResult as CompressJsonResult, type ai_agent_CompressMarkdownResult as CompressMarkdownResult, type ai_agent_CostEstimate as CostEstimate, type ai_agent_DedupeResult as DedupeResult, type ai_agent_DedupeStrategy as DedupeStrategy, type ai_agent_DiffEntry2 as DiffEntry2, type ai_agent_DiffOp2 as DiffOp2, type ai_agent_DiffResult2 as DiffResult2, type ai_agent_Entity2 as Entity2, type ai_agent_EntityType2 as EntityType2, type ai_agent_ExtractJsonResult as ExtractJsonResult, type ai_agent_ExtractKeywordsResult as ExtractKeywordsResult, type ai_agent_ExtractUrlsResult as ExtractUrlsResult, type ai_agent_FewShotExample as FewShotExample, type ai_agent_FewShotFormat as FewShotFormat, type ai_agent_FewShotFormatResult as FewShotFormatResult, type ai_agent_InjectionDetectResult as InjectionDetectResult, type ai_agent_InjectionFinding as InjectionFinding, type ai_agent_JsonBlock as JsonBlock, type ai_agent_JsonRepairResult as JsonRepairResult, type ai_agent_Keyword as Keyword, ai_agent_MODEL_PRICING as MODEL_PRICING, type ai_agent_MergeResult as MergeResult, type ai_agent_MergeStrategy as MergeStrategy, type ai_agent_ModelPricing as ModelPricing, type ai_agent_PiiDetectResult as PiiDetectResult, type ai_agent_PiiFinding as PiiFinding, type ai_agent_PiiType as PiiType, type ai_agent_RankedChunk as RankedChunk, type ai_agent_RelevanceResult as RelevanceResult, type ai_agent_RetryBackoffAttempt as RetryBackoffAttempt, type ai_agent_RetryBackoffInput as RetryBackoffInput, type ai_agent_RetryBackoffResult as RetryBackoffResult, type ai_agent_RetryJitterMode as RetryJitterMode, type ai_agent_SanitizeResult as SanitizeResult, type ai_agent_SecretDetectResult as SecretDetectResult, type ai_agent_SecretFinding as SecretFinding, type ai_agent_SecretType as SecretType, type ai_agent_SummaryResult as SummaryResult, type ai_agent_TableResult2 as TableResult2, type ai_agent_TextChunk as TextChunk, type ai_agent_TokenEstimate as TokenEstimate, type ai_agent_TokenEstimateResult as TokenEstimateResult, type ai_agent_ToolSchemaIssue as ToolSchemaIssue, type ai_agent_ToolSchemaLintResult as ToolSchemaLintResult, type ai_agent_TrimResult as TrimResult, type ai_agent_TrimStrategy as TrimStrategy, type ai_agent_UrlMatch as UrlMatch, type ai_agent_ValidationError as ValidationError, type ai_agent_ValidationResult as ValidationResult, type ai_agent_VectorSimilarityResult as VectorSimilarityResult, ai_agent_calculateRetryBackoffSchedule as calculateRetryBackoffSchedule, ai_agent_chunkText as chunkText, ai_agent_compressHtml as compressHtml, ai_agent_compressJson as compressJson, ai_agent_compressMarkdown as compressMarkdown, ai_agent_deduplicateLines as deduplicateLines, ai_agent_detectPii as detectPii, ai_agent_detectPromptInjection as detectPromptInjection, ai_agent_detectSecrets as detectSecrets, ai_agent_diffJson as diffJson, ai_agent_estimateCost as estimateCost, ai_agent_estimateTokens as estimateTokens, ai_agent_expandQuery as expandQuery, ai_agent_extractEntities as extractEntities, ai_agent_extractJson as extractJson, ai_agent_extractKeywords as extractKeywords, ai_agent_extractTables as extractTables, ai_agent_extractUrls as extractUrls, ai_agent_flattenJson as flattenJson, ai_agent_formatFewShotExamples as formatFewShotExamples, ai_agent_lintToolSchema as lintToolSchema, ai_agent_mergeJson as mergeJson, ai_agent_redactPii as redactPii, ai_agent_repairJson as repairJson, ai_agent_rerankChunks as rerankChunks, ai_agent_sanitizeHtml as sanitizeHtml, ai_agent_scoreRelevance as scoreRelevance, ai_agent_summarizeForLlm as summarizeForLlm, ai_agent_trimToTokens as trimToTokens, ai_agent_unflattenJson as unflattenJson, ai_agent_validateJsonSchema as validateJsonSchema, ai_agent_vectorSimilarity as vectorSimilarity };
|
|
526
|
+
export { type ai_agent_ChunkStrategy as ChunkStrategy, type ai_agent_CompressHtmlResult as CompressHtmlResult, type ai_agent_CompressJsonResult as CompressJsonResult, type ai_agent_CompressMarkdownResult as CompressMarkdownResult, type ai_agent_CostEstimate as CostEstimate, type ai_agent_DedupeResult as DedupeResult, type ai_agent_DedupeStrategy as DedupeStrategy, type ai_agent_DiffEntry2 as DiffEntry2, type ai_agent_DiffOp2 as DiffOp2, type ai_agent_DiffResult2 as DiffResult2, type ai_agent_Entity2 as Entity2, type ai_agent_EntityType2 as EntityType2, type ai_agent_ExtractJsonResult as ExtractJsonResult, type ai_agent_ExtractKeywordsResult as ExtractKeywordsResult, type ai_agent_ExtractUrlsResult as ExtractUrlsResult, type ai_agent_FewShotExample as FewShotExample, type ai_agent_FewShotFormat as FewShotFormat, type ai_agent_FewShotFormatResult as FewShotFormatResult, type ai_agent_InjectionDetectResult as InjectionDetectResult, type ai_agent_InjectionFinding as InjectionFinding, type ai_agent_JsonBlock as JsonBlock, type ai_agent_JsonRepairResult as JsonRepairResult, type ai_agent_Keyword as Keyword, ai_agent_MODEL_PRICING as MODEL_PRICING, type ai_agent_MergeResult as MergeResult, type ai_agent_MergeStrategy as MergeStrategy, type ai_agent_ModelPricing as ModelPricing, type ai_agent_PiiDetectResult as PiiDetectResult, type ai_agent_PiiFinding as PiiFinding, type ai_agent_PiiType as PiiType, type ai_agent_PromptTemplateVariable as PromptTemplateVariable, type ai_agent_PromptTemplateVariableResult as PromptTemplateVariableResult, type ai_agent_RankedChunk as RankedChunk, type ai_agent_RelevanceResult as RelevanceResult, type ai_agent_RetryBackoffAttempt as RetryBackoffAttempt, type ai_agent_RetryBackoffInput as RetryBackoffInput, type ai_agent_RetryBackoffResult as RetryBackoffResult, type ai_agent_RetryJitterMode as RetryJitterMode, type ai_agent_SanitizeResult as SanitizeResult, type ai_agent_SecretDetectResult as SecretDetectResult, type ai_agent_SecretFinding as SecretFinding, type ai_agent_SecretType as SecretType, type ai_agent_SummaryResult as SummaryResult, type ai_agent_TableResult2 as TableResult2, type ai_agent_TextChunk as TextChunk, type ai_agent_TokenEstimate as TokenEstimate, type ai_agent_TokenEstimateResult as TokenEstimateResult, type ai_agent_ToolSchemaIssue as ToolSchemaIssue, type ai_agent_ToolSchemaLintResult as ToolSchemaLintResult, type ai_agent_TrimResult as TrimResult, type ai_agent_TrimStrategy as TrimStrategy, type ai_agent_UrlMatch as UrlMatch, type ai_agent_ValidationError as ValidationError, type ai_agent_ValidationResult as ValidationResult, type ai_agent_VectorSimilarityResult as VectorSimilarityResult, ai_agent_calculateRetryBackoffSchedule as calculateRetryBackoffSchedule, ai_agent_chunkText as chunkText, ai_agent_compressHtml as compressHtml, ai_agent_compressJson as compressJson, ai_agent_compressMarkdown as compressMarkdown, ai_agent_deduplicateLines as deduplicateLines, ai_agent_detectPii as detectPii, ai_agent_detectPromptInjection as detectPromptInjection, ai_agent_detectSecrets as detectSecrets, ai_agent_diffJson as diffJson, ai_agent_estimateCost as estimateCost, ai_agent_estimateTokens as estimateTokens, ai_agent_expandQuery as expandQuery, ai_agent_extractEntities as extractEntities, ai_agent_extractJson as extractJson, ai_agent_extractKeywords as extractKeywords, ai_agent_extractPromptTemplateVariables as extractPromptTemplateVariables, ai_agent_extractTables as extractTables, ai_agent_extractUrls as extractUrls, ai_agent_flattenJson as flattenJson, ai_agent_formatFewShotExamples as formatFewShotExamples, ai_agent_lintToolSchema as lintToolSchema, ai_agent_mergeJson as mergeJson, ai_agent_redactPii as redactPii, ai_agent_repairJson as repairJson, ai_agent_rerankChunks as rerankChunks, ai_agent_sanitizeHtml as sanitizeHtml, ai_agent_scoreRelevance as scoreRelevance, ai_agent_summarizeForLlm as summarizeForLlm, ai_agent_trimToTokens as trimToTokens, ai_agent_unflattenJson as unflattenJson, ai_agent_validateJsonSchema as validateJsonSchema, ai_agent_vectorSimilarity as vectorSimilarity };
|
|
500
527
|
}
|
|
501
528
|
|
|
502
|
-
export { type
|
|
529
|
+
export { type ValidationError as $, type RetryBackoffInput as A, type RetryBackoffResult as B, type ChunkStrategy as C, type DedupeResult as D, type Entity2 as E, type FewShotExample as F, type RetryJitterMode as G, type SecretDetectResult as H, type InjectionDetectResult as I, type JsonBlock as J, type Keyword as K, type SecretFinding as L, MODEL_PRICING as M, type SecretType as N, type SummaryResult as O, type PiiDetectResult as P, type TextChunk as Q, type RankedChunk as R, type SanitizeResult as S, type TableResult2 as T, type TokenEstimate as U, type TokenEstimateResult as V, type ToolSchemaIssue as W, type ToolSchemaLintResult as X, type TrimResult as Y, type TrimStrategy as Z, type UrlMatch as _, ai_agent as a, type ValidationResult as a0, type VectorSimilarityResult as a1, calculateRetryBackoffSchedule as a2, chunkText as a3, compressHtml as a4, compressJson as a5, compressMarkdown as a6, deduplicateLines as a7, detectPii as a8, detectPromptInjection as a9, detectSecrets as aa, diffJson as ab, estimateCost as ac, estimateTokens as ad, expandQuery as ae, extractEntities as af, extractJson as ag, extractKeywords as ah, extractPromptTemplateVariables as ai, extractTables as aj, extractUrls as ak, flattenJson as al, formatFewShotExamples as am, lintToolSchema as an, mergeJson as ao, redactPii as ap, repairJson as aq, rerankChunks as ar, sanitizeHtml as as, scoreRelevance as at, summarizeForLlm as au, trimToTokens as av, unflattenJson as aw, validateJsonSchema as ax, vectorSimilarity as ay, type CompressHtmlResult as b, type CompressJsonResult as c, type CompressMarkdownResult as d, type CostEstimate as e, type DedupeStrategy as f, type DiffEntry2 as g, type DiffOp2 as h, type DiffResult2 as i, type EntityType2 as j, type ExtractJsonResult as k, type ExtractKeywordsResult as l, type ExtractUrlsResult as m, type FewShotFormat as n, type FewShotFormatResult as o, type InjectionFinding as p, type JsonRepairResult as q, type MergeResult as r, type MergeStrategy as s, type ModelPricing as t, type PiiFinding as u, type PiiType as v, type PromptTemplateVariable as w, type PromptTemplateVariableResult as x, type RelevanceResult as y, type RetryBackoffAttempt as z };
|
|
@@ -409,6 +409,30 @@ interface RetryBackoffResult {
|
|
|
409
409
|
declare function calculateRetryBackoffSchedule(input: RetryBackoffInput): RetryBackoffResult | {
|
|
410
410
|
error: string;
|
|
411
411
|
};
|
|
412
|
+
interface PromptTemplateVariable {
|
|
413
|
+
name: string;
|
|
414
|
+
count: number;
|
|
415
|
+
}
|
|
416
|
+
interface PromptTemplateVariableResult {
|
|
417
|
+
variableCount: number;
|
|
418
|
+
variables: PromptTemplateVariable[];
|
|
419
|
+
duplicates: string[];
|
|
420
|
+
missing: string[];
|
|
421
|
+
unused: string[];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Extract every {{variable}}-style placeholder from a prompt template,
|
|
425
|
+
* reporting each unique variable's occurrence count and flagging ones used
|
|
426
|
+
* more than once. When providedVars is given, also cross-checks the
|
|
427
|
+
* template against it: variables the template uses but providedVars is
|
|
428
|
+
* missing, and names in providedVars the template never references. Only
|
|
429
|
+
* double-curly {{name}} syntax is recognized (dotted/dashed names like
|
|
430
|
+
* {{user.name}} are allowed); single-brace, triple-brace, and Jinja-style
|
|
431
|
+
* {% %} tags are out of scope.
|
|
432
|
+
*/
|
|
433
|
+
declare function extractPromptTemplateVariables(template: string, providedVars?: string[]): PromptTemplateVariableResult | {
|
|
434
|
+
error: string;
|
|
435
|
+
};
|
|
412
436
|
|
|
413
437
|
type ai_agent_ChunkStrategy = ChunkStrategy;
|
|
414
438
|
type ai_agent_CompressHtmlResult = CompressHtmlResult;
|
|
@@ -440,6 +464,8 @@ type ai_agent_ModelPricing = ModelPricing;
|
|
|
440
464
|
type ai_agent_PiiDetectResult = PiiDetectResult;
|
|
441
465
|
type ai_agent_PiiFinding = PiiFinding;
|
|
442
466
|
type ai_agent_PiiType = PiiType;
|
|
467
|
+
type ai_agent_PromptTemplateVariable = PromptTemplateVariable;
|
|
468
|
+
type ai_agent_PromptTemplateVariableResult = PromptTemplateVariableResult;
|
|
443
469
|
type ai_agent_RankedChunk = RankedChunk;
|
|
444
470
|
type ai_agent_RelevanceResult = RelevanceResult;
|
|
445
471
|
type ai_agent_RetryBackoffAttempt = RetryBackoffAttempt;
|
|
@@ -479,6 +505,7 @@ declare const ai_agent_expandQuery: typeof expandQuery;
|
|
|
479
505
|
declare const ai_agent_extractEntities: typeof extractEntities;
|
|
480
506
|
declare const ai_agent_extractJson: typeof extractJson;
|
|
481
507
|
declare const ai_agent_extractKeywords: typeof extractKeywords;
|
|
508
|
+
declare const ai_agent_extractPromptTemplateVariables: typeof extractPromptTemplateVariables;
|
|
482
509
|
declare const ai_agent_extractTables: typeof extractTables;
|
|
483
510
|
declare const ai_agent_extractUrls: typeof extractUrls;
|
|
484
511
|
declare const ai_agent_flattenJson: typeof flattenJson;
|
|
@@ -496,7 +523,7 @@ declare const ai_agent_unflattenJson: typeof unflattenJson;
|
|
|
496
523
|
declare const ai_agent_validateJsonSchema: typeof validateJsonSchema;
|
|
497
524
|
declare const ai_agent_vectorSimilarity: typeof vectorSimilarity;
|
|
498
525
|
declare namespace ai_agent {
|
|
499
|
-
export { type ai_agent_ChunkStrategy as ChunkStrategy, type ai_agent_CompressHtmlResult as CompressHtmlResult, type ai_agent_CompressJsonResult as CompressJsonResult, type ai_agent_CompressMarkdownResult as CompressMarkdownResult, type ai_agent_CostEstimate as CostEstimate, type ai_agent_DedupeResult as DedupeResult, type ai_agent_DedupeStrategy as DedupeStrategy, type ai_agent_DiffEntry2 as DiffEntry2, type ai_agent_DiffOp2 as DiffOp2, type ai_agent_DiffResult2 as DiffResult2, type ai_agent_Entity2 as Entity2, type ai_agent_EntityType2 as EntityType2, type ai_agent_ExtractJsonResult as ExtractJsonResult, type ai_agent_ExtractKeywordsResult as ExtractKeywordsResult, type ai_agent_ExtractUrlsResult as ExtractUrlsResult, type ai_agent_FewShotExample as FewShotExample, type ai_agent_FewShotFormat as FewShotFormat, type ai_agent_FewShotFormatResult as FewShotFormatResult, type ai_agent_InjectionDetectResult as InjectionDetectResult, type ai_agent_InjectionFinding as InjectionFinding, type ai_agent_JsonBlock as JsonBlock, type ai_agent_JsonRepairResult as JsonRepairResult, type ai_agent_Keyword as Keyword, ai_agent_MODEL_PRICING as MODEL_PRICING, type ai_agent_MergeResult as MergeResult, type ai_agent_MergeStrategy as MergeStrategy, type ai_agent_ModelPricing as ModelPricing, type ai_agent_PiiDetectResult as PiiDetectResult, type ai_agent_PiiFinding as PiiFinding, type ai_agent_PiiType as PiiType, type ai_agent_RankedChunk as RankedChunk, type ai_agent_RelevanceResult as RelevanceResult, type ai_agent_RetryBackoffAttempt as RetryBackoffAttempt, type ai_agent_RetryBackoffInput as RetryBackoffInput, type ai_agent_RetryBackoffResult as RetryBackoffResult, type ai_agent_RetryJitterMode as RetryJitterMode, type ai_agent_SanitizeResult as SanitizeResult, type ai_agent_SecretDetectResult as SecretDetectResult, type ai_agent_SecretFinding as SecretFinding, type ai_agent_SecretType as SecretType, type ai_agent_SummaryResult as SummaryResult, type ai_agent_TableResult2 as TableResult2, type ai_agent_TextChunk as TextChunk, type ai_agent_TokenEstimate as TokenEstimate, type ai_agent_TokenEstimateResult as TokenEstimateResult, type ai_agent_ToolSchemaIssue as ToolSchemaIssue, type ai_agent_ToolSchemaLintResult as ToolSchemaLintResult, type ai_agent_TrimResult as TrimResult, type ai_agent_TrimStrategy as TrimStrategy, type ai_agent_UrlMatch as UrlMatch, type ai_agent_ValidationError as ValidationError, type ai_agent_ValidationResult as ValidationResult, type ai_agent_VectorSimilarityResult as VectorSimilarityResult, ai_agent_calculateRetryBackoffSchedule as calculateRetryBackoffSchedule, ai_agent_chunkText as chunkText, ai_agent_compressHtml as compressHtml, ai_agent_compressJson as compressJson, ai_agent_compressMarkdown as compressMarkdown, ai_agent_deduplicateLines as deduplicateLines, ai_agent_detectPii as detectPii, ai_agent_detectPromptInjection as detectPromptInjection, ai_agent_detectSecrets as detectSecrets, ai_agent_diffJson as diffJson, ai_agent_estimateCost as estimateCost, ai_agent_estimateTokens as estimateTokens, ai_agent_expandQuery as expandQuery, ai_agent_extractEntities as extractEntities, ai_agent_extractJson as extractJson, ai_agent_extractKeywords as extractKeywords, ai_agent_extractTables as extractTables, ai_agent_extractUrls as extractUrls, ai_agent_flattenJson as flattenJson, ai_agent_formatFewShotExamples as formatFewShotExamples, ai_agent_lintToolSchema as lintToolSchema, ai_agent_mergeJson as mergeJson, ai_agent_redactPii as redactPii, ai_agent_repairJson as repairJson, ai_agent_rerankChunks as rerankChunks, ai_agent_sanitizeHtml as sanitizeHtml, ai_agent_scoreRelevance as scoreRelevance, ai_agent_summarizeForLlm as summarizeForLlm, ai_agent_trimToTokens as trimToTokens, ai_agent_unflattenJson as unflattenJson, ai_agent_validateJsonSchema as validateJsonSchema, ai_agent_vectorSimilarity as vectorSimilarity };
|
|
526
|
+
export { type ai_agent_ChunkStrategy as ChunkStrategy, type ai_agent_CompressHtmlResult as CompressHtmlResult, type ai_agent_CompressJsonResult as CompressJsonResult, type ai_agent_CompressMarkdownResult as CompressMarkdownResult, type ai_agent_CostEstimate as CostEstimate, type ai_agent_DedupeResult as DedupeResult, type ai_agent_DedupeStrategy as DedupeStrategy, type ai_agent_DiffEntry2 as DiffEntry2, type ai_agent_DiffOp2 as DiffOp2, type ai_agent_DiffResult2 as DiffResult2, type ai_agent_Entity2 as Entity2, type ai_agent_EntityType2 as EntityType2, type ai_agent_ExtractJsonResult as ExtractJsonResult, type ai_agent_ExtractKeywordsResult as ExtractKeywordsResult, type ai_agent_ExtractUrlsResult as ExtractUrlsResult, type ai_agent_FewShotExample as FewShotExample, type ai_agent_FewShotFormat as FewShotFormat, type ai_agent_FewShotFormatResult as FewShotFormatResult, type ai_agent_InjectionDetectResult as InjectionDetectResult, type ai_agent_InjectionFinding as InjectionFinding, type ai_agent_JsonBlock as JsonBlock, type ai_agent_JsonRepairResult as JsonRepairResult, type ai_agent_Keyword as Keyword, ai_agent_MODEL_PRICING as MODEL_PRICING, type ai_agent_MergeResult as MergeResult, type ai_agent_MergeStrategy as MergeStrategy, type ai_agent_ModelPricing as ModelPricing, type ai_agent_PiiDetectResult as PiiDetectResult, type ai_agent_PiiFinding as PiiFinding, type ai_agent_PiiType as PiiType, type ai_agent_PromptTemplateVariable as PromptTemplateVariable, type ai_agent_PromptTemplateVariableResult as PromptTemplateVariableResult, type ai_agent_RankedChunk as RankedChunk, type ai_agent_RelevanceResult as RelevanceResult, type ai_agent_RetryBackoffAttempt as RetryBackoffAttempt, type ai_agent_RetryBackoffInput as RetryBackoffInput, type ai_agent_RetryBackoffResult as RetryBackoffResult, type ai_agent_RetryJitterMode as RetryJitterMode, type ai_agent_SanitizeResult as SanitizeResult, type ai_agent_SecretDetectResult as SecretDetectResult, type ai_agent_SecretFinding as SecretFinding, type ai_agent_SecretType as SecretType, type ai_agent_SummaryResult as SummaryResult, type ai_agent_TableResult2 as TableResult2, type ai_agent_TextChunk as TextChunk, type ai_agent_TokenEstimate as TokenEstimate, type ai_agent_TokenEstimateResult as TokenEstimateResult, type ai_agent_ToolSchemaIssue as ToolSchemaIssue, type ai_agent_ToolSchemaLintResult as ToolSchemaLintResult, type ai_agent_TrimResult as TrimResult, type ai_agent_TrimStrategy as TrimStrategy, type ai_agent_UrlMatch as UrlMatch, type ai_agent_ValidationError as ValidationError, type ai_agent_ValidationResult as ValidationResult, type ai_agent_VectorSimilarityResult as VectorSimilarityResult, ai_agent_calculateRetryBackoffSchedule as calculateRetryBackoffSchedule, ai_agent_chunkText as chunkText, ai_agent_compressHtml as compressHtml, ai_agent_compressJson as compressJson, ai_agent_compressMarkdown as compressMarkdown, ai_agent_deduplicateLines as deduplicateLines, ai_agent_detectPii as detectPii, ai_agent_detectPromptInjection as detectPromptInjection, ai_agent_detectSecrets as detectSecrets, ai_agent_diffJson as diffJson, ai_agent_estimateCost as estimateCost, ai_agent_estimateTokens as estimateTokens, ai_agent_expandQuery as expandQuery, ai_agent_extractEntities as extractEntities, ai_agent_extractJson as extractJson, ai_agent_extractKeywords as extractKeywords, ai_agent_extractPromptTemplateVariables as extractPromptTemplateVariables, ai_agent_extractTables as extractTables, ai_agent_extractUrls as extractUrls, ai_agent_flattenJson as flattenJson, ai_agent_formatFewShotExamples as formatFewShotExamples, ai_agent_lintToolSchema as lintToolSchema, ai_agent_mergeJson as mergeJson, ai_agent_redactPii as redactPii, ai_agent_repairJson as repairJson, ai_agent_rerankChunks as rerankChunks, ai_agent_sanitizeHtml as sanitizeHtml, ai_agent_scoreRelevance as scoreRelevance, ai_agent_summarizeForLlm as summarizeForLlm, ai_agent_trimToTokens as trimToTokens, ai_agent_unflattenJson as unflattenJson, ai_agent_validateJsonSchema as validateJsonSchema, ai_agent_vectorSimilarity as vectorSimilarity };
|
|
500
527
|
}
|
|
501
528
|
|
|
502
|
-
export { type
|
|
529
|
+
export { type ValidationError as $, type RetryBackoffInput as A, type RetryBackoffResult as B, type ChunkStrategy as C, type DedupeResult as D, type Entity2 as E, type FewShotExample as F, type RetryJitterMode as G, type SecretDetectResult as H, type InjectionDetectResult as I, type JsonBlock as J, type Keyword as K, type SecretFinding as L, MODEL_PRICING as M, type SecretType as N, type SummaryResult as O, type PiiDetectResult as P, type TextChunk as Q, type RankedChunk as R, type SanitizeResult as S, type TableResult2 as T, type TokenEstimate as U, type TokenEstimateResult as V, type ToolSchemaIssue as W, type ToolSchemaLintResult as X, type TrimResult as Y, type TrimStrategy as Z, type UrlMatch as _, ai_agent as a, type ValidationResult as a0, type VectorSimilarityResult as a1, calculateRetryBackoffSchedule as a2, chunkText as a3, compressHtml as a4, compressJson as a5, compressMarkdown as a6, deduplicateLines as a7, detectPii as a8, detectPromptInjection as a9, detectSecrets as aa, diffJson as ab, estimateCost as ac, estimateTokens as ad, expandQuery as ae, extractEntities as af, extractJson as ag, extractKeywords as ah, extractPromptTemplateVariables as ai, extractTables as aj, extractUrls as ak, flattenJson as al, formatFewShotExamples as am, lintToolSchema as an, mergeJson as ao, redactPii as ap, repairJson as aq, rerankChunks as ar, sanitizeHtml as as, scoreRelevance as at, summarizeForLlm as au, trimToTokens as av, unflattenJson as aw, validateJsonSchema as ax, vectorSimilarity as ay, type CompressHtmlResult as b, type CompressJsonResult as c, type CompressMarkdownResult as d, type CostEstimate as e, type DedupeStrategy as f, type DiffEntry2 as g, type DiffOp2 as h, type DiffResult2 as i, type EntityType2 as j, type ExtractJsonResult as k, type ExtractKeywordsResult as l, type ExtractUrlsResult as m, type FewShotFormat as n, type FewShotFormatResult as o, type InjectionFinding as p, type JsonRepairResult as q, type MergeResult as r, type MergeStrategy as s, type ModelPricing as t, type PiiFinding as u, type PiiType as v, type PromptTemplateVariable as w, type PromptTemplateVariableResult as x, type RelevanceResult as y, type RetryBackoffAttempt as z };
|
|
@@ -20,6 +20,7 @@ __export(ai_agent_exports, {
|
|
|
20
20
|
extractEntities: () => extractEntities,
|
|
21
21
|
extractJson: () => extractJson,
|
|
22
22
|
extractKeywords: () => extractKeywords,
|
|
23
|
+
extractPromptTemplateVariables: () => extractPromptTemplateVariables,
|
|
23
24
|
extractTables: () => extractTables,
|
|
24
25
|
extractUrls: () => extractUrls,
|
|
25
26
|
flattenJson: () => flattenJson,
|
|
@@ -1173,5 +1174,44 @@ function calculateRetryBackoffSchedule(input) {
|
|
|
1173
1174
|
totalWorstCaseMs: round0(totalWorstCaseMs)
|
|
1174
1175
|
};
|
|
1175
1176
|
}
|
|
1177
|
+
var PROMPT_TEMPLATE_VARIABLE_REGEX = /\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;
|
|
1178
|
+
function extractPromptTemplateVariables(template, providedVars) {
|
|
1179
|
+
const trimmed = template.trim();
|
|
1180
|
+
if (!trimmed) return { error: "Empty input" };
|
|
1181
|
+
const order = [];
|
|
1182
|
+
const counts = /* @__PURE__ */ new Map();
|
|
1183
|
+
for (const m of template.matchAll(PROMPT_TEMPLATE_VARIABLE_REGEX)) {
|
|
1184
|
+
const name = m[1];
|
|
1185
|
+
if (!counts.has(name)) {
|
|
1186
|
+
counts.set(name, 0);
|
|
1187
|
+
order.push(name);
|
|
1188
|
+
}
|
|
1189
|
+
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
1190
|
+
}
|
|
1191
|
+
if (order.length === 0) return { error: "No {{variable}} placeholders found" };
|
|
1192
|
+
const variables = order.map((name) => ({ name, count: counts.get(name) ?? 0 }));
|
|
1193
|
+
const duplicates = order.filter((name) => (counts.get(name) ?? 0) > 1);
|
|
1194
|
+
let missing = [];
|
|
1195
|
+
const unused = [];
|
|
1196
|
+
if (providedVars !== void 0) {
|
|
1197
|
+
const providedSet = new Set(providedVars.map((v) => v.trim()).filter(Boolean));
|
|
1198
|
+
const usedSet = new Set(order);
|
|
1199
|
+
missing = order.filter((name) => !providedSet.has(name));
|
|
1200
|
+
const seenProvided = /* @__PURE__ */ new Set();
|
|
1201
|
+
for (const raw of providedVars) {
|
|
1202
|
+
const v = raw.trim();
|
|
1203
|
+
if (!v || usedSet.has(v) || seenProvided.has(v)) continue;
|
|
1204
|
+
seenProvided.add(v);
|
|
1205
|
+
unused.push(v);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
return {
|
|
1209
|
+
variableCount: order.length,
|
|
1210
|
+
variables,
|
|
1211
|
+
duplicates,
|
|
1212
|
+
missing,
|
|
1213
|
+
unused
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1176
1216
|
|
|
1177
|
-
export { MODEL_PRICING, ai_agent_exports, calculateRetryBackoffSchedule, chunkText, compressHtml, compressJson, compressMarkdown, deduplicateLines, detectPii, detectPromptInjection, detectSecrets, diffJson, estimateCost, estimateTokens, expandQuery, extractEntities, extractJson, extractKeywords, extractTables, extractUrls, flattenJson, formatFewShotExamples, lintToolSchema, mergeJson, redactPii, repairJson, rerankChunks, sanitizeHtml, scoreRelevance, summarizeForLlm, trimToTokens, unflattenJson, validateJsonSchema, vectorSimilarity };
|
|
1217
|
+
export { MODEL_PRICING, ai_agent_exports, calculateRetryBackoffSchedule, chunkText, compressHtml, compressJson, compressMarkdown, deduplicateLines, detectPii, detectPromptInjection, detectSecrets, diffJson, estimateCost, estimateTokens, expandQuery, extractEntities, extractJson, extractKeywords, extractPromptTemplateVariables, extractTables, extractUrls, flattenJson, formatFewShotExamples, lintToolSchema, mergeJson, redactPii, repairJson, rerankChunks, sanitizeHtml, scoreRelevance, summarizeForLlm, trimToTokens, unflattenJson, validateJsonSchema, vectorSimilarity };
|
|
@@ -27,6 +27,7 @@ __export(code_exports, {
|
|
|
27
27
|
envToExport: () => envToExport,
|
|
28
28
|
envToJson: () => envToJson,
|
|
29
29
|
extractMarkdownFootnotes: () => extractMarkdownFootnotes,
|
|
30
|
+
extractMarkdownLinkReferences: () => extractMarkdownLinkReferences,
|
|
30
31
|
extractSvgSpriteSymbols: () => extractSvgSpriteSymbols,
|
|
31
32
|
formatCss: () => formatCss,
|
|
32
33
|
formatGql: () => formatGql,
|
|
@@ -4268,5 +4269,63 @@ function countSqlPlaceholders(sql) {
|
|
|
4268
4269
|
numberedDuplicates
|
|
4269
4270
|
};
|
|
4270
4271
|
}
|
|
4272
|
+
var LINK_REF_DEFINITION_REGEX = /^ {0,3}\[([^\]]+)\]:\s*(\S+)(?:\s+(?:"([^"]*)"|'([^']*)'|\(([^)]*)\)))?\s*$/;
|
|
4273
|
+
var LINK_REF_USAGE_REGEX = /(!?)\[([^[\]\n]*)\]\[([^[\]\n]*)\]/g;
|
|
4274
|
+
function normalizeLinkLabel(label) {
|
|
4275
|
+
return label.trim().replace(/\s+/g, " ").toLowerCase();
|
|
4276
|
+
}
|
|
4277
|
+
function extractMarkdownLinkReferences(markdown) {
|
|
4278
|
+
const trimmed = markdown.trim();
|
|
4279
|
+
if (!trimmed) return { error: "Empty input" };
|
|
4280
|
+
const lines = markdown.replace(/\r\n/g, "\n").split("\n");
|
|
4281
|
+
const definitions = [];
|
|
4282
|
+
const definitionsByLabel = /* @__PURE__ */ new Map();
|
|
4283
|
+
for (const line of lines) {
|
|
4284
|
+
const match = line.match(LINK_REF_DEFINITION_REGEX);
|
|
4285
|
+
if (!match) continue;
|
|
4286
|
+
const label = match[1];
|
|
4287
|
+
const normalized = normalizeLinkLabel(label);
|
|
4288
|
+
if (definitionsByLabel.has(normalized)) continue;
|
|
4289
|
+
const def = {
|
|
4290
|
+
label,
|
|
4291
|
+
url: match[2],
|
|
4292
|
+
title: match[3] ?? match[4] ?? match[5] ?? void 0
|
|
4293
|
+
};
|
|
4294
|
+
definitionsByLabel.set(normalized, def);
|
|
4295
|
+
definitions.push(def);
|
|
4296
|
+
}
|
|
4297
|
+
const usages = [];
|
|
4298
|
+
for (const m of markdown.matchAll(LINK_REF_USAGE_REGEX)) {
|
|
4299
|
+
const image = m[1] === "!";
|
|
4300
|
+
const text = m[2];
|
|
4301
|
+
const rawRef = m[3];
|
|
4302
|
+
const label = rawRef.trim() === "" ? text : rawRef;
|
|
4303
|
+
usages.push({ text, label, image });
|
|
4304
|
+
}
|
|
4305
|
+
if (definitions.length === 0 && usages.length === 0) {
|
|
4306
|
+
return { error: "No reference-style links or definitions found" };
|
|
4307
|
+
}
|
|
4308
|
+
const usedLabels = /* @__PURE__ */ new Set();
|
|
4309
|
+
const resolved = [];
|
|
4310
|
+
const unresolvedReferences = [];
|
|
4311
|
+
for (const usage of usages) {
|
|
4312
|
+
const normalized = normalizeLinkLabel(usage.label);
|
|
4313
|
+
const def = definitionsByLabel.get(normalized);
|
|
4314
|
+
if (def) {
|
|
4315
|
+
usedLabels.add(normalized);
|
|
4316
|
+
resolved.push({ ...usage, url: def.url, title: def.title });
|
|
4317
|
+
} else {
|
|
4318
|
+
unresolvedReferences.push(usage);
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
const unusedDefinitions = definitions.filter((d) => !usedLabels.has(normalizeLinkLabel(d.label)));
|
|
4322
|
+
return {
|
|
4323
|
+
referenceCount: usages.length,
|
|
4324
|
+
definitionCount: definitions.length,
|
|
4325
|
+
resolved,
|
|
4326
|
+
unresolvedReferences,
|
|
4327
|
+
unusedDefinitions
|
|
4328
|
+
};
|
|
4329
|
+
}
|
|
4271
4330
|
|
|
4272
|
-
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig };
|
|
4331
|
+
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig };
|
|
@@ -38,6 +38,7 @@ __export(network_exports, {
|
|
|
38
38
|
extractMultipartBoundary: () => extractMultipartBoundary,
|
|
39
39
|
formatCoordinates: () => formatCoordinates,
|
|
40
40
|
formatTtl: () => formatTtl,
|
|
41
|
+
generateRobotsTxt: () => generateRobotsTxt,
|
|
41
42
|
getByCategory: () => getByCategory,
|
|
42
43
|
getHeader: () => getHeader,
|
|
43
44
|
getHeadersByCategory: () => getHeadersByCategory,
|
|
@@ -1711,6 +1712,40 @@ function validateRobotsTxt(text) {
|
|
|
1711
1712
|
const valid = !issues.some((i) => i.severity === "error");
|
|
1712
1713
|
return { groups, sitemaps, issues, valid };
|
|
1713
1714
|
}
|
|
1715
|
+
function generateRobotsTxt(options) {
|
|
1716
|
+
if (!options || !Array.isArray(options.groups) || options.groups.length === 0) {
|
|
1717
|
+
return { error: "At least one group with a user-agent is required" };
|
|
1718
|
+
}
|
|
1719
|
+
const lines = [];
|
|
1720
|
+
for (const group of options.groups) {
|
|
1721
|
+
const userAgents = (group.userAgents ?? []).map((a) => a.trim()).filter(Boolean);
|
|
1722
|
+
if (userAgents.length === 0) return { error: "Each group needs at least one non-empty user-agent" };
|
|
1723
|
+
for (const ua of userAgents) lines.push(`User-agent: ${ua}`);
|
|
1724
|
+
const disallow = group.disallow ?? [];
|
|
1725
|
+
const allow = group.allow ?? [];
|
|
1726
|
+
if (disallow.length === 0 && allow.length === 0) {
|
|
1727
|
+
lines.push("Disallow:");
|
|
1728
|
+
} else {
|
|
1729
|
+
for (const value of disallow) lines.push(`Disallow: ${value}`);
|
|
1730
|
+
for (const value of allow) lines.push(`Allow: ${value}`);
|
|
1731
|
+
}
|
|
1732
|
+
if (group.crawlDelay !== void 0) {
|
|
1733
|
+
if (!Number.isFinite(group.crawlDelay) || group.crawlDelay < 0) {
|
|
1734
|
+
return { error: "crawlDelay must be a non-negative number" };
|
|
1735
|
+
}
|
|
1736
|
+
lines.push(`Crawl-delay: ${group.crawlDelay}`);
|
|
1737
|
+
}
|
|
1738
|
+
lines.push("");
|
|
1739
|
+
}
|
|
1740
|
+
for (const sitemap of options.sitemaps ?? []) {
|
|
1741
|
+
if (!/^https?:\/\//i.test(sitemap)) {
|
|
1742
|
+
return { error: `Sitemap URL "${sitemap}" must be absolute (start with http:// or https://)` };
|
|
1743
|
+
}
|
|
1744
|
+
lines.push(`Sitemap: ${sitemap}`);
|
|
1745
|
+
}
|
|
1746
|
+
while (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
|
|
1747
|
+
return { text: lines.join("\n") + "\n" };
|
|
1748
|
+
}
|
|
1714
1749
|
var UA_BOT_PATTERNS = [
|
|
1715
1750
|
[/googlebot/i, "Googlebot"],
|
|
1716
1751
|
[/bingbot/i, "Bingbot"],
|
|
@@ -3630,4 +3665,4 @@ function scoreSecurityHeaders(rawHeaders) {
|
|
|
3630
3665
|
return { checks, score, grade, passCount, warningCount, missingCount, totalChecks };
|
|
3631
3666
|
}
|
|
3632
3667
|
|
|
3633
|
-
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildHsts, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildRobotsMetaTag, buildVaryHeader, buildXContentTypeOptionsHeader, buildXRobotsTag, calculateCookieSizeBudget, checkSetCookieHeader, countryCodeToFlag, extractMultipartBoundary, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, listOpcodes, lookupCloseCode, lookupOpcode, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseHsts, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseRobotsMetaTag, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, parseXRobotsTag, scoreSecurityHeaders, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
3668
|
+
export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildHsts, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildRobotsMetaTag, buildVaryHeader, buildXContentTypeOptionsHeader, buildXRobotsTag, calculateCookieSizeBudget, checkSetCookieHeader, countryCodeToFlag, extractMultipartBoundary, formatCoordinates, formatTtl, generateRobotsTxt, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, listOpcodes, lookupCloseCode, lookupOpcode, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseHsts, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseRobotsMetaTag, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, parseXRobotsTag, scoreSecurityHeaders, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
@@ -718,6 +718,41 @@ interface SqlPlaceholderResult {
|
|
|
718
718
|
* bodies (`$$...$$`) are not specially recognized.
|
|
719
719
|
*/
|
|
720
720
|
declare function countSqlPlaceholders(sql: string): SqlPlaceholderResult;
|
|
721
|
+
interface LinkReferenceUsage {
|
|
722
|
+
text: string;
|
|
723
|
+
label: string;
|
|
724
|
+
image: boolean;
|
|
725
|
+
}
|
|
726
|
+
interface LinkReferenceDefinition {
|
|
727
|
+
label: string;
|
|
728
|
+
url: string;
|
|
729
|
+
title?: string;
|
|
730
|
+
}
|
|
731
|
+
interface ResolvedLinkReference extends LinkReferenceUsage {
|
|
732
|
+
url: string;
|
|
733
|
+
title?: string;
|
|
734
|
+
}
|
|
735
|
+
interface MarkdownLinkReferenceResult {
|
|
736
|
+
referenceCount: number;
|
|
737
|
+
definitionCount: number;
|
|
738
|
+
resolved: ResolvedLinkReference[];
|
|
739
|
+
unresolvedReferences: LinkReferenceUsage[];
|
|
740
|
+
unusedDefinitions: LinkReferenceDefinition[];
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Extract every reference-style Markdown link (`[text][ref]`, including the
|
|
744
|
+
* shortcut form `[text][]` and image references `![alt][ref]`) alongside
|
|
745
|
+
* its `[ref]: url "title"` definition, then flag usages with no matching
|
|
746
|
+
* definition and definitions that no usage ever references. Labels are
|
|
747
|
+
* matched case-insensitively with internal whitespace collapsed, per
|
|
748
|
+
* CommonMark's link-label normalization; when the same label is defined
|
|
749
|
+
* more than once, the first definition wins. Inline links (`[text](url)`)
|
|
750
|
+
* and bare shortcut references (`[ref]` with no second bracket pair) are
|
|
751
|
+
* out of scope.
|
|
752
|
+
*/
|
|
753
|
+
declare function extractMarkdownLinkReferences(markdown: string): MarkdownLinkReferenceResult | {
|
|
754
|
+
error: string;
|
|
755
|
+
};
|
|
721
756
|
|
|
722
757
|
declare const code_ALL_FLAGS: typeof ALL_FLAGS;
|
|
723
758
|
type code_ApiEndpoint = ApiEndpoint;
|
|
@@ -770,10 +805,13 @@ type code_HtmlMinifyResult = HtmlMinifyResult;
|
|
|
770
805
|
type code_JsMinifyOptions = JsMinifyOptions;
|
|
771
806
|
type code_JsMinifyResult = JsMinifyResult;
|
|
772
807
|
declare const code_KNOWN_LANGUAGE_TAGS: typeof KNOWN_LANGUAGE_TAGS;
|
|
808
|
+
type code_LinkReferenceDefinition = LinkReferenceDefinition;
|
|
809
|
+
type code_LinkReferenceUsage = LinkReferenceUsage;
|
|
773
810
|
declare const code_MIME_TABLE: typeof MIME_TABLE;
|
|
774
811
|
type code_MarkdownFootnoteDefinition = MarkdownFootnoteDefinition;
|
|
775
812
|
type code_MarkdownFootnoteReference = MarkdownFootnoteReference;
|
|
776
813
|
type code_MarkdownFootnoteResult = MarkdownFootnoteResult;
|
|
814
|
+
type code_MarkdownLinkReferenceResult = MarkdownLinkReferenceResult;
|
|
777
815
|
type code_MatchResult = MatchResult;
|
|
778
816
|
type code_MimeEntry = MimeEntry;
|
|
779
817
|
type code_MimeLookupResult = MimeLookupResult;
|
|
@@ -792,6 +830,7 @@ type code_RegexGroupIssue = RegexGroupIssue;
|
|
|
792
830
|
type code_RegexMatch = RegexMatch;
|
|
793
831
|
type code_RegexResult = RegexResult;
|
|
794
832
|
type code_RegexSuccess = RegexSuccess;
|
|
833
|
+
type code_ResolvedLinkReference = ResolvedLinkReference;
|
|
795
834
|
declare const code_SQL_DEFAULT_OPTIONS: typeof SQL_DEFAULT_OPTIONS;
|
|
796
835
|
type code_Segment = Segment;
|
|
797
836
|
type code_SpecVersion = SpecVersion;
|
|
@@ -820,6 +859,7 @@ declare const code_detectRedos: typeof detectRedos;
|
|
|
820
859
|
declare const code_envToExport: typeof envToExport;
|
|
821
860
|
declare const code_envToJson: typeof envToJson;
|
|
822
861
|
declare const code_extractMarkdownFootnotes: typeof extractMarkdownFootnotes;
|
|
862
|
+
declare const code_extractMarkdownLinkReferences: typeof extractMarkdownLinkReferences;
|
|
823
863
|
declare const code_extractSvgSpriteSymbols: typeof extractSvgSpriteSymbols;
|
|
824
864
|
declare const code_formatCss: typeof formatCss;
|
|
825
865
|
declare const code_formatGql: typeof formatGql;
|
|
@@ -863,7 +903,7 @@ declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
|
|
|
863
903
|
declare const code_validatePackageExports: typeof validatePackageExports;
|
|
864
904
|
declare const code_validateTsconfig: typeof validateTsconfig;
|
|
865
905
|
declare namespace code {
|
|
866
|
-
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
|
|
906
|
+
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
|
|
867
907
|
}
|
|
868
908
|
|
|
869
|
-
export { type
|
|
909
|
+
export { type LinkReferenceUsage as $, ALL_FLAGS as A, type EditorConfigValidationResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type EnvEntry as F, type EnvParseResult as G, type ExportsIssue as H, type ExportsShape as I, type ExportsValidationResult as J, type FenceTagIssue as K, type FenceTagIssueType as L, type FenceValidationResult as M, type GitCommandConfig as N, type GitCommandResult as O, type GitOperation as P, type GithubUrlInfo as Q, type GithubUrlType as R, type GitignoreTestResult as S, type GqlFormatResult as T, type HtmlFormatResult as U, type HtmlMinifyOptions as V, type HtmlMinifyResult as W, type JsMinifyOptions as X, type JsMinifyResult as Y, KNOWN_LANGUAGE_TAGS as Z, type LinkReferenceDefinition as _, type ApiEndpoint as a, lintConventionalCommit as a$, MIME_TABLE as a0, type MarkdownFootnoteDefinition as a1, type MarkdownFootnoteReference as a2, type MarkdownFootnoteResult as a3, type MarkdownLinkReferenceResult as a4, type MatchResult as a5, type MimeEntry as a6, type MimeLookupResult as a7, OPERATIONS as a8, type ParsedSpec as a9, analyzeRegexGroups as aA, auditDependencyRanges as aB, buildDockerPull as aC, buildDockerRun as aD, buildGitCommand as aE, collapseHtmlWhitespace as aF, collapseJsWhitespace as aG, countProperties as aH, countRules as aI, countSqlPlaceholders as aJ, detectDialect as aK, detectOperationType as aL, detectRedos as aM, envToExport as aN, envToJson as aO, extractMarkdownFootnotes as aP, extractMarkdownLinkReferences as aQ, extractSvgSpriteSymbols as aR, formatCss as aS, formatGql as aT, formatHtml as aU, formatSql as aV, getEndpointsByTag as aW, getHtmlStats as aX, getJsStats as aY, getMethodColor as aZ, isValidTag as a_, type PlaceholderStyle as aa, type RedosFinding as ab, type RedosResult as ac, type RedosSeverity as ad, type RegexBackreferenceInfo as ae, type RegexError as af, type RegexFlag as ag, type RegexGroupAnalysis as ah, type RegexGroupInfo as ai, type RegexGroupIssue as aj, type RegexMatch as ak, type RegexResult as al, type RegexSuccess as am, type ResolvedLinkReference as an, SQL_DEFAULT_OPTIONS as ao, type Segment as ap, type SpecVersion as aq, type SqlDialect as ar, type SqlFormatOptions as as, type SqlPlaceholder as at, type SqlPlaceholderResult as au, type SvgSpriteResult as av, type SvgSpriteSymbol as aw, type TestPatternResult as ax, type TsconfigIssue as ay, type TsconfigValidationResult as az, type ApiInfo as b, lookupMime as b0, minifyCss as b1, minifyGql as b2, minifyHtml as b3, minifyJs as b4, minifySql as b5, normalizeRef as b6, parseCommitTrailers as b7, parseConnectionString as b8, parseDockerImage as b9, parseEnv as ba, parseGitCommand as bb, parseGithubUrl as bc, parseSpec as bd, removeConsoleCalls as be, removeEmptyAttributes as bf, removeHtmlComments as bg, removeJsComments as bh, removeRedundantAttributes as bi, searchCheatsheet as bj, searchEndpoints as bk, splitStatements as bl, testGitignorePatterns as bm, testPattern as bn, testRegex as bo, validateAria as bp, validateEditorConfig as bq, validateEnvKey as br, validateFenceLanguageTags as bs, validatePackageExports as bt, validateTsconfig as bu, code as c, type AriaIssue as d, type AriaValidationResult as e, type CheatsheetEntry as f, type CommitTrailer as g, type CommitTrailerResult as h, type ConnectionStringHost as i, type ConnectionStringResult as j, type ConventionalCommitFinding as k, type ConventionalCommitFooter as l, type ConventionalCommitOptions as m, type ConventionalCommitParsed as n, type ConventionalCommitResult as o, type ConventionalCommitSeverity as p, type CssResult as q, type DependencyAuditDuplicate as r, type DependencyAuditEntry as s, type DependencyAuditIssue as t, type DependencyAuditResult as u, type DependencyRangeType as v, type DependencySection as w, type DockerImageRef as x, type EditorConfigProperty as y, type EditorConfigSection as z };
|