Support Astro 5

This commit is contained in:
Bad Manners 2024-12-03 18:35:16 -03:00
parent 6757c0b0e6
commit dc2fb254d6
4 changed files with 1125 additions and 1609 deletions

2722
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "astro-htaccess", "name": "astro-htaccess",
"version": "0.2.0", "version": "0.2.1",
"description": "Astro integration to generate an Apache .htaccess file", "description": "Astro integration to generate an Apache .htaccess file",
"type": "module", "type": "module",
"exports": { "exports": {
@ -33,12 +33,12 @@
"author": "Bad Manners <npm@badmanners.xyz>", "author": "Bad Manners <npm@badmanners.xyz>",
"license": "MIT", "license": "MIT",
"peerDependencies": { "peerDependencies": {
"astro": "^4.0.0" "astro": ">= 4.0.0 < 6"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/check": "^0.9.3", "@astrojs/check": "^0.9.4",
"@types/node": "^22.5.1", "@types/node": "^22.5.1",
"astro": "^4.15.1", "astro": "^5.0.1",
"typescript": "^5.5.4" "typescript": "^5.5.4"
} }
} }

View file

@ -66,7 +66,7 @@ export const integration = ({ generateHtaccessFile, errorPages, redirects, custo
assetsDir = fileURLToPath(new URL(".vercel/output/static/", config.root)); assetsDir = fileURLToPath(new URL(".vercel/output/static/", config.root));
} else if (config.adapter?.name === "@astrojs/cloudflare") { } else if (config.adapter?.name === "@astrojs/cloudflare") {
assetsDir = fileURLToPath(new URL(config.base?.replace(/^\//, ""), config.outDir)); assetsDir = fileURLToPath(new URL(config.base?.replace(/^\//, ""), config.outDir));
} else if (config.adapter?.name === "@astrojs/node" && config.output === "hybrid") { } else if (config.adapter?.name === "@astrojs/node") {
assetsDir = fileURLToPath(config.build.client!); assetsDir = fileURLToPath(config.build.client!);
} else { } else {
assetsDir = fileURLToPath(config.outDir); assetsDir = fileURLToPath(config.outDir);

View file

@ -11,5 +11,5 @@
"noEmit": false, "noEmit": false,
"allowImportingTsExtensions": false "allowImportingTsExtensions": false
}, },
"include": ["src"] "include": ["src", ".astro/types.d.ts"]
} }