@n8n/utils 1.35.0 → 1.37.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/dist/create-event-queue.cjs +3 -0
- package/dist/create-event-queue.d.cts +2 -0
- package/dist/create-event-queue.d.mts +2 -0
- package/dist/create-event-queue.mjs +3 -0
- package/dist/{event-queue2.cjs → create-event-queue2.cjs} +2 -2
- package/dist/create-event-queue2.cjs.map +1 -0
- package/dist/{event-queue2.d.cts → create-event-queue2.d.cts} +2 -2
- package/dist/{event-queue2.d.mts → create-event-queue2.d.mts} +2 -2
- package/dist/{event-queue2.mjs → create-event-queue2.mjs} +2 -2
- package/dist/create-event-queue2.mjs.map +1 -0
- package/dist/files/is-windows-file-path.cjs +3 -0
- package/dist/files/is-windows-file-path.d.cts +2 -0
- package/dist/files/is-windows-file-path.d.mts +2 -0
- package/dist/files/is-windows-file-path.mjs +3 -0
- package/dist/files/sanitize-filename.cjs +3 -0
- package/dist/files/sanitize-filename.d.cts +2 -0
- package/dist/files/sanitize-filename.d.mts +2 -0
- package/dist/files/sanitize-filename.mjs +3 -0
- package/dist/format-pem-block.cjs +3 -0
- package/dist/format-pem-block.d.cts +2 -0
- package/dist/format-pem-block.d.mts +2 -0
- package/dist/format-pem-block.mjs +3 -0
- package/dist/format-pem-block2.cjs +47 -0
- package/dist/format-pem-block2.cjs.map +1 -0
- package/dist/format-pem-block2.d.cts +5 -0
- package/dist/format-pem-block2.d.mts +5 -0
- package/dist/format-pem-block2.mjs +41 -0
- package/dist/format-pem-block2.mjs.map +1 -0
- package/dist/generate-nano-id.cjs +3 -0
- package/dist/generate-nano-id.d.cts +2 -0
- package/dist/generate-nano-id.d.mts +2 -0
- package/dist/generate-nano-id.mjs +3 -0
- package/dist/{workflowId2.cjs → generate-nano-id2.cjs} +2 -2
- package/dist/generate-nano-id2.cjs.map +1 -0
- package/dist/{workflowId2.d.cts → generate-nano-id2.d.cts} +2 -2
- package/dist/{workflowId2.d.mts → generate-nano-id2.d.mts} +2 -2
- package/dist/{workflowId2.mjs → generate-nano-id2.mjs} +2 -2
- package/dist/generate-nano-id2.mjs.map +1 -0
- package/dist/get-jwt-expiry.cjs +3 -0
- package/dist/get-jwt-expiry.d.cts +2 -0
- package/dist/get-jwt-expiry.d.mts +2 -0
- package/dist/get-jwt-expiry.mjs +3 -0
- package/dist/{jwt2.cjs → get-jwt-expiry2.cjs} +2 -2
- package/dist/get-jwt-expiry2.cjs.map +1 -0
- package/dist/{jwt2.d.cts → get-jwt-expiry2.d.cts} +2 -2
- package/dist/{jwt2.d.mts → get-jwt-expiry2.d.mts} +2 -2
- package/dist/{jwt2.mjs → get-jwt-expiry2.mjs} +2 -2
- package/dist/get-jwt-expiry2.mjs.map +1 -0
- package/dist/index.cjs +23 -19
- package/dist/index.d.cts +12 -10
- package/dist/index.d.mts +12 -10
- package/dist/index.mjs +12 -10
- package/dist/is-record.cjs +3 -0
- package/dist/is-record.d.cts +2 -0
- package/dist/is-record.d.mts +2 -0
- package/dist/is-record.mjs +3 -0
- package/dist/is-record2.cjs +14 -0
- package/dist/is-record2.cjs.map +1 -0
- package/dist/is-record2.d.cts +5 -0
- package/dist/is-record2.d.mts +5 -0
- package/dist/is-record2.mjs +8 -0
- package/dist/is-record2.mjs.map +1 -0
- package/dist/{path.cjs → is-windows-file-path.cjs} +2 -2
- package/dist/is-windows-file-path.cjs.map +1 -0
- package/dist/{path.d.cts → is-windows-file-path.d.cts} +2 -2
- package/dist/{path.d.mts → is-windows-file-path.d.mts} +2 -2
- package/dist/{path.mjs → is-windows-file-path.mjs} +2 -2
- package/dist/is-windows-file-path.mjs.map +1 -0
- package/dist/number/smart-decimal.cjs +3 -0
- package/dist/number/smart-decimal.d.cts +2 -0
- package/dist/number/smart-decimal.d.mts +2 -0
- package/dist/number/smart-decimal.mjs +3 -0
- package/dist/{reRankSearchResults.cjs → re-rank-search-results.cjs} +2 -2
- package/dist/re-rank-search-results.cjs.map +1 -0
- package/dist/{reRankSearchResults.d.cts → re-rank-search-results.d.cts} +2 -2
- package/dist/{reRankSearchResults.d.mts → re-rank-search-results.d.mts} +2 -2
- package/dist/{reRankSearchResults.mjs → re-rank-search-results.mjs} +2 -2
- package/dist/re-rank-search-results.mjs.map +1 -0
- package/dist/{sanitize.cjs → sanitize-filename.cjs} +2 -2
- package/dist/sanitize-filename.cjs.map +1 -0
- package/dist/{sanitize.d.cts → sanitize-filename.d.cts} +2 -2
- package/dist/{sanitize.d.mts → sanitize-filename.d.mts} +2 -2
- package/dist/{sanitize.mjs → sanitize-filename.mjs} +2 -2
- package/dist/sanitize-filename.mjs.map +1 -0
- package/dist/scrub-secrets2.cjs +6 -0
- package/dist/scrub-secrets2.cjs.map +1 -1
- package/dist/scrub-secrets2.mjs +6 -0
- package/dist/scrub-secrets2.mjs.map +1 -1
- package/dist/search/re-rank-search-results.cjs +3 -0
- package/dist/search/re-rank-search-results.d.cts +2 -0
- package/dist/search/re-rank-search-results.d.mts +2 -0
- package/dist/search/re-rank-search-results.mjs +3 -0
- package/dist/search/sublime-search.cjs +4 -0
- package/dist/search/{sublimeSearch.d.cts → sublime-search.d.cts} +1 -1
- package/dist/search/{sublimeSearch.d.mts → sublime-search.d.mts} +1 -1
- package/dist/search/{sublimeSearch.mjs → sublime-search.mjs} +1 -1
- package/dist/{smartDecimal.cjs → smart-decimal.cjs} +2 -2
- package/dist/smart-decimal.cjs.map +1 -0
- package/dist/{smartDecimal.d.cts → smart-decimal.d.cts} +2 -2
- package/dist/{smartDecimal.d.mts → smart-decimal.d.mts} +2 -2
- package/dist/{smartDecimal.mjs → smart-decimal.mjs} +2 -2
- package/dist/smart-decimal.mjs.map +1 -0
- package/dist/sort/sort-by-property.cjs +3 -0
- package/dist/sort/sort-by-property.d.cts +2 -0
- package/dist/sort/sort-by-property.d.mts +2 -0
- package/dist/sort/sort-by-property.mjs +3 -0
- package/dist/{sortByProperty.cjs → sort-by-property.cjs} +2 -2
- package/dist/sort-by-property.cjs.map +1 -0
- package/dist/{sortByProperty.d.cts → sort-by-property.d.cts} +2 -2
- package/dist/{sortByProperty.d.mts → sort-by-property.d.mts} +2 -2
- package/dist/{sortByProperty.mjs → sort-by-property.mjs} +2 -2
- package/dist/sort-by-property.mjs.map +1 -0
- package/dist/{sublimeSearch.cjs → sublime-search.cjs} +2 -2
- package/dist/sublime-search.cjs.map +1 -0
- package/dist/{sublimeSearch.d.cts → sublime-search.d.cts} +2 -2
- package/dist/{sublimeSearch.d.mts → sublime-search.d.mts} +2 -2
- package/dist/{sublimeSearch.mjs → sublime-search.mjs} +2 -2
- package/dist/sublime-search.mjs.map +1 -0
- package/package.json +6 -6
- package/dist/event-queue.cjs +0 -3
- package/dist/event-queue.d.cts +0 -2
- package/dist/event-queue.d.mts +0 -2
- package/dist/event-queue.mjs +0 -3
- package/dist/event-queue2.cjs.map +0 -1
- package/dist/event-queue2.mjs.map +0 -1
- package/dist/files/path.cjs +0 -3
- package/dist/files/path.d.cts +0 -2
- package/dist/files/path.d.mts +0 -2
- package/dist/files/path.mjs +0 -3
- package/dist/files/sanitize.cjs +0 -3
- package/dist/files/sanitize.d.cts +0 -2
- package/dist/files/sanitize.d.mts +0 -2
- package/dist/files/sanitize.mjs +0 -3
- package/dist/jwt.cjs +0 -3
- package/dist/jwt.d.cts +0 -2
- package/dist/jwt.d.mts +0 -2
- package/dist/jwt.mjs +0 -3
- package/dist/jwt2.cjs.map +0 -1
- package/dist/jwt2.mjs.map +0 -1
- package/dist/number/smartDecimal.cjs +0 -3
- package/dist/number/smartDecimal.d.cts +0 -2
- package/dist/number/smartDecimal.d.mts +0 -2
- package/dist/number/smartDecimal.mjs +0 -3
- package/dist/path.cjs.map +0 -1
- package/dist/path.mjs.map +0 -1
- package/dist/reRankSearchResults.cjs.map +0 -1
- package/dist/reRankSearchResults.mjs.map +0 -1
- package/dist/sanitize.cjs.map +0 -1
- package/dist/sanitize.mjs.map +0 -1
- package/dist/search/reRankSearchResults.cjs +0 -3
- package/dist/search/reRankSearchResults.d.cts +0 -2
- package/dist/search/reRankSearchResults.d.mts +0 -2
- package/dist/search/reRankSearchResults.mjs +0 -3
- package/dist/search/sublimeSearch.cjs +0 -4
- package/dist/smartDecimal.cjs.map +0 -1
- package/dist/smartDecimal.mjs.map +0 -1
- package/dist/sort/sortByProperty.cjs +0 -3
- package/dist/sort/sortByProperty.d.cts +0 -2
- package/dist/sort/sortByProperty.d.mts +0 -2
- package/dist/sort/sortByProperty.mjs +0 -3
- package/dist/sortByProperty.cjs.map +0 -1
- package/dist/sortByProperty.mjs.map +0 -1
- package/dist/sublimeSearch.cjs.map +0 -1
- package/dist/sublimeSearch.mjs.map +0 -1
- package/dist/workflowId.cjs +0 -3
- package/dist/workflowId.d.cts +0 -2
- package/dist/workflowId.d.mts +0 -2
- package/dist/workflowId.mjs +0 -3
- package/dist/workflowId2.cjs.map +0 -1
- package/dist/workflowId2.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/event-queue.ts
|
|
2
|
+
//#region src/create-event-queue.ts
|
|
3
3
|
/**
|
|
4
4
|
* Create an event queue that processes events sequentially.
|
|
5
5
|
*
|
|
@@ -43,4 +43,4 @@ Object.defineProperty(exports, 'createEventQueue', {
|
|
|
43
43
|
return createEventQueue;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
//# sourceMappingURL=event-queue2.cjs.map
|
|
46
|
+
//# sourceMappingURL=create-event-queue2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event-queue2.cjs","names":["queue: T[]"],"sources":["../src/create-event-queue.ts"],"sourcesContent":["/**\n * Create an event queue that processes events sequentially.\n *\n * @param processEvent - Async function that processes a single event.\n * @returns A function that enqueues events for processing.\n */\nexport function createEventQueue<T>(processEvent: (event: T) => Promise<void>) {\n\t// The internal queue holding events.\n\tconst queue: T[] = [];\n\n\t// Flag to indicate whether an event is currently being processed.\n\tlet processing = false;\n\n\t/**\n\t * Process the next event in the queue (if not already processing).\n\t */\n\tasync function processNext(): Promise<void> {\n\t\tif (processing || queue.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tprocessing = true;\n\t\tconst currentEvent = queue.shift();\n\n\t\tif (currentEvent !== undefined) {\n\t\t\ttry {\n\t\t\t\tawait processEvent(currentEvent);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error processing event:', error);\n\t\t\t}\n\t\t}\n\n\t\tprocessing = false;\n\n\t\t// Recursively process the next event.\n\t\tawait processNext();\n\t}\n\n\t/**\n\t * Enqueue an event and trigger processing.\n\t *\n\t * @param event - The event to enqueue.\n\t */\n\tfunction enqueue(event: T): void {\n\t\tqueue.push(event);\n\t\tvoid processNext();\n\t}\n\n\treturn { enqueue };\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,iBAAoB,cAA2C;CAE9E,MAAMA,QAAa,EAAE;CAGrB,IAAI,aAAa;;;;CAKjB,eAAe,cAA6B;AAC3C,MAAI,cAAc,MAAM,WAAW,EAClC;AAGD,eAAa;EACb,MAAM,eAAe,MAAM,OAAO;AAElC,MAAI,iBAAiB,OACpB,KAAI;AACH,SAAM,aAAa,aAAa;WACxB,OAAO;AACf,WAAQ,MAAM,2BAA2B,MAAM;;AAIjD,eAAa;AAGb,QAAM,aAAa;;;;;;;CAQpB,SAAS,QAAQ,OAAgB;AAChC,QAAM,KAAK,MAAM;AACjB,EAAK,aAAa;;AAGnB,QAAO,EAAE,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//#region src/event-queue.d.ts
|
|
1
|
+
//#region src/create-event-queue.d.ts
|
|
2
2
|
declare function createEventQueue<T>(processEvent: (event: T) => Promise<void>): {
|
|
3
3
|
enqueue: (event: T) => void;
|
|
4
4
|
};
|
|
5
5
|
//#endregion
|
|
6
6
|
export { createEventQueue as t };
|
|
7
|
-
//# sourceMappingURL=event-queue2.d.cts.map
|
|
7
|
+
//# sourceMappingURL=create-event-queue2.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//#region src/event-queue.d.ts
|
|
1
|
+
//#region src/create-event-queue.d.ts
|
|
2
2
|
declare function createEventQueue<T>(processEvent: (event: T) => Promise<void>): {
|
|
3
3
|
enqueue: (event: T) => void;
|
|
4
4
|
};
|
|
5
5
|
//#endregion
|
|
6
6
|
export { createEventQueue as t };
|
|
7
|
-
//# sourceMappingURL=event-queue2.d.mts.map
|
|
7
|
+
//# sourceMappingURL=create-event-queue2.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/event-queue.ts
|
|
1
|
+
//#region src/create-event-queue.ts
|
|
2
2
|
/**
|
|
3
3
|
* Create an event queue that processes events sequentially.
|
|
4
4
|
*
|
|
@@ -37,4 +37,4 @@ function createEventQueue(processEvent) {
|
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { createEventQueue as t };
|
|
40
|
-
//# sourceMappingURL=event-queue2.mjs.map
|
|
40
|
+
//# sourceMappingURL=create-event-queue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event-queue2.mjs","names":["queue: T[]"],"sources":["../src/create-event-queue.ts"],"sourcesContent":["/**\n * Create an event queue that processes events sequentially.\n *\n * @param processEvent - Async function that processes a single event.\n * @returns A function that enqueues events for processing.\n */\nexport function createEventQueue<T>(processEvent: (event: T) => Promise<void>) {\n\t// The internal queue holding events.\n\tconst queue: T[] = [];\n\n\t// Flag to indicate whether an event is currently being processed.\n\tlet processing = false;\n\n\t/**\n\t * Process the next event in the queue (if not already processing).\n\t */\n\tasync function processNext(): Promise<void> {\n\t\tif (processing || queue.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tprocessing = true;\n\t\tconst currentEvent = queue.shift();\n\n\t\tif (currentEvent !== undefined) {\n\t\t\ttry {\n\t\t\t\tawait processEvent(currentEvent);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error processing event:', error);\n\t\t\t}\n\t\t}\n\n\t\tprocessing = false;\n\n\t\t// Recursively process the next event.\n\t\tawait processNext();\n\t}\n\n\t/**\n\t * Enqueue an event and trigger processing.\n\t *\n\t * @param event - The event to enqueue.\n\t */\n\tfunction enqueue(event: T): void {\n\t\tqueue.push(event);\n\t\tvoid processNext();\n\t}\n\n\treturn { enqueue };\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,iBAAoB,cAA2C;CAE9E,MAAMA,QAAa,EAAE;CAGrB,IAAI,aAAa;;;;CAKjB,eAAe,cAA6B;AAC3C,MAAI,cAAc,MAAM,WAAW,EAClC;AAGD,eAAa;EACb,MAAM,eAAe,MAAM,OAAO;AAElC,MAAI,iBAAiB,OACpB,KAAI;AACH,SAAM,aAAa,aAAa;WACxB,OAAO;AACf,WAAQ,MAAM,2BAA2B,MAAM;;AAIjD,eAAa;AAGb,QAAM,aAAa;;;;;;;CAQpB,SAAS,QAAQ,OAAgB;AAChC,QAAM,KAAK,MAAM;AACjB,EAAK,aAAa;;AAGnB,QAAO,EAAE,SAAS"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/format-pem-block.ts
|
|
3
|
+
const PEM_BODY_LINE_LENGTH = 64;
|
|
4
|
+
function formatCompactPem(pem, isPublic) {
|
|
5
|
+
const trimmed = pem.trim();
|
|
6
|
+
if ((trimmed.match(/-----BEGIN /g) ?? []).length !== 1) return void 0;
|
|
7
|
+
const labelPattern = isPublic ? "[A-Z0-9 ]*PUBLIC KEY" : "[A-Z0-9 ]*PRIVATE KEY|CERTIFICATE";
|
|
8
|
+
const pemMatch = trimmed.match(/* @__PURE__ */ new RegExp(`^-----BEGIN (${labelPattern})-----([\\s\\S]*?)-----END \\1-----$`));
|
|
9
|
+
if (!pemMatch) return void 0;
|
|
10
|
+
const [, label, body] = pemMatch;
|
|
11
|
+
const normalizedBody = body.replace(/\\n/g, "\n").trim();
|
|
12
|
+
return `-----BEGIN ${label}-----\n${/\s/.test(normalizedBody) ? normalizedBody.replace(/:\s+/g, ":").replace(/\s+/g, "\n") : (normalizedBody.match(new RegExp(`.{1,${PEM_BODY_LINE_LENGTH}}`, "g")) ?? []).join("\n")}\n-----END ${label}-----`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Normalize a single PEM-encoded block (private key, public key, or certificate)
|
|
16
|
+
* by collapsing whitespace and wrapping the body at 64 chars. Multi-block PEM
|
|
17
|
+
* chains are returned unchanged.
|
|
18
|
+
*
|
|
19
|
+
* @param pem - The PEM-encoded block to format.
|
|
20
|
+
* @param isPublic - When true, match `PUBLIC KEY` labels instead of the default `PRIVATE KEY` / `CERTIFICATE`.
|
|
21
|
+
* @returns The formatted PEM block.
|
|
22
|
+
*/
|
|
23
|
+
function formatPemBlock(pem, isPublic = false) {
|
|
24
|
+
let regex = /(PRIVATE KEY|CERTIFICATE)/;
|
|
25
|
+
if (isPublic) regex = /(PUBLIC KEY)/;
|
|
26
|
+
if (!pem || /\n/.test(pem)) return pem;
|
|
27
|
+
const compactPem = formatCompactPem(pem, isPublic);
|
|
28
|
+
if (compactPem !== void 0) return compactPem;
|
|
29
|
+
let formattedPem = "";
|
|
30
|
+
pem.split("-----").filter((item) => item !== "").forEach((part) => {
|
|
31
|
+
if (regex.test(part)) formattedPem += `-----${part}-----`;
|
|
32
|
+
else if (/Proc-Type|DEK-Info/.test(part)) {
|
|
33
|
+
part = part.replace(/:\s+/g, ":");
|
|
34
|
+
formattedPem += part.replace(/\\n/g, "\n").replace(/\s+/g, "\n");
|
|
35
|
+
} else formattedPem += part.replace(/\\n/g, "\n").replace(/\s+/g, "\n");
|
|
36
|
+
});
|
|
37
|
+
return formattedPem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
Object.defineProperty(exports, 'formatPemBlock', {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return formatPemBlock;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=format-pem-block2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-pem-block2.cjs","names":[],"sources":["../src/format-pem-block.ts"],"sourcesContent":["const PEM_BODY_LINE_LENGTH = 64;\n\nfunction formatCompactPem(pem: string, isPublic: boolean): string | undefined {\n\tconst trimmed = pem.trim();\n\tif ((trimmed.match(/-----BEGIN /g) ?? []).length !== 1) return undefined;\n\n\tconst labelPattern = isPublic ? '[A-Z0-9 ]*PUBLIC KEY' : '[A-Z0-9 ]*PRIVATE KEY|CERTIFICATE';\n\tconst pemMatch = trimmed.match(\n\t\tnew RegExp(`^-----BEGIN (${labelPattern})-----([\\\\s\\\\S]*?)-----END \\\\1-----$`),\n\t);\n\n\tif (!pemMatch) return undefined;\n\n\tconst [, label, body] = pemMatch;\n\tconst normalizedBody = body.replace(/\\\\n/g, '\\n').trim();\n\tconst formattedBody = /\\s/.test(normalizedBody)\n\t\t? normalizedBody.replace(/:\\s+/g, ':').replace(/\\s+/g, '\\n')\n\t\t: (normalizedBody.match(new RegExp(`.{1,${PEM_BODY_LINE_LENGTH}}`, 'g')) ?? []).join('\\n');\n\n\treturn `-----BEGIN ${label}-----\\n${formattedBody}\\n-----END ${label}-----`;\n}\n\n/**\n * Normalize a single PEM-encoded block (private key, public key, or certificate)\n * by collapsing whitespace and wrapping the body at 64 chars. Multi-block PEM\n * chains are returned unchanged.\n *\n * @param pem - The PEM-encoded block to format.\n * @param isPublic - When true, match `PUBLIC KEY` labels instead of the default `PRIVATE KEY` / `CERTIFICATE`.\n * @returns The formatted PEM block.\n */\nexport function formatPemBlock(pem: string, isPublic = false): string {\n\tlet regex = /(PRIVATE KEY|CERTIFICATE)/;\n\tif (isPublic) {\n\t\tregex = /(PUBLIC KEY)/;\n\t}\n\tif (!pem || /\\n/.test(pem)) {\n\t\treturn pem;\n\t}\n\tconst compactPem = formatCompactPem(pem, isPublic);\n\tif (compactPem !== undefined) {\n\t\treturn compactPem;\n\t}\n\n\tlet formattedPem = '';\n\tconst parts = pem.split('-----').filter((item) => item !== '');\n\tparts.forEach((part) => {\n\t\tif (regex.test(part)) {\n\t\t\tformattedPem += `-----${part}-----`;\n\t\t} else {\n\t\t\tconst passRegex = /Proc-Type|DEK-Info/;\n\t\t\tif (passRegex.test(part)) {\n\t\t\t\tpart = part.replace(/:\\s+/g, ':');\n\t\t\t\tformattedPem += part.replace(/\\\\n/g, '\\n').replace(/\\s+/g, '\\n');\n\t\t\t} else {\n\t\t\t\tformattedPem += part.replace(/\\\\n/g, '\\n').replace(/\\s+/g, '\\n');\n\t\t\t}\n\t\t}\n\t});\n\treturn formattedPem;\n}\n"],"mappings":";;AAAA,MAAM,uBAAuB;AAE7B,SAAS,iBAAiB,KAAa,UAAuC;CAC7E,MAAM,UAAU,IAAI,MAAM;AAC1B,MAAK,QAAQ,MAAM,eAAe,IAAI,EAAE,EAAE,WAAW,EAAG,QAAO;CAE/D,MAAM,eAAe,WAAW,yBAAyB;CACzD,MAAM,WAAW,QAAQ,sBACxB,IAAI,OAAO,gBAAgB,aAAa,sCAAsC,CAC9E;AAED,KAAI,CAAC,SAAU,QAAO;CAEtB,MAAM,GAAG,OAAO,QAAQ;CACxB,MAAM,iBAAiB,KAAK,QAAQ,QAAQ,KAAK,CAAC,MAAM;AAKxD,QAAO,cAAc,MAAM,SAJL,KAAK,KAAK,eAAe,GAC5C,eAAe,QAAQ,SAAS,IAAI,CAAC,QAAQ,QAAQ,KAAK,IACzD,eAAe,MAAM,IAAI,OAAO,OAAO,qBAAqB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,KAAK,CAEzC,aAAa,MAAM;;;;;;;;;;;AAYtE,SAAgB,eAAe,KAAa,WAAW,OAAe;CACrE,IAAI,QAAQ;AACZ,KAAI,SACH,SAAQ;AAET,KAAI,CAAC,OAAO,KAAK,KAAK,IAAI,CACzB,QAAO;CAER,MAAM,aAAa,iBAAiB,KAAK,SAAS;AAClD,KAAI,eAAe,OAClB,QAAO;CAGR,IAAI,eAAe;AAEnB,CADc,IAAI,MAAM,QAAQ,CAAC,QAAQ,SAAS,SAAS,GAAG,CACxD,SAAS,SAAS;AACvB,MAAI,MAAM,KAAK,KAAK,CACnB,iBAAgB,QAAQ,KAAK;WAEX,qBACJ,KAAK,KAAK,EAAE;AACzB,UAAO,KAAK,QAAQ,SAAS,IAAI;AACjC,mBAAgB,KAAK,QAAQ,QAAQ,KAAK,CAAC,QAAQ,QAAQ,KAAK;QAEhE,iBAAgB,KAAK,QAAQ,QAAQ,KAAK,CAAC,QAAQ,QAAQ,KAAK;GAGjE;AACF,QAAO"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/format-pem-block.ts
|
|
2
|
+
const PEM_BODY_LINE_LENGTH = 64;
|
|
3
|
+
function formatCompactPem(pem, isPublic) {
|
|
4
|
+
const trimmed = pem.trim();
|
|
5
|
+
if ((trimmed.match(/-----BEGIN /g) ?? []).length !== 1) return void 0;
|
|
6
|
+
const labelPattern = isPublic ? "[A-Z0-9 ]*PUBLIC KEY" : "[A-Z0-9 ]*PRIVATE KEY|CERTIFICATE";
|
|
7
|
+
const pemMatch = trimmed.match(/* @__PURE__ */ new RegExp(`^-----BEGIN (${labelPattern})-----([\\s\\S]*?)-----END \\1-----$`));
|
|
8
|
+
if (!pemMatch) return void 0;
|
|
9
|
+
const [, label, body] = pemMatch;
|
|
10
|
+
const normalizedBody = body.replace(/\\n/g, "\n").trim();
|
|
11
|
+
return `-----BEGIN ${label}-----\n${/\s/.test(normalizedBody) ? normalizedBody.replace(/:\s+/g, ":").replace(/\s+/g, "\n") : (normalizedBody.match(new RegExp(`.{1,${PEM_BODY_LINE_LENGTH}}`, "g")) ?? []).join("\n")}\n-----END ${label}-----`;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Normalize a single PEM-encoded block (private key, public key, or certificate)
|
|
15
|
+
* by collapsing whitespace and wrapping the body at 64 chars. Multi-block PEM
|
|
16
|
+
* chains are returned unchanged.
|
|
17
|
+
*
|
|
18
|
+
* @param pem - The PEM-encoded block to format.
|
|
19
|
+
* @param isPublic - When true, match `PUBLIC KEY` labels instead of the default `PRIVATE KEY` / `CERTIFICATE`.
|
|
20
|
+
* @returns The formatted PEM block.
|
|
21
|
+
*/
|
|
22
|
+
function formatPemBlock(pem, isPublic = false) {
|
|
23
|
+
let regex = /(PRIVATE KEY|CERTIFICATE)/;
|
|
24
|
+
if (isPublic) regex = /(PUBLIC KEY)/;
|
|
25
|
+
if (!pem || /\n/.test(pem)) return pem;
|
|
26
|
+
const compactPem = formatCompactPem(pem, isPublic);
|
|
27
|
+
if (compactPem !== void 0) return compactPem;
|
|
28
|
+
let formattedPem = "";
|
|
29
|
+
pem.split("-----").filter((item) => item !== "").forEach((part) => {
|
|
30
|
+
if (regex.test(part)) formattedPem += `-----${part}-----`;
|
|
31
|
+
else if (/Proc-Type|DEK-Info/.test(part)) {
|
|
32
|
+
part = part.replace(/:\s+/g, ":");
|
|
33
|
+
formattedPem += part.replace(/\\n/g, "\n").replace(/\s+/g, "\n");
|
|
34
|
+
} else formattedPem += part.replace(/\\n/g, "\n").replace(/\s+/g, "\n");
|
|
35
|
+
});
|
|
36
|
+
return formattedPem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { formatPemBlock as t };
|
|
41
|
+
//# sourceMappingURL=format-pem-block2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-pem-block2.mjs","names":[],"sources":["../src/format-pem-block.ts"],"sourcesContent":["const PEM_BODY_LINE_LENGTH = 64;\n\nfunction formatCompactPem(pem: string, isPublic: boolean): string | undefined {\n\tconst trimmed = pem.trim();\n\tif ((trimmed.match(/-----BEGIN /g) ?? []).length !== 1) return undefined;\n\n\tconst labelPattern = isPublic ? '[A-Z0-9 ]*PUBLIC KEY' : '[A-Z0-9 ]*PRIVATE KEY|CERTIFICATE';\n\tconst pemMatch = trimmed.match(\n\t\tnew RegExp(`^-----BEGIN (${labelPattern})-----([\\\\s\\\\S]*?)-----END \\\\1-----$`),\n\t);\n\n\tif (!pemMatch) return undefined;\n\n\tconst [, label, body] = pemMatch;\n\tconst normalizedBody = body.replace(/\\\\n/g, '\\n').trim();\n\tconst formattedBody = /\\s/.test(normalizedBody)\n\t\t? normalizedBody.replace(/:\\s+/g, ':').replace(/\\s+/g, '\\n')\n\t\t: (normalizedBody.match(new RegExp(`.{1,${PEM_BODY_LINE_LENGTH}}`, 'g')) ?? []).join('\\n');\n\n\treturn `-----BEGIN ${label}-----\\n${formattedBody}\\n-----END ${label}-----`;\n}\n\n/**\n * Normalize a single PEM-encoded block (private key, public key, or certificate)\n * by collapsing whitespace and wrapping the body at 64 chars. Multi-block PEM\n * chains are returned unchanged.\n *\n * @param pem - The PEM-encoded block to format.\n * @param isPublic - When true, match `PUBLIC KEY` labels instead of the default `PRIVATE KEY` / `CERTIFICATE`.\n * @returns The formatted PEM block.\n */\nexport function formatPemBlock(pem: string, isPublic = false): string {\n\tlet regex = /(PRIVATE KEY|CERTIFICATE)/;\n\tif (isPublic) {\n\t\tregex = /(PUBLIC KEY)/;\n\t}\n\tif (!pem || /\\n/.test(pem)) {\n\t\treturn pem;\n\t}\n\tconst compactPem = formatCompactPem(pem, isPublic);\n\tif (compactPem !== undefined) {\n\t\treturn compactPem;\n\t}\n\n\tlet formattedPem = '';\n\tconst parts = pem.split('-----').filter((item) => item !== '');\n\tparts.forEach((part) => {\n\t\tif (regex.test(part)) {\n\t\t\tformattedPem += `-----${part}-----`;\n\t\t} else {\n\t\t\tconst passRegex = /Proc-Type|DEK-Info/;\n\t\t\tif (passRegex.test(part)) {\n\t\t\t\tpart = part.replace(/:\\s+/g, ':');\n\t\t\t\tformattedPem += part.replace(/\\\\n/g, '\\n').replace(/\\s+/g, '\\n');\n\t\t\t} else {\n\t\t\t\tformattedPem += part.replace(/\\\\n/g, '\\n').replace(/\\s+/g, '\\n');\n\t\t\t}\n\t\t}\n\t});\n\treturn formattedPem;\n}\n"],"mappings":";AAAA,MAAM,uBAAuB;AAE7B,SAAS,iBAAiB,KAAa,UAAuC;CAC7E,MAAM,UAAU,IAAI,MAAM;AAC1B,MAAK,QAAQ,MAAM,eAAe,IAAI,EAAE,EAAE,WAAW,EAAG,QAAO;CAE/D,MAAM,eAAe,WAAW,yBAAyB;CACzD,MAAM,WAAW,QAAQ,sBACxB,IAAI,OAAO,gBAAgB,aAAa,sCAAsC,CAC9E;AAED,KAAI,CAAC,SAAU,QAAO;CAEtB,MAAM,GAAG,OAAO,QAAQ;CACxB,MAAM,iBAAiB,KAAK,QAAQ,QAAQ,KAAK,CAAC,MAAM;AAKxD,QAAO,cAAc,MAAM,SAJL,KAAK,KAAK,eAAe,GAC5C,eAAe,QAAQ,SAAS,IAAI,CAAC,QAAQ,QAAQ,KAAK,IACzD,eAAe,MAAM,IAAI,OAAO,OAAO,qBAAqB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,KAAK,CAEzC,aAAa,MAAM;;;;;;;;;;;AAYtE,SAAgB,eAAe,KAAa,WAAW,OAAe;CACrE,IAAI,QAAQ;AACZ,KAAI,SACH,SAAQ;AAET,KAAI,CAAC,OAAO,KAAK,KAAK,IAAI,CACzB,QAAO;CAER,MAAM,aAAa,iBAAiB,KAAK,SAAS;AAClD,KAAI,eAAe,OAClB,QAAO;CAGR,IAAI,eAAe;AAEnB,CADc,IAAI,MAAM,QAAQ,CAAC,QAAQ,SAAS,SAAS,GAAG,CACxD,SAAS,SAAS;AACvB,MAAI,MAAM,KAAK,KAAK,CACnB,iBAAgB,QAAQ,KAAK;WAEX,qBACJ,KAAK,KAAK,EAAE;AACzB,UAAO,KAAK,QAAQ,SAAS,IAAI;AACjC,mBAAgB,KAAK,QAAQ,QAAQ,KAAK,CAAC,QAAQ,QAAQ,KAAK;QAEhE,iBAAgB,KAAK,QAAQ,QAAQ,KAAK,CAAC,QAAQ,QAAQ,KAAK;GAGjE;AACF,QAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let __n8n_constants = require("@n8n/constants");
|
|
2
2
|
let nanoid = require("nanoid");
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/generate-nano-id.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generates a unique 16-character nanoid.
|
|
7
7
|
*
|
|
@@ -31,4 +31,4 @@ Object.defineProperty(exports, 'generateNanoId', {
|
|
|
31
31
|
return generateNanoId;
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=generate-nano-id2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-nano-id2.cjs","names":["NANOID_ALPHABET"],"sources":["../src/generate-nano-id.ts"],"sourcesContent":["import { NANOID_ALPHABET } from '@n8n/constants';\nimport { customAlphabet } from 'nanoid';\n\n/**\n * Generates a unique 16-character nanoid.\n *\n * This is the canonical ID generator used across the entire n8n codebase for:\n * - Workflow IDs\n * - Project IDs\n * - Variable IDs\n * - API Key IDs\n * - And other entity IDs\n *\n * Both frontend and backend MUST use this function to ensure consistency.\n *\n * @returns A 16-character ID\n *\n * @example\n * ```ts\n * const id = generateNanoId();\n * // => 'aBcDeFgHiJkLmNoP' (16 characters)\n * ```\n */\nexport const generateNanoId = customAlphabet(NANOID_ALPHABET, 16);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,4CAAgCA,iCAAiB,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/generate-nano-id.d.ts
|
|
2
2
|
declare const generateNanoId: (size?: number) => string;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { generateNanoId as t };
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=generate-nano-id2.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/generate-nano-id.d.ts
|
|
2
2
|
declare const generateNanoId: (size?: number) => string;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { generateNanoId as t };
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=generate-nano-id2.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NANOID_ALPHABET } from "@n8n/constants";
|
|
2
2
|
import { customAlphabet } from "nanoid";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/generate-nano-id.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generates a unique 16-character nanoid.
|
|
7
7
|
*
|
|
@@ -26,4 +26,4 @@ const generateNanoId = customAlphabet(NANOID_ALPHABET, 16);
|
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
28
|
export { generateNanoId as t };
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=generate-nano-id2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-nano-id2.mjs","names":[],"sources":["../src/generate-nano-id.ts"],"sourcesContent":["import { NANOID_ALPHABET } from '@n8n/constants';\nimport { customAlphabet } from 'nanoid';\n\n/**\n * Generates a unique 16-character nanoid.\n *\n * This is the canonical ID generator used across the entire n8n codebase for:\n * - Workflow IDs\n * - Project IDs\n * - Variable IDs\n * - API Key IDs\n * - And other entity IDs\n *\n * Both frontend and backend MUST use this function to ensure consistency.\n *\n * @returns A 16-character ID\n *\n * @example\n * ```ts\n * const id = generateNanoId();\n * // => 'aBcDeFgHiJkLmNoP' (16 characters)\n * ```\n */\nexport const generateNanoId = customAlphabet(NANOID_ALPHABET, 16);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,iBAAiB,eAAe,iBAAiB,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/jwt.ts
|
|
2
|
+
//#region src/get-jwt-expiry.ts
|
|
3
3
|
/**
|
|
4
4
|
* Decode the payload of a JWT without verifying the signature.
|
|
5
5
|
* Returns the `exp` claim (seconds since epoch) or undefined.
|
|
@@ -25,4 +25,4 @@ Object.defineProperty(exports, 'getJwtExpiry', {
|
|
|
25
25
|
return getJwtExpiry;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=get-jwt-expiry2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jwt-expiry2.cjs","names":[],"sources":["../src/get-jwt-expiry.ts"],"sourcesContent":["/**\n * Decode the payload of a JWT without verifying the signature.\n * Returns the `exp` claim (seconds since epoch) or undefined.\n *\n * Use only for trusted tokens (e.g. ones we just received from our own proxy)\n * where the goal is scheduling refresh, not authenticating the issuer.\n */\nexport function getJwtExpiry(jwt: string): number | undefined {\n\tconst parts = jwt.split('.');\n\tif (parts.length !== 3) return undefined;\n\ttry {\n\t\tconst payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString()) as {\n\t\t\texp?: number;\n\t\t};\n\t\treturn typeof payload.exp === 'number' ? payload.exp : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"mappings":";;;;;;;;;AAOA,SAAgB,aAAa,KAAiC;CAC7D,MAAM,QAAQ,IAAI,MAAM,IAAI;AAC5B,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,KAAI;EACH,MAAM,UAAU,KAAK,MAAM,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,UAAU,CAAC;AAGzE,SAAO,OAAO,QAAQ,QAAQ,WAAW,QAAQ,MAAM;SAChD;AACP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/jwt.ts
|
|
1
|
+
//#region src/get-jwt-expiry.ts
|
|
2
2
|
/**
|
|
3
3
|
* Decode the payload of a JWT without verifying the signature.
|
|
4
4
|
* Returns the `exp` claim (seconds since epoch) or undefined.
|
|
@@ -19,4 +19,4 @@ function getJwtExpiry(jwt) {
|
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
21
|
export { getJwtExpiry as t };
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=get-jwt-expiry2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jwt-expiry2.mjs","names":[],"sources":["../src/get-jwt-expiry.ts"],"sourcesContent":["/**\n * Decode the payload of a JWT without verifying the signature.\n * Returns the `exp` claim (seconds since epoch) or undefined.\n *\n * Use only for trusted tokens (e.g. ones we just received from our own proxy)\n * where the goal is scheduling refresh, not authenticating the issuer.\n */\nexport function getJwtExpiry(jwt: string): number | undefined {\n\tconst parts = jwt.split('.');\n\tif (parts.length !== 3) return undefined;\n\ttry {\n\t\tconst payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString()) as {\n\t\t\texp?: number;\n\t\t};\n\t\treturn typeof payload.exp === 'number' ? payload.exp : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,aAAa,KAAiC;CAC7D,MAAM,QAAQ,IAAI,MAAM,IAAI;AAC5B,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,KAAI;EACH,MAAM,UAAU,KAAK,MAAM,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,UAAU,CAAC;AAGzE,SAAO,OAAO,QAAQ,QAAQ,WAAW,QAAQ,MAAM;SAChD;AACP"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
1
|
const require_assert = require('./assert2.cjs');
|
|
2
|
+
const require_create_event_queue = require('./create-event-queue2.cjs');
|
|
2
3
|
const require_event_bus = require('./event-bus2.cjs');
|
|
3
|
-
const
|
|
4
|
+
const require_format_pem_block = require('./format-pem-block2.cjs');
|
|
5
|
+
const require_generate_nano_id = require('./generate-nano-id2.cjs');
|
|
6
|
+
const require_get_jwt_expiry = require('./get-jwt-expiry2.cjs');
|
|
4
7
|
const require_retry = require('./retry2.cjs');
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const require_sortByProperty = require('./sortByProperty.cjs');
|
|
8
|
+
const require_smart_decimal = require('./smart-decimal.cjs');
|
|
9
|
+
const require_re_rank_search_results = require('./re-rank-search-results.cjs');
|
|
10
|
+
const require_sublime_search = require('./sublime-search.cjs');
|
|
11
|
+
const require_sort_by_property = require('./sort-by-property.cjs');
|
|
10
12
|
const require_truncate = require('./truncate.cjs');
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
+
const require_sanitize_filename = require('./sanitize-filename.cjs');
|
|
14
|
+
const require_is_windows_file_path = require('./is-windows-file-path.cjs');
|
|
13
15
|
const require_placeholder = require('./placeholder2.cjs');
|
|
14
|
-
const require_jwt = require('./jwt2.cjs');
|
|
15
16
|
const require_scrub_secrets = require('./scrub-secrets2.cjs');
|
|
17
|
+
const require_is_record = require('./is-record2.cjs');
|
|
16
18
|
|
|
17
|
-
exports.DEFAULT_KEYS =
|
|
19
|
+
exports.DEFAULT_KEYS = require_sublime_search.DEFAULT_KEYS;
|
|
18
20
|
exports.SECRET_KEYS = require_scrub_secrets.SECRET_KEYS;
|
|
19
21
|
exports.SECRET_VALUE_PATTERNS = require_scrub_secrets.SECRET_VALUE_PATTERNS;
|
|
20
22
|
exports.assert = require_assert.assert;
|
|
21
23
|
exports.createEventBus = require_event_bus.createEventBus;
|
|
22
|
-
exports.createEventQueue =
|
|
24
|
+
exports.createEventQueue = require_create_event_queue.createEventQueue;
|
|
23
25
|
exports.extractPlaceholderLabels = require_placeholder.extractPlaceholderLabels;
|
|
24
26
|
exports.findPlaceholderDetails = require_placeholder.findPlaceholderDetails;
|
|
27
|
+
exports.formatPemBlock = require_format_pem_block.formatPemBlock;
|
|
25
28
|
exports.formatPlaceholderPath = require_placeholder.formatPlaceholderPath;
|
|
26
|
-
exports.generateNanoId =
|
|
27
|
-
exports.getJwtExpiry =
|
|
29
|
+
exports.generateNanoId = require_generate_nano_id.generateNanoId;
|
|
30
|
+
exports.getJwtExpiry = require_get_jwt_expiry.getJwtExpiry;
|
|
28
31
|
exports.hasPlaceholderDeep = require_placeholder.hasPlaceholderDeep;
|
|
29
32
|
exports.isPlaceholderString = require_placeholder.isPlaceholderString;
|
|
30
33
|
exports.isPlaceholderValue = require_placeholder.isPlaceholderValue;
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
34
|
+
exports.isRecord = require_is_record.isRecord;
|
|
35
|
+
exports.isWindowsFilePath = require_is_windows_file_path.isWindowsFilePath;
|
|
36
|
+
exports.reRankSearchResults = require_re_rank_search_results.reRankSearchResults;
|
|
33
37
|
exports.retry = require_retry.retry;
|
|
34
|
-
exports.sanitizeFilename =
|
|
38
|
+
exports.sanitizeFilename = require_sanitize_filename.sanitizeFilename;
|
|
35
39
|
exports.scrubSecretsInText = require_scrub_secrets.scrubSecretsInText;
|
|
36
|
-
exports.smartDecimal =
|
|
37
|
-
exports.sortByProperty =
|
|
38
|
-
exports.sublimeSearch =
|
|
40
|
+
exports.smartDecimal = require_smart_decimal.smartDecimal;
|
|
41
|
+
exports.sortByProperty = require_sort_by_property.sortByProperty;
|
|
42
|
+
exports.sublimeSearch = require_sublime_search.sublimeSearch;
|
|
39
43
|
exports.truncate = require_truncate.truncate;
|
|
40
44
|
exports.truncateBeforeLast = require_truncate.truncateBeforeLast;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { t as assert } from "./assert2.cjs";
|
|
2
|
+
import { t as createEventQueue } from "./create-event-queue2.cjs";
|
|
2
3
|
import { n as EventBus, r as createEventBus, t as CallbackFn } from "./event-bus2.cjs";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
4
|
+
import { t as isWindowsFilePath } from "./is-windows-file-path.cjs";
|
|
5
|
+
import { t as sanitizeFilename } from "./sanitize-filename.cjs";
|
|
6
|
+
import { t as formatPemBlock } from "./format-pem-block2.cjs";
|
|
7
|
+
import { t as generateNanoId } from "./generate-nano-id2.cjs";
|
|
8
|
+
import { t as getJwtExpiry } from "./get-jwt-expiry2.cjs";
|
|
6
9
|
import { t as retry } from "./retry2.cjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { t as sortByProperty } from "./sortByProperty.cjs";
|
|
10
|
+
import { t as smartDecimal } from "./smart-decimal.cjs";
|
|
11
|
+
import { t as reRankSearchResults } from "./re-rank-search-results.cjs";
|
|
12
|
+
import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublime-search.cjs";
|
|
13
|
+
import { t as sortByProperty } from "./sort-by-property.cjs";
|
|
12
14
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.cjs";
|
|
13
15
|
import { a as hasPlaceholderDeep, i as formatPlaceholderPath, n as extractPlaceholderLabels, o as isPlaceholderString, r as findPlaceholderDetails, s as isPlaceholderValue, t as PlaceholderDetail } from "./placeholder2.cjs";
|
|
14
|
-
import { t as getJwtExpiry } from "./jwt2.cjs";
|
|
15
16
|
import { n as SECRET_VALUE_PATTERNS, r as scrubSecretsInText, t as SECRET_KEYS } from "./scrub-secrets2.cjs";
|
|
16
17
|
import { t as DistributiveOmit } from "./types2.cjs";
|
|
17
|
-
|
|
18
|
+
import { t as isRecord } from "./is-record2.cjs";
|
|
19
|
+
export { CallbackFn, DEFAULT_KEYS, DistributiveOmit, EventBus, PlaceholderDetail, SECRET_KEYS, SECRET_VALUE_PATTERNS, assert, createEventBus, createEventQueue, extractPlaceholderLabels, findPlaceholderDetails, formatPemBlock, formatPlaceholderPath, generateNanoId, getJwtExpiry, hasPlaceholderDeep, isPlaceholderString, isPlaceholderValue, isRecord, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, scrubSecretsInText, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { t as assert } from "./assert2.mjs";
|
|
2
|
+
import { t as createEventQueue } from "./create-event-queue2.mjs";
|
|
2
3
|
import { n as EventBus, r as createEventBus, t as CallbackFn } from "./event-bus2.mjs";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
4
|
+
import { t as isWindowsFilePath } from "./is-windows-file-path.mjs";
|
|
5
|
+
import { t as sanitizeFilename } from "./sanitize-filename.mjs";
|
|
6
|
+
import { t as formatPemBlock } from "./format-pem-block2.mjs";
|
|
7
|
+
import { t as generateNanoId } from "./generate-nano-id2.mjs";
|
|
8
|
+
import { t as getJwtExpiry } from "./get-jwt-expiry2.mjs";
|
|
6
9
|
import { t as retry } from "./retry2.mjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { t as sortByProperty } from "./sortByProperty.mjs";
|
|
10
|
+
import { t as smartDecimal } from "./smart-decimal.mjs";
|
|
11
|
+
import { t as reRankSearchResults } from "./re-rank-search-results.mjs";
|
|
12
|
+
import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublime-search.mjs";
|
|
13
|
+
import { t as sortByProperty } from "./sort-by-property.mjs";
|
|
12
14
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.mjs";
|
|
13
15
|
import { a as hasPlaceholderDeep, i as formatPlaceholderPath, n as extractPlaceholderLabels, o as isPlaceholderString, r as findPlaceholderDetails, s as isPlaceholderValue, t as PlaceholderDetail } from "./placeholder2.mjs";
|
|
14
|
-
import { t as getJwtExpiry } from "./jwt2.mjs";
|
|
15
16
|
import { n as SECRET_VALUE_PATTERNS, r as scrubSecretsInText, t as SECRET_KEYS } from "./scrub-secrets2.mjs";
|
|
16
17
|
import { t as DistributiveOmit } from "./types2.mjs";
|
|
17
|
-
|
|
18
|
+
import { t as isRecord } from "./is-record2.mjs";
|
|
19
|
+
export { CallbackFn, DEFAULT_KEYS, DistributiveOmit, EventBus, PlaceholderDetail, SECRET_KEYS, SECRET_VALUE_PATTERNS, assert, createEventBus, createEventQueue, extractPlaceholderLabels, findPlaceholderDetails, formatPemBlock, formatPlaceholderPath, generateNanoId, getJwtExpiry, hasPlaceholderDeep, isPlaceholderString, isPlaceholderValue, isRecord, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, scrubSecretsInText, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { t as assert } from "./assert2.mjs";
|
|
2
|
+
import { t as createEventQueue } from "./create-event-queue2.mjs";
|
|
2
3
|
import { t as createEventBus } from "./event-bus2.mjs";
|
|
3
|
-
import { t as
|
|
4
|
+
import { t as formatPemBlock } from "./format-pem-block2.mjs";
|
|
5
|
+
import { t as generateNanoId } from "./generate-nano-id2.mjs";
|
|
6
|
+
import { t as getJwtExpiry } from "./get-jwt-expiry2.mjs";
|
|
4
7
|
import { t as retry } from "./retry2.mjs";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import { t as sortByProperty } from "./sortByProperty.mjs";
|
|
8
|
+
import { t as smartDecimal } from "./smart-decimal.mjs";
|
|
9
|
+
import { t as reRankSearchResults } from "./re-rank-search-results.mjs";
|
|
10
|
+
import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublime-search.mjs";
|
|
11
|
+
import { t as sortByProperty } from "./sort-by-property.mjs";
|
|
10
12
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.mjs";
|
|
11
|
-
import { t as sanitizeFilename } from "./sanitize.mjs";
|
|
12
|
-
import { t as isWindowsFilePath } from "./path.mjs";
|
|
13
|
+
import { t as sanitizeFilename } from "./sanitize-filename.mjs";
|
|
14
|
+
import { t as isWindowsFilePath } from "./is-windows-file-path.mjs";
|
|
13
15
|
import { a as isPlaceholderString, i as hasPlaceholderDeep, n as findPlaceholderDetails, o as isPlaceholderValue, r as formatPlaceholderPath, t as extractPlaceholderLabels } from "./placeholder2.mjs";
|
|
14
|
-
import { t as getJwtExpiry } from "./jwt2.mjs";
|
|
15
16
|
import { n as SECRET_VALUE_PATTERNS, r as scrubSecretsInText, t as SECRET_KEYS } from "./scrub-secrets2.mjs";
|
|
17
|
+
import { t as isRecord } from "./is-record2.mjs";
|
|
16
18
|
|
|
17
|
-
export { DEFAULT_KEYS, SECRET_KEYS, SECRET_VALUE_PATTERNS, assert, createEventBus, createEventQueue, extractPlaceholderLabels, findPlaceholderDetails, formatPlaceholderPath, generateNanoId, getJwtExpiry, hasPlaceholderDeep, isPlaceholderString, isPlaceholderValue, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, scrubSecretsInText, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
|
19
|
+
export { DEFAULT_KEYS, SECRET_KEYS, SECRET_VALUE_PATTERNS, assert, createEventBus, createEventQueue, extractPlaceholderLabels, findPlaceholderDetails, formatPemBlock, formatPlaceholderPath, generateNanoId, getJwtExpiry, hasPlaceholderDeep, isPlaceholderString, isPlaceholderValue, isRecord, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, scrubSecretsInText, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|