-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code formating and standardization (#474)
- Loading branch information
Showing
257 changed files
with
8,969 additions
and
12,321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yarn lint:fix | ||
yarn format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.next | ||
.github | ||
.yarn | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { GET, POST } from "@frames.js/render/next"; | ||
export { GET, POST } from '@frames.js/render/next'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="index.html NAME" content="index.html CONTENT" /> | ||
<meta name="description" content="herocast"> | ||
<meta property="og:site_name" content="herocast"> | ||
<meta property="og:title" content="herocast"> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:description" content="herocast"> | ||
<meta property="og:image" content="/images/herocast_og.png"> | ||
<meta property="og:image:type" content="image/jpeg"> | ||
<meta property="og:image:width" content="1200"> | ||
<meta property="og:image:height" content="737"> | ||
<meta property="og:url" content="https://app.herocast.xyz"> | ||
<meta property="twitter:card" content="summary_large_image"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png"> | ||
<link rel="icon" type="image/x-icon" href="/images/favicon.ico"> | ||
<meta name="description" content="herocast" /> | ||
<meta property="og:site_name" content="herocast" /> | ||
<meta property="og:title" content="herocast" /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:description" content="herocast" /> | ||
<meta property="og:image" content="/images/herocast_og.png" /> | ||
<meta property="og:image:type" content="image/jpeg" /> | ||
<meta property="og:image:width" content="1200" /> | ||
<meta property="og:image:height" content="737" /> | ||
<meta property="og:url" content="https://app.herocast.xyz" /> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png" /> | ||
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png" /> | ||
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png" /> | ||
<link rel="icon" type="image/x-icon" href="/images/favicon.ico" /> | ||
<title>herocast</title> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<!-- <noscript>You need to enable JavaScript to run this app.</noscript> --> | ||
<div id="root"></div> | ||
<script type="module" src="/src/App.tsx"></script> | ||
</body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} **/ | ||
module.exports = { | ||
testEnvironment: "node", | ||
testEnvironment: 'node', | ||
transform: { | ||
"^.+.tsx?$": ["ts-jest",{}], | ||
'^.+.tsx?$': ['ts-jest', {}], | ||
}, | ||
moduleNameMapper: { | ||
"^@/(.*)$": "<rootDir>/src/$1", | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
import { GET, POST } from "@frames.js/render/next"; | ||
import { NextRequest, NextResponse } from "next/server"; | ||
import { GET, POST } from '@frames.js/render/next'; | ||
import { NextRequest, NextResponse } from 'next/server'; | ||
|
||
export async function middleware(req: NextRequest) { | ||
const { pathname } = req.nextUrl; | ||
const { method } = req; | ||
|
||
if (pathname === "/api/frames") { | ||
try { | ||
let response: Response; | ||
|
||
if (method === "GET") { | ||
response = await GET(req); | ||
} else if (method === "POST") { | ||
response = await POST(req); | ||
} else { | ||
return new NextResponse(JSON.stringify({ error: "Method Not Allowed" }), { | ||
status: 405, | ||
headers: { "Content-Type": "application/json" }, | ||
}); | ||
} | ||
|
||
if (response.status === 200) { | ||
const clonedResponse = response.clone(); | ||
const data = await clonedResponse.json(); | ||
} else { | ||
const clonedResponse = response.clone(); | ||
const errorMessage = await clonedResponse.text(); | ||
} | ||
|
||
return response; | ||
} catch (error) { | ||
return new NextResponse(JSON.stringify({ error: "Internal Server Error" }), { | ||
status: 500, | ||
headers: { "Content-Type": "application/json" }, | ||
}); | ||
} | ||
const { pathname } = req.nextUrl; | ||
const { method } = req; | ||
|
||
if (pathname === '/api/frames') { | ||
try { | ||
let response: Response; | ||
|
||
if (method === 'GET') { | ||
response = await GET(req); | ||
} else if (method === 'POST') { | ||
response = await POST(req); | ||
} else { | ||
return new NextResponse(JSON.stringify({ error: 'Method Not Allowed' }), { | ||
status: 405, | ||
headers: { 'Content-Type': 'application/json' }, | ||
}); | ||
} | ||
|
||
if (response.status === 200) { | ||
const clonedResponse = response.clone(); | ||
const data = await clonedResponse.json(); | ||
} else { | ||
const clonedResponse = response.clone(); | ||
const errorMessage = await clonedResponse.text(); | ||
} | ||
|
||
return response; | ||
} catch (error) { | ||
return new NextResponse(JSON.stringify({ error: 'Internal Server Error' }), { | ||
status: 500, | ||
headers: { 'Content-Type': 'application/json' }, | ||
}); | ||
} | ||
} | ||
|
||
return NextResponse.next(); | ||
return NextResponse.next(); | ||
} | ||
|
||
|
||
export const config = { | ||
unstable_allowDynamic: [ | ||
"/node_modules/@protobufjs/inquire/index.js", | ||
], | ||
unstable_allowDynamic: ['/node_modules/@protobufjs/inquire/index.js'], | ||
}; |
Oops, something went wrong.