@leanmcp/core 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -382,6 +382,10 @@ declare function SchemaConstraint(constraints: {
|
|
|
382
382
|
enum?: any[];
|
|
383
383
|
description?: string;
|
|
384
384
|
default?: any;
|
|
385
|
+
items?: {
|
|
386
|
+
type: string;
|
|
387
|
+
description?: string;
|
|
388
|
+
};
|
|
385
389
|
}): PropertyDecorator;
|
|
386
390
|
/**
|
|
387
391
|
* Enhanced schema generator that includes constraints
|
package/dist/index.d.ts
CHANGED
|
@@ -382,6 +382,10 @@ declare function SchemaConstraint(constraints: {
|
|
|
382
382
|
enum?: any[];
|
|
383
383
|
description?: string;
|
|
384
384
|
default?: any;
|
|
385
|
+
items?: {
|
|
386
|
+
type: string;
|
|
387
|
+
description?: string;
|
|
388
|
+
};
|
|
385
389
|
}): PropertyDecorator;
|
|
386
390
|
/**
|
|
387
391
|
* Enhanced schema generator that includes constraints
|
package/dist/index.js
CHANGED
|
@@ -288,10 +288,16 @@ function classToJsonSchemaWithConstraints(classConstructor) {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
const propertySchema = {
|
|
292
292
|
type: jsonSchemaType,
|
|
293
293
|
...constraints || {}
|
|
294
294
|
};
|
|
295
|
+
if (jsonSchemaType === "array" && !propertySchema.items) {
|
|
296
|
+
propertySchema.items = {
|
|
297
|
+
type: "string"
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
properties[propertyName] = propertySchema;
|
|
295
301
|
if (!isOptional) {
|
|
296
302
|
required.push(propertyName);
|
|
297
303
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -273,10 +273,16 @@ function classToJsonSchemaWithConstraints(classConstructor) {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
const propertySchema = {
|
|
277
277
|
type: jsonSchemaType,
|
|
278
278
|
...constraints || {}
|
|
279
279
|
};
|
|
280
|
+
if (jsonSchemaType === "array" && !propertySchema.items) {
|
|
281
|
+
propertySchema.items = {
|
|
282
|
+
type: "string"
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
properties[propertyName] = propertySchema;
|
|
280
286
|
if (!isOptional) {
|
|
281
287
|
required.push(propertyName);
|
|
282
288
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leanmcp/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Core library implementing decorators, reflection, and MCP runtime server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
|
78
|
-
}
|
|
78
|
+
}
|