@antonytm/mcp-sitecore-server 0.8.3-bundle → 0.8.4-bundle-uuid

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/bundle.js CHANGED
@@ -18943,6 +18943,28 @@ const parseXMLString = function(xmlString) {
18943
18943
  });
18944
18944
  return parser2.parse(xmlString);
18945
18945
  };
18946
+ function prepareArgsString(parameters) {
18947
+ let scriptWithParameters = "";
18948
+ if (parameters) {
18949
+ for (const parameter in parameters) {
18950
+ if (parameters[parameter] === "") {
18951
+ scriptWithParameters += ` -${parameter}`;
18952
+ } else if (Array.isArray(parameters[parameter])) {
18953
+ scriptWithParameters += ` -${parameter} "${parameters[parameter].join('","')}"`;
18954
+ } else {
18955
+ scriptWithParameters += ` -${parameter} "${parameters[parameter]}"`;
18956
+ }
18957
+ }
18958
+ }
18959
+ return scriptWithParameters;
18960
+ }
18961
+ function generateUUID() {
18962
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
18963
+ const r = Math.random() * 16 | 0;
18964
+ const v = c === "x" ? r : r & 3 | 8;
18965
+ return v.toString(16);
18966
+ });
18967
+ }
18946
18968
  class PowershellClient {
18947
18969
  serverUrl;
18948
18970
  username;
@@ -18957,7 +18979,7 @@ class PowershellClient {
18957
18979
  this.bearertoken = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
18958
18980
  }
18959
18981
  async executeScript(script, parameters = {}) {
18960
- const uuid = crypto.randomUUID();
18982
+ const uuid = generateUUID();
18961
18983
  const url2 = `${this.serverUrl}/-/script/script/?sessionId=${uuid}&rawOutput=False&persistentSession=False `;
18962
18984
  const headers = {
18963
18985
  "Authorization": this.bearertoken || "",
@@ -20111,21 +20133,6 @@ function registerSimplePowerShell(server, config) {
20111
20133
  registerProviderPowerShell(server, config);
20112
20134
  registerIndexingPowerShell(server, config);
20113
20135
  }
20114
- function prepareArgsString(parameters) {
20115
- let scriptWithParameters = "";
20116
- if (parameters) {
20117
- for (const parameter in parameters) {
20118
- if (parameters[parameter] === "") {
20119
- scriptWithParameters += ` -${parameter}`;
20120
- } else if (Array.isArray(parameters[parameter])) {
20121
- scriptWithParameters += ` -${parameter} "${parameters[parameter].join('","')}"`;
20122
- } else {
20123
- scriptWithParameters += ` -${parameter} "${parameters[parameter]}"`;
20124
- }
20125
- }
20126
- }
20127
- return scriptWithParameters;
20128
- }
20129
20136
  function registerSetItemAclPowerShell(server, config) {
20130
20137
  server.tool(
20131
20138
  "security-set-item-acl-by-id",
@@ -45023,7 +45030,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
45023
45030
  var ys = arrObjKeys(obj, inspect2);
45024
45031
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
45025
45032
  var protoTag = obj instanceof Object ? "" : "null prototype";
45026
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
45033
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
45027
45034
  var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
45028
45035
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
45029
45036
  if (ys.length === 0) {
@@ -45048,25 +45055,25 @@ function canTrustToString(obj) {
45048
45055
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
45049
45056
  }
45050
45057
  function isArray$3(obj) {
45051
- return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
45058
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
45052
45059
  }
45053
45060
  function isDate$1(obj) {
45054
- return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
45061
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
45055
45062
  }
45056
45063
  function isRegExp$1(obj) {
45057
- return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
45064
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
45058
45065
  }
45059
45066
  function isError(obj) {
45060
- return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
45067
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
45061
45068
  }
45062
45069
  function isString(obj) {
45063
- return toStr$1(obj) === "[object String]" && canTrustToString(obj);
45070
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
45064
45071
  }
45065
45072
  function isNumber(obj) {
45066
- return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
45073
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
45067
45074
  }
45068
45075
  function isBoolean(obj) {
45069
- return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
45076
+ return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
45070
45077
  }
45071
45078
  function isSymbol(obj) {
45072
45079
  if (hasShammedSymbols) {
@@ -45102,7 +45109,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key2) {
45102
45109
  function has$3(obj, key2) {
45103
45110
  return hasOwn$1.call(obj, key2);
45104
45111
  }
45105
- function toStr$1(obj) {
45112
+ function toStr(obj) {
45106
45113
  return objectToString.call(obj);
45107
45114
  }
45108
45115
  function nameOf(f) {
@@ -45411,7 +45418,7 @@ var syntax = SyntaxError;
45411
45418
  var uri = URIError;
45412
45419
  var abs$1 = Math.abs;
45413
45420
  var floor$1 = Math.floor;
45414
- var max$2 = Math.max;
45421
+ var max$1 = Math.max;
45415
45422
  var min$1 = Math.min;
45416
45423
  var pow$1 = Math.pow;
45417
45424
  var round$1 = Math.round;
@@ -45540,78 +45547,99 @@ function requireObject_getPrototypeOf() {
45540
45547
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
45541
45548
  return Object_getPrototypeOf;
45542
45549
  }
45543
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
45544
- var toStr = Object.prototype.toString;
45545
- var max$1 = Math.max;
45546
- var funcType = "[object Function]";
45547
- var concatty = function concatty2(a, b) {
45548
- var arr = [];
45549
- for (var i = 0; i < a.length; i += 1) {
45550
- arr[i] = a[i];
45551
- }
45552
- for (var j = 0; j < b.length; j += 1) {
45553
- arr[j + a.length] = b[j];
45554
- }
45555
- return arr;
45556
- };
45557
- var slicy = function slicy2(arrLike, offset) {
45558
- var arr = [];
45559
- for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
45560
- arr[j] = arrLike[i];
45561
- }
45562
- return arr;
45563
- };
45564
- var joiny = function(arr, joiner) {
45565
- var str = "";
45566
- for (var i = 0; i < arr.length; i += 1) {
45567
- str += arr[i];
45568
- if (i + 1 < arr.length) {
45569
- str += joiner;
45550
+ var implementation;
45551
+ var hasRequiredImplementation;
45552
+ function requireImplementation() {
45553
+ if (hasRequiredImplementation) return implementation;
45554
+ hasRequiredImplementation = 1;
45555
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
45556
+ var toStr2 = Object.prototype.toString;
45557
+ var max2 = Math.max;
45558
+ var funcType = "[object Function]";
45559
+ var concatty = function concatty2(a, b) {
45560
+ var arr = [];
45561
+ for (var i = 0; i < a.length; i += 1) {
45562
+ arr[i] = a[i];
45570
45563
  }
45571
- }
45572
- return str;
45573
- };
45574
- var implementation$1 = function bind(that) {
45575
- var target = this;
45576
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
45577
- throw new TypeError(ERROR_MESSAGE + target);
45578
- }
45579
- var args = slicy(arguments, 1);
45580
- var bound;
45581
- var binder = function() {
45582
- if (this instanceof bound) {
45583
- var result = target.apply(
45584
- this,
45585
- concatty(args, arguments)
45586
- );
45587
- if (Object(result) === result) {
45588
- return result;
45564
+ for (var j = 0; j < b.length; j += 1) {
45565
+ arr[j + a.length] = b[j];
45566
+ }
45567
+ return arr;
45568
+ };
45569
+ var slicy = function slicy2(arrLike, offset) {
45570
+ var arr = [];
45571
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
45572
+ arr[j] = arrLike[i];
45573
+ }
45574
+ return arr;
45575
+ };
45576
+ var joiny = function(arr, joiner) {
45577
+ var str = "";
45578
+ for (var i = 0; i < arr.length; i += 1) {
45579
+ str += arr[i];
45580
+ if (i + 1 < arr.length) {
45581
+ str += joiner;
45589
45582
  }
45590
- return this;
45591
45583
  }
45592
- return target.apply(
45593
- that,
45594
- concatty(args, arguments)
45595
- );
45584
+ return str;
45596
45585
  };
45597
- var boundLength = max$1(0, target.length - args.length);
45598
- var boundArgs = [];
45599
- for (var i = 0; i < boundLength; i++) {
45600
- boundArgs[i] = "$" + i;
45601
- }
45602
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
45603
- if (target.prototype) {
45604
- var Empty = function Empty2() {
45586
+ implementation = function bind2(that) {
45587
+ var target = this;
45588
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
45589
+ throw new TypeError(ERROR_MESSAGE + target);
45590
+ }
45591
+ var args = slicy(arguments, 1);
45592
+ var bound;
45593
+ var binder = function() {
45594
+ if (this instanceof bound) {
45595
+ var result = target.apply(
45596
+ this,
45597
+ concatty(args, arguments)
45598
+ );
45599
+ if (Object(result) === result) {
45600
+ return result;
45601
+ }
45602
+ return this;
45603
+ }
45604
+ return target.apply(
45605
+ that,
45606
+ concatty(args, arguments)
45607
+ );
45605
45608
  };
45606
- Empty.prototype = target.prototype;
45607
- bound.prototype = new Empty();
45608
- Empty.prototype = null;
45609
- }
45610
- return bound;
45611
- };
45612
- var implementation = implementation$1;
45613
- var functionBind = Function.prototype.bind || implementation;
45614
- var functionCall = Function.prototype.call;
45609
+ var boundLength = max2(0, target.length - args.length);
45610
+ var boundArgs = [];
45611
+ for (var i = 0; i < boundLength; i++) {
45612
+ boundArgs[i] = "$" + i;
45613
+ }
45614
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
45615
+ if (target.prototype) {
45616
+ var Empty = function Empty2() {
45617
+ };
45618
+ Empty.prototype = target.prototype;
45619
+ bound.prototype = new Empty();
45620
+ Empty.prototype = null;
45621
+ }
45622
+ return bound;
45623
+ };
45624
+ return implementation;
45625
+ }
45626
+ var functionBind;
45627
+ var hasRequiredFunctionBind;
45628
+ function requireFunctionBind() {
45629
+ if (hasRequiredFunctionBind) return functionBind;
45630
+ hasRequiredFunctionBind = 1;
45631
+ var implementation2 = requireImplementation();
45632
+ functionBind = Function.prototype.bind || implementation2;
45633
+ return functionBind;
45634
+ }
45635
+ var functionCall;
45636
+ var hasRequiredFunctionCall;
45637
+ function requireFunctionCall() {
45638
+ if (hasRequiredFunctionCall) return functionCall;
45639
+ hasRequiredFunctionCall = 1;
45640
+ functionCall = Function.prototype.call;
45641
+ return functionCall;
45642
+ }
45615
45643
  var functionApply;
45616
45644
  var hasRequiredFunctionApply;
45617
45645
  function requireFunctionApply() {
@@ -45621,14 +45649,14 @@ function requireFunctionApply() {
45621
45649
  return functionApply;
45622
45650
  }
45623
45651
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
45624
- var bind$2 = functionBind;
45652
+ var bind$2 = requireFunctionBind();
45625
45653
  var $apply$1 = requireFunctionApply();
45626
- var $call$2 = functionCall;
45654
+ var $call$2 = requireFunctionCall();
45627
45655
  var $reflectApply = reflectApply;
45628
45656
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
45629
- var bind$1 = functionBind;
45657
+ var bind$1 = requireFunctionBind();
45630
45658
  var $TypeError$4 = type;
45631
- var $call$1 = functionCall;
45659
+ var $call$1 = requireFunctionCall();
45632
45660
  var $actualApply = actualApply;
45633
45661
  var callBindApplyHelpers = function callBindBasic(args) {
45634
45662
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -45694,8 +45722,8 @@ function requireHasown() {
45694
45722
  hasRequiredHasown = 1;
45695
45723
  var call = Function.prototype.call;
45696
45724
  var $hasOwn = Object.prototype.hasOwnProperty;
45697
- var bind3 = functionBind;
45698
- hasown = bind3.call(call, $hasOwn);
45725
+ var bind2 = requireFunctionBind();
45726
+ hasown = bind2.call(call, $hasOwn);
45699
45727
  return hasown;
45700
45728
  }
45701
45729
  var undefined$1;
@@ -45709,7 +45737,7 @@ var $TypeError$3 = type;
45709
45737
  var $URIError = uri;
45710
45738
  var abs = abs$1;
45711
45739
  var floor = floor$1;
45712
- var max = max$2;
45740
+ var max = max$1;
45713
45741
  var min = min$1;
45714
45742
  var pow = pow$1;
45715
45743
  var round = round$1;
@@ -45743,7 +45771,7 @@ var getProto = requireGetProto();
45743
45771
  var $ObjectGPO = requireObject_getPrototypeOf();
45744
45772
  var $ReflectGPO = requireReflect_getPrototypeOf();
45745
45773
  var $apply = requireFunctionApply();
45746
- var $call = functionCall;
45774
+ var $call = requireFunctionCall();
45747
45775
  var needsEval = {};
45748
45776
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
45749
45777
  var INTRINSICS = {
@@ -45914,13 +45942,13 @@ var LEGACY_ALIASES = {
45914
45942
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
45915
45943
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
45916
45944
  };
45917
- var bind2 = functionBind;
45945
+ var bind = requireFunctionBind();
45918
45946
  var hasOwn = requireHasown();
45919
- var $concat = bind2.call($call, Array.prototype.concat);
45920
- var $spliceApply = bind2.call($apply, Array.prototype.splice);
45921
- var $replace = bind2.call($call, String.prototype.replace);
45922
- var $strSlice = bind2.call($call, String.prototype.slice);
45923
- var $exec = bind2.call($call, RegExp.prototype.exec);
45947
+ var $concat = bind.call($call, Array.prototype.concat);
45948
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
45949
+ var $replace = bind.call($call, String.prototype.replace);
45950
+ var $strSlice = bind.call($call, String.prototype.slice);
45951
+ var $exec = bind.call($call, RegExp.prototype.exec);
45924
45952
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
45925
45953
  var reEscapeChar = /\\(\\)?/g;
45926
45954
  var stringToPath = function stringToPath2(string) {
@@ -47465,14 +47493,14 @@ var utils = {};
47465
47493
  * MIT Licensed
47466
47494
  */
47467
47495
  var etag_1 = etag$1;
47468
- var crypto$1 = require$$0$6;
47496
+ var crypto = require$$0$6;
47469
47497
  var Stats = fs$2.Stats;
47470
47498
  var toString = Object.prototype.toString;
47471
47499
  function entitytag(entity) {
47472
47500
  if (entity.length === 0) {
47473
47501
  return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"';
47474
47502
  }
47475
- var hash = crypto$1.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
47503
+ var hash = crypto.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
47476
47504
  var len = typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length;
47477
47505
  return '"' + len.toString(16) + "-" + hash + '"';
47478
47506
  }