emdash 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapters-DoNJiveC.d.mts → adapters-BktHA7EO.d.mts} +1 -1
- package/dist/{adapters-DoNJiveC.d.mts.map → adapters-BktHA7EO.d.mts.map} +1 -1
- package/dist/{apply-BzltprvY.mjs → apply-UsrFuO7l.mjs} +156 -254
- package/dist/apply-UsrFuO7l.mjs.map +1 -0
- package/dist/astro/index.d.mts +6 -6
- package/dist/astro/index.mjs +10 -2
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +5 -5
- package/dist/astro/middleware/auth.mjs +5 -5
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +35 -34
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/types.d.mts +8 -9
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/{base64-BRICGH2l.mjs → base64-MBPo9ozB.mjs} +1 -1
- package/dist/{base64-BRICGH2l.mjs.map → base64-MBPo9ozB.mjs.map} +1 -1
- package/dist/{byline-BSaNL1w7.mjs → byline-C3vnhIpU.mjs} +4 -4
- package/dist/{byline-BSaNL1w7.mjs.map → byline-C3vnhIpU.mjs.map} +1 -1
- package/dist/{bylines-CvJ3PYz2.mjs → bylines-esI7ioa9.mjs} +5 -5
- package/dist/{bylines-CvJ3PYz2.mjs.map → bylines-esI7ioa9.mjs.map} +1 -1
- package/dist/{cache-C6N_hhN7.mjs → cache-fTzxgMFJ.mjs} +3 -3
- package/dist/{cache-C6N_hhN7.mjs.map → cache-fTzxgMFJ.mjs.map} +1 -1
- package/dist/{chunks-NBQVDOci.mjs → chunks-Da2-b-oA.mjs} +2 -2
- package/dist/{chunks-NBQVDOci.mjs.map → chunks-Da2-b-oA.mjs.map} +1 -1
- package/dist/cli/index.mjs +251 -79
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/{config-BI0V3ICQ.mjs → config-CVssduLe.mjs} +1 -1
- package/dist/{config-BI0V3ICQ.mjs.map → config-CVssduLe.mjs.map} +1 -1
- package/dist/{content-8lOYF0pr.mjs → content-C7G4QXkK.mjs} +14 -3
- package/dist/content-C7G4QXkK.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-WRezodiz.mjs → db-errors-B7P2pSCn.mjs} +1 -1
- package/dist/{db-errors-WRezodiz.mjs.map → db-errors-B7P2pSCn.mjs.map} +1 -1
- package/dist/{default-D8ksjWhO.mjs → default-pHuz9WF6.mjs} +1 -1
- package/dist/{default-D8ksjWhO.mjs.map → default-pHuz9WF6.mjs.map} +1 -1
- package/dist/{error-D_-tqP-I.mjs → error-DqnRMM5z.mjs} +1 -1
- package/dist/{error-D_-tqP-I.mjs.map → error-DqnRMM5z.mjs.map} +1 -1
- package/dist/{index-BFRaVcD6.d.mts → index-DjPMOfO0.d.mts} +82 -67
- package/dist/index-DjPMOfO0.d.mts.map +1 -0
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +28 -27
- package/dist/{load-DDqMMvZL.mjs → load-sXRuM7Us.mjs} +2 -2
- package/dist/{load-DDqMMvZL.mjs.map → load-sXRuM7Us.mjs.map} +1 -1
- package/dist/{loader-CKLbBnhK.mjs → loader-Bx2_9-5e.mjs} +31 -6
- package/dist/loader-Bx2_9-5e.mjs.map +1 -0
- package/dist/{manifest-schema-DqWNC3lM.mjs → manifest-schema-CXAbd1vH.mjs} +1 -1
- package/dist/{manifest-schema-DqWNC3lM.mjs.map → manifest-schema-CXAbd1vH.mjs.map} +1 -1
- 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/media/local-runtime.mjs +3 -3
- package/dist/{media-BW32b4gi.mjs → media-D8FbNsl0.mjs} +2 -2
- package/dist/{media-BW32b4gi.mjs.map → media-D8FbNsl0.mjs.map} +1 -1
- package/dist/{mode-ier8jbBk.mjs → mode-YhqNVef_.mjs} +1 -1
- package/dist/{mode-ier8jbBk.mjs.map → mode-YhqNVef_.mjs.map} +1 -1
- package/dist/{options-BVp3UsTS.mjs → options-nPxWnrya.mjs} +1 -1
- package/dist/{options-BVp3UsTS.mjs.map → options-nPxWnrya.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{patterns-CrCYkMBb.mjs → patterns-DsUZ4uxI.mjs} +1 -1
- package/dist/{patterns-CrCYkMBb.mjs.map → patterns-DsUZ4uxI.mjs.map} +1 -1
- package/dist/{placeholder-BE4o_2dc.d.mts → placeholder-CDPtkelt.d.mts} +1 -1
- package/dist/{placeholder-BE4o_2dc.d.mts.map → placeholder-CDPtkelt.d.mts.map} +1 -1
- package/dist/{placeholder-CIJejMlK.mjs → placeholder-Ci0RLeCk.mjs} +1 -1
- package/dist/{placeholder-CIJejMlK.mjs.map → placeholder-Ci0RLeCk.mjs.map} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +5 -5
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{public-url-DByxYjUw.mjs → public-url-B1AxbbbQ.mjs} +1 -1
- package/dist/{public-url-DByxYjUw.mjs.map → public-url-B1AxbbbQ.mjs.map} +1 -1
- package/dist/{query-Cg9ZKRQ0.mjs → query-Bo-msrmu.mjs} +13 -13
- package/dist/{query-Cg9ZKRQ0.mjs.map → query-Bo-msrmu.mjs.map} +1 -1
- package/dist/{redirect-BhUBKRc1.mjs → redirect-C5H7VGIX.mjs} +3 -3
- package/dist/{redirect-BhUBKRc1.mjs.map → redirect-C5H7VGIX.mjs.map} +1 -1
- package/dist/{registry-Dw70ChxB.mjs → registry-Beb7wxFc.mjs} +5 -5
- package/dist/{registry-Dw70ChxB.mjs.map → registry-Beb7wxFc.mjs.map} +1 -1
- package/dist/{request-cache-B-bmkipQ.mjs → request-cache-C-tIpYIw.mjs} +1 -1
- package/dist/{request-cache-B-bmkipQ.mjs.map → request-cache-C-tIpYIw.mjs.map} +1 -1
- package/dist/{runner-Bnoj7vjK.d.mts → runner-Clwe4Mme.d.mts} +2 -2
- package/dist/{runner-Bnoj7vjK.d.mts.map → runner-Clwe4Mme.d.mts.map} +1 -1
- package/dist/{runner-C7ADox5q.mjs → runner-DMnlIkh4.mjs} +433 -138
- package/dist/runner-DMnlIkh4.mjs.map +1 -0
- package/dist/runtime.d.mts +6 -6
- package/dist/runtime.mjs +3 -3
- package/dist/{search-dOGEccMa.mjs → search-DkN-BqsS.mjs} +164 -92
- package/dist/search-DkN-BqsS.mjs.map +1 -0
- package/dist/{secrets-CW3reAnU.mjs → secrets-CZ8rxLX3.mjs} +3 -3
- package/dist/{secrets-CW3reAnU.mjs.map → secrets-CZ8rxLX3.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +15 -14
- 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 +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/taxonomies-CTtewrSQ.mjs +407 -0
- package/dist/taxonomies-CTtewrSQ.mjs.map +1 -0
- package/dist/taxonomy-DSxx2K2L.mjs +218 -0
- package/dist/taxonomy-DSxx2K2L.mjs.map +1 -0
- package/dist/{tokens-D7zMmWi2.mjs → tokens-CyRDPVW2.mjs} +2 -2
- package/dist/{tokens-D7zMmWi2.mjs.map → tokens-CyRDPVW2.mjs.map} +1 -1
- package/dist/{transaction-Cn2rjY78.mjs → transaction-D44LBXvU.mjs} +1 -1
- package/dist/{transaction-Cn2rjY78.mjs.map → transaction-D44LBXvU.mjs.map} +1 -1
- package/dist/{transport-DNEfeMaU.d.mts → transport-DX_5rpsq.d.mts} +1 -1
- package/dist/{transport-DNEfeMaU.d.mts.map → transport-DX_5rpsq.d.mts.map} +1 -1
- package/dist/{transport-BeMCmin1.mjs → transport-xpzIjCIB.mjs} +1 -1
- package/dist/{transport-BeMCmin1.mjs.map → transport-xpzIjCIB.mjs.map} +1 -1
- package/dist/{types-CRxNbK-Z.mjs → types-BIgulNsW.mjs} +2 -2
- package/dist/{types-CRxNbK-Z.mjs.map → types-BIgulNsW.mjs.map} +1 -1
- package/dist/{types-CJsYGpco.d.mts → types-B_CXXnzh.d.mts} +1 -1
- package/dist/{types-CJsYGpco.d.mts.map → types-B_CXXnzh.d.mts.map} +1 -1
- package/dist/{types-M78DQ1lx.d.mts → types-C-aFbqmA.d.mts} +1 -1
- package/dist/{types-M78DQ1lx.d.mts.map → types-C-aFbqmA.d.mts.map} +1 -1
- package/dist/{types-4fVtCIm0.mjs → types-CoO6mpV3.mjs} +1 -1
- package/dist/{types-4fVtCIm0.mjs.map → types-CoO6mpV3.mjs.map} +1 -1
- package/dist/{types-BuBIptGk.d.mts → types-D19uBYWn.d.mts} +149 -4
- package/dist/types-D19uBYWn.d.mts.map +1 -0
- package/dist/{types-BSyXeCFW.d.mts → types-Dl1fgFjn.d.mts} +1 -1
- package/dist/{types-BSyXeCFW.d.mts.map → types-Dl1fgFjn.d.mts.map} +1 -1
- package/dist/{types-CrtWgIvl.d.mts → types-Dtx1mSMX.d.mts} +9 -1
- package/dist/types-Dtx1mSMX.d.mts.map +1 -0
- package/dist/{types-CIOg5AR8.mjs → types-Eg829jj9.mjs} +1 -1
- package/dist/{types-CIOg5AR8.mjs.map → types-Eg829jj9.mjs.map} +1 -1
- package/dist/{types-CDbKp7ND.mjs → types-K-EkEQCI.mjs} +1 -1
- package/dist/{types-CDbKp7ND.mjs.map → types-K-EkEQCI.mjs.map} +1 -1
- package/dist/{validate-Baqf0slj.mjs → validate-CBIbxM3L.mjs} +14 -10
- package/dist/validate-CBIbxM3L.mjs.map +1 -0
- package/dist/{validate-BfQh_C_y.d.mts → validate-DHGwADqO.d.mts} +18 -5
- package/dist/validate-DHGwADqO.d.mts.map +1 -0
- package/dist/{validation-BfEI7tNe.mjs → validation-B1NYiEos.mjs} +5 -5
- package/dist/{validation-BfEI7tNe.mjs.map → validation-B1NYiEos.mjs.map} +1 -1
- package/dist/version-CMD42IRC.mjs +7 -0
- package/dist/{version-DoxrVdYf.mjs.map → version-CMD42IRC.mjs.map} +1 -1
- package/dist/{zod-generator-CC0xNe_K.mjs → zod-generator-BNJDQBSZ.mjs} +8 -3
- package/dist/zod-generator-BNJDQBSZ.mjs.map +1 -0
- package/package.json +6 -6
- package/src/api/handlers/content.ts +11 -0
- package/src/api/handlers/dashboard.ts +29 -36
- package/src/api/handlers/menus.ts +256 -75
- package/src/api/handlers/taxonomies.ts +273 -97
- package/src/api/schemas/common.ts +7 -0
- package/src/api/schemas/menus.ts +23 -0
- package/src/api/schemas/taxonomies.ts +39 -0
- package/src/astro/integration/routes.ts +10 -0
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +1 -1
- package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +196 -0
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +9 -177
- package/src/astro/routes/api/menus/[name]/items.ts +16 -6
- package/src/astro/routes/api/menus/[name]/reorder.ts +8 -3
- package/src/astro/routes/api/menus/[name]/translations.ts +82 -0
- package/src/astro/routes/api/menus/[name].ts +19 -10
- package/src/astro/routes/api/menus/index.ts +9 -6
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +89 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +22 -22
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +11 -14
- package/src/astro/routes/api/taxonomies/index.ts +9 -6
- package/src/cli/commands/export-seed.ts +82 -21
- package/src/cli/commands/plugin-init.ts +216 -90
- package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +477 -0
- package/src/database/migrations/runner.ts +2 -0
- package/src/database/repositories/content.ts +11 -0
- package/src/database/repositories/taxonomy.ts +193 -89
- package/src/database/types.ts +10 -2
- package/src/i18n/resolve.ts +37 -0
- package/src/loader.ts +49 -2
- package/src/mcp/server.ts +77 -18
- package/src/menus/index.ts +143 -124
- package/src/menus/types.ts +15 -1
- package/src/schema/zod-generator.ts +12 -2
- package/src/seed/apply.ts +140 -54
- package/src/seed/types.ts +14 -1
- package/src/seed/validate.ts +27 -13
- package/src/taxonomies/index.ts +230 -213
- package/src/taxonomies/types.ts +10 -0
- package/dist/apply-BzltprvY.mjs.map +0 -1
- package/dist/content-8lOYF0pr.mjs.map +0 -1
- package/dist/index-BFRaVcD6.d.mts.map +0 -1
- package/dist/loader-CKLbBnhK.mjs.map +0 -1
- package/dist/runner-C7ADox5q.mjs.map +0 -1
- package/dist/search-dOGEccMa.mjs.map +0 -1
- package/dist/taxonomies-ZlRtD6AG.mjs +0 -315
- package/dist/taxonomies-ZlRtD6AG.mjs.map +0 -1
- package/dist/types-BuBIptGk.d.mts.map +0 -1
- package/dist/types-CrtWgIvl.d.mts.map +0 -1
- package/dist/validate-Baqf0slj.mjs.map +0 -1
- package/dist/validate-BfQh_C_y.d.mts.map +0 -1
- package/dist/version-DoxrVdYf.mjs +0 -7
- package/dist/zod-generator-CC0xNe_K.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../types-
|
|
2
|
-
import "../../index-
|
|
3
|
-
import "../../runner-
|
|
4
|
-
import "../../types-
|
|
5
|
-
import "../../validate-
|
|
1
|
+
import "../../types-Dtx1mSMX.mjs";
|
|
2
|
+
import "../../index-DjPMOfO0.mjs";
|
|
3
|
+
import "../../runner-Clwe4Mme.mjs";
|
|
4
|
+
import "../../types-D19uBYWn.mjs";
|
|
5
|
+
import "../../validate-DHGwADqO.mjs";
|
|
6
6
|
import { EmDashHandlers } from "../types.mjs";
|
|
7
7
|
import { User } from "@emdash-cms/auth";
|
|
8
8
|
import * as astro from "astro";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../base64-
|
|
2
|
-
import "../../types-
|
|
3
|
-
import { t as apiError } from "../../error-
|
|
4
|
-
import { t as getPublicOrigin } from "../../public-url-
|
|
5
|
-
import { t as getAuthMode } from "../../mode-
|
|
1
|
+
import "../../base64-MBPo9ozB.mjs";
|
|
2
|
+
import "../../types-BIgulNsW.mjs";
|
|
3
|
+
import { t as apiError } from "../../error-DqnRMM5z.mjs";
|
|
4
|
+
import { t as getPublicOrigin } from "../../public-url-B1AxbbbQ.mjs";
|
|
5
|
+
import { t as getAuthMode } from "../../mode-YhqNVef_.mjs";
|
|
6
6
|
import { ulid } from "ulidx";
|
|
7
7
|
import { defineMiddleware } from "astro:middleware";
|
|
8
8
|
import virtualConfig from "virtual:emdash/config";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
|
-
import "../../base64-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import { t as RedirectRepository } from "../../redirect-
|
|
5
|
-
import { a as setCachedRedirects, i as matchCachedPatterns, n as getCachedRedirects } from "../../cache-
|
|
6
|
-
import { r as getDb } from "../../loader-
|
|
2
|
+
import "../../base64-MBPo9ozB.mjs";
|
|
3
|
+
import "../../types-BIgulNsW.mjs";
|
|
4
|
+
import { t as RedirectRepository } from "../../redirect-C5H7VGIX.mjs";
|
|
5
|
+
import { a as setCachedRedirects, i as matchCachedPatterns, n as getCachedRedirects } from "../../cache-fTzxgMFJ.mjs";
|
|
6
|
+
import { r as getDb } from "../../loader-Bx2_9-5e.mjs";
|
|
7
7
|
import { defineMiddleware } from "astro:middleware";
|
|
8
8
|
|
|
9
9
|
//#region src/astro/middleware/redirect.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getRequestContext, runWithContext } from "../../request-context.mjs";
|
|
2
|
-
import "../../base64-
|
|
3
|
-
import "../../options-
|
|
4
|
-
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-
|
|
5
|
-
import { i as resolveSecretsCached } from "../../secrets-
|
|
2
|
+
import "../../base64-MBPo9ozB.mjs";
|
|
3
|
+
import "../../options-nPxWnrya.mjs";
|
|
4
|
+
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-CyRDPVW2.mjs";
|
|
5
|
+
import { i as resolveSecretsCached } from "../../secrets-CZ8rxLX3.mjs";
|
|
6
6
|
import { defineMiddleware } from "astro:middleware";
|
|
7
7
|
|
|
8
8
|
//#region src/visual-editing/toolbar.ts
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { r as runMigrations } from "../runner-
|
|
1
|
+
import { r as runMigrations } from "../runner-DMnlIkh4.mjs";
|
|
2
2
|
import { getRequestContext, runWithContext } from "../request-context.mjs";
|
|
3
3
|
import { createRecorder, flushRecorder, isInstrumentationEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
4
4
|
import "../connection-2igzM-AT.mjs";
|
|
5
5
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
6
6
|
import { o as isSqlite } from "../dialect-helpers-BKCvISIQ.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { r as hashString } from "../zod-generator-
|
|
19
|
-
import { i as FTSManager, n as SchemaRegistry } from "../registry-
|
|
20
|
-
import { r as getDb } from "../loader-
|
|
21
|
-
import { n as requestCached } from "../request-cache-
|
|
22
|
-
import "../
|
|
23
|
-
import
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
7
|
+
import { i as setI18nConfig } from "../config-CVssduLe.mjs";
|
|
8
|
+
import { At as handleContentTranslations, Ct as handleContentGetIncludingTrashed, Dt as handleContentPublish, Et as handleContentPermanentDelete, G as sanitizeHeadersForSandbox, H as resolveExclusiveHooks, I as PluginRouteRegistry, K as getTrustedProxyHeaders, L as DEV_CONSOLE_EMAIL_PLUGIN_ID, Mt as handleContentUnschedule, Nt as handleContentUpdate, Ot as handleContentRestore, Pt as validateRev, R as devConsoleEmailDeliver, St as handleContentGet, Tt as handleContentListTrashed, U as CronExecutor, V as createHookPipeline, W as extractRequestMeta, X as after, _t as handleContentCountTrashed, bt as handleContentDiscardDraft, ct as handleMediaGet, dt as handleRevisionGet, ft as handleRevisionList, gt as handleContentCountScheduled, ht as handleContentCompare, it as PluginStateRepository, jt as handleContentUnpublish, kt as handleContentSchedule, lt as handleMediaList, ot as handleMediaCreate, pt as handleRevisionRestore, q as definePlugin, st as handleMediaDelete, tt as loadBundleFromR2, ut as handleMediaUpdate, vt as handleContentCreate, wt as handleContentList, xt as handleContentDuplicate, yt as handleContentDelete, z as EmailPipeline } from "../search-DkN-BqsS.mjs";
|
|
9
|
+
import { r as RevisionRepository } from "../content-C7G4QXkK.mjs";
|
|
10
|
+
import "../base64-MBPo9ozB.mjs";
|
|
11
|
+
import "../types-BIgulNsW.mjs";
|
|
12
|
+
import { t as MediaRepository } from "../media-D8FbNsl0.mjs";
|
|
13
|
+
import "../taxonomy-DSxx2K2L.mjs";
|
|
14
|
+
import { t as OptionsRepository } from "../options-nPxWnrya.mjs";
|
|
15
|
+
import "../redirect-C5H7VGIX.mjs";
|
|
16
|
+
import "../byline-C3vnhIpU.mjs";
|
|
17
|
+
import { n as normalizeMediaValue } from "../placeholder-Ci0RLeCk.mjs";
|
|
18
|
+
import { r as hashString } from "../zod-generator-BNJDQBSZ.mjs";
|
|
19
|
+
import { i as FTSManager, n as SchemaRegistry } from "../registry-Beb7wxFc.mjs";
|
|
20
|
+
import { r as getDb } from "../loader-Bx2_9-5e.mjs";
|
|
21
|
+
import { n as requestCached } from "../request-cache-C-tIpYIw.mjs";
|
|
22
|
+
import "../apply-UsrFuO7l.mjs";
|
|
23
|
+
import "../taxonomies-CTtewrSQ.mjs";
|
|
24
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-CXAbd1vH.mjs";
|
|
25
|
+
import "../types-CoO6mpV3.mjs";
|
|
26
|
+
import "../error-DqnRMM5z.mjs";
|
|
27
|
+
import { a as invalidateUrlPatternCache } from "../query-Bo-msrmu.mjs";
|
|
28
|
+
import "../tokens-CyRDPVW2.mjs";
|
|
29
|
+
import "../bylines-esI7ioa9.mjs";
|
|
30
|
+
import "../load-sXRuM7Us.mjs";
|
|
30
31
|
import "../index.mjs";
|
|
31
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
32
|
-
import { t as getAuthMode } from "../mode-
|
|
33
|
-
import { a as validateEncryptionKeyAtStartup } from "../secrets-
|
|
32
|
+
import { n as VERSION, t as COMMIT } from "../version-CMD42IRC.mjs";
|
|
33
|
+
import { t as getAuthMode } from "../mode-YhqNVef_.mjs";
|
|
34
|
+
import { a as validateEncryptionKeyAtStartup } from "../secrets-CZ8rxLX3.mjs";
|
|
34
35
|
import { Kysely, sql } from "kysely";
|
|
35
36
|
import { defineMiddleware } from "astro:middleware";
|
|
36
37
|
import virtualConfig from "virtual:emdash/config";
|
|
@@ -800,9 +801,9 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
800
801
|
}
|
|
801
802
|
})();
|
|
802
803
|
if (collectionCount.count === 0 && !setupDone) {
|
|
803
|
-
const { applySeed } = await import("../apply-
|
|
804
|
-
const { loadSeed } = await import("../load-
|
|
805
|
-
const { validateSeed } = await import("../validate-
|
|
804
|
+
const { applySeed } = await import("../apply-UsrFuO7l.mjs").then((n) => n.n);
|
|
805
|
+
const { loadSeed } = await import("../load-sXRuM7Us.mjs").then((n) => n.r);
|
|
806
|
+
const { validateSeed } = await import("../validate-CBIbxM3L.mjs").then((n) => n.n);
|
|
806
807
|
const seed = await loadSeed();
|
|
807
808
|
if (validateSeed(seed).valid) {
|
|
808
809
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1187,7 +1188,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1187
1188
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
|
|
1188
1189
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
|
|
1189
1190
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1190
|
-
const { validateContentData } = await import("../validation-
|
|
1191
|
+
const { validateContentData } = await import("../validation-B1NYiEos.mjs");
|
|
1191
1192
|
const validation = await validateContentData(this.db, collection, processedData, { partial: false });
|
|
1192
1193
|
if (!validation.ok) return {
|
|
1193
1194
|
success: false,
|
|
@@ -1203,7 +1204,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1203
1204
|
return result;
|
|
1204
1205
|
}
|
|
1205
1206
|
async handleContentUpdate(collection, id, body) {
|
|
1206
|
-
const { ContentRepository } = await import("../content-
|
|
1207
|
+
const { ContentRepository } = await import("../content-C7G4QXkK.mjs").then((n) => n.n);
|
|
1207
1208
|
const repo = new ContentRepository(this.db);
|
|
1208
1209
|
const resolvedItem = await repo.findByIdOrSlug(collection, id);
|
|
1209
1210
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -1230,7 +1231,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1230
1231
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(bodyWithoutRev.data, collection, false)).content;
|
|
1231
1232
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
|
|
1232
1233
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1233
|
-
const { validateContentData } = await import("../validation-
|
|
1234
|
+
const { validateContentData } = await import("../validation-B1NYiEos.mjs");
|
|
1234
1235
|
const validation = await validateContentData(this.db, collection, processedData, { partial: true });
|
|
1235
1236
|
if (!validation.ok) return {
|
|
1236
1237
|
success: false,
|
|
@@ -1907,7 +1908,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1907
1908
|
if (!setupVerified) {
|
|
1908
1909
|
const t0 = performance.now();
|
|
1909
1910
|
try {
|
|
1910
|
-
const { getDb } = await import("../loader-
|
|
1911
|
+
const { getDb } = await import("../loader-Bx2_9-5e.mjs").then((n) => n.i);
|
|
1911
1912
|
await (await getDb()).selectFrom("_emdash_migrations").selectAll().limit(1).execute();
|
|
1912
1913
|
setupVerified = true;
|
|
1913
1914
|
} catch {
|