// SPEC-597-EXEMPT: canonical mapping (npm-package↔framework, keyword catalogue)
// — must enumerate framework names by design; no detection logic to migrate.
// engine/detectors/advanced-framework-detector/legacy-detector.ts
// Detects legacy frontend frameworks: jQuery, Backbone, Knockout, Ember, ExtJS, AngularJS 1.x.
import { join } from 'node:path';
import { fileExists } from './helpers.js';
export function detectLegacyFrameworks(deps) {
    const found = [];
    if (deps.has('jquery')) {
        found.push('jquery');
    }
    if (deps.has('backbone') && deps.has('underscore')) {
        found.push('backbone');
    }
    if (deps.has('knockout')) {
        found.push('knockout');
    }
    if (deps.has('ember-source') || deps.has('ember-cli')) {
        found.push('ember');
    }
    if (deps.has('@sencha/ext') || deps.has('extjs')) {
        found.push('extjs');
    }
    if (deps.has('angular') && !deps.has('@angular/core')) {
        found.push('angularjs-1');
    }
    return found;
}
export async function checkLegacyFromConfig(projectPath) {
    const found = [];
    if (await fileExists(join(projectPath, 'sencha.cfg'))) {
        found.push('extjs');
    }
    return found;
}
//# sourceMappingURL=legacy-detector.js.map