Skip to content

Commit

Permalink
chore(package.json): update devDependencies (#173)
Browse files Browse the repository at this point in the history
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx): update import paths for db and schema
fix(page.tsx):

chore(newsletter.tsx): fix id attribute case from 'id='email'' to 'id="email"'
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root-layout.tsx): change variable declarations to use const instead of let
chore(root

chore(web): update dependencies in package.json
fix(web): update import path for db module in update-stripe-usage.ts
fix(web): update import path for db module in webhooks.ts
chore(nextjs): update dependencies in package.json
chore(root): update devDependencies in package.json
chore(db): update dependencies in package.json
chore(db): remove unused db.ts file
fix(db): update import paths and types in index.ts and types.ts

chore(db): remove tsup.config.js file
chore(emails): update devDependencies versions
chore(id): update devDependencies versions
chore(nuxt): update dependencies and devDependencies versions
chore(policies): update devDependencies versions
chore(sdk): update devDependencies versions
chore(bootstrap): update dependencies and devDependencies versions
chore(k6): update k6 dependency version
chore(migrate): update dependencies and devDependencies versions
  • Loading branch information
chronark authored Jul 23, 2023
1 parent 48b26db commit 7ad7011
Show file tree
Hide file tree
Showing 54 changed files with 1,733 additions and 2,646 deletions.
6 changes: 3 additions & 3 deletions apps/checkly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"author": "Andreas Thomas",
"license": "ISC",
"devDependencies": {
"@types/node": "20.3.1",
"@types/node": "20.4.4",
"@unkey/tsconfig": "workspace:^",
"checkly": "^4.0.9",
"checkly": "^4.0.12",
"dotenv-cli": "^7.2.1",
"typescript": "latest",
"typescript": "^5.1.6",
"zod": "^3.21.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTenantId } from "@/lib/auth";
import { db, schema, eq } from "@unkey/db";
import { db, schema, eq } from "@/lib/db";
import { notFound } from "next/navigation";
import { getDailyUsage } from "@/lib/tinybird";
import { fillRange } from "@/lib/utils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTenantId } from "@/lib/auth";
import { db, schema, eq } from "@unkey/db";
import { db, schema, eq } from "@/lib/db";
import { redirect } from "next/navigation";
import { CreateKey } from "@/app/(authenticated)/(app)/app/[apiId]/create-key";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTenantId } from "@/lib/auth";
import { db, schema, eq, type Key } from "@unkey/db";
import { db, schema, eq, type Key } from "@/lib/db";
import { redirect } from "next/navigation";

import { ApiKeyTable } from "@/components/dashboard/api-key-table";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/[apiId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { getTenantId } from "@/lib/auth";
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import Link from "next/link";
import { redirect } from "next/navigation";
import { PropsWithChildren } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/[apiId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ColumnChart } from "@/components/dashboard/charts";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { getTenantId } from "@/lib/auth";
import { fillRange } from "@/lib/utils";
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { getTotalActiveKeys, getDailyUsage } from "@/lib/tinybird";
import { sql } from "drizzle-orm";
import { redirect } from "next/navigation";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/apis/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PageHeader } from "@/components/dashboard/page-header";
import { CreateApiButton } from "./create-api-button";

import { getTenantId } from "@/lib/auth";
import { db, schema, eq, sql } from "@unkey/db";
import { db, schema, eq, sql } from "@/lib/db";
import { redirect } from "next/navigation";
import { Separator } from "@/components/ui/separator";
import Link from "next/link";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/desktop-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BarChart, BookOpen, FileJson, Settings } from "lucide-react";
import Link from "next/link";
import { ApiLink } from "./api-link";
import { WorkspaceSwitcher } from "./team-switcher";
import type { Workspace } from "@unkey/db";
import type { Workspace } from "@/lib/db";
type Props = {
workspace: Workspace & {
apis: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { notFound } from "next/navigation";

import { getTenantId } from "@/lib/auth";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/keys/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PageHeader } from "@/components/dashboard/page-header";
import { Separator } from "@/components/ui/separator";
import { getTenantId } from "@/lib/auth";
import { db, eq, schema, type Key } from "@unkey/db";
import { db, eq, schema, type Key } from "@/lib/db";
import { redirect } from "next/navigation";
import { ApiKeyTable } from "@/components/dashboard/api-key-table";
import { CreateRootKeyButton } from "./create-root-key-button";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DesktopSidebar } from "@/app/(authenticated)/(app)/app/desktop-sidebar";
import { getTenantId } from "@/lib/auth";
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { redirect } from "next/navigation";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
interface LayoutProps {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTenantId } from "@/lib/auth";
import { db, schema, eq } from "@unkey/db";
import { db, schema, eq } from "@/lib/db";
import { redirect } from "next/navigation";

export default async function TenantOverviewPage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Text } from "@/components/dashboard/text";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { getTenantId } from "@/lib/auth";
import { fillRange } from "@/lib/utils";
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { getDailyUsage } from "@/lib/tinybird";
import { redirect } from "next/navigation";
import { Badge } from "@/components/ui/badge";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/stripe/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { getTenantId } from "@/lib/auth";
import Stripe from "stripe";
import { redirect } from "next/navigation";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/app/team-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Loading } from "@/components/dashboard/loading";
import { cn } from "@/lib/utils";
import { SignOutButton, useOrganization, useOrganizationList, useUser } from "@clerk/nextjs";
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
import type { Workspace } from "@unkey/db";
import type { Workspace } from "@/lib/db";
type Props = {
workspace: Workspace;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(authenticated)/(app)/onboarding/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTenantId } from "@/lib/auth";
import { db, eq, schema } from "@unkey/db";
import { db, eq, schema } from "@/lib/db";
import { redirect } from "next/navigation";
import { Onboarding } from "./client";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(landing)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const BlogArticleWrapper = ({ params }: { params: { slug: string } }) => {
</FadeIn>

<FadeIn>
<div className='max-w-5xl mx-auto prose lg:prose-md'>
<div className="max-w-5xl mx-auto prose lg:prose-md">
<Content />
</div>
</FadeIn>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(landing)/changelog/[date]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default async function ChangeLogLayout({

<Container className="mt-24 sm:mt-32 lg:mt-40">
<FadeIn>
<div className='max-w-5xl mx-auto prose lg:prose-md'>
<div className="max-w-5xl mx-auto prose lg:prose-md">
<Content />
</div>
</FadeIn>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/(landing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { StylizedImage } from "@/components/landing/stylized-image";
import laptopImage from "@/images/computer-user.jpg";
import { Button } from "@/components/landing/button";
import { StatList, StatListItem } from "@/components/landing/stat-list";
import { db, schema, sql } from "@unkey/db";
import { db, schema, sql } from "@/lib/db";
export const revalidate = 60;

const [workspaces, apis, keys] = await Promise.all([
Expand Down Expand Up @@ -121,7 +121,7 @@ export default async function Home() {
secure, manage, and scale their APIs.
</p>
</FadeIn>
<Button href='/app' className="px-8 py-3 mt-4">
<Button href="/app" className="px-8 py-3 mt-4">
Start for free
</Button>
</Container>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/landing/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function Button({
: "bg-neutral-950 text-white hover:bg-neutral-800",
);

let inner = <span className="relative top-px">{children}</span>;
const inner = <span className="relative top-px">{children}</span>;

if (href) {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/landing/newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function NewsletterForm() {
<input
type="email"
name="email"
id='email'
id="email"
placeholder="Email address"
autoComplete="email"
aria-label="Email address"
Expand Down
16 changes: 8 additions & 8 deletions apps/web/components/landing/root-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ function RootLayoutInner({
}: {
children: React.ReactNode;
}) {
let panelId = useId();
let [expanded, setExpanded] = useState(false);
let openRef = useRef();
const panelId = useId();
const [expanded, setExpanded] = useState(false);
const openRef = useRef();

let closeRef = useRef();
let navRef = useRef();
let shouldReduceMotion = useReducedMotion();
const closeRef = useRef();
const navRef = useRef();
const shouldReduceMotion = useReducedMotion();

useEffect(() => {
function onClick(event: MouseEvent) {
Expand Down Expand Up @@ -322,8 +322,8 @@ export function RootLayout({
}: {
children: React.ReactNode;
}) {
let pathname = usePathname();
let [logoHovered, setLogoHovered] = useState(false);
const pathname = usePathname();
const [logoHovered, setLogoHovered] = useState(false);

return (
<RootLayoutContext.Provider value={{ logoHovered, setLogoHovered }}>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Command = React.forwardRef<
));
Command.displayName = CommandPrimitive.displayName;

interface CommandDialogProps extends DialogProps {}
type CommandDialogProps = DialogProps;

const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
Expand Down
4 changes: 1 addition & 3 deletions apps/web/components/ui/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Command, Loader2, X, Twitter, Mail } from "lucide-react";
import type { Icon as LucideIcon, LucideProps } from "lucide-react";

export type Icon = LucideIcon;
import type { LucideProps } from "lucide-react";

export const Icons = {
logo: Command,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";

import { cn } from "@/lib/utils";

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;

const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/ui/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";

import { cn } from "@/lib/utils";

export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;

const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
Expand Down
24 changes: 24 additions & 0 deletions apps/web/lib/db.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { drizzle } from "drizzle-orm/planetscale-serverless";

import { connect } from "@planetscale/database";
import { schema } from "@unkey/db";
import { env } from "@/lib/env";

export const db = drizzle(
connect({
host: env.DATABASE_HOST,
username: env.DATABASE_USERNAME,
password: env.DATABASE_PASSWORD,
// rome-ignore lint/suspicious/noExplicitAny: TODO
fetch: (url: string, init: any) => {
// rome-ignore lint/suspicious/noExplicitAny: TODO
(init as any)["cache"] = undefined; // Remove cache header
return fetch(url, init);
},
}),
{
schema,
},
);
export * from "@unkey/db";
export * from "drizzle-orm";
4 changes: 2 additions & 2 deletions apps/web/lib/formatDate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function formatDate(dateString: string) {
let parts = dateString.split("-");
let hasDay = parts.length > 2;
const parts = dateString.split("-");
const hasDay = parts.length > 2;

return new Date(`${dateString}Z`).toLocaleDateString("en-US", {
day: hasDay ? "numeric" : undefined,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/trpc/routers/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, schema, type Key } from "@unkey/db";
import { db, schema, type Key } from "@/lib/db";
import { TRPCError } from "@trpc/server";
import { z } from "zod";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/trpc/routers/key.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, schema, eq } from "@unkey/db";
import { db, schema, eq } from "@/lib/db";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { t, auth } from "../trpc";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/trpc/routers/workspace.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, schema } from "@unkey/db";
import { db, schema } from "@/lib/db";
import { z } from "zod";

import { t, auth } from "../trpc";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { authMiddleware } from "@clerk/nextjs";
import { redirectToSignIn } from "@clerk/nextjs";
import { NextResponse } from "next/server";
import { db, schema, eq } from "@unkey/db";
import { db, schema, eq } from "@/lib/db";
const DEBUG_ON = process.env.CLERK_DEBUG === "true";

const checktenancy = async ({ tenantId }: { tenantId: string }) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/** @type {import('next').NextConfig} */
import { withContentlayer } from "next-contentlayer";
import { withSentryConfig } from "@sentry/nextjs";

/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ["tsx", "mdx", "ts", "js"],
experimental: {
serverActions: true,
esmExternals: "loose",
},
transpilePackages: ["@unkey/db"],
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
Expand Down
Loading

1 comment on commit 7ad7011

@vercel
Copy link

@vercel vercel bot commented on 7ad7011 Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

unkey – ./

unkey.vercel.app
unkey-git-main-unkey.vercel.app
unkey-unkey.vercel.app
www.unkey.dev
unkey.dev

Please sign in to comment.