create-lx2-app 0.11.5-beta.c0dbaad → 0.11.5-beta.c6e566f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/package.json +1 -1
- package/template/packages/config/next/with-payload.ts +14 -0
- package/template/packages/config/tsconfig/base.json +8 -2
- package/template/packages/config/tsconfig/with-payload.json +8 -2
- package/template/packages/src/app/page/base.tsx +4 -1
- package/template/packages/src/app/page/with-authjs-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-authjs-prisma.tsx +4 -1
- package/template/packages/src/app/page/with-authjs.tsx +4 -1
- package/template/packages/src/app/page/with-better-auth-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-better-auth-prisma.tsx +4 -1
- package/template/packages/src/app/page/with-better-auth.tsx +4 -1
- package/template/packages/src/app/page/with-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-payload.tsx +4 -1
- package/template/packages/src/app/page/with-prisma.tsx +4 -1
- package/template/packages/src/app/page/with-trpc.tsx +4 -1
- /package/template/{base/next.config.ts → packages/config/next/base.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import bt from"path";import{execa as ei}from"execa";import vt from"fs-extra";import ke from"path";import{fileURLToPath as wt}from"url";var xt=wt(import.meta.url),Pt=ke.dirname(xt),m=ke.join(Pt,"../"),Se=` ___ ___ ___ _ _____ ___ _ ___ _ ___ ___
|
|
3
3
|
/ __| _ \\ __| /_\\_ _| __| | | __ __|_ ) /_\\ | _ \\ _ \\
|
|
4
4
|
| (__| / _| / _ \\| | | _| | |__\\ \\ / / / / _ \\| _/ _/
|
|
5
5
|
\\___|_|_\\___/_/ \\_\\_| |___| |____/_\\_\\/___| /_/ \\_\\_| |_|
|
|
6
|
-
`,F="my-lx2-app",le="create-lx2-app",R=[{packages:["payload"],message:"Our Payload CMS integration does not yet support other packages."},{packages:["trpc","payload"]}];import{confirm as ee,input as
|
|
6
|
+
`,F="my-lx2-app",le="create-lx2-app",R=[{packages:["payload"],message:"Our Payload CMS integration does not yet support other packages."},{packages:["trpc","payload"]}];import{confirm as ee,input as He,select as U}from"@inquirer/prompts";import{Command as Ut}from"commander";import je from"path";import kt from"fs-extra";var _e=({projectDir:e,packages:t})=>{let n=t?.payload.inUse,s=je.join(m,"template/packages/config/next",`${n?"with-payload":"base"}.ts`),i=je.join(e,"next.config.ts");kt.copyFileSync(s,i)};var v=()=>{let e=process.env.npm_config_user_agent;return e?e.startsWith("yarn")?"yarn":e.startsWith("pnpm")?"pnpm":e.startsWith("bun")?"bun":"npm":"npm"};import I from"path";import ce from"fs-extra";var Ae={"next-auth":"^5.0.0-beta.25","@auth/prisma-adapter":"^2.11.1","@auth/drizzle-adapter":"^1.11.1","better-auth":"^1.4.6","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13",prisma:"^7.1.0","@prisma/client":"^7.1.0","@prisma/client-runtime-utils":"^7.2.0","@prisma/adapter-better-sqlite3":"^7.2.0","@prisma/adapter-libsql":"^7.2.0","@prisma/adapter-mariadb":"^7.2.0","@prisma/adapter-pg":"^7.2.0","drizzle-orm":"^0.45.0","drizzle-kit":"^0.31.8","@libsql/client":"^0.15.15",mysql2:"^3.15.3",postgres:"^3.4.7","@trpc/server":"^11.7.2","@trpc/client":"^11.7.2","@trpc/react-query":"^11.7.2","@tanstack/react-query":"^5.90.10","server-only":"^0.0.1",superjson:"^2.2.5","@t3-oss/env-nextjs":"^0.13.8",zod:"^4.1.13",prettier:"^3.7.4","prettier-plugin-tailwindcss":"^0.7.2","@ianvs/prettier-plugin-sort-imports":"^4.7.0",eslint:"^9.39.1","eslint-config-next":"^16.0.8","@eslint/eslintrc":"^3.3.3","@biomejs/biome":"^2.3.8",typescript:"^5.9.3","@types/node":"^24.10.2","@types/react":"^19.2.7","@types/react-dom":"^19.2.3",payload:"^3.67.0","@payloadcms/next":"^3.67.0","@payloadcms/payload-cloud":"^3.67.0","@payloadcms/richtext-lexical":"^3.67.0","@payloadcms/db-vercel-postgres":"^3.67.0","@payloadcms/db-sqlite":"^3.67.0",graphql:"^16.12.0",sharp:"^0.34.5"};import Ie from"path";import Ce from"fs-extra";import St from"sort-package-json";var u=e=>{let{dependencies:t,devMode:n,projectDir:s}=e,i=Ce.readJsonSync(Ie.join(s,"package.json"));t.forEach(o=>{let r=Ae[o];n&&i.devDependencies?i.devDependencies[o]=r:i.dependencies&&(i.dependencies[o]=r)});let a=St(i);Ce.writeJsonSync(Ie.join(s,"package.json"),a,{spaces:2})};var ze=({projectDir:e,packages:t})=>{let n=t?.prisma.inUse,s=t?.drizzle.inUse,i=["next-auth"];n&&i.push("@auth/prisma-adapter"),s&&i.push("@auth/drizzle-adapter"),u({projectDir:e,dependencies:i,devMode:!1});let a=I.join(m,"template/packages"),o="src/app/api/auth/[...nextauth]/route.ts",r=I.join(a,o),l=I.join(e,o),g=I.join(a,"src/server/auth/config",n?"authjs-with-prisma.ts":s?"authjs-with-drizzle.ts":"authjs.ts"),f=I.join(e,"src/server/auth/config.ts"),p=I.join(a,"src/server/auth/authjs.ts"),d=I.join(e,"src/server/auth/index.ts");ce.copySync(r,l),ce.copySync(g,f),ce.copySync(p,d)};import j from"path";import L from"fs-extra";import jt from"path";import De from"fs-extra";import{sortPackageJson as _t}from"sort-package-json";function w(e){let{scripts:t,projectDir:n}=e,s=jt.join(n,"package.json"),i=De.readJSONSync(s);i.scripts={...i.scripts,...t};let a=_t(i);De.writeJSONSync(s,a,{spaces:2})}var Re=({projectDir:e,packages:t,databaseProvider:n})=>{let s=t?.prisma.inUse,i=t?.drizzle.inUse,a=s||i,o=["better-auth"],r=[];a||o.push("better-sqlite3"),a||r.push("@types/better-sqlite3"),u({projectDir:e,dependencies:o,devMode:!1}),u({projectDir:e,dependencies:r,devMode:!0});let l=j.join(m,"template/packages"),g=j.join(l,"src/app/api/auth/[...betterauth]/route.ts"),f=j.join(e,"src/app/api/auth/[...all]/route.ts"),p=j.join(l,"src/server/auth",s?"better-auth-with-prisma.ts":i?"better-auth-with-drizzle.ts":"better-auth.ts"),d=L.readFileSync(p,"utf-8");(s||i)&&n!=="sqlite"&&(d=d.replace('provider: "sqlite",',`provider: "${{mysql:"mysql",postgresql:i?"pg":"postgresql"}[n]}",`));let b=j.join(e,"src/server/auth/index.ts");L.mkdirSync(j.dirname(b),{recursive:!0}),L.writeFileSync(b,d);let P=j.join(l,"src/lib/auth/better-auth-client.ts"),D=j.join(e,"src/lib/auth/client.ts");w({projectDir:e,scripts:{"auth:generate":"npx @better-auth/cli@latest generate --config ./src/server/auth/index.ts --yes",...!s&&!i&&{"auth:migrate":"npx @better-auth/cli@latest migrate --config ./src/server/auth/index.ts --yes"}}}),L.copySync(g,f),L.copySync(P,D)};import pe from"path";import At from"fs-extra";var Te=({projectDir:e})=>{u({projectDir:e,dependencies:["@biomejs/biome"],devMode:!0});let t=pe.join(m,"template/packages"),n=pe.join(t,"config/biome.jsonc"),s=pe.join(e,"biome.jsonc");At.copyFileSync(n,s),w({projectDir:e,scripts:{"lint:unsafe":"biome check --write --unsafe .","lint:write":"biome check --write .",lint:"biome check .",format:"biome format --write ."}})};import _ from"path";import C from"fs-extra";var Oe=({projectDir:e,packages:t,scopedAppName:n,databaseProvider:s})=>{let i=t?.authjs.inUse,a=t?.betterAuth.inUse;u({projectDir:e,dependencies:["drizzle-kit"],devMode:!0}),u({projectDir:e,dependencies:["drizzle-orm",{sqlite:"@libsql/client",mysql:"mysql2",postgresql:"postgres"}[s]],devMode:!1});let o=_.join(m,"template/packages"),r=_.join(o,"config/drizzle",{sqlite:"with-sqlite",mysql:"with-mysql",postgresql:"with-postgresql"}[s]+".ts"),l=_.join(e,"drizzle.config.ts"),g=_.join(o,"src/server/db/schema-drizzle",i?`with-authjs-${s}.ts`:a?`with-better-auth-${s}.ts`:`base-${s}.ts`),f=_.join(e,"src/server/db/schema.ts"),p=C.readFileSync(g,"utf-8");p=p.replace("project1_${name}",`${n}_\${name}`);let d=C.readFileSync(r,"utf-8");d=d.replace("project1_*",`${n}_*`);let b=_.join(o,`src/server/db/index-drizzle/with-${s}.ts`),P=_.join(e,"src/server/db/index.ts");w({projectDir:e,scripts:{"db:generate":"drizzle-kit generate","db:migrate":"drizzle-kit migrate","db:push":"drizzle-kit push","db:studio":"drizzle-kit studio"}}),C.copySync(r,l),C.mkdirSync(_.dirname(f),{recursive:!0}),C.writeFileSync(f,p),C.writeFileSync(l,d),C.copySync(b,P)};import V from"path";import de from"fs-extra";var Ue=({projectDir:e,scopedAppName:t,packages:n,databaseProvider:s})=>{let i=n?.envVariables.inUse,a=n?.authjs.inUse,o=n?.betterAuth.inUse,r=n?.trpc.inUse,l=n?.prisma.inUse,g=n?.drizzle.inUse,f=n?.payload.inUse,p=[];i&&(p.push("@t3-oss/env-nextjs"),p.push("zod")),u({projectDir:e,dependencies:p,devMode:!1});let d=l||g,b=It(!!a,!!o,!!r,!!l,!!g,!!f,t,s),D=[{condition:d&&r&&o,file:"with-trpc-better-auth-db.js"},{condition:d&&r&&a,file:"with-trpc-authjs-db.js"},{condition:d&&r,file:"with-trpc-db.js"},{condition:d&&a,file:"with-authjs-db.js"},{condition:d&&o,file:"with-better-auth-db.js"},{condition:r&&a,file:"with-trpc-authjs.js"},{condition:r&&o,file:"with-trpc-better-auth.js"},{condition:f,file:"with-payload.js"},{condition:d,file:"with-db.js"},{condition:r,file:"with-trpc.js"},{condition:a,file:"with-authjs.js"},{condition:o,file:"with-better-auth.js"}].find(q=>q.condition)?.file||"";if(D!==""){let q=V.join(m,"template/packages/src/env",D),J=V.join(e,"src/env.ts");de.copyFileSync(q,J)}let ie=V.join(e,".env"),se=V.join(e,".env.example"),ne=Ct+b,E=Buffer.from(crypto.getRandomValues(new Uint8Array(32))).toString("base64"),ae=b.replace('AUTH_SECRET=""',`AUTH_SECRET="${E}" # Generated by create-lx2-app`).replace('BETTER_AUTH_SECRET=""',`BETTER_AUTH_SECRET="${E}" # Generated by create-lx2-app`).replace('PAYLOAD_SECRET=""',`PAYLOAD_SECRET="${E}" # Generated by create-lx2-app`);de.writeFileSync(ie,ae,"utf-8"),de.writeFileSync(se,ne,"utf-8")};function It(e,t,n,s,i,a,o,r){let l=`
|
|
7
7
|
# When adding additional environment variables, the schema in "/src/env.ts"
|
|
8
8
|
# should be updated accordingly.
|
|
9
9
|
`.trim().concat(`
|
|
@@ -45,7 +45,7 @@ DISCORD_CLIENT_SECRET=""
|
|
|
45
45
|
# NEXT_PUBLIC_CLIENTVAR="bar"
|
|
46
46
|
`),n&&(l+=`
|
|
47
47
|
NEXT_PUBLIC_URL="http://localhost:3000"
|
|
48
|
-
`),l}var
|
|
48
|
+
`),l}var Ct=`
|
|
49
49
|
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
|
50
50
|
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
|
51
51
|
# when you add new variables to \`.env\`.
|
|
@@ -55,19 +55,19 @@ NEXT_PUBLIC_URL="http://localhost:3000"
|
|
|
55
55
|
# ".env" and populate it with your secrets.
|
|
56
56
|
`.trim().concat(`
|
|
57
57
|
|
|
58
|
-
`);import H from"path";import
|
|
58
|
+
`);import H from"path";import Ee from"fs-extra";var qe=({projectDir:e,packages:t})=>{let n=t?.["eslint/prettier"].inUse,s=[];n&&(s.push("eslint"),s.push("eslint-config-next"),s.push("@eslint/eslintrc"),s.push("prettier"),s.push("prettier-plugin-tailwindcss"),s.push("@ianvs/prettier-plugin-sort-imports")),u({projectDir:e,dependencies:s,devMode:!0});let i=H.join(m,"template/packages/config","eslint.config.mjs"),a=H.join(m,"template/packages/config","prettier.config.mjs"),o=H.join(e,"eslint.config.mjs"),r=H.join(e,"prettier.config.mjs");w({projectDir:e,scripts:{"lint:write":"eslint --fix",lint:"eslint",format:"prettier --write ."}}),Ee.copyFileSync(i,o),Ee.copyFileSync(a,r)};import x from"path";import T from"fs-extra";var Me=({projectDir:e,packages:t,databaseProvider:n})=>{let s=[],i=[];if(t?.payload.inUse)switch(s.push("payload"),s.push("@payloadcms/next"),s.push("@payloadcms/payload-cloud"),s.push("@payloadcms/richtext-lexical"),s.push("graphql"),n){case"sqlite":i.push("@payloadcms/db-sqlite");break;case"postgresql":i.push("@payloadcms/db-vercel-postgres");break}u({projectDir:e,dependencies:s,devMode:!1}),u({projectDir:e,dependencies:i,devMode:!1});let a=x.join(m,"template/packages"),o=x.join(a,"config/payload",`${n==="postgresql"?"with-postgres":"with-sqlite"}.ts`),r=x.join(e,"payload.config.ts");T.copyFileSync(o,r);let l=x.join(a,"src/payload/collections"),g=x.join(e,"src/collections");T.mkdirSync(g,{recursive:!0}),T.copyFileSync(x.join(l,"Media.ts"),x.join(g,"Media.ts")),T.copyFileSync(x.join(l,"Users.ts"),x.join(g,"Users.ts"));let f=x.join(a,"src/app/(payload)"),p=x.join(e,"src/app/(payload)");T.mkdirSync(p,{recursive:!0}),T.copySync(f,p),w({projectDir:e,scripts:{payload:"payload","generate:importmap":"payload generate:importmap","generate:types":"payload generate:types"}})};import k from"path";import A from"fs-extra";var $e=({projectDir:e,packages:t,databaseProvider:n,pkgManager:s})=>{let i=t?.authjs.inUse,a=t?.betterAuth.inUse;u({projectDir:e,dependencies:["prisma"],devMode:!0});let o={sqlite:s==="bun"?"@prisma/adapter-libsql":"@prisma/adapter-better-sqlite3",mysql:"@prisma/adapter-mariadb",postgresql:"@prisma/adapter-pg"}[n];u({projectDir:e,dependencies:["@prisma/client",o],devMode:!1}),n==="sqlite"&&s!=="bun"&&u({projectDir:e,dependencies:["@types/better-sqlite3"],devMode:!0}),s==="pnpm"&&u({projectDir:e,dependencies:["@prisma/client-runtime-utils"],devMode:!1});let r=k.join(m,"template/packages"),l=k.join(r,"config/prisma.config.ts"),g=k.join(e,"prisma.config.ts");A.writeFileSync(g,A.readFileSync(l,"utf-8"));let f=k.join(r,"prisma/schema",`${i?"with-authjs":a?"with-better-auth":"base"}.prisma`),p=A.readFileSync(f,"utf-8");n!=="sqlite"&&(p=p.replace('provider = "sqlite"',`provider = "${{mysql:"mysql",postgresql:"postgresql"}[n]}"`),["mysql"].includes(n)&&(p=p.replace("// @db.Text","@db.Text")));let d=k.join(e,"prisma/schema.prisma");A.mkdirSync(k.dirname(d),{recursive:!0}),A.writeFileSync(d,p);let b=k.join(r,`src/server/db/prisma/with-${n}${s==="bun"?"-bun":""}.ts`),P=k.join(e,"src/server/db/index.ts");A.mkdirSync(k.dirname(P),{recursive:!0}),A.writeFileSync(P,A.readFileSync(b,"utf-8")),w({projectDir:e,scripts:{postinstall:"prisma generate","db:push":"prisma db push","db:studio":"prisma studio","db:generate":"prisma migrate dev","db:migrate":"prisma migrate deploy"}})};import h from"path";import zt from"fs-extra";var Fe=({projectDir:e,packages:t})=>{let n=t?.authjs.inUse,s=t?.betterAuth.inUse,i=t?.prisma.inUse,a=t?.drizzle.inUse,o=i||a;u({projectDir:e,dependencies:["@trpc/server","@trpc/client","@trpc/react-query","@tanstack/react-query","server-only","superjson"],devMode:!1});let r=h.join(m,"template/packages"),l="src/app/api/trpc/[trpc]/route.ts",g=h.join(r,l),f=h.join(e,l),p=n&&o?"with-authjs-db.ts":n?"with-authjs.ts":s&&o?"with-betterauth-db.ts":s?"with-betterauth.ts":o?"with-db.ts":"base.ts",d=h.join(r,"src/server/api/init",p),b=h.join(e,"src/server/api/init.ts"),P=h.join(r,"src/server/api/root.ts"),D=h.join(e,"src/server/api/root.ts");function ie({usingAuthjs:M,usingBetterAuth:$,usingPrisma:xe,usingDrizzle:Pe}){return(M||$)&&xe?"with-auth-prisma.ts":(M||$)&&Pe?"with-auth-drizzle.ts":M||$?"with-auth.ts":xe?"with-prisma.ts":Pe?"with-drizzle.ts":"base.ts"}let se=ie({usingAuthjs:n,usingBetterAuth:s,usingPrisma:i,usingDrizzle:a}),ne=h.join(r,"src/server/api/routers/post",se),E=h.join(e,"src/server/api/routers/post.ts"),ae=h.join(r,"src/lib/utils.ts"),q=h.join(e,"src/lib/utils.ts"),J=[[g,f],[d,b],[P,D],[ne,E],[ae,q]],oe=h.join(r,"src/lib/api"),re=h.join(e,"src/lib/api");J.push([h.join(oe,"client.tsx"),h.join(re,"client.tsx")],[h.join(oe,"query-client.ts"),h.join(re,"query-client.ts")],[h.join(oe,"server.ts"),h.join(re,"server.ts")],[h.join(r,"src/components/greeting.tsx"),h.join(e,"src/components/greeting.tsx")]),J.forEach(([M,$])=>{zt.copySync(M,$)})};import Le from"path";import Dt from"fs-extra";var Be=({projectDir:e,packages:t})=>{let n=t?.typescript.inUse,s=t?.payload.inUse,i=[];n&&(i.push("typescript"),i.push("@types/node"),i.push("@types/react"),i.push("@types/react-dom")),u({projectDir:e,dependencies:i,devMode:!0});let a=Le.join(m,"template/packages/config/tsconfig",`${s?"with-payload":"base"}.json`),o=Le.join(e,"tsconfig.json");Dt.copyFileSync(a,o)};var Ne=["authjs","betterAuth","trpc","prisma","drizzle","envVariables","eslint/prettier","biome","typescript","nextjs","payload"],Ge=["nextjs","payload"],me=["none","authjs","betterAuth"],fe=["none","prisma","drizzle"],K=["sqlite","mysql","postgresql"];var We=e=>({authjs:{inUse:e.includes("authjs"),installer:ze},betterAuth:{inUse:e.includes("betterAuth"),installer:Re},trpc:{inUse:e.includes("trpc"),installer:Fe},prisma:{inUse:e.includes("prisma"),installer:$e},drizzle:{inUse:e.includes("drizzle"),installer:Oe},envVariables:{inUse:!0,installer:Ue},"eslint/prettier":{inUse:e.includes("eslint/prettier"),installer:qe},biome:{inUse:e.includes("biome"),installer:Te},typescript:{inUse:!0,installer:Be},nextjs:{inUse:!0,installer:_e},payload:{inUse:e.includes("payload"),installer:Me}});function Y(e){return Ne.includes(e)}function X(e){let t=[];e.backend!=="nextjs"&&Y(e.backend)&&t.push(e.backend),e.trpc&&t.push("trpc"),e.authentication!=="none"&&Y(e.authentication)&&t.push(e.authentication),e.orm!=="none"&&Y(e.orm)&&t.push(e.orm),Y(e.linter)&&t.push(e.linter);let n=t.includes("prisma")||t.includes("drizzle")?e.dbProvider:"sqlite";return{packages:t,databaseProvider:n}}import Rt from"path";import Tt from"fs-extra";function O(){let e=Rt.join(m,"package.json");return Tt.readJSONSync(e).version??"1.0.0"}var B=class extends Error{constructor(t){super(t)}};import Q from"chalk";var c={error(...e){console.log(Q.red(...e))},warn(...e){console.log(Q.yellow(...e))},info(...e){console.log(Q.cyan(...e))},success(...e){console.log(Q.green(...e))}};var Z=e=>(e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e);var Ot=/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function Je(e){let t=Z(e),n=t.split("/"),s=n.findIndex(a=>a.startsWith("@")),i=n[n.length-1];return n.findIndex(a=>a.startsWith("@"))!==-1&&(i=n.slice(s).join("/")),t=="."||Ot.test(i??"")?!0:"App name must consist of only lowercase alphanumeric characters, '-', and '_'"}var Ve=e=>e.startsWith(".")||e.startsWith("/")?"Import alias can't start with '.' or '/'":!0;var y={appName:F,packages:[],flags:{git:!1,install:!1,default:!1,CI:!1,trpc:!1,authentication:"none",orm:"none",linter:"eslint/prettier",importAlias:"@/",dbProvider:"sqlite",backend:"nextjs"},databaseProvider:"sqlite"};async function Ke(){let e=y,t=new Ut().name(le).description("CLI for scaffolding new web apps with the Lx2 stack").version(O(),"-v, --version","Output the current version of Create Lx2 App").argument("[dir]","The name of the application, as well as the name of the directory to create").option("--git","Boolean flag to explicitly tell the CLI to initialize a new git repo in the project",!1).option("--install","Boolean flag to explicitly tell the CLI to run the package manager's install command",!1).option("-d, --default","Bypass the CLI and use all default options to bootstrap a new lx2-app",!1).option("--CI","Boolean value if we're running in CI",!1).option("--backend [framework]",`Choose a backend framework to use. Possible values: ${Ge.join(", ")}`,y.flags.backend).option("--trpc [boolean]","Boolean flag to explicitly tell the CLI to set up tRPC in the project",s=>!!s&&s!=="false").option("--authProvider [provider]",`Choose an authentication provider to use. Possible values: ${me.join(", ")}`,y.flags.authentication).option("--databaseORM [orm]",`Choose a database ORM to use. Possible values: ${fe.join(", ")}`,y.flags.orm).option("--linter [linter]",`Choose what linter and formatter to use. Possible values: ${y.flags.linter}`,y.flags.linter).option("-i, --import-alias [alias]","Explicitly tell the CLI to use a custom import alias",y.flags.importAlias).option("--dbProvider [provider]",`Choose a database provider to use. Possible values: ${K.join(", ")}`,y.flags.dbProvider).parse(process.argv);process.env.npm_config_user_agent?.startsWith("yarn/3")&&c.warn(` WARNING: It looks like you are using Yarn 3. This is currently not supported,
|
|
59
59
|
and likely to result in a crash. Please run create-lx2-app with another
|
|
60
60
|
package manager such as pnpm, npm, or Yarn Classic.
|
|
61
61
|
See: https://github.com/t3-oss/create-t3-app/issues/57`);let n=t.args[0];if(n&&(e.appName=n),e.flags=t.opts(),e.flags.CI){let{packages:s,databaseProvider:i}=X({backend:e.flags.backend,trpc:e.flags.trpc,authentication:e.flags.authentication,orm:e.flags.orm,linter:e.flags.linter,dbProvider:e.flags.dbProvider});return e.packages=s,e.packages.includes("authjs")&&e.packages.includes("betterAuth")&&(c.warn(`Incompatible authentication providers provided. Use either ${me.join(", or ")}. Exiting.`),process.exit(0)),e.packages.includes("prisma")&&e.packages.includes("drizzle")&&(c.warn(`Incompatible database ORMs provided. Use either ${fe.join(", or ")}. Exiting.`),process.exit(0)),K.includes(e.flags.dbProvider)===!1&&(c.warn(`Incompatible database provided. Use either ${K.join(", or ")}. Exiting.`),process.exit(0)),e.flags.backend==="payload"&&e.flags.dbProvider==="mysql"&&(c.warn("Payload CMS does not support MySQL. Exiting."),process.exit(0)),e.packages.includes("eslint/prettier")&&e.packages.includes("biome")&&(c.warn(`Incompatible linters provided. Use either ${y.flags.linter}. Exiting.`),process.exit(0)),e.databaseProvider=i,e}if(e.flags.default){let{packages:s,databaseProvider:i}=X({backend:e.flags.backend,trpc:e.flags.trpc,authentication:e.flags.authentication,orm:e.flags.orm,linter:e.flags.linter,dbProvider:e.flags.dbProvider});return e.packages=s,e.databaseProvider=i,e}try{if(process.env.TERM_PROGRAM?.toLowerCase().includes("mintty"))throw c.warn(` WARNING: It looks like you are using MinTTY, which is non-interactive. This is most likely because you are
|
|
62
62
|
using Git Bash. If that's that case, please use Git Bash from another terminal, such as Windows Terminal. Alternatively, you
|
|
63
|
-
can provide the arguments from the CLI directly: https://create.lx2.dev/docs/getting-started#experimental-ci-flags to skip the prompts.`),new B("Non-interactive environment");let s=v(),i={};n||(i.name=await
|
|
63
|
+
can provide the arguments from the CLI directly: https://create.lx2.dev/docs/getting-started#experimental-ci-flags to skip the prompts.`),new B("Non-interactive environment");let s=v(),i={};n||(i.name=await He({message:"What will your project be called?",default:F,validate:f=>Je(f)})),i.backend=await U({message:"What backend framework would you like to use?",choices:[{value:"nextjs",name:"Next.js"},{value:"payload",name:"Payload CMS"}],default:y.flags.backend}),i.backend==="payload"&&(i.dbProvider=await U({message:"What database provider would you like to use?",choices:[{value:"sqlite",name:"SQLite"},{value:"postgresql",name:"PostgreSQL"}],default:y.flags.dbProvider})),i.backend==="nextjs"&&(i.trpc=await ee({message:"Would you like to use tRPC?",default:!y.flags.trpc}),i.authentication=await U({message:"What authentication provider would you like to use?",choices:[{value:"none",name:"None"},{value:"authjs",name:"Auth.js"},{value:"betterAuth",name:"Better Auth"}],default:y.flags.authentication}),i.orm=await U({message:"What database ORM would you like to use?",choices:[{value:"none",name:"None"},{value:"prisma",name:"Prisma"},{value:"drizzle",name:"Drizzle"}],default:y.flags.orm}),i.orm!=="none"&&(i.dbProvider=await U({message:"What database provider would you like to use?",choices:[{value:"sqlite",name:"SQLite"},{value:"mysql",name:"MySQL"},{value:"postgresql",name:"PostgreSQL"}],default:y.flags.dbProvider}))),i.linter=await U({message:"What linter and formatter would you like to use?",choices:[{value:"eslint/prettier",name:"ESLint/Prettier"},{value:"biome",name:"Biome"}],default:y.flags.linter}),e.flags.git||(i.git=await ee({message:"Should we initialize a Git repository and stage the changes?",default:!y.flags.git})),e.flags.install||(i.install=await ee({message:`Should we run '${s}`+(s==="yarn"?"'?":" install' for you?"),default:!y.flags.install})),i.importAlias=await He({message:"What import alias would you like to use?",default:y.flags.importAlias,validate:Ve});let{packages:a,databaseProvider:o}=X({backend:i.backend,trpc:i.trpc??!1,authentication:i.authentication??"none",orm:i.orm??"none",linter:i.linter,dbProvider:i.dbProvider??"sqlite"}),r=[...e.packages||[],...a||[]],l=Array.from(new Set(r));if(l.includes("trpc")){let f=R.find(p=>p.packages.includes("trpc"));f&&l.filter(d=>f.packages.includes(d)&&d!=="trpc").length>0&&(c.warn("As of right now, Create Lx2 App only supports TRPC with certain combinations of packages. Exiting."),process.exit(0))}return{appName:i.name??e.appName,packages:a,flags:{...e.flags,git:i.git??e.flags.git,install:i.install??e.flags.install,importAlias:i.importAlias??e.flags.importAlias},databaseProvider:o}}catch(s){if(s instanceof B)c.warn(`${le} needs an interactive terminal to run.`),await ee({message:"Continue scaffolding with default options?",default:!0})||(c.info("Exiting..."),process.exit(0)),c.info(`Scaffolding default lx2 app in ./${e.appName}`);else throw s}return e}import Ft from"path";import Ye from"chalk";import Et from"ora";function Xe(e){let{packages:t}=e;c.info("Adding boilerplate...");for(let[n,s]of Object.entries(t))if(s.inUse){let i=Et(`Boilerplating ${n}...`).start();s.installer(e),i.succeed(Ye.green(`${Ye.green.bold(n)}`))}c.info("")}import ue from"path";import{confirm as qt,select as Mt}from"@inquirer/prompts";import z from"chalk";import N from"fs-extra";import $t from"ora";async function Qe({projectName:e,projectDir:t,pkgManager:n,install:s}){let i=ue.join(m,"template/base");s?c.info(""):c.info(`
|
|
64
64
|
Using: ${z.cyan.bold(n)}
|
|
65
|
-
`);let a
|
|
65
|
+
`);let a=$t(`Scaffolding in: ${t}...
|
|
66
66
|
`).start();if(N.existsSync(t))if(N.readdirSync(t).length===0)e!=="."&&a.info(`${z.cyan.bold(e)} exists but is empty, continuing...
|
|
67
|
-
`);else{a.stopAndPersist();let r=await
|
|
67
|
+
`);else{a.stopAndPersist();let r=await Mt({message:`${z.redBright.bold("Warning:")} ${z.cyan.bold(e)} already exists and isn't empty. How would you like to proceed?`,choices:[{value:"abort",name:"Abort installation (recommended)"},{value:"clear",name:"Clear the directory and continue installation"},{value:"overwrite",name:"Continue installation and overwrite conflicting files"}],default:"abort"});r==="abort"&&(a.fail("Aborting installation..."),process.exit(1)),await qt({message:`Are you sure you want to ${r==="clear"?"clear the directory":"overwrite conflicting files"}`,default:!1})||(a.fail("Aborting installation..."),process.exit(1)),r==="clear"&&(a.info(`Emptying ${z.cyan.bold(e)} and creating lx2 app...
|
|
68
68
|
`),N.emptyDirSync(t))}a.start(),N.copySync(i,t),N.renameSync(ue.join(t,"_gitignore"),ue.join(t,".gitignore"));let o=e==="."?"App":z.cyan.bold(e);a.succeed(`${o} ${z.green.bold("scaffolded successfully!")}
|
|
69
|
-
`)}import S from"path";import ge from"fs-extra";function
|
|
70
|
-
`).start(),n=be(e),s=await ve(e),i=he.parse(e).name;if(s&&n){if(t.stop(),!await
|
|
69
|
+
`)}import S from"path";import ge from"fs-extra";function Ze({packages:e,projectDir:t}){let n=S.join(m,"template/packages/src/app/layout"),s=e.payload.inUse,i=e.trpc.inUse,a="base.tsx";i&&(a="with-trpc.tsx");let o=S.join(n,a),r=S.join(t,`src/app/${s?"(frontend)":""}/layout.tsx`);ge.copySync(o,r)}function et({packages:e,projectDir:t}){let n=S.join(m,"template/packages/src/app/page"),s=e.payload.inUse,i=e.authjs.inUse,a=e.betterAuth.inUse,o=e.trpc.inUse,r=e.prisma.inUse,l=e.drizzle.inUse,f=[{condition:o&&l&&a,file:"with-trpc.tsx"},{condition:o&&l&&i,file:"with-trpc.tsx"},{condition:o&&l,file:"with-trpc.tsx"},{condition:o&&r&&a,file:"with-trpc.tsx"},{condition:o&&r&&i,file:"with-trpc.tsx"},{condition:o&&r,file:"with-trpc.tsx"},{condition:s,file:"with-payload.tsx"},{condition:l&&a,file:"with-better-auth-drizzle.tsx"},{condition:l&&i,file:"with-authjs-drizzle.tsx"},{condition:l,file:"with-drizzle.tsx"},{condition:r&&a,file:"with-better-auth-prisma.tsx"},{condition:r&&i,file:"with-authjs-prisma.tsx"},{condition:r,file:"with-prisma.tsx"},{condition:o&&a,file:"with-trpc.tsx"},{condition:o&&i,file:"with-trpc.tsx"},{condition:o,file:"with-trpc.tsx"},{condition:a,file:"with-better-auth.tsx"},{condition:i,file:"with-authjs.tsx"},{condition:!0,file:"base.tsx"}].find(b=>b.condition)?.file||"base.tsx",p=S.join(n,f),d=S.join(t,`src/app/${s?"(frontend)":""}/page.tsx`);ge.copySync(p,d)}function tt({projectDir:e}){let t=S.join(m,"template/packages/src/styles"),s=S.join(t,"base.css"),i=S.join(e,"src/styles/globals.css");ge.copySync(s,i)}async function it({projectName:e,scopedAppName:t,packages:n,install:s,databaseProvider:i}){let a=v(),o=Ft.resolve(process.cwd(),e);return await Qe({projectName:e,projectDir:o,pkgManager:a,scopedAppName:t,install:s,databaseProvider:i}),Xe({projectName:e,scopedAppName:t,projectDir:o,pkgManager:a,packages:n,install:s,databaseProvider:i}),Ze({packages:n,projectDir:o}),et({packages:n,projectDir:o}),tt({packages:n,projectDir:o}),o}import{execSync as ye}from"child_process";import he from"path";import{confirm as st}from"@inquirer/prompts";import G from"chalk";import{execa as W}from"execa";import nt from"fs-extra";import Lt from"ora";function Bt(e){try{return ye("git --version",{cwd:e}),!0}catch{return!1}}function be(e){return nt.existsSync(he.join(e,".git"))}async function ve(e){try{return await W("git",["rev-parse","--is-inside-work-tree"],{cwd:e,stdout:"ignore"}),!0}catch{return!1}}function Nt(){let t=ye("git --version").toString().trim().split(" ")[2],n=t?.split(".")[0],s=t?.split(".")[1];return{major:Number(n),minor:Number(s)}}function Gt(){return ye("git config --global init.defaultBranch || echo main").toString().trim()}async function at(e){if(c.info("Initializing Git..."),!Bt(e)){c.warn("Git is not installed. Skipping Git initialization.");return}let t=Lt(`Creating a new git repo...
|
|
70
|
+
`).start(),n=be(e),s=await ve(e),i=he.parse(e).name;if(s&&n){if(t.stop(),!await st({message:`${G.redBright.bold("Warning:")} Git is already initialized in "${i}". Initializing a new git repository would delete the previous history. Would you like to continue anyways?`,default:!1})){t.info("Skipping Git initialization.");return}nt.removeSync(he.join(e,".git"))}else if(s&&!n&&(t.stop(),!await st({message:`${G.redBright.bold("Warning:")} "${i}" is already in a git worktree. Would you still like to initialize a new git repository in this directory?`,default:!1}))){t.info("Skipping Git initialization.");return}try{let a=Gt(),{major:o,minor:r}=Nt();o<2||o==2&&r<28?(await W("git",["init"],{cwd:e}),await W("git",["symbolic-ref","HEAD",`refs/heads/${a}`],{cwd:e})):await W("git",["init",`--initial-branch=${a}`],{cwd:e}),await W("git",["add","."],{cwd:e}),t.succeed(`${G.green("Successfully initialized and staged")} ${G.green.bold("git")}
|
|
71
71
|
`)}catch{t.fail(`${G.bold.red("Failed:")} could not initialize git. Update git to the latest version!
|
|
72
|
-
`)}}import
|
|
73
|
-
`))};var
|
|
72
|
+
`)}}import Wt from"chalk";import{execa as ot}from"execa";import rt from"ora";var we=async(e,t,n)=>{let{onDataHandle:s,args:i=["install"],stdout:a="pipe"}=n,o=rt(`Running ${t} install...`).start(),r=ot(t,i,{cwd:e,stdout:a});return await new Promise((l,g)=>{s&&r.stdout?.on("data",s(o)),r.on("error",f=>g(f)),r.on("close",()=>l())}),o},Jt=(e,t)=>{if(!t)return["install"];switch(e){case"npm":return["install","--legacy-peer-deps"];case"pnpm":return["install","--strict-peer-dependencies=false"];case"yarn":return["install"];case"bun":return["install"]}},Vt=async(e,t,n)=>{let s=Jt(e,n);switch(e){case"npm":return await ot(e,s,{cwd:t,stderr:"inherit"}),null;case"pnpm":return we(t,e,{args:s,onDataHandle:i=>a=>{let o=a.toString();o.includes("Progress")&&(i.text=o.includes("|")?o.split(" | ")[1]??"":o)}});case"yarn":return we(t,e,{args:s,onDataHandle:i=>a=>{i.text=a.toString()}});case"bun":return we(t,e,{args:s,stdout:"ignore"})}},lt=async({projectDir:e,withPayload:t=!1})=>{c.info("Installing dependencies...");let n=v();(await Vt(n,e,t)??rt()).succeed(Wt.green(`Successfully installed dependencies!
|
|
73
|
+
`))};var ct=async({projectName:e=F,packages:t,install:n,projectDir:s,databaseProvider:i})=>{let a=v(),o=["npm"].includes(a),r=t?.authjs.inUse||t?.betterAuth.inUse,l=t?.prisma.inUse||t?.drizzle.inUse;c.info("Next steps:"),e!=="."&&c.info(` cd ${e}`),n===!1&&(a==="yarn"?c.info(` ${a}`):c.info(` ${a} install`)),["postgresql","mysql"].includes(i)&&c.info(" Add your database connection string to .env"),r&&c.info(" Fill in your .env with necessary values. See https://create.lx2.dev/docs/first-steps for more info."),l&&c.info(` Run "${a} ${o?"run ":""}db:push" to create you database tables.`),o?c.info(` ${a} run dev`):c.info(` ${a} dev`),!await ve(s)&&!be(s)&&c.info(" git init"),c.info(' git commit -m "initial commit"')};import te from"fs";import Ht from"path";function pt(e,t,n){te.readdirSync(e).forEach(i=>{let a=Ht.join(e,i);if(te.statSync(a).isDirectory())pt(a,t,n);else{let r=te.readFileSync(a,"utf8").replace(new RegExp(t,"g"),n);te.writeFileSync(a,r,"utf8")}})}function dt(e,t){let n=t.replace(/\*/g,"").replace(/[^\/]$/,"$&/");pt(e,"@/",n)}import mt from"path";function ft(e){let n=Z(e).split("/"),s=n[n.length-1];if(s==="."){let o=mt.resolve(process.cwd());s=mt.basename(o)}let i=n.findIndex(o=>o.startsWith("@"));n.findIndex(o=>o.startsWith("@"))!==-1&&(s=n.slice(i).join("/"));let a=n.filter(o=>!o.startsWith("@")).join("/");return[s,a]}function ut(){c.warn(" Compatibility Warnings:");for(let e of R){let t=e.packages,n="";e.message?n=` - ${e.message}`:t.length===2?n=` - Using ${t[0]} with ${t[1]} is not supported yet.`:t.length>2&&(n=` - Using ${t[0]} with ${t.slice(1,-1).join(", ")}, or ${t.slice(-1)} is not supported yet.`),c.warn(n)}console.log("")}import Kt from"gradient-string";var Yt={primary:"#bf95f9",accent:"#6071a4",secondary:"#ff7ac5"};function gt(){let e=Kt(Object.values(Yt)),t=v();(t==="yarn"||t==="pnpm")&&console.log(""),console.log(e.multiline(Se))}import{execSync as Xt}from"child_process";import Qt from"https";function ht(e){let t=O();t.includes("beta")?(c.warn(" You are using a beta version of create-lx2-app."),c.warn(" Please report any bugs you encounter.")):t!==e&&(c.warn(" You are using an outdated version of create-lx2-app."),c.warn(" Your version:",t+".","Latest version in the npm registry:",e),c.warn(" Please run the CLI with @latest to get the latest updates.")),console.log("")}function Zt(){return new Promise((e,t)=>{Qt.get("https://registry.npmjs.org/-/package/create-lx2-app/dist-tags",n=>{if(n.statusCode===200){let s="";n.on("data",i=>s+=i),n.on("end",()=>{e(JSON.parse(s).latest)})}else t()}).on("error",()=>{t()})})}var yt=()=>Zt().catch(()=>{try{return Xt("npm view create-lx2-app version").toString().trim()}catch{return null}});async function ti(){let e=await yt(),t=v();gt(),e&&ht(e),R.length>0&&ut();let{appName:n,packages:s,flags:{git:i,install:a,importAlias:o},databaseProvider:r}=await Ke(),l=We(s),[g,f]=ft(n),p=await it({projectName:f,scopedAppName:g,packages:l,install:a,databaseProvider:r}),d=vt.readJsonSync(bt.join(p,"package.json"));if(d.name=g,d.clx2aMetadata={initVersion:O()},t!=="bun"){let{stdout:b}=await ei(t,["-v"],{cwd:p});d.packageManager=`${t}@${b.trim()}`}vt.writeJSONSync(bt.join(p,"package.json"),d,{spaces:2}),o!=="@/"&&dt(p,o),a&&await lt({projectDir:p,withPayload:l.payload.inUse}),i&&await at(p),await ct({projectDir:p,projectName:f,packages:l,install:a,databaseProvider:r}),process.exit(0)}ti().catch(e=>{c.error("Aborting installation..."),e instanceof Error?c.error(e.message):(c.error("An unknown error occurred. Please open an issue on GitHub with the below:"),console.error(e)),process.exit(1)});
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withPayload } from "@payloadcms/next/withPayload"
|
|
2
|
+
import type { NextConfig } from "next"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
|
|
6
|
+
* for Docker builds.
|
|
7
|
+
*/
|
|
8
|
+
import "./src/env"
|
|
9
|
+
|
|
10
|
+
const nextConfig: NextConfig = {
|
|
11
|
+
/* config options here */
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default withPayload(nextConfig)
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"noEmit": true,
|
|
19
19
|
"module": "esnext",
|
|
20
20
|
"moduleResolution": "bundler",
|
|
21
|
-
"jsx": "
|
|
21
|
+
"jsx": "react-jsx",
|
|
22
22
|
"incremental": true,
|
|
23
23
|
"plugins": [
|
|
24
24
|
{
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"@/*": ["./src/*"]
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"include": [
|
|
35
|
+
"include": [
|
|
36
|
+
"next-env.d.ts",
|
|
37
|
+
"**/*.ts",
|
|
38
|
+
"**/*.tsx",
|
|
39
|
+
".next/types/**/*.ts",
|
|
40
|
+
".next/dev/types/**/*.ts"
|
|
41
|
+
],
|
|
36
42
|
"exclude": ["node_modules"]
|
|
37
43
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"noEmit": true,
|
|
19
19
|
"module": "esnext",
|
|
20
20
|
"moduleResolution": "bundler",
|
|
21
|
-
"jsx": "
|
|
21
|
+
"jsx": "react-jsx",
|
|
22
22
|
"incremental": true,
|
|
23
23
|
"plugins": [
|
|
24
24
|
{
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
"@payload-config": ["./payload.config.ts"]
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"include": [
|
|
36
|
+
"include": [
|
|
37
|
+
"next-env.d.ts",
|
|
38
|
+
"**/*.ts",
|
|
39
|
+
"**/*.tsx",
|
|
40
|
+
".next/types/**/*.ts",
|
|
41
|
+
".next/dev/types/**/*.ts"
|
|
42
|
+
],
|
|
37
43
|
"exclude": ["node_modules"]
|
|
38
44
|
}
|
|
@@ -4,7 +4,7 @@ export default function HomePage() {
|
|
|
4
4
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
5
5
|
|
|
6
6
|
return (
|
|
7
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
7
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
8
8
|
<div className="flex grow flex-col items-center justify-center">
|
|
9
9
|
{/* Logo */}
|
|
10
10
|
<picture className="relative">
|
|
@@ -45,6 +45,7 @@ export default function HomePage() {
|
|
|
45
45
|
strokeLinejoin="round"
|
|
46
46
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
47
47
|
>
|
|
48
|
+
<title>Docs</title>
|
|
48
49
|
<path d="M7 7h10v10" />
|
|
49
50
|
<path d="M7 17 17 7" />
|
|
50
51
|
</svg>
|
|
@@ -63,6 +64,7 @@ export default function HomePage() {
|
|
|
63
64
|
strokeLinejoin="round"
|
|
64
65
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
65
66
|
>
|
|
67
|
+
<title>Discord</title>
|
|
66
68
|
<path d="M7 7h10v10" />
|
|
67
69
|
<path d="M7 17 17 7" />
|
|
68
70
|
</svg>
|
|
@@ -81,6 +83,7 @@ export default function HomePage() {
|
|
|
81
83
|
strokeLinejoin="round"
|
|
82
84
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
83
85
|
>
|
|
86
|
+
<title>GitHub</title>
|
|
84
87
|
<path d="M7 7h10v10" />
|
|
85
88
|
<path d="M7 17 17 7" />
|
|
86
89
|
</svg>
|
|
@@ -15,7 +15,7 @@ export default async function HomePage() {
|
|
|
15
15
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
18
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
19
19
|
{/* Header */}
|
|
20
20
|
<header className="ml-auto">
|
|
21
21
|
{user ? (
|
|
@@ -94,6 +94,7 @@ export default async function HomePage() {
|
|
|
94
94
|
strokeLinejoin="round"
|
|
95
95
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
96
96
|
>
|
|
97
|
+
<title>Docs</title>
|
|
97
98
|
<path d="M7 7h10v10" />
|
|
98
99
|
<path d="M7 17 17 7" />
|
|
99
100
|
</svg>
|
|
@@ -112,6 +113,7 @@ export default async function HomePage() {
|
|
|
112
113
|
strokeLinejoin="round"
|
|
113
114
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
114
115
|
>
|
|
116
|
+
<title>Discord</title>
|
|
115
117
|
<path d="M7 7h10v10" />
|
|
116
118
|
<path d="M7 17 17 7" />
|
|
117
119
|
</svg>
|
|
@@ -130,6 +132,7 @@ export default async function HomePage() {
|
|
|
130
132
|
strokeLinejoin="round"
|
|
131
133
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
132
134
|
>
|
|
135
|
+
<title>GitHub</title>
|
|
133
136
|
<path d="M7 7h10v10" />
|
|
134
137
|
<path d="M7 17 17 7" />
|
|
135
138
|
</svg>
|
|
@@ -19,7 +19,7 @@ export default async function HomePage() {
|
|
|
19
19
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
22
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
23
23
|
{/* Header */}
|
|
24
24
|
<header className="ml-auto">
|
|
25
25
|
{user ? (
|
|
@@ -98,6 +98,7 @@ export default async function HomePage() {
|
|
|
98
98
|
strokeLinejoin="round"
|
|
99
99
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
100
100
|
>
|
|
101
|
+
<title>Docs</title>
|
|
101
102
|
<path d="M7 7h10v10" />
|
|
102
103
|
<path d="M7 17 17 7" />
|
|
103
104
|
</svg>
|
|
@@ -116,6 +117,7 @@ export default async function HomePage() {
|
|
|
116
117
|
strokeLinejoin="round"
|
|
117
118
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
118
119
|
>
|
|
120
|
+
<title>Discord</title>
|
|
119
121
|
<path d="M7 7h10v10" />
|
|
120
122
|
<path d="M7 17 17 7" />
|
|
121
123
|
</svg>
|
|
@@ -134,6 +136,7 @@ export default async function HomePage() {
|
|
|
134
136
|
strokeLinejoin="round"
|
|
135
137
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
136
138
|
>
|
|
139
|
+
<title>GitHub</title>
|
|
137
140
|
<path d="M7 7h10v10" />
|
|
138
141
|
<path d="M7 17 17 7" />
|
|
139
142
|
</svg>
|
|
@@ -9,7 +9,7 @@ export default async function HomePage() {
|
|
|
9
9
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
12
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
13
13
|
{/* Header */}
|
|
14
14
|
<header className="ml-auto">
|
|
15
15
|
{user ? (
|
|
@@ -88,6 +88,7 @@ export default async function HomePage() {
|
|
|
88
88
|
strokeLinejoin="round"
|
|
89
89
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
90
90
|
>
|
|
91
|
+
<title>Docs</title>
|
|
91
92
|
<path d="M7 7h10v10" />
|
|
92
93
|
<path d="M7 17 17 7" />
|
|
93
94
|
</svg>
|
|
@@ -106,6 +107,7 @@ export default async function HomePage() {
|
|
|
106
107
|
strokeLinejoin="round"
|
|
107
108
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
108
109
|
>
|
|
110
|
+
<title>Discord</title>
|
|
109
111
|
<path d="M7 7h10v10" />
|
|
110
112
|
<path d="M7 17 17 7" />
|
|
111
113
|
</svg>
|
|
@@ -124,6 +126,7 @@ export default async function HomePage() {
|
|
|
124
126
|
strokeLinejoin="round"
|
|
125
127
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
126
128
|
>
|
|
129
|
+
<title>GitHub</title>
|
|
127
130
|
<path d="M7 7h10v10" />
|
|
128
131
|
<path d="M7 17 17 7" />
|
|
129
132
|
</svg>
|
|
@@ -19,7 +19,7 @@ export default async function HomePage() {
|
|
|
19
19
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
22
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
23
23
|
{/* Header */}
|
|
24
24
|
<header className="ml-auto">
|
|
25
25
|
{user ? (
|
|
@@ -110,6 +110,7 @@ export default async function HomePage() {
|
|
|
110
110
|
strokeLinejoin="round"
|
|
111
111
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
112
112
|
>
|
|
113
|
+
<title>Docs</title>
|
|
113
114
|
<path d="M7 7h10v10" />
|
|
114
115
|
<path d="M7 17 17 7" />
|
|
115
116
|
</svg>
|
|
@@ -128,6 +129,7 @@ export default async function HomePage() {
|
|
|
128
129
|
strokeLinejoin="round"
|
|
129
130
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
130
131
|
>
|
|
132
|
+
<title>Discord</title>
|
|
131
133
|
<path d="M7 7h10v10" />
|
|
132
134
|
<path d="M7 17 17 7" />
|
|
133
135
|
</svg>
|
|
@@ -146,6 +148,7 @@ export default async function HomePage() {
|
|
|
146
148
|
strokeLinejoin="round"
|
|
147
149
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
148
150
|
>
|
|
151
|
+
<title>GitHub</title>
|
|
149
152
|
<path d="M7 7h10v10" />
|
|
150
153
|
<path d="M7 17 17 7" />
|
|
151
154
|
</svg>
|
|
@@ -23,7 +23,7 @@ export default async function HomePage() {
|
|
|
23
23
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
26
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
27
27
|
{/* Header */}
|
|
28
28
|
<header className="ml-auto">
|
|
29
29
|
{user ? (
|
|
@@ -114,6 +114,7 @@ export default async function HomePage() {
|
|
|
114
114
|
strokeLinejoin="round"
|
|
115
115
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
116
116
|
>
|
|
117
|
+
<title>Docs</title>
|
|
117
118
|
<path d="M7 7h10v10" />
|
|
118
119
|
<path d="M7 17 17 7" />
|
|
119
120
|
</svg>
|
|
@@ -132,6 +133,7 @@ export default async function HomePage() {
|
|
|
132
133
|
strokeLinejoin="round"
|
|
133
134
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
134
135
|
>
|
|
136
|
+
<title>Discord</title>
|
|
135
137
|
<path d="M7 7h10v10" />
|
|
136
138
|
<path d="M7 17 17 7" />
|
|
137
139
|
</svg>
|
|
@@ -150,6 +152,7 @@ export default async function HomePage() {
|
|
|
150
152
|
strokeLinejoin="round"
|
|
151
153
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
152
154
|
>
|
|
155
|
+
<title>GitHub</title>
|
|
153
156
|
<path d="M7 7h10v10" />
|
|
154
157
|
<path d="M7 17 17 7" />
|
|
155
158
|
</svg>
|
|
@@ -13,7 +13,7 @@ export default async function HomePage() {
|
|
|
13
13
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
16
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
17
17
|
{/* Header */}
|
|
18
18
|
<header className="ml-auto">
|
|
19
19
|
{user ? (
|
|
@@ -104,6 +104,7 @@ export default async function HomePage() {
|
|
|
104
104
|
strokeLinejoin="round"
|
|
105
105
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
106
106
|
>
|
|
107
|
+
<title>Docs</title>
|
|
107
108
|
<path d="M7 7h10v10" />
|
|
108
109
|
<path d="M7 17 17 7" />
|
|
109
110
|
</svg>
|
|
@@ -122,6 +123,7 @@ export default async function HomePage() {
|
|
|
122
123
|
strokeLinejoin="round"
|
|
123
124
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
124
125
|
>
|
|
126
|
+
<title>Discord</title>
|
|
125
127
|
<path d="M7 7h10v10" />
|
|
126
128
|
<path d="M7 17 17 7" />
|
|
127
129
|
</svg>
|
|
@@ -140,6 +142,7 @@ export default async function HomePage() {
|
|
|
140
142
|
strokeLinejoin="round"
|
|
141
143
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
142
144
|
>
|
|
145
|
+
<title>GitHub</title>
|
|
143
146
|
<path d="M7 7h10v10" />
|
|
144
147
|
<path d="M7 17 17 7" />
|
|
145
148
|
</svg>
|
|
@@ -11,7 +11,7 @@ export default async function HomePage() {
|
|
|
11
11
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
14
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
15
15
|
<div className="flex grow flex-col items-center justify-center">
|
|
16
16
|
{/* Logo */}
|
|
17
17
|
<picture className="relative">
|
|
@@ -52,6 +52,7 @@ export default async function HomePage() {
|
|
|
52
52
|
strokeLinejoin="round"
|
|
53
53
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
54
54
|
>
|
|
55
|
+
<title>Docs</title>
|
|
55
56
|
<path d="M7 7h10v10" />
|
|
56
57
|
<path d="M7 17 17 7" />
|
|
57
58
|
</svg>
|
|
@@ -70,6 +71,7 @@ export default async function HomePage() {
|
|
|
70
71
|
strokeLinejoin="round"
|
|
71
72
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
72
73
|
>
|
|
74
|
+
<title>Discord</title>
|
|
73
75
|
<path d="M7 7h10v10" />
|
|
74
76
|
<path d="M7 17 17 7" />
|
|
75
77
|
</svg>
|
|
@@ -88,6 +90,7 @@ export default async function HomePage() {
|
|
|
88
90
|
strokeLinejoin="round"
|
|
89
91
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
90
92
|
>
|
|
93
|
+
<title>GitHub</title>
|
|
91
94
|
<path d="M7 7h10v10" />
|
|
92
95
|
<path d="M7 17 17 7" />
|
|
93
96
|
</svg>
|
|
@@ -12,7 +12,7 @@ export default async function HomePage() {
|
|
|
12
12
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
15
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
16
16
|
<div className="flex grow flex-col items-center justify-center">
|
|
17
17
|
{/* Logo */}
|
|
18
18
|
<picture className="relative">
|
|
@@ -86,6 +86,7 @@ export default async function HomePage() {
|
|
|
86
86
|
strokeLinejoin="round"
|
|
87
87
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
88
88
|
>
|
|
89
|
+
<title>Docs</title>
|
|
89
90
|
<path d="M7 7h10v10" />
|
|
90
91
|
<path d="M7 17 17 7" />
|
|
91
92
|
</svg>
|
|
@@ -104,6 +105,7 @@ export default async function HomePage() {
|
|
|
104
105
|
strokeLinejoin="round"
|
|
105
106
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
106
107
|
>
|
|
108
|
+
<title>Discord</title>
|
|
107
109
|
<path d="M7 7h10v10" />
|
|
108
110
|
<path d="M7 17 17 7" />
|
|
109
111
|
</svg>
|
|
@@ -122,6 +124,7 @@ export default async function HomePage() {
|
|
|
122
124
|
strokeLinejoin="round"
|
|
123
125
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
124
126
|
>
|
|
127
|
+
<title>GitHub</title>
|
|
125
128
|
<path d="M7 7h10v10" />
|
|
126
129
|
<path d="M7 17 17 7" />
|
|
127
130
|
</svg>
|
|
@@ -15,7 +15,7 @@ export default async function HomePage() {
|
|
|
15
15
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
18
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
19
19
|
<div className="flex grow flex-col items-center justify-center">
|
|
20
20
|
{/* Logo */}
|
|
21
21
|
<picture className="relative">
|
|
@@ -56,6 +56,7 @@ export default async function HomePage() {
|
|
|
56
56
|
strokeLinejoin="round"
|
|
57
57
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
58
58
|
>
|
|
59
|
+
<title>Docs</title>
|
|
59
60
|
<path d="M7 7h10v10" />
|
|
60
61
|
<path d="M7 17 17 7" />
|
|
61
62
|
</svg>
|
|
@@ -74,6 +75,7 @@ export default async function HomePage() {
|
|
|
74
75
|
strokeLinejoin="round"
|
|
75
76
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
76
77
|
>
|
|
78
|
+
<title>Discord</title>
|
|
77
79
|
<path d="M7 7h10v10" />
|
|
78
80
|
<path d="M7 17 17 7" />
|
|
79
81
|
</svg>
|
|
@@ -92,6 +94,7 @@ export default async function HomePage() {
|
|
|
92
94
|
strokeLinejoin="round"
|
|
93
95
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
94
96
|
>
|
|
97
|
+
<title>GitHub</title>
|
|
95
98
|
<path d="M7 7h10v10" />
|
|
96
99
|
<path d="M7 17 17 7" />
|
|
97
100
|
</svg>
|
|
@@ -12,7 +12,7 @@ export default async function HomePage() {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<HydrateClient>
|
|
15
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
15
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
16
16
|
<div className="flex grow flex-col items-center justify-center">
|
|
17
17
|
{/* Logo */}
|
|
18
18
|
<picture className="relative">
|
|
@@ -53,6 +53,7 @@ export default async function HomePage() {
|
|
|
53
53
|
strokeLinejoin="round"
|
|
54
54
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
55
55
|
>
|
|
56
|
+
<title>Docs</title>
|
|
56
57
|
<path d="M7 7h10v10" />
|
|
57
58
|
<path d="M7 17 17 7" />
|
|
58
59
|
</svg>
|
|
@@ -71,6 +72,7 @@ export default async function HomePage() {
|
|
|
71
72
|
strokeLinejoin="round"
|
|
72
73
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
73
74
|
>
|
|
75
|
+
<title>Discord</title>
|
|
74
76
|
<path d="M7 7h10v10" />
|
|
75
77
|
<path d="M7 17 17 7" />
|
|
76
78
|
</svg>
|
|
@@ -89,6 +91,7 @@ export default async function HomePage() {
|
|
|
89
91
|
strokeLinejoin="round"
|
|
90
92
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
91
93
|
>
|
|
94
|
+
<title>GitHub</title>
|
|
92
95
|
<path d="M7 7h10v10" />
|
|
93
96
|
<path d="M7 17 17 7" />
|
|
94
97
|
</svg>
|
|
File without changes
|