phinix 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phinix",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "phinix - A Model Context Protocol server for managing and generating React components",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -0,0 +1,4 @@
1
+ export { definePluginMap, registerDefine } from "./registerDefine.js";
2
+ export { demoPluginMap, registerDemo } from "./registerDemo.js";
3
+ export { sourcePluginMap, registerSource } from "./registerSource.js";
4
+ export { registerPluginDesc } from "./registerPluginDesc.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 无浊
3
+ * @description 注册插件定义,用于存储插件的定义信息
4
+ */
5
+
6
+ export const definePluginMap = new Map();
7
+ export const registerDefine = (pluginName, define) => {
8
+ definePluginMap.set(pluginName, define);
9
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 无浊
3
+ * @description 注册插件演示,用于存储插件的演示代码
4
+ */
5
+
6
+ export const demoPluginMap = new Map();
7
+ export const registerDemo = (pluginName, demo) => {
8
+ demoPluginMap.set(pluginName, demo);
9
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 无浊
3
+ * @description 注册插件描述,会注入到组件的描述中
4
+ */
5
+
6
+ export const pluginDescMap = new Map();
7
+ export const registerPluginDesc = (pluginName, desc) => {
8
+ pluginDescMap.set(pluginName, desc);
9
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 无浊
3
+ * @description 注册插件源码,用于存储插件的源码信息
4
+ */
5
+
6
+ export const sourcePluginMap = new Map();
7
+ export const registerSource = (pluginName, source) => {
8
+ sourcePluginMap.set(pluginName, source);
9
+ };
@@ -7,7 +7,7 @@ import {
7
7
  getFileExtension,
8
8
  getFileSummary,
9
9
  } from "../utils.js";
10
- import { demoPluginMap } from "../pluginUtils";
10
+ import { demoPluginMap } from "../pluginUtils/index.js";
11
11
 
12
12
  export const componentDemosSchema = {
13
13
  componentName: z.string().describe("要获取示例的组件名称"),
@@ -2,7 +2,7 @@ import fs from "fs/promises";
2
2
  import path from "path";
3
3
  import { z } from "zod";
4
4
  import { __dirname } from "../config.js";
5
- import { pluginDescMap } from "../pluginUtils/registerPluginDesc";
5
+ import { pluginDescMap } from "../pluginUtils/registerPluginDesc.js";
6
6
 
7
7
  export const componentListSchema = {};
8
8