Merge branch 'dev'

This commit is contained in:
DaX
2025-06-18 23:52:30 +02:00
6 changed files with 21 additions and 60 deletions

3
.gitignore vendored
View File

@@ -10,6 +10,9 @@ coverage/
dist/
build/
# Vite
.vite/
# Misc
.DS_Store
.env

View File

@@ -5,8 +5,6 @@
"type": "module",
"scripts": {
"dev": "vite",
"dev:server": "node server.js",
"dev:all": "npm run dev:server & npm run dev",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
@@ -15,7 +13,6 @@
"@types/cheerio": "^0.22.35",
"axios": "^1.6.2",
"cheerio": "^1.1.0",
"express": "^4.18.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},

View File

@@ -1,30 +0,0 @@
import express from 'express';
import { handler } from './src/pages/api/filaments.js';
const app = express();
const port = 3000;
app.get('/api/filaments', async (req, res) => {
const event = {
httpMethod: 'GET',
headers: req.headers,
queryStringParameters: req.query
};
try {
const response = await handler(event);
res.status(response.statusCode);
Object.entries(response.headers || {}).forEach(([key, value]) => {
res.setHeader(key, value);
});
res.send(response.body);
} catch (error) {
res.status(500).json({ error: error.message });
}
});
app.listen(port, () => {
console.log(`API server running at http://localhost:${port}`);
});

View File

@@ -1,25 +0,0 @@
import type { Filament } from '../../types/filament';
// This file is only used for AWS Amplify deployment
// Local development uses the Vite middleware in vite.config.ts
export async function handler(event: any) {
// For AWS Amplify
if (event.httpMethod !== 'GET') {
return {
statusCode: 405,
body: JSON.stringify({ error: 'Method not allowed' })
};
}
// In production, this would use the server-side confluence module
// For now, return empty array to avoid errors
return {
statusCode: 200,
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'max-age=300'
},
body: JSON.stringify([])
};
}

9
terraform.tfstate Normal file
View File

@@ -0,0 +1,9 @@
{
"version": 4,
"terraform_version": "1.5.7",
"serial": 1,
"lineage": "6405bb5f-e094-2fa4-339e-33ddd7ca840f",
"outputs": {},
"resources": [],
"check_results": null
}

View File

@@ -100,8 +100,9 @@ resource "aws_amplify_branch" "dev" {
resource "aws_amplify_domain_association" "filamenteka" {
count = var.domain_name != "" ? 1 : 0
app_id = aws_amplify_app.filamenteka.id
domain_name = var.domain_name
app_id = aws_amplify_app.filamenteka.id
domain_name = var.domain_name
wait_for_verification = false
# Map main branch to root domain
sub_domain {
@@ -109,6 +110,12 @@ resource "aws_amplify_domain_association" "filamenteka" {
prefix = ""
}
# Map main branch to www subdomain
sub_domain {
branch_name = aws_amplify_branch.main.branch_name
prefix = "www"
}
# Map dev branch to dev subdomain
sub_domain {
branch_name = aws_amplify_branch.dev.branch_name