@sellable/install 0.1.37 → 0.1.38
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/bin/sellable-install.mjs +28 -0
- package/package.json +1 -1
package/bin/sellable-install.mjs
CHANGED
|
@@ -11,10 +11,32 @@ import {
|
|
|
11
11
|
import { homedir } from "node:os";
|
|
12
12
|
import { dirname, join, relative } from "node:path";
|
|
13
13
|
import { stdout as output } from "node:process";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
14
15
|
|
|
15
16
|
const DEFAULT_API_URL = "https://app.sellable.dev";
|
|
16
17
|
const DEFAULT_SERVER_PACKAGE =
|
|
17
18
|
process.env.SELLABLE_MCP_PACKAGE || "@sellable/mcp@latest";
|
|
19
|
+
|
|
20
|
+
function getInstallVersion() {
|
|
21
|
+
try {
|
|
22
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
|
|
24
|
+
return pkg.version || "unknown";
|
|
25
|
+
} catch {
|
|
26
|
+
return "unknown";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getMcpVersion() {
|
|
31
|
+
try {
|
|
32
|
+
const r = spawnSync("npm", ["view", "@sellable/mcp", "version"], {
|
|
33
|
+
encoding: "utf8",
|
|
34
|
+
timeout: 5000,
|
|
35
|
+
});
|
|
36
|
+
if (r.status === 0 && r.stdout) return r.stdout.trim();
|
|
37
|
+
} catch {}
|
|
38
|
+
return "latest";
|
|
39
|
+
}
|
|
18
40
|
const CODEX_PLUGIN_VERSION = "0.1.27";
|
|
19
41
|
const CODEX_PLUGIN_COMPAT_VERSIONS = [
|
|
20
42
|
"0.1.8",
|
|
@@ -1422,6 +1444,12 @@ function printNextSteps(installedHosts) {
|
|
|
1422
1444
|
` LinkedIn: ${C.cyan}https://www.linkedin.com/in/csreyes92/${C.reset} ${C.grey}(DM Christian directly)${C.reset}`
|
|
1423
1445
|
);
|
|
1424
1446
|
console.log("");
|
|
1447
|
+
const installV = getInstallVersion();
|
|
1448
|
+
const mcpV = getMcpVersion();
|
|
1449
|
+
console.log(
|
|
1450
|
+
` ${C.grey}@sellable/install v${installV} · @sellable/mcp v${mcpV} · Codex plugin v${CODEX_PLUGIN_VERSION}${C.reset}`
|
|
1451
|
+
);
|
|
1452
|
+
console.log("");
|
|
1425
1453
|
}
|
|
1426
1454
|
|
|
1427
1455
|
async function main() {
|