@devpad/mcp 2.5.0 → 2.5.1
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.js +303 -17
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7213,6 +7213,9 @@ class Table {
|
|
|
7213
7213
|
this[BaseName] = baseName;
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
|
+
function isTable(table) {
|
|
7217
|
+
return typeof table === "object" && table !== null && IsDrizzleTable in table;
|
|
7218
|
+
}
|
|
7216
7219
|
|
|
7217
7220
|
// ../../node_modules/drizzle-orm/sql/sql.js
|
|
7218
7221
|
class FakePrimitiveParam {
|
|
@@ -7567,6 +7570,9 @@ class View {
|
|
|
7567
7570
|
return new SQL([this]);
|
|
7568
7571
|
}
|
|
7569
7572
|
}
|
|
7573
|
+
function isView(view) {
|
|
7574
|
+
return typeof view === "object" && view !== null && IsDrizzleView in view;
|
|
7575
|
+
}
|
|
7570
7576
|
Column.prototype.getSQL = function() {
|
|
7571
7577
|
return new SQL([this]);
|
|
7572
7578
|
};
|
|
@@ -7578,6 +7584,12 @@ Subquery.prototype.getSQL = function() {
|
|
|
7578
7584
|
};
|
|
7579
7585
|
|
|
7580
7586
|
// ../../node_modules/drizzle-orm/utils.js
|
|
7587
|
+
function getTableColumns(table) {
|
|
7588
|
+
return table[Table.Symbol.Columns];
|
|
7589
|
+
}
|
|
7590
|
+
function getViewSelectedFields(view) {
|
|
7591
|
+
return view[ViewBaseConfig].selectedFields;
|
|
7592
|
+
}
|
|
7581
7593
|
function getColumnNameAndConfig(a, b) {
|
|
7582
7594
|
return {
|
|
7583
7595
|
name: typeof a === "string" && a.length > 0 ? a : "",
|
|
@@ -12265,7 +12277,258 @@ var coerce = {
|
|
|
12265
12277
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
12266
12278
|
};
|
|
12267
12279
|
var NEVER = INVALID;
|
|
12268
|
-
//
|
|
12280
|
+
// ../../node_modules/drizzle-zod/index.mjs
|
|
12281
|
+
var CONSTANTS = {
|
|
12282
|
+
INT8_MIN: -128,
|
|
12283
|
+
INT8_MAX: 127,
|
|
12284
|
+
INT8_UNSIGNED_MAX: 255,
|
|
12285
|
+
INT16_MIN: -32768,
|
|
12286
|
+
INT16_MAX: 32767,
|
|
12287
|
+
INT16_UNSIGNED_MAX: 65535,
|
|
12288
|
+
INT24_MIN: -8388608,
|
|
12289
|
+
INT24_MAX: 8388607,
|
|
12290
|
+
INT24_UNSIGNED_MAX: 16777215,
|
|
12291
|
+
INT32_MIN: -2147483648,
|
|
12292
|
+
INT32_MAX: 2147483647,
|
|
12293
|
+
INT32_UNSIGNED_MAX: 4294967295,
|
|
12294
|
+
INT48_MIN: -140737488355328,
|
|
12295
|
+
INT48_MAX: 140737488355327,
|
|
12296
|
+
INT48_UNSIGNED_MAX: 281474976710655,
|
|
12297
|
+
INT64_MIN: -9223372036854775808n,
|
|
12298
|
+
INT64_MAX: 9223372036854775807n,
|
|
12299
|
+
INT64_UNSIGNED_MAX: 18446744073709551615n
|
|
12300
|
+
};
|
|
12301
|
+
function isColumnType(column, columnTypes) {
|
|
12302
|
+
return columnTypes.includes(column.columnType);
|
|
12303
|
+
}
|
|
12304
|
+
function isWithEnum(column) {
|
|
12305
|
+
return "enumValues" in column && Array.isArray(column.enumValues) && column.enumValues.length > 0;
|
|
12306
|
+
}
|
|
12307
|
+
var isPgEnum2 = isWithEnum;
|
|
12308
|
+
var literalSchema = exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean(), exports_external.null()]);
|
|
12309
|
+
var jsonSchema = exports_external.union([literalSchema, exports_external.record(exports_external.any()), exports_external.array(exports_external.any())]);
|
|
12310
|
+
var bufferSchema = exports_external.custom((v) => v instanceof Buffer);
|
|
12311
|
+
function columnToSchema(column, factory) {
|
|
12312
|
+
const z$1 = factory?.zodInstance ?? exports_external;
|
|
12313
|
+
const coerce2 = factory?.coerce ?? {};
|
|
12314
|
+
let schema;
|
|
12315
|
+
if (isWithEnum(column)) {
|
|
12316
|
+
schema = column.enumValues.length ? z$1.enum(column.enumValues) : z$1.string();
|
|
12317
|
+
}
|
|
12318
|
+
if (!schema) {
|
|
12319
|
+
if (isColumnType(column, ["PgGeometry", "PgPointTuple"])) {
|
|
12320
|
+
schema = z$1.tuple([z$1.number(), z$1.number()]);
|
|
12321
|
+
} else if (isColumnType(column, ["PgGeometryObject", "PgPointObject"])) {
|
|
12322
|
+
schema = z$1.object({ x: z$1.number(), y: z$1.number() });
|
|
12323
|
+
} else if (isColumnType(column, ["PgHalfVector", "PgVector"])) {
|
|
12324
|
+
schema = z$1.array(z$1.number());
|
|
12325
|
+
schema = column.dimensions ? schema.length(column.dimensions) : schema;
|
|
12326
|
+
} else if (isColumnType(column, ["PgLine"])) {
|
|
12327
|
+
schema = z$1.tuple([z$1.number(), z$1.number(), z$1.number()]);
|
|
12328
|
+
} else if (isColumnType(column, ["PgLineABC"])) {
|
|
12329
|
+
schema = z$1.object({
|
|
12330
|
+
a: z$1.number(),
|
|
12331
|
+
b: z$1.number(),
|
|
12332
|
+
c: z$1.number()
|
|
12333
|
+
});
|
|
12334
|
+
} else if (isColumnType(column, ["PgArray"])) {
|
|
12335
|
+
schema = z$1.array(columnToSchema(column.baseColumn, z$1));
|
|
12336
|
+
schema = column.size ? schema.length(column.size) : schema;
|
|
12337
|
+
} else if (column.dataType === "array") {
|
|
12338
|
+
schema = z$1.array(z$1.any());
|
|
12339
|
+
} else if (column.dataType === "number") {
|
|
12340
|
+
schema = numberColumnToSchema(column, z$1, coerce2);
|
|
12341
|
+
} else if (column.dataType === "bigint") {
|
|
12342
|
+
schema = bigintColumnToSchema(column, z$1, coerce2);
|
|
12343
|
+
} else if (column.dataType === "boolean") {
|
|
12344
|
+
schema = coerce2 === true || coerce2.boolean ? z$1.coerce.boolean() : z$1.boolean();
|
|
12345
|
+
} else if (column.dataType === "date") {
|
|
12346
|
+
schema = coerce2 === true || coerce2.date ? z$1.coerce.date() : z$1.date();
|
|
12347
|
+
} else if (column.dataType === "string") {
|
|
12348
|
+
schema = stringColumnToSchema(column, z$1, coerce2);
|
|
12349
|
+
} else if (column.dataType === "json") {
|
|
12350
|
+
schema = jsonSchema;
|
|
12351
|
+
} else if (column.dataType === "custom") {
|
|
12352
|
+
schema = z$1.any();
|
|
12353
|
+
} else if (column.dataType === "buffer") {
|
|
12354
|
+
schema = bufferSchema;
|
|
12355
|
+
}
|
|
12356
|
+
}
|
|
12357
|
+
if (!schema) {
|
|
12358
|
+
schema = z$1.any();
|
|
12359
|
+
}
|
|
12360
|
+
return schema;
|
|
12361
|
+
}
|
|
12362
|
+
function numberColumnToSchema(column, z, coerce2) {
|
|
12363
|
+
let unsigned = column.getSQLType().includes("unsigned");
|
|
12364
|
+
let min;
|
|
12365
|
+
let max;
|
|
12366
|
+
let integer2 = false;
|
|
12367
|
+
if (isColumnType(column, ["MySqlTinyInt", "SingleStoreTinyInt"])) {
|
|
12368
|
+
min = unsigned ? 0 : CONSTANTS.INT8_MIN;
|
|
12369
|
+
max = unsigned ? CONSTANTS.INT8_UNSIGNED_MAX : CONSTANTS.INT8_MAX;
|
|
12370
|
+
integer2 = true;
|
|
12371
|
+
} else if (isColumnType(column, [
|
|
12372
|
+
"PgSmallInt",
|
|
12373
|
+
"PgSmallSerial",
|
|
12374
|
+
"MySqlSmallInt",
|
|
12375
|
+
"SingleStoreSmallInt"
|
|
12376
|
+
])) {
|
|
12377
|
+
min = unsigned ? 0 : CONSTANTS.INT16_MIN;
|
|
12378
|
+
max = unsigned ? CONSTANTS.INT16_UNSIGNED_MAX : CONSTANTS.INT16_MAX;
|
|
12379
|
+
integer2 = true;
|
|
12380
|
+
} else if (isColumnType(column, [
|
|
12381
|
+
"PgReal",
|
|
12382
|
+
"MySqlFloat",
|
|
12383
|
+
"MySqlMediumInt",
|
|
12384
|
+
"SingleStoreMediumInt",
|
|
12385
|
+
"SingleStoreFloat"
|
|
12386
|
+
])) {
|
|
12387
|
+
min = unsigned ? 0 : CONSTANTS.INT24_MIN;
|
|
12388
|
+
max = unsigned ? CONSTANTS.INT24_UNSIGNED_MAX : CONSTANTS.INT24_MAX;
|
|
12389
|
+
integer2 = isColumnType(column, ["MySqlMediumInt", "SingleStoreMediumInt"]);
|
|
12390
|
+
} else if (isColumnType(column, [
|
|
12391
|
+
"PgInteger",
|
|
12392
|
+
"PgSerial",
|
|
12393
|
+
"MySqlInt",
|
|
12394
|
+
"SingleStoreInt"
|
|
12395
|
+
])) {
|
|
12396
|
+
min = unsigned ? 0 : CONSTANTS.INT32_MIN;
|
|
12397
|
+
max = unsigned ? CONSTANTS.INT32_UNSIGNED_MAX : CONSTANTS.INT32_MAX;
|
|
12398
|
+
integer2 = true;
|
|
12399
|
+
} else if (isColumnType(column, [
|
|
12400
|
+
"PgDoublePrecision",
|
|
12401
|
+
"MySqlReal",
|
|
12402
|
+
"MySqlDouble",
|
|
12403
|
+
"SingleStoreReal",
|
|
12404
|
+
"SingleStoreDouble",
|
|
12405
|
+
"SQLiteReal"
|
|
12406
|
+
])) {
|
|
12407
|
+
min = unsigned ? 0 : CONSTANTS.INT48_MIN;
|
|
12408
|
+
max = unsigned ? CONSTANTS.INT48_UNSIGNED_MAX : CONSTANTS.INT48_MAX;
|
|
12409
|
+
} else if (isColumnType(column, [
|
|
12410
|
+
"PgBigInt53",
|
|
12411
|
+
"PgBigSerial53",
|
|
12412
|
+
"MySqlBigInt53",
|
|
12413
|
+
"MySqlSerial",
|
|
12414
|
+
"SingleStoreBigInt53",
|
|
12415
|
+
"SingleStoreSerial",
|
|
12416
|
+
"SQLiteInteger"
|
|
12417
|
+
])) {
|
|
12418
|
+
unsigned = unsigned || isColumnType(column, ["MySqlSerial", "SingleStoreSerial"]);
|
|
12419
|
+
min = unsigned ? 0 : Number.MIN_SAFE_INTEGER;
|
|
12420
|
+
max = Number.MAX_SAFE_INTEGER;
|
|
12421
|
+
integer2 = true;
|
|
12422
|
+
} else if (isColumnType(column, ["MySqlYear", "SingleStoreYear"])) {
|
|
12423
|
+
min = 1901;
|
|
12424
|
+
max = 2155;
|
|
12425
|
+
integer2 = true;
|
|
12426
|
+
} else {
|
|
12427
|
+
min = Number.MIN_SAFE_INTEGER;
|
|
12428
|
+
max = Number.MAX_SAFE_INTEGER;
|
|
12429
|
+
}
|
|
12430
|
+
let schema = coerce2 === true || coerce2?.number ? z.coerce.number() : z.number();
|
|
12431
|
+
schema = schema.min(min).max(max);
|
|
12432
|
+
return integer2 ? schema.int() : schema;
|
|
12433
|
+
}
|
|
12434
|
+
function bigintColumnToSchema(column, z, coerce2) {
|
|
12435
|
+
const unsigned = column.getSQLType().includes("unsigned");
|
|
12436
|
+
const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
|
|
12437
|
+
const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
|
|
12438
|
+
const schema = coerce2 === true || coerce2?.bigint ? z.coerce.bigint() : z.bigint();
|
|
12439
|
+
return schema.min(min).max(max);
|
|
12440
|
+
}
|
|
12441
|
+
function stringColumnToSchema(column, z, coerce2) {
|
|
12442
|
+
if (isColumnType(column, ["PgUUID"])) {
|
|
12443
|
+
return z.string().uuid();
|
|
12444
|
+
}
|
|
12445
|
+
let max;
|
|
12446
|
+
let regex;
|
|
12447
|
+
let fixed = false;
|
|
12448
|
+
if (isColumnType(column, ["PgVarchar", "SQLiteText"])) {
|
|
12449
|
+
max = column.length;
|
|
12450
|
+
} else if (isColumnType(column, ["MySqlVarChar", "SingleStoreVarChar"])) {
|
|
12451
|
+
max = column.length ?? CONSTANTS.INT16_UNSIGNED_MAX;
|
|
12452
|
+
} else if (isColumnType(column, ["MySqlText", "SingleStoreText"])) {
|
|
12453
|
+
if (column.textType === "longtext") {
|
|
12454
|
+
max = CONSTANTS.INT32_UNSIGNED_MAX;
|
|
12455
|
+
} else if (column.textType === "mediumtext") {
|
|
12456
|
+
max = CONSTANTS.INT24_UNSIGNED_MAX;
|
|
12457
|
+
} else if (column.textType === "text") {
|
|
12458
|
+
max = CONSTANTS.INT16_UNSIGNED_MAX;
|
|
12459
|
+
} else {
|
|
12460
|
+
max = CONSTANTS.INT8_UNSIGNED_MAX;
|
|
12461
|
+
}
|
|
12462
|
+
}
|
|
12463
|
+
if (isColumnType(column, [
|
|
12464
|
+
"PgChar",
|
|
12465
|
+
"MySqlChar",
|
|
12466
|
+
"SingleStoreChar"
|
|
12467
|
+
])) {
|
|
12468
|
+
max = column.length;
|
|
12469
|
+
fixed = true;
|
|
12470
|
+
}
|
|
12471
|
+
if (isColumnType(column, ["PgBinaryVector"])) {
|
|
12472
|
+
regex = /^[01]+$/;
|
|
12473
|
+
max = column.dimensions;
|
|
12474
|
+
}
|
|
12475
|
+
let schema = coerce2 === true || coerce2?.string ? z.coerce.string() : z.string();
|
|
12476
|
+
schema = regex ? schema.regex(regex) : schema;
|
|
12477
|
+
return max && fixed ? schema.length(max) : max ? schema.max(max) : schema;
|
|
12478
|
+
}
|
|
12479
|
+
function getColumns(tableLike) {
|
|
12480
|
+
return isTable(tableLike) ? getTableColumns(tableLike) : getViewSelectedFields(tableLike);
|
|
12481
|
+
}
|
|
12482
|
+
function handleColumns(columns, refinements, conditions, factory) {
|
|
12483
|
+
const columnSchemas = {};
|
|
12484
|
+
for (const [key, selected] of Object.entries(columns)) {
|
|
12485
|
+
if (!is(selected, Column) && !is(selected, SQL) && !is(selected, SQL.Aliased) && typeof selected === "object") {
|
|
12486
|
+
const columns2 = isTable(selected) || isView(selected) ? getColumns(selected) : selected;
|
|
12487
|
+
columnSchemas[key] = handleColumns(columns2, refinements[key] ?? {}, conditions, factory);
|
|
12488
|
+
continue;
|
|
12489
|
+
}
|
|
12490
|
+
const refinement = refinements[key];
|
|
12491
|
+
if (refinement !== undefined && typeof refinement !== "function") {
|
|
12492
|
+
columnSchemas[key] = refinement;
|
|
12493
|
+
continue;
|
|
12494
|
+
}
|
|
12495
|
+
const column = is(selected, Column) ? selected : undefined;
|
|
12496
|
+
const schema = column ? columnToSchema(column, factory) : exports_external.any();
|
|
12497
|
+
const refined = typeof refinement === "function" ? refinement(schema) : schema;
|
|
12498
|
+
if (conditions.never(column)) {
|
|
12499
|
+
continue;
|
|
12500
|
+
} else {
|
|
12501
|
+
columnSchemas[key] = refined;
|
|
12502
|
+
}
|
|
12503
|
+
if (column) {
|
|
12504
|
+
if (conditions.nullable(column)) {
|
|
12505
|
+
columnSchemas[key] = columnSchemas[key].nullable();
|
|
12506
|
+
}
|
|
12507
|
+
if (conditions.optional(column)) {
|
|
12508
|
+
columnSchemas[key] = columnSchemas[key].optional();
|
|
12509
|
+
}
|
|
12510
|
+
}
|
|
12511
|
+
}
|
|
12512
|
+
return exports_external.object(columnSchemas);
|
|
12513
|
+
}
|
|
12514
|
+
function handleEnum(enum_, factory) {
|
|
12515
|
+
const zod = factory?.zodInstance ?? exports_external;
|
|
12516
|
+
return zod.enum(enum_.enumValues);
|
|
12517
|
+
}
|
|
12518
|
+
var selectConditions = {
|
|
12519
|
+
never: () => false,
|
|
12520
|
+
optional: () => false,
|
|
12521
|
+
nullable: (column) => !column.notNull
|
|
12522
|
+
};
|
|
12523
|
+
var createSelectSchema = (entity, refine) => {
|
|
12524
|
+
if (isPgEnum2(entity)) {
|
|
12525
|
+
return handleEnum(entity);
|
|
12526
|
+
}
|
|
12527
|
+
const columns = getColumns(entity);
|
|
12528
|
+
return handleColumns(columns, refine ?? {}, selectConditions);
|
|
12529
|
+
};
|
|
12530
|
+
|
|
12531
|
+
// ../api/dist/chunk-HIDAIYV4.js
|
|
12269
12532
|
var timestamps = () => ({
|
|
12270
12533
|
created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
|
|
12271
12534
|
updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
@@ -12339,6 +12602,11 @@ var project = sqliteTable("project", {
|
|
|
12339
12602
|
scan_branch: text("scan_branch"),
|
|
12340
12603
|
github_autoclose: integer("github_autoclose", { mode: "boolean" }).notNull().default(false)
|
|
12341
12604
|
});
|
|
12605
|
+
var project_view_state = sqliteTable("project_view_state", {
|
|
12606
|
+
project_id: text("project_id").primaryKey().references(() => project.id),
|
|
12607
|
+
layout: text("layout", { mode: "json" }).notNull().$type(),
|
|
12608
|
+
updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
12609
|
+
});
|
|
12342
12610
|
var ACTIONS = [
|
|
12343
12611
|
"CREATE_TASK",
|
|
12344
12612
|
"UPDATE_TASK",
|
|
@@ -13301,6 +13569,21 @@ var upsert_hook = exports_external.object({
|
|
|
13301
13569
|
action: hook_action_input
|
|
13302
13570
|
});
|
|
13303
13571
|
var toggle_hook_enabled = exports_external.object({ enabled: exports_external.boolean() });
|
|
13572
|
+
var project_graph_task = createSelectSchema(task);
|
|
13573
|
+
var project_graph_link = createSelectSchema(task_link);
|
|
13574
|
+
var project_graph_rollup_counts = exports_external.object({
|
|
13575
|
+
direct_done: exports_external.number().int(),
|
|
13576
|
+
direct_total: exports_external.number().int(),
|
|
13577
|
+
subtree_done: exports_external.number().int(),
|
|
13578
|
+
subtree_total: exports_external.number().int()
|
|
13579
|
+
});
|
|
13580
|
+
var project_graph_response = exports_external.object({
|
|
13581
|
+
tasks: exports_external.array(project_graph_task),
|
|
13582
|
+
links: exports_external.array(project_graph_link),
|
|
13583
|
+
rollups: exports_external.record(exports_external.string(), project_graph_rollup_counts)
|
|
13584
|
+
});
|
|
13585
|
+
var project_view_pin = exports_external.object({ x: exports_external.number(), y: exports_external.number() });
|
|
13586
|
+
var project_view_layout = exports_external.object({ pins: exports_external.record(exports_external.string(), project_view_pin) });
|
|
13304
13587
|
|
|
13305
13588
|
// ../../node_modules/@f0rbit/corpus/dist/types.js
|
|
13306
13589
|
var ok = (value) => ({ ok: true, value });
|
|
@@ -14156,7 +14439,10 @@ var ApiClient2 = class {
|
|
|
14156
14439
|
})),
|
|
14157
14440
|
deleteProject: (project2) => wrap(() => this.clients.projects.patch("/projects", {
|
|
14158
14441
|
body: { ...project2, deleted: true }
|
|
14159
|
-
}))
|
|
14442
|
+
})),
|
|
14443
|
+
graph: (project_id) => wrap(() => this.clients.projects.get(`/projects/${project_id}/graph`)),
|
|
14444
|
+
getViewState: (project_id) => wrap(() => this.clients.projects.get(`/projects/${project_id}/view-state`)),
|
|
14445
|
+
putViewState: (project_id, layout) => wrap(() => this.clients.projects.put(`/projects/${project_id}/view-state`, { body: layout }))
|
|
14160
14446
|
};
|
|
14161
14447
|
this.milestones = {
|
|
14162
14448
|
list: () => wrap(() => this.clients.milestones.get("/milestones")),
|
|
@@ -21563,17 +21849,17 @@ function parseDef(def, refs, forceResolution = false) {
|
|
|
21563
21849
|
const newItem = { def, path: refs.currentPath, jsonSchema: undefined };
|
|
21564
21850
|
refs.seen.set(def, newItem);
|
|
21565
21851
|
const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);
|
|
21566
|
-
const
|
|
21567
|
-
if (
|
|
21568
|
-
addMeta(def, refs,
|
|
21852
|
+
const jsonSchema2 = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
|
|
21853
|
+
if (jsonSchema2) {
|
|
21854
|
+
addMeta(def, refs, jsonSchema2);
|
|
21569
21855
|
}
|
|
21570
21856
|
if (refs.postProcess) {
|
|
21571
|
-
const postProcessResult = refs.postProcess(
|
|
21572
|
-
newItem.jsonSchema =
|
|
21857
|
+
const postProcessResult = refs.postProcess(jsonSchema2, def, refs);
|
|
21858
|
+
newItem.jsonSchema = jsonSchema2;
|
|
21573
21859
|
return postProcessResult;
|
|
21574
21860
|
}
|
|
21575
|
-
newItem.jsonSchema =
|
|
21576
|
-
return
|
|
21861
|
+
newItem.jsonSchema = jsonSchema2;
|
|
21862
|
+
return jsonSchema2;
|
|
21577
21863
|
}
|
|
21578
21864
|
var get$ref = (item, refs) => {
|
|
21579
21865
|
switch (refs.$refStrategy) {
|
|
@@ -21591,14 +21877,14 @@ var get$ref = (item, refs) => {
|
|
|
21591
21877
|
}
|
|
21592
21878
|
}
|
|
21593
21879
|
};
|
|
21594
|
-
var addMeta = (def, refs,
|
|
21880
|
+
var addMeta = (def, refs, jsonSchema2) => {
|
|
21595
21881
|
if (def.description) {
|
|
21596
|
-
|
|
21882
|
+
jsonSchema2.description = def.description;
|
|
21597
21883
|
if (refs.markdownDescription) {
|
|
21598
|
-
|
|
21884
|
+
jsonSchema2.markdownDescription = def.description;
|
|
21599
21885
|
}
|
|
21600
21886
|
}
|
|
21601
|
-
return
|
|
21887
|
+
return jsonSchema2;
|
|
21602
21888
|
};
|
|
21603
21889
|
// ../../node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
21604
21890
|
var zodToJsonSchema = (schema, options) => {
|
|
@@ -23102,13 +23388,13 @@ class StdioServerTransport {
|
|
|
23102
23388
|
// src/index.ts
|
|
23103
23389
|
function zodToMCPSchema(schema) {
|
|
23104
23390
|
try {
|
|
23105
|
-
const
|
|
23391
|
+
const jsonSchema2 = zodToJsonSchema(schema, {
|
|
23106
23392
|
target: "openApi3",
|
|
23107
23393
|
$refStrategy: "none"
|
|
23108
23394
|
});
|
|
23109
|
-
const { $schema: _, ...cleanSchema } =
|
|
23110
|
-
if (
|
|
23111
|
-
return
|
|
23395
|
+
const { $schema: _, ...cleanSchema } = jsonSchema2;
|
|
23396
|
+
if (jsonSchema2.type === "object")
|
|
23397
|
+
return jsonSchema2;
|
|
23112
23398
|
return {
|
|
23113
23399
|
type: "object",
|
|
23114
23400
|
properties: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/mcp",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "MCP server for devpad - exposes devpad API functionality via Model Context Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-tools",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"zod-to-json-schema": "^3.24.6"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@devpad/api": "^2.5.
|
|
53
|
+
"@devpad/api": "^2.5.1",
|
|
54
54
|
"@types/node": "^24.3.0",
|
|
55
55
|
"typescript": "^5.0.0"
|
|
56
56
|
},
|