Skip to content

Fix diff create pkg issues #1217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/create/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# `@gel/create`: Project scaffolding for Gel-backed applications

The `@gel/create` package provides a starting point for various frameworks with everything you need to start building an Gel-backed application. We aim to follow the same conventions as the original "create-app" templates, but with Gel as the database. There are a few different templates to choose from, including: Next.js, Remix, Express, Node HTTP Server.
The `@gel/create` package provides a starting point for various frameworks with everything you need to start building a Gel-backed application. We aim to follow the same conventions as the original "create-app" templates, but with Gel as the database. There are a few different templates to choose from, including: Next.js, Remix, SvelteKit, Express, Node HTTP Server.

Important points to note:

- **Upstream changes:** We try to actively monitor and incorporate significant changes from the original "create-app" templates to to ensure developers have access to the latest features and best practices.
- **Upstream changes:** We try to actively monitor and incorporate significant changes from the original "create-app" templates to ensure developers have access to the latest features and best practices.
- **Support for major options:** While we strive to support the major options offered by the upstream "create-apps", we might not cover every possible configuration or permutation due to the vast scope of possibilities.
- **Gel CLI installation:** For users who do not have the Gel CLI installed, we automatically install it using our typical installation procedure.

Expand Down
4 changes: 2 additions & 2 deletions packages/create/src/recipes/_base/template/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
Expand Down
2 changes: 0 additions & 2 deletions packages/create/src/recipes/nextjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ const recipe: Recipe<NextjsOptions> = {
files: [
"tsconfig.json",
"jsconfig.json",
"tailwind.config.ts",
"tailwind.config.js",
"src/app/page.tsx",
"src/app/page.jsx",
"src/pages/index.tsx",
Expand Down
6 changes: 2 additions & 4 deletions packages/create/src/recipes/nextjs/template/js/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": [
"./{{{srcDir}}}*"
]
"@/*": ["./{{{srcDir}}}*"]
}
}
}
}
5 changes: 0 additions & 5 deletions packages/create/src/recipes/nextjs/template/js/next-env.d.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

@theme {
--background-image-gradient-radial: radial-gradient(var(--tw-gradient-stops));
--background-image-gradient-conic: conic-gradient(
from 180deg at 50% 50%,
var(--tw-gradient-stops)
);
}

:root {
--foreground-rgb: 0, 0, 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styles from "./page.module.css";
import { auth } from "@/gel";

export default async function Home() {
const session = auth.getSession();
const session = await auth.getSession();

const signedIn = await session.isSignedIn();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Image from "next/image";
import { auth } from "@/gel";

export default async function Home() {
const session = auth.getSession();
const session = await auth.getSession();

const signedIn = await session.isSignedIn();

Expand All @@ -20,11 +20,10 @@ export default async function Home() {
You are signed in. <a href={auth.getSignoutUrl()}>Sign Out</a>
</p>
) : (
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
You are not signed in.
<br />
<a href={auth.getBuiltinUIUrl()}>Sign In with Builtin UI</a>
</p>
<p className="fixed left-0 top-0 flex flex-col w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
You are not signed in.
<a href={auth.getBuiltinUIUrl()}>Sign In with Builtin UI</a>
</p>
)}

<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
import Image from "next/image";
import { Inter } from "next/font/google";

import { auth } from "@/gel";
import { auth as clientAuth } from "@/gel.client";


const inter = Inter({ subsets: ["latin"] });

export const getServerSideProps = (async ({ req }) => {
const session = auth.getSession(req);

return {
props: { signedIn: await session.isSignedIn() },
};
});

export default function Home({ signedIn }) {
return (
<main
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
>
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">{{{srcDir}}}pages/index.jsx</code>
</p>

{signedIn ? (
<p>
You are signed in.{" "}
<a href={clientAuth.getSignoutUrl()}>Sign Out</a>
</p>
) : (
<p>
You are not signed in.
<br />
<a href={clientAuth.getBuiltinUIUrl()}>Sign In with Builtin UI</a>
</p>
)}

<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Discover and deploy boilerplate example Next.js&nbsp;projects.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

@theme {
--background-image-gradient-radial: radial-gradient(var(--tw-gradient-stops));
--background-image-gradient-conic: conic-gradient(
from 180deg at 50% 50%,
var(--tw-gradient-stops)
);
}

:root {
--foreground-rgb: 0, 0, 0;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

@theme {
--background-image-gradient-radial: radial-gradient(var(--tw-gradient-stops));
--background-image-gradient-conic: conic-gradient(
from 180deg at 50% 50%,
var(--tw-gradient-stops)
);
}

:root {
--foreground-rgb: 0, 0, 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styles from "./page.module.css";
import { auth } from "@/gel";

export default async function Home() {
const session = auth.getSession();
const session = await auth.getSession();

const signedIn = await session.isSignedIn();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Image from "next/image";
import { auth } from "@/gel";

export default async function Home() {
const session = auth.getSession();
const session = await auth.getSession();

const signedIn = await session.isSignedIn();

Expand All @@ -20,7 +20,7 @@ export default async function Home() {
You are signed in. <a href={auth.getSignoutUrl()}>Sign Out</a>
</p>
) : (
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
<p className="fixed left-0 top-0 flex-col w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we need flex and flex-col?

You are not signed in.
<br />
<a href={auth.getBuiltinUIUrl()}>Sign In with Builtin UI</a>
Expand Down
Loading