@rockcarver/frodo-cli 0.19.3-3 → 0.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.19.4] - 2023-01-09
11
+
12
+ ## [0.19.3] - 2023-01-07
13
+
10
14
  ## [0.19.3-3] - 2023-01-07
11
15
 
12
16
  ## [0.19.3-2] - 2023-01-05
@@ -839,7 +843,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
839
843
  - Fixed problem with adding connection profiles
840
844
  - Miscellaneous bug fixes
841
845
 
842
- [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.19.3-3...HEAD
846
+ [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.19.4...HEAD
847
+
848
+ [0.19.4]: https://github.com/rockcarver/frodo-cli/compare/v0.19.3...v0.19.4
849
+
850
+ [0.19.3]: https://github.com/rockcarver/frodo-cli/compare/v0.19.3-3...v0.19.3
843
851
 
844
852
  [0.19.3-3]: https://github.com/rockcarver/frodo-cli/compare/v0.19.3-2...v0.19.3-3
845
853
 
@@ -28,7 +28,7 @@ async (host, user, password, key, secret, options, command) => {
28
28
  state.setAuthenticationHeaderOverrides(JSON.parse(options.authenticationHeaderOverrides));
29
29
  }
30
30
  if (options.validate && (await getTokens()) || !options.validate) {
31
- verboseMessage(`Saving connection profile for tenant ${state.getTenant()}...`);
31
+ verboseMessage(`Saving connection profile for tenant ${state.getHost()}...`);
32
32
  // if cloud deployment add service account
33
33
  if (options.validate && state.getDeploymentType() === constants.CLOUD_DEPLOYMENT_TYPE_KEY && options.sa && (await isServiceAccountsFeatureAvailable())) {
34
34
  // validate and add existing service account
@@ -57,7 +57,7 @@ async (host, user, password, key, secret, options, command) => {
57
57
  addExistingServiceAccount(options.saId, options.saJwkFile, options.validate);
58
58
  }
59
59
  if (await saveConnectionProfile(host)) {
60
- printMessage(`Saved connection profile ${state.getTenant()}`);
60
+ printMessage(`Saved connection profile ${state.getHost()}`);
61
61
  } else {
62
62
  process.exitCode = 1;
63
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conn-save.js","names":["FrodoCommand","Option","apiKeyArgument","apiSecretArgument","Authenticate","ConnectionProfile","ServiceAccount","state","constants","verboseMessage","printMessage","addExistingServiceAccount","getTokens","saveConnectionProfile","addNewServiceAccount","isServiceAccountsFeatureAvailable","program","alias","description","addArgument","addOption","action","host","user","password","key","secret","options","command","handleDefaultArgsAndOpts","setLogApiKey","setLogApiSecret","authenticationService","setAuthenticationService","authenticationHeaderOverrides","setAuthenticationHeaderOverrides","JSON","parse","validate","getTenant","getDeploymentType","CLOUD_DEPLOYMENT_TYPE_KEY","sa","saId","saJwkFile","getServiceAccountId","name","_id","error","response","data","message","process","exitCode"],"sources":["cli/conn/conn-save.ts"],"sourcesContent":["import { FrodoCommand } from '../FrodoCommand';\nimport { Option } from 'commander';\nimport { apiKeyArgument, apiSecretArgument } from './conn';\nimport {\n Authenticate,\n ConnectionProfile,\n ServiceAccount,\n state,\n constants,\n} from '@rockcarver/frodo-lib';\nimport { verboseMessage, printMessage } from '../../utils/Console';\nimport { addExistingServiceAccount } from '../../ops/ConnectionProfileOps.js';\n\nconst { getTokens } = Authenticate;\nconst { saveConnectionProfile, addNewServiceAccount } = ConnectionProfile;\nconst { isServiceAccountsFeatureAvailable } = ServiceAccount;\n\nconst program = new FrodoCommand('frodo conn save', ['realm']);\n\nprogram\n .alias('add')\n .description('Save connection profiles.')\n .addArgument(apiKeyArgument)\n .addArgument(apiSecretArgument)\n .addOption(\n new Option(\n '--sa-id <uuid>',\n \"Service account's uuid. If specified, must also include --sa-jwk-file. Ignored with --no-sa.\"\n )\n )\n .addOption(\n new Option(\n '--sa-jwk-file <file>',\n \"File containing the service account's java web key (jwk). Jwk must contain private key! If specified, must also include --sa-id. Ignored with --no-sa.\"\n )\n )\n .addOption(new Option('--no-sa', 'Do not add service account.'))\n .addOption(new Option('--no-validate', 'Do not validate connection.'))\n .addOption(\n new Option(\n '--authentication-service [service]',\n 'Name of the authentication service/tree to use.'\n )\n )\n .addOption(\n new Option(\n '--authentication-header-overrides [headers]',\n 'Map of headers: {\"host\":\"am.example.com:8081\"}.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, key, secret, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n user,\n password,\n key,\n secret,\n options,\n command\n );\n state.setLogApiKey(key);\n state.setLogApiSecret(secret);\n if (options.authenticationService) {\n state.setAuthenticationService(options.authenticationService);\n }\n if (options.authenticationHeaderOverrides) {\n state.setAuthenticationHeaderOverrides(\n JSON.parse(options.authenticationHeaderOverrides)\n );\n }\n if ((options.validate && (await getTokens())) || !options.validate) {\n verboseMessage(\n `Saving connection profile for tenant ${state.getTenant()}...`\n );\n // if cloud deployment add service account\n if (\n options.validate &&\n state.getDeploymentType() === constants.CLOUD_DEPLOYMENT_TYPE_KEY &&\n options.sa &&\n (await isServiceAccountsFeatureAvailable())\n ) {\n // validate and add existing service account\n if (options.saId && options.saJwkFile) {\n verboseMessage(`Validating and adding service account...`);\n if (\n await addExistingServiceAccount(\n options.saId,\n options.saJwkFile,\n options.validate\n )\n ) {\n printMessage(\n `Validated and added service account with id ${options.saId} to profile.`\n );\n }\n }\n // add new service account if none already exists in the profile\n else if (!state.getServiceAccountId()) {\n try {\n verboseMessage(`Creating service account...`);\n const sa = await addNewServiceAccount();\n printMessage(\n `Created and added service account ${sa.name} with id ${sa._id} to profile.`\n );\n } catch (error) {\n printMessage(error.response?.data, 'error');\n printMessage(\n `Error creating service account: ${error.response?.data?.message}`,\n 'error'\n );\n process.exitCode = 1;\n }\n }\n }\n // add existing service account without validation\n else if (\n !options.validate &&\n options.saId &&\n options.saJwkFile &&\n options.sa\n ) {\n addExistingServiceAccount(\n options.saId,\n options.saJwkFile,\n options.validate\n );\n }\n if (await saveConnectionProfile(host)) {\n printMessage(`Saved connection profile ${state.getTenant()}`);\n } else {\n process.exitCode = 1;\n }\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,EAAEC,iBAAiB,QAAQ,QAAQ;AAC1D,SACEC,YAAY,EACZC,iBAAiB,EACjBC,cAAc,EACdC,KAAK,EACLC,SAAS,QACJ,uBAAuB;AAC9B,SAASC,cAAc,EAAEC,YAAY,QAAQ,qBAAqB;AAClE,SAASC,yBAAyB,QAAQ,mCAAmC;AAE7E,MAAM;EAAEC;AAAU,CAAC,GAAGR,YAAY;AAClC,MAAM;EAAES,qBAAqB;EAAEC;AAAqB,CAAC,GAAGT,iBAAiB;AACzE,MAAM;EAAEU;AAAkC,CAAC,GAAGT,cAAc;AAE5D,MAAMU,OAAO,GAAG,IAAIhB,YAAY,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,CAAC;AAE9DgB,OAAO,CACJC,KAAK,CAAC,KAAK,CAAC,CACZC,WAAW,CAAC,2BAA2B,CAAC,CACxCC,WAAW,CAACjB,cAAc,CAAC,CAC3BiB,WAAW,CAAChB,iBAAiB,CAAC,CAC9BiB,SAAS,CACR,IAAInB,MAAM,CACR,gBAAgB,EAChB,8FAA8F,CAC/F,CACF,CACAmB,SAAS,CACR,IAAInB,MAAM,CACR,sBAAsB,EACtB,wJAAwJ,CACzJ,CACF,CACAmB,SAAS,CAAC,IAAInB,MAAM,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAC/DmB,SAAS,CAAC,IAAInB,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC,CACrEmB,SAAS,CACR,IAAInB,MAAM,CACR,oCAAoC,EACpC,iDAAiD,CAClD,CACF,CACAmB,SAAS,CACR,IAAInB,MAAM,CACR,6C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,CAC1E;QACH;MACF;MACA;MAAA,KACK,IAAI,CAACpC,KAAK,CAACsC,mBAAmB,EAAE,EAAE;QACrC,IAAI;UACFpC,cAAc,CAAE,6BAA4B,CAAC;UAC7C,MAAMiC,EAAE,GAAG,MAAM5B,oBAAoB,EAAE;UACvCJ,YAAY,CACT,qCAAoCgC,EAAE,CAACI,IAAK,YAAWJ,EAAE,CAACK,GAAI,cAAa,CAC7E;QACH,CAAC,CAAC,OAAOC,KAAK,EAAE;UAAA;UACdtC,YAAY,oBAACsC,KAAK,CAACC,QAAQ,oDAAd,gBAAgBC,IAAI,EAAE,OAAO,CAAC;UAC3CxC,YAAY,CACT,mCAAgC,oBAAEsC,KAAK,CAACC,QAAQ,8EAAd,iBAAgBC,IAAI,0DAApB,sBAAsBC,OAAQ,EAAC,EAClE,OAAO,CACR;UACDC,OAAO,CAACC,QAAQ,GAAG,CAAC;QACtB;MACF;IACF;IACA;IAAA,KACK,IACH,CAAC1B,OAAO,CAACW,QAAQ,IACjBX,OAAO,CAACgB,IAAI,IACZhB,OAAO,CAACiB,SAAS,IACjBjB,OAAO,CAACe,EAAE,EACV;MACA/B,yBAAyB,CACvBgB,OAAO,CAACgB,IAAI,EACZhB,OAAO,CAACiB,SAAS,EACjBjB,OAAO,CAACW,QAAQ,CACjB;IACH;IACA,IAAI,MAAMzB,qBAAqB,CAACS,IAAI,CAAC,EAAE;MACrCZ,YAAY,CAAE,4BAA2BH,KAAK,CAACgC,SAAS,EAAG,EAAC,CAAC;IAC/D,CAAC,MAAM;MACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF,CAAC,MAAM;IACLD,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AAAA,CACD;;AAEHrC,OAAO,CAACqB,KAAK,EAAE"}
1
+ {"version":3,"file":"conn-save.js","names":["FrodoCommand","Option","apiKeyArgument","apiSecretArgument","Authenticate","ConnectionProfile","ServiceAccount","state","constants","verboseMessage","printMessage","addExistingServiceAccount","getTokens","saveConnectionProfile","addNewServiceAccount","isServiceAccountsFeatureAvailable","program","alias","description","addArgument","addOption","action","host","user","password","key","secret","options","command","handleDefaultArgsAndOpts","setLogApiKey","setLogApiSecret","authenticationService","setAuthenticationService","authenticationHeaderOverrides","setAuthenticationHeaderOverrides","JSON","parse","validate","getHost","getDeploymentType","CLOUD_DEPLOYMENT_TYPE_KEY","sa","saId","saJwkFile","getServiceAccountId","name","_id","error","response","data","message","process","exitCode"],"sources":["cli/conn/conn-save.ts"],"sourcesContent":["import { FrodoCommand } from '../FrodoCommand';\nimport { Option } from 'commander';\nimport { apiKeyArgument, apiSecretArgument } from './conn';\nimport {\n Authenticate,\n ConnectionProfile,\n ServiceAccount,\n state,\n constants,\n} from '@rockcarver/frodo-lib';\nimport { verboseMessage, printMessage } from '../../utils/Console';\nimport { addExistingServiceAccount } from '../../ops/ConnectionProfileOps.js';\n\nconst { getTokens } = Authenticate;\nconst { saveConnectionProfile, addNewServiceAccount } = ConnectionProfile;\nconst { isServiceAccountsFeatureAvailable } = ServiceAccount;\n\nconst program = new FrodoCommand('frodo conn save', ['realm']);\n\nprogram\n .alias('add')\n .description('Save connection profiles.')\n .addArgument(apiKeyArgument)\n .addArgument(apiSecretArgument)\n .addOption(\n new Option(\n '--sa-id <uuid>',\n \"Service account's uuid. If specified, must also include --sa-jwk-file. Ignored with --no-sa.\"\n )\n )\n .addOption(\n new Option(\n '--sa-jwk-file <file>',\n \"File containing the service account's java web key (jwk). Jwk must contain private key! If specified, must also include --sa-id. Ignored with --no-sa.\"\n )\n )\n .addOption(new Option('--no-sa', 'Do not add service account.'))\n .addOption(new Option('--no-validate', 'Do not validate connection.'))\n .addOption(\n new Option(\n '--authentication-service [service]',\n 'Name of the authentication service/tree to use.'\n )\n )\n .addOption(\n new Option(\n '--authentication-header-overrides [headers]',\n 'Map of headers: {\"host\":\"am.example.com:8081\"}.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, key, secret, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n user,\n password,\n key,\n secret,\n options,\n command\n );\n state.setLogApiKey(key);\n state.setLogApiSecret(secret);\n if (options.authenticationService) {\n state.setAuthenticationService(options.authenticationService);\n }\n if (options.authenticationHeaderOverrides) {\n state.setAuthenticationHeaderOverrides(\n JSON.parse(options.authenticationHeaderOverrides)\n );\n }\n if ((options.validate && (await getTokens())) || !options.validate) {\n verboseMessage(\n `Saving connection profile for tenant ${state.getHost()}...`\n );\n // if cloud deployment add service account\n if (\n options.validate &&\n state.getDeploymentType() === constants.CLOUD_DEPLOYMENT_TYPE_KEY &&\n options.sa &&\n (await isServiceAccountsFeatureAvailable())\n ) {\n // validate and add existing service account\n if (options.saId && options.saJwkFile) {\n verboseMessage(`Validating and adding service account...`);\n if (\n await addExistingServiceAccount(\n options.saId,\n options.saJwkFile,\n options.validate\n )\n ) {\n printMessage(\n `Validated and added service account with id ${options.saId} to profile.`\n );\n }\n }\n // add new service account if none already exists in the profile\n else if (!state.getServiceAccountId()) {\n try {\n verboseMessage(`Creating service account...`);\n const sa = await addNewServiceAccount();\n printMessage(\n `Created and added service account ${sa.name} with id ${sa._id} to profile.`\n );\n } catch (error) {\n printMessage(error.response?.data, 'error');\n printMessage(\n `Error creating service account: ${error.response?.data?.message}`,\n 'error'\n );\n process.exitCode = 1;\n }\n }\n }\n // add existing service account without validation\n else if (\n !options.validate &&\n options.saId &&\n options.saJwkFile &&\n options.sa\n ) {\n addExistingServiceAccount(\n options.saId,\n options.saJwkFile,\n options.validate\n );\n }\n if (await saveConnectionProfile(host)) {\n printMessage(`Saved connection profile ${state.getHost()}`);\n } else {\n process.exitCode = 1;\n }\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,EAAEC,iBAAiB,QAAQ,QAAQ;AAC1D,SACEC,YAAY,EAC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AE;UAAA;UACdtC,YAAY,oBAACsC,KAAK,CAACC,QAAQ,oDAAd,gBAAgBC,IAAI,EAAE,OAAO,CAAC;UAC3CxC,YAAY,CACT,mCAAgC,oBAAEsC,KAAK,CAACC,QAAQ,8EAAd,iBAAgBC,IAAI,0DAApB,sBAAsBC,OAAQ,EAAC,EAClE,OAAO,CACR;UACDC,OAAO,CAACC,QAAQ,GAAG,CAAC;QACtB;MACF;IACF;IACA;IAAA,KACK,IACH,CAAC1B,OAAO,CAACW,QAAQ,IACjBX,OAAO,CAACgB,IAAI,IACZhB,OAAO,CAACiB,SAAS,IACjBjB,OAAO,CAACe,EAAE,EACV;MACA/B,yBAAyB,CACvBgB,OAAO,CAACgB,IAAI,EACZhB,OAAO,CAACiB,SAAS,EACjBjB,OAAO,CAACW,QAAQ,CACjB;IACH;IACA,IAAI,MAAMzB,qBAAqB,CAACS,IAAI,CAAC,EAAE;MACrCZ,YAAY,CAAE,4BAA2BH,KAAK,CAACgC,OAAO,EAAG,EAAC,CAAC;IAC7D,CAAC,MAAM;MACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF,CAAC,MAAM;IACLD,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AAAA,CACD;;AAEHrC,OAAO,CAACqB,KAAK,EAAE"}
package/esm/ops/IdmOps.js CHANGED
@@ -28,9 +28,9 @@ const {
28
28
  export async function warnAboutOfflineConnectorServers() {
29
29
  try {
30
30
  const all = await testConnectorServers();
31
- const offline = all.filter(status => !status.ok);
31
+ const offline = all.filter(status => !status.ok).map(status => status.name);
32
32
  if (offline.length) {
33
- printMessage(`\n\nThe following connector server(s) are offline and their connectors and configuration unavailable:\n ${offline.join('\n')}`, 'warn');
33
+ printMessage(`\nThe following connector server(s) are offline and their connectors and configuration unavailable:\n${offline.join('\n')}`, 'warn');
34
34
  }
35
35
  } catch (error) {
36
36
  printMessage(error, 'error');
@@ -1 +1 @@
1
- {"version":3,"file":"IdmOps.js","names":["fs","fse","path","propertiesReader","replaceall","Idm","Utils","ValidationUtils","createProgressIndicator","printMessage","stopProgressIndicator","getTypedFilename","readFiles","unSubstituteEnvParams","validateScriptHooks","getAllConfigEntities","getConfigEntity","putConfigEntity","queryAllManagedObjectsByType","testConnectorServers","warnAboutOfflineConnectorServers","all","offline","filter","status","ok","length","join","error","message","listAllConfigEntities","configurations","configEntity","_id","getAllConfigEntitiesError","exportConfigEntity","id","file","fileName","writeFile","JSON","stringify","err","exportAllRawConfigEntities","directory","existsSync","mkdirSync","undefined","entityPromises","push","catch","getConfigEntityError","response","data","results","Promise","item","outputFile","exportAllConfigEntities","entitiesFile","envFile","entriesToExport","readFile","entriesData","parse","idm","envParams","includes","configEntityString","each","key","value","importConfigEntity","entityId","validate","entityData","readFileSync","resolve","process","cwd","jsObject","isValid","putConfigEntityError","importAllRawConfigEntities","baseDirectory","files","jsonFiles","toLowerCase","endsWith","map","content","substring","everyScriptValid","isScriptValid","allSettled","errors","result","reason","importAllConfigEntities","entriesToImport","envReader","unsubstituted","countManagedObjects","type","count","resultCount","pagedResultsCookie","totalPagedResultsPolicy","totalPagedResults","remainingPagedResults"],"sources":["ops/IdmOps.ts"],"sourcesContent":["/* eslint-disable no-await-in-loop */\nimport fs from 'fs';\nimport fse from 'fs-extra';\nimport path from 'path';\nimport propertiesReader from 'properties-reader';\nimport replaceall from 'replaceall';\n\nimport { Idm, Utils, ValidationUtils } from '@rockcarver/frodo-lib';\nimport {\n createProgressIndicator,\n printMessage,\n stopProgressIndicator,\n} from '../utils/Console';\nimport { getTypedFilename } from '../utils/ExportImportUtils';\n\nconst { readFiles, unSubstituteEnvParams } = Utils;\nconst { validateScriptHooks } = ValidationUtils;\nconst {\n getAllConfigEntities,\n getConfigEntity,\n putConfigEntity,\n queryAllManagedObjectsByType,\n testConnectorServers,\n} = Idm;\n\n/**\n * Warn about and list offline remote connector servers\n */\nexport async function warnAboutOfflineConnectorServers() {\n try {\n const all = await testConnectorServers();\n const offline = all.filter((status) => !status.ok);\n if (offline.length) {\n printMessage(\n `\\n\\nThe following connector server(s) are offline and their connectors and configuration unavailable:\\n ${offline.join(\n '\\n'\n )}`,\n 'warn'\n );\n }\n } catch (error) {\n printMessage(error, 'error');\n printMessage(\n `Error getting offline connector servers: ${error.message}`,\n 'error'\n );\n }\n}\n\n/**\n * List all IDM configuration objects\n */\nexport async function listAllConfigEntities() {\n try {\n const { configurations } = await getAllConfigEntities();\n for (const configEntity of configurations) {\n printMessage(`${configEntity._id}`, 'data');\n }\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n}\n\n/**\n * Export an IDM configuration object.\n * @param {String} id the desired configuration object\n * @param {String} file optional export file\n */\nexport async function exportConfigEntity(id, file) {\n let fileName = file;\n if (!fileName) {\n fileName = getTypedFilename(`${id}`, 'idm');\n }\n const configEntity = await getConfigEntity(id);\n fs.writeFile(fileName, JSON.stringify(configEntity, null, 2), (err) => {\n if (err) {\n return printMessage(`ERROR - can't save ${id} export to file`, 'error');\n }\n return '';\n });\n}\n\n/**\n * Export all IDM configuration objects into separate JSON files in a directory specified by <directory>\n * @param {String} directory export directory\n */\nexport async function exportAllRawConfigEntities(directory) {\n try {\n const { configurations } = await getAllConfigEntities();\n if (!fs.existsSync(directory)) {\n fs.mkdirSync(directory);\n }\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Exporting config objects...'\n );\n const entityPromises = [];\n for (const configEntity of configurations) {\n entityPromises.push(\n getConfigEntity(configEntity._id).catch((getConfigEntityError) => {\n if (\n !(\n getConfigEntityError.response?.status === 403 &&\n getConfigEntityError.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n ) &&\n // https://bugster.forgerock.org/jira/browse/OPENIDM-18270\n !(\n getConfigEntityError.response?.status === 404 &&\n getConfigEntityError.response?.data?.message ===\n 'No configuration exists for id org.apache.felix.fileinstall/openidm'\n )\n ) {\n printMessage(getConfigEntityError.response?.data, 'error');\n printMessage(\n `Error getting config entity ${configEntity._id}: ${getConfigEntityError}`,\n 'error'\n );\n }\n })\n );\n }\n const results = await Promise.all(entityPromises);\n for (const item of results) {\n if (item != null) {\n fse.outputFile(\n `${directory}/${item._id}.json`,\n JSON.stringify(item, null, 2),\n (err) => {\n if (err) {\n return printMessage(\n `ERROR - can't save config ${item._id} to file - ${err}`,\n 'error'\n );\n }\n }\n );\n }\n }\n stopProgressIndicator('Exported config objects.', 'success');\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n}\n\n/**\n * Export all IDM configuration objects\n * @param {String} directory export directory\n * @param {String} entitiesFile JSON file that specifies the config entities to export/import\n * @param {String} envFile File that defines environment specific variables for replacement during configuration export/import\n */\nexport async function exportAllConfigEntities(\n directory,\n entitiesFile,\n envFile\n) {\n let entriesToExport = [];\n // read list of entities to export\n fs.readFile(entitiesFile, 'utf8', async (err, data) => {\n if (err) throw err;\n const entriesData = JSON.parse(data);\n entriesToExport = entriesData.idm;\n // console.log(`entriesToExport ${entriesToExport}`);\n\n // read list of configs to parameterize for environment specific values\n const envParams = propertiesReader(envFile);\n\n try {\n const { configurations } = await getAllConfigEntities();\n // create export directory if not exist\n if (!fs.existsSync(directory)) {\n fs.mkdirSync(directory);\n }\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Exporting config objects...'\n );\n const entityPromises = [];\n for (const configEntity of configurations) {\n if (entriesToExport.includes(configEntity._id)) {\n entityPromises.push(getConfigEntity(configEntity._id));\n }\n }\n const results = await Promise.all(entityPromises);\n for (const item of results) {\n if (item != null) {\n let configEntityString = JSON.stringify(item, null, 2);\n envParams.each((key, value) => {\n configEntityString = replaceall(\n value,\n `\\${${key}}`,\n configEntityString\n );\n });\n fse.outputFile(\n `${directory}/${item._id}.json`,\n configEntityString,\n (error) => {\n if (err) {\n return printMessage(\n `ERROR - can't save config ${item._id} to file - ${error}`,\n 'error'\n );\n }\n }\n );\n }\n }\n stopProgressIndicator(null, 'success');\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n });\n}\n\n/**\n * Import an IDM configuration object.\n * @param entityId the configuration object to import\n * @param file optional file to import\n */\nexport async function importConfigEntity(\n entityId: string,\n file?: string,\n validate?: boolean\n) {\n if (!file) {\n file = getTypedFilename(entityId, 'idm');\n }\n\n const entityData = fs.readFileSync(path.resolve(process.cwd(), file), 'utf8');\n\n const jsObject = JSON.parse(entityData);\n const isValid = validateScriptHooks(jsObject);\n if (validate && !isValid) {\n printMessage('Invalid IDM configuration object', 'error');\n return;\n }\n\n try {\n await putConfigEntity(entityId, entityData);\n } catch (putConfigEntityError) {\n printMessage(putConfigEntityError, 'error');\n printMessage(`Error: ${putConfigEntityError}`, 'error');\n }\n}\n\n/**\n * Import all IDM configuration objects from separate JSON files in a directory specified by <directory>\n * @param baseDirectory export directory\n * @param validate validate script hooks\n */\nexport async function importAllRawConfigEntities(\n baseDirectory: string,\n validate?: boolean\n) {\n if (!fs.existsSync(baseDirectory)) {\n return;\n }\n const files = await readFiles(baseDirectory);\n const jsonFiles = files\n .filter(({ path }) => path.toLowerCase().endsWith('.json'))\n .map(({ path, content }) => ({\n // Remove .json extension\n entityId: path.substring(0, path.length - 5),\n content,\n path,\n }));\n\n let everyScriptValid = true;\n for (const file of jsonFiles) {\n const jsObject = JSON.parse(file.content);\n const isScriptValid = validateScriptHooks(jsObject);\n if (!isScriptValid) {\n printMessage(`Invalid script hook in ${file.path}`, 'error');\n everyScriptValid = false;\n }\n }\n\n if (validate && !everyScriptValid) {\n return;\n }\n\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Importing config objects...'\n );\n\n const entityPromises = jsonFiles.map((file) => {\n return putConfigEntity(file.entityId, file.content);\n });\n\n const results = await Promise.allSettled(entityPromises);\n const errors = results.filter(\n (result): result is PromiseRejectedResult => result.status === 'rejected'\n );\n\n if (errors.length > 0) {\n printMessage(`Failed to import ${errors.length} config objects:`, 'error');\n for (const error of errors) {\n printMessage(`- ${error.reason}`, 'error');\n }\n stopProgressIndicator(\n `Failed to import ${errors.length} config objects`,\n 'error'\n );\n return;\n }\n\n stopProgressIndicator(`Imported ${results.length} config objects`, 'success');\n}\n\n/**\n * Import all IDM configuration objects\n * @param baseDirectory import directory\n * @param entitiesFile JSON file that specifies the config entities to export/import\n * @param envFile File that defines environment specific variables for replacement during configuration export/import\n * @param validate validate script hooks\n */\nexport async function importAllConfigEntities(\n baseDirectory: string,\n entitiesFile: string,\n envFile: string,\n validate?: boolean\n) {\n if (!fs.existsSync(baseDirectory)) {\n return;\n }\n const entriesToImport = JSON.parse(fs.readFileSync(entitiesFile, 'utf8')).idm;\n\n const envReader = propertiesReader(envFile);\n\n const files = await readFiles(baseDirectory);\n const jsonFiles = files\n .filter(({ path }) => path.toLowerCase().endsWith('.json'))\n .map(({ content, path }) => ({\n // Remove .json extension\n entityId: path.substring(0, path.length - 5),\n content,\n path,\n }));\n\n let everyScriptValid = true;\n for (const file of jsonFiles) {\n const jsObject = JSON.parse(file.content);\n const isScriptValid = validateScriptHooks(jsObject);\n if (!isScriptValid) {\n printMessage(`Invalid script hook in ${file.path}`, 'error');\n everyScriptValid = false;\n }\n }\n\n if (validate && !everyScriptValid) {\n return;\n }\n\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Importing config objects...'\n );\n\n const entityPromises = jsonFiles\n .filter(({ entityId }) => {\n return entriesToImport.includes(entityId);\n })\n .map(({ entityId, content }) => {\n const unsubstituted = unSubstituteEnvParams(content, envReader);\n return putConfigEntity(entityId, unsubstituted);\n });\n\n const results = await Promise.allSettled(entityPromises);\n const errors = results.filter(\n (result): result is PromiseRejectedResult => result.status === 'rejected'\n );\n\n if (errors.length > 0) {\n printMessage(`Failed to import ${errors.length} config objects:`, 'error');\n for (const error of errors) {\n printMessage(`- ${error.reason}`, 'error');\n }\n stopProgressIndicator(\n `Failed to import ${errors.length} config objects`,\n 'error'\n );\n return;\n }\n\n stopProgressIndicator(`Imported ${results.length} config objects`, 'success');\n}\n\n/**\n * Count number of managed objects of a given type\n * @param {String} type managed object type, e.g. alpha_user\n */\nexport async function countManagedObjects(type) {\n let count = 0;\n let result = {\n result: [],\n resultCount: 0,\n pagedResultsCookie: null,\n totalPagedResultsPolicy: 'NONE',\n totalPagedResults: -1,\n remainingPagedResults: -1,\n };\n try {\n do {\n result = await queryAllManagedObjectsByType(\n type,\n [],\n result.pagedResultsCookie\n );\n count += result.resultCount;\n } while (result.pagedResultsCookie);\n printMessage(`${type}: ${count}`);\n } catch (error) {\n printMessage(error.response.data, 'error');\n printMessage(`Error querying managed objects by type: ${error}`, 'error');\n }\n}\n"],"mappings":"AAAA;AACA,OAAOA,EAAE,MAAM,IAAI;AACnB,OAAOC,GAAG,MAAM,UAAU;AAC1B,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,GAAG,EAAEC,KAAK,EAAEC,eAAe,QAAQ,uBAAuB;AACnE,SACEC,uBAAuB,EACvBC,YAAY,EACZC,qBAAqB,QAChB,kBAAkB;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,MAAM;EAAEC,SAAS;EAAEC;AAAsB,CAAC,GAAGP,KAAK;AAClD,MAAM;EAAEQ;AAAoB,CAAC,GAAGP,eAAe;AAC/C,MAAM;EACJQ,oBAAoB;EACpBC,eAAe;EACfC,eAAe;EACfC,4BAA4B;EAC5BC;AACF,CAAC,GAAGd,GAAG;;AAEP;AACA;AACA;AACA,OAAO,eAAee,gCAAgC,GAAG;EACvD,IAAI;IACF,MAAMC,GAAG,GAAG,MAAMF,oBAAoB,EAAE;IACxC,MAAMG,OAAO,GAAGD,GAAG,CAACE,MAAM,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SAAS,CAAC;AAC/E;;AAEA;AACA;AACA;AACA;AACA,OAAO,eAAe4E,mBAAmB,CAACC,IAAI,EAAE;EAC9C,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIR,MAAM,GAAG;IACXA,MAAM,EAAE,EAAE;IACVS,WAAW,EAAE,CAAC;IACdC,kBAAkB,EAAE,IAAI;IACxBC,uBAAuB,EAAE,MAAM;IAC/BC,iBAAiB,EAAE,CAAC,CAAC;IACrBC,qBAAqB,EAAE,CAAC;EAC1B,CAAC;EACD,IAAI;IACF,GAAG;MACDb,MAAM,GAAG,MAAM9E,4BAA4B,CACzCqF,IAAI,EACJ,EAAE,EACFP,MAAM,CAACU,kBAAkB,CAC1B;MACDF,KAAK,IAAIR,MAAM,CAACS,WAAW;IAC7B,CAAC,QAAQT,MAAM,CAACU,kBAAkB;IAClCjG,YAAY,CAAE,GAAE8F,IAAK,KAAIC,KAAM,EAAC,CAAC;EACnC,CAAC,CAAC,OAAO5E,KAAK,EAAE;IACdnB,YAAY,CAACmB,KAAK,CAACwB,QAAQ,CAACC,IAAI,EAAE,OAAO,CAAC;IAC1C5C,YAAY,CAAE,2CAA0CmB,KAAM,EAAC,EAAE,OAAO,CAAC;EAC3E;AACF"}
1
+ {"version":3,"file":"IdmOps.js","names":["fs","fse","path","propertiesReader","replaceall","Idm","Utils","ValidationUtils","createProgressIndicator","printMessage","stopProgressIndicator","getTypedFilename","readFiles","unSubstituteEnvParams","validateScriptHooks","getAllConfigEntities","getConfigEntity","putConfigEntity","queryAllManagedObjectsByType","testConnectorServers","warnAboutOfflineConnectorServers","all","offline","filter","status","ok","map","name","length","join","error","message","listAllConfigEntities","configurations","configEntity","_id","getAllConfigEntitiesError","exportConfigEntity","id","file","fileName","writeFile","JSON","stringify","err","exportAllRawConfigEntities","directory","existsSync","mkdirSync","undefined","entityPromises","push","catch","getConfigEntityError","response","data","results","Promise","item","outputFile","exportAllConfigEntities","entitiesFile","envFile","entriesToExport","readFile","entriesData","parse","idm","envParams","includes","configEntityString","each","key","value","importConfigEntity","entityId","validate","entityData","readFileSync","resolve","process","cwd","jsObject","isValid","putConfigEntityError","importAllRawConfigEntities","baseDirectory","files","jsonFiles","toLowerCase","endsWith","content","substring","everyScriptValid","isScriptValid","allSettled","errors","result","reason","importAllConfigEntities","entriesToImport","envReader","unsubstituted","countManagedObjects","type","count","resultCount","pagedResultsCookie","totalPagedResultsPolicy","totalPagedResults","remainingPagedResults"],"sources":["ops/IdmOps.ts"],"sourcesContent":["/* eslint-disable no-await-in-loop */\nimport fs from 'fs';\nimport fse from 'fs-extra';\nimport path from 'path';\nimport propertiesReader from 'properties-reader';\nimport replaceall from 'replaceall';\n\nimport { Idm, Utils, ValidationUtils } from '@rockcarver/frodo-lib';\nimport {\n createProgressIndicator,\n printMessage,\n stopProgressIndicator,\n} from '../utils/Console';\nimport { getTypedFilename } from '../utils/ExportImportUtils';\n\nconst { readFiles, unSubstituteEnvParams } = Utils;\nconst { validateScriptHooks } = ValidationUtils;\nconst {\n getAllConfigEntities,\n getConfigEntity,\n putConfigEntity,\n queryAllManagedObjectsByType,\n testConnectorServers,\n} = Idm;\n\n/**\n * Warn about and list offline remote connector servers\n */\nexport async function warnAboutOfflineConnectorServers() {\n try {\n const all = await testConnectorServers();\n const offline = all\n .filter((status) => !status.ok)\n .map((status) => status.name);\n if (offline.length) {\n printMessage(\n `\\nThe following connector server(s) are offline and their connectors and configuration unavailable:\\n${offline.join(\n '\\n'\n )}`,\n 'warn'\n );\n }\n } catch (error) {\n printMessage(error, 'error');\n printMessage(\n `Error getting offline connector servers: ${error.message}`,\n 'error'\n );\n }\n}\n\n/**\n * List all IDM configuration objects\n */\nexport async function listAllConfigEntities() {\n try {\n const { configurations } = await getAllConfigEntities();\n for (const configEntity of configurations) {\n printMessage(`${configEntity._id}`, 'data');\n }\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n}\n\n/**\n * Export an IDM configuration object.\n * @param {String} id the desired configuration object\n * @param {String} file optional export file\n */\nexport async function exportConfigEntity(id, file) {\n let fileName = file;\n if (!fileName) {\n fileName = getTypedFilename(`${id}`, 'idm');\n }\n const configEntity = await getConfigEntity(id);\n fs.writeFile(fileName, JSON.stringify(configEntity, null, 2), (err) => {\n if (err) {\n return printMessage(`ERROR - can't save ${id} export to file`, 'error');\n }\n return '';\n });\n}\n\n/**\n * Export all IDM configuration objects into separate JSON files in a directory specified by <directory>\n * @param {String} directory export directory\n */\nexport async function exportAllRawConfigEntities(directory) {\n try {\n const { configurations } = await getAllConfigEntities();\n if (!fs.existsSync(directory)) {\n fs.mkdirSync(directory);\n }\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Exporting config objects...'\n );\n const entityPromises = [];\n for (const configEntity of configurations) {\n entityPromises.push(\n getConfigEntity(configEntity._id).catch((getConfigEntityError) => {\n if (\n !(\n getConfigEntityError.response?.status === 403 &&\n getConfigEntityError.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n ) &&\n // https://bugster.forgerock.org/jira/browse/OPENIDM-18270\n !(\n getConfigEntityError.response?.status === 404 &&\n getConfigEntityError.response?.data?.message ===\n 'No configuration exists for id org.apache.felix.fileinstall/openidm'\n )\n ) {\n printMessage(getConfigEntityError.response?.data, 'error');\n printMessage(\n `Error getting config entity ${configEntity._id}: ${getConfigEntityError}`,\n 'error'\n );\n }\n })\n );\n }\n const results = await Promise.all(entityPromises);\n for (const item of results) {\n if (item != null) {\n fse.outputFile(\n `${directory}/${item._id}.json`,\n JSON.stringify(item, null, 2),\n (err) => {\n if (err) {\n return printMessage(\n `ERROR - can't save config ${item._id} to file - ${err}`,\n 'error'\n );\n }\n }\n );\n }\n }\n stopProgressIndicator('Exported config objects.', 'success');\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n}\n\n/**\n * Export all IDM configuration objects\n * @param {String} directory export directory\n * @param {String} entitiesFile JSON file that specifies the config entities to export/import\n * @param {String} envFile File that defines environment specific variables for replacement during configuration export/import\n */\nexport async function exportAllConfigEntities(\n directory,\n entitiesFile,\n envFile\n) {\n let entriesToExport = [];\n // read list of entities to export\n fs.readFile(entitiesFile, 'utf8', async (err, data) => {\n if (err) throw err;\n const entriesData = JSON.parse(data);\n entriesToExport = entriesData.idm;\n // console.log(`entriesToExport ${entriesToExport}`);\n\n // read list of configs to parameterize for environment specific values\n const envParams = propertiesReader(envFile);\n\n try {\n const { configurations } = await getAllConfigEntities();\n // create export directory if not exist\n if (!fs.existsSync(directory)) {\n fs.mkdirSync(directory);\n }\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Exporting config objects...'\n );\n const entityPromises = [];\n for (const configEntity of configurations) {\n if (entriesToExport.includes(configEntity._id)) {\n entityPromises.push(getConfigEntity(configEntity._id));\n }\n }\n const results = await Promise.all(entityPromises);\n for (const item of results) {\n if (item != null) {\n let configEntityString = JSON.stringify(item, null, 2);\n envParams.each((key, value) => {\n configEntityString = replaceall(\n value,\n `\\${${key}}`,\n configEntityString\n );\n });\n fse.outputFile(\n `${directory}/${item._id}.json`,\n configEntityString,\n (error) => {\n if (err) {\n return printMessage(\n `ERROR - can't save config ${item._id} to file - ${error}`,\n 'error'\n );\n }\n }\n );\n }\n }\n stopProgressIndicator(null, 'success');\n } catch (getAllConfigEntitiesError) {\n printMessage(getAllConfigEntitiesError, 'error');\n printMessage(\n `Error getting config entities: ${getAllConfigEntitiesError}`,\n 'error'\n );\n }\n });\n}\n\n/**\n * Import an IDM configuration object.\n * @param entityId the configuration object to import\n * @param file optional file to import\n */\nexport async function importConfigEntity(\n entityId: string,\n file?: string,\n validate?: boolean\n) {\n if (!file) {\n file = getTypedFilename(entityId, 'idm');\n }\n\n const entityData = fs.readFileSync(path.resolve(process.cwd(), file), 'utf8');\n\n const jsObject = JSON.parse(entityData);\n const isValid = validateScriptHooks(jsObject);\n if (validate && !isValid) {\n printMessage('Invalid IDM configuration object', 'error');\n return;\n }\n\n try {\n await putConfigEntity(entityId, entityData);\n } catch (putConfigEntityError) {\n printMessage(putConfigEntityError, 'error');\n printMessage(`Error: ${putConfigEntityError}`, 'error');\n }\n}\n\n/**\n * Import all IDM configuration objects from separate JSON files in a directory specified by <directory>\n * @param baseDirectory export directory\n * @param validate validate script hooks\n */\nexport async function importAllRawConfigEntities(\n baseDirectory: string,\n validate?: boolean\n) {\n if (!fs.existsSync(baseDirectory)) {\n return;\n }\n const files = await readFiles(baseDirectory);\n const jsonFiles = files\n .filter(({ path }) => path.toLowerCase().endsWith('.json'))\n .map(({ path, content }) => ({\n // Remove .json extension\n entityId: path.substring(0, path.length - 5),\n content,\n path,\n }));\n\n let everyScriptValid = true;\n for (const file of jsonFiles) {\n const jsObject = JSON.parse(file.content);\n const isScriptValid = validateScriptHooks(jsObject);\n if (!isScriptValid) {\n printMessage(`Invalid script hook in ${file.path}`, 'error');\n everyScriptValid = false;\n }\n }\n\n if (validate && !everyScriptValid) {\n return;\n }\n\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Importing config objects...'\n );\n\n const entityPromises = jsonFiles.map((file) => {\n return putConfigEntity(file.entityId, file.content);\n });\n\n const results = await Promise.allSettled(entityPromises);\n const errors = results.filter(\n (result): result is PromiseRejectedResult => result.status === 'rejected'\n );\n\n if (errors.length > 0) {\n printMessage(`Failed to import ${errors.length} config objects:`, 'error');\n for (const error of errors) {\n printMessage(`- ${error.reason}`, 'error');\n }\n stopProgressIndicator(\n `Failed to import ${errors.length} config objects`,\n 'error'\n );\n return;\n }\n\n stopProgressIndicator(`Imported ${results.length} config objects`, 'success');\n}\n\n/**\n * Import all IDM configuration objects\n * @param baseDirectory import directory\n * @param entitiesFile JSON file that specifies the config entities to export/import\n * @param envFile File that defines environment specific variables for replacement during configuration export/import\n * @param validate validate script hooks\n */\nexport async function importAllConfigEntities(\n baseDirectory: string,\n entitiesFile: string,\n envFile: string,\n validate?: boolean\n) {\n if (!fs.existsSync(baseDirectory)) {\n return;\n }\n const entriesToImport = JSON.parse(fs.readFileSync(entitiesFile, 'utf8')).idm;\n\n const envReader = propertiesReader(envFile);\n\n const files = await readFiles(baseDirectory);\n const jsonFiles = files\n .filter(({ path }) => path.toLowerCase().endsWith('.json'))\n .map(({ content, path }) => ({\n // Remove .json extension\n entityId: path.substring(0, path.length - 5),\n content,\n path,\n }));\n\n let everyScriptValid = true;\n for (const file of jsonFiles) {\n const jsObject = JSON.parse(file.content);\n const isScriptValid = validateScriptHooks(jsObject);\n if (!isScriptValid) {\n printMessage(`Invalid script hook in ${file.path}`, 'error');\n everyScriptValid = false;\n }\n }\n\n if (validate && !everyScriptValid) {\n return;\n }\n\n createProgressIndicator(\n 'indeterminate',\n undefined,\n 'Importing config objects...'\n );\n\n const entityPromises = jsonFiles\n .filter(({ entityId }) => {\n return entriesToImport.includes(entityId);\n })\n .map(({ entityId, content }) => {\n const unsubstituted = unSubstituteEnvParams(content, envReader);\n return putConfigEntity(entityId, unsubstituted);\n });\n\n const results = await Promise.allSettled(entityPromises);\n const errors = results.filter(\n (result): result is PromiseRejectedResult => result.status === 'rejected'\n );\n\n if (errors.length > 0) {\n printMessage(`Failed to import ${errors.length} config objects:`, 'error');\n for (const error of errors) {\n printMessage(`- ${error.reason}`, 'error');\n }\n stopProgressIndicator(\n `Failed to import ${errors.length} config objects`,\n 'error'\n );\n return;\n }\n\n stopProgressIndicator(`Imported ${results.length} config objects`, 'success');\n}\n\n/**\n * Count number of managed objects of a given type\n * @param {String} type managed object type, e.g. alpha_user\n */\nexport async function countManagedObjects(type) {\n let count = 0;\n let result = {\n result: [],\n resultCount: 0,\n pagedResultsCookie: null,\n totalPagedResultsPolicy: 'NONE',\n totalPagedResults: -1,\n remainingPagedResults: -1,\n };\n try {\n do {\n result = await queryAllManagedObjectsByType(\n type,\n [],\n result.pagedResultsCookie\n );\n count += result.resultCount;\n } while (result.pagedResultsCookie);\n printMessage(`${type}: ${count}`);\n } catch (error) {\n printMessage(error.response.data, 'error');\n printMessage(`Error querying managed objects by type: ${error}`, 'error');\n }\n}\n"],"mappings":"AAAA;AACA,OAAOA,EAAE,MAAM,IAAI;AACnB,OAAOC,GAAG,MAAM,UAAU;AAC1B,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,GAAG,EAAEC,KAAK,EAAEC,eAAe,QAAQ,uBAAuB;AACnE,SACEC,uBAAuB,EACvBC,YAAY,EACZC,qBAAqB,QAChB,kBAAkB;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,MAAM;EAAEC,SAAS;EAAEC;AAAsB,CAAC,GAAGP,KAAK;AAClD,MAAM;EAAEQ;AAAoB,CAAC,GAAGP,eAAe;AAC/C,MAAM;EACJQ,oBAAoB;EACpBC,eAAe;EACfC,eAAe;EACfC,4BAA4B;EAC5BC;AACF,CAAC,GAAGd,GAAG;;AAEP;AACA;AACA;AACA,OAAO,eAAee,gCAAgC,GAAG;EACvD,IAAI;IACF,MAAMC,GAAG,GAAG,MAAMF,oBAAoB,EAAE;IACxC,MAAMG,OAAO,GAAGD,GAAG,CAChBE,MAAM,CAAEC,MAAM,IAAK,CAACA,MAAM,CAACC,EAAE,CAAC,CAC9BC,GAAG,CAAEF,MAAM,IAAKA,MAAM,CAACG,IAAI,CAAC;IAC/B,IAAIL,OAAO,CAACM,MAAM,EAAE;MAClBnB,YAAY,CACT,wGAAuGa,OAAO,CAACO,IAAI,CAClH,IAAI,CACJ,EAAC,EACH,MAAM,CACP;IACH;EACF,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdrB,YAAY,CAACqB,KAAK,EAAE,OAAO,CAAC;IAC5BrB,YAAY,CACT,4CAA2CqB,KAAK,CAACC,OAAQ,EAAC,EAC3D,OAAO,CACR;EACH;AACF;;AAEA;AACA;AACA;AAC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,GAAG;MACDb,MAAM,GAAG,MAAM/E,4BAA4B,CACzCsF,IAAI,EACJ,EAAE,EACFP,MAAM,CAACU,kBAAkB,CAC1B;MACDF,KAAK,IAAIR,MAAM,CAACS,WAAW;IAC7B,CAAC,QAAQT,MAAM,CAACU,kBAAkB;IAClClG,YAAY,CAAE,GAAE+F,IAAK,KAAIC,KAAM,EAAC,CAAC;EACnC,CAAC,CAAC,OAAO3E,KAAK,EAAE;IACdrB,YAAY,CAACqB,KAAK,CAACwB,QAAQ,CAACC,IAAI,EAAE,OAAO,CAAC;IAC1C9C,YAAY,CAAE,2CAA0CqB,KAAM,EAAC,EAAE,OAAO,CAAC;EAC3E;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockcarver/frodo-cli",
3
- "version": "0.19.3-3",
3
+ "version": "0.19.4",
4
4
  "type": "module",
5
5
  "description": "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
6
6
  "keywords": [
@@ -56,6 +56,10 @@
56
56
  "name": "Ali Falahi",
57
57
  "email": "ali@falahi.com"
58
58
  },
59
+ {
60
+ "name": "Nick Hangartner",
61
+ "email": "nhangartner@gmail.com"
62
+ },
59
63
  {
60
64
  "name": "Marcel Maas",
61
65
  "email": "maas.marcel@gmail.com"
@@ -96,7 +100,7 @@
96
100
  ]
97
101
  },
98
102
  "dependencies": {
99
- "@rockcarver/frodo-lib": "0.17.5-0",
103
+ "@rockcarver/frodo-lib": "0.17.6",
100
104
  "cli-progress": "^3.11.2",
101
105
  "cli-table3": "^0.6.3",
102
106
  "colors": "^1.4.0",