gitarsenal-cli 1.3.9 → 1.3.11
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
@@ -46,8 +46,8 @@ try:
|
|
46
46
|
print(f"✅ Using tokens from proxy server or defaults")
|
47
47
|
except ImportError:
|
48
48
|
# If the module is not available, use hardcoded tokens
|
49
|
-
TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
|
50
|
-
TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
|
49
|
+
# TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
|
50
|
+
# TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
|
51
51
|
print(f"⚠️ Using default tokens")
|
52
52
|
|
53
53
|
print("🔧 Fixing Modal token (basic implementation)...")
|
@@ -26,8 +26,8 @@ try:
|
|
26
26
|
print(f"✅ Using tokens from proxy server or defaults")
|
27
27
|
except ImportError:
|
28
28
|
# If the module is not available, use hardcoded tokens
|
29
|
-
TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
|
30
|
-
TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
|
29
|
+
# TOKEN_ID = "ak-sLhYqCjkvixiYcb9LAuCHp"
|
30
|
+
# TOKEN_SECRET = "as-fPzD0Zm0dl6IFAEkhaH9pq" # Real token secret from fr8mafia profile
|
31
31
|
print(f"⚠️ Using default tokens")
|
32
32
|
|
33
33
|
# Set environment variables
|
@@ -3471,10 +3471,15 @@ def show_usage_examples():
|
|
3471
3471
|
print("│ --volume-name my-persistent-volume │")
|
3472
3472
|
print("└────────────────────────────────────────────────────────────────────────────────────┘\n")
|
3473
3473
|
|
3474
|
-
print("With GitIngest API (
|
3474
|
+
print("With GitIngest API (default)")
|
3475
|
+
print("┌────────────────────────────────────────────────────────────────────────────────────┐")
|
3476
|
+
print("│ gitarsenal --gpu A10G --repo-url https://github.com/username/repo.git │")
|
3477
|
+
print("└────────────────────────────────────────────────────────────────────────────────────┘\n")
|
3478
|
+
|
3479
|
+
print("Without GitIngest API")
|
3475
3480
|
print("┌────────────────────────────────────────────────────────────────────────────────────┐")
|
3476
3481
|
print("│ gitarsenal --gpu A10G --repo-url https://github.com/username/repo.git \\ │")
|
3477
|
-
print("│ --
|
3482
|
+
print("│ --no-gitingest │")
|
3478
3483
|
print("└────────────────────────────────────────────────────────────────────────────────────┘\n")
|
3479
3484
|
|
3480
3485
|
print("With Original API")
|
@@ -3730,8 +3735,9 @@ if __name__ == "__main__":
|
|
3730
3735
|
parser.add_argument('--volume-name', type=str, help='Name of the Modal volume for persistent storage')
|
3731
3736
|
parser.add_argument('--timeout', type=int, default=60, help='Container timeout in minutes (default: 60)')
|
3732
3737
|
parser.add_argument('--ssh-password', type=str, help='SSH password (random if not provided)')
|
3733
|
-
parser.add_argument('--use-api', action='store_true', help='Fetch setup commands from API')
|
3734
|
-
parser.add_argument('--use-gitingest', action='store_true', help='Use gitingest approach to fetch setup commands')
|
3738
|
+
parser.add_argument('--use-api', action='store_true', help='Fetch setup commands from original API')
|
3739
|
+
parser.add_argument('--use-gitingest', action='store_true', default=True, help='Use gitingest approach to fetch setup commands (default)')
|
3740
|
+
parser.add_argument('--no-gitingest', action='store_true', help='Disable gitingest approach for setup commands')
|
3735
3741
|
parser.add_argument('--show-examples', action='store_true', help='Show usage examples')
|
3736
3742
|
|
3737
3743
|
args = parser.parse_args()
|
@@ -3747,23 +3753,27 @@ if __name__ == "__main__":
|
|
3747
3753
|
|
3748
3754
|
# If --use-api flag is set and repo_url is provided, fetch setup commands from API
|
3749
3755
|
|
3750
|
-
#
|
3751
|
-
if args.use_gitingest and args.
|
3752
|
-
print("🔄 Using gitingest approach to fetch setup commands")
|
3756
|
+
# Use gitingest by default unless --no-gitingest is set
|
3757
|
+
if args.repo_url and (args.use_gitingest and not args.no_gitingest):
|
3758
|
+
print("🔄 Using gitingest approach to fetch setup commands (default)")
|
3753
3759
|
api_commands = get_setup_commands_from_gitingest(args.repo_url)
|
3754
3760
|
if api_commands:
|
3755
3761
|
setup_commands = api_commands
|
3756
3762
|
print(f"📋 Using {len(setup_commands)} commands from gitingest API")
|
3757
3763
|
else:
|
3758
|
-
print("⚠️ Failed to get commands from gitingest API
|
3759
|
-
|
3764
|
+
print("⚠️ Failed to get commands from gitingest API")
|
3765
|
+
if not args.use_api:
|
3766
|
+
print("⚠️ Falling back to basic setup commands")
|
3767
|
+
setup_commands = generate_fallback_commands(None)
|
3768
|
+
else:
|
3769
|
+
setup_commands = []
|
3760
3770
|
# If --use-api flag is set and repo_url is provided, fetch setup commands from API
|
3761
3771
|
elif args.use_api and args.repo_url:
|
3762
|
-
print("🔄 Using API to fetch setup commands")
|
3772
|
+
print("🔄 Using original API to fetch setup commands")
|
3763
3773
|
api_commands = fetch_setup_commands_from_api(args.repo_url)
|
3764
3774
|
if api_commands:
|
3765
3775
|
setup_commands = api_commands
|
3766
|
-
print(f"📋 Using {len(setup_commands)} commands from API")
|
3776
|
+
print(f"📋 Using {len(setup_commands)} commands from original API")
|
3767
3777
|
else:
|
3768
3778
|
print("⚠️ Failed to get commands from API, no fallback commands will be used")
|
3769
3779
|
# Do not fall back to basic setup commands
|