@rockcarver/frodo-cli 2.0.0-68 → 2.0.0-69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.cjs CHANGED
@@ -123393,7 +123393,7 @@ function stringify(obj) {
123393
123393
  }
123394
123394
  var package_default = {
123395
123395
  name: "@rockcarver/frodo-lib",
123396
- version: "2.0.0-94",
123396
+ version: "2.0.0-95",
123397
123397
  type: "commonjs",
123398
123398
  main: "./dist/index.js",
123399
123399
  module: "./dist/esm/index.js",
@@ -153990,10 +153990,11 @@ function flush({ state: state2 }) {
153990
153990
  }
153991
153991
  var AuthenticateOps_default = (state2) => {
153992
153992
  return {
153993
- async getTokens(forceLoginAsUser = false, autoRefresh = true, callbackHandler = null) {
153993
+ async getTokens(forceLoginAsUser = false, autoRefresh = true, types = Constants_default.DEPLOYMENT_TYPES, callbackHandler = null) {
153994
153994
  return getTokens({
153995
153995
  forceLoginAsUser,
153996
153996
  autoRefresh,
153997
+ types,
153997
153998
  callbackHandler,
153998
153999
  state: state2
153999
154000
  });
@@ -154618,10 +154619,14 @@ function scheduleAutoRefresh(forceLoginAsUser, autoRefresh, state2) {
154618
154619
  async function getTokens({
154619
154620
  forceLoginAsUser = false,
154620
154621
  autoRefresh = true,
154622
+ types = Constants_default.DEPLOYMENT_TYPES,
154621
154623
  callbackHandler = null,
154622
154624
  state: state2
154623
154625
  }) {
154624
- debugMessage({ message: `AuthenticateOps.getTokens: start`, state: state2 });
154626
+ debugMessage({
154627
+ message: `AuthenticateOps.getTokens: start, types: ${types}`,
154628
+ state: state2
154629
+ });
154625
154630
  if (!state2.getHost()) {
154626
154631
  throw new FrodoError(`No host specified`);
154627
154632
  }
@@ -154642,12 +154647,22 @@ async function getTokens({
154642
154647
  state2.setServiceAccountId(conn.svcacctId);
154643
154648
  state2.setServiceAccountJwk(conn.svcacctJwk);
154644
154649
  state2.setServiceAccountScope(conn.svcacctScope);
154650
+ if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
154651
+ throw new FrodoError(
154652
+ `Unsupported deployment type '${state2.getDeploymentType()}'`
154653
+ );
154654
+ }
154645
154655
  }
154646
154656
  if (!isValidUrl(state2.getHost())) {
154647
154657
  const conn = await getConnectionProfile({ state: state2 });
154648
154658
  state2.setHost(conn.tenant);
154649
154659
  state2.setAllowInsecureConnection(conn.allowInsecureConnection);
154650
154660
  state2.setDeploymentType(conn.deploymentType);
154661
+ if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
154662
+ throw new FrodoError(
154663
+ `Unsupported deployment type '${state2.getDeploymentType()}'`
154664
+ );
154665
+ }
154651
154666
  }
154652
154667
  state2.setCookieName(await determineCookieName(state2));
154653
154668
  if (!forceLoginAsUser && state2.getServiceAccountId() && state2.getServiceAccountJwk()) {
@@ -154663,6 +154678,11 @@ async function getTokens({
154663
154678
  }
154664
154679
  state2.setUseBearerTokenForAmApis(true);
154665
154680
  await determineDeploymentTypeAndDefaultRealmAndVersion(state2);
154681
+ if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
154682
+ throw new FrodoError(
154683
+ `Unsupported deployment type: '${state2.getDeploymentType()}' not in ${types}`
154684
+ );
154685
+ }
154666
154686
  } catch (saErr) {
154667
154687
  throw new FrodoError(`Service account login error`, saErr);
154668
154688
  }
@@ -154674,6 +154694,11 @@ async function getTokens({
154674
154694
  const token = await getUserSessionToken(callbackHandler, state2);
154675
154695
  if (token) state2.setUserSessionTokenMeta(token);
154676
154696
  await determineDeploymentTypeAndDefaultRealmAndVersion(state2);
154697
+ if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
154698
+ throw new FrodoError(
154699
+ `Unsupported deployment type '${state2.getDeploymentType()}'`
154700
+ );
154701
+ }
154677
154702
  if (state2.getCookieValue() && // !state.getBearerToken() &&
154678
154703
  (state2.getDeploymentType() === Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY || state2.getDeploymentType() === Constants_default.FORGEOPS_DEPLOYMENT_TYPE_KEY)) {
154679
154704
  const accessToken3 = await getUserBearerToken(state2);
@@ -165579,23 +165604,6 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
165579
165604
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
165580
165605
 
165581
165606
 
165582
- // src/storage/StaticStorage.ts
165583
- _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
165584
- var DEFAULT_REALM_KEY2 = "__default__realm__";
165585
- var CLASSIC_DEPLOYMENT_TYPE_KEY2 = "classic";
165586
- var CLOUD_DEPLOYMENT_TYPE_KEY2 = "cloud";
165587
- var FORGEOPS_DEPLOYMENT_TYPE_KEY2 = "forgeops";
165588
- var DEPLOYMENT_TYPES2 = [
165589
- CLASSIC_DEPLOYMENT_TYPE_KEY2,
165590
- CLOUD_DEPLOYMENT_TYPE_KEY2,
165591
- FORGEOPS_DEPLOYMENT_TYPE_KEY2
165592
- ];
165593
- var DEPLOYMENT_TYPE_REALM_MAP2 = {
165594
- [CLASSIC_DEPLOYMENT_TYPE_KEY2]: "/",
165595
- [CLOUD_DEPLOYMENT_TYPE_KEY2]: "alpha",
165596
- [FORGEOPS_DEPLOYMENT_TYPE_KEY2]: "/"
165597
- };
165598
-
165599
165607
  // src/utils/Console.ts
165600
165608
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
165601
165609
  var import_cli_progress = _chunkMPPKDFVIcjs.__toESM.call(void 0, require_cli_progress(), 1);
@@ -166087,6 +166095,7 @@ function createObjectTable(object, keyMap = {}) {
166087
166095
  }
166088
166096
 
166089
166097
  // src/cli/FrodoCommand.ts
166098
+ var { DEFAULT_REALM_KEY: DEFAULT_REALM_KEY2, DEPLOYMENT_TYPES: DEPLOYMENT_TYPES2 } = frodo.utils.constants;
166090
166099
  var hostArgument = new Argument(
166091
166100
  "[host]",
166092
166101
  "Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring."
@@ -166192,21 +166201,16 @@ var FrodoStubCommand = class extends Command {
166192
166201
  /**
166193
166202
  * Creates a new FrodoCommand instance
166194
166203
  * @param name Name of the command
166195
- * @param omits Array of default argument names and default option names that should not be added to this command
166196
166204
  */
166197
166205
  constructor(name) {
166198
166206
  super(name);
166199
166207
  if (!process.listenerCount("unhandledRejection")) {
166200
166208
  process.on("unhandledRejection", (error2) => {
166201
- printMessage2(
166202
- `${_optionalChain([error2, 'access', _267 => _267.config, 'optionalAccess', _268 => _268.method]) ? error2.config.method + " " : ""}${_optionalChain([error2, 'access', _269 => _269.config, 'optionalAccess', _270 => _270.url]) ? error2.config.url : ""}`,
166203
- "error"
166204
- );
166205
- printMessage2(_optionalChain([error2, 'access', _271 => _271.response, 'optionalAccess', _272 => _272.data]), "error");
166206
- printMessage2(error2.stack, "error");
166207
- printMessage2(
166208
- `Please report this unhandled error here: https://github.com/rockcarver/frodo-cli/issues`,
166209
- "error"
166209
+ printError2(
166210
+ new FrodoError(
166211
+ `Please report this unhandled error here: https://github.com/rockcarver/frodo-cli/issues`,
166212
+ error2
166213
+ )
166210
166214
  );
166211
166215
  process.exitCode = 1;
166212
166216
  });
@@ -166245,9 +166249,11 @@ var FrodoCommand = class extends FrodoStubCommand {
166245
166249
  * Creates a new FrodoCommand instance
166246
166250
  * @param name Name of the command
166247
166251
  * @param omits Array of default argument names and default option names that should not be added to this command
166252
+ * @param types Array of deployment types this command supports
166248
166253
  */
166249
- constructor(name, omits = []) {
166254
+ constructor(name, omits = [], types = DEPLOYMENT_TYPES2) {
166250
166255
  super(name);
166256
+ this.types = types;
166251
166257
  for (const arg of defaultArgs) {
166252
166258
  if (!omits.includes(arg.name())) this.addArgument(arg);
166253
166259
  }
@@ -166320,6 +166326,11 @@ Evironment Variables:
166320
166326
  );
166321
166327
  }
166322
166328
  }
166329
+ if (state.getDeploymentType() && !(state.getDeploymentType() in this.types)) {
166330
+ throw new FrodoError(
166331
+ `Command does not support deployment type '${state.getDeploymentType()}'`
166332
+ );
166333
+ }
166323
166334
  }
166324
166335
  };
166325
166336
 
@@ -167909,7 +167920,7 @@ In AM, create a trusted issuer in the ${state.getRealm()} realm with the followi
167909
167920
  ]);
167910
167921
  issuer.push([
167911
167922
  "Allowed Subjects "["brightCyan"],
167912
- _optionalChain([artefacts, 'access', _273 => _273.issuer, 'access', _274 => _274.allowedSubjects, 'optionalAccess', _275 => _275.value, 'access', _276 => _276.length]) ? _optionalChain([artefacts, 'access', _277 => _277.issuer, 'access', _278 => _278.allowedSubjects, 'optionalAccess', _279 => _279.value, 'access', _280 => _280.join, 'call', _281 => _281(", ")]) : `Any ${state.getRealm()} realm user`
167923
+ _optionalChain([artefacts, 'access', _267 => _267.issuer, 'access', _268 => _268.allowedSubjects, 'optionalAccess', _269 => _269.value, 'access', _270 => _270.length]) ? _optionalChain([artefacts, 'access', _271 => _271.issuer, 'access', _272 => _272.allowedSubjects, 'optionalAccess', _273 => _273.value, 'access', _274 => _274.join, 'call', _275 => _275(", ")]) : `Any ${state.getRealm()} realm user`
167913
167924
  ]);
167914
167925
  issuer.push([
167915
167926
  "JWKS (Public Key)"["brightCyan"],
@@ -168037,7 +168048,7 @@ async function executeRfc7523AuthZGrantFlow2(clientId, iss, jwk, sub, scope, jso
168037
168048
  stopProgressIndicator2(
168038
168049
  spinnerId,
168039
168050
  `Error executing rfc7523 authz grant flow: ${stringify9(
168040
- _optionalChain([error2, 'access', _282 => _282.response, 'optionalAccess', _283 => _283.data]) || error2.message
168051
+ _optionalChain([error2, 'access', _276 => _276.response, 'optionalAccess', _277 => _277.data]) || error2.message
168041
168052
  )}`,
168042
168053
  "fail"
168043
168054
  );
@@ -168061,6 +168072,7 @@ async function executeRfc7523AuthZGrantFlow2(clientId, iss, jwk, sub, scope, jso
168061
168072
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
168062
168073
  var import_readline_sync = _chunkMPPKDFVIcjs.__toESM.call(void 0, require_readline_sync(), 1);
168063
168074
  var { getTokens: _getTokens } = frodo.login;
168075
+ var { DEPLOYMENT_TYPES: DEPLOYMENT_TYPES3 } = frodo.utils.constants;
168064
168076
  var otpCallbackHandler = (callback) => {
168065
168077
  if (callback.type != "NameCallback")
168066
168078
  throw new Error(`Unsupported callback: ${callback.type}`);
@@ -168072,11 +168084,12 @@ var otpCallbackHandler = (callback) => {
168072
168084
  );
168073
168085
  return callback;
168074
168086
  };
168075
- async function getTokens2(forceLoginAsUser, autoRefresh) {
168087
+ async function getTokens2(forceLoginAsUser = false, autoRefresh = true, types = DEPLOYMENT_TYPES3) {
168076
168088
  try {
168077
168089
  const tokens = await _getTokens(
168078
168090
  forceLoginAsUser,
168079
168091
  autoRefresh,
168092
+ types,
168080
168093
  otpCallbackHandler
168081
168094
  );
168082
168095
  printMessage2(
@@ -168091,9 +168104,12 @@ async function getTokens2(forceLoginAsUser, autoRefresh) {
168091
168104
  }
168092
168105
 
168093
168106
  // src/cli/admin/admin-add-autoid-static-user-mapping.ts
168107
+ var deploymentTypes = ["cloud"];
168094
168108
  function setup2() {
168095
168109
  const program3 = new FrodoCommand(
168096
- "frodo admin add-autoid-static-user-mapping"
168110
+ "frodo admin add-autoid-static-user-mapping",
168111
+ ["realm"],
168112
+ deploymentTypes
168097
168113
  );
168098
168114
  program3.description(
168099
168115
  "Add AutoId static user mapping to enable dashboards and other AutoId-based functionality."
@@ -168108,7 +168124,7 @@ function setup2() {
168108
168124
  options2,
168109
168125
  command2
168110
168126
  );
168111
- if (await getTokens2()) {
168127
+ if (await getTokens2(false, true, deploymentTypes)) {
168112
168128
  printMessage2(`Adding AutoId static user mapping...`);
168113
168129
  const outcome = await addAutoIdStaticUserMapping2();
168114
168130
  if (!outcome) process.exitCode = 1;
@@ -168124,9 +168140,12 @@ function setup2() {
168124
168140
  // src/cli/admin/admin-create-oauth2-client-with-admin-privileges.ts
168125
168141
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
168126
168142
  var import_cli_table32 = _chunkMPPKDFVIcjs.__toESM.call(void 0, require_cli_table3(), 1);
168143
+ var deploymentTypes2 = ["cloud", "forgeops"];
168127
168144
  function setup3() {
168128
168145
  const program3 = new FrodoCommand(
168129
- "frodo admin create-oauth2-client-with-admin-privileges"
168146
+ "frodo admin create-oauth2-client-with-admin-privileges",
168147
+ [],
168148
+ deploymentTypes2
168130
168149
  );
168131
168150
  program3.description("Create an oauth2 client with admin privileges.").addOption(new Option("--client-id [id]", "Client id.")).addOption(new Option("--client-secret [secret]", "Client secret.")).addOption(
168132
168151
  new Option(
@@ -168164,7 +168183,7 @@ function setup3() {
168164
168183
  options2,
168165
168184
  command2
168166
168185
  );
168167
- if (await getTokens2()) {
168186
+ if (await getTokens2(false, true, deploymentTypes2)) {
168168
168187
  printMessage2(
168169
168188
  `Creating oauth2 client with admin privileges in realm "${state.getRealm()}"...`
168170
168189
  );
@@ -168593,8 +168612,13 @@ async function importAdminFederationProvidersFromFiles() {
168593
168612
  }
168594
168613
 
168595
168614
  // src/cli/admin/admin-federation-export.ts
168615
+ var deploymentTypes3 = ["cloud"];
168596
168616
  function setup5() {
168597
- const program3 = new FrodoCommand("frodo admin federation export", ["realm"]);
168617
+ const program3 = new FrodoCommand(
168618
+ "frodo admin federation export",
168619
+ ["realm"],
168620
+ deploymentTypes3
168621
+ );
168598
168622
  program3.description("Export admin federation providers.").addOption(
168599
168623
  new Option(
168600
168624
  "-i, --idp-id <idp-id>",
@@ -168630,7 +168654,7 @@ function setup5() {
168630
168654
  options2,
168631
168655
  command2
168632
168656
  );
168633
- if (await getTokens2(true)) {
168657
+ if (await getTokens2(true, true, deploymentTypes3)) {
168634
168658
  if (options2.idpId) {
168635
168659
  verboseMessage2(`Exporting provider "${options2.idpId}...`);
168636
168660
  const outcome = await exportAdminFederationProviderToFile(
@@ -168669,8 +168693,13 @@ function setup5() {
168669
168693
 
168670
168694
  // src/cli/admin/admin-federation-import.ts
168671
168695
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
168696
+ var deploymentTypes4 = ["cloud"];
168672
168697
  function setup6() {
168673
- const program3 = new FrodoCommand("frodo admin federation import", ["realm"]);
168698
+ const program3 = new FrodoCommand(
168699
+ "frodo admin federation import",
168700
+ ["realm"],
168701
+ deploymentTypes4
168702
+ );
168674
168703
  program3.description("Import admin federation providers.").addOption(
168675
168704
  new Option(
168676
168705
  "-i, --idp-id <id>",
@@ -168701,14 +168730,14 @@ function setup6() {
168701
168730
  options2,
168702
168731
  command2
168703
168732
  );
168704
- if (options2.file && options2.idpId && await getTokens2(true)) {
168733
+ if (options2.file && options2.idpId && await getTokens2(true, true, deploymentTypes4)) {
168705
168734
  verboseMessage2(`Importing provider "${options2.idpId}"...`);
168706
168735
  const outcome = await importAdminFederationProviderFromFile(
168707
168736
  options2.idpId,
168708
168737
  options2.file
168709
168738
  );
168710
168739
  if (!outcome) process.exitCode = 1;
168711
- } else if (options2.all && options2.file && await getTokens2(true)) {
168740
+ } else if (options2.all && options2.file && await getTokens2(true, true, deploymentTypes4)) {
168712
168741
  verboseMessage2(
168713
168742
  `Importing all providers from a single file (${options2.file})...`
168714
168743
  );
@@ -168716,13 +168745,13 @@ function setup6() {
168716
168745
  options2.file
168717
168746
  );
168718
168747
  if (!outcome) process.exitCode = 1;
168719
- } else if (options2.allSeparate && !options2.file && await getTokens2(true)) {
168748
+ } else if (options2.allSeparate && !options2.file && await getTokens2(true, true, deploymentTypes4)) {
168720
168749
  verboseMessage2(
168721
168750
  "Importing all providers from separate files in current directory..."
168722
168751
  );
168723
168752
  const outcome = await importAdminFederationProvidersFromFiles();
168724
168753
  if (!outcome) process.exitCode = 1;
168725
- } else if (options2.file && await getTokens2(true)) {
168754
+ } else if (options2.file && await getTokens2(true, true, deploymentTypes4)) {
168726
168755
  verboseMessage2(
168727
168756
  `Importing first provider from file "${options2.file}"...`
168728
168757
  );
@@ -168743,8 +168772,13 @@ function setup6() {
168743
168772
 
168744
168773
  // src/cli/admin/admin-federation-list.ts
168745
168774
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
168775
+ var deploymentTypes5 = ["cloud"];
168746
168776
  function setup7() {
168747
- const program3 = new FrodoCommand("frodo admin federation list", ["realm"]);
168777
+ const program3 = new FrodoCommand(
168778
+ "frodo admin federation list",
168779
+ ["realm"],
168780
+ deploymentTypes5
168781
+ );
168748
168782
  program3.description("List admin federation providers.").action(
168749
168783
  // implement command logic inside action handler
168750
168784
  async (host2, user2, password3, options2, command2) => {
@@ -168755,7 +168789,7 @@ function setup7() {
168755
168789
  options2,
168756
168790
  command2
168757
168791
  );
168758
- if (await getTokens2(true)) {
168792
+ if (await getTokens2(true, true, deploymentTypes5)) {
168759
168793
  verboseMessage2(`Listing admin federation providers...`);
168760
168794
  const outcome = await listAdminFederationProviders();
168761
168795
  if (!outcome) process.exitCode = 1;
@@ -168923,9 +168957,12 @@ function setup10() {
168923
168957
 
168924
168958
  // src/cli/admin/admin-grant-oauth2-client-admin-privileges.ts
168925
168959
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
168960
+ var deploymentTypes6 = ["cloud", "forgeops"];
168926
168961
  function setup11() {
168927
168962
  const program3 = new FrodoCommand(
168928
- "frodo admin grant-oauth2-client-admin-privileges"
168963
+ "frodo admin grant-oauth2-client-admin-privileges",
168964
+ [],
168965
+ deploymentTypes6
168929
168966
  );
168930
168967
  program3.description("Grant an oauth2 client admin privileges.").addOption(new Option("-i, --client-id <id>", "OAuth2 client id.")).addOption(
168931
168968
  new Option(
@@ -168943,7 +168980,7 @@ function setup11() {
168943
168980
  options2,
168944
168981
  command2
168945
168982
  );
168946
- if (await getTokens2()) {
168983
+ if (await getTokens2(false, true, deploymentTypes6)) {
168947
168984
  printMessage2(
168948
168985
  `Granting oauth2 client "${options2.clientId || options2.target}" in realm "${state.getRealm()}" admin privileges...`
168949
168986
  );
@@ -168962,9 +168999,12 @@ function setup11() {
168962
168999
 
168963
169000
  // src/cli/admin/admin-hide-generic-extension-attributes.ts
168964
169001
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169002
+ var deploymentTypes7 = ["cloud"];
168965
169003
  function setup12() {
168966
169004
  const program3 = new FrodoCommand(
168967
- "frodo admin hide-generic-extension-attributes"
169005
+ "frodo admin hide-generic-extension-attributes",
169006
+ [],
169007
+ deploymentTypes7
168968
169008
  );
168969
169009
  program3.description("Hide generic extension attributes.").addOption(
168970
169010
  new Option("--include-customized", "Include customized attributes.")
@@ -168979,7 +169019,7 @@ function setup12() {
168979
169019
  options2,
168980
169020
  command2
168981
169021
  );
168982
- if (await getTokens2()) {
169022
+ if (await getTokens2(false, true, deploymentTypes7)) {
168983
169023
  printMessage2(
168984
169024
  `Hiding generic extension attributes in realm "${state.getRealm()}"...`
168985
169025
  );
@@ -168999,9 +169039,12 @@ function setup12() {
168999
169039
 
169000
169040
  // src/cli/admin/admin-list-oauth2-clients-with-admin-privileges.ts
169001
169041
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169042
+ var deploymentTypes8 = ["cloud", "forgeops"];
169002
169043
  function setup13() {
169003
169044
  const program3 = new FrodoCommand(
169004
- "frodo admin list-oauth2-clients-with-admin-privileges"
169045
+ "frodo admin list-oauth2-clients-with-admin-privileges",
169046
+ [],
169047
+ deploymentTypes8
169005
169048
  );
169006
169049
  program3.description("List oauth2 clients with admin privileges.").action(
169007
169050
  // implement command logic inside action handler
@@ -169014,7 +169057,7 @@ function setup13() {
169014
169057
  options2,
169015
169058
  command2
169016
169059
  );
169017
- if (await getTokens2()) {
169060
+ if (await getTokens2(false, true, deploymentTypes8)) {
169018
169061
  printMessage2(
169019
169062
  `Listing oauth2 clients with admin privileges in realm "${state.getRealm()}"...`
169020
169063
  );
@@ -169031,9 +169074,12 @@ function setup13() {
169031
169074
 
169032
169075
  // src/cli/admin/admin-list-oauth2-clients-with-custom-privileges.ts
169033
169076
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169077
+ var deploymentTypes9 = ["cloud", "forgeops"];
169034
169078
  function setup14() {
169035
169079
  const program3 = new FrodoCommand(
169036
- "frodo admin list-oauth2-clients-with-custom-privileges"
169080
+ "frodo admin list-oauth2-clients-with-custom-privileges",
169081
+ [],
169082
+ deploymentTypes9
169037
169083
  );
169038
169084
  program3.description("List oauth2 clients with custom privileges.").action(
169039
169085
  // implement command logic inside action handler
@@ -169046,7 +169092,7 @@ function setup14() {
169046
169092
  options2,
169047
169093
  command2
169048
169094
  );
169049
- if (await getTokens2()) {
169095
+ if (await getTokens2(false, true, deploymentTypes9)) {
169050
169096
  printMessage2(
169051
169097
  `Listing oauth2 clients with custom privileges in realm "${state.getRealm()}"...`
169052
169098
  );
@@ -169063,8 +169109,13 @@ function setup14() {
169063
169109
 
169064
169110
  // src/cli/admin/admin-list-static-user-mappings.ts
169065
169111
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169112
+ var deploymentTypes10 = ["cloud", "forgeops"];
169066
169113
  function setup15() {
169067
- const program3 = new FrodoCommand("frodo admin list-static-user-mappings");
169114
+ const program3 = new FrodoCommand(
169115
+ "frodo admin list-static-user-mappings",
169116
+ [],
169117
+ deploymentTypes10
169118
+ );
169068
169119
  program3.description(
169069
169120
  "List all subjects of static user mappings that are not oauth2 clients."
169070
169121
  ).addOption(
@@ -169083,7 +169134,7 @@ function setup15() {
169083
169134
  options2,
169084
169135
  command2
169085
169136
  );
169086
- if (await getTokens2()) {
169137
+ if (await getTokens2(false, true, deploymentTypes10)) {
169087
169138
  printMessage2(
169088
169139
  "Listing all non-oauth2 client subjects of static user mappings..."
169089
169140
  );
@@ -169102,8 +169153,13 @@ function setup15() {
169102
169153
 
169103
169154
  // src/cli/admin/admin-remove-static-user-mapping.ts
169104
169155
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169156
+ var deploymentTypes11 = ["cloud", "forgeops"];
169105
169157
  function setup16() {
169106
- const program3 = new FrodoCommand("frodo admin remove-static-user-mapping");
169158
+ const program3 = new FrodoCommand(
169159
+ "frodo admin remove-static-user-mapping",
169160
+ [],
169161
+ deploymentTypes11
169162
+ );
169107
169163
  program3.description("Remove a subject's static user mapping.").addOption(new Option("-i, --sub-id <id>", "Subject identifier.")).action(
169108
169164
  // implement command logic inside action handler
169109
169165
  async (host2, realm2, user2, password3, options2, command2) => {
@@ -169115,7 +169171,7 @@ function setup16() {
169115
169171
  options2,
169116
169172
  command2
169117
169173
  );
169118
- if (await getTokens2()) {
169174
+ if (await getTokens2(false, true, deploymentTypes11)) {
169119
169175
  printMessage2("Removing a subject's static user mapping...");
169120
169176
  const outcome = await removeStaticUserMapping2(options2.subId);
169121
169177
  if (!outcome) process.exitCode = 1;
@@ -169130,8 +169186,13 @@ function setup16() {
169130
169186
 
169131
169187
  // src/cli/admin/admin-repair-org-model.ts
169132
169188
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169189
+ var deploymentTypes12 = ["cloud", "forgeops"];
169133
169190
  function setup17() {
169134
- const program3 = new FrodoCommand("frodo admin repair-org-model");
169191
+ const program3 = new FrodoCommand(
169192
+ "frodo admin repair-org-model",
169193
+ [],
169194
+ deploymentTypes12
169195
+ );
169135
169196
  program3.description("Repair org model.").addOption(
169136
169197
  new Option(
169137
169198
  "--exclude-customized",
@@ -169153,7 +169214,7 @@ function setup17() {
169153
169214
  options2,
169154
169215
  command2
169155
169216
  );
169156
- if (await getTokens2()) {
169217
+ if (await getTokens2(false, true, deploymentTypes12)) {
169157
169218
  printMessage2(`Repairing org model in realm "${state.getRealm()}"...`);
169158
169219
  const outcome = await repairOrgModel2(
169159
169220
  options2.excludeCustomized,
@@ -169172,9 +169233,12 @@ function setup17() {
169172
169233
 
169173
169234
  // src/cli/admin/admin-revoke-oauth2-client-admin-privileges.ts
169174
169235
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169236
+ var deploymentTypes13 = ["cloud", "forgeops"];
169175
169237
  function setup18() {
169176
169238
  const program3 = new FrodoCommand(
169177
- "frodo admin revoke-oauth2-client-admin-privileges"
169239
+ "frodo admin revoke-oauth2-client-admin-privileges",
169240
+ [],
169241
+ deploymentTypes13
169178
169242
  );
169179
169243
  program3.description("Revoke admin privileges from an oauth2 client.").addOption(new Option("-i, --client-id <id>", "OAuth2 client id.")).addOption(
169180
169244
  new Option(
@@ -169192,7 +169256,7 @@ function setup18() {
169192
169256
  options2,
169193
169257
  command2
169194
169258
  );
169195
- if (await getTokens2()) {
169259
+ if (await getTokens2(false, true, deploymentTypes13)) {
169196
169260
  printMessage2(
169197
169261
  `Revoking admin privileges from oauth2 client "${options2.target}" in realm "${state.getRealm()}"...`
169198
169262
  );
@@ -169211,9 +169275,12 @@ function setup18() {
169211
169275
 
169212
169276
  // src/cli/admin/admin-show-generic-extension-attributes.ts
169213
169277
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
169278
+ var deploymentTypes14 = ["cloud"];
169214
169279
  function setup19() {
169215
169280
  const program3 = new FrodoCommand(
169216
- "frodo admin show-generic-extension-attributes"
169281
+ "frodo admin show-generic-extension-attributes",
169282
+ [],
169283
+ deploymentTypes14
169217
169284
  );
169218
169285
  program3.description("Show generic extension attributes.").addOption(
169219
169286
  new Option(
@@ -169236,7 +169303,7 @@ function setup19() {
169236
169303
  options2,
169237
169304
  command2
169238
169305
  );
169239
- if (await getTokens2()) {
169306
+ if (await getTokens2(false, true, deploymentTypes14)) {
169240
169307
  printMessage2(
169241
169308
  `Showing generic extension attributes in realm "${state.getRealm()}"...`
169242
169309
  );
@@ -171769,8 +171836,9 @@ async function importApplicationsFromFiles(options2 = { deps: true }) {
171769
171836
  }
171770
171837
 
171771
171838
  // src/cli/app/app-delete.ts
171839
+ var deploymentTypes15 = ["cloud", "forgeops"];
171772
171840
  function setup45() {
171773
- const program3 = new FrodoCommand("frodo app delete");
171841
+ const program3 = new FrodoCommand("frodo app delete", [], deploymentTypes15);
171774
171842
  program3.description("Delete applications.").addOption(
171775
171843
  new Option(
171776
171844
  "-i, --app-id <id>",
@@ -171806,11 +171874,11 @@ Usage Examples:
171806
171874
  options2,
171807
171875
  command2
171808
171876
  );
171809
- if (options2.appId && await getTokens2()) {
171877
+ if (options2.appId && await getTokens2(false, true, deploymentTypes15)) {
171810
171878
  verboseMessage2("Deleting application...");
171811
171879
  const outcome = await deleteApplication2(options2.appId, options2.deep);
171812
171880
  if (!outcome) process.exitCode = 1;
171813
- } else if (options2.all && await getTokens2()) {
171881
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes15)) {
171814
171882
  verboseMessage2("Deleting all applications...");
171815
171883
  const outcome = await deleteApplications2(options2.deep);
171816
171884
  if (!outcome) process.exitCode = 1;
@@ -171829,8 +171897,9 @@ Usage Examples:
171829
171897
 
171830
171898
  // src/cli/app/app-export.ts
171831
171899
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
171900
+ var deploymentTypes16 = ["cloud", "forgeops"];
171832
171901
  function setup46() {
171833
- const program3 = new FrodoCommand("frodo app export");
171902
+ const program3 = new FrodoCommand("frodo app export", [], deploymentTypes16);
171834
171903
  program3.description("Export applications.").addOption(
171835
171904
  new Option(
171836
171905
  "-i, --app-id <app-id>",
@@ -171882,7 +171951,7 @@ Usage Examples:
171882
171951
  options2,
171883
171952
  command2
171884
171953
  );
171885
- if (options2.appId && await getTokens2()) {
171954
+ if (options2.appId && await getTokens2(false, true, deploymentTypes16)) {
171886
171955
  verboseMessage2("Exporting application...");
171887
171956
  const outcome = await exportApplicationToFile(
171888
171957
  options2.appId,
@@ -171894,7 +171963,7 @@ Usage Examples:
171894
171963
  }
171895
171964
  );
171896
171965
  if (!outcome) process.exitCode = 1;
171897
- } else if (options2.all && await getTokens2()) {
171966
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes16)) {
171898
171967
  verboseMessage2("Exporting all applications to file...");
171899
171968
  const outcome = await exportApplicationsToFile(
171900
171969
  options2.file,
@@ -171905,7 +171974,7 @@ Usage Examples:
171905
171974
  }
171906
171975
  );
171907
171976
  if (!outcome) process.exitCode = 1;
171908
- } else if (options2.allSeparate && await getTokens2()) {
171977
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes16)) {
171909
171978
  verboseMessage2("Exporting all applications to separate files...");
171910
171979
  const outcome = await exportApplicationsToFiles(options2.metadata, {
171911
171980
  useStringArrays: true,
@@ -171927,8 +171996,9 @@ Usage Examples:
171927
171996
 
171928
171997
  // src/cli/app/app-import.ts
171929
171998
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
171999
+ var deploymentTypes17 = ["cloud", "forgeops"];
171930
172000
  function setup47() {
171931
- const program3 = new FrodoCommand("frodo app import");
172001
+ const program3 = new FrodoCommand("frodo app import", [], deploymentTypes17);
171932
172002
  program3.description("Import applications.").addOption(
171933
172003
  new Option(
171934
172004
  "-i, --app-id <id>",
@@ -171975,7 +172045,7 @@ Usage Examples:
171975
172045
  options2,
171976
172046
  command2
171977
172047
  );
171978
- if (options2.file && options2.appId && await getTokens2()) {
172048
+ if (options2.file && options2.appId && await getTokens2(false, true, deploymentTypes17)) {
171979
172049
  verboseMessage2(`Importing application "${options2.appId}"...`);
171980
172050
  const outcome = await importApplicationFromFile(
171981
172051
  options2.appId,
@@ -171985,7 +172055,7 @@ Usage Examples:
171985
172055
  }
171986
172056
  );
171987
172057
  if (!outcome) process.exitCode = 1;
171988
- } else if (options2.all && options2.file && await getTokens2()) {
172058
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes17)) {
171989
172059
  verboseMessage2(
171990
172060
  `Importing all applications from a single file (${options2.file})...`
171991
172061
  );
@@ -171993,7 +172063,7 @@ Usage Examples:
171993
172063
  deps: options2.deps
171994
172064
  });
171995
172065
  if (!outcome) process.exitCode = 1;
171996
- } else if (options2.allSeparate && !options2.file && await getTokens2()) {
172066
+ } else if (options2.allSeparate && !options2.file && await getTokens2(false, true, deploymentTypes17)) {
171997
172067
  verboseMessage2(
171998
172068
  "Importing all applications from separate files in current directory..."
171999
172069
  );
@@ -172001,7 +172071,7 @@ Usage Examples:
172001
172071
  deps: options2.deps
172002
172072
  });
172003
172073
  if (!outcome) process.exitCode = 1;
172004
- } else if (options2.file && await getTokens2()) {
172074
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes17)) {
172005
172075
  verboseMessage2(
172006
172076
  `Importing first application from file "${options2.file}"...`
172007
172077
  );
@@ -172022,8 +172092,9 @@ Usage Examples:
172022
172092
 
172023
172093
  // src/cli/app/app-list.ts
172024
172094
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
172095
+ var deploymentTypes18 = ["cloud", "forgeops"];
172025
172096
  function setup48() {
172026
- const program3 = new FrodoCommand("frodo app list");
172097
+ const program3 = new FrodoCommand("frodo app list", [], deploymentTypes18);
172027
172098
  program3.description("List applications.").addOption(
172028
172099
  new Option("-l, --long", "Long with all fields.").default(false, "false")
172029
172100
  ).addHelpText(
@@ -172051,7 +172122,7 @@ Usage Examples:
172051
172122
  options2,
172052
172123
  command2
172053
172124
  );
172054
- if (await getTokens2()) {
172125
+ if (await getTokens2(false, true, deploymentTypes18)) {
172055
172126
  verboseMessage2(`Listing applications...`);
172056
172127
  const outcome = await listApplications(options2.long);
172057
172128
  if (!outcome) process.exitCode = 1;
@@ -176689,7 +176760,7 @@ async function tailLogs(source, levels, txid, cookie, nf) {
176689
176760
  filteredLogs = logsObject.result.filter(
176690
176761
  (el) => !noiseFilter.includes(
176691
176762
  el.payload.logger
176692
- ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _284 => _284.payload, 'access', _285 => _285.transactionId, 'optionalAccess', _286 => _286.includes, 'call', _287 => _287(
176763
+ ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _278 => _278.payload, 'access', _279 => _279.transactionId, 'optionalAccess', _280 => _280.includes, 'call', _281 => _281(
176693
176764
  txid
176694
176765
  )]))
176695
176766
  );
@@ -176713,7 +176784,7 @@ async function fetchLogs(source, startTs, endTs, levels, txid, ffString, cookie,
176713
176784
  filteredLogs = logsObject.result.filter(
176714
176785
  (el) => !noiseFilter.includes(
176715
176786
  el.payload.logger
176716
- ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _288 => _288.payload, 'access', _289 => _289.transactionId, 'optionalAccess', _290 => _290.includes, 'call', _291 => _291(
176787
+ ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _282 => _282.payload, 'access', _283 => _283.transactionId, 'optionalAccess', _284 => _284.includes, 'call', _285 => _285(
176717
176788
  txid
176718
176789
  )]))
176719
176790
  );
@@ -176746,7 +176817,7 @@ async function fetchLogs(source, startTs, endTs, levels, txid, ffString, cookie,
176746
176817
  }
176747
176818
 
176748
176819
  // src/cli/conn/conn-save.ts
176749
- var { CLOUD_DEPLOYMENT_TYPE_KEY: CLOUD_DEPLOYMENT_TYPE_KEY3 } = frodo.utils.constants;
176820
+ var { CLOUD_DEPLOYMENT_TYPE_KEY: CLOUD_DEPLOYMENT_TYPE_KEY2 } = frodo.utils.constants;
176750
176821
  var { isServiceAccountsFeatureAvailable: isServiceAccountsFeatureAvailable2 } = frodo.cloud.serviceAccount;
176751
176822
  var { addNewServiceAccount: addNewServiceAccount2, saveConnectionProfile: saveConnectionProfile2 } = frodo.conn;
176752
176823
  function setup79() {
@@ -176813,7 +176884,7 @@ function setup79() {
176813
176884
  verboseMessage2(
176814
176885
  `Saving connection profile for tenant ${state.getHost()}...`
176815
176886
  );
176816
- if (options2.validate && state.getDeploymentType() === CLOUD_DEPLOYMENT_TYPE_KEY3 && options2.sa && await isServiceAccountsFeatureAvailable2()) {
176887
+ if (options2.validate && state.getDeploymentType() === CLOUD_DEPLOYMENT_TYPE_KEY2 && options2.sa && await isServiceAccountsFeatureAvailable2()) {
176817
176888
  if (options2.saId && options2.saJwkFile) {
176818
176889
  verboseMessage2(`Validating and adding service account...`);
176819
176890
  if (await addExistingServiceAccount(
@@ -176846,7 +176917,7 @@ function setup79() {
176846
176917
  }
176847
176918
  verboseMessage2(options2);
176848
176919
  verboseMessage2(state);
176849
- if (options2.validate && state.getDeploymentType() === CLOUD_DEPLOYMENT_TYPE_KEY3 && needLogApiKey) {
176920
+ if (options2.validate && state.getDeploymentType() === CLOUD_DEPLOYMENT_TYPE_KEY2 && needLogApiKey) {
176850
176921
  if (options2.logApiKey && options2.logApiSecret) {
176851
176922
  verboseMessage2(`Validating and adding log api key and secret...`);
176852
176923
  if (await addExistingServiceAccount(
@@ -176867,9 +176938,9 @@ function setup79() {
176867
176938
  `Created log API key ${creds.api_key_id} and secret.`
176868
176939
  );
176869
176940
  } catch (error2) {
176870
- printMessage2(_optionalChain([error2, 'access', _292 => _292.response, 'optionalAccess', _293 => _293.data]), "error");
176941
+ printMessage2(_optionalChain([error2, 'access', _286 => _286.response, 'optionalAccess', _287 => _287.data]), "error");
176871
176942
  printMessage2(
176872
- `Error creating log API key and secret: ${_optionalChain([error2, 'access', _294 => _294.response, 'optionalAccess', _295 => _295.data, 'optionalAccess', _296 => _296.message])}`,
176943
+ `Error creating log API key and secret: ${_optionalChain([error2, 'access', _288 => _288.response, 'optionalAccess', _289 => _289.data, 'optionalAccess', _290 => _290.message])}`,
176873
176944
  "error"
176874
176945
  );
176875
176946
  process.exitCode = 1;
@@ -177275,8 +177346,13 @@ async function importFirstEmailTemplateFromFile(file, raw = false) {
177275
177346
  }
177276
177347
 
177277
177348
  // src/cli/email/email-template-export.ts
177349
+ var deploymentTypes19 = ["cloud", "forgeops"];
177278
177350
  function setup81() {
177279
- const program3 = new FrodoCommand("frodo email template export");
177351
+ const program3 = new FrodoCommand(
177352
+ "frodo email template export",
177353
+ [],
177354
+ deploymentTypes19
177355
+ );
177280
177356
  program3.description("Export email templates.").addOption(
177281
177357
  new Option(
177282
177358
  "-i, --template-id <template-id>",
@@ -177313,7 +177389,7 @@ function setup81() {
177313
177389
  options2,
177314
177390
  command2
177315
177391
  );
177316
- if (options2.templateId && await getTokens2()) {
177392
+ if (options2.templateId && await getTokens2(false, true, deploymentTypes19)) {
177317
177393
  verboseMessage2(
177318
177394
  `Exporting email template "${options2.templateId}" from realm "${state.getRealm()}"...`
177319
177395
  );
@@ -177323,14 +177399,14 @@ function setup81() {
177323
177399
  options2.metadata
177324
177400
  );
177325
177401
  if (!outcome) process.exitCode = 1;
177326
- } else if (options2.all && await getTokens2()) {
177402
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes19)) {
177327
177403
  verboseMessage2("Exporting all email templates to a single file...");
177328
177404
  const outcome = await exportEmailTemplatesToFile(
177329
177405
  options2.file,
177330
177406
  options2.metadata
177331
177407
  );
177332
177408
  if (!outcome) process.exitCode = 1;
177333
- } else if (options2.allSeparate && await getTokens2()) {
177409
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes19)) {
177334
177410
  verboseMessage2("Exporting all email templates to separate files...");
177335
177411
  const outcome = await exportEmailTemplatesToFiles(options2.metadata);
177336
177412
  if (!outcome) process.exitCode = 1;
@@ -177350,8 +177426,13 @@ function setup81() {
177350
177426
 
177351
177427
  // src/cli/email/email-template-import.ts
177352
177428
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
177429
+ var deploymentTypes20 = ["cloud", "forgeops"];
177353
177430
  function setup82() {
177354
- const program3 = new FrodoCommand("frodo email template import");
177431
+ const program3 = new FrodoCommand(
177432
+ "frodo email template import",
177433
+ [],
177434
+ deploymentTypes20
177435
+ );
177355
177436
  program3.description("Import email templates.").addOption(
177356
177437
  new Option(
177357
177438
  "-i, --template-id <template-id>",
@@ -177383,7 +177464,7 @@ function setup82() {
177383
177464
  options2,
177384
177465
  command2
177385
177466
  );
177386
- if (options2.file && options2.templateId && await getTokens2()) {
177467
+ if (options2.file && options2.templateId && await getTokens2(false, true, deploymentTypes20)) {
177387
177468
  verboseMessage2(`Importing email template "${options2.templateId}"...`);
177388
177469
  const outcome = await importEmailTemplateFromFile(
177389
177470
  options2.templateId,
@@ -177391,19 +177472,19 @@ function setup82() {
177391
177472
  options2.raw
177392
177473
  );
177393
177474
  if (!outcome) process.exitCode = 1;
177394
- } else if (options2.all && options2.file && await getTokens2()) {
177475
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes20)) {
177395
177476
  verboseMessage2(
177396
177477
  `Importing all email templates from a single file (${options2.file})...`
177397
177478
  );
177398
177479
  const outcome = await importEmailTemplatesFromFile(options2.file);
177399
177480
  if (!outcome) process.exitCode = 1;
177400
- } else if (options2.allSeparate && !options2.file && await getTokens2()) {
177481
+ } else if (options2.allSeparate && !options2.file && await getTokens2(false, true, deploymentTypes20)) {
177401
177482
  verboseMessage2(
177402
177483
  "Importing all email templates from separate files (*.template.email.json) in current directory..."
177403
177484
  );
177404
177485
  const outcome = await importEmailTemplatesFromFiles(options2.raw);
177405
177486
  if (!outcome) process.exitCode = 1;
177406
- } else if (options2.file && await getTokens2()) {
177487
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes20)) {
177407
177488
  verboseMessage2(
177408
177489
  `Importing first email template from file "${options2.file}"...`
177409
177490
  );
@@ -177428,8 +177509,13 @@ function setup82() {
177428
177509
 
177429
177510
  // src/cli/email/email-template-list.ts
177430
177511
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
177512
+ var deploymentTypes21 = ["cloud", "forgeops"];
177431
177513
  function setup83() {
177432
- const program3 = new FrodoCommand("frodo email template list");
177514
+ const program3 = new FrodoCommand(
177515
+ "frodo email template list",
177516
+ [],
177517
+ deploymentTypes21
177518
+ );
177433
177519
  program3.description("List email templates.").addOption(
177434
177520
  new Option("-l, --long", "Long with all fields.").default(false, "false")
177435
177521
  ).action(
@@ -177443,7 +177529,7 @@ function setup83() {
177443
177529
  options2,
177444
177530
  command2
177445
177531
  );
177446
- if (await getTokens2()) {
177532
+ if (await getTokens2(false, true, deploymentTypes21)) {
177447
177533
  verboseMessage2(`Listing email templates ...`);
177448
177534
  const outcome = await listEmailTemplates(options2.long);
177449
177535
  if (!outcome) process.exitCode = 1;
@@ -177490,8 +177576,13 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
177490
177576
  var import_yesno = _chunkMPPKDFVIcjs.__toESM.call(void 0, require_yesno(), 1);
177491
177577
  var { checkForUpdates: checkForUpdates2, applyUpdates: applyUpdates2 } = frodo.cloud.startup;
177492
177578
  var { resolveUserName: resolveUserName2 } = frodo.idm.managed;
177579
+ var deploymentTypes22 = ["cloud"];
177493
177580
  function setup86() {
177494
- const program3 = new FrodoCommand("frodo esv apply");
177581
+ const program3 = new FrodoCommand(
177582
+ "frodo esv apply",
177583
+ ["realm"],
177584
+ deploymentTypes22
177585
+ );
177495
177586
  program3.description(
177496
177587
  "Apply pending changes to secrets and variables. Applying pending changes requires a restart of the AM and IDM pods and can take up to 10 minutes to complete."
177497
177588
  ).addOption(
@@ -177513,16 +177604,15 @@ function setup86() {
177513
177604
  ).default(600, "600 secs (10 mins)")
177514
177605
  ).addOption(new Option("-y, --yes", "Answer y/yes to all prompts.")).action(
177515
177606
  // implement command logic inside action handler
177516
- async (host2, realm2, user2, password3, options2, command2) => {
177607
+ async (host2, user2, password3, options2, command2) => {
177517
177608
  command2.handleDefaultArgsAndOpts(
177518
177609
  host2,
177519
- realm2,
177520
177610
  user2,
177521
177611
  password3,
177522
177612
  options2,
177523
177613
  command2
177524
177614
  );
177525
- if (await getTokens2()) {
177615
+ if (await getTokens2(false, true, deploymentTypes22)) {
177526
177616
  const updates = await checkForUpdates2();
177527
177617
  const updatesTable = createTable([
177528
177618
  "Type",
@@ -177556,7 +177646,7 @@ function setup86() {
177556
177646
  printMessage2(updatesTable.toString(), "data");
177557
177647
  }
177558
177648
  if (!options2.checkOnly) {
177559
- if (_optionalChain([updates, 'access', _297 => _297.secrets, 'optionalAccess', _298 => _298.length]) || _optionalChain([updates, 'access', _299 => _299.variables, 'optionalAccess', _300 => _300.length]) || options2.force) {
177649
+ if (_optionalChain([updates, 'access', _291 => _291.secrets, 'optionalAccess', _292 => _292.length]) || _optionalChain([updates, 'access', _293 => _293.variables, 'optionalAccess', _294 => _294.length]) || options2.force) {
177560
177650
  const ok = options2.yes || await (0, import_yesno.default)({
177561
177651
  question: `
177562
177652
  Changes may take up to 10 minutes to propagate, during which time you will not be able to make further updates.
@@ -178197,8 +178287,13 @@ async function deleteVersionOfSecret2(secretId, version3) {
178197
178287
  }
178198
178288
 
178199
178289
  // src/cli/esv/esv-secret-create.ts
178290
+ var deploymentTypes23 = ["cloud"];
178200
178291
  function setup87() {
178201
- const program3 = new FrodoCommand("frodo esv secret create");
178292
+ const program3 = new FrodoCommand(
178293
+ "frodo esv secret create",
178294
+ ["realm"],
178295
+ deploymentTypes23
178296
+ );
178202
178297
  program3.description("Create secrets.").requiredOption("-i, --secret-id <secret-id>", "Secret id.").option("--value <value>", 'Secret value. Overrides "--file"').addOption(
178203
178298
  new Option(
178204
178299
  "-f, --file [file]",
@@ -178213,16 +178308,15 @@ function setup87() {
178213
178308
  )
178214
178309
  ).action(
178215
178310
  // implement command logic inside action handler
178216
- async (host2, realm2, user2, password3, options2, command2) => {
178311
+ async (host2, user2, password3, options2, command2) => {
178217
178312
  command2.handleDefaultArgsAndOpts(
178218
178313
  host2,
178219
- realm2,
178220
178314
  user2,
178221
178315
  password3,
178222
178316
  options2,
178223
178317
  command2
178224
178318
  );
178225
- if (await getTokens2()) {
178319
+ if (await getTokens2(false, true, deploymentTypes23)) {
178226
178320
  verboseMessage2("Creating secret...");
178227
178321
  let outcome = null;
178228
178322
  if (options2.value) {
@@ -178254,8 +178348,13 @@ function setup87() {
178254
178348
 
178255
178349
  // src/cli/esv/esv-secret-delete.ts
178256
178350
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178351
+ var deploymentTypes24 = ["cloud"];
178257
178352
  function setup88() {
178258
- const program3 = new FrodoCommand("frodo esv secret delete");
178353
+ const program3 = new FrodoCommand(
178354
+ "frodo esv secret delete",
178355
+ ["realm"],
178356
+ deploymentTypes24
178357
+ );
178259
178358
  program3.description("Delete secrets.").addOption(
178260
178359
  new Option(
178261
178360
  "-i, --secret-id <secret-id>",
@@ -178265,20 +178364,19 @@ function setup88() {
178265
178364
  new Option("-a, --all", "Delete all secrets in a realm. Ignored with -i.")
178266
178365
  ).action(
178267
178366
  // implement command logic inside action handler
178268
- async (host2, realm2, user2, password3, options2, command2) => {
178367
+ async (host2, user2, password3, options2, command2) => {
178269
178368
  command2.handleDefaultArgsAndOpts(
178270
178369
  host2,
178271
- realm2,
178272
178370
  user2,
178273
178371
  password3,
178274
178372
  options2,
178275
178373
  command2
178276
178374
  );
178277
- if (options2.secretId && await getTokens2()) {
178375
+ if (options2.secretId && await getTokens2(false, true, deploymentTypes24)) {
178278
178376
  verboseMessage2("Deleting secret...");
178279
178377
  const outcome = await deleteSecret2(options2.secretId);
178280
178378
  if (!outcome) process.exitCode = 1;
178281
- } else if (options2.all && await getTokens2()) {
178379
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes24)) {
178282
178380
  verboseMessage2("Deleting all secrets...");
178283
178381
  const outcome = await deleteSecrets();
178284
178382
  if (!outcome) process.exitCode = 1;
@@ -178294,8 +178392,13 @@ function setup88() {
178294
178392
 
178295
178393
  // src/cli/esv/esv-secret-describe.ts
178296
178394
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178395
+ var deploymentTypes25 = ["cloud"];
178297
178396
  function setup89() {
178298
- const program3 = new FrodoCommand("frodo esv secret describe");
178397
+ const program3 = new FrodoCommand(
178398
+ "frodo esv secret describe",
178399
+ ["realm"],
178400
+ deploymentTypes25
178401
+ );
178299
178402
  program3.description("Describe secrets.").addOption(
178300
178403
  new Option(
178301
178404
  "-i, --secret-id <secret-id>",
@@ -178303,16 +178406,15 @@ function setup89() {
178303
178406
  ).makeOptionMandatory()
178304
178407
  ).action(
178305
178408
  // implement command logic inside action handler
178306
- async (host2, realm2, user2, password3, options2, command2) => {
178409
+ async (host2, user2, password3, options2, command2) => {
178307
178410
  command2.handleDefaultArgsAndOpts(
178308
178411
  host2,
178309
- realm2,
178310
178412
  user2,
178311
178413
  password3,
178312
178414
  options2,
178313
178415
  command2
178314
178416
  );
178315
- if (await getTokens2()) {
178417
+ if (await getTokens2(false, true, deploymentTypes25)) {
178316
178418
  verboseMessage2(`Describing secret ${options2.secretId}...`);
178317
178419
  const outcome = await describeSecret(options2.secretId);
178318
178420
  if (!outcome) process.exitCode = 1;
@@ -178327,8 +178429,13 @@ function setup89() {
178327
178429
 
178328
178430
  // src/cli/esv/esv-secret-export.ts
178329
178431
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178432
+ var deploymentTypes26 = ["cloud"];
178330
178433
  function setup90() {
178331
- const program3 = new FrodoCommand("frodo esv secret export");
178434
+ const program3 = new FrodoCommand(
178435
+ "frodo esv secret export",
178436
+ ["realm"],
178437
+ deploymentTypes26
178438
+ );
178332
178439
  program3.description("Export secrets.").addOption(
178333
178440
  new Option(
178334
178441
  "-i, --secret-id <secret-id>",
@@ -178377,16 +178484,15 @@ function setup90() {
178377
178484
  `["brightCyan"]
178378
178485
  ).action(
178379
178486
  // implement command logic inside action handler
178380
- async (host2, realm2, user2, password3, options2, command2) => {
178487
+ async (host2, user2, password3, options2, command2) => {
178381
178488
  command2.handleDefaultArgsAndOpts(
178382
178489
  host2,
178383
- realm2,
178384
178490
  user2,
178385
178491
  password3,
178386
178492
  options2,
178387
178493
  command2
178388
178494
  );
178389
- if (options2.secretId && await getTokens2()) {
178495
+ if (options2.secretId && await getTokens2(false, true, deploymentTypes26)) {
178390
178496
  verboseMessage2(
178391
178497
  `Exporting secret "${options2.secretId}" from realm "${state.getRealm()}"...`
178392
178498
  );
@@ -178398,7 +178504,7 @@ function setup90() {
178398
178504
  options2.target
178399
178505
  );
178400
178506
  if (!outcome) process.exitCode = 1;
178401
- } else if (options2.all && await getTokens2()) {
178507
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes26)) {
178402
178508
  verboseMessage2("Exporting all secrets to a single file...");
178403
178509
  const outcome = await exportSecretsToFile(
178404
178510
  options2.file,
@@ -178407,7 +178513,7 @@ function setup90() {
178407
178513
  options2.target
178408
178514
  );
178409
178515
  if (!outcome) process.exitCode = 1;
178410
- } else if (options2.allSeparate && await getTokens2()) {
178516
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes26)) {
178411
178517
  verboseMessage2("Exporting all secrets to separate files...");
178412
178518
  const outcome = await exportSecretsToFiles(
178413
178519
  options2.metadata,
@@ -178430,8 +178536,13 @@ function setup90() {
178430
178536
 
178431
178537
  // src/cli/esv/esv-secret-import.ts
178432
178538
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178539
+ var deploymentTypes27 = ["cloud"];
178433
178540
  function setup91() {
178434
- const program3 = new FrodoCommand("frodo esv secret import");
178541
+ const program3 = new FrodoCommand(
178542
+ "frodo esv secret import",
178543
+ ["realm"],
178544
+ deploymentTypes27
178545
+ );
178435
178546
  program3.description("Import secrets.").addOption(
178436
178547
  new Option(
178437
178548
  "-i, --secret-id <secret-id>",
@@ -178474,16 +178585,15 @@ function setup91() {
178474
178585
  `["brightCyan"]
178475
178586
  ).action(
178476
178587
  // implement command logic inside action handler
178477
- async (host2, realm2, user2, password3, options2, command2) => {
178588
+ async (host2, user2, password3, options2, command2) => {
178478
178589
  command2.handleDefaultArgsAndOpts(
178479
178590
  host2,
178480
- realm2,
178481
178591
  user2,
178482
178592
  password3,
178483
178593
  options2,
178484
178594
  command2
178485
178595
  );
178486
- if (options2.secretId && await getTokens2()) {
178596
+ if (options2.secretId && await getTokens2(false, true, deploymentTypes27)) {
178487
178597
  printMessage2(`Importing secret ${options2.secretId}...`);
178488
178598
  const outcome = await importSecretFromFile(
178489
178599
  options2.secretId,
@@ -178492,7 +178602,7 @@ function setup91() {
178492
178602
  options2.source
178493
178603
  );
178494
178604
  if (!outcome) process.exitCode = 1;
178495
- } else if (options2.all && options2.file && await getTokens2()) {
178605
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes27)) {
178496
178606
  printMessage2(
178497
178607
  `Importing all secrets from a single file (${options2.file})...`
178498
178608
  );
@@ -178502,7 +178612,7 @@ function setup91() {
178502
178612
  options2.source
178503
178613
  );
178504
178614
  if (!outcome) process.exitCode = 1;
178505
- } else if (options2.allSeparate && !options2.file && await getTokens2()) {
178615
+ } else if (options2.allSeparate && !options2.file && await getTokens2(false, true, deploymentTypes27)) {
178506
178616
  printMessage2(
178507
178617
  "Importing all secrets from separate files in working directory..."
178508
178618
  );
@@ -178511,7 +178621,7 @@ function setup91() {
178511
178621
  options2.source
178512
178622
  );
178513
178623
  if (!outcome) process.exitCode = 1;
178514
- } else if (options2.file && await getTokens2()) {
178624
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes27)) {
178515
178625
  printMessage2("Importing first secret in file...");
178516
178626
  const outcome = await importSecretFromFile(
178517
178627
  null,
@@ -178533,8 +178643,13 @@ function setup91() {
178533
178643
 
178534
178644
  // src/cli/esv/esv-secret-list.ts
178535
178645
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178646
+ var deploymentTypes28 = ["cloud"];
178536
178647
  function setup92() {
178537
- const program3 = new FrodoCommand("frodo esv secret list");
178648
+ const program3 = new FrodoCommand(
178649
+ "frodo esv secret list",
178650
+ ["realm"],
178651
+ deploymentTypes28
178652
+ );
178538
178653
  program3.description("List secrets.").addOption(
178539
178654
  new Option("-l, --long", "Long with all fields besides usage.").default(
178540
178655
  false,
@@ -178552,16 +178667,15 @@ function setup92() {
178552
178667
  )
178553
178668
  ).action(
178554
178669
  // implement command logic inside action handler
178555
- async (host2, realm2, user2, password3, options2, command2) => {
178670
+ async (host2, user2, password3, options2, command2) => {
178556
178671
  command2.handleDefaultArgsAndOpts(
178557
178672
  host2,
178558
- realm2,
178559
178673
  user2,
178560
178674
  password3,
178561
178675
  options2,
178562
178676
  command2
178563
178677
  );
178564
- if (await getTokens2()) {
178678
+ if (await getTokens2(false, true, deploymentTypes28)) {
178565
178679
  verboseMessage2("Listing secrets...");
178566
178680
  const outcome = await listSecrets(
178567
178681
  options2.long,
@@ -178580,20 +178694,24 @@ function setup92() {
178580
178694
 
178581
178695
  // src/cli/esv/esv-secret-set.ts
178582
178696
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178697
+ var deploymentTypes29 = ["cloud"];
178583
178698
  function setup93() {
178584
- const program3 = new FrodoCommand("frodo esv secret set");
178699
+ const program3 = new FrodoCommand(
178700
+ "frodo esv secret set",
178701
+ ["realm"],
178702
+ deploymentTypes29
178703
+ );
178585
178704
  program3.description("Set secret description.").addOption(new Option("-i, --secret-id <secret-id>", "Secret id.")).addOption(new Option("--description <description>", "Secret description.")).action(
178586
178705
  // implement command logic inside action handler
178587
- async (host2, realm2, user2, password3, options2, command2) => {
178706
+ async (host2, user2, password3, options2, command2) => {
178588
178707
  command2.handleDefaultArgsAndOpts(
178589
178708
  host2,
178590
- realm2,
178591
178709
  user2,
178592
178710
  password3,
178593
178711
  options2,
178594
178712
  command2
178595
178713
  );
178596
- if (await getTokens2()) {
178714
+ if (await getTokens2(false, true, deploymentTypes29)) {
178597
178715
  verboseMessage2("Setting secret description...");
178598
178716
  const outcome = await setSecretDescription2(
178599
178717
  options2.secretId,
@@ -178614,20 +178732,24 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178614
178732
 
178615
178733
  // src/cli/esv/esv-secret-version-activate.ts
178616
178734
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178735
+ var deploymentTypes30 = ["cloud"];
178617
178736
  function setup94() {
178618
- const program3 = new FrodoCommand("frodo esv secret version activate");
178737
+ const program3 = new FrodoCommand(
178738
+ "frodo esv secret version activate",
178739
+ ["realm"],
178740
+ deploymentTypes30
178741
+ );
178619
178742
  program3.description("Activate versions of secrets.").addOption(new Option("-i, --secret-id <secret-id>", "Secret id.")).addOption(new Option("-v, --version <version>", "Version of secret.")).action(
178620
178743
  // implement command logic inside action handler
178621
- async (host2, realm2, user2, password3, options2, command2) => {
178744
+ async (host2, user2, password3, options2, command2) => {
178622
178745
  command2.handleDefaultArgsAndOpts(
178623
178746
  host2,
178624
- realm2,
178625
178747
  user2,
178626
178748
  password3,
178627
178749
  options2,
178628
178750
  command2
178629
178751
  );
178630
- if (options2.secretId && options2.version && await getTokens2()) {
178752
+ if (options2.secretId && options2.version && await getTokens2(false, true, deploymentTypes30)) {
178631
178753
  verboseMessage2(`Activating version of secret...`);
178632
178754
  const outcome = await activateVersionOfSecret(
178633
178755
  options2.secretId,
@@ -178646,8 +178768,13 @@ function setup94() {
178646
178768
 
178647
178769
  // src/cli/esv/esv-secret-version-create.ts
178648
178770
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178771
+ var deploymentTypes31 = ["cloud"];
178649
178772
  function setup95() {
178650
- const program3 = new FrodoCommand("frodo esv secret version create");
178773
+ const program3 = new FrodoCommand(
178774
+ "frodo esv secret version create",
178775
+ ["realm"],
178776
+ deploymentTypes31
178777
+ );
178651
178778
  program3.description("Create new version of secret.").addOption(new Option("-i, --secret-id <secret-id>", "Secret id.")).addOption(new Option("--value <value>", "Secret value.")).addOption(
178652
178779
  new Option(
178653
178780
  "-f, --file [file]",
@@ -178655,16 +178782,15 @@ function setup95() {
178655
178782
  )
178656
178783
  ).action(
178657
178784
  // implement command logic inside action handler
178658
- async (host2, realm2, user2, password3, options2, command2) => {
178785
+ async (host2, user2, password3, options2, command2) => {
178659
178786
  command2.handleDefaultArgsAndOpts(
178660
178787
  host2,
178661
- realm2,
178662
178788
  user2,
178663
178789
  password3,
178664
178790
  options2,
178665
178791
  command2
178666
178792
  );
178667
- if (await getTokens2()) {
178793
+ if (await getTokens2(false, true, deploymentTypes31)) {
178668
178794
  verboseMessage2("Creating new version of secret...");
178669
178795
  let outcome = null;
178670
178796
  if (options2.value) {
@@ -178690,20 +178816,24 @@ function setup95() {
178690
178816
 
178691
178817
  // src/cli/esv/esv-secret-version-deactivate.ts
178692
178818
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178819
+ var deploymentTypes32 = ["cloud"];
178693
178820
  function setup96() {
178694
- const program3 = new FrodoCommand("frodo esv secret version deactivate");
178821
+ const program3 = new FrodoCommand(
178822
+ "frodo esv secret version deactivate",
178823
+ ["realm"],
178824
+ deploymentTypes32
178825
+ );
178695
178826
  program3.description("Deactivate versions of secrets.").addOption(new Option("-i, --secret-id <secret-id>", "Secret id.")).addOption(new Option("-v, --version <version>", "Version of secret.")).action(
178696
178827
  // implement command logic inside action handler
178697
- async (host2, realm2, user2, password3, options2, command2) => {
178828
+ async (host2, user2, password3, options2, command2) => {
178698
178829
  command2.handleDefaultArgsAndOpts(
178699
178830
  host2,
178700
- realm2,
178701
178831
  user2,
178702
178832
  password3,
178703
178833
  options2,
178704
178834
  command2
178705
178835
  );
178706
- if (options2.secretId && options2.version && await getTokens2()) {
178836
+ if (options2.secretId && options2.version && await getTokens2(false, true, deploymentTypes32)) {
178707
178837
  verboseMessage2(`Deactivating version of secret...`);
178708
178838
  const outcome = await deactivateVersionOfSecret(
178709
178839
  options2.secretId,
@@ -178722,8 +178852,13 @@ function setup96() {
178722
178852
 
178723
178853
  // src/cli/esv/esv-secret-version-delete.ts
178724
178854
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178855
+ var deploymentTypes33 = ["cloud"];
178725
178856
  function setup97() {
178726
- const program3 = new FrodoCommand("frodo esv secret version delete");
178857
+ const program3 = new FrodoCommand(
178858
+ "frodo esv secret version delete",
178859
+ ["realm"],
178860
+ deploymentTypes33
178861
+ );
178727
178862
  program3.description("Delete versions of secrets.").addOption(
178728
178863
  new Option(
178729
178864
  "-i, --secret-id <secret-id>",
@@ -178733,16 +178868,15 @@ function setup97() {
178733
178868
  new Option("-a, --all", "Delete all secrets in a realm. Ignored with -i.")
178734
178869
  ).action(
178735
178870
  // implement command logic inside action handler
178736
- async (host2, realm2, user2, password3, options2, command2) => {
178871
+ async (host2, user2, password3, options2, command2) => {
178737
178872
  command2.handleDefaultArgsAndOpts(
178738
178873
  host2,
178739
- realm2,
178740
178874
  user2,
178741
178875
  password3,
178742
178876
  options2,
178743
178877
  command2
178744
178878
  );
178745
- if (options2.secretId && options2.version && await getTokens2()) {
178879
+ if (options2.secretId && options2.version && await getTokens2(false, true, deploymentTypes33)) {
178746
178880
  verboseMessage2(`Deleting version of secret...`);
178747
178881
  const outcome = await deleteVersionOfSecret2(
178748
178882
  options2.secretId,
@@ -178761,22 +178895,26 @@ function setup97() {
178761
178895
 
178762
178896
  // src/cli/esv/esv-secret-version-list.ts
178763
178897
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
178898
+ var deploymentTypes34 = ["cloud"];
178764
178899
  function setup98() {
178765
- const program3 = new FrodoCommand("frodo esv secret version list");
178900
+ const program3 = new FrodoCommand(
178901
+ "frodo esv secret version list",
178902
+ ["realm"],
178903
+ deploymentTypes34
178904
+ );
178766
178905
  program3.description("List versions of secret.").addOption(new Option("-i, --secret-id <secret-id>", "Secret id.")).addOption(
178767
178906
  new Option("-l, --long", "Long with all fields.").default(false, "false")
178768
178907
  ).action(
178769
178908
  // implement command logic inside action handler
178770
- async (host2, realm2, user2, password3, options2, command2) => {
178909
+ async (host2, user2, password3, options2, command2) => {
178771
178910
  command2.handleDefaultArgsAndOpts(
178772
178911
  host2,
178773
- realm2,
178774
178912
  user2,
178775
178913
  password3,
178776
178914
  options2,
178777
178915
  command2
178778
178916
  );
178779
- if (await getTokens2()) {
178917
+ if (await getTokens2(false, true, deploymentTypes34)) {
178780
178918
  verboseMessage2("Listing versions...");
178781
178919
  const outcome = await listSecretVersions(options2.secretId);
178782
178920
  if (!outcome) process.exitCode = 1;
@@ -179297,8 +179435,13 @@ async function importVariablesFromFiles() {
179297
179435
  }
179298
179436
 
179299
179437
  // src/cli/esv/esv-variable-create.ts
179438
+ var deploymentTypes35 = ["cloud"];
179300
179439
  function setup101() {
179301
- const program3 = new FrodoCommand("frodo esv variable create");
179440
+ const program3 = new FrodoCommand(
179441
+ "frodo esv variable create",
179442
+ ["realm"],
179443
+ deploymentTypes35
179444
+ );
179302
179445
  program3.description("Create variables.").requiredOption("-i, --variable-id <variable-id>", "Variable id.").requiredOption("--value <value>", "Variable value.").option("--description [description]", "Variable description.").option(
179303
179446
  "--variable-type [variable-type]",
179304
179447
  'Variable type. Must be one of "string", "list", "array", "object", "bool", "int", or "number".',
@@ -179319,16 +179462,15 @@ function setup101() {
179319
179462
  `["brightCyan"]
179320
179463
  ).action(
179321
179464
  // implement command logic inside action handler
179322
- async (host2, realm2, user2, password3, options2, command2) => {
179465
+ async (host2, user2, password3, options2, command2) => {
179323
179466
  command2.handleDefaultArgsAndOpts(
179324
179467
  host2,
179325
- realm2,
179326
179468
  user2,
179327
179469
  password3,
179328
179470
  options2,
179329
179471
  command2
179330
179472
  );
179331
- if (await getTokens2()) {
179473
+ if (await getTokens2(false, true, deploymentTypes35)) {
179332
179474
  verboseMessage2("Creating variable...");
179333
179475
  const outcome = await createVariable2(
179334
179476
  options2.variableId,
@@ -179348,8 +179490,13 @@ function setup101() {
179348
179490
 
179349
179491
  // src/cli/esv/esv-variable-delete.ts
179350
179492
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179493
+ var deploymentTypes36 = ["cloud"];
179351
179494
  function setup102() {
179352
- const program3 = new FrodoCommand("frodo cmd sub2 delete");
179495
+ const program3 = new FrodoCommand(
179496
+ "frodo cmd sub2 delete",
179497
+ ["realm"],
179498
+ deploymentTypes36
179499
+ );
179353
179500
  program3.description("Delete variables.").addOption(
179354
179501
  new Option(
179355
179502
  "-i, --variable-id <variable-id>",
@@ -179367,20 +179514,19 @@ function setup102() {
179367
179514
  )
179368
179515
  ).action(
179369
179516
  // implement command logic inside action handler
179370
- async (host2, realm2, user2, password3, options2, command2) => {
179517
+ async (host2, user2, password3, options2, command2) => {
179371
179518
  command2.handleDefaultArgsAndOpts(
179372
179519
  host2,
179373
- realm2,
179374
179520
  user2,
179375
179521
  password3,
179376
179522
  options2,
179377
179523
  command2
179378
179524
  );
179379
- if (options2.variableId && await getTokens2()) {
179525
+ if (options2.variableId && await getTokens2(false, true, deploymentTypes36)) {
179380
179526
  verboseMessage2("Deleting variable...");
179381
179527
  const outcome = await deleteVariableById(options2.variableId);
179382
179528
  if (!outcome) process.exitCode = 1;
179383
- } else if (options2.all && await getTokens2()) {
179529
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes36)) {
179384
179530
  verboseMessage2("Deleting all variables...");
179385
179531
  const outcome = await deleteVariables();
179386
179532
  if (!outcome) process.exitCode = 1;
@@ -179397,8 +179543,13 @@ function setup102() {
179397
179543
 
179398
179544
  // src/cli/esv/esv-variable-describe.ts
179399
179545
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179546
+ var deploymentTypes37 = ["cloud"];
179400
179547
  function setup103() {
179401
- const program3 = new FrodoCommand("frodo esv variable describe");
179548
+ const program3 = new FrodoCommand(
179549
+ "frodo esv variable describe",
179550
+ ["realm"],
179551
+ deploymentTypes37
179552
+ );
179402
179553
  program3.description("Describe variables.").addOption(
179403
179554
  new Option(
179404
179555
  "-i, --variable-id <variable-id>",
@@ -179406,16 +179557,15 @@ function setup103() {
179406
179557
  ).makeOptionMandatory()
179407
179558
  ).addOption(new Option("--json", "Output in JSON format.")).action(
179408
179559
  // implement command logic inside action handler
179409
- async (host2, realm2, user2, password3, options2, command2) => {
179560
+ async (host2, user2, password3, options2, command2) => {
179410
179561
  command2.handleDefaultArgsAndOpts(
179411
179562
  host2,
179412
- realm2,
179413
179563
  user2,
179414
179564
  password3,
179415
179565
  options2,
179416
179566
  command2
179417
179567
  );
179418
- if (await getTokens2()) {
179568
+ if (await getTokens2(false, true, deploymentTypes37)) {
179419
179569
  verboseMessage2(`Describing variable ${options2.variableId}...`);
179420
179570
  const outcome = await describeVariable(
179421
179571
  options2.variableId,
@@ -179433,8 +179583,13 @@ function setup103() {
179433
179583
 
179434
179584
  // src/cli/esv/esv-variable-export.ts
179435
179585
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179586
+ var deploymentTypes38 = ["cloud"];
179436
179587
  function setup104() {
179437
- const program3 = new FrodoCommand("frodo esv variable export");
179588
+ const program3 = new FrodoCommand(
179589
+ "frodo esv variable export",
179590
+ ["realm"],
179591
+ deploymentTypes38
179592
+ );
179438
179593
  program3.description("Export variables.").addOption(
179439
179594
  new Option(
179440
179595
  "-i, --variable-id <variable-id>",
@@ -179462,16 +179617,15 @@ function setup104() {
179462
179617
  )
179463
179618
  ).action(
179464
179619
  // implement command logic inside action handler
179465
- async (host2, realm2, user2, password3, options2, command2) => {
179620
+ async (host2, user2, password3, options2, command2) => {
179466
179621
  command2.handleDefaultArgsAndOpts(
179467
179622
  host2,
179468
- realm2,
179469
179623
  user2,
179470
179624
  password3,
179471
179625
  options2,
179472
179626
  command2
179473
179627
  );
179474
- if (options2.variableId && await getTokens2()) {
179628
+ if (options2.variableId && await getTokens2(false, true, deploymentTypes38)) {
179475
179629
  verboseMessage2(
179476
179630
  `Exporting variable "${options2.variableId}" from realm "${state.getRealm()}"...`
179477
179631
  );
@@ -179482,7 +179636,7 @@ function setup104() {
179482
179636
  options2.metadata
179483
179637
  );
179484
179638
  if (!outcome) process.exitCode = 1;
179485
- } else if (options2.all && await getTokens2()) {
179639
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes38)) {
179486
179640
  verboseMessage2("Exporting all variables to a single file...");
179487
179641
  const outcome = await exportVariablesToFile(
179488
179642
  options2.file,
@@ -179490,7 +179644,7 @@ function setup104() {
179490
179644
  options2.metadata
179491
179645
  );
179492
179646
  if (!outcome) process.exitCode = 1;
179493
- } else if (options2.allSeparate && await getTokens2()) {
179647
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes38)) {
179494
179648
  verboseMessage2("Exporting all variables to separate files...");
179495
179649
  const outcome = await exportVariablesToFiles(
179496
179650
  options2.decode,
@@ -179513,8 +179667,13 @@ function setup104() {
179513
179667
 
179514
179668
  // src/cli/esv/esv-variable-import.ts
179515
179669
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179670
+ var deploymentTypes39 = ["cloud"];
179516
179671
  function setup105() {
179517
- const program3 = new FrodoCommand("frodo esv variable import");
179672
+ const program3 = new FrodoCommand(
179673
+ "frodo esv variable import",
179674
+ ["realm"],
179675
+ deploymentTypes39
179676
+ );
179518
179677
  program3.description("Import variables.").addOption(
179519
179678
  new Option(
179520
179679
  "-i, --variable-id <variable-id>",
@@ -179532,35 +179691,34 @@ function setup105() {
179532
179691
  )
179533
179692
  ).action(
179534
179693
  // implement command logic inside action handler
179535
- async (host2, realm2, user2, password3, options2, command2) => {
179694
+ async (host2, user2, password3, options2, command2) => {
179536
179695
  command2.handleDefaultArgsAndOpts(
179537
179696
  host2,
179538
- realm2,
179539
179697
  user2,
179540
179698
  password3,
179541
179699
  options2,
179542
179700
  command2
179543
179701
  );
179544
- if (options2.variableId && await getTokens2()) {
179702
+ if (options2.variableId && await getTokens2(false, true, deploymentTypes39)) {
179545
179703
  printMessage2(`Importing variable ${options2.variableId}...`);
179546
179704
  const outcome = await importVariableFromFile(
179547
179705
  options2.variableId,
179548
179706
  options2.file
179549
179707
  );
179550
179708
  if (!outcome) process.exitCode = 1;
179551
- } else if (options2.all && options2.file && await getTokens2()) {
179709
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes39)) {
179552
179710
  printMessage2(
179553
179711
  `Importing all variables from a single file (${options2.file})...`
179554
179712
  );
179555
179713
  const outcome = await importVariablesFromFile(options2.file);
179556
179714
  if (!outcome) process.exitCode = 1;
179557
- } else if (options2.allSeparate && !options2.file && await getTokens2()) {
179715
+ } else if (options2.allSeparate && !options2.file && await getTokens2(false, true, deploymentTypes39)) {
179558
179716
  printMessage2(
179559
179717
  "Importing all variables from separate files in working directory..."
179560
179718
  );
179561
179719
  const outcome = await importVariablesFromFiles();
179562
179720
  if (!outcome) process.exitCode = 1;
179563
- } else if (options2.file && await getTokens2()) {
179721
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes39)) {
179564
179722
  printMessage2("Importing first variable in file...");
179565
179723
  const outcome = await importVariableFromFile(null, options2.file);
179566
179724
  if (!outcome) process.exitCode = 1;
@@ -179577,8 +179735,13 @@ function setup105() {
179577
179735
 
179578
179736
  // src/cli/esv/esv-variable-list.ts
179579
179737
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179738
+ var deploymentTypes40 = ["cloud"];
179580
179739
  function setup106() {
179581
- const program3 = new FrodoCommand("frodo esv variable list");
179740
+ const program3 = new FrodoCommand(
179741
+ "frodo esv variable list",
179742
+ ["realm"],
179743
+ deploymentTypes40
179744
+ );
179582
179745
  program3.description("List variables.").addOption(
179583
179746
  new Option("-l, --long", "Long with all fields besides usage.").default(
179584
179747
  false,
@@ -179596,16 +179759,15 @@ function setup106() {
179596
179759
  )
179597
179760
  ).action(
179598
179761
  // implement command logic inside action handler
179599
- async (host2, realm2, user2, password3, options2, command2) => {
179762
+ async (host2, user2, password3, options2, command2) => {
179600
179763
  command2.handleDefaultArgsAndOpts(
179601
179764
  host2,
179602
- realm2,
179603
179765
  user2,
179604
179766
  password3,
179605
179767
  options2,
179606
179768
  command2
179607
179769
  );
179608
- if (await getTokens2()) {
179770
+ if (await getTokens2(false, true, deploymentTypes40)) {
179609
179771
  verboseMessage2("Listing variables...");
179610
179772
  const outcome = await listVariables(
179611
179773
  options2.long,
@@ -179624,20 +179786,24 @@ function setup106() {
179624
179786
 
179625
179787
  // src/cli/esv/esv-variable-set.ts
179626
179788
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179789
+ var deploymentTypes41 = ["cloud"];
179627
179790
  function setup107() {
179628
- const program3 = new FrodoCommand("frodo esv variable set");
179791
+ const program3 = new FrodoCommand(
179792
+ "frodo esv variable set",
179793
+ ["realm"],
179794
+ deploymentTypes41
179795
+ );
179629
179796
  program3.description("Set variable description.").requiredOption("-i, --variable-id <variable-id>", "Variable id.").option("--value [value]", "Variable value.").option("--description [description]", "Variable description.").action(
179630
179797
  // implement command logic inside action handler
179631
- async (host2, realm2, user2, password3, options2, command2) => {
179798
+ async (host2, user2, password3, options2, command2) => {
179632
179799
  command2.handleDefaultArgsAndOpts(
179633
179800
  host2,
179634
- realm2,
179635
179801
  user2,
179636
179802
  password3,
179637
179803
  options2,
179638
179804
  command2
179639
179805
  );
179640
- if (options2.variableId && options2.value && options2.description && await getTokens2()) {
179806
+ if (options2.variableId && options2.value && options2.description && await getTokens2(false, true, deploymentTypes41)) {
179641
179807
  verboseMessage2("Updating variable...");
179642
179808
  const outcome = await updateVariable2(
179643
179809
  options2.variableId,
@@ -179645,7 +179811,7 @@ function setup107() {
179645
179811
  options2.description
179646
179812
  );
179647
179813
  if (!outcome) process.exitCode = 1;
179648
- } else if (options2.variableId && options2.description && await getTokens2()) {
179814
+ } else if (options2.variableId && options2.description && await getTokens2(false, true, deploymentTypes41)) {
179649
179815
  verboseMessage2("Updating variable...");
179650
179816
  const outcome = await setVariableDescription2(
179651
179817
  options2.variableId,
@@ -179695,8 +179861,9 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179695
179861
 
179696
179862
  // src/cli/idm/idm-count.ts
179697
179863
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179864
+ var deploymentTypes42 = ["cloud", "forgeops"];
179698
179865
  function setup110() {
179699
- const program3 = new FrodoCommand("frodo idm count");
179866
+ const program3 = new FrodoCommand("frodo idm count", [], deploymentTypes42);
179700
179867
  program3.description("Count managed objects.").addOption(
179701
179868
  new Option(
179702
179869
  "-o, --managed-object <type>",
@@ -179713,7 +179880,7 @@ function setup110() {
179713
179880
  options2,
179714
179881
  command2
179715
179882
  );
179716
- if (await getTokens2()) {
179883
+ if (await getTokens2(false, true, deploymentTypes42)) {
179717
179884
  verboseMessage2(
179718
179885
  `Counting managed ${options2.managedObject} objects...`
179719
179886
  );
@@ -179730,8 +179897,9 @@ function setup110() {
179730
179897
 
179731
179898
  // src/cli/idm/idm-export.ts
179732
179899
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
179900
+ var deploymentTypes43 = ["cloud", "forgeops"];
179733
179901
  function setup111() {
179734
- const program3 = new FrodoCommand("frodo idm export");
179902
+ const program3 = new FrodoCommand("frodo idm export", [], deploymentTypes43);
179735
179903
  program3.description("Export IDM configuration objects.").addOption(
179736
179904
  new Option(
179737
179905
  "-N, --name <name>",
@@ -179778,7 +179946,7 @@ function setup111() {
179778
179946
  options2,
179779
179947
  command2
179780
179948
  );
179781
- if (options2.name && await getTokens2()) {
179949
+ if (options2.name && await getTokens2(false, true, deploymentTypes43)) {
179782
179950
  verboseMessage2(`Exporting object "${options2.name}"...`);
179783
179951
  const outcome = await exportConfigEntity(
179784
179952
  options2.name,
@@ -179793,7 +179961,7 @@ function setup111() {
179793
179961
  );
179794
179962
  program3.help();
179795
179963
  process.exitCode = 1;
179796
- } else if (options2.allSeparate && options2.entitiesFile && options2.envFile && await getTokens2()) {
179964
+ } else if (options2.allSeparate && options2.entitiesFile && options2.envFile && await getTokens2(false, true, deploymentTypes43)) {
179797
179965
  verboseMessage2(
179798
179966
  `Exporting IDM configuration objects specified in ${options2.entitiesFile} into separate files in ${state.getDirectory()} using ${options2.envFile} for variable replacement...`
179799
179967
  );
@@ -179804,7 +179972,7 @@ function setup111() {
179804
179972
  );
179805
179973
  if (!outcome) process.exitCode = 1;
179806
179974
  await warnAboutOfflineConnectorServers();
179807
- } else if (options2.allSeparate && await getTokens2()) {
179975
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes43)) {
179808
179976
  verboseMessage2(
179809
179977
  `Exporting all IDM configuration objects into separate files in ${state.getDirectory()}...`
179810
179978
  );
@@ -179829,8 +179997,9 @@ function setup111() {
179829
179997
 
179830
179998
  // src/cli/idm/idm-import.ts
179831
179999
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
180000
+ var deploymentTypes44 = ["cloud", "forgeops"];
179832
180001
  function setup112() {
179833
- const program3 = new FrodoCommand("frodo idm import");
180002
+ const program3 = new FrodoCommand("frodo idm import", [], deploymentTypes44);
179834
180003
  program3.description("Import IDM configuration objects.").addOption(
179835
180004
  new Option(
179836
180005
  "-N, --name <name>",
@@ -179862,14 +180031,14 @@ function setup112() {
179862
180031
  options2,
179863
180032
  command2
179864
180033
  );
179865
- if (options2.name && await getTokens2()) {
180034
+ if (options2.name && await getTokens2(false, true, deploymentTypes44)) {
179866
180035
  verboseMessage2(`Importing object "${options2.name}"...`);
179867
180036
  const outcome = await importConfigEntityByIdFromFile(
179868
180037
  options2.name,
179869
180038
  options2.file
179870
180039
  );
179871
180040
  if (!outcome) process.exitCode = 1;
179872
- } else if (options2.file && await getTokens2()) {
180041
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes44)) {
179873
180042
  verboseMessage2(`Importing object from file...`);
179874
180043
  const outcome = await importConfigEntityFromFile(options2.file);
179875
180044
  if (!outcome) process.exitCode = 1;
@@ -179880,7 +180049,7 @@ function setup112() {
179880
180049
  );
179881
180050
  program3.help();
179882
180051
  process.exitCode = 1;
179883
- } else if (options2.allSeparate && options2.entitiesFile && options2.envFile && await getTokens2()) {
180052
+ } else if (options2.allSeparate && options2.entitiesFile && options2.envFile && await getTokens2(false, true, deploymentTypes44)) {
179884
180053
  verboseMessage2(
179885
180054
  `Importing IDM configuration objects specified in ${options2.entitiesFile} into separate files in ${state.getDirectory()} using ${options2.envFile} for variable replacement...`
179886
180055
  );
@@ -179889,7 +180058,7 @@ function setup112() {
179889
180058
  options2.envFile
179890
180059
  );
179891
180060
  if (!outcome) process.exitCode = 1;
179892
- } else if (options2.allSeparate && await getTokens2()) {
180061
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes44)) {
179893
180062
  verboseMessage2(
179894
180063
  `Importing all IDM configuration objects from separate files in ${state.getDirectory()}...`
179895
180064
  );
@@ -179911,8 +180080,9 @@ function setup112() {
179911
180080
 
179912
180081
  // src/cli/idm/idm-list.ts
179913
180082
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
180083
+ var deploymentTypes45 = ["cloud", "forgeops"];
179914
180084
  function setup113() {
179915
- const program3 = new FrodoCommand("frodo idm list");
180085
+ const program3 = new FrodoCommand("frodo idm list", [], deploymentTypes45);
179916
180086
  program3.description("List IDM configuration objects.").action(
179917
180087
  // implement command logic inside action handler
179918
180088
  async (host2, realm2, user2, password3, options2, command2) => {
@@ -179924,7 +180094,7 @@ function setup113() {
179924
180094
  options2,
179925
180095
  command2
179926
180096
  );
179927
- if (await getTokens2()) {
180097
+ if (await getTokens2(false, true, deploymentTypes45)) {
179928
180098
  verboseMessage2("Listing all IDM configuration objects...");
179929
180099
  const outcome = await listAllConfigEntities();
179930
180100
  if (!outcome) process.exitCode = 1;
@@ -180819,7 +180989,7 @@ function getNodeClassificationMd(nodeType) {
180819
180989
  function getOneLineDescription5(nodeObj, nodeRef) {
180820
180990
  const description = `[${nodeObj._id["brightCyan"]}] (${getNodeClassification2(
180821
180991
  nodeObj._type._id
180822
- ).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _301 => _301.displayName]) : ""}`;
180992
+ ).join(", ")}) ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _295 => _295.displayName]) : ""}`;
180823
180993
  return description;
180824
180994
  }
180825
180995
  function getTableHeaderMd5() {
@@ -181554,7 +181724,7 @@ async function listJourneys(long = false, analyze = false) {
181554
181724
  table.push([
181555
181725
  `${journeyStub._id}`,
181556
181726
  journeyStub.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
181557
- _optionalChain([journeyStub, 'access', _302 => _302.uiConfig, 'optionalAccess', _303 => _303.categories]) ? wordwrap(
181727
+ _optionalChain([journeyStub, 'access', _296 => _296.uiConfig, 'optionalAccess', _297 => _297.categories]) ? wordwrap(
181558
181728
  JSON.parse(journeyStub.uiConfig.categories).join(", "),
181559
181729
  60
181560
181730
  ) : ""
@@ -181596,7 +181766,7 @@ async function listJourneys(long = false, analyze = false) {
181596
181766
  `${journeyExport.tree._id}`,
181597
181767
  journeyExport.tree.enabled === false ? "disabled"["brightRed"] : "enabled"["brightGreen"],
181598
181768
  getJourneyClassification2(journeyExport).join(", "),
181599
- _optionalChain([journeyExport, 'access', _304 => _304.tree, 'access', _305 => _305.uiConfig, 'optionalAccess', _306 => _306.categories]) ? wordwrap(
181769
+ _optionalChain([journeyExport, 'access', _298 => _298.tree, 'access', _299 => _299.uiConfig, 'optionalAccess', _300 => _300.categories]) ? wordwrap(
181600
181770
  JSON.parse(journeyExport.tree.uiConfig.categories).join(
181601
181771
  ", "
181602
181772
  ),
@@ -181999,7 +182169,7 @@ async function describeJourney(journeyData, resolveTreeExport = onlineTreeExport
181999
182169
  nodeTypeMap[nodeData._type._id] = 1;
182000
182170
  }
182001
182171
  }
182002
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _307 => _307.meta, 'optionalAccess', _308 => _308.originAmVersion])) {
182172
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _301 => _301.meta, 'optionalAccess', _302 => _302.originAmVersion])) {
182003
182173
  state.setAmVersion(journeyData.meta.originAmVersion);
182004
182174
  }
182005
182175
  printMessage2(`${getOneLineDescription8(journeyData.tree)}`, "data");
@@ -182023,7 +182193,7 @@ ${getJourneyClassification2(journeyData).join(", ")}`,
182023
182193
  "data"
182024
182194
  );
182025
182195
  }
182026
- if (_optionalChain([journeyData, 'access', _309 => _309.tree, 'access', _310 => _310.uiConfig, 'optionalAccess', _311 => _311.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182196
+ if (_optionalChain([journeyData, 'access', _303 => _303.tree, 'access', _304 => _304.uiConfig, 'optionalAccess', _305 => _305.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182027
182197
  printMessage2("\nCategories/Tags", "data");
182028
182198
  printMessage2(
182029
182199
  `${JSON.parse(journeyData.tree.uiConfig.categories).join(", ")}`,
@@ -182065,7 +182235,7 @@ Nodes (${Object.entries(allNodes).length}):`, "data");
182065
182235
  );
182066
182236
  }
182067
182237
  }
182068
- if (_optionalChain([journeyData, 'access', _312 => _312.themes, 'optionalAccess', _313 => _313.length])) {
182238
+ if (_optionalChain([journeyData, 'access', _306 => _306.themes, 'optionalAccess', _307 => _307.length])) {
182069
182239
  printMessage2(`
182070
182240
  Themes (${journeyData.themes.length}):`, "data");
182071
182241
  for (const themeData of journeyData.themes) {
@@ -182159,14 +182329,14 @@ async function describeJourneyMd(journeyData, resolveTreeExport = onlineTreeExpo
182159
182329
  nodeTypeMap[nodeData._type._id] = 1;
182160
182330
  }
182161
182331
  }
182162
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _314 => _314.meta, 'optionalAccess', _315 => _315.originAmVersion])) {
182332
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _308 => _308.meta, 'optionalAccess', _309 => _309.originAmVersion])) {
182163
182333
  state.setAmVersion(journeyData.meta.originAmVersion);
182164
182334
  }
182165
182335
  printMessage2(
182166
182336
  `# ${getOneLineDescriptionMd(journeyData.tree)} - ${journeyData.tree.enabled === false ? ":o: `disabled`" : ":white_check_mark: `enabled`"}, ${getJourneyClassificationMd(journeyData).join(", ")}`,
182167
182337
  "data"
182168
182338
  );
182169
- if (_optionalChain([journeyData, 'access', _316 => _316.tree, 'access', _317 => _317.uiConfig, 'optionalAccess', _318 => _318.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182339
+ if (_optionalChain([journeyData, 'access', _310 => _310.tree, 'access', _311 => _311.uiConfig, 'optionalAccess', _312 => _312.categories]) && journeyData.tree.uiConfig.categories != "[]") {
182170
182340
  printMessage2(
182171
182341
  `\`${JSON.parse(journeyData.tree.uiConfig.categories).join("`, `")}\``,
182172
182342
  "data"
@@ -182210,7 +182380,7 @@ ${journeyData.tree.description}`, "data");
182210
182380
  );
182211
182381
  }
182212
182382
  }
182213
- if (_optionalChain([journeyData, 'access', _319 => _319.themes, 'optionalAccess', _320 => _320.length])) {
182383
+ if (_optionalChain([journeyData, 'access', _313 => _313.themes, 'optionalAccess', _314 => _314.length])) {
182214
182384
  printMessage2(`## Themes (${journeyData.themes.length})`, "data");
182215
182385
  printMessage2(getTableHeaderMd7(), "data");
182216
182386
  for (const themeData of journeyData.themes) {
@@ -182480,9 +182650,9 @@ function setup121() {
182480
182650
  journeyData = fileData.trees[options2.journeyId];
182481
182651
  } else if (typeof options2.journeyId === "undefined" && fileData.trees) {
182482
182652
  [journeyData] = Object.values(fileData.trees);
182483
- } else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access', _321 => _321.tree, 'optionalAccess', _322 => _322._id])) {
182653
+ } else if (typeof options2.journeyId !== "undefined" && options2.journeyId === _optionalChain([fileData, 'access', _315 => _315.tree, 'optionalAccess', _316 => _316._id])) {
182484
182654
  journeyData = fileData;
182485
- } else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access', _323 => _323.tree, 'optionalAccess', _324 => _324._id])) {
182655
+ } else if (typeof options2.journeyId === "undefined" && _optionalChain([fileData, 'access', _317 => _317.tree, 'optionalAccess', _318 => _318._id])) {
182486
182656
  journeyData = fileData;
182487
182657
  } else {
182488
182658
  throw new Error(
@@ -182920,8 +183090,13 @@ var SECONDS_IN_30_DAYS = 2592e3;
182920
183090
  var SECONDS_IN_1_HOUR = 3600;
182921
183091
  var LOG_TIME_WINDOW_MAX = SECONDS_IN_30_DAYS;
182922
183092
  var LOG_TIME_WINDOW_INCREMENT = 1;
183093
+ var deploymentTypes46 = ["cloud"];
182923
183094
  function setup129() {
182924
- const program3 = new FrodoCommand("frodo log fetch", ["realm", "type"]);
183095
+ const program3 = new FrodoCommand(
183096
+ "frodo log fetch",
183097
+ ["realm"],
183098
+ deploymentTypes46
183099
+ );
182925
183100
  program3.description(
182926
183101
  "Fetch Identity Cloud logs between a specified begin and end time period. WARNING: depending on filters and time period specified, this could take substantial time to complete."
182927
183102
  ).addOption(sourcesOptionM).addOption(
@@ -182975,7 +183150,7 @@ function setup129() {
182975
183150
  );
182976
183151
  state.setUsername(conn.username);
182977
183152
  state.setPassword(conn.password);
182978
- if (await getTokens2(true)) {
183153
+ if (await getTokens2(true, true, deploymentTypes46)) {
182979
183154
  const creds = await provisionCreds();
182980
183155
  state.setLogApiKey(creds.api_key_id);
182981
183156
  state.setLogApiSecret(creds.api_key_secret);
@@ -183065,8 +183240,13 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183065
183240
 
183066
183241
  // src/cli/log/log-key-delete.ts
183067
183242
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183243
+ var deploymentTypes47 = ["cloud"];
183068
183244
  function setup130() {
183069
- const program3 = new FrodoCommand("frodo log key delete");
183245
+ const program3 = new FrodoCommand(
183246
+ "frodo log key delete",
183247
+ ["realm"],
183248
+ deploymentTypes47
183249
+ );
183070
183250
  program3.description("Delete log API keys.").addOption(
183071
183251
  new Option("-i, --key-id <key-id>", "Key id. Regex if specified with -a.")
183072
183252
  ).addOption(
@@ -183085,10 +183265,10 @@ function setup130() {
183085
183265
  options2,
183086
183266
  command2
183087
183267
  );
183088
- if (options2.keyId && await getTokens2(true)) {
183268
+ if (options2.keyId && await getTokens2(true, true, deploymentTypes47)) {
183089
183269
  verboseMessage2(`Deleting key ${options2.keyId}`);
183090
183270
  deleteLogApiKey3(options2.keyId);
183091
- } else if (options2.all && await getTokens2(true)) {
183271
+ } else if (options2.all && await getTokens2(true, true, deploymentTypes47)) {
183092
183272
  verboseMessage2("Deleting keys...");
183093
183273
  deleteLogApiKeys2();
183094
183274
  } else {
@@ -183107,8 +183287,13 @@ function setup130() {
183107
183287
 
183108
183288
  // src/cli/log/log-key-describe.ts
183109
183289
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183290
+ var deploymentTypes48 = ["cloud"];
183110
183291
  function setup131() {
183111
- const program3 = new FrodoCommand("frodo log key describe");
183292
+ const program3 = new FrodoCommand(
183293
+ "frodo log key describe",
183294
+ ["realm"],
183295
+ deploymentTypes48
183296
+ );
183112
183297
  program3.description("Describe log API keys.").addOption(
183113
183298
  new Option(
183114
183299
  "-i, --key-id <key-id>",
@@ -183125,7 +183310,7 @@ function setup131() {
183125
183310
  options2,
183126
183311
  command2
183127
183312
  );
183128
- if (await getTokens2()) {
183313
+ if (await getTokens2(false, true, deploymentTypes48)) {
183129
183314
  } else {
183130
183315
  process.exitCode = 1;
183131
183316
  }
@@ -183137,8 +183322,13 @@ function setup131() {
183137
183322
 
183138
183323
  // src/cli/log/log-key-list.ts
183139
183324
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183325
+ var deploymentTypes49 = ["cloud"];
183140
183326
  function setup132() {
183141
- const program3 = new FrodoCommand("frodo log key list");
183327
+ const program3 = new FrodoCommand(
183328
+ "frodo log key list",
183329
+ ["realm"],
183330
+ deploymentTypes49
183331
+ );
183142
183332
  program3.description("List log API keys.").addOption(
183143
183333
  new Option("-l, --long", "Long with all fields.").default(false, "false")
183144
183334
  ).action(
@@ -183152,7 +183342,7 @@ function setup132() {
183152
183342
  options2,
183153
183343
  command2
183154
183344
  );
183155
- if (await getTokens2(true)) {
183345
+ if (await getTokens2(true, true, deploymentTypes49)) {
183156
183346
  verboseMessage2(`Listing log API keys...`);
183157
183347
  const outcome = await listLogApiKeys(options2.long);
183158
183348
  if (!outcome) process.exitCode = 1;
@@ -183179,8 +183369,13 @@ function setup133() {
183179
183369
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183180
183370
  var { getConnectionProfile: getConnectionProfile3, saveConnectionProfile: saveConnectionProfile4 } = frodo.conn;
183181
183371
  var { getLogSources: getLogSources2 } = frodo.cloud.log;
183372
+ var deploymentTypes50 = ["cloud"];
183182
183373
  function setup134() {
183183
- const program3 = new FrodoCommand("frodo log list", ["realm", "type"]);
183374
+ const program3 = new FrodoCommand(
183375
+ "frodo log list",
183376
+ ["realm"],
183377
+ deploymentTypes50
183378
+ );
183184
183379
  program3.description("List available ID Cloud log sources.").action(async (host2, user2, password3, options2, command2) => {
183185
183380
  command2.handleDefaultArgsAndOpts(host2, user2, password3, options2, command2);
183186
183381
  verboseMessage2("Listing available ID Cloud log sources...");
@@ -183210,7 +183405,7 @@ function setup134() {
183210
183405
  );
183211
183406
  state.setUsername(conn.username);
183212
183407
  state.setPassword(conn.password);
183213
- if (await getTokens2(true)) {
183408
+ if (await getTokens2(true, true, deploymentTypes50)) {
183214
183409
  const creds = await provisionCreds();
183215
183410
  state.setLogApiKey(creds.api_key_id);
183216
183411
  state.setLogApiSecret(creds.api_key_secret);
@@ -183258,8 +183453,13 @@ function setup134() {
183258
183453
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183259
183454
  var { resolveLevel: resolveLevel3 } = frodo.cloud.log;
183260
183455
  var { getConnectionProfile: getConnectionProfile4, saveConnectionProfile: saveConnectionProfile5 } = frodo.conn;
183456
+ var deploymentTypes51 = ["cloud"];
183261
183457
  function setup135() {
183262
- const program3 = new FrodoCommand("frodo log tail", ["realm", "type"]);
183458
+ const program3 = new FrodoCommand(
183459
+ "frodo log tail",
183460
+ ["realm"],
183461
+ deploymentTypes51
183462
+ );
183263
183463
  program3.description("Tail Identity Cloud logs.").addOption(sourcesOptionM).addOption(
183264
183464
  new Option(
183265
183465
  "-l, --level <level>",
@@ -183296,7 +183496,7 @@ function setup135() {
183296
183496
  );
183297
183497
  state.setUsername(conn.username);
183298
183498
  state.setPassword(conn.password);
183299
- if (await getTokens2(true)) {
183499
+ if (await getTokens2(true, true, deploymentTypes51)) {
183300
183500
  const creds = await provisionCreds();
183301
183501
  state.setLogApiKey(creds.api_key_id);
183302
183502
  state.setLogApiSecret(creds.api_key_secret);
@@ -183353,8 +183553,9 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183353
183553
 
183354
183554
  // src/cli/mapping/mapping-delete.ts
183355
183555
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183556
+ var deploymentTypes52 = ["cloud", "forgeops"];
183356
183557
  function setup137() {
183357
- const program3 = new FrodoCommand("frodo mapping delete");
183558
+ const program3 = new FrodoCommand("frodo mapping delete", [], deploymentTypes52);
183358
183559
  program3.description("Delete IDM mappings.").addOption(
183359
183560
  new Option(
183360
183561
  "-i, --mapping-id <mapping-id>",
@@ -183381,11 +183582,11 @@ function setup137() {
183381
183582
  options2,
183382
183583
  command2
183383
183584
  );
183384
- if (options2.mappingId && await getTokens2()) {
183585
+ if (options2.mappingId && await getTokens2(false, true, deploymentTypes52)) {
183385
183586
  verboseMessage2(`Deleting mapping ${options2.mappingId}...`);
183386
183587
  const outcome = await deleteMapping2(options2.mappingId);
183387
183588
  if (!outcome) process.exitCode = 1;
183388
- } else if (options2.all && await getTokens2()) {
183589
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes52)) {
183389
183590
  verboseMessage2(`Deleting all mappings...`);
183390
183591
  const outcome = await deleteMappings2(
183391
183592
  options2.connectorId,
@@ -183408,8 +183609,9 @@ function setup137() {
183408
183609
 
183409
183610
  // src/cli/mapping/mapping-export.ts
183410
183611
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183612
+ var deploymentTypes53 = ["cloud", "forgeops"];
183411
183613
  function setup138() {
183412
- const program3 = new FrodoCommand("frodo mapping export");
183614
+ const program3 = new FrodoCommand("frodo mapping export", [], deploymentTypes53);
183413
183615
  program3.description("Export IDM mappings.").addOption(
183414
183616
  new Option(
183415
183617
  "-i, --mapping-id <mapping-id>",
@@ -183453,7 +183655,7 @@ function setup138() {
183453
183655
  options2,
183454
183656
  command2
183455
183657
  );
183456
- if (options2.mappingId && await getTokens2()) {
183658
+ if (options2.mappingId && await getTokens2(false, true, deploymentTypes53)) {
183457
183659
  verboseMessage2(`Exporting mapping ${options2.mappingId}...`);
183458
183660
  const outcome = await exportMappingToFile(
183459
183661
  options2.mappingId,
@@ -183465,7 +183667,7 @@ function setup138() {
183465
183667
  }
183466
183668
  );
183467
183669
  if (!outcome) process.exitCode = 1;
183468
- } else if (options2.all && await getTokens2()) {
183670
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes53)) {
183469
183671
  verboseMessage2(`Exporting all mappings to a single file...`);
183470
183672
  const outcome = await exportMappingsToFile(
183471
183673
  options2.file,
@@ -183478,7 +183680,7 @@ function setup138() {
183478
183680
  }
183479
183681
  );
183480
183682
  if (!outcome) process.exitCode = 1;
183481
- } else if (options2.allSeparate && await getTokens2()) {
183683
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes53)) {
183482
183684
  verboseMessage2("Exporting all mappings to separate files...");
183483
183685
  const outcome = await exportMappingsToFiles(options2.metadata, {
183484
183686
  connectorId: options2.connectorId,
@@ -183503,8 +183705,9 @@ function setup138() {
183503
183705
 
183504
183706
  // src/cli/mapping/mapping-import.ts
183505
183707
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183708
+ var deploymentTypes54 = ["cloud", "forgeops"];
183506
183709
  function setup139() {
183507
- const program3 = new FrodoCommand("frodo mapping import");
183710
+ const program3 = new FrodoCommand("frodo mapping import", [], deploymentTypes54);
183508
183711
  program3.description("Import IDM mappings.").addOption(
183509
183712
  new Option(
183510
183713
  "-i, --mapping-id <mapping-id>",
@@ -183531,7 +183734,7 @@ function setup139() {
183531
183734
  options2,
183532
183735
  command2
183533
183736
  );
183534
- if (options2.mappingId && await getTokens2()) {
183737
+ if (options2.mappingId && await getTokens2(false, true, deploymentTypes54)) {
183535
183738
  verboseMessage2(`Importing mapping ${options2.mappingId}...`);
183536
183739
  const outcome = await importMappingFromFile(
183537
183740
  options2.mappingId,
@@ -183541,7 +183744,7 @@ function setup139() {
183541
183744
  }
183542
183745
  );
183543
183746
  if (!outcome) process.exitCode = 1;
183544
- } else if (options2.all && options2.file && await getTokens2()) {
183747
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes54)) {
183545
183748
  verboseMessage2(
183546
183749
  `Importing all mappings from a single file (${options2.file})...`
183547
183750
  );
@@ -183549,13 +183752,13 @@ function setup139() {
183549
183752
  deps: options2.deps
183550
183753
  });
183551
183754
  if (!outcome) process.exitCode = 1;
183552
- } else if (options2.allSeparate && await getTokens2()) {
183755
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes54)) {
183553
183756
  verboseMessage2("Importing all mappings from separate files...");
183554
183757
  const outcome = await importMappingsFromFiles({
183555
183758
  deps: options2.deps
183556
183759
  });
183557
183760
  if (!outcome) process.exitCode = 1;
183558
- } else if (options2.file && await getTokens2()) {
183761
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes54)) {
183559
183762
  verboseMessage2("Importing first mapping in file...");
183560
183763
  const outcome = await importFirstMappingFromFile(options2.file, {
183561
183764
  deps: options2.deps
@@ -183577,8 +183780,9 @@ function setup139() {
183577
183780
 
183578
183781
  // src/cli/mapping/mapping-list.ts
183579
183782
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183783
+ var deploymentTypes55 = ["cloud", "forgeops"];
183580
183784
  function setup140() {
183581
- const program3 = new FrodoCommand("frodo mapping list");
183785
+ const program3 = new FrodoCommand("frodo mapping list", [], deploymentTypes55);
183582
183786
  program3.description("List IDM mappings.").addOption(
183583
183787
  new Option("-l, --long", "Long with all fields.").default(false, "false")
183584
183788
  ).action(
@@ -183592,7 +183796,7 @@ function setup140() {
183592
183796
  options2,
183593
183797
  command2
183594
183798
  );
183595
- if (await getTokens2()) {
183799
+ if (await getTokens2(false, true, deploymentTypes55)) {
183596
183800
  verboseMessage2(`Listing all mappings`);
183597
183801
  const outcome = await listMappings(options2.long);
183598
183802
  if (!outcome) process.exitCode = 1;
@@ -183607,8 +183811,9 @@ function setup140() {
183607
183811
 
183608
183812
  // src/cli/mapping/mapping-rename.ts
183609
183813
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
183814
+ var deploymentTypes56 = ["cloud", "forgeops"];
183610
183815
  function setup141() {
183611
- const program3 = new FrodoCommand("frodo mapping rename");
183816
+ const program3 = new FrodoCommand("frodo mapping rename", [], deploymentTypes56);
183612
183817
  program3.description(
183613
183818
  "Renames mappings from the combined/default/legacy naming scheme (sync/<name>) to the separate/new naming scheme (mapping/<name>). To rename mappings from new back to legacy, use the -l, --legacy flag."
183614
183819
  ).addOption(
@@ -183637,14 +183842,14 @@ function setup141() {
183637
183842
  options2,
183638
183843
  command2
183639
183844
  );
183640
- if (options2.mappingId && await getTokens2()) {
183845
+ if (options2.mappingId && await getTokens2(false, true, deploymentTypes56)) {
183641
183846
  verboseMessage2("Renaming mapping...");
183642
183847
  const outcome = await renameMapping(
183643
183848
  options2.mappingId,
183644
183849
  options2.legacy
183645
183850
  );
183646
183851
  if (!outcome) process.exitCode = 1;
183647
- } else if (options2.all && await getTokens2()) {
183852
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes56)) {
183648
183853
  verboseMessage2("Renaming all mappings...");
183649
183854
  const outcome = await renameMappings(options2.legacy);
183650
183855
  if (!outcome) process.exitCode = 1;
@@ -184178,7 +184383,7 @@ async function listRealms(long = false) {
184178
184383
  } catch (error2) {
184179
184384
  printMessage2(error2, "error");
184180
184385
  printMessage2(`Error listing realms: ${error2.rmessage}`, "error");
184181
- printMessage2(_optionalChain([error2, 'access', _325 => _325.response, 'optionalAccess', _326 => _326.data]), "error");
184386
+ printMessage2(_optionalChain([error2, 'access', _319 => _319.response, 'optionalAccess', _320 => _320.data]), "error");
184182
184387
  }
184183
184388
  }
184184
184389
  async function describeRealm(realm2) {
@@ -185338,7 +185543,7 @@ async function importServiceFromFile(serviceId, file, options2 = {
185338
185543
  );
185339
185544
  const data2 = _fs3.default.readFileSync(filePath, "utf8");
185340
185545
  const importData = JSON.parse(data2);
185341
- if (_optionalChain([importData, 'optionalAccess', _327 => _327.service, 'access', _328 => _328[serviceId]])) {
185546
+ if (_optionalChain([importData, 'optionalAccess', _321 => _321.service, 'access', _322 => _322[serviceId]])) {
185342
185547
  await importService2(serviceId, importData, options2);
185343
185548
  stopProgressIndicator2(
185344
185549
  indicatorId,
@@ -185771,8 +185976,9 @@ _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
185771
185976
 
185772
185977
  // src/cli/theme/theme-delete.ts
185773
185978
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
185979
+ var deploymentTypes57 = ["cloud", "forgeops"];
185774
185980
  function setup176() {
185775
- const program3 = new FrodoCommand("frodo theme delete");
185981
+ const program3 = new FrodoCommand("frodo theme delete", [], deploymentTypes57);
185776
185982
  program3.description("Delete themes.").addOption(
185777
185983
  new Option(
185778
185984
  "-n, --theme-name <name>",
@@ -185799,19 +186005,19 @@ function setup176() {
185799
186005
  options2,
185800
186006
  command2
185801
186007
  );
185802
- if (options2.themeName && await getTokens2()) {
186008
+ if (options2.themeName && await getTokens2(false, true, deploymentTypes57)) {
185803
186009
  verboseMessage2(
185804
186010
  `Deleting theme with name "${options2.themeName}" from realm "${state.getRealm()}"...`
185805
186011
  );
185806
186012
  const outcome = await deleteThemeByName2(options2.themeName);
185807
186013
  if (!outcome) process.exitCode = 1;
185808
- } else if (options2.themeId && await getTokens2()) {
186014
+ } else if (options2.themeId && await getTokens2(false, true, deploymentTypes57)) {
185809
186015
  verboseMessage2(
185810
186016
  `Deleting theme with id "${options2.themeId}" from realm "${state.getRealm()}"...`
185811
186017
  );
185812
186018
  const outcome = await deleteTheme2(options2.themeId);
185813
186019
  if (!outcome) process.exitCode = 1;
185814
- } else if (options2.all && await getTokens2()) {
186020
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes57)) {
185815
186021
  verboseMessage2(
185816
186022
  `Deleting all themes from realm "${state.getRealm()}"...`
185817
186023
  );
@@ -185833,8 +186039,9 @@ function setup176() {
185833
186039
 
185834
186040
  // src/cli/theme/theme-export.ts
185835
186041
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
186042
+ var deploymentTypes58 = ["cloud", "forgeops"];
185836
186043
  function setup177() {
185837
- const program3 = new FrodoCommand("frodo theme export");
186044
+ const program3 = new FrodoCommand("frodo theme export", [], deploymentTypes58);
185838
186045
  program3.description("Export themes.").addOption(
185839
186046
  new Option(
185840
186047
  "-n, --theme-name <name>",
@@ -185876,7 +186083,7 @@ function setup177() {
185876
186083
  options2,
185877
186084
  command2
185878
186085
  );
185879
- if (options2.themeName && await getTokens2()) {
186086
+ if (options2.themeName && await getTokens2(false, true, deploymentTypes58)) {
185880
186087
  verboseMessage2(
185881
186088
  `Exporting theme "${options2.themeName}" from realm "${state.getRealm()}"...`
185882
186089
  );
@@ -185886,7 +186093,7 @@ function setup177() {
185886
186093
  options2.metadata
185887
186094
  );
185888
186095
  if (!outcome) process.exitCode = 1;
185889
- } else if (options2.themeId && await getTokens2()) {
186096
+ } else if (options2.themeId && await getTokens2(false, true, deploymentTypes58)) {
185890
186097
  verboseMessage2(
185891
186098
  `Exporting theme "${options2.themeId}" from realm "${state.getRealm()}"...`
185892
186099
  );
@@ -185896,14 +186103,14 @@ function setup177() {
185896
186103
  options2.metadata
185897
186104
  );
185898
186105
  if (!outcome) process.exitCode = 1;
185899
- } else if (options2.all && await getTokens2()) {
186106
+ } else if (options2.all && await getTokens2(false, true, deploymentTypes58)) {
185900
186107
  verboseMessage2("Exporting all themes to a single file...");
185901
186108
  const outcome = await exportThemesToFile(
185902
186109
  options2.file,
185903
186110
  options2.metadata
185904
186111
  );
185905
186112
  if (!outcome) process.exitCode = 1;
185906
- } else if (options2.allSeparate && await getTokens2()) {
186113
+ } else if (options2.allSeparate && await getTokens2(false, true, deploymentTypes58)) {
185907
186114
  verboseMessage2("Exporting all themes to separate files...");
185908
186115
  const outcome = await exportThemesToFiles(options2.metadata);
185909
186116
  if (!outcome) process.exitCode = 1;
@@ -185923,8 +186130,9 @@ function setup177() {
185923
186130
 
185924
186131
  // src/cli/theme/theme-import.ts
185925
186132
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
186133
+ var deploymentTypes59 = ["cloud", "forgeops"];
185926
186134
  function setup178() {
185927
- const program3 = new FrodoCommand("frodo theme import");
186135
+ const program3 = new FrodoCommand("frodo theme import", [], deploymentTypes59);
185928
186136
  program3.description("Import themes.").addOption(
185929
186137
  new Option(
185930
186138
  "-n, --theme-name <name>",
@@ -185961,7 +186169,7 @@ function setup178() {
185961
186169
  options2,
185962
186170
  command2
185963
186171
  );
185964
- if (options2.file && options2.themeName && await getTokens2()) {
186172
+ if (options2.file && options2.themeName && await getTokens2(false, true, deploymentTypes59)) {
185965
186173
  verboseMessage2(
185966
186174
  `Importing theme with name "${options2.themeName}" into realm "${state.getRealm()}"...`
185967
186175
  );
@@ -185970,25 +186178,25 @@ function setup178() {
185970
186178
  options2.file
185971
186179
  );
185972
186180
  if (!outcome) process.exitCode = 1;
185973
- } else if (options2.file && options2.themeId && await getTokens2()) {
186181
+ } else if (options2.file && options2.themeId && await getTokens2(false, true, deploymentTypes59)) {
185974
186182
  verboseMessage2(
185975
186183
  `Importing theme with id "${options2.themeId}" into realm "${state.getRealm()}"...`
185976
186184
  );
185977
186185
  const outcome = await importThemeById(options2.themeId, options2.file);
185978
186186
  if (!outcome) process.exitCode = 1;
185979
- } else if (options2.all && options2.file && await getTokens2()) {
186187
+ } else if (options2.all && options2.file && await getTokens2(false, true, deploymentTypes59)) {
185980
186188
  verboseMessage2(
185981
186189
  `Importing all themes from a single file (${options2.file})...`
185982
186190
  );
185983
186191
  const outcome = await importThemesFromFile(options2.file);
185984
186192
  if (!outcome) process.exitCode = 1;
185985
- } else if (options2.allSeparate && !options2.file && await getTokens2()) {
186193
+ } else if (options2.allSeparate && !options2.file && await getTokens2(false, true, deploymentTypes59)) {
185986
186194
  verboseMessage2(
185987
186195
  "Importing all themes from separate files in current directory..."
185988
186196
  );
185989
186197
  const outcome = await importThemesFromFiles();
185990
186198
  if (!outcome) process.exitCode = 1;
185991
- } else if (options2.file && await getTokens2()) {
186199
+ } else if (options2.file && await getTokens2(false, true, deploymentTypes59)) {
185992
186200
  verboseMessage2(
185993
186201
  `Importing first theme from file "${options2.file}" into realm "${state.getRealm()}"...`
185994
186202
  );
@@ -186010,8 +186218,9 @@ function setup178() {
186010
186218
 
186011
186219
  // src/cli/theme/theme-list.ts
186012
186220
  _chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
186221
+ var deploymentTypes60 = ["cloud", "forgeops"];
186013
186222
  function setup179() {
186014
- const program3 = new FrodoCommand("frodo theme list");
186223
+ const program3 = new FrodoCommand("frodo theme list", [], deploymentTypes60);
186015
186224
  program3.description("List themes.").addOption(
186016
186225
  new Option("-l, --long", "Long with more fields.").default(false, "false")
186017
186226
  ).action(
@@ -186025,7 +186234,7 @@ function setup179() {
186025
186234
  options2,
186026
186235
  command2
186027
186236
  );
186028
- if (await getTokens2()) {
186237
+ if (await getTokens2(false, true, deploymentTypes60)) {
186029
186238
  verboseMessage2(`Listing themes in realm "${state.getRealm()}"...`);
186030
186239
  const outcome = await listThemes(options2.long);
186031
186240
  if (!outcome) process.exitCode = 1;
@@ -186122,7 +186331,7 @@ var compareVersions = (v12, v2) => {
186122
186331
  // package.json
186123
186332
  var package_default2 = {
186124
186333
  name: "@rockcarver/frodo-cli",
186125
- version: "2.0.0-68",
186334
+ version: "2.0.0-69",
186126
186335
  type: "module",
186127
186336
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
186128
186337
  keywords: [
@@ -186236,7 +186445,7 @@ var package_default2 = {
186236
186445
  ]
186237
186446
  },
186238
186447
  devDependencies: {
186239
- "@rockcarver/frodo-lib": "2.0.0-94",
186448
+ "@rockcarver/frodo-lib": "2.0.0-95",
186240
186449
  "@types/colors": "^1.2.1",
186241
186450
  "@types/fs-extra": "^11.0.1",
186242
186451
  "@types/jest": "^29.2.3",
@@ -186450,7 +186659,7 @@ var { initTokenCache: initTokenCache2 } = frodo.cache;
186450
186659
  program3.addCommand(setup118());
186451
186660
  program3.addCommand(setup119());
186452
186661
  program3.addCommand(setup128());
186453
- program3.addCommand(setup136());
186662
+ await program3.addCommand(setup136());
186454
186663
  program3.addCommand(setup142());
186455
186664
  program3.addCommand(setup147());
186456
186665
  program3.addCommand(setup152());
@@ -186461,11 +186670,10 @@ var { initTokenCache: initTokenCache2 } = frodo.cache;
186461
186670
  program3.addCommand(setup180());
186462
186671
  program3.showHelpAfterError();
186463
186672
  program3.enablePositionalOptions();
186464
- program3.parse();
186673
+ await program3.parseAsync();
186465
186674
  } catch (e) {
186466
186675
  process.exitCode = 1;
186467
- printMessage2(`ERROR: exception running frodo - ${e}`, "error");
186468
- printMessage2(e.stack, "error");
186676
+ printError2(e);
186469
186677
  }
186470
186678
  })();
186471
186679
  /*! Bundled license information: