gitarsenal-cli 1.1.24 ā 1.1.26
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
@@ -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
|
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
|
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
|
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:
|
131
|
-
print(f"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
|
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
|
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 =
|
41
|
-
print(f"ā
Set MODAL_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
|
205
|
+
print(f"ā Error during monkey-patching: {e}")
|
204
206
|
|
205
|
-
# Approach 6:
|
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
|
-
|
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
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
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
|
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
|
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 =
|
45
|
-
print(f"ā
Set MODAL_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
|
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
|
-
|
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}")
|