use "rule profiles" instead of "rules profiles"
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { RULES_PROFILES } from '../constants/profiles.js';
|
||||
import { RULE_PROFILES } from '../constants/profiles.js';
|
||||
import { getRulesProfile } from './rule-transformer.js';
|
||||
|
||||
/**
|
||||
@@ -15,7 +15,7 @@ import { getRulesProfile } from './rule-transformer.js';
|
||||
export function getInstalledProfiles(projectRoot) {
|
||||
const installedProfiles = [];
|
||||
|
||||
for (const profileName of RULES_PROFILES) {
|
||||
for (const profileName of RULE_PROFILES) {
|
||||
const profileConfig = getRulesProfile(profileName);
|
||||
if (!profileConfig) continue;
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ import {
|
||||
} from './mcp-config-setup.js';
|
||||
|
||||
// Import profile constants (single source of truth)
|
||||
import { RULES_PROFILES } from '../constants/profiles.js';
|
||||
import { RULE_PROFILES } from '../constants/profiles.js';
|
||||
|
||||
// --- Profile Imports ---
|
||||
import * as profilesModule from '../../scripts/profiles/index.js';
|
||||
|
||||
export function isValidProfile(profile) {
|
||||
return RULES_PROFILES.includes(profile);
|
||||
return RULE_PROFILES.includes(profile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ export function getRulesProfile(name) {
|
||||
|
||||
if (!profile) {
|
||||
throw new Error(
|
||||
`Profile not found: static import missing for '${name}'. Valid profiles: ${RULES_PROFILES.join(', ')}`
|
||||
`Profile not found: static import missing for '${name}'. Valid profiles: ${RULE_PROFILES.join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ import inquirer from 'inquirer';
|
||||
import chalk from 'chalk';
|
||||
import { log } from '../../scripts/modules/utils.js';
|
||||
import { getRulesProfile } from './rule-transformer.js';
|
||||
import { RULES_PROFILES } from '../constants/profiles.js';
|
||||
import { RULE_PROFILES } from '../constants/profiles.js';
|
||||
|
||||
// Dynamically generate availableRulesProfiles from RULES_PROFILES
|
||||
const availableRulesProfiles = RULES_PROFILES.map((name) => {
|
||||
// Dynamically generate availableRulesProfiles from RULE_PROFILES
|
||||
const availableRulesProfiles = RULE_PROFILES.map((name) => {
|
||||
const displayName = getProfileDisplayName(name);
|
||||
return {
|
||||
name: displayName,
|
||||
@@ -29,7 +29,7 @@ function getProfileDisplayName(name) {
|
||||
/**
|
||||
* Launches an interactive prompt for selecting which profile rules to include in your project.
|
||||
*
|
||||
* This function dynamically lists all available profiles (from RULES_PROFILES) and presents them as checkboxes.
|
||||
* This function dynamically lists all available profiles (from RULE_PROFILES) and presents them as checkboxes.
|
||||
* The user must select at least one profile (no defaults are pre-selected). The result is an array of selected profile names.
|
||||
*
|
||||
* Used by both project initialization (init) and the CLI 'task-master rules setup' command to ensure DRY, consistent UX.
|
||||
|
||||
Reference in New Issue
Block a user