@rockcarver/frodo-cli 4.0.0-41 → 4.0.0-42

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,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.0-41] - 2026-04-03
11
+
10
12
  ## [4.0.0-40] - 2026-04-03
11
13
 
12
14
  ## [4.0.0-39] - 2026-04-03
@@ -2243,7 +2245,8 @@ Frodo CLI 2.x automatically refreshes session and access tokens before they expi
2243
2245
  - Fixed problem with adding connection profiles
2244
2246
  - Miscellaneous bug fixes
2245
2247
 
2246
- [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-40...HEAD
2248
+ [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-41...HEAD
2249
+ [4.0.0-41]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-40...v4.0.0-41
2247
2250
  [4.0.0-40]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-39...v4.0.0-40
2248
2251
  [4.0.0-39]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-38...v4.0.0-39
2249
2252
  [4.0.0-38]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-37...v4.0.0-38
package/dist/app.cjs CHANGED
@@ -142841,7 +142841,7 @@ function stringify(obj) {
142841
142841
  }
142842
142842
  var package_default = {
142843
142843
  name: "@rockcarver/frodo-lib",
142844
- version: "4.0.0-35",
142844
+ version: "4.0.0-36",
142845
142845
  type: "commonjs",
142846
142846
  main: "./dist/index.js",
142847
142847
  module: "./dist/index.mjs",
@@ -192665,9 +192665,9 @@ async function importPolicySetDependencies({
192665
192665
  });
192666
192666
  const errors = [];
192667
192667
  try {
192668
- const policies = Object.values(exportData.policy).filter(
192668
+ const policies = exportData.policy ? Object.values(exportData.policy).filter(
192669
192669
  (policy2) => policy2.applicationName === policySetData.name
192670
- );
192670
+ ) : [];
192671
192671
  for (const policyData of policies) {
192672
192672
  try {
192673
192673
  debugMessage({
@@ -211432,6 +211432,15 @@ var agentTypeToFileIdMap = {
211432
211432
  SoftwarePublisher: "publisher.agent",
211433
211433
  WebAgent: "web.agent"
211434
211434
  };
211435
+ function normalizeAgentImportData(importData) {
211436
+ if (!importData.agent && importData.agents) {
211437
+ importData.agent = importData.agents;
211438
+ }
211439
+ if (!importData.agent) {
211440
+ importData.agent = {};
211441
+ }
211442
+ return importData;
211443
+ }
211435
211444
  async function listAgents(long = false, global2 = false) {
211436
211445
  try {
211437
211446
  const agents = await readAgents2(global2);
@@ -211756,7 +211765,9 @@ async function importAgentFromFile(agentId, file, global2 = false) {
211756
211765
  try {
211757
211766
  const verbose = state.getVerbose();
211758
211767
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
211759
- const importData = JSON.parse(data2);
211768
+ const importData = normalizeAgentImportData(
211769
+ JSON.parse(data2)
211770
+ );
211760
211771
  if (importData.agent && importData.agent[agentId]) {
211761
211772
  const agent = importData.agent[agentId];
211762
211773
  importData.agent = {};
@@ -211814,7 +211825,9 @@ async function importIdentityGatewayAgentFromFile(agentId, file) {
211814
211825
  debugMessage2(`cli.AgentOps.importIdentityGatewayAgentFromFile: start`);
211815
211826
  const verbose = state.getVerbose();
211816
211827
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
211817
- const importData = JSON.parse(data2);
211828
+ const importData = normalizeAgentImportData(
211829
+ JSON.parse(data2)
211830
+ );
211818
211831
  if (importData.agent && importData.agent[agentId]) {
211819
211832
  const agent = importData.agent[agentId];
211820
211833
  importData.agent = {};
@@ -211870,7 +211883,9 @@ async function importJavaAgentFromFile(agentId, file) {
211870
211883
  debugMessage2(`cli.AgentOps.importJavaAgentFromFile: start`);
211871
211884
  const verbose = state.getVerbose();
211872
211885
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
211873
- const importData = JSON.parse(data2);
211886
+ const importData = normalizeAgentImportData(
211887
+ JSON.parse(data2)
211888
+ );
211874
211889
  if (importData.agent && importData.agent[agentId]) {
211875
211890
  const agent = importData.agent[agentId];
211876
211891
  importData.agent = {};
@@ -211923,7 +211938,9 @@ async function importWebAgentFromFile(agentId, file) {
211923
211938
  debugMessage2(`cli.AgentOps.importWebAgentFromFile: start`);
211924
211939
  const verbose = state.getVerbose();
211925
211940
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
211926
- const importData = JSON.parse(data2);
211941
+ const importData = normalizeAgentImportData(
211942
+ JSON.parse(data2)
211943
+ );
211927
211944
  if (importData.agent && importData.agent[agentId]) {
211928
211945
  const agent = importData.agent[agentId];
211929
211946
  importData.agent = {};
@@ -211973,9 +211990,12 @@ async function importWebAgentFromFile(agentId, file) {
211973
211990
  }
211974
211991
  async function importFirstAgentFromFile(file, global2 = false) {
211975
211992
  try {
211993
+ debugMessage2(`cli.AgentOps.importFirstAgentFromFile: start`);
211976
211994
  const verbose = state.getVerbose();
211977
211995
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
211978
- const importData = JSON.parse(data2);
211996
+ const importData = normalizeAgentImportData(
211997
+ JSON.parse(data2)
211998
+ );
211979
211999
  let spinnerId;
211980
212000
  if (Object.keys(importData.agent).length > 0) {
211981
212001
  for (const agent of Object.values(importData.agent)) {
@@ -211998,6 +212018,7 @@ async function importFirstAgentFromFile(file, global2 = false) {
211998
212018
  `Imported ${agent["_id"]}.`,
211999
212019
  "success"
212000
212020
  );
212021
+ debugMessage2(`cli.AgentOps.importFirstAgentFromFile: end`);
212001
212022
  return true;
212002
212023
  } catch (error2) {
212003
212024
  if (verbose)
@@ -212025,7 +212046,9 @@ async function importFirstIdentityGatewayAgentFromFile(file) {
212025
212046
  debugMessage2(`cli.AgentOps.importFirstIdentityGatewayAgentFromFile: start`);
212026
212047
  const verbose = state.getVerbose();
212027
212048
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
212028
- const importData = JSON.parse(data2);
212049
+ const importData = normalizeAgentImportData(
212050
+ JSON.parse(data2)
212051
+ );
212029
212052
  let spinnerId;
212030
212053
  if (Object.keys(importData.agent).length > 0) {
212031
212054
  for (const agent of Object.values(importData.agent)) {
@@ -212072,7 +212095,9 @@ async function importFirstJavaAgentFromFile(file) {
212072
212095
  debugMessage2(`cli.AgentOps.importFirstJavaAgentFromFile: start`);
212073
212096
  const verbose = state.getVerbose();
212074
212097
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
212075
- const importData = JSON.parse(data2);
212098
+ const importData = normalizeAgentImportData(
212099
+ JSON.parse(data2)
212100
+ );
212076
212101
  let spinnerId;
212077
212102
  if (Object.keys(importData.agent).length > 0) {
212078
212103
  for (const agent of Object.values(importData.agent)) {
@@ -212116,7 +212141,9 @@ async function importFirstWebAgentFromFile(file) {
212116
212141
  debugMessage2(`cli.AgentOps.importFirstWebAgentFromFile: start`);
212117
212142
  const verbose = state.getVerbose();
212118
212143
  const data2 = fs47.default.readFileSync(getFilePath4(file), "utf8");
212119
- const importData = JSON.parse(data2);
212144
+ const importData = normalizeAgentImportData(
212145
+ JSON.parse(data2)
212146
+ );
212120
212147
  let spinnerId;
212121
212148
  if (Object.keys(importData.agent).length > 0) {
212122
212149
  for (const agent of Object.values(importData.agent)) {
@@ -212165,7 +212192,9 @@ async function importAgentsFromFile(file, global2 = false) {
212165
212192
  const filePath = getFilePath4(file);
212166
212193
  const data2 = fs47.default.readFileSync(filePath, "utf8");
212167
212194
  debugMessage2(`importAgentsFromFile: importing ${filePath}`);
212168
- const importData = JSON.parse(data2);
212195
+ const importData = normalizeAgentImportData(
212196
+ JSON.parse(data2)
212197
+ );
212169
212198
  await importAgents2(importData, global2);
212170
212199
  debugMessage2(`importAgentsFromFile: end`);
212171
212200
  return true;
@@ -212182,7 +212211,9 @@ async function importIdentityGatewayAgentsFromFile(file) {
212182
212211
  debugMessage2(
212183
212212
  `cli.AgentOps.importIdentityGatewayAgentsFromFile: importing ${filePath}`
212184
212213
  );
212185
- const importData = JSON.parse(data2);
212214
+ const importData = normalizeAgentImportData(
212215
+ JSON.parse(data2)
212216
+ );
212186
212217
  await importIdentityGatewayAgents2(importData);
212187
212218
  debugMessage2(`cli.AgentOps.importIdentityGatewayAgentsFromFile: end`);
212188
212219
  return true;
@@ -212199,7 +212230,9 @@ async function importJavaAgentsFromFile(file) {
212199
212230
  debugMessage2(
212200
212231
  `cli.AgentOps.importJavaAgentsFromFile: importing ${filePath}`
212201
212232
  );
212202
- const importData = JSON.parse(data2);
212233
+ const importData = normalizeAgentImportData(
212234
+ JSON.parse(data2)
212235
+ );
212203
212236
  await importJavaAgents2(importData);
212204
212237
  debugMessage2(`cli.AgentOps.importJavaAgentsFromFile: end`);
212205
212238
  return true;
@@ -212214,7 +212247,9 @@ async function importWebAgentsFromFile(file) {
212214
212247
  const filePath = getFilePath4(file);
212215
212248
  const data2 = fs47.default.readFileSync(filePath, "utf8");
212216
212249
  debugMessage2(`cli.AgentOps.importWebAgentsFromFile: importing ${filePath}`);
212217
- const importData = JSON.parse(data2);
212250
+ const importData = normalizeAgentImportData(
212251
+ JSON.parse(data2)
212252
+ );
212218
212253
  await importWebAgents2(importData);
212219
212254
  debugMessage2(`cli.AgentOps.importWebAgentsFromFile: end`);
212220
212255
  return true;
@@ -242441,7 +242476,7 @@ var compareVersions = (v12, v2) => {
242441
242476
  // package.json
242442
242477
  var package_default2 = {
242443
242478
  name: "@rockcarver/frodo-cli",
242444
- version: "4.0.0-41",
242479
+ version: "4.0.0-42",
242445
242480
  type: "module",
242446
242481
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
242447
242482
  keywords: [
@@ -242536,7 +242571,7 @@ var package_default2 = {
242536
242571
  ]
242537
242572
  },
242538
242573
  devDependencies: {
242539
- "@rockcarver/frodo-lib": "4.0.0-35",
242574
+ "@rockcarver/frodo-lib": "4.0.0-36",
242540
242575
  "@types/colors": "^1.2.1",
242541
242576
  "@types/fs-extra": "^11.0.1",
242542
242577
  "@types/jest": "^29.2.3",