fix(plugin): Correct Claude marketplace source path
Update the Claude marketplace entry to use a schema-valid relative source path and add a regression test so invalid marketplace sources fail in the local suite. Also document the maintainer workflow used for stale PR metadata and fork-gated Actions runs. Fixes #344
This commit is contained in:
25
tools/scripts/tests/claude_plugin_marketplace.test.js
Normal file
25
tools/scripts/tests/claude_plugin_marketplace.test.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { findProjectRoot } = require("../../lib/project-root");
|
||||
|
||||
const projectRoot = findProjectRoot(__dirname);
|
||||
const marketplacePath = path.join(projectRoot, ".claude-plugin", "marketplace.json");
|
||||
const marketplace = JSON.parse(fs.readFileSync(marketplacePath, "utf8"));
|
||||
|
||||
assert.ok(Array.isArray(marketplace.plugins), "marketplace.json must define a plugins array");
|
||||
assert.ok(marketplace.plugins.length > 0, "marketplace.json must contain at least one plugin");
|
||||
|
||||
for (const plugin of marketplace.plugins) {
|
||||
assert.strictEqual(
|
||||
typeof plugin.source,
|
||||
"string",
|
||||
`plugin ${plugin.name || "<unnamed>"} must define source as a string`,
|
||||
);
|
||||
assert.ok(
|
||||
plugin.source.startsWith("./"),
|
||||
`plugin ${plugin.name || "<unnamed>"} source must be a relative path starting with ./`,
|
||||
);
|
||||
}
|
||||
|
||||
console.log("ok");
|
||||
@@ -8,6 +8,7 @@ const ENABLED_VALUES = new Set(["1", "true", "yes", "on"]);
|
||||
const TOOL_SCRIPTS = path.join("tools", "scripts");
|
||||
const TOOL_TESTS = path.join(TOOL_SCRIPTS, "tests");
|
||||
const LOCAL_TEST_COMMANDS = [
|
||||
[path.join(TOOL_TESTS, "claude_plugin_marketplace.test.js")],
|
||||
[path.join(TOOL_TESTS, "jetski_gemini_loader.test.js")],
|
||||
[path.join(TOOL_TESTS, "npm_package_contents.test.js")],
|
||||
[path.join(TOOL_TESTS, "validate_skills_headings.test.js")],
|
||||
|
||||
Reference in New Issue
Block a user