s9n-devops-agent 2.0.18-dev.5 → 2.0.18-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/setup-cs-devops-agent.js +14 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s9n-devops-agent",
|
|
3
|
-
"version": "2.0.18-dev.
|
|
3
|
+
"version": "2.0.18-dev.6",
|
|
4
4
|
"description": "CS_DevOpsAgent - Intelligent Git Automation System with multi-agent support and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/cs-devops-agent-worker.js",
|
|
@@ -168,7 +168,8 @@ async function checkContractsExist(projectRoot) {
|
|
|
168
168
|
|
|
169
169
|
// Find all files that look like contracts
|
|
170
170
|
// We look for files containing "CONTRACT" in the name, excluding typical ignores
|
|
171
|
-
|
|
171
|
+
// Use -iname for case-insensitive matching
|
|
172
|
+
const findCommand = `find "${projectRoot}" -type f \\( -iname "*CONTRACT*.md" -o -iname "*CONTRACT*.json" \\) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/local_deploy/*"`;
|
|
172
173
|
|
|
173
174
|
let files = [];
|
|
174
175
|
try {
|
|
@@ -265,11 +266,21 @@ async function checkContractsExist(projectRoot) {
|
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
268
|
|
|
268
|
-
// Final check: Do we have all required contracts
|
|
269
|
-
|
|
269
|
+
// Final check: Do we have all required contracts?
|
|
270
|
+
// We check if they exist in the target directory OR if we found them elsewhere (and user maybe declined to merge)
|
|
271
|
+
const missing = requiredContracts.filter(contractName => {
|
|
272
|
+
// 1. Check central folder
|
|
273
|
+
if (fs.existsSync(path.join(targetDir, contractName))) return false;
|
|
274
|
+
|
|
275
|
+
// 2. Check if we found it anywhere else
|
|
276
|
+
if (contractMap[contractName] && contractMap[contractName].length > 0) return false;
|
|
277
|
+
|
|
278
|
+
return true;
|
|
279
|
+
});
|
|
270
280
|
|
|
271
281
|
if (missing.length === 0) {
|
|
272
282
|
if (hasChanges) log.success('Contract files consolidated successfully.');
|
|
283
|
+
else log.info('All contract files found in repository.');
|
|
273
284
|
return true;
|
|
274
285
|
}
|
|
275
286
|
|