strray-ai 1.0.21 → 1.0.22
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/scripts/postinstall.cjs +1 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strray-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "⚡ StringRay ⚡: Bulletproof AI orchestration with systematic error prevention. Zero dead ends. Ship clean, tested, optimized code — every time.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin/index.js",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -481,71 +481,7 @@ function configureStrRayPlugin() {
|
|
|
481
481
|
console.log("ℹ️ Test files not found (this is normal for some installations)");
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
//
|
|
485
|
-
console.log("Checking consumer scripts for path updates...");
|
|
486
|
-
const scriptsDir = path.join(process.cwd(), "node_modules", "strray-ai", "scripts");
|
|
487
|
-
if (fs.existsSync(scriptsDir)) {
|
|
488
|
-
console.log("Consumer scripts found, updating paths...");
|
|
489
|
-
let scriptsUpdated = 0;
|
|
490
|
-
|
|
491
|
-
function processScriptFile(filePath) {
|
|
492
|
-
try {
|
|
493
|
-
let content = fs.readFileSync(filePath, "utf-8");
|
|
494
|
-
let updated = false;
|
|
495
|
-
|
|
496
|
-
// Convert relative dist/ paths to node_modules/strray-ai/dist/ paths
|
|
497
|
-
if (content.includes('../dist/') || content.includes('./dist/') || content.includes('dist/')) {
|
|
498
|
-
// Convert '../dist/' paths
|
|
499
|
-
content = content.replace(/'\.\.\/dist\//g, "'./node_modules/strray-ai/dist/");
|
|
500
|
-
content = content.replace(/"\.\.\/dist\//g, '"./node_modules/strray-ai/dist/');
|
|
501
|
-
content = content.replace(/`\.\.\/dist\//g, "`./node_modules/strray-ai/dist/");
|
|
502
|
-
|
|
503
|
-
// Convert './dist/' paths
|
|
504
|
-
content = content.replace(/'\.\/dist\//g, "'./node_modules/strray-ai/dist/");
|
|
505
|
-
content = content.replace(/"\.\/dist\//g, '"./node_modules/strray-ai/dist/');
|
|
506
|
-
content = content.replace(/`\.\.\/dist\//g, "`./node_modules/strray-ai/dist/");
|
|
507
|
-
|
|
508
|
-
// Convert 'dist/' paths (relative to project root)
|
|
509
|
-
content = content.replace(/'dist\//g, "'./node_modules/strray-ai/dist/");
|
|
510
|
-
content = content.replace(/"dist\//g, '"./node_modules/strray-ai/dist/');
|
|
511
|
-
content = content.replace(/`dist\//g, "`./node_modules/strray-ai/dist/");
|
|
512
|
-
|
|
513
|
-
updated = true;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
if (updated) {
|
|
517
|
-
fs.writeFileSync(filePath, content);
|
|
518
|
-
scriptsUpdated++;
|
|
519
|
-
console.log(`✅ Updated script file: ${path.relative(process.cwd(), filePath)}`);
|
|
520
|
-
}
|
|
521
|
-
} catch (error) {
|
|
522
|
-
console.warn(`Warning: Could not update script file ${filePath}:`, error.message);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
function processScriptsDirectory(dirPath) {
|
|
527
|
-
const items = fs.readdirSync(dirPath);
|
|
528
|
-
for (const item of items) {
|
|
529
|
-
const fullPath = path.join(dirPath, item);
|
|
530
|
-
const stat = fs.statSync(fullPath);
|
|
531
|
-
if (stat.isDirectory()) {
|
|
532
|
-
processScriptsDirectory(fullPath);
|
|
533
|
-
} else if (item.endsWith('.js') || item.endsWith('.mjs') || item.endsWith('.ts')) {
|
|
534
|
-
processScriptFile(fullPath);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
processScriptsDirectory(scriptsDir);
|
|
540
|
-
|
|
541
|
-
if (scriptsUpdated > 0) {
|
|
542
|
-
console.log(`✅ Updated ${scriptsUpdated} consumer scripts with correct paths`);
|
|
543
|
-
} else {
|
|
544
|
-
console.log("ℹ️ No script path updates needed");
|
|
545
|
-
}
|
|
546
|
-
} else {
|
|
547
|
-
console.log("ℹ️ Consumer scripts not found");
|
|
548
|
-
}
|
|
484
|
+
// Consumer scripts already have correct relative paths - no conversion needed
|
|
549
485
|
|
|
550
486
|
// All configuration paths are now updated for consumer usage
|
|
551
487
|
|