@rockcarver/frodo-cli 2.0.0 → 2.0.1-0
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/CHANGELOG.md +196 -193
- package/dist/app.cjs +193 -158
- package/dist/app.cjs.map +1 -1
- package/package.json +2 -2
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.
|
|
123287
|
+
version: "2.0.1-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
|
-
|
|
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
|
-
|
|
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.
|
|
140524
|
-
|
|
140525
|
-
|
|
140526
|
-
|
|
140527
|
-
|
|
140528
|
-
|
|
140529
|
-
|
|
140530
|
-
|
|
140531
|
-
|
|
140532
|
-
|
|
140533
|
-
|
|
140534
|
-
|
|
140535
|
-
|
|
140536
|
-
|
|
140537
|
-
|
|
140538
|
-
|
|
140539
|
-
|
|
140540
|
-
|
|
140541
|
-
|
|
140542
|
-
|
|
140543
|
-
|
|
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
|
-
|
|
140553
|
-
|
|
140554
|
-
|
|
140555
|
-
|
|
140556
|
-
|
|
140557
|
-
|
|
140558
|
-
|
|
140559
|
-
|
|
140560
|
-
|
|
140561
|
-
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
154872
|
-
_optionalChain([state2, 'access',
|
|
154873
|
-
_optionalChain([state2, 'access',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
164412
|
-
const message = _optionalChain([error2, 'access',
|
|
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",
|
|
@@ -164449,7 +164484,7 @@ async function putFullService({
|
|
|
164449
164484
|
debugMessage({ message: `ServiceOps.putFullService: clean`, state: state2 });
|
|
164450
164485
|
await deleteFullService({ serviceId, globalConfig, state: state2 });
|
|
164451
164486
|
} catch (error2) {
|
|
164452
|
-
if (!(_optionalChain([error2, 'access',
|
|
164487
|
+
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
164488
|
throw new FrodoError(
|
|
164454
164489
|
`Error deleting service '${serviceId}' before import`,
|
|
164455
164490
|
error2
|
|
@@ -164614,8 +164649,8 @@ async function deleteFullServices({
|
|
|
164614
164649
|
state: state2
|
|
164615
164650
|
});
|
|
164616
164651
|
} catch (error2) {
|
|
164617
|
-
if (!(_optionalChain([error2, 'access',
|
|
164618
|
-
const message = _optionalChain([error2, 'access',
|
|
164652
|
+
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.")) {
|
|
164653
|
+
const message = _optionalChain([error2, 'access', _249 => _249.response, 'optionalAccess', _250 => _250.data, 'optionalAccess', _251 => _251.message]);
|
|
164619
164654
|
printMessage({
|
|
164620
164655
|
message: `Delete service '${serviceListItem._id}': ${message}`,
|
|
164621
164656
|
state: state2,
|
|
@@ -164863,22 +164898,22 @@ async function exportFullConfiguration({
|
|
|
164863
164898
|
stateObj,
|
|
164864
164899
|
errors,
|
|
164865
164900
|
isPlatformDeployment
|
|
164866
|
-
)), 'optionalAccess', async
|
|
164901
|
+
)), 'optionalAccess', async _252 => _252.emailTemplate]),
|
|
164867
164902
|
idm: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164868
164903
|
exportConfigEntities,
|
|
164869
164904
|
stateObj,
|
|
164870
164905
|
errors,
|
|
164871
164906
|
isPlatformDeployment
|
|
164872
|
-
)), 'optionalAccess', async
|
|
164873
|
-
mapping: _optionalChain([mappings, 'optionalAccess',
|
|
164907
|
+
)), 'optionalAccess', async _253 => _253.idm]),
|
|
164908
|
+
mapping: _optionalChain([mappings, 'optionalAccess', _254 => _254.mapping]),
|
|
164874
164909
|
secrets: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164875
164910
|
exportSecrets,
|
|
164876
164911
|
{ options: { includeActiveValues, target }, state: state2 },
|
|
164877
164912
|
errors,
|
|
164878
164913
|
isCloudDeployment
|
|
164879
|
-
)), 'optionalAccess', async
|
|
164880
|
-
service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, globalStateObj, errors)), 'optionalAccess', async
|
|
164881
|
-
sync: _optionalChain([mappings, 'optionalAccess',
|
|
164914
|
+
)), 'optionalAccess', async _255 => _255.secrets]),
|
|
164915
|
+
service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, globalStateObj, errors)), 'optionalAccess', async _256 => _256.service]),
|
|
164916
|
+
sync: _optionalChain([mappings, 'optionalAccess', _257 => _257.sync]),
|
|
164882
164917
|
variables: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164883
164918
|
exportVariables,
|
|
164884
164919
|
{
|
|
@@ -164887,7 +164922,7 @@ async function exportFullConfiguration({
|
|
|
164887
164922
|
},
|
|
164888
164923
|
errors,
|
|
164889
164924
|
isCloudDeployment
|
|
164890
|
-
)), 'optionalAccess', async
|
|
164925
|
+
)), 'optionalAccess', async _258 => _258.variables])
|
|
164891
164926
|
};
|
|
164892
164927
|
const realmConfig = {};
|
|
164893
164928
|
const currentRealm = state2.getRealm();
|
|
@@ -164897,19 +164932,19 @@ async function exportFullConfiguration({
|
|
|
164897
164932
|
exportSaml2Providers,
|
|
164898
164933
|
stateObj,
|
|
164899
164934
|
errors
|
|
164900
|
-
)), 'optionalAccess', async
|
|
164935
|
+
)), 'optionalAccess', async _259 => _259.saml]);
|
|
164901
164936
|
const cotExport = await exportWithErrorHandling(
|
|
164902
164937
|
exportCirclesOfTrust,
|
|
164903
164938
|
stateObj,
|
|
164904
164939
|
errors
|
|
164905
164940
|
);
|
|
164906
164941
|
if (saml) {
|
|
164907
|
-
saml.cot = _optionalChain([cotExport, 'optionalAccess',
|
|
164942
|
+
saml.cot = _optionalChain([cotExport, 'optionalAccess', _260 => _260.saml, 'access', _261 => _261.cot]);
|
|
164908
164943
|
} else {
|
|
164909
|
-
saml = _optionalChain([cotExport, 'optionalAccess',
|
|
164944
|
+
saml = _optionalChain([cotExport, 'optionalAccess', _262 => _262.saml]);
|
|
164910
164945
|
}
|
|
164911
164946
|
realmConfig[realm2] = {
|
|
164912
|
-
agents: await _asyncOptionalChain([(await exportWithErrorHandling(exportAgents, realmStateObj, errors)), 'optionalAccess', async
|
|
164947
|
+
agents: await _asyncOptionalChain([(await exportWithErrorHandling(exportAgents, realmStateObj, errors)), 'optionalAccess', async _263 => _263.agents]),
|
|
164913
164948
|
application: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164914
164949
|
exportOAuth2Clients,
|
|
164915
164950
|
{
|
|
@@ -164917,17 +164952,17 @@ async function exportFullConfiguration({
|
|
|
164917
164952
|
state: state2
|
|
164918
164953
|
},
|
|
164919
164954
|
errors
|
|
164920
|
-
)), 'optionalAccess', async
|
|
164955
|
+
)), 'optionalAccess', async _264 => _264.application]),
|
|
164921
164956
|
authentication: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164922
164957
|
exportAuthenticationSettings,
|
|
164923
164958
|
realmStateObj,
|
|
164924
164959
|
errors
|
|
164925
|
-
)), 'optionalAccess', async
|
|
164960
|
+
)), 'optionalAccess', async _265 => _265.authentication]),
|
|
164926
164961
|
idp: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164927
164962
|
exportSocialIdentityProviders,
|
|
164928
164963
|
stateObj,
|
|
164929
164964
|
errors
|
|
164930
|
-
)), 'optionalAccess', async
|
|
164965
|
+
)), 'optionalAccess', async _266 => _266.idp]),
|
|
164931
164966
|
managedApplication: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164932
164967
|
exportApplications,
|
|
164933
164968
|
{
|
|
@@ -164936,7 +164971,7 @@ async function exportFullConfiguration({
|
|
|
164936
164971
|
},
|
|
164937
164972
|
errors,
|
|
164938
164973
|
isPlatformDeployment
|
|
164939
|
-
)), 'optionalAccess', async
|
|
164974
|
+
)), 'optionalAccess', async _267 => _267.managedApplication]),
|
|
164940
164975
|
policy: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164941
164976
|
exportPolicies,
|
|
164942
164977
|
{
|
|
@@ -164944,7 +164979,7 @@ async function exportFullConfiguration({
|
|
|
164944
164979
|
state: state2
|
|
164945
164980
|
},
|
|
164946
164981
|
errors
|
|
164947
|
-
)), 'optionalAccess', async
|
|
164982
|
+
)), 'optionalAccess', async _268 => _268.policy]),
|
|
164948
164983
|
policyset: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164949
164984
|
exportPolicySets,
|
|
164950
164985
|
{
|
|
@@ -164952,8 +164987,8 @@ async function exportFullConfiguration({
|
|
|
164952
164987
|
state: state2
|
|
164953
164988
|
},
|
|
164954
164989
|
errors
|
|
164955
|
-
)), 'optionalAccess', async
|
|
164956
|
-
resourcetype: await _asyncOptionalChain([(await exportWithErrorHandling(exportResourceTypes, stateObj, errors)), 'optionalAccess', async
|
|
164990
|
+
)), 'optionalAccess', async _269 => _269.policyset]),
|
|
164991
|
+
resourcetype: await _asyncOptionalChain([(await exportWithErrorHandling(exportResourceTypes, stateObj, errors)), 'optionalAccess', async _270 => _270.resourcetype]),
|
|
164957
164992
|
saml,
|
|
164958
164993
|
script: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164959
164994
|
exportScripts,
|
|
@@ -164966,8 +165001,8 @@ async function exportFullConfiguration({
|
|
|
164966
165001
|
state: state2
|
|
164967
165002
|
},
|
|
164968
165003
|
errors
|
|
164969
|
-
)), 'optionalAccess', async
|
|
164970
|
-
service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, realmStateObj, errors)), 'optionalAccess', async
|
|
165004
|
+
)), 'optionalAccess', async _271 => _271.script]),
|
|
165005
|
+
service: await _asyncOptionalChain([(await exportWithErrorHandling(exportServices, realmStateObj, errors)), 'optionalAccess', async _272 => _272.service]),
|
|
164971
165006
|
theme: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164972
165007
|
exportThemes,
|
|
164973
165008
|
{
|
|
@@ -164975,7 +165010,7 @@ async function exportFullConfiguration({
|
|
|
164975
165010
|
},
|
|
164976
165011
|
errors,
|
|
164977
165012
|
isPlatformDeployment
|
|
164978
|
-
)), 'optionalAccess', async
|
|
165013
|
+
)), 'optionalAccess', async _273 => _273.theme]),
|
|
164979
165014
|
trees: await _asyncOptionalChain([(await exportWithErrorHandling(
|
|
164980
165015
|
exportJourneys,
|
|
164981
165016
|
{
|
|
@@ -164983,7 +165018,7 @@ async function exportFullConfiguration({
|
|
|
164983
165018
|
state: state2
|
|
164984
165019
|
},
|
|
164985
165020
|
errors
|
|
164986
|
-
)), 'optionalAccess', async
|
|
165021
|
+
)), 'optionalAccess', async _274 => _274.trees])
|
|
164987
165022
|
};
|
|
164988
165023
|
}
|
|
164989
165024
|
state2.setRealm(currentRealm);
|
|
@@ -167971,7 +168006,7 @@ In AM, create a trusted issuer in the ${state.getRealm()} realm with the followi
|
|
|
167971
168006
|
]);
|
|
167972
168007
|
issuer.push([
|
|
167973
168008
|
"Allowed Subjects "["brightCyan"],
|
|
167974
|
-
_optionalChain([artefacts, 'access',
|
|
168009
|
+
_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
168010
|
]);
|
|
167976
168011
|
issuer.push([
|
|
167977
168012
|
"JWKS (Public Key)"["brightCyan"],
|
|
@@ -168099,7 +168134,7 @@ async function executeRfc7523AuthZGrantFlow2(clientId, iss, jwk, sub, scope, jso
|
|
|
168099
168134
|
stopProgressIndicator2(
|
|
168100
168135
|
spinnerId,
|
|
168101
168136
|
`Error executing rfc7523 authz grant flow: ${stringify9(
|
|
168102
|
-
_optionalChain([error2, 'access',
|
|
168137
|
+
_optionalChain([error2, 'access', _284 => _284.response, 'optionalAccess', _285 => _285.data]) || error2.message
|
|
168103
168138
|
)}`,
|
|
168104
168139
|
"fail"
|
|
168105
168140
|
);
|
|
@@ -176906,7 +176941,7 @@ async function tailLogs(source, levels, txid, cookie, nf) {
|
|
|
176906
176941
|
filteredLogs = logsObject.result.filter(
|
|
176907
176942
|
(el) => !noiseFilter.includes(
|
|
176908
176943
|
el.payload.logger
|
|
176909
|
-
) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access',
|
|
176944
|
+
) && !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
176945
|
txid
|
|
176911
176946
|
)]))
|
|
176912
176947
|
);
|
|
@@ -176930,7 +176965,7 @@ async function fetchLogs(source, startTs, endTs, levels, txid, ffString, cookie,
|
|
|
176930
176965
|
filteredLogs = logsObject.result.filter(
|
|
176931
176966
|
(el) => !noiseFilter.includes(
|
|
176932
176967
|
el.payload.logger
|
|
176933
|
-
) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access',
|
|
176968
|
+
) && !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
176969
|
txid
|
|
176935
176970
|
)]))
|
|
176936
176971
|
);
|
|
@@ -177084,9 +177119,9 @@ function setup79() {
|
|
|
177084
177119
|
`Created log API key ${creds.api_key_id} and secret.`
|
|
177085
177120
|
);
|
|
177086
177121
|
} catch (error2) {
|
|
177087
|
-
printMessage2(_optionalChain([error2, 'access',
|
|
177122
|
+
printMessage2(_optionalChain([error2, 'access', _294 => _294.response, 'optionalAccess', _295 => _295.data]), "error");
|
|
177088
177123
|
printMessage2(
|
|
177089
|
-
`Error creating log API key and secret: ${_optionalChain([error2, 'access',
|
|
177124
|
+
`Error creating log API key and secret: ${_optionalChain([error2, 'access', _296 => _296.response, 'optionalAccess', _297 => _297.data, 'optionalAccess', _298 => _298.message])}`,
|
|
177090
177125
|
"error"
|
|
177091
177126
|
);
|
|
177092
177127
|
process.exitCode = 1;
|
|
@@ -177792,7 +177827,7 @@ function setup86() {
|
|
|
177792
177827
|
printMessage2(updatesTable.toString(), "data");
|
|
177793
177828
|
}
|
|
177794
177829
|
if (!options2.checkOnly) {
|
|
177795
|
-
if (_optionalChain([updates, 'access',
|
|
177830
|
+
if (_optionalChain([updates, 'access', _299 => _299.secrets, 'optionalAccess', _300 => _300.length]) || _optionalChain([updates, 'access', _301 => _301.variables, 'optionalAccess', _302 => _302.length]) || options2.force) {
|
|
177796
177831
|
const ok = options2.yes || await (0, import_yesno.default)({
|
|
177797
177832
|
question: `
|
|
177798
177833
|
Changes may take up to 10 minutes to propagate, during which time you will not be able to make further updates.
|
|
@@ -181135,7 +181170,7 @@ function getNodeClassificationMd(nodeType) {
|
|
|
181135
181170
|
function getOneLineDescription5(nodeObj, nodeRef) {
|
|
181136
181171
|
const description = `[${nodeObj._id["brightCyan"]}] (${getNodeClassification2(
|
|
181137
181172
|
nodeObj._type._id
|
|
181138
|
-
).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess',
|
|
181173
|
+
).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _303 => _303.displayName]) : ""}`;
|
|
181139
181174
|
return description;
|
|
181140
181175
|
}
|
|
181141
181176
|
function getTableHeaderMd5() {
|
|
@@ -181870,7 +181905,7 @@ async function listJourneys(long = false, analyze = false) {
|
|
|
181870
181905
|
table.push([
|
|
181871
181906
|
`${journeyStub._id}`,
|
|
181872
181907
|
journeyStub.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
|
|
181873
|
-
_optionalChain([journeyStub, 'access',
|
|
181908
|
+
_optionalChain([journeyStub, 'access', _304 => _304.uiConfig, 'optionalAccess', _305 => _305.categories]) ? wordwrap(
|
|
181874
181909
|
JSON.parse(journeyStub.uiConfig.categories).join(", "),
|
|
181875
181910
|
60
|
|
181876
181911
|
) : ""
|
|
@@ -181912,7 +181947,7 @@ async function listJourneys(long = false, analyze = false) {
|
|
|
181912
181947
|
`${journeyExport.tree._id}`,
|
|
181913
181948
|
journeyExport.tree.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
|
|
181914
181949
|
getJourneyClassification2(journeyExport).join(", "),
|
|
181915
|
-
_optionalChain([journeyExport, 'access',
|
|
181950
|
+
_optionalChain([journeyExport, 'access', _306 => _306.tree, 'access', _307 => _307.uiConfig, 'optionalAccess', _308 => _308.categories]) ? wordwrap(
|
|
181916
181951
|
JSON.parse(journeyExport.tree.uiConfig.categories).join(
|
|
181917
181952
|
", "
|
|
181918
181953
|
),
|
|
@@ -182315,7 +182350,7 @@ async function describeJourney(journeyData, resolveTreeExport = onlineTreeExport
|
|
|
182315
182350
|
nodeTypeMap[nodeData._type._id] = 1;
|
|
182316
182351
|
}
|
|
182317
182352
|
}
|
|
182318
|
-
if (!state.getAmVersion() && _optionalChain([journeyData, 'access',
|
|
182353
|
+
if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _309 => _309.meta, 'optionalAccess', _310 => _310.originAmVersion])) {
|
|
182319
182354
|
state.setAmVersion(journeyData.meta.originAmVersion);
|
|
182320
182355
|
}
|
|
182321
182356
|
printMessage2(`${getOneLineDescription8(journeyData.tree)}`, "data");
|
|
@@ -182339,7 +182374,7 @@ ${getJourneyClassification2(journeyData).join(", ")}`,
|
|
|
182339
182374
|
"data"
|
|
182340
182375
|
);
|
|
182341
182376
|
}
|
|
182342
|
-
if (_optionalChain([journeyData, 'access',
|
|
182377
|
+
if (_optionalChain([journeyData, 'access', _311 => _311.tree, 'access', _312 => _312.uiConfig, 'optionalAccess', _313 => _313.categories]) && journeyData.tree.uiConfig.categories != "[]") {
|
|
182343
182378
|
printMessage2("\nCategories/Tags", "data");
|
|
182344
182379
|
printMessage2(
|
|
182345
182380
|
`${JSON.parse(journeyData.tree.uiConfig.categories).join(", ")}`,
|
|
@@ -182381,7 +182416,7 @@ Nodes (${Object.entries(allNodes).length}):`, "data");
|
|
|
182381
182416
|
);
|
|
182382
182417
|
}
|
|
182383
182418
|
}
|
|
182384
|
-
if (_optionalChain([journeyData, 'access',
|
|
182419
|
+
if (_optionalChain([journeyData, 'access', _314 => _314.themes, 'optionalAccess', _315 => _315.length])) {
|
|
182385
182420
|
printMessage2(`
|
|
182386
182421
|
Themes (${journeyData.themes.length}):`, "data");
|
|
182387
182422
|
for (const themeData of journeyData.themes) {
|
|
@@ -182475,14 +182510,14 @@ async function describeJourneyMd(journeyData, resolveTreeExport = onlineTreeExpo
|
|
|
182475
182510
|
nodeTypeMap[nodeData._type._id] = 1;
|
|
182476
182511
|
}
|
|
182477
182512
|
}
|
|
182478
|
-
if (!state.getAmVersion() && _optionalChain([journeyData, 'access',
|
|
182513
|
+
if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _316 => _316.meta, 'optionalAccess', _317 => _317.originAmVersion])) {
|
|
182479
182514
|
state.setAmVersion(journeyData.meta.originAmVersion);
|
|
182480
182515
|
}
|
|
182481
182516
|
printMessage2(
|
|
182482
182517
|
`# ${getOneLineDescriptionMd(journeyData.tree)} - ${journeyData.tree.enabled === false ? ":o: `disabled`" : ":white_check_mark: `enabled`"}, ${getJourneyClassificationMd(journeyData).join(", ")}`,
|
|
182483
182518
|
"data"
|
|
182484
182519
|
);
|
|
182485
|
-
if (_optionalChain([journeyData, 'access',
|
|
182520
|
+
if (_optionalChain([journeyData, 'access', _318 => _318.tree, 'access', _319 => _319.uiConfig, 'optionalAccess', _320 => _320.categories]) && journeyData.tree.uiConfig.categories != "[]") {
|
|
182486
182521
|
printMessage2(
|
|
182487
182522
|
`\`${JSON.parse(journeyData.tree.uiConfig.categories).join("`, `")}\``,
|
|
182488
182523
|
"data"
|
|
@@ -182526,7 +182561,7 @@ ${journeyData.tree.description}`, "data");
|
|
|
182526
182561
|
);
|
|
182527
182562
|
}
|
|
182528
182563
|
}
|
|
182529
|
-
if (_optionalChain([journeyData, 'access',
|
|
182564
|
+
if (_optionalChain([journeyData, 'access', _321 => _321.themes, 'optionalAccess', _322 => _322.length])) {
|
|
182530
182565
|
printMessage2(`## Themes (${journeyData.themes.length})`, "data");
|
|
182531
182566
|
printMessage2(getTableHeaderMd7(), "data");
|
|
182532
182567
|
for (const themeData of journeyData.themes) {
|
|
@@ -182796,9 +182831,9 @@ function setup121() {
|
|
|
182796
182831
|
journeyData = fileData.trees[options2.journeyId];
|
|
182797
182832
|
} else if (typeof options2.journeyId === "undefined" && fileData.trees) {
|
|
182798
182833
|
[journeyData] = Object.values(fileData.trees);
|
|
182799
|
-
} else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access',
|
|
182834
|
+
} else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access', _323 => _323.tree, 'optionalAccess', _324 => _324._id])) {
|
|
182800
182835
|
journeyData = fileData;
|
|
182801
|
-
} else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access',
|
|
182836
|
+
} else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access', _325 => _325.tree, 'optionalAccess', _326 => _326._id])) {
|
|
182802
182837
|
journeyData = fileData;
|
|
182803
182838
|
} else {
|
|
182804
182839
|
throw new Error(
|
|
@@ -184529,7 +184564,7 @@ async function listRealms(long = false) {
|
|
|
184529
184564
|
} catch (error2) {
|
|
184530
184565
|
printMessage2(error2, "error");
|
|
184531
184566
|
printMessage2(`Error listing realms: ${error2.message}`, "error");
|
|
184532
|
-
printMessage2(_optionalChain([error2, 'access',
|
|
184567
|
+
printMessage2(_optionalChain([error2, 'access', _327 => _327.response, 'optionalAccess', _328 => _328.data]), "error");
|
|
184533
184568
|
}
|
|
184534
184569
|
}
|
|
184535
184570
|
async function describeRealm(realm2) {
|
|
@@ -185689,7 +185724,7 @@ async function importServiceFromFile(serviceId, file, options2 = {
|
|
|
185689
185724
|
);
|
|
185690
185725
|
const data2 = _fs3.default.readFileSync(filePath, "utf8");
|
|
185691
185726
|
const importData = JSON.parse(data2);
|
|
185692
|
-
if (_optionalChain([importData, 'optionalAccess',
|
|
185727
|
+
if (_optionalChain([importData, 'optionalAccess', _329 => _329.service, 'access', _330 => _330[serviceId]])) {
|
|
185693
185728
|
await importService2(serviceId, importData, options2);
|
|
185694
185729
|
stopProgressIndicator2(
|
|
185695
185730
|
indicatorId,
|
|
@@ -186477,7 +186512,7 @@ var compareVersions = (v12, v2) => {
|
|
|
186477
186512
|
// package.json
|
|
186478
186513
|
var package_default2 = {
|
|
186479
186514
|
name: "@rockcarver/frodo-cli",
|
|
186480
|
-
version: "2.0.0",
|
|
186515
|
+
version: "2.0.1-0",
|
|
186481
186516
|
type: "module",
|
|
186482
186517
|
description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
|
|
186483
186518
|
keywords: [
|
|
@@ -186591,7 +186626,7 @@ var package_default2 = {
|
|
|
186591
186626
|
]
|
|
186592
186627
|
},
|
|
186593
186628
|
devDependencies: {
|
|
186594
|
-
"@rockcarver/frodo-lib": "2.0.
|
|
186629
|
+
"@rockcarver/frodo-lib": "2.0.1-1",
|
|
186595
186630
|
"@types/colors": "^1.2.1",
|
|
186596
186631
|
"@types/fs-extra": "^11.0.1",
|
|
186597
186632
|
"@types/jest": "^29.2.3",
|