chore: stabilize apps/web (lint, build, typecheck fixes)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 1m27s
Build & Deploy / 🏗️ Build (push) Failing after 1m31s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-02-11 11:56:13 +01:00
parent 8ba81809b0
commit ecea90dc91
50 changed files with 5596 additions and 3456 deletions

View File

@@ -3,83 +3,90 @@
* Verify components can be imported and used
*/
import { join } from 'path';
import { join } from "path";
console.log('🔍 Verifying Embed Components...\n');
console.log("🔍 Verifying Embed Components...\n");
// Test 1: Check if components can be imported
try {
const YouTubePath = join(process.cwd(), 'src', 'components', 'YouTubeEmbed.astro');
const TwitterPath = join(process.cwd(), 'src', 'components', 'TwitterEmbed.astro');
const GenericPath = join(process.cwd(), 'src', 'components', 'GenericEmbed.astro');
console.log('✅ YouTubeEmbed.astro exists');
console.log('✅ TwitterEmbed.astro exists');
console.log('✅ GenericEmbed.astro exists');
console.log("✅ YouTubeEmbed.astro exists");
console.log("✅ TwitterEmbed.astro exists");
console.log("✅ GenericEmbed.astro exists");
} catch (error) {
console.log('❌ Component import error:', error);
console.log("❌ Component import error:", error);
}
// Test 2: Check demo post accessibility
try {
const demoPath = join(process.cwd(), 'src', 'pages', 'blog', 'embed-demo.astro');
const { readFileSync } = require('fs');
if (require('fs').existsSync(demoPath)) {
const content = readFileSync(demoPath, 'utf-8');
const demoPath = join(
process.cwd(),
"src",
"pages",
"blog",
"embed-demo.astro",
);
const { readFileSync } = require("fs");
if (require("fs").existsSync(demoPath)) {
const content = readFileSync(demoPath, "utf-8");
// Check if demo has proper structure
const hasImports = content.includes('import YouTubeEmbed') &&
content.includes('import TwitterEmbed') &&
content.includes('import GenericEmbed');
const hasUsage = content.includes('<YouTubeEmbed') &&
content.includes('<TwitterEmbed') &&
content.includes('<GenericEmbed>');
const hasImports =
content.includes("import YouTubeEmbed") &&
content.includes("import TwitterEmbed") &&
content.includes("import GenericEmbed");
const hasUsage =
content.includes("<YouTubeEmbed") &&
content.includes("<TwitterEmbed") &&
content.includes("<GenericEmbed>");
if (hasImports && hasUsage) {
console.log('✅ Demo post has correct imports and usage');
console.log("✅ Demo post has correct imports and usage");
} else {
console.log('❌ Demo post missing imports or usage');
console.log("❌ Demo post missing imports or usage");
}
// Check if it has BaseLayout
if (content.includes('BaseLayout')) {
console.log('✅ Demo post uses BaseLayout');
if (content.includes("BaseLayout")) {
console.log("✅ Demo post uses BaseLayout");
} else {
console.log('❌ Demo post missing BaseLayout');
console.log("❌ Demo post missing BaseLayout");
}
}
} catch (error) {
console.log('❌ Demo post check error:', error);
console.log("❌ Demo post check error:", error);
}
// Test 3: Check blogPosts array
try {
const blogPostsPath = join(process.cwd(), 'src', 'data', 'blogPosts.ts');
const { readFileSync } = require('fs');
const content = readFileSync(blogPostsPath, 'utf-8');
const blogPostsPath = join(process.cwd(), "src", "data", "blogPosts.ts");
const { readFileSync } = require("fs");
const content = readFileSync(blogPostsPath, "utf-8");
// Check if embed-demo needs to be added
if (!content.includes('embed-demo')) {
console.log('⚠️ embed-demo not in blogPosts array - this is why it won\'t show in blog list');
console.log(' But it should still be accessible at /blog/embed-demo directly');
if (!content.includes("embed-demo")) {
console.log(
"⚠️ embed-demo not in blogPosts array - this is why it won't show in blog list",
);
console.log(
" But it should still be accessible at /blog/embed-demo directly",
);
} else {
console.log('✅ embed-demo found in blogPosts array');
console.log("✅ embed-demo found in blogPosts array");
}
} catch (error) {
console.log('❌ blogPosts check error:', error);
console.log("❌ blogPosts check error:", error);
}
console.log('\n' + '='.repeat(60));
console.log('📋 SUMMARY:');
console.log('• Components are created and structured correctly');
console.log('• Demo post exists at src/pages/blog/embed-demo.astro');
console.log('• Demo post has all required imports and usage');
console.log('\n🔧 TO FIX BLOG LISTING:');
console.log('Add embed-demo to src/data/blogPosts.ts array');
console.log('\n🚀 TO TEST COMPONENTS:');
console.log('Visit: http://localhost:4321/blog/embed-demo');
console.log('If that 404s, the demo post needs to be added to blogPosts.ts');
console.log("\n" + "=".repeat(60));
console.log("📋 SUMMARY:");
console.log("• Components are created and structured correctly");
console.log("• Demo post exists at src/pages/blog/embed-demo.astro");
console.log("• Demo post has all required imports and usage");
console.log("\n🔧 TO FIX BLOG LISTING:");
console.log("Add embed-demo to src/data/blogPosts.ts array");
console.log("\n🚀 TO TEST COMPONENTS:");
console.log("Visit: http://localhost:4321/blog/embed-demo");
console.log("If that 404s, the demo post needs to be added to blogPosts.ts");