@rockcarver/frodo-cli 2.0.0-37 → 2.0.0-39

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/esm/cli/_template/something-else-export.js +1 -1
  3. package/esm/cli/_template/something-else-export.js.map +1 -1
  4. package/esm/cli/_template/something-export.js +1 -1
  5. package/esm/cli/_template/something-export.js.map +1 -1
  6. package/esm/cli/_template/something-other-export.js +1 -1
  7. package/esm/cli/_template/something-other-export.js.map +1 -1
  8. package/esm/cli/admin/admin-federation-export.js +4 -4
  9. package/esm/cli/admin/admin-federation-export.js.map +1 -1
  10. package/esm/cli/agent/agent-export.js +4 -4
  11. package/esm/cli/agent/agent-export.js.map +1 -1
  12. package/esm/cli/agent/agent-gateway-export.js +4 -4
  13. package/esm/cli/agent/agent-gateway-export.js.map +1 -1
  14. package/esm/cli/agent/agent-java-export.js +4 -4
  15. package/esm/cli/agent/agent-java-export.js.map +1 -1
  16. package/esm/cli/agent/agent-web-export.js +4 -4
  17. package/esm/cli/agent/agent-web-export.js.map +1 -1
  18. package/esm/cli/app/app-export.js +4 -4
  19. package/esm/cli/app/app-export.js.map +1 -1
  20. package/esm/cli/authn/authn-export.js +2 -2
  21. package/esm/cli/authn/authn-export.js.map +1 -1
  22. package/esm/cli/authz/authz-policy-export.js +6 -6
  23. package/esm/cli/authz/authz-policy-export.js.map +1 -1
  24. package/esm/cli/authz/authz-set-export.js +4 -4
  25. package/esm/cli/authz/authz-set-export.js.map +1 -1
  26. package/esm/cli/authz/authz-type-export.js +5 -5
  27. package/esm/cli/authz/authz-type-export.js.map +1 -1
  28. package/esm/cli/config/config-export.js +3 -3
  29. package/esm/cli/config/config-export.js.map +1 -1
  30. package/esm/cli/email/email-template-export.js +4 -4
  31. package/esm/cli/email/email-template-export.js.map +1 -1
  32. package/esm/cli/esv/esv-secret-export.js +4 -4
  33. package/esm/cli/esv/esv-secret-export.js.map +1 -1
  34. package/esm/cli/esv/esv-secret-list.js +2 -2
  35. package/esm/cli/esv/esv-secret-list.js.map +1 -1
  36. package/esm/cli/esv/esv-variable-export.js +4 -4
  37. package/esm/cli/esv/esv-variable-export.js.map +1 -1
  38. package/esm/cli/esv/esv-variable-list.js +2 -2
  39. package/esm/cli/esv/esv-variable-list.js.map +1 -1
  40. package/esm/cli/idp/idp-export.js +4 -4
  41. package/esm/cli/idp/idp-export.js.map +1 -1
  42. package/esm/cli/journey/journey-describe.js +3 -1
  43. package/esm/cli/journey/journey-describe.js.map +1 -1
  44. package/esm/cli/journey/journey-export.js +4 -4
  45. package/esm/cli/journey/journey-export.js.map +1 -1
  46. package/esm/cli/oauth/oauth-client-export.js +4 -4
  47. package/esm/cli/oauth/oauth-client-export.js.map +1 -1
  48. package/esm/cli/saml/saml-cot-export.js +4 -4
  49. package/esm/cli/saml/saml-cot-export.js.map +1 -1
  50. package/esm/cli/saml/saml-export.js +4 -4
  51. package/esm/cli/saml/saml-export.js.map +1 -1
  52. package/esm/cli/script/script-export.js +4 -4
  53. package/esm/cli/script/script-export.js.map +1 -1
  54. package/esm/cli/script/script-list.js +2 -2
  55. package/esm/cli/script/script-list.js.map +1 -1
  56. package/esm/cli/service/service-export.js +4 -4
  57. package/esm/cli/service/service-export.js.map +1 -1
  58. package/esm/cli/theme/theme-export.js +5 -5
  59. package/esm/cli/theme/theme-export.js.map +1 -1
  60. package/esm/ops/AdminFederationOps.js +11 -7
  61. package/esm/ops/AdminFederationOps.js.map +1 -1
  62. package/esm/ops/AgentOps.js +39 -25
  63. package/esm/ops/AgentOps.js.map +1 -1
  64. package/esm/ops/ApplicationOps.js +11 -8
  65. package/esm/ops/ApplicationOps.js.map +1 -1
  66. package/esm/ops/AuthenticationSettingsOps.js +4 -3
  67. package/esm/ops/AuthenticationSettingsOps.js.map +1 -1
  68. package/esm/ops/CirclesOfTrustOps.js +12 -7
  69. package/esm/ops/CirclesOfTrustOps.js.map +1 -1
  70. package/esm/ops/ConfigOps.js +9 -7
  71. package/esm/ops/ConfigOps.js.map +1 -1
  72. package/esm/ops/EmailTemplateOps.js +11 -7
  73. package/esm/ops/EmailTemplateOps.js.map +1 -1
  74. package/esm/ops/IdmOps.js +3 -2
  75. package/esm/ops/IdmOps.js.map +1 -1
  76. package/esm/ops/IdpOps.js +14 -7
  77. package/esm/ops/IdpOps.js.map +1 -1
  78. package/esm/ops/JourneyOps.js +15 -6
  79. package/esm/ops/JourneyOps.js.map +1 -1
  80. package/esm/ops/OAuth2ClientOps.js +10 -7
  81. package/esm/ops/OAuth2ClientOps.js.map +1 -1
  82. package/esm/ops/PolicyOps.js +18 -11
  83. package/esm/ops/PolicyOps.js.map +1 -1
  84. package/esm/ops/PolicySetOps.js +12 -7
  85. package/esm/ops/PolicySetOps.js.map +1 -1
  86. package/esm/ops/ResourceTypeOps.js +15 -9
  87. package/esm/ops/ResourceTypeOps.js.map +1 -1
  88. package/esm/ops/Saml2Ops.js +10 -7
  89. package/esm/ops/Saml2Ops.js.map +1 -1
  90. package/esm/ops/ScriptOps.js +73 -36
  91. package/esm/ops/ScriptOps.js.map +1 -1
  92. package/esm/ops/SecretsOps.js +76 -48
  93. package/esm/ops/SecretsOps.js.map +1 -1
  94. package/esm/ops/ServiceOps.js +10 -9
  95. package/esm/ops/ServiceOps.js.map +1 -1
  96. package/esm/ops/ThemeOps.js +15 -9
  97. package/esm/ops/ThemeOps.js.map +1 -1
  98. package/esm/ops/VariablesOps.js +49 -23
  99. package/esm/ops/VariablesOps.js.map +1 -1
  100. package/esm/utils/Config.js +147 -1
  101. package/esm/utils/Config.js.map +1 -1
  102. package/package.json +2 -2
  103. package/esm/utils/ExportImportUtils.js +0 -48
  104. package/esm/utils/ExportImportUtils.js.map +0 -1
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
+ ## [2.0.0-38] - 2023-12-16
11
+
12
+ ## [2.0.0-37] - 2023-12-06
13
+
10
14
  ## [2.0.0-36] - 2023-12-01
11
15
 
12
16
  ## [2.0.0-35] - 2023-11-30
@@ -1439,7 +1443,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1439
1443
  - Fixed problem with adding connection profiles
1440
1444
  - Miscellaneous bug fixes
1441
1445
 
1442
- [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v2.0.0-36...HEAD
1446
+ [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v2.0.0-38...HEAD
1447
+
1448
+ [2.0.0-38]: https://github.com/rockcarver/frodo-cli/compare/v2.0.0-37...v2.0.0-38
1449
+
1450
+ [2.0.0-37]: https://github.com/rockcarver/frodo-cli/compare/v2.0.0-36...v2.0.0-37
1443
1451
 
1444
1452
  [2.0.0-36]: https://github.com/rockcarver/frodo-cli/compare/v2.0.0-35...v2.0.0-36
1445
1453
 
@@ -5,7 +5,7 @@ const {
5
5
  getTokens
6
6
  } = frodo.login;
7
7
  const program = new FrodoCommand('frodo something else export');
8
- program.description('Export something else.').addOption(new Option('-i, --else-id <else-id>', '[Else] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [else] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [else] to separate files (*.[else].json) in the current directory. Ignored with -i or -a.')).action(
8
+ program.description('Export something else.').addOption(new Option('-i, --else-id <else-id>', '[Else] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [else] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [else] to separate files (*.[else].json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
9
9
  // implement command logic inside action handler
10
10
  async (host, realm, user, password, options, command) => {
11
11
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -1 +1 @@
1
- {"version":3,"file":"something-else-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-else-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something else export');\n\nprogram\n .description('Export something else.')\n .addOption(\n new Option(\n '-i, --else-id <else-id>',\n '[Else] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [else] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [else] to separate files (*.[else].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,6BAA6B,CAAC;AAE/DG,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,SAAS,CACR,IAAIN,MAAM,CACR,yBAAyB,EACzB,iDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,sDACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,sGACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"something-else-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-else-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something else export');\n\nprogram\n .description('Export something else.')\n .addOption(\n new Option(\n '-i, --else-id <else-id>',\n '[Else] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [else] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [else] to separate files (*.[else].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,6BAA6B,CAAC;AAE/DG,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,SAAS,CACR,IAAIN,MAAM,CACR,yBAAyB,EACzB,iDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,sDACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,sGACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
@@ -5,7 +5,7 @@ const {
5
5
  getTokens
6
6
  } = frodo.login;
7
7
  const program = new FrodoCommand('frodo something export');
8
- program.description('Export something.').addOption(new Option('-i, --something-id <something-id>', '[Something] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [somethings] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [somethings] to separate files (*.[something].json) in the current directory. Ignored with -i or -a.')).action(
8
+ program.description('Export something.').addOption(new Option('-i, --something-id <something-id>', '[Something] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [somethings] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [somethings] to separate files (*.[something].json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
9
9
  // implement command logic inside action handler
10
10
  async (host, realm, user, password, options, command) => {
11
11
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -1 +1 @@
1
- {"version":3,"file":"something-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something export');\n\nprogram\n .description('Export something.')\n .addOption(\n new Option(\n '-i, --something-id <something-id>',\n '[Something] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [somethings] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [somethings] to separate files (*.[something].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,wBAAwB,CAAC;AAE1DG,OAAO,CACJC,WAAW,CAAC,mBAAmB,CAAC,CAChCC,SAAS,CACR,IAAIN,MAAM,CACR,mCAAmC,EACnC,sDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,4DACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,iHACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"something-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something export');\n\nprogram\n .description('Export something.')\n .addOption(\n new Option(\n '-i, --something-id <something-id>',\n '[Something] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [somethings] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [somethings] to separate files (*.[something].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,wBAAwB,CAAC;AAE1DG,OAAO,CACJC,WAAW,CAAC,mBAAmB,CAAC,CAChCC,SAAS,CACR,IAAIN,MAAM,CACR,mCAAmC,EACnC,sDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,4DACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,iHACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
@@ -5,7 +5,7 @@ const {
5
5
  getTokens
6
6
  } = frodo.login;
7
7
  const program = new FrodoCommand('frodo something other export');
8
- program.description('Export other.').addOption(new Option('-i, --other-id <other-id>', '[Other] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [others] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [others] to separate files (*.[other].json) in the current directory. Ignored with -i or -a.')).action(
8
+ program.description('Export other.').addOption(new Option('-i, --other-id <other-id>', '[Other] id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all [others] to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all [others] to separate files (*.[other].json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
9
9
  // implement command logic inside action handler
10
10
  async (host, realm, user, password, options, command) => {
11
11
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -1 +1 @@
1
- {"version":3,"file":"something-other-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-other-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something other export');\n\nprogram\n .description('Export other.')\n .addOption(\n new Option(\n '-i, --other-id <other-id>',\n '[Other] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [others] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [others] to separate files (*.[other].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,8BAA8B,CAAC;AAEhEG,OAAO,CACJC,WAAW,CAAC,eAAe,CAAC,CAC5BC,SAAS,CACR,IAAIN,MAAM,CACR,2BAA2B,EAC3B,kDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,wDACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,yGACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"something-other-export.js","names":["frodo","Option","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","process","exitCode","parse"],"sources":["../../../src/cli/_template/something-other-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo something other export');\n\nprogram\n .description('Export other.')\n .addOption(\n new Option(\n '-i, --other-id <other-id>',\n '[Other] id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all [others] to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all [others] to separate files (*.[other].json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // code goes here\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGH,KAAK,CAACI,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,8BAA8B,CAAC;AAEhEG,OAAO,CACJC,WAAW,CAAC,eAAe,CAAC,CAC5BC,SAAS,CACR,IAAIN,MAAM,CACR,2BAA2B,EAC3B,kDACF,CACF,CAAC,CACAM,SAAS,CAAC,IAAIN,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEM,SAAS,CACR,IAAIN,MAAM,CACR,WAAW,EACX,wDACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,oBAAoB,EACpB,yGACF,CACF,CAAC,CACAM,SAAS,CACR,IAAIN,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAO,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;EAAA,CACD,MAAM;IACLa,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHZ,OAAO,CAACa,KAAK,CAAC,CAAC"}
@@ -7,7 +7,7 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo admin federation export', ['realm']);
10
- program.description('Export admin federation providers.').addOption(new Option('-i, --idp-id <idp-id>', 'Id/name of a provider. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the file to write the exported provider(s) to. Ignored with -A.')).addOption(new Option('-a, --all', 'Export all the providers to a single file. Ignored with -t and -i.')).addOption(new Option('-A, --all-separate', 'Export all the providers as separate files <provider name>.admin.federation.json. Ignored with -t, -i, and -a.')).action(
10
+ program.description('Export admin federation providers.').addOption(new Option('-i, --idp-id <idp-id>', 'Id/name of a provider. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the file to write the exported provider(s) to. Ignored with -A.')).addOption(new Option('-a, --all', 'Export all the providers to a single file. Ignored with -t and -i.')).addOption(new Option('-A, --all-separate', 'Export all the providers as separate files <provider name>.admin.federation.json. Ignored with -t, -i, and -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, user, password, options, command);
@@ -15,19 +15,19 @@ async (host, user, password, options, command) => {
15
15
  // export by id/name
16
16
  if (options.idpId) {
17
17
  verboseMessage(`Exporting provider "${options.idpId}...`);
18
- const outcome = await exportAdminFederationProviderToFile(options.idpId, options.file);
18
+ const outcome = await exportAdminFederationProviderToFile(options.idpId, options.file, options.metadata);
19
19
  if (!outcome) process.exitCode = 1;
20
20
  }
21
21
  // --all -a
22
22
  else if (options.all) {
23
23
  verboseMessage('Exporting all providers to a single file...');
24
- const outcome = await exportAdminFederationProvidersToFile(options.file);
24
+ const outcome = await exportAdminFederationProvidersToFile(options.file, options.metadata);
25
25
  if (!outcome) process.exitCode = 1;
26
26
  }
27
27
  // --all-separate -A
28
28
  else if (options.allSeparate) {
29
29
  verboseMessage('Exporting all providers to separate files...');
30
- const outcome = await exportAdminFederationProvidersToFiles();
30
+ const outcome = await exportAdminFederationProvidersToFiles(options.metadata);
31
31
  if (!outcome) process.exitCode = 1;
32
32
  }
33
33
  // unrecognized combination of options or no options
@@ -1 +1 @@
1
- {"version":3,"file":"admin-federation-export.js","names":["frodo","Option","exportAdminFederationProvidersToFile","exportAdminFederationProvidersToFiles","exportAdminFederationProviderToFile","printMessage","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","user","password","options","command","handleDefaultArgsAndOpts","idpId","outcome","file","process","exitCode","all","allSeparate","help","parse"],"sources":["../../../src/cli/admin/admin-federation-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportAdminFederationProvidersToFile,\n exportAdminFederationProvidersToFiles,\n exportAdminFederationProviderToFile,\n} from '../../ops/AdminFederationOps';\nimport { printMessage, verboseMessage } from '../../utils/Console';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo admin federation export', ['realm']);\n\nprogram\n .description('Export admin federation providers.')\n .addOption(\n new Option(\n '-i, --idp-id <idp-id>',\n 'Id/name of a provider. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the file to write the exported provider(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the providers to a single file. Ignored with -t and -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the providers as separate files <provider name>.admin.federation.json. Ignored with -t, -i, and -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(host, user, password, options, command);\n if (await getTokens(true)) {\n // export by id/name\n if (options.idpId) {\n verboseMessage(`Exporting provider \"${options.idpId}...`);\n const outcome = await exportAdminFederationProviderToFile(\n options.idpId,\n options.file\n );\n if (!outcome) process.exitCode = 1;\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all providers to a single file...');\n const outcome = await exportAdminFederationProvidersToFile(\n options.file\n );\n if (!outcome) process.exitCode = 1;\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all providers to separate files...');\n const outcome = await exportAdminFederationProvidersToFiles();\n if (!outcome) process.exitCode = 1;\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,oCAAoC,EACpCC,qCAAqC,EACrCC,mCAAmC,QAC9B,8BAA8B;AACrC,SAASC,YAAY,EAAEC,cAAc,QAAQ,qBAAqB;AAClE,SAASC,YAAY,QA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WAAW,EAAE;MAC5BpB,cAAc,CAAC,8CAA8C,CAAC;MAC9D,MAAMe,OAAO,GAAG,MAAMlB,qCAAqC,CAAC,CAAC;MAC7D,IAAI,CAACkB,OAAO,EAAEE,OAAO,CAACC,QAAQ,GAAG,CAAC;IACpC;IACA;IAAA,KACK;MACHnB,YAAY,CACV,sDAAsD,EACtD,OACF,CAAC;MACDK,OAAO,CAACiB,IAAI,CAAC,CAAC;MACdJ,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHd,OAAO,CAACkB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"admin-federation-export.js","names":["frodo","Option","exportAdminFederationProvidersToFile","exportAdminFederationProvidersToFiles","exportAdminFederationProviderToFile","printMessage","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","user","password","options","command","handleDefaultArgsAndOpts","idpId","outcome","file","metadata","process","exitCode","all","allSeparate","help","parse"],"sources":["../../../src/cli/admin/admin-federation-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportAdminFederationProvidersToFile,\n exportAdminFederationProvidersToFiles,\n exportAdminFederationProviderToFile,\n} from '../../ops/AdminFederationOps';\nimport { printMessage, verboseMessage } from '../../utils/Console';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo admin federation export', ['realm']);\n\nprogram\n .description('Export admin federation providers.')\n .addOption(\n new Option(\n '-i, --idp-id <idp-id>',\n 'Id/name of a provider. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the file to write the exported provider(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the providers to a single file. Ignored with -t and -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the providers as separate files <provider name>.admin.federation.json. Ignored with -t, -i, and -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(host, user, password, options, command);\n if (await getTokens(true)) {\n // export by id/name\n if (options.idpId) {\n verboseMessage(`Exporting provider \"${options.idpId}...`);\n const outcome = await exportAdminFederationProviderToFile(\n options.idpId,\n options.file,\n options.metadata\n );\n if (!outcome) process.exitCode = 1;\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all providers to a single file...');\n const outcome = await exportAdminFederationProvidersToFile(\n options.file,\n options.metadata\n );\n if (!outcome) process.exitCode = 1;\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all providers to separate files...');\n const outcome = await exportAdminFederationProvidersToFiles(\n options.metadata\n );\n if (!outcome) process.exitCode = 1;\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,oCAAoC,EACpCC,qCAAqC,EACrCC,mCAAmC,QAC9B,8BAA8B;AACrC,SAASC,YAAY,EAAEC,cAAc,QAAQ,qBAAqB;AAClE,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGR,KAAK,CAACS,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,+BAA+B,EAAE,CAAC,OAAO,CAAC,CAAC;AAE5EG,OAAO,CACJC,WAAW,CAAC,oCAAoC,CAAC,CACjDC,SAAS,CACR,IAAIX,MAAM,CACR,uBAAuB,EACvB,6DACF,CACF,CAAC,CACAW,SAAS,CACR,IAAIX,MAAM,CACR,mBAAmB,EACnB,yEACF,CACF,CAAC,CACAW,SAAS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tD,OACF,CAAC;MACDK,OAAO,CAACkB,IAAI,CAAC,CAAC;MACdJ,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHf,OAAO,CAACmB,KAAK,CAAC,CAAC"}
@@ -7,7 +7,7 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo agent export');
10
- program.description('Export agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all agents to separate files (*.<type>.agent.json) in the current directory. Ignored with -i or -a.')).action(
10
+ program.description('Export agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all agents to separate files (*.<type>.agent.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -15,17 +15,17 @@ async (host, realm, user, password, options, command) => {
15
15
  // export
16
16
  if (options.agentId) {
17
17
  verboseMessage('Exporting agent...');
18
- await exportAgentToFile(options.agentId, options.file);
18
+ await exportAgentToFile(options.agentId, options.file, options.metadata);
19
19
  }
20
20
  // --all -a
21
21
  else if (options.all) {
22
22
  verboseMessage('Exporting all agents to a single file...');
23
- await exportAgentsToFile(options.file);
23
+ await exportAgentsToFile(options.file, options.metadata);
24
24
  }
25
25
  // --all-separate -A
26
26
  else if (options.allSeparate) {
27
27
  verboseMessage('Exporting all agents to separate files...');
28
- await exportAgentsToFiles();
28
+ await exportAgentsToFiles(options.metadata);
29
29
  }
30
30
  // unrecognized combination of options or no options
31
31
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-export.js","names":["frodo","Option","exportAgentsToFile","exportAgentsToFiles","exportAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportAgentsToFile,\n exportAgentsToFiles,\n exportAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent export');\n\nprogram\n .description('Export agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all agents to separate files (*.<type>.agent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting agent...');\n await exportAgentToFile(options.agentId, options.file);\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all agents to a single file...');\n await exportAgentsToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all agents to separate files...');\n await exportAgentsToFiles();\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram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AAIJ,OAAO,CAACM,WAAW,EAAE;MAC5BlB,cAAc,CAAC,2CAA2C,CAAC;MAC3D,MAAMF,mBAAmB,CAAC,CAAC;IAC7B;IACA;IAAA,KACK;MACHE,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACe,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHjB,OAAO,CAACkB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-export.js","names":["frodo","Option","exportAgentsToFile","exportAgentsToFiles","exportAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","metadata","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportAgentsToFile,\n exportAgentsToFiles,\n exportAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent export');\n\nprogram\n .description('Export agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all agents to separate files (*.<type>.agent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting agent...');\n await exportAgentToFile(\n options.agentId,\n options.file,\n options.metadata\n );\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all agents to a single file...');\n await exportAgentsToFile(options.file, options.metadata);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all agents to separate files...');\n await exportAgentsToFiles(options.metadata);\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,iBAAiB,QACZ,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,oBAAoB,CAAC;AAEtDG,OAAO,CACJC,WAAW,CAAC,gBAAgB,CAAC,CAC7BC,SAAS,CACR,IAAIV,MAAM,CACR,2BAA2B,EAC3B,gDACF,CACF,CAAC,CACAU,SAAS,CAAC,IAAIV,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEU,SAAS,CACR,IAAIV,MAAM,CACR,WAAW,EACX,sDACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,oBAAoB,EACpB,4GACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;IACA,IAAIU,OAAO,CAACG,OAAO,EAAE;MACnBf,cAAc,CAAC,oBAAoB,CAAC;MACpC,MAAMD,iBAAiB,CACrBa,OAAO,CAACG,OAAO,EACfH,OAAO,CAACI,IAAI,EACZJ,OAAO,CAACK,QACV,CAAC;IACH;IACA;IAAA,KACK,IAAIL,OAAO,CAACM,GAAG,EAAE;MACpBlB,cAAc,CAAC,0CAA0C,CAAC;MAC1D,MAAMH,kBAAkB,CAACe,OAAO,CAACI,IAAI,EAAEJ,OAAO,CAACK,QAAQ,CAAC;IAC1D;IACA;IAAA,KACK,IAAIL,OAAO,CAACO,WAAW,EAAE;MAC5BnB,cAAc,CAAC,2CAA2C,CAAC;MAC3D,MAAMF,mBAAmB,CAACc,OAAO,CAACK,QAAQ,CAAC;IAC7C;IACA;IAAA,KACK;MACHjB,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACgB,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHlB,OAAO,CAACmB,KAAK,CAAC,CAAC"}
@@ -7,7 +7,7 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo agent gateway export');
10
- program.description('Export gateway agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all gateway agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all gateway agents to separate files (*.identitygatewayagent.json) in the current directory. Ignored with -i or -a.')).action(
10
+ program.description('Export gateway agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all gateway agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all gateway agents to separate files (*.identitygatewayagent.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -15,17 +15,17 @@ async (host, realm, user, password, options, command) => {
15
15
  // export
16
16
  if (options.agentId) {
17
17
  verboseMessage('Exporting identity gateway agent...');
18
- await exportIdentityGatewayAgentToFile(options.agentId, options.file);
18
+ await exportIdentityGatewayAgentToFile(options.agentId, options.file, options.metadata);
19
19
  }
20
20
  // --all -a
21
21
  else if (options.all) {
22
22
  verboseMessage('Exporting all identity gateway agents to a single file...');
23
- await exportIdentityGatewayAgentsToFile(options.file);
23
+ await exportIdentityGatewayAgentsToFile(options.file, options.metadata);
24
24
  }
25
25
  // --all-separate -A
26
26
  else if (options.allSeparate) {
27
27
  verboseMessage('Exporting all identity gateway agents to separate files...');
28
- await exportIdentityGatewayAgentsToFiles();
28
+ await exportIdentityGatewayAgentsToFiles(options.metadata);
29
29
  }
30
30
  // unrecognized combination of options or no options
31
31
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-gateway-export.js","names":["frodo","Option","exportIdentityGatewayAgentsToFile","exportIdentityGatewayAgentsToFiles","exportIdentityGatewayAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-gateway-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportIdentityGatewayAgentsToFile,\n exportIdentityGatewayAgentsToFiles,\n exportIdentityGatewayAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent gateway export');\n\nprogram\n .description('Export gateway agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all gateway agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all gateway agents to separate files (*.identitygatewayagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting identity gateway agent...');\n await exportIdentityGatewayAgentToFile(options.agentId, options.file);\n }\n // --all -a\n else if (options.all) {\n verboseMessage(\n 'Exporting all identity gateway agents to a single file...'\n );\n await exportIdentityGatewayAgentsToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage(\n 'Exporting all identity gateway agents to separate files...'\n );\n await exportIdentityGatewayAgentsToFiles();\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,iCAAiC,EACjCC,kCAAkC,EAClCC,gCAAgC,QAC3B,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,4BAA4B,CAAC;AAE9DG,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,SAAS,CACR,IAAIV,MAAM,CACR,2BAA2B,EAC3B,gDACF,CACF,CAAC,CACAU,SAAS,CAAC,IAAIV,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEU,SAAS,CACR,IAAIV,MAAM,CACR,WAAW,EACX,8DACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,oBAAoB,EACpB,4HACF,CACF,CAAC,CACAW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;IACA,IAAIU,OAAO,CAACG,OAAO,EAAE;MACnBf,cAAc,CAAC,qCAAqC,CAAC;MACrD,MAAMD,gCAAgC,CAACa,OAAO,CAACG,OAAO,EAAEH,OAAO,CAACI,IAAI,CAAC;IACvE;IACA;IAAA,KACK,IAAIJ,OAAO,CAACK,GAAG,EAAE;MACpBjB,cAAc,CACZ,2DACF,CAAC;MACD,MAAMH,iCAAiC,CAACe,OAAO,CAACI,IAAI,CAAC;IACvD;IACA;IAAA,KACK,IAAIJ,OAAO,CAACM,WAAW,EAAE;MAC5BlB,cAAc,CACZ,4DACF,CAAC;MACD,MAAMF,kCAAkC,CAAC,CAAC;IAC5C;IACA;IAAA,KACK;MACHE,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACe,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHjB,OAAO,CAACkB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-gateway-export.js","names":["frodo","Option","exportIdentityGatewayAgentsToFile","exportIdentityGatewayAgentsToFiles","exportIdentityGatewayAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","metadata","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-gateway-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportIdentityGatewayAgentsToFile,\n exportIdentityGatewayAgentsToFiles,\n exportIdentityGatewayAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent gateway export');\n\nprogram\n .description('Export gateway agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all gateway agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all gateway agents to separate files (*.identitygatewayagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting identity gateway agent...');\n await exportIdentityGatewayAgentToFile(\n options.agentId,\n options.file,\n options.metadata\n );\n }\n // --all -a\n else if (options.all) {\n verboseMessage(\n 'Exporting all identity gateway agents to a single file...'\n );\n await exportIdentityGatewayAgentsToFile(\n options.file,\n options.metadata\n );\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage(\n 'Exporting all identity gateway agents to separate files...'\n );\n await exportIdentityGatewayAgentsToFiles(options.metadata);\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,iCAAiC,EACjCC,kCAAkC,EAClCC,gCAAgC,QAC3B,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,4BAA4B,CAAC;AAE9DG,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,SAAS,CACR,IAAIV,MAAM,CACR,2BAA2B,EAC3B,gDACF,CACF,CAAC,CACAU,SAAS,CAAC,IAAIV,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEU,SAAS,CACR,IAAIV,MAAM,CACR,WAAW,EACX,8DACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,oBAAoB,EACpB,4HACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;IACA,IAAIU,OAAO,CAACG,OAAO,EAAE;MACnBf,cAAc,CAAC,qCAAqC,CAAC;MACrD,MAAMD,gCAAgC,CACpCa,OAAO,CAACG,OAAO,EACfH,OAAO,CAACI,IAAI,EACZJ,OAAO,CAACK,QACV,CAAC;IACH;IACA;IAAA,KACK,IAAIL,OAAO,CAACM,GAAG,EAAE;MACpBlB,cAAc,CACZ,2DACF,CAAC;MACD,MAAMH,iCAAiC,CACrCe,OAAO,CAACI,IAAI,EACZJ,OAAO,CAACK,QACV,CAAC;IACH;IACA;IAAA,KACK,IAAIL,OAAO,CAACO,WAAW,EAAE;MAC5BnB,cAAc,CACZ,4DACF,CAAC;MACD,MAAMF,kCAAkC,CAACc,OAAO,CAACK,QAAQ,CAAC;IAC5D;IACA;IAAA,KACK;MACHjB,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACgB,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHlB,OAAO,CAACmB,KAAK,CAAC,CAAC"}
@@ -7,7 +7,7 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo agent java export');
10
- program.description('Export java agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all java agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all java agents to separate files (*.javaagent.json) in the current directory. Ignored with -i or -a.')).action(
10
+ program.description('Export java agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all java agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all java agents to separate files (*.javaagent.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -15,17 +15,17 @@ async (host, realm, user, password, options, command) => {
15
15
  // export
16
16
  if (options.agentId) {
17
17
  verboseMessage('Exporting java agent...');
18
- await exportJavaAgentToFile(options.agentId, options.file);
18
+ await exportJavaAgentToFile(options.agentId, options.file, options.metadata);
19
19
  }
20
20
  // --all -a
21
21
  else if (options.all) {
22
22
  verboseMessage('Exporting all java agents to a single file...');
23
- await exportJavaAgentsToFile(options.file);
23
+ await exportJavaAgentsToFile(options.file, options.metadata);
24
24
  }
25
25
  // --all-separate -A
26
26
  else if (options.allSeparate) {
27
27
  verboseMessage('Exporting all java agents to separate files...');
28
- await exportJavaAgentsToFiles();
28
+ await exportJavaAgentsToFiles(options.metadata);
29
29
  }
30
30
  // unrecognized combination of options or no options
31
31
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-java-export.js","names":["frodo","Option","exportJavaAgentsToFile","exportJavaAgentsToFiles","exportJavaAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-java-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportJavaAgentsToFile,\n exportJavaAgentsToFiles,\n exportJavaAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent java export');\n\nprogram\n .description('Export java agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all java agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all java agents to separate files (*.javaagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting java agent...');\n await exportJavaAgentToFile(options.agentId, options.file);\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all java agents to a single file...');\n await exportJavaAgentsToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all java agents to separate files...');\n await exportJavaAgentsToFiles();\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,qBAAqB,QAChB,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,yBAAyB,CAAC;AAE3DG,OAAO,CACJC,WAAW,CAAC,qBAAqB,CAAC,CAClCC,SAAS,CACR,IAAIV,MAAM,CACR,2BAA2B,EAC3B,gDACF,CACF,CAAC,CACAU,SAAS,CAAC,IAAIV,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEU,SAAS,CACR,IAAIV,MAAM,CACR,WAAW,EACX,2DACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,oBAAoB,EACpB,8GACF,CACF,CAAC,CACAW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;IACA,IAAIU,OAAO,CAACG,OAAO,EAAE;MACnBf,cAAc,CAAC,yBAAyB,CAAC;MACzC,MAAMD,qBAAqB,CAACa,OAAO,CAACG,OAAO,EAAEH,OAAO,CAACI,IAAI,CAAC;IAC5D;IACA;IAAA,KACK,IAAIJ,OAAO,CAACK,GAAG,EAAE;MACpBjB,cAAc,CAAC,+CAA+C,CAAC;MAC/D,MAAMH,sBAAsB,CAACe,OAAO,CAACI,IAAI,CAAC;IAC5C;IACA;IAAA,KACK,IAAIJ,OAAO,CAACM,WAAW,EAAE;MAC5BlB,cAAc,CAAC,gDAAgD,CAAC;MAChE,MAAMF,uBAAuB,CAAC,CAAC;IACjC;IACA;IAAA,KACK;MACHE,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACe,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHjB,OAAO,CAACkB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-java-export.js","names":["frodo","Option","exportJavaAgentsToFile","exportJavaAgentsToFiles","exportJavaAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","metadata","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-java-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportJavaAgentsToFile,\n exportJavaAgentsToFiles,\n exportJavaAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent java export');\n\nprogram\n .description('Export java agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all java agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all java agents to separate files (*.javaagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting java agent...');\n await exportJavaAgentToFile(\n options.agentId,\n options.file,\n options.metadata\n );\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all java agents to a single file...');\n await exportJavaAgentsToFile(options.file, options.metadata);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all java agents to separate files...');\n await exportJavaAgentsToFiles(options.metadata);\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,qBAAqB,QAChB,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,yBAAyB,CAAC;AAE3DG,OAAO,CACJC,WAAW,CAAC,qBAAqB,CAAC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AACF,CAAC;;AAEHlB,OAAO,CAACmB,KAAK,CAAC,CAAC"}
@@ -7,7 +7,7 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo agent web export');
10
- program.description('Export web agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all web agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all web agents to separate files (*.webagent.json) in the current directory. Ignored with -i or -a.')).action(
10
+ program.description('Export web agents.').addOption(new Option('-i, --agent-id <agent-id>', 'Agent id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all web agents to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all web agents to separate files (*.webagent.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
@@ -15,17 +15,17 @@ async (host, realm, user, password, options, command) => {
15
15
  // export
16
16
  if (options.agentId) {
17
17
  verboseMessage('Exporting web agent...');
18
- await exportWebAgentToFile(options.agentId, options.file);
18
+ await exportWebAgentToFile(options.agentId, options.file, options.metadata);
19
19
  }
20
20
  // --all -a
21
21
  else if (options.all) {
22
22
  verboseMessage('Exporting all web agents to a single file...');
23
- await exportWebAgentsToFile(options.file);
23
+ await exportWebAgentsToFile(options.file, options.metadata);
24
24
  }
25
25
  // --all-separate -A
26
26
  else if (options.allSeparate) {
27
27
  verboseMessage('Exporting all web agents to separate files...');
28
- await exportWebAgentsToFiles();
28
+ await exportWebAgentsToFiles(options.metadata);
29
29
  }
30
30
  // unrecognized combination of options or no options
31
31
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-web-export.js","names":["frodo","Option","exportWebAgentsToFile","exportWebAgentsToFiles","exportWebAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-web-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportWebAgentsToFile,\n exportWebAgentsToFiles,\n exportWebAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent web export');\n\nprogram\n .description('Export web agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all web agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all web agents to separate files (*.webagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting web agent...');\n await exportWebAgentToFile(options.agentId, options.file);\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all web agents to a single file...');\n await exportWebAgentsToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all web agents to separate files...');\n await exportWebAgentsToFiles();\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,S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C,CAAC;MAC/D,MAAMF,sBAAsB,CAAC,CAAC;IAChC;IACA;IAAA,KACK;MACHE,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACe,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHjB,OAAO,CAACkB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-web-export.js","names":["frodo","Option","exportWebAgentsToFile","exportWebAgentsToFiles","exportWebAgentToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","agentId","file","metadata","all","allSeparate","help","process","exitCode","parse"],"sources":["../../../src/cli/agent/agent-web-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport {\n exportWebAgentsToFile,\n exportWebAgentsToFiles,\n exportWebAgentToFile,\n} from '../../ops/AgentOps.js';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo agent web export');\n\nprogram\n .description('Export web agents.')\n .addOption(\n new Option(\n '-i, --agent-id <agent-id>',\n 'Agent id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all web agents to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all web agents to separate files (*.webagent.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n // export\n if (options.agentId) {\n verboseMessage('Exporting web agent...');\n await exportWebAgentToFile(\n options.agentId,\n options.file,\n options.metadata\n );\n }\n // --all -a\n else if (options.all) {\n verboseMessage('Exporting all web agents to a single file...');\n await exportWebAgentsToFile(options.file, options.metadata);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n verboseMessage('Exporting all web agents to separate files...');\n await exportWebAgentsToFiles(options.metadata);\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage(\n 'Unrecognized combination of options or no options...'\n );\n program.help();\n process.exitCode = 1;\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,oBAAoB,QACf,uBAAuB;AAC9B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,wBAAwB,CAAC;AAE1DG,OAAO,CACJC,WAAW,CAAC,oBAAoB,CAAC,CACjCC,SAAS,CACR,IAAIV,MAAM,CACR,2BAA2B,EAC3B,gDACF,CACF,CAAC,CACAU,SAAS,CAAC,IAAIV,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEU,SAAS,CACR,IAAIV,MAAM,CACR,WAAW,EACX,0DACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,oBAAoB,EACpB,4GACF,CACF,CAAC,CACAU,SAAS,CACR,IAAIV,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrB;IACA,IAAIU,OAAO,CAACG,OAAO,EAAE;MACnBf,cAAc,CAAC,wBAAwB,CAAC;MACxC,MAAMD,oBAAoB,CACxBa,OAAO,CAACG,OAAO,EACfH,OAAO,CAACI,IAAI,EACZJ,OAAO,CAACK,QACV,CAAC;IACH;IACA;IAAA,KACK,IAAIL,OAAO,CAACM,GAAG,EAAE;MACpBlB,cAAc,CAAC,8CAA8C,CAAC;MAC9D,MAAMH,qBAAqB,CAACe,OAAO,CAACI,IAAI,EAAEJ,OAAO,CAACK,QAAQ,CAAC;IAC7D;IACA;IAAA,KACK,IAAIL,OAAO,CAACO,WAAW,EAAE;MAC5BnB,cAAc,CAAC,+CAA+C,CAAC;MAC/D,MAAMF,sBAAsB,CAACc,OAAO,CAACK,QAAQ,CAAC;IAChD;IACA;IAAA,KACK;MACHjB,cAAc,CACZ,sDACF,CAAC;MACDI,OAAO,CAACgB,IAAI,CAAC,CAAC;MACdC,OAAO,CAACC,QAAQ,GAAG,CAAC;IACtB;EACF;AACF;AACA;AACF,CAAC;;AAEHlB,OAAO,CAACmB,KAAK,CAAC,CAAC"}
@@ -8,14 +8,14 @@ const {
8
8
  getTokens
9
9
  } = frodo.login;
10
10
  const program = new FrodoCommand('frodo app export');
11
- program.description('Export applications.').addOption(new Option('-i, --app-id <app-id>', 'Application name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all applications to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all applications to separate files (*.application.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts).')).addHelpText('after', `Important Note:\n`['brightYellow'] + ` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` + ` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` + `Usage Examples:\n` + ` Export all applications to a single export file with an auto-generated filename using a connection profile:\n` + ` $ frodo app export -a ${s.connId}\n`['brightCyan'] + ` Export the first application to a single export file with a custom filename:\n` + ` $ frodo app export -f ./allMyApplications.application.json ${s.connId}\n`['brightCyan'] + ` Export all applications to separate export files with an auto-generated filenames:\n` + ` $ frodo app export -A ${s.connId}\n`['brightCyan'] + ` Export all applications without dependencies to a single export file:\n` + ` $ frodo app export --no-deps -a ${s.connId}\n`['brightCyan'] + ` Export the application 'myApp' to a file with an auto-generated filename of 'myApp.application.json':\n` + ` $ frodo app export -i myApp ${s.connId}\n`['brightCyan']).action(
11
+ program.description('Export applications.').addOption(new Option('-i, --app-id <app-id>', 'Application name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export all applications to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all applications to separate files (*.application.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts).')).addHelpText('after', `Important Note:\n`['brightYellow'] + ` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` + ` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` + `Usage Examples:\n` + ` Export all applications to a single export file with an auto-generated filename using a connection profile:\n` + ` $ frodo app export -a ${s.connId}\n`['brightCyan'] + ` Export the first application to a single export file with a custom filename:\n` + ` $ frodo app export -f ./allMyApplications.application.json ${s.connId}\n`['brightCyan'] + ` Export all applications to separate export files with an auto-generated filenames:\n` + ` $ frodo app export -A ${s.connId}\n`['brightCyan'] + ` Export all applications without dependencies to a single export file:\n` + ` $ frodo app export --no-deps -a ${s.connId}\n`['brightCyan'] + ` Export the application 'myApp' to a file with an auto-generated filename of 'myApp.application.json':\n` + ` $ frodo app export -i myApp ${s.connId}\n`['brightCyan']).action(
12
12
  // implement command logic inside action handler
13
13
  async (host, realm, user, password, options, command) => {
14
14
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
15
15
  // export
16
16
  if (options.appId && (await getTokens())) {
17
17
  verboseMessage('Exporting application...');
18
- const status = await exportApplicationToFile(options.appId, options.file, {
18
+ const status = await exportApplicationToFile(options.appId, options.file, options.metadata, {
19
19
  useStringArrays: true,
20
20
  deps: options.deps
21
21
  });
@@ -24,7 +24,7 @@ async (host, realm, user, password, options, command) => {
24
24
  // -a/--all
25
25
  else if (options.all && (await getTokens())) {
26
26
  verboseMessage('Exporting all applications to file...');
27
- const status = await exportApplicationsToFile(options.file, {
27
+ const status = await exportApplicationsToFile(options.file, options.metadata, {
28
28
  useStringArrays: true,
29
29
  deps: options.deps
30
30
  });
@@ -33,7 +33,7 @@ async (host, realm, user, password, options, command) => {
33
33
  // -A/--all-separate
34
34
  else if (options.allSeparate && (await getTokens())) {
35
35
  verboseMessage('Exporting all applications to separate files...');
36
- const status = await exportApplicationsToFiles({
36
+ const status = await exportApplicationsToFiles(options.metadata, {
37
37
  useStringArrays: true,
38
38
  deps: options.deps
39
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"app-export.js","names":["frodo","Option","s","exportApplicationsToFile","exportApplicationsToFiles","exportApplicationToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","addHelpText","connId","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","appId","status","file","useStringArrays","deps","process","exitCode","all","allSeparate","help","parse"],"sources":["../../../src/cli/app/app-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport * as s from '../../help/SampleData';\nimport {\n exportApplicationsToFile,\n exportApplicationsToFiles,\n exportApplicationToFile,\n} from '../../ops/ApplicationOps';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo app export');\n\nprogram\n .description('Export applications.')\n .addOption(\n new Option(\n '-i, --app-id <app-id>',\n 'Application name. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all applications to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all applications to separate files (*.application.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option('--no-deps', 'Do not include any dependencies (scripts).')\n )\n .addHelpText(\n 'after',\n `Important Note:\\n`['brightYellow'] +\n ` The ${\n 'frodo app'['brightCyan']\n } command to manage OAuth2 clients in v1.x has been renamed to ${\n 'frodo oauth client'['brightCyan']\n } in v2.x\\n` +\n ` The ${\n 'frodo app'['brightCyan']\n } command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${\n 'frodo oauth client'['brightCyan']\n } command.\\n\\n` +\n `Usage Examples:\\n` +\n ` Export all applications to a single export file with an auto-generated filename using a connection profile:\\n` +\n ` $ frodo app export -a ${s.connId}\\n`['brightCyan'] +\n ` Export the first application to a single export file with a custom filename:\\n` +\n ` $ frodo app export -f ./allMyApplications.application.json ${s.connId}\\n`[\n 'brightCyan'\n ] +\n ` Export all applications to separate export files with an auto-generated filenames:\\n` +\n ` $ frodo app export -A ${s.connId}\\n`['brightCyan'] +\n ` Export all applications without dependencies to a single export file:\\n` +\n ` $ frodo app export --no-deps -a ${s.connId}\\n`['brightCyan'] +\n ` Export the application 'myApp' to a file with an auto-generated filename of 'myApp.application.json':\\n` +\n ` $ frodo app export -i myApp ${s.connId}\\n`['brightCyan']\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n // export\n if (options.appId && (await getTokens())) {\n verboseMessage('Exporting application...');\n const status = await exportApplicationToFile(\n options.appId,\n options.file,\n {\n useStringArrays: true,\n deps: options.deps,\n }\n );\n if (!status) process.exitCode = 1;\n }\n // -a/--all\n else if (options.all && (await getTokens())) {\n verboseMessage('Exporting all applications to file...');\n const status = await exportApplicationsToFile(options.file, {\n useStringArrays: true,\n deps: options.deps,\n });\n if (!status) process.exitCode = 1;\n }\n // -A/--all-separate\n else if (options.allSeparate && (await getTokens())) {\n verboseMessage('Exporting all applications to separate files...');\n const status = await exportApplicationsToFiles({\n useStringArrays: true,\n deps: options.deps,\n });\n if (!status) process.exitCode = 1;\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage('Unrecognized combination of options or no options...');\n program.help();\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,KAAKC,CAAC,MAAM,uBAAuB;AAC1C,SACEC,wBAAwB,EACxBC,yBAAyB,EACzBC,uBAAuB,QAClB,0BAA0B;AACjC,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGR,KAAK,CAACS,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,kBAAkB,CAAC;AAEpDG,OAAO,CACJC,WAAW,CAAC,sBAAsB,CAAC,CACnCC,SAAS,CACR,IAAIX,MAAM,CACR,uBAAuB,EACvB,wDACF,CACF,CAAC,CACAW,SAAS,CAAC,IAAIX,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEW,SAAS,CACR,IAAIX,MAAM,CACR,WAAW,EACX,4DACF,CACF,CAAC,CACAW,SAAS,CACR,IAAIX,MAAM,CACR,oBAAoB,EACpB,iHACF,C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ACnC;EACA;EAAA,KACK,IAAIT,OAAO,CAACU,GAAG,KAAK,MAAMtB,SAAS,CAAC,CAAC,CAAC,EAAE;IAC3CF,cAAc,CAAC,uCAAuC,CAAC;IACvD,MAAMkB,MAAM,GAAG,MAAMrB,wBAAwB,CAACiB,OAAO,CAACK,IAAI,EAAE;MAC1DC,eAAe,EAAE,IAAI;MACrBC,IAAI,EAAEP,OAAO,CAACO;IAChB,CAAC,CAAC;IACF,IAAI,CAACH,MAAM,EAAEI,OAAO,CAACC,QAAQ,GAAG,CAAC;EACnC;EACA;EAAA,KACK,IAAIT,OAAO,CAACW,WAAW,KAAK,MAAMvB,SAAS,CAAC,CAAC,CAAC,EAAE;IACnDF,cAAc,CAAC,iDAAiD,CAAC;IACjE,MAAMkB,MAAM,GAAG,MAAMpB,yBAAyB,CAAC;MAC7CsB,eAAe,EAAE,IAAI;MACrBC,IAAI,EAAEP,OAAO,CAACO;IAChB,CAAC,CAAC;IACF,IAAI,CAACH,MAAM,EAAEI,OAAO,CAACC,QAAQ,GAAG,CAAC;EACnC;EACA;EAAA,KACK;IACHvB,cAAc,CAAC,sDAAsD,CAAC;IACtEI,OAAO,CAACsB,IAAI,CAAC,CAAC;IACdJ,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHnB,OAAO,CAACuB,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"app-export.js","names":["frodo","Option","s","exportApplicationsToFile","exportApplicationsToFiles","exportApplicationToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","addHelpText","connId","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","appId","status","file","metadata","useStringArrays","deps","process","exitCode","all","allSeparate","help","parse"],"sources":["../../../src/cli/app/app-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport * as s from '../../help/SampleData';\nimport {\n exportApplicationsToFile,\n exportApplicationsToFiles,\n exportApplicationToFile,\n} from '../../ops/ApplicationOps';\nimport { verboseMessage } from '../../utils/Console.js';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo app export');\n\nprogram\n .description('Export applications.')\n .addOption(\n new Option(\n '-i, --app-id <app-id>',\n 'Application name. If specified, -a and -A are ignored.'\n )\n )\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-a, --all',\n 'Export all applications to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all applications to separate files (*.application.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .addOption(\n new Option('--no-deps', 'Do not include any dependencies (scripts).')\n )\n .addHelpText(\n 'after',\n `Important Note:\\n`['brightYellow'] +\n ` The ${\n 'frodo app'['brightCyan']\n } command to manage OAuth2 clients in v1.x has been renamed to ${\n 'frodo oauth client'['brightCyan']\n } in v2.x\\n` +\n ` The ${\n 'frodo app'['brightCyan']\n } command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${\n 'frodo oauth client'['brightCyan']\n } command.\\n\\n` +\n `Usage Examples:\\n` +\n ` Export all applications to a single export file with an auto-generated filename using a connection profile:\\n` +\n ` $ frodo app export -a ${s.connId}\\n`['brightCyan'] +\n ` Export the first application to a single export file with a custom filename:\\n` +\n ` $ frodo app export -f ./allMyApplications.application.json ${s.connId}\\n`[\n 'brightCyan'\n ] +\n ` Export all applications to separate export files with an auto-generated filenames:\\n` +\n ` $ frodo app export -A ${s.connId}\\n`['brightCyan'] +\n ` Export all applications without dependencies to a single export file:\\n` +\n ` $ frodo app export --no-deps -a ${s.connId}\\n`['brightCyan'] +\n ` Export the application 'myApp' to a file with an auto-generated filename of 'myApp.application.json':\\n` +\n ` $ frodo app export -i myApp ${s.connId}\\n`['brightCyan']\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n // export\n if (options.appId && (await getTokens())) {\n verboseMessage('Exporting application...');\n const status = await exportApplicationToFile(\n options.appId,\n options.file,\n options.metadata,\n {\n useStringArrays: true,\n deps: options.deps,\n }\n );\n if (!status) process.exitCode = 1;\n }\n // -a/--all\n else if (options.all && (await getTokens())) {\n verboseMessage('Exporting all applications to file...');\n const status = await exportApplicationsToFile(\n options.file,\n options.metadata,\n {\n useStringArrays: true,\n deps: options.deps,\n }\n );\n if (!status) process.exitCode = 1;\n }\n // -A/--all-separate\n else if (options.allSeparate && (await getTokens())) {\n verboseMessage('Exporting all applications to separate files...');\n const status = await exportApplicationsToFiles(options.metadata, {\n useStringArrays: true,\n deps: options.deps,\n });\n if (!status) process.exitCode = 1;\n }\n // unrecognized combination of options or no options\n else {\n verboseMessage('Unrecognized combination of options or no options...');\n program.help();\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,KAAKC,CAAC,MAAM,uBAAuB;AAC1C,SACEC,wBAAwB,EACxBC,yBAAyB,EACzBC,uBAAuB,QAClB,0BAA0B;AACjC,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGR,KAAK,CAACS,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,kBAAkB,CAAC;AAEpDG,OAAO,CACJC,WAAW,CAAC,sBAAsB,CAAC,CACnCC,SAAS,CACR,IAAIX,MAAM,CACR,uBAAuB,EACvB,wDACF,CACF,CAAC,CACAW,SAAS,CAAC,IAAIX,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEW,SAAS,CACR,IAAIX,MAAM,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,CAACK,IAAI,EACZL,OAAO,CAACM,QAAQ,EAChB;MACEC,eAAe,EAAE,IAAI;MACrBC,IAAI,EAAER,OAAO,CAACQ;IAChB,CACF,CAAC;IACD,IAAI,CAACJ,MAAM,EAAEK,OAAO,CAACC,QAAQ,GAAG,CAAC;EACnC;EACA;EAAA,KACK,IAAIV,OAAO,CAACW,GAAG,KAAK,MAAMvB,SAAS,CAAC,CAAC,CAAC,EAAE;IAC3CF,cAAc,CAAC,uCAAuC,CAAC;IACvD,MAAMkB,MAAM,GAAG,MAAMrB,wBAAwB,CAC3CiB,OAAO,CAACK,IAAI,EACZL,OAAO,CAACM,QAAQ,EAChB;MACEC,eAAe,EAAE,IAAI;MACrBC,IAAI,EAAER,OAAO,CAACQ;IAChB,CACF,CAAC;IACD,IAAI,CAACJ,MAAM,EAAEK,OAAO,CAACC,QAAQ,GAAG,CAAC;EACnC;EACA;EAAA,KACK,IAAIV,OAAO,CAACY,WAAW,KAAK,MAAMxB,SAAS,CAAC,CAAC,CAAC,EAAE;IACnDF,cAAc,CAAC,iDAAiD,CAAC;IACjE,MAAMkB,MAAM,GAAG,MAAMpB,yBAAyB,CAACgB,OAAO,CAACM,QAAQ,EAAE;MAC/DC,eAAe,EAAE,IAAI;MACrBC,IAAI,EAAER,OAAO,CAACQ;IAChB,CAAC,CAAC;IACF,IAAI,CAACJ,MAAM,EAAEK,OAAO,CAACC,QAAQ,GAAG,CAAC;EACnC;EACA;EAAA,KACK;IACHxB,cAAc,CAAC,sDAAsD,CAAC;IACtEI,OAAO,CAACuB,IAAI,CAAC,CAAC;IACdJ,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHpB,OAAO,CAACwB,KAAK,CAAC,CAAC"}
@@ -7,13 +7,13 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo authn export');
10
- program.description('Export authentication settings.').addOption(new Option('-f, --file <file>', 'Name of the export file.')).action(
10
+ program.description('Export authentication settings.').addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
14
14
  if (await getTokens()) {
15
15
  verboseMessage('Exporting authentication settings to file...');
16
- const outcome = exportAuthenticationSettingsToFile(options.file);
16
+ const outcome = exportAuthenticationSettingsToFile(options.file, options.metadata);
17
17
  if (!outcome) process.exitCode = 1;
18
18
  } else {
19
19
  process.exitCode = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"authn-export.js","names":["frodo","Option","exportAuthenticationSettingsToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","outcome","file","process","exitCode","parse"],"sources":["../../../src/cli/authn/authn-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { exportAuthenticationSettingsToFile } from '../../ops/AuthenticationSettingsOps';\nimport { verboseMessage } from '../../utils/Console';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo authn export');\n\nprogram\n .description('Export authentication settings.')\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n verboseMessage('Exporting authentication settings to file...');\n const outcome = exportAuthenticationSettingsToFile(options.file);\n if (!outcome) process.exitCode = 1;\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,kCAAkC,QAAQ,qCAAqC;AACxF,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGL,KAAK,CAACM,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,oBAAoB,CAAC;AAEtDG,OAAO,CACJC,WAAW,CAAC,iCAAiC,CAAC,CAC9CC,SAAS,CAAC,IAAIR,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtES,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrBF,cAAc,CAAC,8CAA8C,CAAC;IAC9D,MAAMe,OAAO,GAAGhB,kCAAkC,CAACa,OAAO,CAACI,IAAI,CAAC;IAChE,IAAI,CAACD,OAAO,EAAEE,OAAO,CAACC,QAAQ,GAAG,CAAC;EACpC,CAAC,MAAM;IACLD,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHd,OAAO,CAACe,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"authn-export.js","names":["frodo","Option","exportAuthenticationSettingsToFile","verboseMessage","FrodoCommand","getTokens","login","program","description","addOption","action","host","realm","user","password","options","command","handleDefaultArgsAndOpts","outcome","file","metadata","process","exitCode","parse"],"sources":["../../../src/cli/authn/authn-export.ts"],"sourcesContent":["import { frodo } from '@rockcarver/frodo-lib';\nimport { Option } from 'commander';\n\nimport { exportAuthenticationSettingsToFile } from '../../ops/AuthenticationSettingsOps';\nimport { verboseMessage } from '../../utils/Console';\nimport { FrodoCommand } from '../FrodoCommand';\n\nconst { getTokens } = frodo.login;\n\nconst program = new FrodoCommand('frodo authn export');\n\nprogram\n .description('Export authentication settings.')\n .addOption(new Option('-f, --file <file>', 'Name of the export file.'))\n .addOption(\n new Option(\n '-N, --no-metadata',\n 'Does not include metadata in the export file.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options, command) => {\n command.handleDefaultArgsAndOpts(\n host,\n realm,\n user,\n password,\n options,\n command\n );\n if (await getTokens()) {\n verboseMessage('Exporting authentication settings to file...');\n const outcome = exportAuthenticationSettingsToFile(\n options.file,\n options.metadata\n );\n if (!outcome) process.exitCode = 1;\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,kCAAkC,QAAQ,qCAAqC;AACxF,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAM;EAAEC;AAAU,CAAC,GAAGL,KAAK,CAACM,KAAK;AAEjC,MAAMC,OAAO,GAAG,IAAIH,YAAY,CAAC,oBAAoB,CAAC;AAEtDG,OAAO,CACJC,WAAW,CAAC,iCAAiC,CAAC,CAC9CC,SAAS,CAAC,IAAIR,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,CAAC,CAAC,CACtEQ,SAAS,CACR,IAAIR,MAAM,CACR,mBAAmB,EACnB,+CACF,CACF,CAAC,CACAS,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,KAAK;EACvDA,OAAO,CAACC,wBAAwB,CAC9BN,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,OACF,CAAC;EACD,IAAI,MAAMX,SAAS,CAAC,CAAC,EAAE;IACrBF,cAAc,CAAC,8CAA8C,CAAC;IAC9D,MAAMe,OAAO,GAAGhB,kCAAkC,CAChDa,OAAO,CAACI,IAAI,EACZJ,OAAO,CAACK,QACV,CAAC;IACD,IAAI,CAACF,OAAO,EAAEG,OAAO,CAACC,QAAQ,GAAG,CAAC;EACpC,CAAC,MAAM;IACLD,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AACF,CAAC;;AAEHf,OAAO,CAACgB,KAAK,CAAC,CAAC"}
@@ -7,14 +7,14 @@ const {
7
7
  getTokens
8
8
  } = frodo.login;
9
9
  const program = new FrodoCommand('frodo authz policy export');
10
- program.description('Export authorization policies.').addOption(new Option('-i, --policy-id <policy-id>', 'Policy id. If specified, -a and -A are ignored.')).addOption(new Option('--set-id <set-id>', 'Export policies in policy set only. Ignored with -i.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export policies to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export policies to separate files (*.policy.authz.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('--no-deps', 'Do not include dependencies (scripts).')).addOption(new Option('--prereqs', 'Include prerequisites (policy sets, resource types).')).action(
10
+ program.description('Export authorization policies.').addOption(new Option('-i, --policy-id <policy-id>', 'Policy id. If specified, -a and -A are ignored.')).addOption(new Option('--set-id <set-id>', 'Export policies in policy set only. Ignored with -i.')).addOption(new Option('-f, --file <file>', 'Name of the export file.')).addOption(new Option('-a, --all', 'Export policies to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export policies to separate files (*.policy.authz.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('-N, --no-metadata', 'Does not include metadata in the export file.')).addOption(new Option('--no-deps', 'Do not include dependencies (scripts).')).addOption(new Option('--prereqs', 'Include prerequisites (policy sets, resource types).')).action(
11
11
  // implement command logic inside action handler
12
12
  async (host, realm, user, password, options, command) => {
13
13
  command.handleDefaultArgsAndOpts(host, realm, user, password, options, command);
14
14
  // export
15
15
  if (options.policyId && (await getTokens())) {
16
16
  verboseMessage('Exporting authorization policy to file...');
17
- const outcome = await exportPolicyToFile(options.policyId, options.file, {
17
+ const outcome = await exportPolicyToFile(options.policyId, options.file, options.metadata, {
18
18
  deps: options.deps,
19
19
  prereqs: options.prereqs,
20
20
  useStringArrays: true
@@ -24,7 +24,7 @@ async (host, realm, user, password, options, command) => {
24
24
  // -a/--all by policy set
25
25
  else if (options.setId && options.all && (await getTokens())) {
26
26
  verboseMessage(`Exporting all authorization policies in policy set ${options.setId} to file...`);
27
- const outcome = await exportPoliciesByPolicySetToFile(options.setId, options.file, {
27
+ const outcome = await exportPoliciesByPolicySetToFile(options.setId, options.file, options.metadata, {
28
28
  deps: options.deps,
29
29
  prereqs: options.prereqs,
30
30
  useStringArrays: true
@@ -34,7 +34,7 @@ async (host, realm, user, password, options, command) => {
34
34
  // -a/--all
35
35
  else if (options.all && (await getTokens())) {
36
36
  verboseMessage('Exporting all authorization policies to file...');
37
- const outcome = await exportPoliciesToFile(options.file, {
37
+ const outcome = await exportPoliciesToFile(options.file, options.metadata, {
38
38
  deps: options.deps,
39
39
  prereqs: options.prereqs,
40
40
  useStringArrays: true
@@ -44,7 +44,7 @@ async (host, realm, user, password, options, command) => {
44
44
  // -A/--all-separate by policy set
45
45
  else if (options.setId && options.allSeparate && (await getTokens())) {
46
46
  verboseMessage(`Exporting all authorization policies in policy set ${options.setId} to separate files...`);
47
- const outcome = await exportPoliciesByPolicySetToFiles(options.setId, {
47
+ const outcome = await exportPoliciesByPolicySetToFiles(options.setId, options.metadata, {
48
48
  deps: options.deps,
49
49
  prereqs: options.prereqs,
50
50
  useStringArrays: true
@@ -54,7 +54,7 @@ async (host, realm, user, password, options, command) => {
54
54
  // -A/--all-separate
55
55
  else if (options.allSeparate && (await getTokens())) {
56
56
  verboseMessage('Exporting all authorization policies to separate files...');
57
- const outcome = await exportPoliciesToFiles({
57
+ const outcome = await exportPoliciesToFiles(options.metadata, {
58
58
  deps: options.deps,
59
59
  prereqs: options.prereqs,
60
60
  useStringArrays: true