scai 0.1.107 → 0.1.108
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/README.md +3 -2
- package/dist/CHANGELOG.md +5 -1
- package/dist/github/repo.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -559,7 +559,7 @@ You can run it in two ways:
|
|
|
559
559
|
|
|
560
560
|
---
|
|
561
561
|
|
|
562
|
-
### Backup only of `~/.scai
|
|
562
|
+
### Backup only of `~/.scai`:
|
|
563
563
|
|
|
564
564
|
Creates a backup of the .scai folder in the user root dir.
|
|
565
565
|
|
|
@@ -569,7 +569,8 @@ Creates a backup of the .scai folder in the user root dir.
|
|
|
569
569
|
|
|
570
570
|
Results in this:
|
|
571
571
|
~/.scai_backup_2025-08-12T06-58-00-227Z/
|
|
572
|
-
|
|
572
|
+
|
|
573
|
+
</br>
|
|
573
574
|
|
|
574
575
|
## 🔐 License & Fair Use
|
|
575
576
|
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -162,4 +162,8 @@ Type handling with the module pipeline
|
|
|
162
162
|
## 2025-08-31
|
|
163
163
|
|
|
164
164
|
• Update Spinner class to correctly display text and frames
|
|
165
|
-
• Update CLI help to reflect new agent workflow examples.
|
|
165
|
+
• Update CLI help to reflect new agent workflow examples.
|
|
166
|
+
|
|
167
|
+
## 2025-09-01
|
|
168
|
+
|
|
169
|
+
* Improve handling of GitHub repository URLs and paths by extracting the owner and name separately
|
package/dist/github/repo.js
CHANGED
|
@@ -15,12 +15,19 @@ function runGitCommand(cmd, cwd) {
|
|
|
15
15
|
*/
|
|
16
16
|
function getRepoOwnerAndNameFromGit(indexDir) {
|
|
17
17
|
try {
|
|
18
|
-
const originUrl = runGitCommand('git config --get remote.origin.url', indexDir);
|
|
18
|
+
const originUrl = runGitCommand('git config --get remote.origin.url', indexDir).trim();
|
|
19
19
|
console.log(`🔗 Git origin URL from '${indexDir}': ${originUrl}`);
|
|
20
|
-
|
|
20
|
+
// Handle both SSH and HTTPS formats, with or without extra slashes
|
|
21
|
+
// Examples:
|
|
22
|
+
// - git@github.com:owner/repo.git
|
|
23
|
+
// - git@github.com:/owner/repo.git
|
|
24
|
+
// - https://github.com/owner/repo.git
|
|
25
|
+
const match = originUrl.match(/github[^:/]*[:/]\/?(.+?)(?:\.git)?$/);
|
|
21
26
|
if (!match)
|
|
22
27
|
throw new Error("❌ Could not parse GitHub repo from origin URL.");
|
|
23
28
|
const [owner, repo] = match[1].split('/');
|
|
29
|
+
if (!owner || !repo)
|
|
30
|
+
throw new Error("❌ Failed to extract owner or repo name from URL.");
|
|
24
31
|
console.log(`✅ Parsed from Git: owner='${owner}', repo='${repo}'`);
|
|
25
32
|
return { owner, repo };
|
|
26
33
|
}
|