ui integration and rest api includes

This commit is contained in:
2026-05-20 15:34:41 +05:30
parent f4dc2b6a5a
commit 349d152b76
18 changed files with 3631 additions and 589 deletions

21
combine_topics.cjs Normal file
View File

@@ -0,0 +1,21 @@
const fs = require('fs');
const path = require('path');
const { existingTopics } = require('./original_topics.cjs');
// Read current topics.js which has the new REST endpoints.
// We'll just import it using dynamic import since it's an ES module.
(async () => {
const topicsModule = await import('file:///' + path.join(__dirname, 'src/data/topics.js').replace(/\\/g, '/'));
const restTopics = topicsModule.topics;
const out = `export const LEGACY_BASE_URL = 'https://api.workolik.com';
export const REST_BASE_URL = 'https://fiesta.nearle.app';
export const legacyTopics = ${JSON.stringify(existingTopics, null, 2)};
export const restTopics = ${JSON.stringify(restTopics, null, 2)};
`;
fs.writeFileSync(path.join(__dirname, 'src/data/topics.js'), out, 'utf8');
console.log('Successfully combined legacy and rest topics into topics.js');
})();