openadminjs 0.1.24 → 0.3.0-rc.1
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/README.md +117 -81
- package/dist/adapt-package-manager.d.ts +3 -0
- package/dist/adapt-package-manager.js +118 -0
- package/dist/create-project.d.ts +77 -2
- package/dist/create-project.js +685 -224
- package/dist/db-commands.d.ts +20 -0
- package/dist/db-commands.js +75 -0
- package/dist/detect-package-manager.d.ts +8 -0
- package/dist/detect-package-manager.js +37 -0
- package/dist/doctor.d.ts +26 -0
- package/dist/doctor.js +232 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +476 -166
- package/dist/render-schema.d.ts +3 -0
- package/dist/render-schema.js +33 -0
- package/dist/resource-slug.d.ts +1 -0
- package/dist/resource-slug.js +7 -0
- package/dist/runtime-mode.d.ts +16 -0
- package/dist/runtime-mode.js +138 -0
- package/dist/secrets.d.ts +24 -0
- package/dist/secrets.js +93 -0
- package/dist/security.d.ts +13 -0
- package/dist/security.js +168 -0
- package/dist/upgrade.d.ts +10 -0
- package/dist/upgrade.js +133 -0
- package/dist/validate-name.d.ts +33 -0
- package/dist/validate-name.js +206 -0
- package/package.json +39 -11
- package/template/.dockerignore +15 -0
- package/template/.env.production.example +5 -0
- package/template/Dockerfile +12 -0
- package/template/README.md +23 -3
- package/template/apps/admin/app/api/auth/login/route.ts +9 -9
- package/template/apps/admin/app/api/auth/logout/route.ts +11 -3
- package/template/apps/admin/app/api/auth/oidc/callback/route.ts +19 -0
- package/template/apps/admin/app/api/auth/oidc/start/route.ts +11 -0
- package/template/apps/admin/app/api/auth/oidc/status/route.ts +6 -0
- package/template/apps/admin/app/api/auth/refresh/route.ts +18 -11
- package/template/apps/admin/app/api/backend/[...path]/route.ts +48 -0
- package/template/apps/admin/app/api-tokens/page.tsx +39 -39
- package/template/apps/admin/app/assistant/page.tsx +11 -0
- package/template/apps/admin/app/dashboard/page.tsx +45 -462
- package/template/apps/admin/app/globals.css +52 -16
- package/template/apps/admin/app/layout.tsx +1 -1
- package/template/apps/admin/app/login/page.tsx +13 -145
- package/template/apps/admin/app/plugins/page.tsx +16 -402
- package/template/apps/admin/app/profile/page.tsx +5 -2
- package/template/apps/admin/app/settings/page.tsx +14 -265
- package/template/apps/admin/components/ai-assistant-widget.tsx +3 -6
- package/template/apps/admin/components/app-shell.tsx +25 -373
- package/template/apps/admin/components/auth-guard.tsx +8 -28
- package/template/apps/admin/components/logo.tsx +1 -30
- package/template/apps/admin/components/resource-form.tsx +3 -3
- package/template/apps/admin/components/resource-table.tsx +12 -8
- package/template/apps/admin/lib/api.ts +45 -107
- package/template/apps/admin/lib/resource-table-prefs.ts +1 -57
- package/template/apps/admin/lib/server-api.ts +7 -0
- package/template/apps/admin/lib/tokens.ts +9 -81
- package/template/apps/admin/middleware.ts +9 -50
- package/template/apps/admin/next.config.mjs +4 -0
- package/template/apps/admin/package.json +2 -1
- package/template/apps/admin/public/brand/favicon.svg +4 -1
- package/template/apps/admin/tailwind.config.ts +9 -8
- package/template/apps/api/package.json +13 -6
- package/template/apps/api/src/access/catalog.ts +4 -0
- package/template/apps/api/src/admin/admin-ai.controller.ts +15 -125
- package/template/apps/api/src/admin/admin-analytics.service.ts +16 -148
- package/template/apps/api/src/admin/admin-logs.controller.ts +4 -1
- package/template/apps/api/src/admin/admin-plugins.controller.ts +8 -8
- package/template/apps/api/src/admin/admin-plugins.service.ts +15 -259
- package/template/apps/api/src/admin/admin-resource.service.ts +105 -254
- package/template/apps/api/src/admin/admin.controller.ts +17 -4
- package/template/apps/api/src/admin/admin.module.ts +2 -2
- package/template/apps/api/src/admin/resource-policy.ts +1 -0
- package/template/apps/api/src/admin/resource-query.ts +1 -0
- package/template/apps/api/src/admin/safe-ai.service.ts +43 -0
- package/template/apps/api/src/admin/validate-resource-payload.ts +2 -0
- package/template/apps/api/src/auth/auth.controller.ts +4 -2
- package/template/apps/api/src/auth/auth.service.ts +68 -83
- package/template/apps/api/src/auth/sso-oidc.controller.ts +12 -74
- package/template/apps/api/src/auth/sso-oidc.service.ts +51 -268
- package/template/apps/api/src/common/api-exception.filter.ts +1 -0
- package/template/apps/api/src/common/auth.guard.ts +66 -39
- package/template/apps/api/src/common/json-field-codec.ts +138 -0
- package/template/apps/api/src/common/prisma.service.ts +12 -7
- package/template/apps/api/src/common/request-logging.interceptor.ts +8 -3
- package/template/apps/api/src/graphql/graphql.module.ts +14 -1
- package/template/apps/api/src/health/health.controller.ts +6 -0
- package/template/apps/api/src/main.ts +11 -2
- package/template/apps/api/src/plugins/plugin-loader.ts +5 -3
- package/template/apps/api/src/resources/commerce.resource.ts +3 -34
- package/template/apps/api/src/resources/operations.resource.ts +1 -0
- package/template/apps/api/src/store/payment/payment.controller.ts +15 -92
- package/template/apps/api/src/store/payment/payment.module.ts +2 -3
- package/template/apps/api/src/store/payment/payment.service.ts +121 -227
- package/template/apps/api/webpack.config.cjs +2 -1
- package/template/apps/web/next.config.mjs +4 -0
- package/template/apps/web/public/brand/favicon.svg +4 -1
- package/template/compose.yaml +56 -0
- package/template/examples/crm-admin/README.md +31 -0
- package/template/examples/crm-admin/package.json +17 -0
- package/template/examples/crm-admin/prisma/models.fragment.prisma +50 -0
- package/template/examples/crm-admin/src/index.ts +7 -0
- package/template/examples/crm-admin/src/resources/activities.resource.ts +29 -0
- package/template/examples/crm-admin/src/resources/companies.resource.ts +21 -0
- package/template/examples/crm-admin/src/resources/contacts.resource.ts +24 -0
- package/template/examples/crm-admin/src/resources/deals.resource.ts +30 -0
- package/template/examples/crm-admin/tsconfig.json +7 -0
- package/template/package.json +8 -1
- package/template/packages/admin-client/package.json +18 -0
- package/template/packages/admin-client/src/contracts.ts +29 -0
- package/template/packages/admin-client/src/index.ts +2 -0
- package/template/packages/admin-client/src/preferences.ts +57 -0
- package/template/packages/admin-client/tsconfig.json +12 -0
- package/template/packages/auth/package.json +1 -1
- package/template/packages/brand/site/assets/brand/favicon.svg +4 -1
- package/template/packages/brand/src/generate-assets.mjs +17 -186
- package/template/packages/core/package.json +1 -1
- package/template/packages/mail/package.json +1 -1
- package/template/packages/nest/package.json +22 -0
- package/template/packages/nest/src/api-exception.filter.ts +23 -0
- package/template/packages/nest/src/index.ts +3 -0
- package/template/packages/nest/src/resource-policy.ts +64 -0
- package/template/packages/nest/src/resource-query.ts +103 -0
- package/template/packages/nest/tsconfig.json +12 -0
- package/template/packages/notifications/package.json +1 -1
- package/template/packages/payments/package.json +1 -1
- package/template/packages/permissions/package.json +1 -1
- package/template/packages/permissions/src/index.ts +2 -2
- package/template/packages/plugin-sdk/package.json +1 -1
- package/template/packages/plugin-sdk/src/index.ts +2 -2
- package/template/packages/prisma/package.json +21 -0
- package/template/packages/prisma/schema/ai.prisma +36 -0
- package/template/packages/prisma/schema/audit.prisma +13 -0
- package/template/packages/prisma/schema/commerce.prisma +79 -0
- package/template/packages/prisma/schema/content.prisma +27 -0
- package/template/packages/prisma/schema/core.prisma +106 -0
- package/template/packages/prisma/schema/header.prisma +8 -0
- package/template/packages/prisma/schema/jobs.prisma +9 -0
- package/template/packages/prisma/schema/media.prisma +9 -0
- package/template/packages/prisma/schema/modules.json +47 -0
- package/template/packages/prisma/schema/notifications.prisma +9 -0
- package/template/packages/prisma/schema/settings.prisma +8 -0
- package/template/packages/prisma/schema/tokens.prisma +10 -0
- package/template/packages/prisma/src/index.d.ts +12 -0
- package/template/packages/prisma/src/index.mjs +138 -0
- package/template/packages/queue/package.json +1 -1
- package/template/packages/resource/package.json +1 -1
- package/template/packages/resource/src/index.ts +1 -0
- package/template/packages/storage/package.json +1 -1
- package/template/packages/storage/src/index.ts +37 -0
- package/template/prisma/migrations/20260713120000_add_user_oidc_key_and_category_order/migration.sql +11 -0
- package/template/prisma/migrations/20261126130000_add_sessions/migration.sql +26 -0
- package/template/prisma/migrations/20261126140000_api_token_hash/migration.sql +3 -0
- package/template/prisma/migrations/20261126150000_payment_idempotency/migration.sql +6 -0
- package/template/prisma/schema.prisma +82 -54
- package/template/prisma/seed.ts +14 -38
- package/template/runtime-versions.json +15 -0
- package/template/scripts/db-init.mjs +33 -0
- package/template/scripts/install-crm.mjs +50 -0
- package/template/scripts/migrate-existing.mjs +65 -0
- package/template/scripts/schema.mjs +48 -0
- package/template/tsconfig.base.json +23 -5
- package/LICENSE +0 -21
- package/dist/create-project.test.d.ts +0 -1
- package/dist/create-project.test.js +0 -99
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -7
- package/dist/resource-slug.test.d.ts +0 -1
- package/dist/resource-slug.test.js +0 -9
- package/template/apps/admin/.storybook/main.ts +0 -12
- package/template/apps/admin/.storybook/preview.ts +0 -10
- package/template/apps/admin/app/login/page.test.tsx +0 -18
- package/template/apps/admin/components/auth-guard.test.tsx +0 -55
- package/template/apps/admin/components/logo.stories.tsx +0 -24
- package/template/apps/admin/lib/api.test.ts +0 -118
- package/template/apps/admin/lib/auth-flow.e2e.test.ts +0 -79
- package/template/apps/admin/vitest.config.ts +0 -7
- package/template/apps/api/src/access/derive-permissions.test.ts +0 -26
- package/template/apps/api/src/admin/admin-resource.service.test.ts +0 -118
- package/template/apps/api/src/admin/validate-resource-payload.test.ts +0 -44
- package/template/apps/api/src/app.module.test.ts +0 -12
- package/template/apps/api/src/auth/auth.service.test.ts +0 -78
- package/template/apps/api/src/auth/sso-oidc.service.test.ts +0 -84
- package/template/apps/api/src/common/auth.guard.test.ts +0 -62
- package/template/apps/api/src/common/casl-ability.factory.test.ts +0 -33
- package/template/apps/api/src/common/request-logging.interceptor.test.ts +0 -39
- package/template/apps/api/src/graphql/admin-resources.resolver.test.ts +0 -45
- package/template/apps/api/src/graphql/ensure-gql-paramtypes.test.ts +0 -44
- package/template/apps/api/src/graphql/graphql-schema.test.ts +0 -26
- package/template/apps/api/src/plugins/manifest.schema.test.ts +0 -36
- package/template/apps/api/src/plugins/plugin-runtime.test.ts +0 -24
- package/template/apps/api/src/queue/queue.service.test.ts +0 -33
- package/template/apps/api/src/resources/resource-hooks.registry.test.ts +0 -72
- package/template/apps/api/vitest.config.ts +0 -21
- package/template/apps/web/lib/seo.test.ts +0 -41
- package/template/apps/web/vitest.config.ts +0 -19
- package/template/packages/auth/src/index.test.ts +0 -10
- package/template/packages/brand/src/index.test.ts +0 -9
- package/template/packages/core/src/index.test.ts +0 -27
- package/template/packages/core/vitest.config.ts +0 -9
- package/template/packages/mail/src/index.test.ts +0 -23
- package/template/packages/notifications/src/index.test.ts +0 -9
- package/template/packages/permissions/src/blueprints.test.ts +0 -62
- package/template/packages/permissions/src/index.test.ts +0 -34
- package/template/packages/plugin-sdk/src/sdk.test.ts +0 -13
- package/template/packages/plugin-sdk/vitest.config.ts +0 -5
- package/template/packages/queue/src/index.test.ts +0 -12
- package/template/packages/resource/src/index.test.ts +0 -196
- package/template/packages/storage/src/index.test.ts +0 -10
|
@@ -21,7 +21,7 @@ export const metadata: Metadata = {
|
|
|
21
21
|
icons: {
|
|
22
22
|
icon: [
|
|
23
23
|
{ url: BRAND.favicon, type: "image/svg+xml" },
|
|
24
|
-
{ url:
|
|
24
|
+
{ url: "/brand/favicon-32.png", sizes: "32x32", type: "image/png" }
|
|
25
25
|
],
|
|
26
26
|
shortcut: BRAND.favicon,
|
|
27
27
|
apple: BRAND.appleTouch
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
4
|
import { useRouter } from "next/navigation";
|
|
5
5
|
import { ArrowRight, Lock, Loader2, Mail } from "lucide-react";
|
|
6
|
-
import { hasUsableAccessToken } from "../../lib/api";
|
|
7
|
-
import { setTokenCookies } from "../../lib/tokens";
|
|
8
6
|
import { Logo } from "../../components/logo";
|
|
9
7
|
import { safeNextParam } from "./safe-next-param";
|
|
10
8
|
|
|
@@ -12,41 +10,8 @@ export default function LoginPage() {
|
|
|
12
10
|
const router = useRouter();
|
|
13
11
|
const [error, setError] = useState("");
|
|
14
12
|
const [loading, setLoading] = useState(false);
|
|
15
|
-
const oidcEnabled
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
const sp = new URLSearchParams(window.location.search);
|
|
20
|
-
if (sp.get("sso_error") === "1") {
|
|
21
|
-
const code = sp.get("sso_code");
|
|
22
|
-
const message = sp.get("sso_message");
|
|
23
|
-
const detail = message?.trim() || "Single sign-on failed. Try again or sign in with email and password.";
|
|
24
|
-
setError(code ? `${detail} (${code})` : detail);
|
|
25
|
-
}
|
|
26
|
-
}, []);
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (typeof window === "undefined") return;
|
|
30
|
-
const hash = window.location.hash.replace(/^#/, "");
|
|
31
|
-
if (!hash.includes("sso=1")) return;
|
|
32
|
-
const params = new URLSearchParams(hash);
|
|
33
|
-
if (params.get("sso") !== "1") return;
|
|
34
|
-
const access = params.get("access_token");
|
|
35
|
-
const refresh = params.get("refresh_token");
|
|
36
|
-
if (access && refresh) {
|
|
37
|
-
setTokenCookies(access, refresh);
|
|
38
|
-
const next = safeNextParam(new URLSearchParams(window.location.search).get("next"));
|
|
39
|
-
window.history.replaceState(null, "", `${window.location.pathname}${window.location.search}`);
|
|
40
|
-
router.replace(next);
|
|
41
|
-
}
|
|
42
|
-
}, [router]);
|
|
43
|
-
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (!hasUsableAccessToken()) return;
|
|
46
|
-
const next = safeNextParam(new URLSearchParams(window.location.search).get("next"));
|
|
47
|
-
router.replace(next);
|
|
48
|
-
}, [router]);
|
|
49
|
-
|
|
13
|
+
const [oidcEnabled,setOidcEnabled]=useState(false);
|
|
14
|
+
useEffect(()=>{fetch("/api/auth/oidc/status").then(r=>r.json()).then(x=>setOidcEnabled(x.enabled===true)).catch(()=>undefined);if(new URLSearchParams(window.location.search).has("sso_error"))setError("Single sign-on could not be completed.");},[]);
|
|
50
15
|
async function submit(formData: FormData) {
|
|
51
16
|
setError("");
|
|
52
17
|
setLoading(true);
|
|
@@ -89,111 +54,14 @@ export default function LoginPage() {
|
|
|
89
54
|
}
|
|
90
55
|
}
|
|
91
56
|
|
|
92
|
-
return
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{/* Card */}
|
|
103
|
-
<div className="overflow-hidden rounded-3xl border border-slate-200/80 bg-white/95 shadow-[0_8px_40px_rgba(0,0,0,0.1)] backdrop-blur-sm">
|
|
104
|
-
{/* Top gradient bar */}
|
|
105
|
-
<div className="h-1 w-full bg-gradient-to-r from-[#2454ff] via-[#7c3aed] to-[#0ea5a4]" />
|
|
106
|
-
|
|
107
|
-
<div className="px-8 pb-8 pt-7">
|
|
108
|
-
{/* Logo */}
|
|
109
|
-
<div className="mb-7">
|
|
110
|
-
<Logo />
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
{/* Heading */}
|
|
114
|
-
<div className="mb-6">
|
|
115
|
-
<h1 className="text-[1.6rem] font-bold tracking-tight text-slate-900">
|
|
116
|
-
Welcome back
|
|
117
|
-
</h1>
|
|
118
|
-
<p className="mt-1 text-sm text-slate-500">
|
|
119
|
-
Sign in to continue to your admin panel
|
|
120
|
-
</p>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
{/* Form */}
|
|
124
|
-
<form action={submit} className="space-y-4">
|
|
125
|
-
<label className="block space-y-1.5">
|
|
126
|
-
<span className="text-sm font-medium text-slate-700">Email address</span>
|
|
127
|
-
<div className="relative">
|
|
128
|
-
<Mail className="pointer-events-none absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" />
|
|
129
|
-
<input
|
|
130
|
-
name="email"
|
|
131
|
-
type="email"
|
|
132
|
-
placeholder="you@company.com"
|
|
133
|
-
className="input-base pl-10"
|
|
134
|
-
autoComplete="email"
|
|
135
|
-
/>
|
|
136
|
-
</div>
|
|
137
|
-
</label>
|
|
138
|
-
|
|
139
|
-
<label className="block space-y-1.5">
|
|
140
|
-
<div className="flex items-center justify-between">
|
|
141
|
-
<span className="text-sm font-medium text-slate-700">Password</span>
|
|
142
|
-
</div>
|
|
143
|
-
<div className="relative">
|
|
144
|
-
<Lock className="pointer-events-none absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" />
|
|
145
|
-
<input
|
|
146
|
-
name="password"
|
|
147
|
-
type="password"
|
|
148
|
-
placeholder="Enter your password"
|
|
149
|
-
className="input-base pl-10"
|
|
150
|
-
autoComplete="current-password"
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
</label>
|
|
154
|
-
|
|
155
|
-
{error && (
|
|
156
|
-
<div className="flex items-center gap-2 rounded-xl bg-red-50 px-4 py-3 text-sm text-red-600 fade-in">
|
|
157
|
-
<div className="h-1.5 w-1.5 shrink-0 rounded-full bg-red-500" />
|
|
158
|
-
{error}
|
|
159
|
-
</div>
|
|
160
|
-
)}
|
|
161
|
-
|
|
162
|
-
{oidcEnabled && (
|
|
163
|
-
<a
|
|
164
|
-
href={`${apiBase}/auth/sso/oidc/login?realm=admin`}
|
|
165
|
-
className="btn-ghost flex w-full items-center justify-center gap-2 py-3"
|
|
166
|
-
>
|
|
167
|
-
Continue with SSO
|
|
168
|
-
</a>
|
|
169
|
-
)}
|
|
170
|
-
|
|
171
|
-
<button
|
|
172
|
-
type="submit"
|
|
173
|
-
disabled={loading}
|
|
174
|
-
className="btn-primary mt-2 w-full py-3"
|
|
175
|
-
>
|
|
176
|
-
{loading ? (
|
|
177
|
-
<>
|
|
178
|
-
<Loader2 className="h-4 w-4 animate-spin" />
|
|
179
|
-
Signing in...
|
|
180
|
-
</>
|
|
181
|
-
) : (
|
|
182
|
-
<>
|
|
183
|
-
Sign in
|
|
184
|
-
<ArrowRight className="h-4 w-4" />
|
|
185
|
-
</>
|
|
186
|
-
)}
|
|
187
|
-
</button>
|
|
188
|
-
</form>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
|
|
192
|
-
{/* Footer note */}
|
|
193
|
-
<p className="mt-5 text-center text-xs text-slate-400">
|
|
194
|
-
OpenAdminJS · Free open-source admin framework for Node.js
|
|
195
|
-
</p>
|
|
196
|
-
</div>
|
|
197
|
-
</main>
|
|
198
|
-
);
|
|
57
|
+
return <main className="oc-login">
|
|
58
|
+
<section className="oc-login-story"><Logo/><div className="oc-login-copy"><p className="oc-kicker"><span/> OPEN CORE / WORKSPACE</p><h1>Define once.<br/><em>Build your admin.</em></h1><p>One resource model. A connected workspace for your data, access and operations.</p><div className="oc-login-terminal"><div><span>● ● ●</span><small>resource.ts</small></div><pre>{'defineResource({\n name: "posts",\n model: "post",\n permissions: { read: "posts.read" },\n fields: { title: { type: "text" } }\n});'}</pre></div></div><p className="oc-login-footer">NESTJS / PRISMA / NEXT.JS</p></section>
|
|
59
|
+
<section className="oc-login-panel"><div className="oc-login-form"><p className="oc-kicker oc-kicker-dark"><span/> SECURE SIGN IN</p><h2>Welcome back.</h2><p className="oc-login-subtitle">Sign in to continue to your admin panel</p>
|
|
60
|
+
<form action={submit} className="space-y-5"><label className="block space-y-2"><span className="text-sm font-semibold">Email address</span><div className="oc-login-input"><Mail size={17}/><input required name="email" type="email" placeholder="you@company.com" autoComplete="email" className="input-base"/></div></label>
|
|
61
|
+
<label className="block space-y-2"><span className="text-sm font-semibold">Password</span><div className="oc-login-input"><Lock size={17}/><input required name="password" type="password" placeholder="Enter your password" autoComplete="current-password" className="input-base"/></div></label>
|
|
62
|
+
{error && <div role="alert" className="rounded-lg bg-red-50 p-3 text-sm text-red-700">{error}</div>}
|
|
63
|
+
<button type="submit" disabled={loading} className="btn-primary w-full py-3">{loading ? <><Loader2 className="h-4 w-4 animate-spin"/>Signing in...</> : <>Sign in<ArrowRight size={17}/></>}</button></form>
|
|
64
|
+
{oidcEnabled&&<a href="/api/auth/oidc/start" className="btn-secondary mt-3 block w-full text-center">Sign in with SSO</a>}
|
|
65
|
+
<p className="oc-login-meta"><Lock size={13}/> Session protected by HttpOnly cookies</p></div></section>
|
|
66
|
+
</main>;
|
|
199
67
|
}
|
|
@@ -1,407 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
Loader2,
|
|
6
|
-
Package,
|
|
7
|
-
Power,
|
|
8
|
-
RefreshCw,
|
|
9
|
-
Trash2,
|
|
10
|
-
Boxes,
|
|
11
|
-
Terminal
|
|
12
|
-
} from "lucide-react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
13
3
|
import { AppShell } from "../../components/app-shell";
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
type PluginRow = {
|
|
17
|
-
id: string;
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
bundled?: string;
|
|
20
|
-
package?: string;
|
|
21
|
-
config?: Record<string, unknown>;
|
|
22
|
-
trustMode?: "trusted" | "sandboxed";
|
|
23
|
-
capabilities?: string[];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
type PluginsState = {
|
|
27
|
-
manifestPath: string;
|
|
28
|
-
bundledAvailable: string[];
|
|
29
|
-
plugins: PluginRow[];
|
|
30
|
-
runtime?: {
|
|
31
|
-
adminUiExtensions: number;
|
|
32
|
-
jobs: number;
|
|
33
|
-
apiHooks: number;
|
|
34
|
-
mediaHooks: number;
|
|
35
|
-
seoHooks: number;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
4
|
+
import { api } from "../../lib/api";
|
|
38
5
|
|
|
6
|
+
type Plugin = { id: string; name?: string; version?: string; enabled?: boolean; packageName?: string };
|
|
7
|
+
type State = { plugins?: Plugin[] };
|
|
39
8
|
export default function PluginsPage() {
|
|
40
|
-
const [state, setState] = useState<
|
|
41
|
-
const [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const [adding, setAdding] = useState(false);
|
|
53
|
-
|
|
54
|
-
const load = useCallback(async () => {
|
|
55
|
-
setLoading(true);
|
|
56
|
-
setError(null);
|
|
57
|
-
try {
|
|
58
|
-
const data = await api<PluginsState>("/admin/plugins");
|
|
59
|
-
setState(data);
|
|
60
|
-
} catch (e) {
|
|
61
|
-
setError(e instanceof Error ? e.message : "Failed to load plugins");
|
|
62
|
-
} finally {
|
|
63
|
-
setLoading(false);
|
|
64
|
-
}
|
|
65
|
-
}, []);
|
|
66
|
-
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
void load();
|
|
69
|
-
}, [load]);
|
|
70
|
-
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (!state?.bundledAvailable.length) return;
|
|
73
|
-
if (!state.bundledAvailable.includes(bundledKey)) {
|
|
74
|
-
setBundledKey(state.bundledAvailable[0]!);
|
|
75
|
-
}
|
|
76
|
-
}, [state, bundledKey]);
|
|
77
|
-
|
|
78
|
-
async function addPlugin() {
|
|
79
|
-
if (!newId.trim()) {
|
|
80
|
-
setError("Plugin id is required");
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
setAdding(true);
|
|
84
|
-
setError(null);
|
|
85
|
-
try {
|
|
86
|
-
await api("/admin/plugins", {
|
|
87
|
-
method: "POST",
|
|
88
|
-
body: JSON.stringify(
|
|
89
|
-
addMode === "bundled"
|
|
90
|
-
? {
|
|
91
|
-
id: newId.trim(),
|
|
92
|
-
bundled: bundledKey,
|
|
93
|
-
enabled: true,
|
|
94
|
-
config: {},
|
|
95
|
-
trustMode,
|
|
96
|
-
capabilities: capsText
|
|
97
|
-
.split(",")
|
|
98
|
-
.map((item) => item.trim())
|
|
99
|
-
.filter(Boolean)
|
|
100
|
-
}
|
|
101
|
-
: {
|
|
102
|
-
id: newId.trim(),
|
|
103
|
-
package: packageName.trim(),
|
|
104
|
-
enabled: true,
|
|
105
|
-
config: {},
|
|
106
|
-
trustMode,
|
|
107
|
-
capabilities: capsText
|
|
108
|
-
.split(",")
|
|
109
|
-
.map((item) => item.trim())
|
|
110
|
-
.filter(Boolean),
|
|
111
|
-
runPnpmInstall: runPnpm
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
});
|
|
115
|
-
setNewId("");
|
|
116
|
-
setPackageName("");
|
|
117
|
-
setCapsText("");
|
|
118
|
-
await load();
|
|
119
|
-
} catch (e) {
|
|
120
|
-
setError(e instanceof Error ? e.message : "Failed to add plugin");
|
|
121
|
-
} finally {
|
|
122
|
-
setAdding(false);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
async function toggleEnabled(row: PluginRow, enabled: boolean) {
|
|
127
|
-
setBusyId(row.id);
|
|
128
|
-
setError(null);
|
|
129
|
-
try {
|
|
130
|
-
await api(`/admin/plugins/${encodeURIComponent(row.id)}`, {
|
|
131
|
-
method: "PATCH",
|
|
132
|
-
body: JSON.stringify({ enabled })
|
|
133
|
-
});
|
|
134
|
-
await load();
|
|
135
|
-
} catch (e) {
|
|
136
|
-
setError(e instanceof Error ? e.message : "Failed to update plugin");
|
|
137
|
-
} finally {
|
|
138
|
-
setBusyId(null);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
async function remove(row: PluginRow) {
|
|
143
|
-
if (!window.confirm(`Remove plugin "${row.id}" from the manifest?`)) return;
|
|
144
|
-
setBusyId(row.id);
|
|
145
|
-
setError(null);
|
|
146
|
-
try {
|
|
147
|
-
await api(`/admin/plugins/${encodeURIComponent(row.id)}`, { method: "DELETE" });
|
|
148
|
-
await load();
|
|
149
|
-
} catch (e) {
|
|
150
|
-
setError(e instanceof Error ? e.message : "Failed to remove plugin");
|
|
151
|
-
} finally {
|
|
152
|
-
setBusyId(null);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return (
|
|
157
|
-
<AppShell>
|
|
158
|
-
<div className="mx-auto max-w-4xl space-y-6 animate-in">
|
|
159
|
-
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
160
|
-
<div>
|
|
161
|
-
<p className="text-[11px] font-bold uppercase tracking-widest text-[#0ea5a4]">Extensions</p>
|
|
162
|
-
<h1 className="mt-1 text-2xl font-bold tracking-tight text-slate-900">Plugins</h1>
|
|
163
|
-
<p className="mt-0.5 text-sm text-slate-500">
|
|
164
|
-
Manage <code className="rounded bg-slate-100 px-1 py-0.5 text-xs">plugins.manifest.json</code>.
|
|
165
|
-
Enable/disable and config changes apply <strong className="font-medium text-slate-700">in the same running API</strong>{" "}
|
|
166
|
-
(hooks are removed and re-registered). In <strong className="font-medium text-slate-700">development</strong>, adding an
|
|
167
|
-
npm plugin runs <span className="font-mono text-xs">pnpm add … --filter @openadminjs/api</span> for you, then loads the
|
|
168
|
-
plugin with <span className="font-mono text-xs">require</span> — no process restart, so users are not kicked offline.
|
|
169
|
-
In <strong className="font-medium text-slate-700">production</strong>, install packages in your deploy pipeline; optional env{" "}
|
|
170
|
-
<span className="font-mono text-xs">OPENADMIN_PLUGIN_PNPM_INSTALL=1</span> plus explicit opt-in in the API enables automated
|
|
171
|
-
install (use carefully).
|
|
172
|
-
</p>
|
|
173
|
-
</div>
|
|
174
|
-
<button
|
|
175
|
-
type="button"
|
|
176
|
-
onClick={() => void load()}
|
|
177
|
-
className="btn-ghost flex items-center gap-2 self-start"
|
|
178
|
-
disabled={loading}
|
|
179
|
-
>
|
|
180
|
-
<RefreshCw className={`h-4 w-4 ${loading ? "animate-spin" : ""}`} />
|
|
181
|
-
Refresh
|
|
182
|
-
</button>
|
|
183
|
-
</div>
|
|
184
|
-
|
|
185
|
-
{error && (
|
|
186
|
-
<div className="flex items-center gap-2 rounded-xl bg-red-50 px-4 py-3 text-sm text-red-600">
|
|
187
|
-
<div className="h-1.5 w-1.5 shrink-0 rounded-full bg-red-500" />
|
|
188
|
-
{error}
|
|
189
|
-
</div>
|
|
190
|
-
)}
|
|
191
|
-
|
|
192
|
-
<div className="card p-5">
|
|
193
|
-
<div className="flex items-start gap-3">
|
|
194
|
-
<Terminal className="mt-0.5 h-5 w-5 text-slate-400" />
|
|
195
|
-
<div>
|
|
196
|
-
<p className="text-sm font-semibold text-slate-800">API endpoint</p>
|
|
197
|
-
<p className="mt-1 text-xs text-slate-500">
|
|
198
|
-
Admin UI talks to <span className="font-mono text-slate-700">{API_URL}</span>. If login fails with a
|
|
199
|
-
network error, start the API (<span className="font-mono">pnpm dev</span> from repo root) and ensure{" "}
|
|
200
|
-
<span className="font-mono">NEXT_PUBLIC_API_URL</span> matches.
|
|
201
|
-
</p>
|
|
202
|
-
{state?.manifestPath && (
|
|
203
|
-
<p className="mt-2 text-xs text-slate-500">
|
|
204
|
-
Manifest file:{" "}
|
|
205
|
-
<span className="break-all font-mono text-slate-700">{state.manifestPath}</span>
|
|
206
|
-
</p>
|
|
207
|
-
)}
|
|
208
|
-
{state?.runtime && (
|
|
209
|
-
<p className="mt-2 text-xs text-slate-500">
|
|
210
|
-
Runtime surfaces: ui {state.runtime.adminUiExtensions}, jobs {state.runtime.jobs}, api {state.runtime.apiHooks}, media{" "}
|
|
211
|
-
{state.runtime.mediaHooks}, seo {state.runtime.seoHooks}
|
|
212
|
-
</p>
|
|
213
|
-
)}
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
|
|
218
|
-
{/* Add plugin */}
|
|
219
|
-
<div className="card p-6">
|
|
220
|
-
<h2 className="flex items-center gap-2 text-sm font-bold text-slate-900">
|
|
221
|
-
<Boxes className="h-4 w-4 text-[#2454ff]" />
|
|
222
|
-
Add plugin
|
|
223
|
-
</h2>
|
|
224
|
-
<div className="mt-4 flex flex-wrap gap-2">
|
|
225
|
-
<button
|
|
226
|
-
type="button"
|
|
227
|
-
onClick={() => setAddMode("bundled")}
|
|
228
|
-
className={`rounded-lg px-3 py-1.5 text-xs font-semibold transition-all ${
|
|
229
|
-
addMode === "bundled"
|
|
230
|
-
? "bg-[#2454ff] text-white shadow-[0_2px_6px_rgba(36,84,255,0.3)]"
|
|
231
|
-
: "bg-slate-100 text-slate-600 hover:bg-slate-200"
|
|
232
|
-
}`}
|
|
233
|
-
>
|
|
234
|
-
Bundled
|
|
235
|
-
</button>
|
|
236
|
-
<button
|
|
237
|
-
type="button"
|
|
238
|
-
onClick={() => setAddMode("package")}
|
|
239
|
-
className={`rounded-lg px-3 py-1.5 text-xs font-semibold transition-all ${
|
|
240
|
-
addMode === "package"
|
|
241
|
-
? "bg-[#2454ff] text-white shadow-[0_2px_6px_rgba(36,84,255,0.3)]"
|
|
242
|
-
: "bg-slate-100 text-slate-600 hover:bg-slate-200"
|
|
243
|
-
}`}
|
|
244
|
-
>
|
|
245
|
-
npm package
|
|
246
|
-
</button>
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
<div className="mt-4 grid gap-4 sm:grid-cols-2">
|
|
250
|
-
<label className="block space-y-1.5">
|
|
251
|
-
<span className="text-xs font-semibold uppercase tracking-wide text-slate-500">Plugin id</span>
|
|
252
|
-
<input
|
|
253
|
-
className="input-base"
|
|
254
|
-
value={newId}
|
|
255
|
-
onChange={(e) => setNewId(e.target.value)}
|
|
256
|
-
placeholder={addMode === "bundled" ? "io.openadminjs.hello" : "com.vendor.my-plugin"}
|
|
257
|
-
/>
|
|
258
|
-
</label>
|
|
259
|
-
{addMode === "bundled" ? (
|
|
260
|
-
<label className="block space-y-1.5">
|
|
261
|
-
<span className="text-xs font-semibold uppercase tracking-wide text-slate-500">Bundled key</span>
|
|
262
|
-
<select
|
|
263
|
-
className="input-base"
|
|
264
|
-
value={bundledKey}
|
|
265
|
-
onChange={(e) => setBundledKey(e.target.value)}
|
|
266
|
-
>
|
|
267
|
-
{(state?.bundledAvailable ?? ["hello"]).map((k) => (
|
|
268
|
-
<option key={k} value={k}>
|
|
269
|
-
{k}
|
|
270
|
-
</option>
|
|
271
|
-
))}
|
|
272
|
-
</select>
|
|
273
|
-
</label>
|
|
274
|
-
) : (
|
|
275
|
-
<label className="block space-y-1.5">
|
|
276
|
-
<span className="text-xs font-semibold uppercase tracking-wide text-slate-500">Package name</span>
|
|
277
|
-
<input
|
|
278
|
-
className="input-base font-mono text-xs"
|
|
279
|
-
value={packageName}
|
|
280
|
-
onChange={(e) => setPackageName(e.target.value)}
|
|
281
|
-
placeholder="@scope/openadminjs-example"
|
|
282
|
-
/>
|
|
283
|
-
</label>
|
|
284
|
-
)}
|
|
285
|
-
</div>
|
|
286
|
-
<div className="mt-3 grid gap-3 sm:grid-cols-2">
|
|
287
|
-
<label className="block space-y-1.5">
|
|
288
|
-
<span className="text-xs font-semibold uppercase tracking-wide text-slate-500">Trust mode</span>
|
|
289
|
-
<select className="input-base" value={trustMode} onChange={(e) => setTrustMode(e.target.value as "trusted" | "sandboxed")}>
|
|
290
|
-
<option value="trusted">trusted</option>
|
|
291
|
-
<option value="sandboxed">sandboxed</option>
|
|
292
|
-
</select>
|
|
293
|
-
</label>
|
|
294
|
-
<label className="block space-y-1.5">
|
|
295
|
-
<span className="text-xs font-semibold uppercase tracking-wide text-slate-500">Capabilities (comma separated)</span>
|
|
296
|
-
<input
|
|
297
|
-
className="input-base font-mono text-xs"
|
|
298
|
-
value={capsText}
|
|
299
|
-
onChange={(e) => setCapsText(e.target.value)}
|
|
300
|
-
placeholder="resource.hooks,seo.extend,media.pipeline"
|
|
301
|
-
/>
|
|
302
|
-
</label>
|
|
303
|
-
</div>
|
|
304
|
-
|
|
305
|
-
{addMode === "package" && (
|
|
306
|
-
<label className="mt-3 flex cursor-pointer items-center gap-2 text-sm text-slate-600">
|
|
307
|
-
<input
|
|
308
|
-
type="checkbox"
|
|
309
|
-
checked={runPnpm}
|
|
310
|
-
onChange={(e) => setRunPnpm(e.target.checked)}
|
|
311
|
-
className="rounded border-slate-300"
|
|
312
|
-
/>
|
|
313
|
-
Run <span className="font-mono text-xs">pnpm add … --filter @openadminjs/api</span> automatically (recommended in dev;
|
|
314
|
-
uncheck only if the package is already installed)
|
|
315
|
-
</label>
|
|
316
|
-
)}
|
|
317
|
-
|
|
318
|
-
<button
|
|
319
|
-
type="button"
|
|
320
|
-
onClick={() => void addPlugin()}
|
|
321
|
-
disabled={adding}
|
|
322
|
-
className="btn-primary mt-4"
|
|
323
|
-
>
|
|
324
|
-
{adding ? <Loader2 className="h-4 w-4 animate-spin" /> : <Package className="h-4 w-4" />}
|
|
325
|
-
Register in manifest
|
|
326
|
-
</button>
|
|
327
|
-
</div>
|
|
328
|
-
|
|
329
|
-
{/* List */}
|
|
330
|
-
<div className="card overflow-hidden">
|
|
331
|
-
<div className="border-b border-slate-100 px-5 py-4">
|
|
332
|
-
<h2 className="text-sm font-bold text-slate-900">Installed entries</h2>
|
|
333
|
-
</div>
|
|
334
|
-
{loading && !state ? (
|
|
335
|
-
<div className="flex items-center justify-center py-16 text-slate-400">
|
|
336
|
-
<Loader2 className="h-6 w-6 animate-spin" />
|
|
337
|
-
</div>
|
|
338
|
-
) : (state?.plugins.length ?? 0) === 0 ? (
|
|
339
|
-
<p className="px-5 py-12 text-center text-sm text-slate-500">No plugins in the manifest yet.</p>
|
|
340
|
-
) : (
|
|
341
|
-
<ul className="divide-y divide-slate-100">
|
|
342
|
-
{state!.plugins.map((row) => (
|
|
343
|
-
<li
|
|
344
|
-
key={row.id}
|
|
345
|
-
className="flex flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between"
|
|
346
|
-
>
|
|
347
|
-
<div className="min-w-0">
|
|
348
|
-
<p className="font-mono text-sm font-semibold text-slate-900">{row.id}</p>
|
|
349
|
-
<p className="mt-0.5 text-xs text-slate-500">
|
|
350
|
-
{row.bundled ? (
|
|
351
|
-
<>
|
|
352
|
-
bundled: <span className="font-mono text-slate-700">{row.bundled}</span>
|
|
353
|
-
</>
|
|
354
|
-
) : (
|
|
355
|
-
<>
|
|
356
|
-
package: <span className="font-mono text-slate-700">{row.package}</span>
|
|
357
|
-
</>
|
|
358
|
-
)}
|
|
359
|
-
</p>
|
|
360
|
-
<span
|
|
361
|
-
className={`badge mt-2 ${row.enabled === false ? "badge-slate" : "badge-green"}`}
|
|
362
|
-
>
|
|
363
|
-
{row.enabled === false ? "Disabled" : "Enabled"}
|
|
364
|
-
</span>
|
|
365
|
-
<p className="mt-1 text-xs text-slate-500">
|
|
366
|
-
trust: <span className="font-mono text-slate-700">{row.trustMode ?? "trusted"}</span>
|
|
367
|
-
</p>
|
|
368
|
-
{row.capabilities && row.capabilities.length > 0 && (
|
|
369
|
-
<p className="mt-1 text-xs text-slate-500">
|
|
370
|
-
caps: <span className="font-mono text-slate-700">{row.capabilities.join(", ")}</span>
|
|
371
|
-
</p>
|
|
372
|
-
)}
|
|
373
|
-
</div>
|
|
374
|
-
<div className="flex shrink-0 items-center gap-2">
|
|
375
|
-
<button
|
|
376
|
-
type="button"
|
|
377
|
-
disabled={busyId === row.id}
|
|
378
|
-
onClick={() => void toggleEnabled(row, row.enabled === false)}
|
|
379
|
-
className="btn-ghost flex items-center gap-1.5 py-2 text-xs"
|
|
380
|
-
title={row.enabled === false ? "Enable" : "Disable"}
|
|
381
|
-
>
|
|
382
|
-
{busyId === row.id ? (
|
|
383
|
-
<Loader2 className="h-3.5 w-3.5 animate-spin" />
|
|
384
|
-
) : (
|
|
385
|
-
<Power className="h-3.5 w-3.5" />
|
|
386
|
-
)}
|
|
387
|
-
{row.enabled === false ? "Enable" : "Disable"}
|
|
388
|
-
</button>
|
|
389
|
-
<button
|
|
390
|
-
type="button"
|
|
391
|
-
disabled={busyId === row.id}
|
|
392
|
-
onClick={() => void remove(row)}
|
|
393
|
-
className="inline-flex items-center gap-1.5 rounded-xl border border-red-200 bg-red-50 px-3 py-2 text-xs font-semibold text-red-700 transition hover:bg-red-100"
|
|
394
|
-
>
|
|
395
|
-
<Trash2 className="h-3.5 w-3.5" />
|
|
396
|
-
Remove
|
|
397
|
-
</button>
|
|
398
|
-
</div>
|
|
399
|
-
</li>
|
|
400
|
-
))}
|
|
401
|
-
</ul>
|
|
402
|
-
)}
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
</AppShell>
|
|
406
|
-
);
|
|
9
|
+
const [state, setState] = useState<State | null>(null);
|
|
10
|
+
const [error, setError] = useState("");
|
|
11
|
+
useEffect(() => { api<State>("/admin/plugins").then(setState).catch(err => setError(err instanceof Error ? err.message : "Unable to load plugins")); }, []);
|
|
12
|
+
return <AppShell><h1 className="text-3xl font-bold">Plugins</h1>
|
|
13
|
+
<p className="mt-3 max-w-2xl text-sm text-slate-500">Plugins execute trusted server-side code. Installation and configuration are deployment-operator actions, not browser operations.</p>
|
|
14
|
+
<section className="mt-6 rounded-xl border border-slate-200 p-5 dark:border-slate-700">
|
|
15
|
+
<h2 className="font-semibold">Installed plugins (read only)</h2>
|
|
16
|
+
{error ? <p role="alert" className="mt-4">{error}</p> : !state ? <p role="status" className="mt-4">Loading…</p> :
|
|
17
|
+
!(state.plugins?.length) ? <p className="mt-4 text-sm text-slate-500">No plugins configured.</p> :
|
|
18
|
+
<ul className="mt-4 divide-y divide-slate-200 dark:divide-slate-700">{state.plugins.map(plugin =>
|
|
19
|
+
<li key={plugin.id} className="flex justify-between gap-4 py-3"><span>{plugin.name ?? plugin.packageName ?? plugin.id} {plugin.version}</span><span>{plugin.enabled === false ? "Disabled" : "Configured"}</span></li>)}</ul>}
|
|
20
|
+
</section></AppShell>;
|
|
407
21
|
}
|
|
@@ -35,10 +35,13 @@ export default function ProfilePage() {
|
|
|
35
35
|
setLoggingOut(true);
|
|
36
36
|
try {
|
|
37
37
|
await api("/auth/logout", { method: "POST" });
|
|
38
|
-
} finally {
|
|
39
38
|
localStorage.removeItem("openadminjs.accessToken");
|
|
40
39
|
localStorage.removeItem("openadminjs.refreshToken");
|
|
41
|
-
router.
|
|
40
|
+
router.replace("/login");
|
|
41
|
+
} catch (err) {
|
|
42
|
+
setError(err instanceof Error ? err.message : "Logout failed");
|
|
43
|
+
} finally {
|
|
44
|
+
setLoggingOut(false);
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
|