11 Commits

Author SHA1 Message Date
40dad1ba41 Update react monorepo to v18.3.1 2024-04-27 10:01:13 +00:00
Lee
addcc45955 Merge pull request 'Update dependency lucide-react to ^0.376.0' (#8) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 5s
Publish Docker Image / docker (ubuntu-latest) (push) Failing after 47s
Reviewed-on: #8
2024-04-27 09:49:12 +00:00
b5f68477b6 fix ci
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 3s
Publish Docker Image / docker (ubuntu-latest) (push) Failing after 22s
2024-04-26 22:34:33 +01:00
4e541eaa6d fix ci
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 7s
Publish Docker Image / docker (ubuntu-latest) (push) Failing after 25s
2024-04-26 22:32:43 +01:00
3ab87a70cb fix ci
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Successful in 1m10s
Publish Docker Image / docker (ubuntu-latest) (push) Failing after 26s
2024-04-26 22:27:01 +01:00
9af304db35 test Sentry tunnel routing
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Successful in 2m5s
Publish Docker Image / docker (ubuntu-latest) (push) Has been cancelled
2024-04-26 22:24:39 +01:00
8d07092dc4 add Sentry
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m36s
Publish Docker Image / docker (ubuntu-latest) (push) Successful in 4m27s
2024-04-26 22:07:02 +01:00
aa510c6bd3 Update dependency lucide-react to ^0.376.0 2024-04-26 17:01:17 +00:00
46ef8ba4a7 add favicon
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m10s
Publish Docker Image / docker (ubuntu-latest) (push) Successful in 1m36s
2024-04-26 06:49:06 +01:00
7087060393 Merge remote-tracking branch 'origin/master'
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m13s
Publish Docker Image / docker (ubuntu-latest) (push) Successful in 1m16s
2024-04-25 18:53:45 +01:00
0bd54c23f9 fix creating posts 2024-04-25 18:53:40 +01:00
13 changed files with 669 additions and 194 deletions

3
.env
View File

@ -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

View File

@ -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
View File

@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
# Sentry Config File
.sentryclirc

View File

@ -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"

View File

@ -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,
});

View File

@ -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",

736
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

30
sentry.client.config.ts Normal file
View 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
View 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
View 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',
});

View File

@ -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
View 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>
);
}