skpm-cli 1.4.6 → 1.4.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/dist/cli.mjs +21 -8
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -423,8 +423,8 @@ var GitCloneError = class extends Error {
|
|
|
423
423
|
};
|
|
424
424
|
async function cloneRepo(url, ref) {
|
|
425
425
|
const tempDir = await mkdtemp(join(tmpdir(), "skpm-"));
|
|
426
|
-
process.env.GIT_TERMINAL_PROMPT = "0";
|
|
427
426
|
const git = esm_default({ timeout: { block: CLONE_TIMEOUT_MS } });
|
|
427
|
+
git.env("GIT_TERMINAL_PROMPT", "0");
|
|
428
428
|
const cloneOptions = ref ? [
|
|
429
429
|
"--depth",
|
|
430
430
|
"1",
|
|
@@ -1900,7 +1900,7 @@ function createEmptyLocalLock() {
|
|
|
1900
1900
|
skills: {}
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
|
-
var version$1 = "1.4.
|
|
1903
|
+
var version$1 = "1.4.7";
|
|
1904
1904
|
const isCancelled$1 = (value) => typeof value === "symbol";
|
|
1905
1905
|
async function isSourcePrivate(source) {
|
|
1906
1906
|
const ownerRepo = parseOwnerRepo(source);
|
|
@@ -2831,12 +2831,25 @@ async function runAdd(args, options = {}) {
|
|
|
2831
2831
|
const depResult = await resolveDependencies(skill, async (source, skillName) => {
|
|
2832
2832
|
const depSource = skillName ? `${source}@${skillName}` : source;
|
|
2833
2833
|
M.step(import_picocolors.default.dim(` Installing dependency: ${depSource}`));
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2834
|
+
const parsed = parseSource(source);
|
|
2835
|
+
let depTempDir = null;
|
|
2836
|
+
try {
|
|
2837
|
+
if (parsed.type === "local") depTempDir = parsed.localPath;
|
|
2838
|
+
else depTempDir = await cloneRepo(parsed.url, parsed.ref);
|
|
2839
|
+
const depSkills = await discoverSkills(depTempDir, parsed.subpath, { includeInternal: true });
|
|
2840
|
+
const targetSkills = skillName ? depSkills.filter((s) => s.name.toLowerCase() === skillName.toLowerCase()) : depSkills;
|
|
2841
|
+
if (targetSkills.length === 0) {
|
|
2842
|
+
M.warn(import_picocolors.default.yellow(` Dependency skill not found: ${depSource}`));
|
|
2843
|
+
return [];
|
|
2844
|
+
}
|
|
2845
|
+
for (const depSkill of targetSkills) for (const agent of targetAgents) await installSkillForAgent(depSkill, agent, {
|
|
2846
|
+
global: installGlobally,
|
|
2847
|
+
mode: installMode
|
|
2848
|
+
});
|
|
2849
|
+
return targetSkills;
|
|
2850
|
+
} finally {
|
|
2851
|
+
if (depTempDir && parsed.type !== "local") await cleanupTempDir(depTempDir).catch(() => {});
|
|
2852
|
+
}
|
|
2840
2853
|
}, (warning) => M.warn(import_picocolors.default.yellow(warning)));
|
|
2841
2854
|
allPostInstallCommands.push(...depResult.postInstallCommands);
|
|
2842
2855
|
if (depResult.errors.length > 0) for (const err of depResult.errors) M.warn(import_picocolors.default.yellow(`Dependency ${err.ref}: ${err.error}`));
|