Skip to main content
Glama
copy-package-json.ts1.09 kB
import { FileSystem, Path } from "@effect/platform" import { NodeContext } from "@effect/platform-node" import { Effect } from "effect" const program = Effect.gen(function*() { const fs = yield* FileSystem.FileSystem const path = yield* Path.Path yield* Effect.log("[Build] Copying package.json ...") const json: any = yield* fs.readFileString("package.json").pipe(Effect.map(JSON.parse)) const pkg = { name: json.name, version: json.version, type: json.type, description: json.description, main: "bin.cjs", bin: "bin.cjs", engines: json.engines, dependencies: json.dependencies, peerDependencies: json.peerDependencies, repository: json.repository, author: json.author, license: json.license, bugs: json.bugs, homepage: json.homepage, tags: json.tags, keywords: json.keywords } yield* fs.writeFileString(path.join("dist", "package.json"), JSON.stringify(pkg, null, 2)) yield* Effect.log("[Build] Build completed.") }).pipe(Effect.provide(NodeContext.layer)) Effect.runPromise(program).catch(console.error)

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/rember/rember-mcp'

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