FE_Dev / analyze-components.mjs
GitHub Actions
Deploy from GitHub Actions [dev] - 2025-10-31 07:28:50
68f7925
import fs from 'fs';
const config = JSON.parse(fs.readFileSync('api-config.json', 'utf-8'));
// get_proposal_cn inputs
const cnInputs = [153, 108, 133, 68, 69, 237, 240, 1, 247, 288];
// get_proposal_fv inputs
const fvInputs = [153, 108, 133, 68, 69, 231, 232, 117, 288, 1];
console.log('=== get_proposal_cn Parameters ===\n');
cnInputs.forEach((id, index) => {
const component = config.components.find(c => c.id === id + 1); // Components array is 0-indexed but IDs are 1-indexed
if (component) {
console.log(`Parameter ${index}: ID=${id}`);
console.log(` Type: ${component.type}`);
if (component.props?.label) console.log(` Label: ${component.props.label}`);
if (component.props?.elem_id) console.log(` Elem ID: ${component.props.elem_id}`);
if (component.api_info) console.log(` API Info:`, component.api_info);
console.log();
}
});
console.log('\n=== get_proposal_fv Parameters ===\n');
fvInputs.forEach((id, index) => {
const component = config.components.find(c => c.id === id + 1);
if (component) {
console.log(`Parameter ${index}: ID=${id}`);
console.log(` Type: ${component.type}`);
if (component.props?.label) console.log(` Label: ${component.props.label}`);
if (component.props?.elem_id) console.log(` Elem ID: ${component.props.elem_id}`);
if (component.api_info) console.log(` API Info:`, component.api_info);
console.log();
}
});
// Find components with meaningful labels
console.log('\n=== All Components with Labels ===\n');
config.components.forEach(c => {
if (c.props?.label && !c.skip_api) {
console.log(`ID ${c.id - 1}: ${c.props.label} (${c.type})`);
}
});