betterstart-cli 0.0.109 → 0.0.110
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/assets/adapters/next/templates/init/components/layouts/{admin-sidebar-branding-rsc.tsx → admin-sidebar-branding.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/role-gate.tsx +14 -0
- package/dist/assets/adapters/next/templates/init/pages/account-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/{account-shell-rsc.tsx → account-shell.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/{auth-gate-rsc.tsx → auth-gate.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/authenticated-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/{login-page-rsc.tsx → login-page-content.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-page.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-content.tsx +31 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-skeleton.tsx +9 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page.tsx +7 -27
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +6 -5
- package/dist/cli.js +129 -36
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSetting } from '@admin/actions/settings'
|
|
2
2
|
import { SidebarBranding } from './sidebar-branding'
|
|
3
3
|
|
|
4
|
-
export async function
|
|
4
|
+
export async function AdminSidebarBranding() {
|
|
5
5
|
const settings = await getSetting()
|
|
6
6
|
|
|
7
7
|
return <SidebarBranding initialData={settings} />
|
|
@@ -14,7 +14,7 @@ import { adminNavigation } from '@admin/data/navigation'
|
|
|
14
14
|
import { groupAdminNavigationItems } from '@admin/utils/navigation/sidebar'
|
|
15
15
|
import { Settings, Users } from 'lucide-react'
|
|
16
16
|
import { Fragment, Suspense } from 'react'
|
|
17
|
-
import {
|
|
17
|
+
import { AdminSidebarBranding } from './admin-sidebar-branding'
|
|
18
18
|
import { BrandingSkeleton } from './admin-sidebar-branding-skeleton'
|
|
19
19
|
import { SidebarNavLink } from './admin-sidebar-nav-link'
|
|
20
20
|
import { SidebarUserMenu } from './admin-sidebar-user-menu'
|
|
@@ -27,7 +27,7 @@ export function AdminSidebar(props: ComponentProps<typeof Sidebar>) {
|
|
|
27
27
|
<Sidebar collapsible="icon" {...props}>
|
|
28
28
|
<SidebarHeader className="flex h-14 w-full items-center border-t border-b border-border/80">
|
|
29
29
|
<Suspense fallback={<BrandingSkeleton />}>
|
|
30
|
-
<
|
|
30
|
+
<AdminSidebarBranding />
|
|
31
31
|
</Suspense>
|
|
32
32
|
</SidebarHeader>
|
|
33
33
|
<SidebarContent className="pt-4 pb-1">
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UserRole } from '@admin/types/auth'
|
|
2
|
+
import { requireRole } from '@admin/auth/middleware'
|
|
3
|
+
|
|
4
|
+
export async function RoleGate({
|
|
5
|
+
roles,
|
|
6
|
+
children
|
|
7
|
+
}: {
|
|
8
|
+
roles: readonly UserRole[]
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
}) {
|
|
11
|
+
await requireRole(roles)
|
|
12
|
+
|
|
13
|
+
return <>{children}</>
|
|
14
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ContentSkeleton } from '@admin/components/layouts/content-skeleton'
|
|
2
2
|
import { Suspense } from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { AccountShell } from './account-shell'
|
|
4
4
|
|
|
5
5
|
export default function AccountLayout({ children }: { children: React.ReactNode }) {
|
|
6
6
|
return (
|
|
7
7
|
<Suspense fallback={<ContentSkeleton />}>
|
|
8
|
-
<
|
|
8
|
+
<AccountShell>{children}</AccountShell>
|
|
9
9
|
</Suspense>
|
|
10
10
|
)
|
|
11
11
|
}
|
package/dist/assets/adapters/next/templates/init/pages/{account-shell-rsc.tsx → account-shell.tsx}
RENAMED
|
@@ -6,7 +6,7 @@ import { canAccessAdmin } from '@admin/utils/auth/can-access-admin'
|
|
|
6
6
|
import { redirect } from 'next/navigation'
|
|
7
7
|
import { MinimalAccountShell } from './minimal-account-shell'
|
|
8
8
|
|
|
9
|
-
export async function
|
|
9
|
+
export async function AccountShell({ children }: { children: React.ReactNode }) {
|
|
10
10
|
const session = await getSession({ disableCookieCache: true })
|
|
11
11
|
|
|
12
12
|
if (!session?.user) {
|
|
@@ -2,7 +2,7 @@ import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
|
2
2
|
import { AdminSidebar } from '@admin/components/layouts/admin-sidebar'
|
|
3
3
|
import { SidebarProvider } from '@admin/components/ui/sidebar'
|
|
4
4
|
|
|
5
|
-
export async function
|
|
5
|
+
export async function AuthGate({ children }: { children: React.ReactNode }) {
|
|
6
6
|
await requireRole([UserRole.ADMIN, UserRole.EDITOR])
|
|
7
7
|
|
|
8
8
|
return (
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ContentSkeleton } from '@admin/components/layouts/content-skeleton'
|
|
2
2
|
import { Suspense } from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { AuthGate } from './auth-gate'
|
|
4
4
|
|
|
5
5
|
export default function AdminAuthLayout({ children }: { children: React.ReactNode }) {
|
|
6
6
|
return (
|
|
7
7
|
<Suspense fallback={<ContentSkeleton />}>
|
|
8
|
-
<
|
|
8
|
+
<AuthGate>{children}</AuthGate>
|
|
9
9
|
</Suspense>
|
|
10
10
|
)
|
|
11
11
|
}
|
package/dist/assets/adapters/next/templates/init/pages/{login-page-rsc.tsx → login-page-content.tsx}
RENAMED
|
@@ -3,7 +3,7 @@ import { getAdminPostLoginPath } from '@admin/utils/auth/get-admin-post-login-pa
|
|
|
3
3
|
import { redirect } from 'next/navigation'
|
|
4
4
|
import { LoginForm } from './login-form'
|
|
5
5
|
|
|
6
|
-
export async function
|
|
6
|
+
export async function LoginPageContent() {
|
|
7
7
|
const session = await getSession({ disableCookieCache: true })
|
|
8
8
|
|
|
9
9
|
if (session?.user) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from 'next'
|
|
2
2
|
import { Suspense } from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { LoginPageContent } from './login-page-content'
|
|
4
4
|
import { LoginPageSkeleton } from './login-page-skeleton'
|
|
5
5
|
|
|
6
6
|
export const metadata: Metadata = {
|
|
@@ -13,7 +13,7 @@ export default function LoginPage() {
|
|
|
13
13
|
<div className="flex min-h-svh flex-col items-center justify-center bg-background p-6 md:p-10">
|
|
14
14
|
<div className="w-full max-w-sm md:max-w-4xl">
|
|
15
15
|
<Suspense fallback={<LoginPageSkeleton />}>
|
|
16
|
-
<
|
|
16
|
+
<LoginPageContent />
|
|
17
17
|
</Suspense>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getSession } from '@admin/auth/middleware'
|
|
2
|
+
import { PageHeader } from '@admin/components/shared/page-header'
|
|
3
|
+
import { UserRole } from '@admin/types/auth'
|
|
4
|
+
import { redirect } from 'next/navigation'
|
|
5
|
+
import { ProfileForm } from './profile-form'
|
|
6
|
+
|
|
7
|
+
export async function ProfilePageContent() {
|
|
8
|
+
const session = await getSession()
|
|
9
|
+
|
|
10
|
+
if (!session?.user) {
|
|
11
|
+
redirect('/admin/login')
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const showPageHeader =
|
|
15
|
+
session.user.role === UserRole.ADMIN || session.user.role === UserRole.EDITOR
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
{showPageHeader && <PageHeader title="Profile" />}
|
|
20
|
+
<main className="container mx-auto w-full max-w-5xl p-4">
|
|
21
|
+
<ProfileForm
|
|
22
|
+
user={{
|
|
23
|
+
name: session.user.name,
|
|
24
|
+
email: session.user.email,
|
|
25
|
+
image: session.user.image ?? null
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
</main>
|
|
29
|
+
</>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { redirect } from 'next/navigation'
|
|
5
|
-
import { ProfileForm } from './profile-form'
|
|
6
|
-
|
|
7
|
-
export default async function ProfilePage() {
|
|
8
|
-
const session = await getSession()
|
|
9
|
-
|
|
10
|
-
if (!session?.user) {
|
|
11
|
-
redirect('/admin/login')
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const showPageHeader =
|
|
15
|
-
session.user.role === UserRole.ADMIN || session.user.role === UserRole.EDITOR
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { ProfilePageContent } from './profile-page-content'
|
|
3
|
+
import { ProfilePageSkeleton } from './profile-page-skeleton'
|
|
16
4
|
|
|
5
|
+
export default function ProfilePage() {
|
|
17
6
|
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<ProfileForm
|
|
22
|
-
user={{
|
|
23
|
-
name: session.user.name,
|
|
24
|
-
email: session.user.email,
|
|
25
|
-
image: session.user.image ?? null
|
|
26
|
-
}}
|
|
27
|
-
/>
|
|
28
|
-
</main>
|
|
29
|
-
</>
|
|
7
|
+
<React.Suspense fallback={<ProfilePageSkeleton />}>
|
|
8
|
+
<ProfilePageContent />
|
|
9
|
+
</React.Suspense>
|
|
30
10
|
)
|
|
31
11
|
}
|
package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { UserRole } from '@admin/auth/middleware'
|
|
3
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
4
|
import { AuditLogPageContent } from './audit-log-page-content'
|
|
4
5
|
import { AuditLogPageSkeleton } from './audit-log-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN])
|
|
8
|
-
|
|
7
|
+
export default function AuditLogPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<AuditLogPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN]}>
|
|
11
|
+
<AuditLogPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { UserRole } from '@admin/auth/middleware'
|
|
3
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
4
|
import { FormsSettingsPageContent } from './forms-settings-page-content'
|
|
4
5
|
import { FormsSettingsPageSkeleton } from './forms-settings-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN, UserRole.EDITOR])
|
|
8
|
-
|
|
7
|
+
export default function FormsSettingsPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<FormsSettingsPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN, UserRole.EDITOR]}>
|
|
11
|
+
<FormsSettingsPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { UserRole } from '@admin/auth/middleware'
|
|
3
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
4
|
import { WebhooksLogsPageContent } from '../webhooks-logs-page-content'
|
|
4
5
|
import { WebhooksPageSkeleton } from '../webhooks-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN])
|
|
8
|
-
|
|
7
|
+
export default function WebhooksLogsPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<WebhooksPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN]}>
|
|
11
|
+
<WebhooksLogsPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { UserRole } from '@admin/auth/middleware'
|
|
3
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
4
|
import { WebhooksPageContent } from './webhooks-page-content'
|
|
4
5
|
import { WebhooksPageSkeleton } from './webhooks-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN])
|
|
8
|
-
|
|
7
|
+
export default function WebhooksPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<WebhooksPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN]}>
|
|
11
|
+
<WebhooksPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
package/dist/cli.js
CHANGED
|
@@ -15031,15 +15031,13 @@ function generateDatabase(schema, dbDir, options = {}, relatedSchemas = /* @__PU
|
|
|
15031
15031
|
}
|
|
15032
15032
|
|
|
15033
15033
|
// adapters/next/templates/renderers/generators/edit-page.ts
|
|
15034
|
-
function
|
|
15034
|
+
function renderEditPageShellTemplate({
|
|
15035
15035
|
singular,
|
|
15036
|
-
|
|
15037
|
-
kebabName,
|
|
15038
|
-
camelSingular
|
|
15036
|
+
kebabSingular
|
|
15039
15037
|
}) {
|
|
15040
|
-
return `import
|
|
15041
|
-
import {
|
|
15042
|
-
import { ${singular}
|
|
15038
|
+
return `import * as React from 'react'
|
|
15039
|
+
import { Edit${singular}PageContent } from './edit-${kebabSingular}-page-content'
|
|
15040
|
+
import { Edit${singular}PageSkeleton } from './edit-${kebabSingular}-page-skeleton'
|
|
15043
15041
|
|
|
15044
15042
|
interface PageProps {
|
|
15045
15043
|
params: Promise<{
|
|
@@ -15047,7 +15045,26 @@ interface PageProps {
|
|
|
15047
15045
|
}>
|
|
15048
15046
|
}
|
|
15049
15047
|
|
|
15050
|
-
export default
|
|
15048
|
+
export default function Edit${singular}Page({ params }: PageProps) {
|
|
15049
|
+
return (
|
|
15050
|
+
<React.Suspense fallback={<Edit${singular}PageSkeleton />}>
|
|
15051
|
+
<Edit${singular}PageContent params={params} />
|
|
15052
|
+
</React.Suspense>
|
|
15053
|
+
)
|
|
15054
|
+
}
|
|
15055
|
+
`;
|
|
15056
|
+
}
|
|
15057
|
+
function renderEditPageContentTemplate({
|
|
15058
|
+
singular,
|
|
15059
|
+
actionImportPath,
|
|
15060
|
+
kebabName,
|
|
15061
|
+
camelSingular
|
|
15062
|
+
}) {
|
|
15063
|
+
return `import { notFound } from 'next/navigation'
|
|
15064
|
+
import { get${singular}ById } from '@admin/actions/${actionImportPath}'
|
|
15065
|
+
import { ${singular}Form } from '../../${kebabName}-form'
|
|
15066
|
+
|
|
15067
|
+
export async function Edit${singular}PageContent({ params }: { params: Promise<{ id: string }> }) {
|
|
15051
15068
|
const { id } = await params
|
|
15052
15069
|
const ${camelSingular} = await get${singular}ById(id)
|
|
15053
15070
|
|
|
@@ -15059,6 +15076,23 @@ export default async function Edit${singular}Page({ params }: PageProps) {
|
|
|
15059
15076
|
}
|
|
15060
15077
|
`;
|
|
15061
15078
|
}
|
|
15079
|
+
function renderEditPageFiles({
|
|
15080
|
+
singular,
|
|
15081
|
+
actionImportPath,
|
|
15082
|
+
kebabName,
|
|
15083
|
+
kebabSingular,
|
|
15084
|
+
camelSingular
|
|
15085
|
+
}) {
|
|
15086
|
+
return {
|
|
15087
|
+
page: renderEditPageShellTemplate({ singular, kebabSingular }),
|
|
15088
|
+
content: renderEditPageContentTemplate({
|
|
15089
|
+
singular,
|
|
15090
|
+
actionImportPath,
|
|
15091
|
+
kebabName,
|
|
15092
|
+
camelSingular
|
|
15093
|
+
})
|
|
15094
|
+
};
|
|
15095
|
+
}
|
|
15062
15096
|
|
|
15063
15097
|
// adapters/next/generators/edit-page.ts
|
|
15064
15098
|
function generateEditPage(schema, pagesDir, options = {}) {
|
|
@@ -15066,15 +15100,24 @@ function generateEditPage(schema, pagesDir, options = {}) {
|
|
|
15066
15100
|
const Singular = toPascalCase(singular);
|
|
15067
15101
|
const camelSingular = toCamelCase(singular);
|
|
15068
15102
|
const kebabName = toKebabCase(schema.name);
|
|
15103
|
+
const kebabSingular = toKebabCase(singular);
|
|
15069
15104
|
const actionImportPath = resolveSchemaActionImportPath(schema.name, options.outputNamespace);
|
|
15070
|
-
const
|
|
15105
|
+
const displayNouns = resolveDisplayNouns(schema);
|
|
15106
|
+
const { page, content } = renderEditPageFiles({
|
|
15071
15107
|
singular: Singular,
|
|
15072
15108
|
actionImportPath,
|
|
15073
15109
|
kebabName,
|
|
15110
|
+
kebabSingular,
|
|
15074
15111
|
camelSingular
|
|
15075
15112
|
});
|
|
15113
|
+
const skeleton = buildLoadingSkeletonSource(`Edit${Singular}PageSkeleton`, displayNouns.singular);
|
|
15114
|
+
const editDir = `${pagesDir}/${schema.name}/[id]/edit`;
|
|
15076
15115
|
return {
|
|
15077
|
-
files: [
|
|
15116
|
+
files: [
|
|
15117
|
+
createGeneratedFile(`${editDir}/page.tsx`, page),
|
|
15118
|
+
createGeneratedFile(`${editDir}/edit-${kebabSingular}-page-content.tsx`, content),
|
|
15119
|
+
createGeneratedFile(`${editDir}/edit-${kebabSingular}-page-skeleton.tsx`, skeleton)
|
|
15120
|
+
]
|
|
15078
15121
|
};
|
|
15079
15122
|
}
|
|
15080
15123
|
|
|
@@ -31257,8 +31300,8 @@ function scaffoldComponents({ cwd, config }) {
|
|
|
31257
31300
|
readTemplate("components/layouts/admin-sidebar.tsx")
|
|
31258
31301
|
);
|
|
31259
31302
|
write(
|
|
31260
|
-
"components/layouts/admin-sidebar-branding
|
|
31261
|
-
readTemplate("components/layouts/admin-sidebar-branding
|
|
31303
|
+
"components/layouts/admin-sidebar-branding.tsx",
|
|
31304
|
+
readTemplate("components/layouts/admin-sidebar-branding.tsx")
|
|
31262
31305
|
);
|
|
31263
31306
|
write(
|
|
31264
31307
|
"components/layouts/admin-sidebar-branding-skeleton.tsx",
|
|
@@ -31293,6 +31336,7 @@ function scaffoldComponents({ cwd, config }) {
|
|
|
31293
31336
|
"components/layouts/content-skeleton.tsx",
|
|
31294
31337
|
readTemplate("components/layouts/content-skeleton.tsx")
|
|
31295
31338
|
);
|
|
31339
|
+
write("components/layouts/role-gate.tsx", readTemplate("components/layouts/role-gate.tsx"));
|
|
31296
31340
|
write("components/shared/page-header.tsx", readTemplate("components/shared/page-header.tsx"));
|
|
31297
31341
|
write(
|
|
31298
31342
|
"components/shared/sort-indicator.tsx",
|
|
@@ -32249,11 +32293,11 @@ function scaffoldLayout({ cwd, config }) {
|
|
|
32249
32293
|
const adminDir = path74.dirname(config.paths.pages);
|
|
32250
32294
|
write(path74.join(adminDir, "layout.tsx"), readTemplate("pages/admin-layout.tsx"));
|
|
32251
32295
|
write(path74.join(config.paths.pages, "layout.tsx"), readTemplate("pages/authenticated-layout.tsx"));
|
|
32252
|
-
write(path74.join(config.paths.pages, "auth-gate
|
|
32296
|
+
write(path74.join(config.paths.pages, "auth-gate.tsx"), readTemplate("pages/auth-gate.tsx"));
|
|
32253
32297
|
write(path74.join(config.paths.login, "page.tsx"), readTemplate("pages/login-page.tsx"));
|
|
32254
32298
|
write(
|
|
32255
|
-
path74.join(config.paths.login, "login-page-
|
|
32256
|
-
readTemplate("pages/login-page-
|
|
32299
|
+
path74.join(config.paths.login, "login-page-content.tsx"),
|
|
32300
|
+
readTemplate("pages/login-page-content.tsx")
|
|
32257
32301
|
);
|
|
32258
32302
|
write(
|
|
32259
32303
|
path74.join(config.paths.login, "login-page-skeleton.tsx"),
|
|
@@ -32431,13 +32475,21 @@ function scaffoldLayout({ cwd, config }) {
|
|
|
32431
32475
|
);
|
|
32432
32476
|
const accountDir = path74.join(adminDir, "(account)");
|
|
32433
32477
|
write(path74.join(accountDir, "layout.tsx"), readTemplate("pages/account-layout.tsx"));
|
|
32434
|
-
write(path74.join(accountDir, "account-shell
|
|
32478
|
+
write(path74.join(accountDir, "account-shell.tsx"), readTemplate("pages/account-shell.tsx"));
|
|
32435
32479
|
write(
|
|
32436
32480
|
path74.join(accountDir, "minimal-account-shell.tsx"),
|
|
32437
32481
|
readTemplate("pages/minimal-account-shell.tsx")
|
|
32438
32482
|
);
|
|
32439
32483
|
const profileDir = path74.join(accountDir, "profile");
|
|
32440
32484
|
write(path74.join(profileDir, "page.tsx"), readTemplate("pages/profile/profile-page.tsx"));
|
|
32485
|
+
write(
|
|
32486
|
+
path74.join(profileDir, "profile-page-content.tsx"),
|
|
32487
|
+
readTemplate("pages/profile/profile-page-content.tsx")
|
|
32488
|
+
);
|
|
32489
|
+
write(
|
|
32490
|
+
path74.join(profileDir, "profile-page-skeleton.tsx"),
|
|
32491
|
+
readTemplate("pages/profile/profile-page-skeleton.tsx")
|
|
32492
|
+
);
|
|
32441
32493
|
write(path74.join(profileDir, "profile-form.tsx"), readTemplate("pages/profile/profile-form.tsx"));
|
|
32442
32494
|
write(
|
|
32443
32495
|
path74.join(config.paths.admin, "lib", "actions", "profile", "index.ts"),
|
|
@@ -36388,7 +36440,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
36388
36440
|
relPath: "components/layouts/admin-sidebar.tsx",
|
|
36389
36441
|
content: () => readTemplate("components/layouts/admin-sidebar.tsx"),
|
|
36390
36442
|
dependencies: [
|
|
36391
|
-
"admin-sidebar-branding
|
|
36443
|
+
"admin-sidebar-branding",
|
|
36392
36444
|
"admin-sidebar-branding-skeleton",
|
|
36393
36445
|
"admin-sidebar-nav-link",
|
|
36394
36446
|
"admin-sidebar-user-menu",
|
|
@@ -36396,9 +36448,9 @@ var TEMPLATE_REGISTRY = {
|
|
|
36396
36448
|
"sidebar-utils"
|
|
36397
36449
|
]
|
|
36398
36450
|
},
|
|
36399
|
-
"admin-sidebar-branding
|
|
36400
|
-
relPath: "components/layouts/admin-sidebar-branding
|
|
36401
|
-
content: () => readTemplate("components/layouts/admin-sidebar-branding
|
|
36451
|
+
"admin-sidebar-branding": {
|
|
36452
|
+
relPath: "components/layouts/admin-sidebar-branding.tsx",
|
|
36453
|
+
content: () => readTemplate("components/layouts/admin-sidebar-branding.tsx"),
|
|
36402
36454
|
dependencies: ["sidebar-branding"]
|
|
36403
36455
|
},
|
|
36404
36456
|
"admin-sidebar-branding-skeleton": {
|
|
@@ -36445,6 +36497,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
36445
36497
|
relPath: "components/layouts/content-skeleton.tsx",
|
|
36446
36498
|
content: () => readTemplate("components/layouts/content-skeleton.tsx")
|
|
36447
36499
|
},
|
|
36500
|
+
"role-gate": {
|
|
36501
|
+
relPath: "components/layouts/role-gate.tsx",
|
|
36502
|
+
content: () => readTemplate("components/layouts/role-gate.tsx"),
|
|
36503
|
+
dependencies: ["auth-roles-utils", "auth-session"]
|
|
36504
|
+
},
|
|
36448
36505
|
"page-header": {
|
|
36449
36506
|
relPath: "components/shared/page-header.tsx",
|
|
36450
36507
|
content: () => readTemplate("components/shared/page-header.tsx")
|
|
@@ -38018,11 +38075,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
38018
38075
|
relPath: "app/(admin)/admin/(authenticated)/layout.tsx",
|
|
38019
38076
|
content: () => readTemplate("pages/authenticated-layout.tsx"),
|
|
38020
38077
|
base: "cwd",
|
|
38021
|
-
dependencies: ["auth-gate
|
|
38078
|
+
dependencies: ["auth-gate"]
|
|
38022
38079
|
},
|
|
38023
|
-
"auth-gate
|
|
38024
|
-
relPath: "app/(admin)/admin/(authenticated)/auth-gate
|
|
38025
|
-
content: () => readTemplate("pages/auth-gate
|
|
38080
|
+
"auth-gate": {
|
|
38081
|
+
relPath: "app/(admin)/admin/(authenticated)/auth-gate.tsx",
|
|
38082
|
+
content: () => readTemplate("pages/auth-gate.tsx"),
|
|
38026
38083
|
base: "cwd",
|
|
38027
38084
|
dependencies: ["admin-sidebar", "auth-session"]
|
|
38028
38085
|
},
|
|
@@ -38030,11 +38087,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
38030
38087
|
relPath: "app/(admin)/admin/(account)/layout.tsx",
|
|
38031
38088
|
content: () => readTemplate("pages/account-layout.tsx"),
|
|
38032
38089
|
base: "cwd",
|
|
38033
|
-
dependencies: ["account-shell
|
|
38090
|
+
dependencies: ["account-shell"]
|
|
38034
38091
|
},
|
|
38035
|
-
"account-shell
|
|
38036
|
-
relPath: "app/(admin)/admin/(account)/account-shell
|
|
38037
|
-
content: () => readTemplate("pages/account-shell
|
|
38092
|
+
"account-shell": {
|
|
38093
|
+
relPath: "app/(admin)/admin/(account)/account-shell.tsx",
|
|
38094
|
+
content: () => readTemplate("pages/account-shell.tsx"),
|
|
38038
38095
|
base: "cwd",
|
|
38039
38096
|
dependencies: [
|
|
38040
38097
|
"admin-sidebar",
|
|
@@ -38053,6 +38110,18 @@ var TEMPLATE_REGISTRY = {
|
|
|
38053
38110
|
"profile-page": {
|
|
38054
38111
|
relPath: "app/(admin)/admin/(account)/profile/page.tsx",
|
|
38055
38112
|
content: () => readTemplate("pages/profile/profile-page.tsx"),
|
|
38113
|
+
base: "cwd",
|
|
38114
|
+
dependencies: ["profile-page-content", "profile-page-skeleton"]
|
|
38115
|
+
},
|
|
38116
|
+
"profile-page-content": {
|
|
38117
|
+
relPath: "app/(admin)/admin/(account)/profile/profile-page-content.tsx",
|
|
38118
|
+
content: () => readTemplate("pages/profile/profile-page-content.tsx"),
|
|
38119
|
+
base: "cwd",
|
|
38120
|
+
dependencies: ["auth-roles-utils", "auth-session", "page-header", "profile-form"]
|
|
38121
|
+
},
|
|
38122
|
+
"profile-page-skeleton": {
|
|
38123
|
+
relPath: "app/(admin)/admin/(account)/profile/profile-page-skeleton.tsx",
|
|
38124
|
+
content: () => readTemplate("pages/profile/profile-page-skeleton.tsx"),
|
|
38056
38125
|
base: "cwd"
|
|
38057
38126
|
},
|
|
38058
38127
|
"profile-form": {
|
|
@@ -38065,11 +38134,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
38065
38134
|
relPath: "app/(admin)/admin/(auth)/login/page.tsx",
|
|
38066
38135
|
content: () => readTemplate("pages/login-page.tsx"),
|
|
38067
38136
|
base: "cwd",
|
|
38068
|
-
dependencies: ["login-page-
|
|
38137
|
+
dependencies: ["login-page-content", "login-page-skeleton"]
|
|
38069
38138
|
},
|
|
38070
|
-
"login-page-
|
|
38071
|
-
relPath: "app/(admin)/admin/(auth)/login/login-page-
|
|
38072
|
-
content: () => readTemplate("pages/login-page-
|
|
38139
|
+
"login-page-content": {
|
|
38140
|
+
relPath: "app/(admin)/admin/(auth)/login/login-page-content.tsx",
|
|
38141
|
+
content: () => readTemplate("pages/login-page-content.tsx"),
|
|
38073
38142
|
base: "cwd",
|
|
38074
38143
|
dependencies: ["auth-roles-utils", "auth-session", "login-form"]
|
|
38075
38144
|
},
|
|
@@ -38176,7 +38245,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38176
38245
|
relPath: "app/(admin)/admin/(authenticated)/settings/forms/page.tsx",
|
|
38177
38246
|
content: () => readTemplate("pages/settings/forms/forms-settings-page.tsx"),
|
|
38178
38247
|
base: "cwd",
|
|
38179
|
-
dependencies: [
|
|
38248
|
+
dependencies: [
|
|
38249
|
+
"auth-roles-utils",
|
|
38250
|
+
"auth-session",
|
|
38251
|
+
"role-gate",
|
|
38252
|
+
"forms-settings-page-skeleton",
|
|
38253
|
+
"forms-settings-page-content"
|
|
38254
|
+
]
|
|
38180
38255
|
},
|
|
38181
38256
|
"forms-settings-page-skeleton": {
|
|
38182
38257
|
relPath: "app/(admin)/admin/(authenticated)/settings/forms/forms-settings-page-skeleton.tsx",
|
|
@@ -38224,7 +38299,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38224
38299
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/page.tsx",
|
|
38225
38300
|
content: () => readTemplate("pages/settings/webhooks/webhooks-page.tsx"),
|
|
38226
38301
|
base: "cwd",
|
|
38227
|
-
dependencies: [
|
|
38302
|
+
dependencies: [
|
|
38303
|
+
"auth-roles-utils",
|
|
38304
|
+
"auth-session",
|
|
38305
|
+
"role-gate",
|
|
38306
|
+
"webhooks-page-skeleton",
|
|
38307
|
+
"webhooks-page-content"
|
|
38308
|
+
]
|
|
38228
38309
|
},
|
|
38229
38310
|
"webhooks-page-skeleton": {
|
|
38230
38311
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/webhooks-page-skeleton.tsx",
|
|
@@ -38284,7 +38365,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38284
38365
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/logs/page.tsx",
|
|
38285
38366
|
content: () => readTemplate("pages/settings/webhooks/webhooks-logs-page.tsx"),
|
|
38286
38367
|
base: "cwd",
|
|
38287
|
-
dependencies: [
|
|
38368
|
+
dependencies: [
|
|
38369
|
+
"auth-roles-utils",
|
|
38370
|
+
"auth-session",
|
|
38371
|
+
"role-gate",
|
|
38372
|
+
"webhooks-logs-page-content",
|
|
38373
|
+
"webhooks-page-skeleton"
|
|
38374
|
+
]
|
|
38288
38375
|
},
|
|
38289
38376
|
"webhooks-logs-page-content": {
|
|
38290
38377
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/webhooks-logs-page-content.tsx",
|
|
@@ -38968,7 +39055,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38968
39055
|
relPath: "app/(admin)/admin/(authenticated)/settings/audit-log/page.tsx",
|
|
38969
39056
|
content: () => readTemplate("pages/settings/audit-log/audit-log-page.tsx"),
|
|
38970
39057
|
base: "cwd",
|
|
38971
|
-
dependencies: [
|
|
39058
|
+
dependencies: [
|
|
39059
|
+
"auth-roles-utils",
|
|
39060
|
+
"auth-session",
|
|
39061
|
+
"role-gate",
|
|
39062
|
+
"audit-log-page-content",
|
|
39063
|
+
"audit-log-page-skeleton"
|
|
39064
|
+
]
|
|
38972
39065
|
},
|
|
38973
39066
|
"audit-log-page-skeleton": {
|
|
38974
39067
|
relPath: "app/(admin)/admin/(authenticated)/settings/audit-log/audit-log-page-skeleton.tsx",
|