Spaces:
Sleeping
Sleeping
File size: 1,660 Bytes
68f7925 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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})`);
}
}); |