gitarsenal-cli 1.9.3 → 1.9.5
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/.venv_status.json +1 -1
- package/bin/gitarsenal.js +5 -5
- package/lib/sandbox.js +4 -2
- package/package.json +2 -1
- package/scripts/postinstall.js +35 -13
package/.venv_status.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"created":"2025-08-
|
|
1
|
+
{"created":"2025-08-03T17:35:41.855Z","packages":["modal","gitingest","requests"],"uv_version":"uv 0.8.4 (e176e1714 2025-07-30)"}
|
package/bin/gitarsenal.js
CHANGED
|
@@ -39,7 +39,7 @@ function activateVirtualEnvironment() {
|
|
|
39
39
|
if (fs.existsSync(statusFile)) {
|
|
40
40
|
try {
|
|
41
41
|
const status = JSON.parse(fs.readFileSync(statusFile, 'utf8'));
|
|
42
|
-
console.log(chalk.gray(`✅ Virtual environment created: ${status.created}`));
|
|
42
|
+
// console.log(chalk.gray(`✅ Virtual environment created: ${status.created}`));
|
|
43
43
|
console.log(chalk.gray(`📦 Packages: ${status.packages.join(', ')}`));
|
|
44
44
|
} catch (error) {
|
|
45
45
|
console.log(chalk.gray('✅ Virtual environment found'));
|
|
@@ -62,16 +62,16 @@ function activateVirtualEnvironment() {
|
|
|
62
62
|
path.join(venvPath, 'bin', 'pip');
|
|
63
63
|
|
|
64
64
|
// Determine which structure exists
|
|
65
|
-
console.log(chalk.gray(`🔍 Checking virtual environment structure:`));
|
|
66
|
-
console.log(chalk.gray(` Python: ${uvPythonPath} (exists: ${fs.existsSync(uvPythonPath)})`));
|
|
67
|
-
console.log(chalk.gray(` Pip: ${uvPipPath} (exists: ${fs.existsSync(uvPipPath)})`));
|
|
65
|
+
// console.log(chalk.gray(`🔍 Checking virtual environment structure:`));
|
|
66
|
+
// console.log(chalk.gray(` Python: ${uvPythonPath} (exists: ${fs.existsSync(uvPythonPath)})`));
|
|
67
|
+
// console.log(chalk.gray(` Pip: ${uvPipPath} (exists: ${fs.existsSync(uvPipPath)})`));
|
|
68
68
|
|
|
69
69
|
// For uv virtual environments, we only need Python to exist
|
|
70
70
|
// uv doesn't create a pip executable, it uses 'uv pip' instead
|
|
71
71
|
if (fs.existsSync(uvPythonPath)) {
|
|
72
72
|
pythonPath = uvPythonPath;
|
|
73
73
|
pipPath = 'uv pip'; // Use uv pip instead of pip executable
|
|
74
|
-
console.log(chalk.gray('✅ Found uv-style virtual environment'));
|
|
74
|
+
// console.log(chalk.gray('✅ Found uv-style virtual environment'));
|
|
75
75
|
} else if (fs.existsSync(traditionalPythonPath) && fs.existsSync(traditionalPipPath)) {
|
|
76
76
|
pythonPath = traditionalPythonPath;
|
|
77
77
|
pipPath = traditionalPipPath;
|
package/lib/sandbox.js
CHANGED
|
@@ -67,7 +67,8 @@ async function runContainer(options) {
|
|
|
67
67
|
console.log(chalk.dim(`\nExecuting: python ${args.join(' ')}`));
|
|
68
68
|
|
|
69
69
|
// Run the Python script with show examples flag
|
|
70
|
-
const
|
|
70
|
+
const pythonExecutable = process.env.PYTHON_EXECUTABLE || 'python';
|
|
71
|
+
const pythonProcess = spawn(pythonExecutable, args, {
|
|
71
72
|
stdio: 'inherit' // Inherit stdio to show real-time output
|
|
72
73
|
});
|
|
73
74
|
|
|
@@ -115,7 +116,8 @@ async function runContainer(options) {
|
|
|
115
116
|
|
|
116
117
|
try {
|
|
117
118
|
// Run the Python script
|
|
118
|
-
const
|
|
119
|
+
const pythonExecutable = process.env.PYTHON_EXECUTABLE || 'python';
|
|
120
|
+
const pythonProcess = spawn(pythonExecutable, args, {
|
|
119
121
|
stdio: 'inherit' // Inherit stdio to show real-time output
|
|
120
122
|
});
|
|
121
123
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitarsenal-cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "CLI tool for creating Modal sandboxes with GitHub repositories",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"author": "",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@supabase/supabase-js": "^2.53.0",
|
|
24
25
|
"boxen": "^5.1.2",
|
|
25
26
|
"chalk": "^4.1.2",
|
|
26
27
|
"commander": "^9.4.1",
|
package/scripts/postinstall.js
CHANGED
|
@@ -25,13 +25,35 @@ async function checkAndInstallUv() {
|
|
|
25
25
|
} catch (error) {
|
|
26
26
|
console.log(chalk.yellow('⚠️ uv not found. Attempting to install...'));
|
|
27
27
|
|
|
28
|
-
//
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
// Detect platform for appropriate installation methods
|
|
29
|
+
const platform = process.platform;
|
|
30
|
+
let installMethods = [];
|
|
31
|
+
|
|
32
|
+
if (platform === 'darwin') {
|
|
33
|
+
// macOS - prioritize Homebrew
|
|
34
|
+
installMethods = [
|
|
35
|
+
'brew install uv',
|
|
36
|
+
'curl -LsSf https://astral.sh/uv/install.sh | sh',
|
|
37
|
+
'pip3 install uv',
|
|
38
|
+
'cargo install uv'
|
|
39
|
+
];
|
|
40
|
+
} else if (platform === 'win32') {
|
|
41
|
+
// Windows - use PowerShell script and pip
|
|
42
|
+
installMethods = [
|
|
43
|
+
'powershell -c "irm https://astral.sh/uv/install.ps1 | iex"',
|
|
44
|
+
'pip install uv',
|
|
45
|
+
'pip3 install uv',
|
|
46
|
+
'cargo install uv'
|
|
47
|
+
];
|
|
48
|
+
} else {
|
|
49
|
+
// Linux and others
|
|
50
|
+
installMethods = [
|
|
51
|
+
'curl -LsSf https://astral.sh/uv/install.sh | sh',
|
|
52
|
+
'pip3 install uv',
|
|
53
|
+
'pip install uv',
|
|
54
|
+
'cargo install uv'
|
|
55
|
+
];
|
|
56
|
+
}
|
|
35
57
|
|
|
36
58
|
for (const method of installMethods) {
|
|
37
59
|
try {
|
|
@@ -43,6 +65,12 @@ async function checkAndInstallUv() {
|
|
|
43
65
|
env: { ...process.env, SHELL: '/bin/bash' },
|
|
44
66
|
stdio: 'inherit'
|
|
45
67
|
});
|
|
68
|
+
} else if (method.includes('powershell')) {
|
|
69
|
+
// For Windows PowerShell installation
|
|
70
|
+
await execAsync(method, {
|
|
71
|
+
shell: 'powershell.exe',
|
|
72
|
+
stdio: 'inherit'
|
|
73
|
+
});
|
|
46
74
|
} else {
|
|
47
75
|
await execAsync(method, { stdio: 'inherit' });
|
|
48
76
|
}
|
|
@@ -55,12 +83,6 @@ async function checkAndInstallUv() {
|
|
|
55
83
|
console.log(chalk.gray(`⚠️ ${method} failed: ${installError.message}`));
|
|
56
84
|
}
|
|
57
85
|
}
|
|
58
|
-
|
|
59
|
-
console.log(chalk.yellow('⚠️ Could not install uv automatically'));
|
|
60
|
-
console.log(chalk.yellow('💡 Please install uv manually:'));
|
|
61
|
-
console.log(chalk.yellow(' curl -LsSf https://astral.sh/uv/install.sh | sh'));
|
|
62
|
-
console.log(chalk.yellow(' or: pip install uv'));
|
|
63
|
-
console.log(chalk.yellow(' or: cargo install uv'));
|
|
64
86
|
return false;
|
|
65
87
|
}
|
|
66
88
|
}
|