@astrojs/cloudflare 12.6.11 → 12.6.12

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.
@@ -1,49 +1,5 @@
1
1
  import { isRemotePath } from "@astrojs/internal-helpers/path";
2
- function matchHostname(url, hostname, allowWildcard) {
3
- if (!hostname) {
4
- return true;
5
- }
6
- if (!allowWildcard || !hostname.startsWith("*")) {
7
- return hostname === url.hostname;
8
- }
9
- if (hostname.startsWith("**.")) {
10
- const slicedHostname = hostname.slice(2);
11
- return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
12
- }
13
- if (hostname.startsWith("*.")) {
14
- const slicedHostname = hostname.slice(1);
15
- const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
16
- return additionalSubdomains.length === 1;
17
- }
18
- return false;
19
- }
20
- function matchPort(url, port) {
21
- return !port || port === url.port;
22
- }
23
- function matchProtocol(url, protocol) {
24
- return !protocol || protocol === url.protocol.slice(0, -1);
25
- }
26
- function matchPathname(url, pathname, allowWildcard) {
27
- if (!pathname) {
28
- return true;
29
- }
30
- if (!allowWildcard || !pathname.endsWith("*")) {
31
- return pathname === url.pathname;
32
- }
33
- if (pathname.endsWith("/**")) {
34
- const slicedPathname = pathname.slice(0, -2);
35
- return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
36
- }
37
- if (pathname.endsWith("/*")) {
38
- const slicedPathname = pathname.slice(0, -1);
39
- const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
40
- return additionalPathChunks.length === 1;
41
- }
42
- return false;
43
- }
44
- function matchPattern(url, remotePattern) {
45
- return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
46
- }
2
+ import { matchHostname, matchPattern } from "@astrojs/internal-helpers/remote";
47
3
  function isRemoteAllowed(src, {
48
4
  domains = [],
49
5
  remotePatterns = []
@@ -2,11 +2,11 @@ import type { AstroConfig, AstroIntegrationLogger, HookParameters } from 'astro'
2
2
  export type ImageService = 'passthrough' | 'cloudflare' | 'compile' | 'custom';
3
3
  export declare function setImageConfig(service: ImageService, config: AstroConfig['image'], command: HookParameters<'astro:config:setup'>['command'], logger: AstroIntegrationLogger): {
4
4
  service: import("astro").ImageServiceConfig<Record<string, any>>;
5
+ responsiveStyles: boolean;
5
6
  endpoint: {
6
7
  route: string;
7
8
  entrypoint?: string | undefined;
8
9
  };
9
- responsiveStyles: boolean;
10
10
  domains: string[];
11
11
  remotePatterns: {
12
12
  port?: string | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astrojs/cloudflare",
3
3
  "description": "Deploy your site to Cloudflare Workers/Pages",
4
- "version": "12.6.11",
4
+ "version": "12.6.12",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -30,10 +30,10 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
- "@cloudflare/workers-types": "^4.20251106.1",
33
+ "@cloudflare/workers-types": "^4.20251121.0",
34
34
  "tinyglobby": "^0.2.15",
35
35
  "vite": "^6.4.1",
36
- "wrangler": "4.46.0",
36
+ "wrangler": "4.50.0",
37
37
  "@astrojs/internal-helpers": "0.7.5",
38
38
  "@astrojs/underscore-redirects": "1.0.0"
39
39
  },
@@ -42,9 +42,9 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "cheerio": "1.1.2",
45
- "devalue": "^5.4.2",
46
- "rollup": "^4.52.5",
47
- "astro": "5.15.9",
45
+ "devalue": "^5.5.0",
46
+ "rollup": "^4.53.3",
47
+ "astro": "5.16.1",
48
48
  "astro-scripts": "0.0.14"
49
49
  },
50
50
  "publishConfig": {