refactor: trim skill install spec
parent
9c801e9c08
commit
adc2900aff
|
|
@ -13,14 +13,12 @@ import { CONFIG_DIR, resolveUserPath } from "../utils.js";
|
||||||
|
|
||||||
export type SkillInstallSpec = {
|
export type SkillInstallSpec = {
|
||||||
id?: string;
|
id?: string;
|
||||||
kind: "brew" | "node" | "go" | "pnpm" | "shell";
|
kind: "brew" | "node" | "go" | "shell";
|
||||||
label?: string;
|
label?: string;
|
||||||
bins?: string[];
|
bins?: string[];
|
||||||
formula?: string;
|
formula?: string;
|
||||||
package?: string;
|
package?: string;
|
||||||
module?: string;
|
module?: string;
|
||||||
repoPath?: string;
|
|
||||||
script?: string;
|
|
||||||
command?: string;
|
command?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -145,7 +143,6 @@ function parseInstallSpec(input: unknown): SkillInstallSpec | undefined {
|
||||||
kind !== "brew" &&
|
kind !== "brew" &&
|
||||||
kind !== "node" &&
|
kind !== "node" &&
|
||||||
kind !== "go" &&
|
kind !== "go" &&
|
||||||
kind !== "pnpm" &&
|
|
||||||
kind !== "shell"
|
kind !== "shell"
|
||||||
) {
|
) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
@ -162,8 +159,6 @@ function parseInstallSpec(input: unknown): SkillInstallSpec | undefined {
|
||||||
if (typeof raw.formula === "string") spec.formula = raw.formula;
|
if (typeof raw.formula === "string") spec.formula = raw.formula;
|
||||||
if (typeof raw.package === "string") spec.package = raw.package;
|
if (typeof raw.package === "string") spec.package = raw.package;
|
||||||
if (typeof raw.module === "string") spec.module = raw.module;
|
if (typeof raw.module === "string") spec.module = raw.module;
|
||||||
if (typeof raw.repoPath === "string") spec.repoPath = raw.repoPath;
|
|
||||||
if (typeof raw.script === "string") spec.script = raw.script;
|
|
||||||
if (typeof raw.command === "string") spec.command = raw.command;
|
if (typeof raw.command === "string") spec.command = raw.command;
|
||||||
|
|
||||||
return spec;
|
return spec;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue