gitarsenal-cli 1.1.24 → 1.1.25

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": "gitarsenal-cli",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "CLI tool for creating Modal sandboxes with GitHub repositories",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -31,7 +31,7 @@ def fetch_tokens_from_proxy(proxy_url=None, api_key=None):
31
31
  if not proxy_url:
32
32
  proxy_url = os.environ.get("MODAL_PROXY_URL")
33
33
  if proxy_url:
34
- print(f"šŸ“‹ Using proxy URL from environment: {proxy_url}")
34
+ print(f"šŸ“‹ Using proxy URL from environment")
35
35
 
36
36
  if not api_key:
37
37
  api_key = os.environ.get("MODAL_PROXY_API_KEY")
@@ -58,7 +58,7 @@ def fetch_tokens_from_proxy(proxy_url=None, api_key=None):
58
58
 
59
59
  try:
60
60
  # Make the request
61
- print(f"šŸ”„ Fetching tokens from {token_url}")
61
+ print(f"šŸ”„ Fetching tokens from proxy server")
62
62
  response = requests.get(
63
63
  token_url,
64
64
  headers={"X-API-Key": api_key}
@@ -119,7 +119,7 @@ if __name__ == "__main__":
119
119
  # Set proxy URL and API key in environment variables if provided
120
120
  if args.proxy_url:
121
121
  os.environ["MODAL_PROXY_URL"] = args.proxy_url
122
- print(f"āœ… Set MODAL_PROXY_URL from command line: {args.proxy_url}")
122
+ print(f"āœ… Set MODAL_PROXY_URL from command line")
123
123
 
124
124
  if args.proxy_api_key:
125
125
  os.environ["MODAL_PROXY_API_KEY"] = args.proxy_api_key
@@ -127,8 +127,8 @@ if __name__ == "__main__":
127
127
 
128
128
  # Get tokens
129
129
  token_id, token_secret = get_tokens()
130
- print(f"Token ID: {token_id}")
131
- print(f"Token Secret: {token_secret}")
130
+ print(f"Token ID: [HIDDEN]")
131
+ print(f"Token Secret: [HIDDEN]")
132
132
 
133
133
  # Check if tokens are set in environment variables
134
134
  print(f"\nšŸ” DEBUG: Checking environment variables")
@@ -48,7 +48,7 @@ except ImportError:
48
48
  # If the module is not available, use hardcoded tokens
49
49
  TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
50
50
  TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
51
- print(f"āš ļø Using hardcoded tokens")
51
+ print(f"āš ļø Using default tokens")
52
52
 
53
53
  print("šŸ”§ Fixing Modal token (basic implementation)...")
54
54
 
@@ -29,7 +29,7 @@ except ImportError:
29
29
  # If the module is not available, use hardcoded tokens
30
30
  TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
31
31
  TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
32
- print(f"āš ļø Using hardcoded tokens")
32
+ print(f"āš ļø Using default tokens")
33
33
 
34
34
  print("šŸ”§ Advanced Modal Token Fixer")
35
35
 
@@ -37,8 +37,8 @@ print("šŸ”§ Advanced Modal Token Fixer")
37
37
  print("\nšŸ“‹ Approach 1: Setting environment variables")
38
38
  os.environ["MODAL_TOKEN_ID"] = TOKEN_ID
39
39
  os.environ["MODAL_TOKEN_SECRET"] = TOKEN_SECRET
40
- print(f"āœ… Set MODAL_TOKEN_ID = {TOKEN_ID}")
41
- print(f"āœ… Set MODAL_TOKEN_SECRET = {TOKEN_SECRET}")
40
+ print(f"āœ… Set MODAL_TOKEN_ID = [HIDDEN]")
41
+ print(f"āœ… Set MODAL_TOKEN_SECRET = [HIDDEN]")
42
42
 
43
43
  # Approach 2: Create token files in various formats
44
44
  print("\nšŸ“‹ Approach 2: Creating token files in various formats")
@@ -199,29 +199,31 @@ try:
199
199
  setattr(module, func_name, get_token_secret)
200
200
  except Exception as e:
201
201
  print(f" - Error patching {name}.{func_name}: {e}")
202
+
203
+ print(f"āœ… Monkey-patching completed")
202
204
  except Exception as e:
203
- print(f"āŒ Error monkey-patching Modal: {e}")
205
+ print(f"āŒ Error during monkey-patching: {e}")
204
206
 
205
- # Approach 6: Create a test Modal app to verify token
207
+ # Approach 6: Test Modal authentication
206
208
  print("\nšŸ“‹ Approach 6: Testing Modal authentication")
207
209
  try:
208
210
  import modal
209
211
 
210
- print("Creating a test Modal app...")
211
- app = modal.App("test-auth")
212
+ # Create a simple test app
213
+ app = modal.App("test-auth-app")
212
214
 
213
215
  @app.function()
214
216
  def hello():
215
217
  return "Hello, world!"
216
218
 
217
- print("Running the test function...")
218
- try:
219
- with app.run():
220
- result = hello.remote()
221
- print(f"āœ… Successfully ran Modal function: {result}")
222
- print("šŸŽ‰ Modal authentication is working!")
223
- except Exception as e:
224
- print(f"āŒ Error running Modal function: {e}")
219
+ # Try to run the function to test authentication
220
+ print("Creating a test Modal app...")
221
+ with app.run() as running_app:
222
+ print("Running the test function...")
223
+ result = running_app.hello.remote()
224
+ print(f"āœ… Successfully ran Modal function: {result}")
225
+ print("šŸŽ‰ Modal authentication is working!")
226
+
225
227
  except Exception as e:
226
228
  print(f"āŒ Error testing Modal authentication: {e}")
227
229
 
@@ -28,7 +28,7 @@ except ImportError:
28
28
  # If the module is not available, use hardcoded tokens
29
29
  TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
30
30
  TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
31
- print(f"āš ļø Using hardcoded tokens")
31
+ print(f"āš ļø Using default tokens")
32
32
 
33
33
  # Set environment variables
34
34
  os.environ["MODAL_TOKEN_ID"] = TOKEN_ID
@@ -31,7 +31,7 @@ except ImportError:
31
31
  # If the module is not available, use hardcoded tokens
32
32
  TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
33
33
  TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
34
- print(f"āš ļø Using hardcoded tokens")
34
+ print(f"āš ļø Using default tokens")
35
35
 
36
36
  print("šŸ”§ Modal Token Solution - Comprehensive Fix")
37
37
 
@@ -41,8 +41,8 @@ print("šŸ”§ Modal Token Solution - Comprehensive Fix")
41
41
  print("\nšŸ“‹ Approach 1: Setting environment variables")
42
42
  os.environ["MODAL_TOKEN_ID"] = TOKEN_ID
43
43
  os.environ["MODAL_TOKEN_SECRET"] = TOKEN_SECRET
44
- print(f"āœ… Set MODAL_TOKEN_ID = {TOKEN_ID}")
45
- print(f"āœ… Set MODAL_TOKEN_SECRET = {TOKEN_SECRET}")
44
+ print(f"āœ… Set MODAL_TOKEN_ID = [HIDDEN]")
45
+ print(f"āœ… Set MODAL_TOKEN_SECRET = [HIDDEN]")
46
46
 
47
47
  # =====================================================================
48
48
  # Approach 2: Create token files in various formats
@@ -27,7 +27,7 @@ args, unknown = parser.parse_known_args()
27
27
  # Set proxy URL and API key in environment variables if provided
28
28
  if args.proxy_url:
29
29
  os.environ["MODAL_PROXY_URL"] = args.proxy_url
30
- print(f"āœ… Set MODAL_PROXY_URL from command line: {args.proxy_url}")
30
+ print(f"āœ… Set MODAL_PROXY_URL from command line")
31
31
 
32
32
  if args.proxy_api_key:
33
33
  os.environ["MODAL_PROXY_API_KEY"] = args.proxy_api_key
@@ -87,8 +87,19 @@ except Exception as e:
87
87
  text=True
88
88
  )
89
89
 
90
- # Print the output
91
- print(result.stdout)
90
+ # Print the output but hide sensitive information
91
+ output_lines = result.stdout.split('\n')
92
+ for line in output_lines:
93
+ if 'TOKEN_ID' in line or 'TOKEN_SECRET' in line or 'token_id' in line or 'token_secret' in line:
94
+ # Hide the actual token values
95
+ if '=' in line:
96
+ parts = line.split('=', 1)
97
+ if len(parts) == 2:
98
+ print(f"{parts[0]}= [HIDDEN]")
99
+ else:
100
+ print(line.replace('ak-sLhYqCjkvixiYcb9LAuCHp', '[HIDDEN]').replace('as-fPzD0Zm0dl6IFAEkhaH9pq', '[HIDDEN]'))
101
+ else:
102
+ print(line)
92
103
 
93
104
  if result.returncode != 0:
94
105
  print(f"āš ļø Warning: fix_modal_token.py exited with code {result.returncode}")