astro 5.9.4 → 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 +39 -39
- package/dist/core/config/schemas/base.js +8 -8
- package/dist/core/config/schemas/refined.js +0 -7
- package/dist/core/config/schemas/relative.d.ts +51 -51
- 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/integrations/hooks.js +5 -2
- package/dist/runtime/client/dev-toolbar/apps/astro.js +4 -6
- package/dist/types/public/config.d.ts +39 -130
- package/dist/types/public/content.d.ts +30 -0
- package/package.json +2 -1
- 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>;
|
|
@@ -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;
|
|
@@ -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)
|
|
@@ -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];
|
|
@@ -165,13 +165,13 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
165
165
|
hostname?: string | undefined;
|
|
166
166
|
pathname?: string | undefined;
|
|
167
167
|
}>, "many">>;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
layout: z.ZodOptional<z.ZodEnum<["constrained", "fixed", "full-width", "none"]>>;
|
|
169
|
+
objectFit: z.ZodOptional<z.ZodString>;
|
|
170
|
+
objectPosition: z.ZodOptional<z.ZodString>;
|
|
171
|
+
breakpoints: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
172
|
+
responsiveStyles: z.ZodDefault<z.ZodBoolean>;
|
|
173
173
|
}, "strip", z.ZodTypeAny, {
|
|
174
|
-
|
|
174
|
+
responsiveStyles: boolean;
|
|
175
175
|
endpoint: {
|
|
176
176
|
route: string;
|
|
177
177
|
entrypoint?: string | undefined;
|
|
@@ -187,12 +187,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
187
187
|
hostname?: string | undefined;
|
|
188
188
|
pathname?: string | undefined;
|
|
189
189
|
}[];
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
191
|
+
objectFit?: string | undefined;
|
|
192
|
+
objectPosition?: string | undefined;
|
|
193
|
+
breakpoints?: number[] | undefined;
|
|
194
194
|
}, {
|
|
195
|
-
|
|
195
|
+
responsiveStyles?: boolean | undefined;
|
|
196
196
|
endpoint?: {
|
|
197
197
|
entrypoint?: string | undefined;
|
|
198
198
|
route?: string | undefined;
|
|
@@ -208,10 +208,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
208
208
|
hostname?: string | undefined;
|
|
209
209
|
pathname?: string | undefined;
|
|
210
210
|
}[] | undefined;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
212
|
+
objectFit?: string | undefined;
|
|
213
|
+
objectPosition?: string | undefined;
|
|
214
|
+
breakpoints?: number[] | undefined;
|
|
215
215
|
}>>;
|
|
216
216
|
devToolbar: z.ZodDefault<z.ZodObject<{
|
|
217
217
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -649,7 +649,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
649
649
|
experimental: z.ZodDefault<z.ZodObject<{
|
|
650
650
|
clientPrerender: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
651
651
|
contentIntellisense: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
652
|
-
responsiveImages: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
653
652
|
headingIdCompat: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
654
653
|
preserveScriptOrder: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
655
654
|
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -847,9 +846,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
847
846
|
variationSettings?: string | undefined;
|
|
848
847
|
unicodeRange?: [string, ...string[]] | undefined;
|
|
849
848
|
}>]>, "many">>;
|
|
849
|
+
liveContentCollections: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
850
850
|
csp: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodDefault<z.ZodOptional<z.ZodBoolean>>, z.ZodObject<{
|
|
851
851
|
algorithm: z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "SHA-384", "SHA-512"]>>>;
|
|
852
|
-
directives: z.ZodOptional<z.ZodArray<z.ZodType<`base-uri
|
|
852
|
+
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">>;
|
|
853
853
|
styleDirective: z.ZodOptional<z.ZodObject<{
|
|
854
854
|
resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
855
855
|
hashes: z.ZodOptional<z.ZodArray<z.ZodType<`sha256-${string}` | `sha384-${string}` | `sha512-${string}`, z.ZodTypeDef, `sha256-${string}` | `sha384-${string}` | `sha512-${string}`>, "many">>;
|
|
@@ -875,7 +875,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
875
875
|
}>>;
|
|
876
876
|
}, "strip", z.ZodTypeAny, {
|
|
877
877
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
878
|
-
directives?: (`base-uri
|
|
878
|
+
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;
|
|
879
879
|
styleDirective?: {
|
|
880
880
|
resources?: string[] | undefined;
|
|
881
881
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -887,7 +887,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
887
887
|
} | undefined;
|
|
888
888
|
}, {
|
|
889
889
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
890
|
-
directives?: (`base-uri
|
|
890
|
+
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;
|
|
891
891
|
styleDirective?: {
|
|
892
892
|
resources?: string[] | undefined;
|
|
893
893
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -901,12 +901,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
901
901
|
}, "strict", z.ZodTypeAny, {
|
|
902
902
|
clientPrerender: boolean;
|
|
903
903
|
contentIntellisense: boolean;
|
|
904
|
-
responsiveImages: boolean;
|
|
905
904
|
headingIdCompat: boolean;
|
|
906
905
|
preserveScriptOrder: boolean;
|
|
906
|
+
liveContentCollections: boolean;
|
|
907
907
|
csp: boolean | {
|
|
908
908
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
909
|
-
directives?: (`base-uri
|
|
909
|
+
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;
|
|
910
910
|
styleDirective?: {
|
|
911
911
|
resources?: string[] | undefined;
|
|
912
912
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1030,12 +1030,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1030
1030
|
})[] | undefined;
|
|
1031
1031
|
clientPrerender?: boolean | undefined;
|
|
1032
1032
|
contentIntellisense?: boolean | undefined;
|
|
1033
|
-
responsiveImages?: boolean | undefined;
|
|
1034
1033
|
headingIdCompat?: boolean | undefined;
|
|
1035
1034
|
preserveScriptOrder?: boolean | undefined;
|
|
1035
|
+
liveContentCollections?: boolean | undefined;
|
|
1036
1036
|
csp?: boolean | {
|
|
1037
1037
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
1038
|
-
directives?: (`base-uri
|
|
1038
|
+
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;
|
|
1039
1039
|
styleDirective?: {
|
|
1040
1040
|
resources?: string[] | undefined;
|
|
1041
1041
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1215,7 +1215,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
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 function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
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;
|
|
@@ -1267,12 +1267,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1267
1267
|
experimental: {
|
|
1268
1268
|
clientPrerender: boolean;
|
|
1269
1269
|
contentIntellisense: boolean;
|
|
1270
|
-
responsiveImages: boolean;
|
|
1271
1270
|
headingIdCompat: boolean;
|
|
1272
1271
|
preserveScriptOrder: boolean;
|
|
1272
|
+
liveContentCollections: boolean;
|
|
1273
1273
|
csp: boolean | {
|
|
1274
1274
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
1275
|
-
directives?: (`base-uri
|
|
1275
|
+
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;
|
|
1276
1276
|
styleDirective?: {
|
|
1277
1277
|
resources?: string[] | undefined;
|
|
1278
1278
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1481,7 +1481,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1481
1481
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1482
1482
|
} | undefined;
|
|
1483
1483
|
image?: {
|
|
1484
|
-
|
|
1484
|
+
responsiveStyles?: boolean | undefined;
|
|
1485
1485
|
endpoint?: {
|
|
1486
1486
|
entrypoint?: string | undefined;
|
|
1487
1487
|
route?: string | undefined;
|
|
@@ -1497,10 +1497,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1497
1497
|
hostname?: string | undefined;
|
|
1498
1498
|
pathname?: string | undefined;
|
|
1499
1499
|
}[] | undefined;
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1500
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
1501
|
+
objectFit?: string | undefined;
|
|
1502
|
+
objectPosition?: string | undefined;
|
|
1503
|
+
breakpoints?: number[] | undefined;
|
|
1504
1504
|
} | undefined;
|
|
1505
1505
|
server?: unknown;
|
|
1506
1506
|
srcDir?: string | undefined;
|
|
@@ -1595,12 +1595,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1595
1595
|
})[] | undefined;
|
|
1596
1596
|
clientPrerender?: boolean | undefined;
|
|
1597
1597
|
contentIntellisense?: boolean | undefined;
|
|
1598
|
-
responsiveImages?: boolean | undefined;
|
|
1599
1598
|
headingIdCompat?: boolean | undefined;
|
|
1600
1599
|
preserveScriptOrder?: boolean | undefined;
|
|
1600
|
+
liveContentCollections?: boolean | undefined;
|
|
1601
1601
|
csp?: boolean | {
|
|
1602
1602
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
1603
|
-
directives?: (`base-uri
|
|
1603
|
+
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;
|
|
1604
1604
|
styleDirective?: {
|
|
1605
1605
|
resources?: string[] | undefined;
|
|
1606
1606
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1699,7 +1699,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1699
1699
|
})>;
|
|
1700
1700
|
};
|
|
1701
1701
|
image: {
|
|
1702
|
-
|
|
1702
|
+
responsiveStyles: boolean;
|
|
1703
1703
|
endpoint: {
|
|
1704
1704
|
route: string;
|
|
1705
1705
|
entrypoint?: string | undefined;
|
|
@@ -1715,10 +1715,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1715
1715
|
hostname?: string | undefined;
|
|
1716
1716
|
pathname?: string | undefined;
|
|
1717
1717
|
}[];
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1718
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
1719
|
+
objectFit?: string | undefined;
|
|
1720
|
+
objectPosition?: string | undefined;
|
|
1721
|
+
breakpoints?: number[] | undefined;
|
|
1722
1722
|
};
|
|
1723
1723
|
server: {
|
|
1724
1724
|
host: string | boolean;
|
|
@@ -1751,12 +1751,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1751
1751
|
experimental: {
|
|
1752
1752
|
clientPrerender: boolean;
|
|
1753
1753
|
contentIntellisense: boolean;
|
|
1754
|
-
responsiveImages: boolean;
|
|
1755
1754
|
headingIdCompat: boolean;
|
|
1756
1755
|
preserveScriptOrder: boolean;
|
|
1756
|
+
liveContentCollections: boolean;
|
|
1757
1757
|
csp: boolean | {
|
|
1758
1758
|
algorithm: "SHA-256" | "SHA-384" | "SHA-512";
|
|
1759
|
-
directives?: (`base-uri
|
|
1759
|
+
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;
|
|
1760
1760
|
styleDirective?: {
|
|
1761
1761
|
resources?: string[] | undefined;
|
|
1762
1762
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
|
@@ -1965,7 +1965,7 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1965
1965
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1966
1966
|
} | undefined;
|
|
1967
1967
|
image?: {
|
|
1968
|
-
|
|
1968
|
+
responsiveStyles?: boolean | undefined;
|
|
1969
1969
|
endpoint?: {
|
|
1970
1970
|
entrypoint?: string | undefined;
|
|
1971
1971
|
route?: string | undefined;
|
|
@@ -1981,10 +1981,10 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1981
1981
|
hostname?: string | undefined;
|
|
1982
1982
|
pathname?: string | undefined;
|
|
1983
1983
|
}[] | undefined;
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1984
|
+
layout?: "fixed" | "constrained" | "full-width" | "none" | undefined;
|
|
1985
|
+
objectFit?: string | undefined;
|
|
1986
|
+
objectPosition?: string | undefined;
|
|
1987
|
+
breakpoints?: number[] | undefined;
|
|
1988
1988
|
} | undefined;
|
|
1989
1989
|
server?: unknown;
|
|
1990
1990
|
srcDir?: string | undefined;
|
|
@@ -2079,12 +2079,12 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
2079
2079
|
})[] | undefined;
|
|
2080
2080
|
clientPrerender?: boolean | undefined;
|
|
2081
2081
|
contentIntellisense?: boolean | undefined;
|
|
2082
|
-
responsiveImages?: boolean | undefined;
|
|
2083
2082
|
headingIdCompat?: boolean | undefined;
|
|
2084
2083
|
preserveScriptOrder?: boolean | undefined;
|
|
2084
|
+
liveContentCollections?: boolean | undefined;
|
|
2085
2085
|
csp?: boolean | {
|
|
2086
2086
|
algorithm?: "SHA-256" | "SHA-384" | "SHA-512" | undefined;
|
|
2087
|
-
directives?: (`base-uri
|
|
2087
|
+
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;
|
|
2088
2088
|
styleDirective?: {
|
|
2089
2089
|
resources?: string[] | undefined;
|
|
2090
2090
|
hashes?: (`sha256-${string}` | `sha384-${string}` | `sha512-${string}`)[] | undefined;
|
package/dist/core/constants.js
CHANGED
|
@@ -9,8 +9,8 @@ export type CspAlgorithm = keyof Algorithms;
|
|
|
9
9
|
export declare const cspAlgorithmSchema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "SHA-384", "SHA-512"]>>>;
|
|
10
10
|
export declare const cspHashSchema: z.ZodType<`sha256-${string}` | `sha384-${string}` | `sha512-${string}`, z.ZodTypeDef, `sha256-${string}` | `sha384-${string}` | `sha512-${string}`>;
|
|
11
11
|
export type CspHash = z.infer<typeof cspHashSchema>;
|
|
12
|
-
declare const ALLOWED_DIRECTIVES: readonly ["base-uri", "child-src", "connect-src", "default-src", "fenced-frame-src", "font-src", "form-action", "frame-ancestors", "frame-src", "img-src", "manifest-src", "media-src", "object-src", "referrer", "report-to", "require-trusted-types-for", "sandbox", "trusted-types", "upgrade-insecure-requests", "worker-src"];
|
|
12
|
+
declare const ALLOWED_DIRECTIVES: readonly ["base-uri", "child-src", "connect-src", "default-src", "fenced-frame-src", "font-src", "form-action", "frame-ancestors", "frame-src", "img-src", "manifest-src", "media-src", "object-src", "referrer", "report-to", "report-uri", "require-trusted-types-for", "sandbox", "trusted-types", "upgrade-insecure-requests", "worker-src"];
|
|
13
13
|
type AllowedDirectives = (typeof ALLOWED_DIRECTIVES)[number];
|
|
14
|
-
export type CspDirective = `${AllowedDirectives}
|
|
15
|
-
export declare const allowedDirectivesSchema: z.ZodType<`base-uri
|
|
14
|
+
export type CspDirective = `${AllowedDirectives}${string | undefined}`;
|
|
15
|
+
export declare const allowedDirectivesSchema: 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}`>;
|
|
16
16
|
export {};
|