mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(build): share Cursor plugin metadata reads (#16382)
This commit is contained in:
1 parent
51475a6341
commit
d470cc88b6
1 file changed
+5
-7
@@ -164,13 +164,11 @@ export const syncCursorPluginSkill = async ({ root, check }) => {
|
||||
|
||||
/** Read the committed plugin and report structured contract issues. */
|
||||
export const inspectCursorPluginBundle = async (root) => {
|
||||
const manifest = JSON.parse(
|
||||
await readFile(join(root, CURSOR_PLUGIN_MANIFEST), "utf8"),
|
||||
);
|
||||
const mcp = JSON.parse(await readFile(join(root, CURSOR_PLUGIN_MCP), "utf8"));
|
||||
const packageJson = JSON.parse(
|
||||
await readFile(join(root, "package.json"), "utf8"),
|
||||
);
|
||||
const readJson = async (relativePath) =>
|
||||
JSON.parse(await readFile(join(root, relativePath), "utf8"));
|
||||
const manifest = await readJson(CURSOR_PLUGIN_MANIFEST);
|
||||
const mcp = await readJson(CURSOR_PLUGIN_MCP);
|
||||
const packageJson = await readJson("package.json");
|
||||
const logoExists = await stat(join(root, CURSOR_PLUGIN_LOGO))
|
||||
.then((metadata) => metadata.isFile())
|
||||
.catch((cause) => {
|
||||
|
||||
Reference in new issue
Block a user