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 6ad9f66b7..0d2864029 100644 Binary files a/cursor-fullstack/cloudflare/deploy/app.zip and b/cursor-fullstack/cloudflare/deploy/app.zip differ diff --git a/cursor-fullstack/cloudflare/force-update.sh b/cursor-fullstack/cloudflare/force-update.sh new file mode 100755 index 000000000..511491455 --- /dev/null +++ b/cursor-fullstack/cloudflare/force-update.sh @@ -0,0 +1,638 @@ +#!/bin/bash + +# إجبار تحديث الموقع +set -e + +API_TOKEN="avRH6WSd0ueXkJqbQpDdnseVo9fy-fUSIJ1pdrWC" +ACCOUNT_ID="76f5b050419f112f1e9c5fbec1b3970d" +PROJECT_NAME="cursor-ide" + +echo "🔄 إجبار تحديث الموقع..." + +# إنشاء ملف HTML جديد مع timestamp +TIMESTAMP=$(date +%s) +cat > 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)