@mcp-use/cli 2.6.0-canary.3 → 2.6.0-canary.5
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/dist/index.cjs +97 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +97 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3585,10 +3585,98 @@ export default PostHog;
|
|
|
3585
3585
|
} catch (error) {
|
|
3586
3586
|
}
|
|
3587
3587
|
try {
|
|
3588
|
+
const buildNodeStubsPlugin = {
|
|
3589
|
+
name: "node-stubs-build",
|
|
3590
|
+
enforce: "pre",
|
|
3591
|
+
resolveId(id) {
|
|
3592
|
+
if (id === "posthog-node" || id.startsWith("posthog-node/")) {
|
|
3593
|
+
return "\0virtual:posthog-node-stub";
|
|
3594
|
+
}
|
|
3595
|
+
if (id === "path" || id === "node:path") {
|
|
3596
|
+
return "\0virtual:path-stub";
|
|
3597
|
+
}
|
|
3598
|
+
return null;
|
|
3599
|
+
},
|
|
3600
|
+
load(id) {
|
|
3601
|
+
if (id === "\0virtual:posthog-node-stub") {
|
|
3602
|
+
return `
|
|
3603
|
+
export class PostHog {
|
|
3604
|
+
constructor() {}
|
|
3605
|
+
capture() {}
|
|
3606
|
+
identify() {}
|
|
3607
|
+
alias() {}
|
|
3608
|
+
flush() { return Promise.resolve(); }
|
|
3609
|
+
shutdown() { return Promise.resolve(); }
|
|
3610
|
+
}
|
|
3611
|
+
export default PostHog;
|
|
3612
|
+
`;
|
|
3613
|
+
}
|
|
3614
|
+
if (id === "\0virtual:path-stub") {
|
|
3615
|
+
return `
|
|
3616
|
+
export function join(...paths) {
|
|
3617
|
+
return paths.filter(Boolean).join("/").replace(/\\/\\//g, "/").replace(/\\/$/, "");
|
|
3618
|
+
}
|
|
3619
|
+
export function resolve(...paths) {
|
|
3620
|
+
return join(...paths);
|
|
3621
|
+
}
|
|
3622
|
+
export function dirname(filepath) {
|
|
3623
|
+
const parts = filepath.split("/");
|
|
3624
|
+
parts.pop();
|
|
3625
|
+
return parts.join("/") || "/";
|
|
3626
|
+
}
|
|
3627
|
+
export function basename(filepath, ext) {
|
|
3628
|
+
const parts = filepath.split("/");
|
|
3629
|
+
let name = parts[parts.length - 1] || "";
|
|
3630
|
+
if (ext && name.endsWith(ext)) {
|
|
3631
|
+
name = name.slice(0, -ext.length);
|
|
3632
|
+
}
|
|
3633
|
+
return name;
|
|
3634
|
+
}
|
|
3635
|
+
export function extname(filepath) {
|
|
3636
|
+
const name = basename(filepath);
|
|
3637
|
+
const index = name.lastIndexOf(".");
|
|
3638
|
+
return index > 0 ? name.slice(index) : "";
|
|
3639
|
+
}
|
|
3640
|
+
export function normalize(filepath) {
|
|
3641
|
+
return filepath.replace(/\\/\\//g, "/");
|
|
3642
|
+
}
|
|
3643
|
+
export function isAbsolute(filepath) {
|
|
3644
|
+
return filepath.startsWith("/");
|
|
3645
|
+
}
|
|
3646
|
+
export const sep = "/";
|
|
3647
|
+
export const delimiter = ":";
|
|
3648
|
+
export const posix = {
|
|
3649
|
+
join,
|
|
3650
|
+
resolve,
|
|
3651
|
+
dirname,
|
|
3652
|
+
basename,
|
|
3653
|
+
extname,
|
|
3654
|
+
normalize,
|
|
3655
|
+
isAbsolute,
|
|
3656
|
+
sep,
|
|
3657
|
+
delimiter,
|
|
3658
|
+
};
|
|
3659
|
+
export default {
|
|
3660
|
+
join,
|
|
3661
|
+
resolve,
|
|
3662
|
+
dirname,
|
|
3663
|
+
basename,
|
|
3664
|
+
extname,
|
|
3665
|
+
normalize,
|
|
3666
|
+
isAbsolute,
|
|
3667
|
+
sep,
|
|
3668
|
+
delimiter,
|
|
3669
|
+
posix,
|
|
3670
|
+
};
|
|
3671
|
+
`;
|
|
3672
|
+
}
|
|
3673
|
+
return null;
|
|
3674
|
+
}
|
|
3675
|
+
};
|
|
3588
3676
|
await build({
|
|
3589
3677
|
root: tempDir,
|
|
3590
3678
|
base: baseUrl,
|
|
3591
|
-
plugins: [tailwindcss(), react()],
|
|
3679
|
+
plugins: [buildNodeStubsPlugin, tailwindcss(), react()],
|
|
3592
3680
|
experimental: {
|
|
3593
3681
|
renderBuiltUrl: (filename, { hostType }) => {
|
|
3594
3682
|
if (["js", "css"].includes(hostType)) {
|
|
@@ -3605,11 +3693,18 @@ export default PostHog;
|
|
|
3605
3693
|
"@": resourcesDir
|
|
3606
3694
|
}
|
|
3607
3695
|
},
|
|
3696
|
+
optimizeDeps: {
|
|
3697
|
+
// Exclude Node.js-only packages from browser bundling
|
|
3698
|
+
exclude: ["posthog-node"]
|
|
3699
|
+
},
|
|
3608
3700
|
build: {
|
|
3609
3701
|
outDir,
|
|
3610
3702
|
emptyOutDir: true,
|
|
3611
3703
|
rollupOptions: {
|
|
3612
|
-
input: import_node_path5.default.join(tempDir, "index.html")
|
|
3704
|
+
input: import_node_path5.default.join(tempDir, "index.html"),
|
|
3705
|
+
external: (id) => {
|
|
3706
|
+
return false;
|
|
3707
|
+
}
|
|
3613
3708
|
}
|
|
3614
3709
|
}
|
|
3615
3710
|
});
|