From eaeab01fc8a28994376ecd22500fc2082239b427 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 13 Oct 2025 13:47:05 +0000 Subject: [PATCH] Fix: Update frontend with new version and deploy scripts Co-authored-by: fekofal332 --- .../cloudflare/deploy-with-new-token.sh | 692 ++++++++++++++++++ cursor-fullstack/cloudflare/deploy/app.zip | Bin 4728 -> 4728 bytes cursor-fullstack/cloudflare/force-update.sh | 638 ++++++++++++++++ cursor-fullstack/cloudflare/index.html | 7 +- cursor-fullstack/تقرير_الوضع_النهائي.md | 171 ++--- 5 files changed, 1422 insertions(+), 86 deletions(-) create mode 100755 cursor-fullstack/cloudflare/deploy-with-new-token.sh create mode 100755 cursor-fullstack/cloudflare/force-update.sh diff --git a/cursor-fullstack/cloudflare/deploy-with-new-token.sh b/cursor-fullstack/cloudflare/deploy-with-new-token.sh new file mode 100755 index 000000000..c285941e7 --- /dev/null +++ b/cursor-fullstack/cloudflare/deploy-with-new-token.sh @@ -0,0 +1,692 @@ +#!/bin/bash + +# نشر باستخدام التوكن الجديد +set -e + +API_TOKEN="avRH6WSd0ueXkJqbQpDdnseVo9fy-fUSIJ1pdrWC" +ACCOUNT_ID="76f5b050419f112f1e9c5fbec1b3970d" +PROJECT_NAME="cursor-ide" + +echo "🚀 نشر باستخدام التوكن الجديد..." + +# 1. اختبار التوكن +echo "1. اختبار التوكن..." +TOKEN_TEST=$(curl -s -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \ + -H "Authorization: Bearer $API_TOKEN" \ + -H "Content-Type: application/json") + +echo "Token Test: $TOKEN_TEST" + +if echo "$TOKEN_TEST" | grep -q '"success":true'; then + echo "✅ التوكن صحيح" +else + echo "❌ التوكن غير صحيح" + exit 1 +fi + +# 2. إنشاء مجلد جديد +echo "2. إنشاء مجلد جديد..." +rm -rf deploy +mkdir -p deploy +cd deploy + +# 3. إنشاء ملف HTML جديد +echo "3. إنشاء ملف HTML جديد..." +cat > index.html << 'EOF' + + + + + + Cursor AI IDE - بيئة التطوير الذكية + + + +
+
+
+
جاري تحميل Cursor AI IDE...
+
Loading Cursor AI IDE...
+
+
+ + + + +EOF + +# 4. إنشاء manifest.json +echo "4. إنشاء manifest.json..." +cat > manifest.json << 'EOF' +{ + "index.html": "index.html" +} +EOF + +# 5. ضغط الملفات +echo "5. ضغط الملفات..." +zip -r app.zip index.html manifest.json + +# 6. محاولة النشر بطريقة مختلفة +echo "6. محاولة النشر..." + +# محاولة 1: رفع مباشر للملف +echo "محاولة 1: رفع مباشر للملف..." +curl -X PUT "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/$PROJECT_NAME/assets/index.html" \ + -H "Authorization: Bearer $API_TOKEN" \ + -H "Content-Type: text/html" \ + --data-binary @index.html + +echo "" + +# محاولة 2: رفع مع manifest +echo "محاولة 2: رفع مع manifest..." +curl -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/$PROJECT_NAME/deployments" \ + -H "Authorization: Bearer $API_TOKEN" \ + -F "files=@app.zip" \ + -F "manifest=@manifest.json" + +echo "" + +# 7. اختبار الموقع +echo "7. اختبار الموقع..." +sleep 5 + +STATUS=$(curl -s -w "%{http_code}" https://cursor-ide.pages.dev -o /dev/null) +echo "Frontend Status: $STATUS" + +if [ "$STATUS" = "200" ]; then + echo "✅ الموقع يعمل!" +else + echo "❌ الموقع لا يعمل" +fi + +echo "" +echo "🌐 الرابط: https://cursor-ide.pages.dev" +echo "🎉 تم الانتهاء من النشر!" + +cd .. \ No newline at end of file diff --git a/cursor-fullstack/cloudflare/deploy/app.zip b/cursor-fullstack/cloudflare/deploy/app.zip index 6ad9f66b7994c0cf231583bc466a3c5ec578bfba..0d2864029f81e49fea7d5065f52a6326ee752aca 100644 GIT binary patch delta 83 zcmeyN@ index.html << EOF + + + + + + Cursor AI IDE - بيئة التطوير الذكية (v$TIMESTAMP) + + + +
+
+
+
جاري تحميل Cursor AI IDE...
+
Loading Cursor AI IDE... (v$TIMESTAMP)
+
+
+ + + + +EOF + +# رفع الملف الجديد +echo "رفع الملف الجديد..." +curl -X PUT "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/$PROJECT_NAME/assets/index.html" \ + -H "Authorization: Bearer $API_TOKEN" \ + -H "Content-Type: text/html" \ + --data-binary @index.html + +echo "" +echo "✅ تم رفع الملف الجديد!" +echo "🌐 الرابط: https://cursor-ide.pages.dev" +echo "🕐 Timestamp: $TIMESTAMP" + +# انتظار قليل +sleep 10 + +# اختبار الموقع +echo "اختبار الموقع..." +curl -s https://cursor-ide.pages.dev | grep -o "v[0-9]*" | head -1 \ No newline at end of file diff --git a/cursor-fullstack/cloudflare/index.html b/cursor-fullstack/cloudflare/index.html index 0e3f9c8b7..d19d20c98 100644 --- a/cursor-fullstack/cloudflare/index.html +++ b/cursor-fullstack/cloudflare/index.html @@ -3,8 +3,7 @@ - Cursor AI IDE - بيئة التطوير الذكية - + Cursor AI IDE - بيئة التطوير الذكية (v1760363137)