@lovable.dev/mcp-js 3.3.0 → 3.4.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.
- package/README.internal.md +38 -12
- package/README.md +144 -12
- package/dist/THIRD_PARTY_NOTICES +75 -0
- package/dist/apps-CWG3rGhB.js +132 -0
- package/dist/apps-DyoDrwfi.cjs +185 -0
- package/dist/{authorize-r6jB-Gl2.d.cts → authorize--W1XtwdB.d.cts} +1 -1
- package/dist/{authorize-DxnyFNHv.d.ts → authorize-DpNYioXM.d.ts} +1 -1
- package/dist/{base-ff0LwIA2.d.ts → base-Ce9JYirF.d.ts} +1 -1
- package/dist/{base-CzPzbI3q.d.cts → base-qEX8YVcD.d.cts} +1 -1
- package/dist/cli/check-server.cjs +1 -1
- package/dist/cli/check-server.js +1 -1
- package/dist/cli/extract-manifest.cjs +1 -1
- package/dist/cli/extract-manifest.js +1 -1
- package/dist/{cors-Bjo6NPjV.cjs → cors-DcWb13LI.cjs} +1 -1
- package/dist/{cors-COjc9O73.js → cors-M68siADv.js} +1 -1
- package/dist/dist-CIu-UFye.js +6738 -0
- package/dist/dist-CqY2qXpc.cjs +6738 -0
- package/dist/{errors-D0UPHnG3.js → errors-CfaxXr2T.js} +25 -2
- package/dist/{errors-DSHt3Jqs.cjs → errors-xJ_7Su1K.cjs} +30 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +2 -2
- package/dist/{io-CQ60Nc2J.d.ts → io-BEpyfk4G.d.ts} +1 -1
- package/dist/{io-DTz7efSK.js → io-CICYQJSM.js} +13 -3
- package/dist/{io-Dzy5Bu6h.cjs → io-DGeqWc6m.cjs} +12 -2
- package/dist/{io-DnRCu_HX.d.cts → io-Di5ljvZY.d.cts} +1 -1
- package/dist/{mcp-DIR9MCwQ.js → mcp-BT9dcts8.js} +117 -51
- package/dist/{mcp-Buu1riaY.cjs → mcp-DAUFwQ80.cjs} +116 -50
- package/dist/mcp-app.d.ts +4 -0
- package/dist/{package-DL4uNmL0.cjs → package-Cu_ynl05.cjs} +1 -1
- package/dist/{package-DV8zBoEy.js → package-N4he-Z_i.js} +1 -1
- package/dist/protocols/mcp/index.cjs +1 -1
- package/dist/protocols/mcp/index.d.cts +3 -3
- package/dist/protocols/mcp/index.d.ts +3 -3
- package/dist/protocols/mcp/index.js +1 -1
- package/dist/protocols/oauth-metadata.cjs +1 -1
- package/dist/protocols/oauth-metadata.d.cts +3 -3
- package/dist/protocols/oauth-metadata.d.ts +3 -3
- package/dist/protocols/oauth-metadata.js +1 -1
- package/dist/src-D7RtXSV0.cjs +311 -0
- package/dist/src-sWQwyLwS.js +310 -0
- package/dist/stacks/supabase/index.cjs +2 -2
- package/dist/stacks/supabase/index.d.cts +1 -1
- package/dist/stacks/supabase/index.d.ts +1 -1
- package/dist/stacks/supabase/index.js +2 -2
- package/dist/stacks/supabase/vite.cjs +10 -1
- package/dist/stacks/supabase/vite.d.cts +1 -1
- package/dist/stacks/supabase/vite.d.ts +1 -1
- package/dist/stacks/supabase/vite.js +21 -12
- package/dist/stacks/tanstack/index.cjs +33 -2
- package/dist/stacks/tanstack/index.d.cts +7 -4
- package/dist/stacks/tanstack/index.d.ts +7 -4
- package/dist/stacks/tanstack/index.js +33 -2
- package/dist/stacks/tanstack/vite.cjs +995 -15
- package/dist/stacks/tanstack/vite.d.cts +1 -1
- package/dist/stacks/tanstack/vite.d.ts +1 -1
- package/dist/stacks/tanstack/vite.js +1001 -21
- package/dist/testing/browser/LICENSE.ext-apps +218 -0
- package/dist/testing/browser/host.ts +151 -0
- package/dist/testing/browser/sandbox.ts +137 -0
- package/dist/testing/browser.cjs +382 -0
- package/dist/testing/browser.d.cts +46 -0
- package/dist/testing/browser.d.ts +46 -0
- package/dist/testing/browser.js +381 -0
- package/dist/testing/index.cjs +2 -1
- package/dist/testing/index.d.cts +2 -1
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.js +2 -1
- package/dist/testing/server.cjs +36 -0
- package/dist/testing/server.d.cts +6 -2
- package/dist/testing/server.d.ts +6 -2
- package/dist/testing/server.js +36 -1
- package/dist/{tool-result-DcNioyiI.js → tool-result-BG-HsSQu.js} +8 -1
- package/dist/{tool-result-rU-PpNNi.cjs → tool-result-BQcr7VV-.cjs} +8 -1
- package/dist/{types-BtoYHhdt.d.cts → types-B_dVw-zM.d.cts} +59 -1
- package/dist/{types-BtoYHhdt.d.ts → types-B_dVw-zM.d.ts} +59 -1
- package/package.json +67 -26
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/walker.js
|
|
2
|
+
/**
|
|
3
|
+
* @typedef { import('estree').Node} Node
|
|
4
|
+
* @typedef {{
|
|
5
|
+
* skip: () => void;
|
|
6
|
+
* remove: () => void;
|
|
7
|
+
* replace: (node: Node) => void;
|
|
8
|
+
* }} WalkerContext
|
|
9
|
+
*/
|
|
10
|
+
var WalkerBase = class {
|
|
11
|
+
constructor() {
|
|
12
|
+
/** @type {boolean} */
|
|
13
|
+
this.should_skip = false;
|
|
14
|
+
/** @type {boolean} */
|
|
15
|
+
this.should_remove = false;
|
|
16
|
+
/** @type {Node | null} */
|
|
17
|
+
this.replacement = null;
|
|
18
|
+
/** @type {WalkerContext} */
|
|
19
|
+
this.context = {
|
|
20
|
+
skip: () => this.should_skip = true,
|
|
21
|
+
remove: () => this.should_remove = true,
|
|
22
|
+
replace: (node) => this.replacement = node
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @template {Node} Parent
|
|
27
|
+
* @param {Parent | null | undefined} parent
|
|
28
|
+
* @param {keyof Parent | null | undefined} prop
|
|
29
|
+
* @param {number | null | undefined} index
|
|
30
|
+
* @param {Node} node
|
|
31
|
+
*/
|
|
32
|
+
replace(parent, prop, index, node) {
|
|
33
|
+
if (parent && prop) if (index != null)
|
|
34
|
+
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
35
|
+
else
|
|
36
|
+
/** @type {Node} */ parent[prop] = node;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @template {Node} Parent
|
|
40
|
+
* @param {Parent | null | undefined} parent
|
|
41
|
+
* @param {keyof Parent | null | undefined} prop
|
|
42
|
+
* @param {number | null | undefined} index
|
|
43
|
+
*/
|
|
44
|
+
remove(parent, prop, index) {
|
|
45
|
+
if (parent && prop) if (index !== null && index !== void 0)
|
|
46
|
+
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
47
|
+
else delete parent[prop];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/sync.js
|
|
52
|
+
/**
|
|
53
|
+
* @typedef { import('estree').Node} Node
|
|
54
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
55
|
+
* @typedef {(
|
|
56
|
+
* this: WalkerContext,
|
|
57
|
+
* node: Node,
|
|
58
|
+
* parent: Node | null,
|
|
59
|
+
* key: string | number | symbol | null | undefined,
|
|
60
|
+
* index: number | null | undefined
|
|
61
|
+
* ) => void} SyncHandler
|
|
62
|
+
*/
|
|
63
|
+
var SyncWalker = class extends WalkerBase {
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param {SyncHandler} [enter]
|
|
67
|
+
* @param {SyncHandler} [leave]
|
|
68
|
+
*/
|
|
69
|
+
constructor(enter, leave) {
|
|
70
|
+
super();
|
|
71
|
+
/** @type {boolean} */
|
|
72
|
+
this.should_skip = false;
|
|
73
|
+
/** @type {boolean} */
|
|
74
|
+
this.should_remove = false;
|
|
75
|
+
/** @type {Node | null} */
|
|
76
|
+
this.replacement = null;
|
|
77
|
+
/** @type {WalkerContext} */
|
|
78
|
+
this.context = {
|
|
79
|
+
skip: () => this.should_skip = true,
|
|
80
|
+
remove: () => this.should_remove = true,
|
|
81
|
+
replace: (node) => this.replacement = node
|
|
82
|
+
};
|
|
83
|
+
/** @type {SyncHandler | undefined} */
|
|
84
|
+
this.enter = enter;
|
|
85
|
+
/** @type {SyncHandler | undefined} */
|
|
86
|
+
this.leave = leave;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @template {Node} Parent
|
|
90
|
+
* @param {Node} node
|
|
91
|
+
* @param {Parent | null} parent
|
|
92
|
+
* @param {keyof Parent} [prop]
|
|
93
|
+
* @param {number | null} [index]
|
|
94
|
+
* @returns {Node | null}
|
|
95
|
+
*/
|
|
96
|
+
visit(node, parent, prop, index) {
|
|
97
|
+
if (node) {
|
|
98
|
+
if (this.enter) {
|
|
99
|
+
const _should_skip = this.should_skip;
|
|
100
|
+
const _should_remove = this.should_remove;
|
|
101
|
+
const _replacement = this.replacement;
|
|
102
|
+
this.should_skip = false;
|
|
103
|
+
this.should_remove = false;
|
|
104
|
+
this.replacement = null;
|
|
105
|
+
this.enter.call(this.context, node, parent, prop, index);
|
|
106
|
+
if (this.replacement) {
|
|
107
|
+
node = this.replacement;
|
|
108
|
+
this.replace(parent, prop, index, node);
|
|
109
|
+
}
|
|
110
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
111
|
+
const skipped = this.should_skip;
|
|
112
|
+
const removed = this.should_remove;
|
|
113
|
+
this.should_skip = _should_skip;
|
|
114
|
+
this.should_remove = _should_remove;
|
|
115
|
+
this.replacement = _replacement;
|
|
116
|
+
if (skipped) return node;
|
|
117
|
+
if (removed) return null;
|
|
118
|
+
}
|
|
119
|
+
/** @type {keyof Node} */
|
|
120
|
+
let key;
|
|
121
|
+
for (key in node) {
|
|
122
|
+
/** @type {unknown} */
|
|
123
|
+
const value = node[key];
|
|
124
|
+
if (value && typeof value === "object") {
|
|
125
|
+
if (Array.isArray(value)) {
|
|
126
|
+
const nodes = value;
|
|
127
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
128
|
+
const item = nodes[i];
|
|
129
|
+
if (isNode$1(item)) {
|
|
130
|
+
if (!this.visit(item, node, key, i)) i--;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
} else if (isNode$1(value)) this.visit(value, node, key, null);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (this.leave) {
|
|
137
|
+
const _replacement = this.replacement;
|
|
138
|
+
const _should_remove = this.should_remove;
|
|
139
|
+
this.replacement = null;
|
|
140
|
+
this.should_remove = false;
|
|
141
|
+
this.leave.call(this.context, node, parent, prop, index);
|
|
142
|
+
if (this.replacement) {
|
|
143
|
+
node = this.replacement;
|
|
144
|
+
this.replace(parent, prop, index, node);
|
|
145
|
+
}
|
|
146
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
147
|
+
const removed = this.should_remove;
|
|
148
|
+
this.replacement = _replacement;
|
|
149
|
+
this.should_remove = _should_remove;
|
|
150
|
+
if (removed) return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return node;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Ducktype a node.
|
|
158
|
+
*
|
|
159
|
+
* @param {unknown} value
|
|
160
|
+
* @returns {value is Node}
|
|
161
|
+
*/
|
|
162
|
+
function isNode$1(value) {
|
|
163
|
+
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/async.js
|
|
167
|
+
/**
|
|
168
|
+
* @typedef { import('estree').Node} Node
|
|
169
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
170
|
+
* @typedef {(
|
|
171
|
+
* this: WalkerContext,
|
|
172
|
+
* node: Node,
|
|
173
|
+
* parent: Node | null,
|
|
174
|
+
* key: string | number | symbol | null | undefined,
|
|
175
|
+
* index: number | null | undefined
|
|
176
|
+
* ) => Promise<void>} AsyncHandler
|
|
177
|
+
*/
|
|
178
|
+
var AsyncWalker = class extends WalkerBase {
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @param {AsyncHandler} [enter]
|
|
182
|
+
* @param {AsyncHandler} [leave]
|
|
183
|
+
*/
|
|
184
|
+
constructor(enter, leave) {
|
|
185
|
+
super();
|
|
186
|
+
/** @type {boolean} */
|
|
187
|
+
this.should_skip = false;
|
|
188
|
+
/** @type {boolean} */
|
|
189
|
+
this.should_remove = false;
|
|
190
|
+
/** @type {Node | null} */
|
|
191
|
+
this.replacement = null;
|
|
192
|
+
/** @type {WalkerContext} */
|
|
193
|
+
this.context = {
|
|
194
|
+
skip: () => this.should_skip = true,
|
|
195
|
+
remove: () => this.should_remove = true,
|
|
196
|
+
replace: (node) => this.replacement = node
|
|
197
|
+
};
|
|
198
|
+
/** @type {AsyncHandler | undefined} */
|
|
199
|
+
this.enter = enter;
|
|
200
|
+
/** @type {AsyncHandler | undefined} */
|
|
201
|
+
this.leave = leave;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @template {Node} Parent
|
|
205
|
+
* @param {Node} node
|
|
206
|
+
* @param {Parent | null} parent
|
|
207
|
+
* @param {keyof Parent} [prop]
|
|
208
|
+
* @param {number | null} [index]
|
|
209
|
+
* @returns {Promise<Node | null>}
|
|
210
|
+
*/
|
|
211
|
+
async visit(node, parent, prop, index) {
|
|
212
|
+
if (node) {
|
|
213
|
+
if (this.enter) {
|
|
214
|
+
const _should_skip = this.should_skip;
|
|
215
|
+
const _should_remove = this.should_remove;
|
|
216
|
+
const _replacement = this.replacement;
|
|
217
|
+
this.should_skip = false;
|
|
218
|
+
this.should_remove = false;
|
|
219
|
+
this.replacement = null;
|
|
220
|
+
await this.enter.call(this.context, node, parent, prop, index);
|
|
221
|
+
if (this.replacement) {
|
|
222
|
+
node = this.replacement;
|
|
223
|
+
this.replace(parent, prop, index, node);
|
|
224
|
+
}
|
|
225
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
226
|
+
const skipped = this.should_skip;
|
|
227
|
+
const removed = this.should_remove;
|
|
228
|
+
this.should_skip = _should_skip;
|
|
229
|
+
this.should_remove = _should_remove;
|
|
230
|
+
this.replacement = _replacement;
|
|
231
|
+
if (skipped) return node;
|
|
232
|
+
if (removed) return null;
|
|
233
|
+
}
|
|
234
|
+
/** @type {keyof Node} */
|
|
235
|
+
let key;
|
|
236
|
+
for (key in node) {
|
|
237
|
+
/** @type {unknown} */
|
|
238
|
+
const value = node[key];
|
|
239
|
+
if (value && typeof value === "object") {
|
|
240
|
+
if (Array.isArray(value)) {
|
|
241
|
+
const nodes = value;
|
|
242
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
243
|
+
const item = nodes[i];
|
|
244
|
+
if (isNode(item)) {
|
|
245
|
+
if (!await this.visit(item, node, key, i)) i--;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} else if (isNode(value)) await this.visit(value, node, key, null);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (this.leave) {
|
|
252
|
+
const _replacement = this.replacement;
|
|
253
|
+
const _should_remove = this.should_remove;
|
|
254
|
+
this.replacement = null;
|
|
255
|
+
this.should_remove = false;
|
|
256
|
+
await this.leave.call(this.context, node, parent, prop, index);
|
|
257
|
+
if (this.replacement) {
|
|
258
|
+
node = this.replacement;
|
|
259
|
+
this.replace(parent, prop, index, node);
|
|
260
|
+
}
|
|
261
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
262
|
+
const removed = this.should_remove;
|
|
263
|
+
this.replacement = _replacement;
|
|
264
|
+
this.should_remove = _should_remove;
|
|
265
|
+
if (removed) return null;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return node;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Ducktype a node.
|
|
273
|
+
*
|
|
274
|
+
* @param {unknown} value
|
|
275
|
+
* @returns {value is Node}
|
|
276
|
+
*/
|
|
277
|
+
function isNode(value) {
|
|
278
|
+
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/index.js
|
|
282
|
+
/**
|
|
283
|
+
* @typedef {import('estree').Node} Node
|
|
284
|
+
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
285
|
+
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
286
|
+
*/
|
|
287
|
+
/**
|
|
288
|
+
* @param {Node} ast
|
|
289
|
+
* @param {{
|
|
290
|
+
* enter?: SyncHandler
|
|
291
|
+
* leave?: SyncHandler
|
|
292
|
+
* }} walker
|
|
293
|
+
* @returns {Node | null}
|
|
294
|
+
*/
|
|
295
|
+
function walk(ast, { enter, leave }) {
|
|
296
|
+
return new SyncWalker(enter, leave).visit(ast, null);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @param {Node} ast
|
|
300
|
+
* @param {{
|
|
301
|
+
* enter?: AsyncHandler
|
|
302
|
+
* leave?: AsyncHandler
|
|
303
|
+
* }} walker
|
|
304
|
+
* @returns {Promise<Node | null>}
|
|
305
|
+
*/
|
|
306
|
+
async function asyncWalk(ast, { enter, leave }) {
|
|
307
|
+
return await new AsyncWalker(enter, leave).visit(ast, null);
|
|
308
|
+
}
|
|
309
|
+
//#endregion
|
|
310
|
+
exports.asyncWalk = asyncWalk;
|
|
311
|
+
exports.walk = walk;
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/walker.js
|
|
2
|
+
/**
|
|
3
|
+
* @typedef { import('estree').Node} Node
|
|
4
|
+
* @typedef {{
|
|
5
|
+
* skip: () => void;
|
|
6
|
+
* remove: () => void;
|
|
7
|
+
* replace: (node: Node) => void;
|
|
8
|
+
* }} WalkerContext
|
|
9
|
+
*/
|
|
10
|
+
var WalkerBase = class {
|
|
11
|
+
constructor() {
|
|
12
|
+
/** @type {boolean} */
|
|
13
|
+
this.should_skip = false;
|
|
14
|
+
/** @type {boolean} */
|
|
15
|
+
this.should_remove = false;
|
|
16
|
+
/** @type {Node | null} */
|
|
17
|
+
this.replacement = null;
|
|
18
|
+
/** @type {WalkerContext} */
|
|
19
|
+
this.context = {
|
|
20
|
+
skip: () => this.should_skip = true,
|
|
21
|
+
remove: () => this.should_remove = true,
|
|
22
|
+
replace: (node) => this.replacement = node
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @template {Node} Parent
|
|
27
|
+
* @param {Parent | null | undefined} parent
|
|
28
|
+
* @param {keyof Parent | null | undefined} prop
|
|
29
|
+
* @param {number | null | undefined} index
|
|
30
|
+
* @param {Node} node
|
|
31
|
+
*/
|
|
32
|
+
replace(parent, prop, index, node) {
|
|
33
|
+
if (parent && prop) if (index != null)
|
|
34
|
+
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
35
|
+
else
|
|
36
|
+
/** @type {Node} */ parent[prop] = node;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @template {Node} Parent
|
|
40
|
+
* @param {Parent | null | undefined} parent
|
|
41
|
+
* @param {keyof Parent | null | undefined} prop
|
|
42
|
+
* @param {number | null | undefined} index
|
|
43
|
+
*/
|
|
44
|
+
remove(parent, prop, index) {
|
|
45
|
+
if (parent && prop) if (index !== null && index !== void 0)
|
|
46
|
+
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
47
|
+
else delete parent[prop];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/sync.js
|
|
52
|
+
/**
|
|
53
|
+
* @typedef { import('estree').Node} Node
|
|
54
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
55
|
+
* @typedef {(
|
|
56
|
+
* this: WalkerContext,
|
|
57
|
+
* node: Node,
|
|
58
|
+
* parent: Node | null,
|
|
59
|
+
* key: string | number | symbol | null | undefined,
|
|
60
|
+
* index: number | null | undefined
|
|
61
|
+
* ) => void} SyncHandler
|
|
62
|
+
*/
|
|
63
|
+
var SyncWalker = class extends WalkerBase {
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param {SyncHandler} [enter]
|
|
67
|
+
* @param {SyncHandler} [leave]
|
|
68
|
+
*/
|
|
69
|
+
constructor(enter, leave) {
|
|
70
|
+
super();
|
|
71
|
+
/** @type {boolean} */
|
|
72
|
+
this.should_skip = false;
|
|
73
|
+
/** @type {boolean} */
|
|
74
|
+
this.should_remove = false;
|
|
75
|
+
/** @type {Node | null} */
|
|
76
|
+
this.replacement = null;
|
|
77
|
+
/** @type {WalkerContext} */
|
|
78
|
+
this.context = {
|
|
79
|
+
skip: () => this.should_skip = true,
|
|
80
|
+
remove: () => this.should_remove = true,
|
|
81
|
+
replace: (node) => this.replacement = node
|
|
82
|
+
};
|
|
83
|
+
/** @type {SyncHandler | undefined} */
|
|
84
|
+
this.enter = enter;
|
|
85
|
+
/** @type {SyncHandler | undefined} */
|
|
86
|
+
this.leave = leave;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @template {Node} Parent
|
|
90
|
+
* @param {Node} node
|
|
91
|
+
* @param {Parent | null} parent
|
|
92
|
+
* @param {keyof Parent} [prop]
|
|
93
|
+
* @param {number | null} [index]
|
|
94
|
+
* @returns {Node | null}
|
|
95
|
+
*/
|
|
96
|
+
visit(node, parent, prop, index) {
|
|
97
|
+
if (node) {
|
|
98
|
+
if (this.enter) {
|
|
99
|
+
const _should_skip = this.should_skip;
|
|
100
|
+
const _should_remove = this.should_remove;
|
|
101
|
+
const _replacement = this.replacement;
|
|
102
|
+
this.should_skip = false;
|
|
103
|
+
this.should_remove = false;
|
|
104
|
+
this.replacement = null;
|
|
105
|
+
this.enter.call(this.context, node, parent, prop, index);
|
|
106
|
+
if (this.replacement) {
|
|
107
|
+
node = this.replacement;
|
|
108
|
+
this.replace(parent, prop, index, node);
|
|
109
|
+
}
|
|
110
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
111
|
+
const skipped = this.should_skip;
|
|
112
|
+
const removed = this.should_remove;
|
|
113
|
+
this.should_skip = _should_skip;
|
|
114
|
+
this.should_remove = _should_remove;
|
|
115
|
+
this.replacement = _replacement;
|
|
116
|
+
if (skipped) return node;
|
|
117
|
+
if (removed) return null;
|
|
118
|
+
}
|
|
119
|
+
/** @type {keyof Node} */
|
|
120
|
+
let key;
|
|
121
|
+
for (key in node) {
|
|
122
|
+
/** @type {unknown} */
|
|
123
|
+
const value = node[key];
|
|
124
|
+
if (value && typeof value === "object") {
|
|
125
|
+
if (Array.isArray(value)) {
|
|
126
|
+
const nodes = value;
|
|
127
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
128
|
+
const item = nodes[i];
|
|
129
|
+
if (isNode$1(item)) {
|
|
130
|
+
if (!this.visit(item, node, key, i)) i--;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
} else if (isNode$1(value)) this.visit(value, node, key, null);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (this.leave) {
|
|
137
|
+
const _replacement = this.replacement;
|
|
138
|
+
const _should_remove = this.should_remove;
|
|
139
|
+
this.replacement = null;
|
|
140
|
+
this.should_remove = false;
|
|
141
|
+
this.leave.call(this.context, node, parent, prop, index);
|
|
142
|
+
if (this.replacement) {
|
|
143
|
+
node = this.replacement;
|
|
144
|
+
this.replace(parent, prop, index, node);
|
|
145
|
+
}
|
|
146
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
147
|
+
const removed = this.should_remove;
|
|
148
|
+
this.replacement = _replacement;
|
|
149
|
+
this.should_remove = _should_remove;
|
|
150
|
+
if (removed) return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return node;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Ducktype a node.
|
|
158
|
+
*
|
|
159
|
+
* @param {unknown} value
|
|
160
|
+
* @returns {value is Node}
|
|
161
|
+
*/
|
|
162
|
+
function isNode$1(value) {
|
|
163
|
+
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/async.js
|
|
167
|
+
/**
|
|
168
|
+
* @typedef { import('estree').Node} Node
|
|
169
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
170
|
+
* @typedef {(
|
|
171
|
+
* this: WalkerContext,
|
|
172
|
+
* node: Node,
|
|
173
|
+
* parent: Node | null,
|
|
174
|
+
* key: string | number | symbol | null | undefined,
|
|
175
|
+
* index: number | null | undefined
|
|
176
|
+
* ) => Promise<void>} AsyncHandler
|
|
177
|
+
*/
|
|
178
|
+
var AsyncWalker = class extends WalkerBase {
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @param {AsyncHandler} [enter]
|
|
182
|
+
* @param {AsyncHandler} [leave]
|
|
183
|
+
*/
|
|
184
|
+
constructor(enter, leave) {
|
|
185
|
+
super();
|
|
186
|
+
/** @type {boolean} */
|
|
187
|
+
this.should_skip = false;
|
|
188
|
+
/** @type {boolean} */
|
|
189
|
+
this.should_remove = false;
|
|
190
|
+
/** @type {Node | null} */
|
|
191
|
+
this.replacement = null;
|
|
192
|
+
/** @type {WalkerContext} */
|
|
193
|
+
this.context = {
|
|
194
|
+
skip: () => this.should_skip = true,
|
|
195
|
+
remove: () => this.should_remove = true,
|
|
196
|
+
replace: (node) => this.replacement = node
|
|
197
|
+
};
|
|
198
|
+
/** @type {AsyncHandler | undefined} */
|
|
199
|
+
this.enter = enter;
|
|
200
|
+
/** @type {AsyncHandler | undefined} */
|
|
201
|
+
this.leave = leave;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @template {Node} Parent
|
|
205
|
+
* @param {Node} node
|
|
206
|
+
* @param {Parent | null} parent
|
|
207
|
+
* @param {keyof Parent} [prop]
|
|
208
|
+
* @param {number | null} [index]
|
|
209
|
+
* @returns {Promise<Node | null>}
|
|
210
|
+
*/
|
|
211
|
+
async visit(node, parent, prop, index) {
|
|
212
|
+
if (node) {
|
|
213
|
+
if (this.enter) {
|
|
214
|
+
const _should_skip = this.should_skip;
|
|
215
|
+
const _should_remove = this.should_remove;
|
|
216
|
+
const _replacement = this.replacement;
|
|
217
|
+
this.should_skip = false;
|
|
218
|
+
this.should_remove = false;
|
|
219
|
+
this.replacement = null;
|
|
220
|
+
await this.enter.call(this.context, node, parent, prop, index);
|
|
221
|
+
if (this.replacement) {
|
|
222
|
+
node = this.replacement;
|
|
223
|
+
this.replace(parent, prop, index, node);
|
|
224
|
+
}
|
|
225
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
226
|
+
const skipped = this.should_skip;
|
|
227
|
+
const removed = this.should_remove;
|
|
228
|
+
this.should_skip = _should_skip;
|
|
229
|
+
this.should_remove = _should_remove;
|
|
230
|
+
this.replacement = _replacement;
|
|
231
|
+
if (skipped) return node;
|
|
232
|
+
if (removed) return null;
|
|
233
|
+
}
|
|
234
|
+
/** @type {keyof Node} */
|
|
235
|
+
let key;
|
|
236
|
+
for (key in node) {
|
|
237
|
+
/** @type {unknown} */
|
|
238
|
+
const value = node[key];
|
|
239
|
+
if (value && typeof value === "object") {
|
|
240
|
+
if (Array.isArray(value)) {
|
|
241
|
+
const nodes = value;
|
|
242
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
243
|
+
const item = nodes[i];
|
|
244
|
+
if (isNode(item)) {
|
|
245
|
+
if (!await this.visit(item, node, key, i)) i--;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} else if (isNode(value)) await this.visit(value, node, key, null);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (this.leave) {
|
|
252
|
+
const _replacement = this.replacement;
|
|
253
|
+
const _should_remove = this.should_remove;
|
|
254
|
+
this.replacement = null;
|
|
255
|
+
this.should_remove = false;
|
|
256
|
+
await this.leave.call(this.context, node, parent, prop, index);
|
|
257
|
+
if (this.replacement) {
|
|
258
|
+
node = this.replacement;
|
|
259
|
+
this.replace(parent, prop, index, node);
|
|
260
|
+
}
|
|
261
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
262
|
+
const removed = this.should_remove;
|
|
263
|
+
this.replacement = _replacement;
|
|
264
|
+
this.should_remove = _should_remove;
|
|
265
|
+
if (removed) return null;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return node;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Ducktype a node.
|
|
273
|
+
*
|
|
274
|
+
* @param {unknown} value
|
|
275
|
+
* @returns {value is Node}
|
|
276
|
+
*/
|
|
277
|
+
function isNode(value) {
|
|
278
|
+
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/estree-walker/3.0.3/f149906e2d585666ae890c5dd2fceac84a9263c116ae67fb226fe4bb380de7c4/node_modules/estree-walker/src/index.js
|
|
282
|
+
/**
|
|
283
|
+
* @typedef {import('estree').Node} Node
|
|
284
|
+
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
285
|
+
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
286
|
+
*/
|
|
287
|
+
/**
|
|
288
|
+
* @param {Node} ast
|
|
289
|
+
* @param {{
|
|
290
|
+
* enter?: SyncHandler
|
|
291
|
+
* leave?: SyncHandler
|
|
292
|
+
* }} walker
|
|
293
|
+
* @returns {Node | null}
|
|
294
|
+
*/
|
|
295
|
+
function walk(ast, { enter, leave }) {
|
|
296
|
+
return new SyncWalker(enter, leave).visit(ast, null);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @param {Node} ast
|
|
300
|
+
* @param {{
|
|
301
|
+
* enter?: AsyncHandler
|
|
302
|
+
* leave?: AsyncHandler
|
|
303
|
+
* }} walker
|
|
304
|
+
* @returns {Promise<Node | null>}
|
|
305
|
+
*/
|
|
306
|
+
async function asyncWalk(ast, { enter, leave }) {
|
|
307
|
+
return await new AsyncWalker(enter, leave).visit(ast, null);
|
|
308
|
+
}
|
|
309
|
+
//#endregion
|
|
310
|
+
export { asyncWalk, walk };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_logger = require("../../logger-C-Hdu57K.cjs");
|
|
3
|
-
const require_cors = require("../../cors-
|
|
3
|
+
const require_cors = require("../../cors-DcWb13LI.cjs");
|
|
4
4
|
const require_metadata_path = require("../../metadata-path-zd7NSNoa.cjs");
|
|
5
|
-
const require_mcp = require("../../mcp-
|
|
5
|
+
const require_mcp = require("../../mcp-DAUFwQ80.cjs");
|
|
6
6
|
const require_protocols_oauth_metadata = require("../../protocols/oauth-metadata.cjs");
|
|
7
7
|
const require_forwarded = require("../../forwarded-B37IdmMX.cjs");
|
|
8
8
|
const require_paths = require("../../paths-OP318a6c.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as McpDefinition } from "../../types-B_dVw-zM.cjs";
|
|
2
2
|
//#region src/stacks/supabase/handler.d.ts
|
|
3
3
|
type SupabaseHandler = (request: Request) => Promise<Response>;
|
|
4
4
|
interface SupabaseHandlerOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as McpDefinition } from "../../types-B_dVw-zM.js";
|
|
2
2
|
//#region src/stacks/supabase/handler.d.ts
|
|
3
3
|
type SupabaseHandler = (request: Request) => Promise<Response>;
|
|
4
4
|
interface SupabaseHandlerOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as trimTrailingSlash } from "../../logger-CpLgYbCG.js";
|
|
2
|
-
import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-
|
|
2
|
+
import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-M68siADv.js";
|
|
3
3
|
import { t as OAUTH_PROTECTED_RESOURCE_METADATA_PATH } from "../../metadata-path-CAkNcfyY.js";
|
|
4
|
-
import { t as createMcpProtocolHandler } from "../../mcp-
|
|
4
|
+
import { t as createMcpProtocolHandler } from "../../mcp-BT9dcts8.js";
|
|
5
5
|
import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
|
|
6
6
|
import { t as applyForwardedOrigin } from "../../forwarded-BBXvFeh6.js";
|
|
7
7
|
import { n as assertFunctionName, t as FUNCTIONS_MOUNT_PREFIX } from "../../paths-IS65L6TA.js";
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_package = require("../../package-
|
|
5
|
+
const require_package = require("../../package-Cu_ynl05.cjs");
|
|
6
6
|
const require_hooks = require("../../hooks-xQl3EkDa.cjs");
|
|
7
7
|
const require_paths = require("../../paths-OP318a6c.cjs");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
@@ -120,6 +120,14 @@ function applyViteAliases(importee, aliases) {
|
|
|
120
120
|
if (find.test(importee)) return importee.replace(find, replacement);
|
|
121
121
|
} else if (importee === find || importee.startsWith(find + "/")) return replacement + importee.slice(find.length);
|
|
122
122
|
}
|
|
123
|
+
function rejectMcpAppImports() {
|
|
124
|
+
return {
|
|
125
|
+
name: "lovable-mcp-reject-mcp-app",
|
|
126
|
+
setup(pluginBuild) {
|
|
127
|
+
pluginBuild.onResolve({ filter: /\?mcp-app$/ }, (args) => ({ errors: [{ text: `MCP Apps are not supported on the Supabase stack (${JSON.stringify(args.path)}). Remove the \`ui\` option and the import, or host this MCP server on the TanStack stack.` }] }));
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
123
131
|
function resolveViteAliases(aliases) {
|
|
124
132
|
return {
|
|
125
133
|
name: "lovable-mcp-resolve-vite-aliases",
|
|
@@ -168,6 +176,7 @@ async function bundleFunctionEntry(projectRoot, mcpEntryAbs, functionName, optio
|
|
|
168
176
|
logLevel: "silent",
|
|
169
177
|
define: importMetaEnvDefines(options.inlineEnv),
|
|
170
178
|
plugins: [
|
|
179
|
+
rejectMcpAppImports(),
|
|
171
180
|
require_hooks.skillImportEsbuildPlugin((compilation) => {
|
|
172
181
|
skillFiles.push(...compilation.watchFiles);
|
|
173
182
|
skillDirs.push(...compilation.watchDirs);
|