@uipath/maestro-sdk 1.201.0-preview.128 → 1.201.0-preview.131

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 +429 -128
  2. package/package.json +56 -56
package/dist/index.js CHANGED
@@ -12492,9 +12492,28 @@ var require_data = __commonJS((exports, module) => {
12492
12492
  var require_utils = __commonJS((exports, module) => {
12493
12493
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
12494
12494
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
12495
+ var isPort = RegExp.prototype.test.bind(/^\d*$/u);
12495
12496
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
12496
12497
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
12497
- var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
12498
+ var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
12499
+ var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
12500
+ var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
12501
+ var BYTE_HEX = new Array(256);
12502
+ {
12503
+ const HEX_DIGITS = "0123456789ABCDEF";
12504
+ for (let i = 0;i < 256; i++) {
12505
+ BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
12506
+ }
12507
+ }
12508
+ function percentEncodeNonAscii(cp) {
12509
+ if (cp < 2048) {
12510
+ return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
12511
+ }
12512
+ if (cp < 65536) {
12513
+ return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
12514
+ }
12515
+ return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
12516
+ }
12498
12517
  function stringArrayToHexStripped(input) {
12499
12518
  let acc = "";
12500
12519
  let code = 0;
@@ -12519,91 +12538,122 @@ var require_utils = __commonJS((exports, module) => {
12519
12538
  }
12520
12539
  return acc;
12521
12540
  }
12541
+ var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
12542
+ var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
12543
+ var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
12522
12544
  var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
12523
- function consumeIsZone(buffer) {
12524
- buffer.length = 0;
12525
- return true;
12526
- }
12527
- function consumeHextets(buffer, address, output) {
12528
- if (buffer.length) {
12529
- const hex3 = stringArrayToHexStripped(buffer);
12530
- if (hex3 !== "") {
12531
- address.push(hex3);
12532
- } else {
12533
- output.error = true;
12534
- return false;
12545
+ function isZoneIdentifier(zone) {
12546
+ if (zone.length === 0)
12547
+ return false;
12548
+ for (let i = 0;i < zone.length; i++) {
12549
+ if (isZoneCharacter(zone[i]))
12550
+ continue;
12551
+ if (zone[i] === "%" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {
12552
+ i += 2;
12553
+ continue;
12535
12554
  }
12536
- buffer.length = 0;
12555
+ return false;
12537
12556
  }
12538
12557
  return true;
12539
12558
  }
12540
- function getIPV6(input) {
12541
- let tokenCount = 0;
12542
- const output = { error: false, address: "", zone: "" };
12543
- const address = [];
12544
- const buffer = [];
12545
- let endipv6Encountered = false;
12546
- let endIpv6 = false;
12547
- let consume = consumeHextets;
12548
- for (let i = 0;i < input.length; i++) {
12549
- const cursor = input[i];
12550
- if (cursor === "[" || cursor === "]") {
12551
- continue;
12552
- }
12553
- if (cursor === ":") {
12554
- if (endipv6Encountered === true) {
12555
- endIpv6 = true;
12556
- }
12557
- if (!consume(buffer, address, output)) {
12558
- break;
12559
- }
12560
- if (++tokenCount > 7) {
12561
- output.error = true;
12562
- break;
12563
- }
12564
- if (i > 0 && input[i - 1] === ":") {
12565
- endipv6Encountered = true;
12566
- }
12567
- address.push(":");
12568
- continue;
12569
- } else if (cursor === "%") {
12570
- if (!consume(buffer, address, output)) {
12571
- break;
12559
+ function compressIPv6ZeroRun(hextets) {
12560
+ let bestStart = -1;
12561
+ let bestLength = 0;
12562
+ let runStart = -1;
12563
+ let runLength = 0;
12564
+ for (let i = 0;i < hextets.length; i++) {
12565
+ if (hextets[i] === "0") {
12566
+ if (runStart === -1)
12567
+ runStart = i;
12568
+ runLength++;
12569
+ if (runLength > bestLength) {
12570
+ bestLength = runLength;
12571
+ bestStart = runStart;
12572
12572
  }
12573
- consume = consumeIsZone;
12574
12573
  } else {
12575
- buffer.push(cursor);
12576
- continue;
12574
+ runStart = -1;
12575
+ runLength = 0;
12577
12576
  }
12578
12577
  }
12579
- if (buffer.length) {
12580
- if (consume === consumeIsZone) {
12581
- output.zone = buffer.join("");
12582
- } else if (endIpv6) {
12583
- address.push(buffer.join(""));
12584
- } else {
12585
- address.push(stringArrayToHexStripped(buffer));
12578
+ if (bestLength < 2)
12579
+ return hextets.join(":");
12580
+ const head = hextets.slice(0, bestStart).join(":");
12581
+ const tail = hextets.slice(bestStart + bestLength).join(":");
12582
+ return head + "::" + tail;
12583
+ }
12584
+ function normalizeIPv6Address(input) {
12585
+ const compression = input.indexOf("::");
12586
+ if (compression !== -1 && input.indexOf("::", compression + 1) !== -1)
12587
+ return;
12588
+ const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
12589
+ const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
12590
+ if (compression !== -1) {
12591
+ if (left.length === 1 && left[0] === "")
12592
+ left.length = 0;
12593
+ if (right.length === 1 && right[0] === "")
12594
+ right.length = 0;
12595
+ }
12596
+ const parts = left.concat(right);
12597
+ let hextetCount = 0;
12598
+ for (let i = 0;i < parts.length; i++) {
12599
+ const part = parts[i];
12600
+ if (part === "")
12601
+ return;
12602
+ if (part.indexOf(".") !== -1) {
12603
+ if (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part))
12604
+ return;
12605
+ hextetCount += 2;
12606
+ continue;
12586
12607
  }
12608
+ if (!isHextet(part))
12609
+ return;
12610
+ parts[i] = parseInt(part, 16).toString(16);
12611
+ hextetCount++;
12587
12612
  }
12588
- output.address = address.join("");
12589
- return output;
12613
+ if (compression === -1) {
12614
+ if (hextetCount !== 8)
12615
+ return;
12616
+ return compressIPv6ZeroRun(parts);
12617
+ }
12618
+ if (hextetCount >= 8)
12619
+ return;
12620
+ const expanded = parts.slice(0, left.length);
12621
+ for (let i = hextetCount;i < 8; i++)
12622
+ expanded.push("0");
12623
+ for (let i = left.length;i < parts.length; i++)
12624
+ expanded.push(parts[i]);
12625
+ return compressIPv6ZeroRun(expanded);
12590
12626
  }
12591
12627
  function normalizeIPv6(host) {
12592
- if (findToken(host, ":") < 2) {
12593
- return { host, isIPV6: false };
12594
- }
12595
- const ipv63 = getIPV6(host);
12596
- if (!ipv63.error) {
12597
- let newHost = ipv63.address;
12598
- let escapedHost = ipv63.address;
12599
- if (ipv63.zone) {
12600
- newHost += "%" + ipv63.zone;
12601
- escapedHost += "%25" + ipv63.zone;
12602
- }
12603
- return { host: newHost, isIPV6: true, escapedHost };
12604
- } else {
12605
- return { host, isIPV6: false };
12606
- }
12628
+ const bracketed = host[0] === "[" && host[host.length - 1] === "]";
12629
+ const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
12630
+ if (hasBracket && !bracketed)
12631
+ return { host, isIPV6: false, error: true };
12632
+ let input = bracketed ? host.slice(1, -1) : host;
12633
+ if (bracketed && isIPvFuture(input)) {
12634
+ input = input.toLowerCase();
12635
+ return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
12636
+ }
12637
+ if (findToken(input, ":") < 2) {
12638
+ return { host, isIPV6: false, error: bracketed };
12639
+ }
12640
+ let zoneIdentifier = "";
12641
+ const zoneSeparator = input.indexOf("%");
12642
+ if (zoneSeparator !== -1) {
12643
+ const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
12644
+ zoneIdentifier = input.slice(zoneSeparator + separatorLength);
12645
+ if (!isZoneIdentifier(zoneIdentifier))
12646
+ return { host, isIPV6: false, error: true };
12647
+ input = input.slice(0, zoneSeparator);
12648
+ }
12649
+ const address = normalizeIPv6Address(input);
12650
+ if (address === undefined)
12651
+ return { host, isIPV6: false, error: true };
12652
+ return {
12653
+ host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
12654
+ escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
12655
+ isIPV6: true
12656
+ };
12607
12657
  }
12608
12658
  function findToken(str2, token) {
12609
12659
  let ind = 0;
@@ -12723,7 +12773,8 @@ var require_utils = __commonJS((exports, module) => {
12723
12773
  function normalizePathEncoding(input) {
12724
12774
  let output = "";
12725
12775
  for (let i = 0;i < input.length; i++) {
12726
- if (input[i] === "%" && i + 2 < input.length) {
12776
+ const ch = input[i];
12777
+ if (ch === "%" && i + 2 < input.length) {
12727
12778
  const hex3 = input.slice(i + 1, i + 3);
12728
12779
  if (isHexPair(hex3)) {
12729
12780
  const normalizedHex = hex3.toUpperCase();
@@ -12737,10 +12788,152 @@ var require_utils = __commonJS((exports, module) => {
12737
12788
  continue;
12738
12789
  }
12739
12790
  }
12740
- if (isPathCharacter(input[i])) {
12741
- output += input[i];
12791
+ if (isPathCharacter(ch)) {
12792
+ output += ch;
12793
+ } else {
12794
+ const code = input.charCodeAt(i);
12795
+ if (code < 128) {
12796
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
12797
+ } else if (code < 55296 || code > 57343) {
12798
+ output += percentEncodeNonAscii(code);
12799
+ } else if (code <= 56319 && i + 1 < input.length) {
12800
+ const low = input.charCodeAt(i + 1);
12801
+ if (low >= 56320 && low <= 57343) {
12802
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
12803
+ i++;
12804
+ } else {
12805
+ output += percentEncodeNonAscii(65533);
12806
+ }
12807
+ } else {
12808
+ output += percentEncodeNonAscii(65533);
12809
+ }
12810
+ }
12811
+ }
12812
+ return output;
12813
+ }
12814
+ function serializePathEncoding(input, pathNoScheme = false) {
12815
+ let output = "";
12816
+ let firstSegment = pathNoScheme && input[0] !== "/";
12817
+ for (let i = 0;i < input.length; i++) {
12818
+ const ch = input[i];
12819
+ if (ch === "%" && i + 2 < input.length) {
12820
+ const hex3 = input.slice(i + 1, i + 3);
12821
+ if (isHexPair(hex3)) {
12822
+ output += "%" + hex3.toUpperCase();
12823
+ i += 2;
12824
+ continue;
12825
+ }
12826
+ }
12827
+ if (ch === "/") {
12828
+ firstSegment = false;
12829
+ }
12830
+ if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
12831
+ output += ch;
12832
+ } else {
12833
+ const code = input.charCodeAt(i);
12834
+ if (code < 128) {
12835
+ output += BYTE_HEX[code];
12836
+ } else if (code < 55296 || code > 57343) {
12837
+ output += percentEncodeNonAscii(code);
12838
+ } else if (code <= 56319 && i + 1 < input.length) {
12839
+ const low = input.charCodeAt(i + 1);
12840
+ if (low >= 56320 && low <= 57343) {
12841
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
12842
+ i++;
12843
+ } else {
12844
+ output += percentEncodeNonAscii(65533);
12845
+ }
12846
+ } else {
12847
+ output += percentEncodeNonAscii(65533);
12848
+ }
12849
+ }
12850
+ }
12851
+ return output;
12852
+ }
12853
+ function encodeComponent(input, isAllowed) {
12854
+ let output = "";
12855
+ for (let i = 0;i < input.length; i++) {
12856
+ const ch = input[i];
12857
+ if (ch === "%" && i + 2 < input.length) {
12858
+ const hex3 = input.slice(i + 1, i + 3);
12859
+ if (isHexPair(hex3)) {
12860
+ output += "%" + hex3.toUpperCase();
12861
+ i += 2;
12862
+ continue;
12863
+ }
12864
+ }
12865
+ if (isAllowed(ch)) {
12866
+ output += ch;
12867
+ } else {
12868
+ const code = input.charCodeAt(i);
12869
+ if (code < 128) {
12870
+ output += BYTE_HEX[code];
12871
+ } else if (code < 55296 || code > 57343) {
12872
+ output += percentEncodeNonAscii(code);
12873
+ } else if (code <= 56319 && i + 1 < input.length) {
12874
+ const low = input.charCodeAt(i + 1);
12875
+ if (low >= 56320 && low <= 57343) {
12876
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
12877
+ i++;
12878
+ } else {
12879
+ output += percentEncodeNonAscii(65533);
12880
+ }
12881
+ } else {
12882
+ output += percentEncodeNonAscii(65533);
12883
+ }
12884
+ }
12885
+ }
12886
+ return output;
12887
+ }
12888
+ function encodeUserinfo(input) {
12889
+ return encodeComponent(input, isUserinfoCharacter);
12890
+ }
12891
+ function encodeQuery(input) {
12892
+ return encodeComponent(input, isQueryFragmentCharacter);
12893
+ }
12894
+ function encodeFragment(input) {
12895
+ return encodeComponent(input, isQueryFragmentCharacter);
12896
+ }
12897
+ function isEscapeSafe(cp) {
12898
+ return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
12899
+ }
12900
+ function normalizeQueryFragmentEncoding(input) {
12901
+ let output = "";
12902
+ for (let i = 0;i < input.length; i++) {
12903
+ const ch = input[i];
12904
+ if (ch === "%" && i + 2 < input.length) {
12905
+ const hex3 = input.slice(i + 1, i + 3);
12906
+ if (isHexPair(hex3)) {
12907
+ const normalizedHex = hex3.toUpperCase();
12908
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
12909
+ if (isUnreserved(decoded)) {
12910
+ output += decoded;
12911
+ } else {
12912
+ output += "%" + normalizedHex;
12913
+ }
12914
+ i += 2;
12915
+ continue;
12916
+ }
12917
+ }
12918
+ if (isQueryFragmentCharacter(ch)) {
12919
+ output += ch;
12742
12920
  } else {
12743
- output += escape(input[i]);
12921
+ const code = input.charCodeAt(i);
12922
+ if (code < 128) {
12923
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
12924
+ } else if (code < 55296 || code > 57343) {
12925
+ output += percentEncodeNonAscii(code);
12926
+ } else if (code <= 56319 && i + 1 < input.length) {
12927
+ const low = input.charCodeAt(i + 1);
12928
+ if (low >= 56320 && low <= 57343) {
12929
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
12930
+ i++;
12931
+ } else {
12932
+ output += percentEncodeNonAscii(65533);
12933
+ }
12934
+ } else {
12935
+ output += percentEncodeNonAscii(65533);
12936
+ }
12744
12937
  }
12745
12938
  }
12746
12939
  return output;
@@ -12763,14 +12956,18 @@ var require_utils = __commonJS((exports, module) => {
12763
12956
  function recomposeAuthority(component) {
12764
12957
  const uriTokens = [];
12765
12958
  if (component.userinfo !== undefined) {
12766
- uriTokens.push(component.userinfo);
12959
+ uriTokens.push(encodeUserinfo(component.userinfo));
12767
12960
  uriTokens.push("@");
12768
12961
  }
12769
12962
  if (component.host !== undefined) {
12770
- let host = unescape(component.host);
12963
+ let host = component.host;
12771
12964
  if (!isIPv4(host)) {
12772
- const ipV6res = normalizeIPv6(host);
12773
- if (ipV6res.isIPV6 === true) {
12965
+ let ipV6res = normalizeIPv6(host);
12966
+ if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
12967
+ host = normalizePercentEncoding(host, true);
12968
+ ipV6res = normalizeIPv6(host);
12969
+ }
12970
+ if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
12774
12971
  host = `[${ipV6res.escapedHost}]`;
12775
12972
  } else {
12776
12973
  host = reescapeHostDelimiters(host, false);
@@ -12779,8 +12976,12 @@ var require_utils = __commonJS((exports, module) => {
12779
12976
  uriTokens.push(host);
12780
12977
  }
12781
12978
  if (typeof component.port === "number" || typeof component.port === "string") {
12979
+ const port = String(component.port);
12980
+ if (!isPort(port)) {
12981
+ throw new TypeError("URI port is malformed.");
12982
+ }
12782
12983
  uriTokens.push(":");
12783
- uriTokens.push(String(component.port));
12984
+ uriTokens.push(port);
12784
12985
  }
12785
12986
  return uriTokens.length ? uriTokens.join("") : undefined;
12786
12987
  }
@@ -12790,6 +12991,11 @@ var require_utils = __commonJS((exports, module) => {
12790
12991
  reescapeHostDelimiters,
12791
12992
  normalizePercentEncoding,
12792
12993
  normalizePathEncoding,
12994
+ serializePathEncoding,
12995
+ normalizeQueryFragmentEncoding,
12996
+ encodeUserinfo,
12997
+ encodeQuery,
12998
+ encodeFragment,
12793
12999
  escapePreservingEscapes,
12794
13000
  removeDotSegments,
12795
13001
  isIPv4,
@@ -12802,7 +13008,7 @@ var require_utils = __commonJS((exports, module) => {
12802
13008
  // ../../node_modules/fast-uri/lib/schemes.js
12803
13009
  var require_schemes = __commonJS((exports, module) => {
12804
13010
  var { isUUID } = require_utils();
12805
- var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
13011
+ var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
12806
13012
  var supportedSchemeNames = [
12807
13013
  "http",
12808
13014
  "https",
@@ -12857,9 +13063,10 @@ var require_schemes = __commonJS((exports, module) => {
12857
13063
  wsComponent.secure = undefined;
12858
13064
  }
12859
13065
  if (wsComponent.resourceName) {
12860
- const [path3, query] = wsComponent.resourceName.split("?");
13066
+ const queryIndex = wsComponent.resourceName.indexOf("?");
13067
+ const path3 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
12861
13068
  wsComponent.path = path3 && path3 !== "/" ? path3 : undefined;
12862
- wsComponent.query = query;
13069
+ wsComponent.query = queryIndex === -1 ? undefined : wsComponent.resourceName.slice(queryIndex + 1);
12863
13070
  wsComponent.resourceName = undefined;
12864
13071
  }
12865
13072
  wsComponent.fragment = undefined;
@@ -12871,7 +13078,7 @@ var require_schemes = __commonJS((exports, module) => {
12871
13078
  return urnComponent;
12872
13079
  }
12873
13080
  const matches = urnComponent.path.match(URN_REG);
12874
- if (matches) {
13081
+ if (matches && matches[0] === urnComponent.path) {
12875
13082
  const scheme = options.scheme || urnComponent.scheme || "urn";
12876
13083
  urnComponent.nid = matches[1].toLowerCase();
12877
13084
  urnComponent.nss = matches[2];
@@ -12975,8 +13182,17 @@ var require_schemes = __commonJS((exports, module) => {
12975
13182
 
12976
13183
  // ../../node_modules/fast-uri/index.js
12977
13184
  var require_fast_uri = __commonJS((exports, module) => {
12978
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
13185
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
12979
13186
  var { SCHEMES, getSchemeHandler } = require_schemes();
13187
+ var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
13188
+ var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
13189
+ function decodeValidScheme(scheme) {
13190
+ const decodedScheme = unescape(String(scheme));
13191
+ if (!VALID_SCHEME.test(decodedScheme)) {
13192
+ throw new TypeError(MALFORMED_SCHEME_ERROR);
13193
+ }
13194
+ return decodedScheme;
13195
+ }
12980
13196
  function normalize(uri, options) {
12981
13197
  if (typeof uri === "string") {
12982
13198
  uri = normalizeString(uri, options);
@@ -12987,12 +13203,34 @@ var require_fast_uri = __commonJS((exports, module) => {
12987
13203
  }
12988
13204
  function resolve2(baseURI, relativeURI, options) {
12989
13205
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
12990
- const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
12991
- const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
12992
- if (baseMalformed || relativeMalformed) {
13206
+ const {
13207
+ parsed: baseParsed,
13208
+ malformedAuthorityOrPort: baseMalformed,
13209
+ malformedPercentEncoding: baseMalformedPercentEncoding,
13210
+ malformedSchemeSpecific: baseMalformedSchemeSpecific,
13211
+ malformedHost: baseMalformedHost,
13212
+ malformedScheme: baseMalformedScheme
13213
+ } = parseWithStatus(baseURI, schemelessOptions);
13214
+ const {
13215
+ parsed: relativeParsed,
13216
+ malformedAuthorityOrPort: relativeMalformed,
13217
+ malformedPercentEncoding: relativeMalformedPercentEncoding,
13218
+ malformedSchemeSpecific: relativeMalformedSchemeSpecific,
13219
+ malformedHost: relativeMalformedHost,
13220
+ malformedScheme: relativeMalformedScheme
13221
+ } = parseWithStatus(relativeURI, schemelessOptions);
13222
+ if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
12993
13223
  throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
12994
13224
  }
12995
13225
  const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
13226
+ const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
13227
+ const resolvedHost = resolved.host;
13228
+ const resolvedHostIsIP = resolvedHost !== undefined && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
13229
+ canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
13230
+ const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
13231
+ if (resolved.error && !encodedASCIIHost) {
13232
+ throw new Error(resolved.error);
13233
+ }
12996
13234
  schemelessOptions.skipEscape = true;
12997
13235
  return serialize(resolved, schemelessOptions);
12998
13236
  }
@@ -13052,7 +13290,7 @@ var require_fast_uri = __commonJS((exports, module) => {
13052
13290
  function equal(uriA, uriB, options) {
13053
13291
  const normalizedA = normalizeComparableURI(uriA, options);
13054
13292
  const normalizedB = normalizeComparableURI(uriB, options);
13055
- return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase();
13293
+ return normalizedA !== undefined && normalizedB !== undefined && normalizedA === normalizedB;
13056
13294
  }
13057
13295
  function serialize(cmpts, opts) {
13058
13296
  const component = {
@@ -13073,20 +13311,23 @@ var require_fast_uri = __commonJS((exports, module) => {
13073
13311
  };
13074
13312
  const options = Object.assign({}, opts);
13075
13313
  const uriTokens = [];
13314
+ if (component.scheme) {
13315
+ component.scheme = decodeValidScheme(component.scheme);
13316
+ }
13076
13317
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
13077
13318
  if (schemeHandler && schemeHandler.serialize)
13078
13319
  schemeHandler.serialize(component, options);
13320
+ const hasAuthority = component.userinfo !== undefined || component.host !== undefined || component.port !== undefined;
13321
+ const pathNoScheme = !options.skipEscape && component.scheme === undefined && !hasAuthority;
13079
13322
  if (component.path !== undefined) {
13080
13323
  if (!options.skipEscape) {
13081
- component.path = escapePreservingEscapes(component.path);
13082
- if (component.scheme !== undefined) {
13083
- component.path = component.path.split("%3A").join(":");
13084
- }
13324
+ component.path = serializePathEncoding(component.path, pathNoScheme);
13085
13325
  } else {
13086
13326
  component.path = normalizePercentEncoding(component.path);
13087
13327
  }
13088
13328
  }
13089
13329
  if (options.reference !== "suffix" && component.scheme) {
13330
+ component.scheme = decodeValidScheme(component.scheme);
13090
13331
  uriTokens.push(component.scheme, ":");
13091
13332
  }
13092
13333
  const authority = recomposeAuthority(component);
@@ -13104,16 +13345,19 @@ var require_fast_uri = __commonJS((exports, module) => {
13104
13345
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
13105
13346
  s = removeDotSegments(s);
13106
13347
  }
13348
+ if (pathNoScheme) {
13349
+ s = serializePathEncoding(s, true);
13350
+ }
13107
13351
  if (authority === undefined && s[0] === "/" && s[1] === "/") {
13108
13352
  s = "/%2F" + s.slice(2);
13109
13353
  }
13110
13354
  uriTokens.push(s);
13111
13355
  }
13112
13356
  if (component.query !== undefined) {
13113
- uriTokens.push("?", component.query);
13357
+ uriTokens.push("?", encodeQuery(component.query));
13114
13358
  }
13115
13359
  if (component.fragment !== undefined) {
13116
- uriTokens.push("#", component.fragment);
13360
+ uriTokens.push("#", encodeFragment(component.fragment));
13117
13361
  }
13118
13362
  return uriTokens.join("");
13119
13363
  }
@@ -13129,6 +13373,36 @@ var require_fast_uri = __commonJS((exports, module) => {
13129
13373
  }
13130
13374
  return;
13131
13375
  }
13376
+ function hasMalformedPercentEncoding(component) {
13377
+ if (component === undefined)
13378
+ return false;
13379
+ let percent = component.indexOf("%");
13380
+ while (percent !== -1) {
13381
+ if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
13382
+ return true;
13383
+ }
13384
+ percent = component.indexOf("%", percent + 3);
13385
+ }
13386
+ return false;
13387
+ }
13388
+ function isIPLiteral(host) {
13389
+ return host[0] === "[" && host[host.length - 1] === "]";
13390
+ }
13391
+ function hasMalformedComponentPercentEncoding(matches) {
13392
+ const host = matches[4];
13393
+ return hasMalformedPercentEncoding(matches[3]) || host !== undefined && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
13394
+ }
13395
+ function canonicalizeHost(parsed, options, schemeHandler, isIP) {
13396
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
13397
+ try {
13398
+ parsed.host = new URL("http://" + parsed.host).hostname;
13399
+ } catch (e) {
13400
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
13401
+ return true;
13402
+ }
13403
+ }
13404
+ return false;
13405
+ }
13132
13406
  function parseWithStatus(uri, opts) {
13133
13407
  const options = Object.assign({}, opts);
13134
13408
  const parsed = {
@@ -13141,6 +13415,11 @@ var require_fast_uri = __commonJS((exports, module) => {
13141
13415
  fragment: undefined
13142
13416
  };
13143
13417
  let malformedAuthorityOrPort = false;
13418
+ let malformedPercentEncoding = false;
13419
+ let malformedSchemeSpecific = false;
13420
+ let malformedHost = false;
13421
+ let malformedIPLiteral = false;
13422
+ let malformedScheme = false;
13144
13423
  let isIP = false;
13145
13424
  if (options.reference === "suffix") {
13146
13425
  if (options.scheme) {
@@ -13177,6 +13456,19 @@ var require_fast_uri = __commonJS((exports, module) => {
13177
13456
  parsed.path = matches[6] || "";
13178
13457
  parsed.query = matches[7];
13179
13458
  parsed.fragment = matches[8];
13459
+ if (parsed.scheme !== undefined) {
13460
+ const decodedScheme = unescape(parsed.scheme);
13461
+ if (VALID_SCHEME.test(decodedScheme)) {
13462
+ parsed.scheme = decodedScheme.toLowerCase();
13463
+ } else {
13464
+ parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
13465
+ malformedScheme = true;
13466
+ }
13467
+ }
13468
+ malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
13469
+ if (malformedPercentEncoding) {
13470
+ parsed.error = parsed.error || "URI contains malformed percent-encoding.";
13471
+ }
13180
13472
  if (isNaN(parsed.port)) {
13181
13473
  parsed.port = matches[5];
13182
13474
  }
@@ -13188,9 +13480,16 @@ var require_fast_uri = __commonJS((exports, module) => {
13188
13480
  if (parsed.host) {
13189
13481
  const ipv4result = isIPv4(parsed.host);
13190
13482
  if (ipv4result === false) {
13483
+ const bracketedIPLiteral = isIPLiteral(parsed.host);
13484
+ const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
13191
13485
  const ipv6result = normalizeIPv6(parsed.host);
13192
- parsed.host = ipv6result.host.toLowerCase();
13193
- isIP = ipv6result.isIPV6;
13486
+ isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
13487
+ malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
13488
+ parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
13489
+ if (malformedIPLiteral) {
13490
+ parsed.error = parsed.error || "URI host is malformed.";
13491
+ malformedAuthorityOrPort = true;
13492
+ }
13194
13493
  } else {
13195
13494
  isIP = true;
13196
13495
  }
@@ -13208,42 +13507,36 @@ var require_fast_uri = __commonJS((exports, module) => {
13208
13507
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
13209
13508
  }
13210
13509
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
13211
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
13212
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
13213
- try {
13214
- parsed.host = new URL("http://" + parsed.host).hostname;
13215
- } catch (e) {
13216
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
13217
- }
13218
- }
13510
+ if (!malformedIPLiteral) {
13511
+ malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
13219
13512
  }
13220
13513
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
13221
13514
  if (uri.indexOf("%") !== -1) {
13222
- if (parsed.scheme !== undefined) {
13223
- parsed.scheme = unescape(parsed.scheme);
13224
- }
13225
- if (parsed.host !== undefined) {
13226
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
13515
+ if (parsed.host !== undefined && !malformedIPLiteral) {
13516
+ const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
13517
+ parsed.host = reescapeHostDelimiters(host, isIP);
13227
13518
  }
13228
13519
  }
13229
13520
  if (parsed.path) {
13230
13521
  parsed.path = normalizePathEncoding(parsed.path);
13231
13522
  }
13523
+ if (parsed.query) {
13524
+ parsed.query = normalizeQueryFragmentEncoding(parsed.query);
13525
+ }
13232
13526
  if (parsed.fragment) {
13233
- try {
13234
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
13235
- } catch {
13236
- parsed.error = parsed.error || "URI malformed";
13237
- }
13527
+ parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
13238
13528
  }
13239
13529
  }
13240
13530
  if (schemeHandler && schemeHandler.parse) {
13241
13531
  schemeHandler.parse(parsed, options);
13532
+ if (schemeHandler === SCHEMES.urn && parsed.nid === undefined) {
13533
+ malformedSchemeSpecific = true;
13534
+ }
13242
13535
  }
13243
13536
  } else {
13244
13537
  parsed.error = parsed.error || "URI can not be parsed.";
13245
13538
  }
13246
- return { parsed, malformedAuthorityOrPort };
13539
+ return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
13247
13540
  }
13248
13541
  function parse5(uri, opts) {
13249
13542
  return parseWithStatus(uri, opts).parsed;
@@ -13252,20 +13545,28 @@ var require_fast_uri = __commonJS((exports, module) => {
13252
13545
  return normalizeStringWithStatus(uri, opts).normalized;
13253
13546
  }
13254
13547
  function normalizeStringWithStatus(uri, opts) {
13255
- const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
13548
+ const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
13256
13549
  return {
13257
- normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
13258
- malformedAuthorityOrPort
13550
+ normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
13551
+ malformedAuthorityOrPort,
13552
+ malformedPercentEncoding,
13553
+ malformedSchemeSpecific,
13554
+ malformedHost,
13555
+ malformedScheme
13259
13556
  };
13260
13557
  }
13261
13558
  function normalizeComparableURI(uri, opts) {
13262
- if (typeof uri === "string") {
13263
- const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
13264
- return malformedAuthorityOrPort ? undefined : normalized;
13559
+ if (typeof uri !== "string" && typeof uri !== "object") {
13560
+ return;
13265
13561
  }
13266
- if (typeof uri === "object") {
13267
- return serialize(uri, opts);
13562
+ let value;
13563
+ try {
13564
+ value = typeof uri === "string" ? uri : serialize(uri, opts);
13565
+ } catch {
13566
+ return;
13268
13567
  }
13568
+ const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
13569
+ return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? undefined : normalized;
13269
13570
  }
13270
13571
  var fastUri = {
13271
13572
  SCHEMES,
@@ -178084,7 +178385,7 @@ class TextApiResponse {
178084
178385
  var package_default = {
178085
178386
  name: "@uipath/integrationservice-sdk",
178086
178387
  license: "MIT",
178087
- version: "1.201.0-preview.128",
178388
+ version: "1.201.0-preview.131",
178088
178389
  repository: {
178089
178390
  type: "git",
178090
178391
  url: "https://github.com/UiPath/cli.git",
@@ -189796,4 +190097,4 @@ export {
189796
190097
  BPMN_SPEC
189797
190098
  };
189798
190099
 
189799
- //# debugId=AB5B487BF0AF9C8E64756E2164756E21
190100
+ //# debugId=6621F88F6B1827E964756E2164756E21
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
1
  {
2
- "name": "@uipath/maestro-sdk",
3
- "license": "MIT",
4
- "version": "1.201.0-preview.128",
5
- "description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/UiPath/cli.git",
9
- "directory": "packages/maestro-sdk"
10
- },
11
- "publishConfig": {
12
- "registry": "https://registry.npmjs.org/"
13
- },
14
- "keywords": [
15
- "uipath",
16
- "maestro",
17
- "pims",
18
- "sdk"
19
- ],
20
- "type": "module",
21
- "main": "./dist/index.js",
22
- "types": "./dist/src/index.d.ts",
23
- "exports": {
24
- ".": {
25
- "types": "./dist/src/index.d.ts",
26
- "default": "./dist/index.js"
2
+ "name": "@uipath/maestro-sdk",
3
+ "license": "MIT",
4
+ "version": "1.201.0-preview.131",
5
+ "description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/UiPath/cli.git",
9
+ "directory": "packages/maestro-sdk"
27
10
  },
28
- "./manifest/bpmn-spec": {
29
- "types": "./dist/src/manifest/bpmn-spec.d.ts",
30
- "import": "./dist/manifest/bpmn-spec.js",
31
- "default": "./dist/manifest/bpmn-spec.js"
11
+ "publishConfig": {
12
+ "registry": "https://registry.npmjs.org/"
32
13
  },
33
- "./manifest/types": {
34
- "types": "./dist/src/manifest/types.d.ts"
14
+ "keywords": [
15
+ "uipath",
16
+ "maestro",
17
+ "pims",
18
+ "sdk"
19
+ ],
20
+ "type": "module",
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/src/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/src/index.d.ts",
26
+ "default": "./dist/index.js"
27
+ },
28
+ "./manifest/bpmn-spec": {
29
+ "types": "./dist/src/manifest/bpmn-spec.d.ts",
30
+ "import": "./dist/manifest/bpmn-spec.js",
31
+ "default": "./dist/manifest/bpmn-spec.js"
32
+ },
33
+ "./manifest/types": {
34
+ "types": "./dist/src/manifest/types.d.ts"
35
+ },
36
+ "./registry": {
37
+ "types": "./dist/src/registry/snapshot.d.ts",
38
+ "import": "./dist/registry/snapshot.js",
39
+ "default": "./dist/registry/snapshot.js"
40
+ },
41
+ "./bpmn-validation": {
42
+ "types": "./dist/src/bpmn-validation/project-validator.d.ts",
43
+ "import": "./dist/bpmn-validation/project-validator.js",
44
+ "default": "./dist/bpmn-validation/project-validator.js"
45
+ },
46
+ "./bpmn-validation/canvas": {
47
+ "types": "./dist/src/bpmn-validation/canvas/index.d.ts",
48
+ "import": "./dist/bpmn-validation/canvas/index.js",
49
+ "default": "./dist/bpmn-validation/canvas/index.js"
50
+ },
51
+ "./bpmn-packaging": {
52
+ "types": "./dist/src/bpmn-packaging/index.d.ts",
53
+ "import": "./dist/bpmn-packaging/index.js",
54
+ "default": "./dist/bpmn-packaging/index.js"
55
+ }
35
56
  },
36
- "./registry": {
37
- "types": "./dist/src/registry/snapshot.d.ts",
38
- "import": "./dist/registry/snapshot.js",
39
- "default": "./dist/registry/snapshot.js"
40
- },
41
- "./bpmn-validation": {
42
- "types": "./dist/src/bpmn-validation/project-validator.d.ts",
43
- "import": "./dist/bpmn-validation/project-validator.js",
44
- "default": "./dist/bpmn-validation/project-validator.js"
45
- },
46
- "./bpmn-validation/canvas": {
47
- "types": "./dist/src/bpmn-validation/canvas/index.d.ts",
48
- "import": "./dist/bpmn-validation/canvas/index.js",
49
- "default": "./dist/bpmn-validation/canvas/index.js"
50
- },
51
- "./bpmn-packaging": {
52
- "types": "./dist/src/bpmn-packaging/index.d.ts",
53
- "import": "./dist/bpmn-packaging/index.js",
54
- "default": "./dist/bpmn-packaging/index.js"
55
- }
56
- },
57
- "files": [
58
- "dist"
59
- ],
60
- "gitHead": "a72e454cd7025bbbdac37d6105afef8282138c88"
57
+ "files": [
58
+ "dist"
59
+ ],
60
+ "gitHead": "5b0a03e4ee4be352459ac9fd82341ff77bc82ee6"
61
61
  }