astro 5.16.14 → 5.16.16
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/assets/fonts/config.d.ts +5 -92
- package/dist/assets/fonts/config.js +4 -1
- package/dist/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/content/content-layer.js +3 -3
- package/dist/core/config/schemas/base.d.ts +7 -101
- package/dist/core/config/schemas/relative.d.ts +9 -123
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/dev/utils.js +22 -2
- package/dist/core/messages.js +2 -2
- package/dist/core/server-islands/endpoint.js +13 -2
- package/dist/runtime/server/render/server-islands.js +5 -4
- package/dist/types/public/context.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,78 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { FontProvider } from './types.js';
|
|
2
3
|
export declare const weightSchema: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
3
4
|
export declare const styleSchema: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
4
5
|
export declare const displaySchema: z.ZodEnum<["auto", "block", "swap", "fallback", "optional"]>;
|
|
5
|
-
export declare const fontProviderSchema: z.
|
|
6
|
-
name: z.ZodString;
|
|
7
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
-
init: z.ZodOptional<z.ZodType<((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined, z.ZodTypeDef, ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined>>;
|
|
9
|
-
resolveFont: z.ZodType<(options: import("./types.js").ResolveFontOptions<never>) => {
|
|
10
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
11
|
-
} | Promise<{
|
|
12
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
13
|
-
} | undefined> | undefined, z.ZodTypeDef, (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
14
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
15
|
-
} | Promise<{
|
|
16
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
17
|
-
} | undefined> | undefined>;
|
|
18
|
-
listFonts: z.ZodOptional<z.ZodType<(() => string[] | Promise<string[] | undefined> | undefined) | undefined, z.ZodTypeDef, (() => string[] | Promise<string[] | undefined> | undefined) | undefined>>;
|
|
19
|
-
}, "strict", z.ZodTypeAny, {
|
|
20
|
-
name: string;
|
|
21
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
22
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
23
|
-
} | Promise<{
|
|
24
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
25
|
-
} | undefined> | undefined;
|
|
26
|
-
config?: Record<string, any> | undefined;
|
|
27
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
28
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
name: string;
|
|
31
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
32
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
33
|
-
} | Promise<{
|
|
34
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
35
|
-
} | undefined> | undefined;
|
|
36
|
-
config?: Record<string, any> | undefined;
|
|
37
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
38
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
39
|
-
}>;
|
|
6
|
+
export declare const fontProviderSchema: z.ZodType<FontProvider<never>, z.ZodTypeDef, FontProvider<never>>;
|
|
40
7
|
export declare const fontFamilySchema: z.ZodObject<{
|
|
41
|
-
provider: z.
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
44
|
-
init: z.ZodOptional<z.ZodType<((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined, z.ZodTypeDef, ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined>>;
|
|
45
|
-
resolveFont: z.ZodType<(options: import("./types.js").ResolveFontOptions<never>) => {
|
|
46
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
47
|
-
} | Promise<{
|
|
48
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
49
|
-
} | undefined> | undefined, z.ZodTypeDef, (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
50
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
51
|
-
} | Promise<{
|
|
52
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
53
|
-
} | undefined> | undefined>;
|
|
54
|
-
listFonts: z.ZodOptional<z.ZodType<(() => string[] | Promise<string[] | undefined> | undefined) | undefined, z.ZodTypeDef, (() => string[] | Promise<string[] | undefined> | undefined) | undefined>>;
|
|
55
|
-
}, "strict", z.ZodTypeAny, {
|
|
56
|
-
name: string;
|
|
57
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
58
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
59
|
-
} | Promise<{
|
|
60
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
61
|
-
} | undefined> | undefined;
|
|
62
|
-
config?: Record<string, any> | undefined;
|
|
63
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
64
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
65
|
-
}, {
|
|
66
|
-
name: string;
|
|
67
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
68
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
69
|
-
} | Promise<{
|
|
70
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
71
|
-
} | undefined> | undefined;
|
|
72
|
-
config?: Record<string, any> | undefined;
|
|
73
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
74
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
75
|
-
}>;
|
|
8
|
+
provider: z.ZodType<FontProvider<never>, z.ZodTypeDef, FontProvider<never>>;
|
|
76
9
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
77
10
|
weights: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "atleastone">>;
|
|
78
11
|
styles: z.ZodOptional<z.ZodArray<z.ZodEnum<["normal", "italic", "oblique"]>, "atleastone">>;
|
|
@@ -90,17 +23,7 @@ export declare const fontFamilySchema: z.ZodObject<{
|
|
|
90
23
|
}, "strict", z.ZodTypeAny, {
|
|
91
24
|
name: string;
|
|
92
25
|
cssVariable: string;
|
|
93
|
-
provider:
|
|
94
|
-
name: string;
|
|
95
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
96
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
97
|
-
} | Promise<{
|
|
98
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
99
|
-
} | undefined> | undefined;
|
|
100
|
-
config?: Record<string, any> | undefined;
|
|
101
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
102
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
103
|
-
};
|
|
26
|
+
provider: FontProvider<never>;
|
|
104
27
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
105
28
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
106
29
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -116,17 +39,7 @@ export declare const fontFamilySchema: z.ZodObject<{
|
|
|
116
39
|
}, {
|
|
117
40
|
name: string;
|
|
118
41
|
cssVariable: string;
|
|
119
|
-
provider:
|
|
120
|
-
name: string;
|
|
121
|
-
resolveFont: (options: import("./types.js").ResolveFontOptions<never>) => {
|
|
122
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
123
|
-
} | Promise<{
|
|
124
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
125
|
-
} | undefined> | undefined;
|
|
126
|
-
config?: Record<string, any> | undefined;
|
|
127
|
-
init?: ((context: import("./types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
128
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
129
|
-
};
|
|
42
|
+
provider: FontProvider<never>;
|
|
130
43
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
131
44
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
132
45
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -20,13 +20,16 @@ const requiredFamilyAttributesSchema = z.object({
|
|
|
20
20
|
name: z.string(),
|
|
21
21
|
cssVariable: z.string()
|
|
22
22
|
});
|
|
23
|
-
const
|
|
23
|
+
const _fontProviderSchema = z.object({
|
|
24
24
|
name: z.string(),
|
|
25
25
|
config: z.record(z.string(), z.any()).optional(),
|
|
26
26
|
init: z.custom((v) => typeof v === "function").optional(),
|
|
27
27
|
resolveFont: z.custom((v) => typeof v === "function"),
|
|
28
28
|
listFonts: z.custom((v) => typeof v === "function").optional()
|
|
29
29
|
}).strict();
|
|
30
|
+
const fontProviderSchema = z.custom((v) => {
|
|
31
|
+
return _fontProviderSchema.safeParse(v).success;
|
|
32
|
+
}, "Invalid FontProvider object");
|
|
30
33
|
const fontFamilySchema = z.object({
|
|
31
34
|
...requiredFamilyAttributesSchema.shape,
|
|
32
35
|
...fallbacksSchema.shape,
|
|
@@ -164,7 +164,7 @@ ${contentConfig.error.message}`);
|
|
|
164
164
|
logger.info("Content config changed");
|
|
165
165
|
shouldClear = true;
|
|
166
166
|
}
|
|
167
|
-
if (previousAstroVersion && previousAstroVersion !== "5.16.
|
|
167
|
+
if (previousAstroVersion && previousAstroVersion !== "5.16.16") {
|
|
168
168
|
logger.info("Astro version changed");
|
|
169
169
|
shouldClear = true;
|
|
170
170
|
}
|
|
@@ -172,8 +172,8 @@ ${contentConfig.error.message}`);
|
|
|
172
172
|
logger.info("Clearing content store");
|
|
173
173
|
this.#store.clearAll();
|
|
174
174
|
}
|
|
175
|
-
if ("5.16.
|
|
176
|
-
await this.#store.metaStore().set("astro-version", "5.16.
|
|
175
|
+
if ("5.16.16") {
|
|
176
|
+
await this.#store.metaStore().set("astro-version", "5.16.16");
|
|
177
177
|
}
|
|
178
178
|
if (currentConfigDigest) {
|
|
179
179
|
await this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
|
@@ -758,41 +758,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
758
758
|
headingIdCompat: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
759
759
|
preserveScriptOrder: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
760
760
|
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
761
|
-
provider: z.
|
|
762
|
-
name: z.ZodString;
|
|
763
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
764
|
-
init: z.ZodOptional<z.ZodType<((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined, z.ZodTypeDef, ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined>>;
|
|
765
|
-
resolveFont: z.ZodType<(options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
766
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
767
|
-
} | Promise<{
|
|
768
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
769
|
-
} | undefined> | undefined, z.ZodTypeDef, (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
770
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
771
|
-
} | Promise<{
|
|
772
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
773
|
-
} | undefined> | undefined>;
|
|
774
|
-
listFonts: z.ZodOptional<z.ZodType<(() => string[] | Promise<string[] | undefined> | undefined) | undefined, z.ZodTypeDef, (() => string[] | Promise<string[] | undefined> | undefined) | undefined>>;
|
|
775
|
-
}, "strict", z.ZodTypeAny, {
|
|
776
|
-
name: string;
|
|
777
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
778
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
779
|
-
} | Promise<{
|
|
780
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
781
|
-
} | undefined> | undefined;
|
|
782
|
-
config?: Record<string, any> | undefined;
|
|
783
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
784
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
785
|
-
}, {
|
|
786
|
-
name: string;
|
|
787
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
788
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
789
|
-
} | Promise<{
|
|
790
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
791
|
-
} | undefined> | undefined;
|
|
792
|
-
config?: Record<string, any> | undefined;
|
|
793
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
794
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
795
|
-
}>;
|
|
761
|
+
provider: z.ZodType<import("../../../assets/fonts/types.js").FontProvider<never>, z.ZodTypeDef, import("../../../assets/fonts/types.js").FontProvider<never>>;
|
|
796
762
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
797
763
|
weights: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "atleastone">>;
|
|
798
764
|
styles: z.ZodOptional<z.ZodArray<z.ZodEnum<["normal", "italic", "oblique"]>, "atleastone">>;
|
|
@@ -810,17 +776,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
810
776
|
}, "strict", z.ZodTypeAny, {
|
|
811
777
|
name: string;
|
|
812
778
|
cssVariable: string;
|
|
813
|
-
provider:
|
|
814
|
-
name: string;
|
|
815
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
816
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
817
|
-
} | Promise<{
|
|
818
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
819
|
-
} | undefined> | undefined;
|
|
820
|
-
config?: Record<string, any> | undefined;
|
|
821
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
822
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
823
|
-
};
|
|
779
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
824
780
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
825
781
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
826
782
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -836,17 +792,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
836
792
|
}, {
|
|
837
793
|
name: string;
|
|
838
794
|
cssVariable: string;
|
|
839
|
-
provider:
|
|
840
|
-
name: string;
|
|
841
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
842
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
843
|
-
} | Promise<{
|
|
844
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
845
|
-
} | undefined> | undefined;
|
|
846
|
-
config?: Record<string, any> | undefined;
|
|
847
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
848
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
849
|
-
};
|
|
795
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
850
796
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
851
797
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
852
798
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -942,17 +888,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
942
888
|
fonts?: {
|
|
943
889
|
name: string;
|
|
944
890
|
cssVariable: string;
|
|
945
|
-
provider:
|
|
946
|
-
name: string;
|
|
947
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
948
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
949
|
-
} | Promise<{
|
|
950
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
951
|
-
} | undefined> | undefined;
|
|
952
|
-
config?: Record<string, any> | undefined;
|
|
953
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
954
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
955
|
-
};
|
|
891
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
956
892
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
957
893
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
958
894
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -970,17 +906,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
970
906
|
fonts?: {
|
|
971
907
|
name: string;
|
|
972
908
|
cssVariable: string;
|
|
973
|
-
provider:
|
|
974
|
-
name: string;
|
|
975
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
976
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
977
|
-
} | Promise<{
|
|
978
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
979
|
-
} | undefined> | undefined;
|
|
980
|
-
config?: Record<string, any> | undefined;
|
|
981
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
982
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
983
|
-
};
|
|
909
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
984
910
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
985
911
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
986
912
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1187,17 +1113,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1187
1113
|
fonts?: {
|
|
1188
1114
|
name: string;
|
|
1189
1115
|
cssVariable: string;
|
|
1190
|
-
provider:
|
|
1191
|
-
name: string;
|
|
1192
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1193
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1194
|
-
} | Promise<{
|
|
1195
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1196
|
-
} | undefined> | undefined;
|
|
1197
|
-
config?: Record<string, any> | undefined;
|
|
1198
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1199
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1200
|
-
};
|
|
1116
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
1201
1117
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1202
1118
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1203
1119
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1419,17 +1335,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1419
1335
|
fonts?: {
|
|
1420
1336
|
name: string;
|
|
1421
1337
|
cssVariable: string;
|
|
1422
|
-
provider:
|
|
1423
|
-
name: string;
|
|
1424
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1425
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1426
|
-
} | Promise<{
|
|
1427
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1428
|
-
} | undefined> | undefined;
|
|
1429
|
-
config?: Record<string, any> | undefined;
|
|
1430
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1431
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1432
|
-
};
|
|
1338
|
+
provider: import("../../../assets/fonts/types.js").FontProvider<never>;
|
|
1433
1339
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1434
1340
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1435
1341
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -603,41 +603,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
603
603
|
headingIdCompat: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
604
604
|
preserveScriptOrder: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
605
605
|
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
606
|
-
provider: z.
|
|
607
|
-
name: z.ZodString;
|
|
608
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
609
|
-
init: z.ZodOptional<z.ZodType<((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined, z.ZodTypeDef, ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined>>;
|
|
610
|
-
resolveFont: z.ZodType<(options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
611
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
612
|
-
} | Promise<{
|
|
613
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
614
|
-
} | undefined> | undefined, z.ZodTypeDef, (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
615
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
616
|
-
} | Promise<{
|
|
617
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
618
|
-
} | undefined> | undefined>;
|
|
619
|
-
listFonts: z.ZodOptional<z.ZodType<(() => string[] | Promise<string[] | undefined> | undefined) | undefined, z.ZodTypeDef, (() => string[] | Promise<string[] | undefined> | undefined) | undefined>>;
|
|
620
|
-
}, "strict", z.ZodTypeAny, {
|
|
621
|
-
name: string;
|
|
622
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
623
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
624
|
-
} | Promise<{
|
|
625
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
626
|
-
} | undefined> | undefined;
|
|
627
|
-
config?: Record<string, any> | undefined;
|
|
628
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
629
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
630
|
-
}, {
|
|
631
|
-
name: string;
|
|
632
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
633
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
634
|
-
} | Promise<{
|
|
635
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
636
|
-
} | undefined> | undefined;
|
|
637
|
-
config?: Record<string, any> | undefined;
|
|
638
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
639
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
640
|
-
}>;
|
|
606
|
+
provider: z.ZodType<import("../../../index.js").FontProvider<never>, z.ZodTypeDef, import("../../../index.js").FontProvider<never>>;
|
|
641
607
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
642
608
|
weights: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "atleastone">>;
|
|
643
609
|
styles: z.ZodOptional<z.ZodArray<z.ZodEnum<["normal", "italic", "oblique"]>, "atleastone">>;
|
|
@@ -655,17 +621,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
655
621
|
}, "strict", z.ZodTypeAny, {
|
|
656
622
|
name: string;
|
|
657
623
|
cssVariable: string;
|
|
658
|
-
provider:
|
|
659
|
-
name: string;
|
|
660
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
661
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
662
|
-
} | Promise<{
|
|
663
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
664
|
-
} | undefined> | undefined;
|
|
665
|
-
config?: Record<string, any> | undefined;
|
|
666
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
667
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
668
|
-
};
|
|
624
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
669
625
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
670
626
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
671
627
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -681,17 +637,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
681
637
|
}, {
|
|
682
638
|
name: string;
|
|
683
639
|
cssVariable: string;
|
|
684
|
-
provider:
|
|
685
|
-
name: string;
|
|
686
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
687
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
688
|
-
} | Promise<{
|
|
689
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
690
|
-
} | undefined> | undefined;
|
|
691
|
-
config?: Record<string, any> | undefined;
|
|
692
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
693
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
694
|
-
};
|
|
640
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
695
641
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
696
642
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
697
643
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -787,17 +733,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
787
733
|
fonts?: {
|
|
788
734
|
name: string;
|
|
789
735
|
cssVariable: string;
|
|
790
|
-
provider:
|
|
791
|
-
name: string;
|
|
792
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
793
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
794
|
-
} | Promise<{
|
|
795
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
796
|
-
} | undefined> | undefined;
|
|
797
|
-
config?: Record<string, any> | undefined;
|
|
798
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
799
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
800
|
-
};
|
|
736
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
801
737
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
802
738
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
803
739
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -815,17 +751,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
815
751
|
fonts?: {
|
|
816
752
|
name: string;
|
|
817
753
|
cssVariable: string;
|
|
818
|
-
provider:
|
|
819
|
-
name: string;
|
|
820
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
821
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
822
|
-
} | Promise<{
|
|
823
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
824
|
-
} | undefined> | undefined;
|
|
825
|
-
config?: Record<string, any> | undefined;
|
|
826
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
827
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
828
|
-
};
|
|
754
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
829
755
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
830
756
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
831
757
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1110,17 +1036,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1110
1036
|
fonts?: {
|
|
1111
1037
|
name: string;
|
|
1112
1038
|
cssVariable: string;
|
|
1113
|
-
provider:
|
|
1114
|
-
name: string;
|
|
1115
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1116
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1117
|
-
} | Promise<{
|
|
1118
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1119
|
-
} | undefined> | undefined;
|
|
1120
|
-
config?: Record<string, any> | undefined;
|
|
1121
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1122
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1123
|
-
};
|
|
1039
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
1124
1040
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1125
1041
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1126
1042
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1342,17 +1258,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1342
1258
|
fonts?: {
|
|
1343
1259
|
name: string;
|
|
1344
1260
|
cssVariable: string;
|
|
1345
|
-
provider:
|
|
1346
|
-
name: string;
|
|
1347
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1348
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1349
|
-
} | Promise<{
|
|
1350
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1351
|
-
} | undefined> | undefined;
|
|
1352
|
-
config?: Record<string, any> | undefined;
|
|
1353
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1354
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1355
|
-
};
|
|
1261
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
1356
1262
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1357
1263
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1358
1264
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1556,17 +1462,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1556
1462
|
fonts?: {
|
|
1557
1463
|
name: string;
|
|
1558
1464
|
cssVariable: string;
|
|
1559
|
-
provider:
|
|
1560
|
-
name: string;
|
|
1561
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1562
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1563
|
-
} | Promise<{
|
|
1564
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1565
|
-
} | undefined> | undefined;
|
|
1566
|
-
config?: Record<string, any> | undefined;
|
|
1567
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1568
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1569
|
-
};
|
|
1465
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
1570
1466
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1571
1467
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1572
1468
|
subsets?: [string, ...string[]] | undefined;
|
|
@@ -1788,17 +1684,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1788
1684
|
fonts?: {
|
|
1789
1685
|
name: string;
|
|
1790
1686
|
cssVariable: string;
|
|
1791
|
-
provider:
|
|
1792
|
-
name: string;
|
|
1793
|
-
resolveFont: (options: import("../../../assets/fonts/types.js").ResolveFontOptions<never>) => {
|
|
1794
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1795
|
-
} | Promise<{
|
|
1796
|
-
fonts: Array<import("unifont").FontFaceData>;
|
|
1797
|
-
} | undefined> | undefined;
|
|
1798
|
-
config?: Record<string, any> | undefined;
|
|
1799
|
-
init?: ((context: import("../../../assets/fonts/types.js").FontProviderInitContext) => void | Promise<void>) | undefined;
|
|
1800
|
-
listFonts?: (() => string[] | Promise<string[] | undefined> | undefined) | undefined;
|
|
1801
|
-
};
|
|
1687
|
+
provider: import("../../../index.js").FontProvider<never>;
|
|
1802
1688
|
weights?: [string | number, ...(string | number)[]] | undefined;
|
|
1803
1689
|
styles?: ["normal" | "italic" | "oblique", ...("normal" | "italic" | "oblique")[]] | undefined;
|
|
1804
1690
|
subsets?: [string, ...string[]] | undefined;
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -22,7 +22,7 @@ async function dev(inlineConfig) {
|
|
|
22
22
|
await telemetry.record([]);
|
|
23
23
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
24
24
|
const logger = restart.container.logger;
|
|
25
|
-
const currentVersion = "5.16.
|
|
25
|
+
const currentVersion = "5.16.16";
|
|
26
26
|
const isPrerelease = currentVersion.includes("-");
|
|
27
27
|
if (!isPrerelease) {
|
|
28
28
|
try {
|
|
@@ -154,11 +154,31 @@ const linkRegex = /\[([^[]+)\]\(([^)]*)\)/g;
|
|
|
154
154
|
const boldRegex = /\*\*(.+)\*\*/g;
|
|
155
155
|
const urlRegex = / ((?:https?|ftp):\/\/[-\w+&@#\\/%?=~|!:,.;]*[-\w+&@#\\/%=~|])/gi;
|
|
156
156
|
const codeRegex = /`([^`]+)`/g;
|
|
157
|
+
function isAllowedUrl(url) {
|
|
158
|
+
const trimmedUrl = url.trim();
|
|
159
|
+
if (!trimmedUrl) return false;
|
|
160
|
+
try {
|
|
161
|
+
const parsedUrl = new URL(trimmedUrl);
|
|
162
|
+
return ["http:", "https:"].includes(parsedUrl.protocol);
|
|
163
|
+
} catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
157
167
|
function renderErrorMarkdown(markdown, target) {
|
|
158
168
|
if (target === "html") {
|
|
159
|
-
return escape(markdown).replace(linkRegex,
|
|
169
|
+
return escape(markdown).replace(linkRegex, (_match, text, url) => {
|
|
170
|
+
if (!isAllowedUrl(url)) {
|
|
171
|
+
return text;
|
|
172
|
+
}
|
|
173
|
+
return `<a href="${url}" target="_blank">${text}</a>`;
|
|
174
|
+
}).replace(boldRegex, "<b>$1</b>").replace(urlRegex, ' <a href="$1" target="_blank">$1</a>').replace(codeRegex, "<code>$1</code>");
|
|
160
175
|
} else {
|
|
161
|
-
return markdown.replace(linkRegex, (_, m1, m2) =>
|
|
176
|
+
return markdown.replace(linkRegex, (_, m1, m2) => {
|
|
177
|
+
if (!isAllowedUrl(m2)) {
|
|
178
|
+
return `${colors.bold(m1)} ${m2}`;
|
|
179
|
+
}
|
|
180
|
+
return `${colors.bold(m1)} ${colors.underline(m2)}`;
|
|
181
|
+
}).replace(urlRegex, (fullMatch) => ` ${colors.underline(fullMatch.trim())}`).replace(boldRegex, (_, m1) => `${colors.bold(m1)}`);
|
|
162
182
|
}
|
|
163
183
|
}
|
|
164
184
|
export {
|
package/dist/core/messages.js
CHANGED
|
@@ -38,7 +38,7 @@ function serverStart({
|
|
|
38
38
|
host,
|
|
39
39
|
base
|
|
40
40
|
}) {
|
|
41
|
-
const version = "5.16.
|
|
41
|
+
const version = "5.16.16";
|
|
42
42
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
43
43
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
44
44
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -275,7 +275,7 @@ function printHelp({
|
|
|
275
275
|
message.push(
|
|
276
276
|
linebreak(),
|
|
277
277
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
278
|
-
`v${"5.16.
|
|
278
|
+
`v${"5.16.16"}`
|
|
279
279
|
)} ${headline}`
|
|
280
280
|
);
|
|
281
281
|
}
|
|
@@ -48,7 +48,7 @@ async function getRequestData(request) {
|
|
|
48
48
|
}
|
|
49
49
|
const encryptedSlots = params.get("s");
|
|
50
50
|
return {
|
|
51
|
-
|
|
51
|
+
encryptedComponentExport: params.get("e"),
|
|
52
52
|
encryptedProps: params.get("p"),
|
|
53
53
|
encryptedSlots
|
|
54
54
|
};
|
|
@@ -60,6 +60,11 @@ async function getRequestData(request) {
|
|
|
60
60
|
if ("slots" in data && typeof data.slots === "object") {
|
|
61
61
|
return badRequest("Plaintext slots are not allowed. Slots must be encrypted.");
|
|
62
62
|
}
|
|
63
|
+
if ("componentExport" in data && typeof data.componentExport === "string") {
|
|
64
|
+
return badRequest(
|
|
65
|
+
"Plaintext componentExport is not allowed. componentExport must be encrypted."
|
|
66
|
+
);
|
|
67
|
+
}
|
|
63
68
|
return data;
|
|
64
69
|
} catch (e) {
|
|
65
70
|
if (e instanceof SyntaxError) {
|
|
@@ -95,6 +100,12 @@ function createEndpoint(manifest) {
|
|
|
95
100
|
});
|
|
96
101
|
}
|
|
97
102
|
const key = await manifest.key;
|
|
103
|
+
let componentExport;
|
|
104
|
+
try {
|
|
105
|
+
componentExport = await decryptString(key, data.encryptedComponentExport);
|
|
106
|
+
} catch (_e) {
|
|
107
|
+
return badRequest("Encrypted componentExport value is invalid.");
|
|
108
|
+
}
|
|
98
109
|
const encryptedProps = data.encryptedProps;
|
|
99
110
|
let props = {};
|
|
100
111
|
if (encryptedProps !== "") {
|
|
@@ -116,7 +127,7 @@ function createEndpoint(manifest) {
|
|
|
116
127
|
}
|
|
117
128
|
}
|
|
118
129
|
const componentModule = await imp();
|
|
119
|
-
let Component = componentModule[
|
|
130
|
+
let Component = componentModule[componentExport];
|
|
120
131
|
const slots = {};
|
|
121
132
|
for (const prop in decryptedSlots) {
|
|
122
133
|
slots[prop] = createSlotValueFromString(decryptedSlots[prop]);
|
|
@@ -20,9 +20,9 @@ const COMMENT_REPLACER = "\\u003C!--";
|
|
|
20
20
|
function safeJsonStringify(obj) {
|
|
21
21
|
return JSON.stringify(obj).replace(SCRIPT_RE, SCRIPT_REPLACER).replace(COMMENT_RE, COMMENT_REPLACER);
|
|
22
22
|
}
|
|
23
|
-
function createSearchParams(
|
|
23
|
+
function createSearchParams(encryptedComponentExport, encryptedProps, slots) {
|
|
24
24
|
const params = new URLSearchParams();
|
|
25
|
-
params.set("e",
|
|
25
|
+
params.set("e", encryptedComponentExport);
|
|
26
26
|
params.set("p", encryptedProps);
|
|
27
27
|
params.set("s", slots);
|
|
28
28
|
return params;
|
|
@@ -124,13 +124,14 @@ class ServerIslandComponent {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
const key = await this.result.key;
|
|
127
|
+
const componentExportEncrypted = await encryptString(key, componentExport);
|
|
127
128
|
const propsEncrypted = Object.keys(this.props).length === 0 ? "" : await encryptString(key, JSON.stringify(this.props));
|
|
128
129
|
const slotsEncrypted = Object.keys(renderedSlots).length === 0 ? "" : await encryptString(key, JSON.stringify(renderedSlots));
|
|
129
130
|
const hostId = await this.getHostId();
|
|
130
131
|
const slash = this.result.base.endsWith("/") ? "" : "/";
|
|
131
132
|
let serverIslandUrl = `${this.result.base}${slash}_server-islands/${componentId}${this.result.trailingSlash === "always" ? "/" : ""}`;
|
|
132
133
|
const potentialSearchParams = createSearchParams(
|
|
133
|
-
|
|
134
|
+
componentExportEncrypted,
|
|
134
135
|
propsEncrypted,
|
|
135
136
|
slotsEncrypted
|
|
136
137
|
);
|
|
@@ -152,7 +153,7 @@ let response = await fetch('${serverIslandUrl}', { headers });`
|
|
|
152
153
|
) : (
|
|
153
154
|
// POST request
|
|
154
155
|
`let data = {
|
|
155
|
-
|
|
156
|
+
encryptedComponentExport: ${safeJsonStringify(componentExportEncrypted)},
|
|
156
157
|
encryptedProps: ${safeJsonStringify(propsEncrypted)},
|
|
157
158
|
encryptedSlots: ${safeJsonStringify(slotsEncrypted)},
|
|
158
159
|
};
|
|
@@ -269,7 +269,7 @@ export interface AstroSharedContext<Props extends Record<string, any> = Record<s
|
|
|
269
269
|
* ```astro
|
|
270
270
|
* import { actions } from 'astro:actions';
|
|
271
271
|
*
|
|
272
|
-
* const result =
|
|
272
|
+
* const result = Astro.getActionResult(actions.myAction);
|
|
273
273
|
* ```
|
|
274
274
|
*
|
|
275
275
|
* [Astro reference](https://docs.astro.build/en/reference/api-reference/#getactionresult)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.16",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -154,9 +154,9 @@
|
|
|
154
154
|
"zod": "^3.25.76",
|
|
155
155
|
"zod-to-json-schema": "^3.25.1",
|
|
156
156
|
"zod-to-ts": "^1.2.0",
|
|
157
|
-
"@astrojs/
|
|
157
|
+
"@astrojs/markdown-remark": "6.3.10",
|
|
158
158
|
"@astrojs/telemetry": "3.3.0",
|
|
159
|
-
"@astrojs/
|
|
159
|
+
"@astrojs/internal-helpers": "0.7.5"
|
|
160
160
|
},
|
|
161
161
|
"optionalDependencies": {
|
|
162
162
|
"sharp": "^0.34.0"
|