dineway 0.1.3 → 0.1.5
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 +6 -3
- package/dist/{apply-CAPvMfoU.mjs → apply-iVSqz2qs.mjs} +132 -39
- package/dist/astro/index.d.mts +18 -9
- package/dist/astro/index.mjs +238 -16
- package/dist/astro/middleware/auth.d.mts +16 -5
- package/dist/astro/middleware/auth.mjs +74 -37
- package/dist/astro/middleware/redirect.mjs +24 -8
- package/dist/astro/middleware/request-context.mjs +18 -5
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +411 -169
- package/dist/astro/types.d.mts +25 -8
- package/dist/{byline-DeWCMU_i.mjs → byline-OhH2dlRu.mjs} +6 -21
- package/dist/{bylines-DyqBV9EQ.mjs → bylines-BGpD9_hy.mjs} +16 -6
- package/dist/cache-BdSY-gQN.mjs +42 -0
- package/dist/chunks--4F8ddV4.mjs +18 -0
- package/dist/cli/index.mjs +935 -15
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +11 -3
- package/dist/client/index.mjs +4 -3
- package/dist/{connection-C9pxzuag.mjs → connection-BCNICDWN.mjs} +22 -5
- package/dist/{content-zSgdNmnt.mjs → content-DWi4d0rT.mjs} +41 -2
- package/dist/database/instrumentation.d.mts +34 -0
- package/dist/database/instrumentation.mjs +53 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.mjs +11 -5
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +7 -1
- package/dist/db-errors-CEqD7qH9.mjs +23 -0
- package/dist/{default-WYlzADZL.mjs → default-VjJyuuG9.mjs} +2 -0
- package/dist/{dialect-helpers-B9uSp2GJ.mjs → dialect-helpers-DhTzaUxP.mjs} +3 -0
- package/dist/{error-DrxtnGPg.mjs → error-BmL6QipT.mjs} +7 -3
- package/dist/{index-C-jx21qs.d.mts → index-yvc6E_17.d.mts} +157 -30
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +24 -22
- package/dist/{loader-qKmo0wAY.mjs → loader-sMG4TZ-u.mjs} +9 -3
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- package/dist/page/index.d.mts +10 -2
- package/dist/page/index.mjs +22 -1
- package/dist/patterns-CrCYkMBb.mjs +92 -0
- package/dist/{placeholder-bOx1xCTY.d.mts → placeholder--wOi4TbO.d.mts} +1 -1
- package/dist/{placeholder-B3knXwNc.mjs → placeholder-Cp8g5Emj.mjs} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +5 -5
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{query-BiaPl_g2.mjs → query-kDmwCsHh.mjs} +118 -50
- package/dist/{redirect-JPqLAbxa.mjs → redirect-DnEWAkVg.mjs} +43 -99
- package/dist/{registry-DSd1GWB8.mjs → registry-C0zjeB9P.mjs} +191 -123
- package/dist/request-cache-Dk5qPSOx.mjs +66 -0
- package/dist/request-context.d.mts +4 -16
- package/dist/{runner-B5l1JfOj.d.mts → runner-CFI6B6J2.d.mts} +1 -1
- package/dist/{runner-BGUGywgG.mjs → runner-DWZm2KQm.mjs} +589 -137
- package/dist/runtime.d.mts +6 -6
- package/dist/runtime.mjs +2 -2
- package/dist/{search-BNruJHDL.mjs → search-ByRGV2pq.mjs} +570 -424
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +11 -10
- package/dist/seo/index.d.mts +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +11 -3
- package/dist/storage/s3.mjs +78 -15
- package/dist/taxonomies-1s5PaS_8.mjs +266 -0
- package/dist/transaction-Cn2rjY78.mjs +27 -0
- package/dist/{types-BgQeVaPj.d.mts → types-BuMDPy5C.d.mts} +52 -3
- package/dist/{types-DuNbGKjF.mjs → types-COeOq9nK.mjs} +6 -1
- package/dist/{types-ju-_ORz7.d.mts → types-CWbdtiux.d.mts} +13 -5
- package/dist/{types-D38djUXv.d.mts → types-Cj0KMIZV.d.mts} +16 -3
- package/dist/{types-DkvMXalq.d.mts → types-DOrVigru.d.mts} +159 -0
- package/dist/{validate-CXnRKfJK.mjs → validate-BZ5wnLLp.mjs} +2 -1
- package/dist/{validate-DVKJJ-M_.d.mts → validate-IPf8n4Fj.d.mts} +4 -51
- package/dist/{validate-CqRJb_xU.mjs → validate-VPnKoIzW.mjs} +10 -10
- package/dist/version-BKXPsfmJ.mjs +6 -0
- package/package.json +53 -39
- package/src/astro/routes/PluginRegistry.tsx +21 -0
- package/src/astro/routes/admin.astro +99 -0
- package/src/astro/routes/api/admin/allowed-domains/[domain].ts +112 -0
- package/src/astro/routes/api/admin/allowed-domains/index.ts +108 -0
- package/src/astro/routes/api/admin/api-tokens/[id].ts +44 -0
- package/src/astro/routes/api/admin/api-tokens/index.ts +90 -0
- package/src/astro/routes/api/admin/briefing.ts +76 -0
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +90 -0
- package/src/astro/routes/api/admin/bylines/index.ts +74 -0
- package/src/astro/routes/api/admin/comments/[id]/status.ts +120 -0
- package/src/astro/routes/api/admin/comments/[id].ts +64 -0
- package/src/astro/routes/api/admin/comments/bulk.ts +42 -0
- package/src/astro/routes/api/admin/comments/counts.ts +30 -0
- package/src/astro/routes/api/admin/comments/index.ts +46 -0
- package/src/astro/routes/api/admin/context/[id]/history.ts +35 -0
- package/src/astro/routes/api/admin/context/[id]/index.ts +35 -0
- package/src/astro/routes/api/admin/context/[id]/review.ts +57 -0
- package/src/astro/routes/api/admin/context/[id]/supersede.ts +58 -0
- package/src/astro/routes/api/admin/context/diff.ts +35 -0
- package/src/astro/routes/api/admin/context/index.ts +69 -0
- package/src/astro/routes/api/admin/context/stale.ts +35 -0
- package/src/astro/routes/api/admin/hitl-requests/[id]/index.ts +38 -0
- package/src/astro/routes/api/admin/hitl-requests/[id]/resolve.ts +54 -0
- package/src/astro/routes/api/admin/hitl-requests/index.ts +38 -0
- package/src/astro/routes/api/admin/hooks/exclusive/[hookName].ts +132 -0
- package/src/astro/routes/api/admin/hooks/exclusive/index.ts +51 -0
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +137 -0
- package/src/astro/routes/api/admin/oauth-clients/index.ts +95 -0
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +91 -0
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +91 -0
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +38 -0
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +98 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +154 -0
- package/src/astro/routes/api/admin/plugins/index.ts +32 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/icon.ts +62 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/index.ts +33 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +135 -0
- package/src/astro/routes/api/admin/plugins/marketplace/index.ts +38 -0
- package/src/astro/routes/api/admin/plugins/updates.ts +28 -0
- package/src/astro/routes/api/admin/review-requests/[id]/index.ts +35 -0
- package/src/astro/routes/api/admin/review-requests/[id]/resolve.ts +52 -0
- package/src/astro/routes/api/admin/review-requests/index.ts +35 -0
- package/src/astro/routes/api/admin/themes/marketplace/[id]/index.ts +33 -0
- package/src/astro/routes/api/admin/themes/marketplace/[id]/thumbnail.ts +62 -0
- package/src/astro/routes/api/admin/themes/marketplace/index.ts +45 -0
- package/src/astro/routes/api/admin/users/[id]/disable.ts +72 -0
- package/src/astro/routes/api/admin/users/[id]/enable.ts +48 -0
- package/src/astro/routes/api/admin/users/[id]/index.ts +166 -0
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +72 -0
- package/src/astro/routes/api/admin/users/index.ts +66 -0
- package/src/astro/routes/api/auth/dev-bypass.ts +139 -0
- package/src/astro/routes/api/auth/invite/accept.ts +52 -0
- package/src/astro/routes/api/auth/invite/complete.ts +86 -0
- package/src/astro/routes/api/auth/invite/index.ts +99 -0
- package/src/astro/routes/api/auth/invite/register-options.ts +73 -0
- package/src/astro/routes/api/auth/logout.ts +40 -0
- package/src/astro/routes/api/auth/magic-link/send.ts +90 -0
- package/src/astro/routes/api/auth/magic-link/verify.ts +71 -0
- package/src/astro/routes/api/auth/me.ts +60 -0
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +221 -0
- package/src/astro/routes/api/auth/oauth/[provider].ts +120 -0
- package/src/astro/routes/api/auth/passkey/[id].ts +124 -0
- package/src/astro/routes/api/auth/passkey/index.ts +54 -0
- package/src/astro/routes/api/auth/passkey/options.ts +85 -0
- package/src/astro/routes/api/auth/passkey/register/options.ts +88 -0
- package/src/astro/routes/api/auth/passkey/register/verify.ts +119 -0
- package/src/astro/routes/api/auth/passkey/verify.ts +72 -0
- package/src/astro/routes/api/auth/signup/complete.ts +87 -0
- package/src/astro/routes/api/auth/signup/request.ts +89 -0
- package/src/astro/routes/api/auth/signup/verify.ts +53 -0
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +310 -0
- package/src/astro/routes/api/content/[collection]/[id]/compare.ts +28 -0
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +68 -0
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +77 -0
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +42 -0
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +107 -0
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +100 -0
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +64 -0
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +31 -0
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +129 -0
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +143 -0
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +50 -0
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +69 -0
- package/src/astro/routes/api/content/[collection]/[id].ts +173 -0
- package/src/astro/routes/api/content/[collection]/index.ts +103 -0
- package/src/astro/routes/api/content/[collection]/trash.ts +33 -0
- package/src/astro/routes/api/dashboard.ts +32 -0
- package/src/astro/routes/api/dev/emails.ts +36 -0
- package/src/astro/routes/api/health.ts +54 -0
- package/src/astro/routes/api/import/probe.ts +47 -0
- package/src/astro/routes/api/import/wordpress/analyze.ts +523 -0
- package/src/astro/routes/api/import/wordpress/execute.ts +330 -0
- package/src/astro/routes/api/import/wordpress/media.ts +338 -0
- package/src/astro/routes/api/import/wordpress/prepare.ts +212 -0
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +425 -0
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +111 -0
- package/src/astro/routes/api/import/wordpress-plugin/callback.ts +58 -0
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +399 -0
- package/src/astro/routes/api/manifest.ts +75 -0
- package/src/astro/routes/api/mcp.ts +125 -0
- package/src/astro/routes/api/media/[id]/confirm.ts +93 -0
- package/src/astro/routes/api/media/[id].ts +145 -0
- package/src/astro/routes/api/media/file/[...key].ts +79 -0
- package/src/astro/routes/api/media/providers/[providerId]/[itemId].ts +91 -0
- package/src/astro/routes/api/media/providers/[providerId]/index.ts +111 -0
- package/src/astro/routes/api/media/providers/index.ts +30 -0
- package/src/astro/routes/api/media/upload-url.ts +146 -0
- package/src/astro/routes/api/media.ts +204 -0
- package/src/astro/routes/api/menus/[name]/items.ts +206 -0
- package/src/astro/routes/api/menus/[name]/reorder.ts +79 -0
- package/src/astro/routes/api/menus/[name].ts +145 -0
- package/src/astro/routes/api/menus/index.ts +91 -0
- package/src/astro/routes/api/oauth/authorize.ts +430 -0
- package/src/astro/routes/api/oauth/device/authorize.ts +45 -0
- package/src/astro/routes/api/oauth/device/code.ts +56 -0
- package/src/astro/routes/api/oauth/device/token.ts +70 -0
- package/src/astro/routes/api/oauth/register.ts +182 -0
- package/src/astro/routes/api/oauth/token/refresh.ts +38 -0
- package/src/astro/routes/api/oauth/token/revoke.ts +38 -0
- package/src/astro/routes/api/oauth/token.ts +195 -0
- package/src/astro/routes/api/openapi.json.ts +33 -0
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +109 -0
- package/src/astro/routes/api/redirects/404s/index.ts +72 -0
- package/src/astro/routes/api/redirects/404s/summary.ts +33 -0
- package/src/astro/routes/api/redirects/[id].ts +183 -0
- package/src/astro/routes/api/redirects/index.ts +100 -0
- package/src/astro/routes/api/revisions/[revisionId]/index.ts +29 -0
- package/src/astro/routes/api/revisions/[revisionId]/restore.ts +62 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +104 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +67 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +45 -0
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +107 -0
- package/src/astro/routes/api/schema/collections/index.ts +61 -0
- package/src/astro/routes/api/schema/index.ts +109 -0
- package/src/astro/routes/api/schema/orphans/[slug].ts +36 -0
- package/src/astro/routes/api/schema/orphans/index.ts +26 -0
- package/src/astro/routes/api/search/enable.ts +64 -0
- package/src/astro/routes/api/search/index.ts +52 -0
- package/src/astro/routes/api/search/rebuild.ts +72 -0
- package/src/astro/routes/api/search/stats.ts +35 -0
- package/src/astro/routes/api/search/suggest.ts +50 -0
- package/src/astro/routes/api/sections/[slug].ts +203 -0
- package/src/astro/routes/api/sections/index.ts +107 -0
- package/src/astro/routes/api/settings/email.ts +150 -0
- package/src/astro/routes/api/settings.ts +116 -0
- package/src/astro/routes/api/setup/admin-verify.ts +122 -0
- package/src/astro/routes/api/setup/admin.ts +104 -0
- package/src/astro/routes/api/setup/dev-bypass.ts +200 -0
- package/src/astro/routes/api/setup/dev-reset.ts +40 -0
- package/src/astro/routes/api/setup/index.ts +128 -0
- package/src/astro/routes/api/setup/status.ts +122 -0
- package/src/astro/routes/api/snapshot.ts +76 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +232 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +131 -0
- package/src/astro/routes/api/taxonomies/index.ts +114 -0
- package/src/astro/routes/api/themes/preview.ts +78 -0
- package/src/astro/routes/api/typegen.ts +114 -0
- package/src/astro/routes/api/well-known/auth.ts +71 -0
- package/src/astro/routes/api/well-known/oauth-authorization-server.ts +48 -0
- package/src/astro/routes/api/well-known/oauth-protected-resource.ts +39 -0
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +114 -0
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +213 -0
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +126 -0
- package/src/astro/routes/api/widget-areas/[name].ts +135 -0
- package/src/astro/routes/api/widget-areas/index.ts +149 -0
- package/src/astro/routes/api/widget-components.ts +22 -0
- package/src/astro/routes/robots.txt.ts +81 -0
- package/src/astro/routes/sitemap-[collection].xml.ts +104 -0
- package/src/astro/routes/sitemap.xml.ts +92 -0
- package/src/components/Break.astro +45 -0
- package/src/components/Button.astro +71 -0
- package/src/components/Buttons.astro +49 -0
- package/src/components/Code.astro +59 -0
- package/src/components/Columns.astro +59 -0
- package/src/components/CommentForm.astro +315 -0
- package/src/components/Comments.astro +232 -0
- package/src/components/Cover.astro +128 -0
- package/src/components/DinewayBodyEnd.astro +32 -0
- package/src/components/DinewayBodyStart.astro +32 -0
- package/src/components/DinewayHead.astro +61 -0
- package/src/components/DinewayImage.astro +178 -0
- package/src/components/DinewayMedia.astro +167 -0
- package/src/components/Embed.astro +128 -0
- package/src/components/File.astro +122 -0
- package/src/components/Gallery.astro +93 -0
- package/src/components/HtmlBlock.astro +33 -0
- package/src/components/Image.astro +178 -0
- package/src/components/InlineEditor.astro +27 -0
- package/src/components/InlinePortableTextEditor.tsx +1937 -0
- package/src/components/LiveSearch.astro +614 -0
- package/src/components/PortableText.astro +51 -0
- package/src/components/Pullquote.astro +51 -0
- package/src/components/Table.astro +135 -0
- package/src/components/WidgetArea.astro +22 -0
- package/src/components/WidgetRenderer.astro +72 -0
- package/src/components/index.ts +106 -0
- package/src/components/marks/Link.astro +31 -0
- package/src/components/marks/StrikeThrough.astro +7 -0
- package/src/components/marks/Subscript.astro +7 -0
- package/src/components/marks/Superscript.astro +7 -0
- package/src/components/marks/Underline.astro +7 -0
- package/src/components/marks.ts +19 -0
- package/src/components/widgets/Archives.astro +65 -0
- package/src/components/widgets/Categories.astro +35 -0
- package/src/components/widgets/RecentPosts.astro +51 -0
- package/src/components/widgets/Search.astro +18 -0
- package/src/components/widgets/Tags.astro +38 -0
- package/src/ui.ts +75 -0
- package/LICENSE +0 -9
- /package/dist/{adapters-BlzWJG82.d.mts → adapters-C2ypTrZZ.d.mts} +0 -0
- /package/dist/{config-Cq8H0SfX.mjs → config-BXwuX8Bx.mjs} +0 -0
- /package/dist/{load-C6FCD1FU.mjs → load-Coc9HpHH.mjs} +0 -0
- /package/dist/{manifest-schema-CTSEyIJ3.mjs → manifest-schema-D1MSVnoI.mjs} +0 -0
- /package/dist/{mode-BlyYtIFO.mjs → mode-47goXBBK.mjs} +0 -0
- /package/dist/{tokens-4vgYuXsZ.mjs → tokens-CJz9ubV6.mjs} +0 -0
- /package/dist/{transport-C5FYnid7.mjs → transport-DB5eDN4x.mjs} +0 -0
- /package/dist/{transport-gIL-e43D.d.mts → transport-Wge_IzKl.d.mts} +0 -0
- /package/dist/{types-CLLdsG3g.d.mts → types-BzcUjoqg.d.mts} +0 -0
- /package/dist/{types-DShnjzb6.mjs → types-griIBQOQ.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as FieldType } from "./types-BuMDPy5C.mjs";
|
|
2
2
|
import { z } from "astro/zod";
|
|
3
3
|
import { JSX } from "astro/jsx-runtime";
|
|
4
4
|
|
|
@@ -239,6 +239,8 @@ interface ContentItemSeoInput {
|
|
|
239
239
|
interface ContentItem {
|
|
240
240
|
id: string;
|
|
241
241
|
type: string;
|
|
242
|
+
slug: string | null;
|
|
243
|
+
status: string;
|
|
242
244
|
data: Record<string, unknown>;
|
|
243
245
|
/**
|
|
244
246
|
* SEO metadata, populated when the collection has SEO enabled
|
|
@@ -247,11 +249,21 @@ interface ContentItem {
|
|
|
247
249
|
seo?: ContentItemSeo;
|
|
248
250
|
createdAt: string;
|
|
249
251
|
updatedAt: string;
|
|
252
|
+
publishedAt: string | null;
|
|
253
|
+
locale: string | null;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Content filters supported by the plugin content API.
|
|
257
|
+
*/
|
|
258
|
+
interface ContentListWhere {
|
|
259
|
+
status?: string;
|
|
260
|
+
locale?: string;
|
|
250
261
|
}
|
|
251
262
|
/**
|
|
252
263
|
* Content list options
|
|
253
264
|
*/
|
|
254
265
|
interface ContentListOptions {
|
|
266
|
+
where?: ContentListWhere;
|
|
255
267
|
limit?: number;
|
|
256
268
|
cursor?: string;
|
|
257
269
|
orderBy?: Record<string, "asc" | "desc">;
|
|
@@ -666,6 +678,7 @@ interface ContentHookEvent {
|
|
|
666
678
|
interface ContentDeleteEvent {
|
|
667
679
|
id: string;
|
|
668
680
|
collection: string;
|
|
681
|
+
permanent: boolean;
|
|
669
682
|
}
|
|
670
683
|
/**
|
|
671
684
|
* Content publish state change hook event (fired after publish or unpublish)
|
|
@@ -790,7 +803,7 @@ interface PageMetadataEvent {
|
|
|
790
803
|
* link tags with these rel values. Adding "stylesheet", "prefetch", "prerender"
|
|
791
804
|
* etc. would allow sandboxed plugins to inject external resources.
|
|
792
805
|
*/
|
|
793
|
-
type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "site.standard.document";
|
|
806
|
+
type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "nlweb" | "site.standard.document";
|
|
794
807
|
type PageMetadataContribution = {
|
|
795
808
|
kind: "meta";
|
|
796
809
|
name: string;
|
|
@@ -1193,4 +1206,4 @@ interface PluginManifest {
|
|
|
1193
1206
|
admin: PluginAdminConfig;
|
|
1194
1207
|
}
|
|
1195
1208
|
//#endregion
|
|
1196
|
-
export {
|
|
1209
|
+
export { StandardHookEntry as $, PageMetadataContribution as A, PluginDefinition as B, MediaAccess as C, PageFragmentContribution as D, ModerationDecision as E, PluginAdminConfig as F, PortableTextBlockConfig as G, PluginManifest as H, PluginAdminExports as I, RequestMeta as J, PortableTextBlockField as K, PluginAdminPage as L, PageMetadataHandler as M, PageMetadataLinkRel as N, PageFragmentEvent as O, PagePlacement as P, RouteContext as Q, PluginCapability as R, LogAccess as S, MediaUploadEvent as T, PluginRoute as U, PluginHooks as V, PluginStorageConfig as W, ResolvedPlugin as X, ResolvedHook as Y, ResolvedPluginHooks as Z, FieldWidgetConfig as _, CommentAfterModerateEvent as a, StoredComment as at, HttpAccess as b, CommentBeforeCreateHandler as c, ContentAccess as d, StandardHookHandler as et, ContentDeleteEvent as f, EmailMessage as g, CronEvent as h, CommentAfterCreateHandler as i, StorageCollection as it, PageMetadataEvent as j, PageFragmentHandler as k, CommentModerateEvent as l, ContentPublishStateChangeEvent as m, CollectionCommentSettings as n, StandardRouteEntry as nt, CommentAfterModerateHandler as o, isStandardPluginDefinition as ot, ContentHookEvent as p, PublicPageContext as q, CommentAfterCreateEvent as r, StandardRouteHandler as rt, CommentBeforeCreateEvent as s, Element as st, BreadcrumbItem as t, StandardPluginDefinition as tt, CommentModerateHandler as u, HookConfig as v, MediaItem as w, KVAccess as x, HookName as y, PluginContext as z };
|
|
@@ -170,6 +170,155 @@ interface AuditLogTable {
|
|
|
170
170
|
details: string | null;
|
|
171
171
|
status: string | null;
|
|
172
172
|
}
|
|
173
|
+
interface SiteActivityLogTable {
|
|
174
|
+
id: string;
|
|
175
|
+
actor_type: "user" | "api_token" | "system";
|
|
176
|
+
actor_id: string;
|
|
177
|
+
auth_metadata: string | null;
|
|
178
|
+
action_type: string;
|
|
179
|
+
subject_type: string;
|
|
180
|
+
subject_id: string | null;
|
|
181
|
+
related_subject_type: string | null;
|
|
182
|
+
related_subject_id: string | null;
|
|
183
|
+
source_type: "api_route" | "mcp_tool" | "system" | "plugin" | "unknown" | null;
|
|
184
|
+
source_name: string | null;
|
|
185
|
+
result_status: Generated<"succeeded" | "pending" | "failed" | "blocked">;
|
|
186
|
+
scope: string;
|
|
187
|
+
summary: string;
|
|
188
|
+
detail: string | null;
|
|
189
|
+
created_at: Generated<string>;
|
|
190
|
+
}
|
|
191
|
+
interface ContextEntryTable {
|
|
192
|
+
id: string;
|
|
193
|
+
scope: string;
|
|
194
|
+
context_type: string;
|
|
195
|
+
title: string;
|
|
196
|
+
body: string;
|
|
197
|
+
policy_key: string | null;
|
|
198
|
+
source_activity_id: string | null;
|
|
199
|
+
created_by_actor_type: "user" | "api_token" | "system";
|
|
200
|
+
created_by_actor_id: string;
|
|
201
|
+
created_auth_metadata: string | null;
|
|
202
|
+
supersedes_id: string | null;
|
|
203
|
+
version: number;
|
|
204
|
+
is_current: Generated<number>;
|
|
205
|
+
valid_until: string | null;
|
|
206
|
+
reviewed_at: string | null;
|
|
207
|
+
reviewed_by_actor_type: "user" | "api_token" | "system" | null;
|
|
208
|
+
reviewed_by_actor_id: string | null;
|
|
209
|
+
review_note: string | null;
|
|
210
|
+
created_at: Generated<string>;
|
|
211
|
+
updated_at: Generated<string>;
|
|
212
|
+
}
|
|
213
|
+
interface ContextTagTable {
|
|
214
|
+
context_entry_id: string;
|
|
215
|
+
tag: string;
|
|
216
|
+
}
|
|
217
|
+
interface ReviewRequestTable {
|
|
218
|
+
id: string;
|
|
219
|
+
status: Generated<"pending" | "approved" | "rejected">;
|
|
220
|
+
collection: string;
|
|
221
|
+
entry_id: string;
|
|
222
|
+
scope: string;
|
|
223
|
+
live_revision_id: string | null;
|
|
224
|
+
draft_revision_id: string | null;
|
|
225
|
+
reviewed_rev: string;
|
|
226
|
+
action_type: string;
|
|
227
|
+
action_hash: string;
|
|
228
|
+
risk_reason: string | null;
|
|
229
|
+
review_payload: string;
|
|
230
|
+
requested_by_actor_type: "user" | "api_token" | "system";
|
|
231
|
+
requested_by_actor_id: string;
|
|
232
|
+
requested_auth_metadata: string | null;
|
|
233
|
+
resolved_by_actor_type: "user" | "api_token" | "system" | null;
|
|
234
|
+
resolved_by_actor_id: string | null;
|
|
235
|
+
resolved_auth_metadata: string | null;
|
|
236
|
+
review_note: string | null;
|
|
237
|
+
created_at: Generated<string>;
|
|
238
|
+
updated_at: Generated<string>;
|
|
239
|
+
resolved_at: string | null;
|
|
240
|
+
}
|
|
241
|
+
interface EntityAliasTable {
|
|
242
|
+
id: string;
|
|
243
|
+
entity_type: string;
|
|
244
|
+
collection_slug: string | null;
|
|
245
|
+
entity_id: string;
|
|
246
|
+
alias: string;
|
|
247
|
+
normalized_alias: string;
|
|
248
|
+
created_at: Generated<string>;
|
|
249
|
+
}
|
|
250
|
+
interface HandoffSnapshotTable {
|
|
251
|
+
id: string;
|
|
252
|
+
scope: string;
|
|
253
|
+
actor_type: "user" | "api_token" | "system";
|
|
254
|
+
actor_id: string;
|
|
255
|
+
auth_metadata: string | null;
|
|
256
|
+
objective: string;
|
|
257
|
+
reasoning: string;
|
|
258
|
+
key_findings: string;
|
|
259
|
+
touched_objects: string;
|
|
260
|
+
pending_actions: string;
|
|
261
|
+
tool_evidence: string;
|
|
262
|
+
confidence: number | null;
|
|
263
|
+
handoff_kind: "pause" | "review_request" | "assignment";
|
|
264
|
+
reference_type: "review_request" | "assignment" | null;
|
|
265
|
+
reference_id: string | null;
|
|
266
|
+
created_at: Generated<string>;
|
|
267
|
+
resumed_at: string | null;
|
|
268
|
+
}
|
|
269
|
+
interface AssignmentTable {
|
|
270
|
+
id: string;
|
|
271
|
+
scope: string;
|
|
272
|
+
assignment_type: string;
|
|
273
|
+
status: Generated<"pending" | "accepted" | "in_progress" | "blocked" | "completed" | "declined" | "cancelled">;
|
|
274
|
+
priority: Generated<"low" | "normal" | "high" | "urgent">;
|
|
275
|
+
title: string;
|
|
276
|
+
summary: string | null;
|
|
277
|
+
details: string | null;
|
|
278
|
+
assigned_by_actor_type: "user" | "api_token" | "system";
|
|
279
|
+
assigned_by_actor_id: string;
|
|
280
|
+
assigned_to_actor_type: "user" | "api_token" | "system" | null;
|
|
281
|
+
assigned_to_actor_id: string | null;
|
|
282
|
+
metadata: string;
|
|
283
|
+
related_handoff_snapshot_id: string | null;
|
|
284
|
+
related_hitl_request_id: string | null;
|
|
285
|
+
due_at: string | null;
|
|
286
|
+
created_at: Generated<string>;
|
|
287
|
+
updated_at: Generated<string>;
|
|
288
|
+
accepted_at: string | null;
|
|
289
|
+
started_at: string | null;
|
|
290
|
+
blocked_at: string | null;
|
|
291
|
+
completed_at: string | null;
|
|
292
|
+
declined_at: string | null;
|
|
293
|
+
cancelled_at: string | null;
|
|
294
|
+
}
|
|
295
|
+
interface HitlRequestTable {
|
|
296
|
+
id: string;
|
|
297
|
+
scope: string;
|
|
298
|
+
action_type: string;
|
|
299
|
+
status: Generated<"pending" | "approved" | "rejected">;
|
|
300
|
+
priority: Generated<"low" | "normal" | "high" | "urgent">;
|
|
301
|
+
title: string;
|
|
302
|
+
summary: string | null;
|
|
303
|
+
risk_reason: string;
|
|
304
|
+
review_payload: string;
|
|
305
|
+
target_ref_type: string;
|
|
306
|
+
target_ref_id: string;
|
|
307
|
+
requested_by_actor_type: "user" | "api_token" | "system";
|
|
308
|
+
requested_by_actor_id: string;
|
|
309
|
+
requested_auth_metadata: string | null;
|
|
310
|
+
resolved_by_actor_type: "user" | "api_token" | "system" | null;
|
|
311
|
+
resolved_by_actor_id: string | null;
|
|
312
|
+
resolved_auth_metadata: string | null;
|
|
313
|
+
review_note: string | null;
|
|
314
|
+
metadata: string;
|
|
315
|
+
related_assignment_id: string | null;
|
|
316
|
+
related_handoff_snapshot_id: string | null;
|
|
317
|
+
sla_due_at: string | null;
|
|
318
|
+
created_at: Generated<string>;
|
|
319
|
+
updated_at: Generated<string>;
|
|
320
|
+
resolved_at: string | null;
|
|
321
|
+
}
|
|
173
322
|
interface MigrationTable {
|
|
174
323
|
name: string;
|
|
175
324
|
timestamp: string;
|
|
@@ -348,6 +497,14 @@ interface Database {
|
|
|
348
497
|
auth_challenges: AuthChallengeTable;
|
|
349
498
|
options: OptionTable;
|
|
350
499
|
audit_logs: AuditLogTable;
|
|
500
|
+
_dineway_activity_log: SiteActivityLogTable;
|
|
501
|
+
_dineway_context_entries: ContextEntryTable;
|
|
502
|
+
_dineway_context_tags: ContextTagTable;
|
|
503
|
+
_dineway_review_requests: ReviewRequestTable;
|
|
504
|
+
_dineway_entity_aliases: EntityAliasTable;
|
|
505
|
+
_dineway_handoff_snapshots: HandoffSnapshotTable;
|
|
506
|
+
_dineway_assignments: AssignmentTable;
|
|
507
|
+
_dineway_hitl_requests: HitlRequestTable;
|
|
351
508
|
_dineway_migrations: MigrationTable;
|
|
352
509
|
_dineway_collections: CollectionTable;
|
|
353
510
|
_dineway_fields: FieldTable;
|
|
@@ -393,6 +550,8 @@ interface NotFoundLogTable {
|
|
|
393
550
|
referrer: string | null;
|
|
394
551
|
user_agent: string | null;
|
|
395
552
|
ip: string | null;
|
|
553
|
+
hits: number;
|
|
554
|
+
last_seen_at: string | null;
|
|
396
555
|
created_at: string;
|
|
397
556
|
}
|
|
398
557
|
interface BylineTable {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
2
|
-
import { t as FIELD_TYPES } from "./types-
|
|
2
|
+
import { t as FIELD_TYPES } from "./types-COeOq9nK.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/seed/validate.ts
|
|
5
5
|
/**
|
|
@@ -59,6 +59,7 @@ function validateSeed(data) {
|
|
|
59
59
|
collectionSlugs.add(collection.slug);
|
|
60
60
|
}
|
|
61
61
|
if (!collection.label) errors.push(`${prefix}: label is required`);
|
|
62
|
+
if (collection.urlPattern && !collection.urlPattern.includes("{slug}")) errors.push(`${prefix}.urlPattern: must include a {slug} placeholder`);
|
|
62
63
|
if (!Array.isArray(collection.fields)) errors.push(`${prefix}.fields: must be an array`);
|
|
63
64
|
else {
|
|
64
65
|
const fieldSlugs = /* @__PURE__ */ new Set();
|
|
@@ -1,55 +1,8 @@
|
|
|
1
|
-
import { t as Database } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { d as Storage } from "./types-
|
|
1
|
+
import { t as Database } from "./types-DOrVigru.mjs";
|
|
2
|
+
import { i as SiteSettings, m as FieldType } from "./types-BuMDPy5C.mjs";
|
|
3
|
+
import { d as Storage } from "./types-CWbdtiux.mjs";
|
|
4
4
|
import { Kysely } from "kysely";
|
|
5
5
|
|
|
6
|
-
//#region src/settings/types.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Site Settings Types
|
|
9
|
-
*
|
|
10
|
-
* Global configuration for the site (title, logo, social links, etc.)
|
|
11
|
-
*/
|
|
12
|
-
/** Media reference for logo/favicon */
|
|
13
|
-
interface MediaReference {
|
|
14
|
-
mediaId: string;
|
|
15
|
-
alt?: string;
|
|
16
|
-
}
|
|
17
|
-
/** Site-level SEO settings */
|
|
18
|
-
interface SeoSettings {
|
|
19
|
-
/** Separator between page title and site title (e.g., " | ", " — ") */
|
|
20
|
-
titleSeparator?: string;
|
|
21
|
-
/** Default OG image when content has no seo_image */
|
|
22
|
-
defaultOgImage?: MediaReference;
|
|
23
|
-
/** Custom robots.txt content. If unset, a default is generated. */
|
|
24
|
-
robotsTxt?: string;
|
|
25
|
-
/** Google Search Console verification meta tag content */
|
|
26
|
-
googleVerification?: string;
|
|
27
|
-
/** Bing Webmaster Tools verification meta tag content */
|
|
28
|
-
bingVerification?: string;
|
|
29
|
-
}
|
|
30
|
-
/** Site settings schema */
|
|
31
|
-
interface SiteSettings {
|
|
32
|
-
title: string;
|
|
33
|
-
tagline?: string;
|
|
34
|
-
logo?: MediaReference;
|
|
35
|
-
favicon?: MediaReference;
|
|
36
|
-
url?: string;
|
|
37
|
-
postsPerPage: number;
|
|
38
|
-
dateFormat: string;
|
|
39
|
-
timezone: string;
|
|
40
|
-
social?: {
|
|
41
|
-
twitter?: string;
|
|
42
|
-
github?: string;
|
|
43
|
-
facebook?: string;
|
|
44
|
-
instagram?: string;
|
|
45
|
-
linkedin?: string;
|
|
46
|
-
youtube?: string;
|
|
47
|
-
};
|
|
48
|
-
seo?: SeoSettings;
|
|
49
|
-
}
|
|
50
|
-
/** Keys that are valid site settings */
|
|
51
|
-
type SiteSettingKey = keyof SiteSettings;
|
|
52
|
-
//#endregion
|
|
53
6
|
//#region src/seed/types.d.ts
|
|
54
7
|
/**
|
|
55
8
|
* Root seed file structure
|
|
@@ -374,4 +327,4 @@ declare function loadUserSeed(): Promise<SeedFile | null>;
|
|
|
374
327
|
*/
|
|
375
328
|
declare function validateSeed(data: unknown): ValidationResult;
|
|
376
329
|
//#endregion
|
|
377
|
-
export {
|
|
330
|
+
export { SeedTaxonomyTerm as _, applySeed as a, ValidationResult as b, SeedCollection as c, SeedFile as d, SeedMenu as f, SeedTaxonomy as g, SeedSection as h, defaultSeed as i, SeedContentEntry as l, SeedRedirect as m, loadSeed as n, SeedApplyOptions as o, SeedMenuItem as p, loadUserSeed as r, SeedApplyResult as s, validateSeed as t, SeedField as u, SeedWidget as v, SeedWidgetArea as y };
|
|
@@ -61,16 +61,6 @@ function validateIdentifier(value, label = "identifier") {
|
|
|
61
61
|
if (!IDENTIFIER_PATTERN.test(value)) throw new IdentifierError(`${label} must match /^[a-z][a-z0-9_]*$/ (got "${value}")`, value);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Validate that a string is a safe SQL identifier, allowing hyphens.
|
|
65
|
-
*
|
|
66
|
-
* Like `validateIdentifier` but also permits hyphens, which appear in
|
|
67
|
-
* plugin IDs (e.g., "my-plugin"). Matches `/^[a-z][a-z0-9_-]*$/`.
|
|
68
|
-
*
|
|
69
|
-
* @param value - The string to validate
|
|
70
|
-
* @param label - Human-readable label for error messages
|
|
71
|
-
* @throws {IdentifierError} If the value is not valid
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
64
|
* Validate that a string is a safe JSON field name for use in json_extract paths.
|
|
75
65
|
*
|
|
76
66
|
* More permissive than `validateIdentifier` — allows camelCase (mixed case)
|
|
@@ -86,6 +76,16 @@ function validateJsonFieldName(value, label = "JSON field name") {
|
|
|
86
76
|
if (value.length > MAX_IDENTIFIER_LENGTH) throw new IdentifierError(`${label} must be ${MAX_IDENTIFIER_LENGTH} characters or less, got ${value.length}`, value);
|
|
87
77
|
if (!GENERIC_IDENTIFIER_PATTERN.test(value)) throw new IdentifierError(`${label} must match /^[a-zA-Z][a-zA-Z0-9_]*$/ (got "${value}")`, value);
|
|
88
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Validate that a string is a safe SQL identifier, allowing hyphens.
|
|
81
|
+
*
|
|
82
|
+
* Like `validateIdentifier` but also permits hyphens, which appear in
|
|
83
|
+
* plugin IDs (e.g., "my-plugin"). Matches `/^[a-z][a-z0-9_-]*$/`.
|
|
84
|
+
*
|
|
85
|
+
* @param value - The string to validate
|
|
86
|
+
* @param label - Human-readable label for error messages
|
|
87
|
+
* @throws {IdentifierError} If the value is not valid
|
|
88
|
+
*/
|
|
89
89
|
function validatePluginIdentifier(value, label = "plugin identifier") {
|
|
90
90
|
if (!value || typeof value !== "string") throw new IdentifierError(`${label} must be a non-empty string`, String(value));
|
|
91
91
|
if (value.length > MAX_IDENTIFIER_LENGTH) throw new IdentifierError(`${label} must be ${MAX_IDENTIFIER_LENGTH} characters or less, got ${value.length}`, value);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dineway",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Agentic
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Agentic Website builder for restaurants — structured content meets AI via the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.mts",
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"locals.d.ts"
|
|
13
|
+
"locals.d.ts",
|
|
14
|
+
"src/astro/routes",
|
|
15
|
+
"src/ui.ts",
|
|
16
|
+
"src/components"
|
|
14
17
|
],
|
|
15
18
|
"exports": {
|
|
16
19
|
".": {
|
|
@@ -84,6 +87,10 @@
|
|
|
84
87
|
"types": "./dist/request-context.d.mts",
|
|
85
88
|
"default": "./dist/request-context.mjs"
|
|
86
89
|
},
|
|
90
|
+
"./database/instrumentation": {
|
|
91
|
+
"types": "./dist/database/instrumentation.d.mts",
|
|
92
|
+
"default": "./dist/database/instrumentation.mjs"
|
|
93
|
+
},
|
|
87
94
|
"./seed": {
|
|
88
95
|
"types": "./dist/seed/index.d.mts",
|
|
89
96
|
"default": "./dist/seed/index.mjs"
|
|
@@ -125,8 +132,11 @@
|
|
|
125
132
|
"#api/*": "./src/api/*",
|
|
126
133
|
"#db/*": "./src/database/*",
|
|
127
134
|
"#auth/*": "./src/auth/*",
|
|
135
|
+
"#bylines/*": "./src/bylines/*",
|
|
136
|
+
"#taxonomies/*": "./src/taxonomies/*",
|
|
128
137
|
"#schema/*": "./src/schema/*",
|
|
129
138
|
"#search/*": "./src/search/*",
|
|
139
|
+
"#redirects/*": "./src/redirects/*",
|
|
130
140
|
"#sections/*": "./src/sections/*",
|
|
131
141
|
"#menus/*": "./src/menus/*",
|
|
132
142
|
"#widgets/*": "./src/widgets/*",
|
|
@@ -140,6 +150,7 @@
|
|
|
140
150
|
"#media/*": "./src/media/*",
|
|
141
151
|
"#mcp/*": "./src/mcp/*",
|
|
142
152
|
"#comments/*": "./src/comments/*",
|
|
153
|
+
"#site-context/*": "./src/site-context/*",
|
|
143
154
|
"#types": "./src/astro/types.js"
|
|
144
155
|
},
|
|
145
156
|
"typesVersions": {
|
|
@@ -224,25 +235,38 @@
|
|
|
224
235
|
]
|
|
225
236
|
}
|
|
226
237
|
},
|
|
238
|
+
"scripts": {
|
|
239
|
+
"build": "tsdown",
|
|
240
|
+
"dev": "tsdown --watch",
|
|
241
|
+
"prepublishOnly": "node --run build",
|
|
242
|
+
"typecheck": "tsgo --noEmit",
|
|
243
|
+
"check": "publint && attw --pack --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution --ignore-rules=internal-resolution-error",
|
|
244
|
+
"test": "vitest",
|
|
245
|
+
"test:smoke": "vitest run --config vitest.smoke.config.ts",
|
|
246
|
+
"test:integration": "vitest run --config vitest.integration.config.ts"
|
|
247
|
+
},
|
|
227
248
|
"dependencies": {
|
|
249
|
+
"@dineway-ai/admin": "workspace:*",
|
|
250
|
+
"@dineway-ai/auth": "workspace:*",
|
|
251
|
+
"@dineway-ai/gutenberg-to-portable-text": "workspace:*",
|
|
228
252
|
"@floating-ui/react": "^0.27.16",
|
|
229
253
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
230
254
|
"@portabletext/toolkit": "^5.0.1",
|
|
231
|
-
"@tiptap/core": "
|
|
232
|
-
"@tiptap/extension-focus": "
|
|
233
|
-
"@tiptap/extension-image": "
|
|
234
|
-
"@tiptap/extension-link": "
|
|
235
|
-
"@tiptap/extension-placeholder": "
|
|
236
|
-
"@tiptap/extension-text-align": "
|
|
237
|
-
"@tiptap/extension-typography": "
|
|
238
|
-
"@tiptap/extension-underline": "
|
|
239
|
-
"@tiptap/react": "
|
|
240
|
-
"@tiptap/starter-kit": "
|
|
241
|
-
"@tiptap/suggestion": "
|
|
255
|
+
"@tiptap/core": "catalog:",
|
|
256
|
+
"@tiptap/extension-focus": "catalog:",
|
|
257
|
+
"@tiptap/extension-image": "catalog:",
|
|
258
|
+
"@tiptap/extension-link": "catalog:",
|
|
259
|
+
"@tiptap/extension-placeholder": "catalog:",
|
|
260
|
+
"@tiptap/extension-text-align": "catalog:",
|
|
261
|
+
"@tiptap/extension-typography": "catalog:",
|
|
262
|
+
"@tiptap/extension-underline": "catalog:",
|
|
263
|
+
"@tiptap/react": "catalog:",
|
|
264
|
+
"@tiptap/starter-kit": "catalog:",
|
|
265
|
+
"@tiptap/suggestion": "catalog:",
|
|
242
266
|
"@unpic/placeholder": "^0.1.2",
|
|
243
267
|
"arctic": "^3.7.0",
|
|
244
268
|
"astro-portabletext": "^0.11.0",
|
|
245
|
-
"better-sqlite3": "
|
|
269
|
+
"better-sqlite3": "catalog:",
|
|
246
270
|
"blurhash": "^2.0.5",
|
|
247
271
|
"citty": "^0.1.6",
|
|
248
272
|
"consola": "^3.4.2",
|
|
@@ -258,10 +282,7 @@
|
|
|
258
282
|
"sax": "^1.4.1",
|
|
259
283
|
"ulidx": "^2.4.1",
|
|
260
284
|
"upng-js": "^2.1.0",
|
|
261
|
-
"zod": "^4.3.5"
|
|
262
|
-
"@dineway-ai/admin": "0.1.3",
|
|
263
|
-
"@dineway-ai/auth": "0.1.3",
|
|
264
|
-
"@dineway-ai/gutenberg-to-portable-text": "0.1.3"
|
|
285
|
+
"zod": "^4.3.5"
|
|
265
286
|
},
|
|
266
287
|
"optionalDependencies": {
|
|
267
288
|
"@libsql/kysely-libsql": "^0.4.0",
|
|
@@ -277,7 +298,8 @@
|
|
|
277
298
|
},
|
|
278
299
|
"devDependencies": {
|
|
279
300
|
"@apidevtools/swagger-parser": "^12.1.0",
|
|
280
|
-
"@arethetypeswrong/cli": "
|
|
301
|
+
"@arethetypeswrong/cli": "catalog:",
|
|
302
|
+
"@dineway-ai/blocks": "workspace:*",
|
|
281
303
|
"@rivet-dev/agent-os-common": "^0.0.260331072558",
|
|
282
304
|
"@rivet-dev/agent-os-core": "^0.1.1",
|
|
283
305
|
"@types/better-sqlite3": "^7.6.12",
|
|
@@ -285,29 +307,21 @@
|
|
|
285
307
|
"@types/sanitize-html": "^2.16.0",
|
|
286
308
|
"@types/sax": "^1.2.7",
|
|
287
309
|
"@vitest/ui": "^4.0.17",
|
|
288
|
-
"publint": "
|
|
289
|
-
"tsdown": "
|
|
290
|
-
"typescript": "
|
|
310
|
+
"publint": "catalog:",
|
|
311
|
+
"tsdown": "catalog:",
|
|
312
|
+
"typescript": "catalog:",
|
|
291
313
|
"vite": "^6.0.0",
|
|
292
|
-
"vitest": "
|
|
293
|
-
"zod-openapi": "^5.4.6"
|
|
294
|
-
"@dineway-ai/blocks": "0.1.3"
|
|
314
|
+
"vitest": "catalog:",
|
|
315
|
+
"zod-openapi": "^5.4.6"
|
|
295
316
|
},
|
|
296
317
|
"keywords": [
|
|
297
318
|
"astro",
|
|
298
|
-
"
|
|
319
|
+
"restaurant",
|
|
320
|
+
"agentic",
|
|
321
|
+
"mcp",
|
|
299
322
|
"content",
|
|
300
|
-
"
|
|
323
|
+
"cms"
|
|
301
324
|
],
|
|
302
325
|
"author": "Matt Kane",
|
|
303
|
-
"license": "MIT"
|
|
304
|
-
|
|
305
|
-
"build": "tsdown",
|
|
306
|
-
"dev": "tsdown --watch",
|
|
307
|
-
"typecheck": "tsgo --noEmit",
|
|
308
|
-
"check": "publint && attw --pack --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution --ignore-rules=internal-resolution-error",
|
|
309
|
-
"test": "vitest",
|
|
310
|
-
"test:smoke": "vitest run --config vitest.smoke.config.ts",
|
|
311
|
-
"test:integration": "vitest run --config vitest.integration.config.ts"
|
|
312
|
-
}
|
|
313
|
-
}
|
|
326
|
+
"license": "MIT"
|
|
327
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin Wrapper
|
|
3
|
+
*
|
|
4
|
+
* Imports plugin admin modules from the virtual module and passes them
|
|
5
|
+
* to AdminApp via props. This ensures plugin components are bundled
|
|
6
|
+
* together with the admin app and available via React context.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { AdminApp } from "@dineway-ai/admin";
|
|
10
|
+
import type { Messages } from "@lingui/core";
|
|
11
|
+
// @ts-ignore - virtual module generated by integration
|
|
12
|
+
import { pluginAdmins } from "virtual:dineway/admin-registry";
|
|
13
|
+
|
|
14
|
+
interface AdminWrapperProps {
|
|
15
|
+
locale: string;
|
|
16
|
+
messages: Messages;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function AdminWrapper({ locale, messages }: AdminWrapperProps) {
|
|
20
|
+
return <AdminApp pluginAdmins={pluginAdmins} locale={locale} messages={messages} />;
|
|
21
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Admin shell route - injected by Dineway integration
|
|
4
|
+
*
|
|
5
|
+
* This page serves the Dineway admin React SPA.
|
|
6
|
+
* AdminWrapper imports plugin admin modules and passes them to AdminApp.
|
|
7
|
+
*/
|
|
8
|
+
import "@dineway-ai/admin/styles.css";
|
|
9
|
+
// Use package-qualified import so Astro generates a proper module URL
|
|
10
|
+
// (relative imports resolve to absolute paths which break client hydration)
|
|
11
|
+
import AdminWrapper from "dineway/routes/PluginRegistry";
|
|
12
|
+
import { Font } from "astro:assets";
|
|
13
|
+
|
|
14
|
+
export const prerender = false;
|
|
15
|
+
|
|
16
|
+
import { getLocaleDir, loadMessages, resolveLocale } from "@dineway-ai/admin/locales";
|
|
17
|
+
|
|
18
|
+
const resolvedLocale = resolveLocale(Astro.request);
|
|
19
|
+
const resolvedDir = getLocaleDir(resolvedLocale);
|
|
20
|
+
const messages = await loadMessages(resolvedLocale);
|
|
21
|
+
const adminConfig = Astro.locals.dineway?.config.admin;
|
|
22
|
+
const pageTitle = adminConfig?.siteName ? `${adminConfig.siteName} Admin` : "Dineway Admin";
|
|
23
|
+
const loadingLabel = adminConfig?.siteName
|
|
24
|
+
? `Loading ${adminConfig.siteName}...`
|
|
25
|
+
: "Loading Dineway...";
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<!doctype html>
|
|
29
|
+
<html lang={resolvedLocale} dir={resolvedDir}>
|
|
30
|
+
<head>
|
|
31
|
+
<meta charset="UTF-8" />
|
|
32
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
33
|
+
<Font cssVariable="--font-dineway" />
|
|
34
|
+
{
|
|
35
|
+
adminConfig?.favicon ? (
|
|
36
|
+
<link rel="icon" href={adminConfig.favicon} />
|
|
37
|
+
) : (
|
|
38
|
+
<link rel="icon" href="/favicon.svg" />
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
<title>{pageTitle}</title>
|
|
42
|
+
</head>
|
|
43
|
+
<body class="isolate">
|
|
44
|
+
<div id="admin-root" class="min-h-screen">
|
|
45
|
+
<div id="dineway-boot-loader">
|
|
46
|
+
<style>
|
|
47
|
+
#dineway-boot-loader {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
min-height: 100vh;
|
|
52
|
+
color-scheme: light dark;
|
|
53
|
+
background: light-dark(hsl(0 0% 100%), hsl(222.2 84% 4.9%));
|
|
54
|
+
}
|
|
55
|
+
#dineway-boot-loader .loader-inner {
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
58
|
+
#dineway-boot-loader .spinner {
|
|
59
|
+
width: 24px;
|
|
60
|
+
height: 24px;
|
|
61
|
+
margin: 0 auto;
|
|
62
|
+
border: 2.5px solid
|
|
63
|
+
light-dark(
|
|
64
|
+
hsl(215.4 16.3% 46.9% / 0.3),
|
|
65
|
+
hsl(215 20.2% 65.1% / 0.3)
|
|
66
|
+
);
|
|
67
|
+
border-top-color: light-dark(
|
|
68
|
+
hsl(215.4 16.3% 46.9%),
|
|
69
|
+
hsl(215 20.2% 65.1%)
|
|
70
|
+
);
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
animation: dineway-spin 0.8s linear infinite;
|
|
73
|
+
}
|
|
74
|
+
#dineway-boot-loader p {
|
|
75
|
+
margin-top: 1rem;
|
|
76
|
+
font-family: var(
|
|
77
|
+
--font-dineway,
|
|
78
|
+
system-ui,
|
|
79
|
+
-apple-system,
|
|
80
|
+
sans-serif
|
|
81
|
+
);
|
|
82
|
+
font-size: 0.875rem;
|
|
83
|
+
color: light-dark(hsl(215.4 16.3% 46.9%), hsl(215 20.2% 65.1%));
|
|
84
|
+
}
|
|
85
|
+
@keyframes dineway-spin {
|
|
86
|
+
to {
|
|
87
|
+
transform: rotate(360deg);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
91
|
+
<div class="loader-inner">
|
|
92
|
+
<div class="spinner"></div>
|
|
93
|
+
<p>{loadingLabel}</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<AdminWrapper client:only="react" locale={resolvedLocale} messages={messages} />
|
|
97
|
+
</div>
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|