@showly/mcp-server 0.3.0 → 0.4.0
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/cli.js
CHANGED
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
// even when it is advertised. So a human whose agent runs on a box with no
|
|
30
30
|
// browser, or who is holding a phone rather than sitting at the machine, had a
|
|
31
31
|
// working server-side flow and no way to reach it.
|
|
32
|
-
import { readFileSync, mkdirSync, rmSync, writeFileSync, existsSync, realpathSync, } from "node:fs";
|
|
32
|
+
import { readFileSync, readdirSync, mkdirSync, rmSync, writeFileSync, existsSync, realpathSync, } from "node:fs";
|
|
33
33
|
import { dirname, join } from "node:path";
|
|
34
34
|
import { homedir } from "node:os";
|
|
35
35
|
import { pathToFileURL } from "node:url";
|
|
36
36
|
import { loadManifest } from "./index.js";
|
|
37
|
-
import {
|
|
37
|
+
import { SHOWLY_HOSTING_SKILL_DIRECTORY, SHOWLY_HOSTING_SKILL_NAME, SHOWLY_LEGACY_SKILL_NAME, } from "./showly-hosting-skill.js";
|
|
38
38
|
/**
|
|
39
39
|
* The version of THIS copy of the package, read from the manifest that ships
|
|
40
40
|
* beside it. `manifest.test.ts` pins manifest.json, package.json,
|
|
@@ -219,15 +219,35 @@ export function performSkillInstall(target, env = process.env) {
|
|
|
219
219
|
? codexHome || join(homedir(), ".codex")
|
|
220
220
|
: join(homedir(), ".claude");
|
|
221
221
|
const skillsRoot = join(hostDirectory, "skills");
|
|
222
|
-
const
|
|
222
|
+
const skillDirectory = join(skillsRoot, SHOWLY_HOSTING_SKILL_NAME);
|
|
223
|
+
const path = join(skillDirectory, "SKILL.md");
|
|
223
224
|
const removedLegacyPath = removeLegacySkill(skillsRoot);
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
let wrote = false;
|
|
226
|
+
for (const relativePath of skillFiles(SHOWLY_HOSTING_SKILL_DIRECTORY)) {
|
|
227
|
+
const sourcePath = join(SHOWLY_HOSTING_SKILL_DIRECTORY, relativePath);
|
|
228
|
+
const destinationPath = join(skillDirectory, relativePath);
|
|
229
|
+
const expected = readFileSync(sourcePath);
|
|
230
|
+
const existing = existsSync(destinationPath)
|
|
231
|
+
? readFileSync(destinationPath)
|
|
232
|
+
: null;
|
|
233
|
+
if (existing?.equals(expected))
|
|
234
|
+
continue;
|
|
235
|
+
mkdirSync(dirname(destinationPath), { recursive: true });
|
|
236
|
+
writeFileSync(destinationPath, expected);
|
|
237
|
+
wrote = true;
|
|
227
238
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
return { path, wrote, alreadyConfigured: !wrote, removedLegacyPath };
|
|
240
|
+
}
|
|
241
|
+
function skillFiles(root, relativeDirectory = "") {
|
|
242
|
+
const directory = join(root, relativeDirectory);
|
|
243
|
+
return readdirSync(directory, { withFileTypes: true })
|
|
244
|
+
.sort((left, right) => left.name.localeCompare(right.name))
|
|
245
|
+
.flatMap((entry) => {
|
|
246
|
+
const relativePath = join(relativeDirectory, entry.name);
|
|
247
|
+
return entry.isDirectory()
|
|
248
|
+
? skillFiles(root, relativePath)
|
|
249
|
+
: [relativePath];
|
|
250
|
+
});
|
|
231
251
|
}
|
|
232
252
|
/**
|
|
233
253
|
* Delete the superseded showly-publish skill directory, if we wrote it.
|
|
@@ -11,4 +11,5 @@ export declare const SHOWLY_HOSTING_SKILL_NAME = "showly-hosting";
|
|
|
11
11
|
* (its front matter still declares the old skill name).
|
|
12
12
|
*/
|
|
13
13
|
export declare const SHOWLY_LEGACY_SKILL_NAME = "showly-publish";
|
|
14
|
+
export declare const SHOWLY_HOSTING_SKILL_DIRECTORY: string;
|
|
14
15
|
export declare const SHOWLY_HOSTING_SKILL_MARKDOWN: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
2
4
|
export const SHOWLY_HOSTING_SKILL_NAME = "showly-hosting";
|
|
3
5
|
/**
|
|
4
6
|
* The name this skill shipped under up to @showly/mcp-server 0.2.0.
|
|
@@ -12,4 +14,5 @@ export const SHOWLY_HOSTING_SKILL_NAME = "showly-hosting";
|
|
|
12
14
|
* (its front matter still declares the old skill name).
|
|
13
15
|
*/
|
|
14
16
|
export const SHOWLY_LEGACY_SKILL_NAME = "showly-publish";
|
|
15
|
-
export const
|
|
17
|
+
export const SHOWLY_HOSTING_SKILL_DIRECTORY = fileURLToPath(new URL("../skills/showly-hosting/", import.meta.url));
|
|
18
|
+
export const SHOWLY_HOSTING_SKILL_MARKDOWN = readFileSync(join(SHOWLY_HOSTING_SKILL_DIRECTORY, "SKILL.md"), "utf8");
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://showly.ai/schemas/skill-manifest-v1.json",
|
|
3
3
|
"name": "showly",
|
|
4
4
|
"displayName": "Showly",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"description": "Deploy and manage Showly sites from inside Claude Code / Codex.",
|
|
7
7
|
"homepage": "https://showly.ai/docs/skills",
|
|
8
8
|
"publisher": "Showly",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@showly/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Connect Claude Code / Codex to the Showly MCP server — preview and deploy sites from your agent.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"claude-code-skill": {
|
|
54
54
|
"name": "showly",
|
|
55
|
-
"version": "0.
|
|
55
|
+
"version": "0.4.0",
|
|
56
56
|
"description": "Deploy and manage Showly sites from inside Claude Code.",
|
|
57
57
|
"mcp-server": {
|
|
58
58
|
"url-env": "SHOWLY_MCP_URL",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"codex-plugin": {
|
|
67
67
|
"name": "showly",
|
|
68
|
-
"version": "0.
|
|
68
|
+
"version": "0.4.0",
|
|
69
69
|
"type": "mcp-server",
|
|
70
70
|
"manifest": "manifest.json"
|
|
71
71
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Showly Hosting"
|
|
3
3
|
short_description: "Host, list, update, and publish websites on Showly"
|
|
4
|
-
default_prompt: "
|
|
4
|
+
default_prompt: "Use $showly-hosting to list my Showly sites, then help me update or publish one."
|