@rockcarver/frodo-cli 0.18.2-5 → 0.18.2-7

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 (61) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +4 -1
  3. package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +1 -1
  4. package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +4 -1
  5. package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +1 -1
  6. package/esm/cli/admin/admin-get-access-token.js +4 -1
  7. package/esm/cli/admin/admin-get-access-token.js.map +1 -1
  8. package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +4 -1
  9. package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +1 -1
  10. package/esm/cli/admin/admin-hide-generic-extension-attributes.js +4 -1
  11. package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +1 -1
  12. package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +4 -1
  13. package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +1 -1
  14. package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +4 -1
  15. package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +1 -1
  16. package/esm/cli/admin/admin-list-static-user-mappings.js +4 -1
  17. package/esm/cli/admin/admin-list-static-user-mappings.js.map +1 -1
  18. package/esm/cli/admin/admin-remove-static-user-mapping.js +4 -1
  19. package/esm/cli/admin/admin-remove-static-user-mapping.js.map +1 -1
  20. package/esm/cli/admin/admin-repair-org-model.js +4 -1
  21. package/esm/cli/admin/admin-repair-org-model.js.map +1 -1
  22. package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +4 -1
  23. package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +1 -1
  24. package/esm/cli/admin/admin-show-generic-extension-attributes.js +4 -1
  25. package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +1 -1
  26. package/esm/cli/cmd_common.js +4 -4
  27. package/esm/cli/cmd_common.js.map +1 -1
  28. package/esm/cli/saml/saml-cot-export.js +4 -1
  29. package/esm/cli/saml/saml-cot-export.js.map +1 -1
  30. package/esm/cli/saml/saml-cot-import.js +4 -1
  31. package/esm/cli/saml/saml-cot-import.js.map +1 -1
  32. package/esm/cli/saml/saml-cot-list.js +4 -1
  33. package/esm/cli/saml/saml-cot-list.js.map +1 -1
  34. package/esm/cli/saml/saml-delete.js +40 -0
  35. package/esm/cli/saml/saml-delete.js.map +1 -0
  36. package/esm/cli/saml/saml-describe.js +6 -5
  37. package/esm/cli/saml/saml-describe.js.map +1 -1
  38. package/esm/cli/saml/saml-export.js +36 -25
  39. package/esm/cli/saml/saml-export.js.map +1 -1
  40. package/esm/cli/saml/saml-import.js +37 -21
  41. package/esm/cli/saml/saml-import.js.map +1 -1
  42. package/esm/cli/saml/saml-list.js +13 -7
  43. package/esm/cli/saml/saml-list.js.map +1 -1
  44. package/esm/cli/saml/saml-metadata-export.js +7 -6
  45. package/esm/cli/saml/saml-metadata-export.js.map +1 -1
  46. package/esm/cli/saml/saml.js +1 -0
  47. package/esm/cli/saml/saml.js.map +1 -1
  48. package/esm/cli/theme/theme-delete.js +19 -19
  49. package/esm/cli/theme/theme-delete.js.map +1 -1
  50. package/esm/cli/theme/theme-export.js +23 -23
  51. package/esm/cli/theme/theme-export.js.map +1 -1
  52. package/esm/cli/theme/theme-import.js +26 -28
  53. package/esm/cli/theme/theme-import.js.map +1 -1
  54. package/esm/cli/theme/theme-list.js +4 -1
  55. package/esm/cli/theme/theme-list.js.map +1 -1
  56. package/esm/ops/Saml2Ops.js +502 -2
  57. package/esm/ops/Saml2Ops.js.map +1 -1
  58. package/esm/ops/Saml2Ops.test_.js.map +1 -0
  59. package/esm/utils/Console.js +19 -0
  60. package/esm/utils/Console.js.map +1 -1
  61. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.18.2-7] - 2022-11-21
11
+
12
+ ## [0.18.2-6] - 2022-11-16
13
+
10
14
  ## [0.18.2-5] - 2022-11-16
11
15
 
12
16
  ## [0.18.2-4] - 2022-11-10
@@ -721,7 +725,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
721
725
  - Fixed problem with adding connection profiles
722
726
  - Miscellaneous bug fixes
723
727
 
724
- [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-5...HEAD
728
+ [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-7...HEAD
729
+
730
+ [0.18.2-7]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-6...v0.18.2-7
731
+
732
+ [0.18.2-6]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-5...v0.18.2-6
725
733
 
726
734
  [0.18.2-5]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-4...v0.18.2-5
727
735
 
@@ -9,7 +9,7 @@ const {
9
9
  addAutoIdStaticUserMapping
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin add-autoid-static-user-mapping');
12
- program.description('Add AutoId static user mapping to enable dashboards and other AutoId-based functionality.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action( // implement command logic inside action handler
12
+ program.description('Add AutoId static user mapping to enable dashboards and other AutoId-based functionality.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Adding AutoId static user mapping...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-add-autoid-static-user-mapping.js","names":["Command","Authenticate","Admin","state","common","printMessage","getTokens","addAutoIdStaticUserMapping","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","parse"],"sources":["cli/admin/admin-add-autoid-static-user-mapping.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { addAutoIdStaticUserMapping } = Admin;\n\nconst program = new Command('frodo admin add-autoid-static-user-mapping');\n\nprogram\n .description(\n 'Add AutoId static user mapping to enable dashboards and other AutoId-based functionality.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(`Adding AutoId static user mapping...`);\n await addAutoIdStaticUserMapping();\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAiCL,KAAvC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,4CAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CAEI,2FAFJ,EAIGC,UAJH,CAIc,YAJd,EAI4B,MAJ5B,EAKGC,kBALH,GAMGC,WANH,CAMeR,MAAM,CAACS,aANtB,EAOGD,WAPH,CAOeR,MAAM,CAACU,aAPtB,EAQGF,WARH,CAQeR,MAAM,CAACW,YARtB,EASGH,WATH,CASeR,MAAM,CAACY,gBATtB,EAUGC,SAVH,CAUab,MAAM,CAACc,gBAVpB,EAWGD,SAXH,CAWab,MAAM,CAACe,cAXpB,EAYGC,MAZH,EAaI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CAAE,sCAAF,CAAZ;IACA,MAAME,0BAA0B,EAAhC;IACAF,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CA1BL,CA2BI;AA3BJ;AA8BAG,OAAO,CAAC4B,KAAR"}
1
+ {"version":3,"file":"admin-add-autoid-static-user-mapping.js","names":["Command","Authenticate","Admin","state","common","printMessage","getTokens","addAutoIdStaticUserMapping","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","parse"],"sources":["cli/admin/admin-add-autoid-static-user-mapping.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { addAutoIdStaticUserMapping } = Admin;\n\nconst program = new Command('frodo admin add-autoid-static-user-mapping');\n\nprogram\n .description(\n 'Add AutoId static user mapping to enable dashboards and other AutoId-based functionality.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(`Adding AutoId static user mapping...`);\n await addAutoIdStaticUserMapping();\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAiCL,KAAvC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,4CAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CAEI,2FAFJ,EAIGC,UAJH,CAIc,YAJd,EAI4B,MAJ5B,EAKGC,kBALH,GAMGC,WANH,CAMeR,MAAM,CAACS,aANtB,EAOGD,WAPH,CAOeR,MAAM,CAACU,aAPtB,EAQGF,WARH,CAQeR,MAAM,CAACW,YARtB,EASGH,WATH,CASeR,MAAM,CAACY,gBATtB,EAUGC,SAVH,CAUab,MAAM,CAACc,gBAVpB,EAWGD,SAXH,CAWab,MAAM,CAACe,cAXpB,EAYGF,SAZH,CAYab,MAAM,CAACgB,aAZpB,EAaGH,SAbH,CAaab,MAAM,CAACiB,WAbpB,EAcGJ,SAdH,CAcab,MAAM,CAACkB,eAdpB,EAeGC,MAfH,EAgBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACArB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CAAE,sCAAF,CAAZ;IACA,MAAME,0BAA0B,EAAhC;IACAF,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CAhCL,CAiCI;AAjCJ;AAoCAG,OAAO,CAACqC,KAAR"}
@@ -12,7 +12,7 @@ const {
12
12
  createOAuth2ClientWithAdminPrivileges
13
13
  } = Admin;
14
14
  const program = new Command('frodo admin create-oauth2-client-with-admin-privileges');
15
- program.description('Create an oauth2 client with admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--client-id [id]', 'Client id.')).addOption(new Option('--client-secret [secret]', 'Client secret.')).addOption(new Option('--llt', 'Create a long-lived token and store it in a secret. The default secret name is esv-admin-token and the default token lifetime is 315,360,000 seconds (10 years). Both can be overwritten with the --llt-esv and --llt-ttl options.')).addOption(new Option('--llt-scope [scope]', 'Request the following scope(s). This option only applies if used with the --llt option.').default('fr:idm:*', 'fr:idm:*')).addOption(new Option('--llt-esv [esv]', 'Name of the secret to store the token in. This option only applies if used with the --llt option.').default('esv-admin-token', 'esv-admin-token')).addOption(new Option('--llt-ttl [ttl]', 'Token lifetime (seconds). This option only applies if used with the --llt option.').default(315360000, '315,360,000 seconds (10 years)')).action( // implement command logic inside action handler
15
+ program.description('Create an oauth2 client with admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('--client-id [id]', 'Client id.')).addOption(new Option('--client-secret [secret]', 'Client secret.')).addOption(new Option('--llt', 'Create a long-lived token and store it in a secret. The default secret name is esv-admin-token and the default token lifetime is 315,360,000 seconds (10 years). Both can be overwritten with the --llt-esv and --llt-ttl options.')).addOption(new Option('--llt-scope [scope]', 'Request the following scope(s). This option only applies if used with the --llt option.').default('fr:idm:*', 'fr:idm:*')).addOption(new Option('--llt-esv [esv]', 'Name of the secret to store the token in. This option only applies if used with the --llt option.').default('esv-admin-token', 'esv-admin-token')).addOption(new Option('--llt-ttl [ttl]', 'Token lifetime (seconds). This option only applies if used with the --llt option.').default(315360000, '315,360,000 seconds (10 years)')).action( // implement command logic inside action handler
16
16
  async (host, realm, user, password, options) => {
17
17
  state.default.session.setTenant(host);
18
18
  state.default.session.setRealm(realm);
@@ -20,6 +20,9 @@ async (host, realm, user, password, options) => {
20
20
  state.default.session.setPassword(password);
21
21
  state.default.session.setDeploymentType(options.type);
22
22
  state.default.session.setAllowInsecureConnection(options.insecure);
23
+ state.default.session.setVerbose(options.verbose);
24
+ state.default.session.setDebug(options.debug);
25
+ state.default.session.setCurlirize(options.curlirize);
23
26
 
24
27
  if (await getTokens()) {
25
28
  printMessage(`Creating oauth2 client with admin privileges in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-create-oauth2-client-with-admin-privileges.js","names":["Command","Option","v4","uuidv4","Table","Authenticate","Admin","state","common","printMessage","getTokens","createLongLivedToken","createOAuth2ClientWithAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","clientId","clientSecret","error","table","chars","top","bottom","left","mid","right","style","wordWrap","llt","response","scope","lltEsv","lltTtl","push","secret","expires_on","toString","parse"],"sources":["cli/admin/admin-create-oauth2-client-with-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { v4 as uuidv4 } from 'uuid';\nimport Table from 'cli-table3';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { createLongLivedToken, createOAuth2ClientWithAdminPrivileges } = Admin;\n\nconst program = new Command(\n 'frodo admin create-oauth2-client-with-admin-privileges'\n);\n\nprogram\n .description('Create an oauth2 client with admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(new Option('--client-id [id]', 'Client id.'))\n .addOption(new Option('--client-secret [secret]', 'Client secret.'))\n .addOption(\n new Option(\n '--llt',\n 'Create a long-lived token and store it in a secret. The default secret name is esv-admin-token and the default token lifetime is 315,360,000 seconds (10 years). Both can be overwritten with the --llt-esv and --llt-ttl options.'\n )\n )\n .addOption(\n new Option(\n '--llt-scope [scope]',\n 'Request the following scope(s). This option only applies if used with the --llt option.'\n ).default('fr:idm:*', 'fr:idm:*')\n )\n .addOption(\n new Option(\n '--llt-esv [esv]',\n 'Name of the secret to store the token in. This option only applies if used with the --llt option.'\n ).default('esv-admin-token', 'esv-admin-token')\n )\n .addOption(\n new Option(\n '--llt-ttl [ttl]',\n 'Token lifetime (seconds). This option only applies if used with the --llt option.'\n ).default(315360000, '315,360,000 seconds (10 years)')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Creating oauth2 client with admin privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n let clientId = uuidv4();\n let clientSecret = uuidv4();\n if (options.clientId) {\n clientId = options.clientId;\n }\n if (options.clientSecret) {\n clientSecret = options.clientSecret;\n }\n try {\n await createOAuth2ClientWithAdminPrivileges(clientId, clientSecret);\n } catch (error) {\n printMessage(error, 'error');\n }\n const table = new Table({\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n },\n style: { 'padding-left': 0, 'padding-right': 0 },\n wordWrap: true,\n });\n if (options.llt) {\n try {\n const response = await createLongLivedToken(\n clientId,\n clientSecret,\n options.scope,\n options.lltEsv,\n options.lltTtl\n );\n table.push(['Secret Name'['brightCyan'], response.secret]);\n table.push(['Scope'['brightCyan'], response.scope]);\n // table.push(['Token Lifetime'.brightCyan, response.expires_in]);\n table.push(['Expires'['brightCyan'], response.expires_on]);\n } catch (error) {\n printMessage(error, 'error');\n }\n }\n table.push(['Client ID'['brightCyan'], clientId]);\n table.push(['Client Secret'['brightCyan'], clientSecret]);\n printMessage(table.toString());\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA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;AA2GAjD,OAAO,CAACkD,KAAR"}
1
+ {"version":3,"file":"admin-create-oauth2-client-with-admin-privileges.js","names":["Command","Option","v4","uuidv4","Table","Authenticate","Admin","state","common","printMessage","getTokens","createLongLivedToken","createOAuth2ClientWithAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","clientId","clientSecret","error","table","chars","top","bottom","left","mid","right","style","wordWrap","llt","response","scope","lltEsv","lltTtl","push","secret","expires_on","toString","parse"],"sources":["cli/admin/admin-create-oauth2-client-with-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { v4 as uuidv4 } from 'uuid';\nimport Table from 'cli-table3';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { createLongLivedToken, createOAuth2ClientWithAdminPrivileges } = Admin;\n\nconst program = new Command(\n 'frodo admin create-oauth2-client-with-admin-privileges'\n);\n\nprogram\n .description('Create an oauth2 client with admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(new Option('--client-id [id]', 'Client id.'))\n .addOption(new Option('--client-secret [secret]', 'Client secret.'))\n .addOption(\n new Option(\n '--llt',\n 'Create a long-lived token and store it in a secret. The default secret name is esv-admin-token and the default token lifetime is 315,360,000 seconds (10 years). Both can be overwritten with the --llt-esv and --llt-ttl options.'\n )\n )\n .addOption(\n new Option(\n '--llt-scope [scope]',\n 'Request the following scope(s). This option only applies if used with the --llt option.'\n ).default('fr:idm:*', 'fr:idm:*')\n )\n .addOption(\n new Option(\n '--llt-esv [esv]',\n 'Name of the secret to store the token in. This option only applies if used with the --llt option.'\n ).default('esv-admin-token', 'esv-admin-token')\n )\n .addOption(\n new Option(\n '--llt-ttl [ttl]',\n 'Token lifetime (seconds). This option only applies if used with the --llt option.'\n ).default(315360000, '315,360,000 seconds (10 years)')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Creating oauth2 client with admin privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n let clientId = uuidv4();\n let clientSecret = uuidv4();\n if (options.clientId) {\n clientId = options.clientId;\n }\n if (options.clientSecret) {\n clientSecret = options.clientSecret;\n }\n try {\n await createOAuth2ClientWithAdminPrivileges(clientId, clientSecret);\n } catch (error) {\n printMessage(error, 'error');\n }\n const table = new Table({\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n },\n style: { 'padding-left': 0, 'padding-right': 0 },\n wordWrap: true,\n });\n if (options.llt) {\n try {\n const response = await createLongLivedToken(\n clientId,\n clientSecret,\n options.scope,\n options.lltEsv,\n options.lltTtl\n );\n table.push(['Secret Name'['brightCyan'], response.secret]);\n table.push(['Scope'['brightCyan'], response.scope]);\n // table.push(['Token Lifetime'.brightCyan, response.expires_in]);\n table.push(['Expires'['brightCyan'], response.expires_on]);\n } catch (error) {\n printMessage(error, 'error');\n }\n }\n table.push(['Client ID'['brightCyan'], clientId]);\n table.push(['Client Secret'['brightCyan'], clientSecret]);\n printMessage(table.toString());\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,EAAE,IAAIC,MAAf,QAA6B,MAA7B;AACA,OAAOC,KAAP,MAAkB,YAAlB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM,oBAAF;EAAwBC;AAAxB,IAAkEN,KAAxE;AAEA,MAAMO,OAAO,GAAG,IAAIb,OAAJ,CACd,wDADc,CAAhB;AAIAa,OAAO,CACJC,WADH,CACe,gDADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeT,MAAM,CAACU,aAJtB,EAKGD,WALH,CAKeT,MAAM,CAACW,aALtB,EAMGF,WANH,CAMeT,MAAM,CAACY,YANtB,EAOGH,WAPH,CAOeT,MAAM,CAACa,gBAPtB,EAQGC,SARH,CAQad,MAAM,CAACe,gBARpB,EASGD,SATH,CASad,MAAM,CAACgB,cATpB,EAUGF,SAVH,CAUad,MAAM,CAACiB,aAVpB,EAWGH,SAXH,CAWad,MAAM,CAACkB,WAXpB,EAYGJ,SAZH,CAYad,MAAM,CAACmB,eAZpB,EAaGL,SAbH,CAaa,IAAIrB,MAAJ,CAAW,kBAAX,EAA+B,YAA/B,CAbb,EAcGqB,SAdH,CAca,IAAIrB,MAAJ,CAAW,0BAAX,EAAuC,gBAAvC,CAdb,EAeGqB,SAfH,CAgBI,IAAIrB,MAAJ,CACE,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c,YAAd,CAAD,EAA8BJ,QAAQ,CAACK,MAAvC,CAAX;QACAf,KAAK,CAACc,IAAN,CAAW,CAAC,QAAQ,YAAR,CAAD,EAAwBJ,QAAQ,CAACC,KAAjC,CAAX,EATE,CAUF;;QACAX,KAAK,CAACc,IAAN,CAAW,CAAC,UAAU,YAAV,CAAD,EAA0BJ,QAAQ,CAACM,UAAnC,CAAX;MACD,CAZD,CAYE,OAAOjB,KAAP,EAAc;QACd5C,YAAY,CAAC4C,KAAD,EAAQ,OAAR,CAAZ;MACD;IACF;;IACDC,KAAK,CAACc,IAAN,CAAW,CAAC,YAAY,YAAZ,CAAD,EAA4BjB,QAA5B,CAAX;IACAG,KAAK,CAACc,IAAN,CAAW,CAAC,gBAAgB,YAAhB,CAAD,EAAgChB,YAAhC,CAAX;IACA3C,YAAY,CAAC6C,KAAK,CAACiB,QAAN,EAAD,CAAZ;EACD;AACF,CA7GL,CA8GI;AA9GJ;AAiHA1D,OAAO,CAAC2D,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  getTokens
10
10
  } = Authenticate;
11
11
  const program = new Command('frodo admin get-access-token');
12
- program.description('Get an access token using client credentials grant type.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--client-id [id]', 'Client id.').makeOptionMandatory()).addOption(new Option('--client-secret [secret]', 'Client secret.').makeOptionMandatory()).addOption(new Option('--scope [scope]', 'Request the following scope(s).').default('fr:idm:*', 'fr:idm:*')).action( // implement command logic inside action handler
12
+ program.description('Get an access token using client credentials grant type.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('--client-id [id]', 'Client id.').makeOptionMandatory()).addOption(new Option('--client-secret [secret]', 'Client secret.').makeOptionMandatory()).addOption(new Option('--scope [scope]', 'Request the following scope(s).').default('fr:idm:*', 'fr:idm:*')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Getting an access token using client "${options.clientId}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-get-access-token.js","names":["Command","Option","Authenticate","OAuth2OIDCApi","state","common","printMessage","clientCredentialsGrant","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","makeOptionMandatory","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","clientId","response","clientSecret","scope","data","access_token","parse"],"sources":["cli/admin/admin-get-access-token.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, OAuth2OIDCApi, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { clientCredentialsGrant } = OAuth2OIDCApi;\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo admin get-access-token');\n\nprogram\n .description('Get an access token using client credentials grant type.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(new Option('--client-id [id]', 'Client id.').makeOptionMandatory())\n .addOption(\n new Option(\n '--client-secret [secret]',\n 'Client secret.'\n ).makeOptionMandatory()\n )\n .addOption(\n new Option('--scope [scope]', 'Request the following scope(s).').default(\n 'fr:idm:*',\n 'fr:idm:*'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Getting an access token using client \"${options.clientId}\"...`\n );\n const response = (\n await clientCredentialsGrant(\n options.clientId,\n options.clientSecret,\n options.scope\n )\n ).data;\n printMessage(`Token: ${response.access_token}`);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,aAAvB,EAAsCC,KAAtC,QAAmD,uBAAnD;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAA6BJ,aAAnC;AACA,MAAM;EAAEK;AAAF,IAAgBN,YAAtB;AAEA,MAAMO,OAAO,GAAG,IAAIT,OAAJ,CAAY,8BAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,0DADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUa,IAAIjB,MAAJ,CAAW,kBAAX,EAA+B,YAA/B,EAA6CoB,mBAA7C,EAVb,EAWGH,SAXH,CAYI,IAAIjB,MAAJ,CACE,0BADF,EAEE,gBAFF,EAGEoB,mBAHF,EAZJ,EAiBGH,SAjBH,CAkBI,IAAIjB,MAAJ,CAAW,iBAAX,EAA8B,iCAA9B,EAAiEqB,OAAjE,CACE,UADF,EAEE,UAFF,CAlBJ,EAuBGC,MAvBH,EAwBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CxB,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBC,SAAtB,CAAgCN,IAAhC;EACApB,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBE,QAAtB,CAA+BN,KAA/B;EACArB,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBG,WAAtB,CAAkCN,IAAlC;EACAtB,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBI,WAAtB,CAAkCN,QAAlC;EACAvB,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACA/B,KAAK,CAACkB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBF,YAAY,CACT,yCAAwCsB,OAAO,CAACU,QAAS,MADhD,CAAZ;IAGA,MAAMC,QAAQ,GAAG,CACf,MAAMhC,sBAAsB,CAC1BqB,OAAO,CAACU,QADkB,EAE1BV,OAAO,CAACY,YAFkB,EAG1BZ,OAAO,CAACa,KAHkB,CADb,EAMfC,IANF;IAOApC,YAAY,CAAE,UAASiC,QAAQ,CAACI,YAAa,EAAjC,CAAZ;EACD;AACF,CA7CL,CA8CI;AA9CJ;AAiDAlC,OAAO,CAACmC,KAAR"}
1
+ {"version":3,"file":"admin-get-access-token.js","names":["Command","Option","Authenticate","OAuth2OIDCApi","state","common","printMessage","clientCredentialsGrant","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","makeOptionMandatory","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","clientId","response","clientSecret","scope","data","access_token","parse"],"sources":["cli/admin/admin-get-access-token.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, OAuth2OIDCApi, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { clientCredentialsGrant } = OAuth2OIDCApi;\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo admin get-access-token');\n\nprogram\n .description('Get an access token using client credentials grant type.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(new Option('--client-id [id]', 'Client id.').makeOptionMandatory())\n .addOption(\n new Option(\n '--client-secret [secret]',\n 'Client secret.'\n ).makeOptionMandatory()\n )\n .addOption(\n new Option('--scope [scope]', 'Request the following scope(s).').default(\n 'fr:idm:*',\n 'fr:idm:*'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Getting an access token using client \"${options.clientId}\"...`\n );\n const response = (\n await clientCredentialsGrant(\n options.clientId,\n options.clientSecret,\n options.scope\n )\n ).data;\n printMessage(`Token: ${response.access_token}`);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,aAAvB,EAAsCC,KAAtC,QAAmD,uBAAnD;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAA6BJ,aAAnC;AACA,MAAM;EAAEK;AAAF,IAAgBN,YAAtB;AAEA,MAAMO,OAAO,GAAG,IAAIT,OAAJ,CAAY,8BAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,0DADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGL,SAbH,CAaa,IAAIjB,MAAJ,CAAW,kBAAX,EAA+B,YAA/B,EAA6CuB,mBAA7C,EAbb,EAcGN,SAdH,CAeI,IAAIjB,MAAJ,CACE,0BADF,EAEE,gBAFF,EAGEuB,mBAHF,EAfJ,EAoBGN,SApBH,CAqBI,IAAIjB,MAAJ,CAAW,iBAAX,EAA8B,iCAA9B,EAAiEwB,OAAjE,CACE,UADF,EAEE,UAFF,CArBJ,EA0BGC,MA1BH,EA2BI;AACA,OAAOC,IAAP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('frodo admin grant-oauth2-client-admin-privileges');
12
- program.description('Grant an oauth2 client admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')).action( // implement command logic inside action handler
12
+ program.description('Grant an oauth2 client admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Granting oauth2 client "${options.target}" in realm "${state.default.session.getRealm()}" admin privileges...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-grant-oauth2-client-admin-privileges.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","grantOAuth2ClientAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","target","getRealm","parse"],"sources":["cli/admin/admin-grant-oauth2-client-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { grantOAuth2ClientAdminPrivileges } = Admin;\n\nconst program = new Command('frodo admin grant-oauth2-client-admin-privileges');\n\nprogram\n .description('Grant an oauth2 client admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Granting oauth2 client \"${\n options.target\n }\" in realm \"${state.default.session.getRealm()}\" admin privileges...`\n );\n await grantOAuth2ClientAdminPrivileges(options.target);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAuCL,KAA7C;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,kDAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,0CADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAWI,IAAIjB,MAAJ,CAAW,kCAAX,EAA+C,4BAA/C,CAXJ,EAaGoB,MAbH,EAcI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,2BACCoB,OAAO,CAACW,MACT,eAAcjC,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBU,QAAtB,EAAiC,uBAHtC,CAAZ;IAKA,MAAM9B,gCAAgC,CAACkB,OAAO,CAACW,MAAT,CAAtC;IACA/B,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CA/BL,CAgCI;AAhCJ;AAmCAG,OAAO,CAAC8B,KAAR"}
1
+ {"version":3,"file":"admin-grant-oauth2-client-admin-privileges.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","grantOAuth2ClientAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","target","getRealm","parse"],"sources":["cli/admin/admin-grant-oauth2-client-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { grantOAuth2ClientAdminPrivileges } = Admin;\n\nconst program = new Command('frodo admin grant-oauth2-client-admin-privileges');\n\nprogram\n .description('Grant an oauth2 client admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Granting oauth2 client \"${\n options.target\n }\" in realm \"${state.default.session.getRealm()}\" admin privileges...`\n );\n await grantOAuth2ClientAdminPrivileges(options.target);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,E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,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,2BACCuB,OAAO,CAACiB,MACT,eAAc1C,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBgB,QAAtB,EAAiC,uBAHtC,CAAZ;IAKA,MAAMvC,gCAAgC,CAACqB,OAAO,CAACiB,MAAT,CAAtC;IACAxC,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CArCL,CAsCI;AAtCJ;AAyCAG,OAAO,CAACuC,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  hideGenericExtensionAttributes
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin hide-generic-extension-attributes');
12
- program.description('Hide generic extension attributes.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--include-customized', 'Include customized attributes.')).addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.')).action( // implement command logic inside action handler
12
+ program.description('Hide generic extension attributes.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('--include-customized', 'Include customized attributes.')).addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Hiding generic extension attributes in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-hide-generic-extension-attributes.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","hideGenericExtensionAttributes","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","includeCustomized","dryRun","parse"],"sources":["cli/admin/admin-hide-generic-extension-attributes.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { hideGenericExtensionAttributes } = Admin;\n\nconst program = new Command('frodo admin hide-generic-extension-attributes');\n\nprogram\n .description('Hide generic extension attributes.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('--include-customized', 'Include customized attributes.')\n )\n .addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Hiding generic extension attributes in realm \"${state.default.session.getRealm()}\"...`\n );\n await hideGenericExtensionAttributes(\n options.includeCustomized,\n options.dryRun\n );\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAqCL,KAA3C;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,+CAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,oCADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAWI,IAAIjB,MAAJ,CAAW,sBAAX,EAAmC,gCAAnC,CAXJ,EAaGiB,SAbH,CAaa,IAAIjB,MAAJ,CAAW,WAAX,EAAwB,uCAAxB,CAbb,EAcGoB,MAdH,EAeI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,iDAAgDF,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBS,QAAtB,EAAiC,MADxE,CAAZ;IAGA,MAAM7B,8BAA8B,CAClCkB,OAAO,CAACY,iBAD0B,EAElCZ,OAAO,CAACa,MAF0B,CAApC;IAIAjC,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CAjCL,CAkCI;AAlCJ;AAqCAG,OAAO,CAAC+B,KAAR"}
1
+ {"version":3,"file":"admin-hide-generic-extension-attributes.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","hideGenericExtensionAttributes","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","includeCustomized","dryRun","parse"],"sources":["cli/admin/admin-hide-generic-extension-attributes.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { hideGenericExtensionAttributes } = Admin;\n\nconst program = new Command('frodo admin hide-generic-extension-attributes');\n\nprogram\n .description('Hide generic extension attributes.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option('--include-customized', 'Include customized attributes.')\n )\n .addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Hiding generic extension attributes in realm \"${state.default.session.getRealm()}\"...`\n );\n await hideGenericExtensionAttributes(\n options.includeCustomized,\n options.dryRun\n );\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAqCL,KAA3C;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,+CAAZ,CAAhB;AAEAS,OAAO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K,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,iDAAgDF,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBe,QAAtB,EAAiC,MADxE,CAAZ;IAGA,MAAMtC,8BAA8B,CAClCqB,OAAO,CAACkB,iBAD0B,EAElClB,OAAO,CAACmB,MAF0B,CAApC;IAIA1C,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CAvCL,CAwCI;AAxCJ;AA2CAG,OAAO,CAACwC,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  getTokens
10
10
  } = Authenticate;
11
11
  const program = new Command('frodo admin list-oauth2-clients-with-admin-privileges');
12
- program.description('List oauth2 clients with admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action( // implement command logic inside action handler
12
+ program.description('List oauth2 clients with admin privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Listing oauth2 clients with admin privileges in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-list-oauth2-clients-with-admin-privileges.js","names":["Command","Authenticate","Admin","state","common","printMessage","listOAuth2AdminClients","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","adminClients","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-oauth2-clients-with-admin-privileges.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { listOAuth2AdminClients } = Admin;\nconst { getTokens } = Authenticate;\n\nconst program = new Command(\n 'frodo admin list-oauth2-clients-with-admin-privileges'\n);\n\nprogram\n .description('List oauth2 clients with admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Listing oauth2 clients with admin privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n const adminClients = await listOAuth2AdminClients();\n adminClients.sort((a, b) => a.localeCompare(b));\n adminClients.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"m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F,YAAY,CACT,0DAAyDF,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBS,QAAtB,EAAiC,MADjF,CAAZ;IAGA,MAAMC,YAAY,GAAG,MAAM/B,sBAAsB,EAAjD;IACA+B,YAAY,CAACC,IAAb,CAAkB,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACE,aAAF,CAAgBD,CAAhB,CAA5B;IACAH,YAAY,CAACK,OAAb,CAAsBC,IAAD,IAAU;MAC7BtC,YAAY,CAAE,GAAEsC,IAAK,EAAT,CAAZ;IACD,CAFD;EAGD;AACF,CA7BL,CA8BI;AA9BJ;AAiCAnC,OAAO,CAACoC,KAAR"}
1
+ {"version":3,"file":"admin-list-oauth2-clients-with-admin-privileges.js","names":["Command","Authenticate","Admin","state","common","printMessage","listOAuth2AdminClients","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","adminClients","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-oauth2-clients-with-admin-privileges.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { listOAuth2AdminClients } = Admin;\nconst { getTokens } = Authenticate;\n\nconst program = new Command(\n 'frodo admin list-oauth2-clients-with-admin-privileges'\n);\n\nprogram\n .description('List oauth2 clients with admin privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Listing oauth2 clients with admin privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n const adminClients = await listOAuth2AdminClients();\n adminClients.sort((a, b) => a.localeCompare(b));\n adminClients.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAA6BJ,KAAnC;AACA,MAAM;EAAEK;AAAF,IAAgBN,YAAtB;AAEA,MAAMO,OAAO,GAAG,IAAIR,OAAJ,CACd,uDADc,CAAhB;AAIAQ,OAAO,CACJC,WADH,CACe,4CADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CA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GD;AACF,CAnCL,CAoCI;AApCJ;AAuCA5C,OAAO,CAAC6C,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  getTokens
10
10
  } = Authenticate;
11
11
  const program = new Command('frodo admin list-oauth2-clients-with-custom-privileges');
12
- program.description('List oauth2 clients with custom privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action( // implement command logic inside action handler
12
+ program.description('List oauth2 clients with custom privileges.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Listing oauth2 clients with custom privileges in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-list-oauth2-clients-with-custom-privileges.js","names":["Command","Authenticate","Admin","state","common","printMessage","listOAuth2CustomClients","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","adminClients","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-oauth2-clients-with-custom-privileges.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { listOAuth2CustomClients } = Admin;\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command(\n 'frodo admin list-oauth2-clients-with-custom-privileges'\n);\n\nprogram\n .description('List oauth2 clients with custom privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Listing oauth2 clients with custom privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n const adminClients = await listOAuth2CustomClients();\n adminClients.sort((a, b) => a.localeCompare(b));\n adminClients.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAA8BJ,KAApC;AAEA,MAAM;EAAEK;AAAF,IAAgBN,YAAtB;AAEA,MAAMO,OAAO,GAAG,IAAIR,OAAJ,CACd,wDADc,CAAhB;AAIAQ,OAAO,CACJC,WADH,CACe,6CADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH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
1
+ {"version":3,"file":"admin-list-oauth2-clients-with-custom-privileges.js","names":["Command","Authenticate","Admin","state","common","printMessage","listOAuth2CustomClients","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","adminClients","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-oauth2-clients-with-custom-privileges.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { listOAuth2CustomClients } = Admin;\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command(\n 'frodo admin list-oauth2-clients-with-custom-privileges'\n);\n\nprogram\n .description('List oauth2 clients with custom privileges.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Listing oauth2 clients with custom privileges in realm \"${state.default.session.getRealm()}\"...`\n );\n const adminClients = await listOAuth2CustomClients();\n adminClients.sort((a, b) => a.localeCompare(b));\n adminClients.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAA8BJ,KAApC;AAEA,MAAM;EAAEK;AAAF,IAAgBN,YAAtB;AAEA,MAAMO,OAAO,GAAG,IAAIR,OAAJ,CACd,wDADc,CAAhB;AAIAQ,OAAO,CACJC,WADH,CACe,6CADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGC,MAbH,EAcI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACArB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMrC,SAAS,EAAnB,EAAuB;IACrBF,YAAY,CACT,2DAA0DF,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBe,QAAtB,EAAiC,MADlF,CAAZ;IAGA,MAAMC,YAAY,GAAG,MAAMxC,uBAAuB,EAAlD;IACAwC,YAAY,CAACC,IAAb,CAAkB,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACE,aAAF,CAAgBD,CAAhB,CAA5B;IACAH,YAAY,CAACK,OAAb,CAAsBC,IAAD,IAAU;MAC7B/C,YAAY,CAAE,GAAE+C,IAAK,EAAT,CAAZ;IACD,CAFD;EAGD;AACF,CAnCL,CAoCI;AApCJ;AAuCA5C,OAAO,CAAC6C,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  listNonOAuth2AdminStaticUserMappings
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin list-static-user-mappings');
12
- program.description('List all subjects of static user mappings that are not oauth2 clients.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--show-protected', 'Show protected (system) subjects.').default(false, 'false')).action( // implement command logic inside action handler
12
+ program.description('List all subjects of static user mappings that are not oauth2 clients.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('--show-protected', 'Show protected (system) subjects.').default(false, 'false')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage('Listing all non-oauth2 client subjects of static user mappings...');
@@ -1 +1 @@
1
- {"version":3,"file":"admin-list-static-user-mappings.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","listNonOAuth2AdminStaticUserMappings","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","subjects","showProtected","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-static-user-mappings.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { listNonOAuth2AdminStaticUserMappings } = Admin;\n\nconst program = new Command('frodo admin list-static-user-mappings');\n\nprogram\n .description(\n 'List all subjects of static user mappings that are not oauth2 clients.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('--show-protected', 'Show protected (system) subjects.').default(\n false,\n 'false'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n 'Listing all non-oauth2 client subjects of static user mappings...'\n );\n const subjects = await listNonOAuth2AdminStaticUserMappings(\n options.showProtected\n );\n subjects.sort((a, b) => a.localeCompare(b));\n subjects.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAA2CL,KAAjD;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,uCAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CAEI,wEAFJ,EAIGC,UAJH,CAIc,YAJd,EAI4B,MAJ5B,EAKGC,kBALH,GAMGC,WANH,CAMeR,MAAM,CAACS,aANtB,EAOGD,WAPH,CAOeR,MAAM,CAACU,aAPtB,EAQGF,WARH,CAQeR,MAAM,CAACW,YARtB,EASGH,WATH,CASeR,MAAM,CAACY,gBATtB,EAUGC,SAVH,CAUab,MAAM,CAACc,gBAVpB,EAWGD,SAXH,CAWab,MAAM,CAACe,cAXpB,EAYGF,SAZH,CAaI,IAAIjB,MAAJ,CAAW,kBAAX,EAA+B,mCAA/B,EAAoEoB,OAApE,CACE,KADF,EAEE,OAFF,CAbJ,EAkBGC,MAlBH,EAmBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CvB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBC,SAAtB,CAAgCN,IAAhC;EACAnB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBE,QAAtB,CAA+BN,KAA/B;EACApB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBG,WAAtB,CAAkCN,IAAlC;EACArB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBI,WAAtB,CAAkCN,QAAlC;EACAtB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACA9B,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACV,mEADU,CAAZ;IAGA,MAAM+B,QAAQ,GAAG,MAAM7B,oCAAoC,CACzDmB,OAAO,CAACW,aADiD,CAA3D;IAGAD,QAAQ,CAACE,IAAT,CAAc,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACE,aAAF,CAAgBD,CAAhB,CAAxB;IACAJ,QAAQ,CAACM,OAAT,CAAkBC,IAAD,IAAU;MACzBtC,YAAY,CAAE,GAAEsC,IAAK,EAAT,CAAZ;IACD,CAFD;EAGD;AACF,CAvCL,CAwCI;AAxCJ;AA2CAnC,OAAO,CAACoC,KAAR"}
1
+ {"version":3,"file":"admin-list-static-user-mappings.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","listNonOAuth2AdminStaticUserMappings","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","subjects","showProtected","sort","a","b","localeCompare","forEach","item","parse"],"sources":["cli/admin/admin-list-static-user-mappings.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { listNonOAuth2AdminStaticUserMappings } = Admin;\n\nconst program = new Command('frodo admin list-static-user-mappings');\n\nprogram\n .description(\n 'List all subjects of static user mappings that are not oauth2 clients.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option('--show-protected', 'Show protected (system) subjects.').default(\n false,\n 'false'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n 'Listing all non-oauth2 client subjects of static user mappings...'\n );\n const subjects = await listNonOAuth2AdminStaticUserMappings(\n options.showProtected\n );\n subjects.sort((a, b) => a.localeCompare(b));\n subjects.forEach((item) => {\n printMessage(`${item}`);\n });\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,O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I,WAAtB,CAAkCN,QAAlC;EACAzB,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACAjC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;EACAnC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBS,UAAtB,CAAiCV,OAAO,CAACW,OAAzC;EACArC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBW,QAAtB,CAA+BZ,OAAO,CAACa,KAAvC;EACAvC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBa,YAAtB,CAAmCd,OAAO,CAACe,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACV,mEADU,CAAZ;IAGA,MAAMwC,QAAQ,GAAG,MAAMtC,oCAAoC,CACzDsB,OAAO,CAACiB,aADiD,CAA3D;IAGAD,QAAQ,CAACE,IAAT,CAAc,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACE,aAAF,CAAgBD,CAAhB,CAAxB;IACAJ,QAAQ,CAACM,OAAT,CAAkBC,IAAD,IAAU;MACzB/C,YAAY,CAAE,GAAE+C,IAAK,EAAT,CAAZ;IACD,CAFD;EAGD;AACF,CA7CL,CA8CI;AA9CJ;AAiDA5C,OAAO,CAAC6C,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  removeStaticUserMapping
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin remove-static-user-mapping');
12
- program.description("Remove a subject's static user mapping.").helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action( // implement command logic inside action handler
12
+ program.description("Remove a subject's static user mapping.").helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage("Removing a subject's static user mapping...");
@@ -1 +1 @@
1
- {"version":3,"file":"admin-remove-static-user-mapping.js","names":["Command","Authenticate","Admin","state","common","printMessage","getTokens","removeStaticUserMapping","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","subject","parse"],"sources":["cli/admin/admin-remove-static-user-mapping.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { removeStaticUserMapping } = Admin;\n\nconst program = new Command('frodo admin remove-static-user-mapping');\n\nprogram\n .description(\"Remove a subject's static user mapping.\")\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\"Removing a subject's static user mapping...\");\n await removeStaticUserMapping(options.subject);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAA8BL,KAApC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,wCAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,yCADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGC,MAVH,EAWI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CAAC,6CAAD,CAAZ;IACA,MAAME,uBAAuB,CAACkB,OAAO,CAACW,OAAT,CAA7B;IACA/B,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CAxBL,CAyBI;AAzBJ;AA4BAG,OAAO,CAAC6B,KAAR"}
1
+ {"version":3,"file":"admin-remove-static-user-mapping.js","names":["Command","Authenticate","Admin","state","common","printMessage","getTokens","removeStaticUserMapping","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","subject","parse"],"sources":["cli/admin/admin-remove-static-user-mapping.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { removeStaticUserMapping } = Admin;\n\nconst program = new Command('frodo admin remove-static-user-mapping');\n\nprogram\n .description(\"Remove a subject's static user mapping.\")\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\"Removing a subject's static user mapping...\");\n await removeStaticUserMapping(options.subject);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAA8BL,KAApC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,wCAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,yCADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGC,MAbH,EAcI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACArB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CAAC,6CAAD,CAAZ;IACA,MAAME,uBAAuB,CAACqB,OAAO,CAACiB,OAAT,CAA7B;IACAxC,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CA9BL,CA+BI;AA/BJ;AAkCAG,OAAO,CAACsC,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  repairOrgModel
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin repair-org-model');
12
- program.description('Repair org model.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--exclude-customized', 'Exclude customized properties from repair.')).addOption(new Option('--extend-permissions', 'Extend permissions to include custom attributes.')).addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.')).action( // implement command logic inside action handler
12
+ program.description('Repair org model.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('--exclude-customized', 'Exclude customized properties from repair.')).addOption(new Option('--extend-permissions', 'Extend permissions to include custom attributes.')).addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Repairing org model in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-repair-org-model.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","repairOrgModel","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","excludeCustomized","extendPermissions","dryRun","parse"],"sources":["cli/admin/admin-repair-org-model.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { repairOrgModel } = Admin;\n\nconst program = new Command('frodo admin repair-org-model');\n\nprogram\n .description('Repair org model.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '--exclude-customized',\n 'Exclude customized properties from repair.'\n )\n )\n .addOption(\n new Option(\n '--extend-permissions',\n 'Extend permissions to include custom attributes.'\n )\n )\n .addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Repairing org model in realm \"${state.default.session.getRealm()}\"...`\n );\n await repairOrgModel(\n options.excludeCustomized,\n options.extendPermissions,\n options.dryRun\n );\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAqBL,KAA3B;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,8BAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,mBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAWI,IAAIjB,MAAJ,CACE,sBADF,EAEE,4CAFF,CAXJ,EAgBGiB,SAhBH,CAiBI,IAAIjB,MAAJ,CACE,sBADF,EAEE,kDAFF,CAjBJ,EAsBGiB,SAtBH,CAsBa,IAAIjB,MAAJ,CAAW,WAAX,EAAwB,uCAAxB,CAtBb,EAuBGoB,MAvBH,EAwBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,iCAAgCF,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBS,QAAtB,EAAiC,MADxD,CAAZ;IAGA,MAAM7B,cAAc,CAClBkB,OAAO,CAACY,iBADU,EAElBZ,OAAO,CAACa,iBAFU,EAGlBb,OAAO,CAACc,MAHU,CAApB;IAKAlC,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CA3CL,CA4CI;AA5CJ;AA+CAG,OAAO,CAACgC,KAAR"}
1
+ {"version":3,"file":"admin-repair-org-model.js","names":["Command","Option","Authenticate","Admin","state","common","printMessage","getTokens","repairOrgModel","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","excludeCustomized","extendPermissions","dryRun","parse"],"sources":["cli/admin/admin-repair-org-model.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Admin, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { repairOrgModel } = Admin;\n\nconst program = new Command('frodo admin repair-org-model');\n\nprogram\n .description('Repair org model.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option(\n '--exclude-customized',\n 'Exclude customized properties from repair.'\n )\n )\n .addOption(\n new Option(\n '--extend-permissions',\n 'Extend permissions to include custom attributes.'\n )\n )\n .addOption(new Option('--dry-run', 'Dry-run only, do not perform changes.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Repairing org model in realm \"${state.default.session.getRealm()}\"...`\n );\n await repairOrgModel(\n options.excludeCustomized,\n options.extendPermissions,\n options.dryRun\n );\n printMessage('Done.');\n }\n }\n // end command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,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,iCAAgCF,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBe,QAAtB,EAAiC,MADxD,CAAZ;IAGA,MAAMtC,cAAc,CAClBqB,OAAO,CAACkB,iBADU,EAElBlB,OAAO,CAACmB,iBAFU,EAGlBnB,OAAO,CAACoB,MAHU,CAApB;IAKA3C,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CAjDL,CAkDI;AAlDJ;AAqDAG,OAAO,CAACyC,KAAR"}
@@ -9,7 +9,7 @@ const {
9
9
  revokeOAuth2ClientAdminPrivileges
10
10
  } = Admin;
11
11
  const program = new Command('frodo admin revoke-oauth2-client-admin-privileges');
12
- program.description('Revoke admin privileges from an oauth2 client.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')).action( // implement command logic inside action handler
12
+ program.description('Revoke admin privileges from an oauth2 client.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')).action( // implement command logic inside action handler
13
13
  async (host, realm, user, password, options) => {
14
14
  state.default.session.setTenant(host);
15
15
  state.default.session.setRealm(realm);
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
17
17
  state.default.session.setPassword(password);
18
18
  state.default.session.setDeploymentType(options.type);
19
19
  state.default.session.setAllowInsecureConnection(options.insecure);
20
+ state.default.session.setVerbose(options.verbose);
21
+ state.default.session.setDebug(options.debug);
22
+ state.default.session.setCurlirize(options.curlirize);
20
23
 
21
24
  if (await getTokens()) {
22
25
  printMessage(`Revoking admin privileges from oauth2 client "${options.target}" in realm "${state.default.session.getRealm()}"...`);
@@ -1 +1 @@
1
- {"version":3,"file":"admin-revoke-oauth2-client-admin-privileges.js","names":["Command","Option","Admin","Authenticate","state","common","printMessage","getTokens","revokeOAuth2ClientAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","target","getRealm","parse"],"sources":["cli/admin/admin-revoke-oauth2-client-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Admin, Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { revokeOAuth2ClientAdminPrivileges } = Admin;\n\nconst program = new Command(\n 'frodo admin revoke-oauth2-client-admin-privileges'\n);\n\nprogram\n .description('Revoke admin privileges from an oauth2 client.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Revoking admin privileges from oauth2 client \"${\n options.target\n }\" in realm \"${state.default.session.getRealm()}\"...`\n );\n await revokeOAuth2ClientAdminPrivileges(options.target);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,KAAT,EAAgBC,YAAhB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBJ,YAAtB;AACA,MAAM;EAAEK;AAAF,IAAwCN,KAA9C;AAEA,MAAMO,OAAO,GAAG,IAAIT,OAAJ,CACd,mDADc,CAAhB;AAIAS,OAAO,CACJC,WADH,CACe,gDADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAWI,IAAIjB,MAAJ,CAAW,kCAAX,EAA+C,4BAA/C,CAXJ,EAaGoB,MAbH,EAcI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACAlB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAnB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACApB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACArB,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACA9B,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,iDACCoB,OAAO,CAACW,MACT,eAAcjC,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBU,QAAtB,EAAiC,MAHtC,CAAZ;IAKA,MAAM9B,iCAAiC,CAACkB,OAAO,CAACW,MAAT,CAAvC;IACA/B,YAAY,CAAC,OAAD,CAAZ;EACD;AACF,CA/BL,CAgCI;AAhCJ;AAmCAG,OAAO,CAAC8B,KAAR"}
1
+ {"version":3,"file":"admin-revoke-oauth2-client-admin-privileges.js","names":["Command","Option","Admin","Authenticate","state","common","printMessage","getTokens","revokeOAuth2ClientAdminPrivileges","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","target","getRealm","parse"],"sources":["cli/admin/admin-revoke-oauth2-client-admin-privileges.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Admin, Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { revokeOAuth2ClientAdminPrivileges } = Admin;\n\nconst program = new Command(\n 'frodo admin revoke-oauth2-client-admin-privileges'\n);\n\nprogram\n .description('Revoke admin privileges from an oauth2 client.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option('-t, --target <target name or id>', 'Name of the oauth2 client.')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Revoking admin privileges from oauth2 client \"${\n options.target\n }\" in realm \"${state.default.session.getRealm()}\"...`\n );\n await revokeOAuth2ClientAdminPrivileges(options.target);\n printMessage('Done.');\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,KAAT,EAAgBC,YAAhB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B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