@awsless/awsless 0.0.478 → 0.0.479

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.
@@ -844,10 +844,21 @@ var LocalEntrySchema = z28.union([
844
844
 
845
845
  // src/feature/site/schema.ts
846
846
  var ErrorResponsePathSchema = z29.string().describe(
847
- "The path to the custom error page that you want to return to the viewer when your origin returns the HTTP status code specified.\n - We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable."
847
+ [
848
+ "The path to the custom error page that you want to return to the viewer when your origin returns the HTTP status code specified.",
849
+ "- We recommend that you store custom error pages in an Amazon S3 bucket.",
850
+ "If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable."
851
+ ].join("\n")
848
852
  );
849
853
  var StatusCodeSchema = z29.number().int().positive().optional().describe(
850
- "The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:\n- Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.\n- If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.\n- You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down."
854
+ [
855
+ "The HTTP status code that you want CloudFront to return to the viewer along with the custom error page.",
856
+ "There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:",
857
+ "- Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer.",
858
+ "If you substitute 200, the response typically won't be intercepted.",
859
+ `- If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.`,
860
+ `- You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down.`
861
+ ].join("\n")
851
862
  );
852
863
  var MinTTLSchema = DurationSchema.describe(
853
864
  "The minimum amount of time, that you want to cache the error response. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available."
@@ -901,7 +912,11 @@ var SitesSchema = z29.record(
901
912
  // ]),
902
913
  geoRestrictions: z29.array(z29.string().length(2).toUpperCase()).default([]).describe("Specifies a blacklist of countries that should be blocked."),
903
914
  forwardHost: z29.boolean().default(false).describe(
904
- "Specify if the host header should be forwarded to the SSR function. Keep in mind that this requires an extra CloudFront Function."
915
+ [
916
+ "Specify if the original `host` header should be forwarded to the SSR function.",
917
+ "The original `host` header will be forwarded as `x-forwarded-host`.",
918
+ "Keep in mind that this requires an extra CloudFront Function."
919
+ ].join("\n")
905
920
  ),
906
921
  errors: z29.object({
907
922
  400: ErrorResponseSchema.describe("Customize a `400 Bad Request` response."),
@@ -924,7 +939,7 @@ var SitesSchema = z29.record(
924
939
  headers: z29.string().array().default(["*"]),
925
940
  origins: z29.string().array().default(["*"]),
926
941
  methods: z29.enum(["GET", "DELETE", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "ALL"]).array().default(["ALL"])
927
- }).optional().describe("Define the cors headers."),
942
+ }).optional().describe("Specify the cors headers."),
928
943
  security: z29.object({
929
944
  // contentSecurityPolicy: z.object({
930
945
  // override: z.boolean().default(false),
@@ -966,7 +981,7 @@ var SitesSchema = z29.record(
966
981
  // modeBlock?: boolean
967
982
  // reportUri?: string
968
983
  // }
969
- }).optional().describe("Define the security policy."),
984
+ }).optional().describe("Specify the security policy."),
970
985
  cache: z29.object({
971
986
  cookies: z29.string().array().optional().describe("Specifies the cookies that CloudFront includes in the cache key."),
972
987
  headers: z29.string().array().optional().describe("Specifies the headers that CloudFront includes in the cache key."),
Binary file