Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 13s
Build & Deploy / 🧪 QA (push) Successful in 2m18s
Build & Deploy / 🏗️ Build (push) Successful in 5m49s
Build & Deploy / 🚀 Deploy (push) Successful in 23s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 2m19s
Build & Deploy / ⚡ Performance & Accessibility (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
console.log('DEBUG SCRIPT STARTING...');
|
|
|
|
async function debug() {
|
|
console.log('Importing dependencies...');
|
|
try {
|
|
const { getAllProductsMetadata } = await import('./lib/mdx');
|
|
const { getAllPostsMetadata } = await import('./lib/blog');
|
|
const { getAllPagesMetadata } = await import('./lib/pages');
|
|
|
|
console.log('Dependencies imported.');
|
|
|
|
const locales = ['de', 'en'];
|
|
for (const locale of locales) {
|
|
console.log(`--- Locale: ${locale} ---`);
|
|
|
|
try {
|
|
const products = await getAllProductsMetadata(locale);
|
|
console.log(`Products (${locale}): ${products.length}`);
|
|
} catch (e) {
|
|
console.error(`Failed to get products for ${locale}:`, e);
|
|
}
|
|
|
|
try {
|
|
const posts = await getAllPostsMetadata(locale);
|
|
console.log(`Posts (${locale}): ${posts.length}`);
|
|
} catch (e) {
|
|
console.error(`Failed to get posts for ${locale}:`, e);
|
|
}
|
|
|
|
try {
|
|
const pages = await getAllPagesMetadata(locale);
|
|
console.log(`Pages (${locale}): ${pages.length}`);
|
|
} catch (e) {
|
|
console.error(`Failed to get pages for ${locale}:`, e);
|
|
}
|
|
}
|
|
} catch (err) {
|
|
console.error('Debug failed during setup/imports:', err);
|
|
}
|
|
console.log('DEBUG SCRIPT FINISHED.');
|
|
process.exit(0);
|
|
}
|
|
|
|
debug().catch((err) => {
|
|
console.error('Unhandled retransmission error in debug():', err);
|
|
process.exit(1);
|
|
});
|