Skip to main content
Glama
esbuild-script.mjs1.22 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 /* global process */ /* global console */ /*eslint no-process-exit: "off"*/ import botLayer from '@medplum/bot-layer/package.json' with { type: 'json' }; import esbuild from 'esbuild'; import fastGlob from 'fast-glob'; // Find all TypeScript files in your source directory const entryPoints = fastGlob.sync('./src/**/*.ts').filter((file) => !file.endsWith('test.ts')); const botLayerDeps = Object.keys(botLayer.dependencies); // Define the esbuild options const esbuildOptions = { entryPoints: entryPoints, bundle: true, // Bundle imported functions outdir: './dist', // Output directory for compiled files platform: 'node', loader: { '.ts': 'ts', // Load TypeScript files }, resolveExtensions: ['.ts'], external: botLayerDeps, format: 'esm', target: 'es2020', // Set the target ECMAScript version tsconfig: 'tsconfig.json', }; // Build using esbuild esbuild .build(esbuildOptions) .then(() => { console.log('Build completed successfully!'); }) .catch((error) => { console.error('Build failed:', JSON.stringify(error, null, 2)); process.exit(1); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server