@lovable.dev/mcp-js 0.21.1-rc.1 → 0.22.0

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.
Files changed (87) hide show
  1. package/dist/authorize-BMeXd_Sh.d.ts +25 -0
  2. package/dist/base-CM-KCpp6.d.ts +28 -0
  3. package/dist/chunk-4EHZUUS5.js +141 -0
  4. package/dist/chunk-6DXGZZA4.js +6 -0
  5. package/dist/chunk-6KNM7RGD.js +79 -0
  6. package/dist/chunk-6QFZYYUV.js +11 -0
  7. package/dist/chunk-EOFPMSND.js +6 -0
  8. package/dist/chunk-H37EB22A.js +125 -0
  9. package/dist/chunk-MA5H6PSF.js +46 -0
  10. package/dist/chunk-P43FIUMZ.js +114 -0
  11. package/dist/chunk-RK62EMPY.js +741 -0
  12. package/dist/chunk-RLE4UE63.js +58 -0
  13. package/dist/chunk-UQK5UO6C.js +26 -0
  14. package/dist/chunk-XQWJN6DC.js +14 -0
  15. package/dist/chunk-Y3ZFPEQH.js +8 -0
  16. package/dist/cli/extract-manifest.cjs +201 -116
  17. package/dist/cli/extract-manifest.d.cts +1 -1
  18. package/dist/cli/extract-manifest.d.ts +1 -1
  19. package/dist/cli/extract-manifest.js +156 -117
  20. package/dist/index.cjs +329 -129
  21. package/dist/index.d.cts +26 -26
  22. package/dist/index.d.ts +26 -26
  23. package/dist/index.js +177 -118
  24. package/dist/{io-CS4UL6_A.d.ts → io-D4srzRKc.d.ts} +4 -6
  25. package/dist/protocols/mcp/index.cjs +750 -3
  26. package/dist/protocols/mcp/index.d.cts +7 -6
  27. package/dist/protocols/mcp/index.d.ts +7 -6
  28. package/dist/protocols/mcp/index.js +12 -2
  29. package/dist/protocols/oauth-metadata.cjs +539 -48
  30. package/dist/protocols/oauth-metadata.d.cts +6 -5
  31. package/dist/protocols/oauth-metadata.d.ts +6 -5
  32. package/dist/protocols/oauth-metadata.js +10 -52
  33. package/dist/protocols/rest/index.cjs +843 -5
  34. package/dist/protocols/rest/index.d.cts +10 -7
  35. package/dist/protocols/rest/index.d.ts +10 -7
  36. package/dist/protocols/rest/index.js +16 -3
  37. package/dist/stacks/supabase/index.cjs +1318 -76
  38. package/dist/stacks/supabase/index.d.cts +30 -29
  39. package/dist/stacks/supabase/index.d.ts +30 -29
  40. package/dist/stacks/supabase/index.js +89 -73
  41. package/dist/stacks/supabase/vite.cjs +287 -258
  42. package/dist/stacks/supabase/vite.d.cts +24 -24
  43. package/dist/stacks/supabase/vite.d.ts +24 -24
  44. package/dist/stacks/supabase/vite.js +252 -252
  45. package/dist/stacks/tanstack/index.cjs +1272 -42
  46. package/dist/stacks/tanstack/index.d.cts +9 -8
  47. package/dist/stacks/tanstack/index.d.ts +9 -8
  48. package/dist/stacks/tanstack/index.js +41 -36
  49. package/dist/stacks/tanstack/vite.cjs +312 -223
  50. package/dist/stacks/tanstack/vite.d.cts +81 -80
  51. package/dist/stacks/tanstack/vite.d.ts +81 -80
  52. package/dist/stacks/tanstack/vite.js +282 -216
  53. package/dist/types-qqrmJ736.d.ts +321 -0
  54. package/package.json +28 -71
  55. package/dist/authorize-CumVyk7p.d.cts +0 -27
  56. package/dist/authorize-D6p4-9_D.d.ts +0 -27
  57. package/dist/base-CoIFvAmS.d.cts +0 -26
  58. package/dist/base-CoIFvAmS.d.ts +0 -26
  59. package/dist/content-D5LJAHyM.js +0 -12
  60. package/dist/content-NCYIGgOb.cjs +0 -17
  61. package/dist/context-BweeEcoA.cjs +0 -56
  62. package/dist/context-CIpPzN7P.js +0 -51
  63. package/dist/cors-B7CTXIHD.js +0 -829
  64. package/dist/cors-BebjKPrc.cjs +0 -912
  65. package/dist/forwarded--h4efJy-.js +0 -43
  66. package/dist/forwarded-Pi8Hs5Ps.cjs +0 -48
  67. package/dist/fs-errors-CWNzOV75.cjs +0 -11
  68. package/dist/fs-errors-PA2t1TIp.js +0 -6
  69. package/dist/io-CbbUbPY3.d.cts +0 -15
  70. package/dist/list-tools-CBCuS1Tv.cjs +0 -57
  71. package/dist/list-tools-CsWgiRy1.d.ts +0 -8
  72. package/dist/list-tools-CtZHOuPv.d.cts +0 -8
  73. package/dist/list-tools-D75RGtgs.js +0 -46
  74. package/dist/logger-2OXtfiIW.js +0 -141
  75. package/dist/logger-BqPOa_E1.cjs +0 -194
  76. package/dist/mcp-Cdj0AYst.cjs +0 -123
  77. package/dist/mcp-GngXbcqN.js +0 -118
  78. package/dist/metadata-path-CAkNcfyY.js +0 -12
  79. package/dist/metadata-path-zd7NSNoa.cjs +0 -17
  80. package/dist/package-7EUptuSJ.js +0 -4
  81. package/dist/package-BwCGVRcB.cjs +0 -9
  82. package/dist/paths-IS65L6TA.js +0 -7
  83. package/dist/paths-OP318a6c.cjs +0 -18
  84. package/dist/rest-CXH6-zv9.js +0 -113
  85. package/dist/rest-CyV8LHeB.cjs +0 -118
  86. package/dist/types-BYdYYTjk.d.cts +0 -321
  87. package/dist/types-BYdYYTjk.d.ts +0 -321
@@ -1,83 +1,84 @@
1
- import { t as McpPluginApi } from "../../io-CbbUbPY3.cjs";
2
- import { Plugin } from "vite";
3
- //#region src/stacks/tanstack/vite.d.ts
1
+ import { Plugin } from 'vite';
2
+ export { M as McpPluginApi } from '../../io-D4srzRKc.js';
3
+
4
4
  interface McpPluginOptions {
5
- /**
6
- * Path to the MCP entry file (default export = `defineMcp(...)` result),
7
- * relative to the project root.
8
- * @default "src/lib/mcp/index.ts"
9
- */
10
- mcpEntry?: string;
11
- /**
12
- * Where TanStack route files live, relative to the project root.
13
- * The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
14
- * routes here.
15
- * @default "src/routes"
16
- */
17
- routesDir?: string;
18
- /**
19
- * Public URL path for the MCP-protocol route.
20
- *
21
- * The REST companion routes co-locate with this path under a `.mcp`
22
- * sub-segment of the same parent prefix: `/mcp` keeps them at
23
- * `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
24
- * `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
25
- * namespace keeps them from colliding with user-defined URLs without
26
- * anchoring them at the root. Set `restRoutes: false` to drop the
27
- * companions entirely.
28
- *
29
- * Must start with `/` and use only `/mcp`-style segments; anything more
30
- * exotic doesn't map cleanly to a TanStack file name.
31
- * @default "/mcp"
32
- */
33
- path?: string;
34
- /**
35
- * Filename to emit for the main MCP route, relative to `routesDir`.
36
- * Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
37
- * `/api/mcp` → `api/mcp.ts`).
38
- */
39
- routeFileName?: string;
40
- /**
41
- * Set to `false` to skip emitting the REST companion routes at
42
- * `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
43
- * `protectedResourceMetadataRoute: false` as well if you want the MCP
44
- * protocol route to be the only emitted surface.
45
- * @default true
46
- */
47
- restRoutes?: boolean;
48
- /**
49
- * Set to `false` to skip emitting the OAuth protected-resource metadata
50
- * route at `/.well-known/oauth-protected-resource`.
51
- * @default true
52
- */
53
- protectedResourceMetadataRoute?: boolean;
54
- /**
55
- * Public URL path for the OAuth protected-resource metadata route (RFC 9728).
56
- * Both the emitted route file and the runtime `WWW-Authenticate` challenge use
57
- * this path, so they can't drift. Use it when a host gate exposes only a
58
- * sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
59
- * anonymously reachable) and the default well-known path is blocked.
60
- *
61
- * Leading-dot segments are bracket-escaped for TanStack file routing
62
- * (`.well-known` → `[.well-known]`); the final segment becomes the route file.
63
- * Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
64
- * advertises an externally hosted document instead of serving one), and
65
- * cannot be combined with `protectedResourceMetadataRoute: false`.
66
- * @default "/.well-known/oauth-protected-resource"
67
- */
68
- metadataPath?: string;
69
- /**
70
- * Derive the public origin of the advertised OAuth `resource`/metadata URLs
71
- * from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
72
- * serves a custom domain by rewriting `Host` to the internal backend and
73
- * overwriting `X-Forwarded-Host` with the real public host, so the default is
74
- * `true` to make custom domains work out of the box. Set `false` only when
75
- * deploying behind a proxy that does not overwrite the header (a client could
76
- * then spoof it to redirect the advertised resource).
77
- * @default true
78
- */
79
- trustForwardedHost?: boolean;
5
+ /**
6
+ * Path to the MCP entry file (default export = `defineMcp(...)` result),
7
+ * relative to the project root.
8
+ * @default "src/lib/mcp/index.ts"
9
+ */
10
+ mcpEntry?: string;
11
+ /**
12
+ * Where TanStack route files live, relative to the project root.
13
+ * The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
14
+ * routes here.
15
+ * @default "src/routes"
16
+ */
17
+ routesDir?: string;
18
+ /**
19
+ * Public URL path for the MCP-protocol route.
20
+ *
21
+ * The REST companion routes co-locate with this path under a `.mcp`
22
+ * sub-segment of the same parent prefix: `/mcp` keeps them at
23
+ * `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
24
+ * `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
25
+ * namespace keeps them from colliding with user-defined URLs without
26
+ * anchoring them at the root. Set `restRoutes: false` to drop the
27
+ * companions entirely.
28
+ *
29
+ * Must start with `/` and use only `/mcp`-style segments; anything more
30
+ * exotic doesn't map cleanly to a TanStack file name.
31
+ * @default "/mcp"
32
+ */
33
+ path?: string;
34
+ /**
35
+ * Filename to emit for the main MCP route, relative to `routesDir`.
36
+ * Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
37
+ * `/api/mcp` → `api/mcp.ts`).
38
+ */
39
+ routeFileName?: string;
40
+ /**
41
+ * Set to `false` to skip emitting the REST companion routes at
42
+ * `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
43
+ * `protectedResourceMetadataRoute: false` as well if you want the MCP
44
+ * protocol route to be the only emitted surface.
45
+ * @default true
46
+ */
47
+ restRoutes?: boolean;
48
+ /**
49
+ * Set to `false` to skip emitting the OAuth protected-resource metadata
50
+ * route at `/.well-known/oauth-protected-resource`.
51
+ * @default true
52
+ */
53
+ protectedResourceMetadataRoute?: boolean;
54
+ /**
55
+ * Public URL path for the OAuth protected-resource metadata route (RFC 9728).
56
+ * Both the emitted route file and the runtime `WWW-Authenticate` challenge use
57
+ * this path, so they can't drift. Use it when a host gate exposes only a
58
+ * sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
59
+ * anonymously reachable) and the default well-known path is blocked.
60
+ *
61
+ * Leading-dot segments are bracket-escaped for TanStack file routing
62
+ * (`.well-known` → `[.well-known]`); the final segment becomes the route file.
63
+ * Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
64
+ * advertises an externally hosted document instead of serving one), and
65
+ * cannot be combined with `protectedResourceMetadataRoute: false`.
66
+ * @default "/.well-known/oauth-protected-resource"
67
+ */
68
+ metadataPath?: string;
69
+ /**
70
+ * Derive the public origin of the advertised OAuth `resource`/metadata URLs
71
+ * from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
72
+ * serves a custom domain by rewriting `Host` to the internal backend and
73
+ * overwriting `X-Forwarded-Host` with the real public host, so the default is
74
+ * `true` to make custom domains work out of the box. Set `false` only when
75
+ * deploying behind a proxy that does not overwrite the header (a client could
76
+ * then spoof it to redirect the advertised resource).
77
+ * @default true
78
+ */
79
+ trustForwardedHost?: boolean;
80
80
  }
81
+
81
82
  declare function assertUrlPathShape(urlPath: string): string;
82
83
  declare function deriveRouteFileName(urlPath: string): string;
83
84
  declare function assertMetadataPathShape(metadataPath: string): void;
@@ -94,5 +95,5 @@ declare function assertMetadataPathShape(metadataPath: string): void;
94
95
  * time) — not by this plugin.
95
96
  */
96
97
  declare function mcpPlugin(options?: McpPluginOptions): Plugin;
97
- //#endregion
98
- export { type McpPluginApi, McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, mcpPlugin, deriveRouteFileName };
98
+
99
+ export { type McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, deriveRouteFileName, mcpPlugin };
@@ -1,83 +1,84 @@
1
- import { t as McpPluginApi } from "../../io-CS4UL6_A.js";
2
- import { Plugin } from "vite";
3
- //#region src/stacks/tanstack/vite.d.ts
1
+ import { Plugin } from 'vite';
2
+ export { M as McpPluginApi } from '../../io-D4srzRKc.js';
3
+
4
4
  interface McpPluginOptions {
5
- /**
6
- * Path to the MCP entry file (default export = `defineMcp(...)` result),
7
- * relative to the project root.
8
- * @default "src/lib/mcp/index.ts"
9
- */
10
- mcpEntry?: string;
11
- /**
12
- * Where TanStack route files live, relative to the project root.
13
- * The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
14
- * routes here.
15
- * @default "src/routes"
16
- */
17
- routesDir?: string;
18
- /**
19
- * Public URL path for the MCP-protocol route.
20
- *
21
- * The REST companion routes co-locate with this path under a `.mcp`
22
- * sub-segment of the same parent prefix: `/mcp` keeps them at
23
- * `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
24
- * `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
25
- * namespace keeps them from colliding with user-defined URLs without
26
- * anchoring them at the root. Set `restRoutes: false` to drop the
27
- * companions entirely.
28
- *
29
- * Must start with `/` and use only `/mcp`-style segments; anything more
30
- * exotic doesn't map cleanly to a TanStack file name.
31
- * @default "/mcp"
32
- */
33
- path?: string;
34
- /**
35
- * Filename to emit for the main MCP route, relative to `routesDir`.
36
- * Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
37
- * `/api/mcp` → `api/mcp.ts`).
38
- */
39
- routeFileName?: string;
40
- /**
41
- * Set to `false` to skip emitting the REST companion routes at
42
- * `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
43
- * `protectedResourceMetadataRoute: false` as well if you want the MCP
44
- * protocol route to be the only emitted surface.
45
- * @default true
46
- */
47
- restRoutes?: boolean;
48
- /**
49
- * Set to `false` to skip emitting the OAuth protected-resource metadata
50
- * route at `/.well-known/oauth-protected-resource`.
51
- * @default true
52
- */
53
- protectedResourceMetadataRoute?: boolean;
54
- /**
55
- * Public URL path for the OAuth protected-resource metadata route (RFC 9728).
56
- * Both the emitted route file and the runtime `WWW-Authenticate` challenge use
57
- * this path, so they can't drift. Use it when a host gate exposes only a
58
- * sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
59
- * anonymously reachable) and the default well-known path is blocked.
60
- *
61
- * Leading-dot segments are bracket-escaped for TanStack file routing
62
- * (`.well-known` → `[.well-known]`); the final segment becomes the route file.
63
- * Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
64
- * advertises an externally hosted document instead of serving one), and
65
- * cannot be combined with `protectedResourceMetadataRoute: false`.
66
- * @default "/.well-known/oauth-protected-resource"
67
- */
68
- metadataPath?: string;
69
- /**
70
- * Derive the public origin of the advertised OAuth `resource`/metadata URLs
71
- * from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
72
- * serves a custom domain by rewriting `Host` to the internal backend and
73
- * overwriting `X-Forwarded-Host` with the real public host, so the default is
74
- * `true` to make custom domains work out of the box. Set `false` only when
75
- * deploying behind a proxy that does not overwrite the header (a client could
76
- * then spoof it to redirect the advertised resource).
77
- * @default true
78
- */
79
- trustForwardedHost?: boolean;
5
+ /**
6
+ * Path to the MCP entry file (default export = `defineMcp(...)` result),
7
+ * relative to the project root.
8
+ * @default "src/lib/mcp/index.ts"
9
+ */
10
+ mcpEntry?: string;
11
+ /**
12
+ * Where TanStack route files live, relative to the project root.
13
+ * The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
14
+ * routes here.
15
+ * @default "src/routes"
16
+ */
17
+ routesDir?: string;
18
+ /**
19
+ * Public URL path for the MCP-protocol route.
20
+ *
21
+ * The REST companion routes co-locate with this path under a `.mcp`
22
+ * sub-segment of the same parent prefix: `/mcp` keeps them at
23
+ * `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
24
+ * `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
25
+ * namespace keeps them from colliding with user-defined URLs without
26
+ * anchoring them at the root. Set `restRoutes: false` to drop the
27
+ * companions entirely.
28
+ *
29
+ * Must start with `/` and use only `/mcp`-style segments; anything more
30
+ * exotic doesn't map cleanly to a TanStack file name.
31
+ * @default "/mcp"
32
+ */
33
+ path?: string;
34
+ /**
35
+ * Filename to emit for the main MCP route, relative to `routesDir`.
36
+ * Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
37
+ * `/api/mcp` → `api/mcp.ts`).
38
+ */
39
+ routeFileName?: string;
40
+ /**
41
+ * Set to `false` to skip emitting the REST companion routes at
42
+ * `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
43
+ * `protectedResourceMetadataRoute: false` as well if you want the MCP
44
+ * protocol route to be the only emitted surface.
45
+ * @default true
46
+ */
47
+ restRoutes?: boolean;
48
+ /**
49
+ * Set to `false` to skip emitting the OAuth protected-resource metadata
50
+ * route at `/.well-known/oauth-protected-resource`.
51
+ * @default true
52
+ */
53
+ protectedResourceMetadataRoute?: boolean;
54
+ /**
55
+ * Public URL path for the OAuth protected-resource metadata route (RFC 9728).
56
+ * Both the emitted route file and the runtime `WWW-Authenticate` challenge use
57
+ * this path, so they can't drift. Use it when a host gate exposes only a
58
+ * sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
59
+ * anonymously reachable) and the default well-known path is blocked.
60
+ *
61
+ * Leading-dot segments are bracket-escaped for TanStack file routing
62
+ * (`.well-known` → `[.well-known]`); the final segment becomes the route file.
63
+ * Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
64
+ * advertises an externally hosted document instead of serving one), and
65
+ * cannot be combined with `protectedResourceMetadataRoute: false`.
66
+ * @default "/.well-known/oauth-protected-resource"
67
+ */
68
+ metadataPath?: string;
69
+ /**
70
+ * Derive the public origin of the advertised OAuth `resource`/metadata URLs
71
+ * from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
72
+ * serves a custom domain by rewriting `Host` to the internal backend and
73
+ * overwriting `X-Forwarded-Host` with the real public host, so the default is
74
+ * `true` to make custom domains work out of the box. Set `false` only when
75
+ * deploying behind a proxy that does not overwrite the header (a client could
76
+ * then spoof it to redirect the advertised resource).
77
+ * @default true
78
+ */
79
+ trustForwardedHost?: boolean;
80
80
  }
81
+
81
82
  declare function assertUrlPathShape(urlPath: string): string;
82
83
  declare function deriveRouteFileName(urlPath: string): string;
83
84
  declare function assertMetadataPathShape(metadataPath: string): void;
@@ -94,5 +95,5 @@ declare function assertMetadataPathShape(metadataPath: string): void;
94
95
  * time) — not by this plugin.
95
96
  */
96
97
  declare function mcpPlugin(options?: McpPluginOptions): Plugin;
97
- //#endregion
98
- export { type McpPluginApi, McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, mcpPlugin, deriveRouteFileName };
98
+
99
+ export { type McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, deriveRouteFileName, mcpPlugin };