()
| 42 | } |
| 43 | |
| 44 | async function createConfigFile(): Promise<InitFileResult> { |
| 45 | const path = RULESYNC_CONFIG_RELATIVE_FILE_PATH; |
| 46 | |
| 47 | if (await fileExists(path)) { |
| 48 | return { created: false, path }; |
| 49 | } |
| 50 | |
| 51 | await writeFileContent( |
| 52 | path, |
| 53 | JSON.stringify( |
| 54 | { |
| 55 | $schema: RULESYNC_CONFIG_SCHEMA_URL, |
| 56 | targets: ["copilot", "cursor", "claudecode", "codexcli"], |
| 57 | features: ["rules", "ignore", "mcp", "commands", "subagents", "skills", "hooks"], |
| 58 | outputRoots: ["."], |
| 59 | delete: true, |
| 60 | verbose: false, |
| 61 | silent: false, |
| 62 | global: false, |
| 63 | simulateCommands: false, |
| 64 | simulateSubagents: false, |
| 65 | simulateSkills: false, |
| 66 | gitignoreTargetsOnly: true, |
| 67 | } satisfies ConfigFile, |
| 68 | null, |
| 69 | 2, |
| 70 | ), |
| 71 | ); |
| 72 | |
| 73 | return { created: true, path }; |
| 74 | } |
| 75 | |
| 76 | async function createSampleFiles(): Promise<InitFileResult[]> { |
| 77 | const results: InitFileResult[] = []; |
no test coverage detected
searching dependent graphs…