We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchloop/mcp-devcontainers'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
meta.ts•903 B
import { createRequire } from "module";
import path from "path";
/**
* The `createRequire` function is used to create a CommonJS require function
* in an ES module context. This is necessary because the `require` function
* is not available in ES modules by default.
*/
const require = createRequire(import.meta.url);
/**
* Get the path to the devcontainer binary.
*
* This function dynamically resolves the path to the devcontainer binary
* based on the location of the package.json file of the @devcontainers/cli
* package. It is used to ensure that the correct binary is used regardless
* of the environment in which the code is run.
*/
export function devcontainerBinaryPath(): string {
const pkgPath = require.resolve('@devcontainers/cli/package.json');
const pkg = require('@devcontainers/cli/package.json');
return path.join(path.dirname(pkgPath), pkg.bin.devcontainer);
}