gitarsenal-cli 1.6.13 → 1.6.14
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/lib/sandbox.js
CHANGED
@@ -110,8 +110,8 @@ async function runContainer(options) {
|
|
110
110
|
// Log the command being executed
|
111
111
|
console.log(chalk.dim(`\nExecuting: python ${args.join(' ')}`));
|
112
112
|
|
113
|
-
//
|
114
|
-
|
113
|
+
// Run the Python script without spinner to avoid terminal interference
|
114
|
+
console.log(chalk.dim('Launching container...'));
|
115
115
|
|
116
116
|
try {
|
117
117
|
// Run the Python script
|
@@ -123,22 +123,22 @@ async function runContainer(options) {
|
|
123
123
|
return new Promise((resolve, reject) => {
|
124
124
|
pythonProcess.on('close', (code) => {
|
125
125
|
if (code === 0) {
|
126
|
-
|
126
|
+
console.log(chalk.green('✅ Container launched successfully'));
|
127
127
|
resolve();
|
128
128
|
} else {
|
129
|
-
|
129
|
+
console.log(chalk.red(`❌ Container launch failed with exit code ${code}`));
|
130
130
|
reject(new Error(`Process exited with code ${code}`));
|
131
131
|
}
|
132
132
|
});
|
133
133
|
|
134
134
|
// Handle process errors
|
135
135
|
pythonProcess.on('error', (error) => {
|
136
|
-
|
136
|
+
console.log(chalk.red(`❌ Failed to start Python process: ${error.message}`));
|
137
137
|
reject(error);
|
138
138
|
});
|
139
139
|
});
|
140
140
|
} catch (error) {
|
141
|
-
|
141
|
+
console.log(chalk.red(`❌ Error launching container: ${error.message}`));
|
142
142
|
throw error;
|
143
143
|
}
|
144
144
|
}
|
package/package.json
CHANGED
@@ -64,15 +64,15 @@ except (ImportError, ValueError) as e:
|
|
64
64
|
modal_dir = Path.home() / ".modal"
|
65
65
|
modal_dir.mkdir(exist_ok=True)
|
66
66
|
token_file = modal_dir / "token.json"
|
67
|
-
with open(token_file, 'w') as f:
|
68
|
-
|
69
|
-
print(f"✅ Created token file at {token_file}")
|
67
|
+
# with open(token_file, 'w') as f:
|
68
|
+
# f.write(f'{{"token_id": "{TOKEN_ID}", "token_secret": "{TOKEN_SECRET}"}}')
|
69
|
+
# print(f"✅ Created token file at {token_file}")
|
70
70
|
|
71
71
|
# Create .modalconfig file
|
72
72
|
modalconfig_file = Path.home() / ".modalconfig"
|
73
|
-
with open(modalconfig_file, 'w') as f:
|
74
|
-
|
75
|
-
|
73
|
+
# with open(modalconfig_file, 'w') as f:
|
74
|
+
# f.write(f"token_id = {TOKEN_ID}\n")
|
75
|
+
# f.write(f"token_secret = {TOKEN_SECRET}\n")
|
76
76
|
print(f"✅ Created .modalconfig file at {modalconfig_file}")
|
77
77
|
|
78
78
|
print("\n✅ Done fixing Modal token. Please try your command again.")
|
@@ -19,23 +19,13 @@ import inspect
|
|
19
19
|
from pathlib import Path
|
20
20
|
import time
|
21
21
|
|
22
|
-
# Try to get tokens from the proxy server
|
23
|
-
try:
|
24
|
-
# First, try to import the fetch_modal_tokens module
|
25
|
-
from fetch_modal_tokens import get_tokens
|
26
|
-
TOKEN_ID, TOKEN_SECRET = get_tokens()
|
27
|
-
# print(f"✅ Using tokens from proxy server or defaults")
|
28
|
-
except ImportError:
|
29
|
-
# If the module is not available, use hardcoded tokens
|
30
|
-
# print(f"⚠️ Using default tokens")
|
31
|
-
print("")
|
32
22
|
|
33
23
|
# print("🔧 Advanced Modal Token Fixer")
|
34
24
|
|
35
25
|
# Approach 1: Set environment variables
|
36
26
|
# print("\n📋 Approach 1: Setting environment variables")
|
37
|
-
os.environ["MODAL_TOKEN_ID"] = TOKEN_ID
|
38
|
-
os.environ["MODAL_TOKEN_SECRET"] = TOKEN_SECRET
|
27
|
+
# os.environ["MODAL_TOKEN_ID"] = TOKEN_ID
|
28
|
+
# os.environ["MODAL_TOKEN_SECRET"] = TOKEN_SECRET
|
39
29
|
# print(f"✅ Set MODAL_TOKEN_ID = [HIDDEN]")
|
40
30
|
# print(f"✅ Set MODAL_TOKEN_SECRET = [HIDDEN]")
|
41
31
|
|