@utilix-tech/sdk 0.56.0 → 0.59.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 +9 -0
- package/README.md +30 -9
- package/dist/{chunk-WVEKRKGU.js → chunk-34C6GXCC.js} +34 -1
- package/dist/{chunk-TVSQ53TZ.js → chunk-3QU46YFP.js} +100 -1
- package/dist/{chunk-3TYWIX3B.js → chunk-422ICOZX.js} +16 -1
- package/dist/{chunk-56VFNHVO.js → chunk-QY2M2UHJ.js} +34 -1
- package/dist/{data-Cvyg8ZXo.d.cts → data-vxXrBlWh.d.cts} +22 -2
- package/dist/{data-Cvyg8ZXo.d.ts → data-vxXrBlWh.d.ts} +22 -2
- package/dist/{generators-Du8cBesn.d.cts → generators-DAXXrMvG.d.cts} +23 -2
- package/dist/{generators-Du8cBesn.d.ts → generators-DAXXrMvG.d.ts} +23 -2
- package/dist/index.cjs +180 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/{json-Ta9JykSB.d.ts → json-CaiYsGDQ.d.cts} +24 -2
- package/dist/{json-Ta9JykSB.d.cts → json-CaiYsGDQ.d.ts} +24 -2
- package/dist/{network-CoGf7_Op.d.ts → network-fDfM1_L6.d.cts} +45 -2
- package/dist/{network-CoGf7_Op.d.cts → network-fDfM1_L6.d.ts} +45 -2
- package/dist/tools/data.cjs +33 -0
- package/dist/tools/data.d.cts +1 -1
- package/dist/tools/data.d.ts +1 -1
- package/dist/tools/data.js +1 -1
- package/dist/tools/generators.cjs +15 -0
- package/dist/tools/generators.d.cts +1 -1
- package/dist/tools/generators.d.ts +1 -1
- package/dist/tools/generators.js +1 -1
- package/dist/tools/json.cjs +33 -0
- package/dist/tools/json.d.cts +1 -1
- package/dist/tools/json.d.ts +1 -1
- package/dist/tools/json.js +1 -1
- package/dist/tools/network.cjs +99 -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,15 @@
|
|
|
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.59.0
|
|
6
|
+
- Add `buildPreferHeader`, `parsePreferHeader` (prefer-header): build an HTTP Prefer request-header value from preferences with optional values and parameters per RFC 7240, or parse an existing one into the same shape.
|
|
7
|
+
- Add `dedupeNdjson` (ndjson-dedup): remove duplicate records from NDJSON input, either by exact structural equality or by a chosen key field, keeping the first occurrence of each duplicate.
|
|
8
|
+
- Corrects a version-field drift: package.json was left at 0.57.0 after the prior release's changes actually shipped as 0.58.0 below.
|
|
9
|
+
|
|
10
|
+
## 0.57.0
|
|
11
|
+
- Add `mergeJsonPatch`, `applyJsonMergePatch` (json-merge-patch): apply an RFC 7396 JSON Merge Patch document to a target JSON document, with null-valued patch keys removing the matching target key.
|
|
12
|
+
- Add `generateCspNonce` (csp-nonce-generator): generate a cryptographically random, base64-encoded Content-Security-Policy nonce with ready-to-paste header directive and script/style tag snippets.
|
|
13
|
+
|
|
5
14
|
## 0.56.0
|
|
6
15
|
- Add `buildAcceptLanguage`, `parseAcceptLanguage` (accept-language-parser): build an Accept-Language request-header value from locale/quality pairs sorted by descending preference, or parse an existing one into its ranked entries.
|
|
7
16
|
- Add `calculateBlendedLoanRate` (blended-loan-rate-calculator): compute the single weighted-average interest rate across a list of loan balances, plus combined monthly and annual interest accrual.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**662 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)
|
|
@@ -66,7 +66,7 @@ const { formatJson } = require("@utilix-tech/sdk/json");
|
|
|
66
66
|
|
|
67
67
|
```ts
|
|
68
68
|
import { formatJson, minifyJson, diffJson, jsonToTypescript, jsonSchemaToTypescript, validateJson,
|
|
69
|
-
evaluateJsonPath, resolveJsonPointer, jsonToCsv, yamlToJson, jsonToYaml, getJsonStats } from "@utilix-tech/sdk/json";
|
|
69
|
+
evaluateJsonPath, resolveJsonPointer, applyJsonMergePatch, jsonToCsv, yamlToJson, jsonToYaml, getJsonStats } from "@utilix-tech/sdk/json";
|
|
70
70
|
|
|
71
71
|
// Format with 2-space indent
|
|
72
72
|
formatJson('{"name":"alice","age":30}', { indent: 2 });
|
|
@@ -87,6 +87,10 @@ evaluateJsonPath(obj, "$.users[*].name");
|
|
|
87
87
|
resolveJsonPointer('{"users":[{"name":"Alice"}]}', "/users/0/name");
|
|
88
88
|
// { found: true, value: "Alice", tokens: ["users", "0", "name"] }
|
|
89
89
|
|
|
90
|
+
// Apply an RFC 7396 JSON Merge Patch
|
|
91
|
+
applyJsonMergePatch('{"a":"b","c":{"d":"e","f":"g"}}', '{"a":"z","c":{"f":null}}');
|
|
92
|
+
// { result: { a: "z", c: { d: "e" } } }
|
|
93
|
+
|
|
90
94
|
// Convert JSON to CSV
|
|
91
95
|
jsonToCsv('[{"a":1,"b":2}]');
|
|
92
96
|
|
|
@@ -206,7 +210,7 @@ import { parseCsv, csvToJson, validateYaml, resolveYamlAnchors, tomlToJson, json
|
|
|
206
210
|
validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
|
|
207
211
|
parseSubtitles, convertSubtitles, shiftSubtitles, analyzeCaptionSpeed, parseFrontMatter,
|
|
208
212
|
generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows, calculateMarkdownTaskListProgress,
|
|
209
|
-
inferCsvColumnTypes } from "@utilix-tech/sdk/data";
|
|
213
|
+
inferCsvColumnTypes, dedupeNdjson } from "@utilix-tech/sdk/data";
|
|
210
214
|
|
|
211
215
|
// CSV
|
|
212
216
|
const rows = parseCsv("name,age\nalice,30\nbob,25");
|
|
@@ -233,6 +237,10 @@ validateNdjson('{"id":1}\n{"id":2}'); // { valid: true, totalLines: 2, ...
|
|
|
233
237
|
formatNdjson('{"id":1}'); // '{\n "id": 1\n}'
|
|
234
238
|
ndjsonToJsonArray('{"id":1}\n{"id":2}'); // '[\n { "id": 1 },\n { "id": 2 }\n]'
|
|
235
239
|
|
|
240
|
+
// Remove duplicate NDJSON records, by exact match or by a key field
|
|
241
|
+
dedupeNdjson('{"id":1}\n{"id":2}\n{"id":1}');
|
|
242
|
+
// { totalLines: 3, uniqueLines: 2, duplicatesRemoved: 1, output: "{\"id\":1}\n{\"id\":2}", removedLines: [3] }
|
|
243
|
+
|
|
236
244
|
// Diff a .env file against its .env.example template
|
|
237
245
|
diffEnvExample("FOO=1\nBAR=2", "FOO=\nBAR=y\nBAZ=z");
|
|
238
246
|
// { missingInExample: [], missingInEnv: ["BAZ"], emptyValueInExample: ["FOO"], keysInBoth: 2 }
|
|
@@ -278,7 +286,7 @@ inferCsvColumnTypes("id,price,active\n1,9.99,true\n2,5,false");
|
|
|
278
286
|
|
|
279
287
|
```ts
|
|
280
288
|
import { generateUuid, generateV4, generateV7, generateUlid,
|
|
281
|
-
generatePassword, checkStrength, estimatePasswordEntropy, generateData } from "@utilix-tech/sdk/generators";
|
|
289
|
+
generatePassword, checkStrength, estimatePasswordEntropy, generateData, generateCspNonce } from "@utilix-tech/sdk/generators";
|
|
282
290
|
|
|
283
291
|
generateUuid(); // "f47ac10b-58cc-4372-a567-0e02b2c3d479" (v4)
|
|
284
292
|
generateV7(); // time-ordered UUID v7
|
|
@@ -296,6 +304,10 @@ generateData([
|
|
|
296
304
|
{ name: "email", type: "email" },
|
|
297
305
|
{ name: "age", type: "number" },
|
|
298
306
|
], 10); // 10 rows
|
|
307
|
+
|
|
308
|
+
// Cryptographically random CSP nonce, plus ready-to-paste snippets
|
|
309
|
+
generateCspNonce(16);
|
|
310
|
+
// { nonce: "...", scriptSrcDirective: "script-src 'nonce-...'", scriptTag: '<script nonce="...">' }
|
|
299
311
|
```
|
|
300
312
|
|
|
301
313
|
---
|
|
@@ -488,7 +500,8 @@ import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
|
|
|
488
500
|
buildPermissionsPolicy, parsePermissionsPolicy, buildClientHints, parseClientHintHeaders,
|
|
489
501
|
buildContentDisposition, parseContentDisposition,
|
|
490
502
|
buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk,
|
|
491
|
-
buildAcceptLanguage, parseAcceptLanguage
|
|
503
|
+
buildAcceptLanguage, parseAcceptLanguage,
|
|
504
|
+
buildPreferHeader, parsePreferHeader } from "@utilix-tech/sdk/network";
|
|
492
505
|
|
|
493
506
|
getStatusCode(404);
|
|
494
507
|
// { code: 404, text: "Not Found", description: "...", category: "Client Error" }
|
|
@@ -605,6 +618,14 @@ parseXContentTypeOptionsHeader("nosniff");
|
|
|
605
618
|
// Assess how risky it is to serve a given Content-Type without X-Content-Type-Options: nosniff
|
|
606
619
|
assessContentTypeRisk("text/plain");
|
|
607
620
|
// { contentType: "text/plain", risk: "high", reason: "..." }
|
|
621
|
+
|
|
622
|
+
// Build a Prefer request header from preferences with optional values/params, per RFC 7240
|
|
623
|
+
buildPreferHeader([{ token: "respond-async" }, { token: "wait", value: "100" }]);
|
|
624
|
+
// { header: "Prefer: respond-async, wait=100", headerValue: "respond-async, wait=100", preferences: [...] }
|
|
625
|
+
|
|
626
|
+
// Parse an existing Prefer header value into the same shape
|
|
627
|
+
parsePreferHeader("return=minimal;handling=lenient");
|
|
628
|
+
// { header: "Prefer: return=minimal;handling=lenient", headerValue: "return=minimal;handling=lenient", preferences: [...] }
|
|
608
629
|
```
|
|
609
630
|
|
|
610
631
|
---
|
|
@@ -856,15 +877,15 @@ inspectGifFrames(new Uint8Array(gifBytes));
|
|
|
856
877
|
|
|
857
878
|
| Import | What it does |
|
|
858
879
|
|---|---|
|
|
859
|
-
| `@utilix-tech/sdk/json` | Format, minify, diff, validate, JSONPath, CSV↔JSON, YAML↔JSON, TS types from data or from a JSON Schema |
|
|
880
|
+
| `@utilix-tech/sdk/json` | Format, minify, diff, validate, JSONPath, JSON Pointer, RFC 7396 merge patch, CSV↔JSON, YAML↔JSON, TS types from data or from a JSON Schema |
|
|
860
881
|
| `@utilix-tech/sdk/encoding` | Base64, URL, HTML entities, Base32/Base58/Base62 encode/decode |
|
|
861
882
|
| `@utilix-tech/sdk/hashing` | MD5, SHA-1/256/512, bcrypt, HMAC, .htpasswd, SRI hashes, content-hash ETag generation |
|
|
862
883
|
| `@utilix-tech/sdk/text` | Case convert, slugify, word count, lorem ipsum, line ops, HTML→Markdown, Levenshtein/Damerau string distance, readability scoring, sentence length distribution, emoji lookup |
|
|
863
|
-
| `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer |
|
|
864
|
-
| `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data |
|
|
884
|
+
| `@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 |
|
|
885
|
+
| `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
|
|
865
886
|
| `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
|
|
866
887
|
| `@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 |
|
|
867
|
-
| `@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 |
|
|
888
|
+
| `@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) |
|
|
868
889
|
| `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header |
|
|
869
890
|
| `@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 |
|
|
870
891
|
| `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
|
|
@@ -4,6 +4,7 @@ import * as yaml from 'js-yaml';
|
|
|
4
4
|
// src/tools/json.ts
|
|
5
5
|
var json_exports = {};
|
|
6
6
|
__export(json_exports, {
|
|
7
|
+
applyJsonMergePatch: () => applyJsonMergePatch,
|
|
7
8
|
csvToJson: () => csvToJson,
|
|
8
9
|
detectFormat: () => detectFormat,
|
|
9
10
|
diffJson: () => diffJson,
|
|
@@ -22,6 +23,7 @@ __export(json_exports, {
|
|
|
22
23
|
jsonToTypescript: () => jsonToTypescript,
|
|
23
24
|
jsonToYaml: () => jsonToYaml,
|
|
24
25
|
jsonToZod: () => jsonToZod,
|
|
26
|
+
mergeJsonPatch: () => mergeJsonPatch,
|
|
25
27
|
minifyJson: () => minifyJson,
|
|
26
28
|
parseJson: () => parseJson,
|
|
27
29
|
parseStructs: () => parseStructs,
|
|
@@ -1402,5 +1404,36 @@ function jsonSchemaToTypescript(schemaJson, options) {
|
|
|
1402
1404
|
}
|
|
1403
1405
|
return parts.join("\n\n");
|
|
1404
1406
|
}
|
|
1407
|
+
function _isMergePatchObject(value) {
|
|
1408
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1409
|
+
}
|
|
1410
|
+
function mergeJsonPatch(target, patch) {
|
|
1411
|
+
if (!_isMergePatchObject(patch)) return patch;
|
|
1412
|
+
const result = _isMergePatchObject(target) ? { ...target } : {};
|
|
1413
|
+
for (const key of Object.keys(patch)) {
|
|
1414
|
+
const value = patch[key];
|
|
1415
|
+
if (value === null) {
|
|
1416
|
+
delete result[key];
|
|
1417
|
+
} else {
|
|
1418
|
+
result[key] = mergeJsonPatch(result[key], value);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
return result;
|
|
1422
|
+
}
|
|
1423
|
+
function applyJsonMergePatch(targetJson, patchJson) {
|
|
1424
|
+
let target;
|
|
1425
|
+
try {
|
|
1426
|
+
target = JSON.parse(targetJson);
|
|
1427
|
+
} catch {
|
|
1428
|
+
return { error: "Target is not valid JSON" };
|
|
1429
|
+
}
|
|
1430
|
+
let patch;
|
|
1431
|
+
try {
|
|
1432
|
+
patch = JSON.parse(patchJson);
|
|
1433
|
+
} catch {
|
|
1434
|
+
return { error: "Patch is not valid JSON" };
|
|
1435
|
+
}
|
|
1436
|
+
return { result: mergeJsonPatch(target, patch) };
|
|
1437
|
+
}
|
|
1405
1438
|
|
|
1406
|
-
export { csvToJson, detectFormat, diffJson, evaluateJsonPath, formatDiffLine, formatJson, generateExample, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, json_exports, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateJson, validateJsonPath, validateJsonString, yamlToJson };
|
|
1439
|
+
export { applyJsonMergePatch, csvToJson, detectFormat, diffJson, evaluateJsonPath, formatDiffLine, formatJson, generateExample, getJsonStats, inferGoType, inferPythonType, inferType, jsonSchemaToTypescript, jsonToCsv, jsonToGo, jsonToPython, jsonToTypescript, jsonToYaml, jsonToZod, json_exports, mergeJsonPatch, minifyJson, parseJson, parseStructs, resolveJsonPointer, toPascalCase, toSnakeCase, validateJson, validateJsonPath, validateJsonString, yamlToJson };
|
|
@@ -22,6 +22,7 @@ __export(network_exports, {
|
|
|
22
22
|
buildLinkHeader: () => buildLinkHeader,
|
|
23
23
|
buildMapUrl: () => buildMapUrl,
|
|
24
24
|
buildPermissionsPolicy: () => buildPermissionsPolicy,
|
|
25
|
+
buildPreferHeader: () => buildPreferHeader,
|
|
25
26
|
buildRangeHeader: () => buildRangeHeader,
|
|
26
27
|
buildReferrerPolicy: () => buildReferrerPolicy,
|
|
27
28
|
buildVaryHeader: () => buildVaryHeader,
|
|
@@ -50,6 +51,7 @@ __export(network_exports, {
|
|
|
50
51
|
parseHar: () => parseHar,
|
|
51
52
|
parseIpv6Address: () => parseIpv6Address,
|
|
52
53
|
parsePermissionsPolicy: () => parsePermissionsPolicy,
|
|
54
|
+
parsePreferHeader: () => parsePreferHeader,
|
|
53
55
|
parseUserAgent: () => parseUserAgent,
|
|
54
56
|
parseVaryHeader: () => parseVaryHeader,
|
|
55
57
|
parseXContentTypeOptionsHeader: () => parseXContentTypeOptionsHeader,
|
|
@@ -2886,5 +2888,102 @@ function parseAcceptLanguage(raw) {
|
|
|
2886
2888
|
const headerValue = formatAcceptLanguageEntries(sorted);
|
|
2887
2889
|
return { header: `Accept-Language: ${headerValue}`, headerValue, entries: sorted };
|
|
2888
2890
|
}
|
|
2891
|
+
var PREFER_TOKEN_RE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
2892
|
+
function isPreferToken(s) {
|
|
2893
|
+
return PREFER_TOKEN_RE.test(s);
|
|
2894
|
+
}
|
|
2895
|
+
function splitPreferTopLevel(input, delim) {
|
|
2896
|
+
const parts = [];
|
|
2897
|
+
let current = "";
|
|
2898
|
+
let inQuotes = false;
|
|
2899
|
+
for (const ch of input) {
|
|
2900
|
+
if (ch === '"') inQuotes = !inQuotes;
|
|
2901
|
+
if (ch === delim && !inQuotes) {
|
|
2902
|
+
parts.push(current);
|
|
2903
|
+
current = "";
|
|
2904
|
+
} else {
|
|
2905
|
+
current += ch;
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
parts.push(current);
|
|
2909
|
+
return parts;
|
|
2910
|
+
}
|
|
2911
|
+
function parsePreferTokenValue(part) {
|
|
2912
|
+
const trimmed = part.trim();
|
|
2913
|
+
if (!trimmed) return null;
|
|
2914
|
+
const eq = trimmed.indexOf("=");
|
|
2915
|
+
if (eq === -1) return { token: trimmed };
|
|
2916
|
+
const token = trimmed.slice(0, eq).trim();
|
|
2917
|
+
let value = trimmed.slice(eq + 1).trim();
|
|
2918
|
+
if (value.length >= 2 && value.startsWith('"') && value.endsWith('"')) {
|
|
2919
|
+
value = value.slice(1, -1);
|
|
2920
|
+
}
|
|
2921
|
+
return { token, value };
|
|
2922
|
+
}
|
|
2923
|
+
function formatPreferWord(value) {
|
|
2924
|
+
return isPreferToken(value) ? value : `"${value.replace(/"/g, '\\"')}"`;
|
|
2925
|
+
}
|
|
2926
|
+
function formatPreferPreferences(preferences) {
|
|
2927
|
+
return preferences.map((p) => {
|
|
2928
|
+
let s = p.token;
|
|
2929
|
+
if (p.value !== void 0) s += `=${formatPreferWord(p.value)}`;
|
|
2930
|
+
for (const param of p.params ?? []) {
|
|
2931
|
+
s += `;${param.name}`;
|
|
2932
|
+
if (param.value !== void 0) s += `=${formatPreferWord(param.value)}`;
|
|
2933
|
+
}
|
|
2934
|
+
return s;
|
|
2935
|
+
}).join(", ");
|
|
2936
|
+
}
|
|
2937
|
+
function buildPreferHeader(preferences) {
|
|
2938
|
+
if (!Array.isArray(preferences) || preferences.length === 0) {
|
|
2939
|
+
return { error: "At least one preference is required" };
|
|
2940
|
+
}
|
|
2941
|
+
const built = [];
|
|
2942
|
+
for (let i = 0; i < preferences.length; i++) {
|
|
2943
|
+
const { token, value, params } = preferences[i];
|
|
2944
|
+
if (typeof token !== "string" || !isPreferToken(token.trim())) {
|
|
2945
|
+
return { error: `preference ${i + 1}: token is required and must be a valid HTTP token` };
|
|
2946
|
+
}
|
|
2947
|
+
const cleanParams = [];
|
|
2948
|
+
if (params !== void 0) {
|
|
2949
|
+
if (!Array.isArray(params)) return { error: `preference ${i + 1}: params must be an array` };
|
|
2950
|
+
for (const param of params) {
|
|
2951
|
+
if (typeof param?.name !== "string" || !isPreferToken(param.name.trim())) {
|
|
2952
|
+
return { error: `preference ${i + 1}: parameter name is required and must be a valid HTTP token` };
|
|
2953
|
+
}
|
|
2954
|
+
cleanParams.push({ name: param.name.trim(), value: param.value !== void 0 ? String(param.value) : void 0 });
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
built.push({
|
|
2958
|
+
token: token.trim(),
|
|
2959
|
+
value: value !== void 0 ? String(value) : void 0,
|
|
2960
|
+
params: cleanParams.length > 0 ? cleanParams : void 0
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
const headerValue = formatPreferPreferences(built);
|
|
2964
|
+
return { header: `Prefer: ${headerValue}`, headerValue, preferences: built };
|
|
2965
|
+
}
|
|
2966
|
+
function parsePreferHeader(raw) {
|
|
2967
|
+
if (!raw || raw.trim() === "") return { error: "Input is empty" };
|
|
2968
|
+
const withoutLabel = raw.trim().replace(/^prefer:\s*/i, "");
|
|
2969
|
+
const parts = splitPreferTopLevel(withoutLabel, ",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
2970
|
+
if (parts.length === 0) return { error: "Input is empty" };
|
|
2971
|
+
const preferences = [];
|
|
2972
|
+
for (const part of parts) {
|
|
2973
|
+
const segments = splitPreferTopLevel(part, ";").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
2974
|
+
if (segments.length === 0) return { error: `Invalid preference: "${part}"` };
|
|
2975
|
+
const main = parsePreferTokenValue(segments[0]);
|
|
2976
|
+
if (!main || !isPreferToken(main.token)) return { error: `Invalid preference token in "${part}"` };
|
|
2977
|
+
const params = [];
|
|
2978
|
+
for (const seg of segments.slice(1)) {
|
|
2979
|
+
const p = parsePreferTokenValue(seg);
|
|
2980
|
+
if (!p || !isPreferToken(p.token)) return { error: `Invalid parameter in "${part}"` };
|
|
2981
|
+
params.push({ name: p.token, value: p.value });
|
|
2982
|
+
}
|
|
2983
|
+
preferences.push({ token: main.token, value: main.value, params: params.length > 0 ? params : void 0 });
|
|
2984
|
+
}
|
|
2985
|
+
const headerValue = formatPreferPreferences(preferences);
|
|
2986
|
+
return { header: `Prefer: ${headerValue}`, headerValue, preferences };
|
|
2987
|
+
}
|
|
2889
2988
|
|
|
2890
|
-
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, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
2989
|
+
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, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parsePreferHeader, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
|
|
@@ -16,6 +16,7 @@ __export(generators_exports, {
|
|
|
16
16
|
generateBulk: () => generateBulk,
|
|
17
17
|
generateBulkPasswords: () => generateBulkPasswords,
|
|
18
18
|
generateBulkUlids: () => generateBulkUlids,
|
|
19
|
+
generateCspNonce: () => generateCspNonce,
|
|
19
20
|
generateData: () => generateData,
|
|
20
21
|
generatePassword: () => generatePassword,
|
|
21
22
|
generateQrDataUrl: () => generateQrDataUrl,
|
|
@@ -622,5 +623,19 @@ async function generateQrDataUrl(text, options) {
|
|
|
622
623
|
}
|
|
623
624
|
});
|
|
624
625
|
}
|
|
626
|
+
function generateCspNonce(byteLength = 16) {
|
|
627
|
+
if (!Number.isInteger(byteLength) || byteLength < 8 || byteLength > 64) {
|
|
628
|
+
return { error: "Byte length must be a whole number between 8 and 64" };
|
|
629
|
+
}
|
|
630
|
+
const nonce = randomBytes(byteLength).toString("base64");
|
|
631
|
+
return {
|
|
632
|
+
nonce,
|
|
633
|
+
byteLength,
|
|
634
|
+
scriptSrcDirective: `script-src 'nonce-${nonce}'`,
|
|
635
|
+
styleSrcDirective: `style-src 'nonce-${nonce}'`,
|
|
636
|
+
scriptTag: `<script nonce="${nonce}">`,
|
|
637
|
+
styleTag: `<style nonce="${nonce}">`
|
|
638
|
+
};
|
|
639
|
+
}
|
|
625
640
|
|
|
626
|
-
export { AMBIGUOUS_CHARS, DATA_TYPES, DEFAULT_OPTIONS, DEFAULT_QR_OPTIONS, SYMBOL_CHARS, ULID_REGEX, checkStrength, estimatePasswordEntropy, generateBulk, generateBulkPasswords, generateBulkUlids, generateData, generatePassword, generateQrDataUrl, generateQrSvg, generateSingle, generateUlid, generateUuid, generateV4, generateV7, generators_exports, isValidUlid, isValidUuid, parseUlid, parseUuidVersion };
|
|
641
|
+
export { AMBIGUOUS_CHARS, DATA_TYPES, DEFAULT_OPTIONS, DEFAULT_QR_OPTIONS, SYMBOL_CHARS, ULID_REGEX, checkStrength, estimatePasswordEntropy, generateBulk, generateBulkPasswords, generateBulkUlids, generateCspNonce, generateData, generatePassword, generateQrDataUrl, generateQrSvg, generateSingle, generateUlid, generateUuid, generateV4, generateV7, generators_exports, isValidUlid, isValidUuid, parseUlid, parseUuidVersion };
|
|
@@ -10,6 +10,7 @@ __export(data_exports, {
|
|
|
10
10
|
convertSubtitles: () => convertSubtitles,
|
|
11
11
|
csvToJson: () => csvToJson,
|
|
12
12
|
csvToSqlInsert: () => csvToSqlInsert,
|
|
13
|
+
dedupeNdjson: () => dedupeNdjson,
|
|
13
14
|
detectDelimiter: () => detectDelimiter,
|
|
14
15
|
detectSubtitleFormat: () => detectSubtitleFormat,
|
|
15
16
|
diffEnvExample: () => diffEnvExample,
|
|
@@ -1172,6 +1173,38 @@ function jsonArrayToNdjson(input) {
|
|
|
1172
1173
|
if (!Array.isArray(parsed)) return { error: "Input must be a JSON array" };
|
|
1173
1174
|
return parsed.map((item) => JSON.stringify(item)).join("\n");
|
|
1174
1175
|
}
|
|
1176
|
+
function dedupeNdjson(input, keyField) {
|
|
1177
|
+
const validated = validateNdjson(input);
|
|
1178
|
+
if (!validated.valid) return { error: _firstNdjsonError(validated) };
|
|
1179
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1180
|
+
const keptRaw = [];
|
|
1181
|
+
const removedLines = [];
|
|
1182
|
+
for (const l of validated.lines) {
|
|
1183
|
+
const parsed = JSON.parse(l.raw);
|
|
1184
|
+
let key;
|
|
1185
|
+
if (keyField) {
|
|
1186
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed) || !(keyField in parsed)) {
|
|
1187
|
+
return { error: `Line ${l.line}: missing key field "${keyField}"` };
|
|
1188
|
+
}
|
|
1189
|
+
key = JSON.stringify(parsed[keyField]);
|
|
1190
|
+
} else {
|
|
1191
|
+
key = JSON.stringify(parsed);
|
|
1192
|
+
}
|
|
1193
|
+
if (seen.has(key)) {
|
|
1194
|
+
removedLines.push(l.line);
|
|
1195
|
+
} else {
|
|
1196
|
+
seen.add(key);
|
|
1197
|
+
keptRaw.push(l.raw.trim());
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return {
|
|
1201
|
+
totalLines: validated.totalLines,
|
|
1202
|
+
uniqueLines: keptRaw.length,
|
|
1203
|
+
duplicatesRemoved: removedLines.length,
|
|
1204
|
+
output: keptRaw.join("\n"),
|
|
1205
|
+
removedLines
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1175
1208
|
var _SUBTITLE_TIMESTAMP_RE = /(\d+):(\d{1,2}):(\d{1,2})[.,](\d{1,3})|(\d{1,3}):(\d{1,2})[.,](\d{1,3})/;
|
|
1176
1209
|
var _VTT_BLOCK_KEYWORDS = ["NOTE", "STYLE", "REGION"];
|
|
1177
1210
|
function parseSubtitleTimestamp(raw) {
|
|
@@ -1775,4 +1808,4 @@ function calculateMarkdownTaskListProgress(markdown) {
|
|
|
1775
1808
|
return { totalItems, completedItems, percentComplete, sections, items };
|
|
1776
1809
|
}
|
|
1777
1810
|
|
|
1778
|
-
export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
1811
|
+
export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, dedupeNdjson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - env-parser : parseEnv, envToJson, envToExport, validateEnvKey
|
|
13
13
|
* - env-diff-checker: diffEnvExample
|
|
14
14
|
* - ndjson-formatter: validateNdjson, minifyNdjson, formatNdjson, ndjsonToJsonArray, jsonArrayToNdjson
|
|
15
|
+
* - ndjson-dedup: dedupeNdjson
|
|
15
16
|
* - subtitle-converter: parseSubtitleTimestamp, formatSubtitleTimestamp, detectSubtitleFormat, parseSubtitles, serializeSubtitles, convertSubtitles, shiftSubtitles
|
|
16
17
|
* - markdown-front-matter-parser: parseFrontMatter
|
|
17
18
|
* - markdown-toc-generator: generateMarkdownToc
|
|
@@ -216,6 +217,23 @@ declare function ndjsonToJsonArray(input: string): string | {
|
|
|
216
217
|
declare function jsonArrayToNdjson(input: string): string | {
|
|
217
218
|
error: string;
|
|
218
219
|
};
|
|
220
|
+
interface NdjsonDedupeResult {
|
|
221
|
+
totalLines: number;
|
|
222
|
+
uniqueLines: number;
|
|
223
|
+
duplicatesRemoved: number;
|
|
224
|
+
output: string;
|
|
225
|
+
removedLines: number[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Remove duplicate records from NDJSON input. With no `keyField`, two lines
|
|
229
|
+
* are duplicates when their parsed JSON values are structurally identical
|
|
230
|
+
* (compared via a canonical JSON.stringify, so key order matters). With a
|
|
231
|
+
* `keyField`, two lines are duplicates when that field's value matches; the
|
|
232
|
+
* first occurrence of each key is kept, later ones are dropped.
|
|
233
|
+
*/
|
|
234
|
+
declare function dedupeNdjson(input: string, keyField?: string): NdjsonDedupeResult | {
|
|
235
|
+
error: string;
|
|
236
|
+
};
|
|
219
237
|
type SubtitleFormat = "srt" | "vtt";
|
|
220
238
|
interface SubtitleCue {
|
|
221
239
|
index: number;
|
|
@@ -513,6 +531,7 @@ type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
|
513
531
|
type data_MarkdownTocEntry = MarkdownTocEntry;
|
|
514
532
|
type data_MarkdownTocOptions = MarkdownTocOptions;
|
|
515
533
|
type data_MarkdownTocResult = MarkdownTocResult;
|
|
534
|
+
type data_NdjsonDedupeResult = NdjsonDedupeResult;
|
|
516
535
|
type data_NdjsonLineResult = NdjsonLineResult;
|
|
517
536
|
type data_NdjsonValidateResult = NdjsonValidateResult;
|
|
518
537
|
type data_ParseOptions = ParseOptions;
|
|
@@ -532,6 +551,7 @@ declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTa
|
|
|
532
551
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
533
552
|
declare const data_csvToJson: typeof csvToJson;
|
|
534
553
|
declare const data_csvToSqlInsert: typeof csvToSqlInsert;
|
|
554
|
+
declare const data_dedupeNdjson: typeof dedupeNdjson;
|
|
535
555
|
declare const data_detectDelimiter: typeof detectDelimiter;
|
|
536
556
|
declare const data_detectSubtitleFormat: typeof detectSubtitleFormat;
|
|
537
557
|
declare const data_diffEnvExample: typeof diffEnvExample;
|
|
@@ -579,7 +599,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
579
599
|
declare const data_validateYaml: typeof validateYaml;
|
|
580
600
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
581
601
|
declare namespace data {
|
|
582
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
602
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
583
603
|
}
|
|
584
604
|
|
|
585
|
-
export {
|
|
605
|
+
export { findCsvDuplicateRows as $, type SubtitleFormat as A, type XmlToJsonOptions as B, type CaptionSpeedCue as C, type YamlAnchorResolveError as D, type EnvDiffError as E, type FrontMatterError as F, type YamlAnchorResolveResult as G, analyzeCaptionSpeed as H, type IniSection as I, calculateMarkdownTaskListProgress as J, convertSubtitles as K, csvToJson as L, type MarkdownTaskListItem as M, type NdjsonDedupeResult as N, csvToSqlInsert as O, type ParseOptions as P, dedupeNdjson as Q, detectDelimiter as R, type SubtitleCue as S, type TomlFormatResult as T, detectSubtitleFormat as U, type ValidationResult as V, diffEnvExample as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, envToExport as Z, envToJson as _, type CaptionSpeedResult as a, formatNdjson as a0, formatSubtitleTimestamp as a1, formatToml as a2, formatXml as a3, generateMarkdownToc as a4, getSection as a5, getSectionNames as a6, getTomlStats as a7, getXmlStats as a8, getYamlStats as a9, validateToml as aA, validateXml as aB, validateYaml as aC, xmlToJson as aD, inferCsvColumnTypes as aa, iniToJson as ab, jsonArrayToNdjson as ac, jsonToIni as ad, jsonToToml as ae, jsonToXml as af, minifyNdjson as ag, minifyToml as ah, minifyXml as ai, ndjsonToJsonArray as aj, parseCsv as ak, parseEnv as al, parseFrontMatter as am, parseIni as an, parseSubtitleTimestamp as ao, parseSubtitles as ap, parseXmlToObject as aq, resolveYamlAnchors as ar, serializeSubtitles as as, shiftSubtitles as at, stringifyIni as au, toCsvString as av, tomlToJson as aw, validateEnvKey as ax, validateIni as ay, validateNdjson as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTaskListProgressResult as r, type MarkdownTaskListSectionSummary as s, type MarkdownTocEntry as t, type MarkdownTocOptions as u, type MarkdownTocResult as v, type NdjsonLineResult as w, type NdjsonValidateResult as x, type ParsedIni as y, type ParsedSubtitles as z };
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - env-parser : parseEnv, envToJson, envToExport, validateEnvKey
|
|
13
13
|
* - env-diff-checker: diffEnvExample
|
|
14
14
|
* - ndjson-formatter: validateNdjson, minifyNdjson, formatNdjson, ndjsonToJsonArray, jsonArrayToNdjson
|
|
15
|
+
* - ndjson-dedup: dedupeNdjson
|
|
15
16
|
* - subtitle-converter: parseSubtitleTimestamp, formatSubtitleTimestamp, detectSubtitleFormat, parseSubtitles, serializeSubtitles, convertSubtitles, shiftSubtitles
|
|
16
17
|
* - markdown-front-matter-parser: parseFrontMatter
|
|
17
18
|
* - markdown-toc-generator: generateMarkdownToc
|
|
@@ -216,6 +217,23 @@ declare function ndjsonToJsonArray(input: string): string | {
|
|
|
216
217
|
declare function jsonArrayToNdjson(input: string): string | {
|
|
217
218
|
error: string;
|
|
218
219
|
};
|
|
220
|
+
interface NdjsonDedupeResult {
|
|
221
|
+
totalLines: number;
|
|
222
|
+
uniqueLines: number;
|
|
223
|
+
duplicatesRemoved: number;
|
|
224
|
+
output: string;
|
|
225
|
+
removedLines: number[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Remove duplicate records from NDJSON input. With no `keyField`, two lines
|
|
229
|
+
* are duplicates when their parsed JSON values are structurally identical
|
|
230
|
+
* (compared via a canonical JSON.stringify, so key order matters). With a
|
|
231
|
+
* `keyField`, two lines are duplicates when that field's value matches; the
|
|
232
|
+
* first occurrence of each key is kept, later ones are dropped.
|
|
233
|
+
*/
|
|
234
|
+
declare function dedupeNdjson(input: string, keyField?: string): NdjsonDedupeResult | {
|
|
235
|
+
error: string;
|
|
236
|
+
};
|
|
219
237
|
type SubtitleFormat = "srt" | "vtt";
|
|
220
238
|
interface SubtitleCue {
|
|
221
239
|
index: number;
|
|
@@ -513,6 +531,7 @@ type data_MarkdownTaskListSectionSummary = MarkdownTaskListSectionSummary;
|
|
|
513
531
|
type data_MarkdownTocEntry = MarkdownTocEntry;
|
|
514
532
|
type data_MarkdownTocOptions = MarkdownTocOptions;
|
|
515
533
|
type data_MarkdownTocResult = MarkdownTocResult;
|
|
534
|
+
type data_NdjsonDedupeResult = NdjsonDedupeResult;
|
|
516
535
|
type data_NdjsonLineResult = NdjsonLineResult;
|
|
517
536
|
type data_NdjsonValidateResult = NdjsonValidateResult;
|
|
518
537
|
type data_ParseOptions = ParseOptions;
|
|
@@ -532,6 +551,7 @@ declare const data_calculateMarkdownTaskListProgress: typeof calculateMarkdownTa
|
|
|
532
551
|
declare const data_convertSubtitles: typeof convertSubtitles;
|
|
533
552
|
declare const data_csvToJson: typeof csvToJson;
|
|
534
553
|
declare const data_csvToSqlInsert: typeof csvToSqlInsert;
|
|
554
|
+
declare const data_dedupeNdjson: typeof dedupeNdjson;
|
|
535
555
|
declare const data_detectDelimiter: typeof detectDelimiter;
|
|
536
556
|
declare const data_detectSubtitleFormat: typeof detectSubtitleFormat;
|
|
537
557
|
declare const data_diffEnvExample: typeof diffEnvExample;
|
|
@@ -579,7 +599,7 @@ declare const data_validateXml: typeof validateXml;
|
|
|
579
599
|
declare const data_validateYaml: typeof validateYaml;
|
|
580
600
|
declare const data_xmlToJson: typeof xmlToJson;
|
|
581
601
|
declare namespace data {
|
|
582
|
-
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
602
|
+
export { type data_CaptionSpeedCue as CaptionSpeedCue, type data_CaptionSpeedResult as CaptionSpeedResult, type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvColumnType as CsvColumnType, type data_CsvColumnTypeInfo as CsvColumnTypeInfo, type data_CsvColumnTypeOptions as CsvColumnTypeOptions, type data_CsvColumnTypeResult as CsvColumnTypeResult, type data_CsvDuplicateGroup as CsvDuplicateGroup, type data_CsvDuplicateOptions as CsvDuplicateOptions, type data_CsvDuplicateResult as CsvDuplicateResult, type data_CsvParseResult as CsvParseResult, type data_CsvToSqlOptions as CsvToSqlOptions, type data_CsvToSqlResult as CsvToSqlResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTaskListItem as MarkdownTaskListItem, type data_MarkdownTaskListProgressResult as MarkdownTaskListProgressResult, type data_MarkdownTaskListSectionSummary as MarkdownTaskListSectionSummary, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonDedupeResult as NdjsonDedupeResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, type data_YamlAnchorInfo as YamlAnchorInfo, type data_YamlAnchorResolveError as YamlAnchorResolveError, type data_YamlAnchorResolveResult as YamlAnchorResolveResult, data_analyzeCaptionSpeed as analyzeCaptionSpeed, data_calculateMarkdownTaskListProgress as calculateMarkdownTaskListProgress, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_csvToSqlInsert as csvToSqlInsert, data_dedupeNdjson as dedupeNdjson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_findCsvDuplicateRows as findCsvDuplicateRows, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_inferCsvColumnTypes as inferCsvColumnTypes, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_resolveYamlAnchors as resolveYamlAnchors, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
|
|
583
603
|
}
|
|
584
604
|
|
|
585
|
-
export {
|
|
605
|
+
export { findCsvDuplicateRows as $, type SubtitleFormat as A, type XmlToJsonOptions as B, type CaptionSpeedCue as C, type YamlAnchorResolveError as D, type EnvDiffError as E, type FrontMatterError as F, type YamlAnchorResolveResult as G, analyzeCaptionSpeed as H, type IniSection as I, calculateMarkdownTaskListProgress as J, convertSubtitles as K, csvToJson as L, type MarkdownTaskListItem as M, type NdjsonDedupeResult as N, csvToSqlInsert as O, type ParseOptions as P, dedupeNdjson as Q, detectDelimiter as R, type SubtitleCue as S, type TomlFormatResult as T, detectSubtitleFormat as U, type ValidationResult as V, diffEnvExample as W, type XmlFormatResult as X, type YamlAnchorInfo as Y, envToExport as Z, envToJson as _, type CaptionSpeedResult as a, formatNdjson as a0, formatSubtitleTimestamp as a1, formatToml as a2, formatXml as a3, generateMarkdownToc as a4, getSection as a5, getSectionNames as a6, getTomlStats as a7, getXmlStats as a8, getYamlStats as a9, validateToml as aA, validateXml as aB, validateYaml as aC, xmlToJson as aD, inferCsvColumnTypes as aa, iniToJson as ab, jsonArrayToNdjson as ac, jsonToIni as ad, jsonToToml as ae, jsonToXml as af, minifyNdjson as ag, minifyToml as ah, minifyXml as ai, ndjsonToJsonArray as aj, parseCsv as ak, parseEnv as al, parseFrontMatter as am, parseIni as an, parseSubtitleTimestamp as ao, parseSubtitles as ap, parseXmlToObject as aq, resolveYamlAnchors as ar, serializeSubtitles as as, shiftSubtitles as at, stringifyIni as au, toCsvString as av, tomlToJson as aw, validateEnvKey as ax, validateIni as ay, validateNdjson as az, type ConvertedSubtitles as b, type CsvColumnType as c, data as d, type CsvColumnTypeInfo as e, type CsvColumnTypeOptions as f, type CsvColumnTypeResult as g, type CsvDuplicateGroup as h, type CsvDuplicateOptions as i, type CsvDuplicateResult as j, type CsvParseResult as k, type CsvToSqlOptions as l, type CsvToSqlResult as m, type EnvDiffResult as n, type EnvEntry as o, type EnvParseResult as p, type FrontMatterResult as q, type MarkdownTaskListProgressResult as r, type MarkdownTaskListSectionSummary as s, type MarkdownTocEntry as t, type MarkdownTocOptions as u, type MarkdownTocResult as v, type NdjsonLineResult as w, type NdjsonValidateResult as x, type ParsedIni as y, type ParsedSubtitles as z };
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* - password-entropy-estimator : estimatePasswordEntropy
|
|
11
11
|
* - random-data : generateSingle, generateData
|
|
12
12
|
* - qr-code : generateQrSvg, generateQrDataUrl
|
|
13
|
+
* - csp-nonce-generator : generateCspNonce
|
|
13
14
|
*/
|
|
14
15
|
type UuidVersion = 'v4' | 'v7';
|
|
15
16
|
interface GeneratedUuid {
|
|
@@ -117,8 +118,27 @@ interface QrOptions {
|
|
|
117
118
|
declare const DEFAULT_QR_OPTIONS: QrOptions;
|
|
118
119
|
declare function generateQrSvg(text: string, options?: QrOptions): Promise<string>;
|
|
119
120
|
declare function generateQrDataUrl(text: string, options?: QrOptions): Promise<string>;
|
|
121
|
+
interface CspNonceResult {
|
|
122
|
+
nonce: string;
|
|
123
|
+
byteLength: number;
|
|
124
|
+
scriptSrcDirective: string;
|
|
125
|
+
styleSrcDirective: string;
|
|
126
|
+
scriptTag: string;
|
|
127
|
+
styleTag: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Generate a cryptographically random, base64-encoded nonce for a
|
|
131
|
+
* Content-Security-Policy script-src/style-src directive, along with
|
|
132
|
+
* ready-to-paste header directive and <script>/<style nonce="..."> tag
|
|
133
|
+
* snippets. Generates a fresh value on every call; the same value must be
|
|
134
|
+
* reused for both the header and the markup within a single request.
|
|
135
|
+
*/
|
|
136
|
+
declare function generateCspNonce(byteLength?: number): CspNonceResult | {
|
|
137
|
+
error: string;
|
|
138
|
+
};
|
|
120
139
|
|
|
121
140
|
declare const generators_AMBIGUOUS_CHARS: typeof AMBIGUOUS_CHARS;
|
|
141
|
+
type generators_CspNonceResult = CspNonceResult;
|
|
122
142
|
declare const generators_DATA_TYPES: typeof DATA_TYPES;
|
|
123
143
|
declare const generators_DEFAULT_OPTIONS: typeof DEFAULT_OPTIONS;
|
|
124
144
|
declare const generators_DEFAULT_QR_OPTIONS: typeof DEFAULT_QR_OPTIONS;
|
|
@@ -141,6 +161,7 @@ declare const generators_estimatePasswordEntropy: typeof estimatePasswordEntropy
|
|
|
141
161
|
declare const generators_generateBulk: typeof generateBulk;
|
|
142
162
|
declare const generators_generateBulkPasswords: typeof generateBulkPasswords;
|
|
143
163
|
declare const generators_generateBulkUlids: typeof generateBulkUlids;
|
|
164
|
+
declare const generators_generateCspNonce: typeof generateCspNonce;
|
|
144
165
|
declare const generators_generateData: typeof generateData;
|
|
145
166
|
declare const generators_generatePassword: typeof generatePassword;
|
|
146
167
|
declare const generators_generateQrDataUrl: typeof generateQrDataUrl;
|
|
@@ -155,7 +176,7 @@ declare const generators_isValidUuid: typeof isValidUuid;
|
|
|
155
176
|
declare const generators_parseUlid: typeof parseUlid;
|
|
156
177
|
declare const generators_parseUuidVersion: typeof parseUuidVersion;
|
|
157
178
|
declare namespace generators {
|
|
158
|
-
export { generators_AMBIGUOUS_CHARS as AMBIGUOUS_CHARS, generators_DATA_TYPES as DATA_TYPES, generators_DEFAULT_OPTIONS as DEFAULT_OPTIONS, generators_DEFAULT_QR_OPTIONS as DEFAULT_QR_OPTIONS, type generators_DataType as DataType, type generators_GeneratedUuid as GeneratedUuid, type generators_PasswordCharsetInfo as PasswordCharsetInfo, type generators_PasswordCrackTimeEstimate as PasswordCrackTimeEstimate, type generators_PasswordEntropyResult as PasswordEntropyResult, type generators_PasswordEntropyStrength as PasswordEntropyStrength, type generators_PasswordOptions as PasswordOptions, type generators_QrErrorLevel as QrErrorLevel, type generators_QrOptions as QrOptions, type generators_QrOutputFormat as QrOutputFormat, type generators_RandomConfig as RandomConfig, generators_SYMBOL_CHARS as SYMBOL_CHARS, generators_ULID_REGEX as ULID_REGEX, type generators_UuidVersion as UuidVersion, generators_checkStrength as checkStrength, generators_estimatePasswordEntropy as estimatePasswordEntropy, generators_generateBulk as generateBulk, generators_generateBulkPasswords as generateBulkPasswords, generators_generateBulkUlids as generateBulkUlids, generators_generateData as generateData, generators_generatePassword as generatePassword, generators_generateQrDataUrl as generateQrDataUrl, generators_generateQrSvg as generateQrSvg, generators_generateSingle as generateSingle, generators_generateUlid as generateUlid, generators_generateUuid as generateUuid, generators_generateV4 as generateV4, generators_generateV7 as generateV7, generators_isValidUlid as isValidUlid, generators_isValidUuid as isValidUuid, generators_parseUlid as parseUlid, generators_parseUuidVersion as parseUuidVersion };
|
|
179
|
+
export { generators_AMBIGUOUS_CHARS as AMBIGUOUS_CHARS, type generators_CspNonceResult as CspNonceResult, generators_DATA_TYPES as DATA_TYPES, generators_DEFAULT_OPTIONS as DEFAULT_OPTIONS, generators_DEFAULT_QR_OPTIONS as DEFAULT_QR_OPTIONS, type generators_DataType as DataType, type generators_GeneratedUuid as GeneratedUuid, type generators_PasswordCharsetInfo as PasswordCharsetInfo, type generators_PasswordCrackTimeEstimate as PasswordCrackTimeEstimate, type generators_PasswordEntropyResult as PasswordEntropyResult, type generators_PasswordEntropyStrength as PasswordEntropyStrength, type generators_PasswordOptions as PasswordOptions, type generators_QrErrorLevel as QrErrorLevel, type generators_QrOptions as QrOptions, type generators_QrOutputFormat as QrOutputFormat, type generators_RandomConfig as RandomConfig, generators_SYMBOL_CHARS as SYMBOL_CHARS, generators_ULID_REGEX as ULID_REGEX, type generators_UuidVersion as UuidVersion, generators_checkStrength as checkStrength, generators_estimatePasswordEntropy as estimatePasswordEntropy, generators_generateBulk as generateBulk, generators_generateBulkPasswords as generateBulkPasswords, generators_generateBulkUlids as generateBulkUlids, generators_generateCspNonce as generateCspNonce, generators_generateData as generateData, generators_generatePassword as generatePassword, generators_generateQrDataUrl as generateQrDataUrl, generators_generateQrSvg as generateQrSvg, generators_generateSingle as generateSingle, generators_generateUlid as generateUlid, generators_generateUuid as generateUuid, generators_generateV4 as generateV4, generators_generateV7 as generateV7, generators_isValidUlid as isValidUlid, generators_isValidUuid as isValidUuid, generators_parseUlid as parseUlid, generators_parseUuidVersion as parseUuidVersion };
|
|
159
180
|
}
|
|
160
181
|
|
|
161
|
-
export { AMBIGUOUS_CHARS as A,
|
|
182
|
+
export { AMBIGUOUS_CHARS as A, isValidUlid as B, type CspNonceResult as C, DATA_TYPES as D, isValidUuid as E, parseUlid as F, type GeneratedUuid as G, parseUuidVersion as H, type PasswordCharsetInfo as P, type QrErrorLevel as Q, type RandomConfig as R, SYMBOL_CHARS as S, ULID_REGEX as U, DEFAULT_OPTIONS as a, DEFAULT_QR_OPTIONS as b, type DataType as c, type PasswordCrackTimeEstimate as d, type PasswordEntropyResult as e, type PasswordEntropyStrength as f, generators as g, type PasswordOptions as h, type QrOptions as i, type QrOutputFormat as j, type UuidVersion as k, checkStrength as l, estimatePasswordEntropy as m, generateBulk as n, generateBulkPasswords as o, generateBulkUlids as p, generateCspNonce as q, generateData as r, generatePassword as s, generateQrDataUrl as t, generateQrSvg as u, generateSingle as v, generateUlid as w, generateUuid as x, generateV4 as y, generateV7 as z };
|