slopcannon 0.1.6 → 0.1.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.
- package/dist/cli.js +17 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1799,10 +1799,24 @@ async function runTui() {
|
|
|
1799
1799
|
return null;
|
|
1800
1800
|
}
|
|
1801
1801
|
try {
|
|
1802
|
-
|
|
1802
|
+
let walkForEnv = function(dir) {
|
|
1803
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
1804
|
+
if (entry.isDirectory()) {
|
|
1805
|
+
if (!SKIP_DIRS.has(entry.name))
|
|
1806
|
+
walkForEnv(path3.join(dir, entry.name));
|
|
1807
|
+
} else if (entry.name.startsWith(".env")) {
|
|
1808
|
+
envFiles.push(path3.relative(info.root, path3.join(dir, entry.name)));
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
const SKIP_DIRS = new Set(["node_modules", ".git", ".claude"]);
|
|
1813
|
+
const envFiles = [];
|
|
1814
|
+
walkForEnv(info.root);
|
|
1803
1815
|
if (envFiles.length > 0) {
|
|
1804
|
-
for (const
|
|
1805
|
-
|
|
1816
|
+
for (const rel of envFiles) {
|
|
1817
|
+
const destDir = path3.join(worktreePath, path3.dirname(rel));
|
|
1818
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
1819
|
+
fs.copyFileSync(path3.join(info.root, rel), path3.join(worktreePath, rel));
|
|
1806
1820
|
}
|
|
1807
1821
|
R2.info(`Copied ${envFiles.join(", ")}`);
|
|
1808
1822
|
}
|