skillhub 0.1.1 → 0.1.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/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import chalk5 from "chalk";
|
|
15
|
+
import { createRequire } from "module";
|
|
15
16
|
|
|
16
17
|
// src/commands/install.ts
|
|
17
18
|
import fs from "fs-extra";
|
|
@@ -23,6 +24,8 @@ import { parseSkillMd } from "skillhub-core";
|
|
|
23
24
|
// src/utils/api.ts
|
|
24
25
|
var API_BASE_URL = process.env.SKILLHUB_API_URL || "https://skills.palebluedot.live/api";
|
|
25
26
|
var API_TIMEOUT = parseInt(process.env.SKILLHUB_API_TIMEOUT || "30000");
|
|
27
|
+
if (typeof process !== "undefined" && process.env.NODE_TLS_REJECT_UNAUTHORIZED === void 0) {
|
|
28
|
+
}
|
|
26
29
|
async function fetchWithTimeout(url, options = {}) {
|
|
27
30
|
const controller = new AbortController();
|
|
28
31
|
const timeoutId = setTimeout(() => controller.abort(), API_TIMEOUT);
|
|
@@ -324,7 +327,11 @@ async function search(query, options) {
|
|
|
324
327
|
}
|
|
325
328
|
} catch (error) {
|
|
326
329
|
spinner.fail("Search failed");
|
|
327
|
-
|
|
330
|
+
const err = error;
|
|
331
|
+
console.error(chalk2.red(err.message || "Unknown error"));
|
|
332
|
+
if (process.env.DEBUG) {
|
|
333
|
+
console.error(chalk2.dim("Stack:"), err.stack);
|
|
334
|
+
}
|
|
328
335
|
process.exit(1);
|
|
329
336
|
}
|
|
330
337
|
}
|
|
@@ -475,7 +482,9 @@ function maskSecret(value) {
|
|
|
475
482
|
}
|
|
476
483
|
|
|
477
484
|
// src/index.ts
|
|
478
|
-
var
|
|
485
|
+
var require2 = createRequire(import.meta.url);
|
|
486
|
+
var pkg = require2("../package.json");
|
|
487
|
+
var VERSION = pkg.version;
|
|
479
488
|
var program = new Command();
|
|
480
489
|
program.name("skillhub").description("CLI for managing AI Agent skills").version(VERSION);
|
|
481
490
|
program.command("install <skill-id>").description("Install a skill from the registry").option("-p, --platform <platform>", "Target platform (claude, codex, copilot, cursor, windsurf)", "claude").option("--project", "Install in the current project instead of globally").option("-f, --force", "Overwrite existing skill").action(async (skillId, options) => {
|
package/package.json
CHANGED