update function names
This commit is contained in:
@@ -23,7 +23,7 @@ import figlet from 'figlet';
|
|||||||
import boxen from 'boxen';
|
import boxen from 'boxen';
|
||||||
import gradient from 'gradient-string';
|
import gradient from 'gradient-string';
|
||||||
import { isSilentMode } from './modules/utils.js';
|
import { isSilentMode } from './modules/utils.js';
|
||||||
import { convertAllCursorRulesToBrandRules } from './modules/rule-transformer.js';
|
import { convertAllRulesToBrandRules } from './modules/rule-transformer.js';
|
||||||
import { execSync } from 'child_process';
|
import { execSync } from 'child_process';
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
@@ -358,7 +358,7 @@ async function initializeProject(options = {}) {
|
|||||||
for (const rule of options.rules) {
|
for (const rule of options.rules) {
|
||||||
const profile = ruleProfiles[rule];
|
const profile = ruleProfiles[rule];
|
||||||
if (profile) {
|
if (profile) {
|
||||||
convertAllCursorRulesToBrandRules(targetDir, profile);
|
convertAllRulesToBrandRules(targetDir, profile);
|
||||||
// Ensure MCP config is set up under the correct brand folder for any non-cursor rule
|
// Ensure MCP config is set up under the correct brand folder for any non-cursor rule
|
||||||
if (rule !== 'cursor') {
|
if (rule !== 'cursor') {
|
||||||
setupMCPConfiguration(path.join(targetDir, `.${rule}`));
|
setupMCPConfiguration(path.join(targetDir, `.${rule}`));
|
||||||
@@ -369,7 +369,7 @@ async function initializeProject(options = {}) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// fallback for safety
|
// fallback for safety
|
||||||
convertAllCursorRulesToBrandRules(targetDir, cursorProfile);
|
convertAllRulesToBrandRules(targetDir, cursorProfile);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Interactive logic
|
// Interactive logic
|
||||||
@@ -435,7 +435,7 @@ async function initializeProject(options = {}) {
|
|||||||
for (const rule of options.rules) {
|
for (const rule of options.rules) {
|
||||||
const profile = ruleProfiles[rule];
|
const profile = ruleProfiles[rule];
|
||||||
if (profile) {
|
if (profile) {
|
||||||
convertAllCursorRulesToBrandRules(targetDir, profile);
|
convertAllRulesToBrandRules(targetDir, profile);
|
||||||
// Ensure MCP config is set up under the correct brand folder
|
// Ensure MCP config is set up under the correct brand folder
|
||||||
if (rule === 'windsurf' || rule === 'roo') {
|
if (rule === 'windsurf' || rule === 'roo') {
|
||||||
setupMCPConfiguration(path.join(targetDir, `.${rule}`));
|
setupMCPConfiguration(path.join(targetDir, `.${rule}`));
|
||||||
@@ -446,7 +446,7 @@ async function initializeProject(options = {}) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// fallback for safety
|
// fallback for safety
|
||||||
convertAllCursorRulesToBrandRules(targetDir, cursorProfile);
|
convertAllRulesToBrandRules(targetDir, cursorProfile);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
rl.close();
|
rl.close();
|
||||||
|
|||||||
@@ -533,10 +533,10 @@ function registerCommands(programInstance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action === 'add') {
|
if (action === 'add') {
|
||||||
const { convertAllCursorRulesToBrandRules } = await import(
|
const { convertAllRulesToBrandRules } = await import(
|
||||||
'./rule-transformer.js'
|
'./rule-transformer.js'
|
||||||
);
|
);
|
||||||
convertAllCursorRulesToBrandRules(projectDir, profile);
|
convertAllRulesToBrandRules(projectDir, profile);
|
||||||
if (typeof profile.onAddBrandRules === 'function') {
|
if (typeof profile.onAddBrandRules === 'function') {
|
||||||
profile.onAddBrandRules(projectDir);
|
profile.onAddBrandRules(projectDir);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user