Skip to main content
Glama
reportDeprecatedAssets.ts965 B
import _logger from "../../../logger.ts"; import _ from "lodash"; import { ExpandedPkgSpec } from "../../../spec/pkgs.ts"; const logger = _logger.ns("reportDeprecated").seal(); export function reportDeprecatedAssets( existing_specs: Record<string, string>, specs: ExpandedPkgSpec[], ): ExpandedPkgSpec[] { const deprecatedSpecs = _.clone(existing_specs); for (const spec of specs) { if (deprecatedSpecs[spec.name]) { logger.debug(`Found existing spec ${spec.name}`); delete deprecatedSpecs[spec.name]; } } const deprecatedSpecNames = _.keys(deprecatedSpecs); if (deprecatedSpecNames.length) { logger.warn( `${deprecatedSpecNames.length} asset(s) haven't been generated but are on module index. They've been saved to existing-packages/deprecatedSpecs.json`, ); Deno.writeTextFileSync( "existing-packages/deprecatedSpecs.json", JSON.stringify(deprecatedSpecs, null, 2), ); } return specs; }

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/systeminit/si'

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