lumia-plugin 0.2.7 → 0.2.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lumia-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Command-line tools for creating, building, and validating Lumia Stream plugins.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lumia-plugin": "scripts/cli.js"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "Lumia Stream",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@lumiastream/plugin": "^0.2.
|
|
27
|
+
"@lumiastream/plugin": "^0.2.9",
|
|
28
28
|
"jszip": "3.10.1"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/scripts/utils.js
CHANGED
|
@@ -65,8 +65,20 @@ async function readManifest(pluginDir) {
|
|
|
65
65
|
|
|
66
66
|
async function collectFiles(pluginDir, ignore = DEFAULT_IGNORE) {
|
|
67
67
|
const entries = [];
|
|
68
|
+
const visited = new Set();
|
|
68
69
|
|
|
69
70
|
async function walk(currentDir) {
|
|
71
|
+
let realpath = currentDir;
|
|
72
|
+
try {
|
|
73
|
+
realpath = await fs.promises.realpath(currentDir);
|
|
74
|
+
} catch {
|
|
75
|
+
// ignore
|
|
76
|
+
}
|
|
77
|
+
if (visited.has(realpath)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
visited.add(realpath);
|
|
81
|
+
|
|
70
82
|
const list = await fs.promises.readdir(currentDir, { withFileTypes: true });
|
|
71
83
|
for (const entry of list) {
|
|
72
84
|
if (ignore.has(entry.name)) continue;
|
|
@@ -83,6 +95,18 @@ async function collectFiles(pluginDir, ignore = DEFAULT_IGNORE) {
|
|
|
83
95
|
continue;
|
|
84
96
|
}
|
|
85
97
|
|
|
98
|
+
if (entry.isSymbolicLink()) {
|
|
99
|
+
const stats = await fs.promises.stat(absolute).catch(() => null);
|
|
100
|
+
if (stats?.isDirectory()) {
|
|
101
|
+
await walk(absolute);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (stats?.isFile()) {
|
|
105
|
+
entries.push({ absolute, relative: toPosix(relative) });
|
|
106
|
+
}
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
|
|
86
110
|
if (entry.isDirectory()) {
|
|
87
111
|
await walk(absolute);
|
|
88
112
|
} else if (entry.isFile()) {
|