From 6b71c32652296a6bb6d21a75b9537c6a86315770 Mon Sep 17 00:00:00 2001 From: "timtimtim.eth" Date: Tue, 20 May 2025 22:54:12 -0700 Subject: [PATCH 1/4] fix: manifest.json --- public/.well-known/farcaster.json | 17 +++++++++++++++++ public/.well-known/route.ts | 25 ------------------------- 2 files changed, 17 insertions(+), 25 deletions(-) create mode 100644 public/.well-known/farcaster.json delete mode 100644 public/.well-known/route.ts diff --git a/public/.well-known/farcaster.json b/public/.well-known/farcaster.json new file mode 100644 index 0000000..c4607e0 --- /dev/null +++ b/public/.well-known/farcaster.json @@ -0,0 +1,17 @@ +{ + "frame": { + "version": "1", + "name": "Chain of Thorns", + "subtitle": "Rule, Strategize, Conquer.", + "description": "Enter a decentralized battlefield where negotiation and blockchain-powered strategy define your path to victory.", + "iconUrl": "https://chainofthrone.vercel.app/images/Logo.png", + "homeUrl": "https://chainofthrone.vercel.app/", + "imageUrl": "https://chainofthrone.vercel.app/images/open-graph.png", + "buttonTitle": "🚩 Start Battle", + "primaryCategorySchema": "games", + "splashImageUrl": "https://chainofthrone.vercel.app/images/splash.png", + "splashBackgroundColor": "#F5F5F5", + "requiredChains": ["eip155:10143"], + "requiredCapabilities": ["actions.signIn", "wallet.getEvmProvider"] + } +} diff --git a/public/.well-known/route.ts b/public/.well-known/route.ts deleted file mode 100644 index 67d8293..0000000 --- a/public/.well-known/route.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NextResponse } from "next/server"; -import { APP_URL } from "@/lib/constants/contracts"; - -export async function GET() { - const farcasterConfig = { - frame: { - version: "1", - name: "Chain of Thorns", - subtitle: "Rule, Strategize, Conquer.", - description: - "Enter a decentralized battlefield where negotiation and blockchain-powered strategy define your path to victory.", - iconUrl: `${APP_URL}/images/icon.png`, - homeUrl: `${APP_URL}`, - imageUrl: `${APP_URL}/images/open-graph.png`, - buttonTitle: "🚩 Start Battle", - primaryCategorySchema: "games", - splashImageUrl: `${APP_URL}/images/splash.png`, - splashBackgroundColor: "#F5F5F5", - requiredChains: ["eip155:10143"], - requiredCapabilities: ["actions.signIn", "wallet.getEvmProvider"], - }, - }; - - return NextResponse.json(farcasterConfig); -} From 34ba5f71a856a9081d43c870d64369c19d98b093 Mon Sep 17 00:00:00 2001 From: "timtimtim.eth" Date: Tue, 20 May 2025 22:57:54 -0700 Subject: [PATCH 2/4] fix: workflow issue --- .github/workflows/nextjs.yml | 54 ++++++++++++------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index ab10e72..ce3cfd7 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -31,62 +31,44 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Detect package manager - id: detect-package-manager - run: | - if [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then - echo "manager=pnpm" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=pnpm" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=yarn" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - echo "runner=npx --no-install" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - - name: Setup Node + + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20" - cache: ${{ steps.detect-package-manager.outputs.manager }} + - name: Setup pnpm - if: steps.detect-package-manager.outputs.manager == 'pnpm' uses: pnpm/action-setup@v2 with: version: 8 run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - name: Setup Pages uses: actions/configure-pages@v5 with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - # - # You may remove this line if you want to manage the configuration yourself. static_site_generator: next + - name: Restore cache uses: actions/cache@v4 with: path: | .next/cache - ${{ steps.detect-package-manager.outputs.manager == 'pnpm' && '~/.pnpm-store' || '' }} - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. + ${{ env.STORE_PATH }} + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/package-lock.json', '**/yarn.lock') }}- + ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- + - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + run: pnpm install + - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build + run: pnpm build + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: From 7421add4708d77a33361a3b3a0cd8ca15dbb115b Mon Sep 17 00:00:00 2001 From: "timtimtim.eth" Date: Tue, 20 May 2025 23:00:28 -0700 Subject: [PATCH 3/4] fix: pnpm cache issue --- .github/workflows/nextjs.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index ce3cfd7..bbff7de 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -32,17 +32,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Setup pnpm uses: pnpm/action-setup@v2 with: version: 8 run_install: false + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "pnpm" + - name: Get pnpm store directory shell: bash run: | From 86991a21646d613a5ea01b4b0a4844eceaa924d4 Mon Sep 17 00:00:00 2001 From: "timtimtim.eth" Date: Tue, 20 May 2025 23:04:14 -0700 Subject: [PATCH 4/4] fix: workflow issue --- .github/workflows/nextjs.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index bbff7de..f7ce6d2 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -49,21 +49,6 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - static_site_generator: next - - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - .next/cache - ${{ env.STORE_PATH }} - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- - - name: Install dependencies run: pnpm install