@skillport/cli 0.1.2 → 0.1.3
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 +15 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __export = (target, all) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// ../../packages/shared/dist/constants.js
|
|
13
|
-
var SP_VERSION, SP_CONFIG_DIR, SP_KEYS_DIR, SP_AUDIT_DIR, SP_CONFIG_FILE, SP_REGISTRY_FILE, OPENCLAW_SKILLS_DIR, DEFAULT_MARKETPLACE_URL;
|
|
13
|
+
var SP_VERSION, SP_CONFIG_DIR, SP_KEYS_DIR, SP_AUDIT_DIR, SP_CONFIG_FILE, SP_REGISTRY_FILE, OPENCLAW_SKILLS_DIR, DEFAULT_MARKETPLACE_URL, DEFAULT_MARKETPLACE_WEB_URL;
|
|
14
14
|
var init_constants = __esm({
|
|
15
15
|
"../../packages/shared/dist/constants.js"() {
|
|
16
16
|
"use strict";
|
|
@@ -22,6 +22,7 @@ var init_constants = __esm({
|
|
|
22
22
|
SP_REGISTRY_FILE = "installed/registry.json";
|
|
23
23
|
OPENCLAW_SKILLS_DIR = ".openclaw/skills";
|
|
24
24
|
DEFAULT_MARKETPLACE_URL = "https://api.skillport.market";
|
|
25
|
+
DEFAULT_MARKETPLACE_WEB_URL = "https://skillport.market";
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
|
|
@@ -77,9 +78,16 @@ function registryPath() {
|
|
|
77
78
|
function loadConfig() {
|
|
78
79
|
const path = configPath();
|
|
79
80
|
if (!existsSync(path)) {
|
|
80
|
-
return {
|
|
81
|
+
return {
|
|
82
|
+
marketplace_url: DEFAULT_MARKETPLACE_URL,
|
|
83
|
+
marketplace_web_url: DEFAULT_MARKETPLACE_WEB_URL
|
|
84
|
+
};
|
|
81
85
|
}
|
|
82
|
-
|
|
86
|
+
const raw = JSON.parse(readFileSync(path, "utf-8"));
|
|
87
|
+
if (!raw.marketplace_web_url) {
|
|
88
|
+
raw.marketplace_web_url = DEFAULT_MARKETPLACE_WEB_URL;
|
|
89
|
+
}
|
|
90
|
+
return raw;
|
|
83
91
|
}
|
|
84
92
|
function saveConfig(config) {
|
|
85
93
|
ensureConfigDirs();
|
|
@@ -2509,7 +2517,7 @@ function listenOnPort(server, port) {
|
|
|
2509
2517
|
async function loginCommand(options) {
|
|
2510
2518
|
const config = loadConfig();
|
|
2511
2519
|
console.log(chalk9.bold("SkillPort Market Login"));
|
|
2512
|
-
console.log(chalk9.dim(`Marketplace: ${config.
|
|
2520
|
+
console.log(chalk9.dim(`Marketplace: ${config.marketplace_web_url}`));
|
|
2513
2521
|
console.log();
|
|
2514
2522
|
let method = options.method;
|
|
2515
2523
|
if (options.token) {
|
|
@@ -2558,7 +2566,7 @@ async function loginCommand(options) {
|
|
|
2558
2566
|
throw err;
|
|
2559
2567
|
}
|
|
2560
2568
|
}
|
|
2561
|
-
const authUrl = `${config.
|
|
2569
|
+
const authUrl = `${config.marketplace_web_url}/auth/cli?state=${state}&port=${actualPort}`;
|
|
2562
2570
|
if (options.browser === false) {
|
|
2563
2571
|
console.log(chalk9.bold("Open this URL in your browser to authenticate:"));
|
|
2564
2572
|
console.log();
|
|
@@ -2710,7 +2718,7 @@ async function publishCommand(sspPath) {
|
|
|
2710
2718
|
console.log(` ${chalk10.bold("Scan:")} ${result.scan_passed ? chalk10.green("PASSED") : chalk10.red("FAILED")}`);
|
|
2711
2719
|
console.log(` ${chalk10.bold("Risk Score:")} ${result.risk_score}/100`);
|
|
2712
2720
|
console.log();
|
|
2713
|
-
console.log(chalk10.dim(` URL: ${config.
|
|
2721
|
+
console.log(chalk10.dim(` URL: ${config.marketplace_web_url}/skills/${result.id}`));
|
|
2714
2722
|
console.log(chalk10.dim(` Install: skillport install ${result.ssp_id}@${result.version}`));
|
|
2715
2723
|
} catch (error) {
|
|
2716
2724
|
console.log(chalk10.red(`Upload failed: ${error.message}`));
|
|
@@ -2720,7 +2728,7 @@ async function publishCommand(sspPath) {
|
|
|
2720
2728
|
|
|
2721
2729
|
// src/index.ts
|
|
2722
2730
|
var program = new Command();
|
|
2723
|
-
program.name("skillport").description("SkillPort \u2014 secure skill distribution for OpenClaw").version("0.1.
|
|
2731
|
+
program.name("skillport").description("SkillPort \u2014 secure skill distribution for OpenClaw").version("0.1.3");
|
|
2724
2732
|
program.command("init").description("Generate Ed25519 key pair for signing").action(initCommand);
|
|
2725
2733
|
program.command("scan <path>").description("Run security scan on a skill directory or .ssp file").action(scanCommand);
|
|
2726
2734
|
program.command("export <path>").description("Export a skill directory as a SkillPort package (.ssp)").option("-o, --output <file>", "Output file path").option("-y, --yes", "Non-interactive mode (include all, skip prompts)").option("--id <id>", "Skill ID (author-slug/skill-slug)").option("--name <name>", "Skill name").option("--description <desc>", "Skill description").option("--skill-version <ver>", "Skill version (semver)").option("--author <name>", "Author name").option("--openclaw-compat <range>", "OpenClaw compatibility range").option("--os <os...>", "Compatible OS (macos, linux, windows)").action(exportCommand);
|
package/package.json
CHANGED