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:
parent
7961b32cfc
commit
67938cdab9
1 changed files with 16 additions and 1 deletions
17
package.json
17
package.json
|
|
@ -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": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue