@kentico/management-api-mcp 31.4.3-preview → 31.4.4-preview

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.
Files changed (2) hide show
  1. package/dist/index.js +57 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2345,8 +2345,15 @@ var UriTemplateMatcher = class {
2345
2345
 
2346
2346
  // node_modules/valibot/dist/index.mjs
2347
2347
  var store$4;
2348
+ var DEFAULT_CONFIG = {
2349
+ lang: void 0,
2350
+ message: void 0,
2351
+ abortEarly: void 0,
2352
+ abortPipeEarly: void 0
2353
+ };
2348
2354
  // @__NO_SIDE_EFFECTS__
2349
2355
  function getGlobalConfig(config$1) {
2356
+ if (!config$1 && !store$4) return DEFAULT_CONFIG;
2350
2357
  return {
2351
2358
  lang: config$1?.lang ?? store$4?.lang,
2352
2359
  message: config$1?.message,
@@ -2402,19 +2409,25 @@ function _addIssue(context, label, dataset, config$1, other) {
2402
2409
  if (dataset.issues) dataset.issues.push(issue2);
2403
2410
  else dataset.issues = [issue2];
2404
2411
  }
2412
+ var _standardCache = /* @__PURE__ */ new WeakMap();
2405
2413
  // @__NO_SIDE_EFFECTS__
2406
2414
  function _getStandardProps(context) {
2407
- return {
2408
- version: 1,
2409
- vendor: "valibot",
2410
- validate(value$1) {
2411
- return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
2412
- }
2413
- };
2415
+ let cached2 = _standardCache.get(context);
2416
+ if (!cached2) {
2417
+ cached2 = {
2418
+ version: 1,
2419
+ vendor: "valibot",
2420
+ validate(value$1) {
2421
+ return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
2422
+ }
2423
+ };
2424
+ _standardCache.set(context, cached2);
2425
+ }
2426
+ return cached2;
2414
2427
  }
2415
2428
  // @__NO_SIDE_EFFECTS__
2416
2429
  function _isValidObjectKey(object$1, key) {
2417
- return Object.hasOwn(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
2430
+ return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
2418
2431
  }
2419
2432
  // @__NO_SIDE_EFFECTS__
2420
2433
  function _joinExpects(values$1, separator) {
@@ -2564,6 +2577,7 @@ function startsWith(requirement, message$1) {
2564
2577
  }
2565
2578
  };
2566
2579
  }
2580
+ var ABORT_EARLY_CONFIG = { abortEarly: true };
2567
2581
  // @__NO_SIDE_EFFECTS__
2568
2582
  function getFallback(schema, dataset, config$1) {
2569
2583
  return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
@@ -3027,7 +3041,7 @@ function string(message$1) {
3027
3041
  // @__NO_SIDE_EFFECTS__
3028
3042
  function _subIssues(datasets) {
3029
3043
  let issues;
3030
- if (datasets) for (const dataset of datasets) if (issues) issues.push(...dataset.issues);
3044
+ if (datasets) for (const dataset of datasets) if (issues) for (const issue2 of dataset.issues) issues.push(issue2);
3031
3045
  else issues = dataset.issues;
3032
3046
  return issues;
3033
3047
  }
@@ -3119,7 +3133,7 @@ function variant(key, options, message$1) {
3119
3133
  if (currentKey in input ? discriminatorSchema["~run"]({
3120
3134
  typed: false,
3121
3135
  value: input[currentKey]
3122
- }, { abortEarly: true }).issues : discriminatorSchema.type !== "exact_optional" && discriminatorSchema.type !== "optional" && discriminatorSchema.type !== "nullish") {
3136
+ }, ABORT_EARLY_CONFIG).issues : discriminatorSchema.type !== "exact_optional" && discriminatorSchema.type !== "optional" && discriminatorSchema.type !== "nullish") {
3123
3137
  keysAreValid = false;
3124
3138
  if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {
3125
3139
  maxDiscriminatorPriority = currentPriority;
@@ -5403,6 +5417,7 @@ __export(external_exports, {
5403
5417
  ZodOptional: () => ZodOptional,
5404
5418
  ZodPipe: () => ZodPipe,
5405
5419
  ZodPrefault: () => ZodPrefault,
5420
+ ZodPreprocess: () => ZodPreprocess,
5406
5421
  ZodPromise: () => ZodPromise,
5407
5422
  ZodReadonly: () => ZodReadonly,
5408
5423
  ZodRealError: () => ZodRealError,
@@ -5663,6 +5678,7 @@ __export(core_exports2, {
5663
5678
  $ZodOptional: () => $ZodOptional,
5664
5679
  $ZodPipe: () => $ZodPipe,
5665
5680
  $ZodPrefault: () => $ZodPrefault,
5681
+ $ZodPreprocess: () => $ZodPreprocess,
5666
5682
  $ZodPromise: () => $ZodPromise,
5667
5683
  $ZodReadonly: () => $ZodReadonly,
5668
5684
  $ZodRealError: () => $ZodRealError,
@@ -7608,7 +7624,7 @@ var Doc = class {
7608
7624
  var version = {
7609
7625
  major: 4,
7610
7626
  minor: 4,
7611
- patch: 1
7627
+ patch: 3
7612
7628
  };
7613
7629
 
7614
7630
  // node_modules/zod/v4/core/schemas.js
@@ -9207,6 +9223,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
9207
9223
  });
9208
9224
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
9209
9225
  $ZodType.init(inst, def);
9226
+ inst._zod.optin = "optional";
9210
9227
  inst._zod.parse = (payload, ctx) => {
9211
9228
  if (ctx.direction === "backward") {
9212
9229
  throw new $ZodEncodeError(inst.constructor.name);
@@ -9216,6 +9233,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
9216
9233
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
9217
9234
  return output.then((output2) => {
9218
9235
  payload.value = output2;
9236
+ payload.fallback = true;
9219
9237
  return payload;
9220
9238
  });
9221
9239
  }
@@ -9223,11 +9241,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
9223
9241
  throw new $ZodAsyncError();
9224
9242
  }
9225
9243
  payload.value = _out;
9244
+ payload.fallback = true;
9226
9245
  return payload;
9227
9246
  };
9228
9247
  });
9229
9248
  function handleOptionalResult(result, input) {
9230
- if (result.issues.length && input === void 0) {
9249
+ if (input === void 0 && (result.issues.length || result.fallback)) {
9231
9250
  return { issues: [], value: void 0 };
9232
9251
  }
9233
9252
  return result;
@@ -9245,10 +9264,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
9245
9264
  });
9246
9265
  inst._zod.parse = (payload, ctx) => {
9247
9266
  if (def.innerType._zod.optin === "optional") {
9267
+ const input = payload.value;
9248
9268
  const result = def.innerType._zod.run(payload, ctx);
9249
9269
  if (result instanceof Promise)
9250
- return result.then((r) => handleOptionalResult(r, payload.value));
9251
- return handleOptionalResult(result, payload.value);
9270
+ return result.then((r) => handleOptionalResult(r, input));
9271
+ return handleOptionalResult(result, input);
9252
9272
  }
9253
9273
  if (payload.value === void 0) {
9254
9274
  return payload;
@@ -9364,7 +9384,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
9364
9384
  });
9365
9385
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
9366
9386
  $ZodType.init(inst, def);
9367
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
9387
+ inst._zod.optin = "optional";
9368
9388
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
9369
9389
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
9370
9390
  inst._zod.parse = (payload, ctx) => {
@@ -9384,6 +9404,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
9384
9404
  input: payload.value
9385
9405
  });
9386
9406
  payload.issues = [];
9407
+ payload.fallback = true;
9387
9408
  }
9388
9409
  return payload;
9389
9410
  });
@@ -9398,6 +9419,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
9398
9419
  input: payload.value
9399
9420
  });
9400
9421
  payload.issues = [];
9422
+ payload.fallback = true;
9401
9423
  }
9402
9424
  return payload;
9403
9425
  };
@@ -9443,7 +9465,7 @@ function handlePipeResult(left, next, ctx) {
9443
9465
  left.aborted = true;
9444
9466
  return left;
9445
9467
  }
9446
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
9468
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
9447
9469
  }
9448
9470
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
9449
9471
  $ZodType.init(inst, def);
@@ -9495,6 +9517,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
9495
9517
  }
9496
9518
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
9497
9519
  }
9520
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
9521
+ $ZodPipe.init(inst, def);
9522
+ });
9498
9523
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
9499
9524
  $ZodType.init(inst, def);
9500
9525
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -17055,6 +17080,8 @@ function isTransforming(_schema, _ctx) {
17055
17080
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
17056
17081
  }
17057
17082
  if (def.type === "pipe") {
17083
+ if (_schema._zod.traits.has("$ZodCodec"))
17084
+ return true;
17058
17085
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
17059
17086
  }
17060
17087
  if (def.type === "object") {
@@ -17533,7 +17560,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
17533
17560
  };
17534
17561
  var pipeProcessor = (schema, ctx, _json, params) => {
17535
17562
  const def = schema._zod.def;
17536
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
17563
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
17564
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
17537
17565
  process3(innerType, ctx, params);
17538
17566
  const seen = ctx.seen.get(schema);
17539
17567
  seen.ref = innerType;
@@ -17767,6 +17795,7 @@ __export(schemas_exports2, {
17767
17795
  ZodOptional: () => ZodOptional,
17768
17796
  ZodPipe: () => ZodPipe,
17769
17797
  ZodPrefault: () => ZodPrefault,
17798
+ ZodPreprocess: () => ZodPreprocess,
17770
17799
  ZodPromise: () => ZodPromise,
17771
17800
  ZodReadonly: () => ZodReadonly,
17772
17801
  ZodRecord: () => ZodRecord,
@@ -19007,10 +19036,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
19007
19036
  if (output instanceof Promise) {
19008
19037
  return output.then((output2) => {
19009
19038
  payload.value = output2;
19039
+ payload.fallback = true;
19010
19040
  return payload;
19011
19041
  });
19012
19042
  }
19013
19043
  payload.value = output;
19044
+ payload.fallback = true;
19014
19045
  return payload;
19015
19046
  };
19016
19047
  });
@@ -19175,6 +19206,10 @@ function invertCodec(codec2) {
19175
19206
  reverseTransform: def.transform
19176
19207
  });
19177
19208
  }
19209
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
19210
+ ZodPipe.init(inst, def);
19211
+ $ZodPreprocess.init(inst, def);
19212
+ });
19178
19213
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
19179
19214
  $ZodReadonly.init(inst, def);
19180
19215
  ZodType.init(inst, def);
@@ -19293,7 +19328,11 @@ function json(params) {
19293
19328
  return jsonSchema;
19294
19329
  }
19295
19330
  function preprocess(fn, schema) {
19296
- return pipe2(transform(fn), schema);
19331
+ return new ZodPreprocess({
19332
+ type: "pipe",
19333
+ in: transform(fn),
19334
+ out: schema
19335
+ });
19297
19336
  }
19298
19337
 
19299
19338
  // node_modules/zod/v4/classic/compat.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kentico/management-api-mcp",
3
- "version": "31.4.3-preview",
3
+ "version": "31.4.4-preview",
4
4
  "description": "Model Context Protocol server for Xperience by Kentico Management API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",