@rockcarver/frodo-cli 2.0.0 → 2.0.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/app.cjs CHANGED
@@ -123284,7 +123284,7 @@ function stringify(obj) {
123284
123284
  }
123285
123285
  var package_default = {
123286
123286
  name: "@rockcarver/frodo-lib",
123287
- version: "2.0.0",
123287
+ version: "2.0.1",
123288
123288
  type: "commonjs",
123289
123289
  main: "./dist/index.js",
123290
123290
  module: "./dist/esm/index.js",
@@ -140494,71 +140494,91 @@ function defaultMatchRequestsBy(protocol = true) {
140494
140494
  }
140495
140495
  function filterRecording(recording) {
140496
140496
  if (_optionalChain([recording, 'access', _22 => _22.request, 'optionalAccess', _23 => _23.headers])) {
140497
- const headers2 = recording.request.headers;
140498
- headers2.map((header) => {
140499
- if (header.name.toUpperCase() === "AUTHORIZATION") {
140500
- if (isBase64Encoded(header.value)) {
140501
- header.value = encode3("username:password");
140502
- } else {
140503
- header.value = header.value.replace(
140504
- /Bearer .+/,
140505
- "Bearer <bearer token>"
140506
- );
140507
- }
140508
- }
140509
- if (header.name.toUpperCase() === "X-API-KEY") {
140510
- header.value = "<api key>";
140511
- }
140512
- if (header.name.toUpperCase() === "X-API-SECRET") {
140513
- header.value = "<api secret>";
140514
- }
140515
- });
140516
- recording.request.headers = headers2;
140497
+ recording.request.headers.forEach(obfuscateHeader);
140517
140498
  }
140518
140499
  if (_optionalChain([recording, 'access', _24 => _24.request, 'optionalAccess', _25 => _25.postData, 'optionalAccess', _26 => _26.text])) {
140519
- let body2 = recording.request.postData.text;
140520
- body2 = body2.replace(/assertion=.+?&/, "assertion=<assertion jwt token>&");
140521
- recording.request.postData.text = body2;
140500
+ obfuscateData(recording.request.postData);
140522
140501
  }
140523
- if (_optionalChain([recording, 'access', _27 => _27.response, 'optionalAccess', _28 => _28.content, 'optionalAccess', _29 => _29.text])) {
140524
- let body2 = recording.response.content.text;
140525
- if (recording.response.content.mimeType === "application/json;charset=UTF-8") {
140526
- try {
140527
- const json = JSON.parse(body2, (key, value) => {
140528
- if (key === "access_token") return "<access token>";
140529
- if (key === "id_token") return "<id token>";
140530
- if (key === "accessKey") return "<access key>";
140531
- return value;
140532
- });
140533
- if (json.result) {
140534
- for (const obj of json.result) {
140535
- if (obj.script) {
140536
- try {
140537
- let script = decode(obj.script);
140538
- script = script.replace(
140539
- /(var .*?(?:Sid|sid|Secret|secret|PhoneNumberFrom) = (?:"|'))(.*?)((?:"|'))/g,
140540
- "$1<secret>$3"
140541
- );
140542
- obj.script = encode3(script);
140543
- } catch (error2) {
140544
- }
140545
- }
140502
+ if (_optionalChain([recording, 'access', _27 => _27.response, 'optionalAccess', _28 => _28.cookies])) {
140503
+ for (const cookie of recording.response.cookies) {
140504
+ cookie.value = "<cookie>";
140505
+ }
140506
+ }
140507
+ if (_optionalChain([recording, 'access', _29 => _29.response, 'optionalAccess', _30 => _30.headers])) {
140508
+ recording.response.headers.forEach(obfuscateHeader);
140509
+ }
140510
+ if (_optionalChain([recording, 'access', _31 => _31.response, 'optionalAccess', _32 => _32.content, 'optionalAccess', _33 => _33.text])) {
140511
+ obfuscateData(recording.response.content);
140512
+ }
140513
+ }
140514
+ function obfuscateHeader(header) {
140515
+ if (header.name.toUpperCase() === "AUTHORIZATION") {
140516
+ if (isBase64Encoded(header.value)) {
140517
+ header.value = encode3("username:password");
140518
+ } else {
140519
+ header.value = header.value.replace(/Bearer .+/, "Bearer <bearer token>");
140520
+ }
140521
+ }
140522
+ if (header.name.toUpperCase() === "X-API-KEY") {
140523
+ header.value = "<api key>";
140524
+ }
140525
+ if (header.name.toUpperCase() === "X-API-SECRET") {
140526
+ header.value = "<api secret>";
140527
+ }
140528
+ if (header.name.toUpperCase() === "COOKIE") {
140529
+ header.value = header.value.replace(/=[^;]*/g, "=<cookie>");
140530
+ }
140531
+ if (header.name.toUpperCase() === "SET-COOKIE") {
140532
+ header.value = header.value.replace(/=[^;]*/, "=<cookie>");
140533
+ }
140534
+ }
140535
+ function obfuscateData(data2) {
140536
+ if (data2.mimeType.startsWith("application/json")) {
140537
+ data2.text = obfuscateJsonString(data2.text);
140538
+ } else if (data2.mimeType.startsWith("text/xml")) {
140539
+ data2.text = obfuscateXmlString(data2.text);
140540
+ } else if (data2.mimeType.startsWith("application/x-www-form-urlencoded")) {
140541
+ data2.text = data2.text.replace(
140542
+ /assertion=.+?&/,
140543
+ "assertion=<assertion jwt token>&"
140544
+ );
140545
+ }
140546
+ }
140547
+ function obfuscateJsonString(json) {
140548
+ try {
140549
+ const jsonObj = JSON.parse(json, (key, value) => {
140550
+ if (key === "access_token") return "<access token>";
140551
+ if (key === "id_token") return "<id token>";
140552
+ if (key === "tokenId") return "<token id>";
140553
+ if (key === "accessKey") return "<access key>";
140554
+ return value;
140555
+ });
140556
+ if (jsonObj.result) {
140557
+ for (const obj of jsonObj.result) {
140558
+ if (obj.script) {
140559
+ try {
140560
+ let script = decode(obj.script);
140561
+ script = script.replace(
140562
+ /(var .*?(?:Sid|sid|Secret|secret|PhoneNumberFrom) = (?:"|'))(.*?)((?:"|'))/g,
140563
+ "$1<secret>$3"
140564
+ );
140565
+ obj.script = encode3(script);
140566
+ } catch (error2) {
140546
140567
  }
140547
140568
  }
140548
- body2 = JSON.stringify(json);
140549
- } catch (error2) {
140550
140569
  }
140551
140570
  }
140552
- if (recording.response.content.mimeType === "text/xml;charset=utf-8") {
140553
- try {
140554
- body2 = body2.replace(
140555
- /<ds:X509Certificate>.+?<\/ds:X509Certificate>/gs,
140556
- `<ds:X509Certificate>${encode3("<certificate>")}</ds:X509Certificate>`
140557
- );
140558
- } catch (error2) {
140559
- }
140560
- }
140561
- recording.response.content.text = body2;
140571
+ return JSON.stringify(jsonObj);
140572
+ } catch (error2) {
140573
+ }
140574
+ }
140575
+ function obfuscateXmlString(xml) {
140576
+ try {
140577
+ return xml.replace(
140578
+ /<ds:X509Certificate>.+?<\/ds:X509Certificate>/gs,
140579
+ `<ds:X509Certificate>${encode3("<certificate>")}</ds:X509Certificate>`
140580
+ );
140581
+ } catch (error2) {
140562
140582
  }
140563
140583
  }
140564
140584
  var FRODO_MOCK_HOSTS = process.env.FRODO_MOCK_HOSTS ? process.env.FRODO_MOCK_HOSTS.split(",") : [
@@ -140723,6 +140743,21 @@ function setupPollyForFrodoLib({
140723
140743
  req.configure({ matchRequestsBy: authenticationMatchRequestsBy() });
140724
140744
  });
140725
140745
  polly.server.any("/am/json/*").recordingName(`${getFrodoCommand({ state: state2 })}/am`);
140746
+ polly.server.any([
140747
+ "/am/json/*/authenticate",
140748
+ "/am/json/*/sessions/?_action=getSessionInfo"
140749
+ ]).on("request", (req) => {
140750
+ req.configure({
140751
+ matchRequestsBy: authenticationMatchRequestsBy()
140752
+ });
140753
+ });
140754
+ polly.server.any("/am/json/*/sessions/?_action=getSessionInfo").on("beforeReplay", (_, recording) => {
140755
+ const body2 = JSON.parse(recording.response.content.text);
140756
+ const date = /* @__PURE__ */ new Date();
140757
+ date.setDate(date.getDate() + 1);
140758
+ body2.maxIdleExpirationTime = date.toISOString();
140759
+ recording.response.content.text = JSON.stringify(body2);
140760
+ });
140726
140761
  polly.server.any("/am/saml2/*").recordingName(`${getFrodoCommand({ state: state2 })}/saml2`);
140727
140762
  polly.server.any(["/openidm/managed/svcacct", "/openidm/managed/svcacct/*"]).recordingName(`${getFrodoCommand({ state: state2 })}/openidm/managed/svcacct`).on("request", (req) => {
140728
140763
  req.configure({
@@ -140828,7 +140863,7 @@ function curlirize(request, state2) {
140828
140863
  if (err) {
140829
140864
  if (axios_default.isAxiosError(err)) {
140830
140865
  printMessage({
140831
- message: `${_optionalChain([err, 'access', _30 => _30.response, 'optionalAccess', _31 => _31.status])}${_optionalChain([err, 'access', _32 => _32.response, 'optionalAccess', _33 => _33.data, 'access', _34 => _34["reason"]]) ? " " + _optionalChain([err, 'access', _35 => _35.response, 'optionalAccess', _36 => _36.data, 'access', _37 => _37["reason"]]) : ""}${_optionalChain([err, 'access', _38 => _38.response, 'optionalAccess', _39 => _39.data, 'access', _40 => _40["message"]]) ? " - " + _optionalChain([err, 'access', _41 => _41.response, 'optionalAccess', _42 => _42.data, 'access', _43 => _43["message"]]) : ""}`,
140866
+ message: `${_optionalChain([err, 'access', _34 => _34.response, 'optionalAccess', _35 => _35.status])}${_optionalChain([err, 'access', _36 => _36.response, 'optionalAccess', _37 => _37.data, 'access', _38 => _38["reason"]]) ? " " + _optionalChain([err, 'access', _39 => _39.response, 'optionalAccess', _40 => _40.data, 'access', _41 => _41["reason"]]) : ""}${_optionalChain([err, 'access', _42 => _42.response, 'optionalAccess', _43 => _43.data, 'access', _44 => _44["message"]]) ? " - " + _optionalChain([err, 'access', _45 => _45.response, 'optionalAccess', _46 => _46.data, 'access', _47 => _47["message"]]) : ""}`,
140832
140867
  type: "error",
140833
140868
  state: state2
140834
140869
  });
@@ -142420,7 +142455,7 @@ async function readOAuth2Provider({
142420
142455
  try {
142421
142456
  return getOAuth2Provider({ state: state2 });
142422
142457
  } catch (error2) {
142423
- if (error2.httpStatus === 404 || _optionalChain([error2, 'access', _44 => _44.response, 'optionalAccess', _45 => _45.status]) === 404) {
142458
+ if (error2.httpStatus === 404 || _optionalChain([error2, 'access', _48 => _48.response, 'optionalAccess', _49 => _49.status]) === 404) {
142424
142459
  return null;
142425
142460
  } else {
142426
142461
  throw new FrodoError(`Error reading oauth2 provider`, error2);
@@ -142862,7 +142897,7 @@ async function updateScript({
142862
142897
  }
142863
142898
  result2 = await putScript({ scriptId, scriptData, state: state2 });
142864
142899
  } catch (error2) {
142865
- if (_optionalChain([error2, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.status]) === 409) {
142900
+ if (_optionalChain([error2, 'access', _50 => _50.response, 'optionalAccess', _51 => _51.status]) === 409) {
142866
142901
  verboseMessage({
142867
142902
  message: `createOrUpdateScript WARNING: script with name ${scriptData.name} already exists, using renaming policy... <name> => <name - imported (n)>`,
142868
142903
  state: state2
@@ -143246,7 +143281,7 @@ async function updateOAuth2Client({
143246
143281
  debugMessage({ message: `OAuth2ClientOps.putOAuth2Client: end`, state: state2 });
143247
143282
  return response2;
143248
143283
  } catch (error2) {
143249
- if (_optionalChain([error2, 'access', _48 => _48.response, 'optionalAccess', _49 => _49.status]) === 400 && _optionalChain([error2, 'access', _50 => _50.response, 'optionalAccess', _51 => _51.data, 'optionalAccess', _52 => _52.message]) === "Invalid attribute specified.") {
143284
+ if (_optionalChain([error2, 'access', _52 => _52.response, 'optionalAccess', _53 => _53.status]) === 400 && _optionalChain([error2, 'access', _54 => _54.response, 'optionalAccess', _55 => _55.data, 'optionalAccess', _56 => _56.message]) === "Invalid attribute specified.") {
143250
143285
  try {
143251
143286
  const { validAttributes } = error2.response.data.detail;
143252
143287
  validAttributes.push("_id");
@@ -143978,7 +144013,7 @@ async function updateOAuth2TrustedJwtIssuer({
143978
144013
  });
143979
144014
  return response2;
143980
144015
  } catch (error2) {
143981
- if (_optionalChain([error2, 'access', _53 => _53.response, 'optionalAccess', _54 => _54.status]) === 400 && _optionalChain([error2, 'access', _55 => _55.response, 'optionalAccess', _56 => _56.data, 'optionalAccess', _57 => _57.message]) === "Invalid attribute specified.") {
144016
+ if (_optionalChain([error2, 'access', _57 => _57.response, 'optionalAccess', _58 => _58.status]) === 400 && _optionalChain([error2, 'access', _59 => _59.response, 'optionalAccess', _60 => _60.data, 'optionalAccess', _61 => _61.message]) === "Invalid attribute specified.") {
143982
144017
  try {
143983
144018
  const { validAttributes } = error2.response.data.detail;
143984
144019
  validAttributes.push("_id");
@@ -147847,7 +147882,7 @@ async function importAgent({
147847
147882
  }) {
147848
147883
  try {
147849
147884
  debugMessage({ message: `AgentOps.importAgent: start`, state: state2 });
147850
- const agentType = _optionalChain([importData, 'access', _58 => _58.agents, 'access', _59 => _59[agentId], 'optionalAccess', _60 => _60._type, 'access', _61 => _61._id]);
147885
+ const agentType = _optionalChain([importData, 'access', _62 => _62.agents, 'access', _63 => _63[agentId], 'optionalAccess', _64 => _64._type, 'access', _65 => _65._id]);
147851
147886
  const result2 = await putAgentByTypeAndId({
147852
147887
  agentType,
147853
147888
  agentId,
@@ -147870,7 +147905,7 @@ async function importIdentityGatewayAgent({
147870
147905
  message: `AgentOps.importIdentityGatewayAgent: start`,
147871
147906
  state: state2
147872
147907
  });
147873
- const agentType = _optionalChain([importData, 'access', _62 => _62.agents, 'access', _63 => _63[agentId], 'optionalAccess', _64 => _64._type, 'access', _65 => _65._id]);
147908
+ const agentType = _optionalChain([importData, 'access', _66 => _66.agents, 'access', _67 => _67[agentId], 'optionalAccess', _68 => _68._type, 'access', _69 => _69._id]);
147874
147909
  if (agentType !== "IdentityGatewayAgent")
147875
147910
  throw new FrodoError(
147876
147911
  `Wrong agent type! Expected 'IdentityGatewayAgent' but got '${agentType}'.`
@@ -147900,7 +147935,7 @@ async function importJavaAgent({
147900
147935
  }) {
147901
147936
  try {
147902
147937
  debugMessage({ message: `AgentOps.importJavaAgent: start`, state: state2 });
147903
- const agentType = _optionalChain([importData, 'access', _66 => _66.agents, 'access', _67 => _67[agentId], 'optionalAccess', _68 => _68._type, 'access', _69 => _69._id]);
147938
+ const agentType = _optionalChain([importData, 'access', _70 => _70.agents, 'access', _71 => _71[agentId], 'optionalAccess', _72 => _72._type, 'access', _73 => _73._id]);
147904
147939
  if (agentType !== "J2EEAgent")
147905
147940
  throw new FrodoError(
147906
147941
  `Wrong agent type! Expected 'J2EEAgent' but got '${agentType}'.`
@@ -147924,7 +147959,7 @@ async function importWebAgent({
147924
147959
  }) {
147925
147960
  try {
147926
147961
  debugMessage({ message: `AgentOps.importWebAgent: start`, state: state2 });
147927
- const agentType = _optionalChain([importData, 'access', _70 => _70.agents, 'access', _71 => _71[agentId], 'optionalAccess', _72 => _72._type, 'access', _73 => _73._id]);
147962
+ const agentType = _optionalChain([importData, 'access', _74 => _74.agents, 'access', _75 => _75[agentId], 'optionalAccess', _76 => _76._type, 'access', _77 => _77._id]);
147928
147963
  if (agentType !== "WebAgent")
147929
147964
  throw new FrodoError(
147930
147965
  `Wrong agent type! Expected 'WebAgent' but got '${agentType}'.`
@@ -149240,7 +149275,7 @@ async function createCircleOfTrust2({
149240
149275
  const response2 = await createCircleOfTrust({ cotData, state: state2 });
149241
149276
  return response2;
149242
149277
  } catch (createError) {
149243
- if (_optionalChain([createError, 'access', _74 => _74.response, 'optionalAccess', _75 => _75.data, 'optionalAccess', _76 => _76.code]) === 500 && _optionalChain([createError, 'access', _77 => _77.response, 'optionalAccess', _78 => _78.data, 'optionalAccess', _79 => _79.message]) === "Unable to update entity provider's circle of trust") {
149278
+ if (_optionalChain([createError, 'access', _78 => _78.response, 'optionalAccess', _79 => _79.data, 'optionalAccess', _80 => _80.code]) === 500 && _optionalChain([createError, 'access', _81 => _81.response, 'optionalAccess', _82 => _82.data, 'optionalAccess', _83 => _83.message]) === "Unable to update entity provider's circle of trust") {
149244
149279
  try {
149245
149280
  const response2 = await updateCircleOfTrust({ cotId, cotData, state: state2 });
149246
149281
  return response2;
@@ -149267,7 +149302,7 @@ async function updateCircleOfTrust2({
149267
149302
  const response2 = await updateCircleOfTrust({ cotId, cotData, state: state2 });
149268
149303
  return response2 || cotData;
149269
149304
  } catch (error2) {
149270
- if (_optionalChain([error2, 'access', _80 => _80.response, 'optionalAccess', _81 => _81.data, 'optionalAccess', _82 => _82.code]) === 500 && (_optionalChain([error2, 'access', _83 => _83.response, 'optionalAccess', _84 => _84.data, 'optionalAccess', _85 => _85.message]) === "Unable to update entity provider's circle of trust" || _optionalChain([error2, 'access', _86 => _86.response, 'optionalAccess', _87 => _87.data, 'optionalAccess', _88 => _88.message]) === "An error occurred while updating the COT memberships")) {
149305
+ if (_optionalChain([error2, 'access', _84 => _84.response, 'optionalAccess', _85 => _85.data, 'optionalAccess', _86 => _86.code]) === 500 && (_optionalChain([error2, 'access', _87 => _87.response, 'optionalAccess', _88 => _88.data, 'optionalAccess', _89 => _89.message]) === "Unable to update entity provider's circle of trust" || _optionalChain([error2, 'access', _90 => _90.response, 'optionalAccess', _91 => _91.data, 'optionalAccess', _92 => _92.message]) === "An error occurred while updating the COT memberships")) {
149271
149306
  try {
149272
149307
  const response2 = await updateCircleOfTrust({ cotId, cotData, state: state2 });
149273
149308
  return response2 || cotData;
@@ -149663,7 +149698,7 @@ ${providers.map((it) => it.split("|")[0]).join("\n")}.`,
149663
149698
  }
149664
149699
  } catch (error2) {
149665
149700
  debugMessage({
149666
- message: `Error ${_optionalChain([error2, 'access', _89 => _89.response, 'optionalAccess', _90 => _90.status])} creating/updating circle of trust: ${_optionalChain([error2, 'access', _91 => _91.response, 'optionalAccess', _92 => _92.data, 'optionalAccess', _93 => _93.message])}`,
149701
+ message: `Error ${_optionalChain([error2, 'access', _93 => _93.response, 'optionalAccess', _94 => _94.status])} creating/updating circle of trust: ${_optionalChain([error2, 'access', _95 => _95.response, 'optionalAccess', _96 => _96.data, 'optionalAccess', _97 => _97.message])}`,
149667
149702
  state: state2
149668
149703
  });
149669
149704
  errors.push(error2);
@@ -150411,7 +150446,7 @@ async function exportConfigEntities({
150411
150446
  !(error2.httpStatus === 404 && error2.httpMessage === "No configuration exists for id org.apache.felix.fileinstall/openidm")
150412
150447
  ) {
150413
150448
  printMessage({
150414
- message: _optionalChain([readConfigEntityError, 'access', _94 => _94.response, 'optionalAccess', _95 => _95.data]),
150449
+ message: _optionalChain([readConfigEntityError, 'access', _98 => _98.response, 'optionalAccess', _99 => _99.data]),
150415
150450
  type: "error",
150416
150451
  state: state2
150417
150452
  });
@@ -151146,7 +151181,7 @@ async function importFirstMapping({
151146
151181
  const imported = [];
151147
151182
  const mappingIds = Object.keys(importData.mapping);
151148
151183
  let mappingId;
151149
- if (_optionalChain([importData, 'access', _96 => _96.sync, 'optionalAccess', _97 => _97.mappings, 'optionalAccess', _98 => _98.length]) > 0) {
151184
+ if (_optionalChain([importData, 'access', _100 => _100.sync, 'optionalAccess', _101 => _101.mappings, 'optionalAccess', _102 => _102.length]) > 0) {
151150
151185
  mappingId = importData.sync.mappings[0]._id;
151151
151186
  } else if (mappingIds.length > 0) {
151152
151187
  mappingId = mappingIds[0];
@@ -152930,7 +152965,7 @@ async function getFeatures2({
152930
152965
  const { result: result2 } = await getFeatures({ state: state2 });
152931
152966
  state2.setFeatures(JSON.parse(JSON.stringify(result2)));
152932
152967
  } catch (error2) {
152933
- debugMessage({ message: _optionalChain([error2, 'access', _99 => _99.response, 'optionalAccess', _100 => _100.data]), state: state2 });
152968
+ debugMessage({ message: _optionalChain([error2, 'access', _103 => _103.response, 'optionalAccess', _104 => _104.data]), state: state2 });
152934
152969
  state2.setFeatures([]);
152935
152970
  }
152936
152971
  return state2.getFeatures();
@@ -154452,7 +154487,7 @@ async function determineDeploymentType(state2) {
154452
154487
  state: state2
154453
154488
  });
154454
154489
  } catch (e) {
154455
- if (_optionalChain([e, 'access', _101 => _101.response, 'optionalAccess', _102 => _102.status]) === 302 && _optionalChain([e, 'access', _103 => _103.response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105.location, 'optionalAccess', _106 => _106.indexOf, 'call', _107 => _107("code=")]) > -1) {
154490
+ if (_optionalChain([e, 'access', _105 => _105.response, 'optionalAccess', _106 => _106.status]) === 302 && _optionalChain([e, 'access', _107 => _107.response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109.location, 'optionalAccess', _110 => _110.indexOf, 'call', _111 => _111("code=")]) > -1) {
154456
154491
  verboseMessage({
154457
154492
  message: `ForgeRock Identity Cloud`["brightCyan"] + ` detected.`,
154458
154493
  state: state2
@@ -154468,7 +154503,7 @@ async function determineDeploymentType(state2) {
154468
154503
  state: state2
154469
154504
  });
154470
154505
  } catch (ex) {
154471
- if (_optionalChain([ex, 'access', _108 => _108.response, 'optionalAccess', _109 => _109.status]) === 302 && _optionalChain([ex, 'access', _110 => _110.response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112.location, 'optionalAccess', _113 => _113.indexOf, 'call', _114 => _114("code=")]) > -1) {
154506
+ if (_optionalChain([ex, 'access', _112 => _112.response, 'optionalAccess', _113 => _113.status]) === 302 && _optionalChain([ex, 'access', _114 => _114.response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116.location, 'optionalAccess', _117 => _117.indexOf, 'call', _118 => _118("code=")]) > -1) {
154472
154507
  adminClientId = forgeopsClientId;
154473
154508
  verboseMessage({
154474
154509
  message: `ForgeOps deployment`["brightCyan"] + ` detected.`,
@@ -154616,7 +154651,7 @@ async function getAuthCode(redirectURL, codeChallenge, codeChallengeMethod, stat
154616
154651
  throw error2;
154617
154652
  }
154618
154653
  }
154619
- const redirectLocationURL = _optionalChain([response2, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116.location]);
154654
+ const redirectLocationURL = _optionalChain([response2, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120.location]);
154620
154655
  const queryObject = _url2.default.parse(redirectLocationURL, true).query;
154621
154656
  if ("code" in queryObject) {
154622
154657
  return queryObject.code;
@@ -154751,7 +154786,7 @@ async function getFreshSaBearerToken({
154751
154786
  });
154752
154787
  } catch (error2) {
154753
154788
  const err = error2;
154754
- if (err.isHttpError && err.httpErrorText === "invalid_scope" && _optionalChain([err, 'access', _117 => _117.httpDescription, 'optionalAccess', _118 => _118.startsWith, 'call', _119 => _119("Unsupported scope for service account: ")])) {
154789
+ if (err.isHttpError && err.httpErrorText === "invalid_scope" && _optionalChain([err, 'access', _121 => _121.httpDescription, 'optionalAccess', _122 => _122.startsWith, 'call', _123 => _123("Unsupported scope for service account: ")])) {
154755
154790
  const invalidScopes = err.httpDescription.substring(39).split(",");
154756
154791
  const finalScopes = scope.split(" ").filter((el) => {
154757
154792
  return !invalidScopes.includes(el);
@@ -154868,9 +154903,9 @@ function scheduleAutoRefresh(forceLoginAsUser, autoRefresh, state2) {
154868
154903
  clearTimeout(timer);
154869
154904
  }
154870
154905
  if (autoRefresh) {
154871
- const expires = state2.getDeploymentType() === Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY ? _optionalChain([state2, 'access', _120 => _120.getUserSessionTokenMeta, 'call', _121 => _121(), 'optionalAccess', _122 => _122.expires]) : state2.getUseBearerTokenForAmApis() ? _optionalChain([state2, 'access', _123 => _123.getBearerTokenMeta, 'call', _124 => _124(), 'optionalAccess', _125 => _125.expires]) : Math.min(
154872
- _optionalChain([state2, 'access', _126 => _126.getBearerTokenMeta, 'call', _127 => _127(), 'optionalAccess', _128 => _128.expires]),
154873
- _optionalChain([state2, 'access', _129 => _129.getUserSessionTokenMeta, 'call', _130 => _130(), 'optionalAccess', _131 => _131.expires])
154906
+ const expires = state2.getDeploymentType() === Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY ? _optionalChain([state2, 'access', _124 => _124.getUserSessionTokenMeta, 'call', _125 => _125(), 'optionalAccess', _126 => _126.expires]) : state2.getUseBearerTokenForAmApis() ? _optionalChain([state2, 'access', _127 => _127.getBearerTokenMeta, 'call', _128 => _128(), 'optionalAccess', _129 => _129.expires]) : Math.min(
154907
+ _optionalChain([state2, 'access', _130 => _130.getBearerTokenMeta, 'call', _131 => _131(), 'optionalAccess', _132 => _132.expires]),
154908
+ _optionalChain([state2, 'access', _133 => _133.getUserSessionTokenMeta, 'call', _134 => _134(), 'optionalAccess', _135 => _135.expires])
154874
154909
  );
154875
154910
  let timeout4 = expires - Date.now() - 1e3 * 25;
154876
154911
  if (timeout4 < 1e3 * 30) {
@@ -154992,10 +155027,10 @@ async function getTokens({
154992
155027
  throw new FrodoError(`Incomplete or no credentials`);
154993
155028
  }
154994
155029
  if (state2.getCookieValue() || state2.getUseBearerTokenForAmApis() && state2.getBearerToken()) {
154995
- if (_optionalChain([state2, 'access', _132 => _132.getBearerTokenMeta, 'call', _133 => _133(), 'optionalAccess', _134 => _134.from_cache])) {
155030
+ if (_optionalChain([state2, 'access', _136 => _136.getBearerTokenMeta, 'call', _137 => _137(), 'optionalAccess', _138 => _138.from_cache])) {
154996
155031
  verboseMessage({ message: `Using cached bearer token.`, state: state2 });
154997
155032
  }
154998
- if (!state2.getUseBearerTokenForAmApis() && _optionalChain([state2, 'access', _135 => _135.getUserSessionTokenMeta, 'call', _136 => _136(), 'optionalAccess', _137 => _137.from_cache])) {
155033
+ if (!state2.getUseBearerTokenForAmApis() && _optionalChain([state2, 'access', _139 => _139.getUserSessionTokenMeta, 'call', _140 => _140(), 'optionalAccess', _141 => _141.from_cache])) {
154999
155034
  verboseMessage({ message: `Using cached session token.`, state: state2 });
155000
155035
  }
155001
155036
  scheduleAutoRefresh(forceLoginAsUser, autoRefresh, state2);
@@ -155402,7 +155437,7 @@ async function updateAdminFederationProvider({
155402
155437
  });
155403
155438
  return response2;
155404
155439
  } catch (importError) {
155405
- if (_optionalChain([importError, 'access', _138 => _138.response, 'optionalAccess', _139 => _139.status]) === 400 && _optionalChain([importError, 'access', _140 => _140.response, 'optionalAccess', _141 => _141.data, 'optionalAccess', _142 => _142.message]) === "Invalid attribute specified.") {
155440
+ if (_optionalChain([importError, 'access', _142 => _142.response, 'optionalAccess', _143 => _143.status]) === 400 && _optionalChain([importError, 'access', _144 => _144.response, 'optionalAccess', _145 => _145.data, 'optionalAccess', _146 => _146.message]) === "Invalid attribute specified.") {
155406
155441
  const { validAttributes } = importError.response.data.detail;
155407
155442
  validAttributes.push("_id", "_type");
155408
155443
  for (const attribute of Object.keys(providerData)) {
@@ -157578,7 +157613,7 @@ async function checkForUpdates({
157578
157613
  state: state2
157579
157614
  });
157580
157615
  }
157581
- const updateCount = _optionalChain([updates, 'access', _143 => _143.secrets, 'optionalAccess', _144 => _144.length]) + _optionalChain([updates, 'access', _145 => _145.variables, 'optionalAccess', _146 => _146.length]) || 0;
157616
+ const updateCount = _optionalChain([updates, 'access', _147 => _147.secrets, 'optionalAccess', _148 => _148.length]) + _optionalChain([updates, 'access', _149 => _149.variables, 'optionalAccess', _150 => _150.length]) || 0;
157582
157617
  if (updateCount > 0) {
157583
157618
  stopProgressIndicator({
157584
157619
  id: indicatorId,
@@ -157671,7 +157706,7 @@ async function applyUpdates({
157671
157706
  } catch (error2) {
157672
157707
  stopProgressIndicator({
157673
157708
  id: indicatorId,
157674
- message: `Error: ${_optionalChain([error2, 'access', _147 => _147.response, 'optionalAccess', _148 => _148.data, 'optionalAccess', _149 => _149.code]) || error2} - ${_optionalChain([error2, 'access', _150 => _150.response, 'optionalAccess', _151 => _151.data, 'optionalAccess', _152 => _152.message])}`,
157709
+ message: `Error: ${_optionalChain([error2, 'access', _151 => _151.response, 'optionalAccess', _152 => _152.data, 'optionalAccess', _153 => _153.code]) || error2} - ${_optionalChain([error2, 'access', _154 => _154.response, 'optionalAccess', _155 => _155.data, 'optionalAccess', _156 => _156.message])}`,
157675
157710
  status: "fail",
157676
157711
  state: state2
157677
157712
  });
@@ -158190,7 +158225,7 @@ async function updateSocialIdentityProvider({
158190
158225
  });
158191
158226
  return response2;
158192
158227
  } catch (error2) {
158193
- if (_optionalChain([error2, 'access', _153 => _153.response, 'optionalAccess', _154 => _154.status]) === 400 && _optionalChain([error2, 'access', _155 => _155.response, 'optionalAccess', _156 => _156.data, 'optionalAccess', _157 => _157.message]) === "Invalid attribute specified.") {
158228
+ if (_optionalChain([error2, 'access', _157 => _157.response, 'optionalAccess', _158 => _158.status]) === 400 && _optionalChain([error2, 'access', _159 => _159.response, 'optionalAccess', _160 => _160.data, 'optionalAccess', _161 => _161.message]) === "Invalid attribute specified.") {
158194
158229
  const { validAttributes } = error2.response.data.detail;
158195
158230
  validAttributes.push("_id", "_type");
158196
158231
  for (const attribute of Object.keys(providerData)) {
@@ -160208,7 +160243,7 @@ async function getSaml2NodeDependencies(nodeObject, allProviders, allCirclesOfTr
160208
160243
  }
160209
160244
  saml2EntityPromises.push(providerResponse);
160210
160245
  } catch (error2) {
160211
- error2.message = `Error reading saml2 dependencies: ${_optionalChain([error2, 'access', _158 => _158.response, 'optionalAccess', _159 => _159.data, 'optionalAccess', _160 => _160.message]) || error2.message}`;
160246
+ error2.message = `Error reading saml2 dependencies: ${_optionalChain([error2, 'access', _162 => _162.response, 'optionalAccess', _163 => _163.data, 'optionalAccess', _164 => _164.message]) || error2.message}`;
160212
160247
  errors.push(error2);
160213
160248
  }
160214
160249
  }
@@ -160237,7 +160272,7 @@ async function getSaml2NodeDependencies(nodeObject, allProviders, allCirclesOfTr
160237
160272
  circlesOfTrust
160238
160273
  };
160239
160274
  } catch (error2) {
160240
- error2.message = `Error reading saml2 dependencies: ${_optionalChain([error2, 'access', _161 => _161.response, 'optionalAccess', _162 => _162.data, 'optionalAccess', _163 => _163.message]) || error2.message}`;
160275
+ error2.message = `Error reading saml2 dependencies: ${_optionalChain([error2, 'access', _165 => _165.response, 'optionalAccess', _166 => _166.data, 'optionalAccess', _167 => _167.message]) || error2.message}`;
160241
160276
  errors.push(error2);
160242
160277
  }
160243
160278
  if (errors.length) {
@@ -160348,7 +160383,7 @@ async function exportJourney({
160348
160383
  });
160349
160384
  emailTemplatePromises.push(emailTemplate);
160350
160385
  } catch (error2) {
160351
- error2.message = `Error reading email template ${nodeObject.emailTemplateName}: ${_optionalChain([error2, 'access', _164 => _164.response, 'optionalAccess', _165 => _165.data, 'optionalAccess', _166 => _166.message]) || error2.message}`;
160386
+ error2.message = `Error reading email template ${nodeObject.emailTemplateName}: ${_optionalChain([error2, 'access', _168 => _168.response, 'optionalAccess', _169 => _169.data, 'optionalAccess', _170 => _170.message]) || error2.message}`;
160352
160387
  errors.push(error2);
160353
160388
  }
160354
160389
  }
@@ -160644,7 +160679,7 @@ async function exportJourney({
160644
160679
  for (const themeObject of themePromiseResults) {
160645
160680
  if (themeObject && // has the theme been specified by id or name in a page node?
160646
160681
  (themes.includes(themeObject._id) || themes.includes(themeObject.name) || // has this journey been linked to a theme?
160647
- _optionalChain([themeObject, 'access', _167 => _167.linkedTrees, 'optionalAccess', _168 => _168.includes, 'call', _169 => _169(treeObject._id)]))) {
160682
+ _optionalChain([themeObject, 'access', _171 => _171.linkedTrees, 'optionalAccess', _172 => _172.includes, 'call', _173 => _173(treeObject._id)]))) {
160648
160683
  if (verbose)
160649
160684
  printMessage({
160650
160685
  message: `
@@ -160927,7 +160962,7 @@ async function importJourney({
160927
160962
  state: state2
160928
160963
  });
160929
160964
  } catch (error2) {
160930
- if (_optionalChain([error2, 'access', _170 => _170.response, 'optionalAccess', _171 => _171.status]) === 500 && _optionalChain([error2, 'access', _172 => _172.response, 'optionalAccess', _173 => _173.data, 'optionalAccess', _174 => _174.message]) === "Unable to update SMS config: Data validation failed for the attribute, Redirect after form post URL") {
160965
+ if (_optionalChain([error2, 'access', _174 => _174.response, 'optionalAccess', _175 => _175.status]) === 500 && _optionalChain([error2, 'access', _176 => _176.response, 'optionalAccess', _177 => _177.data, 'optionalAccess', _178 => _178.message]) === "Unable to update SMS config: Data validation failed for the attribute, Redirect after form post URL") {
160931
160966
  providerData["redirectAfterFormPostURI"] = "";
160932
160967
  try {
160933
160968
  await putProviderByTypeAndId2({
@@ -161038,7 +161073,7 @@ async function importJourney({
161038
161073
  try {
161039
161074
  await createCircleOfTrust({ cotData, state: state2 });
161040
161075
  } catch (error2) {
161041
- if (_optionalChain([error2, 'access', _175 => _175.response, 'optionalAccess', _176 => _176.status]) === 409 || _optionalChain([error2, 'access', _177 => _177.response, 'optionalAccess', _178 => _178.status]) === 500) {
161076
+ if (_optionalChain([error2, 'access', _179 => _179.response, 'optionalAccess', _180 => _180.status]) === 409 || _optionalChain([error2, 'access', _181 => _181.response, 'optionalAccess', _182 => _182.status]) === 500) {
161042
161077
  try {
161043
161078
  await updateCircleOfTrust({ cotId, cotData, state: state2 });
161044
161079
  } catch (updateCotErr) {
@@ -161125,14 +161160,14 @@ async function importJourney({
161125
161160
  state: state2
161126
161161
  });
161127
161162
  } catch (nodeImportError) {
161128
- if (_optionalChain([nodeImportError, 'access', _179 => _179.response, 'optionalAccess', _180 => _180.status]) === 400 && _optionalChain([nodeImportError, 'access', _181 => _181.response, 'optionalAccess', _182 => _182.data, 'optionalAccess', _183 => _183.message]) === "Data validation failed for the attribute, Script") {
161163
+ if (_optionalChain([nodeImportError, 'access', _183 => _183.response, 'optionalAccess', _184 => _184.status]) === 400 && _optionalChain([nodeImportError, 'access', _185 => _185.response, 'optionalAccess', _186 => _186.data, 'optionalAccess', _187 => _187.message]) === "Data validation failed for the attribute, Script") {
161129
161164
  errors.push(
161130
161165
  new FrodoError(
161131
161166
  `Missing script ${innerNodeData["script"]} referenced by inner node ${innerNodeId}${innerNodeId === newUuid ? "" : ` [${newUuid}]`} (${innerNodeData["_type"]["_id"]}) in journey ${treeId}`,
161132
161167
  nodeImportError
161133
161168
  )
161134
161169
  );
161135
- } else if (_optionalChain([nodeImportError, 'access', _184 => _184.response, 'optionalAccess', _185 => _185.status]) === 400 && _optionalChain([nodeImportError, 'access', _186 => _186.response, 'optionalAccess', _187 => _187.data, 'optionalAccess', _188 => _188.message]) === "Invalid attribute specified.") {
161170
+ } else if (_optionalChain([nodeImportError, 'access', _188 => _188.response, 'optionalAccess', _189 => _189.status]) === 400 && _optionalChain([nodeImportError, 'access', _190 => _190.response, 'optionalAccess', _191 => _191.data, 'optionalAccess', _192 => _192.message]) === "Invalid attribute specified.") {
161136
161171
  const { validAttributes } = nodeImportError.response.data.detail;
161137
161172
  validAttributes.push("_id");
161138
161173
  for (const attribute of Object.keys(innerNodeData)) {
@@ -161235,14 +161270,14 @@ async function importJourney({
161235
161270
  try {
161236
161271
  await putNode({ nodeId: newUuid, nodeType, nodeData, state: state2 });
161237
161272
  } catch (nodeImportError) {
161238
- if (_optionalChain([nodeImportError, 'access', _189 => _189.response, 'optionalAccess', _190 => _190.status]) === 400 && _optionalChain([nodeImportError, 'access', _191 => _191.response, 'optionalAccess', _192 => _192.data, 'optionalAccess', _193 => _193.message]) === "Data validation failed for the attribute, Script") {
161273
+ if (_optionalChain([nodeImportError, 'access', _193 => _193.response, 'optionalAccess', _194 => _194.status]) === 400 && _optionalChain([nodeImportError, 'access', _195 => _195.response, 'optionalAccess', _196 => _196.data, 'optionalAccess', _197 => _197.message]) === "Data validation failed for the attribute, Script") {
161239
161274
  errors.push(
161240
161275
  new FrodoError(
161241
161276
  `Missing script ${nodeData["script"]} referenced by node ${nodeId}${nodeId === newUuid ? "" : ` [${newUuid}]`} (${nodeData["_type"]["_id"]}) in journey ${treeId}`,
161242
161277
  nodeImportError
161243
161278
  )
161244
161279
  );
161245
- } else if (_optionalChain([nodeImportError, 'access', _194 => _194.response, 'optionalAccess', _195 => _195.status]) === 400 && _optionalChain([nodeImportError, 'access', _196 => _196.response, 'optionalAccess', _197 => _197.data, 'optionalAccess', _198 => _198.message]) === "Invalid attribute specified.") {
161280
+ } else if (_optionalChain([nodeImportError, 'access', _198 => _198.response, 'optionalAccess', _199 => _199.status]) === 400 && _optionalChain([nodeImportError, 'access', _200 => _200.response, 'optionalAccess', _201 => _201.data, 'optionalAccess', _202 => _202.message]) === "Invalid attribute specified.") {
161246
161281
  const { validAttributes } = nodeImportError.response.data.detail;
161247
161282
  validAttributes.push("_id");
161248
161283
  for (const attribute of Object.keys(nodeData)) {
@@ -161329,7 +161364,7 @@ async function importJourney({
161329
161364
  state: state2
161330
161365
  });
161331
161366
  } catch (importError) {
161332
- if (_optionalChain([importError, 'access', _199 => _199.response, 'optionalAccess', _200 => _200.status]) === 400 && _optionalChain([importError, 'access', _201 => _201.response, 'optionalAccess', _202 => _202.data, 'optionalAccess', _203 => _203.message]) === "Invalid attribute specified.") {
161367
+ if (_optionalChain([importError, 'access', _203 => _203.response, 'optionalAccess', _204 => _204.status]) === 400 && _optionalChain([importError, 'access', _205 => _205.response, 'optionalAccess', _206 => _206.data, 'optionalAccess', _207 => _207.message]) === "Invalid attribute specified.") {
161333
161368
  const { validAttributes } = importError.response.data.detail;
161334
161369
  validAttributes.push("_id");
161335
161370
  for (const attribute of Object.keys(importData.tree)) {
@@ -161538,7 +161573,7 @@ var fileByIdTreeExportResolver = async function(treeId, state2) {
161538
161573
  message: `fileByIdTreeExportResolver: resolved '${treeId}' to ${file}`,
161539
161574
  state: state2
161540
161575
  });
161541
- if (_optionalChain([jsonData, 'access', _204 => _204.tree, 'optionalAccess', _205 => _205._id]) === treeId) {
161576
+ if (_optionalChain([jsonData, 'access', _208 => _208.tree, 'optionalAccess', _209 => _209._id]) === treeId) {
161542
161577
  treeExport = jsonData;
161543
161578
  } else if (jsonData.trees && jsonData.trees[treeId]) {
161544
161579
  treeExport = jsonData.trees[treeId];
@@ -161557,7 +161592,7 @@ function createFileParamTreeExportResolver(file, state2) {
161557
161592
  let treeExport = createSingleTreeExportTemplate({ state: state2 });
161558
161593
  try {
161559
161594
  const jsonData = JSON.parse(_fs3.default.readFileSync(file, "utf8"));
161560
- if (_optionalChain([jsonData, 'access', _206 => _206.tree, 'optionalAccess', _207 => _207._id]) === treeId) {
161595
+ if (_optionalChain([jsonData, 'access', _210 => _210.tree, 'optionalAccess', _211 => _211._id]) === treeId) {
161561
161596
  treeExport = jsonData;
161562
161597
  } else if (jsonData.trees && jsonData.trees[treeId]) {
161563
161598
  treeExport = jsonData.trees[treeId];
@@ -161782,7 +161817,7 @@ async function deleteJourney({
161782
161817
  });
161783
161818
  return response2;
161784
161819
  }).catch((error2) => {
161785
- if (_optionalChain([error2, 'optionalAccess', _208 => _208.response, 'optionalAccess', _209 => _209.data, 'optionalAccess', _210 => _210.code]) === 500 && error2.response.data.message === "Unable to read SMS config: Node did not exist") {
161820
+ if (_optionalChain([error2, 'optionalAccess', _212 => _212.response, 'optionalAccess', _213 => _213.data, 'optionalAccess', _214 => _214.code]) === 500 && error2.response.data.message === "Unable to read SMS config: Node did not exist") {
161786
161821
  status.nodes[containerNode._id] = { status: "success" };
161787
161822
  if (verbose)
161788
161823
  printMessage({
@@ -162774,7 +162809,7 @@ async function importPolicySet({
162774
162809
  response2 = await createPolicySet({ policySetData, state: state2 });
162775
162810
  imported.push(id7);
162776
162811
  } catch (error2) {
162777
- if (_optionalChain([error2, 'access', _211 => _211.response, 'optionalAccess', _212 => _212.status]) === 409) {
162812
+ if (_optionalChain([error2, 'access', _215 => _215.response, 'optionalAccess', _216 => _216.status]) === 409) {
162778
162813
  response2 = await updatePolicySet({ policySetData, state: state2 });
162779
162814
  imported.push(id7);
162780
162815
  } else throw error2;
@@ -162833,7 +162868,7 @@ async function importFirstPolicySet({
162833
162868
  response2 = await createPolicySet({ policySetData, state: state2 });
162834
162869
  imported.push(id7);
162835
162870
  } catch (error2) {
162836
- if (_optionalChain([error2, 'access', _213 => _213.response, 'optionalAccess', _214 => _214.status]) === 409) {
162871
+ if (_optionalChain([error2, 'access', _217 => _217.response, 'optionalAccess', _218 => _218.status]) === 409) {
162837
162872
  response2 = await updatePolicySet({ policySetData, state: state2 });
162838
162873
  imported.push(id7);
162839
162874
  } else throw error2;
@@ -162887,7 +162922,7 @@ async function importPolicySets({
162887
162922
  try {
162888
162923
  response2 = await createPolicySet({ policySetData, state: state2 });
162889
162924
  } catch (error2) {
162890
- if (_optionalChain([error2, 'access', _215 => _215.response, 'optionalAccess', _216 => _216.status]) === 409) {
162925
+ if (_optionalChain([error2, 'access', _219 => _219.response, 'optionalAccess', _220 => _220.status]) === 409) {
162891
162926
  response2 = await updatePolicySet({ policySetData, state: state2 });
162892
162927
  } else throw error2;
162893
162928
  }
@@ -163105,7 +163140,7 @@ async function exportResourceType({
163105
163140
  debugMessage({ message: `ResourceTypeOps.exportResourceType: end`, state: state2 });
163106
163141
  return exportData;
163107
163142
  } catch (error2) {
163108
- if (_optionalChain([error2, 'access', _217 => _217.response, 'optionalAccess', _218 => _218.status]) === 404) {
163143
+ if (_optionalChain([error2, 'access', _221 => _221.response, 'optionalAccess', _222 => _222.status]) === 404) {
163109
163144
  throw new FrodoError(
163110
163145
  `Resource type ${resourceTypeUuid} does not exist`,
163111
163146
  error2
@@ -163199,7 +163234,7 @@ async function importResourceType({
163199
163234
  try {
163200
163235
  response2 = await createResourceType({ resourceTypeData, state: state2 });
163201
163236
  } catch (createError) {
163202
- if (_optionalChain([createError, 'access', _219 => _219.response, 'optionalAccess', _220 => _220.status]) === 409)
163237
+ if (_optionalChain([createError, 'access', _223 => _223.response, 'optionalAccess', _224 => _224.status]) === 409)
163203
163238
  response2 = await putResourceType({
163204
163239
  resourceTypeUuid: id7,
163205
163240
  resourceTypeData,
@@ -163242,7 +163277,7 @@ async function importResourceTypeByName({
163242
163277
  try {
163243
163278
  response2 = await createResourceType({ resourceTypeData, state: state2 });
163244
163279
  } catch (createError) {
163245
- if (_optionalChain([createError, 'access', _221 => _221.response, 'optionalAccess', _222 => _222.status]) === 409)
163280
+ if (_optionalChain([createError, 'access', _225 => _225.response, 'optionalAccess', _226 => _226.status]) === 409)
163246
163281
  response2 = await putResourceType({
163247
163282
  resourceTypeUuid: id7,
163248
163283
  resourceTypeData,
@@ -163284,7 +163319,7 @@ async function importFirstResourceType({
163284
163319
  try {
163285
163320
  response2 = await createResourceType({ resourceTypeData, state: state2 });
163286
163321
  } catch (createError) {
163287
- if (_optionalChain([createError, 'access', _223 => _223.response, 'optionalAccess', _224 => _224.status]) === 409)
163322
+ if (_optionalChain([createError, 'access', _227 => _227.response, 'optionalAccess', _228 => _228.status]) === 409)
163288
163323
  response2 = await putResourceType({
163289
163324
  resourceTypeUuid: id7,
163290
163325
  resourceTypeData,
@@ -163319,7 +163354,7 @@ async function importResourceTypes({
163319
163354
  try {
163320
163355
  response2.push(await createResourceType({ resourceTypeData, state: state2 }));
163321
163356
  } catch (createError) {
163322
- if (_optionalChain([createError, 'access', _225 => _225.response, 'optionalAccess', _226 => _226.status]) === 409)
163357
+ if (_optionalChain([createError, 'access', _229 => _229.response, 'optionalAccess', _230 => _230.status]) === 409)
163323
163358
  response2.push(
163324
163359
  await putResourceType({
163325
163360
  resourceTypeUuid: id7,
@@ -164408,8 +164443,8 @@ async function getFullServices({
164408
164443
  nextDescendents
164409
164444
  };
164410
164445
  } catch (error2) {
164411
- if (!(_optionalChain([error2, 'access', _227 => _227.response, 'optionalAccess', _228 => _228.status]) === 403 && _optionalChain([error2, 'access', _229 => _229.response, 'optionalAccess', _230 => _230.data, 'optionalAccess', _231 => _231.message]) === "This operation is not available in ForgeRock Identity Cloud.")) {
164412
- const message = _optionalChain([error2, 'access', _232 => _232.response, 'optionalAccess', _233 => _233.data, 'optionalAccess', _234 => _234.message]);
164446
+ if (!(_optionalChain([error2, 'access', _231 => _231.response, 'optionalAccess', _232 => _232.status]) === 403 && _optionalChain([error2, 'access', _233 => _233.response, 'optionalAccess', _234 => _234.data, 'optionalAccess', _235 => _235.message]) === "This operation is not available in ForgeRock Identity Cloud.")) {
164447
+ const message = _optionalChain([error2, 'access', _236 => _236.response, 'optionalAccess', _237 => _237.data, 'optionalAccess', _238 => _238.message]);
164413
164448
  printMessage({
164414
164449
  message: `Unable to retrieve data for ${listItem._id} with error: ${message}`,
164415
164450
  type: "error",
@@ -164440,6 +164475,7 @@ async function putFullService({
164440
164475
  message: `ServiceOps.putFullService: start, serviceId=${serviceId}, globalConfig=${globalConfig}`,
164441
164476
  state: state2
164442
164477
  });
164478
+ const fullServiceDataCopy = cloneDeep(fullServiceData);
164443
164479
  const nextDescendents = fullServiceData.nextDescendents;
164444
164480
  delete fullServiceData.nextDescendents;
164445
164481
  delete fullServiceData._rev;
@@ -164449,7 +164485,7 @@ async function putFullService({
164449
164485
  debugMessage({ message: `ServiceOps.putFullService: clean`, state: state2 });
164450
164486
  await deleteFullService({ serviceId, globalConfig, state: state2 });
164451
164487
  } catch (error2) {
164452
- if (!(_optionalChain([error2, 'access', _235 => _235.response, 'optionalAccess', _236 => _236.status]) === 404 && _optionalChain([error2, 'access', _237 => _237.response, 'optionalAccess', _238 => _238.data, 'optionalAccess', _239 => _239.message]) === "Not Found")) {
164488
+ if (!(_optionalChain([error2, 'access', _239 => _239.response, 'optionalAccess', _240 => _240.status]) === 404 && _optionalChain([error2, 'access', _241 => _241.response, 'optionalAccess', _242 => _242.data, 'optionalAccess', _243 => _243.message]) === "Not Found")) {
164453
164489
  throw new FrodoError(
164454
164490
  `Error deleting service '${serviceId}' before import`,
164455
164491
  error2
@@ -164458,7 +164494,10 @@ async function putFullService({
164458
164494
  }
164459
164495
  }
164460
164496
  delete fullServiceData.location;
164461
- const result2 = await putService({
164497
+ if (serviceId === "email" && fullServiceData.transportType) {
164498
+ delete fullServiceData.transportType;
164499
+ }
164500
+ let result2 = await putService({
164462
164501
  serviceId,
164463
164502
  serviceData: fullServiceData,
164464
164503
  globalConfig,
@@ -164498,6 +164537,15 @@ async function putFullService({
164498
164537
  return result22;
164499
164538
  })
164500
164539
  );
164540
+ if (serviceId === "email" && fullServiceDataCopy.transportType) {
164541
+ fullServiceData.transportType = fullServiceDataCopy.transportType;
164542
+ result2 = await putService({
164543
+ serviceId,
164544
+ serviceData: fullServiceData,
164545
+ globalConfig,
164546
+ state: state2
164547
+ });
164548
+ }
164501
164549
  result2.nextDescendents = nextDescendentResult;
164502
164550
  debugMessage({
164503
164551
  message: `ServiceOps.putFullService: end (w/ descendents)`,
@@ -164614,8 +164662,8 @@ async function deleteFullServices({
164614
164662
  state: state2
164615
164663
  });
164616
164664
  } catch (error2) {
164617
- if (!(_optionalChain([error2, 'access', _240 => _240.response, 'optionalAccess', _241 => _241.status]) === 403 && _optionalChain([error2, 'access', _242 => _242.response, 'optionalAccess', _243 => _243.data, 'optionalAccess', _244 => _244.message]) === "This operation is not available in ForgeRock Identity Cloud.")) {
164618
- const message = _optionalChain([error2, 'access', _245 => _245.response, 'optionalAccess', _246 => _246.data, 'optionalAccess', _247 => _247.message]);
164665
+ if (!(_optionalChain([error2, 'access', _244 => _244.response, 'optionalAccess', _245 => _245.status]) === 403 && _optionalChain([error2, 'access', _246 => _246.response, 'optionalAccess', _247 => _247.data, 'optionalAccess', _248 => _248.message]) === "This operation is not available in ForgeRock Identity Cloud.")) {
164666
+ const message = _optionalChain([error2, 'access', _249 => _249.response, 'optionalAccess', _250 => _250.data, 'optionalAccess', _251 => _251.message]);
164619
164667
  printMessage({
164620
164668
  message: `Delete service '${serviceListItem._id}': ${message}`,
164621
164669
  state: state2,
@@ -164863,22 +164911,22 @@ async function exportFullConfiguration({
164863
164911
  stateObj,
164864
164912
  errors,
164865
164913
  isPlatformDeployment
164866
- )), 'optionalAccess', async _248 => _248.emailTemplate]),
164914
+ )), 'optionalAccess', async _252 => _252.emailTemplate]),
164867
164915
  idm: await _asyncOptionalChain([(await exportWithErrorHandling(
164868
164916
  exportConfigEntities,
164869
164917
  stateObj,
164870
164918
  errors,
164871
164919
  isPlatformDeployment
164872
- )), 'optionalAccess', async _249 => _249.idm]),
164873
- mapping: _optionalChain([mappings, 'optionalAccess', _250 => _250.mapping]),
164920
+ )), 'optionalAccess', async _253 => _253.idm]),
164921
+ mapping: _optionalChain([mappings, 'optionalAccess', _254 => _254.mapping]),
164874
164922
  secrets: await _asyncOptionalChain([(await exportWithErrorHandling(
164875
164923
  exportSecrets,
164876
164924
  { options: { includeActiveValues, target }, state: state2 },
164877
164925
  errors,
164878
164926
  isCloudDeployment
164879
- )), 'optionalAccess', async _251 => _251.secrets]),
164880
- service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, globalStateObj, errors)), 'optionalAccess', async _252 => _252.service]),
164881
- sync: _optionalChain([mappings, 'optionalAccess', _253 => _253.sync]),
164927
+ )), 'optionalAccess', async _255 => _255.secrets]),
164928
+ service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, globalStateObj, errors)), 'optionalAccess', async _256 => _256.service]),
164929
+ sync: _optionalChain([mappings, 'optionalAccess', _257 => _257.sync]),
164882
164930
  variables: await _asyncOptionalChain([(await exportWithErrorHandling(
164883
164931
  exportVariables,
164884
164932
  {
@@ -164887,7 +164935,7 @@ async function exportFullConfiguration({
164887
164935
  },
164888
164936
  errors,
164889
164937
  isCloudDeployment
164890
- )), 'optionalAccess', async _254 => _254.variables])
164938
+ )), 'optionalAccess', async _258 => _258.variables])
164891
164939
  };
164892
164940
  const realmConfig = {};
164893
164941
  const currentRealm = state2.getRealm();
@@ -164897,19 +164945,19 @@ async function exportFullConfiguration({
164897
164945
  exportSaml2Providers,
164898
164946
  stateObj,
164899
164947
  errors
164900
- )), 'optionalAccess', async _255 => _255.saml]);
164948
+ )), 'optionalAccess', async _259 => _259.saml]);
164901
164949
  const cotExport = await exportWithErrorHandling(
164902
164950
  exportCirclesOfTrust,
164903
164951
  stateObj,
164904
164952
  errors
164905
164953
  );
164906
164954
  if (saml) {
164907
- saml.cot = _optionalChain([cotExport, 'optionalAccess', _256 => _256.saml, 'access', _257 => _257.cot]);
164955
+ saml.cot = _optionalChain([cotExport, 'optionalAccess', _260 => _260.saml, 'access', _261 => _261.cot]);
164908
164956
  } else {
164909
- saml = _optionalChain([cotExport, 'optionalAccess', _258 => _258.saml]);
164957
+ saml = _optionalChain([cotExport, 'optionalAccess', _262 => _262.saml]);
164910
164958
  }
164911
164959
  realmConfig[realm2] = {
164912
- agents: await _asyncOptionalChain([(await exportWithErrorHandling(exportAgents, realmStateObj, errors)), 'optionalAccess', async _259 => _259.agents]),
164960
+ agents: await _asyncOptionalChain([(await exportWithErrorHandling(exportAgents, realmStateObj, errors)), 'optionalAccess', async _263 => _263.agents]),
164913
164961
  application: await _asyncOptionalChain([(await exportWithErrorHandling(
164914
164962
  exportOAuth2Clients,
164915
164963
  {
@@ -164917,17 +164965,17 @@ async function exportFullConfiguration({
164917
164965
  state: state2
164918
164966
  },
164919
164967
  errors
164920
- )), 'optionalAccess', async _260 => _260.application]),
164968
+ )), 'optionalAccess', async _264 => _264.application]),
164921
164969
  authentication: await _asyncOptionalChain([(await exportWithErrorHandling(
164922
164970
  exportAuthenticationSettings,
164923
164971
  realmStateObj,
164924
164972
  errors
164925
- )), 'optionalAccess', async _261 => _261.authentication]),
164973
+ )), 'optionalAccess', async _265 => _265.authentication]),
164926
164974
  idp: await _asyncOptionalChain([(await exportWithErrorHandling(
164927
164975
  exportSocialIdentityProviders,
164928
164976
  stateObj,
164929
164977
  errors
164930
- )), 'optionalAccess', async _262 => _262.idp]),
164978
+ )), 'optionalAccess', async _266 => _266.idp]),
164931
164979
  managedApplication: await _asyncOptionalChain([(await exportWithErrorHandling(
164932
164980
  exportApplications,
164933
164981
  {
@@ -164936,7 +164984,7 @@ async function exportFullConfiguration({
164936
164984
  },
164937
164985
  errors,
164938
164986
  isPlatformDeployment
164939
- )), 'optionalAccess', async _263 => _263.managedApplication]),
164987
+ )), 'optionalAccess', async _267 => _267.managedApplication]),
164940
164988
  policy: await _asyncOptionalChain([(await exportWithErrorHandling(
164941
164989
  exportPolicies,
164942
164990
  {
@@ -164944,7 +164992,7 @@ async function exportFullConfiguration({
164944
164992
  state: state2
164945
164993
  },
164946
164994
  errors
164947
- )), 'optionalAccess', async _264 => _264.policy]),
164995
+ )), 'optionalAccess', async _268 => _268.policy]),
164948
164996
  policyset: await _asyncOptionalChain([(await exportWithErrorHandling(
164949
164997
  exportPolicySets,
164950
164998
  {
@@ -164952,8 +165000,8 @@ async function exportFullConfiguration({
164952
165000
  state: state2
164953
165001
  },
164954
165002
  errors
164955
- )), 'optionalAccess', async _265 => _265.policyset]),
164956
- resourcetype: await _asyncOptionalChain([(await exportWithErrorHandling(exportResourceTypes, stateObj, errors)), 'optionalAccess', async _266 => _266.resourcetype]),
165003
+ )), 'optionalAccess', async _269 => _269.policyset]),
165004
+ resourcetype: await _asyncOptionalChain([(await exportWithErrorHandling(exportResourceTypes, stateObj, errors)), 'optionalAccess', async _270 => _270.resourcetype]),
164957
165005
  saml,
164958
165006
  script: await _asyncOptionalChain([(await exportWithErrorHandling(
164959
165007
  exportScripts,
@@ -164966,8 +165014,8 @@ async function exportFullConfiguration({
164966
165014
  state: state2
164967
165015
  },
164968
165016
  errors
164969
- )), 'optionalAccess', async _267 => _267.script]),
164970
- service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, realmStateObj, errors)), 'optionalAccess', async _268 => _268.service]),
165017
+ )), 'optionalAccess', async _271 => _271.script]),
165018
+ service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, realmStateObj, errors)), 'optionalAccess', async _272 => _272.service]),
164971
165019
  theme: await _asyncOptionalChain([(await exportWithErrorHandling(
164972
165020
  exportThemes,
164973
165021
  {
@@ -164975,7 +165023,7 @@ async function exportFullConfiguration({
164975
165023
  },
164976
165024
  errors,
164977
165025
  isPlatformDeployment
164978
- )), 'optionalAccess', async _269 => _269.theme]),
165026
+ )), 'optionalAccess', async _273 => _273.theme]),
164979
165027
  trees: await _asyncOptionalChain([(await exportWithErrorHandling(
164980
165028
  exportJourneys,
164981
165029
  {
@@ -164983,7 +165031,7 @@ async function exportFullConfiguration({
164983
165031
  state: state2
164984
165032
  },
164985
165033
  errors
164986
- )), 'optionalAccess', async _270 => _270.trees])
165034
+ )), 'optionalAccess', async _274 => _274.trees])
164987
165035
  };
164988
165036
  }
164989
165037
  state2.setRealm(currentRealm);
@@ -167971,7 +168019,7 @@ In AM, create a trusted issuer in the ${state.getRealm()} realm with the followi
167971
168019
  ]);
167972
168020
  issuer.push([
167973
168021
  "Allowed Subjects "["brightCyan"],
167974
- _optionalChain([artefacts, 'access', _271 => _271.issuer, 'access', _272 => _272.allowedSubjects, 'optionalAccess', _273 => _273.value, 'access', _274 => _274.length]) ? _optionalChain([artefacts, 'access', _275 => _275.issuer, 'access', _276 => _276.allowedSubjects, 'optionalAccess', _277 => _277.value, 'access', _278 => _278.join, 'call', _279 => _279(", ")]) : `Any ${state.getRealm()} realm user`
168022
+ _optionalChain([artefacts, 'access', _275 => _275.issuer, 'access', _276 => _276.allowedSubjects, 'optionalAccess', _277 => _277.value, 'access', _278 => _278.length]) ? _optionalChain([artefacts, 'access', _279 => _279.issuer, 'access', _280 => _280.allowedSubjects, 'optionalAccess', _281 => _281.value, 'access', _282 => _282.join, 'call', _283 => _283(", ")]) : `Any ${state.getRealm()} realm user`
167975
168023
  ]);
167976
168024
  issuer.push([
167977
168025
  "JWKS (Public Key)"["brightCyan"],
@@ -168099,7 +168147,7 @@ async function executeRfc7523AuthZGrantFlow2(clientId, iss, jwk, sub, scope, jso
168099
168147
  stopProgressIndicator2(
168100
168148
  spinnerId,
168101
168149
  `Error executing rfc7523 authz grant flow: ${stringify9(
168102
- _optionalChain([error2, 'access', _280 => _280.response, 'optionalAccess', _281 => _281.data]) || error2.message
168150
+ _optionalChain([error2, 'access', _284 => _284.response, 'optionalAccess', _285 => _285.data]) || error2.message
168103
168151
  )}`,
168104
168152
  "fail"
168105
168153
  );
@@ -176906,7 +176954,7 @@ async function tailLogs(source, levels, txid, cookie, nf) {
176906
176954
  filteredLogs = logsObject.result.filter(
176907
176955
  (el) => !noiseFilter.includes(
176908
176956
  el.payload.logger
176909
- ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _282 => _282.payload, 'access', _283 => _283.transactionId, 'optionalAccess', _284 => _284.includes, 'call', _285 => _285(
176957
+ ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _286 => _286.payload, 'access', _287 => _287.transactionId, 'optionalAccess', _288 => _288.includes, 'call', _289 => _289(
176910
176958
  txid
176911
176959
  )]))
176912
176960
  );
@@ -176930,7 +176978,7 @@ async function fetchLogs(source, startTs, endTs, levels, txid, ffString, cookie,
176930
176978
  filteredLogs = logsObject.result.filter(
176931
176979
  (el) => !noiseFilter.includes(
176932
176980
  el.payload.logger
176933
- ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _286 => _286.payload, 'access', _287 => _287.transactionId, 'optionalAccess', _288 => _288.includes, 'call', _289 => _289(
176981
+ ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _290 => _290.payload, 'access', _291 => _291.transactionId, 'optionalAccess', _292 => _292.includes, 'call', _293 => _293(
176934
176982
  txid
176935
176983
  )]))
176936
176984
  );
@@ -177084,9 +177132,9 @@ function setup79() {
177084
177132
  `Created log API key ${creds.api_key_id} and secret.`
177085
177133
  );
177086
177134
  } catch (error2) {
177087
- printMessage2(_optionalChain([error2, 'access', _290 => _290.response, 'optionalAccess', _291 => _291.data]), "error");
177135
+ printMessage2(_optionalChain([error2, 'access', _294 => _294.response, 'optionalAccess', _295 => _295.data]), "error");
177088
177136
  printMessage2(
177089
- `Error creating log API key and secret: ${_optionalChain([error2, 'access', _292 => _292.response, 'optionalAccess', _293 => _293.data, 'optionalAccess', _294 => _294.message])}`,
177137
+ `Error creating log API key and secret: ${_optionalChain([error2, 'access', _296 => _296.response, 'optionalAccess', _297 => _297.data, 'optionalAccess', _298 => _298.message])}`,
177090
177138
  "error"
177091
177139
  );
177092
177140
  process.exitCode = 1;
@@ -177792,7 +177840,7 @@ function setup86() {
177792
177840
  printMessage2(updatesTable.toString(), "data");
177793
177841
  }
177794
177842
  if (!options2.checkOnly) {
177795
- if (_optionalChain([updates, 'access', _295 => _295.secrets, 'optionalAccess', _296 => _296.length]) || _optionalChain([updates, 'access', _297 => _297.variables, 'optionalAccess', _298 => _298.length]) || options2.force) {
177843
+ if (_optionalChain([updates, 'access', _299 => _299.secrets, 'optionalAccess', _300 => _300.length]) || _optionalChain([updates, 'access', _301 => _301.variables, 'optionalAccess', _302 => _302.length]) || options2.force) {
177796
177844
  const ok = options2.yes || await (0, import_yesno.default)({
177797
177845
  question: `
177798
177846
  Changes may take up to 10 minutes to propagate, during which time you will not be able to make further updates.
@@ -181135,7 +181183,7 @@ function getNodeClassificationMd(nodeType) {
181135
181183
  function getOneLineDescription5(nodeObj, nodeRef) {
181136
181184
  const description = `[${nodeObj._id["brightCyan"]}] (${getNodeClassification2(
181137
181185
  nodeObj._type._id
181138
- ).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _299 => _299.displayName]) : ""}`;
181186
+ ).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _303 => _303.displayName]) : ""}`;
181139
181187
  return description;
181140
181188
  }
181141
181189
  function getTableHeaderMd5() {
@@ -181870,7 +181918,7 @@ async function listJourneys(long = false, analyze = false) {
181870
181918
  table.push([
181871
181919
  `${journeyStub._id}`,
181872
181920
  journeyStub.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
181873
- _optionalChain([journeyStub, 'access', _300 => _300.uiConfig, 'optionalAccess', _301 => _301.categories]) ? wordwrap(
181921
+ _optionalChain([journeyStub, 'access', _304 => _304.uiConfig, 'optionalAccess', _305 => _305.categories]) ? wordwrap(
181874
181922
  JSON.parse(journeyStub.uiConfig.categories).join(", "),
181875
181923
  60
181876
181924
  ) : ""
@@ -181912,7 +181960,7 @@ async function listJourneys(long = false, analyze = false) {
181912
181960
  `${journeyExport.tree._id}`,
181913
181961
  journeyExport.tree.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
181914
181962
  getJourneyClassification2(journeyExport).join(", "),
181915
- _optionalChain([journeyExport, 'access', _302 => _302.tree, 'access', _303 => _303.uiConfig, 'optionalAccess', _304 => _304.categories]) ? wordwrap(
181963
+ _optionalChain([journeyExport, 'access', _306 => _306.tree, 'access', _307 => _307.uiConfig, 'optionalAccess', _308 => _308.categories]) ? wordwrap(
181916
181964
  JSON.parse(journeyExport.tree.uiConfig.categories).join(
181917
181965
  ", "
181918
181966
  ),
@@ -182315,7 +182363,7 @@ async function describeJourney(journeyData, resolveTreeExport = onlineTreeExport
182315
182363
  nodeTypeMap[nodeData._type._id] = 1;
182316
182364
  }
182317
182365
  }
182318
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _305 => _305.meta, 'optionalAccess', _306 => _306.originAmVersion])) {
182366
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _309 => _309.meta, 'optionalAccess', _310 => _310.originAmVersion])) {
182319
182367
  state.setAmVersion(journeyData.meta.originAmVersion);
182320
182368
  }
182321
182369
  printMessage2(`${getOneLineDescription8(journeyData.tree)}`, "data");
@@ -182339,7 +182387,7 @@ ${getJourneyClassification2(journeyData).join(", ")}`,
182339
182387
  "data"
182340
182388
  );
182341
182389
  }
182342
- if (_optionalChain([journeyData, 'access', _307 => _307.tree, 'access', _308 => _308.uiConfig, 'optionalAccess', _309 => _309.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182390
+ if (_optionalChain([journeyData, 'access', _311 => _311.tree, 'access', _312 => _312.uiConfig, 'optionalAccess', _313 => _313.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182343
182391
  printMessage2("\nCategories/Tags", "data");
182344
182392
  printMessage2(
182345
182393
  `${JSON.parse(journeyData.tree.uiConfig.categories).join(", ")}`,
@@ -182381,7 +182429,7 @@ Nodes (${Object.entries(allNodes).length}):`, "data");
182381
182429
  );
182382
182430
  }
182383
182431
  }
182384
- if (_optionalChain([journeyData, 'access', _310 => _310.themes, 'optionalAccess', _311 => _311.length])) {
182432
+ if (_optionalChain([journeyData, 'access', _314 => _314.themes, 'optionalAccess', _315 => _315.length])) {
182385
182433
  printMessage2(`
182386
182434
  Themes (${journeyData.themes.length}):`, "data");
182387
182435
  for (const themeData of journeyData.themes) {
@@ -182475,14 +182523,14 @@ async function describeJourneyMd(journeyData, resolveTreeExport = onlineTreeExpo
182475
182523
  nodeTypeMap[nodeData._type._id] = 1;
182476
182524
  }
182477
182525
  }
182478
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _312 => _312.meta, 'optionalAccess', _313 => _313.originAmVersion])) {
182526
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _316 => _316.meta, 'optionalAccess', _317 => _317.originAmVersion])) {
182479
182527
  state.setAmVersion(journeyData.meta.originAmVersion);
182480
182528
  }
182481
182529
  printMessage2(
182482
182530
  `# ${getOneLineDescriptionMd(journeyData.tree)} - ${journeyData.tree.enabled === false ? ":o: `disabled`" : ":white_check_mark: `enabled`"}, ${getJourneyClassificationMd(journeyData).join(", ")}`,
182483
182531
  "data"
182484
182532
  );
182485
- if (_optionalChain([journeyData, 'access', _314 => _314.tree, 'access', _315 => _315.uiConfig, 'optionalAccess', _316 => _316.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182533
+ if (_optionalChain([journeyData, 'access', _318 => _318.tree, 'access', _319 => _319.uiConfig, 'optionalAccess', _320 => _320.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182486
182534
  printMessage2(
182487
182535
  `\`${JSON.parse(journeyData.tree.uiConfig.categories).join("`, `")}\``,
182488
182536
  "data"
@@ -182526,7 +182574,7 @@ ${journeyData.tree.description}`, "data");
182526
182574
  );
182527
182575
  }
182528
182576
  }
182529
- if (_optionalChain([journeyData, 'access', _317 => _317.themes, 'optionalAccess', _318 => _318.length])) {
182577
+ if (_optionalChain([journeyData, 'access', _321 => _321.themes, 'optionalAccess', _322 => _322.length])) {
182530
182578
  printMessage2(`## Themes (${journeyData.themes.length})`, "data");
182531
182579
  printMessage2(getTableHeaderMd7(), "data");
182532
182580
  for (const themeData of journeyData.themes) {
@@ -182796,9 +182844,9 @@ function setup121() {
182796
182844
  journeyData = fileData.trees[options2.journeyId];
182797
182845
  } else if (typeof options2.journeyId === "undefined" && fileData.trees) {
182798
182846
  [journeyData] = Object.values(fileData.trees);
182799
- } else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access', _319 => _319.tree, 'optionalAccess', _320 => _320._id])) {
182847
+ } else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access', _323 => _323.tree, 'optionalAccess', _324 => _324._id])) {
182800
182848
  journeyData = fileData;
182801
- } else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access', _321 => _321.tree, 'optionalAccess', _322 => _322._id])) {
182849
+ } else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access', _325 => _325.tree, 'optionalAccess', _326 => _326._id])) {
182802
182850
  journeyData = fileData;
182803
182851
  } else {
182804
182852
  throw new Error(
@@ -184529,7 +184577,7 @@ async function listRealms(long = false) {
184529
184577
  } catch (error2) {
184530
184578
  printMessage2(error2, "error");
184531
184579
  printMessage2(`Error listing realms: ${error2.message}`, "error");
184532
- printMessage2(_optionalChain([error2, 'access', _323 => _323.response, 'optionalAccess', _324 => _324.data]), "error");
184580
+ printMessage2(_optionalChain([error2, 'access', _327 => _327.response, 'optionalAccess', _328 => _328.data]), "error");
184533
184581
  }
184534
184582
  }
184535
184583
  async function describeRealm(realm2) {
@@ -185689,7 +185737,7 @@ async function importServiceFromFile(serviceId, file, options2 = {
185689
185737
  );
185690
185738
  const data2 = _fs3.default.readFileSync(filePath, "utf8");
185691
185739
  const importData = JSON.parse(data2);
185692
- if (_optionalChain([importData, 'optionalAccess', _325 => _325.service, 'access', _326 => _326[serviceId]])) {
185740
+ if (_optionalChain([importData, 'optionalAccess', _329 => _329.service, 'access', _330 => _330[serviceId]])) {
185693
185741
  await importService2(serviceId, importData, options2);
185694
185742
  stopProgressIndicator2(
185695
185743
  indicatorId,
@@ -186477,7 +186525,7 @@ var compareVersions = (v12, v2) => {
186477
186525
  // package.json
186478
186526
  var package_default2 = {
186479
186527
  name: "@rockcarver/frodo-cli",
186480
- version: "2.0.0",
186528
+ version: "2.0.1",
186481
186529
  type: "module",
186482
186530
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
186483
186531
  keywords: [
@@ -186591,7 +186639,7 @@ var package_default2 = {
186591
186639
  ]
186592
186640
  },
186593
186641
  devDependencies: {
186594
- "@rockcarver/frodo-lib": "2.0.0",
186642
+ "@rockcarver/frodo-lib": "2.0.1",
186595
186643
  "@types/colors": "^1.2.1",
186596
186644
  "@types/fs-extra": "^11.0.1",
186597
186645
  "@types/jest": "^29.2.3",