Compare commits
46 Commits
2954dd4955
...
renovate/t
Author | SHA1 | Date | |
---|---|---|---|
1d7ad49058 | |||
96ab998031 | |||
7de2848f45 | |||
63fead44c3 | |||
f8aa41ed05 | |||
50e6506fc4 | |||
2a6488d4e5 | |||
7be126fe00 | |||
0ef741381c | |||
51ac278329 | |||
9996df2f92 | |||
c1c74ffef7 | |||
cf0e595cfc | |||
2efcb4a780 | |||
50037d9090 | |||
8a1263a1dd | |||
137de19133 | |||
c9c79c1f29 | |||
65d0cc7807 | |||
d44ace3f20 | |||
5b251e07ad | |||
636b0dde29 | |||
634cf8877a | |||
6ee34eaf44 | |||
d51215a781 | |||
22dba0bc90 | |||
78ff92eed3 | |||
7e73cc3e8c | |||
49cae6930b | |||
33ab92f579 | |||
db6af18475 | |||
a2cd3d0cf5 | |||
916ee81302 | |||
28aa81036f | |||
5fde0f46c5 | |||
5a4056f113 | |||
08e270da6f | |||
b2fbcb6ebf | |||
7b602d64f8 | |||
4026b08b42 | |||
d5b48e8bc9 | |||
d3886e4a39 | |||
94b81e0d69 | |||
35e786d9a5 | |||
9278a23f5a | |||
35ad8b458b |
3
.gitignore
vendored
3
.gitignore
vendored
@ -50,3 +50,6 @@ next-env.d.ts
|
||||
# Sitemap & Robots
|
||||
/public/sitemap*
|
||||
/public/robots.txt
|
||||
|
||||
# Sentry Config File
|
||||
.env.sentry-build-plugin
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
import {withSentryConfig} from "@sentry/nextjs";
|
||||
import nextBuildId from "next-build-id";
|
||||
import { fileURLToPath } from "url";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
/**
|
||||
* The current git commit hash.
|
||||
@ -37,29 +37,38 @@ const nextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export default withSentryConfig(
|
||||
nextConfig,
|
||||
{
|
||||
// For all available options, see:
|
||||
// https://github.com/getsentry/sentry-webpack-plugin#options
|
||||
silent: true,
|
||||
org: "minecraft-utilities",
|
||||
project: "frontend",
|
||||
url: "https://glitchtip.fascinated.cc/",
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN || "",
|
||||
release: `frontend@${buildId}`,
|
||||
},
|
||||
{
|
||||
// For all available options, see:
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
||||
export default withSentryConfig(nextConfig, {
|
||||
// For all available options, see:
|
||||
// https://github.com/getsentry/sentry-webpack-plugin#options
|
||||
|
||||
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
||||
widenClientFileUpload: true,
|
||||
org: "minecraft-utilities",
|
||||
project: "frontend",
|
||||
sentryUrl: "https://glitchtip.fascinated.cc/",
|
||||
|
||||
// Hides source maps from generated client bundles
|
||||
hideSourceMaps: true,
|
||||
// Only print logs for uploading source maps in CI
|
||||
silent: !process.env.CI,
|
||||
|
||||
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
||||
disableLogger: true,
|
||||
},
|
||||
);
|
||||
// For all available options, see:
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
||||
|
||||
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
||||
widenClientFileUpload: true,
|
||||
|
||||
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
|
||||
// This can increase your server load as well as your hosting bill.
|
||||
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
|
||||
// side errors will fail.
|
||||
// tunnelRoute: "/monitoring",
|
||||
|
||||
// Hides source maps from generated client bundles
|
||||
hideSourceMaps: true,
|
||||
|
||||
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
||||
disableLogger: true,
|
||||
|
||||
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
|
||||
// See the following for more information:
|
||||
// https://docs.sentry.io/product/crons/
|
||||
// https://vercel.com/docs/cron-jobs
|
||||
automaticVercelMonitors: true,
|
||||
});
|
@ -25,14 +25,14 @@
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-toast": "^1.1.5",
|
||||
"@radix-ui/react-tooltip": "^1.0.7",
|
||||
"@sentry/nextjs": "^7.105.0",
|
||||
"@sentry/nextjs": "^8.20.0",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clipboard-copy": "^4.0.1",
|
||||
"clsx": "^2.1.0",
|
||||
"cmdk": "^1.0.0",
|
||||
"fuse.js": "^7.0.0",
|
||||
"lucide-react": "^0.402.0",
|
||||
"lucide-react": "^0.451.0",
|
||||
"mcutils-library": "^1.3.1",
|
||||
"moment": "^2.30.1",
|
||||
"next": "14.2.5",
|
||||
@ -44,7 +44,7 @@
|
||||
"react-dom": "^18",
|
||||
"react-spinners": "^0.14.0",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"react-use-websocket": "4.8.1",
|
||||
"react-use-websocket": "4.9.0",
|
||||
"read-file": "^0.2.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"remote-mdx": "^0.0.8",
|
||||
|
12858
pnpm-lock.yaml
generated
12858
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -12,4 +12,19 @@ Sentry.init({
|
||||
|
||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
||||
debug: false,
|
||||
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
|
||||
// This sets the sample rate to be 10%. You may want this to be 100% while
|
||||
// in development and sample at a lower rate in production
|
||||
replaysSessionSampleRate: 0.1,
|
||||
|
||||
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
|
||||
integrations: [
|
||||
Sentry.replayIntegration({
|
||||
// Additional Replay configuration goes in here, for example:
|
||||
maskAllText: true,
|
||||
blockAllMedia: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
16
sentry.edge.config.ts
Normal file
16
sentry.edge.config.ts
Normal file
@ -0,0 +1,16 @@
|
||||
// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).
|
||||
// The config you add here will be used whenever one of the edge features is loaded.
|
||||
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: "https://25aaa031240f4d659649d28e0a3fb0cb@glitchtip.fascinated.cc/1",
|
||||
|
||||
// Adjust this value in production, or use tracesSampler for greater control
|
||||
tracesSampleRate: 1,
|
||||
|
||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
||||
debug: false,
|
||||
});
|
@ -13,6 +13,7 @@ Sentry.init({
|
||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
||||
debug: false,
|
||||
|
||||
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
||||
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
||||
// spotlight: process.env.NODE_ENV === 'development',
|
||||
|
||||
});
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { Card } from "@/app/components/card";
|
||||
import { Colors } from "@/app/common/colors";
|
||||
import { generateEmbed } from "@/app/common/embed";
|
||||
import { capitalizeFirstLetter } from "@/app/common/string-utils";
|
||||
import { cn } from "@/app/common/utils";
|
||||
import { Card } from "@/app/components/card";
|
||||
import { Title } from "@/app/components/title";
|
||||
import { CachedEndpointStatus, getMojangEndpointStatus, Status } from "mcutils-library";
|
||||
import { Metadata, Viewport } from "next";
|
||||
import Link from "next/link";
|
||||
import { ReactElement } from "react";
|
||||
import { Colors } from "@/app/common/colors";
|
||||
import { Title } from "@/app/components/title";
|
||||
|
||||
/**
|
||||
* Force the page to be dynamic, so it will be regenerated on every request
|
||||
@ -89,20 +89,19 @@ export default async function Page(): Promise<ReactElement> {
|
||||
>
|
||||
{endpoints.length == 0 && <p>Unable to fetch endpoint statuses</p>}
|
||||
{endpoints.length > 0 &&
|
||||
endpoints.map((endpoint: CachedEndpointStatus) => {
|
||||
const { name, hostname, status } = endpoint;
|
||||
endpoints.map((server: CachedEndpointStatus) => {
|
||||
const { name, endpoint, status } = server;
|
||||
|
||||
const url = `https://${hostname}`;
|
||||
return (
|
||||
<div key={name} className="flex flex-row justify-between pt-2">
|
||||
<div className="flex flex-col leading-[1.5rem]">
|
||||
<p className="font-semibold">{name}</p>
|
||||
<Link
|
||||
href={url}
|
||||
href={endpoint}
|
||||
className="text-sm text-primary hover:opacity-75 transition-all transform-gpu"
|
||||
target="_blank"
|
||||
>
|
||||
<p>{url}</p>
|
||||
<p>{endpoint}</p>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={cn("flex items-center font-semibold", getColor(status))}>
|
||||
|
@ -1,4 +1,4 @@
|
||||
const HASTE_URL: string = "https://paste.fascinated.cc";
|
||||
const PASTE_URL: string = "https://paste.fascinated.cc";
|
||||
|
||||
/**
|
||||
* Creates a new haste with the given content.
|
||||
@ -7,11 +7,11 @@ const HASTE_URL: string = "https://paste.fascinated.cc";
|
||||
* @returns the URL of the created haste
|
||||
*/
|
||||
export async function createHaste(content: string): Promise<string> {
|
||||
const response = await fetch(`${HASTE_URL}/api/upload`, {
|
||||
const response = await fetch(`${PASTE_URL}/api/upload`, {
|
||||
method: "POST",
|
||||
body: content,
|
||||
});
|
||||
|
||||
const { id } = await response.json();
|
||||
return `${HASTE_URL}/${id}`;
|
||||
return `${PASTE_URL}/${id}`;
|
||||
}
|
||||
|
9
src/instrumentation.ts
Normal file
9
src/instrumentation.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
await import('../sentry.server.config');
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === 'edge') {
|
||||
await import('../sentry.edge.config');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user