use "rule profiles" instead of "rules profiles"
This commit is contained in:
@@ -3,30 +3,30 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Available rules profiles for project initialization and rules command
|
||||
* Available rule profiles for project initialization and rules command
|
||||
*
|
||||
* ⚠️ SINGLE SOURCE OF TRUTH: This is the authoritative list of all supported rules profiles.
|
||||
* ⚠️ SINGLE SOURCE OF TRUTH: This is the authoritative list of all supported rule profiles.
|
||||
* This constant is used directly throughout the codebase (previously aliased as PROFILE_NAMES).
|
||||
*
|
||||
* @type {RulesProfile[]}
|
||||
* @description Defines possible rules profile sets:
|
||||
* @description Defines possible rule profile sets:
|
||||
* - cline: Cline IDE rules
|
||||
* - cursor: Cursor IDE rules (default)
|
||||
* - roo: Roo Code IDE rules
|
||||
* - windsurf: Windsurf IDE rules
|
||||
*
|
||||
* To add a new rules profile:
|
||||
* To add a new rule profile:
|
||||
* 1. Add the profile name to this array
|
||||
* 2. Create a profile file in scripts/profiles/{profile}.js
|
||||
* 3. Export it as {profile}Profile in scripts/profiles/index.js
|
||||
*/
|
||||
export const RULES_PROFILES = ['cline', 'cursor', 'roo', 'windsurf'];
|
||||
export const RULE_PROFILES = ['cline', 'cursor', 'roo', 'windsurf'];
|
||||
|
||||
/**
|
||||
* Check if a given rules profile is valid
|
||||
* @param {string} rulesProfile - The rules profile to check
|
||||
* @returns {boolean} True if the rules profile is valid, false otherwise
|
||||
* Check if a given rule profile is valid
|
||||
* @param {string} rulesProfile - The rule profile to check
|
||||
* @returns {boolean} True if the rule profile is valid, false otherwise
|
||||
*/
|
||||
export function isValidRulesProfile(rulesProfile) {
|
||||
return RULES_PROFILES.includes(rulesProfile);
|
||||
return RULE_PROFILES.includes(rulesProfile);
|
||||
}
|
||||
|
||||
@@ -60,9 +60,9 @@ async function confirmRemoveAllRemainingProfiles(profiles, remainingProfiles) {
|
||||
console.log(
|
||||
boxen(
|
||||
chalk.red.bold(
|
||||
`⚠️ CRITICAL WARNING: REMOVING ALL TASK MASTER RULES PROFILES ⚠️\n\n` +
|
||||
`⚠️ CRITICAL WARNING: REMOVING ALL TASK MASTER RULE PROFILES ⚠️\n\n` +
|
||||
`You are about to remove Task Master components for: ${profileList}\n` +
|
||||
`This will leave your project with NO Task Master rules profiles remaining!\n\n` +
|
||||
`This will leave your project with NO Task Master rule profiles remaining!\n\n` +
|
||||
`What will be removed:\n` +
|
||||
`• All Task Master specific rule files\n` +
|
||||
`• Task Master MCP server configurations\n` +
|
||||
@@ -90,7 +90,7 @@ async function confirmRemoveAllRemainingProfiles(profiles, remainingProfiles) {
|
||||
type: 'confirm',
|
||||
name: 'confirm',
|
||||
message:
|
||||
'Type y to confirm removing ALL Task Master profiles, or n to abort:',
|
||||
'Type y to confirm removing ALL Task Master rule profiles, or n to abort:',
|
||||
default: false
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -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