gitarsenal-cli 1.0.0 → 1.0.2
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/bin/gitarsenal.js +47 -25
- package/lib/sandbox.js +8 -2
- package/package.json +1 -1
- package/python/test_modalSandboxScript.py +2338 -28
- package/scripts/postinstall.js +13 -2
package/scripts/postinstall.js
CHANGED
@@ -22,10 +22,21 @@ async function postinstall() {
|
|
22
22
|
// Create the Python directory if it doesn't exist
|
23
23
|
await fs.ensureDir(pythonScriptDir);
|
24
24
|
|
25
|
-
// Check if the
|
25
|
+
// Check if the Python script already exists and has content
|
26
26
|
let scriptFound = false;
|
27
|
+
if (await fs.pathExists(pythonScriptPath)) {
|
28
|
+
const stats = await fs.stat(pythonScriptPath);
|
29
|
+
// If the file is larger than 5KB, assume it's the full script
|
30
|
+
if (stats.size > 5000) {
|
31
|
+
console.log(chalk.green('✅ Found existing full Python script. Keeping it.'));
|
32
|
+
scriptFound = true;
|
33
|
+
} else {
|
34
|
+
console.log(chalk.yellow('⚠️ Existing Python script appears to be minimal. Looking for full version...'));
|
35
|
+
}
|
36
|
+
}
|
27
37
|
|
28
|
-
if
|
38
|
+
// Check if the original script exists
|
39
|
+
if (!scriptFound && await fs.pathExists(originalScriptPath)) {
|
29
40
|
console.log(chalk.green('✅ Found original Python script in mcp-server'));
|
30
41
|
await fs.copy(originalScriptPath, pythonScriptPath);
|
31
42
|
scriptFound = true;
|