dsh-claude-design-system 2.7.0 → 2.7.1
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/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// dsh-claude-design-system 2.7.
|
|
1
|
+
// dsh-claude-design-system 2.7.1: built from baoyu-design.
|
|
2
2
|
var define_PLUGIN_default = { name: "claude-design-system", provider: "dsh-claude-design-system", skills: [{ name: "claude-design-system", description: "Create and revise design systems in the Design System artifact format (project/design-system.json, tokens.json, a README brand book, component previews, fonts and asset groups) as local files, then open them in a local design-system page where the user can browse and edit tokens, type, components and assets. Use when the user asks for a design system or brand kit in this format, built from a code repository, a design tool or scratch, names claude-design-system or the Design System type, or wants to revise a folder that holds project/design-system.json. claude-slides and claude-design install these systems. A free-form HTML style guide, UI kit or token page is baoyu-design's.", comments: true }] };
|
|
3
3
|
|
|
4
4
|
import { spawn as spawn2 } from "node:child_process";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { statSync } from "node:fs";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
|
-
import { delimiter, dirname, isAbsolute, join as join2, sep } from "node:path";
|
|
8
|
+
import { basename as basename2, delimiter, dirname, isAbsolute, join as join2, sep } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
@@ -345,13 +345,19 @@ function openedEditor(script, exec, result) {
|
|
|
345
345
|
const args = exec.arguments;
|
|
346
346
|
const command = args?.command;
|
|
347
347
|
if (typeof command !== "string" || args?.run_in_background === true) return null;
|
|
348
|
-
|
|
349
|
-
if (at < 0 || !/(?:^|[\s"'])open(?:[\s"']|$)/.test(command.slice(at + script.length))) return null;
|
|
348
|
+
if (!/(?:^|[\s"'])open(?:[\s"']|$)/.test(command)) return null;
|
|
350
349
|
const stdout = bashStdout(result);
|
|
351
350
|
const opened = stdout === null ? void 0 : jsonObjects(stdout).findLast((o) => typeof o.root === "string" && typeof o.url === "string");
|
|
352
351
|
if (typeof opened?.root !== "string" || typeof opened.url !== "string") return null;
|
|
352
|
+
if (!ranScript(script, command, opened.stop)) return null;
|
|
353
353
|
return { session: String(exec.agent.id), root: opened.root, url: opened.url };
|
|
354
354
|
}
|
|
355
|
+
function ranScript(script, command, stop) {
|
|
356
|
+
if (typeof stop !== "string") return command.includes(script);
|
|
357
|
+
if (stop.includes(script)) return true;
|
|
358
|
+
const folder = basename2(dirname(dirname(script)));
|
|
359
|
+
return new RegExp(`[/\\\\]${folder.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[/\\\\]scripts[/\\\\]artifact\\.mjs`).test(stop);
|
|
360
|
+
}
|
|
355
361
|
var bound = (text) => text.length <= SUMMARY_MAX ? text : `${text.slice(0, SUMMARY_MAX - 1)}…`;
|
|
356
362
|
function commentMessage(skill, plugin, out, root) {
|
|
357
363
|
const title = typeof out.title === "string" && out.title ? out.title : root.split(/[\\/]/).pop() || root;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-design-system",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "DeepSeek Harness plugin: the claude-design-system skill from baoyu-design. The agent writes design systems (tokens, type, components, assets) as files and opens them in a local design-system page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -3221,7 +3221,7 @@ async function open(a, flags) {
|
|
|
3221
3221
|
assertServerFiles();
|
|
3222
3222
|
const existing = await runningServer2(a.root);
|
|
3223
3223
|
if (existing) {
|
|
3224
|
-
print({ url: existing.url, root: a.root, pid: existing.pid, reused: true, ...await lanOn2(existing.url, flags), ...reusedNote(a, flags) });
|
|
3224
|
+
print({ url: existing.url, root: a.root, pid: existing.pid, reused: true, ...await lanOn2(existing.url, flags), log: path13.join(a.root, LOG_FILE), stop: script("stop", a.root), ...reusedNote(a, flags) });
|
|
3225
3225
|
return;
|
|
3226
3226
|
}
|
|
3227
3227
|
const state = await startBackground(a, flags);
|