@murumets-ee/create 0.1.0 → 0.1.2
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/chunk-CUB6XFPE.js +2 -0
- package/dist/chunk-ZAX4VH4C.js +3 -0
- package/dist/cli.js +100 -96
- package/dist/index.js +83 -79
- package/dist/{utils-5ZPYHNWB.js → utils-42K2ZGUL.js} +1 -1
- package/dist/{utils-4KO55GSJ.js → utils-VX57GKZX.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-HAE5YHLL.js +0 -3
- package/dist/chunk-YJOFTYN5.js +0 -2
package/dist/cli.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,b as
|
|
2
|
+
import{a as e,b as p,c as d,d as u,e as A}from"./chunk-ZAX4VH4C.js";import*as c from"@clack/prompts";import b from"picocolors";import*as s from"@clack/prompts";async function T(t){s.intro("@murumets-ee/create");let n=t??await s.text({message:"Project name:",placeholder:"my-project",validate:l=>{if(!l)return"Project name is required";if(!/^[a-z0-9-]+$/.test(l))return"Use lowercase letters, numbers, and hyphens only"}});if(s.isCancel(n))return s.cancel("Cancelled."),null;let r=await s.select({message:"App setup:",options:[{value:"single",label:"Single app",hint:"everything in one Next.js project"},{value:"multi",label:"Admin + Frontend",hint:"two apps in a pnpm workspace"}]});if(s.isCancel(r))return s.cancel("Cancelled."),null;let o=await s.confirm({message:"Install dependencies?",initialValue:!0});return s.isCancel(o)?(s.cancel("Cancelled."),null):{name:n,mode:r,installDeps:o}}import{join as k}from"path";import{join as m}from"path";async function N(t,n){await e(m(t,"lib/auth.ts"),`import { getToolkitApp } from './app'
|
|
3
3
|
import { getAuth } from '@murumets-ee/auth'
|
|
4
4
|
|
|
5
5
|
await getToolkitApp()
|
|
6
6
|
|
|
7
7
|
export const auth = getAuth()
|
|
8
|
-
`),await e(
|
|
8
|
+
`),await e(m(t,"lib/auth-client.ts"),`import { createClient } from '@murumets-ee/auth/client'
|
|
9
9
|
|
|
10
10
|
export const authClient = createClient()
|
|
11
|
-
`),await e(
|
|
11
|
+
`),await e(m(t,"app/api/auth/[...all]/route.ts"),`import { toNextJsHandler } from 'better-auth/next-js'
|
|
12
12
|
import { auth } from '../../../../lib/auth'
|
|
13
13
|
|
|
14
14
|
export const { GET, POST } = toNextJsHandler(auth)
|
|
15
|
-
`),await e(
|
|
15
|
+
`),await e(m(t,"app/[locale]/auth/layout.tsx"),`import { AuthProviders } from './providers'
|
|
16
16
|
import type { ReactNode } from 'react'
|
|
17
17
|
|
|
18
18
|
export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
@@ -24,7 +24,7 @@ export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
|
24
24
|
</AuthProviders>
|
|
25
25
|
)
|
|
26
26
|
}
|
|
27
|
-
`),await e(
|
|
27
|
+
`),await e(m(t,"app/[locale]/auth/providers.tsx"),`'use client'
|
|
28
28
|
|
|
29
29
|
import { AuthUIProvider } from '@murumets-ee/auth-ui'
|
|
30
30
|
import { authClient } from '@/lib/auth-client'
|
|
@@ -50,22 +50,22 @@ export function AuthProviders({ children }: { children: ReactNode }) {
|
|
|
50
50
|
</AuthUIProvider>
|
|
51
51
|
)
|
|
52
52
|
}
|
|
53
|
-
`),await e(
|
|
53
|
+
`),await e(m(t,"app/[locale]/auth/sign-in/page.tsx"),`import { SignInForm } from '@murumets-ee/auth-ui'
|
|
54
54
|
|
|
55
55
|
export default function SignInPage() {
|
|
56
56
|
return <SignInForm />
|
|
57
57
|
}
|
|
58
|
-
`),await e(
|
|
58
|
+
`),await e(m(t,"app/[locale]/auth/sign-up/page.tsx"),`import { SignUpForm } from '@murumets-ee/auth-ui'
|
|
59
59
|
|
|
60
60
|
export default function SignUpPage() {
|
|
61
61
|
return <SignUpForm />
|
|
62
62
|
}
|
|
63
|
-
`),await e(
|
|
63
|
+
`),await e(m(t,"app/[locale]/auth/forgot-password/page.tsx"),`import { ForgotPasswordForm } from '@murumets-ee/auth-ui'
|
|
64
64
|
|
|
65
65
|
export default function ForgotPasswordPage() {
|
|
66
66
|
return <ForgotPasswordForm />
|
|
67
67
|
}
|
|
68
|
-
`),await e(
|
|
68
|
+
`),await e(m(t,"app/[locale]/auth/reset-password/page.tsx"),`import { Suspense } from 'react'
|
|
69
69
|
import { ResetPasswordContent } from './content'
|
|
70
70
|
|
|
71
71
|
export default function ResetPasswordPage() {
|
|
@@ -75,7 +75,7 @@ export default function ResetPasswordPage() {
|
|
|
75
75
|
</Suspense>
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
|
-
`),await e(
|
|
78
|
+
`),await e(m(t,"app/[locale]/auth/reset-password/content.tsx"),`'use client'
|
|
79
79
|
|
|
80
80
|
import { useSearchParams } from 'next/navigation'
|
|
81
81
|
import { ResetPasswordForm } from '@murumets-ee/auth-ui'
|
|
@@ -99,7 +99,7 @@ export function ResetPasswordContent() {
|
|
|
99
99
|
|
|
100
100
|
return <ResetPasswordForm token={token} />
|
|
101
101
|
}
|
|
102
|
-
`),await e(
|
|
102
|
+
`),await e(m(t,"app/[locale]/setup/page.tsx"),`import { redirect } from 'next/navigation'
|
|
103
103
|
import { sql } from 'drizzle-orm'
|
|
104
104
|
import { getToolkitApp } from '@/lib/app'
|
|
105
105
|
import { SetupForm } from './form'
|
|
@@ -124,7 +124,7 @@ export default async function SetupPage() {
|
|
|
124
124
|
</div>
|
|
125
125
|
)
|
|
126
126
|
}
|
|
127
|
-
`),await e(
|
|
127
|
+
`),await e(m(t,"app/[locale]/setup/form.tsx"),`'use client'
|
|
128
128
|
|
|
129
129
|
import { useState } from 'react'
|
|
130
130
|
import { createFirstAdmin } from './actions'
|
|
@@ -195,7 +195,7 @@ export function SetupForm() {
|
|
|
195
195
|
</form>
|
|
196
196
|
)
|
|
197
197
|
}
|
|
198
|
-
`),await e(
|
|
198
|
+
`),await e(m(t,"app/[locale]/setup/actions.ts"),`'use server'
|
|
199
199
|
|
|
200
200
|
import { sql } from 'drizzle-orm'
|
|
201
201
|
import { getToolkitApp } from '@/lib/app'
|
|
@@ -249,7 +249,7 @@ export async function createFirstAdmin(formData: FormData) {
|
|
|
249
249
|
|
|
250
250
|
return { ok: true, email: adminUser.user.email }
|
|
251
251
|
}
|
|
252
|
-
`)}import{join as
|
|
252
|
+
`)}import{join as v}from"path";async function S(t,n){let{name:r}=n;await e(v(t,".env.example"),`DATABASE_URL=postgresql://${r}:${r}_dev_password@localhost:5432/${r}_dev
|
|
253
253
|
BETTER_AUTH_SECRET=dev-secret-change-me-in-production-min-32-chars
|
|
254
254
|
BETTER_AUTH_URL=http://localhost:3000
|
|
255
255
|
LOG_LEVEL=debug
|
|
@@ -259,16 +259,14 @@ RESEND_API_KEY=
|
|
|
259
259
|
RESEND_WEBHOOK_SECRET=
|
|
260
260
|
MAIL_FROM=noreply@example.com
|
|
261
261
|
CSAT_SECRET=
|
|
262
|
-
`),await
|
|
263
|
-
//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}
|
|
264
|
-
`),await A(h(t,".gitignore"),`
|
|
262
|
+
`),await A(v(t,".gitignore"),`
|
|
265
263
|
# Toolkit generated files
|
|
266
264
|
generated/
|
|
267
265
|
|
|
268
266
|
# Environment
|
|
269
267
|
.env*
|
|
270
268
|
!.env.example
|
|
271
|
-
`),await e(
|
|
269
|
+
`),await e(v(t,"docker-compose.yml"),`services:
|
|
272
270
|
postgres:
|
|
273
271
|
image: postgres:17-alpine
|
|
274
272
|
container_name: ${r}-postgres
|
|
@@ -290,9 +288,9 @@ generated/
|
|
|
290
288
|
volumes:
|
|
291
289
|
postgres_data:
|
|
292
290
|
name: ${r}_postgres_data
|
|
293
|
-
`)}import{join as
|
|
291
|
+
`)}import{join as y}from"path";async function z(t,n){await e(y(t,"entities/index.ts"),`export { Article } from './article'
|
|
294
292
|
export { Category } from './category'
|
|
295
|
-
`),await e(
|
|
293
|
+
`),await e(y(t,"entities/article.ts"),`import { behavior, defineEntity, field } from '@murumets-ee/entity'
|
|
296
294
|
|
|
297
295
|
export const Article = defineEntity({
|
|
298
296
|
name: 'article',
|
|
@@ -323,7 +321,7 @@ export const Article = defineEntity({
|
|
|
323
321
|
delete: 'group.admin',
|
|
324
322
|
},
|
|
325
323
|
})
|
|
326
|
-
`),await e(
|
|
324
|
+
`),await e(y(t,"entities/category.ts"),`import { defineEntity, field } from '@murumets-ee/entity'
|
|
327
325
|
|
|
328
326
|
export const Category = defineEntity({
|
|
329
327
|
name: 'category',
|
|
@@ -366,15 +364,15 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
366
364
|
},
|
|
367
365
|
}
|
|
368
366
|
})
|
|
369
|
-
`)}import{mkdir as
|
|
367
|
+
`)}import{mkdir as C}from"fs/promises";import{join as a}from"path";var i={myorgCore:"0.1.0",myorgDb:"0.1.0",myorgEntity:"0.1.0",myorgLogging:"0.1.0",myorgAuth:"0.1.0",myorgAuthUi:"0.1.0",myorgAdminUi:"0.1.0",myorgContent:"0.1.0",myorgContentApi:"0.1.0",myorgSettings:"0.1.0",myorgStorage:"0.1.0",myorgMedia:"0.1.0",myorgTaxonomy:"0.1.0",myorgQueue:"0.1.0",myorgMail:"0.1.0",myorgTicketing:"0.1.0",myorgTicketingUi:"0.1.0",myorgEditor:"0.1.0",myorgBlocks:"0.1.0",myorgTokens:"0.1.0",myorgUi:"0.1.0",myorgCli:"0.1.0",betterAuth:"1.4.0",drizzleOrm:"0.45.1",nextIntl:"4.8.2",nextThemes:"0.4.6",lucideReact:"0.563.0",postgres:"3.4.5",reactHookForm:"7.71.1",hookformResolvers:"5.2.2",zod:"3.24.1",drizzleKit:"0.27.2",tsx:"4.19.2",babelReactCompiler:"1.0.0"};async function R(t,n,r){await U(t,n),r?.("Workspace root created"),r?.("Creating admin app..."),await D(t,n),r?.("Admin app created"),r?.("Creating web app..."),await F(t,n),r?.("Web app created"),await I(t,n),r?.("Shared config package created")}async function U(t,n){let{name:r}=n;await C(t,{recursive:!0}),await e(a(t,"pnpm-workspace.yaml"),`packages:
|
|
370
368
|
- 'packages/*'
|
|
371
369
|
- 'apps/*'
|
|
372
370
|
|
|
373
371
|
ignoredBuiltDependencies:
|
|
374
372
|
- sharp
|
|
375
373
|
- unrs-resolver
|
|
376
|
-
`),await e(
|
|
377
|
-
`),await e(
|
|
374
|
+
`),await e(a(t,"package.json"),`${JSON.stringify({name:`@${r}/monorepo`,version:"0.0.0",private:!0,type:"module",scripts:{dev:"turbo dev",build:"turbo build","db:generate":"tsx --env-file=.env packages/config/scripts/generate-schema.ts","db:migrate:generate":"drizzle-kit generate --config packages/config/drizzle.config.ts","db:migrate":"tsx --env-file=.env packages/config/scripts/migrate.ts","db:reset":"tsx --env-file=.env packages/config/scripts/reset-db.ts"},devDependencies:{turbo:"^2.3.3",typescript:"^5.7.3",tsx:`^${i.tsx}`,"drizzle-kit":`^${i.drizzleKit}`}},null,2)}
|
|
375
|
+
`),await e(a(t,".gitignore"),`# dependencies
|
|
378
376
|
node_modules/
|
|
379
377
|
|
|
380
378
|
# build
|
|
@@ -405,7 +403,7 @@ migrations/
|
|
|
405
403
|
|
|
406
404
|
# turbo
|
|
407
405
|
.turbo/
|
|
408
|
-
`),await e(
|
|
406
|
+
`),await e(a(t,".env.example"),`DATABASE_URL=postgresql://${r}:${r}_dev_password@localhost:5432/${r}_dev
|
|
409
407
|
BETTER_AUTH_SECRET=dev-secret-change-me-in-production-min-32-chars
|
|
410
408
|
BETTER_AUTH_URL=http://localhost:3000
|
|
411
409
|
LOG_LEVEL=debug
|
|
@@ -415,9 +413,7 @@ RESEND_API_KEY=
|
|
|
415
413
|
RESEND_WEBHOOK_SECRET=
|
|
416
414
|
MAIL_FROM=noreply@example.com
|
|
417
415
|
CSAT_SECRET=
|
|
418
|
-
`),await e(
|
|
419
|
-
//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}
|
|
420
|
-
`),await e(o(t,"docker-compose.yml"),`services:
|
|
416
|
+
`),await e(a(t,"docker-compose.yml"),`services:
|
|
421
417
|
postgres:
|
|
422
418
|
image: postgres:17-alpine
|
|
423
419
|
container_name: ${r}-postgres
|
|
@@ -439,9 +435,9 @@ CSAT_SECRET=
|
|
|
439
435
|
volumes:
|
|
440
436
|
postgres_data:
|
|
441
437
|
name: ${r}_postgres_data
|
|
442
|
-
`)}async function I(t,n){let{name:r}=n,a
|
|
443
|
-
`),await e(o
|
|
444
|
-
`),await e(o
|
|
438
|
+
`)}async function I(t,n){let{name:r}=n,o=a(t,"packages/config");await e(a(o,"package.json"),`${JSON.stringify({name:`@${r}/config`,version:"0.1.0",private:!0,type:"module",exports:{".":"./toolkit.config.ts","./entities":"./entities/index.ts","./entities/*":"./entities/*","./app":"./lib/app.ts","./auth":"./lib/auth.ts","./auth-client":"./lib/auth-client.ts"},dependencies:{"@murumets-ee/core":`^${i.myorgCore}`,"@murumets-ee/db":`^${i.myorgDb}`,"@murumets-ee/entity":`^${i.myorgEntity}`,"@murumets-ee/logging":`^${i.myorgLogging}`,"@murumets-ee/auth":`^${i.myorgAuth}`,"better-auth":`^${i.betterAuth}`,"drizzle-orm":`^${i.drizzleOrm}`,postgres:`^${i.postgres}`,zod:`^${i.zod}`}},null,2)}
|
|
439
|
+
`),await e(a(o,"tsconfig.json"),`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",strict:!0,esModuleInterop:!0,skipLibCheck:!0,resolveJsonModule:!0},include:["**/*.ts"]},null,2)}
|
|
440
|
+
`),await e(a(o,"toolkit.config.ts"),`import { auth } from '@murumets-ee/auth/plugin'
|
|
445
441
|
import { content } from '@murumets-ee/content/plugin'
|
|
446
442
|
import { defineConfig } from '@murumets-ee/core'
|
|
447
443
|
import { mail, ResendMailProvider } from '@murumets-ee/mail'
|
|
@@ -493,7 +489,7 @@ export default defineConfig({
|
|
|
493
489
|
],
|
|
494
490
|
projectRoot: import.meta.dirname,
|
|
495
491
|
})
|
|
496
|
-
`),await e(o
|
|
492
|
+
`),await e(a(o,"auth.config.ts"),`import { betterAuth } from 'better-auth'
|
|
497
493
|
import { drizzleAdapter } from 'better-auth/adapters/drizzle'
|
|
498
494
|
import { admin } from 'better-auth/plugins'
|
|
499
495
|
import { organization } from 'better-auth/plugins/organization'
|
|
@@ -511,7 +507,7 @@ export const auth = betterAuth({
|
|
|
511
507
|
organization(),
|
|
512
508
|
],
|
|
513
509
|
})
|
|
514
|
-
`),await e(o
|
|
510
|
+
`),await e(a(o,"drizzle.config.ts"),`import type { Config } from 'drizzle-kit'
|
|
515
511
|
|
|
516
512
|
if (!process.env.DATABASE_URL) {
|
|
517
513
|
throw new Error('DATABASE_URL environment variable is required')
|
|
@@ -525,9 +521,9 @@ export default {
|
|
|
525
521
|
url: process.env.DATABASE_URL,
|
|
526
522
|
},
|
|
527
523
|
} satisfies Config
|
|
528
|
-
`),await e(o
|
|
524
|
+
`),await e(a(o,"entities/index.ts"),`export { Article } from './article'
|
|
529
525
|
export { Category } from './category'
|
|
530
|
-
`),await e(o
|
|
526
|
+
`),await e(a(o,"entities/article.ts"),`import { behavior, defineEntity, field } from '@murumets-ee/entity'
|
|
531
527
|
|
|
532
528
|
export const Article = defineEntity({
|
|
533
529
|
name: 'article',
|
|
@@ -558,7 +554,7 @@ export const Article = defineEntity({
|
|
|
558
554
|
delete: 'group.admin',
|
|
559
555
|
},
|
|
560
556
|
})
|
|
561
|
-
`),await e(o
|
|
557
|
+
`),await e(a(o,"entities/category.ts"),`import { defineEntity, field } from '@murumets-ee/entity'
|
|
562
558
|
|
|
563
559
|
export const Category = defineEntity({
|
|
564
560
|
name: 'category',
|
|
@@ -575,7 +571,7 @@ export const Category = defineEntity({
|
|
|
575
571
|
delete: 'group.admin',
|
|
576
572
|
},
|
|
577
573
|
})
|
|
578
|
-
`),await e(o
|
|
574
|
+
`),await e(a(o,"lib/app.ts"),`import { createApp, setApp, type ToolkitApp } from '@murumets-ee/core'
|
|
579
575
|
import config from '../toolkit.config'
|
|
580
576
|
|
|
581
577
|
let appInstance: ToolkitApp | null = null
|
|
@@ -589,19 +585,19 @@ export async function getToolkitApp(): Promise<ToolkitApp> {
|
|
|
589
585
|
}
|
|
590
586
|
return appInstance
|
|
591
587
|
}
|
|
592
|
-
`),await e(o
|
|
588
|
+
`),await e(a(o,"lib/auth.ts"),`import { getToolkitApp } from './app'
|
|
593
589
|
import { getAuth } from '@murumets-ee/auth'
|
|
594
590
|
|
|
595
591
|
await getToolkitApp()
|
|
596
592
|
|
|
597
593
|
export const auth = getAuth()
|
|
598
|
-
`),await e(o
|
|
594
|
+
`),await e(a(o,"lib/auth-client.ts"),`import { createClient } from '@murumets-ee/auth/client'
|
|
599
595
|
|
|
600
596
|
export const authClient = createClient()
|
|
601
|
-
`),await e(o
|
|
597
|
+
`),await e(a(o,"generated/auth-schema.ts"),`// This file is generated by better-auth CLI.
|
|
602
598
|
// Run: npx @better-auth/cli generate --config auth.config.ts -y
|
|
603
599
|
export {}
|
|
604
|
-
`),await e(o
|
|
600
|
+
`),await e(a(o,"scripts/generate-schema.ts"),`/**
|
|
605
601
|
* Generate Drizzle schemas from entity definitions
|
|
606
602
|
*/
|
|
607
603
|
|
|
@@ -635,9 +631,9 @@ async function generateSchemas() {
|
|
|
635
631
|
}
|
|
636
632
|
}
|
|
637
633
|
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
|
|
634
|
+
const pgCoreTypes = ['pgTable', 'varchar', 'text', 'boolean', 'timestamp', 'integer', 'doublePrecision', 'jsonb', 'uuid', 'index']
|
|
635
|
+
if (hasTranslations) pgCoreTypes.push('unique')
|
|
636
|
+
const pgCoreImports = \`import { \${pgCoreTypes.join(', ')} } from 'drizzle-orm/pg-core'\\n\`
|
|
641
637
|
imports.push(pgCoreImports)
|
|
642
638
|
|
|
643
639
|
const schemaFile = join(schemaDir, 'schema.ts')
|
|
@@ -648,7 +644,7 @@ async function generateSchemas() {
|
|
|
648
644
|
}
|
|
649
645
|
|
|
650
646
|
generateSchemas().catch(console.error)
|
|
651
|
-
`),await e(o
|
|
647
|
+
`),await e(a(o,"scripts/migrate.ts"),`/**
|
|
652
648
|
* Run pending migrations
|
|
653
649
|
*/
|
|
654
650
|
|
|
@@ -674,7 +670,7 @@ async function migrate() {
|
|
|
674
670
|
}
|
|
675
671
|
|
|
676
672
|
migrate()
|
|
677
|
-
`),await e(o
|
|
673
|
+
`),await e(a(o,"scripts/reset-db.ts"),`/**
|
|
678
674
|
* Reset database (DROP all tables)
|
|
679
675
|
* WARNING: Only for development
|
|
680
676
|
*/
|
|
@@ -707,11 +703,11 @@ async function resetDb() {
|
|
|
707
703
|
}
|
|
708
704
|
|
|
709
705
|
resetDb().catch(console.error)
|
|
710
|
-
`)}async function
|
|
706
|
+
`)}async function D(t,n){let{name:r}=n,o=a(t,"apps/admin");await C(a(t,"apps"),{recursive:!0}),u(`pnpm create next-app@${"16"} ${o} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await d(o,["app/page.tsx","app/page.module.css","app/fonts","README.md","pnpm-workspace.yaml"]),await p(a(o,"package.json"),{dependencies:{[`@${r}/config`]:"workspace:*","@murumets-ee/auth-ui":`^${i.myorgAuthUi}`,"better-auth":`^${i.betterAuth}`,"next-intl":`^${i.nextIntl}`,"next-themes":`^${i.nextThemes}`,"lucide-react":`^${i.lucideReact}`,"react-hook-form":`^${i.reactHookForm}`,"@hookform/resolvers":`^${i.hookformResolvers}`,zod:`^${i.zod}`},devDependencies:{"babel-plugin-react-compiler":i.babelReactCompiler}});let{appendToFile:l}=await import("./utils-VX57GKZX.js");await l(a(o,".gitignore"),`
|
|
711
707
|
# Environment
|
|
712
708
|
.env*
|
|
713
709
|
!.env.example
|
|
714
|
-
`),await e(o
|
|
710
|
+
`),await e(a(o,"next.config.ts"),`import type { NextConfig } from 'next'
|
|
715
711
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
716
712
|
|
|
717
713
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
@@ -735,7 +731,7 @@ const nextConfig: NextConfig = {
|
|
|
735
731
|
}
|
|
736
732
|
|
|
737
733
|
export default withNextIntl(nextConfig)
|
|
738
|
-
`),await e(o
|
|
734
|
+
`),await e(a(o,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
|
|
739
735
|
import createMiddleware from 'next-intl/middleware'
|
|
740
736
|
import { routing } from './i18n/routing'
|
|
741
737
|
|
|
@@ -763,13 +759,13 @@ export function proxy(request: NextRequest) {
|
|
|
763
759
|
export const config = {
|
|
764
760
|
matcher: '/((?!api|_next|_vercel|.*\\\\..*).*)',
|
|
765
761
|
}
|
|
766
|
-
`),await e(o
|
|
762
|
+
`),await e(a(o,"i18n/routing.ts"),`import { defineRouting } from 'next-intl/routing'
|
|
767
763
|
|
|
768
764
|
export const routing = defineRouting({
|
|
769
765
|
locales: ['en'],
|
|
770
766
|
defaultLocale: 'en',
|
|
771
767
|
})
|
|
772
|
-
`),await e(o
|
|
768
|
+
`),await e(a(o,"i18n/request.ts"),`import { getRequestConfig } from 'next-intl/server'
|
|
773
769
|
import { hasLocale } from 'next-intl'
|
|
774
770
|
import { routing } from './routing'
|
|
775
771
|
import { getAuthMessages } from '@murumets-ee/auth-ui/i18n'
|
|
@@ -789,7 +785,7 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
789
785
|
},
|
|
790
786
|
}
|
|
791
787
|
})
|
|
792
|
-
`),await e(o
|
|
788
|
+
`),await e(a(o,"app/globals.css"),`@import "tailwindcss";
|
|
793
789
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
794
790
|
|
|
795
791
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -816,7 +812,7 @@ body {
|
|
|
816
812
|
color: var(--foreground);
|
|
817
813
|
font-family: Arial, Helvetica, sans-serif;
|
|
818
814
|
}
|
|
819
|
-
`),await e(o
|
|
815
|
+
`),await e(a(o,"app/theme-provider.tsx"),`'use client'
|
|
820
816
|
|
|
821
817
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
822
818
|
import type { ReactNode } from 'react'
|
|
@@ -833,7 +829,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
833
829
|
</NextThemesProvider>
|
|
834
830
|
)
|
|
835
831
|
}
|
|
836
|
-
`),await e(o
|
|
832
|
+
`),await e(a(o,"app/theme-toggle.tsx"),`'use client'
|
|
837
833
|
|
|
838
834
|
import { useTheme } from 'next-themes'
|
|
839
835
|
import { useState, useEffect } from 'react'
|
|
@@ -860,7 +856,7 @@ export function ThemeToggle() {
|
|
|
860
856
|
</button>
|
|
861
857
|
)
|
|
862
858
|
}
|
|
863
|
-
`),await e(o
|
|
859
|
+
`),await e(a(o,"app/nav-header.tsx"),`'use client'
|
|
864
860
|
|
|
865
861
|
import Link from 'next/link'
|
|
866
862
|
import { usePathname } from 'next/navigation'
|
|
@@ -904,12 +900,12 @@ export function NavHeader() {
|
|
|
904
900
|
</header>
|
|
905
901
|
)
|
|
906
902
|
}
|
|
907
|
-
`),await e(o
|
|
903
|
+
`),await e(a(o,"app/layout.tsx"),`import './globals.css'
|
|
908
904
|
|
|
909
905
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
910
906
|
return children
|
|
911
907
|
}
|
|
912
|
-
`),await e(o
|
|
908
|
+
`),await e(a(o,"app/[locale]/layout.tsx"),`import type { Metadata } from 'next'
|
|
913
909
|
import { Geist, Geist_Mono } from 'next/font/google'
|
|
914
910
|
import { NextIntlClientProvider } from 'next-intl'
|
|
915
911
|
import { getMessages } from 'next-intl/server'
|
|
@@ -958,7 +954,7 @@ export default async function LocaleLayout({
|
|
|
958
954
|
</html>
|
|
959
955
|
)
|
|
960
956
|
}
|
|
961
|
-
`),await e(o
|
|
957
|
+
`),await e(a(o,"app/[locale]/page.tsx"),`import { createQueryClient } from '@murumets-ee/core/clients'
|
|
962
958
|
import { Article, Category } from '@${r}/config/entities'
|
|
963
959
|
import { getToolkitApp } from '@${r}/config/app'
|
|
964
960
|
|
|
@@ -1022,11 +1018,11 @@ export default async function HomePage() {
|
|
|
1022
1018
|
</div>
|
|
1023
1019
|
)
|
|
1024
1020
|
}
|
|
1025
|
-
`),await e(o
|
|
1021
|
+
`),await e(a(o,"app/api/auth/[...all]/route.ts"),`import { toNextJsHandler } from 'better-auth/next-js'
|
|
1026
1022
|
import { auth } from '@${r}/config/auth'
|
|
1027
1023
|
|
|
1028
1024
|
export const { GET, POST } = toNextJsHandler(auth)
|
|
1029
|
-
`),await e(o
|
|
1025
|
+
`),await e(a(o,"app/[locale]/auth/layout.tsx"),`import { AuthProviders } from './providers'
|
|
1030
1026
|
import type { ReactNode } from 'react'
|
|
1031
1027
|
|
|
1032
1028
|
export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
@@ -1038,7 +1034,7 @@ export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
|
1038
1034
|
</AuthProviders>
|
|
1039
1035
|
)
|
|
1040
1036
|
}
|
|
1041
|
-
`),await e(o
|
|
1037
|
+
`),await e(a(o,"app/[locale]/auth/providers.tsx"),`'use client'
|
|
1042
1038
|
|
|
1043
1039
|
import { AuthUIProvider } from '@murumets-ee/auth-ui'
|
|
1044
1040
|
import { authClient } from '@${r}/config/auth-client'
|
|
@@ -1064,22 +1060,22 @@ export function AuthProviders({ children }: { children: ReactNode }) {
|
|
|
1064
1060
|
</AuthUIProvider>
|
|
1065
1061
|
)
|
|
1066
1062
|
}
|
|
1067
|
-
`),await e(o
|
|
1063
|
+
`),await e(a(o,"app/[locale]/auth/sign-in/page.tsx"),`import { SignInForm } from '@murumets-ee/auth-ui'
|
|
1068
1064
|
|
|
1069
1065
|
export default function SignInPage() {
|
|
1070
1066
|
return <SignInForm />
|
|
1071
1067
|
}
|
|
1072
|
-
`),await e(o
|
|
1068
|
+
`),await e(a(o,"app/[locale]/auth/sign-up/page.tsx"),`import { SignUpForm } from '@murumets-ee/auth-ui'
|
|
1073
1069
|
|
|
1074
1070
|
export default function SignUpPage() {
|
|
1075
1071
|
return <SignUpForm />
|
|
1076
1072
|
}
|
|
1077
|
-
`),await e(o
|
|
1073
|
+
`),await e(a(o,"app/[locale]/auth/forgot-password/page.tsx"),`import { ForgotPasswordForm } from '@murumets-ee/auth-ui'
|
|
1078
1074
|
|
|
1079
1075
|
export default function ForgotPasswordPage() {
|
|
1080
1076
|
return <ForgotPasswordForm />
|
|
1081
1077
|
}
|
|
1082
|
-
`),await e(o
|
|
1078
|
+
`),await e(a(o,"app/[locale]/auth/reset-password/page.tsx"),`import { Suspense } from 'react'
|
|
1083
1079
|
import { ResetPasswordContent } from './content'
|
|
1084
1080
|
|
|
1085
1081
|
export default function ResetPasswordPage() {
|
|
@@ -1089,7 +1085,7 @@ export default function ResetPasswordPage() {
|
|
|
1089
1085
|
</Suspense>
|
|
1090
1086
|
)
|
|
1091
1087
|
}
|
|
1092
|
-
`),await e(o
|
|
1088
|
+
`),await e(a(o,"app/[locale]/auth/reset-password/content.tsx"),`'use client'
|
|
1093
1089
|
|
|
1094
1090
|
import { useSearchParams } from 'next/navigation'
|
|
1095
1091
|
import { ResetPasswordForm } from '@murumets-ee/auth-ui'
|
|
@@ -1113,7 +1109,7 @@ export function ResetPasswordContent() {
|
|
|
1113
1109
|
|
|
1114
1110
|
return <ResetPasswordForm token={token} />
|
|
1115
1111
|
}
|
|
1116
|
-
`),await e(o
|
|
1112
|
+
`),await e(a(o,"app/[locale]/setup/page.tsx"),`import { redirect } from 'next/navigation'
|
|
1117
1113
|
import { sql } from 'drizzle-orm'
|
|
1118
1114
|
import { getToolkitApp } from '@${r}/config/app'
|
|
1119
1115
|
import { SetupForm } from './form'
|
|
@@ -1138,7 +1134,7 @@ export default async function SetupPage() {
|
|
|
1138
1134
|
</div>
|
|
1139
1135
|
)
|
|
1140
1136
|
}
|
|
1141
|
-
`),await e(o
|
|
1137
|
+
`),await e(a(o,"app/[locale]/setup/form.tsx"),`'use client'
|
|
1142
1138
|
|
|
1143
1139
|
import { useState } from 'react'
|
|
1144
1140
|
import { createFirstAdmin } from './actions'
|
|
@@ -1209,7 +1205,7 @@ export function SetupForm() {
|
|
|
1209
1205
|
</form>
|
|
1210
1206
|
)
|
|
1211
1207
|
}
|
|
1212
|
-
`),await e(o
|
|
1208
|
+
`),await e(a(o,"app/[locale]/setup/actions.ts"),`'use server'
|
|
1213
1209
|
|
|
1214
1210
|
import { sql } from 'drizzle-orm'
|
|
1215
1211
|
import { getToolkitApp } from '@${r}/config/app'
|
|
@@ -1255,11 +1251,11 @@ export async function createFirstAdmin(formData: FormData) {
|
|
|
1255
1251
|
|
|
1256
1252
|
return { ok: true, email: adminUser.user.email }
|
|
1257
1253
|
}
|
|
1258
|
-
`)}async function
|
|
1254
|
+
`)}async function F(t,n){let{name:r}=n,o=a(t,"apps/web");u(`pnpm create next-app@${"16"} ${o} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await d(o,["app/page.tsx","app/page.module.css","app/fonts","README.md","pnpm-workspace.yaml"]),await p(a(o,"package.json"),{dependencies:{[`@${r}/config`]:"workspace:*","@murumets-ee/core":`^${i.myorgCore}`,"@murumets-ee/auth-ui":`^${i.myorgAuthUi}`,"next-intl":`^${i.nextIntl}`,"next-themes":`^${i.nextThemes}`,"lucide-react":`^${i.lucideReact}`},devDependencies:{"babel-plugin-react-compiler":i.babelReactCompiler}});let{appendToFile:l}=await import("./utils-VX57GKZX.js");await l(a(o,".gitignore"),`
|
|
1259
1255
|
# Environment
|
|
1260
1256
|
.env*
|
|
1261
1257
|
!.env.example
|
|
1262
|
-
`),await e(o
|
|
1258
|
+
`),await e(a(o,"next.config.ts"),`import type { NextConfig } from 'next'
|
|
1263
1259
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
1264
1260
|
|
|
1265
1261
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
@@ -1278,7 +1274,7 @@ const nextConfig: NextConfig = {
|
|
|
1278
1274
|
}
|
|
1279
1275
|
|
|
1280
1276
|
export default withNextIntl(nextConfig)
|
|
1281
|
-
`),await e(o
|
|
1277
|
+
`),await e(a(o,"proxy.ts"),`import createMiddleware from 'next-intl/middleware'
|
|
1282
1278
|
import { routing } from './i18n/routing'
|
|
1283
1279
|
|
|
1284
1280
|
export default createMiddleware(routing)
|
|
@@ -1286,13 +1282,13 @@ export default createMiddleware(routing)
|
|
|
1286
1282
|
export const config = {
|
|
1287
1283
|
matcher: '/((?!api|_next|_vercel|.*\\\\..*).*)',
|
|
1288
1284
|
}
|
|
1289
|
-
`),await e(o
|
|
1285
|
+
`),await e(a(o,"i18n/routing.ts"),`import { defineRouting } from 'next-intl/routing'
|
|
1290
1286
|
|
|
1291
1287
|
export const routing = defineRouting({
|
|
1292
1288
|
locales: ['en'],
|
|
1293
1289
|
defaultLocale: 'en',
|
|
1294
1290
|
})
|
|
1295
|
-
`),await e(o
|
|
1291
|
+
`),await e(a(o,"i18n/request.ts"),`import { getRequestConfig } from 'next-intl/server'
|
|
1296
1292
|
import { hasLocale } from 'next-intl'
|
|
1297
1293
|
import { routing } from './routing'
|
|
1298
1294
|
import { getAuthMessages } from '@murumets-ee/auth-ui/i18n'
|
|
@@ -1312,7 +1308,7 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
1312
1308
|
},
|
|
1313
1309
|
}
|
|
1314
1310
|
})
|
|
1315
|
-
`),await e(o
|
|
1311
|
+
`),await e(a(o,"app/globals.css"),`@import "tailwindcss";
|
|
1316
1312
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
1317
1313
|
|
|
1318
1314
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -1339,7 +1335,7 @@ body {
|
|
|
1339
1335
|
color: var(--foreground);
|
|
1340
1336
|
font-family: Arial, Helvetica, sans-serif;
|
|
1341
1337
|
}
|
|
1342
|
-
`),await e(o
|
|
1338
|
+
`),await e(a(o,"app/theme-provider.tsx"),`'use client'
|
|
1343
1339
|
|
|
1344
1340
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
1345
1341
|
import type { ReactNode } from 'react'
|
|
@@ -1356,7 +1352,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
1356
1352
|
</NextThemesProvider>
|
|
1357
1353
|
)
|
|
1358
1354
|
}
|
|
1359
|
-
`),await e(o
|
|
1355
|
+
`),await e(a(o,"app/theme-toggle.tsx"),`'use client'
|
|
1360
1356
|
|
|
1361
1357
|
import { useTheme } from 'next-themes'
|
|
1362
1358
|
import { useState, useEffect } from 'react'
|
|
@@ -1383,7 +1379,7 @@ export function ThemeToggle() {
|
|
|
1383
1379
|
</button>
|
|
1384
1380
|
)
|
|
1385
1381
|
}
|
|
1386
|
-
`),await e(o
|
|
1382
|
+
`),await e(a(o,"app/nav-header.tsx"),`'use client'
|
|
1387
1383
|
|
|
1388
1384
|
import Link from 'next/link'
|
|
1389
1385
|
import { usePathname } from 'next/navigation'
|
|
@@ -1425,12 +1421,12 @@ export function NavHeader() {
|
|
|
1425
1421
|
</header>
|
|
1426
1422
|
)
|
|
1427
1423
|
}
|
|
1428
|
-
`),await e(o
|
|
1424
|
+
`),await e(a(o,"app/layout.tsx"),`import './globals.css'
|
|
1429
1425
|
|
|
1430
1426
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
1431
1427
|
return children
|
|
1432
1428
|
}
|
|
1433
|
-
`),await e(o
|
|
1429
|
+
`),await e(a(o,"app/[locale]/layout.tsx"),`import type { Metadata } from 'next'
|
|
1434
1430
|
import { Geist, Geist_Mono } from 'next/font/google'
|
|
1435
1431
|
import { NextIntlClientProvider } from 'next-intl'
|
|
1436
1432
|
import { getMessages } from 'next-intl/server'
|
|
@@ -1479,7 +1475,7 @@ export default async function LocaleLayout({
|
|
|
1479
1475
|
</html>
|
|
1480
1476
|
)
|
|
1481
1477
|
}
|
|
1482
|
-
`),await e(o
|
|
1478
|
+
`),await e(a(o,"app/[locale]/page.tsx"),`import { createQueryClient } from '@murumets-ee/core/clients'
|
|
1483
1479
|
import { Article, Category } from '@${r}/config/entities'
|
|
1484
1480
|
import { getToolkitApp } from '@${r}/config/app'
|
|
1485
1481
|
|
|
@@ -1549,9 +1545,17 @@ import createNextIntlPlugin from 'next-intl/plugin'
|
|
|
1549
1545
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
1550
1546
|
|
|
1551
1547
|
const nextConfig: NextConfig = {
|
|
1548
|
+
output: 'standalone',
|
|
1552
1549
|
reactCompiler: true,
|
|
1553
|
-
transpilePackages: [
|
|
1554
|
-
|
|
1550
|
+
transpilePackages: [
|
|
1551
|
+
'@murumets-ee/core', '@murumets-ee/entity', '@murumets-ee/db',
|
|
1552
|
+
'@murumets-ee/logging', '@murumets-ee/auth', '@murumets-ee/auth-ui',
|
|
1553
|
+
'@murumets-ee/admin-ui', '@murumets-ee/content', '@murumets-ee/settings',
|
|
1554
|
+
'@murumets-ee/storage', '@murumets-ee/media', '@murumets-ee/taxonomy',
|
|
1555
|
+
'@murumets-ee/queue', '@murumets-ee/mail', '@murumets-ee/ticketing',
|
|
1556
|
+
'@murumets-ee/ticketing-ui', '@murumets-ee/tokens', '@murumets-ee/ui',
|
|
1557
|
+
],
|
|
1558
|
+
serverExternalPackages: ['drizzle-orm', 'postgres', 'pino', 'file-type'],
|
|
1555
1559
|
experimental: {
|
|
1556
1560
|
serverActions: {
|
|
1557
1561
|
bodySizeLimit: '2mb',
|
|
@@ -1709,7 +1713,7 @@ export default async function HomePage() {
|
|
|
1709
1713
|
</div>
|
|
1710
1714
|
)
|
|
1711
1715
|
}
|
|
1712
|
-
`)}import{join as
|
|
1716
|
+
`)}import{join as w}from"path";async function _(t,n){await e(w(t,"scripts/generate-schema.ts"),`/**
|
|
1713
1717
|
* Generate Drizzle schemas from entity definitions
|
|
1714
1718
|
* This script reads entity definitions and outputs Drizzle schema files
|
|
1715
1719
|
*/
|
|
@@ -1746,10 +1750,10 @@ async function generateSchemas() {
|
|
|
1746
1750
|
}
|
|
1747
1751
|
}
|
|
1748
1752
|
|
|
1749
|
-
// Add imports
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
+
// Add imports \u2014 include all pg-core types that entities might use
|
|
1754
|
+
const pgCoreTypes = ['pgTable', 'varchar', 'text', 'boolean', 'timestamp', 'integer', 'doublePrecision', 'jsonb', 'uuid', 'index']
|
|
1755
|
+
if (hasTranslations) pgCoreTypes.push('unique')
|
|
1756
|
+
const pgCoreImports = \`import { \${pgCoreTypes.join(', ')} } from 'drizzle-orm/pg-core'\\n\`
|
|
1753
1757
|
imports.push(pgCoreImports)
|
|
1754
1758
|
|
|
1755
1759
|
const schemaFile = join(schemaDir, 'schema.ts')
|
|
@@ -1760,7 +1764,7 @@ async function generateSchemas() {
|
|
|
1760
1764
|
}
|
|
1761
1765
|
|
|
1762
1766
|
generateSchemas().catch(console.error)
|
|
1763
|
-
`),await e(
|
|
1767
|
+
`),await e(w(t,"scripts/migrate.ts"),`/**
|
|
1764
1768
|
* Run pending migrations
|
|
1765
1769
|
* Applies both toolkit migrations (.toolkit/) and project migrations
|
|
1766
1770
|
*/
|
|
@@ -1787,7 +1791,7 @@ async function migrate() {
|
|
|
1787
1791
|
}
|
|
1788
1792
|
|
|
1789
1793
|
migrate()
|
|
1790
|
-
`),await e(
|
|
1794
|
+
`),await e(w(t,"scripts/reset-db.ts"),`/**
|
|
1791
1795
|
* Reset database (DROP all tables)
|
|
1792
1796
|
* WARNING: Only for development
|
|
1793
1797
|
*/
|
|
@@ -1821,7 +1825,7 @@ async function resetDb() {
|
|
|
1821
1825
|
}
|
|
1822
1826
|
|
|
1823
1827
|
resetDb().catch(console.error)
|
|
1824
|
-
`)}import{join as
|
|
1828
|
+
`)}import{join as x}from"path";async function $(t,n){let{name:r}=n;await e(x(t,"app/globals.css"),`@import "tailwindcss";
|
|
1825
1829
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
1826
1830
|
|
|
1827
1831
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -1848,7 +1852,7 @@ body {
|
|
|
1848
1852
|
color: var(--foreground);
|
|
1849
1853
|
font-family: Arial, Helvetica, sans-serif;
|
|
1850
1854
|
}
|
|
1851
|
-
`),await e(
|
|
1855
|
+
`),await e(x(t,"app/theme-provider.tsx"),`'use client'
|
|
1852
1856
|
|
|
1853
1857
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
1854
1858
|
import type { ReactNode } from 'react'
|
|
@@ -1865,7 +1869,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
1865
1869
|
</NextThemesProvider>
|
|
1866
1870
|
)
|
|
1867
1871
|
}
|
|
1868
|
-
`),await e(
|
|
1872
|
+
`),await e(x(t,"app/theme-toggle.tsx"),`'use client'
|
|
1869
1873
|
|
|
1870
1874
|
import { useTheme } from 'next-themes'
|
|
1871
1875
|
import { useState, useEffect } from 'react'
|
|
@@ -1892,7 +1896,7 @@ export function ThemeToggle() {
|
|
|
1892
1896
|
</button>
|
|
1893
1897
|
)
|
|
1894
1898
|
}
|
|
1895
|
-
`),await e(
|
|
1899
|
+
`),await e(x(t,"app/nav-header.tsx"),`'use client'
|
|
1896
1900
|
|
|
1897
1901
|
import Link from 'next/link'
|
|
1898
1902
|
import { usePathname } from 'next/navigation'
|
|
@@ -2037,5 +2041,5 @@ export const auth = betterAuth({
|
|
|
2037
2041
|
`),await e(f(t,"generated/auth-schema.ts"),`// This file is generated by better-auth CLI.
|
|
2038
2042
|
// Run: npx @better-auth/cli generate --config auth.config.ts -y
|
|
2039
2043
|
export {}
|
|
2040
|
-
`)}async function q(t,n){t.mode==="single"?await B(t,n):await H(t,n)}async function B(t,n){let r=k(process.cwd(),t.name);n?.("Creating Next.js app..."),
|
|
2041
|
-
`),"Next steps"),c.outro(`${
|
|
2044
|
+
`)}async function q(t,n){t.mode==="single"?await B(t,n):await H(t,n)}async function B(t,n){let r=k(process.cwd(),t.name);n?.("Creating Next.js app..."),u(`pnpm create next-app@${"16"} ${t.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await d(r,["app/page.tsx","app/page.module.css","app/fonts","README.md"]),await p(k(r,"package.json"),{type:"module",dependencies:{"@murumets-ee/core":`^${i.myorgCore}`,"@murumets-ee/db":`^${i.myorgDb}`,"@murumets-ee/entity":`^${i.myorgEntity}`,"@murumets-ee/logging":`^${i.myorgLogging}`,"@murumets-ee/auth":`^${i.myorgAuth}`,"@murumets-ee/auth-ui":`^${i.myorgAuthUi}`,"@murumets-ee/admin-ui":`^${i.myorgAdminUi}`,"@murumets-ee/content":`^${i.myorgContent}`,"@murumets-ee/settings":`^${i.myorgSettings}`,"@murumets-ee/storage":`^${i.myorgStorage}`,"@murumets-ee/media":`^${i.myorgMedia}`,"@murumets-ee/taxonomy":`^${i.myorgTaxonomy}`,"@murumets-ee/queue":`^${i.myorgQueue}`,"@murumets-ee/mail":`^${i.myorgMail}`,"@murumets-ee/ticketing":`^${i.myorgTicketing}`,"@murumets-ee/ticketing-ui":`^${i.myorgTicketingUi}`,"@murumets-ee/tokens":`^${i.myorgTokens}`,"better-auth":`^${i.betterAuth}`,"drizzle-orm":`^${i.drizzleOrm}`,"next-intl":`^${i.nextIntl}`,"next-themes":`^${i.nextThemes}`,"lucide-react":`^${i.lucideReact}`,postgres:`^${i.postgres}`,"react-hook-form":`^${i.reactHookForm}`,"@hookform/resolvers":`^${i.hookformResolvers}`,zod:`^${i.zod}`},devDependencies:{"drizzle-kit":`^${i.drizzleKit}`,tsx:`^${i.tsx}`,"babel-plugin-react-compiler":i.babelReactCompiler},scripts:{"db:generate":"tsx --env-file=.env scripts/generate-schema.ts","db:migrate:generate":"drizzle-kit generate","db:migrate":"tsx --env-file=.env scripts/migrate.ts","db:reset":"tsx --env-file=.env scripts/reset-db.ts"}}),n?.("Adding toolkit files..."),await S(r,t),await z(r,t),await M(r,t),await N(r,t),await P(r,t),await L(r,t),await $(r,t),await _(r,t),t.installDeps&&(n?.("Installing dependencies..."),u("pnpm install",{cwd:r}))}async function H(t,n){let r=k(process.cwd(),t.name);n?.("Creating workspace..."),await R(r,t,n),t.installDeps&&(n?.("Installing dependencies..."),u("pnpm install",{cwd:r}))}async function j(){let t=process.argv[2],n=await T(t);if(!n)return;let r=c.spinner();try{r.start("Creating Next.js app..."),await q(n,O=>{r.stop(`${b.green("\u2713")} Done`),r.start(O)}),r.stop(`${b.green("\u2713")} Done`);let l=n.mode==="multi"?[`cd ${n.name}`,"docker compose up -d","cp .env.example .env","npx @better-auth/cli generate --config packages/config/auth.config.ts -y","pnpm db:generate","pnpm db:migrate:generate","pnpm db:migrate","pnpm dev","# Visit /setup to create your first admin user"]:[`cd ${n.name}`,"docker compose up -d","cp .env.example .env","npx @better-auth/cli generate --config auth.config.ts -y","pnpm db:generate","pnpm db:migrate:generate","pnpm db:migrate","pnpm dev","# Visit /setup to create your first admin user"];c.note(l.join(`
|
|
2045
|
+
`),"Next steps"),c.outro(`${b.green("Success!")} Your project is ready.`)}catch(o){r.stop(b.red("Failed.")),c.log.error(o instanceof Error?o.message:String(o)),process.exit(1)}}j();
|