@astrojs/cloudflare 11.0.3 → 11.0.5

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,11 +1,12 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { writeFile } from 'node:fs/promises';
3
- import { posix } from 'node:path';
3
+ import path from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { prependForwardSlash, removeLeadingForwardSlash, removeTrailingForwardSlash, } from '@astrojs/internal-helpers/path';
6
6
  import glob from 'tiny-glob';
7
7
  // Copied from https://github.com/withastro/astro/blob/3776ecf0aa9e08a992d3ae76e90682fd04093721/packages/astro/src/core/routing/manifest/create.ts#L45-L70
8
8
  // We're not sure how to improve this regex yet
9
+ // eslint-disable-next-line regexp/no-super-linear-backtracking
9
10
  const ROUTE_DYNAMIC_SPLIT = /\[(.+?\(.+?\)|.+?)\]/;
10
11
  const ROUTE_SPREAD = /^\.{3}.+$/;
11
12
  export function getParts(part) {
@@ -128,7 +129,7 @@ export async function createRoutesFile(_config, logger, routes, pages, redirects
128
129
  continue;
129
130
  const staticPath = staticFile;
130
131
  const segments = removeLeadingForwardSlash(staticPath)
131
- .split(posix.sep)
132
+ .split(path.sep)
132
133
  .filter(Boolean)
133
134
  .map((s) => {
134
135
  return getParts(s);
@@ -169,7 +170,7 @@ export async function createRoutesFile(_config, logger, routes, pages, redirects
169
170
  if (page.pathname === '404')
170
171
  hasPrerendered404 = true;
171
172
  const pageSegments = removeLeadingForwardSlash(page.pathname)
172
- .split(posix.sep)
173
+ .split(path.posix.sep)
173
174
  .filter(Boolean)
174
175
  .map((s) => {
175
176
  return getParts(s);
@@ -1,5 +1,5 @@
1
- import type { AstroConfig, AstroIntegrationLogger } from 'astro';
2
- export declare function setImageConfig(service: string, config: AstroConfig['image'], command: 'dev' | 'build' | 'preview', logger: AstroIntegrationLogger): {
1
+ import type { AstroConfig, AstroIntegrationLogger, HookParameters } from 'astro';
2
+ export declare function setImageConfig(service: string, config: AstroConfig['image'], command: HookParameters<'astro:config:setup'>['command'], logger: AstroIntegrationLogger): {
3
3
  service: import("astro").ImageServiceConfig<Record<string, any>>;
4
4
  domains: string[];
5
5
  remotePatterns: {
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": "11.0.3",
4
+ "version": "11.0.5",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -31,26 +31,26 @@
31
31
  "dependencies": {
32
32
  "@astrojs/internal-helpers": "0.4.1",
33
33
  "@astrojs/underscore-redirects": "^0.3.4",
34
- "@cloudflare/workers-types": "^4.20240620.0",
35
- "esbuild": "^0.22.0",
34
+ "@cloudflare/workers-types": "^4.20240909.0",
35
+ "esbuild": "^0.21.5",
36
36
  "estree-walker": "^3.0.3",
37
- "magic-string": "^0.30.10",
38
- "miniflare": "^3.20240620.0",
37
+ "magic-string": "^0.30.11",
38
+ "miniflare": "^3.20240909.2",
39
39
  "tiny-glob": "^0.2.9",
40
- "wrangler": "^3.62.0",
41
- "@inox-tools/astro-when": "^0.2.0"
40
+ "wrangler": "^3.78.3",
41
+ "@inox-tools/astro-when": "^0.2.3"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "astro": "^4.10.3"
45
45
  },
46
46
  "devDependencies": {
47
- "astro": "^4.11.3",
48
- "cheerio": "1.0.0-rc.12",
47
+ "astro": "^4.15.6",
48
+ "cheerio": "1.0.0",
49
49
  "execa": "^8.0.1",
50
50
  "fast-glob": "^3.3.2",
51
- "rollup": "^4.18.0",
51
+ "rollup": "^4.21.3",
52
52
  "strip-ansi": "^7.1.0",
53
- "vite": "^5.3.2",
53
+ "vite": "^5.4.6",
54
54
  "@astrojs/test-utils": "0.0.1",
55
55
  "astro-scripts": "0.0.14"
56
56
  },