@n8n/utils 1.21.0 → 1.22.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/files/path.cjs +3 -0
- package/dist/files/path.d.cts +2 -0
- package/dist/files/path.d.mts +2 -0
- package/dist/files/path.mjs +3 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/path.cjs +17 -0
- package/dist/path.cjs.map +1 -0
- package/dist/path.d.cts +5 -0
- package/dist/path.d.mts +5 -0
- package/dist/path.mjs +11 -0
- package/dist/path.mjs.map +1 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -8,11 +8,13 @@ const require_sublimeSearch = require('./sublimeSearch.cjs');
|
|
|
8
8
|
const require_sortByProperty = require('./sortByProperty.cjs');
|
|
9
9
|
const require_truncate = require('./truncate.cjs');
|
|
10
10
|
const require_sanitize = require('./sanitize.cjs');
|
|
11
|
+
const require_path = require('./path.cjs');
|
|
11
12
|
|
|
12
13
|
exports.DEFAULT_KEYS = require_sublimeSearch.DEFAULT_KEYS;
|
|
13
14
|
exports.assert = require_assert.assert;
|
|
14
15
|
exports.createEventBus = require_event_bus.createEventBus;
|
|
15
16
|
exports.createEventQueue = require_event_queue.createEventQueue;
|
|
17
|
+
exports.isWindowsFilePath = require_path.isWindowsFilePath;
|
|
16
18
|
exports.reRankSearchResults = require_reRankSearchResults.reRankSearchResults;
|
|
17
19
|
exports.retry = require_retry.retry;
|
|
18
20
|
exports.sanitizeFilename = require_sanitize.sanitizeFilename;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as assert } from "./assert2.cjs";
|
|
2
2
|
import { n as EventBus, r as createEventBus, t as CallbackFn } from "./event-bus2.cjs";
|
|
3
3
|
import { t as createEventQueue } from "./event-queue2.cjs";
|
|
4
|
+
import { t as isWindowsFilePath } from "./path.cjs";
|
|
4
5
|
import { t as sanitizeFilename } from "./sanitize.cjs";
|
|
5
6
|
import { t as retry } from "./retry2.cjs";
|
|
6
7
|
import { t as smartDecimal } from "./smartDecimal.cjs";
|
|
@@ -8,4 +9,4 @@ import { t as reRankSearchResults } from "./reRankSearchResults.cjs";
|
|
|
8
9
|
import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublimeSearch.cjs";
|
|
9
10
|
import { t as sortByProperty } from "./sortByProperty.cjs";
|
|
10
11
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.cjs";
|
|
11
|
-
export { CallbackFn, DEFAULT_KEYS, EventBus, assert, createEventBus, createEventQueue, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
|
12
|
+
export { CallbackFn, DEFAULT_KEYS, EventBus, assert, createEventBus, createEventQueue, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as assert } from "./assert2.mjs";
|
|
2
2
|
import { n as EventBus, r as createEventBus, t as CallbackFn } from "./event-bus2.mjs";
|
|
3
3
|
import { t as createEventQueue } from "./event-queue2.mjs";
|
|
4
|
+
import { t as isWindowsFilePath } from "./path.mjs";
|
|
4
5
|
import { t as sanitizeFilename } from "./sanitize.mjs";
|
|
5
6
|
import { t as retry } from "./retry2.mjs";
|
|
6
7
|
import { t as smartDecimal } from "./smartDecimal.mjs";
|
|
@@ -8,4 +9,4 @@ import { t as reRankSearchResults } from "./reRankSearchResults.mjs";
|
|
|
8
9
|
import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublimeSearch.mjs";
|
|
9
10
|
import { t as sortByProperty } from "./sortByProperty.mjs";
|
|
10
11
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.mjs";
|
|
11
|
-
export { CallbackFn, DEFAULT_KEYS, EventBus, assert, createEventBus, createEventQueue, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
|
12
|
+
export { CallbackFn, DEFAULT_KEYS, EventBus, assert, createEventBus, createEventQueue, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
package/dist/index.mjs
CHANGED
|
@@ -8,5 +8,6 @@ import { n as sublimeSearch, t as DEFAULT_KEYS } from "./sublimeSearch.mjs";
|
|
|
8
8
|
import { t as sortByProperty } from "./sortByProperty.mjs";
|
|
9
9
|
import { n as truncateBeforeLast, t as truncate } from "./truncate.mjs";
|
|
10
10
|
import { t as sanitizeFilename } from "./sanitize.mjs";
|
|
11
|
+
import { t as isWindowsFilePath } from "./path.mjs";
|
|
11
12
|
|
|
12
|
-
export { DEFAULT_KEYS, assert, createEventBus, createEventQueue, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
|
13
|
+
export { DEFAULT_KEYS, assert, createEventBus, createEventQueue, isWindowsFilePath, reRankSearchResults, retry, sanitizeFilename, smartDecimal, sortByProperty, sublimeSearch, truncate, truncateBeforeLast };
|
package/dist/path.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/files/path.ts
|
|
3
|
+
/**
|
|
4
|
+
* Fast check if file path starts with a windows drive letter, e.g. 'C:/' or 'C:\\'
|
|
5
|
+
*/
|
|
6
|
+
function isWindowsFilePath(str) {
|
|
7
|
+
return /^[a-zA-Z]:[\\/]/.test(str);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
Object.defineProperty(exports, 'isWindowsFilePath', {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return isWindowsFilePath;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=path.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.cjs","names":[],"sources":["../src/files/path.ts"],"sourcesContent":["/**\n * Fast check if file path starts with a windows drive letter, e.g. 'C:/' or 'C:\\\\'\n */\nexport function isWindowsFilePath(str: string) {\n\treturn /^[a-zA-Z]:[\\\\/]/.test(str);\n}\n"],"mappings":";;;;;AAGA,SAAgB,kBAAkB,KAAa;AAC9C,QAAO,kBAAkB,KAAK,IAAI"}
|
package/dist/path.d.cts
ADDED
package/dist/path.d.mts
ADDED
package/dist/path.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/files/path.ts
|
|
2
|
+
/**
|
|
3
|
+
* Fast check if file path starts with a windows drive letter, e.g. 'C:/' or 'C:\\'
|
|
4
|
+
*/
|
|
5
|
+
function isWindowsFilePath(str) {
|
|
6
|
+
return /^[a-zA-Z]:[\\/]/.test(str);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { isWindowsFilePath as t };
|
|
11
|
+
//# sourceMappingURL=path.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.mjs","names":[],"sources":["../src/files/path.ts"],"sourcesContent":["/**\n * Fast check if file path starts with a windows drive letter, e.g. 'C:/' or 'C:\\\\'\n */\nexport function isWindowsFilePath(str: string) {\n\treturn /^[a-zA-Z]:[\\\\/]/.test(str);\n}\n"],"mappings":";;;;AAGA,SAAgB,kBAAkB,KAAa;AAC9C,QAAO,kBAAkB,KAAK,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.22.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"LICENSE.md",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"typescript": "5.9.2",
|
|
35
35
|
"vite": "npm:rolldown-vite@latest",
|
|
36
36
|
"vitest": "^3.1.3",
|
|
37
|
-
"@n8n/
|
|
37
|
+
"@n8n/vitest-config": "1.5.0",
|
|
38
38
|
"@n8n/typescript-config": "1.3.0",
|
|
39
|
-
"@n8n/
|
|
39
|
+
"@n8n/eslint-config": "0.0.1"
|
|
40
40
|
},
|
|
41
41
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
42
42
|
"homepage": "https://n8n.io",
|