diff --git a/.changeset/five-jokes-crash.md b/.changeset/five-jokes-crash.md new file mode 100644 index 0000000..e61315c --- /dev/null +++ b/.changeset/five-jokes-crash.md @@ -0,0 +1,5 @@ +--- +"astro-sst": minor +--- + +Added support for astro:env diff --git a/.changeset/unlucky-cameras-compete.md b/.changeset/unlucky-cameras-compete.md deleted file mode 100644 index bd0177a..0000000 --- a/.changeset/unlucky-cameras-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro-sst": patch ---- - -chore: update astro deprecation diff --git a/.changeset/wet-bobcats-cover.md b/.changeset/wet-bobcats-cover.md deleted file mode 100644 index 5b19ed6..0000000 --- a/.changeset/wet-bobcats-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro-sst": patch ---- - -feat: allow hybrid output diff --git a/bun.lockb b/bun.lockb index cc05768..2d2e9b6 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/astro-sst/CHANGELOG.md b/packages/astro-sst/CHANGELOG.md index d7bf37a..848ad7c 100644 --- a/packages/astro-sst/CHANGELOG.md +++ b/packages/astro-sst/CHANGELOG.md @@ -1,5 +1,12 @@ # astro-sst +## 3.1.4 + +### Patch Changes + +- a934623: chore: update astro deprecation +- bf4694f: feat: allow hybrid output + ## 3.1.3 ### Patch Changes diff --git a/packages/astro-sst/package.json b/packages/astro-sst/package.json index b262eb4..36e7b30 100644 --- a/packages/astro-sst/package.json +++ b/packages/astro-sst/package.json @@ -1,7 +1,7 @@ { "name": "astro-sst", "description": "Adapter that allows Astro to deploy your site to AWS utilizing SST.", - "version": "3.1.3", + "version": "3.1.4", "type": "module", "license": "MIT", "author": { @@ -43,6 +43,6 @@ "devDependencies": { "@types/aws-lambda": "^8.10.146", "@types/set-cookie-parser": "^2.4.10", - "astro": "^5.0.8" + "astro": "^5.16.4" } } diff --git a/packages/astro-sst/src/adapter.ts b/packages/astro-sst/src/adapter.ts index 73605c7..09384ff 100644 --- a/packages/astro-sst/src/adapter.ts +++ b/packages/astro-sst/src/adapter.ts @@ -76,6 +76,7 @@ export default function createIntegration( staticOutput: "stable", serverOutput: "stable", sharpImageService: "stable", + envGetSecret: "stable", }, }); }, diff --git a/packages/astro-sst/src/entrypoint.ts b/packages/astro-sst/src/entrypoint.ts index 31cb526..587d361 100644 --- a/packages/astro-sst/src/entrypoint.ts +++ b/packages/astro-sst/src/entrypoint.ts @@ -7,11 +7,14 @@ import type { Context, } from "aws-lambda"; import { NodeApp, applyPolyfills } from "astro/app/node"; +import { setGetEnv } from "astro/env/setup"; import type { IntegrationConfig } from "./lib/build-meta"; import { InternalEvent, convertFrom, convertTo } from "./lib/event-mapper.js"; import { debug } from "./lib/logger.js"; import { ResponseStream } from "./lib/types"; +setGetEnv((key) => process.env[key]); + type RequestHandler = ( event: APIGatewayProxyEventV2, streamResponse: ResponseStream, @@ -43,7 +46,7 @@ function createRequest(internalEvent: InternalEvent) { headers: internalEvent.headers, body: ["GET", "HEAD"].includes(internalEvent.method) ? undefined - : internalEvent.body, + : (internalEvent.body as BodyInit), }; return new Request(requestUrl, requestProps); } diff --git a/packages/astro-sst/tsconfig.json b/packages/astro-sst/tsconfig.json index 000330a..50b8180 100644 --- a/packages/astro-sst/tsconfig.json +++ b/packages/astro-sst/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "declaration": true, "strict": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true,