mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 06:23:28 +08:00
fix: namespace cursor agent installs
This commit is contained in:
committed by
Affaan Mustafa
parent
5881554a1c
commit
e1d6d853f7
@@ -1,7 +1,9 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const { toCursorAgentFileName } = require('../cursor-agent-names');
|
||||
const {
|
||||
createFlatFileOperations,
|
||||
createFlatRuleOperations,
|
||||
createInstallTargetAdapter,
|
||||
createManagedOperation,
|
||||
@@ -149,6 +151,16 @@ module.exports = createInstallTargetAdapter({
|
||||
}));
|
||||
}
|
||||
|
||||
if (sourceRelativePath === 'agents') {
|
||||
return takeUniqueOperations(createFlatFileOperations({
|
||||
moduleId: module.id,
|
||||
repoRoot,
|
||||
sourceRelativePath,
|
||||
destinationDir: path.join(targetRoot, 'agents'),
|
||||
destinationNameTransform: toCursorAgentFileName,
|
||||
}));
|
||||
}
|
||||
|
||||
if (sourceRelativePath === '.cursor') {
|
||||
const cursorRoot = path.join(repoRoot, '.cursor');
|
||||
if (!fs.existsSync(cursorRoot) || !fs.statSync(cursorRoot).isDirectory()) {
|
||||
|
||||
@@ -181,7 +181,7 @@ function createNamespacedFlatRuleOperations(adapter, moduleId, sourceRelativePat
|
||||
return operations;
|
||||
}
|
||||
|
||||
function createFlatRuleOperations({
|
||||
function createFlatFileOperations({
|
||||
moduleId,
|
||||
repoRoot,
|
||||
sourceRelativePath,
|
||||
@@ -242,6 +242,10 @@ function createFlatRuleOperations({
|
||||
return operations;
|
||||
}
|
||||
|
||||
function createFlatRuleOperations(options) {
|
||||
return createFlatFileOperations(options);
|
||||
}
|
||||
|
||||
function createInstallTargetAdapter(config) {
|
||||
const adapter = {
|
||||
id: config.id,
|
||||
@@ -342,6 +346,7 @@ function createInstallTargetAdapter(config) {
|
||||
|
||||
module.exports = {
|
||||
buildValidationIssue,
|
||||
createFlatFileOperations,
|
||||
createFlatRuleOperations,
|
||||
createInstallTargetAdapter,
|
||||
createManagedOperation,
|
||||
|
||||
Reference in New Issue
Block a user