Skip to content

Commit

Permalink
release: v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi authored Jul 16, 2024
2 parents ab778d4 + 816788c commit 3c654e8
Show file tree
Hide file tree
Showing 90 changed files with 2,818 additions and 878 deletions.
57 changes: 23 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
name: CI

on:
- push
- pull_request
- push:
branches:
- "**"
- pull_request:
branches:
- main

jobs:
cache-and-build:
runs-on: ubuntu-latest
build:
uses: ./.github/workflows/setup.yml
with:
node-version: 20
pnpm-version: 9.5.0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9.4.0
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build project
env:
TURSO_CONNECTION_URL: ${{ secrets.TURSO_CONNECTION_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm build

graphql-diagnostics:
need: build
uses: ./.github/workflows/setup.yml
with:
node-version: 20
pnpm-version: 9.5.0

steps:
- name: Run GraphQL diagnostics
run: pnpm gql:check
44 changes: 44 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Setup

on:
workflow_call:
inputs:
node-version:
required: true
type: string
pnpm-version:
required: true
type: string

jobs:
setup:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: ${{ inputs.pnpm-version }}
run_install: false

- name: Get pnpm store directory
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": false
}
3 changes: 3 additions & 0 deletions apps/www/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# Sentry Config File
.env.sentry-build-plugin
39 changes: 37 additions & 2 deletions apps/www/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { withSentryConfig } from "@sentry/nextjs";
import remarkGfm from "remark-gfm";
import createMDX from "@next/mdx";

/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
experimental: {
serverComponentsExternalPackages: ["@node-rs/argon2"],
serverComponentsExternalPackages: ["@node-rs/argon2", "@sentry/nextjs"],
},
compiler: {
removeConsole: process.env.NODE_ENV === "production",
Expand All @@ -28,4 +29,38 @@ const withMDX = createMDX({
},
});

export default withMDX(nextConfig);
export default withSentryConfig(withMDX(nextConfig), {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "omsimos",
project: "umamin",

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

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

29 changes: 17 additions & 12 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,47 @@
"start": "next start",
"clean": "rm -rf ./node_modules .turbo .next",
"check-types": "tsc --noEmit && gql.tada check",
"lint": "next lint"
"lint": "next lint",
"gql:check": "gql.tada check",
"gql:generate-persisted": "gql.tada generate-persisted",
"gql:generate-schema": "gql.tada generate-schema http://localhost:3000/api/graphql"
},
"dependencies": {
"@fingerprintjs/botd": "^1.9.1",
"@graphql-yoga/plugin-apq": "^3.4.0",
"@graphql-yoga/plugin-csrf-prevention": "^3.4.0",
"@graphql-yoga/plugin-disable-introspection": "^2.4.0",
"@graphql-yoga/plugin-csrf-prevention": "^3.6.0",
"@graphql-yoga/plugin-disable-introspection": "^2.6.0",
"@graphql-yoga/plugin-persisted-operations": "^3.6.0",
"@graphql-yoga/plugin-response-cache": "^3.8.0",
"@hookform/resolvers": "^3.3.4",
"@lucia-auth/adapter-drizzle": "^1.0.7",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.4",
"@next/mdx": "^14.2.5",
"@node-rs/argon2": "^1.8.3",
"@sentry/nextjs": "^8",
"@types/mdx": "^2.0.13",
"@umamin/aes": "workspace:*",
"@umamin/db": "workspace:*",
"@umamin/gql": "workspace:*",
"@umamin/ui": "workspace:*",
"@urql/core": "^5.0.4",
"@urql/exchange-graphcache": "^7.1.1",
"@urql/exchange-persisted": "^4.3.0",
"@urql/next": "^1.1.1",
"arctic": "^1.9.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"date-fns": "^3.6.0",
"firebase": "^10.12.1",
"geist": "^1.3.0",
"gql.tada": "^1.8.0",
"graphql": "^16.8.1",
"graphql-yoga": "^5.4.0",
"gql.tada": "^1.8.2",
"graphql": "^16.9.0",
"graphql-yoga": "^5.6.0",
"lucia": "^3.2.0",
"lucide-react": "^0.358.0",
"lucide-react": "^0.407.0",
"modern-screenshot": "^4.4.39",
"nanoid": "^5.0.7",
"next": "14.2.4",
"next": "14.2.5",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.12",
"oslo": "^1.2.1",
Expand All @@ -60,15 +65,15 @@
"zustand": "^4.5.4"
},
"devDependencies": {
"@0no-co/graphqlsp": "^1.12.9",
"@0no-co/graphqlsp": "^1.12.11",
"@types/node": "^20",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@umamin/eslint-config": "workspace:*",
"@umamin/tsconfig": "workspace:*",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.3",
"eslint-config-next": "14.2.5",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5.4.5"
Expand Down
31 changes: 31 additions & 0 deletions apps/www/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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({
enabled: process.env.NODE_ENV === "production",
dsn: "https://91072fe34a5a53274d5c2372c9a85120@o4507604730183680.ingest.us.sentry.io/4507604736802816",

// 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,
}),
],
});
17 changes: 17 additions & 0 deletions apps/www/sentry.edge.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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({
enabled: process.env.NODE_ENV === "production",
dsn: "https://91072fe34a5a53274d5c2372c9a85120@o4507604730183680.ingest.us.sentry.io/4507604736802816",

// 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 changes: 19 additions & 0 deletions apps/www/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -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({
enabled: process.env.NODE_ENV === "production",
dsn: "https://91072fe34a5a53274d5c2372c9a85120@o4507604730183680.ingest.us.sentry.io/4507604736802816",

// 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',
});
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Link from "next/link";
import dynamic from "next/dynamic";
import { getSession } from "@/lib/auth";
import { redirect } from "next/navigation";
import { LoginForm } from "./components/form";
import { V1Link } from "../components/v1-link";
import { BrowserWarning } from "@umamin/ui/components/browser-warning";
import { V1Link } from "@/app/components/v1-link";

const BrowserWarning = dynamic(
() => import("@umamin/ui/components/browser-warning"),
);

export const metadata = {
title: "Umamin β€” Login",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Link from "next/link";
import dynamic from "next/dynamic";
import { getSession } from "@/lib/auth";
import { redirect } from "next/navigation";
import { V1Link } from "../components/v1-link";
import { RegisterForm } from "./components/form";
import { BrowserWarning } from "@umamin/ui/components/browser-warning";
import { V1Link } from "@/app/components/v1-link";

const BrowserWarning = dynamic(
() => import("@umamin/ui/components/browser-warning"),
);

export const metadata = {
title: "Umamin β€” Register",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3c654e8

Please sign in to comment.