@vizejs/vite-plugin 0.381.0 → 0.384.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/index.mjs +14 -2
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3567,6 +3567,7 @@ async function collectInspectorSourceFiles(state) {
|
|
|
3567
3567
|
const paths = await glob(resolveInspectorScanPatterns(state.scanPatterns), {
|
|
3568
3568
|
cwd: state.root,
|
|
3569
3569
|
absolute: true,
|
|
3570
|
+
followSymbolicLinks: false,
|
|
3570
3571
|
ignore: [...state.ignorePatterns, ...INSPECTOR_EXTRA_IGNORE_PATTERNS]
|
|
3571
3572
|
});
|
|
3572
3573
|
const files = [];
|
|
@@ -3574,7 +3575,8 @@ async function collectInspectorSourceFiles(state) {
|
|
|
3574
3575
|
if (!INSPECTOR_FILE_EXTENSION_RE.test(filePath)) continue;
|
|
3575
3576
|
const stat = statFile(filePath);
|
|
3576
3577
|
if (!stat) continue;
|
|
3577
|
-
if (!stat.isFile()) continue;
|
|
3578
|
+
if (!stat.isFile() || stat.isSymbolicLink()) continue;
|
|
3579
|
+
if (!isPathInsideRoot(state.root, filePath)) continue;
|
|
3578
3580
|
files.push({
|
|
3579
3581
|
path: normalizeInspectorPath(state.root, filePath),
|
|
3580
3582
|
source: fs.readFileSync(filePath, "utf-8")
|
|
@@ -3596,9 +3598,19 @@ function resolveInspectorScanPatterns(scanPatterns) {
|
|
|
3596
3598
|
function normalizeInspectorPath(root, filePath) {
|
|
3597
3599
|
return path.relative(root, filePath).split(path.sep).join("/");
|
|
3598
3600
|
}
|
|
3601
|
+
function isPathInsideRoot(root, filePath) {
|
|
3602
|
+
try {
|
|
3603
|
+
const realRoot = fs.realpathSync.native(root);
|
|
3604
|
+
const realFile = fs.realpathSync.native(filePath);
|
|
3605
|
+
const relative = path.relative(realRoot, realFile);
|
|
3606
|
+
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
3607
|
+
} catch {
|
|
3608
|
+
return false;
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3599
3611
|
function statFile(filePath) {
|
|
3600
3612
|
try {
|
|
3601
|
-
return fs.
|
|
3613
|
+
return fs.lstatSync(filePath);
|
|
3602
3614
|
} catch {
|
|
3603
3615
|
return null;
|
|
3604
3616
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.384.0",
|
|
4
4
|
"description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@vizejs/native": "0.
|
|
48
|
+
"@vizejs/native": "0.384.0",
|
|
49
49
|
"oxc-parser": "0.144.0",
|
|
50
50
|
"tinyglobby": "0.2.17",
|
|
51
|
-
"vize": "0.
|
|
51
|
+
"vize": "0.384.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "25.9.2",
|