-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a metadata file in the build directory (#100)
* finished metadata file stuff * fixed tests * switch to tsx over ts-node * dont allow 20
- Loading branch information
Showing
35 changed files
with
1,578 additions
and
699 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astro-aws/constructs": patch | ||
--- | ||
|
||
Use metadata file from adapter to configure constructs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astro-aws/adapter": patch | ||
--- | ||
|
||
Write a metadata file for constructs package |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { defineConfig } from "astro/config" | ||
import aws from "@astro-aws/adapter" | ||
import tailwind from "@astrojs/tailwind" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
adapter: aws({ | ||
logFnRequest: true, | ||
logFnResponse: true, | ||
}), | ||
integrations: [tailwind()], | ||
output: "hybrid", | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import { generateRandomPersonAsync } from "../../mocks/person"; | ||
export type Props = { | ||
row: number; | ||
} | ||
const { row } = Astro.props; | ||
const person = await generateRandomPersonAsync(); | ||
--- | ||
|
||
<tr> | ||
<th>{row}</th> | ||
<td>{person.name}</td> | ||
<td>{person.email}</td> | ||
<td>{person.phone}</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
/// <reference types="astro/client" /> | ||
declare namespace App { | ||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions | ||
interface Locals { | ||
title: string | ||
rows: number[] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// eslint-disable-next-line import/no-unresolved | ||
import { defineMiddleware } from "astro:middleware" | ||
|
||
export const onRequest = defineMiddleware(async ({ locals }, next) => { | ||
// eslint-disable-next-line no-param-reassign | ||
locals.title = "New title" | ||
// eslint-disable-next-line no-param-reassign | ||
locals.rows = Array.from({ length: 100 }).map((_, i) => i + 1) | ||
|
||
// return a Response or the result of calling `next()` | ||
return next() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { faker } from "@faker-js/faker" | ||
|
||
const generateRandomPerson = () => ({ | ||
address: faker.location.streetAddress(), | ||
email: faker.internet.email(), | ||
name: faker.person.fullName(), | ||
phone: faker.phone.number(), | ||
}) | ||
|
||
// eslint-disable-next-line @typescript-eslint/require-await | ||
const generateRandomPersonAsync = async () => generateRandomPerson() | ||
|
||
export { generateRandomPerson, generateRandomPersonAsync } |
Oops, something went wrong.