dineway 0.1.27 → 0.1.28
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/api/route-utils.d.mts +2 -2
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/{api-DHgai7zP.mjs → api-B1tPdBKN.mjs} +1 -1
- package/dist/astro/index.d.mts +2 -2
- package/dist/astro/index.mjs +1 -1
- package/dist/astro/middleware/auth.d.mts +2 -2
- package/dist/astro/middleware.mjs +2 -2
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +1 -1
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +1 -1
- package/dist/astro/routes/api/admin/comments/bulk.mjs +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +1 -1
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +1 -1
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +2 -2
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +2 -2
- package/dist/astro/routes/api/admin/context/diff.mjs +1 -1
- package/dist/astro/routes/api/admin/context/index.mjs +2 -2
- package/dist/astro/routes/api/admin/context/stale.mjs +1 -1
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +1 -1
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +1 -1
- package/dist/astro/routes/api/auth/setup-token/index.mjs +4 -4
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +1 -1
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/manifest.mjs +1 -1
- package/dist/astro/routes/api/mcp.mjs +1 -1
- package/dist/astro/routes/api/openapi.json.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/types.d.mts +2 -2
- package/dist/{bylines-Cb7nzI9t.d.mts → bylines-Cf_VHc-Y.d.mts} +18 -18
- package/dist/cli/index.mjs +167 -58
- package/dist/client/index.d.mts +7 -1
- package/dist/client/index.mjs +4 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +2 -2
- package/dist/plugins/adapt-sandbox-entry.d.mts +2 -2
- package/dist/{runtime-Cg87dCSm.d.mts → runtime-BM9sqnzO.d.mts} +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/version-B9lKhZ7w.mjs +6 -0
- package/package.json +3 -3
- package/dist/version-D-jCq-i4.mjs +0 -6
- /package/dist/{auth-control-guard-1FHtkDP6.mjs → auth-control-guard-C-6ysFEy.mjs} +0 -0
- /package/dist/{comments-yTbeIYc2.mjs → comments-85tbgZQN.mjs} +0 -0
- /package/dist/{context-DgqEfcWz.mjs → context-cudavuns.mjs} +0 -0
- /package/dist/{context-route-helpers-Dq5U_AXp.mjs → context-route-helpers--PJWR-5R.mjs} +0 -0
- /package/dist/{hitl-requests-DaRuZ7tb.mjs → hitl-requests-BQiAzKqo.mjs} +0 -0
|
@@ -13,7 +13,7 @@ import "../../../../../menus-DOaL6NaF.mjs";
|
|
|
13
13
|
import "../../../../../redirect-BaVvo2te.mjs";
|
|
14
14
|
import "../../../../../byline-DpNNSjET.mjs";
|
|
15
15
|
import "../../../../../seo-BPb_reaG.mjs";
|
|
16
|
-
import { _ as handleSchemaCollectionList, m as handleSchemaCollectionCreate } from "../../../../../api-
|
|
16
|
+
import { _ as handleSchemaCollectionList, m as handleSchemaCollectionCreate } from "../../../../../api-B1tPdBKN.mjs";
|
|
17
17
|
import "../../../../../request-cache-BpwuE2ix.mjs";
|
|
18
18
|
import "../../../../../dashboard-BC9bgPOH.mjs";
|
|
19
19
|
import "../../../../../briefing-Jsxs587i.mjs";
|
|
@@ -13,7 +13,7 @@ import "../../../../../menus-DOaL6NaF.mjs";
|
|
|
13
13
|
import "../../../../../redirect-BaVvo2te.mjs";
|
|
14
14
|
import "../../../../../byline-DpNNSjET.mjs";
|
|
15
15
|
import "../../../../../seo-BPb_reaG.mjs";
|
|
16
|
-
import { p as handleOrphanedTableRegister } from "../../../../../api-
|
|
16
|
+
import { p as handleOrphanedTableRegister } from "../../../../../api-B1tPdBKN.mjs";
|
|
17
17
|
import "../../../../../request-cache-BpwuE2ix.mjs";
|
|
18
18
|
import "../../../../../dashboard-BC9bgPOH.mjs";
|
|
19
19
|
import "../../../../../briefing-Jsxs587i.mjs";
|
|
@@ -13,7 +13,7 @@ import "../../../../../menus-DOaL6NaF.mjs";
|
|
|
13
13
|
import "../../../../../redirect-BaVvo2te.mjs";
|
|
14
14
|
import "../../../../../byline-DpNNSjET.mjs";
|
|
15
15
|
import "../../../../../seo-BPb_reaG.mjs";
|
|
16
|
-
import { f as handleOrphanedTableList } from "../../../../../api-
|
|
16
|
+
import { f as handleOrphanedTableList } from "../../../../../api-B1tPdBKN.mjs";
|
|
17
17
|
import "../../../../../request-cache-BpwuE2ix.mjs";
|
|
18
18
|
import "../../../../../dashboard-BC9bgPOH.mjs";
|
|
19
19
|
import "../../../../../briefing-Jsxs587i.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as OptionsRepository } from "../../../../options-BF11H_FD.mjs";
|
|
2
|
-
import { n as VERSION } from "../../../../version-
|
|
2
|
+
import { n as VERSION } from "../../../../version-B9lKhZ7w.mjs";
|
|
3
3
|
import { t as getAuthMode } from "../../../../mode-Bd55iLcP.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/astro/routes/api/well-known/auth.ts
|
package/dist/astro/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as ContentItem } from "../types-DvwHUku7.mjs";
|
|
2
|
-
import { Kn as MediaItem, en as SandboxRunner, mn as MediaResponse, nt as HookPipeline, or as ContentListResponse, pn as MediaListResponse, sr as ContentResponse, t as DinewayConfig, tt as EmailPipeline } from "../runtime-
|
|
2
|
+
import { Kn as MediaItem, en as SandboxRunner, mn as MediaResponse, nt as HookPipeline, or as ContentListResponse, pn as MediaListResponse, sr as ContentResponse, t as DinewayConfig, tt as EmailPipeline } from "../runtime-BM9sqnzO.mjs";
|
|
3
3
|
import { t as Database } from "../types-B1NksXAb.mjs";
|
|
4
4
|
import { A as PageMetadataContribution, D as PageFragmentContribution, X as ResolvedPlugin, ct as Element, q as PublicPageContext } from "../types-BIM7jwxr.mjs";
|
|
5
5
|
import "../types-BgE6gMFI.mjs";
|
|
@@ -8,7 +8,7 @@ import "../runner-pAnQS6iI.mjs";
|
|
|
8
8
|
import "../index-2tBfB_8X.mjs";
|
|
9
9
|
import "../index-CpbixmRL.mjs";
|
|
10
10
|
import { d as Storage } from "../types-BYjPylrZ.mjs";
|
|
11
|
-
import "../bylines-
|
|
11
|
+
import "../bylines-Cf_VHc-Y.mjs";
|
|
12
12
|
import "../types-BBETcziA.mjs";
|
|
13
13
|
import "../validate-BzUCAU2a.mjs";
|
|
14
14
|
import "../index.mjs";
|
|
@@ -519,11 +519,11 @@ declare const createCollectionBody: z.ZodObject<{
|
|
|
519
519
|
description: z.ZodOptional<z.ZodString>;
|
|
520
520
|
icon: z.ZodOptional<z.ZodString>;
|
|
521
521
|
supports: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
522
|
-
search: "search";
|
|
523
522
|
drafts: "drafts";
|
|
524
523
|
revisions: "revisions";
|
|
525
524
|
preview: "preview";
|
|
526
525
|
scheduling: "scheduling";
|
|
526
|
+
search: "search";
|
|
527
527
|
}>>>;
|
|
528
528
|
source: z.ZodOptional<z.ZodString>;
|
|
529
529
|
urlPattern: z.ZodOptional<z.ZodString>;
|
|
@@ -535,11 +535,11 @@ declare const updateCollectionBody: z.ZodObject<{
|
|
|
535
535
|
description: z.ZodOptional<z.ZodString>;
|
|
536
536
|
icon: z.ZodOptional<z.ZodString>;
|
|
537
537
|
supports: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
538
|
-
search: "search";
|
|
539
538
|
drafts: "drafts";
|
|
540
539
|
revisions: "revisions";
|
|
541
540
|
preview: "preview";
|
|
542
541
|
scheduling: "scheduling";
|
|
542
|
+
search: "search";
|
|
543
543
|
}>>>;
|
|
544
544
|
urlPattern: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
545
545
|
hasSeo: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -560,15 +560,15 @@ declare const createFieldBody: z.ZodObject<{
|
|
|
560
560
|
number: "number";
|
|
561
561
|
boolean: "boolean";
|
|
562
562
|
file: "file";
|
|
563
|
-
slug: "slug";
|
|
564
563
|
url: "url";
|
|
564
|
+
image: "image";
|
|
565
|
+
slug: "slug";
|
|
565
566
|
datetime: "datetime";
|
|
566
567
|
text: "text";
|
|
567
568
|
integer: "integer";
|
|
568
569
|
select: "select";
|
|
569
570
|
multiSelect: "multiSelect";
|
|
570
571
|
portableText: "portableText";
|
|
571
|
-
image: "image";
|
|
572
572
|
reference: "reference";
|
|
573
573
|
json: "json";
|
|
574
574
|
repeater: "repeater";
|
|
@@ -687,15 +687,15 @@ declare const fieldSchema: z.ZodObject<{
|
|
|
687
687
|
number: "number";
|
|
688
688
|
boolean: "boolean";
|
|
689
689
|
file: "file";
|
|
690
|
-
slug: "slug";
|
|
691
690
|
url: "url";
|
|
691
|
+
image: "image";
|
|
692
|
+
slug: "slug";
|
|
692
693
|
datetime: "datetime";
|
|
693
694
|
text: "text";
|
|
694
695
|
integer: "integer";
|
|
695
696
|
select: "select";
|
|
696
697
|
multiSelect: "multiSelect";
|
|
697
698
|
portableText: "portableText";
|
|
698
|
-
image: "image";
|
|
699
699
|
reference: "reference";
|
|
700
700
|
json: "json";
|
|
701
701
|
repeater: "repeater";
|
|
@@ -752,15 +752,15 @@ declare const collectionWithFieldsResponseSchema: z.ZodObject<{
|
|
|
752
752
|
number: "number";
|
|
753
753
|
boolean: "boolean";
|
|
754
754
|
file: "file";
|
|
755
|
-
slug: "slug";
|
|
756
755
|
url: "url";
|
|
756
|
+
image: "image";
|
|
757
|
+
slug: "slug";
|
|
757
758
|
datetime: "datetime";
|
|
758
759
|
text: "text";
|
|
759
760
|
integer: "integer";
|
|
760
761
|
select: "select";
|
|
761
762
|
multiSelect: "multiSelect";
|
|
762
763
|
portableText: "portableText";
|
|
763
|
-
image: "image";
|
|
764
764
|
reference: "reference";
|
|
765
765
|
json: "json";
|
|
766
766
|
repeater: "repeater";
|
|
@@ -806,15 +806,15 @@ declare const fieldResponseSchema: z.ZodObject<{
|
|
|
806
806
|
number: "number";
|
|
807
807
|
boolean: "boolean";
|
|
808
808
|
file: "file";
|
|
809
|
-
slug: "slug";
|
|
810
809
|
url: "url";
|
|
810
|
+
image: "image";
|
|
811
|
+
slug: "slug";
|
|
811
812
|
datetime: "datetime";
|
|
812
813
|
text: "text";
|
|
813
814
|
integer: "integer";
|
|
814
815
|
select: "select";
|
|
815
816
|
multiSelect: "multiSelect";
|
|
816
817
|
portableText: "portableText";
|
|
817
|
-
image: "image";
|
|
818
818
|
reference: "reference";
|
|
819
819
|
json: "json";
|
|
820
820
|
repeater: "repeater";
|
|
@@ -843,15 +843,15 @@ declare const fieldListResponseSchema: z.ZodObject<{
|
|
|
843
843
|
number: "number";
|
|
844
844
|
boolean: "boolean";
|
|
845
845
|
file: "file";
|
|
846
|
-
slug: "slug";
|
|
847
846
|
url: "url";
|
|
847
|
+
image: "image";
|
|
848
|
+
slug: "slug";
|
|
848
849
|
datetime: "datetime";
|
|
849
850
|
text: "text";
|
|
850
851
|
integer: "integer";
|
|
851
852
|
select: "select";
|
|
852
853
|
multiSelect: "multiSelect";
|
|
853
854
|
portableText: "portableText";
|
|
854
|
-
image: "image";
|
|
855
855
|
reference: "reference";
|
|
856
856
|
json: "json";
|
|
857
857
|
repeater: "repeater";
|
|
@@ -1022,21 +1022,21 @@ declare const contextEntryListQuery: z.ZodObject<{
|
|
|
1022
1022
|
cursor: z.ZodOptional<z.ZodString>;
|
|
1023
1023
|
}, z.core.$strip>;
|
|
1024
1024
|
declare const contextEntryStaleQuery: z.ZodObject<{
|
|
1025
|
-
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1026
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
1027
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
1028
1025
|
includeInherited: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
|
|
1029
1026
|
true: "true";
|
|
1030
1027
|
false: "false";
|
|
1031
1028
|
}>>, z.ZodTransform<boolean | undefined, "true" | "false" | undefined>>;
|
|
1032
1029
|
contextTypes: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
1033
1030
|
tags: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
1031
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
1034
1032
|
createdByActorType: z.ZodOptional<z.ZodEnum<{
|
|
1035
1033
|
user: "user";
|
|
1036
1034
|
api_token: "api_token";
|
|
1037
1035
|
system: "system";
|
|
1038
1036
|
}>>;
|
|
1039
1037
|
createdByActorId: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1039
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1040
1040
|
now: z.ZodOptional<z.ZodString>;
|
|
1041
1041
|
}, z.core.$strip>;
|
|
1042
1042
|
declare const contextEntryDiffQuery: z.ZodObject<{
|
|
@@ -1051,7 +1051,6 @@ declare const contextEntryDiffQuery: z.ZodObject<{
|
|
|
1051
1051
|
declare const contextEntryCreateBody: z.ZodObject<{
|
|
1052
1052
|
scope: z.ZodString;
|
|
1053
1053
|
contextType: z.ZodEnum<{
|
|
1054
|
-
decision: "decision";
|
|
1055
1054
|
brand_voice: "brand_voice";
|
|
1056
1055
|
seo_strategy: "seo_strategy";
|
|
1057
1056
|
audience: "audience";
|
|
@@ -1061,6 +1060,7 @@ declare const contextEntryCreateBody: z.ZodObject<{
|
|
|
1061
1060
|
migration_note: "migration_note";
|
|
1062
1061
|
plugin_note: "plugin_note";
|
|
1063
1062
|
agent_reasoning: "agent_reasoning";
|
|
1063
|
+
decision: "decision";
|
|
1064
1064
|
risk: "risk";
|
|
1065
1065
|
content_gap: "content_gap";
|
|
1066
1066
|
style_exception: "style_exception";
|
|
@@ -1075,7 +1075,6 @@ declare const contextEntryCreateBody: z.ZodObject<{
|
|
|
1075
1075
|
declare const contextEntrySupersedeBody: z.ZodObject<{
|
|
1076
1076
|
scope: z.ZodOptional<z.ZodString>;
|
|
1077
1077
|
contextType: z.ZodOptional<z.ZodEnum<{
|
|
1078
|
-
decision: "decision";
|
|
1079
1078
|
brand_voice: "brand_voice";
|
|
1080
1079
|
seo_strategy: "seo_strategy";
|
|
1081
1080
|
audience: "audience";
|
|
@@ -1085,6 +1084,7 @@ declare const contextEntrySupersedeBody: z.ZodObject<{
|
|
|
1085
1084
|
migration_note: "migration_note";
|
|
1086
1085
|
plugin_note: "plugin_note";
|
|
1087
1086
|
agent_reasoning: "agent_reasoning";
|
|
1087
|
+
decision: "decision";
|
|
1088
1088
|
risk: "risk";
|
|
1089
1089
|
content_gap: "content_gap";
|
|
1090
1090
|
style_exception: "style_exception";
|
|
@@ -1520,8 +1520,8 @@ declare const termGetResponseSchema: z.ZodObject<{
|
|
|
1520
1520
|
//#region src/api/schemas/sections.d.ts
|
|
1521
1521
|
declare const sectionsListQuery: z.ZodObject<{
|
|
1522
1522
|
source: z.ZodOptional<z.ZodEnum<{
|
|
1523
|
-
theme: "theme";
|
|
1524
1523
|
user: "user";
|
|
1524
|
+
theme: "theme";
|
|
1525
1525
|
import: "import";
|
|
1526
1526
|
}>>;
|
|
1527
1527
|
search: z.ZodOptional<z.ZodString>;
|
package/dist/cli/index.mjs
CHANGED
|
@@ -23,8 +23,8 @@ import "../ssrf-KAIQS48_.mjs";
|
|
|
23
23
|
import { t as validateSeed } from "../validate-JE-WfUQ5.mjs";
|
|
24
24
|
import { t as applySeed } from "../apply-TIoQ00aH.mjs";
|
|
25
25
|
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-DfeNNoLa.mjs";
|
|
26
|
-
import { o as convertDataForRead } from "../transport-B7kO-4ee.mjs";
|
|
27
26
|
import { createHeaderAwareFetch, customHeadersInterceptor, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
27
|
+
import { o as convertDataForRead } from "../transport-B7kO-4ee.mjs";
|
|
28
28
|
import { DinewayClient } from "../client/index.mjs";
|
|
29
29
|
import { LocalStorage } from "../storage/local.mjs";
|
|
30
30
|
import { imageSize } from "image-size";
|
|
@@ -35,50 +35,13 @@ import { basename, dirname, extname, isAbsolute, join, relative, resolve } from
|
|
|
35
35
|
import { defineCommand, runCommand, runMain } from "citty";
|
|
36
36
|
import consola, { consola as consola$1 } from "consola";
|
|
37
37
|
import pc from "picocolors";
|
|
38
|
-
import { access, chmod, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
39
38
|
import { homedir } from "node:os";
|
|
39
|
+
import { access, chmod, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
40
40
|
import { createInterface } from "node:readline/promises";
|
|
41
41
|
import { spawn } from "node:child_process";
|
|
42
42
|
import { pipeline } from "node:stream/promises";
|
|
43
43
|
import { packTar } from "modern-tar/fs";
|
|
44
44
|
|
|
45
|
-
//#region src/cli/commands/auth.ts
|
|
46
|
-
/**
|
|
47
|
-
* Auth CLI commands
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* Generate a cryptographically secure auth secret
|
|
51
|
-
*/
|
|
52
|
-
function generateAuthSecret() {
|
|
53
|
-
const bytes = new Uint8Array(32);
|
|
54
|
-
crypto.getRandomValues(bytes);
|
|
55
|
-
return encodeBase64url(bytes);
|
|
56
|
-
}
|
|
57
|
-
const secretCommand = defineCommand({
|
|
58
|
-
meta: {
|
|
59
|
-
name: "secret",
|
|
60
|
-
description: "Generate a secure auth secret"
|
|
61
|
-
},
|
|
62
|
-
run() {
|
|
63
|
-
const secret = generateAuthSecret();
|
|
64
|
-
consola$1.log("");
|
|
65
|
-
consola$1.log(pc.bold("Generated auth secret:"));
|
|
66
|
-
consola$1.log("");
|
|
67
|
-
consola$1.log(` ${pc.cyan("DINEWAY_AUTH_SECRET")}=${pc.green(secret)}`);
|
|
68
|
-
consola$1.log("");
|
|
69
|
-
consola$1.log(pc.dim("Add this to your environment variables."));
|
|
70
|
-
consola$1.log("");
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
const authCommand = defineCommand({
|
|
74
|
-
meta: {
|
|
75
|
-
name: "auth",
|
|
76
|
-
description: "Authentication utilities"
|
|
77
|
-
},
|
|
78
|
-
subCommands: { secret: secretCommand }
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
45
|
//#region src/cli/credentials.ts
|
|
83
46
|
/**
|
|
84
47
|
* Credential storage for CLI auth tokens.
|
|
@@ -223,6 +186,79 @@ function removeMarketplaceCredential(registryUrl) {
|
|
|
223
186
|
return false;
|
|
224
187
|
}
|
|
225
188
|
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/cli/project-env.ts
|
|
191
|
+
const DEFAULT_DINEWAY_URL = "http://localhost:4321";
|
|
192
|
+
const ENV_KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
193
|
+
const LINE_SPLIT_PATTERN = /\r?\n/;
|
|
194
|
+
const NEWLINE_PATTERN = /\r?\n/g;
|
|
195
|
+
function parseDotenvValue(value) {
|
|
196
|
+
const trimmed = value.trim();
|
|
197
|
+
if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
|
|
198
|
+
return trimmed;
|
|
199
|
+
}
|
|
200
|
+
function parseDotenv(text) {
|
|
201
|
+
const env = {};
|
|
202
|
+
for (const line of text.split(LINE_SPLIT_PATTERN)) {
|
|
203
|
+
const trimmed = line.trim();
|
|
204
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
205
|
+
const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
|
|
206
|
+
const equalsIndex = normalized.indexOf("=");
|
|
207
|
+
if (equalsIndex <= 0) continue;
|
|
208
|
+
const key = normalized.slice(0, equalsIndex).trim();
|
|
209
|
+
if (!ENV_KEY_PATTERN.test(key)) continue;
|
|
210
|
+
env[key] = parseDotenvValue(normalized.slice(equalsIndex + 1));
|
|
211
|
+
}
|
|
212
|
+
return env;
|
|
213
|
+
}
|
|
214
|
+
function readProjectEnv(cwd = process.cwd()) {
|
|
215
|
+
const envPath = join(cwd, ".env");
|
|
216
|
+
if (!existsSync(envPath)) return {};
|
|
217
|
+
return parseDotenv(readFileSync(envPath, "utf-8"));
|
|
218
|
+
}
|
|
219
|
+
function getProjectEnvValue(name, cwd = process.cwd()) {
|
|
220
|
+
return process.env[name] ?? readProjectEnv(cwd)[name];
|
|
221
|
+
}
|
|
222
|
+
function resolveDinewayBaseUrl(url, cwd = process.cwd()) {
|
|
223
|
+
if (url && url !== DEFAULT_DINEWAY_URL) return url;
|
|
224
|
+
const projectEnv = readProjectEnv(cwd);
|
|
225
|
+
return process.env["DINEWAY_URL"] ?? process.env["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_URL"] ?? url ?? DEFAULT_DINEWAY_URL;
|
|
226
|
+
}
|
|
227
|
+
function resolveDinewayToken(token, cwd = process.cwd()) {
|
|
228
|
+
return token ?? getProjectEnvValue("DINEWAY_TOKEN", cwd);
|
|
229
|
+
}
|
|
230
|
+
function formatEnvValue(value) {
|
|
231
|
+
return value.replace(NEWLINE_PATTERN, "");
|
|
232
|
+
}
|
|
233
|
+
async function upsertProjectEnv(cwd, values) {
|
|
234
|
+
const envPath = join(cwd, ".env");
|
|
235
|
+
const existing = await readFile(envPath, "utf-8").catch(() => "");
|
|
236
|
+
const lines = existing ? existing.split(LINE_SPLIT_PATTERN) : [];
|
|
237
|
+
const seen = /* @__PURE__ */ new Set();
|
|
238
|
+
const nextLines = lines.map((line) => {
|
|
239
|
+
const trimmed = line.trim();
|
|
240
|
+
const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
|
|
241
|
+
const equalsIndex = normalized.indexOf("=");
|
|
242
|
+
if (equalsIndex <= 0) return line;
|
|
243
|
+
const key = normalized.slice(0, equalsIndex).trim();
|
|
244
|
+
const value = values[key];
|
|
245
|
+
if (!(key in values) || value === void 0) return line;
|
|
246
|
+
seen.add(key);
|
|
247
|
+
return `${key}=${formatEnvValue(value)}`;
|
|
248
|
+
});
|
|
249
|
+
for (const [key, value] of Object.entries(values)) {
|
|
250
|
+
if (value === void 0 || seen.has(key)) continue;
|
|
251
|
+
nextLines.push(`${key}=${formatEnvValue(value)}`);
|
|
252
|
+
}
|
|
253
|
+
await writeFile(envPath, `${nextLines.filter((line, index) => line || index < nextLines.length - 1).join("\n")}\n`, "utf-8");
|
|
254
|
+
}
|
|
255
|
+
async function ensureProjectGitignoreEntry(cwd, entry) {
|
|
256
|
+
const gitignorePath = join(cwd, ".gitignore");
|
|
257
|
+
const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
|
|
258
|
+
if (existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()).includes(entry)) return;
|
|
259
|
+
await writeFile(gitignorePath, `${existing}${existing && !existing.endsWith("\n") ? "\n" : ""}${entry}\n`, "utf-8");
|
|
260
|
+
}
|
|
261
|
+
|
|
226
262
|
//#endregion
|
|
227
263
|
//#region src/cli/client-factory.ts
|
|
228
264
|
var client_factory_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -238,7 +274,7 @@ const connectionArgs = {
|
|
|
238
274
|
type: "string",
|
|
239
275
|
alias: "u",
|
|
240
276
|
description: "Dineway instance URL",
|
|
241
|
-
default:
|
|
277
|
+
default: DEFAULT_DINEWAY_URL
|
|
242
278
|
},
|
|
243
279
|
token: {
|
|
244
280
|
type: "string",
|
|
@@ -270,8 +306,8 @@ const connectionArgs = {
|
|
|
270
306
|
* 3. --header CLI flags
|
|
271
307
|
*/
|
|
272
308
|
function createClientFromArgs(args) {
|
|
273
|
-
const baseUrl = args.url
|
|
274
|
-
let token = args.token
|
|
309
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
310
|
+
let token = resolveDinewayToken(args.token);
|
|
275
311
|
const isLocal = baseUrl.includes("localhost") || baseUrl.includes("127.0.0.1");
|
|
276
312
|
const cred = !token ? getCredentials(baseUrl) : null;
|
|
277
313
|
const customHeaders = {
|
|
@@ -367,6 +403,69 @@ function prettyPrint(data, indent = 0) {
|
|
|
367
403
|
consola$1.log(typeof data === "string" ? data : JSON.stringify(data));
|
|
368
404
|
}
|
|
369
405
|
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/cli/commands/auth.ts
|
|
408
|
+
/**
|
|
409
|
+
* Auth CLI commands
|
|
410
|
+
*/
|
|
411
|
+
/**
|
|
412
|
+
* Generate a cryptographically secure auth secret
|
|
413
|
+
*/
|
|
414
|
+
function generateAuthSecret() {
|
|
415
|
+
const bytes = new Uint8Array(32);
|
|
416
|
+
crypto.getRandomValues(bytes);
|
|
417
|
+
return encodeBase64url(bytes);
|
|
418
|
+
}
|
|
419
|
+
const secretCommand = defineCommand({
|
|
420
|
+
meta: {
|
|
421
|
+
name: "secret",
|
|
422
|
+
description: "Generate a secure auth secret"
|
|
423
|
+
},
|
|
424
|
+
run() {
|
|
425
|
+
const secret = generateAuthSecret();
|
|
426
|
+
consola$1.log("");
|
|
427
|
+
consola$1.log(pc.bold("Generated auth secret:"));
|
|
428
|
+
consola$1.log("");
|
|
429
|
+
consola$1.log(` ${pc.cyan("DINEWAY_AUTH_SECRET")}=${pc.green(secret)}`);
|
|
430
|
+
consola$1.log("");
|
|
431
|
+
consola$1.log(pc.dim("Add this to your environment variables."));
|
|
432
|
+
consola$1.log("");
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
const setupLinkCommand = defineCommand({
|
|
436
|
+
meta: {
|
|
437
|
+
name: "setup-link",
|
|
438
|
+
description: "Create a one-time admin setup link"
|
|
439
|
+
},
|
|
440
|
+
args: connectionArgs,
|
|
441
|
+
async run({ args }) {
|
|
442
|
+
configureOutputMode(args);
|
|
443
|
+
try {
|
|
444
|
+
const result = await createClientFromArgs(args).createSetupLink();
|
|
445
|
+
if (args.json || !process.stdout.isTTY) {
|
|
446
|
+
output(result, args);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
consola$1.success("Created one-time setup link");
|
|
450
|
+
consola$1.info(`Expires: ${result.expiresAt}`);
|
|
451
|
+
consola$1.log(result.setupUrl);
|
|
452
|
+
} catch (error) {
|
|
453
|
+
consola$1.error(error instanceof Error ? error.message : "Failed to create setup link");
|
|
454
|
+
process.exit(2);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
const authCommand = defineCommand({
|
|
459
|
+
meta: {
|
|
460
|
+
name: "auth",
|
|
461
|
+
description: "Authentication utilities"
|
|
462
|
+
},
|
|
463
|
+
subCommands: {
|
|
464
|
+
secret: secretCommand,
|
|
465
|
+
"setup-link": setupLinkCommand
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
|
|
370
469
|
//#endregion
|
|
371
470
|
//#region src/cli/commands/content.ts
|
|
372
471
|
/**
|
|
@@ -1745,8 +1844,8 @@ function getSavedForgewayMetadata(pkg) {
|
|
|
1745
1844
|
async function resolveForgewayAccountEmail(options, grant, cwd, deps) {
|
|
1746
1845
|
const stored = await (deps.readCredentials ?? readForgewayCredentials)(cwd);
|
|
1747
1846
|
const storedEmail = stored?.source === "shadow-email-upgrade" && stored.placeId === grant.placeId && stored.user?.emailVerified === true && !isShadowEmail(stored.user?.email) ? stored.user?.email : void 0;
|
|
1748
|
-
const email = normalizeEmail(options.email ?? getEnv("FORGEWAY_EMAIL") ?? storedEmail ?? await promptRequired("
|
|
1749
|
-
if (!email || isShadowEmail(email)) throw new Error("
|
|
1847
|
+
const email = normalizeEmail(options.email ?? getEnv("DINEWAY_EMAIL") ?? getEnv("FORGEWAY_EMAIL") ?? storedEmail ?? await promptRequired("Dineway account email: ", void 0, deps, "Dineway account email is required. Pass --email or set DINEWAY_EMAIL."));
|
|
1848
|
+
if (!email || isShadowEmail(email)) throw new Error("Dineway account email must be a real owner email, not a shadow user email.");
|
|
1750
1849
|
return email;
|
|
1751
1850
|
}
|
|
1752
1851
|
function isStoredFormalCredentialForGrant(stored, grant, email) {
|
|
@@ -2306,15 +2405,21 @@ async function deploySiteProject(options) {
|
|
|
2306
2405
|
dinewayAdminBootstrap: createResult.dinewayAdminBootstrap
|
|
2307
2406
|
};
|
|
2308
2407
|
}
|
|
2309
|
-
function
|
|
2408
|
+
async function persistForgewayCliEnv(cwd, params) {
|
|
2409
|
+
await upsertProjectEnv(cwd, {
|
|
2410
|
+
DINEWAY_SITE_URL: params.siteUrl,
|
|
2411
|
+
DINEWAY_TOKEN: params.token
|
|
2412
|
+
});
|
|
2413
|
+
await ensureProjectGitignoreEntry(cwd, ".env");
|
|
2414
|
+
}
|
|
2415
|
+
function formatDinewayAdminBootstrapMessage(bootstrap) {
|
|
2310
2416
|
if (!bootstrap) return "";
|
|
2311
2417
|
if (bootstrap.status === "already_issued") return `Dineway admin bootstrap: ${bootstrap.message}`;
|
|
2312
2418
|
return [
|
|
2313
|
-
"Dineway admin
|
|
2314
|
-
`
|
|
2419
|
+
"Dineway admin access is ready. Local CLI defaults were saved to .env.",
|
|
2420
|
+
`Dineway admin email: ${bootstrap.adminEmail}`,
|
|
2315
2421
|
`Setup link (expires ${bootstrap.setupTokenExpiresAt}): ${bootstrap.setupUrl}`,
|
|
2316
|
-
|
|
2317
|
-
`CLI example: DINEWAY_TOKEN=${bootstrap.apiToken} dineway whoami --url ${siteUrl}`
|
|
2422
|
+
"CLI example: dineway whoami"
|
|
2318
2423
|
].join("\n");
|
|
2319
2424
|
}
|
|
2320
2425
|
async function deployForgeway(cwd, options, deps = {}) {
|
|
@@ -2353,7 +2458,11 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
2353
2458
|
deps
|
|
2354
2459
|
});
|
|
2355
2460
|
const url = deployment.liveUrl ?? `https://${site.domain}`;
|
|
2356
|
-
|
|
2461
|
+
await (deps.writeProjectEnv ?? persistForgewayCliEnv)(cwd, {
|
|
2462
|
+
siteUrl: url,
|
|
2463
|
+
token: deployment.dinewayAdminBootstrap?.status === "issued" ? deployment.dinewayAdminBootstrap.apiToken : void 0
|
|
2464
|
+
});
|
|
2465
|
+
const bootstrapMessage = formatDinewayAdminBootstrapMessage(deployment.dinewayAdminBootstrap);
|
|
2357
2466
|
const statusMessage = deployment.isReady ? `Deploy complete: ${url}` : `Deploy started for ${site.domain}. Check Forgeway for build status.`;
|
|
2358
2467
|
return {
|
|
2359
2468
|
url,
|
|
@@ -2891,7 +3000,7 @@ const deployCommand = defineCommand({
|
|
|
2891
3000
|
},
|
|
2892
3001
|
email: {
|
|
2893
3002
|
type: "string",
|
|
2894
|
-
description: "
|
|
3003
|
+
description: "Dineway account email for deploy authorization",
|
|
2895
3004
|
required: false
|
|
2896
3005
|
},
|
|
2897
3006
|
"restaurant-name": {
|
|
@@ -3901,7 +4010,7 @@ const loginCommand = defineCommand({
|
|
|
3901
4010
|
type: "string",
|
|
3902
4011
|
alias: "u",
|
|
3903
4012
|
description: "Dineway instance URL",
|
|
3904
|
-
default:
|
|
4013
|
+
default: DEFAULT_DINEWAY_URL
|
|
3905
4014
|
},
|
|
3906
4015
|
header: {
|
|
3907
4016
|
type: "string",
|
|
@@ -3910,7 +4019,7 @@ const loginCommand = defineCommand({
|
|
|
3910
4019
|
}
|
|
3911
4020
|
},
|
|
3912
4021
|
async run({ args }) {
|
|
3913
|
-
const baseUrl = args.url
|
|
4022
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
3914
4023
|
consola$1.start(`Connecting to ${baseUrl}...`);
|
|
3915
4024
|
const customHeaders = resolveCustomHeaders();
|
|
3916
4025
|
let headerFetch = createHeaderAwareFetch(customHeaders);
|
|
@@ -4022,10 +4131,10 @@ const logoutCommand = defineCommand({
|
|
|
4022
4131
|
type: "string",
|
|
4023
4132
|
alias: "u",
|
|
4024
4133
|
description: "Dineway instance URL",
|
|
4025
|
-
default:
|
|
4134
|
+
default: DEFAULT_DINEWAY_URL
|
|
4026
4135
|
} },
|
|
4027
4136
|
async run({ args }) {
|
|
4028
|
-
const baseUrl = args.url
|
|
4137
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
4029
4138
|
const cred = getCredentials(baseUrl);
|
|
4030
4139
|
if (!cred) {
|
|
4031
4140
|
consola$1.info("No stored credentials found for this instance.");
|
|
@@ -4053,7 +4162,7 @@ const whoamiCommand = defineCommand({
|
|
|
4053
4162
|
type: "string",
|
|
4054
4163
|
alias: "u",
|
|
4055
4164
|
description: "Dineway instance URL",
|
|
4056
|
-
default:
|
|
4165
|
+
default: DEFAULT_DINEWAY_URL
|
|
4057
4166
|
},
|
|
4058
4167
|
token: {
|
|
4059
4168
|
type: "string",
|
|
@@ -4067,8 +4176,8 @@ const whoamiCommand = defineCommand({
|
|
|
4067
4176
|
},
|
|
4068
4177
|
async run({ args }) {
|
|
4069
4178
|
configureOutputMode(args);
|
|
4070
|
-
const baseUrl = args.url
|
|
4071
|
-
let token = args.token
|
|
4179
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
4180
|
+
let token = resolveDinewayToken(args.token);
|
|
4072
4181
|
let authMethod = token ? "token" : "none";
|
|
4073
4182
|
let storedHeaders = {};
|
|
4074
4183
|
if (!token) {
|
package/dist/client/index.d.mts
CHANGED
|
@@ -182,6 +182,10 @@ interface MenuItem {
|
|
|
182
182
|
parentId?: string | null;
|
|
183
183
|
sortOrder: number;
|
|
184
184
|
}
|
|
185
|
+
interface SetupLinkResult {
|
|
186
|
+
setupUrl: string;
|
|
187
|
+
expiresAt: string;
|
|
188
|
+
}
|
|
185
189
|
/** Full schema export (returned by /api/schema) */
|
|
186
190
|
interface SchemaExport {
|
|
187
191
|
collections: Array<{
|
|
@@ -392,6 +396,8 @@ declare class DinewayClient {
|
|
|
392
396
|
menus(): Promise<Menu[]>;
|
|
393
397
|
/** Get a menu with its items */
|
|
394
398
|
menu(name: string): Promise<MenuWithItems>;
|
|
399
|
+
/** Create a one-time browser setup link for the current admin user. */
|
|
400
|
+
createSetupLink(): Promise<SetupLinkResult>;
|
|
395
401
|
/** Make a typed JSON request to the API */
|
|
396
402
|
private request;
|
|
397
403
|
/** Make a raw request — caller handles response */
|
|
@@ -402,4 +408,4 @@ declare class DinewayClient {
|
|
|
402
408
|
private getFieldSchemas;
|
|
403
409
|
}
|
|
404
410
|
//#endregion
|
|
405
|
-
export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, type PortableTextBlock, PublishContentOptions, SchemaExport, SearchResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
|
|
411
|
+
export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, type PortableTextBlock, PublishContentOptions, SchemaExport, SearchResult, SetupLinkResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
|
package/dist/client/index.mjs
CHANGED
|
@@ -285,6 +285,10 @@ var DinewayClient = class {
|
|
|
285
285
|
async menu(name) {
|
|
286
286
|
return this.request("GET", `/menus/${encodeURIComponent(name)}`);
|
|
287
287
|
}
|
|
288
|
+
/** Create a one-time browser setup link for the current admin user. */
|
|
289
|
+
async createSetupLink() {
|
|
290
|
+
return this.request("POST", "/auth/setup-token");
|
|
291
|
+
}
|
|
288
292
|
/** Make a typed JSON request to the API */
|
|
289
293
|
async request(method, path, body) {
|
|
290
294
|
const response = await this.requestRaw(method, path, body);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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-DvwHUku7.mjs";
|
|
2
|
-
import { $ as createPluginManager, $t as SandboxOptions, A as dropSessionDatabaseTables, An as handleContentDelete, At as verifyPreviewSignature, B as GeneratePreviewTokenOptions, Bn as handleContentSchedule, Bt as prosemirrorToPortableText, C as getByline, Cn as handleRevisionList, Ct as SessionOpenOrCreateOptions, D as AppliedSnapshotMeta, Dn as handleContentCountScheduled, Dt as defaultPreviewSidecarClient, E as renderPreviewToolbar, En as handleContentCompare, Et as buildPreviewSignatureHeader, F as getPreviewToken, Fn as handleContentList, Ft as AfterCallback, G as parseContentId, Gn as CreateMediaInput, Gt as PortableTextSpan, H as VerifyPreviewTokenOptions, Hn as handleContentUnpublish, Ht as PortableTextImageBlock, I as isPreviewRequest, In as handleContentListTrashed, It as after, J as createNodeSandboxRunner, Jn as ContentRepository, Jt as ProseMirrorDocument, K as verifyPreviewToken, Kn as MediaItem, Kt as PortableTextTextBlock, L as GetPreviewUrlOptions, Ln as handleContentPermanentDelete, Lt as computeContentHash, M as Snapshot, Mn as handleContentDuplicate, Mt as getFallbackChain, N as renderPreviewLoadingPage, Nn as handleContentGet, Nt as getI18nConfig, O as ApplySnapshotToDatabaseOptions, On as handleContentCountTrashed, Ot as parsePreviewSignatureHeader, P as isBlockedInPreview, Pn as handleContentGetIncludingTrashed, Pt as isI18nEnabled, Q as PluginManager, Qt as SandboxEmailSendCallback, R as buildPreviewUrl, Rn as handleContentPublish, Rt as hashString, S as Suggestion, Sn as handleRevisionGet, St as SessionOpenOptions, T as PreviewToolbarConfig, Tn as generateManifest, Tt as PreviewSidecarSignature, U as VerifyPreviewTokenResult, Un as handleContentUnschedule, Ut as PortableTextLinkMark, V as PreviewTokenPayload, Vn as handleContentTranslations, Vt as PortableTextCodeBlock, W as generatePreviewToken, Wn as handleContentUpdate, Wt as PortableTextMarkDef, X as SandboxNotAvailableError, Xn as DinewayDatabaseError, Xt as ProseMirrorNode, Y as NoopSandboxRunner, Yn as DatabaseConfig, Yt as ProseMirrorMark, Z as createNoopSandboxRunner, Zt as SandboxEmailMessage, _ as SearchOptions, _n as handleMediaGet, _t as SessionCleanupResult, an as getSections, ar as ApiContext, at as ValidatedPluginManifest, b as SearchStats, bn as RevisionListResponse, bt as SessionDatabaseInfo, c as extractSearchableFields, cn as Section, cr as FieldDescriptor, ct as CollectionFilter$1, d as search, dn as SchemaError, en as SandboxRunner, et as PluginRouteError, f as searchCollection, fn as SchemaRegistry, g as SearchConfig, gn as handleMediaDelete, gt as FileSessionDatabaseFactoryOptions, h as CollectionSearchOptions, hn as handleMediaCreate, ht as FileSessionDatabaseFactory, in as getSection, it as createHookPipeline, j as getAppliedSnapshotMeta, jn as handleContentDiscardDraft, jt as I18nConfig, k as applySnapshotToDatabase, kn as handleContentCreate, kt as signPreviewUrl, l as getSearchStats, ln as SectionSource, lr as ListResponse, lt as EntryData, m as FTSManager, mn as MediaResponse, mt as createFilePreviewMiddleware, n as PluginDescriptor, nn as SandboxedPlugin, nt as HookPipeline, on as CreateSectionInput, or as ContentListResponse, ot as pluginManifestSchema, p as searchWithDb, pn as MediaListResponse, pt as FilePreviewMiddlewareConfig, q as NodeSandboxRunner, qn as MediaRepository, qt as PortableTextUnknownBlock, rn as SerializedRequest, rt as HookResult, s as extractPlainText, sn as GetSectionsOptions, sr as ContentResponse, st as definePlugin, tn as SandboxRunnerFactory, u as getSuggestions, un as UpdateSectionInput, ur as ManifestResponse, ut as EntryFilter, v as SearchResponse, vn as handleMediaList, vt as SessionDatabaseFactory, w as getBylineBySlug, wn as handleRevisionRestore, wt as PreviewSidecarClient, x as SuggestOptions, xn as RevisionResponse, xt as SessionDatabaseLimitError, y as SearchResult, yn as handleMediaUpdate, yt as SessionDatabaseHandle, z as getPreviewUrl, zn as handleContentRestore, zt as portableTextToProsemirror } from "./runtime-
|
|
2
|
+
import { $ as createPluginManager, $t as SandboxOptions, A as dropSessionDatabaseTables, An as handleContentDelete, At as verifyPreviewSignature, B as GeneratePreviewTokenOptions, Bn as handleContentSchedule, Bt as prosemirrorToPortableText, C as getByline, Cn as handleRevisionList, Ct as SessionOpenOrCreateOptions, D as AppliedSnapshotMeta, Dn as handleContentCountScheduled, Dt as defaultPreviewSidecarClient, E as renderPreviewToolbar, En as handleContentCompare, Et as buildPreviewSignatureHeader, F as getPreviewToken, Fn as handleContentList, Ft as AfterCallback, G as parseContentId, Gn as CreateMediaInput, Gt as PortableTextSpan, H as VerifyPreviewTokenOptions, Hn as handleContentUnpublish, Ht as PortableTextImageBlock, I as isPreviewRequest, In as handleContentListTrashed, It as after, J as createNodeSandboxRunner, Jn as ContentRepository, Jt as ProseMirrorDocument, K as verifyPreviewToken, Kn as MediaItem, Kt as PortableTextTextBlock, L as GetPreviewUrlOptions, Ln as handleContentPermanentDelete, Lt as computeContentHash, M as Snapshot, Mn as handleContentDuplicate, Mt as getFallbackChain, N as renderPreviewLoadingPage, Nn as handleContentGet, Nt as getI18nConfig, O as ApplySnapshotToDatabaseOptions, On as handleContentCountTrashed, Ot as parsePreviewSignatureHeader, P as isBlockedInPreview, Pn as handleContentGetIncludingTrashed, Pt as isI18nEnabled, Q as PluginManager, Qt as SandboxEmailSendCallback, R as buildPreviewUrl, Rn as handleContentPublish, Rt as hashString, S as Suggestion, Sn as handleRevisionGet, St as SessionOpenOptions, T as PreviewToolbarConfig, Tn as generateManifest, Tt as PreviewSidecarSignature, U as VerifyPreviewTokenResult, Un as handleContentUnschedule, Ut as PortableTextLinkMark, V as PreviewTokenPayload, Vn as handleContentTranslations, Vt as PortableTextCodeBlock, W as generatePreviewToken, Wn as handleContentUpdate, Wt as PortableTextMarkDef, X as SandboxNotAvailableError, Xn as DinewayDatabaseError, Xt as ProseMirrorNode, Y as NoopSandboxRunner, Yn as DatabaseConfig, Yt as ProseMirrorMark, Z as createNoopSandboxRunner, Zt as SandboxEmailMessage, _ as SearchOptions, _n as handleMediaGet, _t as SessionCleanupResult, an as getSections, ar as ApiContext, at as ValidatedPluginManifest, b as SearchStats, bn as RevisionListResponse, bt as SessionDatabaseInfo, c as extractSearchableFields, cn as Section, cr as FieldDescriptor, ct as CollectionFilter$1, d as search, dn as SchemaError, en as SandboxRunner, et as PluginRouteError, f as searchCollection, fn as SchemaRegistry, g as SearchConfig, gn as handleMediaDelete, gt as FileSessionDatabaseFactoryOptions, h as CollectionSearchOptions, hn as handleMediaCreate, ht as FileSessionDatabaseFactory, in as getSection, it as createHookPipeline, j as getAppliedSnapshotMeta, jn as handleContentDiscardDraft, jt as I18nConfig, k as applySnapshotToDatabase, kn as handleContentCreate, kt as signPreviewUrl, l as getSearchStats, ln as SectionSource, lr as ListResponse, lt as EntryData, m as FTSManager, mn as MediaResponse, mt as createFilePreviewMiddleware, n as PluginDescriptor, nn as SandboxedPlugin, nt as HookPipeline, on as CreateSectionInput, or as ContentListResponse, ot as pluginManifestSchema, p as searchWithDb, pn as MediaListResponse, pt as FilePreviewMiddlewareConfig, q as NodeSandboxRunner, qn as MediaRepository, qt as PortableTextUnknownBlock, rn as SerializedRequest, rt as HookResult, s as extractPlainText, sn as GetSectionsOptions, sr as ContentResponse, st as definePlugin, tn as SandboxRunnerFactory, u as getSuggestions, un as UpdateSectionInput, ur as ManifestResponse, ut as EntryFilter, v as SearchResponse, vn as handleMediaList, vt as SessionDatabaseFactory, w as getBylineBySlug, wn as handleRevisionRestore, wt as PreviewSidecarClient, x as SuggestOptions, xn as RevisionResponse, xt as SessionDatabaseLimitError, y as SearchResult, yn as handleMediaUpdate, yt as SessionDatabaseHandle, z as getPreviewUrl, zn as handleContentRestore, zt as portableTextToProsemirror } from "./runtime-BM9sqnzO.mjs";
|
|
3
3
|
import { n as MediaTable, r as UserTable, t as Database } from "./types-B1NksXAb.mjs";
|
|
4
4
|
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, 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 StoredComment, p as ContentHookEvent, q as PublicPageContext, r as CommentAfterCreateEvent, rt as StandardRouteHandler, s as CommentBeforeCreateEvent, st as isStandardPluginDefinition, t as BreadcrumbItem, tt as StandardPluginDefinition, u as CommentModerateHandler, v as HookConfig, x as KVAccess, y as HookName, z as PluginContext } from "./types-BIM7jwxr.mjs";
|
|
5
5
|
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-t7_nCCA9.mjs";
|
|
@@ -11,7 +11,7 @@ import { $ as TranslationSummary, A as MenuItem, B as getPluginSettings, C as Ta
|
|
|
11
11
|
import { _ as WxrSite, a as getAllSources, b as parseWxrString, c as getUrlSources, d as importReusableBlocksAsSections, f as WxrAttachment, g as WxrPost, h as WxrData, i as clearSources, l as probeUrl, m as WxrCategory, n as parseWxrDate, o as getFileSources, p as WxrAuthor, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource, v as WxrTag, x as decodeSlug, y as parseWxr } from "./index-CpbixmRL.mjs";
|
|
12
12
|
import { n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder-BZpCpid_.mjs";
|
|
13
13
|
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-BYjPylrZ.mjs";
|
|
14
|
-
import "./bylines-
|
|
14
|
+
import "./bylines-Cf_VHc-Y.mjs";
|
|
15
15
|
import { DinewayRequestContext, getRequestContext, runWithContext } from "./request-context.mjs";
|
|
16
16
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
17
17
|
import { S as UrlInput, _ as SourceAuth, a as FileInput, b as SourceProbeResult, c as ImportContext, d as ImportSource, f as NormalizedItem, g as ProbeResult, h as PostTypeMapping, i as FieldCompatibility, l as ImportFieldDef, m as PostTypeAnalysis, n as CollectionSchemaStatus, o as ImportAnalysis, p as OAuthInput, r as FetchOptions, s as ImportConfig, t as AttachmentInfo, u as ImportResult, v as SourceCapabilities, x as SuggestedAction, y as SourceInput } from "./types-BBETcziA.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import "./byline-DpNNSjET.mjs";
|
|
|
24
24
|
import { t as normalizeMediaValue } from "./normalize-BY_EJnd9.mjs";
|
|
25
25
|
import { t as generatePlaceholder } from "./placeholder-b0Ufu0La.mjs";
|
|
26
26
|
import "./seo-BPb_reaG.mjs";
|
|
27
|
-
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-
|
|
27
|
+
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-B1tPdBKN.mjs";
|
|
28
28
|
import "./request-cache-BpwuE2ix.mjs";
|
|
29
29
|
import "./dashboard-BC9bgPOH.mjs";
|
|
30
30
|
import "./briefing-Jsxs587i.mjs";
|