vite-plugin-webmcp-nexus 0.1.9

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alibaba
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ default: () => index_default,
34
+ vitePluginWebMcp: () => vitePluginWebMcp
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+ var import_node_path = __toESM(require("path"), 1);
38
+ var import_webmcp_nexus_core = require("webmcp-nexus-core");
39
+ var isDebug = () => (process.env.DEBUG ?? "").toLowerCase().includes("webmcp");
40
+ function normalizeViteAlias(raw) {
41
+ const out = {};
42
+ if (!raw) return out;
43
+ const list = Array.isArray(raw) ? raw : [];
44
+ for (const item of list) {
45
+ if (!item || typeof item.find !== "string" || typeof item.replacement !== "string") continue;
46
+ out[item.find] = item.replacement;
47
+ }
48
+ return out;
49
+ }
50
+ function vitePluginWebMcp(options = {}) {
51
+ const { include = ["src/**/*.ts", "src/**/*.tsx"], alias: userAlias = {} } = options;
52
+ let projectRoot = "";
53
+ let mergedAlias = {};
54
+ return {
55
+ name: "vite-plugin-webmcp",
56
+ enforce: "pre",
57
+ configResolved(config) {
58
+ projectRoot = config.root;
59
+ const viteAlias = normalizeViteAlias(config.resolve?.alias);
60
+ mergedAlias = { ...viteAlias, ...userAlias };
61
+ },
62
+ transform(code, id) {
63
+ const cleanId = id.split("?")[0];
64
+ if (!/\.[jt]sx?$/.test(cleanId)) return null;
65
+ const relativePath = import_node_path.default.relative(projectRoot, cleanId);
66
+ const isIncluded = include.some((pattern) => {
67
+ const regex = new RegExp(
68
+ "^" + pattern.replace(/\./g, "\\.").replace(/\*\*\//g, "(?:.*\\/)?").replace(/\*/g, "[^/]*") + "$"
69
+ );
70
+ return regex.test(relativePath);
71
+ });
72
+ if (!isIncluded) return null;
73
+ if (isDebug()) {
74
+ console.log(`[webmcp] vite transform processing: ${cleanId}`);
75
+ }
76
+ try {
77
+ const result = (0, import_webmcp_nexus_core.transformCode)(code, cleanId, { projectRoot, alias: mergedAlias });
78
+ if (result.transformed) {
79
+ if (isDebug()) {
80
+ console.log(`[webmcp] vite transformed: ${cleanId}`);
81
+ }
82
+ return { code: result.code, map: null };
83
+ }
84
+ } catch (err) {
85
+ const message = err instanceof Error ? err.message : String(err);
86
+ this.warn(`[webmcp] transform failed for ${cleanId}: ${message}`);
87
+ if (isDebug()) {
88
+ console.warn(`[webmcp] transform error:`, err);
89
+ }
90
+ }
91
+ return null;
92
+ }
93
+ };
94
+ }
95
+ var index_default = vitePluginWebMcp;
96
+ // Annotate the CommonJS export names for ESM import in node:
97
+ 0 && (module.exports = {
98
+ vitePluginWebMcp
99
+ });
100
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * vite-plugin-webmcp-nexus\n *\n * Vite 插件胶水层,在构建时通过 transform hook 委托 webmcp-nexus-core\n * 自动提取 TypeScript 类型并注入 __webmcpSchema 属性。\n */\n\nimport nodePath from 'node:path';\nimport type { Plugin, ResolvedConfig } from 'vite';\nimport { transformCode, type AliasMap } from 'webmcp-nexus-core';\n\nconst isDebug = () => (process.env.DEBUG ?? '').toLowerCase().includes('webmcp');\n\nexport interface WebMcpPluginOptions {\n /** 扫描范围(glob patterns),默认 ['src/\\*\\*\\/*.ts', 'src/\\*\\*\\/*.tsx'] */\n include?: string[];\n /**\n * 额外的模块路径 alias(合并到 vite 的 resolve.alias 之上)。\n * 用于解析 `import * as api from '@alias/xxx'` 类型的模块说明符。\n */\n alias?: Record<string, string>;\n}\n\n/**\n * 将 Vite 解析后的 resolve.alias(Alias[] 形式)归一化为 Record<string, string>。\n * 仅取 find 为 string 的项;RegExp find 无法直接形成前缀匹配表,忽略。\n */\nfunction normalizeViteAlias(raw: ResolvedConfig['resolve']['alias']): Record<string, string> {\n const out: Record<string, string> = {};\n if (!raw) return out;\n const list = Array.isArray(raw) ? raw : [];\n for (const item of list) {\n if (!item || typeof item.find !== 'string' || typeof item.replacement !== 'string') continue;\n out[item.find] = item.replacement;\n }\n return out;\n}\n\nexport function vitePluginWebMcp(options: WebMcpPluginOptions = {}): Plugin {\n const { include = ['src/**/*.ts', 'src/**/*.tsx'], alias: userAlias = {} } = options;\n let projectRoot = '';\n let mergedAlias: AliasMap = {};\n\n return {\n name: 'vite-plugin-webmcp',\n enforce: 'pre',\n\n configResolved(config) {\n projectRoot = config.root;\n const viteAlias = normalizeViteAlias(config.resolve?.alias);\n // 用户显式配置优先覆盖 vite 默认 alias\n mergedAlias = { ...viteAlias, ...userAlias };\n },\n\n transform(code: string, id: string) {\n const cleanId = id.split('?')[0];\n if (!/\\.[jt]sx?$/.test(cleanId)) return null;\n\n // include 匹配检查\n const relativePath = nodePath.relative(projectRoot, cleanId);\n const isIncluded = include.some(pattern => {\n const regex = new RegExp(\n '^' +\n pattern\n .replace(/\\./g, '\\\\.')\n .replace(/\\*\\*\\//g, '(?:.*\\\\/)?')\n .replace(/\\*/g, '[^/]*') +\n '$',\n );\n return regex.test(relativePath);\n });\n if (!isIncluded) return null;\n\n if (isDebug()) {\n console.log(`[webmcp] vite transform processing: ${cleanId}`);\n }\n\n // 委托给 webmcp-nexus-core\n try {\n const result = transformCode(code, cleanId, { projectRoot, alias: mergedAlias });\n\n if (result.transformed) {\n if (isDebug()) {\n console.log(`[webmcp] vite transformed: ${cleanId}`);\n }\n return { code: result.code, map: null };\n }\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : String(err);\n this.warn(`[webmcp] transform failed for ${cleanId}: ${message}`);\n if (isDebug()) {\n console.warn(`[webmcp] transform error:`, err);\n }\n }\n\n return null;\n },\n };\n}\n\nexport default vitePluginWebMcp;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,uBAAqB;AAErB,+BAA6C;AAE7C,IAAM,UAAU,OAAO,QAAQ,IAAI,SAAS,IAAI,YAAY,EAAE,SAAS,QAAQ;AAgB/E,SAAS,mBAAmB,KAAiE;AAC3F,QAAM,MAA8B,CAAC;AACrC,MAAI,CAAC,IAAK,QAAO;AACjB,QAAM,OAAO,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;AACzC,aAAW,QAAQ,MAAM;AACvB,QAAI,CAAC,QAAQ,OAAO,KAAK,SAAS,YAAY,OAAO,KAAK,gBAAgB,SAAU;AACpF,QAAI,KAAK,IAAI,IAAI,KAAK;AAAA,EACxB;AACA,SAAO;AACT;AAEO,SAAS,iBAAiB,UAA+B,CAAC,GAAW;AAC1E,QAAM,EAAE,UAAU,CAAC,eAAe,cAAc,GAAG,OAAO,YAAY,CAAC,EAAE,IAAI;AAC7E,MAAI,cAAc;AAClB,MAAI,cAAwB,CAAC;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IAET,eAAe,QAAQ;AACrB,oBAAc,OAAO;AACrB,YAAM,YAAY,mBAAmB,OAAO,SAAS,KAAK;AAE1D,oBAAc,EAAE,GAAG,WAAW,GAAG,UAAU;AAAA,IAC7C;AAAA,IAEA,UAAU,MAAc,IAAY;AAClC,YAAM,UAAU,GAAG,MAAM,GAAG,EAAE,CAAC;AAC/B,UAAI,CAAC,aAAa,KAAK,OAAO,EAAG,QAAO;AAGxC,YAAM,eAAe,iBAAAA,QAAS,SAAS,aAAa,OAAO;AAC3D,YAAM,aAAa,QAAQ,KAAK,aAAW;AACzC,cAAM,QAAQ,IAAI;AAAA,UAChB,MACE,QACG,QAAQ,OAAO,KAAK,EACpB,QAAQ,WAAW,YAAY,EAC/B,QAAQ,OAAO,OAAO,IACzB;AAAA,QACJ;AACA,eAAO,MAAM,KAAK,YAAY;AAAA,MAChC,CAAC;AACD,UAAI,CAAC,WAAY,QAAO;AAExB,UAAI,QAAQ,GAAG;AACb,gBAAQ,IAAI,uCAAuC,OAAO,EAAE;AAAA,MAC9D;AAGA,UAAI;AACF,cAAM,aAAS,wCAAc,MAAM,SAAS,EAAE,aAAa,OAAO,YAAY,CAAC;AAE/E,YAAI,OAAO,aAAa;AACtB,cAAI,QAAQ,GAAG;AACb,oBAAQ,IAAI,8BAA8B,OAAO,EAAE;AAAA,UACrD;AACA,iBAAO,EAAE,MAAM,OAAO,MAAM,KAAK,KAAK;AAAA,QACxC;AAAA,MACF,SAAS,KAAc;AACrB,cAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,aAAK,KAAK,iCAAiC,OAAO,KAAK,OAAO,EAAE;AAChE,YAAI,QAAQ,GAAG;AACb,kBAAQ,KAAK,6BAA6B,GAAG;AAAA,QAC/C;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["nodePath"]}
@@ -0,0 +1,21 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ /**
4
+ * vite-plugin-webmcp-nexus
5
+ *
6
+ * Vite 插件胶水层,在构建时通过 transform hook 委托 webmcp-nexus-core
7
+ * 自动提取 TypeScript 类型并注入 __webmcpSchema 属性。
8
+ */
9
+
10
+ interface WebMcpPluginOptions {
11
+ /** 扫描范围(glob patterns),默认 ['src/\*\*\/*.ts', 'src/\*\*\/*.tsx'] */
12
+ include?: string[];
13
+ /**
14
+ * 额外的模块路径 alias(合并到 vite 的 resolve.alias 之上)。
15
+ * 用于解析 `import * as api from '@alias/xxx'` 类型的模块说明符。
16
+ */
17
+ alias?: Record<string, string>;
18
+ }
19
+ declare function vitePluginWebMcp(options?: WebMcpPluginOptions): Plugin;
20
+
21
+ export { type WebMcpPluginOptions, vitePluginWebMcp as default, vitePluginWebMcp };
@@ -0,0 +1,21 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ /**
4
+ * vite-plugin-webmcp-nexus
5
+ *
6
+ * Vite 插件胶水层,在构建时通过 transform hook 委托 webmcp-nexus-core
7
+ * 自动提取 TypeScript 类型并注入 __webmcpSchema 属性。
8
+ */
9
+
10
+ interface WebMcpPluginOptions {
11
+ /** 扫描范围(glob patterns),默认 ['src/\*\*\/*.ts', 'src/\*\*\/*.tsx'] */
12
+ include?: string[];
13
+ /**
14
+ * 额外的模块路径 alias(合并到 vite 的 resolve.alias 之上)。
15
+ * 用于解析 `import * as api from '@alias/xxx'` 类型的模块说明符。
16
+ */
17
+ alias?: Record<string, string>;
18
+ }
19
+ declare function vitePluginWebMcp(options?: WebMcpPluginOptions): Plugin;
20
+
21
+ export { type WebMcpPluginOptions, vitePluginWebMcp as default, vitePluginWebMcp };
package/dist/index.js ADDED
@@ -0,0 +1,65 @@
1
+ // src/index.ts
2
+ import nodePath from "path";
3
+ import { transformCode } from "webmcp-nexus-core";
4
+ var isDebug = () => (process.env.DEBUG ?? "").toLowerCase().includes("webmcp");
5
+ function normalizeViteAlias(raw) {
6
+ const out = {};
7
+ if (!raw) return out;
8
+ const list = Array.isArray(raw) ? raw : [];
9
+ for (const item of list) {
10
+ if (!item || typeof item.find !== "string" || typeof item.replacement !== "string") continue;
11
+ out[item.find] = item.replacement;
12
+ }
13
+ return out;
14
+ }
15
+ function vitePluginWebMcp(options = {}) {
16
+ const { include = ["src/**/*.ts", "src/**/*.tsx"], alias: userAlias = {} } = options;
17
+ let projectRoot = "";
18
+ let mergedAlias = {};
19
+ return {
20
+ name: "vite-plugin-webmcp",
21
+ enforce: "pre",
22
+ configResolved(config) {
23
+ projectRoot = config.root;
24
+ const viteAlias = normalizeViteAlias(config.resolve?.alias);
25
+ mergedAlias = { ...viteAlias, ...userAlias };
26
+ },
27
+ transform(code, id) {
28
+ const cleanId = id.split("?")[0];
29
+ if (!/\.[jt]sx?$/.test(cleanId)) return null;
30
+ const relativePath = nodePath.relative(projectRoot, cleanId);
31
+ const isIncluded = include.some((pattern) => {
32
+ const regex = new RegExp(
33
+ "^" + pattern.replace(/\./g, "\\.").replace(/\*\*\//g, "(?:.*\\/)?").replace(/\*/g, "[^/]*") + "$"
34
+ );
35
+ return regex.test(relativePath);
36
+ });
37
+ if (!isIncluded) return null;
38
+ if (isDebug()) {
39
+ console.log(`[webmcp] vite transform processing: ${cleanId}`);
40
+ }
41
+ try {
42
+ const result = transformCode(code, cleanId, { projectRoot, alias: mergedAlias });
43
+ if (result.transformed) {
44
+ if (isDebug()) {
45
+ console.log(`[webmcp] vite transformed: ${cleanId}`);
46
+ }
47
+ return { code: result.code, map: null };
48
+ }
49
+ } catch (err) {
50
+ const message = err instanceof Error ? err.message : String(err);
51
+ this.warn(`[webmcp] transform failed for ${cleanId}: ${message}`);
52
+ if (isDebug()) {
53
+ console.warn(`[webmcp] transform error:`, err);
54
+ }
55
+ }
56
+ return null;
57
+ }
58
+ };
59
+ }
60
+ var index_default = vitePluginWebMcp;
61
+ export {
62
+ index_default as default,
63
+ vitePluginWebMcp
64
+ };
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * vite-plugin-webmcp-nexus\n *\n * Vite 插件胶水层,在构建时通过 transform hook 委托 webmcp-nexus-core\n * 自动提取 TypeScript 类型并注入 __webmcpSchema 属性。\n */\n\nimport nodePath from 'node:path';\nimport type { Plugin, ResolvedConfig } from 'vite';\nimport { transformCode, type AliasMap } from 'webmcp-nexus-core';\n\nconst isDebug = () => (process.env.DEBUG ?? '').toLowerCase().includes('webmcp');\n\nexport interface WebMcpPluginOptions {\n /** 扫描范围(glob patterns),默认 ['src/\\*\\*\\/*.ts', 'src/\\*\\*\\/*.tsx'] */\n include?: string[];\n /**\n * 额外的模块路径 alias(合并到 vite 的 resolve.alias 之上)。\n * 用于解析 `import * as api from '@alias/xxx'` 类型的模块说明符。\n */\n alias?: Record<string, string>;\n}\n\n/**\n * 将 Vite 解析后的 resolve.alias(Alias[] 形式)归一化为 Record<string, string>。\n * 仅取 find 为 string 的项;RegExp find 无法直接形成前缀匹配表,忽略。\n */\nfunction normalizeViteAlias(raw: ResolvedConfig['resolve']['alias']): Record<string, string> {\n const out: Record<string, string> = {};\n if (!raw) return out;\n const list = Array.isArray(raw) ? raw : [];\n for (const item of list) {\n if (!item || typeof item.find !== 'string' || typeof item.replacement !== 'string') continue;\n out[item.find] = item.replacement;\n }\n return out;\n}\n\nexport function vitePluginWebMcp(options: WebMcpPluginOptions = {}): Plugin {\n const { include = ['src/**/*.ts', 'src/**/*.tsx'], alias: userAlias = {} } = options;\n let projectRoot = '';\n let mergedAlias: AliasMap = {};\n\n return {\n name: 'vite-plugin-webmcp',\n enforce: 'pre',\n\n configResolved(config) {\n projectRoot = config.root;\n const viteAlias = normalizeViteAlias(config.resolve?.alias);\n // 用户显式配置优先覆盖 vite 默认 alias\n mergedAlias = { ...viteAlias, ...userAlias };\n },\n\n transform(code: string, id: string) {\n const cleanId = id.split('?')[0];\n if (!/\\.[jt]sx?$/.test(cleanId)) return null;\n\n // include 匹配检查\n const relativePath = nodePath.relative(projectRoot, cleanId);\n const isIncluded = include.some(pattern => {\n const regex = new RegExp(\n '^' +\n pattern\n .replace(/\\./g, '\\\\.')\n .replace(/\\*\\*\\//g, '(?:.*\\\\/)?')\n .replace(/\\*/g, '[^/]*') +\n '$',\n );\n return regex.test(relativePath);\n });\n if (!isIncluded) return null;\n\n if (isDebug()) {\n console.log(`[webmcp] vite transform processing: ${cleanId}`);\n }\n\n // 委托给 webmcp-nexus-core\n try {\n const result = transformCode(code, cleanId, { projectRoot, alias: mergedAlias });\n\n if (result.transformed) {\n if (isDebug()) {\n console.log(`[webmcp] vite transformed: ${cleanId}`);\n }\n return { code: result.code, map: null };\n }\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : String(err);\n this.warn(`[webmcp] transform failed for ${cleanId}: ${message}`);\n if (isDebug()) {\n console.warn(`[webmcp] transform error:`, err);\n }\n }\n\n return null;\n },\n };\n}\n\nexport default vitePluginWebMcp;\n"],"mappings":";AAOA,OAAO,cAAc;AAErB,SAAS,qBAAoC;AAE7C,IAAM,UAAU,OAAO,QAAQ,IAAI,SAAS,IAAI,YAAY,EAAE,SAAS,QAAQ;AAgB/E,SAAS,mBAAmB,KAAiE;AAC3F,QAAM,MAA8B,CAAC;AACrC,MAAI,CAAC,IAAK,QAAO;AACjB,QAAM,OAAO,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;AACzC,aAAW,QAAQ,MAAM;AACvB,QAAI,CAAC,QAAQ,OAAO,KAAK,SAAS,YAAY,OAAO,KAAK,gBAAgB,SAAU;AACpF,QAAI,KAAK,IAAI,IAAI,KAAK;AAAA,EACxB;AACA,SAAO;AACT;AAEO,SAAS,iBAAiB,UAA+B,CAAC,GAAW;AAC1E,QAAM,EAAE,UAAU,CAAC,eAAe,cAAc,GAAG,OAAO,YAAY,CAAC,EAAE,IAAI;AAC7E,MAAI,cAAc;AAClB,MAAI,cAAwB,CAAC;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IAET,eAAe,QAAQ;AACrB,oBAAc,OAAO;AACrB,YAAM,YAAY,mBAAmB,OAAO,SAAS,KAAK;AAE1D,oBAAc,EAAE,GAAG,WAAW,GAAG,UAAU;AAAA,IAC7C;AAAA,IAEA,UAAU,MAAc,IAAY;AAClC,YAAM,UAAU,GAAG,MAAM,GAAG,EAAE,CAAC;AAC/B,UAAI,CAAC,aAAa,KAAK,OAAO,EAAG,QAAO;AAGxC,YAAM,eAAe,SAAS,SAAS,aAAa,OAAO;AAC3D,YAAM,aAAa,QAAQ,KAAK,aAAW;AACzC,cAAM,QAAQ,IAAI;AAAA,UAChB,MACE,QACG,QAAQ,OAAO,KAAK,EACpB,QAAQ,WAAW,YAAY,EAC/B,QAAQ,OAAO,OAAO,IACzB;AAAA,QACJ;AACA,eAAO,MAAM,KAAK,YAAY;AAAA,MAChC,CAAC;AACD,UAAI,CAAC,WAAY,QAAO;AAExB,UAAI,QAAQ,GAAG;AACb,gBAAQ,IAAI,uCAAuC,OAAO,EAAE;AAAA,MAC9D;AAGA,UAAI;AACF,cAAM,SAAS,cAAc,MAAM,SAAS,EAAE,aAAa,OAAO,YAAY,CAAC;AAE/E,YAAI,OAAO,aAAa;AACtB,cAAI,QAAQ,GAAG;AACb,oBAAQ,IAAI,8BAA8B,OAAO,EAAE;AAAA,UACrD;AACA,iBAAO,EAAE,MAAM,OAAO,MAAM,KAAK,KAAK;AAAA,QACxC;AAAA,MACF,SAAS,KAAc;AACrB,cAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,aAAK,KAAK,iCAAiC,OAAO,KAAK,OAAO,EAAE;AAChE,YAAI,QAAQ,GAAG;AACb,kBAAQ,KAAK,6BAA6B,GAAG;AAAA,QAC/C;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":[]}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "vite-plugin-webmcp-nexus",
3
+ "version": "0.1.9",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "dependencies": {
24
+ "webmcp-nexus-core": "0.1.9",
25
+ "webmcp-nexus-sdk": "0.1.9"
26
+ },
27
+ "peerDependencies": {
28
+ "vite": "^7.0.0 || ^8.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^24.12.2",
32
+ "tsup": "^8.5.0",
33
+ "vite": "^8.0.9"
34
+ },
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "dev": "tsup --watch",
38
+ "test": "vitest run --passWithNoTests",
39
+ "clean": "rm -rf dist"
40
+ }
41
+ }