feat: export versioned schemas in package.json

Add exports for versioned schemas to allow consumers to import:
- ./schemas: All versioned schemas (v0_1, v0_2, v0_3, latest)
- ./schemas/*: Specific schema versions (./schemas/0.1, ./schemas/any, etc.)
- ./schemas-loose: Loose validation schemas

This enables cleaner imports like:
import { McpbManifestSchema } from '@anthropic-ai/mcpb/schemas/any'
import * as v0_2 from '@anthropic-ai/mcpb/schemas/0.2'
import * as schemas from '@anthropic-ai/mcpb/schemas'
This commit is contained in:
Joan Xie 2025-10-29 16:30:32 -07:00
commit 67938cdab9
No known key found for this signature in database

View file

@ -27,7 +27,22 @@
"import": "./dist/cli.js",
"require": "./dist/cli.js"
},
"./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json"
"./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json",
"./schemas": {
"types": "./dist/schemas/index.d.ts",
"import": "./dist/schemas/index.js",
"require": "./dist/schemas/index.js"
},
"./schemas/*": {
"types": "./dist/schemas/*.d.ts",
"import": "./dist/schemas/*.js",
"require": "./dist/schemas/*.js"
},
"./schemas-loose": {
"types": "./dist/schemas-loose.d.ts",
"import": "./dist/schemas-loose.js",
"require": "./dist/schemas-loose.js"
}
},
"bin": "dist/cli/cli.js",
"files": [