refactor: drop pnpm skill installer
This commit is contained in:
@@ -62,7 +62,7 @@ Fields under `metadata.clawdis`:
|
||||
- `requires.env` — list; env var must exist **or** be provided in config.
|
||||
- `requires.config` — list of `clawdis.json` paths that must be truthy.
|
||||
- `primaryEnv` — env var name associated with `skills.<name>.apiKey`.
|
||||
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/pnpm/shell).
|
||||
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/shell).
|
||||
|
||||
Installer example:
|
||||
|
||||
|
||||
@@ -86,18 +86,6 @@ function buildInstallCommand(
|
||||
return { argv: null, shell: null, error: "missing go module" };
|
||||
return { argv: ["go", "install", spec.module], shell: null };
|
||||
}
|
||||
case "pnpm": {
|
||||
if (!spec.repoPath || !spec.script) {
|
||||
return {
|
||||
argv: null,
|
||||
shell: null,
|
||||
error: "missing pnpm repoPath/script",
|
||||
};
|
||||
}
|
||||
const repoPath = resolveUserPath(spec.repoPath);
|
||||
const cmd = `cd ${JSON.stringify(repoPath)} && pnpm install && pnpm run ${JSON.stringify(spec.script)}`;
|
||||
return { argv: null, shell: cmd };
|
||||
}
|
||||
case "shell": {
|
||||
if (!spec.command)
|
||||
return { argv: null, shell: null, error: "missing shell command" };
|
||||
|
||||
@@ -76,14 +76,12 @@ function selectPreferredInstallSpec(
|
||||
const brewSpec = findKind("brew");
|
||||
const nodeSpec = findKind("node");
|
||||
const goSpec = findKind("go");
|
||||
const pnpmSpec = findKind("pnpm");
|
||||
const shellSpec = findKind("shell");
|
||||
|
||||
if (prefs.preferBrew && hasBinary("brew") && brewSpec) return brewSpec;
|
||||
if (nodeSpec) return nodeSpec;
|
||||
if (brewSpec) return brewSpec;
|
||||
if (goSpec) return goSpec;
|
||||
if (pnpmSpec) return pnpmSpec;
|
||||
if (shellSpec) return shellSpec;
|
||||
return indexed[0];
|
||||
}
|
||||
@@ -110,8 +108,6 @@ function normalizeInstallOptions(
|
||||
label = `Install ${spec.package} (${prefs.nodeManager})`;
|
||||
} else if (spec.kind === "go" && spec.module) {
|
||||
label = `Install ${spec.module} (go)`;
|
||||
} else if (spec.kind === "pnpm" && spec.repoPath) {
|
||||
label = `Install ${spec.repoPath} (pnpm)`;
|
||||
} else {
|
||||
label = "Run installer";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user