promptgraph-mcp 2.3.6 → 2.3.7
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/github-import.js +15 -13
- package/package.json +1 -1
- package/tui.js +2 -1
package/github-import.js
CHANGED
|
@@ -211,19 +211,21 @@ export async function importFromGitHub(repoUrl) {
|
|
|
211
211
|
const detected = await detectSkillsDirFromAPI(ownerRepo);
|
|
212
212
|
skillsSubdir = detected?.subdir || null;
|
|
213
213
|
|
|
214
|
-
if (skillsSubdir) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
214
|
+
if (!skillsSubdir) {
|
|
215
|
+
throw new Error(
|
|
216
|
+
`No skill subdirectory found in ${ownerRepo}.\n` +
|
|
217
|
+
`Expected one of: ${SKILL_DIRS.join(', ')}\n` +
|
|
218
|
+
`Or any subfolder with .md files.\n` +
|
|
219
|
+
`Visit https://github.com/${ownerRepo} to check the repo structure.`
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
console.log(`found: ${detected.label}/`);
|
|
224
|
+
console.log(`Sparse-cloning ${url} (${skillsSubdir}/ only)...`);
|
|
225
|
+
cloneOk = sparseClone(url, dest, skillsSubdir);
|
|
226
|
+
if (!cloneOk) {
|
|
227
|
+
fs.rmSync(dest, { recursive: true, force: true });
|
|
228
|
+
throw new Error(`Sparse-checkout failed for ${url}`);
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
if (!cloneOk) throw new Error(`Clone failed for ${url}`);
|
package/package.json
CHANGED
package/tui.js
CHANGED
|
@@ -178,7 +178,8 @@ function render(state, installedSet = new Set()) {
|
|
|
178
178
|
? green(' ✓ installed') + dim(' ') + dim('d') + chalk.red(' remove') + dim(' ')
|
|
179
179
|
: dim(' Enter') + chalk.white(' install') + dim(' ');
|
|
180
180
|
write(instLabel + dim('Tab') + ' switch ' + dim('/') + ' search ' + dim('q') + ' quit' + CLEAR_EOL + '\n');
|
|
181
|
-
|
|
181
|
+
const ghUrl = sel.repo_url ? chalk.hex('#3B82F6')(` ↗ github.com/${sel.repo_url}`) : '';
|
|
182
|
+
write(dim(` → pg ${installCmd}`) + ghUrl + CLEAR_EOL + '\n');
|
|
182
183
|
} else if (state.confirming) {
|
|
183
184
|
write(chalk.red.bold(' Remove ') + chalk.white(state.confirming.name) + chalk.red('? ') +
|
|
184
185
|
chalk.white.bold('[y]') + chalk.gray('es ') + chalk.white.bold('[n]') + chalk.gray('o') + CLEAR_EOL + '\n');
|