@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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,b as
|
|
1
|
+
import{a as e,b as l,c,d as m,e as y}from"./chunk-CUB6XFPE.js";import{join as v}from"path";import{join as s}from"path";async function w(t,n){await e(s(t,"lib/auth.ts"),`import { getToolkitApp } from './app'
|
|
2
2
|
import { getAuth } from '@murumets-ee/auth'
|
|
3
3
|
|
|
4
4
|
await getToolkitApp()
|
|
@@ -248,7 +248,7 @@ export async function createFirstAdmin(formData: FormData) {
|
|
|
248
248
|
|
|
249
249
|
return { ok: true, email: adminUser.user.email }
|
|
250
250
|
}
|
|
251
|
-
`)}import{join as
|
|
251
|
+
`)}import{join as h}from"path";async function k(t,n){let{name:r}=n;await e(h(t,".env.example"),`DATABASE_URL=postgresql://${r}:${r}_dev_password@localhost:5432/${r}_dev
|
|
252
252
|
BETTER_AUTH_SECRET=dev-secret-change-me-in-production-min-32-chars
|
|
253
253
|
BETTER_AUTH_URL=http://localhost:3000
|
|
254
254
|
LOG_LEVEL=debug
|
|
@@ -258,16 +258,14 @@ RESEND_API_KEY=
|
|
|
258
258
|
RESEND_WEBHOOK_SECRET=
|
|
259
259
|
MAIL_FROM=noreply@example.com
|
|
260
260
|
CSAT_SECRET=
|
|
261
|
-
`),await
|
|
262
|
-
//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}
|
|
263
|
-
`),await w(d(t,".gitignore"),`
|
|
261
|
+
`),await y(h(t,".gitignore"),`
|
|
264
262
|
# Toolkit generated files
|
|
265
263
|
generated/
|
|
266
264
|
|
|
267
265
|
# Environment
|
|
268
266
|
.env*
|
|
269
267
|
!.env.example
|
|
270
|
-
`),await e(
|
|
268
|
+
`),await e(h(t,"docker-compose.yml"),`services:
|
|
271
269
|
postgres:
|
|
272
270
|
image: postgres:17-alpine
|
|
273
271
|
container_name: ${r}-postgres
|
|
@@ -365,15 +363,15 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
365
363
|
},
|
|
366
364
|
}
|
|
367
365
|
})
|
|
368
|
-
`)}import{mkdir as z}from"fs/promises";import{join as
|
|
366
|
+
`)}import{mkdir as z}from"fs/promises";import{join as o}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 S(t,n,r){await L(t,n),r?.("Workspace root created"),r?.("Creating admin app..."),await $(t,n),r?.("Admin app created"),r?.("Creating web app..."),await M(t,n),r?.("Web app created"),await _(t,n),r?.("Shared config package created")}async function L(t,n){let{name:r}=n;await z(t,{recursive:!0}),await e(o(t,"pnpm-workspace.yaml"),`packages:
|
|
369
367
|
- 'packages/*'
|
|
370
368
|
- 'apps/*'
|
|
371
369
|
|
|
372
370
|
ignoredBuiltDependencies:
|
|
373
371
|
- sharp
|
|
374
372
|
- unrs-resolver
|
|
375
|
-
`),await e(
|
|
376
|
-
`),await e(
|
|
373
|
+
`),await e(o(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)}
|
|
374
|
+
`),await e(o(t,".gitignore"),`# dependencies
|
|
377
375
|
node_modules/
|
|
378
376
|
|
|
379
377
|
# build
|
|
@@ -404,7 +402,7 @@ migrations/
|
|
|
404
402
|
|
|
405
403
|
# turbo
|
|
406
404
|
.turbo/
|
|
407
|
-
`),await e(
|
|
405
|
+
`),await e(o(t,".env.example"),`DATABASE_URL=postgresql://${r}:${r}_dev_password@localhost:5432/${r}_dev
|
|
408
406
|
BETTER_AUTH_SECRET=dev-secret-change-me-in-production-min-32-chars
|
|
409
407
|
BETTER_AUTH_URL=http://localhost:3000
|
|
410
408
|
LOG_LEVEL=debug
|
|
@@ -414,9 +412,7 @@ RESEND_API_KEY=
|
|
|
414
412
|
RESEND_WEBHOOK_SECRET=
|
|
415
413
|
MAIL_FROM=noreply@example.com
|
|
416
414
|
CSAT_SECRET=
|
|
417
|
-
`),await e(
|
|
418
|
-
//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}
|
|
419
|
-
`),await e(a(t,"docker-compose.yml"),`services:
|
|
415
|
+
`),await e(o(t,"docker-compose.yml"),`services:
|
|
420
416
|
postgres:
|
|
421
417
|
image: postgres:17-alpine
|
|
422
418
|
container_name: ${r}-postgres
|
|
@@ -438,9 +434,9 @@ CSAT_SECRET=
|
|
|
438
434
|
volumes:
|
|
439
435
|
postgres_data:
|
|
440
436
|
name: ${r}_postgres_data
|
|
441
|
-
`)}async function _(t,n){let{name:r}=n,o
|
|
442
|
-
`),await e(a
|
|
443
|
-
`),await e(a
|
|
437
|
+
`)}async function _(t,n){let{name:r}=n,a=o(t,"packages/config");await e(o(a,"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)}
|
|
438
|
+
`),await e(o(a,"tsconfig.json"),`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",strict:!0,esModuleInterop:!0,skipLibCheck:!0,resolveJsonModule:!0},include:["**/*.ts"]},null,2)}
|
|
439
|
+
`),await e(o(a,"toolkit.config.ts"),`import { auth } from '@murumets-ee/auth/plugin'
|
|
444
440
|
import { content } from '@murumets-ee/content/plugin'
|
|
445
441
|
import { defineConfig } from '@murumets-ee/core'
|
|
446
442
|
import { mail, ResendMailProvider } from '@murumets-ee/mail'
|
|
@@ -492,7 +488,7 @@ export default defineConfig({
|
|
|
492
488
|
],
|
|
493
489
|
projectRoot: import.meta.dirname,
|
|
494
490
|
})
|
|
495
|
-
`),await e(a
|
|
491
|
+
`),await e(o(a,"auth.config.ts"),`import { betterAuth } from 'better-auth'
|
|
496
492
|
import { drizzleAdapter } from 'better-auth/adapters/drizzle'
|
|
497
493
|
import { admin } from 'better-auth/plugins'
|
|
498
494
|
import { organization } from 'better-auth/plugins/organization'
|
|
@@ -510,7 +506,7 @@ export const auth = betterAuth({
|
|
|
510
506
|
organization(),
|
|
511
507
|
],
|
|
512
508
|
})
|
|
513
|
-
`),await e(a
|
|
509
|
+
`),await e(o(a,"drizzle.config.ts"),`import type { Config } from 'drizzle-kit'
|
|
514
510
|
|
|
515
511
|
if (!process.env.DATABASE_URL) {
|
|
516
512
|
throw new Error('DATABASE_URL environment variable is required')
|
|
@@ -524,9 +520,9 @@ export default {
|
|
|
524
520
|
url: process.env.DATABASE_URL,
|
|
525
521
|
},
|
|
526
522
|
} satisfies Config
|
|
527
|
-
`),await e(a
|
|
523
|
+
`),await e(o(a,"entities/index.ts"),`export { Article } from './article'
|
|
528
524
|
export { Category } from './category'
|
|
529
|
-
`),await e(a
|
|
525
|
+
`),await e(o(a,"entities/article.ts"),`import { behavior, defineEntity, field } from '@murumets-ee/entity'
|
|
530
526
|
|
|
531
527
|
export const Article = defineEntity({
|
|
532
528
|
name: 'article',
|
|
@@ -557,7 +553,7 @@ export const Article = defineEntity({
|
|
|
557
553
|
delete: 'group.admin',
|
|
558
554
|
},
|
|
559
555
|
})
|
|
560
|
-
`),await e(a
|
|
556
|
+
`),await e(o(a,"entities/category.ts"),`import { defineEntity, field } from '@murumets-ee/entity'
|
|
561
557
|
|
|
562
558
|
export const Category = defineEntity({
|
|
563
559
|
name: 'category',
|
|
@@ -574,7 +570,7 @@ export const Category = defineEntity({
|
|
|
574
570
|
delete: 'group.admin',
|
|
575
571
|
},
|
|
576
572
|
})
|
|
577
|
-
`),await e(a
|
|
573
|
+
`),await e(o(a,"lib/app.ts"),`import { createApp, setApp, type ToolkitApp } from '@murumets-ee/core'
|
|
578
574
|
import config from '../toolkit.config'
|
|
579
575
|
|
|
580
576
|
let appInstance: ToolkitApp | null = null
|
|
@@ -588,19 +584,19 @@ export async function getToolkitApp(): Promise<ToolkitApp> {
|
|
|
588
584
|
}
|
|
589
585
|
return appInstance
|
|
590
586
|
}
|
|
591
|
-
`),await e(a
|
|
587
|
+
`),await e(o(a,"lib/auth.ts"),`import { getToolkitApp } from './app'
|
|
592
588
|
import { getAuth } from '@murumets-ee/auth'
|
|
593
589
|
|
|
594
590
|
await getToolkitApp()
|
|
595
591
|
|
|
596
592
|
export const auth = getAuth()
|
|
597
|
-
`),await e(a
|
|
593
|
+
`),await e(o(a,"lib/auth-client.ts"),`import { createClient } from '@murumets-ee/auth/client'
|
|
598
594
|
|
|
599
595
|
export const authClient = createClient()
|
|
600
|
-
`),await e(a
|
|
596
|
+
`),await e(o(a,"generated/auth-schema.ts"),`// This file is generated by better-auth CLI.
|
|
601
597
|
// Run: npx @better-auth/cli generate --config auth.config.ts -y
|
|
602
598
|
export {}
|
|
603
|
-
`),await e(a
|
|
599
|
+
`),await e(o(a,"scripts/generate-schema.ts"),`/**
|
|
604
600
|
* Generate Drizzle schemas from entity definitions
|
|
605
601
|
*/
|
|
606
602
|
|
|
@@ -634,9 +630,9 @@ async function generateSchemas() {
|
|
|
634
630
|
}
|
|
635
631
|
}
|
|
636
632
|
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
633
|
+
const pgCoreTypes = ['pgTable', 'varchar', 'text', 'boolean', 'timestamp', 'integer', 'doublePrecision', 'jsonb', 'uuid', 'index']
|
|
634
|
+
if (hasTranslations) pgCoreTypes.push('unique')
|
|
635
|
+
const pgCoreImports = \`import { \${pgCoreTypes.join(', ')} } from 'drizzle-orm/pg-core'\\n\`
|
|
640
636
|
imports.push(pgCoreImports)
|
|
641
637
|
|
|
642
638
|
const schemaFile = join(schemaDir, 'schema.ts')
|
|
@@ -647,7 +643,7 @@ async function generateSchemas() {
|
|
|
647
643
|
}
|
|
648
644
|
|
|
649
645
|
generateSchemas().catch(console.error)
|
|
650
|
-
`),await e(a
|
|
646
|
+
`),await e(o(a,"scripts/migrate.ts"),`/**
|
|
651
647
|
* Run pending migrations
|
|
652
648
|
*/
|
|
653
649
|
|
|
@@ -673,7 +669,7 @@ async function migrate() {
|
|
|
673
669
|
}
|
|
674
670
|
|
|
675
671
|
migrate()
|
|
676
|
-
`),await e(a
|
|
672
|
+
`),await e(o(a,"scripts/reset-db.ts"),`/**
|
|
677
673
|
* Reset database (DROP all tables)
|
|
678
674
|
* WARNING: Only for development
|
|
679
675
|
*/
|
|
@@ -706,11 +702,11 @@ async function resetDb() {
|
|
|
706
702
|
}
|
|
707
703
|
|
|
708
704
|
resetDb().catch(console.error)
|
|
709
|
-
`)}async function $(t,n){let{name:r}=n,o
|
|
705
|
+
`)}async function $(t,n){let{name:r}=n,a=o(t,"apps/admin");await z(o(t,"apps"),{recursive:!0}),m(`pnpm create next-app@${"16"} ${a} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await c(a,["app/page.tsx","app/page.module.css","app/fonts","README.md","pnpm-workspace.yaml"]),await l(o(a,"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:f}=await import("./utils-42K2ZGUL.js");await f(o(a,".gitignore"),`
|
|
710
706
|
# Environment
|
|
711
707
|
.env*
|
|
712
708
|
!.env.example
|
|
713
|
-
`),await e(a
|
|
709
|
+
`),await e(o(a,"next.config.ts"),`import type { NextConfig } from 'next'
|
|
714
710
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
715
711
|
|
|
716
712
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
@@ -734,7 +730,7 @@ const nextConfig: NextConfig = {
|
|
|
734
730
|
}
|
|
735
731
|
|
|
736
732
|
export default withNextIntl(nextConfig)
|
|
737
|
-
`),await e(a
|
|
733
|
+
`),await e(o(a,"proxy.ts"),`import { NextRequest, NextResponse } from 'next/server'
|
|
738
734
|
import createMiddleware from 'next-intl/middleware'
|
|
739
735
|
import { routing } from './i18n/routing'
|
|
740
736
|
|
|
@@ -762,13 +758,13 @@ export function proxy(request: NextRequest) {
|
|
|
762
758
|
export const config = {
|
|
763
759
|
matcher: '/((?!api|_next|_vercel|.*\\\\..*).*)',
|
|
764
760
|
}
|
|
765
|
-
`),await e(a
|
|
761
|
+
`),await e(o(a,"i18n/routing.ts"),`import { defineRouting } from 'next-intl/routing'
|
|
766
762
|
|
|
767
763
|
export const routing = defineRouting({
|
|
768
764
|
locales: ['en'],
|
|
769
765
|
defaultLocale: 'en',
|
|
770
766
|
})
|
|
771
|
-
`),await e(a
|
|
767
|
+
`),await e(o(a,"i18n/request.ts"),`import { getRequestConfig } from 'next-intl/server'
|
|
772
768
|
import { hasLocale } from 'next-intl'
|
|
773
769
|
import { routing } from './routing'
|
|
774
770
|
import { getAuthMessages } from '@murumets-ee/auth-ui/i18n'
|
|
@@ -788,7 +784,7 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
788
784
|
},
|
|
789
785
|
}
|
|
790
786
|
})
|
|
791
|
-
`),await e(a
|
|
787
|
+
`),await e(o(a,"app/globals.css"),`@import "tailwindcss";
|
|
792
788
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
793
789
|
|
|
794
790
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -815,7 +811,7 @@ body {
|
|
|
815
811
|
color: var(--foreground);
|
|
816
812
|
font-family: Arial, Helvetica, sans-serif;
|
|
817
813
|
}
|
|
818
|
-
`),await e(a
|
|
814
|
+
`),await e(o(a,"app/theme-provider.tsx"),`'use client'
|
|
819
815
|
|
|
820
816
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
821
817
|
import type { ReactNode } from 'react'
|
|
@@ -832,7 +828,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
832
828
|
</NextThemesProvider>
|
|
833
829
|
)
|
|
834
830
|
}
|
|
835
|
-
`),await e(a
|
|
831
|
+
`),await e(o(a,"app/theme-toggle.tsx"),`'use client'
|
|
836
832
|
|
|
837
833
|
import { useTheme } from 'next-themes'
|
|
838
834
|
import { useState, useEffect } from 'react'
|
|
@@ -859,7 +855,7 @@ export function ThemeToggle() {
|
|
|
859
855
|
</button>
|
|
860
856
|
)
|
|
861
857
|
}
|
|
862
|
-
`),await e(a
|
|
858
|
+
`),await e(o(a,"app/nav-header.tsx"),`'use client'
|
|
863
859
|
|
|
864
860
|
import Link from 'next/link'
|
|
865
861
|
import { usePathname } from 'next/navigation'
|
|
@@ -903,12 +899,12 @@ export function NavHeader() {
|
|
|
903
899
|
</header>
|
|
904
900
|
)
|
|
905
901
|
}
|
|
906
|
-
`),await e(a
|
|
902
|
+
`),await e(o(a,"app/layout.tsx"),`import './globals.css'
|
|
907
903
|
|
|
908
904
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
909
905
|
return children
|
|
910
906
|
}
|
|
911
|
-
`),await e(a
|
|
907
|
+
`),await e(o(a,"app/[locale]/layout.tsx"),`import type { Metadata } from 'next'
|
|
912
908
|
import { Geist, Geist_Mono } from 'next/font/google'
|
|
913
909
|
import { NextIntlClientProvider } from 'next-intl'
|
|
914
910
|
import { getMessages } from 'next-intl/server'
|
|
@@ -957,7 +953,7 @@ export default async function LocaleLayout({
|
|
|
957
953
|
</html>
|
|
958
954
|
)
|
|
959
955
|
}
|
|
960
|
-
`),await e(a
|
|
956
|
+
`),await e(o(a,"app/[locale]/page.tsx"),`import { createQueryClient } from '@murumets-ee/core/clients'
|
|
961
957
|
import { Article, Category } from '@${r}/config/entities'
|
|
962
958
|
import { getToolkitApp } from '@${r}/config/app'
|
|
963
959
|
|
|
@@ -1021,11 +1017,11 @@ export default async function HomePage() {
|
|
|
1021
1017
|
</div>
|
|
1022
1018
|
)
|
|
1023
1019
|
}
|
|
1024
|
-
`),await e(a
|
|
1020
|
+
`),await e(o(a,"app/api/auth/[...all]/route.ts"),`import { toNextJsHandler } from 'better-auth/next-js'
|
|
1025
1021
|
import { auth } from '@${r}/config/auth'
|
|
1026
1022
|
|
|
1027
1023
|
export const { GET, POST } = toNextJsHandler(auth)
|
|
1028
|
-
`),await e(a
|
|
1024
|
+
`),await e(o(a,"app/[locale]/auth/layout.tsx"),`import { AuthProviders } from './providers'
|
|
1029
1025
|
import type { ReactNode } from 'react'
|
|
1030
1026
|
|
|
1031
1027
|
export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
@@ -1037,7 +1033,7 @@ export default function AuthLayout({ children }: { children: ReactNode }) {
|
|
|
1037
1033
|
</AuthProviders>
|
|
1038
1034
|
)
|
|
1039
1035
|
}
|
|
1040
|
-
`),await e(a
|
|
1036
|
+
`),await e(o(a,"app/[locale]/auth/providers.tsx"),`'use client'
|
|
1041
1037
|
|
|
1042
1038
|
import { AuthUIProvider } from '@murumets-ee/auth-ui'
|
|
1043
1039
|
import { authClient } from '@${r}/config/auth-client'
|
|
@@ -1063,22 +1059,22 @@ export function AuthProviders({ children }: { children: ReactNode }) {
|
|
|
1063
1059
|
</AuthUIProvider>
|
|
1064
1060
|
)
|
|
1065
1061
|
}
|
|
1066
|
-
`),await e(a
|
|
1062
|
+
`),await e(o(a,"app/[locale]/auth/sign-in/page.tsx"),`import { SignInForm } from '@murumets-ee/auth-ui'
|
|
1067
1063
|
|
|
1068
1064
|
export default function SignInPage() {
|
|
1069
1065
|
return <SignInForm />
|
|
1070
1066
|
}
|
|
1071
|
-
`),await e(a
|
|
1067
|
+
`),await e(o(a,"app/[locale]/auth/sign-up/page.tsx"),`import { SignUpForm } from '@murumets-ee/auth-ui'
|
|
1072
1068
|
|
|
1073
1069
|
export default function SignUpPage() {
|
|
1074
1070
|
return <SignUpForm />
|
|
1075
1071
|
}
|
|
1076
|
-
`),await e(a
|
|
1072
|
+
`),await e(o(a,"app/[locale]/auth/forgot-password/page.tsx"),`import { ForgotPasswordForm } from '@murumets-ee/auth-ui'
|
|
1077
1073
|
|
|
1078
1074
|
export default function ForgotPasswordPage() {
|
|
1079
1075
|
return <ForgotPasswordForm />
|
|
1080
1076
|
}
|
|
1081
|
-
`),await e(a
|
|
1077
|
+
`),await e(o(a,"app/[locale]/auth/reset-password/page.tsx"),`import { Suspense } from 'react'
|
|
1082
1078
|
import { ResetPasswordContent } from './content'
|
|
1083
1079
|
|
|
1084
1080
|
export default function ResetPasswordPage() {
|
|
@@ -1088,7 +1084,7 @@ export default function ResetPasswordPage() {
|
|
|
1088
1084
|
</Suspense>
|
|
1089
1085
|
)
|
|
1090
1086
|
}
|
|
1091
|
-
`),await e(a
|
|
1087
|
+
`),await e(o(a,"app/[locale]/auth/reset-password/content.tsx"),`'use client'
|
|
1092
1088
|
|
|
1093
1089
|
import { useSearchParams } from 'next/navigation'
|
|
1094
1090
|
import { ResetPasswordForm } from '@murumets-ee/auth-ui'
|
|
@@ -1112,7 +1108,7 @@ export function ResetPasswordContent() {
|
|
|
1112
1108
|
|
|
1113
1109
|
return <ResetPasswordForm token={token} />
|
|
1114
1110
|
}
|
|
1115
|
-
`),await e(a
|
|
1111
|
+
`),await e(o(a,"app/[locale]/setup/page.tsx"),`import { redirect } from 'next/navigation'
|
|
1116
1112
|
import { sql } from 'drizzle-orm'
|
|
1117
1113
|
import { getToolkitApp } from '@${r}/config/app'
|
|
1118
1114
|
import { SetupForm } from './form'
|
|
@@ -1137,7 +1133,7 @@ export default async function SetupPage() {
|
|
|
1137
1133
|
</div>
|
|
1138
1134
|
)
|
|
1139
1135
|
}
|
|
1140
|
-
`),await e(a
|
|
1136
|
+
`),await e(o(a,"app/[locale]/setup/form.tsx"),`'use client'
|
|
1141
1137
|
|
|
1142
1138
|
import { useState } from 'react'
|
|
1143
1139
|
import { createFirstAdmin } from './actions'
|
|
@@ -1208,7 +1204,7 @@ export function SetupForm() {
|
|
|
1208
1204
|
</form>
|
|
1209
1205
|
)
|
|
1210
1206
|
}
|
|
1211
|
-
`),await e(a
|
|
1207
|
+
`),await e(o(a,"app/[locale]/setup/actions.ts"),`'use server'
|
|
1212
1208
|
|
|
1213
1209
|
import { sql } from 'drizzle-orm'
|
|
1214
1210
|
import { getToolkitApp } from '@${r}/config/app'
|
|
@@ -1254,11 +1250,11 @@ export async function createFirstAdmin(formData: FormData) {
|
|
|
1254
1250
|
|
|
1255
1251
|
return { ok: true, email: adminUser.user.email }
|
|
1256
1252
|
}
|
|
1257
|
-
`)}async function M(t,n){let{name:r}=n,o
|
|
1253
|
+
`)}async function M(t,n){let{name:r}=n,a=o(t,"apps/web");m(`pnpm create next-app@${"16"} ${a} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await c(a,["app/page.tsx","app/page.module.css","app/fonts","README.md","pnpm-workspace.yaml"]),await l(o(a,"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:f}=await import("./utils-42K2ZGUL.js");await f(o(a,".gitignore"),`
|
|
1258
1254
|
# Environment
|
|
1259
1255
|
.env*
|
|
1260
1256
|
!.env.example
|
|
1261
|
-
`),await e(a
|
|
1257
|
+
`),await e(o(a,"next.config.ts"),`import type { NextConfig } from 'next'
|
|
1262
1258
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
1263
1259
|
|
|
1264
1260
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
@@ -1277,7 +1273,7 @@ const nextConfig: NextConfig = {
|
|
|
1277
1273
|
}
|
|
1278
1274
|
|
|
1279
1275
|
export default withNextIntl(nextConfig)
|
|
1280
|
-
`),await e(a
|
|
1276
|
+
`),await e(o(a,"proxy.ts"),`import createMiddleware from 'next-intl/middleware'
|
|
1281
1277
|
import { routing } from './i18n/routing'
|
|
1282
1278
|
|
|
1283
1279
|
export default createMiddleware(routing)
|
|
@@ -1285,13 +1281,13 @@ export default createMiddleware(routing)
|
|
|
1285
1281
|
export const config = {
|
|
1286
1282
|
matcher: '/((?!api|_next|_vercel|.*\\\\..*).*)',
|
|
1287
1283
|
}
|
|
1288
|
-
`),await e(a
|
|
1284
|
+
`),await e(o(a,"i18n/routing.ts"),`import { defineRouting } from 'next-intl/routing'
|
|
1289
1285
|
|
|
1290
1286
|
export const routing = defineRouting({
|
|
1291
1287
|
locales: ['en'],
|
|
1292
1288
|
defaultLocale: 'en',
|
|
1293
1289
|
})
|
|
1294
|
-
`),await e(a
|
|
1290
|
+
`),await e(o(a,"i18n/request.ts"),`import { getRequestConfig } from 'next-intl/server'
|
|
1295
1291
|
import { hasLocale } from 'next-intl'
|
|
1296
1292
|
import { routing } from './routing'
|
|
1297
1293
|
import { getAuthMessages } from '@murumets-ee/auth-ui/i18n'
|
|
@@ -1311,7 +1307,7 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
1311
1307
|
},
|
|
1312
1308
|
}
|
|
1313
1309
|
})
|
|
1314
|
-
`),await e(a
|
|
1310
|
+
`),await e(o(a,"app/globals.css"),`@import "tailwindcss";
|
|
1315
1311
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
1316
1312
|
|
|
1317
1313
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -1338,7 +1334,7 @@ body {
|
|
|
1338
1334
|
color: var(--foreground);
|
|
1339
1335
|
font-family: Arial, Helvetica, sans-serif;
|
|
1340
1336
|
}
|
|
1341
|
-
`),await e(a
|
|
1337
|
+
`),await e(o(a,"app/theme-provider.tsx"),`'use client'
|
|
1342
1338
|
|
|
1343
1339
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
1344
1340
|
import type { ReactNode } from 'react'
|
|
@@ -1355,7 +1351,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
1355
1351
|
</NextThemesProvider>
|
|
1356
1352
|
)
|
|
1357
1353
|
}
|
|
1358
|
-
`),await e(a
|
|
1354
|
+
`),await e(o(a,"app/theme-toggle.tsx"),`'use client'
|
|
1359
1355
|
|
|
1360
1356
|
import { useTheme } from 'next-themes'
|
|
1361
1357
|
import { useState, useEffect } from 'react'
|
|
@@ -1382,7 +1378,7 @@ export function ThemeToggle() {
|
|
|
1382
1378
|
</button>
|
|
1383
1379
|
)
|
|
1384
1380
|
}
|
|
1385
|
-
`),await e(a
|
|
1381
|
+
`),await e(o(a,"app/nav-header.tsx"),`'use client'
|
|
1386
1382
|
|
|
1387
1383
|
import Link from 'next/link'
|
|
1388
1384
|
import { usePathname } from 'next/navigation'
|
|
@@ -1424,12 +1420,12 @@ export function NavHeader() {
|
|
|
1424
1420
|
</header>
|
|
1425
1421
|
)
|
|
1426
1422
|
}
|
|
1427
|
-
`),await e(a
|
|
1423
|
+
`),await e(o(a,"app/layout.tsx"),`import './globals.css'
|
|
1428
1424
|
|
|
1429
1425
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
1430
1426
|
return children
|
|
1431
1427
|
}
|
|
1432
|
-
`),await e(a
|
|
1428
|
+
`),await e(o(a,"app/[locale]/layout.tsx"),`import type { Metadata } from 'next'
|
|
1433
1429
|
import { Geist, Geist_Mono } from 'next/font/google'
|
|
1434
1430
|
import { NextIntlClientProvider } from 'next-intl'
|
|
1435
1431
|
import { getMessages } from 'next-intl/server'
|
|
@@ -1478,7 +1474,7 @@ export default async function LocaleLayout({
|
|
|
1478
1474
|
</html>
|
|
1479
1475
|
)
|
|
1480
1476
|
}
|
|
1481
|
-
`),await e(a
|
|
1477
|
+
`),await e(o(a,"app/[locale]/page.tsx"),`import { createQueryClient } from '@murumets-ee/core/clients'
|
|
1482
1478
|
import { Article, Category } from '@${r}/config/entities'
|
|
1483
1479
|
import { getToolkitApp } from '@${r}/config/app'
|
|
1484
1480
|
|
|
@@ -1542,15 +1538,23 @@ export default async function HomePage() {
|
|
|
1542
1538
|
</div>
|
|
1543
1539
|
)
|
|
1544
1540
|
}
|
|
1545
|
-
`)}import{join as u}from"path";async function
|
|
1541
|
+
`)}import{join as u}from"path";async function E(t,n){let{name:r}=n;await e(u(t,"next.config.ts"),`import type { NextConfig } from 'next'
|
|
1546
1542
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
1547
1543
|
|
|
1548
1544
|
const withNextIntl = createNextIntlPlugin('./i18n/request.ts')
|
|
1549
1545
|
|
|
1550
1546
|
const nextConfig: NextConfig = {
|
|
1547
|
+
output: 'standalone',
|
|
1551
1548
|
reactCompiler: true,
|
|
1552
|
-
transpilePackages: [
|
|
1553
|
-
|
|
1549
|
+
transpilePackages: [
|
|
1550
|
+
'@murumets-ee/core', '@murumets-ee/entity', '@murumets-ee/db',
|
|
1551
|
+
'@murumets-ee/logging', '@murumets-ee/auth', '@murumets-ee/auth-ui',
|
|
1552
|
+
'@murumets-ee/admin-ui', '@murumets-ee/content', '@murumets-ee/settings',
|
|
1553
|
+
'@murumets-ee/storage', '@murumets-ee/media', '@murumets-ee/taxonomy',
|
|
1554
|
+
'@murumets-ee/queue', '@murumets-ee/mail', '@murumets-ee/ticketing',
|
|
1555
|
+
'@murumets-ee/ticketing-ui', '@murumets-ee/tokens', '@murumets-ee/ui',
|
|
1556
|
+
],
|
|
1557
|
+
serverExternalPackages: ['drizzle-orm', 'postgres', 'pino', 'file-type'],
|
|
1554
1558
|
experimental: {
|
|
1555
1559
|
serverActions: {
|
|
1556
1560
|
bodySizeLimit: '2mb',
|
|
@@ -1745,10 +1749,10 @@ async function generateSchemas() {
|
|
|
1745
1749
|
}
|
|
1746
1750
|
}
|
|
1747
1751
|
|
|
1748
|
-
// Add imports
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
+
// Add imports \u2014 include all pg-core types that entities might use
|
|
1753
|
+
const pgCoreTypes = ['pgTable', 'varchar', 'text', 'boolean', 'timestamp', 'integer', 'doublePrecision', 'jsonb', 'uuid', 'index']
|
|
1754
|
+
if (hasTranslations) pgCoreTypes.push('unique')
|
|
1755
|
+
const pgCoreImports = \`import { \${pgCoreTypes.join(', ')} } from 'drizzle-orm/pg-core'\\n\`
|
|
1752
1756
|
imports.push(pgCoreImports)
|
|
1753
1757
|
|
|
1754
1758
|
const schemaFile = join(schemaDir, 'schema.ts')
|
|
@@ -1820,7 +1824,7 @@ async function resetDb() {
|
|
|
1820
1824
|
}
|
|
1821
1825
|
|
|
1822
1826
|
resetDb().catch(console.error)
|
|
1823
|
-
`)}import{join as
|
|
1827
|
+
`)}import{join as g}from"path";async function C(t,n){let{name:r}=n;await e(g(t,"app/globals.css"),`@import "tailwindcss";
|
|
1824
1828
|
@source "../node_modules/@murumets-ee/auth-ui/dist";
|
|
1825
1829
|
|
|
1826
1830
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -1847,7 +1851,7 @@ body {
|
|
|
1847
1851
|
color: var(--foreground);
|
|
1848
1852
|
font-family: Arial, Helvetica, sans-serif;
|
|
1849
1853
|
}
|
|
1850
|
-
`),await e(
|
|
1854
|
+
`),await e(g(t,"app/theme-provider.tsx"),`'use client'
|
|
1851
1855
|
|
|
1852
1856
|
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
1853
1857
|
import type { ReactNode } from 'react'
|
|
@@ -1864,7 +1868,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
|
1864
1868
|
</NextThemesProvider>
|
|
1865
1869
|
)
|
|
1866
1870
|
}
|
|
1867
|
-
`),await e(
|
|
1871
|
+
`),await e(g(t,"app/theme-toggle.tsx"),`'use client'
|
|
1868
1872
|
|
|
1869
1873
|
import { useTheme } from 'next-themes'
|
|
1870
1874
|
import { useState, useEffect } from 'react'
|
|
@@ -1891,7 +1895,7 @@ export function ThemeToggle() {
|
|
|
1891
1895
|
</button>
|
|
1892
1896
|
)
|
|
1893
1897
|
}
|
|
1894
|
-
`),await e(
|
|
1898
|
+
`),await e(g(t,"app/nav-header.tsx"),`'use client'
|
|
1895
1899
|
|
|
1896
1900
|
import Link from 'next/link'
|
|
1897
1901
|
import { usePathname } from 'next/navigation'
|
|
@@ -1935,7 +1939,7 @@ export function NavHeader() {
|
|
|
1935
1939
|
</header>
|
|
1936
1940
|
)
|
|
1937
1941
|
}
|
|
1938
|
-
`)}import{join as p}from"path";async function
|
|
1942
|
+
`)}import{join as p}from"path";async function R(t,n){let{name:r}=n;await e(p(t,"toolkit.config.ts"),`import { auth } from '@murumets-ee/auth/plugin'
|
|
1939
1943
|
import { content } from '@murumets-ee/content/plugin'
|
|
1940
1944
|
import { defineConfig } from '@murumets-ee/core'
|
|
1941
1945
|
import { mail, ResendMailProvider } from '@murumets-ee/mail'
|
|
@@ -2036,4 +2040,4 @@ export const auth = betterAuth({
|
|
|
2036
2040
|
`),await e(p(t,"generated/auth-schema.ts"),`// This file is generated by better-auth CLI.
|
|
2037
2041
|
// Run: npx @better-auth/cli generate --config auth.config.ts -y
|
|
2038
2042
|
export {}
|
|
2039
|
-
`)}async function q(t,n){t.mode==="single"?await O(t,n):await U(t,n)}async function O(t,n){let r=v(process.cwd(),t.name);n?.("Creating Next.js app..."),
|
|
2043
|
+
`)}async function q(t,n){t.mode==="single"?await O(t,n):await U(t,n)}async function O(t,n){let r=v(process.cwd(),t.name);n?.("Creating Next.js app..."),m(`pnpm create next-app@${"16"} ${t.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await c(r,["app/page.tsx","app/page.module.css","app/fonts","README.md"]),await l(v(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 k(r,t),await A(r,t),await R(r,t),await w(r,t),await N(r,t),await E(r,t),await C(r,t),await P(r,t),t.installDeps&&(n?.("Installing dependencies..."),m("pnpm install",{cwd:r}))}async function U(t,n){let r=v(process.cwd(),t.name);n?.("Creating workspace..."),await S(r,t,n),t.installDeps&&(n?.("Installing dependencies..."),m("pnpm install",{cwd:r}))}export{q as scaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-CUB6XFPE.js";export{e as appendToFile,c as deleteFiles,b as mergePackageJson,d as runCommand,a as writeFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-ZAX4VH4C.js";export{e as appendToFile,c as deleteFiles,b as mergePackageJson,d as runCommand,a as writeFile};
|
package/package.json
CHANGED
package/dist/chunk-HAE5YHLL.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{execSync as t}from"child_process";import{appendFile as c,writeFile as s,mkdir as d,readFile as o,rm as p}from"fs/promises";import{dirname as a,join as f}from"path";async function m(i,e){await d(a(i),{recursive:!0}),await s(i,e,"utf-8")}async function v(i,e){let r=await o(i,"utf-8"),n=JSON.parse(r);e.dependencies&&(n.dependencies={...n.dependencies,...e.dependencies}),e.devDependencies&&(n.devDependencies={...n.devDependencies,...e.devDependencies}),e.scripts&&(n.scripts={...n.scripts,...e.scripts}),await s(i,`${JSON.stringify(n,null,2)}
|
|
3
|
-
`,"utf-8")}async function l(i,e){for(let r of e)await p(f(i,r),{force:!0,recursive:!0})}function F(i,e){return t(i,{cwd:e?.cwd,stdio:"pipe",encoding:"utf-8"})}async function x(i,e){await c(i,e,"utf-8")}export{m as a,v as b,l as c,F as d,x as e};
|
package/dist/chunk-YJOFTYN5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{execSync as t}from"child_process";import{appendFile as c,writeFile as s,mkdir as d,readFile as o,rm as p}from"fs/promises";import{dirname as a,join as f}from"path";async function m(i,e){await d(a(i),{recursive:!0}),await s(i,e,"utf-8")}async function v(i,e){let r=await o(i,"utf-8"),n=JSON.parse(r);e.dependencies&&(n.dependencies={...n.dependencies,...e.dependencies}),e.devDependencies&&(n.devDependencies={...n.devDependencies,...e.devDependencies}),e.scripts&&(n.scripts={...n.scripts,...e.scripts}),await s(i,`${JSON.stringify(n,null,2)}
|
|
2
|
-
`,"utf-8")}async function l(i,e){for(let r of e)await p(f(i,r),{force:!0,recursive:!0})}function F(i,e){return t(i,{cwd:e?.cwd,stdio:"pipe",encoding:"utf-8"})}async function x(i,e){await c(i,e,"utf-8")}export{m as a,v as b,l as c,F as d,x as e};
|