dineway 0.1.4 → 0.1.6
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-BApX1xhM.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-hmtC3Cmv.mjs +6 -0
- package/package.json +49 -38
- package/src/astro/routes/admin.astro +25 -9
- package/src/astro/routes/api/admin/api-tokens/[id].ts +4 -0
- package/src/astro/routes/api/admin/api-tokens/index.ts +24 -2
- package/src/astro/routes/api/admin/briefing.ts +76 -0
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +3 -0
- package/src/astro/routes/api/admin/bylines/index.ts +2 -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 +58 -17
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +28 -1
- package/src/astro/routes/api/admin/oauth-clients/index.ts +25 -1
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +54 -2
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +54 -2
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +51 -1
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +98 -3
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +72 -1
- 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/users/[id]/disable.ts +26 -23
- package/src/astro/routes/api/admin/users/[id]/index.ts +41 -21
- package/src/astro/routes/api/auth/invite/register-options.ts +73 -0
- package/src/astro/routes/api/auth/magic-link/send.ts +2 -1
- package/src/astro/routes/api/auth/passkey/options.ts +2 -1
- package/src/astro/routes/api/auth/passkey/verify.ts +5 -1
- package/src/astro/routes/api/auth/signup/request.ts +20 -8
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/compare.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +16 -2
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +16 -0
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +9 -0
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +45 -1
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +12 -2
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +24 -0
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +3 -0
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +20 -0
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +13 -0
- package/src/astro/routes/api/content/[collection]/[id].ts +36 -0
- package/src/astro/routes/api/content/[collection]/index.ts +48 -4
- package/src/astro/routes/api/content/[collection]/trash.ts +1 -1
- package/src/astro/routes/api/health.ts +54 -0
- package/src/astro/routes/api/import/wordpress/analyze.ts +2 -10
- package/src/astro/routes/api/import/wordpress/execute.ts +40 -6
- package/src/astro/routes/api/import/wordpress/prepare.ts +36 -5
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +33 -1
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +3 -3
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +57 -15
- package/src/astro/routes/api/manifest.ts +13 -1
- package/src/astro/routes/api/mcp.ts +1 -0
- package/src/astro/routes/api/media/providers/[providerId]/[itemId].ts +7 -2
- package/src/astro/routes/api/media/upload-url.ts +11 -2
- package/src/astro/routes/api/media.ts +9 -7
- package/src/astro/routes/api/menus/[name]/items.ts +124 -5
- package/src/astro/routes/api/menus/[name]/reorder.ts +47 -1
- package/src/astro/routes/api/menus/[name].ts +84 -4
- package/src/astro/routes/api/menus/index.ts +46 -2
- package/src/astro/routes/api/oauth/authorize.ts +21 -8
- package/src/astro/routes/api/oauth/device/code.ts +2 -1
- package/src/astro/routes/api/oauth/device/token.ts +2 -1
- package/src/astro/routes/api/oauth/register.ts +182 -0
- package/src/astro/routes/api/oauth/token.ts +18 -7
- package/src/astro/routes/api/openapi.json.ts +3 -2
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +21 -4
- package/src/astro/routes/api/redirects/[id].ts +103 -4
- package/src/astro/routes/api/redirects/index.ts +50 -2
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +28 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +15 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +13 -0
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +27 -0
- package/src/astro/routes/api/schema/collections/index.ts +14 -0
- package/src/astro/routes/api/search/index.ts +1 -0
- package/src/astro/routes/api/search/suggest.ts +1 -0
- package/src/astro/routes/api/sections/[slug].ts +123 -4
- package/src/astro/routes/api/sections/index.ts +57 -2
- package/src/astro/routes/api/settings.ts +51 -2
- package/src/astro/routes/api/setup/admin-verify.ts +25 -5
- package/src/astro/routes/api/setup/admin.ts +16 -8
- package/src/astro/routes/api/setup/index.ts +3 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +141 -4
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +64 -2
- package/src/astro/routes/api/taxonomies/index.ts +57 -2
- package/src/astro/routes/api/well-known/auth.ts +3 -1
- package/src/astro/routes/api/well-known/oauth-authorization-server.ts +8 -5
- package/src/astro/routes/api/well-known/oauth-protected-resource.ts +3 -2
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +58 -16
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +124 -38
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +66 -20
- package/src/astro/routes/api/widget-areas/[name].ts +55 -7
- package/src/astro/routes/api/widget-areas/index.ts +56 -6
- package/src/components/DinewayHead.astro +15 -7
- package/src/components/DinewayMedia.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +1 -1
- package/src/components/Table.astro +68 -41
- package/src/components/index.ts +2 -12
- package/src/components/marks.ts +19 -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,11 +1,10 @@
|
|
|
1
|
-
import { _ as MediaValue, m as MediaProviderDescriptor } from "./placeholder
|
|
2
|
-
import { t as Database } from "./types-
|
|
3
|
-
import { a as ContentSeoInput, c as FindManyOptions, l as FindManyResult, o as CreateContentInput, r as ContentItem, t as BylineSummary, u as UpdateContentInput } from "./types-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as DatabaseDescriptor } from "./adapters-BlzWJG82.mjs";
|
|
1
|
+
import { _ as MediaValue, m as MediaProviderDescriptor } from "./placeholder--wOi4TbO.mjs";
|
|
2
|
+
import { t as Database } from "./types-DOrVigru.mjs";
|
|
3
|
+
import { a as ContentSeoInput, c as FindManyOptions, l as FindManyResult, o as CreateContentInput, r as ContentItem, t as BylineSummary, u as UpdateContentInput } from "./types-BzcUjoqg.mjs";
|
|
4
|
+
import { A as PageMetadataContribution, B as PluginDefinition, D as PageFragmentContribution, H as PluginManifest, J as RequestMeta, O as PageFragmentEvent, W as PluginStorageConfig, X as ResolvedPlugin, a as CommentAfterModerateEvent, g as EmailMessage, h as CronEvent, j as PageMetadataEvent, r as CommentAfterCreateEvent, s as CommentBeforeCreateEvent, tt as StandardPluginDefinition, w as MediaItem$1 } from "./types-Cj0KMIZV.mjs";
|
|
5
|
+
import { a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput, i as SiteSettings, p as Field, r as SiteSettingKey, u as CreateCollectionInput, y as UpdateCollectionInput } from "./types-BuMDPy5C.mjs";
|
|
6
|
+
import { d as Storage } from "./types-CWbdtiux.mjs";
|
|
7
|
+
import { t as DatabaseDescriptor } from "./adapters-C2ypTrZZ.mjs";
|
|
9
8
|
import { Kysely } from "kysely";
|
|
10
9
|
import { z } from "astro/zod";
|
|
11
10
|
import { z as z$1 } from "zod";
|
|
@@ -161,6 +160,13 @@ declare class ContentRepository {
|
|
|
161
160
|
* If no draft revision exists, creates one from current data and publishes it.
|
|
162
161
|
*/
|
|
163
162
|
publish(type: string, id: string): Promise<ContentItem>;
|
|
163
|
+
/**
|
|
164
|
+
* Stage an existing revision as the draft for a content item.
|
|
165
|
+
*
|
|
166
|
+
* Seed/import paths use this to promote freshly prepared revision data
|
|
167
|
+
* through `publish()` instead of writing live revision pointers directly.
|
|
168
|
+
*/
|
|
169
|
+
setDraftRevision(type: string, id: string, revisionId: string): Promise<void>;
|
|
164
170
|
/**
|
|
165
171
|
* Unpublish content
|
|
166
172
|
*
|
|
@@ -454,7 +460,11 @@ interface ContentResponse {
|
|
|
454
460
|
*/
|
|
455
461
|
interface ManifestResponse {
|
|
456
462
|
version: string;
|
|
463
|
+
commit?: string;
|
|
457
464
|
hash: string;
|
|
465
|
+
features?: {
|
|
466
|
+
siteContextWorkflows: boolean;
|
|
467
|
+
};
|
|
458
468
|
collections: Record<string, {
|
|
459
469
|
label: string;
|
|
460
470
|
labelSingular: string;
|
|
@@ -819,6 +829,9 @@ declare class SchemaRegistry {
|
|
|
819
829
|
* Update a collection
|
|
820
830
|
*/
|
|
821
831
|
updateCollection(slug: string, input: UpdateCollectionInput): Promise<Collection>;
|
|
832
|
+
private validateUrlPattern;
|
|
833
|
+
private checkLabelUniqueness;
|
|
834
|
+
private checkUrlPatternUniqueness;
|
|
822
835
|
/**
|
|
823
836
|
* Delete a collection
|
|
824
837
|
*/
|
|
@@ -842,12 +855,12 @@ declare class SchemaRegistry {
|
|
|
842
855
|
*/
|
|
843
856
|
updateField(collectionSlug: string, fieldSlug: string, input: UpdateFieldInput): Promise<Field>;
|
|
844
857
|
/**
|
|
845
|
-
*
|
|
858
|
+
* Synchronize an existing FTS index with the collection's current state.
|
|
846
859
|
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
860
|
+
* Schema writes must not first-time enable FTS. Initial enablement stays in
|
|
861
|
+
* explicit seed/import/admin flows where FTS failures can be handled deliberately.
|
|
849
862
|
*/
|
|
850
|
-
private
|
|
863
|
+
private syncSearchState;
|
|
851
864
|
/**
|
|
852
865
|
* Delete a field
|
|
853
866
|
*/
|
|
@@ -1328,6 +1341,12 @@ declare function hashString(content: string): Promise<string>;
|
|
|
1328
1341
|
*/
|
|
1329
1342
|
declare function computeContentHash(content: Uint8Array | ArrayBuffer): Promise<string>;
|
|
1330
1343
|
//#endregion
|
|
1344
|
+
//#region src/utils/slugify.d.ts
|
|
1345
|
+
/**
|
|
1346
|
+
* Decode a URI-encoded slug route parameter before database lookup.
|
|
1347
|
+
*/
|
|
1348
|
+
declare function decodeSlug(raw: string | undefined): string | undefined;
|
|
1349
|
+
//#endregion
|
|
1331
1350
|
//#region src/utils/url.d.ts
|
|
1332
1351
|
/**
|
|
1333
1352
|
* URL scheme validation utilities
|
|
@@ -1660,6 +1679,18 @@ interface ResolvePathResult<T = Record<string, unknown>> {
|
|
|
1660
1679
|
*/
|
|
1661
1680
|
declare function resolveDinewayPath<T = Record<string, unknown>>(path: string): Promise<ResolvePathResult<T> | null>;
|
|
1662
1681
|
//#endregion
|
|
1682
|
+
//#region src/after.d.ts
|
|
1683
|
+
/**
|
|
1684
|
+
* Defer work past the current synchronous path.
|
|
1685
|
+
*
|
|
1686
|
+
* Use this for best-effort bookkeeping that should not block runtime
|
|
1687
|
+
* initialization or response handling. Node keeps the process alive for
|
|
1688
|
+
* pending work; callers that need stronger durability should await their own
|
|
1689
|
+
* operation instead of using this helper.
|
|
1690
|
+
*/
|
|
1691
|
+
type AfterCallback = () => void | Promise<void>;
|
|
1692
|
+
declare function after(fn: AfterCallback): void;
|
|
1693
|
+
//#endregion
|
|
1663
1694
|
//#region src/i18n/config.d.ts
|
|
1664
1695
|
/**
|
|
1665
1696
|
* Dineway i18n Configuration
|
|
@@ -2191,10 +2222,18 @@ interface S3StorageConfig {
|
|
|
2191
2222
|
endpoint: string;
|
|
2192
2223
|
/** Bucket name */
|
|
2193
2224
|
bucket: string;
|
|
2194
|
-
/**
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2225
|
+
/**
|
|
2226
|
+
* Access key ID.
|
|
2227
|
+
* May be resolved from `S3_ACCESS_KEY_ID` at runtime on Node.
|
|
2228
|
+
* Must be provided together with `secretAccessKey`, or both omitted.
|
|
2229
|
+
*/
|
|
2230
|
+
accessKeyId?: string;
|
|
2231
|
+
/**
|
|
2232
|
+
* Secret access key.
|
|
2233
|
+
* May be resolved from `S3_SECRET_ACCESS_KEY` at runtime on Node.
|
|
2234
|
+
* Must be provided together with `accessKeyId`, or both omitted.
|
|
2235
|
+
*/
|
|
2236
|
+
secretAccessKey?: string;
|
|
2198
2237
|
/** Optional region (defaults to "auto") */
|
|
2199
2238
|
region?: string;
|
|
2200
2239
|
/** Optional public URL prefix for CDN */
|
|
@@ -2311,6 +2350,14 @@ interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
|
2311
2350
|
* The `entrypoint` is resolved to a file and bundled at build time.
|
|
2312
2351
|
*/
|
|
2313
2352
|
type SandboxedPluginDescriptor<TOptions = Record<string, unknown>> = PluginDescriptor<TOptions>;
|
|
2353
|
+
interface DinewayFontsConfig {
|
|
2354
|
+
/**
|
|
2355
|
+
* Additional Noto Sans or compatible script families to include in the admin UI.
|
|
2356
|
+
*
|
|
2357
|
+
* Use script names like "arabic", "farsi", "japanese", or "chinese-simplified".
|
|
2358
|
+
*/
|
|
2359
|
+
scripts?: string[];
|
|
2360
|
+
}
|
|
2314
2361
|
interface DinewayConfig {
|
|
2315
2362
|
/**
|
|
2316
2363
|
* Database configuration
|
|
@@ -2410,21 +2457,22 @@ interface DinewayConfig {
|
|
|
2410
2457
|
*/
|
|
2411
2458
|
auth?: AuthDescriptor;
|
|
2412
2459
|
/**
|
|
2413
|
-
*
|
|
2460
|
+
* MCP (Model Context Protocol) server endpoint.
|
|
2414
2461
|
*
|
|
2415
|
-
*
|
|
2416
|
-
*
|
|
2417
|
-
*
|
|
2462
|
+
* Exposes an MCP Streamable HTTP server at `/_dineway/api/mcp`
|
|
2463
|
+
* that allows AI agents and tools to interact with the CMS using
|
|
2464
|
+
* the standardized MCP protocol.
|
|
2418
2465
|
*
|
|
2419
|
-
*
|
|
2420
|
-
*
|
|
2466
|
+
* Enabled by default. The endpoint requires bearer token auth, so
|
|
2467
|
+
* it has no practical effect unless the user creates an API token
|
|
2468
|
+
* or configures an OAuth client. Set to `false` to disable.
|
|
2421
2469
|
*
|
|
2422
|
-
* @default
|
|
2470
|
+
* @default true
|
|
2423
2471
|
*
|
|
2424
2472
|
* @example
|
|
2425
2473
|
* ```ts
|
|
2426
2474
|
* dineway({
|
|
2427
|
-
* mcp:
|
|
2475
|
+
* mcp: false,
|
|
2428
2476
|
* })
|
|
2429
2477
|
* ```
|
|
2430
2478
|
*/
|
|
@@ -2447,6 +2495,57 @@ interface DinewayConfig {
|
|
|
2447
2495
|
* ```
|
|
2448
2496
|
*/
|
|
2449
2497
|
marketplace?: string;
|
|
2498
|
+
/**
|
|
2499
|
+
* Maximum allowed media file upload size in bytes.
|
|
2500
|
+
*
|
|
2501
|
+
* Applies to both direct multipart uploads and signed-URL uploads.
|
|
2502
|
+
* When omitted, Dineway defaults to 52_428_800 (50 MB).
|
|
2503
|
+
*
|
|
2504
|
+
* @example
|
|
2505
|
+
* ```ts
|
|
2506
|
+
* dineway({ maxUploadSize: 100 * 1024 * 1024 }) // 100 MB
|
|
2507
|
+
* ```
|
|
2508
|
+
*/
|
|
2509
|
+
maxUploadSize?: number;
|
|
2510
|
+
/**
|
|
2511
|
+
* Admin UI branding.
|
|
2512
|
+
*
|
|
2513
|
+
* Use this to customize the logo, name, and favicon shown in the
|
|
2514
|
+
* Dineway admin panel without changing public site identity settings.
|
|
2515
|
+
*
|
|
2516
|
+
* @example
|
|
2517
|
+
* ```ts
|
|
2518
|
+
* dineway({
|
|
2519
|
+
* admin: {
|
|
2520
|
+
* logo: "/images/agency-logo.svg",
|
|
2521
|
+
* siteName: "Agency Console",
|
|
2522
|
+
* favicon: "/agency-favicon.ico",
|
|
2523
|
+
* },
|
|
2524
|
+
* })
|
|
2525
|
+
* ```
|
|
2526
|
+
*/
|
|
2527
|
+
admin?: {
|
|
2528
|
+
/** URL or path to a custom logo image for the admin UI. */logo?: string; /** Custom name displayed in the admin sidebar and browser tab. */
|
|
2529
|
+
siteName?: string; /** URL or path to a custom favicon for the admin panel. */
|
|
2530
|
+
favicon?: string;
|
|
2531
|
+
};
|
|
2532
|
+
/**
|
|
2533
|
+
* Admin UI font configuration.
|
|
2534
|
+
*
|
|
2535
|
+
* By default, Dineway uses the Astro Font API to load Noto Sans at
|
|
2536
|
+
* build time and self-host the generated font files. Set to false to
|
|
2537
|
+
* disable Dineway-managed fonts and use system fonts.
|
|
2538
|
+
*
|
|
2539
|
+
* @example
|
|
2540
|
+
* ```ts
|
|
2541
|
+
* dineway({
|
|
2542
|
+
* fonts: {
|
|
2543
|
+
* scripts: ["arabic", "farsi", "japanese"],
|
|
2544
|
+
* },
|
|
2545
|
+
* })
|
|
2546
|
+
* ```
|
|
2547
|
+
*/
|
|
2548
|
+
fonts?: false | DinewayFontsConfig;
|
|
2450
2549
|
/**
|
|
2451
2550
|
* Public browser-facing origin for the site.
|
|
2452
2551
|
*
|
|
@@ -2461,6 +2560,23 @@ interface DinewayConfig {
|
|
|
2461
2560
|
* Replaces `passkeyPublicOrigin` (which only fixed passkeys).
|
|
2462
2561
|
*/
|
|
2463
2562
|
siteUrl?: string;
|
|
2563
|
+
/**
|
|
2564
|
+
* Reverse-proxy headers that Dineway may trust for client IP resolution.
|
|
2565
|
+
*
|
|
2566
|
+
* Defaults to no trusted headers. Set this only when Dineway is deployed
|
|
2567
|
+
* behind a reverse proxy you control and that proxy strips or overwrites
|
|
2568
|
+
* incoming client-supplied copies of these headers.
|
|
2569
|
+
*
|
|
2570
|
+
* When omitted, Dineway falls back to `DINEWAY_TRUSTED_PROXY_HEADERS`.
|
|
2571
|
+
*
|
|
2572
|
+
* @example
|
|
2573
|
+
* ```ts
|
|
2574
|
+
* dineway({
|
|
2575
|
+
* trustedProxyHeaders: ["x-real-ip", "x-forwarded-for"],
|
|
2576
|
+
* })
|
|
2577
|
+
* ```
|
|
2578
|
+
*/
|
|
2579
|
+
trustedProxyHeaders?: string[];
|
|
2464
2580
|
/**
|
|
2465
2581
|
* Enable playground mode for ephemeral "try Dineway" sites.
|
|
2466
2582
|
*
|
|
@@ -2808,7 +2924,7 @@ declare class HookPipeline {
|
|
|
2808
2924
|
/**
|
|
2809
2925
|
* Run content:afterDelete hooks
|
|
2810
2926
|
*/
|
|
2811
|
-
runContentAfterDelete(id: string, collection: string): Promise<HookResult<void>[]>;
|
|
2927
|
+
runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
|
|
2812
2928
|
/**
|
|
2813
2929
|
* Run content:afterPublish hooks (fire-and-forget).
|
|
2814
2930
|
*/
|
|
@@ -3056,6 +3172,10 @@ interface PluginContextFactoryOptions {
|
|
|
3056
3172
|
* If not provided (or no provider configured), ctx.email will be undefined.
|
|
3057
3173
|
*/
|
|
3058
3174
|
emailPipeline?: EmailPipeline;
|
|
3175
|
+
/**
|
|
3176
|
+
* Trusted reverse-proxy headers for request metadata IP extraction.
|
|
3177
|
+
*/
|
|
3178
|
+
trustedProxyHeaders?: string[];
|
|
3059
3179
|
}
|
|
3060
3180
|
//#endregion
|
|
3061
3181
|
//#region src/plugins/routes.d.ts
|
|
@@ -3134,6 +3254,8 @@ interface PluginManagerOptions {
|
|
|
3134
3254
|
uploadUrl: string;
|
|
3135
3255
|
mediaId: string;
|
|
3136
3256
|
}>;
|
|
3257
|
+
/** Trusted reverse-proxy headers for request metadata IP extraction. */
|
|
3258
|
+
trustedProxyHeaders?: string[];
|
|
3137
3259
|
}
|
|
3138
3260
|
/**
|
|
3139
3261
|
* Plugin Manager v2
|
|
@@ -3204,7 +3326,7 @@ declare class PluginManager {
|
|
|
3204
3326
|
/**
|
|
3205
3327
|
* Run content:afterDelete hooks across all active plugins
|
|
3206
3328
|
*/
|
|
3207
|
-
runContentAfterDelete(id: string, collection: string): Promise<HookResult<void>[]>;
|
|
3329
|
+
runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
|
|
3208
3330
|
/**
|
|
3209
3331
|
* Run content:afterPublish hooks across all active plugins
|
|
3210
3332
|
*/
|
|
@@ -4599,7 +4721,11 @@ declare class FTSManager {
|
|
|
4599
4721
|
*/
|
|
4600
4722
|
createFtsTable(collectionSlug: string, searchableFields: string[], _weights?: Record<string, number>): Promise<void>;
|
|
4601
4723
|
/**
|
|
4602
|
-
* Create triggers to keep FTS table in sync with content table
|
|
4724
|
+
* Create triggers to keep FTS table in sync with content table.
|
|
4725
|
+
*
|
|
4726
|
+
* Insert and update triggers only add rows to the FTS index when
|
|
4727
|
+
* `deleted_at IS NULL`. This keeps soft-deleted content out of the
|
|
4728
|
+
* index and keeps repair counts aligned with searchable content.
|
|
4603
4729
|
*/
|
|
4604
4730
|
private createTriggers;
|
|
4605
4731
|
/**
|
|
@@ -4633,9 +4759,10 @@ declare class FTSManager {
|
|
|
4633
4759
|
*/
|
|
4634
4760
|
getSearchableFields(collectionSlug: string): Promise<string[]>;
|
|
4635
4761
|
/**
|
|
4636
|
-
* Enable search for a collection
|
|
4762
|
+
* Enable search for a collection.
|
|
4637
4763
|
*
|
|
4638
|
-
*
|
|
4764
|
+
* Rebuilds from scratch to ensure stale tables or triggers do not survive
|
|
4765
|
+
* repeated enablement.
|
|
4639
4766
|
*/
|
|
4640
4767
|
enableSearch(collectionSlug: string, options?: {
|
|
4641
4768
|
weights?: Record<string, number>;
|
|
@@ -4768,4 +4895,4 @@ declare function extractPlainText(blocks: PortableTextBlock$1[] | string | null
|
|
|
4768
4895
|
*/
|
|
4769
4896
|
declare function extractSearchableFields(entry: Record<string, unknown>, fields: string[]): Record<string, string>;
|
|
4770
4897
|
//#endregion
|
|
4771
|
-
export { GetCommentsOptions as $,
|
|
4898
|
+
export { GetCommentsOptions as $, ContentResponse as $i, SessionDatabaseFactory as $n, ProseMirrorDocument as $r, OAuthInput as $t, getEntryTerms as A, handleRevisionRestore as Ai, AuthProviderModule as An, getDinewayEntry as Ar, wordpressRestSource as At, UpdateTermInput as B, handleContentGetIncludingTrashed as Bi, WxrTag as Bn, sanitizeHref as Br, importReusableBlocksAsSections as Bt, ReorderWidgetsInput as C, handleMediaGet as Ci, DinewayConfig as Cn, EditFieldMeta as Cr, GeneratePreviewTokenOptions as Ct, WidgetComponentDef as D, RevisionResponse as Di, S3StorageConfig as Dn, TranslationSummary as Dr, generatePreviewToken as Dt, WidgetArea as E, RevisionListResponse as Ei, LocalStorageConfig as En, ResolvePathResult as Er, VerifyPreviewTokenResult as Et, getTermsForEntries as F, handleContentCreate as Fi, WxrAuthor as Fn, EditProxy as Fr, getFileSources as Ft, CreateMenuInput as G, handleContentRestore as Gi, EntryFilter as Gn, prosemirrorToPortableText as Gr, FileInput as Gt, getBylineBySlug as H, handleContentListTrashed as Hi, parseWxrString as Hn, computeContentHash as Hr, CollectionSchemaStatus as Ht, CreateTermInput as I, handleContentDelete as Ii, WxrCategory as In, FieldAnnotation as Ir, getSource as It, MenuItem as J, handleContentUnpublish as Ji, FilePreviewMiddlewareConfig as Jn, PortableTextLinkMark as Jr, ImportContext as Jt, CreateMenuItemInput as K, handleContentSchedule as Ki, dinewayLoader as Kn, PortableTextCodeBlock as Kr, ImportAnalysis as Kt, TaxonomyDef as L, handleContentDiscardDraft as Li, WxrData as Ln, createEditable as Lr, getUrlSources as Lt, getTaxonomyDefs as M, handleContentCompare as Mi, ExternalAuthConfig as Mn, getTranslations as Mr, wxrSource as Mt, getTaxonomyTerms as N, handleContentCountScheduled as Ni, definePlugin as Nn, resolveDinewayPath as Nr, clearSources as Nt, WidgetType as O, handleRevisionGet as Oi, StorageDescriptor as On, TranslationsResult as Or, parseContentId as Ot, getTerm as P, handleContentCountTrashed as Pi, WxrAttachment as Pn, CMSAnnotation as Pr, getAllSources as Pt, UpdateMenuItemInput as Q, ContentListResponse as Qi, SessionCleanupResult as Qn, PortableTextUnknownBlock as Qr, NormalizedItem as Qt, TaxonomyTerm as R, handleContentDuplicate as Ri, WxrPost as Rn, createNoop as Rr, probeUrl as Rt, PropDef as S, handleMediaDelete as Si, pluginManifestSchema as Sn, DinewayCollections as Sr, getPreviewUrl as St, Widget as T, handleMediaUpdate as Ti, getStoredConfig as Tn, InferCollectionData as Tr, VerifyPreviewTokenOptions as Tt, getMenu as U, handleContentPermanentDelete as Ui, CollectionFilter as Un, hashString as Ur, FetchOptions as Ut, getByline as V, handleContentList as Vi, parseWxr as Vn, decodeSlug as Vr, AttachmentInfo as Vt, getMenus as W, handleContentPublish as Wi, EntryData as Wn, portableTextToProsemirror as Wr, FieldCompatibility as Wt, ReorderMenuItemsInput as X, handleContentUpdate as Xi, FileSessionDatabaseFactory as Xn, PortableTextSpan as Xr, ImportResult as Xt, MenuItemType as Y, handleContentUnschedule as Yi, createFilePreviewMiddleware as Yn, PortableTextMarkDef as Yr, ImportFieldDef as Yt, UpdateMenuInput as Z, ApiContext as Zi, FileSessionDatabaseFactoryOptions as Zn, PortableTextTextBlock as Zr, ImportSource as Zt, getWidgetArea as _, SchemaError as _i, EmailPipeline as _n, after as _r, isBlockedInPreview as _t, search as a, image as aa, SandboxRunner as ai, SourceInput as an, PreviewSidecarClient as ar, getSiteSetting as at, CreateWidgetAreaInput as b, MediaResponse as bi, createHookPipeline as bn, CollectionResult as br, GetPreviewUrlOptions as bt, FTSManager as c, FileValue as ca, SerializedRequest as ci, UrlInput as cn, defaultPreviewSidecarClient as cr, PreviewToolbarConfig as ct, SearchOptions as d, CreateMediaInput as da, CreateSectionInput as di, NoopSandboxRunner as dn, verifyPreviewSignature as dr, ApplySnapshotToDatabaseOptions as dt, FieldDescriptor as ea, ProseMirrorMark as ei, PostTypeAnalysis as en, SessionDatabaseHandle as er, GetCommentsResult as et, SearchResponse as f, MediaItem as fa, GetSectionsOptions as fi, SandboxNotAvailableError as fn, I18nConfig as fr, applySnapshotToDatabase as ft, Suggestion as g, DinewayDatabaseError as ga, getCollectionInfo as gi, PluginRouteError as gn, AfterCallback as gr, renderPreviewLoadingPage as gt, SuggestOptions as h, DatabaseConfig as ha, UpdateSectionInput as hi, createPluginManager as hn, isI18nEnabled as hr, Snapshot as ht, getSuggestions as i, reference as ia, SandboxOptions as ii, SourceCapabilities as in, SessionOpenOrCreateOptions as ir, getPluginSettings as it, getTaxonomyDef as j, generateManifest as ji, AuthResult as jn, getEditMeta as jr, parseWxrDate as jt, getEntriesByTerm as k, handleRevisionList as ki, AuthDescriptor as kn, getDinewayCollection as kr, verifyPreviewToken as kt, CollectionSearchOptions as l, ImageValue as la, getSection as li, NodeSandboxRunner as ln, parsePreviewSignatureHeader as lr, renderPreviewToolbar as lt, SearchStats as m, ContentRepository as ma, SectionSource as mi, PluginManager as mn, getI18nConfig as mr, getAppliedSnapshotMeta as mt, extractSearchableFields as n, ManifestResponse as na, SandboxEmailMessage as ni, ProbeResult as nn, SessionDatabaseLimitError as nr, getComments as nt, searchCollection as o, FieldDefinition as oa, SandboxRunnerFactory as oi, SourceProbeResult as on, PreviewSidecarSignature as or, getSiteSettings as ot, SearchResult as p, MediaRepository as pa, Section as pi, createNoopSandboxRunner as pn, getFallbackChain as pr, dropSessionDatabaseTables as pt, Menu as q, handleContentTranslations as qi, getDb as qn, PortableTextImageBlock as qr, ImportConfig as qt, getSearchStats as r, portableText as ra, SandboxEmailSendCallback as ri, SourceAuth as rn, SessionOpenOptions as rr, getPluginSetting as rt, searchWithDb as s, FieldUIHints as sa, SandboxedPlugin as si, SuggestedAction as sn, buildPreviewSignatureHeader as sr, setSiteSettings as st, extractPlainText as t, ListResponse as ta, ProseMirrorNode as ti, PostTypeMapping as tn, SessionDatabaseInfo as tr, getCommentCount as tt, SearchConfig as u, PortableTextBlock$2 as ua, getSections as ui, createNodeSandboxRunner as un, signPreviewUrl as ur, AppliedSnapshotMeta as ut, getWidgetAreas as v, SchemaRegistry as vi, HookPipeline as vn, CacheHint as vr, getPreviewToken as vt, UpdateWidgetInput as w, handleMediaList as wi, PluginDescriptor as wn, EntryResult as wr, PreviewTokenPayload as wt, CreateWidgetInput as x, handleMediaCreate as xi, ValidatedPluginManifest as xn, ContentEntry as xr, buildPreviewUrl as xt, getWidgetComponents as y, MediaListResponse as yi, HookResult as yn, CollectionFilter$1 as yr, isPreviewRequest as yt, TaxonomyTermRow as z, handleContentGet as zi, WxrSite as zn, isSafeHref as zr, registerSource as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { _ as MediaValue, n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder
|
|
2
|
-
import { n as MediaTable, r as UserTable, t as Database } from "./types-
|
|
3
|
-
import { $ as GetCommentsOptions, $i as
|
|
4
|
-
import { n as getMigrationStatus, t as MigrationStatus } from "./runner-
|
|
5
|
-
import { a as ContentSeoInput, c as FindManyOptions, i as ContentSeo, l as FindManyResult, n as ContentBylineCredit, o as CreateContentInput, r as ContentItem, s as DinewayValidationError, t as BylineSummary, u as UpdateContentInput } from "./types-
|
|
6
|
-
import { $ as
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import { a as ListOptions, c as S3StorageConfig, d as Storage, f as StorageDescriptor, i as FileInfo, l as SignedUploadOptions, n as DinewayStorageError, o as ListResult, p as UploadResult, r as DownloadResult, s as LocalStorageConfig, t as CreateStorageFn, u as SignedUploadUrl } from "./types-ju-_ORz7.mjs";
|
|
1
|
+
import { _ as MediaValue, n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder--wOi4TbO.mjs";
|
|
2
|
+
import { n as MediaTable, r as UserTable, t as Database } from "./types-DOrVigru.mjs";
|
|
3
|
+
import { $ as GetCommentsOptions, $i as ContentResponse, $n as SessionDatabaseFactory, $r as ProseMirrorDocument, $t as OAuthInput, A as getEntryTerms, Ai as handleRevisionRestore, An as AuthProviderModule, Ar as getDinewayEntry, At as wordpressRestSource, B as UpdateTermInput, Bi as handleContentGetIncludingTrashed, Bn as WxrTag, Br as sanitizeHref, Bt as importReusableBlocksAsSections, C as ReorderWidgetsInput, Ci as handleMediaGet, Cr as EditFieldMeta, Ct as GeneratePreviewTokenOptions, D as WidgetComponentDef, Di as RevisionResponse, Dr as TranslationSummary, Dt as generatePreviewToken, E as WidgetArea, Ei as RevisionListResponse, Er as ResolvePathResult, Et as VerifyPreviewTokenResult, F as getTermsForEntries, Fi as handleContentCreate, Fn as WxrAuthor, Fr as EditProxy, Ft as getFileSources, G as CreateMenuInput, Gi as handleContentRestore, Gn as EntryFilter, Gr as prosemirrorToPortableText, Gt as FileInput, H as getBylineBySlug, Hi as handleContentListTrashed, Hn as parseWxrString, Hr as computeContentHash, Ht as CollectionSchemaStatus, I as CreateTermInput, Ii as handleContentDelete, In as WxrCategory, Ir as FieldAnnotation, It as getSource, J as MenuItem, Ji as handleContentUnpublish, Jn as FilePreviewMiddlewareConfig, Jr as PortableTextLinkMark, Jt as ImportContext, K as CreateMenuItemInput, Ki as handleContentSchedule, Kr as PortableTextCodeBlock, Kt as ImportAnalysis, L as TaxonomyDef, Li as handleContentDiscardDraft, Ln as WxrData, Lr as createEditable, Lt as getUrlSources, M as getTaxonomyDefs, Mi as handleContentCompare, Mn as ExternalAuthConfig, Mr as getTranslations, Mt as wxrSource, N as getTaxonomyTerms, Ni as handleContentCountScheduled, Nn as definePlugin, Nr as resolveDinewayPath, Nt as clearSources, O as WidgetType, Oi as handleRevisionGet, Or as TranslationsResult, Ot as parseContentId, P as getTerm, Pi as handleContentCountTrashed, Pn as WxrAttachment, Pr as CMSAnnotation, Pt as getAllSources, Q as UpdateMenuItemInput, Qi as ContentListResponse, Qn as SessionCleanupResult, Qr as PortableTextUnknownBlock, Qt as NormalizedItem, R as TaxonomyTerm, Ri as handleContentDuplicate, Rn as WxrPost, Rr as createNoop, Rt as probeUrl, S as PropDef, Si as handleMediaDelete, Sn as pluginManifestSchema, Sr as DinewayCollections, St as getPreviewUrl, T as Widget, Ti as handleMediaUpdate, Tr as InferCollectionData, Tt as VerifyPreviewTokenOptions, U as getMenu, Ui as handleContentPermanentDelete, Un as CollectionFilter$1, Ur as hashString, Ut as FetchOptions, V as getByline, Vi as handleContentList, Vn as parseWxr, Vr as decodeSlug, Vt as AttachmentInfo, W as getMenus, Wi as handleContentPublish, Wn as EntryData, Wr as portableTextToProsemirror, Wt as FieldCompatibility, X as ReorderMenuItemsInput, Xi as handleContentUpdate, Xn as FileSessionDatabaseFactory, Xr as PortableTextSpan, Xt as ImportResult, Y as MenuItemType, Yi as handleContentUnschedule, Yn as createFilePreviewMiddleware, Yr as PortableTextMarkDef, Yt as ImportFieldDef, Z as UpdateMenuInput, Zi as ApiContext, Zn as FileSessionDatabaseFactoryOptions, Zr as PortableTextTextBlock, Zt as ImportSource, _ as getWidgetArea, _i as SchemaError, _r as after, _t as isBlockedInPreview, a as search, aa as image, ai as SandboxRunner, an as SourceInput, ar as PreviewSidecarClient, at as getSiteSetting, b as CreateWidgetAreaInput, bi as MediaResponse, bn as createHookPipeline, br as CollectionResult, bt as GetPreviewUrlOptions, c as FTSManager, ca as FileValue, ci as SerializedRequest, cn as UrlInput, cr as defaultPreviewSidecarClient, ct as PreviewToolbarConfig, d as SearchOptions, da as CreateMediaInput, di as CreateSectionInput, dn as NoopSandboxRunner, dr as verifyPreviewSignature, dt as ApplySnapshotToDatabaseOptions, ea as FieldDescriptor, ei as ProseMirrorMark, en as PostTypeAnalysis, er as SessionDatabaseHandle, et as GetCommentsResult, f as SearchResponse, fa as MediaItem, fi as GetSectionsOptions, fn as SandboxNotAvailableError, fr as I18nConfig, ft as applySnapshotToDatabase, g as Suggestion, ga as DinewayDatabaseError, gi as getCollectionInfo, gn as PluginRouteError, gr as AfterCallback, gt as renderPreviewLoadingPage, h as SuggestOptions, ha as DatabaseConfig, hi as UpdateSectionInput, hn as createPluginManager, hr as isI18nEnabled, ht as Snapshot, i as getSuggestions, ia as reference, ii as SandboxOptions, in as SourceCapabilities, ir as SessionOpenOrCreateOptions, it as getPluginSettings, j as getTaxonomyDef, ji as generateManifest, jn as AuthResult, jr as getEditMeta, jt as parseWxrDate, k as getEntriesByTerm, ki as handleRevisionList, kn as AuthDescriptor, kr as getDinewayCollection, kt as verifyPreviewToken, l as CollectionSearchOptions, la as ImageValue, li as getSection, ln as NodeSandboxRunner, lr as parsePreviewSignatureHeader, lt as renderPreviewToolbar, m as SearchStats, ma as ContentRepository, mi as SectionSource, mn as PluginManager, mr as getI18nConfig, mt as getAppliedSnapshotMeta, n as extractSearchableFields, na as ManifestResponse, ni as SandboxEmailMessage, nn as ProbeResult, nr as SessionDatabaseLimitError, nt as getComments, o as searchCollection, oa as FieldDefinition, oi as SandboxRunnerFactory, on as SourceProbeResult, or as PreviewSidecarSignature, ot as getSiteSettings, p as SearchResult, pa as MediaRepository, pi as Section, pn as createNoopSandboxRunner, pr as getFallbackChain, pt as dropSessionDatabaseTables, q as Menu, qi as handleContentTranslations, qr as PortableTextImageBlock, qt as ImportConfig, r as getSearchStats, ra as portableText, ri as SandboxEmailSendCallback, rn as SourceAuth, rr as SessionOpenOptions, rt as getPluginSetting, s as searchWithDb, sa as FieldUIHints, si as SandboxedPlugin, sn as SuggestedAction, sr as buildPreviewSignatureHeader, st as setSiteSettings, t as extractPlainText, ta as ListResponse, ti as ProseMirrorNode, tn as PostTypeMapping, tr as SessionDatabaseInfo, tt as getCommentCount, u as SearchConfig, ua as PortableTextBlock, ui as getSections, un as createNodeSandboxRunner, ur as signPreviewUrl, ut as AppliedSnapshotMeta, v as getWidgetAreas, vi as SchemaRegistry, vn as HookPipeline, vr as CacheHint, vt as getPreviewToken, w as UpdateWidgetInput, wi as handleMediaList, wn as PluginDescriptor, wr as EntryResult, wt as PreviewTokenPayload, x as CreateWidgetInput, xi as handleMediaCreate, xn as ValidatedPluginManifest, xr as ContentEntry, xt as buildPreviewUrl, y as getWidgetComponents, yi as MediaListResponse, yn as HookResult, yr as CollectionFilter, yt as isPreviewRequest, z as TaxonomyTermRow, zi as handleContentGet, zn as WxrSite, zr as isSafeHref, zt as registerSource } from "./index-yvc6E_17.mjs";
|
|
4
|
+
import { n as getMigrationStatus, t as MigrationStatus } from "./runner-CFI6B6J2.mjs";
|
|
5
|
+
import { a as ContentSeoInput, c as FindManyOptions, i as ContentSeo, l as FindManyResult, n as ContentBylineCredit, o as CreateContentInput, r as ContentItem, s as DinewayValidationError, t as BylineSummary, u as UpdateContentInput } from "./types-BzcUjoqg.mjs";
|
|
6
|
+
import { $ as StandardHookEntry, A as PageMetadataContribution, B as PluginDefinition, C as MediaAccess, D as PageFragmentContribution, E as ModerationDecision, F as PluginAdminConfig, G as PortableTextBlockConfig, H as PluginManifest, I as PluginAdminExports, K as PortableTextBlockField, L as PluginAdminPage, M as PageMetadataHandler, O as PageFragmentEvent, P as PagePlacement, Q as RouteContext, R as PluginCapability, S as LogAccess, T as MediaUploadEvent, U as PluginRoute, V as PluginHooks, W as PluginStorageConfig, X as ResolvedPlugin, Y as ResolvedHook, Z as ResolvedPluginHooks, _ as FieldWidgetConfig, a as CommentAfterModerateEvent, at as StoredComment, b as HttpAccess, c as CommentBeforeCreateHandler, d as ContentAccess, et as StandardHookHandler, f as ContentDeleteEvent, i as CommentAfterCreateHandler, it as StorageCollection, j as PageMetadataEvent, k as PageFragmentHandler, l as CommentModerateEvent, m as ContentPublishStateChangeEvent, n as CollectionCommentSettings, nt as StandardRouteEntry, o as CommentAfterModerateHandler, ot as isStandardPluginDefinition, p as ContentHookEvent, q as PublicPageContext, r as CommentAfterCreateEvent, rt as StandardRouteHandler, s as CommentBeforeCreateEvent, t as BreadcrumbItem, tt as StandardPluginDefinition, u as CommentModerateHandler, v as HookConfig, x as KVAccess, y as HookName, z as PluginContext } from "./types-Cj0KMIZV.mjs";
|
|
7
|
+
import { _ as RESERVED_COLLECTION_SLUGS, a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput, f as FIELD_TYPE_TO_COLUMN, g as FieldWidgetOptions, h as FieldValidation, i as SiteSettings, l as ColumnType, m as FieldType, n as SeoSettings, o as CollectionSource, p as Field, r as SiteSettingKey, s as CollectionSupport, t as MediaReference, u as CreateCollectionInput, v as RESERVED_FIELD_SLUGS, y as UpdateCollectionInput } from "./types-BuMDPy5C.mjs";
|
|
8
|
+
import { a as ListOptions, c as S3StorageConfig, d as Storage, f as StorageDescriptor, i as FileInfo, l as SignedUploadOptions, n as DinewayStorageError, o as ListResult, p as UploadResult, r as DownloadResult, s as LocalStorageConfig, t as CreateStorageFn, u as SignedUploadUrl } from "./types-CWbdtiux.mjs";
|
|
10
9
|
import { DinewayRequestContext, getRequestContext, runWithContext } from "./request-context.mjs";
|
|
11
|
-
import { a as SqliteConfig, i as PostgresConfig, n as DatabaseDialectType, r as LibsqlConfig, t as DatabaseDescriptor } from "./adapters-
|
|
10
|
+
import { a as SqliteConfig, i as PostgresConfig, n as DatabaseDialectType, r as LibsqlConfig, t as DatabaseDescriptor } from "./adapters-C2ypTrZZ.mjs";
|
|
12
11
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
13
12
|
import { SeoMeta, SeoMetaOptions, getContentSeo, getSeoMeta } from "./seo/index.mjs";
|
|
13
|
+
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, l as SeedContentEntry, o as SeedApplyOptions, p as SeedMenuItem, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "./validate-IPf8n4Fj.mjs";
|
|
14
14
|
import "./seed/index.mjs";
|
|
15
15
|
import { ulid } from "ulidx";
|
|
16
|
-
export { type ApiContext, type AppliedSnapshotMeta, type ApplySnapshotToDatabaseOptions, type AttachmentInfo, type AuthDescriptor, type AuthProviderModule, type AuthResult, type BreadcrumbItem, type BylineSummary, type CMSAnnotation, type CacheHint, type Collection, type CollectionCommentSettings, type CollectionFilter, type CollectionResult, type CollectionSchemaStatus, type CollectionSearchOptions, type CollectionSource, type CollectionSupport, type CollectionWithFields, type ColumnType, type CommentAfterCreateEvent, type CommentAfterCreateHandler, type CommentAfterModerateEvent, type CommentAfterModerateHandler, type CommentBeforeCreateEvent, type CommentBeforeCreateHandler, type CommentModerateEvent, type CommentModerateHandler, type ContentAccess, type ContentBylineCredit, type ContentEntry, type ContentHookEvent, type ContentItem, type ContentListResponse, ContentRepository, type ContentResponse, type ContentSeo, type ContentSeoInput, type CreateCollectionInput, type CreateContentInput, type CreateFieldInput, type CreateMediaInput, type CreateMenuInput, type CreateMenuItemInput, type CreateSectionInput, type CreateStorageFn, type CreateTermInput, type CreateWidgetAreaInput, type CreateWidgetInput, type Database, type DatabaseConfig, type DatabaseDescriptor, type DatabaseDialectType, type DinewayCollections, DinewayDatabaseError, type DinewayRequestContext, DinewayStorageError, DinewayValidationError, type DownloadResult, type EditFieldMeta, type EditProxy, type EntryData, type EntryFilter, type EntryResult, type ExternalAuthConfig, FIELD_TYPE_TO_COLUMN, FTSManager, type FetchOptions, type Field, type FieldAnnotation, type FieldCompatibility, type FieldDefinition, type FieldDescriptor, type FieldType, type FieldUIHints, type FieldValidation, type FieldWidgetConfig, type FieldWidgetOptions, type FileInfo, type FileInput, type FilePreviewMiddlewareConfig, FileSessionDatabaseFactory, type FileSessionDatabaseFactoryOptions, type FileValue, type FindManyOptions, type FindManyResult, type GeneratePreviewTokenOptions, type GetCommentsOptions, type GetCommentsResult, type GetPreviewUrlOptions, type GetSectionsOptions, type HookConfig, type HookName, HookPipeline, type HookResult, type HttpAccess, type I18nConfig, type ImageValue, type ImportAnalysis, type ImportConfig, type ImportContext, type ImportFieldDef, type ImportResult, type ImportSource, type InferCollectionData, type KVAccess, type LibsqlConfig, type ListOptions, type ListResponse, type ListResult, type CollectionFilter$1 as LoaderCollectionFilter, type LocalStorageConfig, type LogAccess, type ManifestResponse, type MediaAccess, type MediaItem, type MediaListResponse, type MediaReference, MediaRepository, type MediaResponse, type MediaTable, type MediaUploadEvent, type MediaValue, type Menu, type MenuItem, type MenuItemType, type MigrationStatus, type ModerationDecision, NodeSandboxRunner, NoopSandboxRunner, type NormalizedItem, type OAuthInput, type PageFragmentContribution, type PageFragmentEvent, type PageFragmentHandler, type PageMetadataContribution, type PageMetadataEvent, type PageMetadataHandler, type PagePlacement, type PlaceholderData, type PluginAdminConfig, type PluginAdminExports, type PluginAdminPage, type PluginCapability, type PluginContext, type PluginDefinition, type PluginDescriptor, type PluginHooks, PluginManager, type PluginManifest, type PluginRoute, PluginRouteError, type PluginStorageConfig, type PortableTextBlock, type PortableTextBlockConfig, type PortableTextBlockField, type PortableTextCodeBlock, type PortableTextImageBlock, type PortableTextLinkMark, type PortableTextMarkDef, type PortableTextSpan, type PortableTextTextBlock, type PortableTextUnknownBlock, type PostTypeAnalysis, type PostTypeMapping, type PostgresConfig, type PreviewSidecarClient, type PreviewSidecarSignature, type PreviewTokenPayload, type PreviewToolbarConfig, type ProbeResult, type PropDef, type ProseMirrorDocument, type ProseMirrorMark, type ProseMirrorNode, type PublicPageContext, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, type ReorderMenuItemsInput, type ReorderWidgetsInput, type ResolvePathResult, type ResolvedHook, type ResolvedPlugin, type ResolvedPluginHooks, type RevisionListResponse, type RevisionResponse, type RouteContext, type S3StorageConfig, type SandboxEmailMessage, type SandboxEmailSendCallback, SandboxNotAvailableError, type SandboxOptions, type SandboxRunner, type SandboxRunnerFactory, type SandboxedPlugin, SchemaError, SchemaRegistry, type SearchConfig, type SearchOptions, type SearchResponse, type SearchResult, type SearchStats, type Section, type SectionSource, type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type SeoMeta, type SeoMetaOptions, type SeoSettings, type SerializedRequest, type SessionCleanupResult, type SessionDatabaseFactory, type SessionDatabaseHandle, type SessionDatabaseInfo, SessionDatabaseLimitError, type SessionOpenOptions, type SessionOpenOrCreateOptions, type SignedUploadOptions, type SignedUploadUrl, type SiteSettingKey, type SiteSettings, type Snapshot, type SourceAuth, type SourceCapabilities, type SourceInput, type SourceProbeResult, type SqliteConfig, type StandardHookEntry, type StandardHookHandler, type StandardPluginDefinition, type StandardRouteEntry, type StandardRouteHandler, type Storage, type StorageCollection, type StorageDescriptor, type StoredComment, type SuggestOptions, type SuggestedAction, type Suggestion, type TaxonomyDef, type TaxonomyTerm, type TaxonomyTermRow, type TranslationSummary, type TranslationsResult, type UpdateCollectionInput, type UpdateContentInput, type UpdateFieldInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdateSectionInput, type UpdateTermInput, type UpdateWidgetInput, type UploadResult, type UrlInput, type UserTable, type ValidatedPluginManifest, type ValidationResult, type VerifyPreviewTokenOptions, type VerifyPreviewTokenResult, type Widget, type WidgetArea, type WidgetComponentDef, type WidgetType, type WxrAttachment, type WxrAuthor, type WxrCategory, type WxrData, type WxrPost, type WxrSite, type WxrTag, adaptSandboxEntry, applySeed, applySnapshotToDatabase, buildPreviewSignatureHeader, buildPreviewUrl, clearSources, computeContentHash, createEditable, createFilePreviewMiddleware, createHookPipeline, createNodeSandboxRunner, createNoop, createNoopSandboxRunner, createPluginManager, defaultPreviewSidecarClient, definePlugin, dropSessionDatabaseTables, extractPlainText, extractSearchableFields, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAppliedSnapshotMeta, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getDinewayCollection, getDinewayEntry, getEditMeta, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, isBlockedInPreview, isI18nEnabled, isPreviewRequest, isSafeHref, isStandardPluginDefinition, normalizeMediaValue, parseContentId, parsePreviewSignatureHeader, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, renderPreviewLoadingPage, renderPreviewToolbar, resolveDinewayPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, signPreviewUrl, ulid, validateSeed, verifyPreviewSignature, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
16
|
+
export { type AfterCallback, type ApiContext, type AppliedSnapshotMeta, type ApplySnapshotToDatabaseOptions, type AttachmentInfo, type AuthDescriptor, type AuthProviderModule, type AuthResult, type BreadcrumbItem, type BylineSummary, type CMSAnnotation, type CacheHint, type Collection, type CollectionCommentSettings, type CollectionFilter, type CollectionResult, type CollectionSchemaStatus, type CollectionSearchOptions, type CollectionSource, type CollectionSupport, type CollectionWithFields, type ColumnType, type CommentAfterCreateEvent, type CommentAfterCreateHandler, type CommentAfterModerateEvent, type CommentAfterModerateHandler, type CommentBeforeCreateEvent, type CommentBeforeCreateHandler, type CommentModerateEvent, type CommentModerateHandler, type ContentAccess, type ContentBylineCredit, type ContentDeleteEvent, type ContentEntry, type ContentHookEvent, type ContentItem, type ContentListResponse, type ContentPublishStateChangeEvent, ContentRepository, type ContentResponse, type ContentSeo, type ContentSeoInput, type CreateCollectionInput, type CreateContentInput, type CreateFieldInput, type CreateMediaInput, type CreateMenuInput, type CreateMenuItemInput, type CreateSectionInput, type CreateStorageFn, type CreateTermInput, type CreateWidgetAreaInput, type CreateWidgetInput, type Database, type DatabaseConfig, type DatabaseDescriptor, type DatabaseDialectType, type DinewayCollections, DinewayDatabaseError, type DinewayRequestContext, DinewayStorageError, DinewayValidationError, type DownloadResult, type EditFieldMeta, type EditProxy, type EntryData, type EntryFilter, type EntryResult, type ExternalAuthConfig, FIELD_TYPE_TO_COLUMN, FTSManager, type FetchOptions, type Field, type FieldAnnotation, type FieldCompatibility, type FieldDefinition, type FieldDescriptor, type FieldType, type FieldUIHints, type FieldValidation, type FieldWidgetConfig, type FieldWidgetOptions, type FileInfo, type FileInput, type FilePreviewMiddlewareConfig, FileSessionDatabaseFactory, type FileSessionDatabaseFactoryOptions, type FileValue, type FindManyOptions, type FindManyResult, type GeneratePreviewTokenOptions, type GetCommentsOptions, type GetCommentsResult, type GetPreviewUrlOptions, type GetSectionsOptions, type HookConfig, type HookName, HookPipeline, type HookResult, type HttpAccess, type I18nConfig, type ImageValue, type ImportAnalysis, type ImportConfig, type ImportContext, type ImportFieldDef, type ImportResult, type ImportSource, type InferCollectionData, type KVAccess, type LibsqlConfig, type ListOptions, type ListResponse, type ListResult, type CollectionFilter$1 as LoaderCollectionFilter, type LocalStorageConfig, type LogAccess, type ManifestResponse, type MediaAccess, type MediaItem, type MediaListResponse, type MediaReference, MediaRepository, type MediaResponse, type MediaTable, type MediaUploadEvent, type MediaValue, type Menu, type MenuItem, type MenuItemType, type MigrationStatus, type ModerationDecision, NodeSandboxRunner, NoopSandboxRunner, type NormalizedItem, type OAuthInput, type PageFragmentContribution, type PageFragmentEvent, type PageFragmentHandler, type PageMetadataContribution, type PageMetadataEvent, type PageMetadataHandler, type PagePlacement, type PlaceholderData, type PluginAdminConfig, type PluginAdminExports, type PluginAdminPage, type PluginCapability, type PluginContext, type PluginDefinition, type PluginDescriptor, type PluginHooks, PluginManager, type PluginManifest, type PluginRoute, PluginRouteError, type PluginStorageConfig, type PortableTextBlock, type PortableTextBlockConfig, type PortableTextBlockField, type PortableTextCodeBlock, type PortableTextImageBlock, type PortableTextLinkMark, type PortableTextMarkDef, type PortableTextSpan, type PortableTextTextBlock, type PortableTextUnknownBlock, type PostTypeAnalysis, type PostTypeMapping, type PostgresConfig, type PreviewSidecarClient, type PreviewSidecarSignature, type PreviewTokenPayload, type PreviewToolbarConfig, type ProbeResult, type PropDef, type ProseMirrorDocument, type ProseMirrorMark, type ProseMirrorNode, type PublicPageContext, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, type ReorderMenuItemsInput, type ReorderWidgetsInput, type ResolvePathResult, type ResolvedHook, type ResolvedPlugin, type ResolvedPluginHooks, type RevisionListResponse, type RevisionResponse, type RouteContext, type S3StorageConfig, type SandboxEmailMessage, type SandboxEmailSendCallback, SandboxNotAvailableError, type SandboxOptions, type SandboxRunner, type SandboxRunnerFactory, type SandboxedPlugin, SchemaError, SchemaRegistry, type SearchConfig, type SearchOptions, type SearchResponse, type SearchResult, type SearchStats, type Section, type SectionSource, type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type SeoMeta, type SeoMetaOptions, type SeoSettings, type SerializedRequest, type SessionCleanupResult, type SessionDatabaseFactory, type SessionDatabaseHandle, type SessionDatabaseInfo, SessionDatabaseLimitError, type SessionOpenOptions, type SessionOpenOrCreateOptions, type SignedUploadOptions, type SignedUploadUrl, type SiteSettingKey, type SiteSettings, type Snapshot, type SourceAuth, type SourceCapabilities, type SourceInput, type SourceProbeResult, type SqliteConfig, type StandardHookEntry, type StandardHookHandler, type StandardPluginDefinition, type StandardRouteEntry, type StandardRouteHandler, type Storage, type StorageCollection, type StorageDescriptor, type StoredComment, type SuggestOptions, type SuggestedAction, type Suggestion, type TaxonomyDef, type TaxonomyTerm, type TaxonomyTermRow, type TranslationSummary, type TranslationsResult, type UpdateCollectionInput, type UpdateContentInput, type UpdateFieldInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdateSectionInput, type UpdateTermInput, type UpdateWidgetInput, type UploadResult, type UrlInput, type UserTable, type ValidatedPluginManifest, type ValidationResult, type VerifyPreviewTokenOptions, type VerifyPreviewTokenResult, type Widget, type WidgetArea, type WidgetComponentDef, type WidgetType, type WxrAttachment, type WxrAuthor, type WxrCategory, type WxrData, type WxrPost, type WxrSite, type WxrTag, adaptSandboxEntry, after, applySeed, applySnapshotToDatabase, buildPreviewSignatureHeader, buildPreviewUrl, clearSources, computeContentHash, createEditable, createFilePreviewMiddleware, createHookPipeline, createNodeSandboxRunner, createNoop, createNoopSandboxRunner, createPluginManager, decodeSlug, defaultPreviewSidecarClient, definePlugin, dropSessionDatabaseTables, extractPlainText, extractSearchableFields, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAppliedSnapshotMeta, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getDinewayCollection, getDinewayEntry, getEditMeta, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, isBlockedInPreview, isI18nEnabled, isPreviewRequest, isSafeHref, isStandardPluginDefinition, normalizeMediaValue, parseContentId, parsePreviewSignatureHeader, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, renderPreviewLoadingPage, renderPreviewToolbar, resolveDinewayPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, signPreviewUrl, ulid, validateSeed, verifyPreviewSignature, verifyPreviewToken, wordpressRestSource, wxrSource };
|
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
import { getRequestContext, runWithContext } from "./request-context.mjs";
|
|
2
|
+
import { t as DinewayDatabaseError } from "./connection-BCNICDWN.mjs";
|
|
3
|
+
import "./dialect-helpers-DhTzaUxP.mjs";
|
|
4
|
+
import { t as getMigrationStatus } from "./runner-DWZm2KQm.mjs";
|
|
5
|
+
import { $ as createFilePreviewMiddleware, A as isStandardPluginDefinition, At as generateManifest, Bt as handleContentDuplicate, C as getAllSources, Ct as handleMediaDelete, D as probeUrl, Dt as handleRevisionGet, E as getUrlSources, Et as handleMediaUpdate, F as createNoopSandboxRunner, Ft as handleContentCountScheduled, Gt as handleContentPermanentDelete, Ht as handleContentGetIncludingTrashed, I as PluginManager, It as handleContentCountTrashed, Jt as handleContentSchedule, Kt as handleContentPublish, L as createPluginManager, Lt as handleContentCreate, M as createNodeSandboxRunner, Mt as hashString, N as NoopSandboxRunner, O as registerSource, Ot as handleRevisionList, P as SandboxNotAvailableError, Pt as handleContentCompare, Q as parseWxrString, Qt as handleContentUpdate, R as PluginRouteError, Rt as handleContentDelete, S as clearSources, St as handleMediaCreate, T as getSource, Tt as handleMediaList, U as HookPipeline, Ut as handleContentList, Vt as handleContentGet, W as createHookPipeline, Wt as handleContentListTrashed, X as definePlugin, Xt as handleContentUnpublish, Yt as handleContentTranslations, Z as parseWxr, Zt as handleContentUnschedule, _ as buildPreviewUrl, _t as sanitizeHref, a as search, at as SessionDatabaseLimitError, b as parseWxrDate, bt as getSections, c as getWidgetArea, ct as buildPreviewSignatureHeader, d as getMenu, dt as signPreviewUrl, en as portableText, et as renderPreviewToolbar, f as getMenus, ft as verifyPreviewSignature, g as isPreviewRequest, gt as isSafeHref, h as getPreviewToken, ht as prosemirrorToPortableText, i as getSuggestions, it as FileSessionDatabaseFactory, j as NodeSandboxRunner, jt as computeContentHash, k as importReusableBlocksAsSections, kt as handleRevisionRestore, l as getWidgetAreas, lt as defaultPreviewSidecarClient, m as getComments, mt as portableTextToProsemirror, n as extractSearchableFields, nn as image, nt as dropSessionDatabaseTables, o as searchCollection, ot as isBlockedInPreview, p as getCommentCount, pt as after, qt as handleContentRestore, r as getSearchStats, rt as getAppliedSnapshotMeta, s as searchWithDb, st as renderPreviewLoadingPage, t as extractPlainText, tn as reference, tt as applySnapshotToDatabase, u as getWidgetComponents, ut as parsePreviewSignatureHeader, v as getPreviewUrl, w as getFileSources, wt as handleMediaGet, x as wxrSource, xt as getCollectionInfo, y as wordpressRestSource, yt as getSection, zt as handleContentDiscardDraft } from "./search-BApX1xhM.mjs";
|
|
6
|
+
import { i as decodeSlug, t as ContentRepository } from "./content-DWi4d0rT.mjs";
|
|
6
7
|
import "./base64-F8-DUraK.mjs";
|
|
7
8
|
import { t as DinewayValidationError } from "./types-BawVha09.mjs";
|
|
8
9
|
import { t as MediaRepository } from "./media-DMTr80Gv.mjs";
|
|
9
|
-
import { c as
|
|
10
|
-
import
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import { n as
|
|
14
|
-
import {
|
|
15
|
-
import { i as RESERVED_FIELD_SLUGS, n as FIELD_TYPE_TO_COLUMN, r as RESERVED_COLLECTION_SLUGS } from "./types-
|
|
16
|
-
import
|
|
17
|
-
import "./
|
|
18
|
-
import { i as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
10
|
+
import { c as getPluginSetting, d as getSiteSettings, f as setSiteSettings, l as getPluginSettings, t as applySeed, u as getSiteSetting } from "./apply-iVSqz2qs.mjs";
|
|
11
|
+
import "./redirect-DnEWAkVg.mjs";
|
|
12
|
+
import "./byline-OhH2dlRu.mjs";
|
|
13
|
+
import { n as normalizeMediaValue, t as generatePlaceholder } from "./placeholder-Cp8g5Emj.mjs";
|
|
14
|
+
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-BXwuX8Bx.mjs";
|
|
15
|
+
import { i as FTSManager, n as SchemaRegistry, t as SchemaError } from "./registry-C0zjeB9P.mjs";
|
|
16
|
+
import { i as RESERVED_FIELD_SLUGS, n as FIELD_TYPE_TO_COLUMN, r as RESERVED_COLLECTION_SLUGS } from "./types-COeOq9nK.mjs";
|
|
17
|
+
import "./loader-sMG4TZ-u.mjs";
|
|
18
|
+
import "./request-cache-Dk5qPSOx.mjs";
|
|
19
|
+
import { a as getTaxonomyTerms, i as getTaxonomyDefs, n as getEntryTerms, o as getTerm, r as getTaxonomyDef, s as getTermsForEntries, t as getEntriesByTerm } from "./taxonomies-1s5PaS_8.mjs";
|
|
20
|
+
import { i as pluginManifestSchema } from "./manifest-schema-D1MSVnoI.mjs";
|
|
21
|
+
import { t as DinewayStorageError } from "./types-griIBQOQ.mjs";
|
|
22
|
+
import { c as createEditable, i as getTranslations, l as createNoop, n as getDinewayEntry, r as getEditMeta, s as resolveDinewayPath, t as getDinewayCollection } from "./query-kDmwCsHh.mjs";
|
|
21
23
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
22
|
-
import { n as parseContentId, r as verifyPreviewToken, t as generatePreviewToken } from "./tokens-
|
|
24
|
+
import { n as parseContentId, r as verifyPreviewToken, t as generatePreviewToken } from "./tokens-CJz9ubV6.mjs";
|
|
23
25
|
import { getContentSeo, getSeoMeta } from "./seo/index.mjs";
|
|
24
|
-
import { n as getByline, r as getBylineBySlug } from "./bylines-
|
|
25
|
-
import { t as validateSeed } from "./validate-
|
|
26
|
-
import "./load-
|
|
26
|
+
import { n as getByline, r as getBylineBySlug } from "./bylines-BGpD9_hy.mjs";
|
|
27
|
+
import { t as validateSeed } from "./validate-BZ5wnLLp.mjs";
|
|
28
|
+
import "./load-Coc9HpHH.mjs";
|
|
27
29
|
import "./seed/index.mjs";
|
|
28
30
|
import { ulid } from "ulidx";
|
|
29
31
|
|
|
30
|
-
export { ContentRepository, DinewayDatabaseError, DinewayStorageError, DinewayValidationError, FIELD_TYPE_TO_COLUMN, FTSManager, FileSessionDatabaseFactory, HookPipeline, MediaRepository, NodeSandboxRunner, NoopSandboxRunner, PluginManager, PluginRouteError, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, SandboxNotAvailableError, SchemaError, SchemaRegistry, SessionDatabaseLimitError, adaptSandboxEntry, applySeed, applySnapshotToDatabase, buildPreviewSignatureHeader, buildPreviewUrl, clearSources, computeContentHash, createEditable, createFilePreviewMiddleware, createHookPipeline, createNodeSandboxRunner, createNoop, createNoopSandboxRunner, createPluginManager, defaultPreviewSidecarClient, definePlugin, dropSessionDatabaseTables, extractPlainText, extractSearchableFields, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAppliedSnapshotMeta, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getDinewayCollection, getDinewayEntry, getEditMeta, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, isBlockedInPreview, isI18nEnabled, isPreviewRequest, isSafeHref, isStandardPluginDefinition, normalizeMediaValue, parseContentId, parsePreviewSignatureHeader, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, renderPreviewLoadingPage, renderPreviewToolbar, resolveDinewayPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, signPreviewUrl, ulid, validateSeed, verifyPreviewSignature, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
32
|
+
export { ContentRepository, DinewayDatabaseError, DinewayStorageError, DinewayValidationError, FIELD_TYPE_TO_COLUMN, FTSManager, FileSessionDatabaseFactory, HookPipeline, MediaRepository, NodeSandboxRunner, NoopSandboxRunner, PluginManager, PluginRouteError, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, SandboxNotAvailableError, SchemaError, SchemaRegistry, SessionDatabaseLimitError, adaptSandboxEntry, after, applySeed, applySnapshotToDatabase, buildPreviewSignatureHeader, buildPreviewUrl, clearSources, computeContentHash, createEditable, createFilePreviewMiddleware, createHookPipeline, createNodeSandboxRunner, createNoop, createNoopSandboxRunner, createPluginManager, decodeSlug, defaultPreviewSidecarClient, definePlugin, dropSessionDatabaseTables, extractPlainText, extractSearchableFields, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAppliedSnapshotMeta, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getDinewayCollection, getDinewayEntry, getEditMeta, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, isBlockedInPreview, isI18nEnabled, isPreviewRequest, isSafeHref, isStandardPluginDefinition, normalizeMediaValue, parseContentId, parsePreviewSignatureHeader, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, renderPreviewLoadingPage, renderPreviewToolbar, resolveDinewayPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, signPreviewUrl, ulid, validateSeed, verifyPreviewSignature, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
|
|
2
|
-
import { i as isPostgres, r as currentTimestampValue } from "./dialect-helpers-B9uSp2GJ.mjs";
|
|
3
|
-
import { n as decodeCursor, r as encodeCursor } from "./types-BawVha09.mjs";
|
|
4
2
|
import { getRequestContext } from "./request-context.mjs";
|
|
3
|
+
import { kyselyLogOption } from "./database/instrumentation.mjs";
|
|
4
|
+
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
5
|
+
import { i as isPostgres, r as currentTimestampValue } from "./dialect-helpers-DhTzaUxP.mjs";
|
|
6
|
+
import { n as decodeCursor, r as encodeCursor } from "./types-BawVha09.mjs";
|
|
5
7
|
import { Kysely, sql } from "kysely";
|
|
6
8
|
|
|
7
9
|
//#region src/loader.ts
|
|
@@ -37,6 +39,7 @@ const SYSTEM_COLUMNS = new Set([
|
|
|
37
39
|
* Get the table name for a collection type
|
|
38
40
|
*/
|
|
39
41
|
function getTableName(type) {
|
|
42
|
+
validateIdentifier(type, "collection type");
|
|
40
43
|
return `ec_${type}`;
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
@@ -219,7 +222,10 @@ async function getDb() {
|
|
|
219
222
|
if (!dbInstance) {
|
|
220
223
|
await loadVirtualModules();
|
|
221
224
|
if (!virtualConfig?.database || typeof virtualCreateDialect !== "function") throw new Error("Dineway database not configured. Add database config to dineway() in astro.config.mjs");
|
|
222
|
-
dbInstance = new Kysely({
|
|
225
|
+
dbInstance = new Kysely({
|
|
226
|
+
dialect: virtualCreateDialect(virtualConfig.database.config),
|
|
227
|
+
log: kyselyLogOption()
|
|
228
|
+
});
|
|
223
229
|
}
|
|
224
230
|
return dbInstance;
|
|
225
231
|
}
|
package/dist/media/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as MediaValue, a as ComponentEmbed, b as mediaItemToValue, c as EmbedResult, d as MediaListResult, f as MediaProvider, g as MediaUploadInput, h as MediaProviderItem, i as AudioEmbed, l as ImageEmbed, m as MediaProviderDescriptor, n as generatePlaceholder, o as CreateMediaProviderFn, p as MediaProviderCapabilities, r as normalizeMediaValue, s as EmbedOptions, t as PlaceholderData, u as MediaListOptions, v as ThumbnailOptions, y as VideoEmbed } from "../placeholder
|
|
1
|
+
import { _ as MediaValue, a as ComponentEmbed, b as mediaItemToValue, c as EmbedResult, d as MediaListResult, f as MediaProvider, g as MediaUploadInput, h as MediaProviderItem, i as AudioEmbed, l as ImageEmbed, m as MediaProviderDescriptor, n as generatePlaceholder, o as CreateMediaProviderFn, p as MediaProviderCapabilities, r as normalizeMediaValue, s as EmbedOptions, t as PlaceholderData, u as MediaListOptions, v as ThumbnailOptions, y as VideoEmbed } from "../placeholder--wOi4TbO.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/media/local.d.ts
|
|
4
4
|
interface LocalMediaConfig {
|
package/dist/media/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as MediaProviderItem, o as CreateMediaProviderFn } from "../placeholder
|
|
2
|
-
import { t as Database } from "../types-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../runner-
|
|
5
|
-
import "../types-
|
|
6
|
-
import "../
|
|
7
|
-
import
|
|
1
|
+
import { h as MediaProviderItem, o as CreateMediaProviderFn } from "../placeholder--wOi4TbO.mjs";
|
|
2
|
+
import { t as Database } from "../types-DOrVigru.mjs";
|
|
3
|
+
import "../index-yvc6E_17.mjs";
|
|
4
|
+
import "../runner-CFI6B6J2.mjs";
|
|
5
|
+
import "../types-Cj0KMIZV.mjs";
|
|
6
|
+
import { d as Storage } from "../types-CWbdtiux.mjs";
|
|
7
|
+
import "../validate-IPf8n4Fj.mjs";
|
|
8
8
|
import "../index.mjs";
|
|
9
9
|
import { Kysely } from "kysely";
|
|
10
10
|
|