@rockcarver/frodo-cli 2.0.5 → 2.0.6-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/CHANGELOG.md +35 -1
- package/dist/app.cjs +619 -260
- package/dist/app.cjs.map +1 -1
- package/package.json +2 -2
package/dist/app.cjs
CHANGED
|
@@ -46765,7 +46765,7 @@ var require_inquirer_autocomplete_prompt = _chunkMPPKDFVIcjs.__commonJS.call(voi
|
|
|
46765
46765
|
// src/app.ts
|
|
46766
46766
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
46767
46767
|
|
|
46768
|
-
// node_modules/@rockcarver/frodo-lib/dist/
|
|
46768
|
+
// node_modules/@rockcarver/frodo-lib/dist/index.mjs
|
|
46769
46769
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
46770
46770
|
var _crypto3 = require('crypto'); var _crypto4 = _interopRequireDefault(_crypto3);
|
|
46771
46771
|
|
|
@@ -123541,16 +123541,16 @@ function stringify(obj) {
|
|
|
123541
123541
|
}
|
|
123542
123542
|
var package_default = {
|
|
123543
123543
|
name: "@rockcarver/frodo-lib",
|
|
123544
|
-
version: "2.1.0",
|
|
123544
|
+
version: "2.1.2-0",
|
|
123545
123545
|
type: "commonjs",
|
|
123546
123546
|
main: "./dist/index.js",
|
|
123547
|
-
module: "./dist/
|
|
123547
|
+
module: "./dist/index.mjs",
|
|
123548
123548
|
types: "./dist/index.d.ts",
|
|
123549
123549
|
exports: {
|
|
123550
123550
|
".": {
|
|
123551
123551
|
require: "./dist/index.js",
|
|
123552
|
-
import: "./dist/
|
|
123553
|
-
default: "./dist/
|
|
123552
|
+
import: "./dist/index.mjs",
|
|
123553
|
+
default: "./dist/index.mjs"
|
|
123554
123554
|
}
|
|
123555
123555
|
},
|
|
123556
123556
|
scripts: {
|
|
@@ -123710,6 +123710,12 @@ var State_default = (initialState) => {
|
|
|
123710
123710
|
getHost() {
|
|
123711
123711
|
return state2.host || process.env.FRODO_HOST;
|
|
123712
123712
|
},
|
|
123713
|
+
setIdmHost(host2) {
|
|
123714
|
+
state2.idmHost = host2;
|
|
123715
|
+
},
|
|
123716
|
+
getIdmHost() {
|
|
123717
|
+
return state2.idmHost || process.env.FRODO_IDM_HOST;
|
|
123718
|
+
},
|
|
123713
123719
|
setUsername(username2) {
|
|
123714
123720
|
state2.username = username2;
|
|
123715
123721
|
},
|
|
@@ -123734,6 +123740,18 @@ var State_default = (initialState) => {
|
|
|
123734
123740
|
getDeploymentType() {
|
|
123735
123741
|
return state2.deploymentType;
|
|
123736
123742
|
},
|
|
123743
|
+
setAdminClientId(clientId) {
|
|
123744
|
+
state2.adminClientId = clientId;
|
|
123745
|
+
},
|
|
123746
|
+
getAdminClientId() {
|
|
123747
|
+
return state2.adminClientId || process.env.FRODO_LOGIN_CLIENT_ID;
|
|
123748
|
+
},
|
|
123749
|
+
setAdminClientRedirectUri(redirectUri) {
|
|
123750
|
+
state2.adminClientRedirectUri = redirectUri;
|
|
123751
|
+
},
|
|
123752
|
+
getAdminClientRedirectUri() {
|
|
123753
|
+
return state2.adminClientRedirectUri || process.env.FRODO_LOGIN_REDIRECT_URI;
|
|
123754
|
+
},
|
|
123737
123755
|
setAllowInsecureConnection(allowInsecureConnection) {
|
|
123738
123756
|
state2.allowInsecureConnection = allowInsecureConnection;
|
|
123739
123757
|
},
|
|
@@ -141383,7 +141401,7 @@ async function deleteRealm({
|
|
|
141383
141401
|
}) {
|
|
141384
141402
|
const urlString = _util2.default.format(
|
|
141385
141403
|
realmURLTemplate,
|
|
141386
|
-
|
|
141404
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141387
141405
|
realmId
|
|
141388
141406
|
);
|
|
141389
141407
|
const { data: data2 } = await generateAmApi({
|
|
@@ -141647,8 +141665,15 @@ var ForgeRockUtils_default = (state2) => {
|
|
|
141647
141665
|
getRealmName(realm2) {
|
|
141648
141666
|
return getRealmName(realm2);
|
|
141649
141667
|
},
|
|
141668
|
+
getHostUrl(url5) {
|
|
141669
|
+
return getHostOnlyUrl(url5);
|
|
141670
|
+
},
|
|
141671
|
+
getIdmBaseUrl() {
|
|
141672
|
+
return getIdmBaseUrl(state2);
|
|
141673
|
+
},
|
|
141674
|
+
// deprecated
|
|
141650
141675
|
getHostBaseUrl(url5) {
|
|
141651
|
-
return
|
|
141676
|
+
return getHostOnlyUrl(url5);
|
|
141652
141677
|
}
|
|
141653
141678
|
};
|
|
141654
141679
|
};
|
|
@@ -141721,10 +141746,16 @@ function getRealmName(realm2) {
|
|
|
141721
141746
|
}
|
|
141722
141747
|
return realmName;
|
|
141723
141748
|
}
|
|
141724
|
-
function
|
|
141749
|
+
function getHostOnlyUrl(url5) {
|
|
141725
141750
|
const parsedUrl = new URL(url5);
|
|
141726
141751
|
return `${parsedUrl.protocol}//${parsedUrl.host}`;
|
|
141727
141752
|
}
|
|
141753
|
+
function getIdmBaseUrl(state2) {
|
|
141754
|
+
if (state2.getIdmHost()) {
|
|
141755
|
+
return state2.getIdmHost();
|
|
141756
|
+
}
|
|
141757
|
+
return `${getHostOnlyUrl(state2.getHost())}/openidm`;
|
|
141758
|
+
}
|
|
141728
141759
|
var authenticateUrlTemplate = "%s/json%s/authenticate";
|
|
141729
141760
|
var authenticateWithServiceUrlTemplate = `${authenticateUrlTemplate}?authIndexType=service&authIndexValue=%s`;
|
|
141730
141761
|
var apiVersion2 = "resource=2.0, protocol=1.0";
|
|
@@ -141771,7 +141802,7 @@ async function getSecrets({
|
|
|
141771
141802
|
}) {
|
|
141772
141803
|
const urlString = _util2.default.format(
|
|
141773
141804
|
secretsListURLTemplate,
|
|
141774
|
-
|
|
141805
|
+
getHostOnlyUrl(state2.getHost())
|
|
141775
141806
|
);
|
|
141776
141807
|
const { data: data2 } = await generateEnvApi({
|
|
141777
141808
|
resource: getApiConfig3(),
|
|
@@ -141787,7 +141818,7 @@ async function getSecret({
|
|
|
141787
141818
|
}) {
|
|
141788
141819
|
const urlString = _util2.default.format(
|
|
141789
141820
|
secretURLTemplate,
|
|
141790
|
-
|
|
141821
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141791
141822
|
secretId
|
|
141792
141823
|
);
|
|
141793
141824
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141814,7 +141845,7 @@ async function putSecret({
|
|
|
141814
141845
|
};
|
|
141815
141846
|
const urlString = _util2.default.format(
|
|
141816
141847
|
secretURLTemplate,
|
|
141817
|
-
|
|
141848
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141818
141849
|
secretId
|
|
141819
141850
|
);
|
|
141820
141851
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141832,7 +141863,7 @@ async function setSecretDescription({
|
|
|
141832
141863
|
}) {
|
|
141833
141864
|
const urlString = _util2.default.format(
|
|
141834
141865
|
secretSetDescriptionURLTemplate,
|
|
141835
|
-
|
|
141866
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141836
141867
|
secretId
|
|
141837
141868
|
);
|
|
141838
141869
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141847,7 +141878,7 @@ async function deleteSecret({
|
|
|
141847
141878
|
}) {
|
|
141848
141879
|
const urlString = _util2.default.format(
|
|
141849
141880
|
secretURLTemplate,
|
|
141850
|
-
|
|
141881
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141851
141882
|
secretId
|
|
141852
141883
|
);
|
|
141853
141884
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141864,7 +141895,7 @@ async function getSecretVersions({
|
|
|
141864
141895
|
}) {
|
|
141865
141896
|
const urlString = _util2.default.format(
|
|
141866
141897
|
secretListVersionsURLTemplate,
|
|
141867
|
-
|
|
141898
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141868
141899
|
secretId
|
|
141869
141900
|
);
|
|
141870
141901
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141882,7 +141913,7 @@ async function createNewVersionOfSecret({
|
|
|
141882
141913
|
}) {
|
|
141883
141914
|
const urlString = _util2.default.format(
|
|
141884
141915
|
secretCreateNewVersionURLTemplate,
|
|
141885
|
-
|
|
141916
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141886
141917
|
secretId
|
|
141887
141918
|
);
|
|
141888
141919
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141898,7 +141929,7 @@ async function getVersionOfSecret({
|
|
|
141898
141929
|
}) {
|
|
141899
141930
|
const urlString = _util2.default.format(
|
|
141900
141931
|
secretGetVersionURLTemplate,
|
|
141901
|
-
|
|
141932
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141902
141933
|
secretId,
|
|
141903
141934
|
version3
|
|
141904
141935
|
);
|
|
@@ -141918,7 +141949,7 @@ async function setStatusOfVersionOfSecret({
|
|
|
141918
141949
|
}) {
|
|
141919
141950
|
const urlString = _util2.default.format(
|
|
141920
141951
|
secretVersionStatusURLTemplate,
|
|
141921
|
-
|
|
141952
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141922
141953
|
secretId,
|
|
141923
141954
|
version3
|
|
141924
141955
|
);
|
|
@@ -141935,7 +141966,7 @@ async function deleteVersionOfSecret({
|
|
|
141935
141966
|
}) {
|
|
141936
141967
|
const urlString = _util2.default.format(
|
|
141937
141968
|
secretGetVersionURLTemplate,
|
|
141938
|
-
|
|
141969
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141939
141970
|
secretId,
|
|
141940
141971
|
version3
|
|
141941
141972
|
);
|
|
@@ -141947,16 +141978,13 @@ async function deleteVersionOfSecret({
|
|
|
141947
141978
|
});
|
|
141948
141979
|
return data2;
|
|
141949
141980
|
}
|
|
141950
|
-
var idmAllConfigURLTemplate = "%s/
|
|
141951
|
-
var idmConfigURLTemplate = "%s/
|
|
141952
|
-
var idmConfigEntityQueryTemplate = "%s/
|
|
141981
|
+
var idmAllConfigURLTemplate = "%s/config";
|
|
141982
|
+
var idmConfigURLTemplate = "%s/config/%s";
|
|
141983
|
+
var idmConfigEntityQueryTemplate = "%s/config?_queryFilter=%s";
|
|
141953
141984
|
async function getConfigStubs({
|
|
141954
141985
|
state: state2
|
|
141955
141986
|
}) {
|
|
141956
|
-
const urlString = _util2.default.format(
|
|
141957
|
-
idmAllConfigURLTemplate,
|
|
141958
|
-
getHostBaseUrl(state2.getHost())
|
|
141959
|
-
);
|
|
141987
|
+
const urlString = _util2.default.format(idmAllConfigURLTemplate, getIdmBaseUrl(state2));
|
|
141960
141988
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
141961
141989
|
return data2;
|
|
141962
141990
|
}
|
|
@@ -141965,7 +141993,7 @@ async function getConfigEntities({
|
|
|
141965
141993
|
}) {
|
|
141966
141994
|
const urlString = _util2.default.format(
|
|
141967
141995
|
idmConfigEntityQueryTemplate,
|
|
141968
|
-
|
|
141996
|
+
getIdmBaseUrl(state2),
|
|
141969
141997
|
"true"
|
|
141970
141998
|
);
|
|
141971
141999
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -141977,7 +142005,7 @@ async function getConfigEntitiesByType({
|
|
|
141977
142005
|
}) {
|
|
141978
142006
|
const urlString = _util2.default.format(
|
|
141979
142007
|
idmConfigEntityQueryTemplate,
|
|
141980
|
-
|
|
142008
|
+
getIdmBaseUrl(state2),
|
|
141981
142009
|
encodeURIComponent(`_id sw '${type}'`)
|
|
141982
142010
|
);
|
|
141983
142011
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -141989,7 +142017,7 @@ async function getConfigEntity({
|
|
|
141989
142017
|
}) {
|
|
141990
142018
|
const urlString = _util2.default.format(
|
|
141991
142019
|
idmConfigURLTemplate,
|
|
141992
|
-
|
|
142020
|
+
getIdmBaseUrl(state2),
|
|
141993
142021
|
entityId
|
|
141994
142022
|
);
|
|
141995
142023
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -142003,7 +142031,7 @@ async function putConfigEntity({
|
|
|
142003
142031
|
}) {
|
|
142004
142032
|
const urlString = _util2.default.format(
|
|
142005
142033
|
idmConfigURLTemplate,
|
|
142006
|
-
|
|
142034
|
+
getIdmBaseUrl(state2),
|
|
142007
142035
|
wait ? `${entityId}?waitForCompletion=true` : entityId
|
|
142008
142036
|
);
|
|
142009
142037
|
const { data: data2 } = await generateIdmApi({ state: state2 }).put(urlString, entityData);
|
|
@@ -142015,7 +142043,7 @@ async function deleteConfigEntity({
|
|
|
142015
142043
|
}) {
|
|
142016
142044
|
const urlString = _util2.default.format(
|
|
142017
142045
|
idmConfigURLTemplate,
|
|
142018
|
-
|
|
142046
|
+
getIdmBaseUrl(state2),
|
|
142019
142047
|
entityId
|
|
142020
142048
|
);
|
|
142021
142049
|
const { data: data2 } = await generateIdmApi({ state: state2 }).delete(urlString, {
|
|
@@ -144516,10 +144544,10 @@ async function importOAuth2TrustedJwtIssuers({
|
|
|
144516
144544
|
}
|
|
144517
144545
|
return response2;
|
|
144518
144546
|
}
|
|
144519
|
-
var createManagedObjectURLTemplate = "%s/
|
|
144520
|
-
var managedObjectByIdURLTemplate = "%s/
|
|
144521
|
-
var queryAllManagedObjectURLTemplate = `%s/
|
|
144522
|
-
var queryManagedObjectURLTemplate = `%s/
|
|
144547
|
+
var createManagedObjectURLTemplate = "%s/managed/%s?_action=create";
|
|
144548
|
+
var managedObjectByIdURLTemplate = "%s/managed/%s/%s";
|
|
144549
|
+
var queryAllManagedObjectURLTemplate = `%s/managed/%s?_queryFilter=true&_pageSize=%s`;
|
|
144550
|
+
var queryManagedObjectURLTemplate = `%s/managed/%s?_queryFilter=%s&_pageSize=%s`;
|
|
144523
144551
|
var DEFAULT_PAGE_SIZE = 1e3;
|
|
144524
144552
|
async function getManagedObject({
|
|
144525
144553
|
type,
|
|
@@ -144530,7 +144558,7 @@ async function getManagedObject({
|
|
|
144530
144558
|
const fieldsParam = `_fields=${fields.join(",")}`;
|
|
144531
144559
|
const urlString = _util2.default.format(
|
|
144532
144560
|
`${managedObjectByIdURLTemplate}?${fieldsParam}`,
|
|
144533
|
-
|
|
144561
|
+
getIdmBaseUrl(state2),
|
|
144534
144562
|
type,
|
|
144535
144563
|
id7
|
|
144536
144564
|
);
|
|
@@ -144546,7 +144574,7 @@ async function createManagedObject({
|
|
|
144546
144574
|
}) {
|
|
144547
144575
|
const urlString = _util2.default.format(
|
|
144548
144576
|
createManagedObjectURLTemplate,
|
|
144549
|
-
|
|
144577
|
+
getIdmBaseUrl(state2),
|
|
144550
144578
|
moType2
|
|
144551
144579
|
);
|
|
144552
144580
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -144564,7 +144592,7 @@ async function putManagedObject({
|
|
|
144564
144592
|
}) {
|
|
144565
144593
|
const urlString = _util2.default.format(
|
|
144566
144594
|
managedObjectByIdURLTemplate,
|
|
144567
|
-
|
|
144595
|
+
getIdmBaseUrl(state2),
|
|
144568
144596
|
type,
|
|
144569
144597
|
id7
|
|
144570
144598
|
);
|
|
@@ -144584,7 +144612,7 @@ async function patchManagedObject({
|
|
|
144584
144612
|
}) {
|
|
144585
144613
|
const urlString = _util2.default.format(
|
|
144586
144614
|
managedObjectByIdURLTemplate,
|
|
144587
|
-
|
|
144615
|
+
getIdmBaseUrl(state2),
|
|
144588
144616
|
type,
|
|
144589
144617
|
id7
|
|
144590
144618
|
);
|
|
@@ -144608,7 +144636,7 @@ async function queryManagedObjects({
|
|
|
144608
144636
|
pageCookie ? `${queryManagedObjectURLTemplate}&${fieldsParam}&_pagedResultsCookie=${encodeURIComponent(
|
|
144609
144637
|
pageCookie
|
|
144610
144638
|
)}` : `${queryManagedObjectURLTemplate}&${fieldsParam}`,
|
|
144611
|
-
|
|
144639
|
+
getIdmBaseUrl(state2),
|
|
144612
144640
|
type,
|
|
144613
144641
|
encodeURIComponent(filter2),
|
|
144614
144642
|
pageSize
|
|
@@ -144631,7 +144659,7 @@ async function queryAllManagedObjectsByType({
|
|
|
144631
144659
|
)}` : `${queryAllManagedObjectURLTemplate}${fieldsParam}`;
|
|
144632
144660
|
const urlString = _util2.default.format(
|
|
144633
144661
|
urlTemplate,
|
|
144634
|
-
|
|
144662
|
+
getIdmBaseUrl(state2),
|
|
144635
144663
|
type,
|
|
144636
144664
|
pageSize
|
|
144637
144665
|
);
|
|
@@ -144645,7 +144673,7 @@ async function deleteManagedObject({
|
|
|
144645
144673
|
}) {
|
|
144646
144674
|
const urlString = _util2.default.format(
|
|
144647
144675
|
managedObjectByIdURLTemplate,
|
|
144648
|
-
|
|
144676
|
+
getIdmBaseUrl(state2),
|
|
144649
144677
|
type,
|
|
144650
144678
|
id7
|
|
144651
144679
|
);
|
|
@@ -149982,20 +150010,20 @@ ${providers.map((it) => it.split("|")[0]).join("\n")}.`,
|
|
|
149982
150010
|
throw new FrodoError(`Error importing circles of trust`, error2);
|
|
149983
150011
|
}
|
|
149984
150012
|
}
|
|
149985
|
-
var systemActionsUrlTemplate = "%s/
|
|
149986
|
-
var systemTestUrlTemplate = "%s/
|
|
149987
|
-
var systemObjectActionsUrlTemplate = "%s/
|
|
149988
|
-
var systemRunScriptUrlTemplate = "%s/
|
|
149989
|
-
var systemQueryAllUrlTemplate = "%s/
|
|
149990
|
-
var systemQueryByFilterUrlTemplate = "%s/
|
|
149991
|
-
var systemObjectUrlTemplate = "%s/
|
|
150013
|
+
var systemActionsUrlTemplate = "%s/system?_action=%s";
|
|
150014
|
+
var systemTestUrlTemplate = "%s/system/%s?_action=test";
|
|
150015
|
+
var systemObjectActionsUrlTemplate = "%s/system/%s/%s?_action=%s";
|
|
150016
|
+
var systemRunScriptUrlTemplate = "%s/system/%s?_action=script&scriptId=%s&scriptExecuteMode=resource";
|
|
150017
|
+
var systemQueryAllUrlTemplate = "%s/system/%s/%s?_queryId=query-all-ids";
|
|
150018
|
+
var systemQueryByFilterUrlTemplate = "%s/system/%s/%s?_queryFilter=%s";
|
|
150019
|
+
var systemObjectUrlTemplate = "%s/system/%s/%s/%s";
|
|
149992
150020
|
var DEFAULT_PAGE_SIZE2 = 1e3;
|
|
149993
150021
|
async function testConnectorServers({
|
|
149994
150022
|
state: state2
|
|
149995
150023
|
}) {
|
|
149996
150024
|
const urlString = _util2.default.format(
|
|
149997
150025
|
systemActionsUrlTemplate,
|
|
149998
|
-
|
|
150026
|
+
getIdmBaseUrl(state2),
|
|
149999
150027
|
"testConnectorServers"
|
|
150000
150028
|
);
|
|
150001
150029
|
const { data: data2 } = await generateIdmApi({ state: state2, requestOverride: {} }).post(
|
|
@@ -150008,7 +150036,7 @@ async function readAvailableSystems({
|
|
|
150008
150036
|
}) {
|
|
150009
150037
|
const urlString = _util2.default.format(
|
|
150010
150038
|
systemActionsUrlTemplate,
|
|
150011
|
-
|
|
150039
|
+
getIdmBaseUrl(state2),
|
|
150012
150040
|
"test"
|
|
150013
150041
|
);
|
|
150014
150042
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -150022,7 +150050,7 @@ async function readSystemStatus({
|
|
|
150022
150050
|
}) {
|
|
150023
150051
|
const urlString = _util2.default.format(
|
|
150024
150052
|
systemTestUrlTemplate,
|
|
150025
|
-
|
|
150053
|
+
getIdmBaseUrl(state2),
|
|
150026
150054
|
systemName
|
|
150027
150055
|
);
|
|
150028
150056
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -150039,7 +150067,7 @@ async function authenticateSystemObject({
|
|
|
150039
150067
|
}) {
|
|
150040
150068
|
const urlString = _util2.default.format(
|
|
150041
150069
|
systemObjectActionsUrlTemplate,
|
|
150042
|
-
|
|
150070
|
+
getIdmBaseUrl(state2),
|
|
150043
150071
|
systemName,
|
|
150044
150072
|
systemObjectType,
|
|
150045
150073
|
"authenticate"
|
|
@@ -150057,7 +150085,7 @@ async function runSystemScript({
|
|
|
150057
150085
|
}) {
|
|
150058
150086
|
const urlString = _util2.default.format(
|
|
150059
150087
|
systemRunScriptUrlTemplate,
|
|
150060
|
-
|
|
150088
|
+
getIdmBaseUrl(state2),
|
|
150061
150089
|
systemName,
|
|
150062
150090
|
scriptName
|
|
150063
150091
|
);
|
|
@@ -150077,7 +150105,7 @@ async function queryAllSystemObjectIds({
|
|
|
150077
150105
|
const urlTemplate = pageCookie ? `${systemQueryAllUrlTemplate}${pagingParams}&_pagedResultsCookie=${pageCookie}` : `${systemQueryAllUrlTemplate}${pagingParams}`;
|
|
150078
150106
|
const urlString = _util2.default.format(
|
|
150079
150107
|
urlTemplate,
|
|
150080
|
-
|
|
150108
|
+
getIdmBaseUrl(state2),
|
|
150081
150109
|
systemName,
|
|
150082
150110
|
systemObjectType
|
|
150083
150111
|
);
|
|
@@ -150098,7 +150126,7 @@ async function querySystemObjects({
|
|
|
150098
150126
|
const urlTemplate = pageCookie ? `${systemQueryByFilterUrlTemplate}${pagingParams}${fieldsParam}&_pagedResultsCookie=${pageCookie}` : `${systemQueryByFilterUrlTemplate}${pagingParams}${fieldsParam}`;
|
|
150099
150127
|
const urlString = _util2.default.format(
|
|
150100
150128
|
urlTemplate,
|
|
150101
|
-
|
|
150129
|
+
getIdmBaseUrl(state2),
|
|
150102
150130
|
systemName,
|
|
150103
150131
|
systemObjectType,
|
|
150104
150132
|
decodeURIComponent(filter2) === filter2 ? encodeURIComponent(filter2) : filter2
|
|
@@ -150118,7 +150146,7 @@ async function getSystemObject({
|
|
|
150118
150146
|
const fieldsParam = `_fields=${fields.join(",")}`;
|
|
150119
150147
|
const urlString = _util2.default.format(
|
|
150120
150148
|
`${systemObjectUrlTemplate}?${fieldsParam}`,
|
|
150121
|
-
|
|
150149
|
+
getIdmBaseUrl(state2),
|
|
150122
150150
|
systemName,
|
|
150123
150151
|
systemObjectType,
|
|
150124
150152
|
systemObjectId
|
|
@@ -150136,7 +150164,7 @@ async function createSystemObject({
|
|
|
150136
150164
|
}) {
|
|
150137
150165
|
const urlString = _util2.default.format(
|
|
150138
150166
|
systemObjectActionsUrlTemplate,
|
|
150139
|
-
|
|
150167
|
+
getIdmBaseUrl(state2),
|
|
150140
150168
|
systemName,
|
|
150141
150169
|
systemObjectType,
|
|
150142
150170
|
"create"
|
|
@@ -150157,7 +150185,7 @@ async function putSystemObject({
|
|
|
150157
150185
|
}) {
|
|
150158
150186
|
const urlString = _util2.default.format(
|
|
150159
150187
|
systemObjectUrlTemplate,
|
|
150160
|
-
|
|
150188
|
+
getIdmBaseUrl(state2),
|
|
150161
150189
|
systemName,
|
|
150162
150190
|
systemObjectType,
|
|
150163
150191
|
systemObjectId
|
|
@@ -150178,7 +150206,7 @@ async function patchSystemObject({
|
|
|
150178
150206
|
}) {
|
|
150179
150207
|
const urlString = _util2.default.format(
|
|
150180
150208
|
systemObjectUrlTemplate,
|
|
150181
|
-
|
|
150209
|
+
getIdmBaseUrl(state2),
|
|
150182
150210
|
systemName,
|
|
150183
150211
|
systemObjectType,
|
|
150184
150212
|
systemObjectId
|
|
@@ -150197,7 +150225,7 @@ async function deleteSystemObject({
|
|
|
150197
150225
|
}) {
|
|
150198
150226
|
const urlString = _util2.default.format(
|
|
150199
150227
|
systemObjectUrlTemplate,
|
|
150200
|
-
|
|
150228
|
+
getIdmBaseUrl(state2),
|
|
150201
150229
|
systemName,
|
|
150202
150230
|
systemObjectType,
|
|
150203
150231
|
systemObjectId
|
|
@@ -153207,7 +153235,7 @@ var getApiConfig12 = () => ({
|
|
|
153207
153235
|
async function getFeatures({ state: state2 }) {
|
|
153208
153236
|
const urlString = _util2.default.format(
|
|
153209
153237
|
envInfoURLTemplate,
|
|
153210
|
-
|
|
153238
|
+
getHostOnlyUrl(state2.getHost())
|
|
153211
153239
|
);
|
|
153212
153240
|
const { data: data2 } = await generateAmApi({ resource: getApiConfig12(), state: state2 }).get(
|
|
153213
153241
|
urlString,
|
|
@@ -153512,6 +153540,12 @@ var ConnectionProfileOps_default = (state2) => {
|
|
|
153512
153540
|
async getConnectionProfile() {
|
|
153513
153541
|
return getConnectionProfile({ state: state2 });
|
|
153514
153542
|
},
|
|
153543
|
+
async loadConnectionProfileByHost(host2) {
|
|
153544
|
+
return loadConnectionProfileByHost({ host: host2, state: state2 });
|
|
153545
|
+
},
|
|
153546
|
+
async loadConnectionProfile() {
|
|
153547
|
+
return loadConnectionProfile({ state: state2 });
|
|
153548
|
+
},
|
|
153515
153549
|
async saveConnectionProfile(host2) {
|
|
153516
153550
|
return saveConnectionProfile({ host: host2, state: state2 });
|
|
153517
153551
|
},
|
|
@@ -153680,6 +153714,7 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
|
|
|
153680
153714
|
}
|
|
153681
153715
|
return {
|
|
153682
153716
|
tenant: profiles[0].tenant,
|
|
153717
|
+
idmHost: profiles[0].idmHost ? profiles[0].idmHost : null,
|
|
153683
153718
|
allowInsecureConnection: profiles[0].allowInsecureConnection,
|
|
153684
153719
|
deploymentType: profiles[0].deploymentType,
|
|
153685
153720
|
username: profiles[0].username ? profiles[0].username : null,
|
|
@@ -153688,6 +153723,8 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
|
|
|
153688
153723
|
logApiSecret: profiles[0].encodedLogApiSecret ? await dataProtection.decrypt(profiles[0].encodedLogApiSecret) : null,
|
|
153689
153724
|
authenticationService: profiles[0].authenticationService ? profiles[0].authenticationService : null,
|
|
153690
153725
|
authenticationHeaderOverrides: profiles[0].authenticationHeaderOverrides ? profiles[0].authenticationHeaderOverrides : {},
|
|
153726
|
+
adminClientId: profiles[0].adminClientId ? profiles[0].adminClientId : null,
|
|
153727
|
+
adminClientRedirectUri: profiles[0].adminClientRedirectUri ? profiles[0].adminClientRedirectUri : null,
|
|
153691
153728
|
svcacctName: profiles[0].svcacctName ? profiles[0].svcacctName : null,
|
|
153692
153729
|
svcacctId: profiles[0].svcacctId ? profiles[0].svcacctId : null,
|
|
153693
153730
|
svcacctJwk: profiles[0].encodedSvcacctJwk ? await dataProtection.decrypt(profiles[0].encodedSvcacctJwk) : null,
|
|
@@ -153699,6 +153736,33 @@ async function getConnectionProfile({
|
|
|
153699
153736
|
}) {
|
|
153700
153737
|
return getConnectionProfileByHost({ host: state2.getHost(), state: state2 });
|
|
153701
153738
|
}
|
|
153739
|
+
async function loadConnectionProfileByHost({
|
|
153740
|
+
host: host2,
|
|
153741
|
+
state: state2
|
|
153742
|
+
}) {
|
|
153743
|
+
const conn = await getConnectionProfileByHost({ host: host2, state: state2 });
|
|
153744
|
+
state2.setHost(conn.tenant);
|
|
153745
|
+
state2.setIdmHost(state2.getIdmHost() || conn.idmHost);
|
|
153746
|
+
state2.setAllowInsecureConnection(conn.allowInsecureConnection);
|
|
153747
|
+
state2.setDeploymentType(state2.getDeploymentType() || conn.deploymentType);
|
|
153748
|
+
state2.setAdminClientId(state2.getAdminClientId() || conn.adminClientId);
|
|
153749
|
+
state2.setAdminClientRedirectUri(
|
|
153750
|
+
state2.getAdminClientRedirectUri() || conn.adminClientRedirectUri
|
|
153751
|
+
);
|
|
153752
|
+
state2.setUsername(conn.username);
|
|
153753
|
+
state2.setPassword(conn.password);
|
|
153754
|
+
state2.setAuthenticationService(conn.authenticationService);
|
|
153755
|
+
state2.setAuthenticationHeaderOverrides(conn.authenticationHeaderOverrides);
|
|
153756
|
+
state2.setServiceAccountId(conn.svcacctId);
|
|
153757
|
+
state2.setServiceAccountJwk(conn.svcacctJwk);
|
|
153758
|
+
state2.setServiceAccountScope(conn.svcacctScope);
|
|
153759
|
+
return true;
|
|
153760
|
+
}
|
|
153761
|
+
async function loadConnectionProfile({
|
|
153762
|
+
state: state2
|
|
153763
|
+
}) {
|
|
153764
|
+
return loadConnectionProfileByHost({ host: state2.getHost(), state: state2 });
|
|
153765
|
+
}
|
|
153702
153766
|
async function saveConnectionProfile({
|
|
153703
153767
|
host: host2,
|
|
153704
153768
|
state: state2
|
|
@@ -153752,10 +153816,15 @@ async function saveConnectionProfile({
|
|
|
153752
153816
|
state: state2
|
|
153753
153817
|
});
|
|
153754
153818
|
}
|
|
153819
|
+
if (state2.getIdmHost()) profile.idmHost = state2.getIdmHost();
|
|
153755
153820
|
if (state2.getAllowInsecureConnection())
|
|
153756
153821
|
profile.allowInsecureConnection = state2.getAllowInsecureConnection();
|
|
153757
153822
|
if (state2.getDeploymentType())
|
|
153758
153823
|
profile.deploymentType = state2.getDeploymentType();
|
|
153824
|
+
if (state2.getAdminClientId())
|
|
153825
|
+
profile.adminClientId = state2.getAdminClientId();
|
|
153826
|
+
if (state2.getAdminClientRedirectUri())
|
|
153827
|
+
profile.adminClientRedirectUri = state2.getAdminClientRedirectUri();
|
|
153759
153828
|
if (state2.getUsername()) profile.username = state2.getUsername();
|
|
153760
153829
|
if (state2.getPassword())
|
|
153761
153830
|
profile.encodedPassword = await dataProtection.encrypt(
|
|
@@ -154721,32 +154790,54 @@ function determineDefaultRealm(state2) {
|
|
|
154721
154790
|
}
|
|
154722
154791
|
}
|
|
154723
154792
|
async function determineDeploymentType(state2) {
|
|
154793
|
+
debugMessage({
|
|
154794
|
+
message: `AuthenticateOps.determineDeploymentType: start`,
|
|
154795
|
+
state: state2
|
|
154796
|
+
});
|
|
154724
154797
|
const cookieValue = state2.getCookieValue();
|
|
154725
154798
|
let deploymentType = state2.getDeploymentType();
|
|
154726
154799
|
switch (deploymentType) {
|
|
154727
154800
|
case Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY:
|
|
154801
|
+
adminClientId = state2.getAdminClientId() || fidcClientId;
|
|
154802
|
+
debugMessage({
|
|
154803
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154804
|
+
state: state2
|
|
154805
|
+
});
|
|
154728
154806
|
return deploymentType;
|
|
154729
154807
|
case Constants_default.FORGEOPS_DEPLOYMENT_TYPE_KEY:
|
|
154730
|
-
adminClientId = forgeopsClientId;
|
|
154808
|
+
adminClientId = state2.getAdminClientId() || forgeopsClientId;
|
|
154809
|
+
debugMessage({
|
|
154810
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154811
|
+
state: state2
|
|
154812
|
+
});
|
|
154731
154813
|
return deploymentType;
|
|
154732
154814
|
case Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY:
|
|
154815
|
+
debugMessage({
|
|
154816
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154817
|
+
state: state2
|
|
154818
|
+
});
|
|
154733
154819
|
return deploymentType;
|
|
154734
154820
|
default: {
|
|
154735
|
-
if (state2.getUseBearerTokenForAmApis())
|
|
154821
|
+
if (state2.getUseBearerTokenForAmApis()) {
|
|
154822
|
+
debugMessage({
|
|
154823
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY}]`,
|
|
154824
|
+
state: state2
|
|
154825
|
+
});
|
|
154736
154826
|
return Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY;
|
|
154827
|
+
}
|
|
154737
154828
|
const verifier = encodeBase64Url(_crypto3.randomBytes.call(void 0, 32));
|
|
154738
154829
|
const challenge = encodeBase64Url(
|
|
154739
154830
|
_crypto3.createHash.call(void 0, "sha256").update(verifier).digest()
|
|
154740
154831
|
);
|
|
154741
154832
|
const challengeMethod = "S256";
|
|
154742
|
-
const
|
|
154833
|
+
const redirectUri = _url2.default.resolve(state2.getHost(), redirectUrlTemplate);
|
|
154743
154834
|
const config = {
|
|
154744
154835
|
maxRedirects: 0,
|
|
154745
154836
|
headers: {
|
|
154746
154837
|
[state2.getCookieName()]: state2.getCookieValue()
|
|
154747
154838
|
}
|
|
154748
154839
|
};
|
|
154749
|
-
let bodyFormData = `redirect_uri=${
|
|
154840
|
+
let bodyFormData = `redirect_uri=${redirectUri}&scope=${cloudAdminScopes}&response_type=code&client_id=${fidcClientId}&csrf=${cookieValue}&decision=allow&code_challenge=${challenge}&code_challenge_method=${challengeMethod}`;
|
|
154750
154841
|
deploymentType = Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY;
|
|
154751
154842
|
try {
|
|
154752
154843
|
await authorize2({
|
|
@@ -154764,7 +154855,7 @@ async function determineDeploymentType(state2) {
|
|
|
154764
154855
|
deploymentType = Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY;
|
|
154765
154856
|
} else {
|
|
154766
154857
|
try {
|
|
154767
|
-
bodyFormData = `redirect_uri=${
|
|
154858
|
+
bodyFormData = `redirect_uri=${redirectUri}&scope=${forgeopsAdminScopes}&response_type=code&client_id=${forgeopsClientId}&csrf=${state2.getCookieValue()}&decision=allow&code_challenge=${challenge}&code_challenge_method=${challengeMethod}`;
|
|
154768
154859
|
await authorize2({
|
|
154769
154860
|
amBaseUrl: state2.getHost(),
|
|
154770
154861
|
data: bodyFormData,
|
|
@@ -154773,7 +154864,7 @@ async function determineDeploymentType(state2) {
|
|
|
154773
154864
|
});
|
|
154774
154865
|
} catch (ex) {
|
|
154775
154866
|
if (_optionalChain([ex, 'access', _114 => _114.response, 'optionalAccess', _115 => _115.status]) === 302 && _optionalChain([ex, 'access', _116 => _116.response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118.location, 'optionalAccess', _119 => _119.indexOf, 'call', _120 => _120("code=")]) > -1) {
|
|
154776
|
-
adminClientId = forgeopsClientId;
|
|
154867
|
+
adminClientId = state2.getAdminClientId() || forgeopsClientId;
|
|
154777
154868
|
verboseMessage({
|
|
154778
154869
|
message: `ForgeOps deployment`["brightCyan"] + ` detected.`,
|
|
154779
154870
|
state: state2
|
|
@@ -154788,6 +154879,10 @@ async function determineDeploymentType(state2) {
|
|
|
154788
154879
|
}
|
|
154789
154880
|
}
|
|
154790
154881
|
}
|
|
154882
|
+
debugMessage({
|
|
154883
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154884
|
+
state: state2
|
|
154885
|
+
});
|
|
154791
154886
|
return deploymentType;
|
|
154792
154887
|
}
|
|
154793
154888
|
}
|
|
@@ -154897,9 +154992,9 @@ async function getUserSessionToken(otpCallback, state2) {
|
|
|
154897
154992
|
});
|
|
154898
154993
|
return token;
|
|
154899
154994
|
}
|
|
154900
|
-
async function getAuthCode(
|
|
154995
|
+
async function getAuthCode(redirectUri, codeChallenge, codeChallengeMethod, state2) {
|
|
154901
154996
|
try {
|
|
154902
|
-
const bodyFormData = `redirect_uri=${
|
|
154997
|
+
const bodyFormData = `redirect_uri=${redirectUri}&scope=${state2.getDeploymentType() === Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY ? cloudAdminScopes : forgeopsAdminScopes}&response_type=code&client_id=${adminClientId}&csrf=${state2.getCookieValue()}&decision=allow&code_challenge=${codeChallenge}&code_challenge_method=${codeChallengeMethod}`;
|
|
154903
154998
|
const config = {
|
|
154904
154999
|
headers: {
|
|
154905
155000
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -154943,9 +155038,12 @@ async function getFreshUserBearerToken({
|
|
|
154943
155038
|
_crypto3.createHash.call(void 0, "sha256").update(verifier).digest()
|
|
154944
155039
|
);
|
|
154945
155040
|
const challengeMethod = "S256";
|
|
154946
|
-
const
|
|
155041
|
+
const redirectUri = _url2.default.resolve(
|
|
155042
|
+
state2.getHost(),
|
|
155043
|
+
state2.getAdminClientRedirectUri() || redirectUrlTemplate
|
|
155044
|
+
);
|
|
154947
155045
|
const authCode = await getAuthCode(
|
|
154948
|
-
|
|
155046
|
+
redirectUri,
|
|
154949
155047
|
challenge,
|
|
154950
155048
|
challengeMethod,
|
|
154951
155049
|
state2
|
|
@@ -154958,7 +155056,7 @@ async function getFreshUserBearerToken({
|
|
|
154958
155056
|
password: adminClientPassword
|
|
154959
155057
|
}
|
|
154960
155058
|
};
|
|
154961
|
-
const bodyFormData = `redirect_uri=${
|
|
155059
|
+
const bodyFormData = `redirect_uri=${redirectUri}&grant_type=authorization_code&code=${authCode}&code_verifier=${verifier}`;
|
|
154962
155060
|
response2 = await accessToken2({
|
|
154963
155061
|
amBaseUrl: state2.getHost(),
|
|
154964
155062
|
data: bodyFormData,
|
|
@@ -154966,7 +155064,7 @@ async function getFreshUserBearerToken({
|
|
|
154966
155064
|
state: state2
|
|
154967
155065
|
});
|
|
154968
155066
|
} else {
|
|
154969
|
-
const bodyFormData = `client_id=${adminClientId}&redirect_uri=${
|
|
155067
|
+
const bodyFormData = `client_id=${adminClientId}&redirect_uri=${redirectUri}&grant_type=authorization_code&code=${authCode}&code_verifier=${verifier}`;
|
|
154970
155068
|
response2 = await accessToken2({
|
|
154971
155069
|
amBaseUrl: state2.getHost(),
|
|
154972
155070
|
data: bodyFormData,
|
|
@@ -155221,20 +155319,7 @@ async function getTokens({
|
|
|
155221
155319
|
let usingConnectionProfile = false;
|
|
155222
155320
|
try {
|
|
155223
155321
|
if (state2.getUsername() == null && state2.getPassword() == null && !state2.getServiceAccountId() && !state2.getServiceAccountJwk()) {
|
|
155224
|
-
|
|
155225
|
-
usingConnectionProfile = true;
|
|
155226
|
-
state2.setHost(conn.tenant);
|
|
155227
|
-
state2.setAllowInsecureConnection(conn.allowInsecureConnection);
|
|
155228
|
-
state2.setDeploymentType(conn.deploymentType);
|
|
155229
|
-
state2.setUsername(conn.username);
|
|
155230
|
-
state2.setPassword(conn.password);
|
|
155231
|
-
state2.setAuthenticationService(conn.authenticationService);
|
|
155232
|
-
state2.setAuthenticationHeaderOverrides(
|
|
155233
|
-
conn.authenticationHeaderOverrides
|
|
155234
|
-
);
|
|
155235
|
-
state2.setServiceAccountId(conn.svcacctId);
|
|
155236
|
-
state2.setServiceAccountJwk(conn.svcacctJwk);
|
|
155237
|
-
state2.setServiceAccountScope(conn.svcacctScope);
|
|
155322
|
+
usingConnectionProfile = await loadConnectionProfile({ state: state2 });
|
|
155238
155323
|
if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
|
|
155239
155324
|
throw new FrodoError(
|
|
155240
155325
|
`Unsupported deployment type '${state2.getDeploymentType()}'`
|
|
@@ -155253,14 +155338,14 @@ async function getTokens({
|
|
|
155253
155338
|
}
|
|
155254
155339
|
}
|
|
155255
155340
|
state2.setCookieName(await determineCookieName(state2));
|
|
155256
|
-
if (!forceLoginAsUser && state2.getServiceAccountId() && state2.getServiceAccountJwk()) {
|
|
155341
|
+
if (!forceLoginAsUser && (state2.getDeploymentType() === Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY || state2.getDeploymentType() === void 0) && state2.getServiceAccountId() && state2.getServiceAccountJwk()) {
|
|
155257
155342
|
debugMessage({
|
|
155258
155343
|
message: `AuthenticateOps.getTokens: Authenticating with service account ${state2.getServiceAccountId()}`,
|
|
155259
155344
|
state: state2
|
|
155260
155345
|
});
|
|
155261
155346
|
try {
|
|
155262
155347
|
const token = await getSaBearerToken({ state: state2 });
|
|
155263
|
-
state2.setBearerTokenMeta(token);
|
|
155348
|
+
if (token) state2.setBearerTokenMeta(token);
|
|
155264
155349
|
if (usingConnectionProfile && !token.from_cache) {
|
|
155265
155350
|
saveConnectionProfile({ host: state2.getHost(), state: state2 });
|
|
155266
155351
|
}
|
|
@@ -155281,6 +155366,9 @@ async function getTokens({
|
|
|
155281
155366
|
});
|
|
155282
155367
|
const token = await getUserSessionToken(callbackHandler, state2);
|
|
155283
155368
|
if (token) state2.setUserSessionTokenMeta(token);
|
|
155369
|
+
if (usingConnectionProfile && !token.from_cache) {
|
|
155370
|
+
saveConnectionProfile({ host: state2.getHost(), state: state2 });
|
|
155371
|
+
}
|
|
155284
155372
|
await determineDeploymentTypeAndDefaultRealmAndVersion(state2);
|
|
155285
155373
|
if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
|
|
155286
155374
|
throw new FrodoError(
|
|
@@ -155957,7 +156045,7 @@ async function getCertificates({
|
|
|
155957
156045
|
}) {
|
|
155958
156046
|
const urlString = _util2.default.format(
|
|
155959
156047
|
certificatesURLTemplate,
|
|
155960
|
-
|
|
156048
|
+
getHostOnlyUrl(state2.getHost())
|
|
155961
156049
|
);
|
|
155962
156050
|
const { data: data2 } = await generateEnvApi({
|
|
155963
156051
|
resource: getApiConfig16(),
|
|
@@ -155975,7 +156063,7 @@ async function createCertificate({
|
|
|
155975
156063
|
}) {
|
|
155976
156064
|
const urlString = _util2.default.format(
|
|
155977
156065
|
certificatesURLTemplate,
|
|
155978
|
-
|
|
156066
|
+
getHostOnlyUrl(state2.getHost())
|
|
155979
156067
|
);
|
|
155980
156068
|
const { data: data2 } = await generateEnvApi({
|
|
155981
156069
|
resource: getApiConfig16(),
|
|
@@ -155993,7 +156081,7 @@ async function deleteCertificate({
|
|
|
155993
156081
|
}) {
|
|
155994
156082
|
const urlString = _util2.default.format(
|
|
155995
156083
|
certificateByIdURLTemplate,
|
|
155996
|
-
|
|
156084
|
+
getHostOnlyUrl(state2.getHost()),
|
|
155997
156085
|
certificateId
|
|
155998
156086
|
);
|
|
155999
156087
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156010,7 +156098,7 @@ async function getCertificate({
|
|
|
156010
156098
|
}) {
|
|
156011
156099
|
const urlString = _util2.default.format(
|
|
156012
156100
|
certificateByIdURLTemplate,
|
|
156013
|
-
|
|
156101
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156014
156102
|
certificateId
|
|
156015
156103
|
);
|
|
156016
156104
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156028,7 +156116,7 @@ async function updateCertificate({
|
|
|
156028
156116
|
}) {
|
|
156029
156117
|
const urlString = _util2.default.format(
|
|
156030
156118
|
certificateByIdURLTemplate,
|
|
156031
|
-
|
|
156119
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156032
156120
|
certificateId
|
|
156033
156121
|
);
|
|
156034
156122
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156485,7 +156573,7 @@ async function getEnforcedContentSecurityPolicy({
|
|
|
156485
156573
|
}) {
|
|
156486
156574
|
const urlString = _util2.default.format(
|
|
156487
156575
|
enforcedPolicyURLTemplate,
|
|
156488
|
-
|
|
156576
|
+
getHostOnlyUrl(state2.getHost())
|
|
156489
156577
|
);
|
|
156490
156578
|
const { data: data2 } = await generateEnvApi({
|
|
156491
156579
|
resource: getApiConfig17(),
|
|
@@ -156501,7 +156589,7 @@ async function setEnforcedContentSecurityPolicy({
|
|
|
156501
156589
|
}) {
|
|
156502
156590
|
const urlString = _util2.default.format(
|
|
156503
156591
|
enforcedPolicyURLTemplate,
|
|
156504
|
-
|
|
156592
|
+
getHostOnlyUrl(state2.getHost())
|
|
156505
156593
|
);
|
|
156506
156594
|
const { data: data2 } = await generateEnvApi({
|
|
156507
156595
|
resource: getApiConfig17(),
|
|
@@ -156514,7 +156602,7 @@ async function getReportOnlyContentSecurityPolicy({
|
|
|
156514
156602
|
}) {
|
|
156515
156603
|
const urlString = _util2.default.format(
|
|
156516
156604
|
reportOnlyPolicyURLTemplate,
|
|
156517
|
-
|
|
156605
|
+
getHostOnlyUrl(state2.getHost())
|
|
156518
156606
|
);
|
|
156519
156607
|
const { data: data2 } = await generateEnvApi({
|
|
156520
156608
|
resource: getApiConfig17(),
|
|
@@ -156530,7 +156618,7 @@ async function setReportOnlyContentSecurityPolicy({
|
|
|
156530
156618
|
}) {
|
|
156531
156619
|
const urlString = _util2.default.format(
|
|
156532
156620
|
reportOnlyPolicyURLTemplate,
|
|
156533
|
-
|
|
156621
|
+
getHostOnlyUrl(state2.getHost())
|
|
156534
156622
|
);
|
|
156535
156623
|
const { data: data2 } = await generateEnvApi({
|
|
156536
156624
|
resource: getApiConfig17(),
|
|
@@ -156620,7 +156708,7 @@ async function getCookieDomains({
|
|
|
156620
156708
|
}) {
|
|
156621
156709
|
const urlString = _util2.default.format(
|
|
156622
156710
|
cookieDomainsURLTemplate,
|
|
156623
|
-
|
|
156711
|
+
getHostOnlyUrl(state2.getHost())
|
|
156624
156712
|
);
|
|
156625
156713
|
const { data: data2 } = await generateEnvApi({
|
|
156626
156714
|
resource: getApiConfig18(),
|
|
@@ -156636,7 +156724,7 @@ async function setCookieDomains({
|
|
|
156636
156724
|
}) {
|
|
156637
156725
|
const urlString = _util2.default.format(
|
|
156638
156726
|
cookieDomainsURLTemplate,
|
|
156639
|
-
|
|
156727
|
+
getHostOnlyUrl(state2.getHost())
|
|
156640
156728
|
);
|
|
156641
156729
|
const { data: data2 } = await generateEnvApi({
|
|
156642
156730
|
resource: getApiConfig18(),
|
|
@@ -156688,7 +156776,7 @@ async function getCSRs({
|
|
|
156688
156776
|
}) {
|
|
156689
156777
|
const urlString = _util2.default.format(
|
|
156690
156778
|
csrsURLTemplate,
|
|
156691
|
-
|
|
156779
|
+
getHostOnlyUrl(state2.getHost())
|
|
156692
156780
|
);
|
|
156693
156781
|
const { data: data2 } = await generateEnvApi({
|
|
156694
156782
|
resource: getApiConfig19(),
|
|
@@ -156704,7 +156792,7 @@ async function createCSR({
|
|
|
156704
156792
|
}) {
|
|
156705
156793
|
const urlString = _util2.default.format(
|
|
156706
156794
|
csrsURLTemplate,
|
|
156707
|
-
|
|
156795
|
+
getHostOnlyUrl(state2.getHost())
|
|
156708
156796
|
);
|
|
156709
156797
|
const { data: data2 } = await generateEnvApi({
|
|
156710
156798
|
resource: getApiConfig19(),
|
|
@@ -156718,7 +156806,7 @@ async function deleteCSR({
|
|
|
156718
156806
|
}) {
|
|
156719
156807
|
const urlString = _util2.default.format(
|
|
156720
156808
|
csrByIdURLTemplate,
|
|
156721
|
-
|
|
156809
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156722
156810
|
csrId
|
|
156723
156811
|
);
|
|
156724
156812
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156735,7 +156823,7 @@ async function getCSR({
|
|
|
156735
156823
|
}) {
|
|
156736
156824
|
const urlString = _util2.default.format(
|
|
156737
156825
|
csrByIdURLTemplate,
|
|
156738
|
-
|
|
156826
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156739
156827
|
csrId
|
|
156740
156828
|
);
|
|
156741
156829
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156753,7 +156841,7 @@ async function updateCSR({
|
|
|
156753
156841
|
}) {
|
|
156754
156842
|
const urlString = _util2.default.format(
|
|
156755
156843
|
csrByIdURLTemplate,
|
|
156756
|
-
|
|
156844
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156757
156845
|
csrId
|
|
156758
156846
|
);
|
|
156759
156847
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156924,7 +157012,7 @@ async function verifyCNAME({
|
|
|
156924
157012
|
}) {
|
|
156925
157013
|
const urlString = _util2.default.format(
|
|
156926
157014
|
verifyCNAMEURLTemplate,
|
|
156927
|
-
|
|
157015
|
+
getHostOnlyUrl(state2.getHost())
|
|
156928
157016
|
);
|
|
156929
157017
|
const { data: data2 } = await generateEnvApi({
|
|
156930
157018
|
resource: getApiConfig20(),
|
|
@@ -156937,7 +157025,7 @@ async function getCustomDomains({
|
|
|
156937
157025
|
}) {
|
|
156938
157026
|
const urlString = _util2.default.format(
|
|
156939
157027
|
customDomainsURLTemplate,
|
|
156940
|
-
|
|
157028
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156941
157029
|
getCurrentRealmName(state2)
|
|
156942
157030
|
);
|
|
156943
157031
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156954,7 +157042,7 @@ async function setCustomDomains({
|
|
|
156954
157042
|
}) {
|
|
156955
157043
|
const urlString = _util2.default.format(
|
|
156956
157044
|
customDomainsURLTemplate,
|
|
156957
|
-
|
|
157045
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156958
157046
|
getCurrentRealmName(state2)
|
|
156959
157047
|
);
|
|
156960
157048
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157027,7 +157115,7 @@ async function getFederationEnforcement({
|
|
|
157027
157115
|
}) {
|
|
157028
157116
|
const urlString = _util2.default.format(
|
|
157029
157117
|
federationEnforcementURLTemplate,
|
|
157030
|
-
|
|
157118
|
+
getHostOnlyUrl(state2.getHost())
|
|
157031
157119
|
);
|
|
157032
157120
|
const { data: data2 } = await generateEnvApi({
|
|
157033
157121
|
resource: getApiConfig21(),
|
|
@@ -157043,7 +157131,7 @@ async function setFederationEnforcement({
|
|
|
157043
157131
|
}) {
|
|
157044
157132
|
const urlString = _util2.default.format(
|
|
157045
157133
|
federationEnforcementURLTemplate,
|
|
157046
|
-
|
|
157134
|
+
getHostOnlyUrl(state2.getHost())
|
|
157047
157135
|
);
|
|
157048
157136
|
const { data: data2 } = await generateEnvApi({
|
|
157049
157137
|
resource: getApiConfig21(),
|
|
@@ -157130,7 +157218,7 @@ async function lockEnvironment({
|
|
|
157130
157218
|
}) {
|
|
157131
157219
|
const urlString = _util2.default.format(
|
|
157132
157220
|
lockEnvURLTemplate,
|
|
157133
|
-
|
|
157221
|
+
getHostOnlyUrl(state2.getHost())
|
|
157134
157222
|
);
|
|
157135
157223
|
const { data: data2 } = await generateEnvApi({
|
|
157136
157224
|
resource: getApiConfig22(),
|
|
@@ -157144,7 +157232,7 @@ async function unlockEnvironment({
|
|
|
157144
157232
|
}) {
|
|
157145
157233
|
const urlString = _util2.default.format(
|
|
157146
157234
|
unlockEnvByIdURLTemplate,
|
|
157147
|
-
|
|
157235
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157148
157236
|
promotionId
|
|
157149
157237
|
);
|
|
157150
157238
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157160,7 +157248,7 @@ async function getLockStatus({
|
|
|
157160
157248
|
}) {
|
|
157161
157249
|
const urlString = _util2.default.format(
|
|
157162
157250
|
lockStatusURLTemplate,
|
|
157163
|
-
|
|
157251
|
+
getHostOnlyUrl(state2.getHost())
|
|
157164
157252
|
);
|
|
157165
157253
|
const { data: data2 } = await generateEnvApi({
|
|
157166
157254
|
resource: getApiConfig22(),
|
|
@@ -157176,7 +157264,7 @@ async function promoteConfiguration({
|
|
|
157176
157264
|
}) {
|
|
157177
157265
|
const urlString = _util2.default.format(
|
|
157178
157266
|
lockEnvURLTemplate,
|
|
157179
|
-
|
|
157267
|
+
getHostOnlyUrl(state2.getHost())
|
|
157180
157268
|
);
|
|
157181
157269
|
const { data: data2 } = await generateEnvApi({
|
|
157182
157270
|
resource: getApiConfig22(),
|
|
@@ -157189,7 +157277,7 @@ async function getPromotionStatus({
|
|
|
157189
157277
|
}) {
|
|
157190
157278
|
const urlString = _util2.default.format(
|
|
157191
157279
|
promoteEnvURLTemplate,
|
|
157192
|
-
|
|
157280
|
+
getHostOnlyUrl(state2.getHost())
|
|
157193
157281
|
);
|
|
157194
157282
|
const { data: data2 } = await generateEnvApi({
|
|
157195
157283
|
resource: getApiConfig22(),
|
|
@@ -157204,7 +157292,7 @@ async function getLastPromotionReport({
|
|
|
157204
157292
|
}) {
|
|
157205
157293
|
const urlString = _util2.default.format(
|
|
157206
157294
|
reportURLTemplate,
|
|
157207
|
-
|
|
157295
|
+
getHostOnlyUrl(state2.getHost())
|
|
157208
157296
|
);
|
|
157209
157297
|
const { data: data2 } = await generateEnvApi({
|
|
157210
157298
|
resource: getApiConfig22(),
|
|
@@ -157220,7 +157308,7 @@ async function getPromotionReport({
|
|
|
157220
157308
|
}) {
|
|
157221
157309
|
const urlString = _util2.default.format(
|
|
157222
157310
|
reportByIdURLTemplate,
|
|
157223
|
-
|
|
157311
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157224
157312
|
reportId
|
|
157225
157313
|
);
|
|
157226
157314
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157236,7 +157324,7 @@ async function getProvisionalPromotionReport({
|
|
|
157236
157324
|
}) {
|
|
157237
157325
|
const urlString = _util2.default.format(
|
|
157238
157326
|
provisionalPromotionReportURLTemplate,
|
|
157239
|
-
|
|
157327
|
+
getHostOnlyUrl(state2.getHost())
|
|
157240
157328
|
);
|
|
157241
157329
|
const { data: data2 } = await generateEnvApi({
|
|
157242
157330
|
resource: getApiConfig22(),
|
|
@@ -157251,7 +157339,7 @@ async function getProvisionalRollbackReport({
|
|
|
157251
157339
|
}) {
|
|
157252
157340
|
const urlString = _util2.default.format(
|
|
157253
157341
|
provisionalRollbackReportURLTemplate,
|
|
157254
|
-
|
|
157342
|
+
getHostOnlyUrl(state2.getHost())
|
|
157255
157343
|
);
|
|
157256
157344
|
const { data: data2 } = await generateEnvApi({
|
|
157257
157345
|
resource: getApiConfig22(),
|
|
@@ -157266,7 +157354,7 @@ async function getPromotionReports({
|
|
|
157266
157354
|
}) {
|
|
157267
157355
|
const urlString = _util2.default.format(
|
|
157268
157356
|
reportsURLTemplate,
|
|
157269
|
-
|
|
157357
|
+
getHostOnlyUrl(state2.getHost())
|
|
157270
157358
|
);
|
|
157271
157359
|
const { data: data2 } = await generateEnvApi({
|
|
157272
157360
|
resource: getApiConfig22(),
|
|
@@ -157282,7 +157370,7 @@ async function rollbackPromotion({
|
|
|
157282
157370
|
}) {
|
|
157283
157371
|
const urlString = _util2.default.format(
|
|
157284
157372
|
rollbackURLTemplate,
|
|
157285
|
-
|
|
157373
|
+
getHostOnlyUrl(state2.getHost())
|
|
157286
157374
|
);
|
|
157287
157375
|
const { data: data2 } = await generateEnvApi({
|
|
157288
157376
|
resource: getApiConfig22(),
|
|
@@ -157456,7 +157544,7 @@ async function getRelease({
|
|
|
157456
157544
|
}) {
|
|
157457
157545
|
const urlString = _util2.default.format(
|
|
157458
157546
|
releaseURLTemplate,
|
|
157459
|
-
|
|
157547
|
+
getHostOnlyUrl(state2.getHost())
|
|
157460
157548
|
);
|
|
157461
157549
|
const { data: data2 } = await generateEnvApi({
|
|
157462
157550
|
resource: getApiConfig23(),
|
|
@@ -157499,7 +157587,7 @@ async function getSSOCookieConfig({
|
|
|
157499
157587
|
}) {
|
|
157500
157588
|
const urlString = _util2.default.format(
|
|
157501
157589
|
ssoCookieConfigURLTemplate,
|
|
157502
|
-
|
|
157590
|
+
getHostOnlyUrl(state2.getHost())
|
|
157503
157591
|
);
|
|
157504
157592
|
const { data: data2 } = await generateEnvApi({
|
|
157505
157593
|
resource: getApiConfig24(),
|
|
@@ -157514,7 +157602,7 @@ async function resetSSOCookieConfig({
|
|
|
157514
157602
|
}) {
|
|
157515
157603
|
const urlString = _util2.default.format(
|
|
157516
157604
|
resetSsoCookieConfigURLTemplate,
|
|
157517
|
-
|
|
157605
|
+
getHostOnlyUrl(state2.getHost())
|
|
157518
157606
|
);
|
|
157519
157607
|
const { data: data2 } = await generateEnvApi({
|
|
157520
157608
|
resource: getApiConfig24(),
|
|
@@ -157528,7 +157616,7 @@ async function setSSOCookieConfig({
|
|
|
157528
157616
|
}) {
|
|
157529
157617
|
const urlString = _util2.default.format(
|
|
157530
157618
|
ssoCookieConfigURLTemplate,
|
|
157531
|
-
|
|
157619
|
+
getHostOnlyUrl(state2.getHost())
|
|
157532
157620
|
);
|
|
157533
157621
|
const { data: data2 } = await generateEnvApi({
|
|
157534
157622
|
resource: getApiConfig24(),
|
|
@@ -157592,7 +157680,7 @@ async function getEsvCount({
|
|
|
157592
157680
|
}) {
|
|
157593
157681
|
const urlString = _util2.default.format(
|
|
157594
157682
|
countOfESVsURLTemplate,
|
|
157595
|
-
|
|
157683
|
+
getHostOnlyUrl(state2.getHost())
|
|
157596
157684
|
);
|
|
157597
157685
|
const { data: data2 } = await generateEnvApi({
|
|
157598
157686
|
resource: getApiConfig25(),
|
|
@@ -157631,7 +157719,7 @@ async function getLogApiKey({
|
|
|
157631
157719
|
}) {
|
|
157632
157720
|
const urlString = _util2.default.format(
|
|
157633
157721
|
logsAPIKeyURLTemplate,
|
|
157634
|
-
|
|
157722
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157635
157723
|
keyId
|
|
157636
157724
|
);
|
|
157637
157725
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).get(urlString);
|
|
@@ -157642,7 +157730,7 @@ async function getLogApiKeys({
|
|
|
157642
157730
|
}) {
|
|
157643
157731
|
const urlString = _util2.default.format(
|
|
157644
157732
|
logsGetAPIKeysURLTemplate,
|
|
157645
|
-
|
|
157733
|
+
getHostOnlyUrl(state2.getHost())
|
|
157646
157734
|
);
|
|
157647
157735
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).get(urlString);
|
|
157648
157736
|
return data2;
|
|
@@ -157652,7 +157740,7 @@ async function getSources({
|
|
|
157652
157740
|
}) {
|
|
157653
157741
|
const urlString = _util2.default.format(
|
|
157654
157742
|
logsSourcesURLTemplate,
|
|
157655
|
-
|
|
157743
|
+
getHostOnlyUrl(state2.getHost())
|
|
157656
157744
|
);
|
|
157657
157745
|
const { data: data2 } = await generateLogApi({ state: state2 }).get(urlString);
|
|
157658
157746
|
return data2;
|
|
@@ -157671,7 +157759,7 @@ async function isLogApiKeyValid({
|
|
|
157671
157759
|
};
|
|
157672
157760
|
const urlString = _util2.default.format(
|
|
157673
157761
|
logsSourcesURLTemplate,
|
|
157674
|
-
|
|
157762
|
+
getHostOnlyUrl(state2.getHost())
|
|
157675
157763
|
);
|
|
157676
157764
|
await generateLogApi({ requestOverride, state: state2 }).get(urlString);
|
|
157677
157765
|
return true;
|
|
@@ -157685,7 +157773,7 @@ async function createLogApiKey({
|
|
|
157685
157773
|
}) {
|
|
157686
157774
|
const urlString = _util2.default.format(
|
|
157687
157775
|
logsCreateAPIKeyAndSecretURLTemplate,
|
|
157688
|
-
|
|
157776
|
+
getHostOnlyUrl(state2.getHost())
|
|
157689
157777
|
);
|
|
157690
157778
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).post(urlString, {
|
|
157691
157779
|
name: keyName
|
|
@@ -157698,7 +157786,7 @@ async function deleteLogApiKey({
|
|
|
157698
157786
|
}) {
|
|
157699
157787
|
const urlString = _util2.default.format(
|
|
157700
157788
|
logsAPIKeyURLTemplate,
|
|
157701
|
-
|
|
157789
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157702
157790
|
keyId
|
|
157703
157791
|
);
|
|
157704
157792
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).delete(urlString, {
|
|
@@ -157713,7 +157801,7 @@ async function tail({
|
|
|
157713
157801
|
}) {
|
|
157714
157802
|
let urlString = _util2.default.format(
|
|
157715
157803
|
logsTailURLTemplate,
|
|
157716
|
-
|
|
157804
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157717
157805
|
encodeURIComponent(source)
|
|
157718
157806
|
);
|
|
157719
157807
|
if (cookie) {
|
|
@@ -157731,7 +157819,7 @@ async function fetch2({
|
|
|
157731
157819
|
}) {
|
|
157732
157820
|
let urlString = _util2.default.format(
|
|
157733
157821
|
logsFetchURLTemplate,
|
|
157734
|
-
|
|
157822
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157735
157823
|
encodeURIComponent(source),
|
|
157736
157824
|
startTs,
|
|
157737
157825
|
endTs
|
|
@@ -158108,14 +158196,14 @@ async function fetch3({
|
|
|
158108
158196
|
throw new FrodoError(`Error fetching logs`, error2);
|
|
158109
158197
|
}
|
|
158110
158198
|
}
|
|
158111
|
-
var scriptActionsUrlTemplate = "%s/
|
|
158199
|
+
var scriptActionsUrlTemplate = "%s/script?_action=%s";
|
|
158112
158200
|
async function compileScript({
|
|
158113
158201
|
script,
|
|
158114
158202
|
state: state2
|
|
158115
158203
|
}) {
|
|
158116
158204
|
const urlString = _util2.default.format(
|
|
158117
158205
|
scriptActionsUrlTemplate,
|
|
158118
|
-
|
|
158206
|
+
getIdmBaseUrl(state2),
|
|
158119
158207
|
"compile"
|
|
158120
158208
|
);
|
|
158121
158209
|
const postData = {
|
|
@@ -158135,7 +158223,7 @@ async function evaluateScript({
|
|
|
158135
158223
|
}) {
|
|
158136
158224
|
const urlString = _util2.default.format(
|
|
158137
158225
|
scriptActionsUrlTemplate,
|
|
158138
|
-
|
|
158226
|
+
getIdmBaseUrl(state2),
|
|
158139
158227
|
"eval"
|
|
158140
158228
|
);
|
|
158141
158229
|
const postData = {
|
|
@@ -159055,7 +159143,7 @@ async function getStatus({
|
|
|
159055
159143
|
}) {
|
|
159056
159144
|
const urlString = _util2.default.format(
|
|
159057
159145
|
startupURLTemplate,
|
|
159058
|
-
|
|
159146
|
+
getHostOnlyUrl(state2.getHost())
|
|
159059
159147
|
);
|
|
159060
159148
|
const { data: data2 } = await generateEnvApi({
|
|
159061
159149
|
resource: getApiConfig26(),
|
|
@@ -159072,7 +159160,7 @@ async function initiateRestart({
|
|
|
159072
159160
|
if (restartStatus === "ready") {
|
|
159073
159161
|
const urlString = _util2.default.format(
|
|
159074
159162
|
startupInitiateRestartURLTemplate,
|
|
159075
|
-
|
|
159163
|
+
getHostOnlyUrl(state2.getHost())
|
|
159076
159164
|
);
|
|
159077
159165
|
const { data: data2 } = await generateEnvApi({
|
|
159078
159166
|
resource: getApiConfig26(),
|
|
@@ -159098,7 +159186,7 @@ async function getVariables({
|
|
|
159098
159186
|
}) {
|
|
159099
159187
|
const urlString = _util2.default.format(
|
|
159100
159188
|
variablesListURLTemplate,
|
|
159101
|
-
|
|
159189
|
+
getHostOnlyUrl(state2.getHost())
|
|
159102
159190
|
);
|
|
159103
159191
|
const { data: data2 } = await generateEnvApi({
|
|
159104
159192
|
resource: getApiConfig27(),
|
|
@@ -159114,7 +159202,7 @@ async function getVariable({
|
|
|
159114
159202
|
}) {
|
|
159115
159203
|
const urlString = _util2.default.format(
|
|
159116
159204
|
variableURLTemplate,
|
|
159117
|
-
|
|
159205
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159118
159206
|
variableId
|
|
159119
159207
|
);
|
|
159120
159208
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159139,7 +159227,7 @@ async function putVariable({
|
|
|
159139
159227
|
};
|
|
159140
159228
|
const urlString = _util2.default.format(
|
|
159141
159229
|
variableURLTemplate,
|
|
159142
|
-
|
|
159230
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159143
159231
|
variableId
|
|
159144
159232
|
);
|
|
159145
159233
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159157,7 +159245,7 @@ async function setVariableDescription({
|
|
|
159157
159245
|
}) {
|
|
159158
159246
|
const urlString = _util2.default.format(
|
|
159159
159247
|
variableSetDescriptionURLTemplate,
|
|
159160
|
-
|
|
159248
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159161
159249
|
variableId
|
|
159162
159250
|
);
|
|
159163
159251
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159172,7 +159260,7 @@ async function deleteVariable({
|
|
|
159172
159260
|
}) {
|
|
159173
159261
|
const urlString = _util2.default.format(
|
|
159174
159262
|
variableURLTemplate,
|
|
159175
|
-
|
|
159263
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159176
159264
|
variableId
|
|
159177
159265
|
);
|
|
159178
159266
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -167288,7 +167376,7 @@ async function getEnvInfo({
|
|
|
167288
167376
|
}) {
|
|
167289
167377
|
const urlString = _util2.default.format(
|
|
167290
167378
|
envInfoURLTemplate2,
|
|
167291
|
-
|
|
167379
|
+
getHostOnlyUrl(state2.getHost())
|
|
167292
167380
|
);
|
|
167293
167381
|
const { data: data2 } = await generateAmApi({
|
|
167294
167382
|
resource: getApiConfig33(),
|
|
@@ -167358,18 +167446,15 @@ async function getInfo(state2) {
|
|
|
167358
167446
|
}
|
|
167359
167447
|
var apiVersion35 = "resource=1.0";
|
|
167360
167448
|
var apiConfig = { headers: { "Accept-API-Version": apiVersion35 } };
|
|
167361
|
-
var reconUrlTemplate = "%s/
|
|
167362
|
-
var reconByIdUrlTemplate = "%s/
|
|
167363
|
-
var startReconUrlTemplate = "%s/
|
|
167364
|
-
var startReconByIdUrlTemplate = "%s/
|
|
167365
|
-
var cancelReconUrlTemplate = "%s/
|
|
167449
|
+
var reconUrlTemplate = "%s/recon";
|
|
167450
|
+
var reconByIdUrlTemplate = "%s/recon/%s";
|
|
167451
|
+
var startReconUrlTemplate = "%s/recon?_action=recon&mapping=%s";
|
|
167452
|
+
var startReconByIdUrlTemplate = "%s/recon?_action=reconById&mapping=%s&id=%s";
|
|
167453
|
+
var cancelReconUrlTemplate = "%s/recon/%s?_action=cancel";
|
|
167366
167454
|
async function getRecons({
|
|
167367
167455
|
state: state2
|
|
167368
167456
|
}) {
|
|
167369
|
-
const urlString = _util2.default.format(
|
|
167370
|
-
reconUrlTemplate,
|
|
167371
|
-
getHostBaseUrl(state2.getHost())
|
|
167372
|
-
);
|
|
167457
|
+
const urlString = _util2.default.format(reconUrlTemplate, getIdmBaseUrl(state2));
|
|
167373
167458
|
const { data: data2 } = await generateIdmApi({
|
|
167374
167459
|
requestOverride: apiConfig,
|
|
167375
167460
|
state: state2
|
|
@@ -167382,7 +167467,7 @@ async function getRecon({
|
|
|
167382
167467
|
}) {
|
|
167383
167468
|
const urlString = _util2.default.format(
|
|
167384
167469
|
reconByIdUrlTemplate,
|
|
167385
|
-
|
|
167470
|
+
getIdmBaseUrl(state2),
|
|
167386
167471
|
reconId
|
|
167387
167472
|
);
|
|
167388
167473
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -167397,7 +167482,7 @@ async function startRecon({
|
|
|
167397
167482
|
}) {
|
|
167398
167483
|
const urlString = _util2.default.format(
|
|
167399
167484
|
startReconUrlTemplate,
|
|
167400
|
-
|
|
167485
|
+
getIdmBaseUrl(state2),
|
|
167401
167486
|
mappingName
|
|
167402
167487
|
);
|
|
167403
167488
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -167413,7 +167498,7 @@ async function startReconById({
|
|
|
167413
167498
|
}) {
|
|
167414
167499
|
const urlString = _util2.default.format(
|
|
167415
167500
|
startReconByIdUrlTemplate,
|
|
167416
|
-
|
|
167501
|
+
getIdmBaseUrl(state2),
|
|
167417
167502
|
mappingName,
|
|
167418
167503
|
objectId
|
|
167419
167504
|
);
|
|
@@ -167429,7 +167514,7 @@ async function cancelRecon({
|
|
|
167429
167514
|
}) {
|
|
167430
167515
|
const urlString = _util2.default.format(
|
|
167431
167516
|
cancelReconUrlTemplate,
|
|
167432
|
-
|
|
167517
|
+
getIdmBaseUrl(state2),
|
|
167433
167518
|
reconId
|
|
167434
167519
|
);
|
|
167435
167520
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -168157,7 +168242,7 @@ function createObjectTable(object, keyMap = {}) {
|
|
|
168157
168242
|
var { DEFAULT_REALM_KEY: DEFAULT_REALM_KEY2, DEPLOYMENT_TYPES: DEPLOYMENT_TYPES2 } = frodo.utils.constants;
|
|
168158
168243
|
var hostArgument = new Argument(
|
|
168159
168244
|
"[host]",
|
|
168160
|
-
"
|
|
168245
|
+
"AM base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring."
|
|
168161
168246
|
);
|
|
168162
168247
|
var realmArgument = new Argument(
|
|
168163
168248
|
"[realm]",
|
|
@@ -168172,6 +168257,18 @@ var usernameArgument = new Argument(
|
|
|
168172
168257
|
"Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees."
|
|
168173
168258
|
);
|
|
168174
168259
|
var passwordArgument = new Argument("[password]", "Password.");
|
|
168260
|
+
var idmHostOption = new Option(
|
|
168261
|
+
"--idm-host <idm-host>",
|
|
168262
|
+
'IDM base URL, e.g.: https://cdk.idm.example.com/myidm. Use only if your IDM installation resides in a different domain and/or if the base path differs from the default "/openidm".'
|
|
168263
|
+
);
|
|
168264
|
+
var loginClientId = new Option(
|
|
168265
|
+
"--login-client-id <client-id>",
|
|
168266
|
+
'Specify a custom OAuth2 client id to use a your own oauth2 client for IDM API calls in deployments of type "cloud" or "forgeops". Your custom client must be configured as a public client and allow the authorization code grant using the "openid fr:idm:*" scope. Use the "--redirect-uri" parameter if you have configured a custom redirect uri (default: "<host>/platform/appAuthHelperRedirect.html").'
|
|
168267
|
+
);
|
|
168268
|
+
var loginRedirectUri = new Option(
|
|
168269
|
+
"--login-redirect-uri <redirect-uri>",
|
|
168270
|
+
'Specify a custom redirect URI to use with your custom OAuth2 client (efault: "<host>/platform/appAuthHelperRedirect.html").'
|
|
168271
|
+
);
|
|
168175
168272
|
var serviceAccountIdOption = new Option(
|
|
168176
168273
|
"--sa-id <sa-id>",
|
|
168177
168274
|
"Service account id."
|
|
@@ -168216,6 +168313,9 @@ var defaultArgs = [
|
|
|
168216
168313
|
passwordArgument
|
|
168217
168314
|
];
|
|
168218
168315
|
var defaultOpts = [
|
|
168316
|
+
idmHostOption,
|
|
168317
|
+
loginClientId,
|
|
168318
|
+
loginRedirectUri,
|
|
168219
168319
|
serviceAccountIdOption,
|
|
168220
168320
|
serviceAccountJwkFileOption,
|
|
168221
168321
|
deploymentOption,
|
|
@@ -168232,6 +168332,9 @@ var stateMap = {
|
|
|
168232
168332
|
[realmArgument.name()]: (realm2) => state.setRealm(realm2),
|
|
168233
168333
|
[usernameArgument.name()]: (username2) => state.setUsername(username2),
|
|
168234
168334
|
[passwordArgument.name()]: (password3) => state.setPassword(password3),
|
|
168335
|
+
[idmHostOption.attributeName()]: (idmHost) => state.setIdmHost(idmHost),
|
|
168336
|
+
[loginClientId.attributeName()]: (clientId) => state.setAdminClientId(clientId),
|
|
168337
|
+
[loginRedirectUri.attributeName()]: (redirectUri) => state.setAdminClientRedirectUri(redirectUri),
|
|
168235
168338
|
[serviceAccountIdOption.attributeName()]: (saId2) => state.setServiceAccountId(saId2),
|
|
168236
168339
|
[serviceAccountJwkFileOption.attributeName()]: (file) => {
|
|
168237
168340
|
try {
|
|
@@ -168323,18 +168426,21 @@ var FrodoCommand = class extends FrodoStubCommand {
|
|
|
168323
168426
|
"after",
|
|
168324
168427
|
`
|
|
168325
168428
|
Environment Variables:
|
|
168326
|
-
FRODO_HOST:
|
|
168327
|
-
|
|
168328
|
-
|
|
168329
|
-
|
|
168330
|
-
|
|
168331
|
-
|
|
168429
|
+
FRODO_HOST: AM base URL. Overridden by 'host' argument.
|
|
168430
|
+
FRODO_IDM_HOST: IDM base URL. Overridden by '--idm-host' option.
|
|
168431
|
+
FRODO_REALM: Realm. Overridden by 'realm' argument.
|
|
168432
|
+
FRODO_USERNAME: Username. Overridden by 'username' argument.
|
|
168433
|
+
FRODO_PASSWORD: Password. Overridden by 'password' argument.
|
|
168434
|
+
FRODO_LOGIN_CLIENT_ID: OAuth2 client id for IDM API calls. Overridden by '--login-client-id' option.
|
|
168435
|
+
FRODO_LOGIN_REDIRECT_URI: Redirect Uri for custom OAuth2 client id. Overridden by '--login-redirect-uri' option.
|
|
168436
|
+
FRODO_SA_ID: Service account uuid. Overridden by '--sa-id' option.
|
|
168437
|
+
FRODO_SA_JWK: Service account JWK. Overridden by '--sa-jwk-file' option but takes the actual JWK as a value, not a file name.
|
|
168332
168438
|
FRODO_NO_CACHE: Disable token cache. Same as '--no-cache' option.
|
|
168333
168439
|
FRODO_TOKEN_CACHE_PATH: Use this token cache file instead of '~/.frodo/TokenCache.json'.
|
|
168334
|
-
` + ("frodo conn save" === this.name() ? ` FRODO_LOG_KEY: Log API key.
|
|
168335
|
-
FRODO_LOG_SECRET: Log API secret.
|
|
168336
|
-
` : ``) + (this.name().startsWith("frodo log") ? ` FRODO_LOG_KEY: Log API key.
|
|
168337
|
-
FRODO_LOG_SECRET: Log API secret.
|
|
168440
|
+
` + ("frodo conn save" === this.name() ? ` FRODO_LOG_KEY: Log API key. Overridden by '--log-api-key' option.
|
|
168441
|
+
FRODO_LOG_SECRET: Log API secret. Overridden by '--log-api-secret' option.
|
|
168442
|
+
` : ``) + (this.name().startsWith("frodo log") ? ` FRODO_LOG_KEY: Log API key. Overridden by 'username' argument.
|
|
168443
|
+
FRODO_LOG_SECRET: Log API secret. Overridden by 'password' argument.
|
|
168338
168444
|
` : ``) + ` FRODO_CONNECTION_PROFILES_PATH: Use this connection profiles file instead of '~/.frodo/Connections.json'.
|
|
168339
168445
|
FRODO_AUTHENTICATION_SERVICE: Name of a login journey to use.
|
|
168340
168446
|
FRODO_DEBUG: Set to any value to enable debug output. Same as '--debug'.
|
|
@@ -177434,6 +177540,8 @@ var {
|
|
|
177434
177540
|
saveToFile: saveToFile3
|
|
177435
177541
|
} = frodo.utils;
|
|
177436
177542
|
var {
|
|
177543
|
+
readScript: readScript2,
|
|
177544
|
+
readScriptByName: readScriptByName2,
|
|
177437
177545
|
readScripts: readScripts2,
|
|
177438
177546
|
exportScript: exportScript2,
|
|
177439
177547
|
exportScriptByName: exportScriptByName2,
|
|
@@ -177443,6 +177551,7 @@ var {
|
|
|
177443
177551
|
deleteScriptByName: deleteScriptByName3,
|
|
177444
177552
|
deleteScripts: deleteScripts3
|
|
177445
177553
|
} = frodo.script;
|
|
177554
|
+
var langMap = { JAVASCRIPT: "JavaScript", GROOVY: "Groovy" };
|
|
177446
177555
|
function getOneLineDescription(scriptObj) {
|
|
177447
177556
|
const description = `[${scriptObj._id["brightCyan"]}] ${scriptObj.context} - ${scriptObj.name}`;
|
|
177448
177557
|
return description;
|
|
@@ -177454,7 +177563,6 @@ function getTableHeaderMd() {
|
|
|
177454
177563
|
return markdown;
|
|
177455
177564
|
}
|
|
177456
177565
|
function getTableRowMd(scriptObj) {
|
|
177457
|
-
const langMap = { JAVASCRIPT: "JavaScript", GROOVY: "Groovy" };
|
|
177458
177566
|
const description = `| ${scriptObj.name} | ${langMap[scriptObj.language]} | ${titleCase7(scriptObj.context.split("_").join(" "))} | \`${scriptObj._id}\` |`;
|
|
177459
177567
|
return description;
|
|
177460
177568
|
}
|
|
@@ -177496,11 +177604,12 @@ async function listScripts(long = false, usage = false, file = null) {
|
|
|
177496
177604
|
printError2(error2);
|
|
177497
177605
|
return false;
|
|
177498
177606
|
}
|
|
177499
|
-
|
|
177607
|
+
for (const realmExport of Object.values(fullExport.realm)) {
|
|
177608
|
+
delete realmExport.script;
|
|
177609
|
+
}
|
|
177500
177610
|
headers2.push("Used");
|
|
177501
177611
|
}
|
|
177502
177612
|
const table = createTable(headers2);
|
|
177503
|
-
const langMap = { JAVASCRIPT: "JS", GROOVY: "Groovy" };
|
|
177504
177613
|
scripts.forEach((script) => {
|
|
177505
177614
|
const values3 = long ? [
|
|
177506
177615
|
wordwrap(script.name, 25, " "),
|
|
@@ -177510,9 +177619,9 @@ async function listScripts(long = false, usage = false, file = null) {
|
|
|
177510
177619
|
wordwrap(script.description, 30)
|
|
177511
177620
|
] : [wordwrap(script.name, 25, " ")];
|
|
177512
177621
|
if (usage) {
|
|
177513
|
-
const
|
|
177622
|
+
const locations = getIdLocations(fullExport, script._id, false);
|
|
177514
177623
|
values3.push(
|
|
177515
|
-
|
|
177624
|
+
locations.length > 0 ? `${"yes"["brightGreen"]} (${locations.length === 1 ? `at` : `${locations.length} uses, including:`} ${locations[0]})` : "no"["brightRed"]
|
|
177516
177625
|
);
|
|
177517
177626
|
}
|
|
177518
177627
|
table.push(values3);
|
|
@@ -177521,6 +177630,87 @@ async function listScripts(long = false, usage = false, file = null) {
|
|
|
177521
177630
|
debugMessage2(`Cli.ScriptOps.listScripts: end`);
|
|
177522
177631
|
return true;
|
|
177523
177632
|
}
|
|
177633
|
+
async function describeScript(scriptId, scriptName, file, usage = false, json = false) {
|
|
177634
|
+
const spinnerId = createProgressIndicator2(
|
|
177635
|
+
"indeterminate",
|
|
177636
|
+
0,
|
|
177637
|
+
`Describing script '${scriptId ? scriptId : scriptName}'...`
|
|
177638
|
+
);
|
|
177639
|
+
try {
|
|
177640
|
+
let script;
|
|
177641
|
+
if (scriptId) {
|
|
177642
|
+
script = await readScript2(scriptId);
|
|
177643
|
+
} else {
|
|
177644
|
+
script = await readScriptByName2(scriptName);
|
|
177645
|
+
}
|
|
177646
|
+
if (usage) {
|
|
177647
|
+
try {
|
|
177648
|
+
const fullExport = await getFullExportConfig(file);
|
|
177649
|
+
for (const realmExport of Object.values(fullExport.realm)) {
|
|
177650
|
+
delete realmExport.script;
|
|
177651
|
+
}
|
|
177652
|
+
script.locations = getIdLocations(fullExport, script._id, false);
|
|
177653
|
+
} catch (error2) {
|
|
177654
|
+
stopProgressIndicator2(
|
|
177655
|
+
spinnerId,
|
|
177656
|
+
`Error determining usage for script '${scriptId ? scriptId : scriptName}'`,
|
|
177657
|
+
"fail"
|
|
177658
|
+
);
|
|
177659
|
+
printError2(error2);
|
|
177660
|
+
return false;
|
|
177661
|
+
}
|
|
177662
|
+
}
|
|
177663
|
+
stopProgressIndicator2(
|
|
177664
|
+
spinnerId,
|
|
177665
|
+
`Successfully retrieved script '${scriptId ? scriptId : scriptName}'`,
|
|
177666
|
+
"success"
|
|
177667
|
+
);
|
|
177668
|
+
if (json) {
|
|
177669
|
+
printMessage2(script, "data");
|
|
177670
|
+
} else {
|
|
177671
|
+
const table = createKeyValueTable();
|
|
177672
|
+
table.push(["Id"["brightCyan"], script._id]);
|
|
177673
|
+
table.push(["Name"["brightCyan"], script.name]);
|
|
177674
|
+
table.push(["Language"["brightCyan"], langMap[script.language]]);
|
|
177675
|
+
table.push([
|
|
177676
|
+
"Context"["brightCyan"],
|
|
177677
|
+
titleCase7(script.context.split("_").join(" "))
|
|
177678
|
+
]);
|
|
177679
|
+
table.push(["Description"["brightCyan"], script.description]);
|
|
177680
|
+
table.push([
|
|
177681
|
+
"Default"["brightCyan"],
|
|
177682
|
+
script.default ? "true"["brightGreen"] : "false"["brightRed"]
|
|
177683
|
+
]);
|
|
177684
|
+
table.push(["Evaluator Version"["brightCyan"], script.evaluatorVersion]);
|
|
177685
|
+
const scriptWrapLength = 80;
|
|
177686
|
+
const wrapRegex = new RegExp(`.{1,${scriptWrapLength + 1}}`, "g");
|
|
177687
|
+
const scriptParts = script.script.match(wrapRegex);
|
|
177688
|
+
table.push(["Script (Base 64)"["brightCyan"], scriptParts[0]]);
|
|
177689
|
+
for (let i2 = 1; i2 < scriptParts.length; i2++) {
|
|
177690
|
+
table.push(["", scriptParts[i2]]);
|
|
177691
|
+
}
|
|
177692
|
+
if (usage) {
|
|
177693
|
+
table.push([
|
|
177694
|
+
`Usage Locations (${script.locations.length} total)`["brightCyan"],
|
|
177695
|
+
script.locations.length > 0 ? script.locations[0] : ""
|
|
177696
|
+
]);
|
|
177697
|
+
for (let i2 = 1; i2 < script.locations.length; i2++) {
|
|
177698
|
+
table.push(["", script.locations[i2]]);
|
|
177699
|
+
}
|
|
177700
|
+
}
|
|
177701
|
+
printMessage2(table.toString(), "data");
|
|
177702
|
+
}
|
|
177703
|
+
return true;
|
|
177704
|
+
} catch (error2) {
|
|
177705
|
+
stopProgressIndicator2(
|
|
177706
|
+
spinnerId,
|
|
177707
|
+
`Error describing script '${scriptId ? scriptId : scriptName}'`,
|
|
177708
|
+
"fail"
|
|
177709
|
+
);
|
|
177710
|
+
printError2(error2);
|
|
177711
|
+
}
|
|
177712
|
+
return false;
|
|
177713
|
+
}
|
|
177524
177714
|
async function exportScriptToFile(scriptId, file, includeMeta = true, extract = false, options2) {
|
|
177525
177715
|
debugMessage2(`Cli.ScriptOps.exportScriptToFile: start`);
|
|
177526
177716
|
try {
|
|
@@ -178037,8 +178227,8 @@ async function getConfigFromDirectory(directory, exportConfig) {
|
|
|
178037
178227
|
});
|
|
178038
178228
|
}
|
|
178039
178229
|
}
|
|
178040
|
-
function
|
|
178041
|
-
return
|
|
178230
|
+
function getIdLocations(configuration, id7, isEsv) {
|
|
178231
|
+
return getIdLocationsRecurse(
|
|
178042
178232
|
configuration,
|
|
178043
178233
|
isEsv ? (
|
|
178044
178234
|
// For ESV ids, they contain either letters, numbers, dashes, or underscores. The dashes get replaced with periods (escaped with a \ for the regex)
|
|
@@ -178054,24 +178244,24 @@ function isIdUsed(configuration, id7, isEsv) {
|
|
|
178054
178244
|
)
|
|
178055
178245
|
);
|
|
178056
178246
|
}
|
|
178057
|
-
function
|
|
178247
|
+
function getIdLocationsRecurse(configuration, regex2) {
|
|
178248
|
+
let locations = [];
|
|
178058
178249
|
const type = typeof configuration;
|
|
178059
178250
|
if (type === "object" && configuration !== null) {
|
|
178060
178251
|
for (const [id7, value] of Object.entries(
|
|
178061
178252
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
178062
178253
|
configuration
|
|
178063
178254
|
)) {
|
|
178064
|
-
const
|
|
178065
|
-
|
|
178066
|
-
|
|
178067
|
-
|
|
178068
|
-
|
|
178255
|
+
const usedLocations = getIdLocationsRecurse(value, regex2);
|
|
178256
|
+
const updatedLocations = usedLocations.map(
|
|
178257
|
+
(loc) => id7 + (value.name ? `(name: '${value.name}')` : "") + (loc === "" ? "" : ".") + loc
|
|
178258
|
+
);
|
|
178259
|
+
locations = locations.concat(updatedLocations);
|
|
178069
178260
|
}
|
|
178261
|
+
} else if (type === "string" && regex2.test(configuration)) {
|
|
178262
|
+
locations.push("");
|
|
178070
178263
|
}
|
|
178071
|
-
return
|
|
178072
|
-
used: type === "string" && regex2.test(configuration),
|
|
178073
|
-
location: ""
|
|
178074
|
-
};
|
|
178264
|
+
return locations;
|
|
178075
178265
|
}
|
|
178076
178266
|
|
|
178077
178267
|
// src/ops/ConfigOps.ts
|
|
@@ -178707,12 +178897,21 @@ async function describeConnectionProfile(host2, showSecrets) {
|
|
|
178707
178897
|
if (profile.logApiSecret) profile.logApiSecret = present;
|
|
178708
178898
|
if (profile.svcacctJwk) profile["svcacctJwk"] = present;
|
|
178709
178899
|
}
|
|
178900
|
+
if (!profile.idmHost) {
|
|
178901
|
+
delete profile.idmHost;
|
|
178902
|
+
}
|
|
178710
178903
|
if (profile.allowInsecureConnection === void 0) {
|
|
178711
178904
|
delete profile.allowInsecureConnection;
|
|
178712
178905
|
}
|
|
178713
178906
|
if (!profile.deploymentType) {
|
|
178714
178907
|
delete profile.deploymentType;
|
|
178715
178908
|
}
|
|
178909
|
+
if (!profile.adminClientId) {
|
|
178910
|
+
delete profile.adminClientId;
|
|
178911
|
+
}
|
|
178912
|
+
if (!profile.adminClientRedirectUri) {
|
|
178913
|
+
delete profile.adminClientRedirectUri;
|
|
178914
|
+
}
|
|
178716
178915
|
if (!profile.username) {
|
|
178717
178916
|
delete profile.username;
|
|
178718
178917
|
delete profile.password;
|
|
@@ -179904,8 +180103,8 @@ async function listSecrets(long = false, usage = false, file = null) {
|
|
|
179904
180103
|
return false;
|
|
179905
180104
|
}
|
|
179906
180105
|
if (!long && !usage) {
|
|
179907
|
-
secrets.forEach((
|
|
179908
|
-
printMessage2(
|
|
180106
|
+
secrets.forEach((secret) => {
|
|
180107
|
+
printMessage2(secret._id, "data");
|
|
179909
180108
|
});
|
|
179910
180109
|
return true;
|
|
179911
180110
|
}
|
|
@@ -179926,7 +180125,7 @@ async function listSecrets(long = false, usage = false, file = null) {
|
|
|
179926
180125
|
printError2(error2);
|
|
179927
180126
|
return false;
|
|
179928
180127
|
}
|
|
179929
|
-
delete fullExport.secrets;
|
|
180128
|
+
delete fullExport.global.secrets;
|
|
179930
180129
|
headers2.push("Used"["brightCyan"]);
|
|
179931
180130
|
}
|
|
179932
180131
|
const table = createTable(headers2);
|
|
@@ -179948,9 +180147,9 @@ async function listSecrets(long = false, usage = false, file = null) {
|
|
|
179948
180147
|
new Date(secret.lastChangeDate).toUTCString()
|
|
179949
180148
|
] : [secret._id];
|
|
179950
180149
|
if (usage) {
|
|
179951
|
-
const
|
|
180150
|
+
const locations = getIdLocations(fullExport, secret._id, true);
|
|
179952
180151
|
values3.push(
|
|
179953
|
-
|
|
180152
|
+
locations.length > 0 ? `${"yes"["brightGreen"]} (${locations.length === 1 ? `at` : `${locations.length} uses, including:`} ${locations[0]})` : "no"["brightRed"]
|
|
179954
180153
|
);
|
|
179955
180154
|
}
|
|
179956
180155
|
table.push(values3);
|
|
@@ -180078,7 +180277,7 @@ async function deleteSecrets() {
|
|
|
180078
180277
|
}
|
|
180079
180278
|
return false;
|
|
180080
180279
|
}
|
|
180081
|
-
async function listSecretVersions(secretId) {
|
|
180280
|
+
async function listSecretVersions(secretId, json = false) {
|
|
180082
180281
|
let spinnerId;
|
|
180083
180282
|
let versions5 = [];
|
|
180084
180283
|
try {
|
|
@@ -180093,6 +180292,10 @@ async function listSecretVersions(secretId) {
|
|
|
180093
180292
|
`Successfully read ${versions5.length} secret versions.`,
|
|
180094
180293
|
"success"
|
|
180095
180294
|
);
|
|
180295
|
+
if (json) {
|
|
180296
|
+
printMessage2(versions5, "data");
|
|
180297
|
+
return true;
|
|
180298
|
+
}
|
|
180096
180299
|
const table = createTable([
|
|
180097
180300
|
{ hAlign: "right", content: "Version"["brightCyan"] },
|
|
180098
180301
|
"Status"["brightCyan"],
|
|
@@ -180120,46 +180323,79 @@ async function listSecretVersions(secretId) {
|
|
|
180120
180323
|
}
|
|
180121
180324
|
return false;
|
|
180122
180325
|
}
|
|
180123
|
-
async function describeSecret(secretId) {
|
|
180326
|
+
async function describeSecret(secretId, file, usage = false, json = false) {
|
|
180124
180327
|
let spinnerId;
|
|
180125
|
-
let secret = null;
|
|
180126
180328
|
try {
|
|
180127
180329
|
spinnerId = createProgressIndicator2(
|
|
180128
180330
|
"indeterminate",
|
|
180129
180331
|
0,
|
|
180130
180332
|
`Reading secret ${secretId}...`
|
|
180131
180333
|
);
|
|
180132
|
-
secret = await readSecret2(secretId);
|
|
180334
|
+
const secret = await readSecret2(secretId);
|
|
180335
|
+
if (usage) {
|
|
180336
|
+
try {
|
|
180337
|
+
const fullExport = await getFullExportConfig(file);
|
|
180338
|
+
delete fullExport.global.secrets;
|
|
180339
|
+
secret.locations = getIdLocations(fullExport, secretId, true);
|
|
180340
|
+
} catch (error2) {
|
|
180341
|
+
stopProgressIndicator2(
|
|
180342
|
+
spinnerId,
|
|
180343
|
+
`Error determining usage for secret with id ${secretId}`,
|
|
180344
|
+
"fail"
|
|
180345
|
+
);
|
|
180346
|
+
printError2(error2);
|
|
180347
|
+
return false;
|
|
180348
|
+
}
|
|
180349
|
+
}
|
|
180133
180350
|
stopProgressIndicator2(
|
|
180134
180351
|
spinnerId,
|
|
180135
180352
|
`Successfully read secret ${secretId}.`,
|
|
180136
180353
|
"success"
|
|
180137
180354
|
);
|
|
180138
|
-
|
|
180139
|
-
|
|
180140
|
-
|
|
180141
|
-
|
|
180142
|
-
|
|
180143
|
-
"
|
|
180144
|
-
|
|
180145
|
-
|
|
180146
|
-
|
|
180147
|
-
|
|
180148
|
-
|
|
180149
|
-
|
|
180150
|
-
|
|
180151
|
-
|
|
180152
|
-
|
|
180153
|
-
|
|
180154
|
-
|
|
180355
|
+
if (json) {
|
|
180356
|
+
printMessage2(secret, "data");
|
|
180357
|
+
} else {
|
|
180358
|
+
const table = createKeyValueTable();
|
|
180359
|
+
table.push(["Name"["brightCyan"], secret._id]);
|
|
180360
|
+
table.push(["Active Version"["brightCyan"], secret.activeVersion]);
|
|
180361
|
+
table.push(["Loaded Version"["brightCyan"], secret.loadedVersion]);
|
|
180362
|
+
table.push([
|
|
180363
|
+
"Status"["brightCyan"],
|
|
180364
|
+
secret.loaded ? "loaded"["brightGreen"] : "unloaded"["brightRed"]
|
|
180365
|
+
]);
|
|
180366
|
+
table.push([
|
|
180367
|
+
"Description"["brightCyan"],
|
|
180368
|
+
wordwrap(secret.description, 60)
|
|
180369
|
+
]);
|
|
180370
|
+
table.push([
|
|
180371
|
+
"Modified"["brightCyan"],
|
|
180372
|
+
new Date(secret.lastChangeDate).toLocaleString()
|
|
180373
|
+
]);
|
|
180374
|
+
let lastChangedBy = secret.lastChangedBy;
|
|
180375
|
+
try {
|
|
180376
|
+
lastChangedBy = state.getUseBearerTokenForAmApis() ? secret.lastChangedBy : await resolveUserName3("teammember", secret.lastChangedBy);
|
|
180377
|
+
} catch (error2) {
|
|
180378
|
+
}
|
|
180379
|
+
table.push(["Modifier"["brightCyan"], lastChangedBy]);
|
|
180380
|
+
table.push(["Modifier UUID"["brightCyan"], secret.lastChangedBy]);
|
|
180381
|
+
table.push(["Encoding"["brightCyan"], secret.encoding]);
|
|
180382
|
+
table.push([
|
|
180383
|
+
"Use In Placeholders"["brightCyan"],
|
|
180384
|
+
secret.useInPlaceholders
|
|
180385
|
+
]);
|
|
180386
|
+
if (usage) {
|
|
180387
|
+
table.push([
|
|
180388
|
+
`Usage Locations (${secret.locations.length} total)`["brightCyan"],
|
|
180389
|
+
secret.locations.length > 0 ? secret.locations[0] : ""
|
|
180390
|
+
]);
|
|
180391
|
+
for (let i2 = 1; i2 < secret.locations.length; i2++) {
|
|
180392
|
+
table.push(["", secret.locations[i2]]);
|
|
180393
|
+
}
|
|
180394
|
+
}
|
|
180395
|
+
printMessage2(table.toString(), "data");
|
|
180155
180396
|
}
|
|
180156
|
-
table.push(["Modifier"["brightCyan"], lastChangedBy]);
|
|
180157
|
-
table.push(["Modifier UUID"["brightCyan"], secret.lastChangedBy]);
|
|
180158
|
-
table.push(["Encoding"["brightCyan"], secret.encoding]);
|
|
180159
|
-
table.push(["Use In Placeholders"["brightCyan"], secret.useInPlaceholders]);
|
|
180160
|
-
printMessage2(table.toString(), "data");
|
|
180161
180397
|
printMessage2("\nSecret Versions:", "data");
|
|
180162
|
-
await listSecretVersions(secretId);
|
|
180398
|
+
await listSecretVersions(secretId, json);
|
|
180163
180399
|
return true;
|
|
180164
180400
|
} catch (error2) {
|
|
180165
180401
|
stopProgressIndicator2(
|
|
@@ -180590,7 +180826,17 @@ function setup89() {
|
|
|
180590
180826
|
"-i, --secret-id <secret-id>",
|
|
180591
180827
|
"Secret id."
|
|
180592
180828
|
).makeOptionMandatory()
|
|
180593
|
-
).
|
|
180829
|
+
).addOption(
|
|
180830
|
+
new Option(
|
|
180831
|
+
"-f, --file [file]",
|
|
180832
|
+
"Optional export file to use to determine usage. Overrides -D, --directory. Only used if -u or --usage is provided as well."
|
|
180833
|
+
)
|
|
180834
|
+
).addOption(
|
|
180835
|
+
new Option(
|
|
180836
|
+
"-u, --usage",
|
|
180837
|
+
"List all uses of the secret. If a file is provided with -f or --file, it will search for usage in the file. If a directory is provided with -D or --directory, it will search for usage in all .json files in the directory and sub-directories. If no file or directory is provided, it will perform a full export automatically to determine usage."
|
|
180838
|
+
).default(false, "false")
|
|
180839
|
+
).addOption(new Option("--json", "Output in JSON format.")).action(
|
|
180594
180840
|
// implement command logic inside action handler
|
|
180595
180841
|
async (host2, user2, password3, options2, command2) => {
|
|
180596
180842
|
command2.handleDefaultArgsAndOpts(
|
|
@@ -180600,11 +180846,21 @@ function setup89() {
|
|
|
180600
180846
|
options2,
|
|
180601
180847
|
command2
|
|
180602
180848
|
);
|
|
180603
|
-
if (await getTokens2(false, true, deploymentTypes25)) {
|
|
180849
|
+
if (options2.secretId && await getTokens2(false, true, deploymentTypes25)) {
|
|
180604
180850
|
verboseMessage2(`Describing secret ${options2.secretId}...`);
|
|
180605
|
-
const outcome = await describeSecret(
|
|
180851
|
+
const outcome = await describeSecret(
|
|
180852
|
+
options2.secretId,
|
|
180853
|
+
options2.file,
|
|
180854
|
+
options2.usage,
|
|
180855
|
+
options2.json
|
|
180856
|
+
);
|
|
180606
180857
|
if (!outcome) process.exitCode = 1;
|
|
180607
180858
|
} else {
|
|
180859
|
+
printMessage2(
|
|
180860
|
+
"Unrecognized combination of options or no options...",
|
|
180861
|
+
"error"
|
|
180862
|
+
);
|
|
180863
|
+
program3.help();
|
|
180608
180864
|
process.exitCode = 1;
|
|
180609
180865
|
}
|
|
180610
180866
|
}
|
|
@@ -181212,7 +181468,7 @@ async function listVariables(long = false, usage = false, file = null) {
|
|
|
181212
181468
|
printError2(error2);
|
|
181213
181469
|
return false;
|
|
181214
181470
|
}
|
|
181215
|
-
delete fullExport.variables;
|
|
181471
|
+
delete fullExport.global.variables;
|
|
181216
181472
|
headers2.push("Used"["brightCyan"]);
|
|
181217
181473
|
}
|
|
181218
181474
|
const table = createTable(headers2);
|
|
@@ -181229,9 +181485,9 @@ async function listVariables(long = false, usage = false, file = null) {
|
|
|
181229
181485
|
new Date(variable.lastChangeDate).toUTCString()
|
|
181230
181486
|
] : [variable._id];
|
|
181231
181487
|
if (usage) {
|
|
181232
|
-
const
|
|
181488
|
+
const locations = getIdLocations(fullExport, variable._id, true);
|
|
181233
181489
|
values3.push(
|
|
181234
|
-
|
|
181490
|
+
locations.length > 0 ? `${"yes"["brightGreen"]} (${locations.length === 1 ? `at` : `${locations.length} uses, including:`} ${locations[0]})` : "no"["brightRed"]
|
|
181235
181491
|
);
|
|
181236
181492
|
}
|
|
181237
181493
|
table.push(values3);
|
|
@@ -181366,7 +181622,7 @@ async function deleteVariables() {
|
|
|
181366
181622
|
}
|
|
181367
181623
|
return false;
|
|
181368
181624
|
}
|
|
181369
|
-
async function describeVariable(variableId, json = false) {
|
|
181625
|
+
async function describeVariable(variableId, file, usage = false, json = false) {
|
|
181370
181626
|
const spinnerId = createProgressIndicator2(
|
|
181371
181627
|
"indeterminate",
|
|
181372
181628
|
0,
|
|
@@ -181374,6 +181630,21 @@ async function describeVariable(variableId, json = false) {
|
|
|
181374
181630
|
);
|
|
181375
181631
|
try {
|
|
181376
181632
|
const variable = await readVariable2(variableId);
|
|
181633
|
+
if (usage) {
|
|
181634
|
+
try {
|
|
181635
|
+
const fullExport = await getFullExportConfig(file);
|
|
181636
|
+
delete fullExport.global.variables;
|
|
181637
|
+
variable.locations = getIdLocations(fullExport, variableId, true);
|
|
181638
|
+
} catch (error2) {
|
|
181639
|
+
stopProgressIndicator2(
|
|
181640
|
+
spinnerId,
|
|
181641
|
+
`Error determining usage for variable with id ${variableId}`,
|
|
181642
|
+
"fail"
|
|
181643
|
+
);
|
|
181644
|
+
printError2(error2);
|
|
181645
|
+
return false;
|
|
181646
|
+
}
|
|
181647
|
+
}
|
|
181377
181648
|
stopProgressIndicator2(
|
|
181378
181649
|
spinnerId,
|
|
181379
181650
|
`Successfully retrieved variable ${variableId}`,
|
|
@@ -181413,6 +181684,15 @@ async function describeVariable(variableId, json = false) {
|
|
|
181413
181684
|
table.push(["Modifier"["brightCyan"], modifierName]);
|
|
181414
181685
|
}
|
|
181415
181686
|
table.push(["Modifier UUID"["brightCyan"], variable.lastChangedBy]);
|
|
181687
|
+
if (usage) {
|
|
181688
|
+
table.push([
|
|
181689
|
+
`Usage Locations (${variable.locations.length} total)`["brightCyan"],
|
|
181690
|
+
variable.locations.length > 0 ? variable.locations[0] : ""
|
|
181691
|
+
]);
|
|
181692
|
+
for (let i2 = 1; i2 < variable.locations.length; i2++) {
|
|
181693
|
+
table.push(["", variable.locations[i2]]);
|
|
181694
|
+
}
|
|
181695
|
+
}
|
|
181416
181696
|
printMessage2(table.toString(), "data");
|
|
181417
181697
|
}
|
|
181418
181698
|
return true;
|
|
@@ -181741,6 +182021,16 @@ function setup103() {
|
|
|
181741
182021
|
"-i, --variable-id <variable-id>",
|
|
181742
182022
|
"Variable id."
|
|
181743
182023
|
).makeOptionMandatory()
|
|
182024
|
+
).addOption(
|
|
182025
|
+
new Option(
|
|
182026
|
+
"-f, --file [file]",
|
|
182027
|
+
"Optional export file to use to determine usage. Overrides -D, --directory. Only used if -u or --usage is provided as well."
|
|
182028
|
+
)
|
|
182029
|
+
).addOption(
|
|
182030
|
+
new Option(
|
|
182031
|
+
"-u, --usage",
|
|
182032
|
+
"List all uses of the variable. If a file is provided with -f or --file, it will search for usage in the file. If a directory is provided with -D or --directory, it will search for usage in all .json files in the directory and sub-directories. If no file or directory is provided, it will perform a full export automatically to determine usage."
|
|
182033
|
+
).default(false, "false")
|
|
181744
182034
|
).addOption(new Option("--json", "Output in JSON format.")).action(
|
|
181745
182035
|
// implement command logic inside action handler
|
|
181746
182036
|
async (host2, user2, password3, options2, command2) => {
|
|
@@ -181751,14 +182041,21 @@ function setup103() {
|
|
|
181751
182041
|
options2,
|
|
181752
182042
|
command2
|
|
181753
182043
|
);
|
|
181754
|
-
if (await getTokens2(false, true, deploymentTypes37)) {
|
|
182044
|
+
if (options2.variableId && await getTokens2(false, true, deploymentTypes37)) {
|
|
181755
182045
|
verboseMessage2(`Describing variable ${options2.variableId}...`);
|
|
181756
182046
|
const outcome = await describeVariable(
|
|
181757
182047
|
options2.variableId,
|
|
182048
|
+
options2.file,
|
|
182049
|
+
options2.usage,
|
|
181758
182050
|
options2.json
|
|
181759
182051
|
);
|
|
181760
182052
|
if (!outcome) process.exitCode = 1;
|
|
181761
182053
|
} else {
|
|
182054
|
+
printMessage2(
|
|
182055
|
+
"Unrecognized combination of options or no options...",
|
|
182056
|
+
"error"
|
|
182057
|
+
);
|
|
182058
|
+
program3.help();
|
|
181762
182059
|
process.exitCode = 1;
|
|
181763
182060
|
}
|
|
181764
182061
|
}
|
|
@@ -187375,9 +187672,70 @@ function setup165() {
|
|
|
187375
187672
|
return program3;
|
|
187376
187673
|
}
|
|
187377
187674
|
|
|
187378
|
-
// src/cli/script/script-
|
|
187675
|
+
// src/cli/script/script-describe.ts
|
|
187379
187676
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
187380
187677
|
function setup166() {
|
|
187678
|
+
const program3 = new FrodoCommand("frodo script describe");
|
|
187679
|
+
program3.description("Describe script.").addOption(
|
|
187680
|
+
new Option(
|
|
187681
|
+
"-i, --script-id <uuid>",
|
|
187682
|
+
"Uuid of the script. If specified, -a and -A are ignored."
|
|
187683
|
+
)
|
|
187684
|
+
).addOption(
|
|
187685
|
+
new Option(
|
|
187686
|
+
"-n, --script-name <name>",
|
|
187687
|
+
"Name of the script. If specified, -a and -A are ignored."
|
|
187688
|
+
)
|
|
187689
|
+
).addOption(
|
|
187690
|
+
new Option(
|
|
187691
|
+
"-f, --file [file]",
|
|
187692
|
+
"Optional export file to use to determine usage. Overrides -D, --directory. Only used if -u or --usage is provided as well."
|
|
187693
|
+
)
|
|
187694
|
+
).addOption(
|
|
187695
|
+
new Option(
|
|
187696
|
+
"-u, --usage",
|
|
187697
|
+
"List all uses of the script. If a file is provided with -f or --file, it will search for usage in the file. If a directory is provided with -D or --directory, it will search for usage in all .json files in the directory and sub-directories. If no file or directory is provided, it will perform a full export automatically to determine usage."
|
|
187698
|
+
).default(false, "false")
|
|
187699
|
+
).addOption(new Option("--json", "Output in JSON format.")).action(
|
|
187700
|
+
// implement command logic inside action handler
|
|
187701
|
+
async (host2, realm2, user2, password3, options2, command2) => {
|
|
187702
|
+
command2.handleDefaultArgsAndOpts(
|
|
187703
|
+
host2,
|
|
187704
|
+
realm2,
|
|
187705
|
+
user2,
|
|
187706
|
+
password3,
|
|
187707
|
+
options2,
|
|
187708
|
+
command2
|
|
187709
|
+
);
|
|
187710
|
+
if ((options2.scriptName || options2.scriptId) && await getTokens2()) {
|
|
187711
|
+
verboseMessage2(
|
|
187712
|
+
`Describing script ${options2.scriptName ? options2.scriptName : options2.scriptId}...`
|
|
187713
|
+
);
|
|
187714
|
+
const outcome = await describeScript(
|
|
187715
|
+
options2.scriptId,
|
|
187716
|
+
options2.scriptName,
|
|
187717
|
+
options2.file,
|
|
187718
|
+
options2.usage,
|
|
187719
|
+
options2.json
|
|
187720
|
+
);
|
|
187721
|
+
if (!outcome) process.exitCode = 1;
|
|
187722
|
+
} else {
|
|
187723
|
+
printMessage2(
|
|
187724
|
+
"Unrecognized combination of options or no options...",
|
|
187725
|
+
"error"
|
|
187726
|
+
);
|
|
187727
|
+
program3.help();
|
|
187728
|
+
process.exitCode = 1;
|
|
187729
|
+
}
|
|
187730
|
+
}
|
|
187731
|
+
// end command logic inside action handler
|
|
187732
|
+
);
|
|
187733
|
+
return program3;
|
|
187734
|
+
}
|
|
187735
|
+
|
|
187736
|
+
// src/cli/script/script-export.ts
|
|
187737
|
+
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
187738
|
+
function setup167() {
|
|
187381
187739
|
const program3 = new FrodoCommand("frodo script export");
|
|
187382
187740
|
program3.description("Export scripts.").addOption(
|
|
187383
187741
|
new Option(
|
|
@@ -187503,7 +187861,7 @@ function setup166() {
|
|
|
187503
187861
|
|
|
187504
187862
|
// src/cli/script/script-import.ts
|
|
187505
187863
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
187506
|
-
function
|
|
187864
|
+
function setup168() {
|
|
187507
187865
|
const program3 = new FrodoCommand("frodo script import");
|
|
187508
187866
|
program3.description("Import scripts.").addOption(new Option("-f, --file <file>", "Name of the file to import.")).addOption(
|
|
187509
187867
|
new Option(
|
|
@@ -187604,7 +187962,7 @@ function setup167() {
|
|
|
187604
187962
|
|
|
187605
187963
|
// src/cli/script/script-list.ts
|
|
187606
187964
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
187607
|
-
function
|
|
187965
|
+
function setup169() {
|
|
187608
187966
|
const program3 = new FrodoCommand("frodo script list");
|
|
187609
187967
|
program3.description("List scripts.").addOption(
|
|
187610
187968
|
new Option("-l, --long", "Long with all fields besides usage.").default(
|
|
@@ -187650,11 +188008,12 @@ function setup168() {
|
|
|
187650
188008
|
}
|
|
187651
188009
|
|
|
187652
188010
|
// src/cli/script/script.ts
|
|
187653
|
-
function
|
|
188011
|
+
function setup170() {
|
|
187654
188012
|
const program3 = new FrodoStubCommand("script").description("Manage scripts.");
|
|
187655
|
-
program3.addCommand(
|
|
187656
|
-
program3.addCommand(setup166().name("
|
|
187657
|
-
program3.addCommand(setup167().name("
|
|
188013
|
+
program3.addCommand(setup169().name("list"));
|
|
188014
|
+
program3.addCommand(setup166().name("describe"));
|
|
188015
|
+
program3.addCommand(setup167().name("export"));
|
|
188016
|
+
program3.addCommand(setup168().name("import"));
|
|
187658
188017
|
program3.addCommand(setup165().name("delete"));
|
|
187659
188018
|
return program3;
|
|
187660
188019
|
}
|
|
@@ -187908,7 +188267,7 @@ async function deleteServices(globalConfig = false) {
|
|
|
187908
188267
|
}
|
|
187909
188268
|
|
|
187910
188269
|
// src/cli/service/service-delete.ts
|
|
187911
|
-
function
|
|
188270
|
+
function setup171() {
|
|
187912
188271
|
const program3 = new FrodoCommand("frodo service delete");
|
|
187913
188272
|
program3.description("Delete AM services.").addOption(new Option("-i, --id <id>", "Id of Service to be deleted.")).addOption(new Option("-a, --all", "Delete all services. Ignored with -i.")).addOption(new Option("-g, --global", "Delete global services.")).action(
|
|
187914
188273
|
async (host2, realm2, user2, password3, options2, command2) => {
|
|
@@ -187938,7 +188297,7 @@ function setup170() {
|
|
|
187938
188297
|
|
|
187939
188298
|
// src/cli/service/service-export.ts
|
|
187940
188299
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
187941
|
-
function
|
|
188300
|
+
function setup172() {
|
|
187942
188301
|
const program3 = new FrodoCommand("frodo service export");
|
|
187943
188302
|
program3.description("Export AM services.").addOption(
|
|
187944
188303
|
new Option(
|
|
@@ -188006,7 +188365,7 @@ function setup171() {
|
|
|
188006
188365
|
|
|
188007
188366
|
// src/cli/service/service-import.ts
|
|
188008
188367
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188009
|
-
function
|
|
188368
|
+
function setup173() {
|
|
188010
188369
|
const program3 = new FrodoCommand("frodo service import");
|
|
188011
188370
|
program3.description("Import AM services.").addOption(
|
|
188012
188371
|
new Option(
|
|
@@ -188102,7 +188461,7 @@ function setup172() {
|
|
|
188102
188461
|
|
|
188103
188462
|
// src/cli/service/service-list.ts
|
|
188104
188463
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188105
|
-
function
|
|
188464
|
+
function setup174() {
|
|
188106
188465
|
const program3 = new FrodoCommand("frodo service list");
|
|
188107
188466
|
program3.description("List AM services.").addOption(
|
|
188108
188467
|
new Option("-l, --long", "Long with all fields.").default(false, "false")
|
|
@@ -188127,14 +188486,14 @@ function setup173() {
|
|
|
188127
188486
|
}
|
|
188128
188487
|
|
|
188129
188488
|
// src/cli/service/service.ts
|
|
188130
|
-
function
|
|
188489
|
+
function setup175() {
|
|
188131
188490
|
const program3 = new FrodoStubCommand("service").description(
|
|
188132
188491
|
"Manage AM services."
|
|
188133
188492
|
);
|
|
188134
|
-
program3.addCommand(
|
|
188135
|
-
program3.addCommand(
|
|
188136
|
-
program3.addCommand(
|
|
188137
|
-
program3.addCommand(
|
|
188493
|
+
program3.addCommand(setup174().name("list"));
|
|
188494
|
+
program3.addCommand(setup172().name("export"));
|
|
188495
|
+
program3.addCommand(setup173().name("import"));
|
|
188496
|
+
program3.addCommand(setup171().name("delete"));
|
|
188138
188497
|
return program3;
|
|
188139
188498
|
}
|
|
188140
188499
|
|
|
@@ -188156,7 +188515,7 @@ function searchFunctions(_answers, input = "") {
|
|
|
188156
188515
|
);
|
|
188157
188516
|
});
|
|
188158
188517
|
}
|
|
188159
|
-
function
|
|
188518
|
+
function setup176() {
|
|
188160
188519
|
const program = new FrodoCommand("shell");
|
|
188161
188520
|
program.description("Launch the frodo interactive shell.").addHelpText(
|
|
188162
188521
|
"after",
|
|
@@ -188164,9 +188523,9 @@ function setup175() {
|
|
|
188164
188523
|
Launch a frodo shell using explicit login parameters:
|
|
188165
188524
|
` + ` $ frodo shell ${amBaseUrl} ${username} '${password2}'
|
|
188166
188525
|
`["brightCyan"] + ` Launch a frodo shell using a connection profile (identified by the full AM base URL):
|
|
188167
|
-
` + ` $ frodo shell ${amBaseUrl}
|
|
188526
|
+
` + ` $ frodo shell ${amBaseUrl}
|
|
188168
188527
|
`["brightCyan"] + ` Launch a frodo shell using a connection profile (identified by a unique substring of the AM base URL):
|
|
188169
|
-
` + ` $ frodo shell ${connId}
|
|
188528
|
+
` + ` $ frodo shell ${connId}
|
|
188170
188529
|
`["brightCyan"]
|
|
188171
188530
|
).action(async (host, realm, user, password, options, command) => {
|
|
188172
188531
|
command.handleDefaultArgsAndOpts(
|
|
@@ -188213,7 +188572,7 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
|
188213
188572
|
// src/cli/theme/theme-delete.ts
|
|
188214
188573
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188215
188574
|
var deploymentTypes57 = ["cloud", "forgeops"];
|
|
188216
|
-
function
|
|
188575
|
+
function setup177() {
|
|
188217
188576
|
const program3 = new FrodoCommand("frodo theme delete", [], deploymentTypes57);
|
|
188218
188577
|
program3.description("Delete themes.").addOption(
|
|
188219
188578
|
new Option(
|
|
@@ -188276,7 +188635,7 @@ function setup176() {
|
|
|
188276
188635
|
// src/cli/theme/theme-export.ts
|
|
188277
188636
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188278
188637
|
var deploymentTypes58 = ["cloud", "forgeops"];
|
|
188279
|
-
function
|
|
188638
|
+
function setup178() {
|
|
188280
188639
|
const program3 = new FrodoCommand("frodo theme export", [], deploymentTypes58);
|
|
188281
188640
|
program3.description("Export themes.").addOption(
|
|
188282
188641
|
new Option(
|
|
@@ -188367,7 +188726,7 @@ function setup177() {
|
|
|
188367
188726
|
// src/cli/theme/theme-import.ts
|
|
188368
188727
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188369
188728
|
var deploymentTypes59 = ["cloud", "forgeops"];
|
|
188370
|
-
function
|
|
188729
|
+
function setup179() {
|
|
188371
188730
|
const program3 = new FrodoCommand("frodo theme import", [], deploymentTypes59);
|
|
188372
188731
|
program3.description("Import themes.").addOption(
|
|
188373
188732
|
new Option(
|
|
@@ -188455,7 +188814,7 @@ function setup178() {
|
|
|
188455
188814
|
// src/cli/theme/theme-list.ts
|
|
188456
188815
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
188457
188816
|
var deploymentTypes60 = ["cloud", "forgeops"];
|
|
188458
|
-
function
|
|
188817
|
+
function setup180() {
|
|
188459
188818
|
const program3 = new FrodoCommand("frodo theme list", [], deploymentTypes60);
|
|
188460
188819
|
program3.description("List themes.").addOption(
|
|
188461
188820
|
new Option("-l, --long", "Long with more fields.").default(false, "false")
|
|
@@ -188484,12 +188843,12 @@ function setup179() {
|
|
|
188484
188843
|
}
|
|
188485
188844
|
|
|
188486
188845
|
// src/cli/theme/theme.ts
|
|
188487
|
-
function
|
|
188846
|
+
function setup181() {
|
|
188488
188847
|
const program3 = new FrodoStubCommand("theme").description("Manage themes.");
|
|
188489
|
-
program3.addCommand(
|
|
188490
|
-
program3.addCommand(
|
|
188491
|
-
program3.addCommand(
|
|
188492
|
-
program3.addCommand(
|
|
188848
|
+
program3.addCommand(setup180().name("list"));
|
|
188849
|
+
program3.addCommand(setup178().name("export"));
|
|
188850
|
+
program3.addCommand(setup179().name("import"));
|
|
188851
|
+
program3.addCommand(setup177().name("delete"));
|
|
188493
188852
|
return program3;
|
|
188494
188853
|
}
|
|
188495
188854
|
|
|
@@ -188567,7 +188926,7 @@ var compareVersions = (v12, v2) => {
|
|
|
188567
188926
|
// package.json
|
|
188568
188927
|
var package_default2 = {
|
|
188569
188928
|
name: "@rockcarver/frodo-cli",
|
|
188570
|
-
version: "2.0.
|
|
188929
|
+
version: "2.0.6-1",
|
|
188571
188930
|
type: "module",
|
|
188572
188931
|
description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
|
|
188573
188932
|
keywords: [
|
|
@@ -188681,7 +189040,7 @@ var package_default2 = {
|
|
|
188681
189040
|
]
|
|
188682
189041
|
},
|
|
188683
189042
|
devDependencies: {
|
|
188684
|
-
"@rockcarver/frodo-lib": "2.1.0",
|
|
189043
|
+
"@rockcarver/frodo-lib": "2.1.2-0",
|
|
188685
189044
|
"@types/colors": "^1.2.1",
|
|
188686
189045
|
"@types/fs-extra": "^11.0.1",
|
|
188687
189046
|
"@types/jest": "^29.2.3",
|
|
@@ -188901,10 +189260,10 @@ var { initTokenCache: initTokenCache2 } = frodo.cache;
|
|
|
188901
189260
|
program3.addCommand(setup147());
|
|
188902
189261
|
program3.addCommand(setup152());
|
|
188903
189262
|
program3.addCommand(setup164());
|
|
188904
|
-
program3.addCommand(
|
|
188905
|
-
program3.addCommand(setup174());
|
|
189263
|
+
program3.addCommand(setup170());
|
|
188906
189264
|
program3.addCommand(setup175());
|
|
188907
|
-
program3.addCommand(
|
|
189265
|
+
program3.addCommand(setup176());
|
|
189266
|
+
program3.addCommand(setup181());
|
|
188908
189267
|
program3.showHelpAfterError();
|
|
188909
189268
|
program3.enablePositionalOptions();
|
|
188910
189269
|
await program3.parseAsync();
|
|
@@ -188978,7 +189337,7 @@ tmp/lib/tmp.js:
|
|
|
188978
189337
|
* MIT Licensed
|
|
188979
189338
|
*)
|
|
188980
189339
|
|
|
188981
|
-
@rockcarver/frodo-lib/dist/
|
|
189340
|
+
@rockcarver/frodo-lib/dist/index.mjs:
|
|
188982
189341
|
(*! Bundled license information:
|
|
188983
189342
|
|
|
188984
189343
|
humanize-ms/index.js:
|