@xynogen/pix-skills 0.5.1 → 0.5.2
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/package.json +1 -1
- package/src/directive.ts +1 -1
- package/src/index.ts +2 -2
- package/src/run.ts +2 -1
package/package.json
CHANGED
package/src/directive.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -107,14 +107,14 @@ export function extractDescription(content: string): string | null {
|
|
|
107
107
|
const m = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
108
108
|
if (!m) return null;
|
|
109
109
|
const dm = m[1]?.match(/^description\s*:\s*["']?(.+?)["']?\s*$/m);
|
|
110
|
-
return dm ? dm[1]?.trim() : null;
|
|
110
|
+
return dm ? (dm[1]?.trim() ?? null) : null;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
export function extractName(content: string): string | null {
|
|
114
114
|
const m = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
115
115
|
if (!m) return null;
|
|
116
116
|
const nm = m[1]?.match(/^name\s*:\s*["']?(.+?)["']?\s*$/m);
|
|
117
|
-
return nm ? nm[1]?.trim() : null;
|
|
117
|
+
return nm ? (nm[1]?.trim() ?? null) : null;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// ─── Command directive interpolation ───────────────────────────────────────────
|
package/src/run.ts
CHANGED
|
@@ -34,7 +34,8 @@ export function runArgv(argv: string[], opts: RunOptions): Promise<string> {
|
|
|
34
34
|
|
|
35
35
|
let child: ReturnType<typeof spawn>;
|
|
36
36
|
try {
|
|
37
|
-
|
|
37
|
+
const cmd = argv[0] ?? "";
|
|
38
|
+
child = spawn(cmd, argv.slice(1), {
|
|
38
39
|
cwd: opts.cwd,
|
|
39
40
|
stdio: ["ignore", "pipe", "pipe"],
|
|
40
41
|
});
|