| 1 | /** |
| 2 | * Optional legacy AWS marker adapter, retained for existing Octane configs. |
| 3 | * New projects can omit it: `AWS.Website.Octane` selects hosting and wraps |
| 4 | * Octane's default native Node output as a Lambda handler automatically. |
| 5 | * |
| 6 | * This marker sets `name: "aws"` and `serverTarget: "node"` without an |
| 7 | * `adapt()` pass or runtime overrides. Octane emits `dist/server/entry.js`, |
| 8 | * a self-contained Node ESM bundle exporting a web-standard fetch `handler`; |
| 9 | * the AWS deploy target's finishing pass emits the Lambda entry. |
| 10 | * |
| 11 | * This module MUST stay dependency-free: `octane.config.ts` (and therefore |
| 12 | * its import graph) is bundled into the server entry by Octane's |
| 13 | * `noExternal: true` server sub-build, and is also evaluated by Octane's |
| 14 | * config loader inside a Vite module runner. |
| 15 | */ |
| 16 | |
| 17 | /** The `adapter.name` this adapter declares (matched by the AWS target). */ |
| 18 | export const ADAPTER_NAME = "aws"; |
| 19 | |
| 20 | /** The shape of the Octane deploy adapter this module produces. */ |
| 21 | export interface OctaneAwsAdapter { |
| 22 | readonly name: typeof ADAPTER_NAME; |
| 23 | readonly serverTarget: "node"; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Create the optional legacy AWS marker adapter. New projects can omit it |
| 28 | * from `octane.config.ts`; `AWS.Website.Octane` owns deployment. |
| 29 | */ |
| 30 | export const aws = (): OctaneAwsAdapter => ({ |
| 31 | name: ADAPTER_NAME, |
| 32 | serverTarget: "node", |
| 33 | }); |
| 34 | |
| 35 | export default aws; |