move profiles to /src

This commit is contained in:
Joe Danziger
2025-06-05 10:17:30 -04:00
parent 8f93a695e9
commit 948203ed7f
27 changed files with 26 additions and 26 deletions

View File

@@ -21,8 +21,8 @@
*
* 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
* 2. Create a profile file in src/profiles/{profile}.js
* 3. Export it as {profile}Profile in src/profiles/index.js
*/
export const RULE_PROFILES = [
'claude',

View File

@@ -1,7 +1,7 @@
// Claude Code profile for rule-transformer
import path from 'path';
import fs from 'fs';
import { isSilentMode, log } from '../modules/utils.js';
import { isSilentMode, log } from '../../scripts/modules/utils.js';
// Lifecycle functions for Claude Code profile
function onAddRulesProfile(targetDir, assetsDir) {

View File

@@ -1,7 +1,7 @@
// Codex profile for rule-transformer
import path from 'path';
import fs from 'fs';
import { isSilentMode, log } from '../modules/utils.js';
import { isSilentMode, log } from '../../scripts/modules/utils.js';
// Lifecycle functions for Codex profile
function onAddRulesProfile(targetDir, assetsDir) {

View File

@@ -1,9 +1,9 @@
// Roo Code conversion profile for rule-transformer
import path from 'path';
import fs from 'fs';
import { isSilentMode, log } from '../modules/utils.js';
import { isSilentMode, log } from '../../scripts/modules/utils.js';
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
import { ROO_MODES } from '../../src/constants/profiles.js';
import { ROO_MODES } from '../constants/profiles.js';
// Lifecycle functions for Roo profile
function onAddRulesProfile(targetDir, assetsDir) {

View File

@@ -20,7 +20,7 @@ import {
import { RULE_PROFILES } from '../constants/profiles.js';
// --- Profile Imports ---
import * as profilesModule from '../../scripts/profiles/index.js';
import * as profilesModule from '../profiles/index.js';
export function isValidProfile(profile) {
return RULE_PROFILES.includes(profile);

View File

@@ -7,7 +7,7 @@ describe('Claude Profile Initialization Functionality', () => {
beforeAll(() => {
const claudeJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'claude.js'
);

View File

@@ -7,7 +7,7 @@ describe('Cline Profile Initialization Functionality', () => {
beforeAll(() => {
const clineJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'cline.js'
);

View File

@@ -7,7 +7,7 @@ describe('Codex Profile Initialization Functionality', () => {
beforeAll(() => {
const codexJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'codex.js'
);

View File

@@ -7,7 +7,7 @@ describe('Cursor Profile Initialization Functionality', () => {
beforeAll(() => {
const cursorJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'cursor.js'
);

View File

@@ -18,7 +18,7 @@ describe('Roo Files Inclusion in Package', () => {
test('roo.js profile contains logic for Roo directory creation and file copying', () => {
// Read the roo.js profile file
const rooJsPath = path.join(process.cwd(), 'scripts', 'profiles', 'roo.js');
const rooJsPath = path.join(process.cwd(), 'src', 'profiles', 'roo.js');
const rooJsContent = fs.readFileSync(rooJsPath, 'utf8');
// Check for the main handler function
@@ -55,10 +55,10 @@ describe('Roo Files Inclusion in Package', () => {
)
).toBe(true);
// Check for import of ROO_MODES from profiles.js
// Check for import of ROO_MODES from profiles.js instead of local definition
expect(
rooJsContent.includes(
"import { ROO_MODES } from '../../src/constants/profiles.js'"
"import { ROO_MODES } from '../constants/profiles.js'"
)
).toBe(true);

View File

@@ -7,7 +7,7 @@ describe('Roo Profile Initialization Functionality', () => {
beforeAll(() => {
// Read the roo.js profile file content once for all tests
const rooJsPath = path.join(process.cwd(), 'scripts', 'profiles', 'roo.js');
const rooJsPath = path.join(process.cwd(), 'src', 'profiles', 'roo.js');
rooProfileContent = fs.readFileSync(rooJsPath, 'utf8');
});
@@ -32,7 +32,7 @@ describe('Roo Profile Initialization Functionality', () => {
// Check for import of ROO_MODES from profiles.js instead of local definition
expect(rooProfileContent).toContain(
"import { ROO_MODES } from '../../src/constants/profiles.js';"
"import { ROO_MODES } from '../constants/profiles.js';"
);
});

View File

@@ -37,7 +37,7 @@ describe('Rules Files Inclusion in Package', () => {
test('roo.js profile contains logic for Roo directory creation and file copying', () => {
// Read the roo.js profile file
const rooJsPath = path.join(process.cwd(), 'scripts', 'profiles', 'roo.js');
const rooJsPath = path.join(process.cwd(), 'src', 'profiles', 'roo.js');
const rooJsContent = fs.readFileSync(rooJsPath, 'utf8');
// Check for the main handler function
@@ -77,7 +77,7 @@ describe('Rules Files Inclusion in Package', () => {
// Check for import of ROO_MODES from profiles.js
expect(
rooJsContent.includes(
"import { ROO_MODES } from '../../src/constants/profiles.js'"
"import { ROO_MODES } from '../constants/profiles.js'"
)
).toBe(true);

View File

@@ -7,7 +7,7 @@ describe('Trae Profile Initialization Functionality', () => {
beforeAll(() => {
const traeJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'trae.js'
);

View File

@@ -7,7 +7,7 @@ describe('Windsurf Profile Initialization Functionality', () => {
beforeAll(() => {
const windsurfJsPath = path.join(
process.cwd(),
'scripts',
'src',
'profiles',
'windsurf.js'
);

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { clineProfile } from '../../../scripts/profiles/cline.js';
import { clineProfile } from '../../../src/profiles/cline.js';
describe('Cline Rule Transformer', () => {
// Set up spies on the mocked modules

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { cursorProfile } from '../../../scripts/profiles/cursor.js';
import { cursorProfile } from '../../../src/profiles/cursor.js';
describe('Cursor Rule Transformer', () => {
// Set up spies on the mocked modules

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { rooProfile } from '../../../scripts/profiles/roo.js';
import { rooProfile } from '../../../src/profiles/roo.js';
describe('Roo Rule Transformer', () => {
// Set up spies on the mocked modules

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { traeProfile } from '../../../scripts/profiles/trae.js';
import { traeProfile } from '../../../src/profiles/trae.js';
describe('Trae Rule Transformer', () => {
// Set up spies on the mocked modules

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { vscodeProfile } from '../../../scripts/profiles/vscode.js';
import { vscodeProfile } from '../../../src/profiles/vscode.js';
describe('VS Code Rule Transformer', () => {
// Set up spies on the mocked modules

View File

@@ -11,7 +11,7 @@ jest.mock('fs', () => ({
// Import modules after mocking
import fs from 'fs';
import { convertRuleToProfileRule } from '../../../src/utils/rule-transformer.js';
import { windsurfProfile } from '../../../scripts/profiles/windsurf.js';
import { windsurfProfile } from '../../../src/profiles/windsurf.js';
describe('Windsurf Rule Transformer', () => {
// Set up spies on the mocked modules