Compare commits
11 Commits
f00bf9499b
...
renovate/m
Author | SHA1 | Date | |
---|---|---|---|
ea5432720a | |||
addcc45955 | |||
b5f68477b6 | |||
4e541eaa6d | |||
3ab87a70cb | |||
9af304db35 | |||
8d07092dc4 | |||
aa510c6bd3 | |||
46ef8ba4a7 | |||
7087060393 | |||
0bd54c23f9 |
3
.env
3
.env
@ -1 +1,2 @@
|
||||
NEXT_PUBLIC_API_ENDPOINT=https://paste.fascinated.cc/api
|
||||
NEXT_PUBLIC_API_ENDPOINT=https://paste.fascinated.cc/api
|
||||
NEXT_PUBLIC_SENTRY_DSN=https://8b4191f7359b498e9609dd9237ed53f5@glitchtip.fascinated.cc/4
|
@ -36,4 +36,6 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
tags: fascinated/paste-frontend:latest
|
||||
tags: fascinated/paste-frontend:latest
|
||||
secrets: |
|
||||
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,3 +34,6 @@ yarn-error.log*
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
# Sentry Config File
|
||||
.sentryclirc
|
||||
|
@ -22,6 +22,10 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Pass the Sentry auth token as a build argument
|
||||
ARG SENTRY_AUTH_TOKEN
|
||||
ENV SENTRY_AUTH_TOKEN $SENTRY_AUTH_TOKEN
|
||||
|
||||
# Disable telemetry during build
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
@ -54,6 +58,9 @@ RUN chown nextjs:nodejs .next
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
# Copy the public folder
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
||||
|
||||
USER nextjs
|
||||
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
|
@ -1,6 +1,23 @@
|
||||
import {withSentryConfig} from "@sentry/nextjs";
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
output: "standalone",
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
export default withSentryConfig(nextConfig, {
|
||||
// For all available options, see:
|
||||
// https://github.com/getsentry/sentry-webpack-plugin#options
|
||||
|
||||
silent: true,
|
||||
org: "paste",
|
||||
project: "frontend",
|
||||
url: "https://glitchtip.fascinated.cc/",
|
||||
}, {
|
||||
// For all available options, see:
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
||||
|
||||
widenClientFileUpload: true,
|
||||
tunnelRoute: "/monitoring",
|
||||
hideSourceMaps: true,
|
||||
disableLogger: true,
|
||||
});
|
@ -13,12 +13,13 @@
|
||||
"@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",
|
||||
"@types/react-syntax-highlighter": "^15.5.11",
|
||||
"@vscode/vscode-languagedetection": "^1.0.22",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.0",
|
||||
"encoding": "^0.1.13",
|
||||
"lucide-react": "^0.373.0",
|
||||
"lucide-react": "^0.376.0",
|
||||
"moment": "^2.30.1",
|
||||
"next": "14.2.3",
|
||||
"next-themes": "^0.3.0",
|
||||
@ -32,7 +33,7 @@
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-next": "14.2.3",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
|
581
pnpm-lock.yaml
generated
581
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
30
sentry.client.config.ts
Normal file
30
sentry.client.config.ts
Normal file
@ -0,0 +1,30 @@
|
||||
// This file configures the initialization of Sentry on the client.
|
||||
// The config you add here will be used whenever a users loads a page in their browser.
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: "https://8b4191f7359b498e9609dd9237ed53f5@glitchtip.fascinated.cc/4",
|
||||
|
||||
// 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,
|
||||
|
||||
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://8b4191f7359b498e9609dd9237ed53f5@glitchtip.fascinated.cc/4",
|
||||
|
||||
// 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,
|
||||
});
|
19
sentry.server.config.ts
Normal file
19
sentry.server.config.ts
Normal file
@ -0,0 +1,19 @@
|
||||
// This file configures the initialization of Sentry on the server.
|
||||
// The config you add here will be used whenever the server handles a request.
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: "https://8b4191f7359b498e9609dd9237ed53f5@glitchtip.fascinated.cc/4",
|
||||
|
||||
// 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,
|
||||
|
||||
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
||||
// spotlight: process.env.NODE_ENV === 'development',
|
||||
|
||||
});
|
@ -31,7 +31,7 @@ export default function Home(): ReactElement {
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "text/plain",
|
||||
},
|
||||
body: value,
|
||||
},
|
||||
|
19
src/app/global-error.jsx
Normal file
19
src/app/global-error.jsx
Normal file
@ -0,0 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import Error from "next/error";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function GlobalError({ error }) {
|
||||
useEffect(() => {
|
||||
Sentry.captureException(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
<Error />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user