astro 5.9.3 → 5.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/client.d.ts +1 -3
- package/components/Image.astro +5 -6
- package/components/Picture.astro +5 -5
- package/components/ResponsivePicture.astro +1 -0
- package/dist/actions/integration.d.ts +2 -1
- package/dist/actions/integration.js +3 -2
- package/dist/actions/utils.d.ts +1 -1
- package/dist/actions/utils.js +9 -8
- package/dist/assets/internal.d.ts +1 -5
- package/dist/assets/internal.js +21 -23
- package/dist/assets/types.d.ts +4 -4
- package/dist/assets/vite-plugin-assets.js +2 -2
- package/dist/content/config.d.ts +74 -0
- package/dist/content/config.js +78 -0
- package/dist/content/consts.d.ts +1 -0
- package/dist/content/consts.js +2 -0
- package/dist/content/content-layer.js +3 -3
- package/dist/content/loaders/errors.d.ts +20 -0
- package/dist/content/loaders/errors.js +64 -0
- package/dist/content/loaders/types.d.ts +21 -0
- package/dist/content/runtime.d.ts +23 -7
- package/dist/content/runtime.js +218 -28
- package/dist/content/types-generator.js +11 -4
- package/dist/content/utils.d.ts +37 -1
- package/dist/content/utils.js +29 -8
- package/dist/content/vite-plugin-content-virtual-mod.d.ts +1 -1
- package/dist/content/vite-plugin-content-virtual-mod.js +20 -6
- package/dist/core/config/schemas/base.d.ts +44 -44
- package/dist/core/config/schemas/base.js +9 -9
- package/dist/core/config/schemas/refined.js +0 -7
- package/dist/core/config/schemas/relative.d.ts +58 -58
- package/dist/core/constants.js +1 -1
- package/dist/core/csp/config.d.ts +3 -3
- package/dist/core/csp/config.js +1 -0
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/errors-data.d.ts +16 -0
- package/dist/core/errors/errors-data.js +15 -4
- package/dist/core/errors/errors.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/session.d.ts +1 -1
- package/dist/core/session.js +10 -9
- package/dist/integrations/hooks.js +5 -2
- package/dist/runtime/client/dev-toolbar/apps/astro.js +4 -6
- package/dist/runtime/server/render/csp.js +1 -1
- package/dist/types/public/config.d.ts +40 -131
- package/dist/types/public/content.d.ts +30 -0
- package/package.json +4 -3
- package/templates/content/module.mjs +14 -0
- package/templates/content/types.d.ts +43 -0
- package/types/content.d.ts +23 -80
|
@@ -41,7 +41,7 @@ export declare const ASTRO_CONFIG_DEFAULTS: {
|
|
|
41
41
|
entrypoint: "astro/assets/services/sharp";
|
|
42
42
|
config: {};
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
responsiveStyles: false;
|
|
45
45
|
};
|
|
46
46
|
devToolbar: {
|
|
47
47
|
enabled: true;
|
|
@@ -71,9 +71,9 @@ export declare const ASTRO_CONFIG_DEFAULTS: {
|
|
|
71
71
|
experimental: {
|
|
72
72
|
clientPrerender: false;
|
|
73
73
|
contentIntellisense: false;
|
|
74
|
-
responsiveImages: false;
|
|
75
74
|
headingIdCompat: false;
|
|
76
75
|
preserveScriptOrder: false;
|
|
76
|
+
liveContentCollections: false;
|
|
77
77
|
csp: false;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
@@ -242,13 +242,13 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
242
242
|
hostname?: string | undefined;
|
|
243
243
|
pathname?: string | undefined;
|
|
244
244
|
}>, "many">>;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
layout: z.ZodOptional<z.ZodEnum<["constrained", "fixed", "full-width", "none"]>>;
|
|
246
|
+
objectFit: z.ZodOptional<z.ZodString>;
|
|
247
|
+
objectPosition: z.ZodOptional<z.ZodString>;
|
|
248
|
+
breakpoints: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
249
|
+
responsiveStyles: z.ZodDefault<z.ZodBoolean>;
|
|
250
250
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
-
|
|
251
|
+
responsiveStyles: boolean;
|
|
252
252
|
endpoint: {
|
|
253
253
|
route: string;
|
|
254
254
|
entrypoint?: string | undefined;
|
|
@@ -264,12 +264,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
264
264
|
hostname?: string | undefined;
|
|
265
265
|
pathname?: string | undefined;
|
|
266
266
|
}[];
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
268
|
+
objectFit?: string | undefined;
|
|
269
|
+
objectPosition?: string | undefined;
|
|
270
|
+
breakpoints?: number[] | undefined;
|
|
271
271
|
}, {
|
|
272
|
-
|
|
272
|
+
responsiveStyles?: boolean | undefined;
|
|
273
273
|
endpoint?: {
|
|
274
274
|
entrypoint?: string | undefined;
|
|
275
275
|
route?: string | undefined;
|
|
@@ -285,10 +285,10 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
285
285
|
hostname?: string | undefined;
|
|
286
286
|
pathname?: string | undefined;
|
|
287
287
|
}[] | undefined;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
289
|
+
objectFit?: string | undefined;
|
|
290
|
+
objectPosition?: string | undefined;
|
|
291
|
+
breakpoints?: number[] | undefined;
|
|
292
292
|
}>>;
|
|
293
293
|
devToolbar: z.ZodDefault<z.ZodObject<{
|
|
294
294
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -659,7 +659,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
659
659
|
})> | undefined;
|
|
660
660
|
}>>>;
|
|
661
661
|
session: z.ZodOptional<z.ZodObject<{
|
|
662
|
-
driver: z.ZodString
|
|
662
|
+
driver: z.ZodOptional<z.ZodString>;
|
|
663
663
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
664
664
|
cookie: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
665
665
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -699,8 +699,8 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
699
699
|
}>>;
|
|
700
700
|
ttl: z.ZodOptional<z.ZodNumber>;
|
|
701
701
|
}, "strip", z.ZodTypeAny, {
|
|
702
|
-
driver: string;
|
|
703
702
|
options?: Record<string, any> | undefined;
|
|
703
|
+
driver?: string | undefined;
|
|
704
704
|
cookie?: {
|
|
705
705
|
name?: string | undefined;
|
|
706
706
|
path?: string | undefined;
|
|
@@ -711,8 +711,8 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
711
711
|
} | undefined;
|
|
712
712
|
ttl?: number | undefined;
|
|
713
713
|
}, {
|
|
714
|
-
driver: string;
|
|
715
714
|
options?: Record<string, any> | undefined;
|
|
715
|
+
driver?: string | undefined;
|
|
716
716
|
cookie?: string | {
|
|
717
717
|
name?: string | undefined;
|
|
718
718
|
path?: string | undefined;
|
|
@@ -726,7 +726,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
726
726
|
experimental: z.ZodDefault<z.ZodObject<{
|
|
727
727
|
clientPrerender: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
728
728
|
contentIntellisense: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
729
|
-
responsiveImages: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
730
729
|
headingIdCompat: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
731
730
|
preserveScriptOrder: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
732
731
|
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -924,9 +923,10 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
924
923
|
variationSettings?: string | undefined;
|
|
925
924
|
unicodeRange?: [string, ...string[]] | undefined;
|
|
926
925
|
}>]>, "many">>;
|
|
926
|
+
liveContentCollections: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
927
927
|
csp: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodDefault<z.ZodOptional<z.ZodBoolean>>, z.ZodObject<{
|
|
928
928
|
algorithm: z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "SHA-384", "SHA-512"]>>>;
|
|
929
|
-
directives: z.ZodOptional<z.ZodArray<z.ZodType<`base-uri
|
|
929
|
+
directives: z.ZodOptional<z.ZodArray<z.ZodType<`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`, z.ZodTypeDef, `base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`>, "many">>;
|
|
930
930
|
styleDirective: z.ZodOptional<z.ZodObject<{
|
|
931
931
|
resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
932
932
|
hashes: z.ZodOptional<z.ZodArray<z.ZodType<`sha256-${string}` | `sha384-${string}` | `sha512-${string}`, z.ZodTypeDef, `sha256-${string}` | `sha384-${string}` | `sha512-${string}`>, "many">>;
|
|
@@ -952,7 +952,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
952
952
|
}>>;
|
|
953
953
|
}, "strip", z.ZodTypeAny, {
|
|
954
954
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
955
|
-
directives?: (`base-uri
|
|
955
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
956
956
|
styleDirective?: {
|
|
957
957
|
resources?: string[] | undefined;
|
|
958
958
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -964,7 +964,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
964
964
|
} | undefined;
|
|
965
965
|
}, {
|
|
966
966
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
967
|
-
directives?: (`base-uri
|
|
967
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
968
968
|
styleDirective?: {
|
|
969
969
|
resources?: string[] | undefined;
|
|
970
970
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -978,12 +978,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
978
978
|
}, "strict", z.ZodTypeAny, {
|
|
979
979
|
clientPrerender: boolean;
|
|
980
980
|
contentIntellisense: boolean;
|
|
981
|
-
responsiveImages: boolean;
|
|
982
981
|
headingIdCompat: boolean;
|
|
983
982
|
preserveScriptOrder: boolean;
|
|
983
|
+
liveContentCollections: boolean;
|
|
984
984
|
csp: boolean | {
|
|
985
985
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
986
|
-
directives?: (`base-uri
|
|
986
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
987
987
|
styleDirective?: {
|
|
988
988
|
resources?: string[] | undefined;
|
|
989
989
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1107,12 +1107,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1107
1107
|
})[] | undefined;
|
|
1108
1108
|
clientPrerender?: boolean | undefined;
|
|
1109
1109
|
contentIntellisense?: boolean | undefined;
|
|
1110
|
-
responsiveImages?: boolean | undefined;
|
|
1111
1110
|
headingIdCompat?: boolean | undefined;
|
|
1112
1111
|
preserveScriptOrder?: boolean | undefined;
|
|
1112
|
+
liveContentCollections?: boolean | undefined;
|
|
1113
1113
|
csp?: boolean | {
|
|
1114
1114
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
1115
|
-
directives?: (`base-uri
|
|
1115
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
1116
1116
|
styleDirective?: {
|
|
1117
1117
|
resources?: string[] | undefined;
|
|
1118
1118
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1215,7 +1215,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1215
1215
|
})>;
|
|
1216
1216
|
};
|
|
1217
1217
|
image: {
|
|
1218
|
-
|
|
1218
|
+
responsiveStyles: boolean;
|
|
1219
1219
|
endpoint: {
|
|
1220
1220
|
route: string;
|
|
1221
1221
|
entrypoint?: string | undefined;
|
|
@@ -1231,10 +1231,10 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1231
1231
|
hostname?: string | undefined;
|
|
1232
1232
|
pathname?: string | undefined;
|
|
1233
1233
|
}[];
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1234
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
1235
|
+
objectFit?: string | undefined;
|
|
1236
|
+
objectPosition?: string | undefined;
|
|
1237
|
+
breakpoints?: number[] | undefined;
|
|
1238
1238
|
};
|
|
1239
1239
|
server: {
|
|
1240
1240
|
host: string | boolean;
|
|
@@ -1266,12 +1266,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1266
1266
|
experimental: {
|
|
1267
1267
|
clientPrerender: boolean;
|
|
1268
1268
|
contentIntellisense: boolean;
|
|
1269
|
-
responsiveImages: boolean;
|
|
1270
1269
|
headingIdCompat: boolean;
|
|
1271
1270
|
preserveScriptOrder: boolean;
|
|
1271
|
+
liveContentCollections: boolean;
|
|
1272
1272
|
csp: boolean | {
|
|
1273
1273
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
1274
|
-
directives?: (`base-uri
|
|
1274
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
1275
1275
|
styleDirective?: {
|
|
1276
1276
|
resources?: string[] | undefined;
|
|
1277
1277
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1342,8 +1342,8 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1342
1342
|
collections: boolean;
|
|
1343
1343
|
};
|
|
1344
1344
|
session?: {
|
|
1345
|
-
driver: string;
|
|
1346
1345
|
options?: Record<string, any> | undefined;
|
|
1346
|
+
driver?: string | undefined;
|
|
1347
1347
|
cookie?: {
|
|
1348
1348
|
name?: string | undefined;
|
|
1349
1349
|
path?: string | undefined;
|
|
@@ -1421,8 +1421,8 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1421
1421
|
destination: string;
|
|
1422
1422
|
}> | undefined;
|
|
1423
1423
|
session?: {
|
|
1424
|
-
driver: string;
|
|
1425
1424
|
options?: Record<string, any> | undefined;
|
|
1425
|
+
driver?: string | undefined;
|
|
1426
1426
|
cookie?: string | {
|
|
1427
1427
|
name?: string | undefined;
|
|
1428
1428
|
path?: string | undefined;
|
|
@@ -1480,7 +1480,7 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1480
1480
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1481
1481
|
} | undefined;
|
|
1482
1482
|
image?: {
|
|
1483
|
-
|
|
1483
|
+
responsiveStyles?: boolean | undefined;
|
|
1484
1484
|
endpoint?: {
|
|
1485
1485
|
entrypoint?: string | undefined;
|
|
1486
1486
|
route?: string | undefined;
|
|
@@ -1496,10 +1496,10 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1496
1496
|
hostname?: string | undefined;
|
|
1497
1497
|
pathname?: string | undefined;
|
|
1498
1498
|
}[] | undefined;
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1499
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
1500
|
+
objectFit?: string | undefined;
|
|
1501
|
+
objectPosition?: string | undefined;
|
|
1502
|
+
breakpoints?: number[] | undefined;
|
|
1503
1503
|
} | undefined;
|
|
1504
1504
|
server?: unknown;
|
|
1505
1505
|
srcDir?: string | undefined;
|
|
@@ -1594,12 +1594,12 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
1594
1594
|
})[] | undefined;
|
|
1595
1595
|
clientPrerender?: boolean | undefined;
|
|
1596
1596
|
contentIntellisense?: boolean | undefined;
|
|
1597
|
-
responsiveImages?: boolean | undefined;
|
|
1598
1597
|
headingIdCompat?: boolean | undefined;
|
|
1599
1598
|
preserveScriptOrder?: boolean | undefined;
|
|
1599
|
+
liveContentCollections?: boolean | undefined;
|
|
1600
1600
|
csp?: boolean | {
|
|
1601
1601
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
1602
|
-
directives?: (`base-uri
|
|
1602
|
+
directives?: (`base-uri${string}` | `child-src${string}` | `connect-src${string}` | `default-src${string}` | `fenced-frame-src${string}` | `font-src${string}` | `form-action${string}` | `frame-ancestors${string}` | `frame-src${string}` | `img-src${string}` | `manifest-src${string}` | `media-src${string}` | `object-src${string}` | `referrer${string}` | `report-to${string}` | `report-uri${string}` | `require-trusted-types-for${string}` | `sandbox${string}` | `trusted-types${string}` | `upgrade-insecure-requests${string}` | `worker-src${string}`)[] | undefined;
|
|
1603
1603
|
styleDirective?: {
|
|
1604
1604
|
resources?: string[] | undefined;
|
|
1605
1605
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -25,7 +25,7 @@ const ASTRO_CONFIG_DEFAULTS = {
|
|
|
25
25
|
image: {
|
|
26
26
|
endpoint: { entrypoint: void 0, route: "/_image" },
|
|
27
27
|
service: { entrypoint: "astro/assets/services/sharp", config: {} },
|
|
28
|
-
|
|
28
|
+
responsiveStyles: false
|
|
29
29
|
},
|
|
30
30
|
devToolbar: {
|
|
31
31
|
enabled: true
|
|
@@ -55,9 +55,9 @@ const ASTRO_CONFIG_DEFAULTS = {
|
|
|
55
55
|
experimental: {
|
|
56
56
|
clientPrerender: false,
|
|
57
57
|
contentIntellisense: false,
|
|
58
|
-
responsiveImages: false,
|
|
59
58
|
headingIdCompat: false,
|
|
60
59
|
preserveScriptOrder: false,
|
|
60
|
+
liveContentCollections: false,
|
|
61
61
|
csp: false
|
|
62
62
|
}
|
|
63
63
|
};
|
|
@@ -149,11 +149,11 @@ const AstroConfigSchema = z.object({
|
|
|
149
149
|
pathname: z.string().optional()
|
|
150
150
|
})
|
|
151
151
|
).default([]),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
layout: z.enum(["constrained", "fixed", "full-width", "none"]).optional(),
|
|
153
|
+
objectFit: z.string().optional(),
|
|
154
|
+
objectPosition: z.string().optional(),
|
|
155
|
+
breakpoints: z.array(z.number()).optional(),
|
|
156
|
+
responsiveStyles: z.boolean().default(ASTRO_CONFIG_DEFAULTS.image.responsiveStyles)
|
|
157
157
|
}).default(ASTRO_CONFIG_DEFAULTS.image),
|
|
158
158
|
devToolbar: z.object({
|
|
159
159
|
enabled: z.boolean().default(ASTRO_CONFIG_DEFAULTS.devToolbar.enabled)
|
|
@@ -244,7 +244,7 @@ const AstroConfigSchema = z.object({
|
|
|
244
244
|
validateSecrets: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.env.validateSecrets)
|
|
245
245
|
}).strict().optional().default(ASTRO_CONFIG_DEFAULTS.env),
|
|
246
246
|
session: z.object({
|
|
247
|
-
driver: z.string(),
|
|
247
|
+
driver: z.string().optional(),
|
|
248
248
|
options: z.record(z.any()).optional(),
|
|
249
249
|
cookie: z.object({
|
|
250
250
|
name: z.string().optional(),
|
|
@@ -264,10 +264,10 @@ const AstroConfigSchema = z.object({
|
|
|
264
264
|
experimental: z.object({
|
|
265
265
|
clientPrerender: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.clientPrerender),
|
|
266
266
|
contentIntellisense: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.contentIntellisense),
|
|
267
|
-
responsiveImages: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.responsiveImages),
|
|
268
267
|
headingIdCompat: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.headingIdCompat),
|
|
269
268
|
preserveScriptOrder: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.preserveScriptOrder),
|
|
270
269
|
fonts: z.array(z.union([localFontFamilySchema, remoteFontFamilySchema])).optional(),
|
|
270
|
+
liveContentCollections: z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.liveContentCollections),
|
|
271
271
|
csp: z.union([
|
|
272
272
|
z.boolean().optional().default(ASTRO_CONFIG_DEFAULTS.experimental.csp),
|
|
273
273
|
z.object({
|
|
@@ -128,13 +128,6 @@ const AstroConfigRefinedSchema = z.custom().superRefine((config, ctx) => {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
if (!config.experimental.responsiveImages && (config.image.experimentalLayout || config.image.experimentalObjectFit || config.image.experimentalObjectPosition || config.image.experimentalBreakpoints)) {
|
|
132
|
-
ctx.addIssue({
|
|
133
|
-
code: z.ZodIssueCode.custom,
|
|
134
|
-
message: "The `experimentalLayout`, `experimentalObjectFit`, `experimentalObjectPosition` and `experimentalBreakpoints` options are only available when `experimental.responsiveImages` is enabled.",
|
|
135
|
-
path: ["experimental", "responsiveImages"]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
131
|
if (config.experimental.fonts && config.experimental.fonts.length > 0) {
|
|
139
132
|
for (let i = 0; i < config.experimental.fonts.length; i++) {
|
|
140
133
|
const { cssVariable } = config.experimental.fonts[i];
|