ipx 0.9.6 → 0.9.7
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.
|
@@ -106,7 +106,11 @@ const createFilesystemSource = (options) => {
|
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
|
+
const isWindows = process.platform === "win32";
|
|
109
110
|
function isValidPath(fp) {
|
|
111
|
+
if (isWindows) {
|
|
112
|
+
fp = fp.slice(pathe.parse(fp).root.length);
|
|
113
|
+
}
|
|
110
114
|
if (/[<>:"|?*]/.test(fp)) {
|
|
111
115
|
return false;
|
|
112
116
|
}
|
|
@@ -2,7 +2,7 @@ import defu from 'defu';
|
|
|
2
2
|
import { imageMeta } from 'image-meta';
|
|
3
3
|
import { parseURL, withLeadingSlash, hasProtocol, joinURL, decode } from 'ufo';
|
|
4
4
|
import { promises } from 'fs';
|
|
5
|
-
import { resolve, join } from 'pathe';
|
|
5
|
+
import { resolve, join, parse } from 'pathe';
|
|
6
6
|
import http from 'http';
|
|
7
7
|
import https from 'https';
|
|
8
8
|
import { fetch } from 'ohmyfetch';
|
|
@@ -95,7 +95,11 @@ const createFilesystemSource = (options) => {
|
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
+
const isWindows = process.platform === "win32";
|
|
98
99
|
function isValidPath(fp) {
|
|
100
|
+
if (isWindows) {
|
|
101
|
+
fp = fp.slice(parse(fp).root.length);
|
|
102
|
+
}
|
|
99
103
|
if (/[<>:"|?*]/.test(fp)) {
|
|
100
104
|
return false;
|
|
101
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ipx",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"repository": "unjs/ipx",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"listhen": "^0.2.13",
|
|
27
27
|
"ohmyfetch": "^0.4.18",
|
|
28
28
|
"pathe": "^0.3.0",
|
|
29
|
-
"sharp": "^0.30.
|
|
29
|
+
"sharp": "^0.30.7",
|
|
30
30
|
"ufo": "^0.8.4",
|
|
31
31
|
"xss": "^1.0.13"
|
|
32
32
|
},
|