micro-models-agent 0.48.2 → 0.48.3
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/dist/main.js +22 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -13298,19 +13298,34 @@ class FactualCheck {
|
|
|
13298
13298
|
return existsSync24(fp);
|
|
13299
13299
|
if (this.knownFiles.has(fp))
|
|
13300
13300
|
return true;
|
|
13301
|
+
for (const cand of this.dotfileVariants(fp)) {
|
|
13302
|
+
if (this.knownFiles.has(cand))
|
|
13303
|
+
return true;
|
|
13304
|
+
if (existsSync24(resolve14(this.baseDir, cand)))
|
|
13305
|
+
return true;
|
|
13306
|
+
}
|
|
13301
13307
|
if (!fp.includes("/") && !fp.includes("\\")) {
|
|
13302
13308
|
return this.bareNameExists(fp);
|
|
13303
13309
|
}
|
|
13304
|
-
return
|
|
13310
|
+
return false;
|
|
13311
|
+
}
|
|
13312
|
+
dotfileVariants(fp) {
|
|
13313
|
+
const idx = Math.max(fp.lastIndexOf("/"), fp.lastIndexOf("\\"));
|
|
13314
|
+
const base = idx >= 0 ? fp.slice(idx + 1) : fp;
|
|
13315
|
+
if (base.startsWith("."))
|
|
13316
|
+
return [fp];
|
|
13317
|
+
return idx >= 0 ? [fp, `${fp.slice(0, idx + 1)}.${base}`] : [fp, `.${fp}`];
|
|
13305
13318
|
}
|
|
13306
13319
|
bareNameExists(name) {
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
for (const known of this.knownFiles) {
|
|
13312
|
-
if (known.endsWith(`/${name}`) || known.endsWith(`\\${name}`) || known === name) {
|
|
13320
|
+
for (const cand of this.dotfileVariants(name)) {
|
|
13321
|
+
if (existsSync24(resolve14(this.baseDir, cand)))
|
|
13322
|
+
return true;
|
|
13323
|
+
if (this.indexHas(cand))
|
|
13313
13324
|
return true;
|
|
13325
|
+
for (const known of this.knownFiles) {
|
|
13326
|
+
if (known.endsWith(`/${cand}`) || known.endsWith(`\\${cand}`) || known === cand) {
|
|
13327
|
+
return true;
|
|
13328
|
+
}
|
|
13314
13329
|
}
|
|
13315
13330
|
}
|
|
13316
13331
|
const now = Date.now();
|